summaryrefslogtreecommitdiff
path: root/Client/Assets/Scripts/XMainClient/UI
diff options
context:
space:
mode:
authorchai <chaifix@163.com>2021-01-25 14:28:30 +0800
committerchai <chaifix@163.com>2021-01-25 14:28:30 +0800
commit6eb915c129fc90c6f4c82ae097dd6ffad5239efc (patch)
tree7dd2be50edf41f36b60fac84696e731c13afe617 /Client/Assets/Scripts/XMainClient/UI
+scripts
Diffstat (limited to 'Client/Assets/Scripts/XMainClient/UI')
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/AccessData.cs22
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/AccessData.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/ActivityGoddessTrialBehaviour.cs49
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/ActivityGoddessTrialBehaviour.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/ActivityGoddessTrialDlg.cs215
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/ActivityGoddessTrialDlg.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/ActivityHandler.cs1424
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/ActivityHandler.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/ActivityRiftBehaviour.cs104
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/ActivityRiftBehaviour.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/ActivityRiftDlg.cs578
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/ActivityRiftDlg.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/ActivityRiftGuidInfoHandler.cs173
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/ActivityRiftGuidInfoHandler.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/ActivityRiftItemsHandler.cs83
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/ActivityRiftItemsHandler.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/ActivityTeamTowerSingleDlg.cs1289
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/ActivityTeamTowerSingleDlg.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/ActivityTeamTowerSingleDlgBehaviour.cs185
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/ActivityTeamTowerSingleDlgBehaviour.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/ActivityWeekendPartyView.cs174
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/ActivityWeekendPartyView.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/AncientHandler.cs279
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/AncientHandler.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/AnnounceView.cs122
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/AnnounceView.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/AnnouncementHandler.cs254
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/AnnouncementHandler.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/ArtifactAtlasHandler.cs403
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/ArtifactAtlasHandler.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/ArtifactBagHandler.cs305
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/ArtifactBagHandler.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/ArtifactComposeHandler.cs235
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/ArtifactComposeHandler.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/ArtifactComposingHandler.cs316
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/ArtifactComposingHandler.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/ArtifactFrameHandler.cs381
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/ArtifactFrameHandler.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/ArtifactFuseHandler.cs504
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/ArtifactFuseHandler.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/ArtifactInscriptionHandler.cs239
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/ArtifactInscriptionHandler.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/ArtifactItemsHandler.cs229
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/ArtifactItemsHandler.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/ArtifactOneKeyHandler.cs142
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/ArtifactOneKeyHandler.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/ArtifactQuanlityFx.cs40
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/ArtifactQuanlityFx.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/ArtifactRecastHandler.cs255
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/ArtifactRecastHandler.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/ArtifactRefinedHandler.cs302
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/ArtifactRefinedHandler.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/ArtifactToolTipDlg.cs405
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/ArtifactToolTipDlg.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/ArtifactTooltipDlgBehaviour.cs23
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/ArtifactTooltipDlgBehaviour.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/AttrFrameParam.cs26
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/AttrFrameParam.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/AttrParam.cs57
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/AttrParam.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/AttrTooltipDlg.cs168
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/AttrTooltipDlg.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/AttrTooltipDlgBehaviour.cs19
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/AttrTooltipDlgBehaviour.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/AuctionBillBehaviour.cs112
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/AuctionBillBehaviour.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/AuctionBillStyle.cs11
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/AuctionBillStyle.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/AuctionBillView.cs183
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/AuctionBillView.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/AuctionBuyHandler.cs560
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/AuctionBuyHandler.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/AuctionHouseHandler.cs603
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/AuctionHouseHandler.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/AuctionNumberOperate.cs242
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/AuctionNumberOperate.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/AuctionPurchaseBehaviour.cs35
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/AuctionPurchaseBehaviour.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/AuctionPurchaseView.cs123
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/AuctionPurchaseView.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/AuctionSellHandler.cs201
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/AuctionSellHandler.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/AuctionWrapContentGroup.cs62
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/AuctionWrapContentGroup.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/Battle.meta9
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/Battle/BattleQTEDlgBehaviour.cs65
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/Battle/BattleQTEDlgBehaviour.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/Battle/ChallengeDlgBehaviour.cs40
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/Battle/ChallengeDlgBehaviour.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/BattleContiBehaviour.cs44
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/BattleContiBehaviour.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/BattleContiDlg.cs473
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/BattleContiDlg.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/BattleContinueDlg.cs124
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/BattleContinueDlg.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/BattleContinueDlgBehaviour.cs31
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/BattleContinueDlgBehaviour.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/BattleDebugHandler.cs43
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/BattleDebugHandler.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/BattleDpsHandler.cs88
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/BattleDpsHandler.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/BattleDramaDlg.cs259
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/BattleDramaDlg.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/BattleDramaDlgBehaviour.cs38
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/BattleDramaDlgBehaviour.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/BattleEnemyType.cs10
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/BattleEnemyType.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/BattleIndicateHandler.cs1508
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/BattleIndicateHandler.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/BattleIndicator.cs22
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/BattleIndicator.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/BattleMain.cs2004
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/BattleMain.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/BattleMainBehaviour.cs291
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/BattleMainBehaviour.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/BattleMysteriourHandler.cs59
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/BattleMysteriourHandler.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/BattleQTEDlg.cs267
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/BattleQTEDlg.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/BattleRecordGameInfo.cs19
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/BattleRecordGameInfo.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/BattleRecordHandler.cs177
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/BattleRecordHandler.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/BattleRecordPlayerInfo.cs13
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/BattleRecordPlayerInfo.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/BattleRiftHandler.cs202
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/BattleRiftHandler.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/BattleShareHandler.cs84
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/BattleShareHandler.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/BattleSkillHandler.cs1273
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/BattleSkillHandler.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/BattleStatisticsHandler.cs159
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/BattleStatisticsHandler.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/BattleTargetHandler.cs76
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/BattleTargetHandler.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/BattleVoiceHandler.cs67
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/BattleVoiceHandler.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/BattleVoiceNode.cs18
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/BattleVoiceNode.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/BattleWorldBossHandler.cs475
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/BattleWorldBossHandler.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/BossRushBehavior.cs134
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/BossRushBehavior.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/BossRushDlg.cs702
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/BossRushDlg.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/CandidatesViewRecommendType.cs11
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/CandidatesViewRecommendType.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/CandidatesViewType.cs11
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/CandidatesViewType.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/ChallegeType.cs11
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/ChallegeType.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/ChallengeDlg.cs190
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/ChallengeDlg.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/CharacterEquipBagHandler.cs416
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/CharacterEquipBagHandler.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/CharacterEquipHandler.cs456
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/CharacterEquipHandler.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/CharacterItemBagHandler.cs412
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/CharacterItemBagHandler.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/ComboBuff.cs15
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/ComboBuff.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/CompeteNestBehaviour.cs54
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/CompeteNestBehaviour.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/CompeteNestDlg.cs247
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/CompeteNestDlg.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/CookingHandler.cs602
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/CookingHandler.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/CrossGVGBattleMember.cs16
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/CrossGVGBattleMember.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/CrossGVGBattlePrepareBehaviour.cs25
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/CrossGVGBattlePrepareBehaviour.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/CrossGVGBattlePrepareView.cs103
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/CrossGVGBattlePrepareView.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/CrossGVGBattleRankFrame.cs8
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/CrossGVGBattleRankFrame.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/CrossGVGCombatHandler.cs87
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/CrossGVGCombatHandler.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/CrossGVGDuelHandler.cs54
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/CrossGVGDuelHandler.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/CrossGVGHallHandle.cs69
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/CrossGVGHallHandle.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/CrossGVGMainView.cs225
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/CrossGVGMainView.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/CustomBattle.meta9
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/CustomBattle/CustomBattleBountyModeDetailHandler.cs255
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/CustomBattle/CustomBattleBountyModeDetailHandler.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/CustomBattle/CustomBattleBountyModeListHandler.cs297
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/CustomBattle/CustomBattleBountyModeListHandler.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/CustomBattle/CustomBattleBriefHandler.cs172
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/CustomBattle/CustomBattleBriefHandler.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/CustomBattle/CustomBattleChestHandler.cs213
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/CustomBattle/CustomBattleChestHandler.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/CustomBattle/CustomBattleCustomModeCreateHandler.cs491
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/CustomBattle/CustomBattleCustomModeCreateHandler.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/CustomBattle/CustomBattleCustomModeDetailHandler.cs386
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/CustomBattle/CustomBattleCustomModeDetailHandler.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/CustomBattle/CustomBattleCustomModeListHandler.cs334
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/CustomBattle/CustomBattleCustomModeListHandler.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/CustomBattle/CustomBattleMatchingHandler.cs40
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/CustomBattle/CustomBattleMatchingHandler.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/CustomBattle/CustomBattlePasswordSettingHandler.cs130
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/CustomBattle/CustomBattlePasswordSettingHandler.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/CustomBattleView.cs257
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/CustomBattleView.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/CutSceneUI.cs121
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/CutSceneUI.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/CutSceneUIBehaviour.cs35
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/CutSceneUIBehaviour.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/DailyActivityDlg.cs96
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/DailyActivityDlg.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/DanceMotionHandler.cs192
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/DanceMotionHandler.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/DemoUI.cs372
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/DemoUI.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/DemoUIBehaviour.cs70
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/DemoUIBehaviour.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/DragonCrusadeBehavior.cs42
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/DragonCrusadeBehavior.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/DragonCrusadeDlg.cs618
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/DragonCrusadeDlg.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/DragonCrusadeGateDlg.cs249
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/DragonCrusadeGateDlg.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/DragonCrusadeRankBehavior.cs23
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/DragonCrusadeRankBehavior.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/DragonCrusadeRankDlg.cs225
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/DragonCrusadeRankDlg.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/DragonGuildLivenessBehaviour.cs47
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/DragonGuildLivenessBehaviour.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/DragonGuildLivenessDlg.cs270
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/DragonGuildLivenessDlg.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/DragonGuildLivenessRecordItem.cs41
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/DragonGuildLivenessRecordItem.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/DragonGuildShopRecordsHandler.cs150
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/DragonGuildShopRecordsHandler.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/DramaDlg.cs848
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/DramaDlg.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/DramaDlgBehaviour.cs255
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/DramaDlgBehaviour.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/DramaPage.cs15
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/DramaPage.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/DungeonSelect.cs2445
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/DungeonSelect.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/DungeonSelectBehaviour.cs238
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/DungeonSelectBehaviour.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/EFavorState.cs12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/EFavorState.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/EmblemBagMode.cs10
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/EmblemBagMode.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/EmblemBagView.cs328
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/EmblemBagView.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/EmblemEquipView.cs300
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/EmblemEquipView.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/EmblemTooltipDlg.cs321
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/EmblemTooltipDlg.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/EmblemTooltipDlgBehaviour.cs8
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/EmblemTooltipDlgBehaviour.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/EmblemTotalAttributeView.cs179
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/EmblemTotalAttributeView.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/EnchantActiveHandler.cs194
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/EnchantActiveHandler.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/EnchantAttrPreviewHandler.cs89
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/EnchantAttrPreviewHandler.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/EnchantBagHandler.cs152
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/EnchantBagHandler.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/EnchantOperateHandler.cs528
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/EnchantOperateHandler.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/EnchantResultHandler.cs305
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/EnchantResultHandler.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/EncourageShowInfo.cs112
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/EncourageShowInfo.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/EndlessAbyssBehaviour.cs39
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/EndlessAbyssBehaviour.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/EndlessAbyssDlg.cs211
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/EndlessAbyssDlg.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/EnemyInfoUpdater.cs6
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/EnemyInfoUpdater.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/EnhanceMasterHandler.cs158
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/EnhanceMasterHandler.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/EnhanceView.cs772
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/EnhanceView.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/EquipCreateDlg.cs143
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/EquipCreateDlg.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/EquipFusionHandler.cs732
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/EquipFusionHandler.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/EquipFusionSelectHandler.cs148
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/EquipFusionSelectHandler.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/EquipSetItemBaseView.cs266
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/EquipSetItemBaseView.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/EquipSetItemView.cs51
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/EquipSetItemView.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/EquipTooltipDlg.cs669
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/EquipTooltipDlg.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/EquipTooltipDlgBehaviour.cs16
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/EquipTooltipDlgBehaviour.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/EquipUpgradeHandler.cs330
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/EquipUpgradeHandler.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/ExchangeItemBehaviour.cs94
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/ExchangeItemBehaviour.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/ExchangeItemDlg.cs367
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/ExchangeItemDlg.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/FashionAttrTotalHandler.cs233
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/FashionAttrTotalHandler.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/FashionBagHandler.cs356
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/FashionBagHandler.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/FashionCollectionDlg.cs262
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/FashionCollectionDlg.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/FashionCollectionDlgBehaviour.cs54
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/FashionCollectionDlgBehaviour.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/FashionComboBox.cs88
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/FashionComboBox.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/FashionHairToolTipBehaviour.cs12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/FashionHairToolTipBehaviour.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/FashionHairToolTipDlg.cs137
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/FashionHairToolTipDlg.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/FashionStorageAttributeFrame.cs171
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/FashionStorageAttributeFrame.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/FashionStorageBehaviour.cs91
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/FashionStorageBehaviour.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/FashionStorageButtonGoFashion.cs29
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/FashionStorageButtonGoFashion.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/FashionStorageColouring.cs30
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/FashionStorageColouring.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/FashionStorageDlg.cs632
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/FashionStorageDlg.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/FashionStorageEffectFrame.cs203
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/FashionStorageEffectFrame.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/FashionStorageEquipToolTipDlg.cs51
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/FashionStorageEquipToolTipDlg.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/FashionStorageFashionHairToolTipDlg.cs65
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/FashionStorageFashionHairToolTipDlg.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/FashionStorageFashionPutOn.cs62
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/FashionStorageFashionPutOn.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/FashionStorageFashionPutOnSuit.cs95
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/FashionStorageFashionPutOnSuit.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/FashionStorageFashionTakeOff.cs48
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/FashionStorageFashionTakeOff.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/FashionStorageFashionToolTipDlg.cs203
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/FashionStorageFashionToolTipDlg.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/FashionStorageFashtionTakeOffSuit.cs60
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/FashionStorageFashtionTakeOffSuit.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/FashionStorageHairColorFrame.cs206
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/FashionStorageHairColorFrame.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/FashionStorageTooltipBase.cs103
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/FashionStorageTooltipBase.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/FashionStorageType.cs11
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/FashionStorageType.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/FashionStotageDisplayHandle.cs76
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/FashionStotageDisplayHandle.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/FashionTooltipDlg.cs297
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/FashionTooltipDlg.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/FashionTooltipDlgBehaviour.cs12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/FashionTooltipDlgBehaviour.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/FeastHandler.cs287
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/FeastHandler.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/FindBackData.cs25
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/FindBackData.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/FirstPassGhjcHandler.cs42
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/FirstPassGhjcHandler.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/FirstPassGuindRankHandler.cs283
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/FirstPassGuindRankHandler.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/FirstPassMainHandler.cs391
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/FirstPassMainHandler.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/FirstPassMwcxHandler.cs25
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/FirstPassMwcxHandler.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/FirstPassTeamInfoHandler.cs412
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/FirstPassTeamInfoHandler.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/FlowerActivityHandler.cs82
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/FlowerActivityHandler.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/ForgeAttrPreViewHandler.cs141
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/ForgeAttrPreViewHandler.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/ForgeMainHandler.cs766
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/ForgeMainHandler.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/FriendsWeddingHandler.cs477
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/FriendsWeddingHandler.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/FriendsWeddingLevelUpBehaviour.cs41
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/FriendsWeddingLevelUpBehaviour.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/FriendsWeddingLevelUpView.cs90
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/FriendsWeddingLevelUpView.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/FriendsWeddingPrivilegeHandler.cs152
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/FriendsWeddingPrivilegeHandler.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/FrozenSealHandler.cs365
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/FrozenSealHandler.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/FrozenSealState.cs13
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/FrozenSealState.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/FunctionDef.cs19
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/FunctionDef.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/GVGBattleMemberBase.cs317
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/GVGBattleMemberBase.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/GVGBattlePrepareBase.cs599
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/GVGBattlePrepareBase.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/GVGBattlePrepareBehaviour.cs104
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/GVGBattlePrepareBehaviour.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/GVGBattleRankFrameBase.cs133
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/GVGBattleRankFrameBase.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/GVGCombatGuildDisplay.cs157
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/GVGCombatGuildDisplay.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/GVGCombatHandlerBase.cs272
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/GVGCombatHandlerBase.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/GVGCombatInfoDisplay.cs116
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/GVGCombatInfoDisplay.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/GVGDuelHandlerBase.cs76
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/GVGDuelHandlerBase.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/GVGDuelWrapDisplay.cs160
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/GVGDuelWrapDisplay.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/GVGHallBase.cs91
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/GVGHallBase.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/GameCommunityHandler.cs358
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/GameCommunityHandler.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/GameSystem.meta9
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/GameSystem/SkillDlgPromoteHandler.cs783
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/GameSystem/SkillDlgPromoteHandler.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/GuildArenaBattleDuelInfo.cs40
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/GuildArenaBattleDuelInfo.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/GuildArenaBattleDuelTeamInfo.cs58
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/GuildArenaBattleDuelTeamInfo.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/GuildArenaCombatHandle.cs264
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/GuildArenaCombatHandle.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/GuildArenaCombatInfo.cs128
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/GuildArenaCombatInfo.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/GuildArenaDefeatBehaviour.cs41
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/GuildArenaDefeatBehaviour.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/GuildArenaDefeatDlg.cs234
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/GuildArenaDefeatDlg.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/GuildArenaDuelFinalResultBehaviour.cs25
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/GuildArenaDuelFinalResultBehaviour.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/GuildArenaDuelFinalResultDlg.cs158
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/GuildArenaDuelFinalResultDlg.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/GuildArenaDuelHandler.cs73
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/GuildArenaDuelHandler.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/GuildArenaDuelInfo.cs137
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/GuildArenaDuelInfo.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/GuildArenaDuelResultInfo.cs94
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/GuildArenaDuelResultInfo.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/GuildArenaDuelRoundResultBehaviour.cs35
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/GuildArenaDuelRoundResultBehaviour.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/GuildArenaDuelRoundResultDlg.cs202
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/GuildArenaDuelRoundResultDlg.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/GuildArenaGuildInfo.cs88
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/GuildArenaGuildInfo.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/GuildArenaHallHandle.cs222
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/GuildArenaHallHandle.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/GuildArenaInspireCD.cs81
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/GuildArenaInspireCD.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/GuildArenaRankBehaviour.cs26
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/GuildArenaRankBehaviour.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/GuildArenaRankDlg.cs114
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/GuildArenaRankDlg.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/GuildArenadDuelFinalInfo.cs41
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/GuildArenadDuelFinalInfo.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/GuildBuffOperationHandler.cs508
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/GuildBuffOperationHandler.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/GuildCollectRewardBehaviour.cs32
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/GuildCollectRewardBehaviour.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/GuildCollectRewardDlg.cs161
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/GuildCollectRewardDlg.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/GuildDragonChallengeResultView.cs66
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/GuildDragonChallengeResultView.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/GuildFiexdRedPackageView.cs149
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/GuildFiexdRedPackageView.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/GuildInheritBehaviour.cs28
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/GuildInheritBehaviour.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/GuildInheritDlg.cs114
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/GuildInheritDlg.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/GuildInheritProcessBehaviour.cs22
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/GuildInheritProcessBehaviour.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/GuildInheritProcessDlg.cs90
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/GuildInheritProcessDlg.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/GuildJockerMatchView.cs17
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/GuildJockerMatchView.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/GuildMiniReportHandler.cs373
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/GuildMiniReportHandler.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/GuildMiniReportItem.cs29
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/GuildMiniReportItem.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/GuildPositionBehaviour.cs25
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/GuildPositionBehaviour.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/GuildPositionMenu.cs128
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/GuildPositionMenu.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/GuildQualifierBehavior.cs72
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/GuildQualifierBehavior.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/GuildQualifierDlg.cs362
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/GuildQualifierDlg.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/GuildQualifierHandler.cs128
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/GuildQualifierHandler.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/GuildSalaryDescHandler.cs133
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/GuildSalaryDescHandler.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/GuildSalayBehavior.cs103
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/GuildSalayBehavior.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/GuildSalayDlg.cs349
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/GuildSalayDlg.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/GuildScoreInfo.cs53
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/GuildScoreInfo.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/GuildTerritoryBahaviour.cs31
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/GuildTerritoryBahaviour.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/GuildTerritoryDeclareBehaviour.cs49
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/GuildTerritoryDeclareBehaviour.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/GuildTerritoryDeclareDlg.cs379
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/GuildTerritoryDeclareDlg.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/GuildTerritoryDisplay.cs106
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/GuildTerritoryDisplay.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/GuildTerritoryLeagueBehaviour.cs28
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/GuildTerritoryLeagueBehaviour.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/GuildTerritoryLeagueDlg.cs105
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/GuildTerritoryLeagueDlg.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/GuildTerritoryMainBehaviour.cs50
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/GuildTerritoryMainBehaviour.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/GuildTerritoryMainDlg.cs155
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/GuildTerritoryMainDlg.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/GuildTerritoryMessageBehaviour.cs25
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/GuildTerritoryMessageBehaviour.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/GuildTerritoryMessageDlg.cs105
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/GuildTerritoryMessageDlg.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/GuildTerritoryReportDlg.cs185
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/GuildTerritoryReportDlg.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/GuildTerritoryRewardBehaviour.cs30
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/GuildTerritoryRewardBehaviour.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/GuildTerritoryRewardDlg.cs107
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/GuildTerritoryRewardDlg.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/HallFameBehavior.cs52
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/HallFameBehavior.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/HallFameDlg.cs542
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/HallFameDlg.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/HallFameShareBehavior.cs42
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/HallFameShareBehavior.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/HallFameShareDlg.cs192
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/HallFameShareDlg.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/HeroAttrBehaviour.cs62
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/HeroAttrBehaviour.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/HeroAttrDlg.cs270
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/HeroAttrDlg.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/HeroBattleDlg.cs613
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/HeroBattleDlg.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/HeroBattleHandler.cs655
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/HeroBattleHandler.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/HeroBattleMVPDlg.cs130
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/HeroBattleMVPDlg.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/HeroBattleSkillHandler.cs718
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/HeroBattleSkillHandler.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/HeroBattleTeam.cs54
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/HeroBattleTeam.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/HeroBattleTeamHandler.cs144
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/HeroBattleTeamHandler.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/HeroSkillType.cs11
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/HeroSkillType.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/HolidayHandler.cs134
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/HolidayHandler.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/HomeCropInfoHandler.cs767
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/HomeCropInfoHandler.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/HomeFishingBehaviour.cs99
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/HomeFishingBehaviour.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/HomeFishingDlg.cs445
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/HomeFishingDlg.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/HomeFriendHandler.cs245
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/HomeFriendHandler.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/HomeHandler.cs171
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/HomeHandler.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/HomeMainDlg.cs129
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/HomeMainDlg.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/HomePlantBehaviour.cs20
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/HomePlantBehaviour.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/HomePlantDlg.cs271
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/HomePlantDlg.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/HomeSeedBagHandler.cs385
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/HomeSeedBagHandler.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/IAttrTooltipDlgHandler.cs34
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/IAttrTooltipDlgHandler.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/IGVGBattleMember.cs20
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/IGVGBattleMember.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/IGVGBattlePrepare.cs24
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/IGVGBattlePrepare.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/IRankSource.cs12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/IRankSource.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/IRankView.cs15
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/IRankView.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/ITooltipDlg.cs14
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/ITooltipDlg.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/IWorldBossBattleSource.cs17
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/IWorldBossBattleSource.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/IWorldBossBattleView.cs13
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/IWorldBossBattleView.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/InnerGVGBattleMember.cs16
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/InnerGVGBattleMember.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/InnerGVGBattlePrepareBehaviour.cs12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/InnerGVGBattlePrepareBehaviour.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/InnerGVGBattlePrepareView.cs29
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/InnerGVGBattlePrepareView.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/ItemAccessDlg.cs410
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/ItemAccessDlg.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/ItemAccessDlgBehaviour.cs34
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/ItemAccessDlgBehaviour.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/ItemIconListDlg.cs148
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/ItemIconListDlg.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/ItemIconListDlgBehaviour.cs49
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/ItemIconListDlgBehaviour.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/ItemSystemDlg.cs356
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/ItemSystemDlg.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/ItemTooltipDlg.cs159
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/ItemTooltipDlg.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/ItemTooltipDlgBehaviour.cs12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/ItemTooltipDlgBehaviour.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/ItemUseListDlg.cs107
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/ItemUseListDlg.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/ItemUseListDlgBehaviour.cs34
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/ItemUseListDlgBehaviour.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/JadeBagHandler.cs172
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/JadeBagHandler.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/JadeComposeFrameHandler.cs481
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/JadeComposeFrameHandler.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/JadeComposeHandler.cs329
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/JadeComposeHandler.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/JadeEquipHandler.cs651
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/JadeEquipHandler.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/JadeTooltipDlg.cs96
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/JadeTooltipDlg.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/JokerKingMainBehavior.cs58
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/JokerKingMainBehavior.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/KillInfoMode.cs10
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/KillInfoMode.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/LoadingDlg.cs161
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/LoadingDlg.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/LoadingDlgBehaviour.cs37
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/LoadingDlgBehaviour.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/LoginWindowBehaviour.cs117
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/LoginWindowBehaviour.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/LoverLivenessRecordItem.cs41
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/LoverLivenessRecordItem.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/LoversLivenessBehaviour.cs53
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/LoversLivenessBehaviour.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/LoversLivenessDlg.cs254
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/LoversLivenessDlg.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/LuckyTurntableFrameHandler.cs493
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/LuckyTurntableFrameHandler.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/LuckyTurntableRecordBehaviour.cs9
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/LuckyTurntableRecordBehaviour.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/LuckyTurntableRecordView.cs126
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/LuckyTurntableRecordView.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/MailSystemDlg.cs94
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/MailSystemDlg.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/MallSystemDlg.cs262
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/MallSystemDlg.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/MilitaryRankDlg.cs350
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/MilitaryRankDlg.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/MiniMapElement.cs20
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/MiniMapElement.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/MobaActivityDlg.cs78
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/MobaActivityDlg.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/MobaBattleHandler.cs534
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/MobaBattleHandler.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/MobaBehaviour.cs16
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/MobaBehaviour.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/MobaEndDlg.cs62
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/MobaEndDlg.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/MobaHeadCondition.cs185
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/MobaHeadCondition.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/ModalDlg.cs250
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/ModalDlg.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/ModalDlg2.cs91
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/ModalDlg2.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/ModalDlg2Behaviour.cs25
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/ModalDlg2Behaviour.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/ModalDlgBehaviour.cs58
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/ModalDlgBehaviour.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/ModalSettingNumberDlg.cs164
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/ModalSettingNumberDlg.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/ModalSettingNumberDlgBehaviour.cs38
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/ModalSettingNumberDlgBehaviour.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/ModalThreeDlg.cs148
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/ModalThreeDlg.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/ModalThreeDlgBehaviour.cs36
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/ModalThreeDlgBehaviour.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/MoneyTreeData.cs22
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/MoneyTreeData.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/MyBattleKillInfo.cs17
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/MyBattleKillInfo.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/MyHomeHandler.cs380
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/MyHomeHandler.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/NestStarRewardHandler.cs120
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/NestStarRewardHandler.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/OldFriendsReplayHandler.cs80
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/OldFriendsReplayHandler.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/PPTBehaviour.cs22
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/PPTBehaviour.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/PPTCheckMgr.cs62
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/PPTCheckMgr.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/PPTDlg.cs176
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/PPTDlg.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/PVPActivityDlg.cs292
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/PVPActivityDlg.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/PairsPetInviteBehaviour.cs25
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/PairsPetInviteBehaviour.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/PairsPetInviteView.cs203
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/PairsPetInviteView.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/PairsPetSetHandler.cs136
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/PairsPetSetHandler.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/PandoraBehaviour.cs55
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/PandoraBehaviour.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/PandoraSDKHandler.cs65
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/PandoraSDKHandler.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/PandoraView.cs442
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/PandoraView.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/PartnerLivenessBehaviour.cs53
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/PartnerLivenessBehaviour.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/PartnerLivenessDlg.cs278
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/PartnerLivenessDlg.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/PartnerLivenessRecordItem.cs41
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/PartnerLivenessRecordItem.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/PartnerMainHandler.cs554
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/PartnerMainHandler.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/PartnerShopRecordsHandler.cs147
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/PartnerShopRecordsHandler.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/PressTipsBehaviour.cs20
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/PressTipsBehaviour.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/PressTipsDlg.cs90
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/PressTipsDlg.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/ProfessionChangeDlg.cs304
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/ProfessionChangeDlg.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/ProfressionTrialsHandler.cs246
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/ProfressionTrialsHandler.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/QAAudioPriority.cs11
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/QAAudioPriority.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/QteUIType.cs11
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/QteUIType.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/QualityFilterCallback.cs6
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/QualityFilterCallback.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/QualityFilterHandler.cs94
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/QualityFilterHandler.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/QuickReplyDlg.cs188
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/QuickReplyDlg.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/ReceiveEnergyDlg.cs314
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/ReceiveEnergyDlg.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/ReceiveEnergyPanelModelView.cs40
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/ReceiveEnergyPanelModelView.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/RecycleItemBagView.cs126
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/RecycleItemBagView.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/RecycleItemOperateView.cs262
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/RecycleItemOperateView.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/RecycleSystemDlg.cs128
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/RecycleSystemDlg.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/RefinedReplaceHandler.cs246
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/RefinedReplaceHandler.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/RenameBehaviour.cs35
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/RenameBehaviour.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/RenameDlg.cs266
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/RenameDlg.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/ReportMsg.cs10
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/ReportMsg.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/ReportNode.cs19
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/ReportNode.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/RequestBehaviour.cs25
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/RequestBehaviour.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/RequestDlg.cs114
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/RequestDlg.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/ReviveDlg.cs127
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/ReviveDlg.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/ReviveDlgBehaviour.cs39
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/ReviveDlgBehaviour.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/RewardSystemDlg.cs136
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/RewardSystemDlg.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/RewdAnimBehaviour.cs30
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/RewdAnimBehaviour.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/RewdAnimDlg.cs261
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/RewdAnimDlg.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/RoundFlag.cs11
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/RoundFlag.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/ScreenShotShareBehaviour.cs198
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/ScreenShotShareBehaviour.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/ScreenShotShareView.cs1116
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/ScreenShotShareView.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/SelectCharWindowBehaviour.cs130
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/SelectCharWindowBehaviour.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/SevenLoginBehaviour.cs51
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/SevenLoginBehaviour.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/SevenLoginDlg.cs411
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/SevenLoginDlg.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/SevenLoginWrapItem.cs62
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/SevenLoginWrapItem.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/SmeltMainHandler.cs747
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/SmeltMainHandler.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/SpectateLevelRewardView.cs300
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/SpectateLevelRewardView.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/SpectateSceneBehaviour.cs123
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/SpectateSceneBehaviour.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/SpectateSceneView.cs1277
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/SpectateSceneView.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/SpectateView.cs666
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/SpectateView.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/SpriteEggLotteryType.cs12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/SpriteEggLotteryType.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/SpriteFightFrame.cs218
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/SpriteFightFrame.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/SpriteLotteryHandler.cs374
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/SpriteLotteryHandler.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/SpriteMainFrame.cs455
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/SpriteMainFrame.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/SpriteResolveFrame.cs297
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/SpriteResolveFrame.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/SpriteSelectHandler.cs154
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/SpriteSelectHandler.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/SpriteShopHandler.cs217
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/SpriteShopHandler.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/SpriteStarUpWindow.cs596
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/SpriteStarUpWindow.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/SpriteSystemDlg.cs211
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/SpriteSystemDlg.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/SpriteWindow.cs11
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/SpriteWindow.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/SuperRiskDlg.cs156
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/SuperRiskDlg.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/SuperRiskDlgBehaviour.cs19
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/SuperRiskDlgBehaviour.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/SuperRiskGameHandler.cs1400
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/SuperRiskGameHandler.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/SuperRiskOnlineBoxHandler.cs96
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/SuperRiskOnlineBoxHandler.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/SuperRiskOpenboxHandler.cs359
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/SuperRiskOpenboxHandler.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/SuperRiskSelectMapHandler.cs206
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/SuperRiskSelectMapHandler.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/SystemHelpBehaviour.cs42
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/SystemHelpBehaviour.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/SystemHelpDlg.cs95
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/SystemHelpDlg.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/SystemRewardTypeMrg.cs14
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/SystemRewardTypeMrg.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/TaJieHelpDlg.cs193
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/TaJieHelpDlg.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/TabDlgBase.cs240
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/TabDlgBase.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/TabDlgBehaviour.cs25
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/TabDlgBehaviour.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/TheExpBehaviour.cs125
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/TheExpBehaviour.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/TheExpView.cs704
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/TheExpView.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/TitanBarBehaviour.cs23
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/TitanBarBehaviour.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/TitanbarView.cs123
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/TitanbarView.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/TitleDlg.cs219
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/TitleDlg.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/TitleDlgBehaviour.cs45
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/TitleDlgBehaviour.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/TitleShareBehaviour.cs32
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/TitleShareBehaviour.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/TitleShareDlg.cs134
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/TitleShareDlg.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/TooltipDlg.cs946
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/TooltipDlg.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/TooltipDlgBehaviour.cs128
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/TooltipDlgBehaviour.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/TooltipParam.cs37
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/TooltipParam.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/UICommon.meta9
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/UICommon/DlgBase.cs750
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/UICommon/DlgBase.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/UICommon/DlgBehaviourBase.cs130
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/UICommon/DlgBehaviourBase.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/UICommon/TabHandleBase.cs60
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/UICommon/TabHandleBase.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/UICommon/UIManager.cs586
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/UICommon/UIManager.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/UICommon/VirtualJoystick.cs139
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/UICommon/VirtualJoystick.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/UiUtility.cs2850
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/UiUtility.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/VoiceQAAudio.cs17
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/VoiceQAAudio.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/VoiceQATipsType.cs13
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/VoiceQATipsType.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/WebView.cs439
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/WebView.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/WebViewBehaviour.cs56
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/WebViewBehaviour.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/WeddingEnterApplyBehaviour.cs42
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/WeddingEnterApplyBehaviour.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/WeddingEnterApplyView.cs290
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/WeddingEnterApplyView.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/WeddingInviteTab.cs12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/WeddingInviteTab.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/WeddingSceneHandler.cs581
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/WeddingSceneHandler.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/WeekNestDlg.cs225
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/WeekNestDlg.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/WeekShareRewardHandler.cs129
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/WeekShareRewardHandler.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/WeekendPartyHandler.cs98
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/WeekendPartyHandler.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/WeeknestBehaviour.cs48
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/WeeknestBehaviour.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/WelfareGrowthFundItem.cs158
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/WelfareGrowthFundItem.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XAchieveView.cs435
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XAchieveView.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XActivityInviteBehavior.cs39
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XActivityInviteBehavior.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XActivityInviteView.cs439
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XActivityInviteView.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XBackFlowMallHandler.cs209
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XBackFlowMallHandler.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XBackFlowPandoraSDKHandler.cs65
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XBackFlowPandoraSDKHandler.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XBattleEnemyInfo.cs488
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XBattleEnemyInfo.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XBattleEnemyInfoHandler.cs387
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XBattleEnemyInfoHandler.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XBattleOptionsHandler.cs45
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XBattleOptionsHandler.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XBattleTeamTowerHandler.cs131
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XBattleTeamTowerHandler.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XBossRefreshAnimHander.cs294
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XBossRefreshAnimHander.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XBossRewardDlg.cs87
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XBossRewardDlg.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XBriefLevelupBehaviour.cs25
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XBriefLevelupBehaviour.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XBriefLevelupView.cs362
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XBriefLevelupView.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XBriefStrengthenBehaviour.cs28
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XBriefStrengthenBehaviour.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XBriefStrengthenView.cs124
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XBriefStrengthenView.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XBuffIcon.cs186
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XBuffIcon.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XBuffMonitorHandler.cs97
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XBuffMonitorHandler.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XBuyCountBehaviour.cs32
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XBuyCountBehaviour.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XBuyCountView.cs106
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XBuyCountView.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XCampDuelMainHandler.cs594
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XCampDuelMainHandler.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XCampDuelPointRewardHandler.cs106
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XCampDuelPointRewardHandler.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XCampDuelRankRewardHandler.cs129
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XCampDuelRankRewardHandler.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XCharacterCommonMenuView.cs700
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XCharacterCommonMenuView.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XCommonHelpTipBehaviour.cs25
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XCommonHelpTipBehaviour.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XCommonHelpTipView.cs126
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XCommonHelpTipView.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XContentMailView.cs238
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XContentMailView.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XDesignationView.cs536
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XDesignationView.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XDragonGuildApproveSettingView.cs63
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XDragonGuildApproveSettingView.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XDragonGuildTaskBehaviour.cs56
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XDragonGuildTaskBehaviour.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XDragonGuildTaskView.cs272
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XDragonGuildTaskView.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XDragonHistoryHandler.cs270
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XDragonHistoryHandler.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XDragonPartnerHandler.cs147
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XDragonPartnerHandler.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XDragonRecordHandler.cs286
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XDragonRecordHandler.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XDragonRwdHandler.cs189
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XDragonRwdHandler.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XDramaOperate.cs51
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XDramaOperate.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XDramaOperateButton.cs36
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XDramaOperateButton.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XDramaOperateList.cs34
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XDramaOperateList.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XDramaOperateParam.cs158
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XDramaOperateParam.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XFPStrengthenBehaviour.cs38
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XFPStrengthenBehaviour.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XFavorParam.cs38
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XFavorParam.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XFlowerReplyBehavior.cs47
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XFlowerReplyBehavior.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XFlowerReplyView.cs219
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XFlowerReplyView.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XFpStrengthenView.cs469
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XFpStrengthenView.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XFreeTeamLeagueMainBehavior.cs90
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XFreeTeamLeagueMainBehavior.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XFreeTeamLeagueMainView.cs465
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XFreeTeamLeagueMainView.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XFriendsRankHandler.cs491
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XFriendsRankHandler.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XFriendsViewAddBlockHandler.cs71
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XFriendsViewAddBlockHandler.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XFriendsViewHintHandler.cs56
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XFriendsViewHintHandler.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XFriendsViewReceiveGiftHandler.cs237
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XFriendsViewReceiveGiftHandler.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XGameSirBehaviour.cs25
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XGameSirBehaviour.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XGameSirView.cs256
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XGameSirView.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XGuildApplyBehaviour.cs42
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XGuildApplyBehaviour.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XGuildApplyView.cs142
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XGuildApplyView.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XGuildApproveBehaviour.cs44
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XGuildApproveBehaviour.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XGuildApproveSettingView.cs63
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XGuildApproveSettingView.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XGuildApproveView.cs245
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XGuildApproveView.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XGuildArenaDlg.cs214
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XGuildArenaDlg.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XGuildBasicInfoDisplay.cs245
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XGuildBasicInfoDisplay.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XGuildBoonView.cs121
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XGuildBoonView.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XGuildCreateView.cs186
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XGuildCreateView.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XGuildDragonView.cs492
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XGuildDragonView.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XGuildEditAnnounceView.cs64
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XGuildEditAnnounceView.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XGuildGrowthDonateBehavior.cs35
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XGuildGrowthDonateBehavior.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XGuildGrowthEntranceBehavior.cs22
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XGuildGrowthEntranceBehavior.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XGuildHallBehaviour.cs163
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XGuildHallBehaviour.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XGuildHallView.cs1137
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XGuildHallView.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XGuildHuntDramaOperate.cs52
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XGuildHuntDramaOperate.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XGuildListBehaviour.cs54
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XGuildListBehaviour.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XGuildListView.cs377
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XGuildListView.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XGuildLogView.cs88
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XGuildLogView.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XGuildMemberInfoDisplay.cs176
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XGuildMemberInfoDisplay.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XGuildMembersBehaviour.cs27
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XGuildMembersBehaviour.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XGuildMembersView.cs432
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XGuildMembersView.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XGuildPortraitBehaviour.cs37
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XGuildPortraitBehaviour.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XGuildPortraitView.cs143
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XGuildPortraitView.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XGuildRedPacketDetailView.cs258
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XGuildRedPacketDetailView.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XGuildRedPacketView.cs278
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XGuildRedPacketView.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XGuildRedPakageLogView.cs125
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XGuildRedPakageLogView.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XGuildSignInBehaviour.cs45
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XGuildSignInBehaviour.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XGuildSignInView.cs249
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XGuildSignInView.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XGuildSignRedPackageView.cs506
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XGuildSignRedPackageView.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XGuildViewBehaviour.cs32
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XGuildViewBehaviour.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XGuildViewView.cs172
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XGuildViewView.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XLoginView.cs525
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XLoginView.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XMISystemAnnounceHandler.cs106
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XMISystemAnnounceHandler.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XMainInterface.cs3026
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XMainInterface.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XMainInterfaceBehaviour.cs440
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XMainInterfaceBehaviour.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XMainInterfaceBriefHandler.cs256
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XMainInterfaceBriefHandler.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XMainInterfaceMemberMonitor.cs94
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XMainInterfaceMemberMonitor.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XMainInterfaceTaskHandler.cs122
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XMainInterfaceTaskHandler.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XMainInterfaceTeamHandler.cs220
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XMainInterfaceTeamHandler.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XMainSubstance.cs124
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XMainSubstance.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XMainSubstanceHandler.cs525
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XMainSubstanceHandler.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XMentorshipApplicationBehavior.cs28
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XMentorshipApplicationBehavior.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XMentorshipApplicationsView.cs267
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XMentorshipApplicationsView.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XMentorshipCandidatesBehavior.cs31
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XMentorshipCandidatesBehavior.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XMentorshipCandidatesView.cs311
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XMentorshipCandidatesView.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XMentorshipPupilsDramaOperate.cs391
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XMentorshipPupilsDramaOperate.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XNPCFavorBehaviour.cs56
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XNPCFavorBehaviour.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XNPCFavorDlg.cs317
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XNPCFavorDlg.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XNPCFavorDrama.cs190
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XNPCFavorDrama.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XNPCFavorDramaExchange.cs166
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XNPCFavorDramaExchange.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XNPCFavorDramaSend.cs237
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XNPCFavorDramaSend.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XNPCFavorHandler.cs248
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XNPCFavorHandler.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XNPCSendSubHandler.cs339
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XNPCSendSubHandler.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XNPCUnionHandler.cs167
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XNPCUnionHandler.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XNPCUnionMemSubHandler.cs342
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XNPCUnionMemSubHandler.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XNpcAttrHandler.cs99
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XNpcAttrHandler.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XPartnerDramaOperate.cs78
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XPartnerDramaOperate.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XPetMainBehaviour.cs178
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XPetMainBehaviour.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XPetMainView.cs923
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XPetMainView.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XPlayerInfoChildBaseView.cs37
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XPlayerInfoChildBaseView.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XPlayerInfoChildView.cs38
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XPlayerInfoChildView.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XPlayerMailView.cs26
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XPlayerMailView.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XQuickReplyBehavior.cs39
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XQuickReplyBehavior.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XRewardLevelView.cs270
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XRewardLevelView.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XRwdMailView.cs121
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XRwdMailView.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XSceneDamageRankHandler.cs308
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XSceneDamageRankHandler.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XSelectCharView.cs318
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XSelectCharView.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XServerActivityView.cs247
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XServerActivityView.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XShowGetItemUIBehaviour.cs30
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XShowGetItemUIBehaviour.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XShowGetItemUIView.cs200
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XShowGetItemUIView.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XShowGetItemView.cs223
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XShowGetItemView.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XSparkController.cs111
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XSparkController.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XSpriteAttributeAHandler.cs203
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XSpriteAttributeAHandler.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XSpriteAttributeHandler.cs87
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XSpriteAttributeHandler.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XSpriteAttributePHandler.cs169
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XSpriteAttributePHandler.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XSpriteAttributeSHandler.cs126
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XSpriteAttributeSHandler.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XSpriteAvatarHandler.cs307
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XSpriteAvatarHandler.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XSystemItemMailView.cs224
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XSystemItemMailView.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XSystemMailView.cs258
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XSystemMailView.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XTargetRewardPopWindow.cs147
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XTargetRewardPopWindow.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XTargetRewardView.cs328
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XTargetRewardView.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XTeamBattleConfirmBehaviour.cs55
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XTeamBattleConfirmBehaviour.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XTeamBattleConfirmView.cs296
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XTeamBattleConfirmView.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XTeamBattleQuickConfirmBehaviour.cs19
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XTeamBattleQuickConfirmBehaviour.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XTeamBattleQuickConfirmView.cs117
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XTeamBattleQuickConfirmView.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XTeamConfirmBehaviour.cs43
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XTeamConfirmBehaviour.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XTeamConfirmView.cs203
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XTeamConfirmView.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XTeamInputPasswordBehaviour.cs22
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XTeamInputPasswordBehaviour.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XTeamInviteBehaviour.cs51
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XTeamInviteBehaviour.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XTeamInviteView.cs393
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XTeamInviteView.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XTeamInvitedListBehaviour.cs33
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XTeamInvitedListBehaviour.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XTeamInvitedListView.cs191
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XTeamInvitedListView.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XTeamLeagueBattlePrepareBehaviour.cs73
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XTeamLeagueBattlePrepareBehaviour.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XTeamLeagueBattlePrepareView.cs374
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XTeamLeagueBattlePrepareView.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XTeamLeagueFinalResultView.cs285
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XTeamLeagueFinalResultView.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XTeamListBehaviour.cs46
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XTeamListBehaviour.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XTeamListView.cs439
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XTeamListView.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XTeamView.cs338
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XTeamView.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XTempTipDefine.cs26
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XTempTipDefine.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XTitanItem.cs162
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XTitanItem.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XVoiceQAView.cs902
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XVoiceQAView.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XWeddingCostBehavior.cs41
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XWeddingCostBehavior.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XWeddingCostView.cs117
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XWeddingCostView.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XWeddingDramaOperate.cs291
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XWeddingDramaOperate.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XWeddingInviteBehavior.cs36
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XWeddingInviteBehavior.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XWeddingInviteView.cs280
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XWeddingInviteView.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XWeddingLitterBoyDramaOperate.cs47
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XWeddingLitterBoyDramaOperate.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XWeddingLitterGirlDramaOperate.cs47
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XWeddingLitterGirlDramaOperate.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XWelfareDiamondHandler.cs257
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XWelfareDiamondHandler.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XWelfareGiftBagHandler.cs342
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XWelfareGiftBagHandler.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XWelfareGrowthFundHandler.cs138
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XWelfareGrowthFundHandler.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XWelfareKingdomPrivilegeDetailBehaviour.cs34
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XWelfareKingdomPrivilegeDetailBehaviour.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XWelfareKingdomPrivilegeDetailView.cs75
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XWelfareKingdomPrivilegeDetailView.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XWelfareKingdomPrivilegeHandler.cs288
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XWelfareKingdomPrivilegeHandler.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XWelfareKingdomPrivilegeRenewBehaviour.cs37
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XWelfareKingdomPrivilegeRenewBehaviour.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XWelfareKingdomPrivilegeRenewView.cs102
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XWelfareKingdomPrivilegeRenewView.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XWelfareMoneyTreeHandler.cs443
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XWelfareMoneyTreeHandler.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XWelfareNiceGirlHandler.cs392
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XWelfareNiceGirlHandler.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XWelfareRewardBackHandler.cs1134
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XWelfareRewardBackHandler.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XWelfareYyMallHandler.cs472
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XWelfareYyMallHandler.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XWelffareFirstRechargrHandler.cs206
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XWelffareFirstRechargrHandler.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XWheelOfFortuneHandler.cs270
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XWheelOfFortuneHandler.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XWheelState.cs12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XWheelState.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XWorldBossDamageRankHandler.cs463
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XWorldBossDamageRankHandler.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XWorldBossEndRankView.cs343
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XWorldBossEndRankView.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XWorldBossResultView.cs83
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XWorldBossResultView.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XWorldBossView.cs618
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XWorldBossView.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XYyMallOperate.cs28
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/XYyMallOperate.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/YorozuyaHandler.cs151
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/YorozuyaHandler.cs.meta12
1252 files changed, 142527 insertions, 0 deletions
diff --git a/Client/Assets/Scripts/XMainClient/UI/AccessData.cs b/Client/Assets/Scripts/XMainClient/UI/AccessData.cs
new file mode 100644
index 00000000..22c197f6
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/AccessData.cs
@@ -0,0 +1,22 @@
+using System;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class AccessData
+ {
+ public int BQid;
+
+ public int OpenLevel;
+
+ public bool IsOpen;
+
+ public FpStrengthenTable.RowData Row;
+
+ public string SceStr = string.Empty;
+
+ public string DescStr;
+
+ public XSysDefine SysType;
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/AccessData.cs.meta b/Client/Assets/Scripts/XMainClient/UI/AccessData.cs.meta
new file mode 100644
index 00000000..a13de96a
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/AccessData.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: ae25bbbabf22c9b46bd30a29ef9e7224
+timeCreated: 1611404338
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/ActivityGoddessTrialBehaviour.cs b/Client/Assets/Scripts/XMainClient/UI/ActivityGoddessTrialBehaviour.cs
new file mode 100644
index 00000000..b9fe7c79
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/ActivityGoddessTrialBehaviour.cs
@@ -0,0 +1,49 @@
+using System;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class ActivityGoddessTrialBehaviour : DlgBehaviourBase
+ {
+ public IXUILabel m_canJoinTimeslab;
+
+ public IXUILabel m_NeedTimesLab;
+
+ public IXUIButton m_goBattleBtn;
+
+ public IXUIButton m_closedBtn;
+
+ public IXUIButton m_getBtn;
+
+ public IXUIButton m_shopBtn;
+
+ public IXUIButton m_Help;
+
+ public GameObject m_noTimesGo;
+
+ public GameObject m_hadGetGo;
+
+ public XUIPool m_ItemPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ private void Awake()
+ {
+ this.m_Help = (base.transform.Find("Bg/Help").GetComponent("XUIButton") as IXUIButton);
+ Transform transform = base.transform.Find("Bg");
+ this.m_closedBtn = (transform.Find("Close").GetComponent("XUIButton") as IXUIButton);
+ this.m_goBattleBtn = (transform.Find("GoBattle").GetComponent("XUIButton") as IXUIButton);
+ this.m_getBtn = (transform.Find("GetRewardBtn").GetComponent("XUIButton") as IXUIButton);
+ this.m_shopBtn = (transform.Find("BtnShop").GetComponent("XUIButton") as IXUIButton);
+ this.m_canJoinTimeslab = (transform.Find("times").GetComponent("XUILabel") as IXUILabel);
+ this.m_NeedTimesLab = (transform.Find("Reward/NeedTimes").GetComponent("XUILabel") as IXUILabel);
+ this.m_noTimesGo = transform.Find("NoJoinTimesTips").gameObject;
+ this.m_hadGetGo = transform.Find("HadGet").gameObject;
+ transform = transform.Find("Reward/Item");
+ this.m_ItemPool.SetupPool(transform.gameObject, transform.Find("Item").gameObject, 2u, true);
+ this.m_canJoinTimeslab.SetText("");
+ this.m_NeedTimesLab.SetText("");
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/ActivityGoddessTrialBehaviour.cs.meta b/Client/Assets/Scripts/XMainClient/UI/ActivityGoddessTrialBehaviour.cs.meta
new file mode 100644
index 00000000..d157bf9c
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/ActivityGoddessTrialBehaviour.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: cbd8de76590e7c142b17668fae45d728
+timeCreated: 1611404547
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/ActivityGoddessTrialDlg.cs b/Client/Assets/Scripts/XMainClient/UI/ActivityGoddessTrialDlg.cs
new file mode 100644
index 00000000..792ca063
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/ActivityGoddessTrialDlg.cs
@@ -0,0 +1,215 @@
+using System;
+using System.Collections.Generic;
+using KKSG;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class ActivityGoddessTrialDlg : DlgBase<ActivityGoddessTrialDlg, ActivityGoddessTrialBehaviour>
+ {
+ public override string fileName
+ {
+ get
+ {
+ return "Hall/GoddessTrialDlg";
+ }
+ }
+
+ public override int layer
+ {
+ get
+ {
+ return 1;
+ }
+ }
+
+ public override bool autoload
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override bool hideMainMenu
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override bool pushstack
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override bool fullscreenui
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ private XExpeditionDocument _doc;
+
+ protected override void Init()
+ {
+ this._doc = XDocuments.GetSpecificDocument<XExpeditionDocument>(XExpeditionDocument.uuID);
+ this._doc.GoddessTrialView = this;
+ this.RefreshTimes();
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ base.uiBehaviour.m_closedBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnCloseDlg));
+ base.uiBehaviour.m_goBattleBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnEnterTeamClick));
+ base.uiBehaviour.m_getBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnGetReward));
+ base.uiBehaviour.m_shopBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnGoToShop));
+ base.uiBehaviour.m_Help.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnHelpClicked));
+ }
+
+ public bool OnHelpClicked(IXUIButton button)
+ {
+ DlgBase<XCommonHelpTipView, XCommonHelpTipBehaviour>.singleton.ShowHelp(XSysDefine.XSys_Activity_GoddessTrial);
+ return true;
+ }
+
+ protected override void OnShow()
+ {
+ this.FillItem();
+ this.RequstLeftCount();
+ }
+
+ protected override void OnHide()
+ {
+ base.uiBehaviour.m_ItemPool.ReturnAll(false);
+ }
+
+ private void FillItem()
+ {
+ base.uiBehaviour.m_ItemPool.ReturnAll(false);
+ SeqList<int> sequenceList = XSingleton<XGlobalConfig>.singleton.GetSequenceList("GoddessTrialRewards", true);
+ float num = (float)((int)(-(int)(sequenceList.Count - 1)) * base.uiBehaviour.m_ItemPool.TplWidth / 2);
+ for (int i = 0; i < (int)sequenceList.Count; i++)
+ {
+ GameObject gameObject = base.uiBehaviour.m_ItemPool.FetchGameObject(false);
+ gameObject.transform.localScale = Vector3.one;
+ gameObject.transform.localPosition = new Vector3(num + (float)(i * base.uiBehaviour.m_ItemPool.TplWidth), 0f, 0f);
+ XSingleton<XItemDrawerMgr>.singleton.normalItemDrawer.DrawItem(gameObject, sequenceList[i, 0], sequenceList[i, 1], false);
+ IXUISprite ixuisprite = gameObject.transform.Find("Icon").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.ID = (ulong)((long)sequenceList[i, 0]);
+ ixuisprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.ShowTip));
+ }
+ }
+
+ public void RefreshTimes()
+ {
+ bool flag = this._doc == null || !base.IsVisible();
+ if (!flag)
+ {
+ int dayCount = this._doc.GetDayCount(TeamLevelType.TeamLevelGoddessTrial, null);
+ int dayMaxCount = this._doc.GetDayMaxCount(TeamLevelType.TeamLevelGoddessTrial, null);
+ base.uiBehaviour.m_canJoinTimeslab.SetText(string.Format("{0}/{1}", dayCount, dayMaxCount));
+ bool flag2 = dayCount > 0;
+ base.uiBehaviour.m_goBattleBtn.SetVisible(flag2);
+ base.uiBehaviour.m_noTimesGo.SetActive(!flag2);
+ base.uiBehaviour.m_hadGetGo.SetActive(false);
+ int goddessRewardsCanGetTimes = this._doc.GoddessRewardsCanGetTimes;
+ bool flag3 = goddessRewardsCanGetTimes > 0;
+ if (flag3)
+ {
+ base.uiBehaviour.m_getBtn.SetVisible(true);
+ base.uiBehaviour.m_NeedTimesLab.SetVisible(false);
+ }
+ else
+ {
+ bool flag4 = dayCount > 0;
+ if (flag4)
+ {
+ int num = dayMaxCount - dayCount;
+ int @int = XSingleton<XGlobalConfig>.singleton.GetInt("GoddessTrialNeedJoinTimes");
+ base.uiBehaviour.m_getBtn.SetVisible(false);
+ base.uiBehaviour.m_NeedTimesLab.SetVisible(true);
+ base.uiBehaviour.m_NeedTimesLab.SetText(string.Format(XStringDefineProxy.GetString("GODDESSTRIAL_NEEDFIGHT_TIMES"), @int - num % @int));
+ }
+ else
+ {
+ base.uiBehaviour.m_getBtn.SetVisible(false);
+ base.uiBehaviour.m_NeedTimesLab.SetVisible(false);
+ base.uiBehaviour.m_hadGetGo.SetActive(true);
+ }
+ }
+ }
+ }
+
+ private void RequstLeftCount()
+ {
+ List<ExpeditionTable.RowData> expeditionList = this._doc.GetExpeditionList(TeamLevelType.TeamLevelGoddessTrial);
+ bool flag = expeditionList != null && expeditionList.Count > 0;
+ if (flag)
+ {
+ XLevelSealDocument specificDocument = XDocuments.GetSpecificDocument<XLevelSealDocument>(XLevelSealDocument.uuID);
+ for (int i = 0; i < expeditionList.Count; i++)
+ {
+ bool flag2 = specificDocument.SealType == expeditionList[i].LevelSealType;
+ if (flag2)
+ {
+ this._doc.ExpeditionId = expeditionList[i].DNExpeditionID;
+ XTeamDocument specificDocument2 = XDocuments.GetSpecificDocument<XTeamDocument>(XTeamDocument.uuID);
+ specificDocument2.ReqTeamOp(TeamOperate.TEAM_QUERYCOUNT, 0UL, null, TeamMemberType.TMT_NORMAL, null);
+ return;
+ }
+ }
+ }
+ XSingleton<XDebug>.singleton.AddLog("Df data is error,not find target DATA!", null, null, null, null, null, XDebugColor.XDebug_None);
+ }
+
+ private bool OnCloseDlg(IXUIButton btn)
+ {
+ this.SetVisibleWithAnimation(false, null);
+ return true;
+ }
+
+ private bool OnEnterTeamClick(IXUIButton button)
+ {
+ XTeamDocument specificDocument = XDocuments.GetSpecificDocument<XTeamDocument>(XTeamDocument.uuID);
+ specificDocument.SetAndMatch(this._doc.ExpeditionId);
+ return true;
+ }
+
+ private bool OnGetReward(IXUIButton button)
+ {
+ RpcC2G_GetGoddessTrialRewards rpc = new RpcC2G_GetGoddessTrialRewards();
+ XSingleton<XClientNetwork>.singleton.Send(rpc);
+ return true;
+ }
+
+ private bool OnGoToShop(IXUIButton button)
+ {
+ DlgBase<MallSystemDlg, MallSystemBehaviour>.singleton.ShowShopSystem(XSysDefine.XSys_Mall_Tear, 0UL);
+ return true;
+ }
+
+ private void ShowTip(IXUISprite sp)
+ {
+ bool flag = this._doc.GoddessRewardsCanGetTimes > 0;
+ if (flag)
+ {
+ this.OnGetReward(null);
+ }
+ else
+ {
+ XSingleton<UiUtility>.singleton.OnItemClick(sp);
+ }
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/ActivityGoddessTrialDlg.cs.meta b/Client/Assets/Scripts/XMainClient/UI/ActivityGoddessTrialDlg.cs.meta
new file mode 100644
index 00000000..9d36cc3b
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/ActivityGoddessTrialDlg.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 0a15b7a127463654ebe910bc11c6c8ad
+timeCreated: 1611403161
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/ActivityHandler.cs b/Client/Assets/Scripts/XMainClient/UI/ActivityHandler.cs
new file mode 100644
index 00000000..337fde50
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/ActivityHandler.cs
@@ -0,0 +1,1424 @@
+using System;
+using System.Collections.Generic;
+using KKSG;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class ActivityHandler : DlgHandlerBase
+ {
+ protected override string FileName
+ {
+ get
+ {
+ return "GameSystem/DailyActivity/ActivityHandler";
+ }
+ }
+
+ private XActivityDocument m_doc;
+
+ private Transform m_selectItemTra;
+
+ private GameObject m_noDailyItemTips;
+
+ private GameObject m_noMulItemTips;
+
+ private GameObject m_mulItem;
+
+ public IXUIScrollView m_dailyScrollView;
+
+ private IXUIScrollView m_mulScrollView;
+
+ private IXUIButton m_shopBtn;
+
+ private IXUIButton m_viewBtn;
+
+ private IXUILabel m_describeContentLab;
+
+ private XUIPool m_dropItemPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ private XUIPool m_mulItemPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ private XUIPool m_dailyItemPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ private bool m_bIsInit = false;
+
+ private bool m_bIsDaily = true;
+
+ private string m_describeTxt = "";
+
+ private XSysDefine m_selectSysId = XSysDefine.XSys_None;
+
+ private List<ActivityHandler.DailyData> m_dailyDataList = new List<ActivityHandler.DailyData>();
+
+ private class DailyData
+ {
+ public bool IsOpen
+ {
+ get
+ {
+ return this.m_isOpen;
+ }
+ }
+
+ public bool IsFinished
+ {
+ get
+ {
+ return this.m_isFinished & this.m_isOpen;
+ }
+ }
+
+ public string CountStr
+ {
+ get
+ {
+ return this.m_countStr;
+ }
+ }
+
+ public string NotOpenReason
+ {
+ get
+ {
+ return this.m_notOpenReason;
+ }
+ }
+
+ public ActivityListTable.RowData Row
+ {
+ get
+ {
+ return this.m_row;
+ }
+ }
+
+ public int CanBuyCount
+ {
+ get
+ {
+ return this.m_canBuyCount;
+ }
+ }
+
+ public int LeftDay
+ {
+ get
+ {
+ return this.m_leftDay;
+ }
+ }
+
+ private bool m_isOpen = false;
+
+ private bool m_isFinished = false;
+
+ private int m_leftCount = 0;
+
+ private int m_totalCount = 0;
+
+ private int m_canBuyCount = 0;
+
+ private int m_leftDay = 0;
+
+ private string m_countStr;
+
+ private string m_notOpenReason;
+
+ private ActivityListTable.RowData m_row;
+
+ public DailyData(ActivityListTable.RowData row, int serverOpenDay)
+ {
+ this.SetData(row, serverOpenDay);
+ }
+
+ public void SetCount(int leftCount, int totalCount, int canBuyCount, int leftDay)
+ {
+ this.m_leftCount = leftCount;
+ this.m_totalCount = totalCount;
+ this.m_canBuyCount = canBuyCount;
+ this.m_leftDay = leftDay;
+ XSysDefine sysID = (XSysDefine)this.m_row.SysID;
+ if (sysID <= XSysDefine.XSys_Activity_DragonNest)
+ {
+ if (sysID != XSysDefine.XSys_SuperRisk && sysID != XSysDefine.XSys_AbyssParty && sysID != XSysDefine.XSys_Activity_DragonNest)
+ {
+ goto IL_207;
+ }
+ }
+ else if (sysID <= XSysDefine.XSys_GuildDailyTask)
+ {
+ if (sysID != XSysDefine.XSys_Activity_TeamTowerSingle)
+ {
+ if (sysID != XSysDefine.XSys_GuildDailyTask)
+ {
+ goto IL_207;
+ }
+ XGuildDailyTaskDocument specificDocument = XDocuments.GetSpecificDocument<XGuildDailyTaskDocument>(XGuildDailyTaskDocument.uuID);
+ bool flag = specificDocument.GoToTakeTask();
+ if (flag)
+ {
+ this.m_isFinished = false;
+ this.m_countStr = XSingleton<XStringTable>.singleton.GetString("NoReceive");
+ }
+ else
+ {
+ bool flag2 = leftCount == 0 || specificDocument.IsRewarded;
+ if (flag2)
+ {
+ this.m_isFinished = true;
+ this.m_countStr = string.Format("{0}/{1}", 0, this.m_totalCount);
+ }
+ else
+ {
+ this.m_isFinished = false;
+ this.m_countStr = string.Format("{0}/{1}", this.m_leftCount, this.m_totalCount);
+ }
+ }
+ return;
+ }
+ }
+ else
+ {
+ if (sysID == XSysDefine.XSys_GuildWeeklyBountyTask)
+ {
+ XGuildWeeklyBountyDocument doc = XGuildWeeklyBountyDocument.Doc;
+ bool flag3 = doc.GoToTakeTask();
+ if (flag3)
+ {
+ this.m_isFinished = false;
+ this.m_countStr = XSingleton<XStringTable>.singleton.GetString("NoReceive");
+ }
+ else
+ {
+ bool flag4 = leftCount == 0 || doc.HasFinishWeeklyTasks();
+ if (flag4)
+ {
+ this.m_isFinished = true;
+ this.m_countStr = string.Format("{0}/{1}", 0, this.m_totalCount);
+ }
+ else
+ {
+ this.m_isFinished = false;
+ this.m_countStr = string.Format("{0}/{1}", this.m_leftCount, this.m_totalCount);
+ }
+ }
+ return;
+ }
+ if (sysID != XSysDefine.xSys_Mysterious)
+ {
+ goto IL_207;
+ }
+ }
+ this.m_isFinished = false;
+ this.m_countStr = string.Format("{0}/{1}", this.m_leftCount, this.m_totalCount);
+ return;
+ IL_207:
+ bool flag5 = leftCount == 0;
+ if (flag5)
+ {
+ this.m_isFinished = true;
+ this.m_countStr = string.Format("{0}/{1}", this.m_leftCount, this.m_totalCount);
+ }
+ else
+ {
+ this.m_isFinished = false;
+ this.m_countStr = string.Format("{0}/{1}", this.m_leftCount, this.m_totalCount);
+ }
+ }
+
+ private void SetData(ActivityListTable.RowData row, int serverOpenDay)
+ {
+ this.m_row = row;
+ int sysOpenServerDay = XSingleton<XGameSysMgr>.singleton.GetSysOpenServerDay((int)row.SysID);
+ bool flag = !XSingleton<XGameSysMgr>.singleton.IsSystemOpen((int)row.SysID);
+ if (flag)
+ {
+ this.m_isOpen = false;
+ int sysOpenLevel = XSingleton<XGameSysMgr>.singleton.GetSysOpenLevel((int)row.SysID);
+ bool flag2 = (long)sysOpenLevel > (long)((ulong)XSingleton<XAttributeMgr>.singleton.XPlayerData.Level);
+ if (flag2)
+ {
+ int sysOpenLevel2 = XSingleton<XGameSysMgr>.singleton.GetSysOpenLevel((int)row.SysID);
+ this.m_notOpenReason = string.Format(XSingleton<XStringTable>.singleton.GetString("LEVEL_REQUIRE_LEVEL"), sysOpenLevel2);
+ }
+ else
+ {
+ bool flag3 = serverOpenDay < sysOpenServerDay;
+ if (flag3)
+ {
+ this.m_notOpenReason = XStringDefineProxy.GetString("MulActivity_ServerOpenDay", new object[]
+ {
+ (sysOpenServerDay - serverOpenDay).ToString()
+ });
+ }
+ }
+ }
+ else
+ {
+ this.m_isOpen = true;
+ }
+ }
+ }
+
+ protected override void Init()
+ {
+ this.m_doc = (XSingleton<XGame>.singleton.Doc.GetXComponent(XActivityDocument.uuID) as XActivityDocument);
+ this.m_doc.View = this;
+ this.m_noDailyItemTips = base.PanelObject.transform.Find("Bg/NoDailyActivity").gameObject;
+ this.m_noMulItemTips = base.PanelObject.transform.Find("Bg/NoMulActivity").gameObject;
+ Transform transform = base.PanelObject.transform.Find("Bg/ActivityPanel");
+ this.m_dailyScrollView = (transform.GetComponent("XUIScrollView") as IXUIScrollView);
+ transform = base.PanelObject.transform.Find("Bg/DailyTpl");
+ this.m_dailyItemPool.SetupPool(base.PanelObject, transform.gameObject, 2u, false);
+ transform = base.PanelObject.transform.Find("Bg/MulActivityPanel");
+ this.m_mulItem = base.PanelObject.transform.Find("Bg/MulTpl").gameObject;
+ this.m_mulItemPool.SetupPool(base.PanelObject, this.m_mulItem, 2u, false);
+ this.m_mulScrollView = (transform.GetComponent("XUIScrollView") as IXUIScrollView);
+ transform = base.PanelObject.transform.Find("Bg/Bottom");
+ this.m_describeContentLab = (transform.Find("DescribeContentLab").GetComponent("XUILabel") as IXUILabel);
+ this.m_shopBtn = (transform.Find("BtnShop").GetComponent("XUIButton") as IXUIButton);
+ this.m_viewBtn = (transform.Find("ActivityView").GetComponent("XUIButton") as IXUIButton);
+ transform = transform.Find("Rewards");
+ this.m_dropItemPool.SetupPool(transform.gameObject, transform.Find("Item").gameObject, 4u, false);
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ this.m_noDailyItemTips.SetActive(false);
+ this.m_noMulItemTips.SetActive(false);
+ this.m_bIsInit = true;
+ XSingleton<XTutorialHelper>.singleton.ActivityOpen = false;
+ this.m_doc.ReqDayCount();
+ this.m_doc.SendQueryGetMulActInfo();
+ }
+
+ protected override void OnHide()
+ {
+ base.OnHide();
+ XSingleton<XTutorialHelper>.singleton.ActivityOpen = false;
+ }
+
+ public override void OnUpdate()
+ {
+ base.OnUpdate();
+ this.RefreshLeftTime();
+ }
+
+ public override void StackRefresh()
+ {
+ base.StackRefresh();
+ bool flag = XSingleton<XGame>.singleton.CurrentStage == null || !XSingleton<XGame>.singleton.CurrentStage.IsEntered;
+ if (!flag)
+ {
+ this.OnShow();
+ }
+ }
+
+ public void RefreshDailyActivity()
+ {
+ this.FillDailyActivity();
+ }
+
+ public void RefreshMulActivity()
+ {
+ this.FillMulActivity();
+ }
+
+ private void FillDailyActivity()
+ {
+ this.m_dailyItemPool.ReturnAll(false);
+ int num = this.m_doc._ActivityListTable.Table.Length;
+ bool flag = num == 0;
+ if (flag)
+ {
+ this.m_noDailyItemTips.SetActive(true);
+ this.m_dailyScrollView.gameObject.SetActive(false);
+ }
+ else
+ {
+ this.SetDailyData(num);
+ this.m_noDailyItemTips.SetActive(false);
+ this.m_dailyScrollView.gameObject.SetActive(true);
+ this.FillDailyActivityItems();
+ this.m_dailyScrollView.ResetPosition();
+ }
+ }
+
+ private void FillDailyActivityItems()
+ {
+ for (int i = 0; i < this.m_dailyDataList.Count; i++)
+ {
+ GameObject gameObject = this.m_dailyItemPool.FetchGameObject(false);
+ gameObject.transform.parent = this.m_dailyScrollView.gameObject.transform;
+ gameObject.transform.localScale = Vector3.one;
+ gameObject.transform.localPosition = this.m_dailyItemPool.TplPos + new Vector3((float)(this.m_dailyItemPool.TplWidth * (i % 2)), (float)(-(float)this.m_dailyItemPool.TplHeight * (i / 2)), 0f);
+ this.FillDailyActivityItem(gameObject.transform, i, this.m_dailyDataList[i]);
+ }
+ this.m_dailyScrollView.gameObject.SetActive(false);
+ this.m_dailyScrollView.gameObject.SetActive(true);
+ }
+
+ private void FillDailyActivityItem(Transform t, int index, ActivityHandler.DailyData daily)
+ {
+ bool flag = daily == null;
+ if (flag)
+ {
+ XSingleton<XDebug>.singleton.AddGreenLog("info is nil", null, null, null, null, null);
+ }
+ else
+ {
+ t.gameObject.name = string.Format("Item{0}", daily.Row.SysID);
+ t.Find("SelectIcon").transform.gameObject.SetActive(false);
+ IXUILabel ixuilabel = t.Find("Title").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel.SetText(daily.Row.Tittle);
+ IXUISprite ixuisprite = t.Find("Icon").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.SetSprite(daily.Row.Icon, daily.Row.AtlasPath, false);
+ ixuisprite.ID = (ulong)((long)index);
+ ixuisprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnClickDailyIconSpr));
+ bool bIsInit = this.m_bIsInit;
+ if (bIsInit)
+ {
+ this.m_bIsInit = false;
+ this.m_selectItemTra = t;
+ this.OnClickDailyIconSpr(ixuisprite);
+ }
+ ixuisprite = (t.Find("GongPing").GetComponent("XUISprite") as IXUISprite);
+ ixuisprite.gameObject.SetActive(true);
+ bool flag2 = daily.Row.SysID == 520u;
+ if (flag2)
+ {
+ bool flag3 = this.NestNeedTransform();
+ bool flag4 = daily.Row.TagName != null;
+ if (flag4)
+ {
+ bool flag5 = flag3;
+ if (flag5)
+ {
+ bool flag6 = daily.Row.TagName.Length >= 1;
+ if (flag6)
+ {
+ ixuisprite.spriteName = daily.Row.TagName[0];
+ }
+ else
+ {
+ ixuisprite.gameObject.SetActive(false);
+ }
+ }
+ else
+ {
+ bool flag7 = daily.Row.TagName.Length >= 2;
+ if (flag7)
+ {
+ ixuisprite.spriteName = daily.Row.TagName[1];
+ }
+ else
+ {
+ ixuisprite.gameObject.SetActive(false);
+ }
+ }
+ }
+ else
+ {
+ ixuisprite.gameObject.SetActive(false);
+ }
+ }
+ else
+ {
+ bool flag8 = daily.Row.TagName == null || daily.Row.TagName.Length == 0;
+ if (flag8)
+ {
+ ixuisprite.gameObject.SetActive(false);
+ }
+ else
+ {
+ ixuisprite.spriteName = daily.Row.TagName[0];
+ }
+ }
+ this.SetTags(t.Find("Tags"), daily.Row.TagNames);
+ IXUIButton ixuibutton = t.Find("JoinBtn").GetComponent("XUIButton") as IXUIButton;
+ ixuibutton.ID = (ulong)daily.Row.SysID;
+ ixuibutton.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnClickDailyJoinBtn));
+ ixuibutton.gameObject.SetActive(daily.IsOpen && !daily.IsFinished);
+ GameObject gameObject = t.Find("LeftCount").gameObject;
+ GameObject gameObject2 = t.Find("Finished").gameObject;
+ IXUILabel ixuilabel2 = t.Find("UnReceive").GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel3 = t.Find("ConditionLab").GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel4 = t.Find("Buy").GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel5 = t.Find("resetting").GetComponent("XUILabel") as IXUILabel;
+ ixuisprite = (t.Find("Double").GetComponent("XUISprite") as IXUISprite);
+ gameObject.SetActive(false);
+ gameObject2.SetActive(false);
+ ixuilabel4.gameObject.SetActive(false);
+ ixuilabel5.gameObject.SetActive(false);
+ ixuilabel2.gameObject.SetActive(false);
+ ixuilabel3.gameObject.SetActive(false);
+ ixuisprite.gameObject.SetActive(false);
+ bool isOpen = daily.IsOpen;
+ if (isOpen)
+ {
+ ixuisprite.gameObject.SetActive(this.m_doc.IsInnerDropTime(daily.Row.SysID));
+ gameObject2.SetActive(daily.IsFinished);
+ bool flag9 = daily.CanBuyCount != 0;
+ if (flag9)
+ {
+ ixuilabel4.gameObject.SetActive(true);
+ ixuilabel4.SetText(string.Format(XSingleton<XStringTable>.singleton.GetString("CanBuyCount"), daily.CanBuyCount));
+ }
+ bool flag10 = daily.LeftDay != 0;
+ if (flag10)
+ {
+ ixuilabel5.gameObject.SetActive(true);
+ ixuilabel5.SetText(string.Format(XSingleton<XStringTable>.singleton.GetString("ResetTime"), daily.LeftDay));
+ }
+ XSysDefine sysID = (XSysDefine)daily.Row.SysID;
+ if (sysID <= XSysDefine.XSys_GuildDailyTask)
+ {
+ if (sysID != XSysDefine.XSys_AbyssParty && sysID != XSysDefine.XSys_Activity_DragonNest)
+ {
+ if (sysID != XSysDefine.XSys_GuildDailyTask)
+ {
+ goto IL_5E1;
+ }
+ XGuildDailyTaskDocument specificDocument = XDocuments.GetSpecificDocument<XGuildDailyTaskDocument>(XGuildDailyTaskDocument.uuID);
+ bool flag11 = specificDocument.GoToTakeTask();
+ if (flag11)
+ {
+ ixuilabel2.gameObject.SetActive(true);
+ ixuilabel2.SetText(daily.CountStr);
+ }
+ else
+ {
+ gameObject.SetActive(true);
+ ixuilabel = (t.Find("LeftCount/Num").GetComponent("XUILabel") as IXUILabel);
+ ixuilabel.SetText(daily.CountStr);
+ }
+ }
+ }
+ else if (sysID != XSysDefine.XSys_GuildInherit)
+ {
+ if (sysID != XSysDefine.XSys_GuildWeeklyBountyTask)
+ {
+ if (sysID != XSysDefine.xSys_Mysterious)
+ {
+ goto IL_5E1;
+ }
+ }
+ else
+ {
+ XGuildWeeklyBountyDocument doc = XGuildWeeklyBountyDocument.Doc;
+ bool flag12 = doc.GoToTakeTask();
+ if (flag12)
+ {
+ ixuilabel2.gameObject.SetActive(true);
+ ixuilabel2.SetText(daily.CountStr);
+ }
+ else
+ {
+ gameObject.SetActive(true);
+ ixuilabel = (t.Find("LeftCount/Num").GetComponent("XUILabel") as IXUILabel);
+ ixuilabel.SetText(daily.CountStr);
+ }
+ }
+ }
+ goto IL_613;
+ IL_5E1:
+ gameObject.SetActive(true);
+ ixuilabel = (t.Find("LeftCount/Num").GetComponent("XUILabel") as IXUILabel);
+ ixuilabel.SetText(daily.CountStr);
+ IL_613:;
+ }
+ else
+ {
+ ixuilabel3.gameObject.SetActive(true);
+ ixuilabel3.SetText(daily.NotOpenReason);
+ }
+ }
+ }
+
+ private bool NestNeedTransform()
+ {
+ XLevelSealDocument specificDocument = XDocuments.GetSpecificDocument<XLevelSealDocument>(XLevelSealDocument.uuID);
+ bool flag = specificDocument.SealType < 3u;
+ bool result;
+ if (flag)
+ {
+ result = false;
+ }
+ else
+ {
+ List<int> intList = XSingleton<XGlobalConfig>.singleton.GetIntList("NestTransform");
+ DateTime dateTime = new DateTime(1970, 1, 1, 0, 0, 0);
+ dateTime = dateTime.AddSeconds(this.m_doc.ServerTimeSince1970);
+ dateTime = dateTime.ToLocalTime();
+ for (int i = 0; i < intList.Count; i++)
+ {
+ int num = (intList[i] != 7) ? intList[i] : 0;
+ bool flag2 = num < 0 || num > 6;
+ if (!flag2)
+ {
+ bool flag3 = num == XFastEnumIntEqualityComparer<DayOfWeek>.ToInt(dateTime.DayOfWeek);
+ if (flag3)
+ {
+ bool flag4 = dateTime.Hour >= 5;
+ if (flag4)
+ {
+ return true;
+ }
+ }
+ num = ((num + 1 > 6) ? 0 : (num + 1));
+ bool flag5 = num == XFastEnumIntEqualityComparer<DayOfWeek>.ToInt(dateTime.DayOfWeek);
+ if (flag5)
+ {
+ bool flag6 = dateTime.Hour < 5;
+ if (flag6)
+ {
+ return true;
+ }
+ }
+ }
+ }
+ result = false;
+ }
+ return result;
+ }
+
+ private void SetTags(Transform tra, string[] names)
+ {
+ int num = 0;
+ bool flag = names != null;
+ if (flag)
+ {
+ num = names.Length;
+ }
+ bool flag2 = num == 0;
+ if (flag2)
+ {
+ tra.gameObject.SetActive(false);
+ }
+ else
+ {
+ tra.gameObject.SetActive(true);
+ IXUISprite ixuisprite = tra.Find("Tag1").GetComponent("XUISprite") as IXUISprite;
+ IXUISprite ixuisprite2 = tra.Find("Tag2").GetComponent("XUISprite") as IXUISprite;
+ bool flag3 = num == 1;
+ if (flag3)
+ {
+ ixuisprite.SetSprite(names[0]);
+ ixuisprite2.gameObject.SetActive(false);
+ }
+ else
+ {
+ ixuisprite.SetSprite(names[0]);
+ ixuisprite2.gameObject.SetActive(true);
+ ixuisprite2.SetSprite(names[1]);
+ }
+ }
+ }
+
+ private void SetDailyData(int count)
+ {
+ this.m_dailyDataList.Clear();
+ int leftCount = 0;
+ int totalCount = 0;
+ int canBuyCount = 0;
+ int leftDay = 0;
+ uint num = XSingleton<XAttributeMgr>.singleton.XPlayerData.Level + (uint)XSingleton<XGlobalConfig>.singleton.GetInt("DailyActivityLimitLevel");
+ for (int i = 0; i < count; i++)
+ {
+ bool flag = this.m_doc._ActivityListTable.Table[i] == null;
+ if (!flag)
+ {
+ ActivityHandler.DailyData dailyData = new ActivityHandler.DailyData(this.m_doc._ActivityListTable.Table[i], this.m_doc.ServerOpenDay);
+ this.m_doc.GetCount((int)dailyData.Row.SysID, ref leftCount, ref totalCount, ref canBuyCount);
+ this.m_doc.GetLeftDay((int)dailyData.Row.SysID, ref leftDay);
+ dailyData.SetCount(leftCount, totalCount, canBuyCount, leftDay);
+ int sysOpenLevel = XSingleton<XGameSysMgr>.singleton.GetSysOpenLevel((XSysDefine)dailyData.Row.SysID);
+ bool flag2 = !dailyData.IsOpen && ((long)sysOpenLevel > (long)((ulong)num) || (long)sysOpenLevel <= (long)((ulong)XSingleton<XAttributeMgr>.singleton.XPlayerData.Level));
+ if (!flag2)
+ {
+ this.m_dailyDataList.Add(dailyData);
+ }
+ }
+ }
+ this.m_dailyDataList.Sort(new Comparison<ActivityHandler.DailyData>(this.DailyDataCompare));
+ }
+
+ private int DailyDataCompare(ActivityHandler.DailyData left, ActivityHandler.DailyData right)
+ {
+ bool flag = left.IsFinished != right.IsFinished;
+ int result;
+ if (flag)
+ {
+ bool isFinished = left.IsFinished;
+ if (isFinished)
+ {
+ result = 1;
+ }
+ else
+ {
+ result = -1;
+ }
+ }
+ else
+ {
+ bool isFinished2 = left.IsFinished;
+ if (isFinished2)
+ {
+ result = (int)(left.Row.SortIndex - right.Row.SortIndex);
+ }
+ else
+ {
+ bool flag2 = left.IsOpen != right.IsOpen;
+ if (flag2)
+ {
+ bool isOpen = left.IsOpen;
+ if (isOpen)
+ {
+ result = -1;
+ }
+ else
+ {
+ result = 1;
+ }
+ }
+ else
+ {
+ result = (int)(left.Row.SortIndex - right.Row.SortIndex);
+ }
+ }
+ }
+ return result;
+ }
+
+ public void SetScrollView(int sysId)
+ {
+ float position = 0f;
+ int num = 0;
+ bool flag = this.m_dailyDataList != null && this.m_dailyDataList.Count > 0;
+ if (flag)
+ {
+ for (int i = 0; i < this.m_dailyDataList.Count; i++)
+ {
+ bool flag2 = (long)sysId == (long)((ulong)this.m_dailyDataList[i].Row.SysID);
+ if (flag2)
+ {
+ num = i + 1;
+ break;
+ }
+ }
+ bool flag3 = num > XSingleton<XGlobalConfig>.singleton.GetInt("UiShowNum");
+ if (flag3)
+ {
+ int num2 = (this.m_dailyDataList.Count % 2 == 0) ? (this.m_dailyDataList.Count / 2) : (this.m_dailyDataList.Count / 2 + 1);
+ int num3 = (num % 2 == 0) ? (num / 2) : (num / 2 + 1);
+ position = (float)num3 / (float)num2;
+ }
+ }
+ this.m_dailyScrollView.SetPosition(position);
+ }
+
+ private void FillMulActivity()
+ {
+ this.m_mulItemPool.ReturnAll(false);
+ int count = this.m_doc.MulActivityList.Count;
+ bool flag = count == 0;
+ if (flag)
+ {
+ this.m_noMulItemTips.SetActive(true);
+ this.m_mulScrollView.gameObject.SetActive(false);
+ }
+ else
+ {
+ this.m_noMulItemTips.SetActive(false);
+ this.m_mulScrollView.gameObject.SetActive(true);
+ this.FillMulActivityItems(count);
+ this.m_mulScrollView.ResetPosition();
+ }
+ }
+
+ private void FillMulActivityItems(int count)
+ {
+ for (int i = 0; i < count; i++)
+ {
+ GameObject gameObject = this.m_mulItemPool.FetchGameObject(false);
+ gameObject.transform.parent = this.m_mulScrollView.gameObject.transform;
+ gameObject.transform.localScale = Vector3.one;
+ gameObject.transform.localPosition = this.m_mulItemPool.TplPos + new Vector3(0f, (float)(-(float)this.m_mulItemPool.TplHeight * i), 0f);
+ this.FillMulActivityItem(gameObject.transform, i, this.m_doc.MulActivityList[i]);
+ }
+ this.m_mulScrollView.gameObject.SetActive(false);
+ this.m_mulScrollView.gameObject.SetActive(true);
+ }
+
+ private void FillMulActivityItem(Transform t, int index, MulActivityInfo info)
+ {
+ bool flag = info == null;
+ if (flag)
+ {
+ XSingleton<XDebug>.singleton.AddGreenLog("info is nil", null, null, null, null, null);
+ }
+ else
+ {
+ t.gameObject.name = string.Format("Item{0}", info.Row.SystemID);
+ t.Find("SelectIcon").transform.gameObject.SetActive(false);
+ IXUILabel ixuilabel = t.Find("Title").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel.SetText(info.Row.Name);
+ t.Find("Bg").gameObject.SetActive(info.state == MulActivityState.Open);
+ t.Find("Opening").gameObject.SetActive(info.tagType == MulActivityTagType.Opening);
+ t.Find("WillOpen").gameObject.SetActive(info.tagType == MulActivityTagType.WillOpen);
+ IXUIButton ixuibutton = t.Find("JoinBtn").GetComponent("XUIButton") as IXUIButton;
+ IXUISprite ixuisprite = t.Find("Icon").GetComponent("XUISprite") as IXUISprite;
+ IXUILabel ixuilabel2 = t.Find("LeftCountOpening").GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel3 = t.Find("LeftCountUnOpen").GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel4 = t.Find("OpenCondition").GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel5 = t.Find("NoLimit").GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel6 = t.Find("WillOpening").GetComponent("XUILabel") as IXUILabel;
+ IXUISprite ixuisprite2 = t.Find("Double").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.SetSprite(info.Row.Icon, info.Row.AtlasPath, false);
+ ixuisprite.ID = (ulong)((long)index);
+ ixuisprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnClickMulIconSpr));
+ ixuisprite.SetGrey(info.state != MulActivityState.Grey && info.state > MulActivityState.Lock);
+ ixuibutton.ID = (ulong)((long)index);
+ ixuibutton.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnClickMulJoinBtn));
+ ixuibutton.gameObject.SetActive(false);
+ ixuilabel2.gameObject.SetActive(false);
+ ixuilabel3.gameObject.SetActive(false);
+ ixuilabel4.gameObject.SetActive(false);
+ ixuilabel5.gameObject.SetActive(false);
+ ixuilabel6.gameObject.SetActive(false);
+ ixuisprite2.gameObject.SetActive(false);
+ switch (info.state)
+ {
+ case MulActivityState.Lock:
+ ixuilabel4.gameObject.SetActive(true);
+ ixuilabel4.SetText(XSingleton<UiUtility>.singleton.ReplaceReturn(this.GetMissConditionString(info)));
+ break;
+ case MulActivityState.Grey:
+ {
+ ixuilabel4.gameObject.SetActive(true);
+ bool flag2 = info.timeState == MulActivityTimeState.MULACTIVITY_END;
+ if (flag2)
+ {
+ ixuilabel4.SetText(XStringDefineProxy.GetString("MulActivity_Tips1"));
+ }
+ else
+ {
+ bool flag3 = info.timeState == MulActivityTimeState.MULACTIVITY_UNOPEN_TODAY;
+ if (flag3)
+ {
+ ixuilabel4.SetText(XSingleton<UiUtility>.singleton.ReplaceReturn(info.Row.OpenDayTips));
+ }
+ else
+ {
+ ixuilabel4.SetText(XStringDefineProxy.GetString("MulActivity_Tips5"));
+ }
+ }
+ break;
+ }
+ case MulActivityState.WillOpen:
+ {
+ ixuilabel4.gameObject.SetActive(true);
+ ixuisprite2.gameObject.SetActive(this.m_doc.IsInnerDropTime((uint)info.Row.SystemID));
+ bool flag4 = info.timeState == MulActivityTimeState.MULACTIVITY_BEfOREOPEN;
+ if (flag4)
+ {
+ string arg = XSingleton<UiUtility>.singleton.TimeFormatString(info.startTime * 60, 3, 3, 3, false, true);
+ string arg2 = XSingleton<UiUtility>.singleton.TimeFormatString(info.endTime * 60, 3, 3, 3, false, true);
+ ixuilabel4.SetText(string.Format("{0}-{1}", arg, arg2));
+ }
+ else
+ {
+ ixuilabel4.SetText(XSingleton<UiUtility>.singleton.ReplaceReturn(info.Row.OpenDayTips));
+ }
+ break;
+ }
+ case MulActivityState.Open:
+ {
+ ixuisprite2.gameObject.SetActive(this.m_doc.IsInnerDropTime((uint)info.Row.SystemID));
+ bool flag5 = !info.openState;
+ if (flag5)
+ {
+ ixuilabel6.gameObject.SetActive(true);
+ ixuilabel6.SetText(XStringDefineProxy.GetString("PVPActivity_Wait"));
+ }
+ else
+ {
+ bool flag6 = info.Row.SystemID == 992;
+ if (flag6)
+ {
+ ixuibutton.gameObject.SetActive(false);
+ }
+ else
+ {
+ ixuibutton.gameObject.SetActive(true);
+ }
+ bool flag7 = info.Row.DayCountMax == -1;
+ if (flag7)
+ {
+ ixuilabel5.gameObject.SetActive(true);
+ ixuilabel5.SetText(XSingleton<XStringTable>.singleton.GetString("No_TimesLimit"));
+ }
+ else
+ {
+ ixuilabel2.gameObject.SetActive(true);
+ bool flag8 = info.Row.SystemID == 230;
+ if (flag8)
+ {
+ uint num = WeekEndNestDocument.Doc.MaxCount();
+ ixuilabel2.SetText(string.Format("{0}/{1}", (long)((ulong)num - (ulong)((long)info.dayjoincount)), num));
+ }
+ else
+ {
+ ixuilabel2.SetText(string.Format("{0}/{1}", info.Row.DayCountMax - info.dayjoincount, info.Row.DayCountMax));
+ }
+ }
+ }
+ break;
+ }
+ }
+ }
+ }
+
+ private string GetMissConditionString(MulActivityInfo info)
+ {
+ XGuildDocument specificDocument = XDocuments.GetSpecificDocument<XGuildDocument>(XGuildDocument.uuID);
+ bool flag = info.serverOpenDayLeft > 0;
+ string result;
+ if (flag)
+ {
+ result = string.Format(XStringDefineProxy.GetString("MulActivity_ServerOpenDay"), info.serverOpenDayLeft);
+ }
+ else
+ {
+ bool flag2 = info.serverOpenWeekLeft > 0;
+ if (flag2)
+ {
+ result = string.Format(XStringDefineProxy.GetString("MulActivity_ServerOpenWeek"), info.serverOpenWeekLeft);
+ }
+ else
+ {
+ bool flag3 = XSingleton<XAttributeMgr>.singleton.XPlayerData.Level < info.roleLevel;
+ if (flag3)
+ {
+ result = string.Format(XStringDefineProxy.GetString("MulActivity_ShowTips9"), info.roleLevel);
+ }
+ else
+ {
+ bool flag4 = !specificDocument.bInGuild && info.Row.GuildLevel > 0u;
+ if (flag4)
+ {
+ result = XStringDefineProxy.GetString("MulActivity_ShowTips8");
+ }
+ else
+ {
+ result = string.Format(XStringDefineProxy.GetString("MulActivity_ShowTips10"), info.Row.GuildLevel);
+ }
+ }
+ }
+ }
+ return result;
+ }
+
+ public void RefreshLeftTime()
+ {
+ bool flag = this.m_selectSysId == XSysDefine.XSys_GuildInherit;
+ if (flag)
+ {
+ XGuildInheritDocument specificDocument = XDocuments.GetSpecificDocument<XGuildInheritDocument>(XGuildInheritDocument.uuID);
+ string teacherLeftTimeString = specificDocument.GetTeacherLeftTimeString();
+ bool flag2 = !string.IsNullOrEmpty(teacherLeftTimeString);
+ if (flag2)
+ {
+ this.m_describeContentLab.SetText(string.Format("{0}({1})", this.m_describeTxt, teacherLeftTimeString));
+ }
+ }
+ }
+
+ private void FillBottom(bool isDaily, int index)
+ {
+ this.m_bIsDaily = isDaily;
+ if (isDaily)
+ {
+ bool flag = index >= this.m_dailyDataList.Count;
+ if (flag)
+ {
+ XSingleton<XDebug>.singleton.AddErrorLog(string.Format("FillBottom out of range: count = {0},index = {1}", this.m_dailyDataList.Count, index), null, null, null, null, null);
+ return;
+ }
+ ActivityHandler.DailyData dailyData = this.m_dailyDataList[index];
+ bool flag2 = dailyData == null;
+ if (flag2)
+ {
+ return;
+ }
+ this.m_selectSysId = (XSysDefine)dailyData.Row.SysID;
+ this.SetDropsItems(dailyData.Row);
+ bool flag3 = dailyData.Row.SysID == 890u;
+ if (flag3)
+ {
+ XGuildInheritDocument specificDocument = XDocuments.GetSpecificDocument<XGuildInheritDocument>(XGuildInheritDocument.uuID);
+ string text = "";
+ bool flag4 = dailyData.IsOpen && specificDocument.TryGetInheritCountString(out text);
+ if (flag4)
+ {
+ this.m_describeContentLab.SetText(text);
+ }
+ else
+ {
+ this.m_describeContentLab.SetText(dailyData.Row.Describe);
+ }
+ }
+ else
+ {
+ this.m_describeContentLab.SetText(dailyData.Row.Describe);
+ }
+ bool flag5 = dailyData.IsOpen && dailyData.IsFinished;
+ if (flag5)
+ {
+ this.m_viewBtn.gameObject.SetActive(true);
+ this.m_viewBtn.ID = (ulong)dailyData.Row.SysID;
+ }
+ else
+ {
+ this.m_viewBtn.gameObject.SetActive(false);
+ }
+ bool flag6 = dailyData.IsOpen && dailyData.Row.HadShop;
+ if (flag6)
+ {
+ this.m_shopBtn.gameObject.SetActive(true);
+ this.m_shopBtn.ID = (ulong)dailyData.Row.SysID;
+ }
+ else
+ {
+ this.m_shopBtn.gameObject.SetActive(false);
+ }
+ }
+ else
+ {
+ MulActivityInfo mulActivityInfo = this.m_doc.MulActivityList[index];
+ bool flag7 = mulActivityInfo == null;
+ if (flag7)
+ {
+ return;
+ }
+ this.m_selectSysId = (XSysDefine)mulActivityInfo.Row.SystemID;
+ List<uint> list = new List<uint>();
+ bool flag8 = mulActivityInfo.Row != null;
+ if (flag8)
+ {
+ for (int i = 0; i < mulActivityInfo.Row.DropItems.Count; i++)
+ {
+ list.Add(mulActivityInfo.Row.DropItems[i, 0]);
+ }
+ }
+ this.FillBottomItems(list);
+ this.m_describeContentLab.SetText(mulActivityInfo.Row.RewardTips);
+ bool flag9 = mulActivityInfo.state != MulActivityState.Open;
+ if (flag9)
+ {
+ this.m_viewBtn.ID = (ulong)((long)index);
+ XSysDefine selectSysId = this.m_selectSysId;
+ if (selectSysId <= XSysDefine.XSys_GuildRelax_JokerMatch)
+ {
+ if (selectSysId != XSysDefine.XSys_MulActivity_MulVoiceQA && selectSysId - XSysDefine.XSys_GuildRelax_VoiceQA > 1)
+ {
+ goto IL_2FD;
+ }
+ }
+ else if (selectSysId != XSysDefine.XSys_JockerKing && selectSysId != XSysDefine.XSys_GuildCollect)
+ {
+ goto IL_2FD;
+ }
+ this.m_viewBtn.gameObject.SetActive(false);
+ goto IL_311;
+ IL_2FD:
+ this.m_viewBtn.gameObject.SetActive(true);
+ IL_311:;
+ }
+ else
+ {
+ this.m_viewBtn.gameObject.SetActive(false);
+ }
+ bool flag10 = mulActivityInfo.state != MulActivityState.Lock && mulActivityInfo.Row.HadShop;
+ if (flag10)
+ {
+ this.m_shopBtn.gameObject.SetActive(true);
+ this.m_shopBtn.ID = (ulong)((long)mulActivityInfo.Row.SystemID);
+ }
+ else
+ {
+ this.m_shopBtn.gameObject.SetActive(false);
+ }
+ }
+ this.m_describeTxt = this.m_describeContentLab.GetText();
+ this.m_shopBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnClickShop));
+ this.m_viewBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnClickView));
+ }
+
+ private void SetDropsItems(ActivityListTable.RowData data)
+ {
+ bool flag = data == null;
+ if (!flag)
+ {
+ List<uint> list = new List<uint>();
+ XSysDefine sysID = (XSysDefine)data.SysID;
+ if (sysID != XSysDefine.XSys_Activity_Nest)
+ {
+ if (sysID != XSysDefine.XSys_Activity_DragonNest)
+ {
+ for (int i = 0; i < data.DropItems.Count; i++)
+ {
+ list.Add(data.DropItems[i, 0]);
+ }
+ }
+ else
+ {
+ XDragonNestDocument specificDocument = XDocuments.GetSpecificDocument<XDragonNestDocument>(XDragonNestDocument.uuID);
+ ExpeditionTable.RowData lastExpeditionRowData = specificDocument.GetLastExpeditionRowData();
+ bool flag2 = lastExpeditionRowData == null;
+ if (flag2)
+ {
+ XSingleton<XDebug>.singleton.AddGreenLog("XSys_Activity_DragonNest,ExpeditionTable row is null", null, null, null, null, null);
+ }
+ else
+ {
+ bool flag3 = lastExpeditionRowData.ViewableDropList != null;
+ if (flag3)
+ {
+ for (int j = 0; j < lastExpeditionRowData.ViewableDropList.Length; j++)
+ {
+ list.Add(lastExpeditionRowData.ViewableDropList[j]);
+ }
+ }
+ }
+ }
+ }
+ else
+ {
+ XNestDocument specificDocument2 = XDocuments.GetSpecificDocument<XNestDocument>(XNestDocument.uuID);
+ ExpeditionTable.RowData lastExpeditionRowData2 = specificDocument2.GetLastExpeditionRowData();
+ bool flag4 = lastExpeditionRowData2 == null;
+ if (flag4)
+ {
+ XSingleton<XDebug>.singleton.AddGreenLog("XSys_Activity_Nest,ExpeditionTable row is null", null, null, null, null, null);
+ }
+ else
+ {
+ bool flag5 = lastExpeditionRowData2.ViewableDropList != null;
+ if (flag5)
+ {
+ for (int k = 0; k < lastExpeditionRowData2.ViewableDropList.Length; k++)
+ {
+ list.Add(lastExpeditionRowData2.ViewableDropList[k]);
+ }
+ }
+ }
+ }
+ this.FillBottomItems(list);
+ }
+ }
+
+ private void FillBottomItems(List<uint> lst)
+ {
+ this.m_dropItemPool.ReturnAll(false);
+ for (int i = 0; i < lst.Count; i++)
+ {
+ GameObject gameObject = this.m_dropItemPool.FetchGameObject(false);
+ gameObject.transform.localPosition = this.m_dropItemPool.TplPos + new Vector3((float)(this.m_dropItemPool.TplWidth * i), 0f, 0f);
+ XSingleton<XItemDrawerMgr>.singleton.normalItemDrawer.DrawItem(gameObject, (int)lst[i], 0, false);
+ IXUISprite ixuisprite = gameObject.transform.Find("Icon").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.ID = (ulong)lst[i];
+ ixuisprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnClickItemIcon));
+ }
+ }
+
+ private bool OnClickShop(IXUIButton btn)
+ {
+ XSysDefine xsysDefine = (XSysDefine)btn.ID;
+ XSysDefine xsysDefine2 = xsysDefine;
+ if (xsysDefine2 != XSysDefine.XSys_Level_Elite)
+ {
+ if (xsysDefine2 != XSysDefine.XSys_Activity_GoddessTrial)
+ {
+ if (xsysDefine2 == XSysDefine.XSys_EndlessAbyss)
+ {
+ xsysDefine = ActivityHandler.GetShopSystem();
+ }
+ }
+ else
+ {
+ xsysDefine = XSysDefine.XSys_Mall_Tear;
+ }
+ }
+ else
+ {
+ SeqList<int> sequenceList = XSingleton<XGlobalConfig>.singleton.GetSequenceList("AbyssTeamShopLevel", true);
+ List<int> intList = XSingleton<XGlobalConfig>.singleton.GetIntList("AbyssTeamShopType");
+ int level = (int)XSingleton<XAttributeMgr>.singleton.XPlayerData.Level;
+ bool flag = false;
+ for (int i = 0; i < (int)sequenceList.Count; i++)
+ {
+ bool flag2 = level >= sequenceList[i, 0] && level <= sequenceList[i, 1];
+ if (flag2)
+ {
+ flag = true;
+ xsysDefine = (XSysDefine)(XFastEnumIntEqualityComparer<XSysDefine>.ToInt(XSysDefine.XSys_Mall_MystShop) + intList[i]);
+ break;
+ }
+ }
+ bool flag3 = !flag;
+ if (flag3)
+ {
+ XSingleton<XDebug>.singleton.AddErrorLog("Can't find player level state from golbalconfig by AbyssTeamShop. level = ", level.ToString(), null, null, null, null);
+ }
+ }
+ bool flag4 = XSingleton<XGameSysMgr>.singleton.IsSystemOpened(xsysDefine);
+ bool result;
+ if (flag4)
+ {
+ DlgBase<MallSystemDlg, MallSystemBehaviour>.singleton.ShowShopSystem(xsysDefine, 0UL);
+ result = true;
+ }
+ else
+ {
+ int sysOpenLevel = XSingleton<XGameSysMgr>.singleton.GetSysOpenLevel(XFastEnumIntEqualityComparer<XSysDefine>.ToInt(xsysDefine));
+ XSingleton<UiUtility>.singleton.ShowSystemTip(string.Format(XStringDefineProxy.GetString("SHOP_OPEN_LEVEL"), sysOpenLevel), "fece00");
+ result = false;
+ }
+ return result;
+ }
+
+ public static XSysDefine GetShopSystem()
+ {
+ SeqList<int> sequenceList = XSingleton<XGlobalConfig>.singleton.GetSequenceList("EndlessabyssLevelInterval", true);
+ List<int> intList = XSingleton<XGlobalConfig>.singleton.GetIntList("EndlessabyssShopType");
+ int level = (int)XSingleton<XAttributeMgr>.singleton.XPlayerData.Level;
+ for (int i = 0; i < (int)sequenceList.Count; i++)
+ {
+ bool flag = level >= sequenceList[i, 0] && level <= sequenceList[i, 1];
+ if (flag)
+ {
+ return (XSysDefine)(XFastEnumIntEqualityComparer<XSysDefine>.ToInt(XSysDefine.XSys_Mall_MystShop) + intList[i]);
+ }
+ }
+ XSingleton<XDebug>.singleton.AddErrorLog("Can't find player level state from golbalconfig EndlessabyssLevelInterval. level = ", level.ToString(), null, null, null, null);
+ return XSysDefine.XSys_Mall_32A;
+ }
+
+ private bool OnClickView(IXUIButton btn)
+ {
+ bool bIsDaily = this.m_bIsDaily;
+ if (bIsDaily)
+ {
+ this.OnClickDailyJoinBtn(btn);
+ }
+ else
+ {
+ this.OnClickMulJoinBtn(btn);
+ }
+ return true;
+ }
+
+ private bool OnClickDailyJoinBtn(IXUIButton btn)
+ {
+ XSysDefine xsysDefine = (XSysDefine)btn.ID;
+ XSysDefine xsysDefine2 = xsysDefine;
+ if (xsysDefine2 != XSysDefine.XSys_GuildDailyTask && xsysDefine2 != XSysDefine.XSys_GuildWeeklyBountyTask)
+ {
+ XSingleton<XGameSysMgr>.singleton.OpenSystem(xsysDefine, 0UL);
+ }
+ else
+ {
+ XSingleton<UIManager>.singleton.CloseAllUI();
+ XSingleton<XGameSysMgr>.singleton.OpenSystem(xsysDefine, 0UL);
+ }
+ return true;
+ }
+
+ private void OnClickDailyIconSpr(IXUISprite spr)
+ {
+ this.m_selectItemTra.Find("SelectIcon").gameObject.SetActive(false);
+ this.m_selectItemTra = spr.transform.parent;
+ this.m_selectItemTra.Find("SelectIcon").gameObject.SetActive(true);
+ this.FillBottom(true, (int)spr.ID);
+ }
+
+ private bool OnClickMulJoinBtn(IXUIButton btn)
+ {
+ int index = (int)btn.ID;
+ MulActivityInfo mulActivityInfo = this.m_doc.MulActivityList[index];
+ XGuildDocument specificDocument = XDocuments.GetSpecificDocument<XGuildDocument>(XGuildDocument.uuID);
+ switch (mulActivityInfo.state)
+ {
+ case MulActivityState.Lock:
+ {
+ bool flag = mulActivityInfo.serverOpenDayLeft > 0;
+ if (flag)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(string.Format(XStringDefineProxy.GetString("MulActivity_ServerOpenDay"), mulActivityInfo.serverOpenDayLeft), "fece00");
+ }
+ else
+ {
+ bool flag2 = mulActivityInfo.serverOpenWeekLeft > 0;
+ if (flag2)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(string.Format(XStringDefineProxy.GetString("MulActivity_ServerOpenWeek"), mulActivityInfo.serverOpenWeekLeft), "fece00");
+ }
+ else
+ {
+ bool flag3 = XSingleton<XAttributeMgr>.singleton.XPlayerData.Level < mulActivityInfo.roleLevel;
+ if (flag3)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(string.Format(XStringDefineProxy.GetString("MulActivity_ShowTips1"), mulActivityInfo.roleLevel), "fece00");
+ }
+ else
+ {
+ bool flag4 = !specificDocument.bInGuild && mulActivityInfo.Row.GuildLevel > 0u;
+ if (flag4)
+ {
+ XSingleton<UiUtility>.singleton.ShowModalDialog(XStringDefineProxy.GetString("MulActivity_ShowTips3"), XStringDefineProxy.GetString("COMMON_OK"), XStringDefineProxy.GetString("COMMON_CANCEL"), new ButtonClickEventHandler(this.JoinGuild));
+ }
+ else
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(string.Format(XStringDefineProxy.GetString("MulActivity_ShowTips2"), mulActivityInfo.Row.GuildLevel), "fece00");
+ }
+ }
+ }
+ }
+ break;
+ }
+ case MulActivityState.Grey:
+ {
+ bool flag5 = mulActivityInfo.timeState == MulActivityTimeState.MULACTIVITY_UNOPEN_TODAY;
+ string @string;
+ if (flag5)
+ {
+ @string = XStringDefineProxy.GetString("MulActivity_ShowTips5");
+ }
+ else
+ {
+ bool flag6 = mulActivityInfo.timeState == MulActivityTimeState.MULACTIVITY_END;
+ if (flag6)
+ {
+ @string = XStringDefineProxy.GetString("MulActivity_ShowTips4");
+ }
+ else
+ {
+ @string = XStringDefineProxy.GetString("MulActivity_ShowTips7");
+ }
+ }
+ XSingleton<UiUtility>.singleton.ShowSystemTip(@string, "fece00");
+ break;
+ }
+ case MulActivityState.WillOpen:
+ {
+ XSysDefine systemID = (XSysDefine)mulActivityInfo.Row.SystemID;
+ if (systemID != XSysDefine.XSys_MulActivity_MulVoiceQA && systemID != XSysDefine.XSys_GuildQualifier)
+ {
+ bool flag7 = mulActivityInfo.Row.GuildLevel == 0u;
+ if (flag7)
+ {
+ XSingleton<XGameSysMgr>.singleton.OpenSystem(mulActivityInfo.Row.SystemID);
+ }
+ else
+ {
+ XSingleton<XGameSysMgr>.singleton.OpenGuildSystem((XSysDefine)mulActivityInfo.Row.SystemID);
+ }
+ }
+ else
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString("MulActivity_ShowTips6"), "fece00");
+ }
+ break;
+ }
+ case MulActivityState.Open:
+ {
+ XSysDefine systemID2 = (XSysDefine)mulActivityInfo.Row.SystemID;
+ if (systemID2 != XSysDefine.XSys_MulActivity_MulVoiceQA)
+ {
+ bool flag8 = mulActivityInfo.Row.GuildLevel == 0u;
+ if (flag8)
+ {
+ XSingleton<XGameSysMgr>.singleton.OpenSystem(mulActivityInfo.Row.SystemID);
+ }
+ else
+ {
+ XSingleton<XGameSysMgr>.singleton.OpenGuildSystem((XSysDefine)mulActivityInfo.Row.SystemID);
+ }
+ }
+ else
+ {
+ XVoiceQADocument specificDocument2 = XDocuments.GetSpecificDocument<XVoiceQADocument>(XVoiceQADocument.uuID);
+ specificDocument2.TempType = 2u;
+ XVoiceQADocument specificDocument3 = XDocuments.GetSpecificDocument<XVoiceQADocument>(XVoiceQADocument.uuID);
+ bool isVoiceQAIng = specificDocument3.IsVoiceQAIng;
+ if (isVoiceQAIng)
+ {
+ DlgBase<XVoiceQAView, XVoiceQABehaviour>.singleton.SetVisible(true, true);
+ }
+ else
+ {
+ string label = XSingleton<UiUtility>.singleton.ReplaceReturn(XStringDefineProxy.GetString("VoiceQA_Enter_Description_" + specificDocument3.TempType.ToString()));
+ string string2 = XStringDefineProxy.GetString("VoiceQA_Enter_btn1");
+ string string3 = XStringDefineProxy.GetString("VoiceQA_Enter_btn2");
+ XSingleton<UiUtility>.singleton.ShowModalDialog(label, string2, string3, new ButtonClickEventHandler(DlgBase<XMainInterface, XMainInterfaceBehaviour>.singleton.OnVoiceQAJoin), new ButtonClickEventHandler(DlgBase<XMainInterface, XMainInterfaceBehaviour>.singleton.OnVoiceQARefuse), false, XTempTipDefine.OD_START, 50);
+ }
+ }
+ break;
+ }
+ }
+ return true;
+ }
+
+ private bool JoinGuild(IXUIButton btn)
+ {
+ bool flag = DlgBase<DailyActivityDlg, TabDlgBehaviour>.singleton.IsVisible();
+ if (flag)
+ {
+ DlgBase<DailyActivityDlg, TabDlgBehaviour>.singleton.SetVisible(false, true);
+ }
+ DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.SetVisible(false, true);
+ DlgBase<XGuildListView, XGuildListBehaviour>.singleton.SetVisibleWithAnimation(true, null);
+ return true;
+ }
+
+ private void OnClickMulIconSpr(IXUISprite spr)
+ {
+ bool flag = this.m_selectItemTra != null;
+ Transform transform;
+ if (flag)
+ {
+ transform = this.m_selectItemTra.Find("SelectIcon");
+ bool flag2 = transform != null;
+ if (flag2)
+ {
+ transform.gameObject.SetActive(false);
+ }
+ }
+ this.m_selectItemTra = spr.transform.parent;
+ transform = this.m_selectItemTra.Find("SelectIcon");
+ bool flag3 = transform != null;
+ if (flag3)
+ {
+ transform.gameObject.SetActive(true);
+ }
+ this.FillBottom(false, (int)spr.ID);
+ }
+
+ private void OnClickItemIcon(IXUISprite spr)
+ {
+ XItem mainItem = XBagDocument.MakeXItem((int)spr.ID, false);
+ XSingleton<UiUtility>.singleton.ShowTooltipDialogWithSearchingCompare(mainItem, spr, false, 0u);
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/ActivityHandler.cs.meta b/Client/Assets/Scripts/XMainClient/UI/ActivityHandler.cs.meta
new file mode 100644
index 00000000..6ddbcdcf
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/ActivityHandler.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 313684c3f24d3a3479e07fb20f172e94
+timeCreated: 1611403542
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/ActivityRiftBehaviour.cs b/Client/Assets/Scripts/XMainClient/UI/ActivityRiftBehaviour.cs
new file mode 100644
index 00000000..923ea5f6
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/ActivityRiftBehaviour.cs
@@ -0,0 +1,104 @@
+using System;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+
+namespace XMainClient.UI
+{
+ internal class ActivityRiftBehaviour : DlgBehaviourBase
+ {
+ public IXUIButton m_Help;
+
+ public IXUIButton mMainClose;
+
+ public IXUIButton m_btnFight;
+
+ public IXUILabel m_lblFight;
+
+ public const int max_rwd = 4;
+
+ public const int max_buff = 5;
+
+ public const int max_tab = 3;
+
+ public GameObject[] m_goRwd = new GameObject[4];
+
+ public GameObject[] m_goBuff = new GameObject[5];
+
+ public IXUILabel m_lbltip;
+
+ public IXUILabel m_lbldesc;
+
+ public IXUILabel m_lbltime;
+
+ public GameObject m_weekRwd;
+
+ public IXUILabel m_lblMFloor;
+
+ public IXUILabel m_lblMName;
+
+ public IXUILabel m_lbblMTime;
+
+ public IXUIButton m_btnShop;
+
+ public IXUIButton m_btnIntro;
+
+ public IXUIButton m_btnMember;
+
+ public IXUIButton m_btnRwd;
+
+ public IXUISprite m_sprRwdRed;
+
+ public GameObject m_guildInfoPanel;
+
+ public GameObject m_frameRankRwd;
+
+ public GameObject m_frameWelfare;
+
+ public GameObject m_frameWeek;
+
+ public Transform m_tab;
+
+ public IXUICheckBox[] m_tabs = new IXUICheckBox[3];
+
+ public IXUISprite[] m_reds = new IXUISprite[3];
+
+ private void Awake()
+ {
+ this.m_Help = (base.transform.Find("Bg/Stage/Help").GetComponent("XUIButton") as IXUIButton);
+ this.mMainClose = (base.transform.Find("Bg/Close").GetComponent("XUIButton") as IXUIButton);
+ this.m_btnFight = (base.transform.Find("Bg/Stage/GoBattle").GetComponent("XUIButton") as IXUIButton);
+ this.m_lblFight = (base.transform.Find("Bg/Stage/fp").GetComponent("XUILabel") as IXUILabel);
+ for (int i = 0; i < 4; i++)
+ {
+ this.m_goRwd[i] = base.transform.Find("Bg/Stage/Reward/Item" + i).gameObject;
+ }
+ for (int j = 0; j < 5; j++)
+ {
+ this.m_goBuff[j] = base.transform.Find("Bg/Stage/Buff/BossBuff" + j).gameObject;
+ }
+ this.m_tab = base.transform.Find("Bg/Rewd/TabsFrame");
+ for (int k = 0; k < 3; k++)
+ {
+ this.m_tabs[k] = (this.m_tab.Find("item" + k + "/Bg").GetComponent("XUICheckBox") as IXUICheckBox);
+ this.m_reds[k] = (this.m_tabs[k].gameObject.transform.Find("RedPoint").GetComponent("XUISprite") as IXUISprite);
+ }
+ this.m_lbltime = (base.transform.Find("Bg/Top/name").GetComponent("XUILabel") as IXUILabel);
+ this.m_weekRwd = base.transform.Find("Bg/WeekReward").gameObject;
+ this.m_lbblMTime = (base.transform.Find("Bg/Main/Time").GetComponent("XUILabel") as IXUILabel);
+ this.m_lblMFloor = (base.transform.Find("Bg/Main/Floor").GetComponent("XUILabel") as IXUILabel);
+ this.m_lblMName = (base.transform.Find("Bg/Main/Name").GetComponent("XUILabel") as IXUILabel);
+ this.m_lbltip = (base.transform.Find("Bg/Stage/Buff/Tip").GetComponent("XUILabel") as IXUILabel);
+ this.m_lbldesc = (base.transform.Find("Bg/Top/Text/T").GetComponent("XUILabel") as IXUILabel);
+ this.m_btnShop = (base.transform.Find("Bg/btns/BtnShop").GetComponent("XUIButton") as IXUIButton);
+ this.m_btnIntro = (base.transform.Find("Bg/btns/BtnIntroduce").GetComponent("XUIButton") as IXUIButton);
+ this.m_btnMember = (base.transform.Find("Bg/btns/BtnMemberRank").GetComponent("XUIButton") as IXUIButton);
+ this.m_btnRwd = (base.transform.Find("Bg/btns/BtnRwd").GetComponent("XUIButton") as IXUIButton);
+ this.m_sprRwdRed = (this.m_btnRwd.gameObject.transform.Find("redpoint").GetComponent("XUISprite") as IXUISprite);
+ this.m_guildInfoPanel = base.transform.Find("Bg/GuildRank").gameObject;
+ this.m_frameRankRwd = base.transform.Find("Bg/Rewd/frames/RankRewardFrame").gameObject;
+ this.m_frameWelfare = base.transform.Find("Bg/Rewd/frames/WelfareRewardFrame").gameObject;
+ this.m_frameWeek = base.transform.Find("Bg/Rewd/frames/weekRewardFrame").gameObject;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/ActivityRiftBehaviour.cs.meta b/Client/Assets/Scripts/XMainClient/UI/ActivityRiftBehaviour.cs.meta
new file mode 100644
index 00000000..a5df339b
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/ActivityRiftBehaviour.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: c7b342a3d5260d94180e6d9aa8777183
+timeCreated: 1611404532
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/ActivityRiftDlg.cs b/Client/Assets/Scripts/XMainClient/UI/ActivityRiftDlg.cs
new file mode 100644
index 00000000..8a76645f
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/ActivityRiftDlg.cs
@@ -0,0 +1,578 @@
+using System;
+using System.Collections.Generic;
+using KKSG;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ [Hotfix]
+ internal class ActivityRiftDlg : DlgBase<ActivityRiftDlg, ActivityRiftBehaviour>
+ {
+ public override string fileName
+ {
+ get
+ {
+ return "Hall/TeamMysteriousDlg";
+ }
+ }
+
+ public override int layer
+ {
+ get
+ {
+ return 1;
+ }
+ }
+
+ public override bool autoload
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override bool hideMainMenu
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override bool pushstack
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override bool fullscreenui
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override int sysid
+ {
+ get
+ {
+ return XFastEnumIntEqualityComparer<XSysDefine>.ToInt(XSysDefine.xSys_Mysterious);
+ }
+ }
+
+ private XExpeditionDocument _doc;
+
+ private XRiftDocument _mdoc;
+
+ private ActivityRiftItemsHandler _itemListHandler;
+
+ private ActivityRiftGuidInfoHandler _guildinfoHandler;
+
+ private XQualifyingRankRewardWindow m_RankRewardWindow;
+
+ private XQualifyingPointRewardWindow m_WeekFirstPassWindow;
+
+ private XQualifyingPointRewardWindow m_WelfareWindow;
+
+ protected override void Init()
+ {
+ this._doc = XDocuments.GetSpecificDocument<XExpeditionDocument>(XExpeditionDocument.uuID);
+ this._doc.TeamMysteriourView = this;
+ this._mdoc = XDocuments.GetSpecificDocument<XRiftDocument>(XRiftDocument.uuID);
+ }
+
+ protected override void OnLoad()
+ {
+ base.OnLoad();
+ this.m_RankRewardWindow = new XQualifyingRankRewardWindow(base.uiBehaviour.m_frameRankRwd);
+ this.m_WeekFirstPassWindow = new XQualifyingPointRewardWindow(base.uiBehaviour.m_frameWeek);
+ this.m_WelfareWindow = new XQualifyingPointRewardWindow(base.uiBehaviour.m_frameWelfare);
+ DlgHandlerBase.EnsureCreate<ActivityRiftItemsHandler>(ref this._itemListHandler, base.uiBehaviour.transform, false, null);
+ base.uiBehaviour.m_guildInfoPanel.SetActive(false);
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ base.uiBehaviour.mMainClose.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnCloseDlg));
+ base.uiBehaviour.m_Help.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnHelpClicked));
+ base.uiBehaviour.m_btnFight.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnFightClick));
+ base.uiBehaviour.m_btnShop.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnShopClick));
+ base.uiBehaviour.m_btnIntro.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnIntroClick));
+ base.uiBehaviour.m_btnMember.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnMemberClick));
+ base.uiBehaviour.m_btnRwd.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnRwdClick));
+ int i = 0;
+ int num = base.uiBehaviour.m_tabs.Length;
+ while (i < num)
+ {
+ base.uiBehaviour.m_tabs[i].ID = (ulong)((long)i);
+ base.uiBehaviour.m_tabs[i].RegisterOnCheckEventHandler(new CheckBoxOnCheckEventHandler(this.OnRwdTabClick));
+ i++;
+ }
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ base.uiBehaviour.m_tab.gameObject.SetActive(false);
+ this.CloseAllRwd();
+ this.m_RankRewardWindow.SetVisible(false);
+ this.m_WeekFirstPassWindow.SetVisible(false);
+ base.uiBehaviour.m_lbldesc.SetText(XSingleton<UiUtility>.singleton.ReplaceReturn(XStringDefineProxy.GetString("RIFT_SYSTEM_HELP")));
+ base.uiBehaviour.m_btnShop.gameObject.SetActive(XSingleton<XGameSysMgr>.singleton.IsSystemOpened(XSysDefine.XSys_Mall_Rift));
+ base.uiBehaviour.m_lbltip.SetVisible(false);
+ this._mdoc.ReqMyRiftInfo();
+ this._mdoc.ReqFirstPassRwd(RiftFirstPassOpType.Rift_FirstPass_Op_GetInfo, 0u);
+ this._mdoc.ReqRankSelf();
+ }
+
+ public void Refresh()
+ {
+ int @int = XSingleton<XGlobalConfig>.singleton.GetInt("RiftRewardWeekLimitOpen");
+ bool flag = @int == 1;
+ base.uiBehaviour.m_lbltime.SetVisible(flag);
+ base.uiBehaviour.m_weekRwd.SetActive(!flag);
+ this._mdoc.CulFirstPass();
+ this._mdoc.ReculRankList();
+ bool flag2 = !flag;
+ if (flag2)
+ {
+ this.RefreshWeekRwd(base.uiBehaviour.m_weekRwd.transform);
+ }
+ base.uiBehaviour.m_lbltime.SetText(XStringDefineProxy.GetString("RiftTimeString"));
+ string text = this._mdoc.currFloor.ToString();
+ base.uiBehaviour.m_lblMFloor.SetText(text);
+ SceneTable.RowData sceneData = XSingleton<XSceneMgr>.singleton.GetSceneData(this._mdoc.sceneid);
+ bool flag3 = sceneData != null;
+ if (flag3)
+ {
+ base.uiBehaviour.m_lblMName.SetText(sceneData.Comment);
+ bool flag4 = this._mdoc.currRiftRow != null;
+ if (flag4)
+ {
+ base.uiBehaviour.m_lblFight.SetText(this._mdoc.currRiftRow.RecommendPower.ToString());
+ }
+ else
+ {
+ base.uiBehaviour.m_lblFight.SetText(sceneData.RecommendPower.ToString());
+ }
+ for (int i = 0; i < (int)sceneData.LoseCondition.count; i++)
+ {
+ bool flag5 = sceneData.LoseCondition[i, 0] == 3;
+ if (flag5)
+ {
+ int num = sceneData.LoseCondition[i, 1];
+ base.uiBehaviour.m_lbblMTime.SetText(this.TranNum2Date(num));
+ }
+ }
+ }
+ this.RefreshFloorRwd();
+ this.RefreshBuff();
+ this.RefreshRwdOpen();
+ }
+
+ private string TranNum2Date(int num)
+ {
+ int num2 = num / 60;
+ int num3 = num % 60;
+ return num2.ToString("D2") + ":" + num3.ToString("D2");
+ }
+
+ protected override void OnUnload()
+ {
+ DlgHandlerBase.EnsureUnload<ActivityRiftItemsHandler>(ref this._itemListHandler);
+ DlgHandlerBase.EnsureUnload<ActivityRiftGuidInfoHandler>(ref this._guildinfoHandler);
+ this.m_WeekFirstPassWindow = null;
+ this.m_RankRewardWindow = null;
+ base.OnUnload();
+ }
+
+ private void RefreshRwdOpen()
+ {
+ bool active = XSingleton<XGlobalConfig>.singleton.GetInt("RiftGuaranteeAwardShowOpen") == 1;
+ base.uiBehaviour.m_tabs[2].gameObject.SetActive(active);
+ }
+
+ public void RefreshRed()
+ {
+ base.uiBehaviour.m_sprRwdRed.SetVisible(this._mdoc.hasNewFirstPass);
+ base.uiBehaviour.m_reds[0].SetVisible(this._mdoc.hasNewFirstPass);
+ base.uiBehaviour.m_reds[1].SetVisible(false);
+ base.uiBehaviour.m_reds[2].SetVisible(false);
+ }
+
+ private void RefreshWeekRwd(Transform t)
+ {
+ IXUIProgress ixuiprogress = t.Find("Icon1/Progress Bar").GetComponent("XUIProgress") as IXUIProgress;
+ IXUIProgress ixuiprogress2 = t.Find("Icon2/Progress Bar").GetComponent("XUIProgress") as IXUIProgress;
+ IXUILabel ixuilabel = t.Find("Icon1/value").GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel2 = t.Find("Icon2/value").GetComponent("XUILabel") as IXUILabel;
+ bool flag = this._mdoc.items != null && this._mdoc.items.Count > 0;
+ if (flag)
+ {
+ ixuilabel.SetText(this._mdoc.items[0].key + "/" + this._mdoc.items[0].value);
+ ixuilabel2.SetText(this._mdoc.items[1].key + "/" + this._mdoc.items[1].value);
+ ixuiprogress.value = this._mdoc.items[0].key / this._mdoc.items[0].value;
+ ixuiprogress2.value = this._mdoc.items[1].key / this._mdoc.items[1].value;
+ }
+ else
+ {
+ SeqList<int> sequenceList = XSingleton<XGlobalConfig>.singleton.GetSequenceList("RiftRewardWeekLimit", true);
+ ixuilabel.SetText(0 + "/" + sequenceList[0, 1]);
+ ixuilabel2.SetText(0 + "/" + sequenceList[1, 0]);
+ ixuiprogress.value = 0f / (float)sequenceList[0, 1];
+ ixuiprogress2.value = 0f / (float)sequenceList[1, 1];
+ }
+ }
+
+ private bool OnRwdTabClick(IXUICheckBox box)
+ {
+ bool bChecked = box.bChecked;
+ if (bChecked)
+ {
+ this.OnRwdSelect(box.ID);
+ }
+ return true;
+ }
+
+ public bool OnHelpClicked(IXUIButton button)
+ {
+ DlgBase<XCommonHelpTipView, XCommonHelpTipBehaviour>.singleton.ShowHelp(XSysDefine.xSys_Mysterious);
+ return true;
+ }
+
+ private bool OnCloseDlg(IXUIButton btn)
+ {
+ this.SetVisibleWithAnimation(false, null);
+ return true;
+ }
+
+ private bool OnFightClick(IXUIButton btn)
+ {
+ XSingleton<XDebug>.singleton.AddLog("OnFightClick", null, null, null, null, null, XDebugColor.XDebug_None);
+ List<ExpeditionTable.RowData> expeditionList = this._doc.GetExpeditionList(TeamLevelType.TeamLevelRift);
+ int dnexpeditionID = expeditionList[0].DNExpeditionID;
+ ExpeditionTable.RowData expeditionDataByID = this._doc.GetExpeditionDataByID(dnexpeditionID);
+ float num = float.Parse(XSingleton<XGlobalConfig>.singleton.GetValue("SceneGotoPower"));
+ bool flag = XSingleton<PPTCheckMgr>.singleton.CheckMyPPT(Mathf.FloorToInt(expeditionDataByID.DisplayPPT * num));
+ if (flag)
+ {
+ this.OnRealEnter(dnexpeditionID);
+ }
+ else
+ {
+ XSingleton<PPTCheckMgr>.singleton.ShowPPTNotEnoughDlg((ulong)((long)dnexpeditionID), new ButtonClickEventHandler(this.OnRealEnterClicked));
+ }
+ return true;
+ }
+
+ private bool OnRealEnterClicked(IXUIButton go)
+ {
+ this.OnRealEnter((int)go.ID);
+ return true;
+ }
+
+ private void OnRealEnter(int id)
+ {
+ XTeamDocument specificDocument = XDocuments.GetSpecificDocument<XTeamDocument>(XTeamDocument.uuID);
+ specificDocument.SetAndMatch(id);
+ }
+
+ private bool OnShopClick(IXUIButton btn)
+ {
+ DlgBase<MallSystemDlg, MallSystemBehaviour>.singleton.ShowShopSystem(XSysDefine.XSys_Mall_Rift, 0UL);
+ return true;
+ }
+
+ private bool OnMemberClick(IXUIButton btn)
+ {
+ XSingleton<XDebug>.singleton.AddLog("onguildinfo click", null, null, null, null, null, XDebugColor.XDebug_None);
+ this._mdoc.ReqGuildRank();
+ return true;
+ }
+
+ public void OpenGuildInfoHanlder()
+ {
+ DlgHandlerBase.EnsureCreate<ActivityRiftGuidInfoHandler>(ref this._guildinfoHandler, base.uiBehaviour.m_guildInfoPanel, this, true);
+ }
+
+ private bool OnIntroClick(IXUIButton btn)
+ {
+ XSingleton<XDebug>.singleton.AddLog("OnIntroClick", null, null, null, null, null, XDebugColor.XDebug_None);
+ DlgHandlerBase.EnsureCreate<ActivityRiftItemsHandler>(ref this._itemListHandler, base.uiBehaviour.transform, false, null);
+ SeqList<int> sequenceList = XSingleton<XGlobalConfig>.singleton.GetSequenceList("RiftAffixID", false);
+ PandoraDocument specificDocument = XDocuments.GetSpecificDocument<PandoraDocument>(PandoraDocument.uuID);
+ specificDocument.GetShowItemList((uint)sequenceList[this._mdoc.currRift, 1]);
+ this._itemListHandler.ShowItemList(PandoraDocument.ItemList);
+ return true;
+ }
+
+ private bool OnRwdClick(IXUIButton btn)
+ {
+ base.uiBehaviour.m_tab.gameObject.SetActive(true);
+ base.uiBehaviour.m_tabs[0].bChecked = true;
+ this.OnRwdSelect(0UL);
+ return true;
+ }
+
+ private void OnRwdSelect(ulong index)
+ {
+ this.CloseAllRwd();
+ this.RefreshRed();
+ bool flag = index == 0UL;
+ if (flag)
+ {
+ this.m_WeekFirstPassWindow.SetVisible(true);
+ this.RefreshFirstPassRift();
+ }
+ bool flag2 = index == 1UL;
+ if (flag2)
+ {
+ this.m_RankRewardWindow.SetVisible(true);
+ this.RefreshRankRwd();
+ }
+ bool flag3 = index == 2UL;
+ if (flag3)
+ {
+ this.m_WelfareWindow.SetVisible(true);
+ this.RefreshWelfare();
+ }
+ }
+
+ private void CloseAllRwd()
+ {
+ this.m_RankRewardWindow.SetVisible(false);
+ this.m_WelfareWindow.SetVisible(false);
+ this.m_WeekFirstPassWindow.SetVisible(false);
+ }
+
+ private void RefreshFloorRwd()
+ {
+ bool flag = this._mdoc != null && this._mdoc.currRiftRow != null;
+ if (flag)
+ {
+ int count = (int)this._mdoc.currRiftRow.weekfirstpass.count;
+ for (int i = 0; i < count; i++)
+ {
+ base.uiBehaviour.m_goRwd[i].SetActive(true);
+ uint num = this._mdoc.currRiftRow.weekfirstpass[i, 0];
+ uint itemCount = this._mdoc.currRiftRow.weekfirstpass[i, 1];
+ XSingleton<XItemDrawerMgr>.singleton.normalItemDrawer.DrawItem(base.uiBehaviour.m_goRwd[i], (int)num, (int)itemCount, false);
+ IXUISprite ixuisprite = base.uiBehaviour.m_goRwd[i].transform.Find("Icon").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.ID = (ulong)num;
+ ixuisprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(XSingleton<UiUtility>.singleton.OnItemClick));
+ }
+ for (int j = count; j < base.uiBehaviour.m_goRwd.Length; j++)
+ {
+ base.uiBehaviour.m_goRwd[j].SetActive(false);
+ }
+ }
+ }
+
+ private void RefreshBuff()
+ {
+ Rift.RowData currRiftRow = this._mdoc.currRiftRow;
+ this.RefreshBuff(base.uiBehaviour.m_goBuff[0], string.Empty, XSingleton<XGlobalConfig>.singleton.GetValue("RiftAttr"), currRiftRow.attack + "%");
+ this.RefreshBuff(base.uiBehaviour.m_goBuff[1], string.Empty, XSingleton<XGlobalConfig>.singleton.GetValue("RiftHP"), currRiftRow.hp + "%");
+ bool flag = this._mdoc != null && this._mdoc.currRiftRow != null;
+ if (flag)
+ {
+ int num = this._mdoc.buffIDS.Count + 2;
+ for (int i = 2; i < num; i++)
+ {
+ RiftBuffSuitMonsterType.RowData buffSuitRow = this._mdoc.GetBuffSuitRow((uint)this._mdoc.buffIDS[i - 2], this._mdoc.buffLevels[i - 2]);
+ base.uiBehaviour.m_goBuff[i].SetActive(true);
+ this.RefreshBuff(base.uiBehaviour.m_goBuff[i], buffSuitRow.atlas, buffSuitRow.icon, string.Empty);
+ IXUISprite ixuisprite = base.uiBehaviour.m_goBuff[i].transform.Find("P").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.ID = (ulong)((long)(i - 2));
+ ixuisprite.RegisterSpritePressEventHandler(new SpritePressEventHandler(this.OnBuffPress));
+ }
+ for (int j = num; j < base.uiBehaviour.m_goBuff.Length; j++)
+ {
+ base.uiBehaviour.m_goBuff[j].SetActive(false);
+ }
+ }
+ }
+
+ private bool OnBuffPress(IXUISprite spr, bool ispress)
+ {
+ int index = (int)spr.ID;
+ RiftBuffSuitMonsterType.RowData buffSuitRow = this._mdoc.GetBuffSuitRow((uint)this._mdoc.buffIDS[index], this._mdoc.buffLevels[index]);
+ base.uiBehaviour.m_lbltip.SetText(XSingleton<UiUtility>.singleton.ReplaceReturn(buffSuitRow.scription));
+ base.uiBehaviour.m_lbltip.SetVisible(ispress);
+ return true;
+ }
+
+ private void RefreshBuff(GameObject go, string atlas, string sp, string text)
+ {
+ IXUILabel ixuilabel = go.transform.Find("value").GetComponent("XUILabel") as IXUILabel;
+ IXUISprite ixuisprite = go.transform.Find("P").GetComponent("XUISprite") as IXUISprite;
+ ixuilabel.SetText(XSingleton<UiUtility>.singleton.ReplaceReturn(text));
+ bool flag = string.IsNullOrEmpty(atlas);
+ if (flag)
+ {
+ ixuisprite.SetSprite(sp);
+ }
+ else
+ {
+ ixuisprite.SetSprite(sp, atlas, false);
+ }
+ }
+
+ private void RefreshWelfare()
+ {
+ this._mdoc.CulWelfare();
+ this.RefreshRwd(this.m_WelfareWindow, this._mdoc.WelfareList, true);
+ IXUILabel ixuilabel = base.uiBehaviour.m_frameWelfare.transform.Find("Bg/CurrentPoint/Text").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel.SetText(this._mdoc.all_finish ? this._mdoc.currFloor.ToString() : (this._mdoc.currFloor - 1).ToString());
+ }
+
+ public void RefreshFirstPassRift()
+ {
+ this.RefreshRwd(this.m_WeekFirstPassWindow, this._mdoc.WeekFirstPassList, true);
+ IXUILabel ixuilabel = base.uiBehaviour.m_frameWeek.transform.Find("Bg/LeftTime").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel.SetText(this._mdoc.all_finish ? this._mdoc.currFloor.ToString() : (this._mdoc.currFloor - 1).ToString());
+ }
+
+ private void RefreshRwd(XQualifyingPointRewardWindow window, List<PointRewardStatus> list, bool resetPos)
+ {
+ window.m_Close.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnRwdCloseClicked));
+ Vector3 tplPos = window.m_RewardPool.TplPos;
+ window.m_RewardPool.FakeReturnAll();
+ window.m_ItemPool.FakeReturnAll();
+ list.Sort(new Comparison<PointRewardStatus>(this._mdoc.RewardCompare));
+ for (int i = 0; i < list.Count; i++)
+ {
+ GameObject gameObject = window.m_RewardPool.FetchGameObject(false);
+ IXUILabel ixuilabel = gameObject.transform.Find("Bg/Point/Num").GetComponent("XUILabel") as IXUILabel;
+ uint point = list[i].point;
+ ixuilabel.SetText(point.ToString());
+ Transform transform = gameObject.transform.Find("Bg/Tip");
+ bool flag = transform != null;
+ if (flag)
+ {
+ IXUILabel ixuilabel2 = transform.GetComponent("XUILabel") as IXUILabel;
+ IXUIButton ixuibutton = transform.GetComponent("XUIButton") as IXUIButton;
+ ixuilabel2.ID = (ulong)list[i].point;
+ ixuilabel2.RegisterLabelClickEventHandler(new LabelClickEventHandler(this.OnClaimFirstpassClick));
+ GameObject gameObject2 = transform.Find("redp").gameObject;
+ uint status = list[i].status;
+ gameObject2.SetActive(status == 3u);
+ bool flag2 = status == 3u;
+ if (flag2)
+ {
+ ixuilabel2.SetText(XStringDefineProxy.GetString("SRS_FETCH"));
+ }
+ bool flag3 = status == 2u;
+ if (flag3)
+ {
+ ixuilabel2.SetText(XStringDefineProxy.GetString("LEVEL_CHALLENGE_FINISH"));
+ }
+ else
+ {
+ bool flag4 = status == 1u;
+ if (flag4)
+ {
+ ixuilabel2.SetText(XStringDefineProxy.GetString("CAREER_TROPHY_UNREACH"));
+ }
+ else
+ {
+ bool flag5 = status == 0u;
+ if (flag5)
+ {
+ ixuilabel2.SetText(XStringDefineProxy.GetString("SRS_FETCHED"));
+ }
+ }
+ }
+ ixuibutton.SetEnable(status == 3u, false);
+ }
+ for (int j = 0; j < list[i].reward.Count; j++)
+ {
+ GameObject gameObject3 = window.m_ItemPool.FetchGameObject(false);
+ XSingleton<XItemDrawerMgr>.singleton.normalItemDrawer.DrawItem(gameObject3, (int)list[i].reward[j, 0], (int)list[i].reward[j, 1], false);
+ IXUISprite ixuisprite = gameObject3.transform.Find("Icon").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.ID = (ulong)list[i].reward[j, 0];
+ ixuisprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(XSingleton<UiUtility>.singleton.OnItemClick));
+ gameObject3.transform.parent = gameObject.transform;
+ gameObject3.transform.localPosition = new Vector3(window.m_ItemPool.TplPos.x - window.m_RewardPool.TplPos.x + (float)(window.m_ItemPool.TplWidth * j), 0f);
+ }
+ gameObject.transform.localPosition = window.m_RewardPool.TplPos - new Vector3(0f, (float)(window.m_RewardPool.TplHeight * i));
+ }
+ window.m_ItemPool.ActualReturnAll(false);
+ window.m_RewardPool.ActualReturnAll(false);
+ if (resetPos)
+ {
+ window.m_ScrollView.ResetPosition();
+ }
+ }
+
+ private void RefreshRankRwd()
+ {
+ this.m_RankRewardWindow.m_Close.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnRwdCloseClicked));
+ IXUILabel ixuilabel = base.uiBehaviour.m_frameRankRwd.transform.Find("Bg/LeftTime").GetComponent("XUILabel") as IXUILabel;
+ bool flag = this._mdoc.self_rank > 0u;
+ if (flag)
+ {
+ ixuilabel.SetText(XStringDefineProxy.GetString("SMALLMONSTER_RANK", new object[]
+ {
+ this._mdoc.self_rank
+ }));
+ }
+ else
+ {
+ ixuilabel.SetText(XStringDefineProxy.GetString("ARENA_NO_RANK"));
+ }
+ Vector3 tplPos = this.m_RankRewardWindow.m_RewardPool.TplPos;
+ this.m_RankRewardWindow.m_RewardPool.FakeReturnAll();
+ this.m_RankRewardWindow.m_ItemPool.FakeReturnAll();
+ for (int i = 0; i < this._mdoc.RankRewardList.Count; i++)
+ {
+ GameObject gameObject = this.m_RankRewardWindow.m_RewardPool.FetchGameObject(false);
+ IXUILabel ixuilabel2 = gameObject.transform.Find("Bg/Rank/RankNum").GetComponent("XUILabel") as IXUILabel;
+ bool isRange = this._mdoc.RankRewardList[i].isRange;
+ if (isRange)
+ {
+ ixuilabel2.SetText(string.Format(XStringDefineProxy.GetString("Qualifying_Rank_Reward_Desc2"), this._mdoc.RankRewardList[i].rank));
+ }
+ else
+ {
+ ixuilabel2.SetText(string.Format(XStringDefineProxy.GetString("Qualifying_Rank_Reward_Desc1"), this._mdoc.RankRewardList[i].rank));
+ }
+ for (int j = 0; j < this._mdoc.RankRewardList[i].reward.Count; j++)
+ {
+ GameObject gameObject2 = this.m_RankRewardWindow.m_ItemPool.FetchGameObject(false);
+ XSingleton<XItemDrawerMgr>.singleton.normalItemDrawer.DrawItem(gameObject2, (int)this._mdoc.RankRewardList[i].reward[j, 0], (int)this._mdoc.RankRewardList[i].reward[j, 1], false);
+ IXUISprite ixuisprite = gameObject2.transform.Find("Icon").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.ID = (ulong)this._mdoc.RankRewardList[i].reward[j, 0];
+ ixuisprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(XSingleton<UiUtility>.singleton.OnItemClick));
+ gameObject2.transform.parent = gameObject.transform;
+ gameObject2.transform.localPosition = new Vector3(this.m_RankRewardWindow.m_ItemPool.TplPos.x + (float)(this.m_RankRewardWindow.m_ItemPool.TplWidth * j), 0f);
+ }
+ gameObject.transform.localPosition = this.m_RankRewardWindow.m_RewardPool.TplPos - new Vector3(0f, (float)(this.m_RankRewardWindow.m_RewardPool.TplHeight * i));
+ }
+ this.m_RankRewardWindow.m_ItemPool.ActualReturnAll(false);
+ this.m_RankRewardWindow.m_RewardPool.ActualReturnAll(false);
+ this.m_RankRewardWindow.m_ScrollView.ResetPosition();
+ }
+
+ private void OnClaimFirstpassClick(IXUILabel l)
+ {
+ ulong id = l.ID;
+ this._mdoc.ReqFirstPassRwd(RiftFirstPassOpType.Rift_FirstPass_Op_GetReward, (uint)id);
+ }
+
+ private bool OnRwdCloseClicked(IXUIButton button)
+ {
+ this.CloseAllRwd();
+ base.uiBehaviour.m_tab.gameObject.SetActive(false);
+ return true;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/ActivityRiftDlg.cs.meta b/Client/Assets/Scripts/XMainClient/UI/ActivityRiftDlg.cs.meta
new file mode 100644
index 00000000..5f22f0a2
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/ActivityRiftDlg.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: dcc97680b1a7e5046a31e214eddb8c1a
+timeCreated: 1611404680
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/ActivityRiftGuidInfoHandler.cs b/Client/Assets/Scripts/XMainClient/UI/ActivityRiftGuidInfoHandler.cs
new file mode 100644
index 00000000..350b2c50
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/ActivityRiftGuidInfoHandler.cs
@@ -0,0 +1,173 @@
+using System;
+using System.Collections.Generic;
+using KKSG;
+using UILib;
+using UnityEngine;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ [Hotfix]
+ internal class ActivityRiftGuidInfoHandler : DlgHandlerBase
+ {
+ public IXUILabel m_lblRank;
+
+ public IXUILabel m_lblTime;
+
+ public IXUILabel m_lblName;
+
+ public IXUIButton m_btnClose;
+
+ public IXUIScrollView m_scroll;
+
+ public GameObject[] m_goBuff = new GameObject[5];
+
+ public XUIPool m_RankPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ private const int max_buff = 5;
+
+ public XRiftDocument _doc;
+
+ private Rift.RowData _bestRift;
+
+ protected override void Init()
+ {
+ base.Init();
+ this.m_lblName = (base.transform.Find("Bg/Name").GetComponent("XUILabel") as IXUILabel);
+ this.m_lblTime = (base.transform.Find("Bg/Time").GetComponent("XUILabel") as IXUILabel);
+ this.m_btnClose = (base.transform.Find("Bg/Close").GetComponent("XUIButton") as IXUIButton);
+ this.m_lblRank = (base.transform.Find("Bg/Floor").GetComponent("XUILabel") as IXUILabel);
+ GameObject gameObject = base.transform.Find("Bg/root/RewardTpl").gameObject;
+ GameObject gameObject2 = base.transform.Find("Bg/root/ScrollView").gameObject;
+ this.m_scroll = (gameObject2.GetComponent("XUIScrollView") as IXUIScrollView);
+ this.m_RankPool.SetupPool(gameObject2, gameObject, 2u, false);
+ for (int i = 0; i < 5; i++)
+ {
+ this.m_goBuff[i] = base.transform.Find("Bg/Buff/BossBuff" + i).gameObject;
+ }
+ bool flag = this._doc == null;
+ if (flag)
+ {
+ this._doc = XDocuments.GetSpecificDocument<XRiftDocument>(XRiftDocument.uuID);
+ }
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ this.m_btnClose.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnClose));
+ }
+
+ public override void OnUnload()
+ {
+ this._doc = null;
+ base.OnUnload();
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ bool flag = this._doc == null;
+ if (flag)
+ {
+ this._doc = XDocuments.GetSpecificDocument<XRiftDocument>(XRiftDocument.uuID);
+ }
+ bool flag2 = this._doc.guildInfos != null && this._doc.guildInfos.Count > 0;
+ if (flag2)
+ {
+ this.m_lblName.SetText(this._doc.guildInfos[0].roleInfo.name);
+ this.m_lblRank.SetText(this._doc.guildInfos[0].riftFloor.ToString());
+ this.m_lblTime.SetText(this._doc.guildInfos[0].costTime.ToString());
+ this._bestRift = this._doc.GetRiftData(this._doc.guildInfos[0].riftFloor, this._doc.currGuidRiftID);
+ }
+ else
+ {
+ this.m_lblRank.SetText("0");
+ this.m_lblTime.SetText("0");
+ }
+ this.RefreshBuff();
+ this.RefreshRank();
+ }
+
+ private bool OnClose(IXUIButton btn)
+ {
+ base.SetVisible(false);
+ return true;
+ }
+
+ private void RefreshBuff()
+ {
+ List<int> guildBuffIDs = this._doc.guildBuffIDs;
+ int num = guildBuffIDs.Count + 2;
+ Rift.RowData bestRift = this._bestRift;
+ bool flag = bestRift == null;
+ if (flag)
+ {
+ int i = 0;
+ int num2 = this.m_goBuff.Length;
+ while (i < num2)
+ {
+ this.m_goBuff[i].SetActive(false);
+ i++;
+ }
+ }
+ else
+ {
+ this.m_goBuff[0].SetActive(true);
+ this.m_goBuff[1].SetActive(true);
+ this.RefreshBuff(this.m_goBuff[0], string.Empty, XSingleton<XGlobalConfig>.singleton.GetValue("RiftAttr"), bestRift.attack + "%");
+ this.RefreshBuff(this.m_goBuff[1], string.Empty, XSingleton<XGlobalConfig>.singleton.GetValue("RiftHP"), bestRift.hp + "%");
+ for (int j = 2; j < num; j++)
+ {
+ RiftBuffSuitMonsterType.RowData buffSuitRow = this._doc.GetBuffSuitRow((uint)guildBuffIDs[j - 2], 1);
+ this.m_goBuff[j].SetActive(true);
+ this.RefreshBuff(this.m_goBuff[j], buffSuitRow.atlas, buffSuitRow.icon, string.Empty);
+ }
+ for (int k = num; k < this.m_goBuff.Length; k++)
+ {
+ this.m_goBuff[k].SetActive(false);
+ }
+ }
+ }
+
+ private void RefreshBuff(GameObject go, string atlas, string sp, string text)
+ {
+ IXUILabel ixuilabel = go.transform.Find("value").GetComponent("XUILabel") as IXUILabel;
+ IXUISprite ixuisprite = go.transform.Find("P").GetComponent("XUISprite") as IXUISprite;
+ ixuilabel.SetText(text);
+ bool flag = string.IsNullOrEmpty(atlas);
+ if (flag)
+ {
+ ixuisprite.SetSprite(sp);
+ }
+ else
+ {
+ ixuisprite.SetSprite(sp, atlas, false);
+ }
+ }
+
+ private void RefreshRank()
+ {
+ bool flag = this._doc.guildInfos != null;
+ if (flag)
+ {
+ this.m_RankPool.FakeReturnAll();
+ for (int i = 0; i < this._doc.guildInfos.Count; i++)
+ {
+ RiftGuildRankInfo riftGuildRankInfo = this._doc.guildInfos[i];
+ GameObject gameObject = this.m_RankPool.FetchGameObject(false);
+ IXUILabel label = gameObject.transform.Find("Bg/RankNum").GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel = gameObject.transform.Find("Bg/T").GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel2 = gameObject.transform.Find("Bg/Floor").GetComponent("XUILabel") as IXUILabel;
+ IXUISprite sp = gameObject.transform.Find("Bg/RankImage").GetComponent("XUISprite") as IXUISprite;
+ XSingleton<UiUtility>.singleton.ShowRank(sp, label, i + 1);
+ gameObject.transform.localPosition = this.m_RankPool.TplPos - new Vector3(0f, (float)(this.m_RankPool.TplHeight * i));
+ ixuilabel.SetText(riftGuildRankInfo.roleInfo.name);
+ int num = 3 * (5 - i) + 1;
+ ixuilabel2.SetText(riftGuildRankInfo.riftFloor.ToString());
+ }
+ this.m_RankPool.ActualReturnAll(false);
+ }
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/ActivityRiftGuidInfoHandler.cs.meta b/Client/Assets/Scripts/XMainClient/UI/ActivityRiftGuidInfoHandler.cs.meta
new file mode 100644
index 00000000..64595940
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/ActivityRiftGuidInfoHandler.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 5191e61d00147eb4d82a0c6bf39101e1
+timeCreated: 1611403706
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/ActivityRiftItemsHandler.cs b/Client/Assets/Scripts/XMainClient/UI/ActivityRiftItemsHandler.cs
new file mode 100644
index 00000000..0006ecb7
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/ActivityRiftItemsHandler.cs
@@ -0,0 +1,83 @@
+using System;
+using System.Collections.Generic;
+using UILib;
+using UnityEngine;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class ActivityRiftItemsHandler : DlgHandlerBase
+ {
+ protected override string FileName
+ {
+ get
+ {
+ return "GameSystem/TeamMysteriousItemList";
+ }
+ }
+
+ public GameObject m_goTpl;
+
+ public IXUIButton m_btnClose;
+
+ public IXUIScrollView m_scroll;
+
+ public XUIPool m_ItemsPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ private List<uint> m_data;
+
+ private Vector3 m_pos;
+
+ protected override void Init()
+ {
+ base.Init();
+ this.m_btnClose = (base.transform.Find("Bg/Close").GetComponent("XUIButton") as IXUIButton);
+ this.m_goTpl = base.transform.Find("Bg/ScrollView/ItemTpl").gameObject;
+ this.m_pos = this.m_goTpl.transform.localPosition;
+ GameObject gameObject = base.transform.Find("Bg/ScrollView").gameObject;
+ this.m_scroll = (gameObject.GetComponent("XUIScrollView") as IXUIScrollView);
+ this.m_ItemsPool.SetupPool(gameObject, this.m_goTpl, 8u, false);
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ this.m_btnClose.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnClose));
+ }
+
+ public void ShowItemList(List<uint> list)
+ {
+ this.m_data = list;
+ base.SetVisible(true);
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ this.m_ItemsPool.FakeReturnAll();
+ for (int i = 0; i < this.m_data.Count; i++)
+ {
+ GameObject gameObject = this.m_ItemsPool.FetchGameObject(false);
+ this.SetitemInfo(gameObject, this.m_data[i]);
+ IXUILabel ixuilabel = gameObject.transform.Find("Intro").GetComponent("XUILabel") as IXUILabel;
+ ItemList.RowData itemConf = XBagDocument.GetItemConf((int)this.m_data[i]);
+ ixuilabel.SetText(itemConf.ItemDescription);
+ gameObject.transform.localPosition = new Vector3(this.m_pos.x, this.m_pos.y - (float)(110 * i), this.m_pos.z);
+ }
+ this.m_ItemsPool.ActualReturnAll(false);
+ }
+
+ private void SetitemInfo(GameObject obj, uint itemID)
+ {
+ IXUISprite ixuisprite = obj.transform.Find("Icon").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.ID = (ulong)itemID;
+ XSingleton<XItemDrawerMgr>.singleton.normalItemDrawer.DrawItem(obj, (int)itemID, 0, false);
+ }
+
+ private bool OnClose(IXUIButton btn)
+ {
+ base.SetVisible(false);
+ return true;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/ActivityRiftItemsHandler.cs.meta b/Client/Assets/Scripts/XMainClient/UI/ActivityRiftItemsHandler.cs.meta
new file mode 100644
index 00000000..0e000aa8
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/ActivityRiftItemsHandler.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 0db3964ea740732409883f9cac33329c
+timeCreated: 1611403197
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/ActivityTeamTowerSingleDlg.cs b/Client/Assets/Scripts/XMainClient/UI/ActivityTeamTowerSingleDlg.cs
new file mode 100644
index 00000000..03c53a6a
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/ActivityTeamTowerSingleDlg.cs
@@ -0,0 +1,1289 @@
+using System;
+using System.Collections.Generic;
+using KKSG;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class ActivityTeamTowerSingleDlg : DlgBase<ActivityTeamTowerSingleDlg, ActivityTeamTowerSingleDlgBehaviour>
+ {
+ public bool SweepFinished
+ {
+ get
+ {
+ return this._sweep_finished;
+ }
+ set
+ {
+ this._sweep_finished = value;
+ }
+ }
+
+ public override string fileName
+ {
+ get
+ {
+ return "Hall/TeamTowerNewDlg";
+ }
+ }
+
+ public override int layer
+ {
+ get
+ {
+ return 1;
+ }
+ }
+
+ public override bool autoload
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override bool hideMainMenu
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override bool pushstack
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override bool fullscreenui
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override int sysid
+ {
+ get
+ {
+ return XFastEnumIntEqualityComparer<XSysDefine>.ToInt(XSysDefine.XSys_Activity_TeamTowerSingle);
+ }
+ }
+
+ private XExpeditionDocument _doc;
+
+ private uint _count_timer;
+
+ private bool _in_sweeping = false;
+
+ private float _time_left = 0f;
+
+ private bool _sweep_finished = false;
+
+ private float _sweep_time = 0f;
+
+ private int _sweep_level = 0;
+
+ private int _tower_max_floor = 100;
+
+ private uint _show_sweep_timer = 0u;
+
+ private float _effect_result = 1f;
+
+ private List<float> _random_list = new List<float>();
+
+ private List<int> _refresh_cost = new List<int>();
+
+ private List<int> _refresh_money = new List<int>();
+
+ private List<int> frames = new List<int>();
+
+ private XElapseTimer timePass = new XElapseTimer();
+
+ public ActivityTeamTowerSingleDlg.State state = ActivityTeamTowerSingleDlg.State.None;
+
+ private int _play_count = 0;
+
+ private int _acc_time = 0;
+
+ private int _all_count = 35;
+
+ private bool _is_getting_reward = false;
+
+ public enum State
+ {
+ BEGIN,
+ PLAY,
+ Idle,
+ FADE,
+ None
+ }
+
+ protected override void Init()
+ {
+ this._doc = XDocuments.GetSpecificDocument<XExpeditionDocument>(XExpeditionDocument.uuID);
+ this._doc.TeamTowerSingleView = this;
+ string value = XSingleton<XGlobalConfig>.singleton.GetValue("SweepTowerTime");
+ string[] array = value.Split(new char[]
+ {
+ '|'
+ });
+ this._sweep_time = float.Parse(array[0].Split(new char[]
+ {
+ '='
+ })[1]);
+ string value2 = XSingleton<XGlobalConfig>.singleton.GetValue("RefreshSweepRand");
+ string[] array2 = value2.Split(new char[]
+ {
+ '|'
+ });
+ this._random_list.Clear();
+ for (int i = 0; i < array2.Length; i++)
+ {
+ this._random_list.Add((float)int.Parse(array2[i].Split(new char[]
+ {
+ '='
+ })[0]) / 100f);
+ }
+ string value3 = XSingleton<XGlobalConfig>.singleton.GetValue("RefreshSweepCost");
+ string[] array3 = value3.Split(new char[]
+ {
+ '|'
+ });
+ this._refresh_cost.Clear();
+ this._refresh_money.Clear();
+ for (int j = 0; j < array3.Length; j++)
+ {
+ string[] array4 = array3[j].Split(new char[]
+ {
+ '='
+ });
+ this._refresh_cost.Add(int.Parse(array4[1]));
+ this._refresh_money.Add(int.Parse(array4[0]));
+ }
+ this.frames.Clear();
+ string value4 = XSingleton<XGlobalConfig>.singleton.GetValue("TeamTower_Ani");
+ string[] array5 = value4.Split(new char[]
+ {
+ '|'
+ });
+ for (int k = 0; k < array5.Length; k++)
+ {
+ this.frames.Add(int.Parse(array5[k]));
+ }
+ this._all_count = this.frames.Count;
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ base.uiBehaviour.mMainClose.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnCloseDlg));
+ base.uiBehaviour.m_Help.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnHelpClicked));
+ base.uiBehaviour.mSweepBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnShowSweepFrame));
+ base.uiBehaviour.mSingleDoSweep.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnQuickStartSweep));
+ base.uiBehaviour.mDoubleSweep.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnStartSweep));
+ base.uiBehaviour.mDoubleDoSweep.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnQuickStartSweep));
+ base.uiBehaviour.mBackClick.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnCloseSweep));
+ base.uiBehaviour.mCloseSweep.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnCloseSweep));
+ base.uiBehaviour.mResetBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnReqResetSweep));
+ base.uiBehaviour.mRank.RegisterClickEventHandler(new ButtonClickEventHandler(this.ShowTeamTowerRank));
+ base.uiBehaviour.mGoBattle.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnEnterBattle));
+ base.uiBehaviour.mRewardRefresh.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnRefreshReward));
+ base.uiBehaviour.mRewardGet.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnGetReward));
+ base.uiBehaviour.mFirstPassBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnShowFirstPassReward));
+ base.uiBehaviour.mFirstPassGetReward.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnGetFirstPassReward));
+ base.uiBehaviour.mFirstPassBackClick.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnHideFirstPassReward));
+ base.uiBehaviour.mFirstPassCheckReward.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnGetDisableReward));
+ }
+
+ public bool OnHelpClicked(IXUIButton button)
+ {
+ DlgBase<XCommonHelpTipView, XCommonHelpTipBehaviour>.singleton.ShowHelp(XSysDefine.XSys_Activity_TeamTowerSingle);
+ return true;
+ }
+
+ protected override void OnShow()
+ {
+ this.ShowTeamTowerFrame();
+ }
+
+ protected override void OnHide()
+ {
+ bool flag = this._count_timer > 0u;
+ if (flag)
+ {
+ XSingleton<XTimerMgr>.singleton.KillTimer(this._count_timer);
+ }
+ this._count_timer = 0u;
+ bool flag2 = this._show_sweep_timer > 0u;
+ if (flag2)
+ {
+ XSingleton<XTimerMgr>.singleton.KillTimer(this._show_sweep_timer);
+ }
+ this._show_sweep_timer = 0u;
+ }
+
+ private void ShowTeamTowerFrame()
+ {
+ base.uiBehaviour.mSweepFrame.SetVisible(false);
+ base.uiBehaviour.mSweepResult.SetVisible(false);
+ base.uiBehaviour.mFirstPassPanel.SetVisible(false);
+ this._sweep_level = 0;
+ this._sweep_finished = false;
+ this._is_getting_reward = false;
+ this._doc.GetSingleTowerActivityTop();
+ }
+
+ private bool OnCloseDlg(IXUIButton btn)
+ {
+ this.SetVisibleWithAnimation(false, null);
+ return true;
+ }
+
+ private bool ShowTeamTowerRank(IXUIButton btn)
+ {
+ DlgBase<XRankView, XRankBehaviour>.singleton.ShowRank(XSysDefine.XSys_Rank_TeamTower);
+ return true;
+ }
+
+ public void OnRefreshTopInfo()
+ {
+ bool flag = this._doc == null || !base.IsVisible();
+ if (!flag)
+ {
+ TeamTowerData singleTowerData = this._doc.SingleTowerData;
+ TeamTowerRewardTable.RowData[] teamTowerTable = this._doc.GetTeamTowerTable();
+ bool flag2 = singleTowerData == null;
+ if (!flag2)
+ {
+ bool flag3 = singleTowerData.sweeplefttime > 0;
+ if (flag3)
+ {
+ bool flag4 = (float)singleTowerData.sweeplefttime <= Time.time - singleTowerData.sweepreqtime;
+ if (flag4)
+ {
+ this._in_sweeping = false;
+ this._sweep_finished = true;
+ }
+ else
+ {
+ this._in_sweeping = true;
+ this._sweep_finished = false;
+ }
+ }
+ else
+ {
+ bool flag5 = singleTowerData.maxlevel == singleTowerData.sweepfloor && singleTowerData.maxlevel > 0;
+ if (flag5)
+ {
+ this._sweep_finished = true;
+ }
+ else
+ {
+ this._sweep_finished = false;
+ }
+ this._in_sweeping = false;
+ }
+ this._sweep_level = singleTowerData.sweepfloor;
+ int leftcount = this._doc.SingleTowerData.leftcount;
+ int num = singleTowerData.level + 1;
+ bool flag6 = num >= teamTowerTable.Length;
+ if (flag6)
+ {
+ num = teamTowerTable.Length;
+ }
+ base.uiBehaviour.mStage.SetText(string.Format(XSingleton<XStringTable>.singleton.GetString("TEAMTOWER_LEVEL"), num));
+ int num2 = 1;
+ int.TryParse(XSingleton<XGlobalConfig>.singleton.GetValue("TowerTeamDayCount"), out num2);
+ base.uiBehaviour.mResetNum.SetText(string.Format("{0}/{1}", leftcount, num2));
+ bool flag7 = leftcount > 0;
+ if (flag7)
+ {
+ base.uiBehaviour.mResetSprite.SetVisible(true);
+ base.uiBehaviour.mResetCount.SetText(leftcount.ToString());
+ }
+ else
+ {
+ base.uiBehaviour.mResetSprite.SetVisible(false);
+ }
+ this.OnInitMainReward();
+ this.InitTowerMap(singleTowerData.level);
+ this.OnRefreshSweepInfo();
+ this.OnInitFirstReward();
+ bool sweep_finished = this._sweep_finished;
+ if (sweep_finished)
+ {
+ this.OnShowSweepResultFrame();
+ }
+ else
+ {
+ this.OnHideSweepResultFrame();
+ }
+ }
+ }
+ }
+
+ public void OnRefreshSweepInfo()
+ {
+ TeamTowerData singleTowerData = this._doc.SingleTowerData;
+ this._time_left = (float)singleTowerData.sweeplefttime - (Time.time - singleTowerData.sweepreqtime);
+ this._in_sweeping = (this._time_left > 0f);
+ bool flag = this._time_left < 0f;
+ if (flag)
+ {
+ this._time_left = 0f;
+ }
+ bool flag2 = this._time_left > 0f;
+ if (flag2)
+ {
+ this.DoCountDown(null);
+ }
+ bool in_sweeping = this._in_sweeping;
+ if (in_sweeping)
+ {
+ this._show_sweep_timer = XSingleton<XTimerMgr>.singleton.SetTimer(0.5f, new XTimerMgr.ElapsedEventHandler(this.LateShowSweepFrame), null);
+ }
+ }
+
+ private bool HasFirstRewardRedPoint()
+ {
+ TeamTowerData singleTowerData = this._doc.SingleTowerData;
+ TeamTowerRewardTable.RowData[] teamTowerTable = this._doc.GetTeamTowerTable();
+ int num = 0;
+ bool flag = singleTowerData.firstpassreward.Count > 0;
+ if (flag)
+ {
+ num = singleTowerData.firstpassreward[singleTowerData.firstpassreward.Count - 1];
+ }
+ int num2 = 0;
+ for (int i = singleTowerData.maxlevel - 1; i >= 0; i--)
+ {
+ bool flag2 = teamTowerTable[i].FirstPassReward.Count > 0 && teamTowerTable[i].preward != 0;
+ if (flag2)
+ {
+ num2 = i + 1;
+ break;
+ }
+ }
+ return num2 > num;
+ }
+
+ private int GetRewardLevel()
+ {
+ TeamTowerData singleTowerData = this._doc.SingleTowerData;
+ TeamTowerRewardTable.RowData[] teamTowerTable = this._doc.GetTeamTowerTable();
+ int num = 0;
+ bool flag = singleTowerData.firstpassreward.Count > 0;
+ if (flag)
+ {
+ num = singleTowerData.firstpassreward[singleTowerData.firstpassreward.Count - 1];
+ }
+ for (int i = num + 1; i < singleTowerData.maxlevel; i++)
+ {
+ bool flag2 = teamTowerTable[i].FirstPassReward.Count > 0 && teamTowerTable[i].preward > 0;
+ if (flag2)
+ {
+ return i + 1;
+ }
+ }
+ return singleTowerData.firstpassreward[singleTowerData.firstpassreward.Count - 1];
+ }
+
+ private int GetNextRewardLevel()
+ {
+ TeamTowerData singleTowerData = this._doc.SingleTowerData;
+ TeamTowerRewardTable.RowData[] teamTowerTable = this._doc.GetTeamTowerTable();
+ int num = 0;
+ bool flag = singleTowerData.firstpassreward.Count > 0;
+ if (flag)
+ {
+ num = singleTowerData.firstpassreward[singleTowerData.firstpassreward.Count - 1];
+ }
+ for (int i = num + 1; i < teamTowerTable.Length; i++)
+ {
+ bool flag2 = teamTowerTable[i].FirstPassReward.Count > 0 && teamTowerTable[i].preward > 0;
+ if (flag2)
+ {
+ return i + 1;
+ }
+ }
+ return singleTowerData.firstpassreward[singleTowerData.firstpassreward.Count - 1];
+ }
+
+ private void OnInitFirstReward()
+ {
+ bool flag = this.HasFirstRewardRedPoint();
+ if (flag)
+ {
+ base.uiBehaviour.mFirstPassRedPoint.SetVisible(true);
+ base.uiBehaviour.mFirstPassLevel.SetText(string.Format(XStringDefineProxy.GetString("TEAMTOWER_LEVEL"), this.GetRewardLevel()));
+ }
+ else
+ {
+ base.uiBehaviour.mFirstPassRedPoint.SetVisible(false);
+ base.uiBehaviour.mFirstPassLevel.SetText(string.Format(XStringDefineProxy.GetString("TEAMTOWER_LEVEL"), this.GetNextRewardLevel()));
+ }
+ bool flag2 = base.uiBehaviour.mFirstPassPanel.IsVisible();
+ if (flag2)
+ {
+ this.OnShowFirstPassReward(null);
+ }
+ }
+
+ public bool OnShowFirstPassReward(IXUIButton btn)
+ {
+ base.uiBehaviour.mFirstPassPanel.SetVisible(true);
+ TeamTowerRewardTable.RowData[] teamTowerTable = this._doc.GetTeamTowerTable();
+ bool flag = this.HasFirstRewardRedPoint();
+ int num;
+ if (flag)
+ {
+ num = this.GetRewardLevel();
+ base.uiBehaviour.mFirstPassGet.gameObject.transform.localPosition = new Vector3(0f, 0f, 0f);
+ base.uiBehaviour.mFIrstPassCheck.gameObject.transform.localPosition = new Vector3(1000f, 0f, 0f);
+ base.uiBehaviour.mFirstPassCongraThrough.SetText(string.Format(XSingleton<XStringTable>.singleton.GetString("TEAMTOWER_CONGRA_THROUGH"), this.GetRewardLevel()));
+ }
+ else
+ {
+ num = this.GetNextRewardLevel();
+ base.uiBehaviour.mFirstPassGet.gameObject.transform.localPosition = new Vector3(1000f, 0f, 0f);
+ base.uiBehaviour.mFIrstPassCheck.gameObject.transform.localPosition = new Vector3(0f, 0f, 0f);
+ base.uiBehaviour.mFirstPassPlsThrough.SetText(string.Format(XSingleton<XStringTable>.singleton.GetString("TEAMTOWER_PLS_THROUGH"), this.GetNextRewardLevel()));
+ }
+ base.uiBehaviour.mFirstPassReward.ReturnAll(false);
+ SeqListRef<int> firstPassReward = teamTowerTable[num - 1].FirstPassReward;
+ for (int i = 0; i < firstPassReward.Count; i++)
+ {
+ GameObject gameObject = base.uiBehaviour.mFirstPassReward.FetchGameObject(false);
+ XItem xitem = XBagDocument.MakeXItem(firstPassReward[i, 0], false);
+ xitem.itemCount = firstPassReward[i, 1];
+ int num2 = (i % 2 == 0) ? 1 : -1;
+ int num3 = base.uiBehaviour.mFirstPassReward.TplWidth / 2;
+ bool flag2 = firstPassReward.Count % 2 == 1;
+ if (flag2)
+ {
+ num3 = 0;
+ }
+ XSingleton<XItemDrawerMgr>.singleton.DrawItem(gameObject.transform.Find("Item").gameObject, xitem);
+ gameObject.transform.localPosition = new Vector3(base.uiBehaviour.mFirstPassReward.TplPos.x + (float)(num2 * ((i + 1) / 2) * base.uiBehaviour.mFirstPassReward.TplWidth) + (float)num3, base.uiBehaviour.mFirstPassReward.TplPos.y, base.uiBehaviour.mFirstPassReward.TplPos.z);
+ }
+ return true;
+ }
+
+ private void OnHideFirstPassReward(IXUISprite sp)
+ {
+ base.uiBehaviour.mFirstPassPanel.SetVisible(false);
+ }
+
+ public bool OnGetFirstPassReward(IXUIButton btn)
+ {
+ bool is_getting_reward = this._is_getting_reward;
+ bool result;
+ if (is_getting_reward)
+ {
+ result = false;
+ }
+ else
+ {
+ this._doc.GetFirstPassReward(this.GetRewardLevel());
+ this._is_getting_reward = true;
+ result = true;
+ }
+ return result;
+ }
+
+ private bool OnGetDisableReward(IXUIButton btn)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XSingleton<XStringTable>.singleton.GetString("TEAMTOWER_CANOT_GET"), "fece00");
+ return true;
+ }
+
+ public void OnGetFirstPassRewardRes(ErrorCode error)
+ {
+ this._is_getting_reward = false;
+ bool flag = error > ErrorCode.ERR_SUCCESS;
+ if (flag)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(error, "fece00");
+ }
+ else
+ {
+ this._doc.GetSingleTowerActivityTop();
+ }
+ }
+
+ public void LateShowSweepFrame(object obj)
+ {
+ this.OnShowSweepFrame(null);
+ }
+
+ public bool OnShowSweepFrame(IXUIButton btn)
+ {
+ bool sweep_finished = this._sweep_finished;
+ bool result;
+ if (sweep_finished)
+ {
+ base.uiBehaviour.mSweepResult.SetVisible(true);
+ result = true;
+ }
+ else
+ {
+ bool flag = this._doc.SingleTowerData.maxlevel == 0;
+ if (flag)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XSingleton<XStringTable>.singleton.GetString("TEAMTOWER_FIRST_NOT_SWEEP"), "fece00");
+ result = false;
+ }
+ else
+ {
+ bool flag2 = this._doc.SingleTowerData.level == this._doc.SingleTowerData.maxlevel || this._sweep_finished;
+ if (flag2)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XSingleton<XStringTable>.singleton.GetString("TEAMTOWER_LAST_NOT_SWEEP"), "fece00");
+ result = false;
+ }
+ else
+ {
+ TeamTowerData singleTowerData = this._doc.SingleTowerData;
+ base.uiBehaviour.mSweepFrame.SetVisible(true);
+ base.uiBehaviour.mSweepedLevel.SetText(string.Format(XStringDefineProxy.GetString("TEAMTOWER_REACH_LEVEL"), singleTowerData.maxlevel));
+ bool in_sweeping = this._in_sweeping;
+ if (in_sweeping)
+ {
+ base.uiBehaviour.mSingleDoSweep.SetVisible(true);
+ base.uiBehaviour.mDoubleSweep.SetVisible(false);
+ base.uiBehaviour.mDoubleDoSweep.SetVisible(false);
+ base.uiBehaviour.mSingleMoneyNum.SetText("20");
+ string itemSmallIcon = XBagDocument.GetItemSmallIcon(7, 0u);
+ base.uiBehaviour.mSingleMoneySign.SetSprite(itemSmallIcon);
+ this.SetTimeLeft((int)this._time_left);
+ }
+ else
+ {
+ base.uiBehaviour.mSingleDoSweep.SetVisible(false);
+ base.uiBehaviour.mDoubleSweep.SetVisible(true);
+ base.uiBehaviour.mDoubleDoSweep.SetVisible(true);
+ base.uiBehaviour.mDoubleMoneyNum.SetText("20");
+ string itemSmallIcon2 = XBagDocument.GetItemSmallIcon(7, 0u);
+ base.uiBehaviour.mDoubleMoneySign.SetSprite(itemSmallIcon2);
+ bool flag3 = singleTowerData.maxlevel > singleTowerData.level;
+ if (flag3)
+ {
+ this.SetTimeLeft((int)this._sweep_time * (singleTowerData.maxlevel - singleTowerData.level));
+ }
+ else
+ {
+ this.SetTimeLeft((int)this._sweep_time * singleTowerData.maxlevel);
+ }
+ }
+ this.OnInitReward(base.uiBehaviour.mRewardPool, 1f);
+ result = true;
+ }
+ }
+ }
+ return result;
+ }
+
+ private void SetTimeLeft(int time)
+ {
+ int num = time / 3600;
+ int num2 = (time - num * 3600) / 60;
+ int num3 = time % 60;
+ string text = string.Format("{0:D2}:{1:D2}:{2:D2}", num, num2, num3);
+ base.uiBehaviour.mSweepEstimateTime.SetText(text);
+ }
+
+ private void OnInitReward(XUIPool pool, float rewardalpha = 1f)
+ {
+ Dictionary<int, int> dictionary = new Dictionary<int, int>();
+ TeamTowerRewardTable.RowData[] teamTowerTable = this._doc.GetTeamTowerTable();
+ TeamTowerData singleTowerData = this._doc.SingleTowerData;
+ int maxlevel = singleTowerData.maxlevel;
+ int num = (maxlevel < teamTowerTable.Length) ? maxlevel : teamTowerTable.Length;
+ for (int i = singleTowerData.level; i < num; i++)
+ {
+ TeamTowerRewardTable.RowData rowData = teamTowerTable[i];
+ for (int j = 0; j < rowData.Reward.Count; j++)
+ {
+ bool flag = dictionary.ContainsKey(rowData.Reward[j, 0]);
+ if (flag)
+ {
+ Dictionary<int, int> dictionary2 = dictionary;
+ int key = rowData.Reward[j, 0];
+ dictionary2[key] += rowData.Reward[j, 1];
+ }
+ else
+ {
+ dictionary[rowData.Reward[j, 0]] = rowData.Reward[j, 1];
+ }
+ }
+ }
+ List<int> list = new List<int>(dictionary.Keys);
+ pool.ReturnAll(false);
+ bool active = XActivityDocument.Doc.IsInnerDropTime(530u);
+ for (int k = 0; k < list.Count; k++)
+ {
+ GameObject gameObject = pool.FetchGameObject(false);
+ XItem xitem = XBagDocument.MakeXItem(list[k], false);
+ xitem.itemCount = (int)((float)dictionary[list[k]] * rewardalpha + 0.5f);
+ IXUITweenTool ixuitweenTool = gameObject.transform.Find("Item/Num").GetComponent("XUIPlayTween") as IXUITweenTool;
+ bool flag2 = ixuitweenTool != null;
+ if (flag2)
+ {
+ ixuitweenTool.ResetTweenByGroup(true, 0);
+ ixuitweenTool.PlayTween(true, -1f);
+ }
+ int num2 = (k % 2 == 0) ? 1 : -1;
+ int num3 = pool.TplWidth / 2;
+ bool flag3 = list.Count % 2 == 1;
+ if (flag3)
+ {
+ num3 = 0;
+ }
+ XSingleton<XItemDrawerMgr>.singleton.DrawItem(gameObject.transform.Find("Item").gameObject, xitem);
+ gameObject.transform.localPosition = new Vector3(pool.TplPos.x + (float)(num2 * ((k + 1) / 2) * pool.TplWidth) + (float)num3, pool.TplPos.y, pool.TplPos.z);
+ Transform transform = gameObject.transform.Find("Item/Double");
+ bool flag4 = transform != null;
+ if (flag4)
+ {
+ transform.gameObject.SetActive(active);
+ }
+ }
+ }
+
+ private void OnInitMainReward()
+ {
+ Dictionary<int, int> dictionary = new Dictionary<int, int>();
+ Dictionary<int, int> dictionary2 = new Dictionary<int, int>();
+ base.uiBehaviour.mMainRewardPool.ReturnAll(false);
+ TeamTowerRewardTable.RowData[] teamTowerTable = this._doc.GetTeamTowerTable();
+ int num = this._doc.SingleTowerData.level;
+ bool flag = num >= teamTowerTable.Length;
+ if (flag)
+ {
+ num = teamTowerTable.Length - 1;
+ }
+ TeamTowerRewardTable.RowData rowData = teamTowerTable[num];
+ bool flag2 = rowData.preward == 0 && num >= this._doc.SingleTowerData.maxlevel;
+ if (flag2)
+ {
+ for (int i = 0; i < rowData.FirstPassReward.Count; i++)
+ {
+ bool flag3 = rowData.FirstPassReward[i, 1] > 0;
+ if (flag3)
+ {
+ bool flag4 = dictionary2.ContainsKey(rowData.FirstPassReward[i, 0]);
+ if (flag4)
+ {
+ Dictionary<int, int> dictionary3 = dictionary2;
+ int key = rowData.FirstPassReward[i, 0];
+ dictionary3[key] += rowData.FirstPassReward[i, 1];
+ }
+ else
+ {
+ dictionary2[rowData.FirstPassReward[i, 0]] = rowData.FirstPassReward[i, 1];
+ }
+ }
+ }
+ }
+ for (int j = 0; j < rowData.Reward.Count; j++)
+ {
+ bool flag5 = rowData.Reward[j, 1] > 0;
+ if (flag5)
+ {
+ bool flag6 = dictionary.ContainsKey(rowData.Reward[j, 0]);
+ if (flag6)
+ {
+ Dictionary<int, int> dictionary3 = dictionary;
+ int key = rowData.Reward[j, 0];
+ dictionary3[key] += rowData.Reward[j, 1];
+ }
+ else
+ {
+ dictionary[rowData.Reward[j, 0]] = rowData.Reward[j, 1];
+ }
+ }
+ }
+ List<int> list = new List<int>(dictionary.Keys);
+ List<int> list2 = new List<int>(dictionary2.Keys);
+ int num2 = list.Count + list2.Count;
+ for (int k = 0; k < list.Count; k++)
+ {
+ GameObject gameObject = base.uiBehaviour.mMainRewardPool.FetchGameObject(false);
+ XItem xitem = XBagDocument.MakeXItem(list[k], false);
+ xitem.itemCount = dictionary[list[k]];
+ int num3 = base.uiBehaviour.mMainRewardPool.TplWidth / 2;
+ bool flag7 = num2 % 2 == 1;
+ if (flag7)
+ {
+ num3 = 0;
+ }
+ xitem.Description.ItemDrawer.DrawItem(gameObject, xitem, true);
+ gameObject.transform.localPosition = new Vector3(base.uiBehaviour.mMainRewardPool.TplPos.x + (float)(k - (num2 - 1) / 2) * 1f * (float)base.uiBehaviour.mMainRewardPool.TplWidth - (float)num3, base.uiBehaviour.mMainRewardPool.TplPos.y, base.uiBehaviour.mMainRewardPool.TplPos.z);
+ IXUISprite ixuisprite = gameObject.transform.Find("shoutong").GetComponent("XUISprite") as IXUISprite;
+ bool flag8 = ixuisprite != null;
+ if (flag8)
+ {
+ ixuisprite.SetVisible(false);
+ }
+ }
+ for (int l = 0; l < list2.Count; l++)
+ {
+ int num4 = l + list.Count;
+ GameObject gameObject2 = base.uiBehaviour.mMainRewardPool.FetchGameObject(false);
+ XItem xitem2 = XBagDocument.MakeXItem(list2[l], false);
+ xitem2.itemCount = dictionary2[list2[l]];
+ int num5 = base.uiBehaviour.mMainRewardPool.TplWidth / 2;
+ bool flag9 = (list.Count + list2.Count) % 2 == 1;
+ if (flag9)
+ {
+ num5 = 0;
+ }
+ xitem2.Description.ItemDrawer.DrawItem(gameObject2, xitem2, true);
+ gameObject2.transform.localPosition = new Vector3(base.uiBehaviour.mMainRewardPool.TplPos.x + (float)(num4 - (num2 - 1) / 2) * 1f * (float)base.uiBehaviour.mMainRewardPool.TplWidth - (float)num5, base.uiBehaviour.mMainRewardPool.TplPos.y, base.uiBehaviour.mMainRewardPool.TplPos.z);
+ IXUISprite ixuisprite2 = gameObject2.transform.Find("shoutong").GetComponent("XUISprite") as IXUISprite;
+ bool flag10 = ixuisprite2 != null;
+ if (flag10)
+ {
+ ixuisprite2.SetVisible(true);
+ }
+ }
+ double attr = XSingleton<XEntityMgr>.singleton.Player.PlayerAttributes.GetAttr(XAttributeDefine.XAttr_POWER_POINT_Total);
+ SceneTable.RowData sceneData = XSingleton<XSceneMgr>.singleton.GetSceneData((uint)rowData.SceneID);
+ double num6 = (double)sceneData.RecommendPower * 1.0;
+ bool flag11 = sceneData != null;
+ if (flag11)
+ {
+ num6 = (double)sceneData.RecommendPower * 1.0;
+ }
+ double num7 = (attr - num6 * 1.0) / num6 * 1.0;
+ bool flag12 = num7 > 0.01;
+ if (flag12)
+ {
+ base.uiBehaviour.mDemandFP.SetText(num6.ToString());
+ base.uiBehaviour.mDemandFP.SetColor(Color.green);
+ }
+ else
+ {
+ bool flag13 = num7 > -0.01;
+ if (flag13)
+ {
+ base.uiBehaviour.mDemandFP.SetText(string.Format("[e2ca9e]{0}[-]", num6));
+ }
+ else
+ {
+ base.uiBehaviour.mDemandFP.SetText(num6.ToString());
+ base.uiBehaviour.mDemandFP.SetColor(Color.red);
+ }
+ }
+ }
+
+ public bool OnCloseSweep(IXUIButton btn)
+ {
+ base.uiBehaviour.mSweepFrame.SetVisible(false);
+ return true;
+ }
+
+ public bool OnStartSweep(IXUIButton btn)
+ {
+ RpcC2G_SweepTower rpcC2G_SweepTower = new RpcC2G_SweepTower();
+ rpcC2G_SweepTower.oArg.hardLevel = this.GetHardLevel();
+ XSingleton<XClientNetwork>.singleton.Send(rpcC2G_SweepTower);
+ return true;
+ }
+
+ public int GetHardLevel()
+ {
+ return this._doc.ExpeditionId % 100 / 10 + 1;
+ }
+
+ public void OnStartSweepRes(SweepTowerArg arg, int timeleft)
+ {
+ bool flag = arg.cost == null || arg.cost.itemID == 0u;
+ if (flag)
+ {
+ this._time_left = (float)timeleft;
+ this._in_sweeping = true;
+ this._sweep_finished = false;
+ this.DoCountDown(null);
+ TeamTowerData singleTowerData = this._doc.SingleTowerData;
+ singleTowerData.sweepreqtime = Time.time;
+ base.uiBehaviour.mSingleDoSweep.SetVisible(true);
+ base.uiBehaviour.mDoubleSweep.SetVisible(false);
+ base.uiBehaviour.mDoubleDoSweep.SetVisible(false);
+ }
+ else
+ {
+ this._time_left = 0f;
+ this._in_sweeping = false;
+ this._sweep_finished = true;
+ this.OnCloseSweep(null);
+ this.OnQuickStartSweepRes();
+ }
+ }
+
+ public bool OnQuickStartSweep(IXUIButton btn)
+ {
+ RpcC2G_SweepTower rpcC2G_SweepTower = new RpcC2G_SweepTower();
+ rpcC2G_SweepTower.oArg.cost = new ItemBrief();
+ rpcC2G_SweepTower.oArg.hardLevel = 1;
+ rpcC2G_SweepTower.oArg.cost.itemID = 7u;
+ XSingleton<XClientNetwork>.singleton.Send(rpcC2G_SweepTower);
+ return true;
+ }
+
+ public void OnQuickStartSweepRes()
+ {
+ this._sweep_finished = true;
+ this._in_sweeping = false;
+ this._time_left = 0f;
+ TeamTowerData singleTowerData = this._doc.SingleTowerData;
+ bool flag = singleTowerData.level >= this._doc.GetTeamTowerTopLevel(1);
+ if (flag)
+ {
+ this._doc.ExpeditionId = this._doc.ExpeditionId - this._doc.ExpeditionId % 10 + 1;
+ int count = this._doc.GetDayCount(TeamLevelType.TeamLevelTeamTower, null) - 1;
+ this._doc.OnRefreshDayCount(TeamLevelType.TeamLevelTeamTower, count);
+ }
+ this.OnCloseSweep(null);
+ this.OnShowSweepResultFrame();
+ this._doc.GetSingleTowerActivityTop();
+ }
+
+ private bool OnReqResetSweep(IXUIButton btn)
+ {
+ bool flag = this._doc.SingleTowerData.leftcount <= 0;
+ bool result;
+ if (flag)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(ErrorCode.ERR_TEAM_TOWER_DAYCOUNT, "fece00");
+ result = false;
+ }
+ else
+ {
+ bool flag2 = this._doc.SingleTowerData.level == 0;
+ if (flag2)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XSingleton<XStringTable>.singleton.GetString("TEAMTOWER_FIRST_NOT_RESET"), "fece00");
+ result = false;
+ }
+ else
+ {
+ bool in_sweeping = this._in_sweeping;
+ if (in_sweeping)
+ {
+ DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.SetVisible(true, true);
+ DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.SetSingleButtonMode(true);
+ DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.SetLabelsWithSymbols(XStringDefineProxy.GetString("TEAMTOWER_IN_SWEEP"), XStringDefineProxy.GetString("COMMON_OK"), XStringDefineProxy.GetString("COMMON_OK"));
+ DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.SetModalCallback(new ButtonClickEventHandler(this.OnCancelReset), new ButtonClickEventHandler(this.OnCancelReset));
+ }
+ else
+ {
+ DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.SetVisible(true, true);
+ DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.SetSingleButtonMode(false);
+ DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.SetLabelsWithSymbols(XStringDefineProxy.GetString("TEAMTOWER_RESET_INFO"), XStringDefineProxy.GetString("TEAMTOWER_RESET"), XStringDefineProxy.GetString("COMMON_CANCEL"));
+ DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.SetModalCallback(new ButtonClickEventHandler(this.OnResetSweep), new ButtonClickEventHandler(this.OnCancelReset));
+ }
+ result = true;
+ }
+ }
+ return result;
+ }
+
+ private bool OnCancelReset(IXUIButton btn)
+ {
+ DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.SetVisible(false, true);
+ return true;
+ }
+
+ public bool OnResetSweep(IXUIButton btn)
+ {
+ this._doc.ResetSingleTower();
+ return true;
+ }
+
+ public void OnResetSweepRes()
+ {
+ TeamTowerData singleTowerData = this._doc.SingleTowerData;
+ singleTowerData.sweepfloor = 1;
+ singleTowerData.sweeplefttime = 0;
+ this._in_sweeping = false;
+ this._sweep_finished = false;
+ this._doc.ExpeditionId = this._doc.ExpeditionId - this._doc.ExpeditionId % 10 + 1;
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString("TEAMTOWER_RESETOK"), "fece00");
+ this._doc.GetSingleTowerActivityTop();
+ }
+
+ public bool OnEnterBattle(IXUIButton btn)
+ {
+ TeamTowerRewardTable.RowData[] teamTowerTable = this._doc.GetTeamTowerTable();
+ int level = this._doc.SingleTowerData.level;
+ bool flag = level >= teamTowerTable.Length;
+ bool result;
+ if (flag)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString("TEAMTOWER_REACH_TOP"), "fece00");
+ result = false;
+ }
+ else
+ {
+ TeamTowerRewardTable.RowData rowData = teamTowerTable[this._doc.SingleTowerData.level];
+ PtcC2G_EnterSceneReq ptcC2G_EnterSceneReq = new PtcC2G_EnterSceneReq();
+ ptcC2G_EnterSceneReq.Data.sceneID = (uint)rowData.SceneID;
+ XSingleton<XClientNetwork>.singleton.Send(ptcC2G_EnterSceneReq);
+ result = true;
+ }
+ return result;
+ }
+
+ public void DoCountDown(object obj)
+ {
+ TeamTowerData singleTowerData = this._doc.SingleTowerData;
+ this._time_left = (float)singleTowerData.sweeplefttime - (Time.time - singleTowerData.sweepreqtime);
+ bool flag = this._count_timer > 0u;
+ if (flag)
+ {
+ XSingleton<XTimerMgr>.singleton.KillTimer(this._count_timer);
+ }
+ bool flag2 = this._time_left <= 0f;
+ if (flag2)
+ {
+ this._time_left = 0f;
+ this._in_sweeping = false;
+ this._sweep_finished = true;
+ this.SetTimeLeft(0);
+ this.OnCloseSweep(null);
+ this._doc.GetSingleTowerActivityTop();
+ }
+ else
+ {
+ this.SetTimeLeft((int)this._time_left);
+ this._count_timer = XSingleton<XTimerMgr>.singleton.SetTimer(1f, new XTimerMgr.ElapsedEventHandler(this.DoCountDown), null);
+ }
+ }
+
+ private void InitTowerMap(int curfloor = 1)
+ {
+ TeamTowerRewardTable.RowData[] teamTowerTable = this._doc.GetTeamTowerTable();
+ this._tower_max_floor = teamTowerTable.Length;
+ int num = this._doc.SingleTowerData.maxlevel;
+ num = ((num + 5 >= this._tower_max_floor) ? this._tower_max_floor : (num + 5));
+ num = ((num % 2 == 0) ? num : (num + 1));
+ int num2 = num / 2 - 1;
+ IXUILabel ixuilabel = base.uiBehaviour.transform.Find("Bg/Tower/TowerBase/Floor").GetComponent("XUILabel") as IXUILabel;
+ GameObject gameObject = base.uiBehaviour.transform.Find("Bg/Tower/TowerBase/Floor/Current/Normal/UI_hasd_gk").gameObject;
+ ixuilabel.SetText(string.Format(XSingleton<XStringTable>.singleton.GetString("TEAMTOWER_LEVEL"), 1));
+ bool flag = this._doc.SingleTowerData.level + 1 == 1;
+ if (flag)
+ {
+ gameObject.SetActive(true);
+ }
+ else
+ {
+ gameObject.SetActive(false);
+ }
+ ixuilabel = (base.uiBehaviour.transform.Find("Bg/Tower/TowerBase/Floor1").GetComponent("XUILabel") as IXUILabel);
+ ixuilabel.SetText(string.Format(XSingleton<XStringTable>.singleton.GetString("TEAMTOWER_LEVEL"), 2));
+ gameObject = base.uiBehaviour.transform.Find("Bg/Tower/TowerBase/Floor1/Current/Normal/UI_hasd_gk").gameObject;
+ bool flag2 = this._doc.SingleTowerData.level + 1 == 2;
+ if (flag2)
+ {
+ gameObject.SetActive(true);
+ }
+ else
+ {
+ gameObject.SetActive(false);
+ }
+ IXUISprite ixuisprite = base.uiBehaviour.transform.Find("Bg/Tower/TowerBase/Floor/FirstBlood").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.SetVisible(false);
+ IXUISprite ixuisprite2 = base.uiBehaviour.transform.Find("Bg/Tower/TowerBase/Floor").GetComponent("XUISprite") as IXUISprite;
+ TeamTowerRewardTable.RowData rowData = teamTowerTable[0];
+ bool flag3 = curfloor >= 1;
+ if (flag3)
+ {
+ ixuisprite2.SetEnabled(false);
+ }
+ else
+ {
+ ixuisprite2.SetEnabled(true);
+ }
+ ixuisprite2 = (base.uiBehaviour.transform.Find("Bg/Tower/TowerBase/Floor1").GetComponent("XUISprite") as IXUISprite);
+ ixuisprite = (base.uiBehaviour.transform.Find("Bg/Tower/TowerBase/Floor1/FirstBlood").GetComponent("XUISprite") as IXUISprite);
+ ixuisprite.SetVisible(false);
+ rowData = teamTowerTable[1];
+ bool flag4 = curfloor >= 2;
+ if (flag4)
+ {
+ ixuisprite2.SetEnabled(false);
+ }
+ else
+ {
+ ixuisprite2.SetEnabled(true);
+ }
+ base.uiBehaviour.mTowerPool.ReturnAll(false);
+ for (int i = 0; i < num2; i++)
+ {
+ GameObject gameObject2 = base.uiBehaviour.mTowerPool.FetchGameObject(false);
+ Vector3 localPosition;
+ localPosition = new Vector3(base.uiBehaviour.mTowerPool.TplPos.x, base.uiBehaviour.mTowerPool.TplPos.y + (float)((base.uiBehaviour.mTowerPool.TplHeight - 60) * i), base.uiBehaviour.mTowerPool.TplPos.z);
+ gameObject2.transform.localPosition = localPosition;
+ rowData = teamTowerTable[(i + 1) * 2];
+ ixuilabel = (gameObject2.transform.Find("Floor").GetComponent("XUILabel") as IXUILabel);
+ ixuilabel.SetText(string.Format(XSingleton<XStringTable>.singleton.GetString("TEAMTOWER_LEVEL"), (i + 1) * 2 + 1));
+ ixuisprite2 = (gameObject2.transform.Find("Floor").GetComponent("XUISprite") as IXUISprite);
+ ixuisprite = (gameObject2.transform.Find("Floor/FirstBlood").GetComponent("XUISprite") as IXUISprite);
+ ixuisprite.SetVisible(false);
+ gameObject = gameObject2.transform.Find("Floor/Current/Normal/UI_hasd_gk").gameObject;
+ bool flag5 = this._doc.SingleTowerData.level + 1 == (i + 1) * 2 + 1;
+ if (flag5)
+ {
+ gameObject.SetActive(true);
+ }
+ else
+ {
+ gameObject.SetActive(false);
+ }
+ bool flag6 = curfloor >= (i + 1) * 2 + 1;
+ if (flag6)
+ {
+ ixuisprite2.SetEnabled(false);
+ }
+ else
+ {
+ ixuisprite2.SetEnabled(true);
+ }
+ ixuilabel = (gameObject2.transform.Find("Floor1").GetComponent("XUILabel") as IXUILabel);
+ ixuilabel.SetText(string.Format(XSingleton<XStringTable>.singleton.GetString("TEAMTOWER_LEVEL"), (i + 1) * 2 + 2));
+ ixuisprite = (gameObject2.transform.Find("Floor1/FirstBlood").GetComponent("XUISprite") as IXUISprite);
+ ixuisprite.SetVisible(false);
+ rowData = teamTowerTable[(i + 1) * 2 + 1];
+ ixuisprite2 = (gameObject2.transform.Find("Floor1").GetComponent("XUISprite") as IXUISprite);
+ bool flag7 = curfloor >= (i + 1) * 2 + 2;
+ if (flag7)
+ {
+ ixuisprite2.SetEnabled(false);
+ }
+ else
+ {
+ ixuisprite2.SetEnabled(true);
+ }
+ gameObject = gameObject2.transform.Find("Floor1/Current/Normal/UI_hasd_gk").gameObject;
+ bool flag8 = this._doc.SingleTowerData.level + 1 == (i + 1) * 2 + 2;
+ if (flag8)
+ {
+ gameObject.SetActive(true);
+ }
+ else
+ {
+ gameObject.SetActive(false);
+ }
+ }
+ base.uiBehaviour.mScroll.NeedRecalcBounds();
+ base.uiBehaviour.mScroll.SetPosition(1f - (float)curfloor * 1f / (float)num);
+ }
+
+ private bool OnGetReward(IXUIButton btn)
+ {
+ this._doc.GetSweepSingleTowerReward();
+ return true;
+ }
+
+ public void OnGotReward()
+ {
+ base.uiBehaviour.mSweepResult.SetVisible(false);
+ this._doc.GetSingleTowerActivityTop();
+ }
+
+ public void OnShowSweepResultFrame()
+ {
+ base.uiBehaviour.mSweepResult.SetVisible(true);
+ base.uiBehaviour.mRewardFx.SetVisible(false);
+ base.uiBehaviour.mEffect.SetActive(false);
+ this.OnRefreshResult();
+ }
+
+ public void OnHideSweepResultFrame()
+ {
+ base.uiBehaviour.mSweepResult.SetVisible(false);
+ }
+
+ private bool OnRefreshReward(IXUIButton btn)
+ {
+ base.uiBehaviour.mRewardRefresh.SetEnable(false, false);
+ base.uiBehaviour.mRewardGet.SetEnable(false, false);
+ this._doc.RefreshSingleSweepReward();
+ return true;
+ }
+
+ public void OnStartPlayRefreshResultEffect(ErrorCode code, int res)
+ {
+ bool flag = code > ErrorCode.ERR_SUCCESS;
+ if (flag)
+ {
+ base.uiBehaviour.mRewardRefresh.SetEnable(true, false);
+ base.uiBehaviour.mRewardGet.SetEnable(true, false);
+ }
+ else
+ {
+ this._effect_result = (float)res / 100f;
+ this._doc.SingleTowerData.refreshcount++;
+ bool flag2 = this._doc.SingleTowerData.refreshcount >= this._refresh_cost.Count;
+ if (flag2)
+ {
+ this._doc.SingleTowerData.refreshcount = this._refresh_cost.Count;
+ }
+ base.uiBehaviour.mRewardFx.SetVisible(true);
+ base.uiBehaviour.mEffect.SetActive(false);
+ base.uiBehaviour.mRewardFreeTime.SetText(string.Format("{0}/{1}", this._refresh_cost.Count - this._doc.SingleTowerData.refreshcount, this._refresh_cost.Count));
+ int index = (this._doc.SingleTowerData.refreshcount >= this._refresh_cost.Count) ? (this._refresh_cost.Count - 1) : this._doc.SingleTowerData.refreshcount;
+ bool flag3 = this._refresh_cost[index] == 0;
+ if (flag3)
+ {
+ base.uiBehaviour.mRewardFreeLabel.SetVisible(true);
+ base.uiBehaviour.mRewardMoneyNum.SetVisible(false);
+ }
+ else
+ {
+ base.uiBehaviour.mRewardFreeLabel.SetVisible(false);
+ base.uiBehaviour.mRewardMoneyNum.SetVisible(true);
+ base.uiBehaviour.mRewardMoneyNum.SetText(this._refresh_cost[index].ToString());
+ string itemSmallIcon = XBagDocument.GetItemSmallIcon(this._refresh_money[index], 0u);
+ base.uiBehaviour.mRewardMoneySign.SetSprite(itemSmallIcon);
+ }
+ this.state = ActivityTeamTowerSingleDlg.State.BEGIN;
+ this.timePass.LeftTime = 10f;
+ }
+ }
+
+ private int GetFrame(uint index)
+ {
+ bool flag = this.frames.Count <= 0;
+ int result;
+ if (flag)
+ {
+ result = 15;
+ }
+ else
+ {
+ bool flag2 = (long)this.frames.Count <= (long)((ulong)index);
+ if (flag2)
+ {
+ result = this.frames[this.frames.Count - 1];
+ }
+ else
+ {
+ result = this.frames[(int)index];
+ }
+ }
+ return result;
+ }
+
+ public void OnRefreshReverseCount()
+ {
+ this.OnRefreshSweepInfo();
+ }
+
+ public void RefreshAlpha()
+ {
+ int num = XSingleton<XCommon>.singleton.RandomInt(0, this._random_list.Count);
+ float num2 = this._random_list[num];
+ base.uiBehaviour.mRewardAlpha.SetText(string.Format("{0:F1}{1}", num2, XSingleton<XStringTable>.singleton.GetString("FOLD")));
+ base.uiBehaviour.mRewardAlpha.SetColor(XSingleton<UiUtility>.singleton.GetItemQualityColor(num));
+ }
+
+ private void PlayAlphaFinished()
+ {
+ base.uiBehaviour.mRewardAlpha.SetText(string.Format("{0:F1}{1}", this._effect_result, XSingleton<XStringTable>.singleton.GetString("FOLD")));
+ for (int i = 0; i < this._random_list.Count; i++)
+ {
+ bool flag = this._random_list[i] == this._effect_result;
+ if (flag)
+ {
+ base.uiBehaviour.mRewardAlpha.SetColor(XSingleton<UiUtility>.singleton.GetItemQualityColor(i));
+ }
+ }
+ base.uiBehaviour.mRewardFx.SetVisible(false);
+ this.OnInitReward(base.uiBehaviour.mRewardFramePool, this._effect_result);
+ base.uiBehaviour.mRewardRefresh.SetEnable(true, false);
+ base.uiBehaviour.mRewardGet.SetEnable(true, false);
+ base.uiBehaviour.mEffect.SetActive(true);
+ }
+
+ public void OnRefreshResult()
+ {
+ TeamTowerData singleTowerData = this._doc.SingleTowerData;
+ base.uiBehaviour.mRewardLevel.SetText(string.Format(XSingleton<XStringTable>.singleton.GetString("TEAMTOWER_REACH_LEVEL"), (singleTowerData.maxlevel == 0) ? 1 : singleTowerData.maxlevel));
+ base.uiBehaviour.mRewardAlpha.SetText(string.Format("{0:F1}{1}", 1, XSingleton<XStringTable>.singleton.GetString("FOLD")));
+ base.uiBehaviour.mRewardAlpha.SetColor(XSingleton<UiUtility>.singleton.GetItemQualityColor(0));
+ base.uiBehaviour.mRewardFreeTime.SetText(string.Format("{0}/{1}", this._refresh_cost.Count - this._doc.SingleTowerData.refreshcount, this._refresh_cost.Count));
+ int index = (this._doc.SingleTowerData.refreshcount >= this._refresh_cost.Count) ? (this._refresh_cost.Count - 1) : this._doc.SingleTowerData.refreshcount;
+ bool flag = this._refresh_cost[index] == 0;
+ if (flag)
+ {
+ base.uiBehaviour.mRewardFreeLabel.SetVisible(true);
+ base.uiBehaviour.mRewardMoneyNum.SetVisible(false);
+ }
+ else
+ {
+ base.uiBehaviour.mRewardFreeLabel.SetVisible(false);
+ base.uiBehaviour.mRewardMoneyNum.SetVisible(true);
+ base.uiBehaviour.mRewardMoneyNum.SetText(this._refresh_cost[index].ToString());
+ string itemSmallIcon = XBagDocument.GetItemSmallIcon(this._refresh_money[index], 0u);
+ base.uiBehaviour.mRewardMoneySign.SetSprite(itemSmallIcon);
+ }
+ this.OnInitReward(base.uiBehaviour.mRewardFramePool, 1f);
+ }
+
+ public override void OnUpdate()
+ {
+ bool flag = this.state == ActivityTeamTowerSingleDlg.State.BEGIN;
+ if (flag)
+ {
+ this._play_count = 0;
+ this._acc_time = 0;
+ this.timePass.LeftTime = 10f;
+ this.state = ActivityTeamTowerSingleDlg.State.PLAY;
+ }
+ else
+ {
+ bool flag2 = this.state == ActivityTeamTowerSingleDlg.State.PLAY;
+ if (flag2)
+ {
+ this.timePass.Update();
+ this._acc_time = (int)(this.timePass.PassTime * 1000f);
+ bool flag3 = this._acc_time > this.GetFrame((uint)this._play_count);
+ if (flag3)
+ {
+ this.timePass.LeftTime = 1f;
+ this._acc_time = 0;
+ this._play_count++;
+ this.RefreshAlpha();
+ bool flag4 = this._play_count >= this._all_count;
+ if (flag4)
+ {
+ this._play_count = 0;
+ this.state = ActivityTeamTowerSingleDlg.State.Idle;
+ }
+ }
+ }
+ else
+ {
+ bool flag5 = this.state == ActivityTeamTowerSingleDlg.State.Idle;
+ if (flag5)
+ {
+ this.state = ActivityTeamTowerSingleDlg.State.None;
+ this.PlayAlphaFinished();
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/ActivityTeamTowerSingleDlg.cs.meta b/Client/Assets/Scripts/XMainClient/UI/ActivityTeamTowerSingleDlg.cs.meta
new file mode 100644
index 00000000..04071263
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/ActivityTeamTowerSingleDlg.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 23b409d7477963b4cb71109512d8c3ea
+timeCreated: 1611403457
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/ActivityTeamTowerSingleDlgBehaviour.cs b/Client/Assets/Scripts/XMainClient/UI/ActivityTeamTowerSingleDlgBehaviour.cs
new file mode 100644
index 00000000..31c8ba84
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/ActivityTeamTowerSingleDlgBehaviour.cs
@@ -0,0 +1,185 @@
+using System;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class ActivityTeamTowerSingleDlgBehaviour : DlgBehaviourBase
+ {
+ public IXUILabel mStage;
+
+ public IXUILabel mResetNum;
+
+ public IXUILabel mCurrentTime;
+
+ public IXUIButton mMainClose;
+
+ public IXUIButton m_Help;
+
+ public IXUIButton mRank;
+
+ public IXUIButton mGoBattle;
+
+ public IXUILabel mDemandFP;
+
+ public IXUIButton mSweepBtn;
+
+ public IXUIButton mResetBtn;
+
+ public IXUILabel mSweepLabel;
+
+ public IXUIButton mBackClick;
+
+ public IXUISprite mSweepResult;
+
+ public IXUIScrollView mScroll;
+
+ public IXUILabel mResetCount;
+
+ public IXUISprite mResetSprite;
+
+ public IXUISprite mSweepFrame;
+
+ public IXUILabel mSweepedLevel;
+
+ public IXUILabel mSweepEstimateTime;
+
+ public IXUIButton mSingleDoSweep;
+
+ public IXUIButton mDoubleSweep;
+
+ public IXUIButton mDoubleDoSweep;
+
+ public IXUIButton mCloseSweep;
+
+ public IXUISprite mSingleMoneySign;
+
+ public IXUILabel mSingleMoneyNum;
+
+ public IXUISprite mDoubleMoneySign;
+
+ public IXUILabel mDoubleMoneyNum;
+
+ public XUIPool mRewardPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ public XUIPool mMainRewardPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ public XUIPool mTowerPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ public IXUILabel mRewardLevel;
+
+ public IXUILabel mRewardAlpha;
+
+ public IXUILabel mRewardFreeTime;
+
+ public IXUIButton mRewardRefresh;
+
+ public IXUIButton mRewardGet;
+
+ public IXUISprite mRewardFx;
+
+ public IXUILabel mRewardMoneyNum;
+
+ public IXUISprite mRewardMoneySign;
+
+ public IXUILabel mRewardFreeLabel;
+
+ public GameObject mEffect;
+
+ public IXUIButton mFirstPassBtn;
+
+ public IXUISprite mFirstPassRedPoint;
+
+ public IXUILabel mFirstPassLevel;
+
+ public IXUISprite mFirstPassPanel;
+
+ public IXUIButton mFirstPassGetReward;
+
+ public IXUISprite mFIrstPassCheck;
+
+ public IXUIButton mFirstPassCheckReward;
+
+ public IXUISprite mFirstPassGet;
+
+ public IXUILabel mFirstPassPlsThrough;
+
+ public IXUILabel mFirstPassCongraThrough;
+
+ public IXUISprite mFirstPassBackClick;
+
+ public IXUITweenTool mFirstPassPlayTween;
+
+ public XUIPool mRewardFramePool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ public XUIPool mFirstPassReward = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ private void Awake()
+ {
+ this.m_Help = (base.transform.Find("Bg/Help").GetComponent("XUIButton") as IXUIButton);
+ this.mCurrentTime = (base.transform.Find("Bg/times").GetComponent("XUILabel") as IXUILabel);
+ this.mSweepBtn = (base.transform.Find("Bg/SweepBtn").GetComponent("XUIButton") as IXUIButton);
+ this.mResetBtn = (base.transform.Find("Bg/Reset").GetComponent("XUIButton") as IXUIButton);
+ this.mSweepLabel = (base.transform.Find("Bg/SweepInfo").GetComponent("XUILabel") as IXUILabel);
+ this.mSweepFrame = (base.transform.Find("Bg/SweepFrame").GetComponent("XUISprite") as IXUISprite);
+ this.mResetCount = (base.transform.Find("Bg/Reset/Number/Num").GetComponent("XUILabel") as IXUILabel);
+ this.mResetSprite = (base.transform.Find("Bg/Reset/Number").GetComponent("XUISprite") as IXUISprite);
+ this.mStage = (base.transform.Find("Bg/Stagepanel/Stage").GetComponent("XUILabel") as IXUILabel);
+ this.mResetNum = (base.transform.Find("Bg/times").GetComponent("XUILabel") as IXUILabel);
+ this.mMainClose = (base.transform.Find("Bg/Close").GetComponent("XUIButton") as IXUIButton);
+ this.mRank = (base.transform.Find("Bg/Rank").GetComponent("XUIButton") as IXUIButton);
+ this.mGoBattle = (base.transform.Find("Bg/GoBattle").GetComponent("XUIButton") as IXUIButton);
+ this.mScroll = (base.transform.Find("Bg/Tower").GetComponent("XUIScrollView") as IXUIScrollView);
+ this.mDemandFP = (base.transform.Find("Bg/Stagepanel/Reward/fp").GetComponent("XUILabel") as IXUILabel);
+ this.mSweepedLevel = (base.transform.Find("Bg/SweepFrame/SweepLevel").GetComponent("XUILabel") as IXUILabel);
+ this.mSweepEstimateTime = (base.transform.Find("Bg/SweepFrame/SweepTime").GetComponent("XUILabel") as IXUILabel);
+ this.mSingleDoSweep = (base.transform.Find("Bg/SweepFrame/SweepBtnNow").GetComponent("XUIButton") as IXUIButton);
+ this.mDoubleSweep = (base.transform.Find("Bg/SweepFrame/SweepBtnNormal").GetComponent("XUIButton") as IXUIButton);
+ this.mDoubleDoSweep = (base.transform.Find("Bg/SweepFrame/SweepBtnQuick").GetComponent("XUIButton") as IXUIButton);
+ this.mCloseSweep = (base.transform.Find("Bg/SweepFrame/Close").GetComponent("XUIButton") as IXUIButton);
+ this.mBackClick = (base.transform.Find("Bg/SweepFrame/backclick").GetComponent("XUIButton") as IXUIButton);
+ this.mSingleMoneySign = (base.transform.Find("Bg/SweepFrame/SweepBtnNow/moneysign").GetComponent("XUISprite") as IXUISprite);
+ this.mSingleMoneyNum = (base.transform.Find("Bg/SweepFrame/SweepBtnNow/moneynum").GetComponent("XUILabel") as IXUILabel);
+ this.mDoubleMoneySign = (base.transform.Find("Bg/SweepFrame/SweepBtnQuick/moneysign").GetComponent("XUISprite") as IXUISprite);
+ this.mDoubleMoneyNum = (base.transform.Find("Bg/SweepFrame/SweepBtnQuick/moneynum").GetComponent("XUILabel") as IXUILabel);
+ this.mRewardPool.SetupPool(base.transform.Find("Bg/SweepFrame/Grid").gameObject, base.transform.Find("Bg/SweepFrame/Grid/ItemTpl").gameObject, 2u, false);
+ this.mTowerPool.SetupPool(base.transform.Find("Bg/Tower").gameObject, base.transform.Find("Bg/Tower/Towerrepeat").gameObject, 5u, false);
+ this.mMainRewardPool.SetupPool(base.transform.Find("Bg/Stagepanel").gameObject, base.transform.Find("Bg/Stagepanel/Item").gameObject, 2u, false);
+ this.mSweepResult = (base.transform.Find("Bg/SweepResult").GetComponent("XUISprite") as IXUISprite);
+ this.mRewardLevel = (base.transform.Find("Bg/SweepResult/Result").GetComponent("XUILabel") as IXUILabel);
+ this.mRewardAlpha = (base.transform.Find("Bg/SweepResult/Buff/Time").GetComponent("XUILabel") as IXUILabel);
+ this.mRewardFreeTime = (base.transform.Find("Bg/SweepResult/Refresh/Time").GetComponent("XUILabel") as IXUILabel);
+ this.mRewardRefresh = (base.transform.Find("Bg/SweepResult/Refresh").GetComponent("XUIButton") as IXUIButton);
+ this.mRewardGet = (base.transform.Find("Bg/SweepResult/GetReward").GetComponent("XUIButton") as IXUIButton);
+ this.mRewardFx = (base.transform.Find("Bg/SweepResult/Buff/Fx").GetComponent("XUISprite") as IXUISprite);
+ this.mRewardMoneyNum = (base.transform.Find("Bg/SweepResult/Refresh/moneynum").GetComponent("XUILabel") as IXUILabel);
+ this.mRewardMoneySign = (base.transform.Find("Bg/SweepResult/Refresh/moneynum/moneysign").GetComponent("XUISprite") as IXUISprite);
+ this.mRewardFreeLabel = (base.transform.Find("Bg/SweepResult/Refresh/moneyfree").GetComponent("XUILabel") as IXUILabel);
+ this.mRewardFramePool.SetupPool(base.transform.Find("Bg/SweepResult").gameObject, base.transform.Find("Bg/SweepResult/Item").gameObject, 2u, false);
+ Transform transform = base.transform.Find("Bg/SweepResult/Buff/Time/UI_heianshendian/UI_heianshendian/kuosan_00");
+ this.mEffect = base.transform.Find("Bg/SweepResult/Buff/Time/UI_heianshendian/UI_heianshendian").gameObject;
+ this.mFirstPassBtn = (base.transform.Find("Bg/FirstBlood").GetComponent("XUIButton") as IXUIButton);
+ this.mFirstPassRedPoint = (base.transform.Find("Bg/FirstBlood/RedPoint").GetComponent("XUISprite") as IXUISprite);
+ this.mFirstPassLevel = (base.transform.Find("Bg/FirstBlood/StageNum/Num").GetComponent("XUILabel") as IXUILabel);
+ this.mFirstPassPanel = (base.transform.Find("Bg/FirstReward").GetComponent("XUISprite") as IXUISprite);
+ this.mFirstPassGetReward = (base.transform.Find("Bg/FirstReward/GetReward/BtnReward").GetComponent("XUIButton") as IXUIButton);
+ this.mFirstPassCheckReward = (base.transform.Find("Bg/FirstReward/CheckReward/BtnReward").GetComponent("XUIButton") as IXUIButton);
+ this.mFIrstPassCheck = (base.transform.Find("Bg/FirstReward/CheckReward").GetComponent("XUISprite") as IXUISprite);
+ this.mFirstPassGet = (base.transform.Find("Bg/FirstReward/GetReward").GetComponent("XUISprite") as IXUISprite);
+ this.mFirstPassPlsThrough = (base.transform.Find("Bg/FirstReward/CheckReward/Result").GetComponent("XUILabel") as IXUILabel);
+ this.mFirstPassCongraThrough = (base.transform.Find("Bg/FirstReward/GetReward/Result").GetComponent("XUILabel") as IXUILabel);
+ this.mFirstPassBackClick = (base.transform.Find("Bg/FirstReward/backclick").GetComponent("XUISprite") as IXUISprite);
+ this.mFirstPassPlayTween = (base.transform.Find("Bg/FirstBlood/Box").GetComponent("XUIPlayTween") as IXUITweenTool);
+ this.mFirstPassReward.SetupPool(base.transform.Find("Bg/FirstReward").gameObject, base.transform.Find("Bg/FirstReward/Item").gameObject, 3u, false);
+ }
+
+ private void OnApplicationPause(bool pause)
+ {
+ XSingleton<XDebug>.singleton.AddLog("OnApplicationPause:", pause.ToString(), null, null, null, null, XDebugColor.XDebug_None);
+ XExpeditionDocument specificDocument = XDocuments.GetSpecificDocument<XExpeditionDocument>(XExpeditionDocument.uuID);
+ specificDocument.OnAppPaused();
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/ActivityTeamTowerSingleDlgBehaviour.cs.meta b/Client/Assets/Scripts/XMainClient/UI/ActivityTeamTowerSingleDlgBehaviour.cs.meta
new file mode 100644
index 00000000..98bb881e
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/ActivityTeamTowerSingleDlgBehaviour.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 351334df75378fd4d8b4d3a2117035f5
+timeCreated: 1611403557
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/ActivityWeekendPartyView.cs b/Client/Assets/Scripts/XMainClient/UI/ActivityWeekendPartyView.cs
new file mode 100644
index 00000000..5f706781
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/ActivityWeekendPartyView.cs
@@ -0,0 +1,174 @@
+using System;
+using KKSG;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class ActivityWeekendPartyView : DlgBase<ActivityWeekendPartyView, ActivityWeekendPartyBehaviour>
+ {
+ public override string fileName
+ {
+ get
+ {
+ return "GameSystem/WeekendPartyDlg";
+ }
+ }
+
+ public override int layer
+ {
+ get
+ {
+ return 1;
+ }
+ }
+
+ public override bool pushstack
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override bool fullscreenui
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override bool hideMainMenu
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override bool autoload
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ private XWeekendPartyDocument _Doc;
+
+ private uint sceneID = 0u;
+
+ protected override void Init()
+ {
+ base.Init();
+ this._Doc = XDocuments.GetSpecificDocument<XWeekendPartyDocument>(XWeekendPartyDocument.uuID);
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ this._Doc.ReqWeekendPartInfo();
+ this.RefreshMatchBtn();
+ base.uiBehaviour.m_TimeTip.SetText(XSingleton<XStringTable>.singleton.GetString("WeekendPartyTimeTip"));
+ }
+
+ public void RefreshActivityInfo(WeekEnd4v4GetInfoRes oRes)
+ {
+ bool flag = !base.IsVisible();
+ if (!flag)
+ {
+ WeekEnd4v4List.RowData activityInfo = this._Doc.GetActivityInfo(oRes.thisActivityID);
+ bool flag2 = activityInfo != null;
+ if (flag2)
+ {
+ this.sceneID = activityInfo.SceneID;
+ base.uiBehaviour.m_CurrActName.SetText(activityInfo.Name);
+ base.uiBehaviour.m_Rule.SetText(XSingleton<UiUtility>.singleton.ReplaceReturn(activityInfo.Rule));
+ base.uiBehaviour.m_Bg.SetTexturePath(activityInfo.TexturePath);
+ base.uiBehaviour.m_Times.SetText(string.Format("{0}/{1}", (activityInfo.RewardTimes > oRes.joinCount) ? (activityInfo.RewardTimes - oRes.joinCount) : 0u, activityInfo.RewardTimes));
+ base.uiBehaviour.m_DropAwardPool.FakeReturnAll();
+ for (int i = 0; i < activityInfo.DropItems.Count; i++)
+ {
+ GameObject gameObject = base.uiBehaviour.m_DropAwardPool.FetchGameObject(false);
+ gameObject.transform.parent = base.uiBehaviour.m_DropAward.gameObject.transform;
+ gameObject.transform.localScale = Vector3.one;
+ this.FillAwardItem(gameObject, activityInfo.DropItems[i, 0], activityInfo.DropItems[i, 1]);
+ }
+ base.uiBehaviour.m_DropAwardPool.ActualReturnAll(true);
+ base.uiBehaviour.m_DropAward.Refresh();
+ }
+ }
+ }
+
+ private void FillAwardItem(GameObject item, uint id, uint count)
+ {
+ XSingleton<XItemDrawerMgr>.singleton.normalItemDrawer.DrawItem(item, (int)id, (int)count, false);
+ IXUISprite ixuisprite = item.transform.Find("Icon").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.ID = (ulong)id;
+ ixuisprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(XSingleton<UiUtility>.singleton.OnItemClick));
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ base.uiBehaviour.m_Close.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnCloseClick));
+ base.uiBehaviour.m_SingleMatch.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnSingleMatchClick));
+ base.uiBehaviour.m_TeamMatch.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnTeamMatchClick));
+ base.uiBehaviour.m_Help.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnHelpBtnClick));
+ }
+
+ protected override void OnHide()
+ {
+ base.uiBehaviour.m_Bg.SetTexturePath("");
+ }
+
+ private bool OnCloseClick(IXUIButton button)
+ {
+ this.SetVisibleWithAnimation(false, null);
+ return true;
+ }
+
+ private bool OnHelpBtnClick(IXUIButton btn)
+ {
+ DlgBase<XCommonHelpTipView, XCommonHelpTipBehaviour>.singleton.ShowHelp(XSysDefine.XSys_MulActivity_WeekendParty);
+ return true;
+ }
+
+ private bool OnSingleMatchClick(IXUIButton btn)
+ {
+ XTeamDocument specificDocument = XDocuments.GetSpecificDocument<XTeamDocument>(XTeamDocument.uuID);
+ bool bInTeam = specificDocument.bInTeam;
+ bool result;
+ if (bInTeam)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString("CAPTAIN_SINGLE_MATCH_TIP"), "fece00");
+ result = false;
+ }
+ else
+ {
+ KMatchOp op = (specificDocument.SoloMatchType != KMatchType.KMT_WEEKEND_ACT) ? KMatchOp.KMATCH_OP_START : KMatchOp.KMATCH_OP_STOP;
+ specificDocument.ReqMatchStateChange(KMatchType.KMT_WEEKEND_ACT, op, false);
+ result = true;
+ }
+ return result;
+ }
+
+ public void RefreshMatchBtn()
+ {
+ XTeamDocument specificDocument = XDocuments.GetSpecificDocument<XTeamDocument>(XTeamDocument.uuID);
+ base.uiBehaviour.m_SingleMatchLabel.SetText((specificDocument.SoloMatchType == KMatchType.KMT_WEEKEND_ACT) ? string.Format("{0}...", XStringDefineProxy.GetString("MATCHING")) : XStringDefineProxy.GetString("CAPTAINPVP_SINGLE"));
+ base.uiBehaviour.m_TeamMatch.SetEnable(specificDocument.SoloMatchType != KMatchType.KMT_WEEKEND_ACT, false);
+ }
+
+ private bool OnTeamMatchClick(IXUIButton btn)
+ {
+ this.SetVisible(false, true);
+ XTeamDocument specificDocument = XDocuments.GetSpecificDocument<XTeamDocument>(XTeamDocument.uuID);
+ specificDocument.SetAndMatch((int)this.sceneID);
+ return true;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/ActivityWeekendPartyView.cs.meta b/Client/Assets/Scripts/XMainClient/UI/ActivityWeekendPartyView.cs.meta
new file mode 100644
index 00000000..41dc79b7
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/ActivityWeekendPartyView.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: a09d6b21027a25747bb45dfc014e6e88
+timeCreated: 1611404250
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/AncientHandler.cs b/Client/Assets/Scripts/XMainClient/UI/AncientHandler.cs
new file mode 100644
index 00000000..3fdd3e25
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/AncientHandler.cs
@@ -0,0 +1,279 @@
+using System;
+using System.Collections.Generic;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class AncientHandler : DlgHandlerBase
+ {
+ protected override string FileName
+ {
+ get
+ {
+ return "OperatingActivity/AncientActivityMain";
+ }
+ }
+
+ private const int cnt = 4;
+
+ private uint present;
+
+ private IXUIProgress m_prograss;
+
+ public IXUIButton m_btn;
+
+ public IXUISprite m_sprRBg;
+
+ public IXUILabel m_lblPoint;
+
+ public IXUILabel m_bldesc;
+
+ private XDummy m_Dummy;
+
+ private IUIDummy m_Snapshot;
+
+ public IXUILabel m_lblName;
+
+ public IXUILabel m_lblTime;
+
+ private IXUISprite m_sprEnd;
+
+ private IXUISprite m_sprEndRed;
+
+ private IXUISprite[] chests = new IXUISprite[4];
+
+ private Transform[] reds = new Transform[4];
+
+ private Transform[] chests2 = new Transform[4];
+
+ private IXUIWrapContent m_wrap;
+
+ private IXUIScrollView m_scroll;
+
+ private List<BigPrizeNode> list;
+
+ private int maxPoint = 0;
+
+ private int itemid = 0;
+
+ protected override void Init()
+ {
+ base.Init();
+ this.present = (uint)XSingleton<XGlobalConfig>.singleton.GetInt("BigPrizeUid");
+ this.maxPoint = XSingleton<XGlobalConfig>.singleton.GetInt("BigPrizeMax");
+ this.itemid = XSingleton<XGlobalConfig>.singleton.GetInt("BigPrizeItemid");
+ this.m_bldesc = (base.transform.Find("Main/UpView/t").GetComponent("XUILabel") as IXUILabel);
+ this.m_sprEnd = (base.transform.Find("Main/UpView/Progress/end").GetComponent("XUISprite") as IXUISprite);
+ this.m_sprEndRed = (this.m_sprEnd.transform.Find("RedPoint").GetComponent("XUISprite") as IXUISprite);
+ this.m_Snapshot = (base.transform.Find("Main/snapshot").GetComponent("UIDummy") as IUIDummy);
+ this.m_lblName = (base.transform.Find("Main/endreward").GetComponent("XUILabel") as IXUILabel);
+ this.m_lblTime = (base.transform.Find("Main/t").GetComponent("XUILabel") as IXUILabel);
+ this.m_prograss = (base.transform.Find("Main/UpView/Progress").GetComponent("XUIProgress") as IXUIProgress);
+ this.m_sprRBg = (base.transform.Find("Main/snapshot/Bg").GetComponent("XUISprite") as IXUISprite);
+ this.m_btn = (base.transform.Find("Main/Btn").GetComponent("XUIButton") as IXUIButton);
+ this.m_lblPoint = (base.transform.Find("Main/UpView/dian").GetComponent("XUILabel") as IXUILabel);
+ this.m_scroll = (base.transform.Find("Main/RightView").GetComponent("XUIScrollView") as IXUIScrollView);
+ this.m_wrap = (base.transform.Find("Main/RightView/wrap").GetComponent("XUIWrapContent") as IXUIWrapContent);
+ int i = 0;
+ int num = this.chests.Length;
+ while (i < num)
+ {
+ this.chests[i] = (base.transform.Find("Main/UpView/Progress/Chests/Chest" + i).GetComponent("XUISprite") as IXUISprite);
+ this.chests2[i] = base.transform.Find("Main/UpView/Progress/Chests/Chest_" + i);
+ this.reds[i] = this.chests[i].gameObject.transform.Find("RedPoint");
+ i++;
+ }
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ this.m_sprRBg.RegisterSpriteDragEventHandler(new SpriteDragEventHandler(this.OnAvatarDrag));
+ this.m_btn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnTaskBtnclick));
+ this.m_wrap.RegisterItemUpdateEventHandler(new WrapItemUpdateEventHandler(this.UpdateItem));
+ int i = 0;
+ int num = this.chests.Length;
+ while (i < num)
+ {
+ this.chests[i].ID = (ulong)((long)i);
+ this.chests[i].RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnChestClick));
+ i++;
+ }
+ this.m_sprEnd.ID = (ulong)((long)this.chests.Length);
+ this.m_sprEnd.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnChestClick));
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ this.m_lblName.SetText(XStringDefineProxy.GetString("AncientName"));
+ this.m_lblTime.SetText(XStringDefineProxy.GetString("AncientTime"));
+ this.m_bldesc.SetText(XStringDefineProxy.GetString("AncientNamber"));
+ this.RefreshList();
+ base.Alloc3DAvatarPool("BigPrizeHandler", 1);
+ this.m_Dummy = XSingleton<X3DAvatarMgr>.singleton.CreateCommonEntityDummy(this.m_dummPool, this.present, this.m_Snapshot, this.m_Dummy, 1f);
+ }
+
+ public void RefreshList()
+ {
+ XAncientDocument specificDocument = XDocuments.GetSpecificDocument<XAncientDocument>(XAncientDocument.uuID);
+ this.list = specificDocument.GetSortTask();
+ this.m_scroll.ResetPosition();
+ this.m_wrap.SetContentCount(this.list.Count, false);
+ this.itemid = XSingleton<XGlobalConfig>.singleton.GetInt("BigPrizeItemid");
+ XItem xitem = XBagDocument.MakeXItem(this.itemid, false);
+ int num = 0;
+ bool flag = xitem != null;
+ if (flag)
+ {
+ num = xitem.itemCount;
+ }
+ this.m_lblPoint.SetText(num + "/" + this.maxPoint);
+ this.m_prograss.value = (float)num / (float)this.maxPoint;
+ this.RefreshChest();
+ }
+
+ public override void StackRefresh()
+ {
+ base.StackRefresh();
+ this.RefreshList();
+ XAncientDocument specificDocument = XDocuments.GetSpecificDocument<XAncientDocument>(XAncientDocument.uuID);
+ specificDocument.CheckRed();
+ base.Alloc3DAvatarPool("CarnivalRwdHander", 1);
+ this.m_Dummy = XSingleton<X3DAvatarMgr>.singleton.CreateCommonEntityDummy(this.m_dummPool, this.present, this.m_Snapshot, this.m_Dummy, 1f);
+ }
+
+ public override void LeaveStackTop()
+ {
+ base.LeaveStackTop();
+ XSingleton<X3DAvatarMgr>.singleton.DestroyDummy(this.m_dummPool, this.m_Dummy);
+ this.m_Dummy = null;
+ }
+
+ protected override void OnHide()
+ {
+ base.Return3DAvatarPool();
+ this.m_Dummy = null;
+ base.OnHide();
+ }
+
+ public override void OnUnload()
+ {
+ base.Return3DAvatarPool();
+ this.m_Dummy = null;
+ base.OnUnload();
+ }
+
+ protected bool OnAvatarDrag(Vector2 delta)
+ {
+ bool flag = this.m_Dummy != null;
+ if (flag)
+ {
+ this.m_Dummy.EngineObject.Rotate(Vector3.up, -delta.x / 2f);
+ }
+ return true;
+ }
+
+ public void RefreshChest()
+ {
+ XAncientDocument specificDocument = XDocuments.GetSpecificDocument<XAncientDocument>(XAncientDocument.uuID);
+ bool flag = specificDocument.state != null;
+ if (flag)
+ {
+ int i = 0;
+ int num = this.chests.Length;
+ while (i < num)
+ {
+ bool flag2 = specificDocument.state[i];
+ bool active = !flag2 && specificDocument.PointEnough(i);
+ this.reds[i].gameObject.SetActive(active);
+ this.chests2[i].gameObject.SetActive(flag2);
+ this.chests[i].SetAlpha((float)(flag2 ? 0 : 1));
+ i++;
+ }
+ int num2 = this.chests.Length;
+ bool visible = !specificDocument.state[num2] && specificDocument.PointEnough(num2);
+ this.m_sprEndRed.SetVisible(visible);
+ }
+ }
+
+ private void OnChestClick(IXUISprite spr)
+ {
+ int i = 0;
+ int num = XAncientDocument.ancientTable.Table.Length;
+ while (i < num)
+ {
+ AncientTimesTable.RowData rowData = XAncientDocument.ancientTable.Table[i];
+ bool flag = rowData.ID == (uint)spr.ID + 1u;
+ if (flag)
+ {
+ DlgBase<AncientBox, AnicientBoxBahaviour>.singleton.Show(rowData);
+ break;
+ }
+ i++;
+ }
+ }
+
+ private bool OnTaskBtnclick(IXUIButton btn)
+ {
+ bool flag = !DlgBase<AncientTaskView, AnicentTaskBhaviour>.singleton.IsVisible();
+ if (flag)
+ {
+ DlgBase<AncientTaskView, AnicentTaskBhaviour>.singleton.SetVisible(true, true);
+ }
+ return true;
+ }
+
+ private void UpdateItem(Transform t, int index)
+ {
+ bool flag = index < this.list.Count;
+ if (flag)
+ {
+ IXUIButton ixuibutton = t.Find("Go").GetComponent("XUIButton") as IXUIButton;
+ IXUILabel ixuilabel = t.Find("Name").GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel2 = t.Find("Description").GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel3 = t.Find("Progress").GetComponent("XUILabel") as IXUILabel;
+ IXUISprite ixuisprite = t.Find("Finish").GetComponent("XUISprite") as IXUISprite;
+ uint state = this.list[index].state;
+ ixuilabel.SetText(this.list[index].row.title);
+ ixuilabel3.SetText(string.Format("{0}/{1}", this.list[index].progress, this.list[index].row.cnt));
+ ixuisprite.SetVisible(state == 2u);
+ ixuibutton.ID = (ulong)((long)index);
+ this.SetBtn(ixuibutton, (ActivityTaskState)state);
+ ixuilabel2.SetText(XStringDefineProxy.GetString("AncientDes", new object[]
+ {
+ this.list[index].row.items[0, 1]
+ }));
+ }
+ }
+
+ private void SetBtn(IXUIButton btn, ActivityTaskState state)
+ {
+ btn.SetVisible(state != ActivityTaskState.Fetched);
+ IXUILabel ixuilabel = btn.gameObject.transform.Find("Text").GetComponent("XUILabel") as IXUILabel;
+ IXUISprite ixuisprite = btn.gameObject.transform.Find("RedPoint").GetComponent("XUISprite") as IXUISprite;
+ ixuilabel.SetText((state == ActivityTaskState.Uncomplete) ? XStringDefineProxy.GetString("PVPActivity_Go") : XStringDefineProxy.GetString("SRS_FETCH"));
+ ixuisprite.SetVisible(state == ActivityTaskState.Complete);
+ btn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnItemBtnClick));
+ }
+
+ private bool OnItemBtnClick(IXUIButton btn)
+ {
+ BigPrizeNode bigPrizeNode = this.list[(int)btn.ID];
+ bool flag = bigPrizeNode.state == 0u;
+ if (flag)
+ {
+ XSingleton<XGameSysMgr>.singleton.OpenSystem((int)bigPrizeNode.row.jump);
+ }
+ else
+ {
+ XAncientDocument specificDocument = XDocuments.GetSpecificDocument<XAncientDocument>(XAncientDocument.uuID);
+ specificDocument.ReqClaim(bigPrizeNode.taskid);
+ }
+ return true;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/AncientHandler.cs.meta b/Client/Assets/Scripts/XMainClient/UI/AncientHandler.cs.meta
new file mode 100644
index 00000000..2ac951c4
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/AncientHandler.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 7035e02118c81ca45b9589e0d428723e
+timeCreated: 1611403931
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/AnnounceView.cs b/Client/Assets/Scripts/XMainClient/UI/AnnounceView.cs
new file mode 100644
index 00000000..210cc59e
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/AnnounceView.cs
@@ -0,0 +1,122 @@
+using System;
+using System.Text;
+using UILib;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class AnnounceView : DlgBase<AnnounceView, AnnounceBehaviour>
+ {
+ public override string fileName
+ {
+ get
+ {
+ return "GameSystem/ForeshowDlg";
+ }
+ }
+
+ public override bool autoload
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override bool hideMainMenu
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override bool pushstack
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override bool isHideTutorial
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ protected override void OnLoad()
+ {
+ base.OnLoad();
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ base.uiBehaviour.m_closedSpr.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnClickClosedSpr));
+ }
+
+ protected override void OnUnload()
+ {
+ base.OnUnload();
+ }
+
+ protected override void Init()
+ {
+ base.Init();
+ }
+
+ protected override void OnHide()
+ {
+ base.OnHide();
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ this.FillContent();
+ }
+
+ public void RefreshUI()
+ {
+ this.FillContent();
+ }
+
+ private void FillContent()
+ {
+ bool flag = base.uiBehaviour.m_playerTween != null;
+ if (flag)
+ {
+ base.uiBehaviour.m_playerTween.ResetTween(true);
+ base.uiBehaviour.m_playerTween.PlayTween(true, -1f);
+ }
+ SystemAnnounce.RowData sysAnnounceData = XSingleton<XGameSysMgr>.singleton.GetSysAnnounceData(XSingleton<XAttributeMgr>.singleton.XPlayerData.Level);
+ bool flag2 = sysAnnounceData == null;
+ if (!flag2)
+ {
+ base.uiBehaviour.m_iconSpr.SetSprite(sysAnnounceData.IconName);
+ base.uiBehaviour.m_nameLab.SetText(sysAnnounceData.SystemDescription);
+ base.uiBehaviour.m_levelLab.SetText(string.Format(XSingleton<XStringTable>.singleton.GetString("SKILL_LEARN"), sysAnnounceData.OpenAnnounceLevel));
+ StringBuilder stringBuilder = new StringBuilder();
+ for (int i = 0; i < sysAnnounceData.AnnounceDesc.Length; i++)
+ {
+ stringBuilder.Append(sysAnnounceData.AnnounceDesc[i]);
+ bool flag3 = i != sysAnnounceData.AnnounceDesc.Length - 1;
+ if (flag3)
+ {
+ stringBuilder.Append("{n}");
+ }
+ }
+ base.uiBehaviour.m_describeLab.SetText(XSingleton<UiUtility>.singleton.ReplaceReturn(stringBuilder.ToString()));
+ }
+ }
+
+ protected void OnClickClosedSpr(IXUISprite sp)
+ {
+ this.SetVisible(false, true);
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/AnnounceView.cs.meta b/Client/Assets/Scripts/XMainClient/UI/AnnounceView.cs.meta
new file mode 100644
index 00000000..3e31faa2
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/AnnounceView.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 7552b31422f96fa44bc29492c5cbc0ea
+timeCreated: 1611403946
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/AnnouncementHandler.cs b/Client/Assets/Scripts/XMainClient/UI/AnnouncementHandler.cs
new file mode 100644
index 00000000..60d906cf
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/AnnouncementHandler.cs
@@ -0,0 +1,254 @@
+using System;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class AnnouncementHandler : DlgHandlerBase
+ {
+ protected override string FileName
+ {
+ get
+ {
+ return "OperatingActivity/ActivityAnnouncement";
+ }
+ }
+
+ private XAnnouncementDocument _doc;
+
+ private IXUITable m_Table;
+
+ private XUIPool m_NoticePool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ private XUIPool m_ActivityPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ private XUIPool m_TabPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ private GameObject _last_notice = null;
+
+ protected override void Init()
+ {
+ this._doc = XDocuments.GetSpecificDocument<XAnnouncementDocument>(XAnnouncementDocument.uuID);
+ base.Init();
+ this.m_Table = (base.PanelObject.transform.Find("ScrollView/Table").GetComponent("XUITable") as IXUITable);
+ Transform transform = base.PanelObject.transform.Find("ScrollView/Table/NoticeTpl");
+ this.m_NoticePool.SetupPool(transform.parent.gameObject, transform.gameObject, 5u, false);
+ transform = base.PanelObject.transform.Find("ScrollView/Table/ActivityTpl");
+ this.m_ActivityPool.SetupPool(transform.parent.gameObject, transform.gameObject, 5u, false);
+ transform = base.PanelObject.transform.Find("Tabs/TabTpl");
+ this.m_TabPool.SetupPool(transform.parent.gameObject, transform.gameObject, 2u, false);
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ this._doc.CurrentTab = 0;
+ this._doc.SendFetchNotice();
+ this.RefreshData();
+ }
+
+ protected override void OnHide()
+ {
+ base.OnHide();
+ XSingleton<UiUtility>.singleton.DestroyTextureInActivePool(this.m_NoticePool, "ChildList/LevelTwoTpl/Texture");
+ }
+
+ public override void RefreshData()
+ {
+ base.RefreshData();
+ this.RefreshTab();
+ int currentTab = this._doc.CurrentTab;
+ if (currentTab != 0)
+ {
+ if (currentTab == 1)
+ {
+ this.RefreshNoticeList();
+ }
+ }
+ else
+ {
+ this.RefreshActivityList();
+ }
+ this._last_notice = null;
+ }
+
+ public void RefreshTab()
+ {
+ this.m_TabPool.ReturnAll(false);
+ for (int i = 0; i < 2; i++)
+ {
+ GameObject gameObject = this.m_TabPool.FetchGameObject(false);
+ IXUILabel ixuilabel = gameObject.transform.Find("Bg/TextLabel").GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel2 = gameObject.transform.Find("Bg/SelectedTextLabel").GetComponent("XUILabel") as IXUILabel;
+ Transform transform = gameObject.transform.Find("Bg/RedPoint");
+ IXUICheckBox ixuicheckBox = gameObject.transform.Find("Bg").GetComponent("XUICheckBox") as IXUICheckBox;
+ ixuilabel.SetText(XStringDefineProxy.GetString(string.Format("AnnouncementTab{0}", i)));
+ ixuilabel2.SetText(XStringDefineProxy.GetString(string.Format("AnnouncementTab{0}", i)));
+ transform.gameObject.SetActive(this._doc.GetTabRedPoint(i));
+ ixuicheckBox.ForceSetFlag(i == this._doc.CurrentTab);
+ ixuicheckBox.ID = (ulong)((long)i);
+ ixuicheckBox.RegisterOnCheckEventHandler(new CheckBoxOnCheckEventHandler(this.OnTabClicked));
+ gameObject.transform.localPosition = this.m_TabPool.TplPos + new Vector3((float)(i * this.m_TabPool.TplWidth), 0f);
+ }
+ }
+
+ private bool OnTabClicked(IXUICheckBox checkbox)
+ {
+ bool bChecked = checkbox.bChecked;
+ if (bChecked)
+ {
+ this._doc.CurrentTab = (int)checkbox.ID;
+ this.RefreshData();
+ }
+ return true;
+ }
+
+ public void RefreshActivityList()
+ {
+ this.m_ActivityPool.ReturnAll(false);
+ this.m_NoticePool.ReturnAll(false);
+ for (int i = 0; i < this._doc.NoticeList.Count; i++)
+ {
+ bool flag = this._doc.NoticeList[i].type != 6u;
+ if (!flag)
+ {
+ GameObject gameObject = this.m_ActivityPool.FetchGameObject(false);
+ gameObject.name = "activity" + i.ToString("d4");
+ IXUITexture ixuitexture = gameObject.GetComponent("XUITexture") as IXUITexture;
+ IXUITexture ixuitexture2 = gameObject.transform.Find("ActivityTex").GetComponent("XUITexture") as IXUITexture;
+ IXUILabel ixuilabel = gameObject.transform.Find("ChildList/LevelTwoTpl/Label").GetComponent("XUILabel") as IXUILabel;
+ Transform transform = gameObject.transform.Find("new");
+ transform.gameObject.SetActive(this._doc.NoticeList[i].isnew);
+ ixuitexture2.SetVisible(true);
+ XSingleton<XUICacheImage>.singleton.Load(this._doc.NoticeList[i].title, ixuitexture2, DlgBase<XOperatingActivityView, XOperatingActivityBehaviour>.singleton.uiBehaviour);
+ ixuilabel.SetText(this._doc.NoticeList[i].content);
+ ixuitexture.ID = (ulong)((long)i);
+ ixuitexture.RegisterLabelClickEventHandler(new TextureClickEventHandler(this.OnActivityClicked));
+ Transform transform2 = gameObject.transform.Find("ChildList");
+ transform2.localScale = new Vector3(1f, 0f, 1f);
+ }
+ }
+ this.m_Table.RePositionNow();
+ }
+
+ public void RefreshNoticeList()
+ {
+ this.m_ActivityPool.ReturnAll(false);
+ this.m_NoticePool.ReturnAll(false);
+ for (int i = 0; i < this._doc.NoticeList.Count; i++)
+ {
+ bool flag = this._doc.NoticeList[i].type != 3u && this._doc.NoticeList[i].type != 4u;
+ if (!flag)
+ {
+ GameObject gameObject = this.m_NoticePool.FetchGameObject(false);
+ IXUISprite ixuisprite = gameObject.transform.GetComponent("XUISprite") as IXUISprite;
+ gameObject.name = "notice" + i.ToString("d4");
+ Transform transform = gameObject.transform.Find("new");
+ IXUILabel ixuilabel = gameObject.transform.Find("Title").GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel2 = gameObject.transform.Find("Time").GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel3 = gameObject.transform.Find("Selected/Title").GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel4 = gameObject.transform.Find("Selected/Time").GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel5 = gameObject.transform.Find("ChildList/LevelTwoTpl/Label").GetComponent("XUILabel") as IXUILabel;
+ IXUITexture ixuitexture = gameObject.transform.Find("ChildList/LevelTwoTpl/Texture").GetComponent("XUITexture") as IXUITexture;
+ transform.gameObject.SetActive(this._doc.NoticeList[i].isnew);
+ ixuilabel.SetText(this._doc.NoticeList[i].title);
+ ixuilabel3.SetText(this._doc.NoticeList[i].title);
+ DateTime dateTime = XSingleton<UiUtility>.singleton.TimeNow(this._doc.NoticeList[i].updatetime, true);
+ ixuilabel2.SetText(dateTime.ToString("yyyy-MM-dd"));
+ ixuilabel4.SetText(dateTime.ToString("yyyy-MM-dd"));
+ uint type = this._doc.NoticeList[i].type;
+ if (type != 3u)
+ {
+ if (type == 4u)
+ {
+ ixuilabel5.SetVisible(false);
+ ixuitexture.SetVisible(true);
+ XSingleton<XUICacheImage>.singleton.Load(this._doc.NoticeList[i].content, ixuitexture, DlgBase<XOperatingActivityView, XOperatingActivityBehaviour>.singleton.uiBehaviour);
+ }
+ }
+ else
+ {
+ ixuilabel5.SetVisible(true);
+ ixuitexture.SetVisible(false);
+ ixuilabel5.SetText(this._doc.NoticeList[i].content);
+ }
+ ixuisprite.ID = (ulong)((long)i);
+ ixuisprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnNoticeClicked));
+ Transform transform2 = gameObject.transform.Find("Selected");
+ Transform transform3 = gameObject.transform.Find("ChildList");
+ transform2.gameObject.SetActive(false);
+ transform3.localScale = new Vector3(1f, 0f, 1f);
+ }
+ }
+ this.m_Table.RePositionNow();
+ }
+
+ private void OnNoticeClicked(IXUISprite sp)
+ {
+ bool flag = sp.gameObject == this._last_notice;
+ if (flag)
+ {
+ IXUITweenTool ixuitweenTool = this._last_notice.GetComponent("XUIPlayTween") as IXUITweenTool;
+ Transform transform = this._last_notice.transform.Find("Selected");
+ transform.gameObject.SetActive(false);
+ ixuitweenTool.PlayTween(false, -1f);
+ this._last_notice = null;
+ }
+ else
+ {
+ IXUITweenTool ixuitweenTool2 = sp.transform.GetComponent("XUIPlayTween") as IXUITweenTool;
+ Transform transform2 = sp.transform.Find("Selected");
+ transform2.gameObject.SetActive(true);
+ ixuitweenTool2.PlayTween(true, -1f);
+ bool flag2 = this._last_notice != null;
+ if (flag2)
+ {
+ IXUITweenTool ixuitweenTool3 = this._last_notice.GetComponent("XUIPlayTween") as IXUITweenTool;
+ Transform transform3 = this._last_notice.transform.Find("Selected");
+ transform3.gameObject.SetActive(false);
+ ixuitweenTool3.PlayTween(false, -1f);
+ }
+ this._last_notice = sp.gameObject;
+ }
+ bool isnew = this._doc.NoticeList[(int)sp.ID].isnew;
+ if (isnew)
+ {
+ this._doc.SendClickNotice(this._doc.NoticeList[(int)sp.ID]);
+ Transform transform4 = sp.transform.Find("new");
+ transform4.gameObject.SetActive(false);
+ }
+ }
+
+ private void OnActivityClicked(IXUITexture tex)
+ {
+ bool flag = tex.gameObject == this._last_notice;
+ if (flag)
+ {
+ IXUITweenTool ixuitweenTool = this._last_notice.GetComponent("XUIPlayTween") as IXUITweenTool;
+ ixuitweenTool.PlayTween(false, -1f);
+ this._last_notice = null;
+ }
+ else
+ {
+ IXUITweenTool ixuitweenTool2 = tex.gameObject.GetComponent("XUIPlayTween") as IXUITweenTool;
+ ixuitweenTool2.PlayTween(true, -1f);
+ bool flag2 = this._last_notice != null;
+ if (flag2)
+ {
+ IXUITweenTool ixuitweenTool3 = this._last_notice.GetComponent("XUIPlayTween") as IXUITweenTool;
+ ixuitweenTool3.PlayTween(false, -1f);
+ }
+ this._last_notice = tex.gameObject;
+ }
+ bool isnew = this._doc.NoticeList[(int)tex.ID].isnew;
+ if (isnew)
+ {
+ this._doc.SendClickNotice(this._doc.NoticeList[(int)tex.ID]);
+ Transform transform = tex.gameObject.transform.Find("new");
+ transform.gameObject.SetActive(false);
+ }
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/AnnouncementHandler.cs.meta b/Client/Assets/Scripts/XMainClient/UI/AnnouncementHandler.cs.meta
new file mode 100644
index 00000000..6e48b67d
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/AnnouncementHandler.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 8470ef2dc28da394a824d7c5391e5170
+timeCreated: 1611404048
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/ArtifactAtlasHandler.cs b/Client/Assets/Scripts/XMainClient/UI/ArtifactAtlasHandler.cs
new file mode 100644
index 00000000..a9b29484
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/ArtifactAtlasHandler.cs
@@ -0,0 +1,403 @@
+using System;
+using System.Collections.Generic;
+using UILib;
+using UnityEngine;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class ArtifactAtlasHandler : DlgHandlerBase
+ {
+ protected override string FileName
+ {
+ get
+ {
+ return "ItemNew/ArtifactAtlasDlg";
+ }
+ }
+
+ private readonly int m_itemCount = 4;
+
+ private uint m_selectArtifactId = 0u;
+
+ private IXUIButton m_closedBtn;
+
+ private ArtifactAtlasDocument m_doc;
+
+ private IXUITable m_itemTypeTable;
+
+ private IXUICheckBox m_curItemType2nd;
+
+ private IXUIScrollView m_itemTypeScrollView;
+
+ private XUIPool m_itemType1stPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ private XUIPool m_itemType2ndPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ private IXUILabel m_suitNameLab;
+
+ private IXUILabel m_effectTittleLab;
+
+ private IXUILabel m_effectDesLab;
+
+ private GameObject[] m_suitItemsGo;
+
+ private Transform m_suitPanelTra;
+
+ private XUIPool m_suitAttrPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ protected override void Init()
+ {
+ base.Init();
+ this.m_doc = ArtifactAtlasDocument.Doc;
+ this.m_closedBtn = (base.PanelObject.transform.Find("Bg/Close").GetComponent("XUIButton") as IXUIButton);
+ this.InitTypeList();
+ this.InitSuit();
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ this.m_closedBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnClosed));
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ this.ShowItemType();
+ }
+
+ protected override void OnHide()
+ {
+ base.OnHide();
+ bool flag = this.m_itemType1stPool != null;
+ if (flag)
+ {
+ this.m_itemType1stPool.ReturnAll(false);
+ }
+ bool flag2 = this.m_itemType2ndPool != null;
+ if (flag2)
+ {
+ this.m_itemType2ndPool.ReturnAll(false);
+ }
+ }
+
+ public override void StackRefresh()
+ {
+ base.StackRefresh();
+ }
+
+ public override void OnUnload()
+ {
+ base.OnUnload();
+ }
+
+ private void InitTypeList()
+ {
+ Transform transform = base.PanelObject.transform.Find("Bg/TypeList");
+ this.m_itemTypeScrollView = (transform.GetComponent("XUIScrollView") as IXUIScrollView);
+ transform = transform.Find("Table");
+ this.m_itemTypeTable = (transform.GetComponent("XUITable") as IXUITable);
+ transform = base.PanelObject.transform.Find("Bg/TypeList/Table/LevelOneTpl");
+ this.m_itemType1stPool.SetupPool(transform.parent.gameObject, transform.gameObject, 3u, false);
+ transform = base.PanelObject.transform.Find("Bg/TypeList/Table/LevelTwoTpl");
+ this.m_itemType2ndPool.SetupPool(transform.parent.gameObject, transform.gameObject, 5u, false);
+ }
+
+ private void InitSuit()
+ {
+ Transform transform = base.PanelObject.transform.Find("Bg/Bg/p");
+ this.m_suitItemsGo = new GameObject[this.m_itemCount];
+ Transform transform2;
+ for (int i = 0; i < this.m_itemCount; i++)
+ {
+ transform2 = transform.Find("item" + i.ToString());
+ bool flag = transform2 == null;
+ if (flag)
+ {
+ XSingleton<XDebug>.singleton.AddErrorLog("item" + i.ToString() + "is null", null, null, null, null, null);
+ }
+ else
+ {
+ this.m_suitItemsGo[i] = transform2.gameObject;
+ IXUISprite ixuisprite = transform2.Find("Icon").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnSelectItem));
+ }
+ }
+ transform = base.PanelObject.transform.Find("Bg/Bg/EffectFrame");
+ this.m_effectTittleLab = (transform.Find("Title").GetComponent("XUILabel") as IXUILabel);
+ this.m_effectDesLab = (transform.Find("Panel/Text").GetComponent("XUILabel") as IXUILabel);
+ transform = base.PanelObject.transform.Find("Bg/Bg/SuitFrame");
+ this.m_suitNameLab = (transform.Find("Title").GetComponent("XUILabel") as IXUILabel);
+ this.m_suitPanelTra = transform.Find("Panel");
+ transform2 = transform.Find("Attr");
+ this.m_suitAttrPool.SetupPool(transform2.parent.gameObject, transform2.gameObject, 3u, true);
+ this.m_suitNameLab = (base.PanelObject.transform.Find("Bg/Bg/SuitName").GetComponent("XUILabel") as IXUILabel);
+ }
+
+ private void ShowItemType()
+ {
+ List<ArtifactSuitLevel> levelSuitList = this.m_doc.GetLevelSuitList();
+ this.m_itemType1stPool.ReturnAll(true);
+ this.m_itemType2ndPool.ReturnAll(true);
+ for (int i = 0; i < levelSuitList.Count; i++)
+ {
+ ArtifactSuitLevel artifactSuitLevel = levelSuitList[i];
+ bool flag = artifactSuitLevel == null;
+ if (!flag)
+ {
+ GameObject gameObject = this.m_itemType1stPool.FetchGameObject(false);
+ gameObject.name = artifactSuitLevel.SuitLevel.ToString();
+ IXUISprite ixuisprite = gameObject.transform.Find("Switch").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnClickItemType1st));
+ Transform transform = gameObject.transform.Find("ChildList");
+ bool flag2 = (artifactSuitLevel.IsDefultSelect && transform.localScale.y == 0f) || (!artifactSuitLevel.IsDefultSelect && transform.localScale.y != 0f);
+ if (flag2)
+ {
+ ixuisprite.SetSprite("l_add_01");
+ IXUITweenTool ixuitweenTool = ixuisprite.gameObject.GetComponent("XUIPlayTween") as IXUITweenTool;
+ ixuitweenTool.PlayTween(true, -1f);
+ }
+ IXUILabel ixuilabel = gameObject.transform.Find("SelectLab").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel.SetText(string.Format(XSingleton<XStringTable>.singleton.GetString("ArtifactLevel"), artifactSuitLevel.SuitLevel));
+ ixuilabel.gameObject.SetActive(artifactSuitLevel.IsDefultSelect);
+ ixuilabel = (gameObject.transform.Find("UnSelectLab").GetComponent("XUILabel") as IXUILabel);
+ ixuilabel.SetText(string.Format(XSingleton<XStringTable>.singleton.GetString("ArtifactLevel"), artifactSuitLevel.SuitLevel));
+ ixuilabel.gameObject.SetActive(!artifactSuitLevel.IsDefultSelect);
+ int num = 0;
+ foreach (uint num2 in artifactSuitLevel.SuitIdList)
+ {
+ ArtifactSuit suitBySuitId = ArtifactDocument.SuitMgr.GetSuitBySuitId(num2);
+ bool flag3 = suitBySuitId == null || suitBySuitId.EffectsNum == 0;
+ if (!flag3)
+ {
+ GameObject gameObject2 = this.m_itemType2ndPool.FetchGameObject(false);
+ gameObject2.name = num2.ToString();
+ IXUICheckBox ixuicheckBox = gameObject2.GetComponent("XUICheckBox") as IXUICheckBox;
+ ixuicheckBox.ID = (ulong)num2;
+ ixuicheckBox.RegisterOnCheckEventHandler(new CheckBoxOnCheckEventHandler(this.OnClickItemType2nd));
+ gameObject2.transform.parent = transform;
+ gameObject2.transform.localScale = Vector3.one;
+ gameObject2.transform.localPosition = new Vector3(0f, -((float)transform.childCount - 0.5f) * (float)ixuicheckBox.spriteHeight, 0f);
+ IXUILabel ixuilabel2 = gameObject2.transform.Find("SelectLab").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel2.SetText(suitBySuitId.Name);
+ IXUILabel ixuilabel3 = gameObject2.transform.Find("UnSelectLab").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel3.SetText(suitBySuitId.Name);
+ bool flag4 = num == artifactSuitLevel.DefultNum && artifactSuitLevel.IsDefultSelect;
+ if (flag4)
+ {
+ this.m_curItemType2nd = ixuicheckBox;
+ ixuicheckBox.ForceSetFlag(true);
+ this.RefreshItemList();
+ ixuilabel2.gameObject.SetActive(true);
+ ixuilabel3.gameObject.SetActive(false);
+ Transform parent = ixuicheckBox.gameObject.transform.parent.parent;
+ parent.Find("UnSelectLab").gameObject.SetActive(false);
+ parent.Find("SelectLab").gameObject.SetActive(true);
+ IXUISprite ixuisprite2 = parent.GetComponent("XUISprite") as IXUISprite;
+ ixuisprite2.SetSprite("l_button_06");
+ }
+ else
+ {
+ ixuicheckBox.ForceSetFlag(false);
+ ixuilabel2.gameObject.SetActive(false);
+ ixuilabel3.gameObject.SetActive(true);
+ }
+ num++;
+ }
+ }
+ }
+ }
+ this.m_itemTypeTable.RePositionNow();
+ this.m_itemTypeTable.Reposition();
+ }
+
+ private void FillSuitContent(uint suitId)
+ {
+ ArtifactSuit suitBySuitId = ArtifactDocument.SuitMgr.GetSuitBySuitId(suitId);
+ bool flag = suitBySuitId == null;
+ if (!flag)
+ {
+ this.m_suitNameLab.SetText(suitBySuitId.Name);
+ int num = 0;
+ foreach (uint num2 in suitBySuitId.Artifacts)
+ {
+ bool flag2 = num >= suitBySuitId.Artifacts.Count;
+ if (flag2)
+ {
+ break;
+ }
+ GameObject gameObject = this.m_suitItemsGo[num];
+ bool flag3 = gameObject == null;
+ if (!flag3)
+ {
+ gameObject.SetActive(true);
+ ItemList.RowData itemConf = XBagDocument.GetItemConf((int)num2);
+ bool flag4 = itemConf == null;
+ if (flag4)
+ {
+ return;
+ }
+ XSingleton<XItemDrawerMgr>.singleton.normalItemDrawer.DrawItem(gameObject, itemConf.ItemID, 0, false);
+ IXUISprite ixuisprite = gameObject.transform.Find("Icon").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.ID = (ulong)num2;
+ bool flag5 = num == 0;
+ if (flag5)
+ {
+ this.OnSelectItem(ixuisprite);
+ }
+ num++;
+ }
+ }
+ for (int i = 0; i < this.m_itemCount; i++)
+ {
+ bool flag6 = i >= suitBySuitId.Artifacts.Count;
+ if (flag6)
+ {
+ GameObject gameObject = this.m_suitItemsGo[i];
+ bool flag7 = gameObject != null;
+ if (flag7)
+ {
+ gameObject.SetActive(false);
+ }
+ }
+ }
+ this.FillSuitDes(suitId);
+ }
+ }
+
+ private void FillEffectDes(uint artifactId)
+ {
+ ArtifactListTable.RowData artifactListRowData = ArtifactDocument.GetArtifactListRowData(artifactId);
+ bool flag = artifactListRowData == null;
+ if (!flag)
+ {
+ this.m_effectTittleLab.SetText(string.Format(XSingleton<XStringTable>.singleton.GetString("ArtifactSkillEffect"), artifactListRowData.EffectNum));
+ this.m_effectDesLab.SetText(XSingleton<UiUtility>.singleton.ReplaceReturn(artifactListRowData.EffectDes));
+ }
+ }
+
+ private void FillSuitDes(uint suitId)
+ {
+ this.m_suitAttrPool.ReturnAll(true);
+ ArtifactSuit suitBySuitId = ArtifactDocument.SuitMgr.GetSuitBySuitId(suitId);
+ bool flag = suitBySuitId == null;
+ if (!flag)
+ {
+ int num = 0;
+ for (int i = 0; i < suitBySuitId.effects.Length; i++)
+ {
+ SeqListRef<uint> seqListRef = suitBySuitId.effects[i];
+ bool flag2 = seqListRef.Count == 0;
+ if (!flag2)
+ {
+ for (int j = 0; j < seqListRef.Count; j++)
+ {
+ bool flag3 = seqListRef[j, 0] == 0u;
+ if (!flag3)
+ {
+ GameObject gameObject = this.m_suitAttrPool.FetchGameObject(false);
+ gameObject.transform.parent = this.m_suitPanelTra;
+ gameObject.transform.localScale = Vector3.one;
+ gameObject.transform.localPosition = new Vector3(0f, (float)(-(float)this.m_suitAttrPool.TplHeight * num), 0f);
+ IXUILabel ixuilabel = gameObject.transform.Find("Text").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel.SetText(string.Format("[FFFFFF]{0}[-]", XStringDefineProxy.GetString("EQUIP_SUIT_EFFECT", new object[]
+ {
+ i
+ })));
+ ixuilabel = (gameObject.transform.Find("Value").GetComponent("XUILabel") as IXUILabel);
+ string text = string.Format("{0}{1}", XStringDefineProxy.GetString((XAttributeDefine)seqListRef[j, 0]), XAttributeCommon.GetAttrValueStr((int)seqListRef[j, 0], (float)seqListRef[j, 1]));
+ ixuilabel.SetText(text);
+ num++;
+ }
+ }
+ }
+ }
+ }
+ }
+
+ private void RefreshItemList()
+ {
+ bool flag = !base.IsVisible();
+ if (!flag)
+ {
+ bool flag2 = this.m_curItemType2nd != null;
+ if (flag2)
+ {
+ this.OnClickItemType2nd(this.m_curItemType2nd);
+ }
+ }
+ }
+
+ private void OnClickItemType1st(IXUISprite spr)
+ {
+ bool flag = spr.spriteName == "l_add_00";
+ if (flag)
+ {
+ spr.SetSprite("l_add_01");
+ }
+ else
+ {
+ spr.SetSprite("l_add_00");
+ }
+ }
+
+ private void OnSelectItem(IXUISprite spr)
+ {
+ uint num = (uint)spr.ID;
+ bool flag = this.m_selectArtifactId == num;
+ if (!flag)
+ {
+ this.m_selectArtifactId = num;
+ this.FillEffectDes(num);
+ }
+ }
+
+ private bool OnClosed(IXUIButton btn)
+ {
+ base.SetVisible(false);
+ return true;
+ }
+
+ private bool OnClickItemType2nd(IXUICheckBox cb)
+ {
+ bool flag = !cb.bChecked;
+ bool result;
+ if (flag)
+ {
+ result = false;
+ }
+ else
+ {
+ bool flag2 = this.m_curItemType2nd != null;
+ if (flag2)
+ {
+ this.SetSelectStatus(false);
+ }
+ this.m_curItemType2nd = cb;
+ this.SetSelectStatus(true);
+ this.FillSuitContent((uint)cb.ID);
+ result = true;
+ }
+ return result;
+ }
+
+ private void SetSelectStatus(bool isSelected)
+ {
+ this.m_curItemType2nd.gameObject.transform.Find("UnSelectLab").gameObject.SetActive(!isSelected);
+ this.m_curItemType2nd.gameObject.transform.Find("SelectLab").gameObject.SetActive(isSelected);
+ Transform parent = this.m_curItemType2nd.gameObject.transform.parent.parent;
+ parent.Find("UnSelectLab").gameObject.SetActive(!isSelected);
+ parent.Find("SelectLab").gameObject.SetActive(isSelected);
+ IXUISprite ixuisprite = parent.GetComponent("XUISprite") as IXUISprite;
+ if (isSelected)
+ {
+ ixuisprite.SetSprite("l_button_06");
+ }
+ else
+ {
+ ixuisprite.SetSprite("l_button_07");
+ }
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/ArtifactAtlasHandler.cs.meta b/Client/Assets/Scripts/XMainClient/UI/ArtifactAtlasHandler.cs.meta
new file mode 100644
index 00000000..0c93e00a
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/ArtifactAtlasHandler.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 6b030e1236368664dae65596367adea0
+timeCreated: 1611403890
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/ArtifactBagHandler.cs b/Client/Assets/Scripts/XMainClient/UI/ArtifactBagHandler.cs
new file mode 100644
index 00000000..d23be095
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/ArtifactBagHandler.cs
@@ -0,0 +1,305 @@
+using System;
+using System.Collections.Generic;
+using KKSG;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class ArtifactBagHandler : DlgHandlerBase
+ {
+ protected override string FileName
+ {
+ get
+ {
+ return "ItemNew/ArtifactListPanel";
+ }
+ }
+
+ private ArtifactAtlasHandler m_atlasHandler;
+
+ private ArtifactBagDocument m_doc;
+
+ private XBagWindow m_bagWindow;
+
+ private GameObject m_artifactBagPanel;
+
+ private IXUIButton m_Help;
+
+ private IXUIButton m_atlasBtn;
+
+ private IXUILabel m_bagNumLab;
+
+ public IXUIButton m_expandBagBtn;
+
+ protected override void Init()
+ {
+ base.Init();
+ this.m_doc = ArtifactBagDocument.Doc;
+ this.m_artifactBagPanel = base.PanelObject;
+ this.m_bagNumLab = (base.PanelObject.transform.Find("BagNum").GetComponent("XUILabel") as IXUILabel);
+ this.m_Help = (base.PanelObject.transform.Find("Help").GetComponent("XUIButton") as IXUIButton);
+ this.m_atlasBtn = (base.PanelObject.transform.Find("BtnShop").GetComponent("XUIButton") as IXUIButton);
+ this.m_expandBagBtn = (base.PanelObject.transform.Find("add").GetComponent("XUIButton") as IXUIButton);
+ this.m_bagWindow = new XBagWindow(this.m_artifactBagPanel, new ItemUpdateHandler(this.WrapContentItemUpdated), new GetItemHandler(this.m_doc.GetArtifacts));
+ this.m_bagWindow.Init();
+ BagExpandItemListTable.RowData expandItemConfByType = XBagDocument.GetExpandItemConfByType((uint)XFastEnumIntEqualityComparer<BagType>.ToInt(BagType.ArtifactBag));
+ this.m_expandBagBtn.gameObject.SetActive(expandItemConfByType != null);
+ DlgHandlerBase.EnsureCreate<ArtifactAtlasHandler>(ref this.m_atlasHandler, base.PanelObject.transform.parent.parent, false, this);
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ this.m_Help.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnHelpClicked));
+ this.m_atlasBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnAtlasClicked));
+ this.m_expandBagBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnBagExpandClicked));
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ this.m_doc.BagHandler = this;
+ this.RefreshBag();
+ this.m_doc.NewItems.bCanClear = true;
+ this.RefreshRedPoints();
+ this.SetBagNum();
+ }
+
+ protected override void OnHide()
+ {
+ base.OnHide();
+ this.m_doc.NewItems.TryClear();
+ }
+
+ public override void StackRefresh()
+ {
+ base.StackRefresh();
+ this.RefreshBag();
+ this.m_doc.NewItems.bCanClear = true;
+ }
+
+ public override void OnUnload()
+ {
+ DlgHandlerBase.EnsureUnload<ArtifactAtlasHandler>(ref this.m_atlasHandler);
+ this.m_doc.BagHandler = null;
+ base.OnUnload();
+ }
+
+ private void RefreshBag()
+ {
+ this.m_bagWindow.ChangeData(new ItemUpdateHandler(this.WrapContentItemUpdated), new GetItemHandler(this.m_doc.GetArtifacts));
+ this.m_bagWindow.OnShow();
+ this.SetBagNum();
+ }
+
+ public void Refresh()
+ {
+ this.m_bagWindow.RefreshWindow();
+ this.SetBagNum();
+ }
+
+ private void WrapContentItemUpdated(Transform t, int index)
+ {
+ bool flag = this.m_bagWindow.m_XItemList == null || index >= this.m_bagWindow.m_XItemList.Count || index < 0;
+ if (flag)
+ {
+ XSingleton<XItemDrawerMgr>.singleton.DrawItem(t.gameObject, null);
+ t.gameObject.name = XSingleton<XCommon>.singleton.StringCombine("empty", index.ToString());
+ }
+ else
+ {
+ IXUISprite ixuisprite = t.Find("Icon").GetComponent("XUISprite") as IXUISprite;
+ XSingleton<XItemDrawerMgr>.singleton.DrawItem(t.gameObject, this.m_bagWindow.m_XItemList[index]);
+ ixuisprite.ID = this.m_bagWindow.m_XItemList[index].uid;
+ ixuisprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnItemClicked));
+ t.gameObject.name = XSingleton<XCommon>.singleton.StringCombine("artifact", this.m_bagWindow.m_XItemList[index].itemID.ToString());
+ EquipCompare mix = this.m_doc.IsEquipMorePowerful(ixuisprite.ID);
+ EquipCompare final = ArtifactBagDocument.GetFinal(mix);
+ Transform transform = t.Find("Icon/RedPoint");
+ bool flag2 = transform != null;
+ if (flag2)
+ {
+ transform.gameObject.SetActive(final == EquipCompare.EC_MORE_POWERFUL);
+ }
+ transform = t.Find("Icon/New");
+ bool flag3 = transform != null;
+ if (flag3)
+ {
+ transform.gameObject.SetActive(this.m_doc.NewItems.IsNew(ixuisprite.ID));
+ }
+ transform = t.Find("Icon/TimeBg");
+ bool flag4 = transform != null;
+ if (flag4)
+ {
+ transform.gameObject.SetActive(false);
+ }
+ }
+ }
+
+ private void SetBagNum()
+ {
+ int count = this.m_doc.GetArtifacts().Count;
+ XRechargeDocument specificDocument = XDocuments.GetSpecificDocument<XRechargeDocument>(XRechargeDocument.uuID);
+ VIPTable.RowData byVIP = specificDocument.VIPReader.GetByVIP((int)specificDocument.VipLevel);
+ bool flag = byVIP != null;
+ if (flag)
+ {
+ uint num = byVIP.ArtifactMax;
+ BagExpandData bagExpandData = XBagDocument.BagDoc.GetBagExpandData(BagType.ArtifactBag);
+ bool flag2 = bagExpandData != null;
+ if (flag2)
+ {
+ num += bagExpandData.ExpandNum;
+ }
+ bool flag3 = (long)count >= (long)((ulong)num);
+ if (flag3)
+ {
+ this.m_bagNumLab.SetText(string.Format("[ff4366]{0}[-]/{1}", count, num));
+ }
+ else
+ {
+ this.m_bagNumLab.SetText(string.Format("{0}[-]/{1}", count, num));
+ }
+ }
+ }
+
+ public void RefreshRedPoints()
+ {
+ }
+
+ public void LoadEquip(XItem item, int slot)
+ {
+ DlgBase<EquipTooltipDlg, EquipTooltipDlgBehaviour>.singleton.HideToolTip(true);
+ bool flag = DlgBase<ItemSystemDlg, TabDlgBehaviour>.singleton._ArtifactFrameHandler != null && DlgBase<ItemSystemDlg, TabDlgBehaviour>.singleton._ArtifactFrameHandler.IsVisible();
+ if (flag)
+ {
+ DlgBase<ItemSystemDlg, TabDlgBehaviour>.singleton._ArtifactFrameHandler.SetEquipSlot(slot, item);
+ }
+ this.Refresh();
+ }
+
+ public void UnloadEquip(int slot)
+ {
+ DlgBase<EquipTooltipDlg, EquipTooltipDlgBehaviour>.singleton.HideToolTip(true);
+ bool flag = DlgBase<ItemSystemDlg, TabDlgBehaviour>.singleton._ArtifactFrameHandler != null && DlgBase<ItemSystemDlg, TabDlgBehaviour>.singleton._ArtifactFrameHandler.IsVisible();
+ if (flag)
+ {
+ DlgBase<ItemSystemDlg, TabDlgBehaviour>.singleton._ArtifactFrameHandler.SetEquipSlot(slot, null);
+ }
+ this.Refresh();
+ }
+
+ public void AddItem(List<XItem> items)
+ {
+ this.m_bagWindow.UpdateBag();
+ this.SetBagNum();
+ }
+
+ public void RemoveItem(List<ulong> uids)
+ {
+ this.m_bagWindow.UpdateBag();
+ this.SetBagNum();
+ foreach (ulong num in uids)
+ {
+ bool flag = num == DlgBase<EquipTooltipDlg, EquipTooltipDlgBehaviour>.singleton.MainItemUID;
+ if (flag)
+ {
+ DlgBase<EquipTooltipDlg, EquipTooltipDlgBehaviour>.singleton.HideToolTip(false);
+ }
+ }
+ }
+
+ public void SwapItem(XItem item1, XItem item2, int slot)
+ {
+ DlgBase<EquipTooltipDlg, EquipTooltipDlgBehaviour>.singleton.HideToolTip(true);
+ bool flag = DlgBase<ItemSystemDlg, TabDlgBehaviour>.singleton._ArtifactFrameHandler != null && DlgBase<ItemSystemDlg, TabDlgBehaviour>.singleton._ArtifactFrameHandler.IsVisible();
+ if (flag)
+ {
+ DlgBase<ItemSystemDlg, TabDlgBehaviour>.singleton._ArtifactFrameHandler.SetEquipSlot(slot, item1);
+ }
+ this.m_bagWindow.ReplaceItem(item1, item2);
+ }
+
+ public void UpdateItem(XItem item)
+ {
+ this.m_bagWindow.UpdateItem(item);
+ DlgBase<ItemSystemDlg, TabDlgBehaviour>.singleton._ArtifactFrameHandler.UpdateEquipSlot(item);
+ bool flag = item.uid == DlgBase<EquipTooltipDlg, EquipTooltipDlgBehaviour>.singleton.MainItemUID;
+ if (flag)
+ {
+ DlgBase<EquipTooltipDlg, EquipTooltipDlgBehaviour>.singleton.HideToolTip(false);
+ }
+ bool flag2 = item.uid == DlgBase<ItemTooltipDlg, ItemTooltipDlgBehaviour>.singleton.MainItemUID;
+ if (flag2)
+ {
+ DlgBase<ItemTooltipDlg, ItemTooltipDlgBehaviour>.singleton.HideToolTip(true);
+ }
+ }
+
+ public void ItemNumChanged(XItem item)
+ {
+ this.m_bagWindow.UpdateItem(item);
+ this.SetBagNum();
+ }
+
+ public bool OnHelpClicked(IXUIButton button)
+ {
+ bool flag = DlgBase<ItemSystemDlg, TabDlgBehaviour>.singleton.IsVisible() && DlgBase<ItemSystemDlg, TabDlgBehaviour>.singleton._ArtifactFrameHandler != null && DlgBase<ItemSystemDlg, TabDlgBehaviour>.singleton._ArtifactFrameHandler.IsVisible();
+ if (flag)
+ {
+ DlgBase<ItemSystemDlg, TabDlgBehaviour>.singleton._ArtifactFrameHandler.HideEffects();
+ }
+ DlgBase<XCommonHelpTipView, XCommonHelpTipBehaviour>.singleton.ShowHelp(XSysDefine.XSys_Artifact);
+ return true;
+ }
+
+ public bool OnAtlasClicked(IXUIButton button)
+ {
+ bool flag = DlgBase<ItemSystemDlg, TabDlgBehaviour>.singleton.IsVisible() && DlgBase<ItemSystemDlg, TabDlgBehaviour>.singleton._ArtifactFrameHandler != null && DlgBase<ItemSystemDlg, TabDlgBehaviour>.singleton._ArtifactFrameHandler.IsVisible();
+ if (flag)
+ {
+ DlgBase<ItemSystemDlg, TabDlgBehaviour>.singleton._ArtifactFrameHandler.HideEffects();
+ }
+ bool flag2 = this.m_atlasHandler != null;
+ if (flag2)
+ {
+ this.m_atlasHandler.SetVisible(true);
+ }
+ return true;
+ }
+
+ public bool OnBagExpandClicked(IXUIButton button)
+ {
+ bool flag = DlgBase<ItemSystemDlg, TabDlgBehaviour>.singleton.IsVisible() && DlgBase<ItemSystemDlg, TabDlgBehaviour>.singleton._ArtifactFrameHandler != null && DlgBase<ItemSystemDlg, TabDlgBehaviour>.singleton._ArtifactFrameHandler.IsVisible();
+ if (flag)
+ {
+ DlgBase<ItemSystemDlg, TabDlgBehaviour>.singleton._ArtifactFrameHandler.HideEffects();
+ }
+ XBagDocument.BagDoc.UseBagExpandTicket(BagType.ArtifactBag);
+ return true;
+ }
+
+ private void OnItemClicked(IXUISprite iSp)
+ {
+ XItem itemByUID = XSingleton<XGame>.singleton.Doc.XBagDoc.GetItemByUID(iSp.ID);
+ bool flag = itemByUID == null;
+ if (!flag)
+ {
+ bool flag2 = this.m_doc.NewItems.RemoveItem(iSp.ID, itemByUID.Type, false);
+ if (flag2)
+ {
+ this.m_doc.GetArtifacts();
+ }
+ CharacterEquipHandler.OnItemClicked(iSp);
+ bool flag3 = DlgBase<ItemSystemDlg, TabDlgBehaviour>.singleton.IsVisible() && DlgBase<ItemSystemDlg, TabDlgBehaviour>.singleton._ArtifactFrameHandler != null && DlgBase<ItemSystemDlg, TabDlgBehaviour>.singleton._ArtifactFrameHandler.IsVisible();
+ if (flag3)
+ {
+ DlgBase<ItemSystemDlg, TabDlgBehaviour>.singleton._ArtifactFrameHandler.HideEffects();
+ }
+ }
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/ArtifactBagHandler.cs.meta b/Client/Assets/Scripts/XMainClient/UI/ArtifactBagHandler.cs.meta
new file mode 100644
index 00000000..a558fa20
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/ArtifactBagHandler.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 682939fcc81702b42bd52d43eae09afc
+timeCreated: 1611403881
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/ArtifactComposeHandler.cs b/Client/Assets/Scripts/XMainClient/UI/ArtifactComposeHandler.cs
new file mode 100644
index 00000000..c3689fbe
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/ArtifactComposeHandler.cs
@@ -0,0 +1,235 @@
+using System;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class ArtifactComposeHandler : DlgHandlerBase
+ {
+ protected override string FileName
+ {
+ get
+ {
+ return "ItemNew/ArtifactComposeHandler";
+ }
+ }
+
+ private ArtifactComposeDocument m_doc;
+
+ private ArtifactOneKeyHandler m_oneKeyHandler;
+
+ private IXUISprite[] m_boxArray;
+
+ private Transform[] m_itemArray;
+
+ private IXUILabel m_tipsLab1;
+
+ private IXUILabel m_tipsLab2;
+
+ private IXUIButton m_composeBtn;
+
+ private IXUIButton m_oneKeyComposeBtn;
+
+ protected override void Init()
+ {
+ base.Init();
+ this.m_doc = ArtifactComposeDocument.Doc;
+ this.m_doc.ComposeHandler = this;
+ Transform transform = base.PanelObject.transform.Find("Bg1");
+ this.m_itemArray = new Transform[ArtifactComposeDocument.MAX_RECYCLE_COUNT];
+ this.m_itemArray[0] = transform.Find("item0");
+ this.m_itemArray[1] = transform.Find("item1");
+ this.m_boxArray = new IXUISprite[ArtifactComposeDocument.MAX_RECYCLE_COUNT];
+ this.m_boxArray[0] = (transform.Find("BgBox1").GetComponent("XUISprite") as IXUISprite);
+ this.m_boxArray[1] = (transform.Find("BgBox2").GetComponent("XUISprite") as IXUISprite);
+ this.m_tipsLab1 = (transform.Find("Label1").GetComponent("XUILabel") as IXUILabel);
+ this.m_tipsLab2 = (transform.Find("Label2").GetComponent("XUILabel") as IXUILabel);
+ this.m_composeBtn = (transform.Find("Get").GetComponent("XUIButton") as IXUIButton);
+ this.m_oneKeyComposeBtn = (base.PanelObject.transform.Find("BtnCompose").GetComponent("XUIButton") as IXUIButton);
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ for (int i = 0; i < this.m_itemArray.Length; i++)
+ {
+ IXUISprite ixuisprite = this.m_itemArray[i].Find("Icon").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnUnselectSprClicked));
+ }
+ for (int j = 0; j < this.m_boxArray.Length; j++)
+ {
+ bool flag = this.m_boxArray[j] != null;
+ if (flag)
+ {
+ this.m_boxArray[j].RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnClickBgBox));
+ }
+ }
+ this.m_composeBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnClickComposed));
+ this.m_oneKeyComposeBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnClickOneKeyComposeBtn));
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ }
+
+ protected override void OnHide()
+ {
+ base.OnHide();
+ this.m_doc.ResetSelection(false);
+ }
+
+ public override void StackRefresh()
+ {
+ base.StackRefresh();
+ this.FillFrame();
+ }
+
+ public override void OnUnload()
+ {
+ base.OnUnload();
+ this.m_doc.ComposeHandler = null;
+ }
+
+ public void RefreshUi()
+ {
+ this.FillFrame();
+ }
+
+ private void FillFrame()
+ {
+ this.m_tipsLab1.SetText(XSingleton<XStringTable>.singleton.GetString("ArtifactComposeTips4"));
+ this.m_tipsLab1.gameObject.SetActive((long)this.m_doc.SelectedItems.Count < (long)((ulong)ArtifactComposeDocument.MAX_RECYCLE_COUNT));
+ bool flag = this.m_doc.CurSelectTabLevel > XSingleton<XGlobalConfig>.singleton.GetInt("ArtifactShowTipsLevel");
+ if (flag)
+ {
+ this.m_tipsLab2.SetText(XSingleton<XStringTable>.singleton.GetString("ArtifactComposeTips3"));
+ }
+ else
+ {
+ this.m_tipsLab2.SetText(XSingleton<XStringTable>.singleton.GetString("ArtifactComposeTips3"));
+ }
+ int num = 0;
+ while (num < this.m_doc.SelectedItems.Count && num < this.m_itemArray.Length)
+ {
+ XItem bagItemByUID = XBagDocument.BagDoc.GetBagItemByUID(this.m_doc.SelectedItems[num]);
+ bool flag2 = this.m_itemArray[num] != null;
+ if (flag2)
+ {
+ XSingleton<XItemDrawerMgr>.singleton.DrawItem(this.m_itemArray[num].gameObject, bagItemByUID);
+ IXUISprite ixuisprite = this.m_itemArray[num].Find("Icon").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.ID = this.m_doc.SelectedItems[num];
+ }
+ num++;
+ }
+ while ((long)num < (long)((ulong)ArtifactComposeDocument.MAX_RECYCLE_COUNT))
+ {
+ bool flag3 = this.m_itemArray[num] != null;
+ if (flag3)
+ {
+ XSingleton<XItemDrawerMgr>.singleton.DrawItem(this.m_itemArray[num].gameObject, null);
+ IXUISprite ixuisprite2 = this.m_itemArray[num].Find("Icon").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite2.ID = 0UL;
+ }
+ num++;
+ }
+ }
+
+ private void OnUnselectSprClicked(IXUISprite iSp)
+ {
+ bool flag = iSp.ID == 0UL;
+ if (!flag)
+ {
+ XItem bagItemByUID = XBagDocument.BagDoc.GetBagItemByUID(iSp.ID);
+ bool flag2 = bagItemByUID == null;
+ if (!flag2)
+ {
+ bool flag3 = bagItemByUID.Type == ItemType.ARTIFACT;
+ if (flag3)
+ {
+ XSingleton<TooltipParam>.singleton.bShowTakeOutBtn = true;
+ }
+ XSingleton<UiUtility>.singleton.ShowTooltipDialogWithSearchingCompare(bagItemByUID, iSp, true, 0u);
+ }
+ }
+ }
+
+ private void OnClickBgBox(IXUISprite iSp)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XSingleton<XStringTable>.singleton.GetString("PutTwoArtifact"), "fece00");
+ }
+
+ private bool OnClickComposed(IXUIButton btn)
+ {
+ bool flag = !this.m_doc.IsNumFit;
+ if (flag)
+ {
+ bool flag2 = this.m_doc.SelectedItems.Count == 0;
+ if (flag2)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString("ArtifactComposeTips4"), "fece00");
+ return false;
+ }
+ XItem bagItemByUID = XBagDocument.BagDoc.GetBagItemByUID(this.m_doc.SelectedItems[0]);
+ bool flag3 = bagItemByUID != null && bagItemByUID.itemConf != null;
+ if (flag3)
+ {
+ ArtifactComposeTable.RowData composeRowData = this.m_doc.GetComposeRowData(this.m_doc.CurSelectTabLevel, (int)bagItemByUID.itemConf.ItemQuality);
+ bool flag4 = composeRowData != null;
+ if (flag4)
+ {
+ bool flag5 = composeRowData.ArtifactNum2DropID.count > 0;
+ if (flag5)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString("ArtifactComposeTips1"), "fece00");
+ }
+ }
+ return false;
+ }
+ }
+ XOptionsDocument specificDocument = XDocuments.GetSpecificDocument<XOptionsDocument>(XOptionsDocument.uuID);
+ bool flag6 = specificDocument.GetValue(XOptionsDefine.OD_NO_ARTIFACTCOMPOSE_REPLACE_CONFIRM) == 0;
+ bool result;
+ if (flag6)
+ {
+ XSingleton<UiUtility>.singleton.ShowModalDialog(XStringDefineProxy.GetString("ArtifactComposeEnsureTips"), XStringDefineProxy.GetString(XStringDefine.COMMON_OK), XStringDefineProxy.GetString(XStringDefine.COMMON_CANCEL), new ButtonClickEventHandler(this.DoOK), new ButtonClickEventHandler(this.DoCancel), false, XTempTipDefine.OD_ARTIFACT_COMPOSE_TRAVELSET, 50);
+ result = true;
+ }
+ else
+ {
+ this.DoOK(null);
+ result = true;
+ }
+ return result;
+ }
+
+ private bool DoCancel(IXUIButton btn)
+ {
+ XOptionsDocument specificDocument = XDocuments.GetSpecificDocument<XOptionsDocument>(XOptionsDocument.uuID);
+ specificDocument.SetValue(XOptionsDefine.OD_NO_ARTIFACTCOMPOSE_REPLACE_CONFIRM, DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.GetTempTip(XTempTipDefine.OD_ARTIFACT_COMPOSE_TRAVELSET) ? 1 : 0, false);
+ XSingleton<UiUtility>.singleton.CloseModalDlg();
+ return true;
+ }
+
+ private bool DoOK(IXUIButton btn)
+ {
+ this.m_doc.ReqCoposeArtifact();
+ bool flag = DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.IsVisible();
+ if (flag)
+ {
+ XOptionsDocument specificDocument = XDocuments.GetSpecificDocument<XOptionsDocument>(XOptionsDocument.uuID);
+ specificDocument.SetValue(XOptionsDefine.OD_NO_ARTIFACTCOMPOSE_REPLACE_CONFIRM, DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.GetTempTip(XTempTipDefine.OD_ARTIFACT_COMPOSE_TRAVELSET) ? 1 : 0, false);
+ }
+ XSingleton<UiUtility>.singleton.CloseModalDlg();
+ return true;
+ }
+
+ private bool OnClickOneKeyComposeBtn(IXUIButton btn)
+ {
+ DlgHandlerBase.EnsureCreate<ArtifactOneKeyHandler>(ref this.m_oneKeyHandler, base.PanelObject.transform, true, this);
+ return true;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/ArtifactComposeHandler.cs.meta b/Client/Assets/Scripts/XMainClient/UI/ArtifactComposeHandler.cs.meta
new file mode 100644
index 00000000..31c6cb98
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/ArtifactComposeHandler.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 8abc65b1837c8c845837d27f7c7b3ac0
+timeCreated: 1611404093
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/ArtifactComposingHandler.cs b/Client/Assets/Scripts/XMainClient/UI/ArtifactComposingHandler.cs
new file mode 100644
index 00000000..108fbc56
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/ArtifactComposingHandler.cs
@@ -0,0 +1,316 @@
+using System;
+using UILib;
+using UnityEngine;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class ArtifactComposingHandler : DlgHandlerBase
+ {
+ protected override string FileName
+ {
+ get
+ {
+ return "ItemNew/ArtifactComposeFrame";
+ }
+ }
+
+ public string CreatePath
+ {
+ get
+ {
+ bool flag = string.IsNullOrEmpty(this.m_createPath);
+ if (flag)
+ {
+ this.m_createPath = XSingleton<XGlobalConfig>.singleton.GetValue("EquipCreatEffectPath");
+ }
+ return this.m_createPath;
+ }
+ }
+
+ private ArtifactComposeDocument m_doc;
+
+ private ArtifactBagDocument m_artifactBagdoc;
+
+ private IXUILabel m_textLab;
+
+ private IXUIButton m_doBtn;
+
+ private IXUILabel m_doLab;
+
+ private IXUISprite m_sprBar;
+
+ private GameObject m_barView;
+
+ private XFx m_creatFx = null;
+
+ private XFx m_successFx = null;
+
+ private Transform m_successEffectTra;
+
+ private EquipSetItemBaseView m_itemView;
+
+ private ArtifactQuanlityFx m_quanlityFx = new ArtifactQuanlityFx();
+
+ private float m_fCoolTime = 0.5f;
+
+ private float m_fLastClickBtnTime = 0f;
+
+ private int m_barFullWidth;
+
+ private string m_createPath = string.Empty;
+
+ protected override void Init()
+ {
+ base.Init();
+ this.m_doc = ArtifactComposeDocument.Doc;
+ this.m_artifactBagdoc = ArtifactBagDocument.Doc;
+ this.m_textLab = (base.PanelObject.transform.Find("Text").GetComponent("XUILabel") as IXUILabel);
+ this.m_barView = base.PanelObject.transform.Find("Making").gameObject;
+ this.m_sprBar = (this.m_barView.transform.Find("Bar").GetComponent("XUISprite") as IXUISprite);
+ this.m_doBtn = (base.PanelObject.transform.Find("Do").GetComponent("XUIButton") as IXUIButton);
+ this.m_doLab = (base.PanelObject.transform.Find("Do/T").GetComponent("XUILabel") as IXUILabel);
+ this.m_successEffectTra = base.PanelObject.transform.Find("Suc");
+ string @string = XSingleton<XStringTable>.singleton.GetString("ArtifactComposeSuccessEffectName");
+ this.m_successFx = XSingleton<XFxMgr>.singleton.CreateUIFx(@string, this.m_successEffectTra, false);
+ this.m_itemView = new EquipSetItemBaseView();
+ this.m_itemView.FindFrom(base.PanelObject.transform);
+ this.m_barFullWidth = this.m_sprBar.spriteWidth;
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ this.FillContent();
+ }
+
+ protected override void OnHide()
+ {
+ base.OnHide();
+ this.HideEffect();
+ bool flag = this.m_successEffectTra != null;
+ if (flag)
+ {
+ this.m_successEffectTra.gameObject.SetActive(false);
+ }
+ base.PanelObject.SetActive(false);
+ this.m_quanlityFx.Reset();
+ }
+
+ public override void StackRefresh()
+ {
+ base.StackRefresh();
+ }
+
+ public override void OnUnload()
+ {
+ base.OnUnload();
+ this.m_doc = null;
+ bool flag = this.m_creatFx != null;
+ if (flag)
+ {
+ XSingleton<XFxMgr>.singleton.DestroyFx(this.m_creatFx, true);
+ this.m_creatFx = null;
+ }
+ bool flag2 = this.m_successFx != null;
+ if (flag2)
+ {
+ XSingleton<XFxMgr>.singleton.DestroyFx(this.m_successFx, true);
+ this.m_successFx = null;
+ }
+ this.m_quanlityFx.Reset();
+ }
+
+ private void FillContent()
+ {
+ bool flag = this.m_itemView.goItem != null;
+ if (flag)
+ {
+ this.m_itemView.goItem.SetActive(false);
+ }
+ }
+
+ public void SetFinishState(bool bFinish)
+ {
+ this.m_barView.SetActive(!bFinish);
+ this.m_successEffectTra.gameObject.SetActive(bFinish);
+ this.m_doBtn.SetVisible(true);
+ if (bFinish)
+ {
+ this.HideEffect();
+ XSingleton<XAudioMgr>.singleton.PlayUISound("Audio/UI/UI_Upgrade_Gear", true, AudioChannel.Action);
+ this.m_textLab.SetText(XStringDefineProxy.GetString("EQUIPCREATE_EQUIPSET_SUCCESS").Replace("{n}", "\n"));
+ this.m_doLab.SetText(XStringDefineProxy.GetString(XStringDefine.COMMON_OK));
+ this.m_doBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnClickButtonOK));
+ }
+ else
+ {
+ this.ShowEffect();
+ this.m_textLab.SetText(XStringDefineProxy.GetString("Artifact_compose_tips"));
+ this.m_doLab.SetText(XStringDefineProxy.GetString(XStringDefine.COMMON_CANCEL));
+ this.m_doBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnClickButtonCancel));
+ }
+ }
+
+ public void SetFinishArtifactInfo(XItem item)
+ {
+ bool flag = this.m_itemView.goItem != null;
+ if (flag)
+ {
+ this.m_itemView.goItem.SetActive(true);
+ }
+ bool flag2 = item != null && item.uid > 0UL && item.itemID > 0;
+ if (flag2)
+ {
+ bool flag3 = base.IsVisible() && this.m_itemView != null;
+ if (flag3)
+ {
+ EquipSetItemBaseView.stEquipInfoParam param;
+ param.isShowTooltip = false;
+ param.playerProf = 0;
+ this.m_itemView.SetItemInfo(item, param, item.bBinding);
+ bool flag4 = item.itemConf != null;
+ if (flag4)
+ {
+ this.SetEffect(this.m_itemView.goItem, item.itemID);
+ }
+ }
+ this.m_itemView.SetFinishItem(item);
+ }
+ }
+
+ private void ShowEffect()
+ {
+ bool flag = this.m_creatFx == null;
+ if (flag)
+ {
+ this.m_creatFx = XSingleton<XFxMgr>.singleton.CreateFx(this.CreatePath, null, true);
+ }
+ else
+ {
+ this.m_creatFx.SetActive(true);
+ }
+ this.m_creatFx.Play(base.PanelObject.transform.Find("Bg"), Vector3.zero, Vector3.one, 1f, true, false);
+ XSingleton<XAudioMgr>.singleton.PlayUISound("Audio/UI/UI_datie", true, AudioChannel.Action);
+ }
+
+ private void SetEffect(GameObject go, int itemId)
+ {
+ bool flag = go == null;
+ if (!flag)
+ {
+ ItemList.RowData itemConf = XBagDocument.GetItemConf(itemId);
+ bool flag2 = itemConf == null;
+ if (!flag2)
+ {
+ ArtifactListTable.RowData artifactListRowData = ArtifactDocument.GetArtifactListRowData((uint)itemId);
+ bool flag3 = artifactListRowData == null;
+ if (!flag3)
+ {
+ ulong key = this.m_artifactBagdoc.MakeKey((uint)itemConf.ItemQuality, artifactListRowData.AttrType);
+ string path;
+ bool flag4 = !this.m_artifactBagdoc.GetArtifactEffectPath(key, out path);
+ if (flag4)
+ {
+ this.m_quanlityFx.Reset();
+ }
+ else
+ {
+ bool flag5 = !this.m_quanlityFx.IsCanReuse(key);
+ if (flag5)
+ {
+ this.m_quanlityFx.SetData(key, go.transform.Find("Icon/Icon/Effects"), path);
+ }
+ }
+ }
+ }
+ }
+ }
+
+ private void HideEffect()
+ {
+ bool flag = this.m_creatFx != null;
+ if (flag)
+ {
+ this.m_creatFx.SetActive(false);
+ this.m_creatFx.Stop();
+ }
+ }
+
+ public void SetBar(int f)
+ {
+ f = Mathf.Clamp(f, 1, 100);
+ this.m_sprBar.spriteWidth = this.m_barFullWidth * f / 100;
+ }
+
+ private bool OnClickButtonOK(IXUIButton btn)
+ {
+ bool flag = this.SetButtonCool(this.m_fCoolTime);
+ bool result;
+ if (flag)
+ {
+ result = false;
+ }
+ else
+ {
+ bool isComposing = this.m_doc.IsComposing;
+ if (isComposing)
+ {
+ result = true;
+ }
+ else
+ {
+ base.SetVisible(false);
+ result = true;
+ }
+ }
+ return result;
+ }
+
+ private bool OnClickButtonCancel(IXUIButton btn)
+ {
+ bool flag = this.SetButtonCool(this.m_fCoolTime);
+ bool result;
+ if (flag)
+ {
+ result = false;
+ }
+ else
+ {
+ bool isComposing = this.m_doc.IsComposing;
+ if (isComposing)
+ {
+ result = true;
+ }
+ else
+ {
+ base.SetVisible(false);
+ result = true;
+ }
+ }
+ return result;
+ }
+
+ private bool SetButtonCool(float time)
+ {
+ float num = Time.realtimeSinceStartup - this.m_fLastClickBtnTime;
+ bool flag = num < time;
+ bool result;
+ if (flag)
+ {
+ result = true;
+ }
+ else
+ {
+ this.m_fLastClickBtnTime = Time.realtimeSinceStartup;
+ result = false;
+ }
+ return result;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/ArtifactComposingHandler.cs.meta b/Client/Assets/Scripts/XMainClient/UI/ArtifactComposingHandler.cs.meta
new file mode 100644
index 00000000..17edbd26
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/ArtifactComposingHandler.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 19c4b74055f562f4e93964a53ac04f96
+timeCreated: 1611403304
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/ArtifactFrameHandler.cs b/Client/Assets/Scripts/XMainClient/UI/ArtifactFrameHandler.cs
new file mode 100644
index 00000000..3a93b956
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/ArtifactFrameHandler.cs
@@ -0,0 +1,381 @@
+using System;
+using System.Collections.Generic;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class ArtifactFrameHandler : DlgHandlerBase
+ {
+ public GameObject[] ArtifactGo
+ {
+ get
+ {
+ return this.m_artifactGo;
+ }
+ }
+
+ protected override string FileName
+ {
+ get
+ {
+ return "ItemNew/ArtifactFrame";
+ }
+ }
+
+ public static int Artifact_Slot_Count = XBagDocument.ArtifactMax;
+
+ private XArtifactAttrView<XAttrPlayerFile> m_artifactAttrHandler;
+
+ private ArtifactBagDocument m_doc;
+
+ public IXUISprite[] m_artifactBg = new IXUISprite[ArtifactFrameHandler.Artifact_Slot_Count];
+
+ public IXUISprite[] m_artifactSlots = new IXUISprite[ArtifactFrameHandler.Artifact_Slot_Count];
+
+ private GameObject[] m_artifactGo = new GameObject[ArtifactFrameHandler.Artifact_Slot_Count];
+
+ private XUIPool m_ItemPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ private Transform TotalAttriPanel;
+
+ private List<uint> m_templateIds = new List<uint>();
+
+ private IXUIButton m_AttriBtn;
+
+ private IXUIButton m_ComposeBtn;
+
+ private ArtifactQuanlityFx[] m_quanlityFx = new ArtifactQuanlityFx[ArtifactFrameHandler.Artifact_Slot_Count];
+
+ private XFx[] m_suitFxs = new XFx[ArtifactFrameHandler.Artifact_Slot_Count];
+
+ private XFx m_suitUltimateFx;
+
+ protected override void Init()
+ {
+ base.Init();
+ this.m_doc = ArtifactBagDocument.Doc;
+ this.m_templateIds.Add(296u);
+ this.m_templateIds.Add(297u);
+ this.m_templateIds.Add(298u);
+ this.m_templateIds.Add(299u);
+ this.TotalAttriPanel = base.PanelObject.transform.Find("Panel/TotalAttriPanel");
+ Transform transform = base.PanelObject.transform.Find("Panel/Artifacts");
+ this.m_ItemPool.SetupPool(transform.gameObject, transform.transform.Find("Tpl").gameObject, (uint)ArtifactFrameHandler.Artifact_Slot_Count, false);
+ this.m_AttriBtn = (base.PanelObject.transform.Find("Panel/AttriBtn").GetComponent("XUIButton") as IXUIButton);
+ this.m_ComposeBtn = (base.PanelObject.transform.Find("Panel/ComposeBtn").GetComponent("XUIButton") as IXUIButton);
+ string prefab_location = string.Empty;
+ for (int i = 0; i < ArtifactFrameHandler.Artifact_Slot_Count; i++)
+ {
+ this.m_artifactGo[i] = this.m_ItemPool.FetchGameObject(false);
+ GameObject gameObject = transform.Find("Artifact" + i).gameObject;
+ this.m_artifactGo[i].transform.localScale = Vector3.one;
+ this.m_artifactGo[i].transform.localPosition = gameObject.transform.localPosition;
+ this.m_artifactSlots[i] = (this.m_artifactGo[i].transform.Find("Icon").GetComponent("XUISprite") as IXUISprite);
+ this.m_artifactBg[i] = (gameObject.transform.GetComponent("XUISprite") as IXUISprite);
+ this.m_quanlityFx[i] = new ArtifactQuanlityFx();
+ bool flag = i < this.m_doc.SuitEffectPosNames.Count;
+ if (flag)
+ {
+ prefab_location = string.Format("Effects/FX_Particle/UIfx/{0}", this.m_doc.SuitEffectPosNames[i]);
+ XFx xfx = XSingleton<XFxMgr>.singleton.CreateFx(prefab_location, null, true);
+ bool flag2 = xfx != null;
+ if (flag2)
+ {
+ this.m_suitFxs[i] = xfx;
+ xfx.SetParent(gameObject.transform);
+ }
+ }
+ }
+ DlgHandlerBase.EnsureCreate<XArtifactAttrView<XAttrPlayerFile>>(ref this.m_artifactAttrHandler, this.TotalAttriPanel, false, this);
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ this.m_AttriBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnAttrBtnClicked));
+ this.m_ComposeBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnComposeBtnClicked));
+ for (int i = 0; i < ArtifactFrameHandler.Artifact_Slot_Count; i++)
+ {
+ this.m_artifactBg[i].ID = (ulong)((long)i);
+ this.m_artifactBg[i].RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnSlotBgClick));
+ this.m_artifactSlots[i].RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnItemClicked));
+ }
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ this.ShowArtifacts();
+ }
+
+ protected override void OnHide()
+ {
+ base.OnHide();
+ this.HideEffects();
+ this.RestQuanlityFx();
+ }
+
+ public override void StackRefresh()
+ {
+ base.StackRefresh();
+ this.HideEffects();
+ }
+
+ public override void OnUnload()
+ {
+ base.OnUnload();
+ this.m_ItemPool.ReturnAll(false);
+ DlgHandlerBase.EnsureUnload<XArtifactAttrView<XAttrPlayerFile>>(ref this.m_artifactAttrHandler);
+ for (int i = 0; i < ArtifactFrameHandler.Artifact_Slot_Count; i++)
+ {
+ bool flag = this.m_suitFxs[i] != null;
+ if (flag)
+ {
+ XSingleton<XFxMgr>.singleton.DestroyFx(this.m_suitFxs[i], true);
+ this.m_suitFxs[i] = null;
+ }
+ bool flag2 = this.m_quanlityFx[i] != null;
+ if (flag2)
+ {
+ this.m_quanlityFx[i].Reset();
+ this.m_quanlityFx[i] = null;
+ }
+ }
+ }
+
+ private void RestQuanlityFx()
+ {
+ for (int i = 0; i < ArtifactFrameHandler.Artifact_Slot_Count; i++)
+ {
+ bool flag = this.m_quanlityFx[i] != null;
+ if (flag)
+ {
+ this.m_quanlityFx[i].Reset();
+ }
+ }
+ }
+
+ public void HideEffects()
+ {
+ for (int i = 0; i < ArtifactFrameHandler.Artifact_Slot_Count; i++)
+ {
+ bool flag = this.m_suitFxs[i] != null;
+ if (flag)
+ {
+ this.m_suitFxs[i].SetActive(false);
+ }
+ }
+ bool flag2 = this.m_suitUltimateFx != null;
+ if (flag2)
+ {
+ this.m_suitUltimateFx.SetActive(false);
+ }
+ }
+
+ public void ShowArtifacts()
+ {
+ XBodyBag artifactBag = XSingleton<XGame>.singleton.Doc.XBagDoc.ArtifactBag;
+ for (int i = XBagDocument.BodyPosition<ArtifactPosition>(ArtifactPosition.ARTIFACT_START); i < XBagDocument.BodyPosition<ArtifactPosition>(ArtifactPosition.ARTIFACT_END); i++)
+ {
+ XItemDrawerMgr.Param.bHideBinding = true;
+ XSingleton<XItemDrawerMgr>.singleton.DrawItem(this.m_artifactGo[i], artifactBag[i]);
+ this.m_artifactGo[i].transform.Find("Icon/RedPoint").gameObject.SetActive(false);
+ bool flag = artifactBag[i] != null && artifactBag[i].itemConf != null;
+ if (flag)
+ {
+ this.SetEffect(this.m_artifactGo[i], artifactBag[i].itemID, i);
+ }
+ this.m_artifactSlots[i].ID = ((artifactBag[i] != null) ? artifactBag[i].uid : 0UL);
+ }
+ }
+
+ public void SetEquipSlot(int slot, XItem item)
+ {
+ XItemDrawerMgr.Param.bHideBinding = true;
+ XSingleton<XItemDrawerMgr>.singleton.DrawItem(this.m_artifactGo[slot], item);
+ this.m_artifactGo[slot].transform.Find("Icon/RedPoint").gameObject.SetActive(false);
+ bool flag = item != null && item.itemConf != null;
+ if (flag)
+ {
+ this.SetEffect(this.m_artifactGo[slot], item.itemID, slot);
+ }
+ this.m_artifactSlots[slot].ID = ((item != null) ? item.uid : 0UL);
+ }
+
+ public void UpdateEquipSlot(XItem item)
+ {
+ bool flag = item == null;
+ if (!flag)
+ {
+ ArtifactListTable.RowData artifactListRowData = ArtifactDocument.GetArtifactListRowData((uint)item.itemID);
+ bool flag2 = artifactListRowData == null;
+ if (!flag2)
+ {
+ bool flag3 = this.m_artifactSlots[(int)artifactListRowData.ArtifactPos].ID == item.uid;
+ if (flag3)
+ {
+ XItemDrawerMgr.Param.bHideBinding = true;
+ XSingleton<XItemDrawerMgr>.singleton.DrawItem(this.m_artifactGo[(int)artifactListRowData.ArtifactPos], item);
+ this.m_artifactGo[(int)artifactListRowData.ArtifactPos].transform.Find("Icon/RedPoint").gameObject.SetActive(false);
+ bool flag4 = item.itemConf != null;
+ if (flag4)
+ {
+ this.SetEffect(this.m_artifactGo[(int)artifactListRowData.ArtifactPos], item.itemID, (int)artifactListRowData.ArtifactPos);
+ }
+ }
+ }
+ }
+ }
+
+ public void PlaySuitFx(uint suitId)
+ {
+ bool flag = DlgBase<ArtifactDeityStoveDlg, TabDlgBehaviour>.singleton.IsVisible();
+ if (!flag)
+ {
+ this.HideEffects();
+ XBodyBag artifactBag = XSingleton<XGame>.singleton.Doc.XBagDoc.ArtifactBag;
+ int num = 0;
+ for (int i = XBagDocument.BodyPosition<ArtifactPosition>(ArtifactPosition.ARTIFACT_START); i < XBagDocument.BodyPosition<ArtifactPosition>(ArtifactPosition.ARTIFACT_END); i++)
+ {
+ bool flag2 = artifactBag[i] == null;
+ if (!flag2)
+ {
+ ArtifactListTable.RowData artifactListRowData = ArtifactDocument.GetArtifactListRowData((uint)artifactBag[i].itemID);
+ bool flag3 = artifactListRowData == null;
+ if (!flag3)
+ {
+ bool flag4 = artifactListRowData.ArtifactSuit == suitId;
+ if (flag4)
+ {
+ bool flag5 = this.m_suitFxs.Length > i && this.m_suitFxs[i] != null;
+ if (flag5)
+ {
+ num++;
+ this.m_suitFxs[i].SetActive(true);
+ }
+ }
+ }
+ }
+ }
+ ArtifactSuit suitBySuitId = ArtifactDocument.SuitMgr.GetSuitBySuitId(suitId);
+ bool flag6 = (long)num == (long)((ulong)suitBySuitId.MaxSuitEffectCount);
+ if (flag6)
+ {
+ bool flag7 = this.m_suitUltimateFx == null;
+ if (flag7)
+ {
+ this.m_suitUltimateFx = XSingleton<XFxMgr>.singleton.CreateFx(string.Format("Effects/FX_Particle/UIfx/{0}", XSingleton<XStringTable>.singleton.GetString("ArtifactSuitUltimateFxName")), null, true);
+ }
+ else
+ {
+ this.m_suitUltimateFx.SetActive(true);
+ }
+ this.m_suitUltimateFx.Play(base.PanelObject.transform.Find("Panel/Artifacts"), Vector3.zero, Vector3.one, 1f, true, false);
+ }
+ }
+ }
+
+ private void SetEffect(GameObject go, int itemId, int slot)
+ {
+ bool flag = slot >= this.m_quanlityFx.Length;
+ if (!flag)
+ {
+ bool flag2 = go == null;
+ if (!flag2)
+ {
+ ItemList.RowData itemConf = XBagDocument.GetItemConf(itemId);
+ bool flag3 = itemConf == null;
+ if (!flag3)
+ {
+ ArtifactListTable.RowData artifactListRowData = ArtifactDocument.GetArtifactListRowData((uint)itemId);
+ bool flag4 = artifactListRowData == null;
+ if (!flag4)
+ {
+ ArtifactQuanlityFx artifactQuanlityFx = this.m_quanlityFx[slot];
+ bool flag5 = artifactQuanlityFx == null;
+ if (flag5)
+ {
+ artifactQuanlityFx = new ArtifactQuanlityFx();
+ this.m_quanlityFx[slot] = artifactQuanlityFx;
+ }
+ ulong key = this.m_doc.MakeKey((uint)itemConf.ItemQuality, artifactListRowData.AttrType);
+ string path;
+ bool flag6 = !this.m_doc.GetArtifactEffectPath(key, out path);
+ if (flag6)
+ {
+ artifactQuanlityFx.Reset();
+ }
+ else
+ {
+ bool flag7 = !artifactQuanlityFx.IsCanReuse(key);
+ if (flag7)
+ {
+ artifactQuanlityFx.SetData(key, go.transform.Find("Icon/Icon/Effects"), path);
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+
+ private void OnSlotBgClick(IXUISprite spr)
+ {
+ uint num = (uint)spr.ID;
+ bool flag = this.m_doc.IsHadThisPosArtifact(num);
+ if (flag)
+ {
+ string artifactPartName = XSingleton<UiUtility>.singleton.GetArtifactPartName((ArtifactPosition)num, true);
+ XSingleton<UiUtility>.singleton.ShowSystemTip(string.Format(XSingleton<XStringTable>.singleton.GetString("ArtifactPosClickPos"), artifactPartName), "fece00");
+ }
+ else
+ {
+ bool flag2 = (ulong)num < (ulong)((long)this.m_templateIds.Count);
+ if (flag2)
+ {
+ this.HideEffects();
+ XSingleton<UiUtility>.singleton.ShowItemAccess((int)this.m_templateIds[(int)num], null);
+ }
+ }
+ }
+
+ public bool OnAttrBtnClicked(IXUIButton button)
+ {
+ this.HideEffects();
+ this.m_artifactAttrHandler.SetBaseData(XSingleton<XGame>.singleton.Doc.XBagDoc.ArtifactBag);
+ this.m_artifactAttrHandler.SetVisible(true);
+ return true;
+ }
+
+ public bool OnComposeBtnClicked(IXUIButton button)
+ {
+ this.HideEffects();
+ DlgBase<ArtifactDeityStoveDlg, TabDlgBehaviour>.singleton.ShowWorkGameSystem(XSysDefine.XSys_Artifact_DeityStove);
+ return true;
+ }
+
+ public void OnItemClicked(IXUISprite iSp)
+ {
+ XItem itemByUID = XSingleton<XGame>.singleton.Doc.XBagDoc.GetItemByUID(iSp.ID);
+ bool flag = itemByUID != null;
+ if (flag)
+ {
+ this.HideEffects();
+ XBodyBag bodyBag = itemByUID.Description.BodyBag;
+ bool flag2 = bodyBag != null && bodyBag.HasItem(itemByUID.uid);
+ if (flag2)
+ {
+ XSingleton<TooltipParam>.singleton.bEquiped = true;
+ XSingleton<UiUtility>.singleton.ShowTooltipDialog(itemByUID, null, iSp, true, 0u);
+ }
+ else
+ {
+ XSingleton<UiUtility>.singleton.ShowTooltipDialogWithSearchingCompare(itemByUID, iSp, true, 0u);
+ }
+ }
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/ArtifactFrameHandler.cs.meta b/Client/Assets/Scripts/XMainClient/UI/ArtifactFrameHandler.cs.meta
new file mode 100644
index 00000000..1b4b1cc5
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/ArtifactFrameHandler.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 8ac9f8ea89dad2842bf32989d800df69
+timeCreated: 1611404093
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/ArtifactFuseHandler.cs b/Client/Assets/Scripts/XMainClient/UI/ArtifactFuseHandler.cs
new file mode 100644
index 00000000..07c34e9f
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/ArtifactFuseHandler.cs
@@ -0,0 +1,504 @@
+using System;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class ArtifactFuseHandler : DlgHandlerBase
+ {
+ private string SucEffectPath
+ {
+ get
+ {
+ bool flag = string.IsNullOrEmpty(this.m_sucEffectPath);
+ if (flag)
+ {
+ this.m_sucEffectPath = XSingleton<XGlobalConfig>.singleton.GetValue("FuseSucEffectPath");
+ }
+ return this.m_sucEffectPath;
+ }
+ }
+
+ private string FailEffectPath
+ {
+ get
+ {
+ bool flag = string.IsNullOrEmpty(this.m_failEffectPath);
+ if (flag)
+ {
+ this.m_failEffectPath = XSingleton<XGlobalConfig>.singleton.GetValue("FuseFailEffectPath");
+ }
+ return this.m_failEffectPath;
+ }
+ }
+
+ private string EffectPath
+ {
+ get
+ {
+ bool flag = string.IsNullOrEmpty(this.m_effectPath);
+ if (flag)
+ {
+ this.m_effectPath = XSingleton<XGlobalConfig>.singleton.GetValue("FuseEffectPath");
+ }
+ return this.m_effectPath;
+ }
+ }
+
+ protected override string FileName
+ {
+ get
+ {
+ return "ItemNew/ArtifactFuseHandler";
+ }
+ }
+
+ private ArtifactFuseDocument m_doc;
+
+ private bool m_bMatIsEnough = false;
+
+ private int m_needItemId = 0;
+
+ private GameObject m_itemGo1;
+
+ private GameObject m_itemGo2;
+
+ private GameObject m_itemGo3;
+
+ private Transform m_effectTra;
+
+ private IXUISprite m_boxSpr1;
+
+ private IXUISprite m_boxSpr2;
+
+ private IXUICheckBox m_checkBox;
+
+ private IXUIButton m_fuseBtn;
+
+ private IXUILabel m_rateLab;
+
+ private XFx m_fx;
+
+ private XFx m_sucFx;
+
+ private XFx m_failFx;
+
+ private uint m_token = 0u;
+
+ private float m_lastTime = 1f;
+
+ private bool m_bIsPlayingEffect = false;
+
+ private string m_sucEffectPath = string.Empty;
+
+ private string m_failEffectPath = string.Empty;
+
+ private string m_effectPath = string.Empty;
+
+ protected override void Init()
+ {
+ base.Init();
+ this.m_doc = ArtifactFuseDocument.Doc;
+ this.m_doc.Handler = this;
+ Transform transform = base.PanelObject.transform.Find("Bg1");
+ this.m_rateLab = (transform.Find("ossd").GetComponent("XUILabel") as IXUILabel);
+ this.m_itemGo1 = transform.Find("item1").gameObject;
+ this.m_itemGo2 = transform.Find("item2").gameObject;
+ this.m_itemGo3 = transform.Find("item3").gameObject;
+ this.m_boxSpr1 = (transform.Find("BgBox1").GetComponent("XUISprite") as IXUISprite);
+ this.m_boxSpr2 = (transform.Find("BgBox2").GetComponent("XUISprite") as IXUISprite);
+ this.m_checkBox = (transform.Find("BtnUse").GetComponent("XUICheckBox") as IXUICheckBox);
+ this.m_fuseBtn = (transform.Find("Get").GetComponent("XUIButton") as IXUIButton);
+ this.m_effectTra = transform.Find("Effect");
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ this.m_boxSpr1.ID = 1UL;
+ this.m_boxSpr1.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnClickBox));
+ this.m_boxSpr2.ID = 2UL;
+ this.m_boxSpr2.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnClickBox));
+ this.m_checkBox.RegisterOnCheckEventHandler(new CheckBoxOnCheckEventHandler(this.OnClickToggle));
+ this.m_fuseBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnClickFuseBtn));
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ this.FillContent();
+ }
+
+ protected override void OnHide()
+ {
+ base.OnHide();
+ XSingleton<XTimerMgr>.singleton.KillTimer(this.m_token);
+ this.StopEffect();
+ }
+
+ public override void StackRefresh()
+ {
+ base.StackRefresh();
+ }
+
+ public override void OnUnload()
+ {
+ base.OnUnload();
+ this.m_doc.Handler = null;
+ bool flag = this.m_fx != null;
+ if (flag)
+ {
+ XSingleton<XFxMgr>.singleton.DestroyFx(this.m_fx, true);
+ this.m_fx = null;
+ }
+ bool flag2 = this.m_sucFx != null;
+ if (flag2)
+ {
+ XSingleton<XFxMgr>.singleton.DestroyFx(this.m_sucFx, true);
+ this.m_sucFx = null;
+ }
+ bool flag3 = this.m_failFx != null;
+ if (flag3)
+ {
+ XSingleton<XFxMgr>.singleton.DestroyFx(this.m_failFx, true);
+ this.m_failFx = null;
+ }
+ XSingleton<XTimerMgr>.singleton.KillTimer(this.m_token);
+ }
+
+ public void RefreshUi(FuseEffectType type)
+ {
+ this.FillContent();
+ bool flag = type > FuseEffectType.None;
+ if (flag)
+ {
+ this.PlayEffect(type);
+ }
+ }
+
+ private void FillContent()
+ {
+ bool flag = this.m_doc.FuseUid == 0UL;
+ if (flag)
+ {
+ XSingleton<XItemDrawerMgr>.singleton.DrawItem(this.m_itemGo1, null);
+ }
+ else
+ {
+ XItem itemByUID = XBagDocument.BagDoc.GetItemByUID(this.m_doc.FuseUid);
+ XSingleton<XItemDrawerMgr>.singleton.DrawItem(this.m_itemGo1, itemByUID);
+ IXUISprite ixuisprite = this.m_itemGo1.transform.Find("Icon").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.ID = this.m_doc.FuseUid;
+ ixuisprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnClickTips));
+ }
+ bool flag2 = this.m_doc.FusedUid == 0UL;
+ if (flag2)
+ {
+ XSingleton<XItemDrawerMgr>.singleton.DrawItem(this.m_itemGo2, null);
+ }
+ else
+ {
+ XItem itemByUID2 = XBagDocument.BagDoc.GetItemByUID(this.m_doc.FusedUid);
+ XSingleton<XItemDrawerMgr>.singleton.DrawItem(this.m_itemGo2, itemByUID2);
+ IXUISprite ixuisprite2 = this.m_itemGo2.transform.Find("Icon").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite2.ID = this.m_doc.FusedUid;
+ ixuisprite2.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnClickTips));
+ }
+ bool flag3 = this.m_doc.FusedUid != 0UL && this.m_doc.FuseUid > 0UL;
+ if (flag3)
+ {
+ bool flag4 = this.m_fx == null;
+ if (flag4)
+ {
+ this.m_fx = XSingleton<XFxMgr>.singleton.CreateFx(this.EffectPath, null, true);
+ }
+ else
+ {
+ this.m_fx.SetActive(true);
+ }
+ this.m_fx.Play(this.m_effectTra, Vector3.zero, Vector3.one, 1f, true, false);
+ }
+ else
+ {
+ bool flag5 = this.m_fx != null;
+ if (flag5)
+ {
+ this.m_fx.SetActive(false);
+ }
+ }
+ this.m_checkBox.ForceSetFlag(this.m_doc.UseFuseStone);
+ this.FillNeedItem();
+ }
+
+ private void FillNeedItem()
+ {
+ IXUILabel ixuilabel = this.m_itemGo3.transform.Find("Num").GetComponent("XUILabel") as IXUILabel;
+ bool flag = this.m_doc.FuseUid == 0UL;
+ int num;
+ if (flag)
+ {
+ num = this.m_doc.FuseStoneItemId;
+ XSingleton<XItemDrawerMgr>.singleton.normalItemDrawer.DrawItem(this.m_itemGo3, num, 2, false);
+ ulong itemCount = XBagDocument.BagDoc.GetItemCount(num);
+ ixuilabel.SetText(string.Format("{0}/?", itemCount));
+ this.m_rateLab.SetText(string.Format(XSingleton<XStringTable>.singleton.GetString("FuseRateSucRate"), "?"));
+ this.m_bMatIsEnough = false;
+ }
+ else
+ {
+ XItem itemByUID = XBagDocument.BagDoc.GetItemByUID(this.m_doc.FuseUid);
+ bool flag2 = itemByUID == null;
+ if (flag2)
+ {
+ XSingleton<XDebug>.singleton.AddErrorLog("m_doc.FuseUid = {0} not find" + this.m_doc.FuseUid.ToString(), null, null, null, null, null);
+ return;
+ }
+ ArtifactListTable.RowData artifactListRowData = ArtifactDocument.GetArtifactListRowData((uint)itemByUID.itemID);
+ bool flag3 = artifactListRowData == null;
+ if (flag3)
+ {
+ XSingleton<XDebug>.singleton.AddErrorLog(string.Format("artifactlist not find this itemId = {0}", itemByUID.itemID), null, null, null, null, null);
+ return;
+ }
+ num = (int)artifactListRowData.FuseMaterials[0, 0];
+ XSingleton<XItemDrawerMgr>.singleton.normalItemDrawer.DrawItem(this.m_itemGo3, num, 2, false);
+ ulong itemCount2 = XBagDocument.BagDoc.GetItemCount(num);
+ this.m_bMatIsEnough = (itemCount2 >= (ulong)artifactListRowData.FuseMaterials[0, 1]);
+ bool bMatIsEnough = this.m_bMatIsEnough;
+ if (bMatIsEnough)
+ {
+ ixuilabel.SetText(string.Format("[00ff00]{0}/{1}[-]", itemCount2, artifactListRowData.FuseMaterials[0, 1]));
+ }
+ else
+ {
+ ixuilabel.SetText(string.Format("[ff0000]{0}/{1}[-]", itemCount2, artifactListRowData.FuseMaterials[0, 1]));
+ }
+ bool useFuseStone = this.m_doc.UseFuseStone;
+ if (useFuseStone)
+ {
+ this.m_rateLab.SetText(string.Format(XSingleton<XStringTable>.singleton.GetString("FuseRateSucRate"), artifactListRowData.FuseSucRateUseStone));
+ }
+ else
+ {
+ this.m_bMatIsEnough = true;
+ this.m_rateLab.SetText(string.Format(XSingleton<XStringTable>.singleton.GetString("FuseRateSucRate"), artifactListRowData.FuseSucRate[0]));
+ }
+ }
+ this.m_needItemId = num;
+ IXUISprite ixuisprite = this.m_itemGo3.transform.Find("Icon").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.ID = (ulong)((long)num);
+ ixuisprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnClickTips));
+ ixuisprite = (this.m_itemGo3.transform.Find("Icon/Icon").GetComponent("XUISprite") as IXUISprite);
+ ixuisprite.SetGrey(this.m_doc.FuseUid > 0UL);
+ ixuisprite = (this.m_itemGo3.transform.Find("Quality").GetComponent("XUISprite") as IXUISprite);
+ ixuisprite.SetGrey(this.m_doc.FuseUid > 0UL);
+ }
+
+ private void PlayEffect(FuseEffectType type)
+ {
+ bool flag = type == FuseEffectType.Sucess;
+ if (flag)
+ {
+ bool flag2 = this.m_sucFx == null;
+ if (flag2)
+ {
+ this.m_sucFx = XSingleton<XFxMgr>.singleton.CreateFx(this.SucEffectPath, null, true);
+ }
+ else
+ {
+ this.m_sucFx.SetActive(true);
+ }
+ this.m_sucFx.Play(base.PanelObject.transform, Vector3.zero, Vector3.one, 1f, true, false);
+ this.m_bIsPlayingEffect = true;
+ }
+ else
+ {
+ bool flag3 = type == FuseEffectType.Fail;
+ if (flag3)
+ {
+ bool flag4 = this.m_failFx == null;
+ if (flag4)
+ {
+ this.m_failFx = XSingleton<XFxMgr>.singleton.CreateFx(this.FailEffectPath, null, true);
+ }
+ else
+ {
+ this.m_failFx.SetActive(true);
+ }
+ this.m_failFx.Play(base.PanelObject.transform, Vector3.zero, Vector3.one, 1f, true, false);
+ this.m_bIsPlayingEffect = true;
+ }
+ }
+ XSingleton<XTimerMgr>.singleton.KillTimer(this.m_token);
+ this.m_token = XSingleton<XTimerMgr>.singleton.SetTimer(this.m_lastTime, new XTimerMgr.ElapsedEventHandler(this.OnEffectEnd), null);
+ }
+
+ private void OnEffectEnd(object o = null)
+ {
+ bool flag = this.m_sucFx != null;
+ if (flag)
+ {
+ this.m_sucFx.SetActive(false);
+ }
+ bool flag2 = this.m_failFx != null;
+ if (flag2)
+ {
+ this.m_failFx.SetActive(false);
+ }
+ this.m_bIsPlayingEffect = false;
+ }
+
+ private void StopEffect()
+ {
+ bool flag = this.m_sucFx != null;
+ if (flag)
+ {
+ this.m_sucFx.SetActive(false);
+ }
+ bool flag2 = this.m_failFx != null;
+ if (flag2)
+ {
+ this.m_failFx.SetActive(false);
+ }
+ bool flag3 = this.m_fx != null;
+ if (flag3)
+ {
+ this.m_fx.SetActive(false);
+ }
+ }
+
+ private bool OnClickFuseBtn(IXUIButton btn)
+ {
+ bool bIsPlayingEffect = this.m_bIsPlayingEffect;
+ bool result;
+ if (bIsPlayingEffect)
+ {
+ result = false;
+ }
+ else
+ {
+ bool flag = this.m_doc.FuseUid == 0UL;
+ if (flag)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString("FuseTips1"), "fece00");
+ result = false;
+ }
+ else
+ {
+ bool flag2 = this.m_doc.FusedUid == 0UL;
+ if (flag2)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString("FuseTips2"), "fece00");
+ result = false;
+ }
+ else
+ {
+ bool flag3 = !this.m_bMatIsEnough;
+ if (flag3)
+ {
+ DlgBase<ArtifactDeityStoveDlg, TabDlgBehaviour>.singleton.SetVisible(false, true);
+ XSingleton<UiUtility>.singleton.ShowItemAccess(this.m_needItemId, null);
+ result = false;
+ }
+ else
+ {
+ XOptionsDocument specificDocument = XDocuments.GetSpecificDocument<XOptionsDocument>(XOptionsDocument.uuID);
+ bool flag4 = specificDocument.GetValue(XOptionsDefine.OD_NO_FUSE_CONFIRM) == 1;
+ if (flag4)
+ {
+ this.m_doc.ReqFuse();
+ }
+ else
+ {
+ bool useFuseStone = this.m_doc.UseFuseStone;
+ string @string;
+ if (useFuseStone)
+ {
+ @string = XStringDefineProxy.GetString("FuseEnsureTips2");
+ }
+ else
+ {
+ @string = XStringDefineProxy.GetString("FuseEnsureTips1");
+ }
+ XSingleton<UiUtility>.singleton.ShowModalDialog(@string, XStringDefineProxy.GetString(XStringDefine.COMMON_OK), XStringDefineProxy.GetString(XStringDefine.COMMON_CANCEL), new ButtonClickEventHandler(this.DoOK), new ButtonClickEventHandler(this.DoCancel), false, XTempTipDefine.OD_FUSE_CONFIRM, 50);
+ }
+ result = true;
+ }
+ }
+ }
+ }
+ return result;
+ }
+
+ private bool DoOK(IXUIButton btn)
+ {
+ bool flag = DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.IsVisible();
+ if (flag)
+ {
+ XOptionsDocument specificDocument = XDocuments.GetSpecificDocument<XOptionsDocument>(XOptionsDocument.uuID);
+ specificDocument.SetValue(XOptionsDefine.OD_NO_FUSE_CONFIRM, DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.GetTempTip(XTempTipDefine.OD_FUSE_CONFIRM) ? 1 : 0, false);
+ }
+ XSingleton<UiUtility>.singleton.CloseModalDlg();
+ this.m_doc.ReqFuse();
+ return true;
+ }
+
+ private bool DoCancel(IXUIButton btn)
+ {
+ XOptionsDocument specificDocument = XDocuments.GetSpecificDocument<XOptionsDocument>(XOptionsDocument.uuID);
+ specificDocument.SetValue(XOptionsDefine.OD_NO_FUSE_CONFIRM, DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.GetTempTip(XTempTipDefine.OD_FUSE_CONFIRM) ? 1 : 0, false);
+ XSingleton<UiUtility>.singleton.CloseModalDlg();
+ return true;
+ }
+
+ private void OnClickBox(IXUISprite spr)
+ {
+ bool flag = spr.ID == 1UL;
+ if (flag)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString("FuseTips1"), "fece00");
+ }
+ else
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString("FuseTips2"), "fece00");
+ }
+ }
+
+ private void OnClickTips(IXUISprite spr)
+ {
+ bool flag = spr.ID == 0UL;
+ if (!flag)
+ {
+ XItem xitem = XBagDocument.BagDoc.GetItemByUID(spr.ID);
+ bool flag2 = xitem == null;
+ if (flag2)
+ {
+ xitem = XBagDocument.MakeXItem((int)spr.ID, false);
+ }
+ bool flag3 = xitem == null;
+ if (!flag3)
+ {
+ bool flag4 = xitem.Type == ItemType.ARTIFACT;
+ if (flag4)
+ {
+ XSingleton<TooltipParam>.singleton.bShowTakeOutBtn = true;
+ }
+ XSingleton<UiUtility>.singleton.ShowTooltipDialog(xitem, null, spr, true, 0u);
+ }
+ }
+ }
+
+ private bool OnClickToggle(IXUICheckBox box)
+ {
+ bool flag = box.bChecked != this.m_doc.UseFuseStone;
+ if (flag)
+ {
+ this.m_doc.UseFuseStone = box.bChecked;
+ this.FillNeedItem();
+ }
+ return true;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/ArtifactFuseHandler.cs.meta b/Client/Assets/Scripts/XMainClient/UI/ArtifactFuseHandler.cs.meta
new file mode 100644
index 00000000..a60d4f7a
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/ArtifactFuseHandler.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 6aa71b04ae912aa4796884f6eaa07ef9
+timeCreated: 1611403889
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/ArtifactInscriptionHandler.cs b/Client/Assets/Scripts/XMainClient/UI/ArtifactInscriptionHandler.cs
new file mode 100644
index 00000000..7757d2b7
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/ArtifactInscriptionHandler.cs
@@ -0,0 +1,239 @@
+using System;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class ArtifactInscriptionHandler : DlgHandlerBase
+ {
+ private string EffectPath
+ {
+ get
+ {
+ bool flag = string.IsNullOrEmpty(this.m_effectPath);
+ if (flag)
+ {
+ this.m_effectPath = XSingleton<XGlobalConfig>.singleton.GetValue("InscriptionEffectPath");
+ }
+ return this.m_effectPath;
+ }
+ }
+
+ protected override string FileName
+ {
+ get
+ {
+ return "ItemNew/ArtifactInscriptionHandler";
+ }
+ }
+
+ private ArtifactInscriptionDocument m_doc;
+
+ private GameObject m_itemGo1;
+
+ private GameObject m_itemGo2;
+
+ private Transform m_effectTra;
+
+ private IXUISprite m_boxSpr1;
+
+ private IXUISprite m_boxSpr2;
+
+ private IXUIButton m_inscriptionBtn;
+
+ private XFx m_fx;
+
+ private string m_effectPath = string.Empty;
+
+ protected override void Init()
+ {
+ base.Init();
+ this.m_doc = ArtifactInscriptionDocument.Doc;
+ this.m_doc.Handler = this;
+ Transform transform = base.PanelObject.transform.Find("Bg1");
+ this.m_itemGo1 = transform.Find("item0").gameObject;
+ this.m_itemGo2 = transform.Find("item1").gameObject;
+ this.m_boxSpr1 = (transform.Find("BgBox1").GetComponent("XUISprite") as IXUISprite);
+ this.m_boxSpr2 = (transform.Find("BgBox2").GetComponent("XUISprite") as IXUISprite);
+ this.m_inscriptionBtn = (transform.Find("Get").GetComponent("XUIButton") as IXUIButton);
+ this.m_effectTra = transform.Find("Effect");
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ this.m_boxSpr1.ID = 1UL;
+ this.m_boxSpr1.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnClickBox));
+ this.m_boxSpr2.ID = 2UL;
+ this.m_boxSpr2.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnClickBox));
+ this.m_inscriptionBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnClickInscriptionBtn));
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ this.FillContent();
+ }
+
+ protected override void OnHide()
+ {
+ base.OnHide();
+ bool flag = this.m_fx != null;
+ if (flag)
+ {
+ this.m_fx.Stop();
+ }
+ }
+
+ public override void StackRefresh()
+ {
+ base.StackRefresh();
+ }
+
+ public override void OnUnload()
+ {
+ base.OnUnload();
+ this.m_doc.Handler = null;
+ bool flag = this.m_fx != null;
+ if (flag)
+ {
+ XSingleton<XFxMgr>.singleton.DestroyFx(this.m_fx, true);
+ this.m_fx = null;
+ }
+ }
+
+ public void RefreshUi()
+ {
+ this.FillContent();
+ }
+
+ private void FillContent()
+ {
+ XItem xitem = XBagDocument.BagDoc.GetItemByUID(this.m_doc.ArtifactUid);
+ bool flag = xitem == null;
+ if (flag)
+ {
+ XSingleton<XItemDrawerMgr>.singleton.DrawItem(this.m_itemGo1, null);
+ }
+ else
+ {
+ XSingleton<XItemDrawerMgr>.singleton.DrawItem(this.m_itemGo1, xitem);
+ IXUISprite ixuisprite = this.m_itemGo1.transform.Find("Icon").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.ID = this.m_doc.ArtifactUid;
+ ixuisprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnClickTips));
+ }
+ xitem = XBagDocument.BagDoc.GetBagItemByUID(this.m_doc.InscriptionUid);
+ bool flag2 = xitem == null;
+ if (flag2)
+ {
+ XSingleton<XItemDrawerMgr>.singleton.DrawItem(this.m_itemGo2, null);
+ }
+ else
+ {
+ XSingleton<XItemDrawerMgr>.singleton.DrawItem(this.m_itemGo2, xitem);
+ IXUISprite ixuisprite2 = this.m_itemGo2.transform.Find("Icon").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite2.ID = this.m_doc.InscriptionUid;
+ ixuisprite2.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnClickTips));
+ }
+ bool flag3 = this.m_doc.ArtifactUid != 0UL && this.m_doc.InscriptionUid > 0UL;
+ if (flag3)
+ {
+ bool flag4 = this.m_fx == null;
+ if (flag4)
+ {
+ this.m_fx = XSingleton<XFxMgr>.singleton.CreateFx(this.EffectPath, null, true);
+ }
+ else
+ {
+ this.m_fx.SetActive(true);
+ }
+ this.m_fx.Play(this.m_effectTra, Vector3.zero, Vector3.one, 1f, true, false);
+ }
+ else
+ {
+ bool flag5 = this.m_fx != null;
+ if (flag5)
+ {
+ this.m_fx.SetActive(false);
+ }
+ }
+ }
+
+ private bool OnClickInscriptionBtn(IXUIButton btn)
+ {
+ bool flag = this.m_doc.ArtifactUid == 0UL || this.m_doc.InscriptionUid == 0UL;
+ bool result;
+ if (flag)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString("InscriptionTips1"), "fece00");
+ result = false;
+ }
+ else
+ {
+ XOptionsDocument specificDocument = XDocuments.GetSpecificDocument<XOptionsDocument>(XOptionsDocument.uuID);
+ bool flag2 = specificDocument.GetValue(XOptionsDefine.OD_NO_INSCRIPTION_CONFIRM) == 1;
+ if (flag2)
+ {
+ this.m_doc.ReqInscription();
+ }
+ else
+ {
+ XSingleton<UiUtility>.singleton.ShowModalDialog(XSingleton<XStringTable>.singleton.GetString("InscriptionTips2"), XStringDefineProxy.GetString(XStringDefine.COMMON_OK), XStringDefineProxy.GetString(XStringDefine.COMMON_CANCEL), new ButtonClickEventHandler(this.DoOK), new ButtonClickEventHandler(this.DoCancel), false, XTempTipDefine.OD_INSCRIPTION_CONFIRM, 50);
+ }
+ result = true;
+ }
+ return result;
+ }
+
+ private bool DoOK(IXUIButton btn)
+ {
+ bool flag = DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.IsVisible();
+ if (flag)
+ {
+ XOptionsDocument specificDocument = XDocuments.GetSpecificDocument<XOptionsDocument>(XOptionsDocument.uuID);
+ specificDocument.SetValue(XOptionsDefine.OD_NO_INSCRIPTION_CONFIRM, DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.GetTempTip(XTempTipDefine.OD_INSCRIPTION_CONFIRM) ? 1 : 0, false);
+ }
+ XSingleton<UiUtility>.singleton.CloseModalDlg();
+ this.m_doc.ReqInscription();
+ return true;
+ }
+
+ private bool DoCancel(IXUIButton btn)
+ {
+ XOptionsDocument specificDocument = XDocuments.GetSpecificDocument<XOptionsDocument>(XOptionsDocument.uuID);
+ specificDocument.SetValue(XOptionsDefine.OD_NO_INSCRIPTION_CONFIRM, DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.GetTempTip(XTempTipDefine.OD_INSCRIPTION_CONFIRM) ? 1 : 0, false);
+ XSingleton<UiUtility>.singleton.CloseModalDlg();
+ return true;
+ }
+
+ private void OnClickBox(IXUISprite spr)
+ {
+ bool flag = spr.ID == 1UL;
+ if (flag)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString("InscriptionPutInTips1"), "fece00");
+ }
+ else
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString("InscriptionPutInTips2"), "fece00");
+ }
+ }
+
+ private void OnClickTips(IXUISprite spr)
+ {
+ bool flag = spr.ID == 0UL;
+ if (!flag)
+ {
+ XItem xitem = XBagDocument.BagDoc.GetItemByUID(spr.ID);
+ bool flag2 = xitem == null;
+ if (flag2)
+ {
+ xitem = XBagDocument.MakeXItem((int)spr.ID, false);
+ }
+ XSingleton<UiUtility>.singleton.ShowTooltipDialog(xitem, null, spr, false, 0u);
+ }
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/ArtifactInscriptionHandler.cs.meta b/Client/Assets/Scripts/XMainClient/UI/ArtifactInscriptionHandler.cs.meta
new file mode 100644
index 00000000..50870eb4
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/ArtifactInscriptionHandler.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 2763a5d0a10dc1141a878548569c05f0
+timeCreated: 1611403471
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/ArtifactItemsHandler.cs b/Client/Assets/Scripts/XMainClient/UI/ArtifactItemsHandler.cs
new file mode 100644
index 00000000..932f1ee6
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/ArtifactItemsHandler.cs
@@ -0,0 +1,229 @@
+using System;
+using System.Collections.Generic;
+using UILib;
+using UnityEngine;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class ArtifactItemsHandler : DlgHandlerBase
+ {
+ protected override string FileName
+ {
+ get
+ {
+ return "ItemNew/ArtifactItemsHandler";
+ }
+ }
+
+ private ArtifactDeityStoveDocument m_doc;
+
+ private XBagWindow m_bagWindow;
+
+ private IXUICheckBox m_curSelectToggle;
+
+ private IXUIScrollView m_scrollView;
+
+ private XUIPool m_tabsPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ protected override void Init()
+ {
+ base.Init();
+ Transform transform = base.PanelObject.transform.Find("Tabs");
+ this.m_tabsPool.SetupPool(transform.gameObject, transform.Find("TabTpl0").gameObject, 5u, true);
+ this.m_scrollView = (transform.Find("Panel").GetComponent("XUIScrollView") as IXUIScrollView);
+ this.m_doc = ArtifactDeityStoveDocument.Doc;
+ this.m_bagWindow = new XBagWindow(base.PanelObject, new ItemUpdateHandler(this.WrapContentItemUpdated), new GetItemHandler(this.m_doc.GetArtifactByTabLevel));
+ this.m_bagWindow.Init();
+ this.m_doc.ItemsHandler = this;
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ this.FillTabs();
+ }
+
+ protected override void OnHide()
+ {
+ base.OnHide();
+ this.m_bagWindow.OnHide();
+ this.m_doc.NewItems.TryClear();
+ }
+
+ public override void StackRefresh()
+ {
+ base.StackRefresh();
+ this.FillBagList();
+ }
+
+ public override void OnUnload()
+ {
+ base.OnUnload();
+ this.m_bagWindow = null;
+ this.m_doc.ItemsHandler = null;
+ }
+
+ public void RefreshUi()
+ {
+ this.FillBagList();
+ }
+
+ private void FillTabs()
+ {
+ this.m_tabsPool.ReturnAll(true);
+ List<int> tabLevels = this.m_doc.GetTabLevels();
+ int num = 0;
+ bool flag = XSingleton<XAttributeMgr>.singleton.XPlayerData != null;
+ if (flag)
+ {
+ this.m_doc.LevelDic.TryGetValue((int)XSingleton<XAttributeMgr>.singleton.XPlayerData.Level, out num);
+ }
+ int num2 = num;
+ int num3 = 0;
+ int num4 = 0;
+ for (int i = 0; i < tabLevels.Count; i++)
+ {
+ bool flag2 = tabLevels[i] > num2;
+ if (flag2)
+ {
+ break;
+ }
+ num4 = i + 1;
+ GameObject gameObject = this.m_tabsPool.FetchGameObject(false);
+ gameObject.transform.parent = this.m_scrollView.gameObject.transform;
+ gameObject.transform.localScale = Vector3.one;
+ gameObject.transform.localPosition = new Vector3(0f, this.m_tabsPool.TplPos.y - (float)(i * this.m_tabsPool.TplHeight), 0f);
+ IXUILabel ixuilabel = gameObject.transform.Find("Bg/SelectedTextLabel").GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel2 = gameObject.transform.Find("Bg/TextLabel").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel.SetText(string.Format(XSingleton<XStringTable>.singleton.GetString("ArtifactLevel"), tabLevels[i]));
+ ixuilabel2.SetText(string.Format(XSingleton<XStringTable>.singleton.GetString("ArtifactLevel"), tabLevels[i]));
+ IXUICheckBox ixuicheckBox = gameObject.transform.Find("Bg").GetComponent("XUICheckBox") as IXUICheckBox;
+ ixuicheckBox.ID = (ulong)((long)tabLevels[i]);
+ ixuicheckBox.RegisterOnCheckEventHandler(new CheckBoxOnCheckEventHandler(this.OnClickTab));
+ bool flag3 = tabLevels[i] == num;
+ if (flag3)
+ {
+ num3 = i + 1;
+ this.m_curSelectToggle = ixuicheckBox;
+ ixuicheckBox.ForceSetFlag(true);
+ this.OnClickTab(ixuicheckBox);
+ }
+ else
+ {
+ ixuicheckBox.ForceSetFlag(false);
+ }
+ }
+ bool flag4 = num3 > 8;
+ if (flag4)
+ {
+ this.m_scrollView.SetPosition((float)(num3 / num4));
+ }
+ }
+
+ private void FillBagList()
+ {
+ this.m_doc.NewItems.bCanClear = true;
+ this.m_bagWindow.ChangeData(new ItemUpdateHandler(this.WrapContentItemUpdated), new GetItemHandler(this.m_doc.GetArtifactByTabLevel));
+ this.m_bagWindow.OnShow();
+ }
+
+ private void WrapContentItemUpdated(Transform t, int index)
+ {
+ IXUISprite ixuisprite = t.Find("Icon").GetComponent("XUISprite") as IXUISprite;
+ IXUILongPress ixuilongPress = t.Find("Icon").GetComponent("XUILongPress") as IXUILongPress;
+ bool flag = this.m_bagWindow.m_XItemList == null || index >= this.m_bagWindow.m_XItemList.Count || index < 0;
+ if (flag)
+ {
+ XSingleton<XItemDrawerMgr>.singleton.DrawItem(t.gameObject, null);
+ t.gameObject.name = XSingleton<XCommon>.singleton.StringCombine("empty", index.ToString());
+ ixuisprite.RegisterSpriteClickEventHandler(null);
+ ixuilongPress.RegisterSpriteLongPressEventHandler(null);
+ }
+ else
+ {
+ ixuisprite.ID = this.m_bagWindow.m_XItemList[index].uid;
+ bool flag2 = this.m_doc.IsSelected(ixuisprite.ID);
+ if (flag2)
+ {
+ XSingleton<XItemDrawerMgr>.singleton.DrawItem(t.gameObject, null);
+ ixuisprite.RegisterSpriteClickEventHandler(null);
+ }
+ else
+ {
+ XSingleton<XItemDrawerMgr>.singleton.DrawItem(t.gameObject, this.m_bagWindow.m_XItemList[index]);
+ ixuisprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnItemClicked));
+ }
+ t.gameObject.name = XSingleton<XCommon>.singleton.StringCombine("artifact", this.m_bagWindow.m_XItemList[index].itemID.ToString());
+ Transform transform = t.Find("Icon/RedPoint");
+ bool flag3 = transform != null;
+ if (flag3)
+ {
+ transform.gameObject.SetActive(false);
+ }
+ transform = t.Find("Icon/TimeBg");
+ bool flag4 = transform != null;
+ if (flag4)
+ {
+ transform.gameObject.SetActive(false);
+ }
+ transform = t.Find("Icon/New");
+ bool flag5 = transform != null;
+ if (flag5)
+ {
+ transform.gameObject.SetActive(this.m_doc.NewItems.IsNew(ixuisprite.ID));
+ }
+ transform = t.Find("Icon/State");
+ bool flag6 = transform != null;
+ if (flag6)
+ {
+ transform.gameObject.SetActive(XBagDocument.BagDoc.ArtifactBag.HasItem(this.m_bagWindow.m_XItemList[index].uid));
+ }
+ }
+ }
+
+ private bool OnClickTab(IXUICheckBox cb)
+ {
+ bool flag = !cb.bChecked;
+ bool result;
+ if (flag)
+ {
+ result = false;
+ }
+ else
+ {
+ this.m_doc.ResetSelection(false);
+ this.m_curSelectToggle = cb;
+ this.m_doc.CurSelectTabLevel = (int)cb.ID;
+ this.m_doc.RefreshAllHandlerUi();
+ result = true;
+ }
+ return result;
+ }
+
+ private void OnItemClicked(IXUISprite iSp)
+ {
+ bool flag = iSp.ID == 0UL;
+ if (!flag)
+ {
+ bool flag2 = this.m_doc.NewItems.RemoveItem(iSp.ID, ItemType.ARTIFACT, false);
+ if (flag2)
+ {
+ this.FillBagList();
+ }
+ XItem itemByUID = XBagDocument.BagDoc.GetItemByUID(iSp.ID);
+ bool flag3 = itemByUID == null;
+ if (!flag3)
+ {
+ XSingleton<TooltipParam>.singleton.bShowPutInBtn = true;
+ XSingleton<UiUtility>.singleton.ShowTooltipDialog(itemByUID, null, iSp, true, 0u);
+ }
+ }
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/ArtifactItemsHandler.cs.meta b/Client/Assets/Scripts/XMainClient/UI/ArtifactItemsHandler.cs.meta
new file mode 100644
index 00000000..e4a4b3be
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/ArtifactItemsHandler.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: c61bb2060b0ecf042a4845b92d70732a
+timeCreated: 1611404508
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/ArtifactOneKeyHandler.cs b/Client/Assets/Scripts/XMainClient/UI/ArtifactOneKeyHandler.cs
new file mode 100644
index 00000000..9e47cbe9
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/ArtifactOneKeyHandler.cs
@@ -0,0 +1,142 @@
+using System;
+using System.Collections.Generic;
+using UILib;
+using UnityEngine;
+
+namespace XMainClient.UI
+{
+ internal class ArtifactOneKeyHandler : DlgHandlerBase
+ {
+ protected override string FileName
+ {
+ get
+ {
+ return "ItemNew/ArtifactOneKeyFrame";
+ }
+ }
+
+ private ArtifactComposeDocument m_doc;
+
+ private IXUIButton m_closedBtn;
+
+ private IXUIButton m_oneKeyBtn;
+
+ private IXUICheckBox m_checkBoxB;
+
+ private IXUICheckBox m_checkBoxA;
+
+ private float m_delayTime = 0.5f;
+
+ private float m_fLastClickBtnTime = 0f;
+
+ private List<uint> m_selectLst = new List<uint>();
+
+ protected override void Init()
+ {
+ base.Init();
+ this.m_doc = ArtifactComposeDocument.Doc;
+ this.m_closedBtn = (base.PanelObject.transform.Find("Bg/Close").GetComponent("XUIButton") as IXUIButton);
+ this.m_oneKeyBtn = (base.PanelObject.transform.Find("BtnOneKeyCompose").GetComponent("XUIButton") as IXUIButton);
+ this.m_checkBoxB = (base.PanelObject.transform.Find("Bg/All_B/Category/Normal").GetComponent("XUICheckBox") as IXUICheckBox);
+ this.m_checkBoxA = (base.PanelObject.transform.Find("Bg/All_A/Category/Normal").GetComponent("XUICheckBox") as IXUICheckBox);
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ this.m_closedBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnClickClosed));
+ this.m_oneKeyBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnClickOneKeyCompose));
+ this.m_checkBoxB.RegisterOnCheckEventHandler(new CheckBoxOnCheckEventHandler(this.OnClickCheckBox));
+ this.m_checkBoxB.ID = 2UL;
+ this.m_checkBoxA.RegisterOnCheckEventHandler(new CheckBoxOnCheckEventHandler(this.OnClickCheckBox));
+ this.m_checkBoxA.ID = 3UL;
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ this.FillContent();
+ }
+
+ protected override void OnHide()
+ {
+ base.OnHide();
+ }
+
+ public override void StackRefresh()
+ {
+ base.StackRefresh();
+ }
+
+ public override void OnUnload()
+ {
+ base.OnUnload();
+ }
+
+ private void FillContent()
+ {
+ this.m_selectLst.Clear();
+ this.m_checkBoxB.ForceSetFlag(false);
+ this.m_checkBoxB.ForceSetFlag(true);
+ this.m_checkBoxA.ForceSetFlag(false);
+ }
+
+ private bool OnClickClosed(IXUIButton btn)
+ {
+ base.SetVisible(false);
+ return true;
+ }
+
+ private bool OnClickOneKeyCompose(IXUIButton btn)
+ {
+ bool flag = this.SetButtonCool(this.m_delayTime);
+ bool result;
+ if (flag)
+ {
+ result = true;
+ }
+ else
+ {
+ this.m_doc.ReqOneKeyCompose(this.m_selectLst);
+ result = true;
+ }
+ return result;
+ }
+
+ private bool OnClickCheckBox(IXUICheckBox box)
+ {
+ bool flag = !box.bChecked;
+ if (flag)
+ {
+ this.m_selectLst.Remove((uint)box.ID);
+ }
+ else
+ {
+ uint item = (uint)box.ID;
+ bool flag2 = !this.m_selectLst.Contains(item);
+ if (flag2)
+ {
+ this.m_selectLst.Add(item);
+ }
+ }
+ return true;
+ }
+
+ private bool SetButtonCool(float time)
+ {
+ float num = Time.realtimeSinceStartup - this.m_fLastClickBtnTime;
+ bool flag = num < time;
+ bool result;
+ if (flag)
+ {
+ result = true;
+ }
+ else
+ {
+ this.m_fLastClickBtnTime = Time.realtimeSinceStartup;
+ result = false;
+ }
+ return result;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/ArtifactOneKeyHandler.cs.meta b/Client/Assets/Scripts/XMainClient/UI/ArtifactOneKeyHandler.cs.meta
new file mode 100644
index 00000000..57e1cb18
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/ArtifactOneKeyHandler.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 7c76dd8b09144de468d6499e9747424a
+timeCreated: 1611403997
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/ArtifactQuanlityFx.cs b/Client/Assets/Scripts/XMainClient/UI/ArtifactQuanlityFx.cs
new file mode 100644
index 00000000..4ec5fd38
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/ArtifactQuanlityFx.cs
@@ -0,0 +1,40 @@
+using System;
+using UnityEngine;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class ArtifactQuanlityFx
+ {
+ private bool m_isUsing = false;
+
+ private ulong m_key = 0UL;
+
+ private XFx m_fx = null;
+
+ public void SetData(ulong key, Transform tra, string path)
+ {
+ this.Reset();
+ this.m_isUsing = true;
+ this.m_key = key;
+ this.m_fx = XSingleton<XFxMgr>.singleton.CreateUIFx(path, tra, false);
+ }
+
+ public void Reset()
+ {
+ this.m_key = 0UL;
+ this.m_isUsing = false;
+ bool flag = this.m_fx != null;
+ if (flag)
+ {
+ XSingleton<XFxMgr>.singleton.DestroyFx(this.m_fx, true);
+ this.m_fx = null;
+ }
+ }
+
+ public bool IsCanReuse(ulong key)
+ {
+ return this.m_isUsing && this.m_key == key;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/ArtifactQuanlityFx.cs.meta b/Client/Assets/Scripts/XMainClient/UI/ArtifactQuanlityFx.cs.meta
new file mode 100644
index 00000000..e4c14954
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/ArtifactQuanlityFx.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 72fdfc7dabb4e6d4fa2bc005779d838d
+timeCreated: 1611403939
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/ArtifactRecastHandler.cs b/Client/Assets/Scripts/XMainClient/UI/ArtifactRecastHandler.cs
new file mode 100644
index 00000000..4be6b9c6
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/ArtifactRecastHandler.cs
@@ -0,0 +1,255 @@
+using System;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class ArtifactRecastHandler : DlgHandlerBase
+ {
+ protected override string FileName
+ {
+ get
+ {
+ return "ItemNew/ArtifactRecastHandler";
+ }
+ }
+
+ private ArtifactRecastDocument m_doc;
+
+ private GameObject m_itemGoMain;
+
+ private GameObject m_itemGoMet;
+
+ private IXUISprite m_boxSprMain;
+
+ private IXUIButton m_recastBtn;
+
+ private bool m_bIsEnough = true;
+
+ private int m_needItemId = 0;
+
+ private float m_delayTime = 0.5f;
+
+ private float m_fLastClickBtnTime = 0f;
+
+ protected override void Init()
+ {
+ base.Init();
+ this.m_doc = ArtifactRecastDocument.Doc;
+ this.m_doc.Handler = this;
+ Transform transform = base.PanelObject.transform.Find("Bg1");
+ this.m_itemGoMain = transform.Find("item0").gameObject;
+ this.m_itemGoMet = transform.Find("item1").gameObject;
+ this.m_boxSprMain = (transform.Find("BgBox1").GetComponent("XUISprite") as IXUISprite);
+ this.m_recastBtn = (transform.Find("Get").GetComponent("XUIButton") as IXUIButton);
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ this.m_boxSprMain.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnClickBox));
+ this.m_recastBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnClickRecastBtn));
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ }
+
+ protected override void OnHide()
+ {
+ base.OnHide();
+ }
+
+ public override void StackRefresh()
+ {
+ base.StackRefresh();
+ }
+
+ public override void OnUnload()
+ {
+ base.OnUnload();
+ this.m_doc.Handler = null;
+ }
+
+ public void RefreshUi()
+ {
+ this.FillContent();
+ }
+
+ private void FillContent()
+ {
+ bool flag = this.m_doc.SelectUid == 0UL;
+ if (flag)
+ {
+ this.FillNull();
+ }
+ else
+ {
+ XItem itemByUID = XBagDocument.BagDoc.GetItemByUID(this.m_doc.SelectUid);
+ bool flag2 = itemByUID == null;
+ if (flag2)
+ {
+ this.FillNull();
+ }
+ else
+ {
+ XSingleton<XItemDrawerMgr>.singleton.DrawItem(this.m_itemGoMain, itemByUID);
+ IXUISprite ixuisprite = this.m_itemGoMain.transform.Find("Icon").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.ID = this.m_doc.SelectUid;
+ ixuisprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnClickTips));
+ ArtifactListTable.RowData artifactListRowData = ArtifactDocument.GetArtifactListRowData((uint)itemByUID.itemID);
+ bool flag3 = artifactListRowData == null || artifactListRowData.RecastMaterials[0, 0] == 0u;
+ if (flag3)
+ {
+ XSingleton<XItemDrawerMgr>.singleton.DrawItem(this.m_itemGoMet, null);
+ }
+ else
+ {
+ this.m_needItemId = (int)artifactListRowData.RecastMaterials[0, 0];
+ uint num = artifactListRowData.RecastMaterials[0, 1];
+ XSingleton<XItemDrawerMgr>.singleton.normalItemDrawer.DrawItem(this.m_itemGoMet, this.m_needItemId, (int)num, false);
+ ixuisprite = (this.m_itemGoMet.transform.Find("Icon").GetComponent("XUISprite") as IXUISprite);
+ ixuisprite.ID = (ulong)((long)this.m_needItemId);
+ ixuisprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnClickTips));
+ ulong itemCount = XBagDocument.BagDoc.GetItemCount(this.m_needItemId);
+ IXUILabel ixuilabel = this.m_itemGoMet.transform.Find("Num").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel.gameObject.SetActive(true);
+ this.m_bIsEnough = (itemCount >= (ulong)num);
+ bool bIsEnough = this.m_bIsEnough;
+ if (bIsEnough)
+ {
+ ixuilabel.SetText(string.Format("[00ff00]{0}/{1}[-]", itemCount, num));
+ }
+ else
+ {
+ ixuilabel.SetText(string.Format("[ff0000]{0}/{1}[-]", itemCount, num));
+ }
+ }
+ }
+ }
+ }
+
+ private void FillNull()
+ {
+ XSingleton<XItemDrawerMgr>.singleton.DrawItem(this.m_itemGoMain, null);
+ int @int = XSingleton<XGlobalConfig>.singleton.GetInt("RecastStoneItemId");
+ XSingleton<XItemDrawerMgr>.singleton.normalItemDrawer.DrawItem(this.m_itemGoMet, @int, 2, false);
+ ulong itemCount = XBagDocument.BagDoc.GetItemCount(@int);
+ IXUILabel ixuilabel = this.m_itemGoMet.transform.Find("Num").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel.SetText(string.Format("{0}/?", itemCount));
+ IXUISprite ixuisprite = this.m_itemGoMet.transform.Find("Icon").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.ID = (ulong)((long)@int);
+ ixuisprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnClickTips));
+ }
+
+ private bool OnClickRecastBtn(IXUIButton btn)
+ {
+ bool flag = this.SetButtonCool(this.m_delayTime);
+ bool result;
+ if (flag)
+ {
+ result = true;
+ }
+ else
+ {
+ bool flag2 = this.m_doc.SelectUid == 0UL;
+ if (flag2)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString("ArtifactRecastTips2"), "fece00");
+ result = false;
+ }
+ else
+ {
+ bool flag3 = !this.m_bIsEnough;
+ if (flag3)
+ {
+ DlgBase<ArtifactDeityStoveDlg, TabDlgBehaviour>.singleton.SetVisible(false, true);
+ XSingleton<UiUtility>.singleton.ShowItemAccess(this.m_needItemId, null);
+ result = false;
+ }
+ else
+ {
+ XOptionsDocument specificDocument = XDocuments.GetSpecificDocument<XOptionsDocument>(XOptionsDocument.uuID);
+ bool flag4 = specificDocument.GetValue(XOptionsDefine.OD_NO_RECAST_CONFIRM) == 1;
+ if (flag4)
+ {
+ this.m_doc.ReqRecast();
+ }
+ else
+ {
+ XSingleton<UiUtility>.singleton.ShowModalDialog(XSingleton<XStringTable>.singleton.GetString("RecastEnsureTips"), XStringDefineProxy.GetString(XStringDefine.COMMON_OK), XStringDefineProxy.GetString(XStringDefine.COMMON_CANCEL), new ButtonClickEventHandler(this.DoOK), new ButtonClickEventHandler(this.DoCancel), false, XTempTipDefine.OD_RECAST_CONFIRM, 50);
+ }
+ result = true;
+ }
+ }
+ }
+ return result;
+ }
+
+ private bool DoOK(IXUIButton btn)
+ {
+ bool flag = DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.IsVisible();
+ if (flag)
+ {
+ XOptionsDocument specificDocument = XDocuments.GetSpecificDocument<XOptionsDocument>(XOptionsDocument.uuID);
+ specificDocument.SetValue(XOptionsDefine.OD_NO_RECAST_CONFIRM, DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.GetTempTip(XTempTipDefine.OD_RECAST_CONFIRM) ? 1 : 0, false);
+ }
+ XSingleton<UiUtility>.singleton.CloseModalDlg();
+ this.m_doc.ReqRecast();
+ return true;
+ }
+
+ private bool DoCancel(IXUIButton btn)
+ {
+ XOptionsDocument specificDocument = XDocuments.GetSpecificDocument<XOptionsDocument>(XOptionsDocument.uuID);
+ specificDocument.SetValue(XOptionsDefine.OD_NO_RECAST_CONFIRM, DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.GetTempTip(XTempTipDefine.OD_RECAST_CONFIRM) ? 1 : 0, false);
+ XSingleton<UiUtility>.singleton.CloseModalDlg();
+ return true;
+ }
+
+ private void OnClickBox(IXUISprite spr)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString("ArtifactRecastTips1"), "fece00");
+ }
+
+ private void OnClickTips(IXUISprite spr)
+ {
+ XItem xitem = XBagDocument.BagDoc.GetItemByUID(spr.ID);
+ bool flag = xitem == null;
+ if (flag)
+ {
+ xitem = XBagDocument.MakeXItem((int)spr.ID, false);
+ }
+ bool flag2 = xitem == null;
+ if (!flag2)
+ {
+ bool flag3 = xitem.Type == ItemType.ARTIFACT;
+ if (flag3)
+ {
+ XSingleton<TooltipParam>.singleton.bShowTakeOutBtn = true;
+ }
+ XSingleton<UiUtility>.singleton.ShowTooltipDialog(xitem, null, spr, true, 0u);
+ }
+ }
+
+ private bool SetButtonCool(float time)
+ {
+ float num = Time.realtimeSinceStartup - this.m_fLastClickBtnTime;
+ bool flag = num < time;
+ bool result;
+ if (flag)
+ {
+ result = true;
+ }
+ else
+ {
+ this.m_fLastClickBtnTime = Time.realtimeSinceStartup;
+ result = false;
+ }
+ return result;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/ArtifactRecastHandler.cs.meta b/Client/Assets/Scripts/XMainClient/UI/ArtifactRecastHandler.cs.meta
new file mode 100644
index 00000000..122a0c5a
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/ArtifactRecastHandler.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: c6c8aa3fdd062ea46aebd998efdab433
+timeCreated: 1611404527
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/ArtifactRefinedHandler.cs b/Client/Assets/Scripts/XMainClient/UI/ArtifactRefinedHandler.cs
new file mode 100644
index 00000000..32f9dcde
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/ArtifactRefinedHandler.cs
@@ -0,0 +1,302 @@
+using System;
+using KKSG;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class ArtifactRefinedHandler : DlgHandlerBase
+ {
+ public RefinedReplaceHandler Handler
+ {
+ get
+ {
+ return this.m_handler;
+ }
+ }
+
+ protected override string FileName
+ {
+ get
+ {
+ return "ItemNew/ArtifactCzHandler";
+ }
+ }
+
+ private ArtifactRefinedDocument m_doc;
+
+ private GameObject m_itemGoMain;
+
+ private GameObject m_itemGoMet;
+
+ private GameObject m_resultNewGo;
+
+ private IXUISprite m_boxSprMain;
+
+ private IXUIButton m_refinedBtn;
+
+ private bool m_bIsEnough = true;
+
+ private int m_needItemId = 0;
+
+ private float m_delayTime = 0.5f;
+
+ private float m_fLastClickBtnTime = 0f;
+
+ private uint m_needNum = 0u;
+
+ private RefinedReplaceHandler m_handler;
+
+ protected override void Init()
+ {
+ base.Init();
+ this.m_doc = ArtifactRefinedDocument.Doc;
+ this.m_doc.Handler = this;
+ Transform transform = base.PanelObject.transform.Find("Bg1");
+ this.m_itemGoMain = transform.Find("item0").gameObject;
+ this.m_itemGoMet = transform.Find("item1").gameObject;
+ this.m_boxSprMain = (transform.Find("BgBox1").GetComponent("XUISprite") as IXUISprite);
+ this.m_refinedBtn = (transform.Find("Get").GetComponent("XUIButton") as IXUIButton);
+ this.m_resultNewGo = base.PanelObject.transform.Find("ResultNew").gameObject;
+ DlgHandlerBase.EnsureCreate<RefinedReplaceHandler>(ref this.m_handler, this.m_resultNewGo, null, false);
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ this.m_boxSprMain.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnClickBox));
+ this.m_refinedBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnClickRefinedBtn));
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ }
+
+ protected override void OnHide()
+ {
+ base.OnHide();
+ }
+
+ public override void StackRefresh()
+ {
+ base.StackRefresh();
+ }
+
+ public override void OnUnload()
+ {
+ base.OnUnload();
+ this.m_doc.Handler = null;
+ }
+
+ public void RefreshUi()
+ {
+ this.FillContent();
+ }
+
+ public void ShowReplaceHandler()
+ {
+ bool flag = this.m_handler != null && !this.m_handler.IsVisible();
+ if (flag)
+ {
+ this.m_handler.SetVisible(true);
+ }
+ }
+
+ private void FillContent()
+ {
+ bool flag = this.m_doc.SelectUid == 0UL;
+ if (flag)
+ {
+ this.FillNull();
+ }
+ else
+ {
+ XItem itemByUID = XBagDocument.BagDoc.GetItemByUID(this.m_doc.SelectUid);
+ bool flag2 = itemByUID == null;
+ if (flag2)
+ {
+ this.FillNull();
+ }
+ else
+ {
+ XSingleton<XItemDrawerMgr>.singleton.DrawItem(this.m_itemGoMain, itemByUID);
+ IXUISprite ixuisprite = this.m_itemGoMain.transform.Find("Icon").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.ID = this.m_doc.SelectUid;
+ ixuisprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnClickTips));
+ ArtifactListTable.RowData artifactListRowData = ArtifactDocument.GetArtifactListRowData((uint)itemByUID.itemID);
+ bool flag3 = artifactListRowData == null || artifactListRowData.RefinedMaterials[0, 0] == 0u;
+ if (flag3)
+ {
+ XSingleton<XItemDrawerMgr>.singleton.DrawItem(this.m_itemGoMet, null);
+ }
+ else
+ {
+ this.m_needItemId = (int)artifactListRowData.RefinedMaterials[0, 0];
+ uint num = artifactListRowData.RefinedMaterials[0, 1];
+ this.m_needNum = num;
+ XSingleton<XItemDrawerMgr>.singleton.normalItemDrawer.DrawItem(this.m_itemGoMet, this.m_needItemId, (int)num, false);
+ ixuisprite = (this.m_itemGoMet.transform.Find("Icon").GetComponent("XUISprite") as IXUISprite);
+ ixuisprite.ID = (ulong)((long)this.m_needItemId);
+ ixuisprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnClickTips));
+ ulong itemCount = XBagDocument.BagDoc.GetItemCount(this.m_needItemId);
+ IXUILabel ixuilabel = this.m_itemGoMet.transform.Find("Num").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel.gameObject.SetActive(true);
+ this.m_bIsEnough = (itemCount >= (ulong)num);
+ bool bIsEnough = this.m_bIsEnough;
+ if (bIsEnough)
+ {
+ ixuilabel.SetText(string.Format("[00ff00]{0}/{1}[-]", itemCount, num));
+ }
+ else
+ {
+ ixuilabel.SetText(string.Format("[ff0000]{0}/{1}[-]", itemCount, num));
+ }
+ }
+ XArtifactItem xartifactItem = itemByUID as XArtifactItem;
+ bool flag4 = xartifactItem.UnSavedAttr != null && xartifactItem.UnSavedAttr.Count > 0;
+ if (flag4)
+ {
+ this.ShowReplaceHandler();
+ }
+ }
+ }
+ }
+
+ private void FillNull()
+ {
+ XSingleton<XItemDrawerMgr>.singleton.DrawItem(this.m_itemGoMain, null);
+ int @int = XSingleton<XGlobalConfig>.singleton.GetInt("ReFinedStoneItemId");
+ XSingleton<XItemDrawerMgr>.singleton.normalItemDrawer.DrawItem(this.m_itemGoMet, @int, 2, false);
+ ulong itemCount = XBagDocument.BagDoc.GetItemCount(@int);
+ IXUILabel ixuilabel = this.m_itemGoMet.transform.Find("Num").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel.SetText(string.Format("{0}/?", itemCount));
+ IXUISprite ixuisprite = this.m_itemGoMet.transform.Find("Icon").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.ID = (ulong)((long)@int);
+ ixuisprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnClickTips));
+ }
+
+ private bool OnClickRefinedBtn(IXUIButton btn)
+ {
+ bool flag = this.SetButtonCool(this.m_delayTime);
+ bool result;
+ if (flag)
+ {
+ result = true;
+ }
+ else
+ {
+ bool flag2 = this.m_doc.SelectUid == 0UL;
+ if (flag2)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString("ArtifactRefinedTips2"), "fece00");
+ result = false;
+ }
+ else
+ {
+ bool flag3 = !this.m_bIsEnough;
+ if (flag3)
+ {
+ DlgBase<ArtifactDeityStoveDlg, TabDlgBehaviour>.singleton.SetVisible(false, true);
+ XSingleton<UiUtility>.singleton.ShowItemAccess(this.m_needItemId, null);
+ result = false;
+ }
+ else
+ {
+ XOptionsDocument specificDocument = XDocuments.GetSpecificDocument<XOptionsDocument>(XOptionsDocument.uuID);
+ bool flag4 = specificDocument.GetValue(XOptionsDefine.OD_NO_REFINED_CONFIRM) == 1;
+ if (flag4)
+ {
+ this.m_doc.ReqRefined(ArtifactDeityStoveOpType.ArtifactDeityStove_Refine);
+ }
+ else
+ {
+ string text = "";
+ ItemList.RowData itemConf = XBagDocument.GetItemConf(this.m_needItemId);
+ bool flag5 = itemConf != null;
+ if (flag5)
+ {
+ text = itemConf.ItemIcon[0];
+ }
+ bool flag6 = text != "";
+ if (flag6)
+ {
+ text = XLabelSymbolHelper.FormatAnimation("Item/Item2", text, 10);
+ text = string.Format("{0}X{1}", text, this.m_needNum);
+ }
+ text = string.Format(XSingleton<XStringTable>.singleton.GetString("RefinedEnsureTips"), text);
+ XSingleton<UiUtility>.singleton.ShowModalDialog(XSingleton<UiUtility>.singleton.ReplaceReturn(text), XStringDefineProxy.GetString(XStringDefine.COMMON_OK), XStringDefineProxy.GetString(XStringDefine.COMMON_CANCEL), new ButtonClickEventHandler(this.DoOK), new ButtonClickEventHandler(this.DoCancel), false, XTempTipDefine.OD_REFINED_CONFIRM, 50);
+ }
+ result = true;
+ }
+ }
+ }
+ return result;
+ }
+
+ private bool DoOK(IXUIButton btn)
+ {
+ bool flag = DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.IsVisible();
+ if (flag)
+ {
+ XOptionsDocument specificDocument = XDocuments.GetSpecificDocument<XOptionsDocument>(XOptionsDocument.uuID);
+ specificDocument.SetValue(XOptionsDefine.OD_NO_REFINED_CONFIRM, DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.GetTempTip(XTempTipDefine.OD_REFINED_CONFIRM) ? 1 : 0, false);
+ }
+ XSingleton<UiUtility>.singleton.CloseModalDlg();
+ this.m_doc.ReqRefined(ArtifactDeityStoveOpType.ArtifactDeityStove_Refine);
+ return true;
+ }
+
+ private bool DoCancel(IXUIButton btn)
+ {
+ XOptionsDocument specificDocument = XDocuments.GetSpecificDocument<XOptionsDocument>(XOptionsDocument.uuID);
+ specificDocument.SetValue(XOptionsDefine.OD_NO_REFINED_CONFIRM, DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.GetTempTip(XTempTipDefine.OD_REFINED_CONFIRM) ? 1 : 0, false);
+ XSingleton<UiUtility>.singleton.CloseModalDlg();
+ return true;
+ }
+
+ private void OnClickBox(IXUISprite spr)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString("ArtifactRefinedTips1"), "fece00");
+ }
+
+ private void OnClickTips(IXUISprite spr)
+ {
+ XItem xitem = XBagDocument.BagDoc.GetItemByUID(spr.ID);
+ bool flag = xitem == null;
+ if (flag)
+ {
+ xitem = XBagDocument.MakeXItem((int)spr.ID, false);
+ }
+ bool flag2 = xitem == null;
+ if (!flag2)
+ {
+ bool flag3 = xitem.Type == ItemType.ARTIFACT;
+ if (flag3)
+ {
+ XSingleton<TooltipParam>.singleton.bShowTakeOutBtn = true;
+ }
+ XSingleton<UiUtility>.singleton.ShowTooltipDialog(xitem, null, spr, true, 0u);
+ }
+ }
+
+ private bool SetButtonCool(float time)
+ {
+ float num = Time.realtimeSinceStartup - this.m_fLastClickBtnTime;
+ bool flag = num < time;
+ bool result;
+ if (flag)
+ {
+ result = true;
+ }
+ else
+ {
+ this.m_fLastClickBtnTime = Time.realtimeSinceStartup;
+ result = false;
+ }
+ return result;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/ArtifactRefinedHandler.cs.meta b/Client/Assets/Scripts/XMainClient/UI/ArtifactRefinedHandler.cs.meta
new file mode 100644
index 00000000..de6b28f6
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/ArtifactRefinedHandler.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 2f552fb18d96b8040acba2ed2cecb172
+timeCreated: 1611403515
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/ArtifactToolTipDlg.cs b/Client/Assets/Scripts/XMainClient/UI/ArtifactToolTipDlg.cs
new file mode 100644
index 00000000..9409e491
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/ArtifactToolTipDlg.cs
@@ -0,0 +1,405 @@
+using System;
+using UILib;
+using UnityEngine;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class ArtifactToolTipDlg : TooltipDlg<ArtifactToolTipDlg, ArtifactTooltipDlgBehaviour>
+ {
+ public override string fileName
+ {
+ get
+ {
+ return "GameSystem/ArtifactToolTipDlg";
+ }
+ }
+
+ protected override int compareWindowDistance
+ {
+ get
+ {
+ return 20;
+ }
+ }
+
+ protected override void Init()
+ {
+ base.Init();
+ this.m_OperateList[0, 0] = new ArtifactTooltipButtonOperate();
+ this.m_OperateList[0, 1] = new TooltipButtonOperateRecycle(XSysDefine.XSys_Artifact);
+ this.m_OperateList[0, 2] = new TooltipButtonOperatePutIn();
+ this.m_OperateList[0, 3] = new TooltipButtonOperateTakeOut();
+ this.m_OperateList[1, 0] = new TooltipButtonOperateTakeOff();
+ this.m_OperateList[1, 1] = new TooltipButtonOperatePutIn();
+ this.m_OperateList[1, 2] = new TooltipButtonOperateTakeOut();
+ }
+
+ protected override void SetAllAttrFrames(GameObject goToolTip, XAttrItem item, XAttrItem compareItem, bool bMain)
+ {
+ XArtifactItem xartifactItem = item as XArtifactItem;
+ bool flag = xartifactItem == null;
+ if (!flag)
+ {
+ GameObject gameObject = goToolTip.transform.Find("ScrollPanel").gameObject;
+ this._SetupRandFrame(gameObject, item, bMain);
+ }
+ }
+
+ private void _SetupRandFrame(GameObject scrollPanel, XItem mainItem, bool bMain)
+ {
+ XArtifactItem xartifactItem = mainItem as XArtifactItem;
+ bool flag = xartifactItem == null;
+ if (!flag)
+ {
+ bool flag2 = !xartifactItem.RandAttrInfo.bPreview && xartifactItem.RandAttrInfo.RandAttr.Count == 0;
+ if (!flag2)
+ {
+ GameObject gameObject = base.uiBehaviour.m_AttrFramePool.FetchGameObject(false);
+ gameObject.transform.parent = scrollPanel.transform;
+ AttrFrameParam attrFrameParam = new AttrFrameParam();
+ attrFrameParam.Title = XStringDefineProxy.GetString("HIDDEN_ATTR");
+ bool bPreview = xartifactItem.RandAttrInfo.bPreview;
+ if (bPreview)
+ {
+ AttrParam item = default(AttrParam);
+ AttrParam.ResetSb();
+ AttrParam.Append(AttrParam.TextSb, XStringDefineProxy.GetString("HIDDEN_ATTR"), "");
+ AttrParam.Append(AttrParam.ValueSb, "???", "");
+ item.SetTextFromSb();
+ item.SetValueFromSb();
+ attrFrameParam.AttrList.Add(item);
+ }
+ for (int i = 0; i < xartifactItem.RandAttrInfo.RandAttr.Count; i++)
+ {
+ XItemChangeAttr xitemChangeAttr = xartifactItem.RandAttrInfo.RandAttr[i];
+ bool flag3 = xitemChangeAttr.AttrID == 0u;
+ if (!flag3)
+ {
+ ArtifactAttrRange artifactAttrRange = ArtifactDocument.GetArtifactAttrRange((uint)xartifactItem.itemID, i, xitemChangeAttr.AttrID, xitemChangeAttr.AttrValue);
+ string color = this.GetColor(xitemChangeAttr.AttrValue, artifactAttrRange.Min, artifactAttrRange.Max);
+ AttrParam item2 = default(AttrParam);
+ AttrParam.ResetSb();
+ AttrParam.Append(xitemChangeAttr, color, color);
+ AttrParam.ValueSb.Append(" [");
+ AttrParam.ValueSb.Append(artifactAttrRange.Min);
+ AttrParam.ValueSb.Append(" - ");
+ AttrParam.ValueSb.Append(artifactAttrRange.Max);
+ AttrParam.ValueSb.Append("] ");
+ item2.SetTextFromSb();
+ item2.SetValueFromSb();
+ attrFrameParam.AttrList.Add(item2);
+ }
+ }
+ base.AppendFrame(gameObject, (float)this.SetupAttrFrame(gameObject, attrFrameParam, bMain), new Vector3?(base.uiBehaviour.m_AttrFramePool.TplPos));
+ XSingleton<XGameUI>.singleton.m_uiTool.MarkParentAsChanged(gameObject);
+ }
+ }
+ }
+
+ public string GetColor(uint attrValue, uint min, uint max)
+ {
+ bool flag = min >= max;
+ float num;
+ if (flag)
+ {
+ num = 100f;
+ }
+ else
+ {
+ bool flag2 = attrValue < max;
+ if (flag2)
+ {
+ num = (attrValue - min) * 100u / (max - min);
+ }
+ else
+ {
+ num = 100f;
+ }
+ }
+ int quality = EquipAttrDataMgr.MarkList.Count - 1;
+ for (int i = 0; i < EquipAttrDataMgr.MarkList.Count; i++)
+ {
+ bool flag3 = num < (float)EquipAttrDataMgr.MarkList[i];
+ if (flag3)
+ {
+ quality = i;
+ break;
+ }
+ }
+ return XSingleton<UiUtility>.singleton.GetItemQualityRGB(quality);
+ }
+
+ protected override void SetupTopFrame(GameObject goToolTip, ItemList.RowData data, bool bMain, XItem instanceData = null, XItem compareData = null)
+ {
+ base.SetupTopFrame(goToolTip, data, bMain, instanceData, compareData);
+ Transform transform = goToolTip.transform;
+ GameObject gameObject = transform.Find("TopFrame/State").gameObject;
+ base._SetupLevel(goToolTip, data, 0);
+ base._SetupProf(goToolTip, data, bMain, instanceData, 1);
+ ArtifactListTable.RowData artifactListRowData = ArtifactDocument.GetArtifactListRowData((uint)data.ItemID);
+ base._SetTopFrameLabel(goToolTip, 2, XStringDefineProxy.GetString("ToolTipText_Part"), (artifactListRowData != null) ? XSingleton<UiUtility>.singleton.GetArtifactPartName((ArtifactPosition)artifactListRowData.ArtifactPos, true) : string.Empty);
+ gameObject.SetActive(!bMain || XSingleton<TooltipParam>.singleton.bEquiped);
+ }
+
+ protected override int _GetPPT(XItem item, bool bMain, ref string valueText)
+ {
+ XArtifactItem xartifactItem = item as XArtifactItem;
+ bool flag = xartifactItem == null;
+ int result;
+ if (flag)
+ {
+ result = -1;
+ }
+ else
+ {
+ XAttributes attributes = bMain ? XSingleton<TooltipParam>.singleton.mainAttributes : XSingleton<TooltipParam>.singleton.compareAttributes;
+ double num = xartifactItem.GetPPT(attributes);
+ bool bPreview = xartifactItem.RandAttrInfo.bPreview;
+ if (bPreview)
+ {
+ uint num2 = (uint)num + ArtifactDocument.GetArtifactMinPPt((uint)xartifactItem.itemID, attributes);
+ uint num3 = (uint)num + ArtifactDocument.GetArtifactMaxPPt((uint)xartifactItem.itemID, attributes);
+ valueText = string.Format("{0} - {1}", num2, num3);
+ result = -1;
+ }
+ else
+ {
+ for (int i = 0; i < xartifactItem.RandAttrInfo.RandAttr.Count; i++)
+ {
+ bool flag2 = xartifactItem.RandAttrInfo.RandAttr[i].AttrID == 0u;
+ if (!flag2)
+ {
+ num += XSingleton<XPowerPointCalculator>.singleton.GetPPT(xartifactItem.RandAttrInfo.RandAttr[i], attributes, -1);
+ }
+ }
+ valueText = ((uint)num).ToString();
+ result = (int)num;
+ }
+ }
+ return result;
+ }
+
+ protected override void SetupOtherFrame(GameObject goToolTip, XItem mainItem, XItem compareItem, bool bMain)
+ {
+ this._SetupArtifactEffect(goToolTip, mainItem, compareItem, bMain);
+ this._SetupSuitFrame(goToolTip, mainItem, compareItem, bMain);
+ base.SetupOtherFrame(goToolTip, mainItem, compareItem, bMain);
+ }
+
+ private void _SetupArtifactEffect(GameObject goToolTip, XItem mainItem, XItem compareItem, bool bMain)
+ {
+ XArtifactItem xartifactItem = mainItem as XArtifactItem;
+ bool flag = xartifactItem == null;
+ if (!flag)
+ {
+ bool flag2 = xartifactItem.EffectInfoList.Count <= 0;
+ if (!flag2)
+ {
+ GameObject gameObject = goToolTip.transform.Find("ScrollPanel").gameObject;
+ GameObject gameObject2 = base.uiBehaviour.m_AttrFramePool.FetchGameObject(false);
+ gameObject2.transform.parent = gameObject.transform;
+ AttrFrameParam attrFrameParam = new AttrFrameParam();
+ attrFrameParam.Title = XStringDefineProxy.GetString("ArytifactSkillEffect");
+ int num = int.MaxValue;
+ ArtifactListTable.RowData artifactListRowData = ArtifactDocument.GetArtifactListRowData((uint)xartifactItem.itemID);
+ bool flag3 = artifactListRowData != null;
+ if (flag3)
+ {
+ num = (int)artifactListRowData.EffectNum;
+ }
+ for (int i = 0; i < xartifactItem.EffectInfoList.Count; i++)
+ {
+ XArtifactEffectInfo xartifactEffectInfo = xartifactItem.EffectInfoList[i];
+ AttrParam item = default(AttrParam);
+ AttrParam.ResetSb();
+ string text = ArtifactDocument.GetArtifactEffectDes(xartifactEffectInfo.EffectId, xartifactEffectInfo.GetValues());
+ bool flag4 = !xartifactEffectInfo.IsValid;
+ if (flag4)
+ {
+ text = string.Format("{0}{1}", text, XSingleton<XStringTable>.singleton.GetString("NotValid"));
+ }
+ bool flag5 = i >= num;
+ if (flag5)
+ {
+ text = XSingleton<XCommon>.singleton.StringCombine(XLabelSymbolHelper.FormatAnimation("common/Universal", "Emblem_0", 10), text);
+ }
+ AttrParam.Append(AttrParam.ValueSb, text, "");
+ item.SetTextFromSb();
+ item.SetValueFromSb();
+ attrFrameParam.AttrList.Add(item);
+ }
+ base.AppendFrame(gameObject2, (float)this.SetupDesFrame(gameObject2, attrFrameParam, bMain), new Vector3?(base.uiBehaviour.m_AttrFramePool.TplPos));
+ XSingleton<XGameUI>.singleton.m_uiTool.MarkParentAsChanged(gameObject2);
+ }
+ }
+ }
+
+ protected int SetupDesFrame(GameObject attrFrame, AttrFrameParam param, bool bMain)
+ {
+ int num = 0;
+ IXUILabel ixuilabel = attrFrame.transform.Find("Title").GetComponent("XUILabel") as IXUILabel;
+ bool flag = !string.IsNullOrEmpty(param.Title);
+ int num2;
+ if (flag)
+ {
+ ixuilabel.SetText(param.Title);
+ ixuilabel.SetVisible(true);
+ num2 = (int)ixuilabel.gameObject.transform.localPosition.y - ixuilabel.spriteHeight;
+ }
+ else
+ {
+ ixuilabel.SetVisible(false);
+ num2 = (int)ixuilabel.gameObject.transform.localPosition.y;
+ }
+ int num3 = 8;
+ IXUILabel ixuilabel2 = base.uiBehaviour.m_AttrPool._tpl.transform.Find("Text").GetComponent("XUILabel") as IXUILabel;
+ int num4 = base.uiBehaviour.m_AttrPool.TplHeight - ixuilabel2.fontSize;
+ for (int i = 0; i < param.AttrList.Count; i++)
+ {
+ GameObject gameObject = base.uiBehaviour.m_DesFramePool.FetchGameObject(false);
+ gameObject.transform.parent = attrFrame.transform;
+ XSingleton<XGameUI>.singleton.m_uiTool.MarkParentAsChanged(gameObject);
+ gameObject.transform.localPosition = new Vector3(base.uiBehaviour.m_AttrPool.TplPos.x, (float)(num2 + num), base.uiBehaviour.m_AttrPool.TplPos.z);
+ gameObject.transform.localScale = Vector3.one;
+ IXUILabelSymbol ixuilabelSymbol = gameObject.transform.Find("Text").GetComponent("XUILabelSymbol") as IXUILabelSymbol;
+ IXUILabel ixuilabel3 = gameObject.transform.Find("Text").GetComponent("XUILabel") as IXUILabel;
+ ixuilabelSymbol.InputText = param.AttrList[i].strValue;
+ num -= ixuilabel3.spriteHeight + num3;
+ }
+ IXUISprite ixuisprite = attrFrame.GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.spriteHeight = -num - num2 - num4;
+ return ixuisprite.spriteHeight;
+ }
+
+ private void _SetupSuitFrame(GameObject goToolTip, XItem mainItem, XItem compareItem, bool bMain)
+ {
+ IXUISprite ixuisprite = goToolTip.transform.Find("ScrollPanel/SuitFrame").GetComponent("XUISprite") as IXUISprite;
+ bool flag = mainItem == null;
+ if (flag)
+ {
+ ixuisprite.SetVisible(false);
+ }
+ else
+ {
+ ArtifactSuit suitByArtifactId = ArtifactDocument.SuitMgr.GetSuitByArtifactId((uint)mainItem.itemID);
+ bool flag2 = suitByArtifactId == null;
+ if (flag2)
+ {
+ ixuisprite.SetVisible(false);
+ }
+ else
+ {
+ ixuisprite.SetVisible(true);
+ bool flag3 = XSingleton<TooltipParam>.singleton.BodyBag == null;
+ if (flag3)
+ {
+ XSingleton<TooltipParam>.singleton.BodyBag = XSingleton<XGame>.singleton.Doc.XBagDoc.ArtifactBag;
+ }
+ int num = suitByArtifactId.GetEquipedSuitCount(XSingleton<TooltipParam>.singleton.BodyBag);
+ bool flag4 = bMain && suitByArtifactId.WillChangeEquipedCount(mainItem.itemID, XSingleton<TooltipParam>.singleton.BodyBag);
+ if (flag4)
+ {
+ num++;
+ }
+ int num2 = 0;
+ AttrFrameParam attrFrameParam = new AttrFrameParam();
+ for (int i = 0; i < suitByArtifactId.effects.Length; i++)
+ {
+ SeqListRef<uint> seqListRef = suitByArtifactId.effects[i];
+ bool flag5 = seqListRef.Count == 0;
+ if (!flag5)
+ {
+ for (int j = 0; j < seqListRef.Count; j++)
+ {
+ bool flag6 = seqListRef[j, 0] == 0u;
+ if (!flag6)
+ {
+ bool flag7 = i <= num;
+ string text;
+ string color;
+ if (flag7)
+ {
+ text = "ffffff";
+ color = XSingleton<UiUtility>.singleton.GetColorStr(new Color(0.996078432f, 0.807843149f, 0f));
+ }
+ else
+ {
+ text = XSingleton<UiUtility>.singleton.GetColorStr(new Color(0.5019608f, 0.5019608f, 0.5019608f));
+ color = text;
+ }
+ AttrParam item = default(AttrParam);
+ AttrParam.ResetSb();
+ AttrParam.Append(AttrParam.TextSb, XStringDefineProxy.GetString("EQUIP_SUIT_EFFECT", new object[]
+ {
+ i
+ }), color);
+ string s = string.Format("{0}{1}", XStringDefineProxy.GetString((XAttributeDefine)seqListRef[j, 0]), XAttributeCommon.GetAttrValueStr((int)seqListRef[j, 0], (float)seqListRef[j, 1]));
+ AttrParam.Append(AttrParam.ValueSb, s, text);
+ item.SetTextFromSb();
+ item.SetValueFromSb();
+ attrFrameParam.AttrList.Add(item);
+ num2++;
+ }
+ }
+ }
+ }
+ bool flag8 = num2 > 0;
+ if (flag8)
+ {
+ string arg = string.Format(XSingleton<XStringTable>.singleton.GetString("ArtifactSuitEffectTittle"), suitByArtifactId.Name);
+ attrFrameParam.Title = string.Format("{0}({1}/{2})", arg, num.ToString(), suitByArtifactId.Artifacts.Count.ToString());
+ base.AppendFrame(ixuisprite.gameObject, (float)this.SetupAttrFrame(ixuisprite.gameObject, attrFrameParam, bMain), null);
+ }
+ else
+ {
+ ixuisprite.SetVisible(false);
+ }
+ }
+ }
+ }
+
+ protected override void SetupToolTipButtons(GameObject goToolTip, XItem item, bool bMain)
+ {
+ base.SetupToolTipButtons(goToolTip, item, bMain);
+ bool flag = !this.bShowButtons;
+ if (!flag)
+ {
+ if (bMain)
+ {
+ XArtifactItem xartifactItem = item as XArtifactItem;
+ bool flag2 = XSingleton<XGame>.singleton.Doc.XBagDoc.ArtifactBag.HasItem(item.uid);
+ if (flag2)
+ {
+ base._SetupButtonVisiability(goToolTip, 1, item);
+ }
+ else
+ {
+ base._SetupButtonVisiability(goToolTip, 0, item);
+ }
+ }
+ }
+ }
+
+ public override bool HideToolTip(bool forceHide = false)
+ {
+ bool flag = base.HideToolTip(forceHide);
+ bool flag2 = !flag;
+ bool result;
+ if (flag2)
+ {
+ result = flag;
+ }
+ else
+ {
+ bool flag3 = base.uiBehaviour.m_DesFramePool != null;
+ if (flag3)
+ {
+ base.uiBehaviour.m_DesFramePool.ReturnAll(false);
+ }
+ result = true;
+ }
+ return result;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/ArtifactToolTipDlg.cs.meta b/Client/Assets/Scripts/XMainClient/UI/ArtifactToolTipDlg.cs.meta
new file mode 100644
index 00000000..b84a45c7
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/ArtifactToolTipDlg.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: f1d6d3c15e0cdf44b879597cea05d610
+timeCreated: 1611404840
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/ArtifactTooltipDlgBehaviour.cs b/Client/Assets/Scripts/XMainClient/UI/ArtifactTooltipDlgBehaviour.cs
new file mode 100644
index 00000000..1cf66b2a
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/ArtifactTooltipDlgBehaviour.cs
@@ -0,0 +1,23 @@
+using System;
+using UnityEngine;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class ArtifactTooltipDlgBehaviour : TooltipDlgBehaviour
+ {
+ public XUIPool m_DesFramePool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ protected override void Awake()
+ {
+ GameObject gameObject = base.transform.Find("Bg/Bg").gameObject;
+ Transform transform = gameObject.transform.Find("ToolTip/ScrollPanel/BasicAttr/DesTpl");
+ bool flag = transform != null;
+ if (flag)
+ {
+ this.m_DesFramePool.SetupPool(gameObject, transform.gameObject, 2u, false);
+ }
+ base.Awake();
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/ArtifactTooltipDlgBehaviour.cs.meta b/Client/Assets/Scripts/XMainClient/UI/ArtifactTooltipDlgBehaviour.cs.meta
new file mode 100644
index 00000000..7fc331ef
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/ArtifactTooltipDlgBehaviour.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: cca7b01b3e89eaa44a23e8f6004c1eb6
+timeCreated: 1611404551
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/AttrFrameParam.cs b/Client/Assets/Scripts/XMainClient/UI/AttrFrameParam.cs
new file mode 100644
index 00000000..a90db936
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/AttrFrameParam.cs
@@ -0,0 +1,26 @@
+using System;
+using System.Collections.Generic;
+
+namespace XMainClient.UI
+{
+ internal class AttrFrameParam
+ {
+ public string Title { get; set; }
+
+ public List<AttrParam> AttrList
+ {
+ get
+ {
+ return this.m_AttrList;
+ }
+ }
+
+ private List<AttrParam> m_AttrList = new List<AttrParam>();
+
+ public void Clear()
+ {
+ this.m_AttrList.Clear();
+ this.Title = string.Empty;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/AttrFrameParam.cs.meta b/Client/Assets/Scripts/XMainClient/UI/AttrFrameParam.cs.meta
new file mode 100644
index 00000000..4100befa
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/AttrFrameParam.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 96cff857515137648b14c2d2db7a0e56
+timeCreated: 1611404186
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/AttrParam.cs b/Client/Assets/Scripts/XMainClient/UI/AttrParam.cs
new file mode 100644
index 00000000..d8457f75
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/AttrParam.cs
@@ -0,0 +1,57 @@
+using System;
+using System.Text;
+
+namespace XMainClient.UI
+{
+ internal struct AttrParam
+ {
+ public static StringBuilder TextSb = new StringBuilder();
+
+ public static StringBuilder ValueSb = new StringBuilder();
+
+ public string strText;
+
+ public string strValue;
+
+ public bool IsShowTipsIcon;
+
+ public string IconName;
+
+ public static void ResetSb()
+ {
+ AttrParam.TextSb.Length = 0;
+ AttrParam.ValueSb.Length = 0;
+ }
+
+ public static void Append(StringBuilder sb, string s, string color = "")
+ {
+ bool flag = !string.IsNullOrEmpty(color);
+ if (flag)
+ {
+ sb.Append("[").Append(color).Append("]");
+ }
+ sb.Append(s);
+ bool flag2 = !string.IsNullOrEmpty(color);
+ if (flag2)
+ {
+ sb.Append("[-]");
+ }
+ }
+
+ public static void Append(XItemChangeAttr attr, string textColor = "", string valueColor = "")
+ {
+ AttrParam.Append(AttrParam.TextSb, XAttributeCommon.GetAttrStr((int)attr.AttrID), textColor);
+ AttrParam.Append(AttrParam.ValueSb, XAttributeCommon.GetAttrValueStr((int)attr.AttrID, attr.AttrValue), valueColor);
+ }
+
+ public void SetTextFromSb()
+ {
+ this.strText = AttrParam.TextSb.ToString();
+ }
+
+ public void SetValueFromSb()
+ {
+ this.strValue = AttrParam.ValueSb.ToString();
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/AttrParam.cs.meta b/Client/Assets/Scripts/XMainClient/UI/AttrParam.cs.meta
new file mode 100644
index 00000000..ceb37b3d
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/AttrParam.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: b1d75dde66837644288da691ac20ec26
+timeCreated: 1611404357
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/AttrTooltipDlg.cs b/Client/Assets/Scripts/XMainClient/UI/AttrTooltipDlg.cs
new file mode 100644
index 00000000..d54437b5
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/AttrTooltipDlg.cs
@@ -0,0 +1,168 @@
+using System;
+using UILib;
+using UnityEngine;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class AttrTooltipDlg : TooltipDlg<AttrTooltipDlg, AttrTooltipDlgBehaviour>
+ {
+ private IAttrTooltipDlgHandler CurrentTooltipDlgHandler
+ {
+ set
+ {
+ this._PreviousTooltipDlgHandler = this._CurrentTooltipDlgHandler;
+ this._CurrentTooltipDlgHandler = value;
+ }
+ }
+
+ public override string fileName
+ {
+ get
+ {
+ return "GameSystem/AttrToolTipDlg";
+ }
+ }
+
+ protected override string _PPTTitle
+ {
+ get
+ {
+ bool flag = this._CurrentTooltipDlgHandler != null;
+ string ppttitle;
+ if (flag)
+ {
+ ppttitle = this._CurrentTooltipDlgHandler._PPTTitle;
+ }
+ else
+ {
+ ppttitle = base._PPTTitle;
+ }
+ return ppttitle;
+ }
+ }
+
+ private IAttrTooltipDlgHandler _CurrentTooltipDlgHandler = null;
+
+ private IAttrTooltipDlgHandler _PreviousTooltipDlgHandler = null;
+
+ protected override void Init()
+ {
+ base.Init();
+ }
+
+ public override bool HideToolTip(bool forceHide = false)
+ {
+ bool flag = base.HideToolTip(forceHide);
+ if (flag)
+ {
+ base.uiBehaviour.m_EmblemPartPool.ReturnAll(false);
+ base.uiBehaviour.m_JadePartPool.ReturnAll(false);
+ bool flag2 = this._CurrentTooltipDlgHandler != null;
+ if (flag2)
+ {
+ this._CurrentTooltipDlgHandler.HideToolTip(forceHide);
+ }
+ bool flag3 = this._PreviousTooltipDlgHandler != null;
+ if (flag3)
+ {
+ this._PreviousTooltipDlgHandler.HideToolTip(forceHide);
+ }
+ }
+ return true;
+ }
+
+ public override IXUISprite ShowToolTip(XItem mainItem, XItem compareItem, bool bShowButtons, uint profession = 0u)
+ {
+ bool flag = mainItem != null;
+ if (flag)
+ {
+ ItemType type = mainItem.Type;
+ this.CurrentTooltipDlgHandler = null;
+ }
+ return base.ShowToolTip(mainItem, compareItem, bShowButtons, profession);
+ }
+
+ protected override void SetAllAttrFrames(GameObject goToolTip, XAttrItem item, XAttrItem compareItem, bool bMain)
+ {
+ base.SetAllAttrFrames(goToolTip, item, compareItem, bMain);
+ }
+
+ protected override void SetupTopFrame(GameObject goToolTip, ItemList.RowData data, bool bMain, XItem instanceData = null, XItem compareData = null)
+ {
+ base.SetupTopFrame(goToolTip, data, bMain, instanceData, compareData);
+ IXUILabel ixuilabel = goToolTip.transform.Find("TopFrame/Type").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel.SetText(XSingleton<UiUtility>.singleton.GetItemTypeStr((int)data.ItemType));
+ bool flag = this._CurrentTooltipDlgHandler != null;
+ if (flag)
+ {
+ this._CurrentTooltipDlgHandler.SetupTopFrame(goToolTip, data, instanceData, compareData);
+ }
+ }
+
+ protected override int _GetPPT(XItem item, bool bMain, ref string valueText)
+ {
+ bool flag = this._CurrentTooltipDlgHandler != null;
+ int result;
+ if (flag)
+ {
+ result = this._CurrentTooltipDlgHandler._GetPPT(item, bMain, ref valueText);
+ }
+ else
+ {
+ result = -1;
+ }
+ return result;
+ }
+
+ protected override void SetupOtherFrame(GameObject goToolTip, XItem item, XItem compareItem, bool bMain)
+ {
+ base.SetupOtherFrame(goToolTip, item, compareItem, bMain);
+ bool flag = this._CurrentTooltipDlgHandler != null;
+ if (flag)
+ {
+ this._CurrentTooltipDlgHandler.SetupOtherFrame(goToolTip, item, compareItem, bMain);
+ }
+ }
+
+ protected override void SetupToolTipButtons(GameObject goToolTip, XItem item, bool bMain)
+ {
+ base.SetupToolTipButtons(goToolTip, item, bMain);
+ bool flag = this._CurrentTooltipDlgHandler != null;
+ if (flag)
+ {
+ this._CurrentTooltipDlgHandler.SetupToolTipButtons(goToolTip, item, bMain);
+ }
+ }
+
+ protected override bool OnButton1Clicked(IXUIButton button)
+ {
+ bool flag = this._CurrentTooltipDlgHandler != null;
+ if (flag)
+ {
+ this._CurrentTooltipDlgHandler.OnButton1Clicked(button);
+ }
+ return base.OnButton1Clicked(button);
+ }
+
+ protected override bool OnButton2Clicked(IXUIButton button)
+ {
+ bool flag = this._CurrentTooltipDlgHandler != null;
+ if (flag)
+ {
+ this._CurrentTooltipDlgHandler.OnButton2Clicked(button);
+ }
+ return base.OnButton2Clicked(button);
+ }
+
+ protected override bool OnButton3Clicked(IXUIButton button)
+ {
+ bool flag = this._CurrentTooltipDlgHandler != null;
+ if (flag)
+ {
+ this._CurrentTooltipDlgHandler.OnButton3Clicked(button);
+ }
+ return base.OnButton3Clicked(button);
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/AttrTooltipDlg.cs.meta b/Client/Assets/Scripts/XMainClient/UI/AttrTooltipDlg.cs.meta
new file mode 100644
index 00000000..456cd149
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/AttrTooltipDlg.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 61eedc08117a319479ae5c4286a838b9
+timeCreated: 1611403839
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/AttrTooltipDlgBehaviour.cs b/Client/Assets/Scripts/XMainClient/UI/AttrTooltipDlgBehaviour.cs
new file mode 100644
index 00000000..7099f901
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/AttrTooltipDlgBehaviour.cs
@@ -0,0 +1,19 @@
+using System;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class AttrTooltipDlgBehaviour : TooltipDlgBehaviour
+ {
+ public XUIPool m_EmblemPartPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ public XUIPool m_JadePartPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ protected override void Awake()
+ {
+ this.m_EmblemPartPool.SetupPool(base.transform.Find("Bg/Bg").gameObject, base.transform.Find("Bg/Bg/ToolTip/TopFrame/EmblemPart").gameObject, 2u, false);
+ this.m_JadePartPool.SetupPool(base.transform.Find("Bg/Bg").gameObject, base.transform.Find("Bg/Bg/ToolTip/TopFrame/JadePart").gameObject, 2u, false);
+ base.Awake();
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/AttrTooltipDlgBehaviour.cs.meta b/Client/Assets/Scripts/XMainClient/UI/AttrTooltipDlgBehaviour.cs.meta
new file mode 100644
index 00000000..80312bb9
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/AttrTooltipDlgBehaviour.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: d6866e9c86d8c7f47893bf59c62d1f8d
+timeCreated: 1611404632
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/AuctionBillBehaviour.cs b/Client/Assets/Scripts/XMainClient/UI/AuctionBillBehaviour.cs
new file mode 100644
index 00000000..7dcf0aac
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/AuctionBillBehaviour.cs
@@ -0,0 +1,112 @@
+using System;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+
+namespace XMainClient.UI
+{
+ internal class AuctionBillBehaviour : DlgBehaviourBase
+ {
+ public IXUISprite m_maskSprite;
+
+ public IXUILabel m_billTitleTxt;
+
+ public GameObject m_ItemTpl;
+
+ public IXUISprite m_iconSprite;
+
+ public IXUILabel m_RecentPrice;
+
+ public IXUILabel m_TotalPrice;
+
+ public IXUILabel m_ProcedurePrice;
+
+ public IXUILabel m_RecommondTxt;
+
+ public IXUITable m_sellOper;
+
+ public AuctionNumberOperate m_SinglePriceOperate;
+
+ public AuctionNumberOperate m_CountOperate;
+
+ public IXUIButton m_LeftButton;
+
+ public IXUIButton m_RightButton;
+
+ public IXUIButton m_CloseButton;
+
+ private IXUILabel m_rightButtonLabel;
+
+ private IXUILabel m_leftButtonLabel;
+
+ private Vector3 m_leftPosition = new Vector3(-137f, -162f, 0f);
+
+ private Vector3 m_rightPosition = new Vector3(137f, -162f, 0f);
+
+ private Vector3 m_middlePosition = new Vector3(0f, -162f, 0f);
+
+ private void Awake()
+ {
+ this.m_billTitleTxt = (base.transform.Find("Detail/Title").GetComponent("XUILabel") as IXUILabel);
+ this.m_ItemTpl = base.transform.Find("Detail/ItemTpl").gameObject;
+ this.m_iconSprite = (base.transform.Find("Detail/ItemTpl/Icon").GetComponent("XUISprite") as IXUISprite);
+ this.m_RecentPrice = (base.transform.Find("Detail/SellSuccess/RecentPrice").GetComponent("XUILabel") as IXUILabel);
+ this.m_TotalPrice = (base.transform.Find("Detail/SellSuccess/Grid/Total/Label").GetComponent("XUILabel") as IXUILabel);
+ this.m_ProcedurePrice = (base.transform.Find("Detail/SellSuccess/Grid/Procedure/Label").GetComponent("XUILabel") as IXUILabel);
+ this.m_SinglePriceOperate = new AuctionNumberOperate(base.transform.Find("Detail/SellSuccess/Grid/Price").gameObject, new Vector3(-98f, 96f, 0f));
+ this.m_CountOperate = new AuctionNumberOperate(base.transform.Find("Detail/SellSuccess/Grid/Free").gameObject, new Vector3(-98f, 36f, 0f));
+ this.m_LeftButton = (base.transform.Find("Detail/LeftButton").GetComponent("XUIButton") as IXUIButton);
+ this.m_RightButton = (base.transform.Find("Detail/RightButton").GetComponent("XUIButton") as IXUIButton);
+ this.m_maskSprite = (base.transform.Find("Bg").GetComponent("XUISprite") as IXUISprite);
+ this.m_RecommondTxt = (base.transform.Find("Detail/SellSuccess/Recommond").GetComponent("XUILabel") as IXUILabel);
+ this.m_rightButtonLabel = (base.transform.Find("Detail/RightButton/Label").GetComponent("XUILabel") as IXUILabel);
+ this.m_leftButtonLabel = (base.transform.Find("Detail/LeftButton/Label").GetComponent("XUILabel") as IXUILabel);
+ this.m_CloseButton = (base.transform.Find("Close").GetComponent("XUIButton") as IXUIButton);
+ this.m_sellOper = (base.transform.Find("Detail/SellSuccess/Grid").GetComponent("XUITable") as IXUITable);
+ this.m_leftPosition = this.m_LeftButton.gameObject.transform.localPosition;
+ this.m_rightPosition = this.m_RightButton.gameObject.transform.localPosition;
+ this.m_middlePosition = new Vector3(0f, this.m_leftPosition.y, 0f);
+ }
+
+ public void SetButtonPosition(string[] seq)
+ {
+ int num = 0;
+ bool flag = !string.IsNullOrEmpty(seq[0]);
+ if (flag)
+ {
+ this.m_RightButton.SetVisible(true);
+ this.m_rightButtonLabel.SetText(seq[0]);
+ num++;
+ }
+ else
+ {
+ this.m_RightButton.SetVisible(false);
+ }
+ bool flag2 = !string.IsNullOrEmpty(seq[1]);
+ if (flag2)
+ {
+ this.m_LeftButton.SetVisible(true);
+ this.m_leftButtonLabel.SetText(seq[1]);
+ num++;
+ }
+ else
+ {
+ this.m_LeftButton.SetVisible(false);
+ }
+ bool flag3 = num == 1;
+ if (flag3)
+ {
+ this.m_RightButton.gameObject.transform.localPosition = this.m_middlePosition;
+ }
+ else
+ {
+ bool flag4 = num == 2;
+ if (flag4)
+ {
+ this.m_LeftButton.gameObject.transform.localPosition = this.m_leftPosition;
+ this.m_RightButton.gameObject.transform.localPosition = this.m_rightPosition;
+ }
+ }
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/AuctionBillBehaviour.cs.meta b/Client/Assets/Scripts/XMainClient/UI/AuctionBillBehaviour.cs.meta
new file mode 100644
index 00000000..46bc35d6
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/AuctionBillBehaviour.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 60f0a343841efc44aa2b50a554dd040b
+timeCreated: 1611403836
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/AuctionBillStyle.cs b/Client/Assets/Scripts/XMainClient/UI/AuctionBillStyle.cs
new file mode 100644
index 00000000..657a39f0
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/AuctionBillStyle.cs
@@ -0,0 +1,11 @@
+using System;
+
+namespace XMainClient.UI
+{
+ public enum AuctionBillStyle
+ {
+ PutAway,
+ RePutAway,
+ OutTime
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/AuctionBillStyle.cs.meta b/Client/Assets/Scripts/XMainClient/UI/AuctionBillStyle.cs.meta
new file mode 100644
index 00000000..464157a0
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/AuctionBillStyle.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: db09df9b9c1734e4dad22c49812b20b7
+timeCreated: 1611404651
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/AuctionBillView.cs b/Client/Assets/Scripts/XMainClient/UI/AuctionBillView.cs
new file mode 100644
index 00000000..ea63bafe
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/AuctionBillView.cs
@@ -0,0 +1,183 @@
+using System;
+using System.Collections.Generic;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class AuctionBillView : DlgBase<AuctionBillView, AuctionBillBehaviour>
+ {
+ public override string fileName
+ {
+ get
+ {
+ return "GameSystem/Auction/AuctionBillFrame";
+ }
+ }
+
+ public override bool autoload
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ private Dictionary<AuctionBillStyle, string[]> m_billStyles;
+
+ private AuctionBillStyle m_curBillStyle = AuctionBillStyle.PutAway;
+
+ private int m_referPrice = 0;
+
+ private ulong m_aucuid = 0UL;
+
+ private XItem m_curItem;
+
+ public void Set(XItem item, AuctionBillStyle style = AuctionBillStyle.PutAway, ulong uid = 0UL)
+ {
+ this.m_aucuid = uid;
+ this.m_curBillStyle = style;
+ this.m_curItem = item;
+ bool flag = this.m_curItem != null;
+ if (flag)
+ {
+ this.SetVisibleWithAnimation(true, null);
+ }
+ }
+
+ protected override void Init()
+ {
+ base.Init();
+ this.m_billStyles = new Dictionary<AuctionBillStyle, string[]>();
+ this.m_billStyles[AuctionBillStyle.PutAway] = new string[2];
+ this.m_billStyles[AuctionBillStyle.PutAway][0] = XStringDefineProxy.GetString("AUCTION_PUTAWAY");
+ this.m_billStyles[AuctionBillStyle.PutAway][1] = string.Empty;
+ this.m_billStyles[AuctionBillStyle.RePutAway] = new string[2];
+ this.m_billStyles[AuctionBillStyle.RePutAway][0] = XStringDefineProxy.GetString("AUCTION_RPUTAWAY");
+ this.m_billStyles[AuctionBillStyle.RePutAway][1] = XStringDefineProxy.GetString("ACUTION_SOLDOUT");
+ this.m_billStyles[AuctionBillStyle.OutTime] = new string[2];
+ this.m_billStyles[AuctionBillStyle.OutTime][0] = XStringDefineProxy.GetString("AUCTION_RPUTAWAY");
+ this.m_billStyles[AuctionBillStyle.OutTime][1] = XStringDefineProxy.GetString("AUCTION_PUTDOWN");
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ base.uiBehaviour.m_LeftButton.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnClickLeftHandler));
+ base.uiBehaviour.m_RightButton.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnClickRightHandler));
+ base.uiBehaviour.m_SinglePriceOperate.RegisterOperateChange(new AuctionNumberOperate.NumberOperateCallBack(this.OnTotalPriceOperateChange));
+ base.uiBehaviour.m_CountOperate.RegisterOperateChange(new AuctionNumberOperate.NumberOperateCallBack(this.OnTotalPriceOperateChange));
+ base.uiBehaviour.m_CloseButton.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnClickCloseHandler));
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ this.SetDetailInfo();
+ }
+
+ private void SetDetailInfo()
+ {
+ base.uiBehaviour.m_billTitleTxt.SetText(XStringDefineProxy.GetString((this.m_curBillStyle == AuctionBillStyle.OutTime) ? "AUCTION_TITLE_OUTTIME" : "AUCTION_TITLE_PUTAWAY"));
+ AuctionDocument specificDocument = XDocuments.GetSpecificDocument<AuctionDocument>(AuctionDocument.uuID);
+ base.uiBehaviour.SetButtonPosition(this.m_billStyles[this.m_curBillStyle]);
+ ItemList.RowData itemConf = XBagDocument.GetItemConf(this.m_curItem.itemID);
+ float discount = AuctionDocument.GetDiscount((uint)itemConf.AuctionGroup);
+ float num = this.m_curItem.Treasure ? float.Parse(XSingleton<XGlobalConfig>.singleton.GetValue("AuctTreasureTJPriceRate")) : 1f;
+ this.m_referPrice = Mathf.FloorToInt(itemConf.AuctPriceRecommend * discount * num);
+ uint referPrice;
+ bool flag = !specificDocument.TryGetAuctionBriefReferPrice((uint)this.m_curItem.itemID, out referPrice) || referPrice == 0u;
+ if (flag)
+ {
+ referPrice = (uint)this.m_referPrice;
+ }
+ float num2 = itemConf.AuctionRange[1];
+ float num3 = itemConf.AuctionRange[0];
+ int step = Mathf.CeilToInt((float)this.m_referPrice * float.Parse(XSingleton<XGlobalConfig>.singleton.GetValue("AuctionOperStep")));
+ base.uiBehaviour.m_RecentPrice.SetText(referPrice.ToString());
+ base.uiBehaviour.m_SinglePriceOperate.Set(Mathf.FloorToInt(num2 * (float)this.m_referPrice), Mathf.CeilToInt((float)this.m_referPrice * num3), this.m_referPrice, step, false, false);
+ bool flag2 = this.m_curBillStyle == AuctionBillStyle.PutAway;
+ if (flag2)
+ {
+ base.uiBehaviour.m_CountOperate.Set((itemConf.AuctionUpperLimit == 0) ? this.m_curItem.itemCount : Mathf.Min(this.m_curItem.itemCount, (int)itemConf.AuctionUpperLimit), 1, 1, 1, true, false);
+ base.uiBehaviour.m_CountOperate.SetEnable(true);
+ }
+ else
+ {
+ base.uiBehaviour.m_CountOperate.Set(this.m_curItem.itemCount, 1, this.m_curItem.itemCount, 1, true, false);
+ base.uiBehaviour.m_CountOperate.SetEnable(false);
+ }
+ XSingleton<XItemDrawerMgr>.singleton.DrawItem(base.uiBehaviour.m_ItemTpl, this.m_curItem);
+ base.uiBehaviour.m_iconSprite.ID = this.m_curItem.uid;
+ base.uiBehaviour.m_iconSprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnItemClick));
+ base.uiBehaviour.m_ProcedurePrice.SetText(XSingleton<XGlobalConfig>.singleton.GetValue("AuctOnSaleCostGold"));
+ base.uiBehaviour.m_sellOper.Reposition();
+ }
+
+ private void OnItemClick(IXUISprite sprite)
+ {
+ XSingleton<UiUtility>.singleton.ShowTooltipDialog(this.m_curItem, null, sprite, false, 0u);
+ }
+
+ private void OnTotalPriceOperateChange()
+ {
+ int num = base.uiBehaviour.m_SinglePriceOperate.Cur * base.uiBehaviour.m_CountOperate.Cur;
+ base.uiBehaviour.m_TotalPrice.SetText(num.ToString());
+ int num2 = Mathf.Abs(base.uiBehaviour.m_SinglePriceOperate.Cur - this.m_referPrice);
+ float num3 = 0f;
+ bool flag = this.m_referPrice != 0;
+ if (flag)
+ {
+ num3 = (float)num2 / (float)this.m_referPrice;
+ }
+ int num4 = Mathf.FloorToInt(num3 * 100f);
+ base.uiBehaviour.m_RecommondTxt.SetText(string.Format((base.uiBehaviour.m_SinglePriceOperate.Cur < this.m_referPrice) ? "-{0}%" : "+{0}%", num4));
+ }
+
+ private bool OnClickLeftHandler(IXUIButton btn)
+ {
+ AuctionDocument specificDocument = XDocuments.GetSpecificDocument<AuctionDocument>(AuctionDocument.uuID);
+ AuctionBillStyle curBillStyle = this.m_curBillStyle;
+ if (curBillStyle != AuctionBillStyle.RePutAway)
+ {
+ if (curBillStyle == AuctionBillStyle.OutTime)
+ {
+ specificDocument.RequestAuctionQuitSale(this.m_aucuid);
+ }
+ }
+ else
+ {
+ specificDocument.RequestAuctionQuitSale(this.m_aucuid);
+ }
+ this.SetVisibleWithAnimation(false, null);
+ return true;
+ }
+
+ private bool OnClickRightHandler(IXUIButton btn)
+ {
+ AuctionDocument specificDocument = XDocuments.GetSpecificDocument<AuctionDocument>(AuctionDocument.uuID);
+ AuctionBillStyle curBillStyle = this.m_curBillStyle;
+ if (curBillStyle != AuctionBillStyle.PutAway)
+ {
+ if (curBillStyle - AuctionBillStyle.RePutAway <= 1)
+ {
+ specificDocument.RequestAcutionReSale(this.m_aucuid, (uint)base.uiBehaviour.m_SinglePriceOperate.Cur);
+ }
+ }
+ else
+ {
+ specificDocument.RequestAuctionSale(this.m_curItem.uid, (uint)this.m_curItem.itemID, (uint)base.uiBehaviour.m_CountOperate.Cur, (uint)base.uiBehaviour.m_SinglePriceOperate.Cur, this.m_curItem.Treasure);
+ }
+ this.SetVisibleWithAnimation(false, null);
+ return true;
+ }
+
+ private bool OnClickCloseHandler(IXUIButton sprite)
+ {
+ this.SetVisibleWithAnimation(false, null);
+ return true;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/AuctionBillView.cs.meta b/Client/Assets/Scripts/XMainClient/UI/AuctionBillView.cs.meta
new file mode 100644
index 00000000..f33f439a
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/AuctionBillView.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: be91aae943a275e4394cc78249d05c77
+timeCreated: 1611404462
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/AuctionBuyHandler.cs b/Client/Assets/Scripts/XMainClient/UI/AuctionBuyHandler.cs
new file mode 100644
index 00000000..142e7ea2
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/AuctionBuyHandler.cs
@@ -0,0 +1,560 @@
+using System;
+using System.Collections.Generic;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class AuctionBuyHandler : DlgHandlerBase
+ {
+ protected override string FileName
+ {
+ get
+ {
+ return "GameSystem/Auction/AuctionBuyFrame";
+ }
+ }
+
+ private AuctionDocument _Doc;
+
+ private IXUIScrollView m_typeListScrollView;
+
+ private XUIPool m_levelOnePool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ private XUIPool m_levelTwoPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ private Dictionary<int, GameObject> m_typeDictionary = new Dictionary<int, GameObject>();
+
+ private int m_NormalSelect = 6;
+
+ private IXUILabel m_refreshTime;
+
+ private IXUILabelSymbol m_refreshButtonLabel;
+
+ private IXUIButton m_refreshButton;
+
+ private Transform m_ailinTransform;
+
+ private IXUICheckBox m_ItemLevelCheck;
+
+ private IXUICheckBox m_ItemBlockCheck;
+
+ private int m_curAuctionType = 0;
+
+ private Transform m_ItemWrap;
+
+ private Transform m_GoodWrap;
+
+ private List<ItemList.RowData> m_ShowAuctionList;
+
+ private List<AuctionItem> m_showSelectItems;
+
+ private AuctionWrapContentGroup m_ItemContentGroup;
+
+ private AuctionWrapContentGroup m_AuctionItemGroup;
+
+ private XElapseTimer m_freeRefreshTime = new XElapseTimer();
+
+ private bool m_freeRefresh = false;
+
+ public override void OnUpdate()
+ {
+ base.OnUpdate();
+ this.RefreshFreeRefreshCount();
+ bool freeRefresh = this.m_freeRefresh;
+ if (freeRefresh)
+ {
+ this.UpdateNextFreshTime();
+ }
+ }
+
+ public override void OnUnload()
+ {
+ this.m_ItemContentGroup = null;
+ this.m_AuctionItemGroup = null;
+ bool flag = this.m_ShowAuctionList != null;
+ if (flag)
+ {
+ this.m_ShowAuctionList.Clear();
+ this.m_ShowAuctionList = null;
+ }
+ base.OnUnload();
+ }
+
+ protected override void Init()
+ {
+ base.Init();
+ this.m_ShowAuctionList = new List<ItemList.RowData>();
+ this._Doc = XDocuments.GetSpecificDocument<AuctionDocument>(AuctionDocument.uuID);
+ this.m_typeListScrollView = (base.PanelObject.transform.Find("TypeList").GetComponent("XUIScrollView") as IXUIScrollView);
+ Transform transform = base.PanelObject.transform.Find("TypeList/Table/LevelOneTpl");
+ this.m_levelOnePool.SetupPool(transform.parent.gameObject, transform.gameObject, 10u, false);
+ transform = base.PanelObject.transform.Find("TypeList/Table/LevelTwoTpl");
+ this.m_levelTwoPool.SetupPool(transform.parent.gameObject, transform.gameObject, 30u, false);
+ this.m_ItemWrap = base.PanelObject.transform.Find("Item");
+ this.m_GoodWrap = base.PanelObject.transform.Find("Good");
+ this.m_ailinTransform = base.PanelObject.transform.Find("ailin");
+ this.m_refreshTime = (base.PanelObject.transform.Find("RefreshTime").GetComponent("XUILabel") as IXUILabel);
+ this.m_refreshButton = (base.PanelObject.transform.Find("RefreshBtn").GetComponent("XUIButton") as IXUIButton);
+ this.m_refreshButtonLabel = (base.PanelObject.transform.Find("RefreshBtn/Label").GetComponent("XUILabelSymbol") as IXUILabelSymbol);
+ this.m_ItemLevelCheck = (base.PanelObject.transform.Find("Item/TitleTip/ItemLevel").GetComponent("XUICheckBox") as IXUICheckBox);
+ this.m_ItemBlockCheck = (base.PanelObject.transform.Find("Item/TitleTip/ItemBlock").GetComponent("XUICheckBox") as IXUICheckBox);
+ this.m_ItemContentGroup = new AuctionWrapContentGroup();
+ this.m_ItemContentGroup.SetAuctionWrapContentTemp(base.PanelObject.transform.Find("Item/ItemList"), new WrapItemUpdateEventHandler(this.OnItemWrapContentUpdate));
+ this.m_AuctionItemGroup = new AuctionWrapContentGroup();
+ this.m_AuctionItemGroup.SetAuctionWrapContentTemp(base.PanelObject.transform.Find("Good/GoodList"), new WrapItemUpdateEventHandler(this.OnAuctionItemUpdate));
+ this.SetupTypeList();
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ this.m_ItemBlockCheck.RegisterOnCheckEventHandler(new CheckBoxOnCheckEventHandler(this.OnItemFilterCheckClicked));
+ this.m_ItemLevelCheck.RegisterOnCheckEventHandler(new CheckBoxOnCheckEventHandler(this.OnItemFilterCheckClicked));
+ this.m_refreshButton.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnTimeFreshClick));
+ }
+
+ private void OnItemWrapContentUpdate(Transform t, int index)
+ {
+ bool flag = t == null;
+ if (!flag)
+ {
+ Transform transform = t.Find("DetailTpl");
+ bool flag2 = transform == null;
+ if (!flag2)
+ {
+ IXUICheckBox ixuicheckBox = transform.GetComponent("XUICheckBox") as IXUICheckBox;
+ bool flag3 = ixuicheckBox != null;
+ if (flag3)
+ {
+ ixuicheckBox.bChecked = false;
+ }
+ bool flag4 = index < 0 || index >= this.m_ShowAuctionList.Count;
+ if (flag4)
+ {
+ transform.gameObject.SetActive(false);
+ }
+ else
+ {
+ transform.gameObject.SetActive(true);
+ Transform transform2 = transform.Find("ItemTpl");
+ IXUILabel ixuilabel = transform.Find("Price").GetComponent("XUILabel") as IXUILabel;
+ IXUISprite ixuisprite = transform.GetComponent("XUISprite") as IXUISprite;
+ ItemList.RowData rowData = this.m_ShowAuctionList[index];
+ XSingleton<XItemDrawerMgr>.singleton.normalItemDrawer.DrawItem(transform2.gameObject, rowData, 0, false);
+ XSingleton<XItemDrawerMgr>.singleton.normalItemDrawer.OpenClickShowTooltipEvent(transform2.gameObject, rowData.ItemID);
+ uint num = 0u;
+ this._Doc.TryGetAuctionBriefCount((uint)rowData.ItemID, out num);
+ ixuilabel.SetText(XStringDefineProxy.GetString("AUCTION_PURCHASE_ONLINE", new object[]
+ {
+ num
+ }));
+ ixuisprite.ID = (ulong)((long)rowData.ItemID);
+ ixuisprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnCheckBoxOnCheckEventHandler));
+ }
+ }
+ }
+ }
+
+ private void OnAuctionItemUpdate(Transform t, int index)
+ {
+ bool flag = t == null;
+ if (!flag)
+ {
+ Transform transform = t.Find("DetailTpl");
+ bool flag2 = this.m_showSelectItems == null || transform == null;
+ if (!flag2)
+ {
+ IXUICheckBox ixuicheckBox = transform.GetComponent("XUICheckBox") as IXUICheckBox;
+ bool flag3 = ixuicheckBox != null;
+ if (flag3)
+ {
+ ixuicheckBox.bChecked = false;
+ }
+ bool flag4 = index < 0 || index >= this.m_showSelectItems.Count;
+ if (flag4)
+ {
+ transform.gameObject.SetActive(false);
+ }
+ else
+ {
+ transform.gameObject.SetActive(true);
+ Transform transform2 = transform.Find("ItemTpl");
+ IXUISprite ixuisprite = transform.Find("ItemTpl/Icon").GetComponent("XUISprite") as IXUISprite;
+ IXUILabelSymbol ixuilabelSymbol = transform.Find("Price").GetComponent("XUILabelSymbol") as IXUILabelSymbol;
+ IXUISprite ixuisprite2 = transform.GetComponent("XUISprite") as IXUISprite;
+ IXUILabel ixuilabel = transform.Find("AptValue").GetComponent("XUILabel") as IXUILabel;
+ AuctionItem auctionItem = this.m_showSelectItems[index];
+ ixuilabel.Alpha = 0f;
+ ixuilabel.SetText(string.Empty);
+ XSingleton<XItemDrawerMgr>.singleton.DrawItem(transform2.gameObject, auctionItem.itemData);
+ ixuisprite.ID = (ulong)((long)index);
+ ixuisprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnItemClicked));
+ ixuilabelSymbol.InputText = XLabelSymbolHelper.FormatCostWithIconLast((int)auctionItem.perprice, ItemEnum.DRAGON_COIN);
+ ixuisprite2.ID = (ulong)((long)index);
+ ixuisprite2.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnClickAuctionDetailHandler));
+ }
+ }
+ }
+ }
+
+ private bool OnTimeFreshClick(IXUIButton btn)
+ {
+ this._Doc.RequestAuctionRefresh();
+ return false;
+ }
+
+ private void OnCheckBoxOnCheckEventHandler(IXUISprite sprite)
+ {
+ uint itemid = (uint)sprite.ID;
+ this._Doc.RequestAuctionItemData(itemid);
+ }
+
+ private void OnClickAuctionDetailHandler(IXUISprite checkBox)
+ {
+ int num = (int)checkBox.ID;
+ bool flag = this.m_showSelectItems.Count > num;
+ if (flag)
+ {
+ DlgBase<AuctionPurchaseView, AuctionPurchaseBehaviour>.singleton.Set(this.m_showSelectItems[num]);
+ }
+ }
+
+ private void OnItemClicked(IXUISprite sp)
+ {
+ bool flag = this.m_showSelectItems.Count > (int)sp.ID;
+ if (flag)
+ {
+ XItem itemData = this.m_showSelectItems[(int)sp.ID].itemData;
+ bool flag2 = itemData == null;
+ if (!flag2)
+ {
+ bool flag3 = itemData.type == 1u;
+ if (flag3)
+ {
+ XSingleton<UiUtility>.singleton.ShowTooltipDialog(itemData.itemConf.ItemID, sp, 0u);
+ }
+ else
+ {
+ XSingleton<UiUtility>.singleton.ShowTooltipDialogWithSearchingCompare(this.m_showSelectItems[(int)sp.ID].itemData, sp, false, 0u);
+ }
+ }
+ }
+ }
+
+ private void ShowSelectItem()
+ {
+ this.m_ItemWrap.gameObject.SetActive(false);
+ this.m_GoodWrap.gameObject.SetActive(true);
+ this.m_showSelectItems = this._Doc.GetOverlapItems();
+ this.m_AuctionItemGroup.SetWrapContentSize(this.m_showSelectItems.Count);
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ this._Doc.RequestAuctionAllItemBrief();
+ this.m_freeRefresh = false;
+ }
+
+ public override void RefreshData()
+ {
+ bool showItemData = this._Doc.ShowItemData;
+ if (showItemData)
+ {
+ this.ShowSelectItem();
+ }
+ else
+ {
+ this.CalculateAuctionSelect();
+ this.SetNextFreeTime();
+ this.RefreshFreeRefreshCount();
+ }
+ }
+
+ private void RefreshFreeRefreshCount()
+ {
+ bool flag = this._Doc.NextFreeRefreshTime > 0.0;
+ if (flag)
+ {
+ this.m_refreshButtonLabel.InputText = XStringDefineProxy.GetString("AUCTION_FREE", new object[]
+ {
+ XSingleton<XCommon>.singleton.StringCombine("\n(", XSingleton<UiUtility>.singleton.TimeDuarationFormatString((int)this._Doc.NextFreeRefreshTime, 5), ")")
+ });
+ }
+ else
+ {
+ this.m_refreshButtonLabel.InputText = XStringDefineProxy.GetString("AUCTION_FREE", new object[]
+ {
+ string.Empty
+ });
+ }
+ }
+
+ private void SetNextFreeTime()
+ {
+ this.m_freeRefreshTime.LeftTime = this._Doc.NextOutoRefreshTime;
+ this.UpdateNextFreshTime();
+ }
+
+ private void UpdateNextFreshTime()
+ {
+ this.m_freeRefreshTime.Update();
+ bool flag = this.m_freeRefreshTime.LeftTime > 0f;
+ if (flag)
+ {
+ this.m_freeRefresh = true;
+ this.m_refreshTime.SetText(XStringDefineProxy.GetString("AUCTION_FRESHTIME_LABEL", new object[]
+ {
+ XSingleton<UiUtility>.singleton.TimeDuarationFormatString((int)this.m_freeRefreshTime.LeftTime, 5)
+ }));
+ }
+ else
+ {
+ this.m_freeRefresh = false;
+ this.m_refreshTime.SetText(string.Empty);
+ this._Doc.RequestAuctionAuto();
+ }
+ }
+
+ private void SetNormalSelect()
+ {
+ GameObject gameObject;
+ bool flag = this.m_typeDictionary.TryGetValue(this.m_curAuctionType, out gameObject);
+ if (flag)
+ {
+ IXUICheckBox ixuicheckBox = gameObject.GetComponent("XUICheckBox") as IXUICheckBox;
+ bool flag2 = ixuicheckBox == null;
+ if (!flag2)
+ {
+ ixuicheckBox.bChecked = true;
+ }
+ }
+ }
+
+ private void SetupTypeList()
+ {
+ this.m_levelOnePool.ReturnAll(false);
+ this.m_levelTwoPool.ReturnAll(true);
+ this.m_typeDictionary.Clear();
+ for (int i = 0; i < this._Doc.AuctionTypeList.Table.Length; i++)
+ {
+ bool flag = this._Doc.AuctionTypeList.Table[i].pretype == 0;
+ if (flag)
+ {
+ GameObject gameObject = this.m_levelOnePool.FetchGameObject(false);
+ IXUILabel ixuilabel = gameObject.transform.Find("Label").GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel2 = gameObject.transform.Find("Selected/Label").GetComponent("XUILabel") as IXUILabel;
+ IXUISprite ixuisprite = gameObject.transform.Find("Switch").GetComponent("XUISprite") as IXUISprite;
+ IXUISprite ixuisprite2 = gameObject.GetComponent("XUISprite") as IXUISprite;
+ ixuisprite2.ID = (ulong)this._Doc.AuctionTypeList.Table[i].id;
+ gameObject.name = this._Doc.AuctionTypeList.Table[i].id.ToString();
+ ixuilabel.SetText(this._Doc.AuctionTypeList.Table[i].name);
+ ixuilabel2.SetText(this._Doc.AuctionTypeList.Table[i].name);
+ ixuisprite2.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnTypeCheckBoxClicked));
+ ixuisprite.SetAlpha(0f);
+ bool flag2 = !this.m_typeDictionary.ContainsKey(this._Doc.AuctionTypeList.Table[i].id);
+ if (flag2)
+ {
+ this.m_typeDictionary.Add(this._Doc.AuctionTypeList.Table[i].id, gameObject);
+ }
+ }
+ }
+ int j = 0;
+ while (j < this._Doc.AuctionTypeList.Table.Length)
+ {
+ bool flag3 = this._Doc.AuctionTypeList.Table[j].pretype != 0;
+ if (flag3)
+ {
+ bool flag4 = !this.m_typeDictionary.ContainsKey(this._Doc.AuctionTypeList.Table[j].pretype);
+ if (!flag4)
+ {
+ GameObject gameObject2 = this.m_levelTwoPool.FetchGameObject(false);
+ IXUILabel ixuilabel3 = gameObject2.transform.Find("Label").GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel4 = gameObject2.transform.Find("Selected/Label").GetComponent("XUILabel") as IXUILabel;
+ IXUISprite ixuisprite3 = gameObject2.GetComponent("XUISprite") as IXUISprite;
+ ixuisprite3.ID = (ulong)this._Doc.AuctionTypeList.Table[j].id;
+ gameObject2.name = this._Doc.AuctionTypeList.Table[j].id.ToString();
+ ixuilabel3.SetText(this._Doc.AuctionTypeList.Table[j].name);
+ ixuilabel4.SetText(this._Doc.AuctionTypeList.Table[j].name);
+ ixuisprite3.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnTypeCheckBoxClicked));
+ Transform transform = this.m_typeDictionary[this._Doc.AuctionTypeList.Table[j].pretype].transform.Find("ChildList");
+ IXUISprite ixuisprite4 = this.m_typeDictionary[this._Doc.AuctionTypeList.Table[j].pretype].transform.Find("Switch").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite4.SetAlpha(1f);
+ gameObject2.transform.parent = transform;
+ gameObject2.transform.localScale = Vector3.one;
+ gameObject2.transform.localPosition = new Vector3(0f, -((float)transform.childCount - 0.5f) * (float)ixuisprite3.spriteHeight, 0f);
+ bool flag5 = !this.m_typeDictionary.ContainsKey(this._Doc.AuctionTypeList.Table[j].id);
+ if (flag5)
+ {
+ this.m_typeDictionary.Add(this._Doc.AuctionTypeList.Table[j].id, gameObject2);
+ }
+ }
+ }
+ IL_476:
+ j++;
+ continue;
+ goto IL_476;
+ }
+ this.ShowNormalSelect();
+ }
+
+ private void ShowNormalSelect()
+ {
+ int parentID = 0;
+ GameObject gameObject;
+ bool flag = this.m_typeDictionary.TryGetValue(this.m_NormalSelect, out gameObject);
+ if (flag)
+ {
+ this.m_curAuctionType = this.m_NormalSelect;
+ IXUICheckBox ixuicheckBox = gameObject.GetComponent("XUICheckBox") as IXUICheckBox;
+ ixuicheckBox.bChecked = true;
+ bool flag2 = AuctionDocument.TryGetAuctionTypeParentID(this.m_NormalSelect, out parentID);
+ if (flag2)
+ {
+ this.ShowSelectParent(parentID);
+ }
+ }
+ }
+
+ private void ShowSelectParent(int parentID)
+ {
+ bool flag = parentID == 0;
+ if (!flag)
+ {
+ GameObject gameObject;
+ bool flag2 = this.m_typeDictionary.TryGetValue(parentID, out gameObject);
+ if (flag2)
+ {
+ IXUIPlayTweenGroup ixuiplayTweenGroup = gameObject.GetComponent("XUIPlayTweenGroup") as IXUIPlayTweenGroup;
+ bool flag3 = ixuiplayTweenGroup == null;
+ if (!flag3)
+ {
+ ixuiplayTweenGroup.PlayTween(true);
+ }
+ }
+ }
+ }
+
+ private bool OnItemFilterCheckClicked(IXUICheckBox box)
+ {
+ this.CalculateAuctionSelect();
+ return true;
+ }
+
+ private void OnTypeCheckBoxClicked(IXUISprite box)
+ {
+ bool flag = this.m_curAuctionType != (int)box.ID || !this.m_ItemContentGroup.Active;
+ if (flag)
+ {
+ this.m_curAuctionType = (int)box.ID;
+ this.CalculateAuctionSelect();
+ }
+ }
+
+ private void CalculateAuctionSelect()
+ {
+ this.m_ItemWrap.gameObject.SetActive(true);
+ this.m_GoodWrap.gameObject.SetActive(false);
+ this.m_ShowAuctionList.Clear();
+ int selectCount = this.m_ItemBlockCheck.bChecked ? 1 : 0;
+ bool bChecked = this.m_ItemLevelCheck.bChecked;
+ int minLevel;
+ int sealLevel;
+ if (bChecked)
+ {
+ XLevelSealDocument.GetSealLevelRange((int)XSingleton<XAttributeMgr>.singleton.XPlayerData.Level, out minLevel, out sealLevel);
+ }
+ else
+ {
+ XLevelSealDocument specificDocument = XDocuments.GetSpecificDocument<XLevelSealDocument>(XLevelSealDocument.uuID);
+ sealLevel = (int)specificDocument.SealLevel;
+ minLevel = 0;
+ }
+ this.SelectItemList(this.m_curAuctionType, selectCount, sealLevel, minLevel);
+ List<int> list;
+ bool flag = AuctionDocument.TryGetChildren(this.m_curAuctionType, out list);
+ if (flag)
+ {
+ int i = 0;
+ int count = list.Count;
+ while (i < count)
+ {
+ this.SelectItemList(list[i], selectCount, sealLevel, minLevel);
+ i++;
+ }
+ }
+ this.m_ailinTransform.gameObject.SetActive(this.m_ShowAuctionList.Count == 0);
+ this.m_ShowAuctionList.Sort(new Comparison<ItemList.RowData>(this.Compare));
+ this.m_ItemContentGroup.SetWrapContentSize(this.m_ShowAuctionList.Count);
+ bool flag2 = this._Doc.CurrentSelectRefresh && this.m_ShowAuctionList.Count == 0;
+ if (flag2)
+ {
+ XSingleton<UiUtility>.singleton.ShowLoginTip(XStringDefineProxy.GetString("AUCTION_EMPTY_MESSAGE"));
+ }
+ this._Doc.CurrentSelectRefresh = false;
+ }
+
+ private void SelectItemList(int auctionType, int selectCount, int maxLeavl, int minLevel)
+ {
+ List<ItemList.RowData> list;
+ bool flag = XBagDocument.TryGetAuctionList((uint)auctionType, out list);
+ if (flag)
+ {
+ int i = 0;
+ int count = list.Count;
+ while (i < count)
+ {
+ bool flag2 = this.FilterAuctionItem(list[i], selectCount, maxLeavl, minLevel);
+ if (flag2)
+ {
+ this.m_ShowAuctionList.Add(list[i]);
+ }
+ i++;
+ }
+ }
+ }
+
+ private int Compare(ItemList.RowData f, ItemList.RowData l)
+ {
+ bool flag = l.ReqLevel == f.ReqLevel;
+ int result;
+ if (flag)
+ {
+ bool flag2 = l.ItemQuality == f.ItemQuality;
+ if (flag2)
+ {
+ result = l.SortID - f.SortID;
+ }
+ else
+ {
+ result = (int)(l.ItemQuality - f.ItemQuality);
+ }
+ }
+ else
+ {
+ result = (int)(l.ReqLevel - f.ReqLevel);
+ }
+ return result;
+ }
+
+ private bool FilterAuctionItem(ItemList.RowData rowData, int selectCount, int maxLeavl, int minLevel)
+ {
+ uint auctionBriefCount = this._Doc.GetAuctionBriefCount((uint)rowData.ItemID);
+ bool flag = (ulong)auctionBriefCount < (ulong)((long)selectCount);
+ bool result;
+ if (flag)
+ {
+ result = false;
+ }
+ else
+ {
+ bool flag2 = rowData.ReqLevel > 1 && ((int)rowData.ReqLevel < minLevel || (int)rowData.ReqLevel > maxLeavl);
+ result = !flag2;
+ }
+ return result;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/AuctionBuyHandler.cs.meta b/Client/Assets/Scripts/XMainClient/UI/AuctionBuyHandler.cs.meta
new file mode 100644
index 00000000..e2132dca
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/AuctionBuyHandler.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: ed95a1928297a054e9a2e52ffe7a03bd
+timeCreated: 1611404791
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/AuctionHouseHandler.cs b/Client/Assets/Scripts/XMainClient/UI/AuctionHouseHandler.cs
new file mode 100644
index 00000000..661deb76
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/AuctionHouseHandler.cs
@@ -0,0 +1,603 @@
+using System;
+using System.Collections.Generic;
+using KKSG;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class AuctionHouseHandler : DlgHandlerBase
+ {
+ protected override string FileName
+ {
+ get
+ {
+ return "GameSystem/Auction/AuctionHouseFrame";
+ }
+ }
+
+ private AuctionHouseDocument _doc;
+
+ private GameObject m_ResultWindow;
+
+ private IXUILabel m_ResultTitle;
+
+ private IXUIButton m_ResultCloseBtn;
+
+ private IXUIScrollView m_ResultScrollView;
+
+ private IXUIWrapContent m_ResultWrapContent;
+
+ private XUIPool m_ResultPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ private IXUIButton m_ResultBtn;
+
+ private IXUILabel m_ResultLabel;
+
+ private XUIPool m_LevelOnePool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ private XUIPool m_LevelTwoPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ private IXUIScrollView m_ItemScrollView;
+
+ private IXUIWrapContent m_ItemListWrapContent;
+
+ private GameObject m_NoneItem;
+
+ private IXUITable m_Table;
+
+ private IXUILabel m_MySpoil;
+
+ private IXUILabel m_NoSpoil;
+
+ private List<Transform> m_parentTypeTs = new List<Transform>();
+
+ private uint _timeToken;
+
+ private uint _reqToken;
+
+ private IXUILabel[] _timeLabel = new IXUILabel[8];
+
+ private int[] _leftTime = new int[8];
+
+ private bool[] _gsq = new bool[8];
+
+ private IXUISprite _lastClickTabSprite;
+
+ private double _signTime;
+
+ private ulong _signUid;
+
+ private uint _signPrice;
+
+ private uint _signMaxPrice;
+
+ private int _signActType;
+
+ private static readonly int MAXSHOWITEM = 8;
+
+ private int TYPEMAX;
+
+ private float PERADDPRICE;
+
+ private bool RefreshGuildTabs = false;
+
+ private IXUISprite m_GeneraliSp;
+
+ private IXUITweenTool m_SwitchTween;
+
+ private bool m_TweenToggle = false;
+
+ private string WaitStartString;
+
+ protected override void Init()
+ {
+ base.Init();
+ this._doc = XDocuments.GetSpecificDocument<AuctionHouseDocument>(AuctionHouseDocument.uuID);
+ this.TYPEMAX = XSingleton<XGlobalConfig>.singleton.GetInt("AuctHouseTypeMax");
+ this.PERADDPRICE = (float)XSingleton<XGlobalConfig>.singleton.GetInt("GuildAuctUpRate") / 100f + 1f;
+ this.WaitStartString = XSingleton<UiUtility>.singleton.ReplaceReturn(XStringDefineProxy.GetString("AuctionHouseWaitStart"));
+ this.m_ResultWindow = base.PanelObject.transform.Find("ResultWindow").gameObject;
+ this.m_ResultWindow.SetActive(false);
+ this.m_ResultTitle = (this.m_ResultWindow.transform.Find("Title").GetComponent("XUILabel") as IXUILabel);
+ this.m_ResultCloseBtn = (this.m_ResultWindow.transform.Find("Close").GetComponent("XUIButton") as IXUIButton);
+ this.m_ResultScrollView = (this.m_ResultWindow.transform.Find("ScrollView").GetComponent("XUIScrollView") as IXUIScrollView);
+ this.m_ResultWrapContent = (this.m_ResultScrollView.gameObject.transform.Find("WrapContent").GetComponent("XUIWrapContent") as IXUIWrapContent);
+ Transform transform = this.m_ResultWrapContent.gameObject.transform.Find("Tpl");
+ this.m_ResultPool.SetupPool(transform.parent.gameObject, transform.gameObject, 16u, false);
+ this.m_ResultBtn = (base.PanelObject.transform.Find("Result").GetComponent("XUIButton") as IXUIButton);
+ this.m_ResultLabel = (this.m_ResultBtn.gameObject.transform.Find("Label").GetComponent("XUILabel") as IXUILabel);
+ this.m_Table = (base.PanelObject.transform.Find("TypeList/Table").GetComponent("XUITable") as IXUITable);
+ transform = base.PanelObject.transform.Find("TypeList/Table/LevelOneTpl");
+ this.m_LevelOnePool.SetupPool(transform.parent.gameObject, transform.gameObject, 2u, false);
+ transform = base.PanelObject.transform.Find("TypeList/Table/LevelTwoTpl");
+ this.m_LevelTwoPool.SetupPool(transform.parent.gameObject, transform.gameObject, 5u, false);
+ this.m_ItemScrollView = (base.PanelObject.transform.Find("Right/ScrollView").GetComponent("XUIScrollView") as IXUIScrollView);
+ this.m_ItemListWrapContent = (this.m_ItemScrollView.gameObject.transform.Find("WrapContent").GetComponent("XUIWrapContent") as IXUIWrapContent);
+ this.m_NoneItem = base.PanelObject.transform.Find("None").gameObject;
+ this.m_MySpoil = (base.PanelObject.transform.Find("MySpoil").GetComponent("XUILabel") as IXUILabel);
+ this.m_NoSpoil = (base.PanelObject.transform.Find("NoSpoil").GetComponent("XUILabel") as IXUILabel);
+ this.SetupLevelOneTypeList();
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ this.m_ResultCloseBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnResultCloseBtnClick));
+ this.m_ResultBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnResultBtnClick));
+ this.m_ItemListWrapContent.RegisterItemUpdateEventHandler(new WrapItemUpdateEventHandler(this.ItemWrapListUpdated));
+ this.m_ItemListWrapContent.RegisterItemInitEventHandler(new WrapItemInitEventHandler(this.ItemWrapListInit));
+ this.m_ResultWrapContent.RegisterItemUpdateEventHandler(new WrapItemUpdateEventHandler(this.ResultWrapListUpdated));
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ this.RefreshGuildTabs = true;
+ this.OnTypeCheckBoxClick(this.m_GeneraliSp);
+ this.m_TweenToggle = !this.m_TweenToggle;
+ IXUICheckBox ixuicheckBox = this.m_GeneraliSp.gameObject.GetComponent("XUICheckBox") as IXUICheckBox;
+ ixuicheckBox.bChecked = true;
+ XSingleton<XGameSysMgr>.singleton.SetSysRedPointState(XSysDefine.XSys_Auction, false);
+ XSingleton<XGameSysMgr>.singleton.RecalculateRedPointState(XSysDefine.XSys_Auction, true);
+ DlgBase<AuctionView, AuctionBehaviour>.singleton.SetGuildAuctionRedPointState(false);
+ }
+
+ protected override void OnHide()
+ {
+ XSingleton<XTimerMgr>.singleton.KillTimer(this._timeToken);
+ XSingleton<XTimerMgr>.singleton.KillTimer(this._reqToken);
+ base.OnHide();
+ }
+
+ public override void OnUnload()
+ {
+ XSingleton<XTimerMgr>.singleton.KillTimer(this._timeToken);
+ XSingleton<XTimerMgr>.singleton.KillTimer(this._reqToken);
+ base.OnUnload();
+ }
+
+ public override void RefreshData()
+ {
+ switch (this._doc.DataState)
+ {
+ case GuildAuctReqType.GART_ACT_TYPE:
+ case GuildAuctReqType.GART_ITEM_TYPE:
+ {
+ this._signTime = this.GetNowTime();
+ this.RefreshItemList(this._doc.ResetScrollView);
+ bool refreshGuildTabs = this.RefreshGuildTabs;
+ if (refreshGuildTabs)
+ {
+ this.RefreshGuildTabs = false;
+ this.SetupLevelTwoTypeList();
+ bool flag = !this.m_TweenToggle;
+ if (flag)
+ {
+ this.m_TweenToggle = !this.m_TweenToggle;
+ this.m_SwitchTween.PlayTween(true, -1f);
+ }
+ }
+ bool flag2 = this._doc.LastReq != 0 && this._doc.LastReq < 100;
+ if (flag2)
+ {
+ bool flag3 = this._doc.MySpoils == uint.MaxValue;
+ if (flag3)
+ {
+ this.m_NoSpoil.SetVisible(true);
+ this.m_MySpoil.SetVisible(false);
+ this.m_NoSpoil.SetText(XStringDefineProxy.GetString("AuctionHouseNoSpoil"));
+ }
+ else
+ {
+ this.m_MySpoil.SetVisible(true);
+ this.m_NoSpoil.SetVisible(false);
+ this.m_MySpoil.SetText(this._doc.MySpoils.ToString());
+ }
+ }
+ else
+ {
+ this.m_MySpoil.SetVisible(false);
+ this.m_NoSpoil.SetVisible(false);
+ }
+ XSingleton<XTimerMgr>.singleton.KillTimer(this._reqToken);
+ bool flag4 = this._doc.ReqTime != -1;
+ if (flag4)
+ {
+ this._reqToken = XSingleton<XTimerMgr>.singleton.SetTimer((float)this._doc.ReqTime, new XTimerMgr.ElapsedEventHandler(this.ForceQueryLastClick), null);
+ }
+ break;
+ }
+ case GuildAuctReqType.GART_BUY_AUCT:
+ case GuildAuctReqType.GART_BUY_NOW:
+ {
+ bool flag5 = this._doc.MySpoils == uint.MaxValue;
+ if (flag5)
+ {
+ this.m_NoSpoil.SetText(XStringDefineProxy.GetString("AuctionHouseNoSpoil"));
+ }
+ else
+ {
+ this.m_MySpoil.SetText(this._doc.MySpoils.ToString());
+ }
+ this.RefreshItemList(false);
+ break;
+ }
+ case GuildAuctReqType.GART_AUCT_GUILD_HISTORY:
+ case GuildAuctReqType.GART_AUCT_WORLD_HISTORY:
+ this.RefreshHistoryList();
+ break;
+ }
+ }
+
+ private bool OnResultCloseBtnClick(IXUIButton btn)
+ {
+ this.m_ResultWindow.SetActive(false);
+ return true;
+ }
+
+ private bool OnResultBtnClick(IXUIButton btn)
+ {
+ this.m_ResultWrapContent.SetContentCount(0, false);
+ this.m_ResultWindow.SetActive(true);
+ this._doc.QueryAuctionHistory(this._lastClickTabSprite.ID < 100UL);
+ return true;
+ }
+
+ private void SetupLevelOneTypeList()
+ {
+ this.m_LevelOnePool.ReturnAll(false);
+ this.m_parentTypeTs.Clear();
+ for (int i = 0; i < 2; i++)
+ {
+ GameObject gameObject = this.m_LevelOnePool.FetchGameObject(false);
+ this.m_parentTypeTs.Add(gameObject.transform);
+ IXUILabel ixuilabel = gameObject.transform.Find("Label").GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel2 = gameObject.transform.Find("Selected/Label").GetComponent("XUILabel") as IXUILabel;
+ IXUISprite ixuisprite = gameObject.transform.Find("Switch").GetComponent("XUISprite") as IXUISprite;
+ IXUISprite ixuisprite2 = gameObject.GetComponent("XUISprite") as IXUISprite;
+ ixuisprite2.ID = (ulong)((long)i * 100L);
+ string @string = XStringDefineProxy.GetString(string.Format("AuctionHouseTitle{0}", i + 1));
+ ixuilabel.SetText(@string);
+ ixuilabel2.SetText(@string);
+ ixuisprite.SetAlpha(0f);
+ ixuisprite2.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnTypeCheckBoxClick));
+ bool flag = i == 0;
+ if (flag)
+ {
+ this.m_GeneraliSp = ixuisprite2;
+ this.m_SwitchTween = (gameObject.GetComponent("XUIPlayTween") as IXUITweenTool);
+ }
+ }
+ this.SetupLevelTwoTypeList();
+ }
+
+ private void SetupLevelTwoTypeList()
+ {
+ for (int i = 0; i < this.m_parentTypeTs.Count; i++)
+ {
+ IXUISprite ixuisprite = this.m_parentTypeTs[i].Find("Switch").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.SetAlpha(0f);
+ }
+ this.m_LevelTwoPool.ReturnAll(true);
+ for (int j = 0; j < this._doc.GuildActID.Count; j++)
+ {
+ GameObject gameObject = this.m_LevelTwoPool.FetchGameObject(false);
+ IXUILabel ixuilabel = gameObject.transform.Find("Label").GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel2 = gameObject.transform.Find("Selected/Label").GetComponent("XUILabel") as IXUILabel;
+ IXUISprite ixuisprite2 = gameObject.GetComponent("XUISprite") as IXUISprite;
+ ixuisprite2.ID = (ulong)((long)this._doc.GuildActID[j]);
+ string @string = XStringDefineProxy.GetString(string.Format("AuctionHouseAct{0}", this._doc.GuildActID[j]));
+ ixuilabel.SetText(@string);
+ ixuilabel2.SetText(@string);
+ ixuisprite2.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnTypeCheckBoxClick));
+ Transform transform = this.m_parentTypeTs[0].Find("ChildList");
+ IXUISprite ixuisprite3 = this.m_parentTypeTs[0].Find("Switch").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite3.SetAlpha(1f);
+ gameObject.transform.parent = transform;
+ gameObject.transform.localScale = Vector3.one;
+ gameObject.transform.localPosition = new Vector3(0f, -((float)transform.childCount - 0.5f) * (float)ixuisprite2.spriteHeight, 0f);
+ }
+ for (int k = 1; k <= this.TYPEMAX; k++)
+ {
+ GameObject gameObject2 = this.m_LevelTwoPool.FetchGameObject(false);
+ IXUILabel ixuilabel3 = gameObject2.transform.Find("Label").GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel4 = gameObject2.transform.Find("Selected/Label").GetComponent("XUILabel") as IXUILabel;
+ IXUISprite ixuisprite4 = gameObject2.GetComponent("XUISprite") as IXUISprite;
+ ixuisprite4.ID = (ulong)(100L + (long)k);
+ string string2 = XStringDefineProxy.GetString(string.Format("AuctionHouseType{0}", k));
+ ixuilabel3.SetText(string2);
+ ixuilabel4.SetText(string2);
+ ixuisprite4.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnTypeCheckBoxClick));
+ Transform transform2 = this.m_parentTypeTs[1].Find("ChildList");
+ IXUISprite ixuisprite5 = this.m_parentTypeTs[1].Find("Switch").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite5.SetAlpha(1f);
+ gameObject2.transform.parent = transform2;
+ gameObject2.transform.localScale = Vector3.one;
+ gameObject2.transform.localPosition = new Vector3(0f, -((float)transform2.childCount - 0.5f) * (float)ixuisprite4.spriteHeight, 0f);
+ }
+ this.m_Table.Reposition();
+ }
+
+ private void OnTypeCheckBoxClick(IXUISprite isp)
+ {
+ bool flag = isp.ID == 0UL;
+ if (flag)
+ {
+ this.m_TweenToggle = !this.m_TweenToggle;
+ }
+ string @string = XStringDefineProxy.GetString((isp.ID < 100UL) ? "AuctionHouseGuildResult" : "AuctionHouseWorldResult");
+ this.m_ResultTitle.SetText(@string);
+ this.m_ResultLabel.SetText(@string);
+ bool flag2 = !this.RefreshGuildTabs && this._lastClickTabSprite != null && this._lastClickTabSprite.ID == isp.ID;
+ if (!flag2)
+ {
+ this._lastClickTabSprite = isp;
+ this._doc.LastReq = (int)isp.ID;
+ this._doc.ResetScrollView = true;
+ bool flag3 = isp.ID < 100UL;
+ if (flag3)
+ {
+ this._doc.QueryGuildTypeList((int)isp.ID);
+ }
+ else
+ {
+ this._doc.QueryWorldTypeList((int)isp.ID - 100);
+ }
+ }
+ }
+
+ private void RefreshItemList(bool resetScrollPos = true)
+ {
+ this._doc.ResetScrollView = false;
+ for (int i = 0; i < AuctionHouseHandler.MAXSHOWITEM; i++)
+ {
+ this._leftTime[i] = -1;
+ }
+ XSingleton<XTimerMgr>.singleton.KillTimer(this._timeToken);
+ this._timeToken = XSingleton<XTimerMgr>.singleton.SetTimer(1f, new XTimerMgr.ElapsedEventHandler(this.RefreshLeftTime), null);
+ this.m_NoneItem.SetActive(this._doc.ItemList.Count == 0);
+ this.m_ItemListWrapContent.SetContentCount(this._doc.ItemList.Count, false);
+ if (resetScrollPos)
+ {
+ this.m_ItemScrollView.SetPosition(0f);
+ }
+ }
+
+ private void ItemWrapListInit(Transform t, int i)
+ {
+ this._timeLabel[i] = (t.Find("Time").GetComponent("XUILabel") as IXUILabel);
+ }
+
+ private void ItemWrapListUpdated(Transform t, int i)
+ {
+ bool flag = i < 0 || i >= this._doc.ItemList.Count;
+ if (!flag)
+ {
+ GameObject gameObject = t.Find("ItemTpl").gameObject;
+ ItemList.RowData itemConf = XBagDocument.GetItemConf((int)this._doc.ItemList[i].itemid);
+ XSingleton<XItemDrawerMgr>.singleton.normalItemDrawer.DrawItem(gameObject, itemConf, 0, false);
+ XSingleton<XItemDrawerMgr>.singleton.normalItemDrawer.OpenClickShowTooltipEvent(gameObject, (int)this._doc.ItemList[i].itemid);
+ IXUILabel ixuilabel = t.Find("Name").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel.SetText(itemConf.ItemName[0]);
+ int num = this._doc.PublicityTime - this._doc.GuildSaleTime + (int)this._doc.ItemList[i].lefttime;
+ bool flag2 = num > 0 && this._doc.LastReq < 100;
+ bool flag3 = this._doc.ItemList[i].lefttime == 0u;
+ if (flag3)
+ {
+ this._timeLabel[i % AuctionHouseHandler.MAXSHOWITEM].SetText(XStringDefineProxy.GetString("AuctionHouseTimeOut"));
+ this._leftTime[i % AuctionHouseHandler.MAXSHOWITEM] = 0;
+ }
+ else
+ {
+ bool flag4 = flag2;
+ if (flag4)
+ {
+ this._timeLabel[i % AuctionHouseHandler.MAXSHOWITEM].SetText(string.Format(this.WaitStartString, XSingleton<UiUtility>.singleton.TimeFormatString(num, 2, 3, 4, false, true)));
+ this._leftTime[i % AuctionHouseHandler.MAXSHOWITEM] = num;
+ this._gsq[i % AuctionHouseHandler.MAXSHOWITEM] = true;
+ }
+ else
+ {
+ int totalSecond = (int)(this._doc.ItemList[i].lefttime - (uint)((int)(this.GetNowTime() - this._signTime)));
+ this._timeLabel[i % AuctionHouseHandler.MAXSHOWITEM].SetText(XSingleton<UiUtility>.singleton.TimeFormatString(totalSecond, 2, 3, 4, false, true));
+ this._leftTime[i % AuctionHouseHandler.MAXSHOWITEM] = (int)this._doc.ItemList[i].lefttime;
+ this._gsq[i % AuctionHouseHandler.MAXSHOWITEM] = false;
+ }
+ }
+ IXUILabel ixuilabel2 = t.Find("AuctionPrice").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel2.SetText(this._doc.ItemList[i].curauctprice.ToString());
+ IXUILabel ixuilabel3 = t.Find("BuyPrice").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel3.SetText(this._doc.ItemList[i].maxprice.ToString());
+ IXUIButton ixuibutton = t.Find("AuctionBtn").GetComponent("XUIButton") as IXUIButton;
+ IXUILabel ixuilabel4 = ixuibutton.gameObject.transform.Find("Label").GetComponent("XUILabel") as IXUILabel;
+ bool flag5 = this._doc.ItemList[i].auctroleid == XSingleton<XAttributeMgr>.singleton.XPlayerData.RoleID;
+ if (flag5)
+ {
+ ixuibutton.SetEnable(false, false);
+ ixuilabel4.SetText(XStringDefineProxy.GetString("AuctionHouseAucType1"));
+ }
+ else
+ {
+ ixuilabel4.SetText(XStringDefineProxy.GetString("AuctionHouseAucType3"));
+ bool flag6 = flag2 || this._doc.ItemList[i].curauctprice * this.PERADDPRICE >= this._doc.ItemList[i].maxprice;
+ if (flag6)
+ {
+ ixuibutton.SetEnable(false, false);
+ }
+ else
+ {
+ ixuibutton.SetEnable(true, false);
+ ixuibutton.ID = (ulong)((long)i);
+ ixuibutton.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnAuctionBtnClick));
+ }
+ }
+ IXUIButton ixuibutton2 = t.Find("BuyBtn").GetComponent("XUIButton") as IXUIButton;
+ bool flag7 = flag2;
+ if (flag7)
+ {
+ ixuibutton2.SetEnable(false, false);
+ }
+ else
+ {
+ ixuibutton2.SetEnable(true, false);
+ ixuibutton2.ID = (ulong)((long)i);
+ ixuibutton2.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnBuyBtnClick));
+ }
+ }
+ }
+
+ private bool OnAuctionBtnClick(IXUIButton btn)
+ {
+ int index = (int)btn.ID;
+ this._signUid = this._doc.ItemList[index].uid;
+ this._signPrice = this._doc.ItemList[index].curauctprice;
+ this._signActType = this._doc.ItemList[index].acttype;
+ string arg = string.Format("{0}{1}", (int)(this._doc.ItemList[index].curauctprice * this.PERADDPRICE + 0.001f), XLabelSymbolHelper.FormatSmallIcon(7));
+ ItemList.RowData itemConf = XBagDocument.GetItemConf((int)this._doc.ItemList[index].itemid);
+ string label = XSingleton<UiUtility>.singleton.ReplaceReturn(string.Format(XStringDefineProxy.GetString("AuctionHouseTips1"), arg, itemConf.ItemName[0]));
+ string @string = XStringDefineProxy.GetString("COMMON_OK");
+ string string2 = XStringDefineProxy.GetString("COMMON_CANCEL");
+ XSingleton<UiUtility>.singleton.ShowModalDialog(label, @string, string2, new ButtonClickEventHandler(this.OnAuctionSure));
+ return true;
+ }
+
+ private bool OnBuyBtnClick(IXUIButton btn)
+ {
+ int index = (int)btn.ID;
+ this._signUid = this._doc.ItemList[index].uid;
+ this._signActType = this._doc.ItemList[index].acttype;
+ this._signMaxPrice = this._doc.ItemList[index].maxprice;
+ string arg = string.Format("{0}{1}", this._doc.ItemList[index].maxprice, XLabelSymbolHelper.FormatSmallIcon(7));
+ ItemList.RowData itemConf = XBagDocument.GetItemConf((int)this._doc.ItemList[index].itemid);
+ string label = XSingleton<UiUtility>.singleton.ReplaceReturn(string.Format(XStringDefineProxy.GetString("AuctionHouseTips2"), arg, itemConf.ItemName[0]));
+ string @string = XStringDefineProxy.GetString("COMMON_OK");
+ string string2 = XStringDefineProxy.GetString("COMMON_CANCEL");
+ XSingleton<UiUtility>.singleton.ShowModalDialog(label, @string, string2, new ButtonClickEventHandler(this.OnBuySure));
+ return true;
+ }
+
+ private bool OnAuctionSure(IXUIButton btn)
+ {
+ DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.SetVisible(false, true);
+ AuctionDocument specificDocument = XDocuments.GetSpecificDocument<AuctionDocument>(AuctionDocument.uuID);
+ ulong usr = (ulong)(this._signPrice * this.PERADDPRICE + 0.001f);
+ ulong itemCount = XBagDocument.BagDoc.GetItemCount(XFastEnumIntEqualityComparer<ItemEnum>.ToInt(ItemEnum.DRAGON_COIN));
+ bool flag = specificDocument.TryDragonCoinFull(usr, itemCount);
+ if (flag)
+ {
+ this._doc.QueryAuctionItem(this._signUid, this._signPrice, this._signActType);
+ }
+ return true;
+ }
+
+ private bool OnBuySure(IXUIButton btn)
+ {
+ DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.SetVisible(false, true);
+ AuctionDocument specificDocument = XDocuments.GetSpecificDocument<AuctionDocument>(AuctionDocument.uuID);
+ ulong usr = (ulong)this._signMaxPrice;
+ ulong itemCount = XBagDocument.BagDoc.GetItemCount(XFastEnumIntEqualityComparer<ItemEnum>.ToInt(ItemEnum.DRAGON_COIN));
+ bool flag = specificDocument.TryDragonCoinFull(usr, itemCount);
+ if (flag)
+ {
+ this._doc.QueryBuyItem(this._signUid, this._signActType);
+ }
+ return true;
+ }
+
+ private void RefreshHistoryList()
+ {
+ bool flag = !base.IsVisible();
+ if (!flag)
+ {
+ bool flag2 = !this.m_ResultWindow.activeInHierarchy;
+ if (!flag2)
+ {
+ this.m_ResultScrollView.SetPosition(0f);
+ this.m_ResultWrapContent.SetContentCount(this._doc.HistoryList.Count, false);
+ }
+ }
+ }
+
+ private void ResultWrapListUpdated(Transform t, int i)
+ {
+ IXUILabel ixuilabel = t.Find("ActName").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel.SetText(XStringDefineProxy.GetString(string.Format("AuctionHouseAct{0}", this._doc.HistoryList[i].acttype)));
+ IXUILabel ixuilabel2 = t.Find("Date").GetComponent("XUILabel") as IXUILabel;
+ string text = XSingleton<UiUtility>.singleton.TimeFormatSince1970((int)this._doc.HistoryList[i].saletime, XStringDefineProxy.GetString("AuctionHouseHistoryTime"), true);
+ ixuilabel2.SetText(text);
+ IXUILabel ixuilabel3 = t.Find("Name").GetComponent("XUILabel") as IXUILabel;
+ ItemList.RowData itemConf = XBagDocument.GetItemConf((int)this._doc.HistoryList[i].itemid);
+ ixuilabel3.SetText(itemConf.ItemName[0]);
+ IXUILabelSymbol ixuilabelSymbol = t.Find("Price").GetComponent("XUILabelSymbol") as IXUILabelSymbol;
+ bool flag = this._doc.HistoryList[i].auctresult == GuildAuctResultType.GA_RESULT_TO_WORLD;
+ if (flag)
+ {
+ ixuilabelSymbol.InputText = XStringDefineProxy.GetString("AuctionHouseAucType4");
+ }
+ else
+ {
+ string @string = XStringDefineProxy.GetString(string.Format("AuctionHouseAucType{0}", XFastEnumIntEqualityComparer<GuildAuctResultType>.ToInt(this._doc.HistoryList[i].auctresult) + 1));
+ ixuilabelSymbol.InputText = string.Format("{0}{1} {2}", this._doc.HistoryList[i].saleprice, XLabelSymbolHelper.FormatSmallIcon(7), @string);
+ }
+ GameObject gameObject = t.Find("Bg").gameObject;
+ gameObject.SetActive(i % 2 == 0);
+ }
+
+ private void ForceQueryLastClick(object o = null)
+ {
+ this._doc.QueryRefreshUI();
+ }
+
+ private void RefreshLeftTime(object o = null)
+ {
+ for (int i = 0; i < AuctionHouseHandler.MAXSHOWITEM; i++)
+ {
+ bool flag = this._leftTime[i] >= 0;
+ if (flag)
+ {
+ int num = this._leftTime[i] - (int)(this.GetNowTime() - this._signTime);
+ bool flag2 = num < 0;
+ if (flag2)
+ {
+ this._leftTime[i] = -1;
+ num = 0;
+ }
+ bool flag3 = num == 0;
+ if (flag3)
+ {
+ bool flag4 = this._gsq[i];
+ if (flag4)
+ {
+ this._timeLabel[i].SetText(XStringDefineProxy.GetString("AuctionHouseWaitTimeOut"));
+ }
+ else
+ {
+ this._timeLabel[i].SetText(XStringDefineProxy.GetString("AuctionHouseTimeOut"));
+ }
+ }
+ else
+ {
+ bool flag5 = this._gsq[i];
+ if (flag5)
+ {
+ this._timeLabel[i].SetText(string.Format(this.WaitStartString, XSingleton<UiUtility>.singleton.TimeFormatString(num, 2, 3, 4, false, true)));
+ }
+ else
+ {
+ this._timeLabel[i].SetText(XSingleton<UiUtility>.singleton.TimeFormatString(num, 2, 3, 4, false, true));
+ }
+ }
+ }
+ }
+ this._timeToken = XSingleton<XTimerMgr>.singleton.SetTimer(1f, new XTimerMgr.ElapsedEventHandler(this.RefreshLeftTime), null);
+ }
+
+ private double GetNowTime()
+ {
+ return (double)(DateTime.Now.Ticks / 10000000L);
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/AuctionHouseHandler.cs.meta b/Client/Assets/Scripts/XMainClient/UI/AuctionHouseHandler.cs.meta
new file mode 100644
index 00000000..726ebe4c
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/AuctionHouseHandler.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 9b474033d8c09c743a632945e59c66ba
+timeCreated: 1611404205
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/AuctionNumberOperate.cs b/Client/Assets/Scripts/XMainClient/UI/AuctionNumberOperate.cs
new file mode 100644
index 00000000..b576c12d
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/AuctionNumberOperate.cs
@@ -0,0 +1,242 @@
+using System;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class AuctionNumberOperate
+ {
+ public int Min
+ {
+ get
+ {
+ return this.m_min;
+ }
+ }
+
+ public int Max
+ {
+ get
+ {
+ return this.m_max;
+ }
+ }
+
+ public int Cur
+ {
+ get
+ {
+ return this.m_cur;
+ }
+ }
+
+ public int Step
+ {
+ get
+ {
+ return this.m_step;
+ }
+ }
+
+ private IXUISprite m_Add;
+
+ private IXUISprite m_Sub;
+
+ private IXUISprite m_Max;
+
+ private IXUILabel m_Number;
+
+ private Transform m_transform;
+
+ private GameObject m_gameObject;
+
+ private int m_min;
+
+ private int m_max;
+
+ private int m_cur;
+
+ private int m_step;
+
+ private Vector3 m_offset;
+
+ private int m_inputNumberCall = 0;
+
+ private bool m_curEnabel = true;
+
+ private bool m_showNumber = true;
+
+ private bool m_showUnderLine = false;
+
+ private AuctionNumberOperate.NumberOperateCallBack m_numberOperateCall;
+
+ public delegate void NumberOperateCallBack();
+
+ public AuctionNumberOperate(GameObject go, Vector3 offset)
+ {
+ this.m_gameObject = go;
+ this.m_transform = go.transform;
+ this.m_offset = offset;
+ this.m_Number = (this.m_transform.Find("Label").GetComponent("XUILabel") as IXUILabel);
+ this.m_Add = (this.m_transform.Find("Add").GetComponent("XUISprite") as IXUISprite);
+ this.m_Sub = (this.m_transform.Find("Sub").GetComponent("XUISprite") as IXUISprite);
+ Transform transform = this.m_transform.Find("Max");
+ bool flag = transform != null;
+ if (flag)
+ {
+ this.m_Max = (transform.GetComponent("XUISprite") as IXUISprite);
+ }
+ this.m_Add.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnAddClickHandler));
+ this.m_Sub.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnSubClickHandler));
+ this.m_Number.RegisterLabelClickEventHandler(new LabelClickEventHandler(this.OnClickLabelHandler));
+ bool flag2 = this.m_Max != null;
+ if (flag2)
+ {
+ this.m_Max.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnMaxClickHandler));
+ }
+ }
+
+ public void SetEnable(bool enable)
+ {
+ this.m_curEnabel = enable;
+ bool flag = this.m_transform != null;
+ if (flag)
+ {
+ this.m_transform.gameObject.SetActive(this.m_curEnabel);
+ }
+ }
+
+ public void Set(int max, int min = 1, int cur = 1, int step = 1, bool showNum = true, bool showUnderLine = false)
+ {
+ this.m_max = max;
+ this.m_min = min;
+ this.m_cur = cur;
+ this.m_step = step;
+ this.m_showNumber = showNum;
+ this.m_showUnderLine = showUnderLine;
+ this.CalculateOperate(this.m_cur, true);
+ }
+
+ public void OnClickLabelHandler(IXUILabel label)
+ {
+ bool flag = !this.m_showNumber || !this.m_curEnabel || this.m_max == this.m_min;
+ if (!flag)
+ {
+ this.m_inputNumberCall = 0;
+ DlgBase<CalculatorDlg, CalculatorBehaviour>.singleton.Show(new CalculatorKeyBack(this.OnCalculatorCall), this.m_offset);
+ }
+ }
+
+ private void OnCalculatorCall(CalculatorKey value)
+ {
+ switch (value)
+ {
+ case CalculatorKey.OK:
+ this.CalculateOperate(this.m_inputNumberCall, true);
+ break;
+ case CalculatorKey.DEL:
+ this.m_inputNumberCall = 0;
+ this.SetTxt(this.m_inputNumberCall);
+ break;
+ case CalculatorKey.MAX:
+ this.m_inputNumberCall = this.m_max;
+ this.SetTxt(this.m_inputNumberCall);
+ break;
+ default:
+ {
+ int num = XFastEnumIntEqualityComparer<CalculatorKey>.ToInt(value);
+ bool flag = num >= 0 && num <= 9;
+ if (flag)
+ {
+ this.m_inputNumberCall = this.m_inputNumberCall * 10 + num;
+ bool flag2 = this.m_inputNumberCall > this.m_max;
+ if (flag2)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString("AUCTION_COUNT_UNADD"), "fece00");
+ }
+ this.m_inputNumberCall = Math.Min(this.m_inputNumberCall, this.m_max);
+ this.SetTxt(this.m_inputNumberCall);
+ }
+ break;
+ }
+ }
+ }
+
+ private void SetTxt(int num)
+ {
+ bool showUnderLine = this.m_showUnderLine;
+ if (showUnderLine)
+ {
+ this.m_Number.SetText(string.Format("[u]{0}[-]", num));
+ }
+ else
+ {
+ this.m_Number.SetText(num.ToString());
+ }
+ }
+
+ public void RegisterOperateChange(AuctionNumberOperate.NumberOperateCallBack call)
+ {
+ this.m_numberOperateCall = call;
+ }
+
+ private void OnAddClickHandler(IXUISprite sprite)
+ {
+ bool flag = !this.m_curEnabel || this.m_max == this.m_min;
+ if (!flag)
+ {
+ bool flag2 = this.m_cur + this.m_step > this.m_max;
+ if (flag2)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString("AUCTION_COUNT_UNADD"), "fece00");
+ }
+ this.CalculateOperate(this.m_cur + this.m_step, false);
+ }
+ }
+
+ private void OnSubClickHandler(IXUISprite sprite)
+ {
+ bool flag = !this.m_curEnabel || this.m_max == this.m_min;
+ if (!flag)
+ {
+ bool flag2 = this.m_cur - this.m_step < this.m_min;
+ if (flag2)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString("AUCTION_COUNT_UNSUB"), "fece00");
+ }
+ this.CalculateOperate(this.m_cur - this.m_step, false);
+ }
+ }
+
+ private void OnMaxClickHandler(IXUISprite sprite)
+ {
+ this.CalculateOperate(this.m_max, false);
+ }
+
+ private void CalculateOperate(int cur, bool active = false)
+ {
+ cur = Mathf.Max(this.m_min, cur);
+ cur = Mathf.Min(this.m_max, cur);
+ bool flag = !active && this.m_cur == cur;
+ if (!flag)
+ {
+ this.m_cur = cur;
+ this.m_Add.SetGrey(this.m_cur < this.m_max);
+ this.m_Sub.SetGrey(this.m_cur > this.m_min);
+ this.SetTxt(this.m_cur);
+ bool flag2 = this.m_numberOperateCall != null;
+ if (flag2)
+ {
+ this.m_numberOperateCall();
+ }
+ }
+ }
+
+ public virtual void Dispose()
+ {
+ this.m_numberOperateCall = null;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/AuctionNumberOperate.cs.meta b/Client/Assets/Scripts/XMainClient/UI/AuctionNumberOperate.cs.meta
new file mode 100644
index 00000000..a76621cd
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/AuctionNumberOperate.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 626a39eea26684a45bf711c9b08ac1f2
+timeCreated: 1611403840
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/AuctionPurchaseBehaviour.cs b/Client/Assets/Scripts/XMainClient/UI/AuctionPurchaseBehaviour.cs
new file mode 100644
index 00000000..de496ef3
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/AuctionPurchaseBehaviour.cs
@@ -0,0 +1,35 @@
+using System;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+
+namespace XMainClient.UI
+{
+ internal class AuctionPurchaseBehaviour : DlgBehaviourBase
+ {
+ public GameObject m_ItemTpl;
+
+ public IXUILabel m_SinglePrice;
+
+ public IXUILabel m_HavCoin;
+
+ public IXUILabel m_TotalPrice;
+
+ public AuctionNumberOperate m_CurCountOperate;
+
+ public IXUIButton m_Ok;
+
+ public IXUIButton m_maskSprite;
+
+ private void Awake()
+ {
+ this.m_ItemTpl = base.transform.Find("Bg/ItemTpl").gameObject;
+ this.m_SinglePrice = (base.transform.Find("Bg/Price/Label").GetComponent("XUILabel") as IXUILabel);
+ this.m_HavCoin = (base.transform.Find("Bg/Have/Label").GetComponent("XUILabel") as IXUILabel);
+ this.m_TotalPrice = (base.transform.Find("Bg/TotalPrice/Label").GetComponent("XUILabel") as IXUILabel);
+ this.m_CurCountOperate = new AuctionNumberOperate(base.transform.Find("Bg/Free").gameObject, new Vector3(-94f, 104f, 0f));
+ this.m_Ok = (base.transform.Find("Bg/Ok").GetComponent("XUIButton") as IXUIButton);
+ this.m_maskSprite = (base.transform.Find("Bg/Close").GetComponent("XUIButton") as IXUIButton);
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/AuctionPurchaseBehaviour.cs.meta b/Client/Assets/Scripts/XMainClient/UI/AuctionPurchaseBehaviour.cs.meta
new file mode 100644
index 00000000..c39b88d2
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/AuctionPurchaseBehaviour.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: c1ed657c0f9dc8d4e9b1f6177b28d3ae
+timeCreated: 1611404492
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/AuctionPurchaseView.cs b/Client/Assets/Scripts/XMainClient/UI/AuctionPurchaseView.cs
new file mode 100644
index 00000000..7508a6fb
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/AuctionPurchaseView.cs
@@ -0,0 +1,123 @@
+using System;
+using UILib;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class AuctionPurchaseView : DlgBase<AuctionPurchaseView, AuctionPurchaseBehaviour>
+ {
+ public override string fileName
+ {
+ get
+ {
+ return "GameSystem/Auction/AuctionPurchaseFrame";
+ }
+ }
+
+ public override bool autoload
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ private AuctionItem m_curOverlapItem;
+
+ public void Set(AuctionItem item)
+ {
+ this.m_curOverlapItem = item;
+ this.SetVisibleWithAnimation(true, null);
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ base.uiBehaviour.m_maskSprite.RegisterClickEventHandler(new ButtonClickEventHandler(this.ClickCloseHandler));
+ base.uiBehaviour.m_Ok.RegisterClickEventHandler(new ButtonClickEventHandler(this.ClickPurchaseHandler));
+ base.uiBehaviour.m_CurCountOperate.RegisterOperateChange(new AuctionNumberOperate.NumberOperateCallBack(this.OnOperateChangeHandler));
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ base.uiBehaviour.m_SinglePrice.SetText(this.m_curOverlapItem.perprice.ToString());
+ base.uiBehaviour.m_HavCoin.SetText(XSingleton<UiUtility>.singleton.NumberFormat(XBagDocument.BagDoc.GetItemCount(7)));
+ base.uiBehaviour.m_CurCountOperate.Set(this.m_curOverlapItem.itemData.itemCount, 1, 1, 1, true, false);
+ XSingleton<XItemDrawerMgr>.singleton.DrawItem(base.uiBehaviour.m_ItemTpl.gameObject, this.m_curOverlapItem.itemData);
+ }
+
+ public void OnVirtuelRefresh()
+ {
+ this.OnOperateChangeHandler();
+ }
+
+ private void OnOperateChangeHandler()
+ {
+ ulong num = (ulong)((long)(base.uiBehaviour.m_CurCountOperate.Cur * (int)this.m_curOverlapItem.perprice));
+ ulong itemCount = XBagDocument.BagDoc.GetItemCount(7);
+ bool flag = num > itemCount;
+ if (flag)
+ {
+ base.uiBehaviour.m_TotalPrice.SetText(string.Format("[ff0000]{0}[-]", num));
+ }
+ else
+ {
+ base.uiBehaviour.m_TotalPrice.SetText(num.ToString());
+ }
+ }
+
+ private bool ClickCloseHandler(IXUIButton sprite)
+ {
+ this.SetVisibleWithAnimation(false, null);
+ return true;
+ }
+
+ private bool ClickPurchaseHandler(IXUIButton btn)
+ {
+ ItemList.RowData itemConf = XBagDocument.GetItemConf(this.m_curOverlapItem.itemData.itemID);
+ string text = (itemConf != null && itemConf.ItemName.Length != 0) ? itemConf.ItemName[0] : string.Empty;
+ ulong num = (ulong)((long)base.uiBehaviour.m_CurCountOperate.Cur * (long)((ulong)this.m_curOverlapItem.perprice));
+ ulong itemCount = XBagDocument.BagDoc.GetItemCount(XFastEnumIntEqualityComparer<ItemEnum>.ToInt(ItemEnum.DRAGON_COIN));
+ AuctionDocument specificDocument = XDocuments.GetSpecificDocument<AuctionDocument>(AuctionDocument.uuID);
+ bool flag = specificDocument.TryDragonCoinFull(num, itemCount);
+ if (flag)
+ {
+ bool flag2 = itemCount > 200UL;
+ if (flag2)
+ {
+ this.ShowDailog(XStringDefineProxy.GetString("AUCTION_SALE_FROST", new object[]
+ {
+ XLabelSymbolHelper.FormatCostWithIcon((int)num, ItemEnum.DRAGON_COIN),
+ text
+ }), new ButtonClickEventHandler(this.OnSureAuctionBuy));
+ }
+ else
+ {
+ this.SendAuctionBuy();
+ }
+ }
+ return true;
+ }
+
+ private void ShowDailog(string message, ButtonClickEventHandler handler)
+ {
+ XSingleton<UiUtility>.singleton.ShowModalDialog(message, XStringDefineProxy.GetString("COMMON_OK"), XStringDefineProxy.GetString("COMMON_CANCEL"), handler);
+ }
+
+ private bool OnSureAuctionBuy(IXUIButton btn)
+ {
+ XSingleton<UiUtility>.singleton.CloseModalDlg();
+ this.SendAuctionBuy();
+ return true;
+ }
+
+ private void SendAuctionBuy()
+ {
+ AuctionDocument specificDocument = XDocuments.GetSpecificDocument<AuctionDocument>(AuctionDocument.uuID);
+ specificDocument.RequestAuctionBuy(this.m_curOverlapItem.uid, (uint)this.m_curOverlapItem.itemData.itemID, (uint)base.uiBehaviour.m_CurCountOperate.Cur);
+ this.SetVisibleWithAnimation(false, null);
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/AuctionPurchaseView.cs.meta b/Client/Assets/Scripts/XMainClient/UI/AuctionPurchaseView.cs.meta
new file mode 100644
index 00000000..eb25bc32
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/AuctionPurchaseView.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 2c2714b4e28d41a4a8182e24daf101d2
+timeCreated: 1611403501
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/AuctionSellHandler.cs b/Client/Assets/Scripts/XMainClient/UI/AuctionSellHandler.cs
new file mode 100644
index 00000000..38e88f74
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/AuctionSellHandler.cs
@@ -0,0 +1,201 @@
+using System;
+using System.Collections.Generic;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class AuctionSellHandler : DlgHandlerBase
+ {
+ protected override string FileName
+ {
+ get
+ {
+ return "GameSystem/Auction/AuctionSellFrame";
+ }
+ }
+
+ private AuctionDocument _Doc;
+
+ private AuctionWrapContentGroup m_auctionSellGroup;
+
+ private XBagWindow m_bagWindow;
+
+ private Transform m_emptyInAuction;
+
+ private IXUILabel m_curSaleValue;
+
+ private IXUISprite m_tqSprite;
+
+ private IXUILabel m_tqLabel;
+
+ private IXUISprite m_tqBgSprite;
+
+ protected override void Init()
+ {
+ base.Init();
+ this._Doc = XDocuments.GetSpecificDocument<AuctionDocument>(AuctionDocument.uuID);
+ this.m_auctionSellGroup = new AuctionWrapContentGroup();
+ this.m_auctionSellGroup.SetAuctionWrapContentTemp(base.PanelObject.transform.Find("SellList"), new WrapItemUpdateEventHandler(this.OnAuctionSellListUpdate));
+ this.m_bagWindow = new XBagWindow(base.PanelObject.transform.Find("BagList").gameObject, new ItemUpdateHandler(this.OnBagItemUpdate), new GetItemHandler(this._Doc.GetItemList));
+ this.m_bagWindow.Init();
+ this.m_emptyInAuction = base.PanelObject.transform.Find("SellListEmpty");
+ this.m_curSaleValue = (base.PanelObject.transform.Find("LeftCount/Value").GetComponent("XUILabel") as IXUILabel);
+ this.m_tqSprite = (base.PanelObject.transform.Find("tq").GetComponent("XUISprite") as IXUISprite);
+ this.m_tqLabel = (base.PanelObject.transform.Find("tq/t").GetComponent("XUILabel") as IXUILabel);
+ this.m_tqBgSprite = (base.PanelObject.transform.Find("tq/p").GetComponent("XUISprite") as IXUISprite);
+ }
+
+ private void OnAuctionSellListUpdate(Transform t, int index)
+ {
+ bool flag = t == null;
+ if (!flag)
+ {
+ Transform transform = t.Find("DetailTpl");
+ IXUICheckBox ixuicheckBox = transform.GetComponent("XUICheckBox") as IXUICheckBox;
+ bool flag2 = ixuicheckBox != null;
+ if (flag2)
+ {
+ ixuicheckBox.bChecked = false;
+ }
+ List<AuctionSaleItem> auctionOnLineSaleList = this._Doc.AuctionOnLineSaleList;
+ bool flag3 = index < 0 || index >= auctionOnLineSaleList.Count;
+ if (flag3)
+ {
+ transform.gameObject.SetActive(false);
+ }
+ else
+ {
+ transform.gameObject.SetActive(true);
+ Transform transform2 = transform.Find("ItemTpl");
+ IXUILabelSymbol ixuilabelSymbol = transform.Find("Price").GetComponent("XUILabelSymbol") as IXUILabelSymbol;
+ Transform transform3 = transform.Find("Time");
+ IXUISprite ixuisprite = transform2.Find("Icon").GetComponent("XUISprite") as IXUISprite;
+ IXUISprite ixuisprite2 = transform.GetComponent("XUISprite") as IXUISprite;
+ AuctionSaleItem auctionSaleItem = auctionOnLineSaleList[index];
+ transform3.gameObject.SetActive(auctionSaleItem.isOutTime);
+ ixuilabelSymbol.InputText = XLabelSymbolHelper.FormatCostWithIconLast((int)auctionSaleItem.perprice, ItemEnum.DRAGON_COIN);
+ XSingleton<XItemDrawerMgr>.singleton.DrawItem(transform2.gameObject, auctionSaleItem.itemData);
+ ixuisprite.ID = (ulong)((long)index);
+ ixuisprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnItemSaleClicked));
+ ixuisprite2.ID = (ulong)((long)index);
+ ixuisprite2.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnItemSaleCheckSelected));
+ }
+ }
+ }
+
+ public override void RegisterEvent()
+ {
+ this.m_tqBgSprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnMemberPrivilegeClicked));
+ }
+
+ private void OnMemberPrivilegeClicked(IXUISprite sprite)
+ {
+ DlgBase<XWelfareView, XWelfareBehaviour>.singleton.CheckActiveMemberPrivilege(MemberPrivilege.KingdomPrivilege_Court);
+ }
+
+ private void OnBagItemUpdate(Transform transform, int index)
+ {
+ IXUISprite ixuisprite = transform.Find("Icon").GetComponent("XUISprite") as IXUISprite;
+ bool flag = this.m_bagWindow.m_XItemList == null || index < 0 || index >= this.m_bagWindow.m_XItemList.Count;
+ if (flag)
+ {
+ XSingleton<XItemDrawerMgr>.singleton.DrawItem(transform.gameObject, null);
+ }
+ else
+ {
+ XItem xitem = this.m_bagWindow.m_XItemList[index];
+ ixuisprite.ID = (ulong)((long)index);
+ XSingleton<XItemDrawerMgr>.singleton.DrawItem(transform.gameObject, xitem);
+ GameObject gameObject = transform.Find("Icon/Bind").gameObject;
+ gameObject.SetActive(xitem.blocking > 0.0);
+ ixuisprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnItemClicked));
+ }
+ }
+
+ private void OnItemSaleCheckSelected(IXUISprite checkBox)
+ {
+ int num = (int)checkBox.ID;
+ bool flag = num < this._Doc.AuctionOnLineSaleList.Count;
+ if (flag)
+ {
+ AuctionSaleItem auctionSaleItem = this._Doc.AuctionOnLineSaleList[num];
+ this._Doc.RequestAuctionPriceRecommend(auctionSaleItem.uid, auctionSaleItem.itemData, auctionSaleItem.isOutTime ? AuctionBillStyle.OutTime : AuctionBillStyle.RePutAway);
+ }
+ }
+
+ private void OnItemSaleClicked(IXUISprite sp)
+ {
+ int num = (int)sp.ID;
+ bool flag = num < this._Doc.AuctionOnLineSaleList.Count;
+ if (flag)
+ {
+ XSingleton<UiUtility>.singleton.ShowTooltipDialog(this._Doc.AuctionOnLineSaleList[num].itemData, null, sp, false, 0u);
+ }
+ }
+
+ private void OnItemClicked(IXUISprite sp)
+ {
+ int num = (int)sp.ID;
+ bool flag = num < this.m_bagWindow.m_XItemList.Count;
+ if (flag)
+ {
+ bool flag2 = this.m_bagWindow.m_XItemList[num].blocking > 0.0;
+ if (flag2)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString("AUCTION_LOCK_TIME", new object[]
+ {
+ XSingleton<UiUtility>.singleton.TimeDuarationFormatString((int)this.m_bagWindow.m_XItemList[num].blocking, 4)
+ }), "fece00");
+ }
+ else
+ {
+ this._Doc.RequestAuctionPriceRecommend(0UL, this.m_bagWindow.m_XItemList[num], AuctionBillStyle.PutAway);
+ }
+ }
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ this._Doc.RequestAuctionMySale();
+ this.RefreshData();
+ }
+
+ public override void RefreshData()
+ {
+ this.m_bagWindow.OnShow();
+ this.RefreshSaleList();
+ }
+
+ private void RefreshSaleList()
+ {
+ bool flag = this.m_auctionSellGroup == null;
+ if (!flag)
+ {
+ int count = this._Doc.AuctionOnLineSaleList.Count;
+ this.m_auctionSellGroup.SetWrapContentSize(count);
+ this.m_emptyInAuction.gameObject.SetActive(count == 0);
+ XRechargeDocument specificDocument = XDocuments.GetSpecificDocument<XRechargeDocument>(XRechargeDocument.uuID);
+ uint num = specificDocument.GetCurrentVipPermissions().AuctionOnSaleMax;
+ XWelfareDocument specificDocument2 = XDocuments.GetSpecificDocument<XWelfareDocument>(XWelfareDocument.uuID);
+ this.m_tqSprite.SetSprite(specificDocument2.GetMemberPrivilegeIcon(MemberPrivilege.KingdomPrivilege_Court));
+ bool flag2 = specificDocument2.IsOwnMemberPrivilege(MemberPrivilege.KingdomPrivilege_Court);
+ if (flag2)
+ {
+ num += (uint)specificDocument2.GetMemberPrivilegeConfig(MemberPrivilege.KingdomPrivilege_Court).AuctionCount;
+ this.m_tqSprite.SetGrey(true);
+ this.m_tqLabel.SetEnabled(true);
+ }
+ else
+ {
+ this.m_tqSprite.SetGrey(false);
+ this.m_tqLabel.SetEnabled(false);
+ }
+ this.m_curSaleValue.SetText(string.Format("{0}/{1}", count, num));
+ }
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/AuctionSellHandler.cs.meta b/Client/Assets/Scripts/XMainClient/UI/AuctionSellHandler.cs.meta
new file mode 100644
index 00000000..4e240301
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/AuctionSellHandler.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: be734326df7fae840b7694e7eaef3017
+timeCreated: 1611404461
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/AuctionWrapContentGroup.cs b/Client/Assets/Scripts/XMainClient/UI/AuctionWrapContentGroup.cs
new file mode 100644
index 00000000..c30f5846
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/AuctionWrapContentGroup.cs
@@ -0,0 +1,62 @@
+using System;
+using UILib;
+using UnityEngine;
+
+namespace XMainClient.UI
+{
+ internal class AuctionWrapContentGroup
+ {
+ public int rowLines
+ {
+ get
+ {
+ return this.m_itemWrapContent.widthDimension;
+ }
+ }
+
+ public int maxCount
+ {
+ get
+ {
+ return this.m_itemWrapContent.maxItemCount;
+ }
+ }
+
+ public bool Active
+ {
+ get
+ {
+ return this.m_active;
+ }
+ }
+
+ private IXUIScrollView m_itemScrollView;
+
+ private IXUIWrapContent m_itemWrapContent;
+
+ private Transform m_curTransform;
+
+ private bool m_active = false;
+
+ public void SetAuctionWrapContentTemp(Transform temp, WrapItemUpdateEventHandler handler)
+ {
+ this.m_curTransform = temp;
+ this.m_itemScrollView = (temp.gameObject.GetComponent("XUIScrollView") as IXUIScrollView);
+ this.m_itemWrapContent = (temp.transform.Find("Table").GetComponent("XUIWrapContent") as IXUIWrapContent);
+ this.m_itemWrapContent.RegisterItemUpdateEventHandler(handler);
+ }
+
+ public void SetWrapContentSize(int listSize)
+ {
+ listSize = ((listSize % 2 == 1) ? (listSize + 1) : listSize);
+ this.m_itemWrapContent.SetContentCount(listSize, false);
+ this.m_itemScrollView.ResetPosition();
+ }
+
+ public void SetVisible(bool active)
+ {
+ this.m_active = active;
+ this.m_curTransform.gameObject.SetActive(active);
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/AuctionWrapContentGroup.cs.meta b/Client/Assets/Scripts/XMainClient/UI/AuctionWrapContentGroup.cs.meta
new file mode 100644
index 00000000..52420470
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/AuctionWrapContentGroup.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: eeddfb9f57404514585fcbd2073b6e49
+timeCreated: 1611404800
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/Battle.meta b/Client/Assets/Scripts/XMainClient/UI/Battle.meta
new file mode 100644
index 00000000..fe26d826
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/Battle.meta
@@ -0,0 +1,9 @@
+fileFormatVersion: 2
+guid: f44ce9b87ce55c9408f27f4f46277be0
+folderAsset: yes
+timeCreated: 1611402943
+licenseType: Free
+DefaultImporter:
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/Battle/BattleQTEDlgBehaviour.cs b/Client/Assets/Scripts/XMainClient/UI/Battle/BattleQTEDlgBehaviour.cs
new file mode 100644
index 00000000..c204f219
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/Battle/BattleQTEDlgBehaviour.cs
@@ -0,0 +1,65 @@
+using System;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+
+namespace XMainClient.UI.Battle
+{
+ internal class BattleQTEDlgBehaviour : DlgBehaviourBase
+ {
+ public Transform m_Block;
+
+ public Transform m_Bind;
+
+ public IXUISprite m_BindLeftButton;
+
+ public IXUISprite m_BindRightButton;
+
+ public Transform m_BindArrow;
+
+ public Transform m_Abnormal;
+
+ public IXUISlider m_AbnormalBar;
+
+ public IXUISprite m_AbnormalClickSpace;
+
+ public IXUITweenTool m_AbnormalBeginTween;
+
+ public IXUITweenTool m_AbnormalHitTween;
+
+ public IXUITweenTool m_AbnormalSuccessTween;
+
+ public IXUITweenTool m_AbnormalFailTween;
+
+ public Transform m_AbnormalLeftTarget;
+
+ public Transform m_AbnormalRightTarget;
+
+ public Transform m_AbnormalThumb;
+
+ public Transform m_Charge;
+
+ public IXUISlider m_ChargeBar;
+
+ private void Awake()
+ {
+ this.m_Block = base.transform.Find("Block");
+ this.m_Bind = base.transform.Find("Bg/Bind");
+ this.m_BindLeftButton = (this.m_Bind.Find("Left/Light").GetComponent("XUISprite") as IXUISprite);
+ this.m_BindRightButton = (this.m_Bind.Find("Right/Light").GetComponent("XUISprite") as IXUISprite);
+ this.m_BindArrow = this.m_Bind.Find("Arrow");
+ this.m_Abnormal = base.transform.Find("Bg/AbnormalBar");
+ this.m_AbnormalBar = (this.m_Abnormal.Find("Bar").GetComponent("XUISlider") as IXUISlider);
+ this.m_AbnormalClickSpace = (this.m_Abnormal.Find("ClickSpace").GetComponent("XUISprite") as IXUISprite);
+ this.m_AbnormalBeginTween = (this.m_Abnormal.Find("Thumb/Begin").GetComponent("XUIPlayTween") as IXUITweenTool);
+ this.m_AbnormalHitTween = (this.m_Abnormal.Find("Thumb/Hit").GetComponent("XUIPlayTween") as IXUITweenTool);
+ this.m_AbnormalSuccessTween = (this.m_Abnormal.Find("Success").GetComponent("XUIPlayTween") as IXUITweenTool);
+ this.m_AbnormalFailTween = (this.m_Abnormal.Find("Fail").GetComponent("XUIPlayTween") as IXUITweenTool);
+ this.m_AbnormalLeftTarget = this.m_Abnormal.Find("Target/Left");
+ this.m_AbnormalRightTarget = this.m_Abnormal.Find("Target/Right");
+ this.m_AbnormalThumb = this.m_Abnormal.Find("Thumb");
+ this.m_Charge = base.transform.Find("Bg/ChargeBar");
+ this.m_ChargeBar = (this.m_Charge.GetComponent("XUISlider") as IXUISlider);
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/Battle/BattleQTEDlgBehaviour.cs.meta b/Client/Assets/Scripts/XMainClient/UI/Battle/BattleQTEDlgBehaviour.cs.meta
new file mode 100644
index 00000000..115e7bc7
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/Battle/BattleQTEDlgBehaviour.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 95e52dde66495cd468b98bdfb6b9c367
+timeCreated: 1611404183
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/Battle/ChallengeDlgBehaviour.cs b/Client/Assets/Scripts/XMainClient/UI/Battle/ChallengeDlgBehaviour.cs
new file mode 100644
index 00000000..5cfcf248
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/Battle/ChallengeDlgBehaviour.cs
@@ -0,0 +1,40 @@
+using System;
+using UILib;
+using XMainClient.UI.UICommon;
+
+namespace XMainClient.UI.Battle
+{
+ internal class ChallengeDlgBehaviour : DlgBehaviourBase
+ {
+ public IXUITweenTool m_Tween;
+
+ public IXUILabel m_Accept;
+
+ public IXUILabel m_MainDesc;
+
+ public IXUILabel m_HintDesc;
+
+ public IXUISprite m_HintBg;
+
+ public IXUILabel m_HintState;
+
+ public IXUILabel[] m_RewardValue = new IXUILabel[3];
+
+ public IXUISprite[] m_RewardIcon = new IXUISprite[3];
+
+ private void Awake()
+ {
+ this.m_Tween = (base.transform.Find("Bg").GetComponent("XUIPlayTween") as IXUITweenTool);
+ this.m_Accept = (base.transform.Find("Bg/Accept").GetComponent("XUILabel") as IXUILabel);
+ this.m_MainDesc = (base.transform.Find("Bg/MainDesc").GetComponent("XUILabel") as IXUILabel);
+ for (int i = 0; i < 3; i++)
+ {
+ this.m_RewardValue[i] = (base.transform.Find(string.Format("Bg/Reward/Label{0}", i + 1)).GetComponent("XUILabel") as IXUILabel);
+ this.m_RewardIcon[i] = (base.transform.Find(string.Format("Bg/Reward/Label{0}/Icon", i + 1)).GetComponent("XUISprite") as IXUISprite);
+ }
+ this.m_HintBg = (base.transform.Find("Hint").GetComponent("XUISprite") as IXUISprite);
+ this.m_HintDesc = (base.transform.Find("Hint/Desc").GetComponent("XUILabel") as IXUILabel);
+ this.m_HintState = (base.transform.Find("Hint/State").GetComponent("XUILabel") as IXUILabel);
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/Battle/ChallengeDlgBehaviour.cs.meta b/Client/Assets/Scripts/XMainClient/UI/Battle/ChallengeDlgBehaviour.cs.meta
new file mode 100644
index 00000000..7ab0521a
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/Battle/ChallengeDlgBehaviour.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: a025658fce0b2d1438906e62ba4f9c8e
+timeCreated: 1611404248
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/BattleContiBehaviour.cs b/Client/Assets/Scripts/XMainClient/UI/BattleContiBehaviour.cs
new file mode 100644
index 00000000..40b161ae
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/BattleContiBehaviour.cs
@@ -0,0 +1,44 @@
+using System;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class BattleContiBehaviour : DlgBehaviourBase
+ {
+ public IXUILabel m_killer;
+
+ public IXUILabel m_deader;
+
+ public IXUISprite m_KillText;
+
+ public Transform m_Parent;
+
+ public Transform m_InfoTpl;
+
+ public IXUITweenTool[] m_Killicon = new IXUITweenTool[XBattleCaptainPVPDocument.CONTINUOUS_KILL + 1u];
+
+ public IXUITweenTool m_AssitIcon;
+
+ public IXPositionGroup m_KillInfoGroup = null;
+
+ private void Awake()
+ {
+ this.m_Parent = base.transform.Find("Bg/KillInfoParent");
+ this.m_InfoTpl = base.transform.Find("Bg/KillInfoParent/InfoTpl");
+ this.m_killer = (base.transform.Find("Bg/KillInfoParent/InfoTpl/Bg/killer").GetComponent("XUILabel") as IXUILabel);
+ this.m_deader = (base.transform.Find("Bg/KillInfoParent/InfoTpl/Bg/dead").GetComponent("XUILabel") as IXUILabel);
+ this.m_KillText = (base.transform.Find("Bg/Continuous/KillText").GetComponent("XUISprite") as IXUISprite);
+ this.m_AssitIcon = (base.transform.Find("Bg/Continuous/AssistIcon").GetComponent("XUIPlayTween") as IXUITweenTool);
+ int num = 1;
+ while ((long)num <= (long)((ulong)XBattleCaptainPVPDocument.CONTINUOUS_KILL))
+ {
+ this.m_Killicon[num] = (base.transform.Find(string.Format("Bg/Continuous/Killicon{0}", num)).GetComponent("XUIPlayTween") as IXUITweenTool);
+ num++;
+ }
+ this.m_KillInfoGroup = (this.m_Parent.GetComponent("PositionGroup") as IXPositionGroup);
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/BattleContiBehaviour.cs.meta b/Client/Assets/Scripts/XMainClient/UI/BattleContiBehaviour.cs.meta
new file mode 100644
index 00000000..54156eab
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/BattleContiBehaviour.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 602624d40873b6c48b9b580f8e5ba5f0
+timeCreated: 1611403832
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/BattleContiDlg.cs b/Client/Assets/Scripts/XMainClient/UI/BattleContiDlg.cs
new file mode 100644
index 00000000..63e3866a
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/BattleContiDlg.cs
@@ -0,0 +1,473 @@
+using System;
+using System.Collections.Generic;
+using KKSG;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class BattleContiDlg : DlgBase<BattleContiDlg, BattleContiBehaviour>
+ {
+ public ulong CurEnemy
+ {
+ get
+ {
+ return this._curEnemy;
+ }
+ }
+
+ public override string fileName
+ {
+ get
+ {
+ return "Battle/BattleKillInfo";
+ }
+ }
+
+ public override int layer
+ {
+ get
+ {
+ return 1;
+ }
+ }
+
+ public override bool autoload
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ private XElapseTimer m_conKillerTime = new XElapseTimer();
+
+ private XElapseTimer m_battleKiller = new XElapseTimer();
+
+ private Queue<GVGBattleSkill> _waitQueue = new Queue<GVGBattleSkill>();
+
+ private GVGBattleSkill m_battleSkillTemp;
+
+ private KillInfoMode _mode;
+
+ public Queue<GVGBattleSkill> _showqueue = new Queue<GVGBattleSkill>();
+
+ private static readonly uint MULTIPLESHOWMAX = 5u;
+
+ private static readonly float EACHSHOWTIME = 5f;
+
+ private List<IXUILabel> _killLabelList = new List<IXUILabel>();
+
+ private XUIPool _killInfoPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ private MyBattleKillInfo myInfoTemp = new MyBattleKillInfo();
+
+ private Queue<MyBattleKillInfo> _killOrAssitQueue = new Queue<MyBattleKillInfo>();
+
+ private int _currShow;
+
+ private bool _isRevengePlay = false;
+
+ private ulong _curEnemy = 0UL;
+
+ protected override void Init()
+ {
+ bool flag = XSingleton<XScene>.singleton.SceneType == SceneType.SCENE_HEROBATTLE;
+ if (flag)
+ {
+ this.InitMultiMode();
+ }
+ else
+ {
+ this._mode = KillInfoMode.Single;
+ }
+ bool flag2 = XSingleton<XScene>.singleton.SceneType == SceneType.SCENE_HEROBATTLE;
+ if (flag2)
+ {
+ base.uiBehaviour.m_KillInfoGroup.SetGroup(1);
+ }
+ else
+ {
+ bool flag3 = XSingleton<XScene>.singleton.SceneType == SceneType.SCENE_BIGMELEE_FIGHT;
+ if (flag3)
+ {
+ base.uiBehaviour.m_KillInfoGroup.SetGroup(2);
+ this._isRevengePlay = true;
+ }
+ else
+ {
+ base.uiBehaviour.m_KillInfoGroup.SetGroup(0);
+ }
+ }
+ this.HideKillInfo();
+ this._killOrAssitQueue.Clear();
+ this.HideAll();
+ }
+
+ private void InitMultiMode()
+ {
+ this._mode = KillInfoMode.Multiple;
+ this._killInfoPool.SetupPool(base.uiBehaviour.m_InfoTpl.parent.gameObject, base.uiBehaviour.m_InfoTpl.gameObject, BattleContiDlg.MULTIPLESHOWMAX, true);
+ Vector3 tplPos = this._killInfoPool.TplPos;
+ this._killLabelList.Clear();
+ this._showqueue.Clear();
+ this._waitQueue.Clear();
+ int num = 0;
+ while ((long)num < (long)((ulong)BattleContiDlg.MULTIPLESHOWMAX))
+ {
+ GameObject gameObject = this._killInfoPool.FetchGameObject(false);
+ gameObject.transform.localPosition = new Vector3(tplPos.x, tplPos.y - (float)(num * this._killInfoPool.TplHeight));
+ Transform transform = gameObject.transform.Find("Bg");
+ transform.localPosition = XGameUI.Far_Far_Away;
+ IXUILabel item = transform.Find("killer").GetComponent("XUILabel") as IXUILabel;
+ IXUILabel item2 = transform.Find("dead").GetComponent("XUILabel") as IXUILabel;
+ this._killLabelList.Add(item);
+ this._killLabelList.Add(item2);
+ num++;
+ }
+ }
+
+ public void AddBattleSkill(GVGBattleSkill battleSkill)
+ {
+ bool flag = !base.IsVisible();
+ if (flag)
+ {
+ this.m_battleSkillTemp = battleSkill;
+ this.SetVisibleWithAnimation(true, null);
+ }
+ else
+ {
+ this.m_battleSkillTemp = null;
+ this.SetBattleSkill(battleSkill);
+ }
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ bool flag = this.m_battleSkillTemp != null;
+ if (flag)
+ {
+ this.SetBattleSkill(this.m_battleSkillTemp);
+ }
+ }
+
+ private void SetBattleSkill(GVGBattleSkill battleSkill)
+ {
+ bool flag = battleSkill.contiKillCount >= 0;
+ if (flag)
+ {
+ this._waitQueue.Enqueue(battleSkill);
+ }
+ bool flag2 = battleSkill.killerID == XSingleton<XAttributeMgr>.singleton.XPlayerData.RoleID || battleSkill.contiKillCount < 0;
+ if (flag2)
+ {
+ bool flag3 = battleSkill.contiKillCount != 0;
+ if (flag3)
+ {
+ bool flag4 = this._currShow == 0;
+ if (flag4)
+ {
+ this._currShow = -1;
+ }
+ bool flag5 = battleSkill.contiKillCount > 0;
+ if (flag5)
+ {
+ this._killOrAssitQueue.Clear();
+ this.m_conKillerTime.LeftTime = 0f;
+ this.myInfoTemp.SetInfo(battleSkill.contiKillCount, this._isRevengePlay && this.IsRevenge(battleSkill.deadID));
+ this._killOrAssitQueue.Enqueue(this.myInfoTemp);
+ }
+ else
+ {
+ this.myInfoTemp.SetInfo(battleSkill.contiKillCount, false);
+ this._killOrAssitQueue.Enqueue(this.myInfoTemp);
+ }
+ }
+ }
+ else
+ {
+ bool flag6 = battleSkill.deadID == XSingleton<XAttributeMgr>.singleton.XPlayerData.RoleID;
+ if (flag6)
+ {
+ bool isRevengePlay = this._isRevengePlay;
+ if (isRevengePlay)
+ {
+ this.ChangeEnemy(battleSkill.killerID);
+ }
+ bool flag7 = this._currShow > 0;
+ if (flag7)
+ {
+ this.HideConKill();
+ this.m_conKillerTime.LeftTime = 0f;
+ }
+ }
+ }
+ }
+
+ private void UpdateBattleSkill()
+ {
+ bool flag = this.m_battleKiller == null;
+ if (!flag)
+ {
+ this.m_battleKiller.Update();
+ bool flag2 = this.m_battleKiller.LeftTime > 0f;
+ if (!flag2)
+ {
+ bool flag3 = this._mode == KillInfoMode.Single;
+ if (flag3)
+ {
+ bool flag4 = this._waitQueue.Count > 0;
+ if (flag4)
+ {
+ GVGBattleSkill battle = this._waitQueue.Dequeue();
+ this.Set(battle, base.uiBehaviour.m_killer, base.uiBehaviour.m_deader);
+ this.m_battleKiller.LeftTime = ((this._waitQueue.Count > 0) ? 1f : 5f);
+ }
+ else
+ {
+ this.HideKillInfo();
+ }
+ }
+ else
+ {
+ bool flag5 = this._showqueue.Count <= 0 && this._waitQueue.Count <= 0;
+ if (!flag5)
+ {
+ for (;;)
+ {
+ bool flag6 = this._showqueue.Count == 0;
+ if (flag6)
+ {
+ break;
+ }
+ GVGBattleSkill gvgbattleSkill = this._showqueue.Peek();
+ bool flag7 = gvgbattleSkill.validTime < Time.time;
+ if (!flag7)
+ {
+ break;
+ }
+ this._showqueue.Dequeue();
+ }
+ while ((long)this._showqueue.Count < (long)((ulong)BattleContiDlg.MULTIPLESHOWMAX) && this._waitQueue.Count > 0)
+ {
+ GVGBattleSkill gvgbattleSkill2 = this._waitQueue.Dequeue();
+ gvgbattleSkill2.validTime = Time.time + BattleContiDlg.EACHSHOWTIME;
+ this._showqueue.Enqueue(gvgbattleSkill2);
+ }
+ int i = 0;
+ foreach (GVGBattleSkill battle2 in this._showqueue)
+ {
+ this.Set(battle2, this._killLabelList[i], this._killLabelList[i + 1]);
+ i += 2;
+ }
+ while (i < this._killLabelList.Count)
+ {
+ this._killLabelList[i].gameObject.transform.parent.localPosition = XGameUI.Far_Far_Away;
+ i += 2;
+ }
+ this.m_battleKiller.LeftTime = 0.5f;
+ }
+ }
+ }
+ }
+ }
+
+ public override void OnUpdate()
+ {
+ base.OnUpdate();
+ this.UpdateBattleSkill();
+ this.UpdateConKiller();
+ }
+
+ private void UpdateConKiller()
+ {
+ this.m_conKillerTime.Update();
+ bool flag = this.m_conKillerTime.LeftTime > 0f;
+ if (!flag)
+ {
+ bool flag2 = this._currShow == 0;
+ if (!flag2)
+ {
+ bool flag3 = this._killOrAssitQueue.Count != 0;
+ if (flag3)
+ {
+ MyBattleKillInfo myBattleKillInfo = this._killOrAssitQueue.Dequeue();
+ this.ShowConKill(myBattleKillInfo.contiKillCount, myBattleKillInfo.isRevenge);
+ }
+ else
+ {
+ this.HideAll();
+ this._currShow = 0;
+ }
+ }
+ }
+ }
+
+ public void Set(GVGBattleSkill battle, IXUILabel l1, IXUILabel l2)
+ {
+ bool flag = battle == null;
+ if (!flag)
+ {
+ l1.gameObject.transform.parent.localPosition = Vector3.zero;
+ bool killerPosition = battle.killerPosition;
+ if (killerPosition)
+ {
+ l1.SetText(XStringDefineProxy.GetString("GUILD_ARENA_BLUE", new object[]
+ {
+ battle.killerName
+ }));
+ l2.SetText(XStringDefineProxy.GetString("GUILD_ARENA_RED", new object[]
+ {
+ battle.deadName
+ }));
+ }
+ else
+ {
+ l1.SetText(XStringDefineProxy.GetString("GUILD_ARENA_RED", new object[]
+ {
+ battle.killerName
+ }));
+ l2.SetText(XStringDefineProxy.GetString("GUILD_ARENA_BLUE", new object[]
+ {
+ battle.deadName
+ }));
+ }
+ }
+ }
+
+ public void HideKillInfo()
+ {
+ base.uiBehaviour.m_killer.gameObject.transform.parent.localPosition = XGameUI.Far_Far_Away;
+ }
+
+ public void HideAll()
+ {
+ this.HideConKill();
+ this.HideAssit();
+ }
+
+ public void HideConKill()
+ {
+ base.uiBehaviour.m_KillText.SetAlpha(0f);
+ int num = 1;
+ while ((long)num <= (long)((ulong)XBattleCaptainPVPDocument.CONTINUOUS_KILL))
+ {
+ base.uiBehaviour.m_Killicon[num].gameObject.transform.localPosition = XGameUI.Far_Far_Away;
+ num++;
+ }
+ }
+
+ public void HideAssit()
+ {
+ base.uiBehaviour.m_AssitIcon.gameObject.transform.localPosition = XGameUI.Far_Far_Away;
+ }
+
+ public void ShowConKill(int count, bool isRevenge)
+ {
+ this._currShow = count;
+ bool flag = count >= 0;
+ if (flag)
+ {
+ this.HideAssit();
+ this.m_conKillerTime.LeftTime = 3f;
+ if (isRevenge)
+ {
+ base.uiBehaviour.m_KillText.SetAlpha(1f);
+ base.uiBehaviour.m_KillText.SetSprite("revenge");
+ base.uiBehaviour.m_KillText.MakePixelPerfect();
+ }
+ else
+ {
+ bool flag2 = count <= 1;
+ if (flag2)
+ {
+ base.uiBehaviour.m_KillText.SetAlpha(0f);
+ }
+ else
+ {
+ base.uiBehaviour.m_KillText.SetAlpha(1f);
+ string arg = (count >= 9) ? "9" : count.ToString();
+ base.uiBehaviour.m_KillText.SetSprite(string.Format("{0}{1}", "kill", arg));
+ base.uiBehaviour.m_KillText.MakePixelPerfect();
+ }
+ }
+ bool flag3 = count > 0;
+ if (flag3)
+ {
+ int num = (count >= 5) ? 5 : count;
+ XSingleton<XAudioMgr>.singleton.PlayUISound(string.Format("Audio/VO/System/system{0}", num), true, AudioChannel.Action);
+ }
+ bool flag4 = (long)count >= (long)((ulong)XBattleCaptainPVPDocument.CONTINUOUS_KILL);
+ if (flag4)
+ {
+ count = (int)XBattleCaptainPVPDocument.CONTINUOUS_KILL;
+ }
+ int num2 = 1;
+ while ((long)num2 <= (long)((ulong)XBattleCaptainPVPDocument.CONTINUOUS_KILL))
+ {
+ bool flag5 = num2 <= count;
+ if (flag5)
+ {
+ base.uiBehaviour.m_Killicon[num2].gameObject.transform.localPosition = new Vector3((float)(((double)((float)(num2 - 1) + 0.5f) - (double)count / 2.0) * (double)XBattleCaptainPVPDocument.ConKillIconDis), 0f, 0f);
+ base.uiBehaviour.m_Killicon[num2].PlayTween(true, -1f);
+ }
+ else
+ {
+ base.uiBehaviour.m_Killicon[num2].gameObject.transform.localPosition = XGameUI.Far_Far_Away;
+ }
+ num2++;
+ }
+ }
+ else
+ {
+ this.m_conKillerTime.LeftTime = 2f;
+ this.HideConKill();
+ base.uiBehaviour.m_AssitIcon.gameObject.transform.localPosition = Vector3.zero;
+ base.uiBehaviour.m_AssitIcon.PlayTween(true, -1f);
+ }
+ }
+
+ private bool IsRevenge(ulong deadID)
+ {
+ bool flag = this._curEnemy == deadID;
+ bool flag2 = flag;
+ if (flag2)
+ {
+ XBigMeleeEnemyChange @event = XEventPool<XBigMeleeEnemyChange>.GetEvent();
+ XEntity entityConsiderDeath = XSingleton<XEntityMgr>.singleton.GetEntityConsiderDeath(this._curEnemy);
+ @event.isEnemy = false;
+ @event.Firer = entityConsiderDeath;
+ XSingleton<XEventMgr>.singleton.FireEvent(@event);
+ this.ClearRevenge();
+ }
+ return flag;
+ }
+
+ private void ChangeEnemy(ulong KillID)
+ {
+ XEntity entityConsiderDeath = XSingleton<XEntityMgr>.singleton.GetEntityConsiderDeath(KillID);
+ bool isRole = entityConsiderDeath.IsRole;
+ if (isRole)
+ {
+ XBigMeleeEnemyChange @event = XEventPool<XBigMeleeEnemyChange>.GetEvent();
+ XEntity entityConsiderDeath2 = XSingleton<XEntityMgr>.singleton.GetEntityConsiderDeath(this._curEnemy);
+ @event.isEnemy = false;
+ @event.Firer = entityConsiderDeath2;
+ XSingleton<XEventMgr>.singleton.FireEvent(@event);
+ entityConsiderDeath2 = XSingleton<XEntityMgr>.singleton.GetEntityConsiderDeath(KillID);
+ @event.isEnemy = true;
+ @event.Firer = entityConsiderDeath2;
+ XSingleton<XEventMgr>.singleton.FireEvent(@event);
+ this._curEnemy = KillID;
+ }
+ }
+
+ public void ClearRevenge()
+ {
+ this._curEnemy = 0UL;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/BattleContiDlg.cs.meta b/Client/Assets/Scripts/XMainClient/UI/BattleContiDlg.cs.meta
new file mode 100644
index 00000000..f3dc91d8
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/BattleContiDlg.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: d757dde2dc9914f488425c83b85649ab
+timeCreated: 1611404635
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/BattleContinueDlg.cs b/Client/Assets/Scripts/XMainClient/UI/BattleContinueDlg.cs
new file mode 100644
index 00000000..4b0c233b
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/BattleContinueDlg.cs
@@ -0,0 +1,124 @@
+using System;
+using KKSG;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class BattleContinueDlg : DlgBase<BattleContinueDlg, BattleContinueDlgBehaviour>
+ {
+ public override string fileName
+ {
+ get
+ {
+ return "Battle/BattleContinueDlg";
+ }
+ }
+
+ public override int layer
+ {
+ get
+ {
+ return 1;
+ }
+ }
+
+ public override bool autoload
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ private XLevelDocument _doc;
+
+ protected override void Init()
+ {
+ this._doc = (XSingleton<XGame>.singleton.Doc.GetXComponent(XLevelDocument.uuID) as XLevelDocument);
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ base.uiBehaviour.m_Continue.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnContinueClicked));
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ bool flag = DlgBase<BattleMain, BattleMainBehaviour>.singleton.IsLoaded();
+ if (flag)
+ {
+ DlgBase<BattleMain, BattleMainBehaviour>.singleton.SkillHandler.ResetPressState();
+ DlgBase<BattleMain, BattleMainBehaviour>.singleton.SetVisiblePure(false);
+ DlgBase<RadioBattleDlg, RadioBattleBahaviour>.singleton.Show(false);
+ DlgBase<XChatSmallView, XChatSmallBehaviour>.singleton.SetVisible(false, true);
+ base.uiBehaviour.m_tween.PlayTween(true, -1f);
+ }
+ bool flag2 = DlgBase<SpectateSceneView, SpectateSceneBehaviour>.singleton.IsLoaded();
+ if (flag2)
+ {
+ DlgBase<SpectateSceneView, SpectateSceneBehaviour>.singleton.SetVisiblePure(false);
+ DlgBase<XChatSmallView, XChatSmallBehaviour>.singleton.SetVisible(false, true);
+ DlgBase<RadioDlg, RadioBehaviour>.singleton.Show(false);
+ }
+ bool flag3 = DlgBase<XChatView, XChatBehaviour>.singleton.IsLoaded();
+ if (flag3)
+ {
+ DlgBase<XChatView, XChatBehaviour>.singleton.SetVisible(false, true);
+ }
+ }
+
+ protected bool OnContinueClicked(IXUIButton button)
+ {
+ this.SetVisible(false, true);
+ XBossBushDocument specificDocument = XDocuments.GetSpecificDocument<XBossBushDocument>(XBossBushDocument.uuID);
+ specificDocument.SendQuery(BossRushReqStatus.BOSSRUSH_RESULT_WIN);
+ specificDocument.SendQuery(BossRushReqStatus.BOSSRUSH_REQ_BASEDATA);
+ return true;
+ }
+
+ protected bool OnReturnClicked(IXUIButton button)
+ {
+ XSingleton<XLevelFinishMgr>.singleton.ForceLevelFinish(true);
+ XSingleton<XLevelFinishMgr>.singleton.WaitingLevelContinueSelect = false;
+ this.SetVisible(false, true);
+ return true;
+ }
+
+ public void ShowBossrushResult()
+ {
+ this.SetVisible(true, true);
+ XSingleton<XLevelFinishMgr>.singleton.WaitingLevelContinueSelect = true;
+ XBossBushDocument specificDocument = XDocuments.GetSpecificDocument<XBossBushDocument>(XBossBushDocument.uuID);
+ base.uiBehaviour.m_Next.gameObject.SetActive(true);
+ base.uiBehaviour.m_lblNum.SetText(XStringDefineProxy.GetString("BOSS_RATE_RWD", new object[]
+ {
+ specificDocument.rwdRate
+ }));
+ base.uiBehaviour.m_lblNum.SetVisible(specificDocument.rwdRate > 1f);
+ base.uiBehaviour.m_NextItemPool.ReturnAll(false);
+ for (int i = 0; i < specificDocument.bossRushRow.reward.Count; i++)
+ {
+ uint num = specificDocument.bossRushRow.reward[i, 0];
+ uint num2 = specificDocument.bossRushRow.reward[i, 1];
+ GameObject gameObject = base.uiBehaviour.m_NextItemPool.FetchGameObject(false);
+ XSingleton<XItemDrawerMgr>.singleton.normalItemDrawer.DrawItem(gameObject, (int)num, (int)(num2 * specificDocument.rwdRate), false);
+ IXUISprite ixuisprite = gameObject.transform.GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.ID = (ulong)num;
+ bool flag = specificDocument.bossRushRow.reward.Count % 2 == 0;
+ if (flag)
+ {
+ gameObject.transform.localPosition = new Vector3(130f * ((float)(i - specificDocument.bossRushRow.reward.Count / 2) + 0.5f), 0f, 0f);
+ }
+ else
+ {
+ gameObject.transform.localPosition = new Vector3((float)(130 * (i - specificDocument.bossRushRow.reward.Count / 2)), 0f, 0f);
+ }
+ }
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/BattleContinueDlg.cs.meta b/Client/Assets/Scripts/XMainClient/UI/BattleContinueDlg.cs.meta
new file mode 100644
index 00000000..f109aa4f
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/BattleContinueDlg.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 368fa6feea65bed46aec0da4dcbb80f2
+timeCreated: 1611403562
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/BattleContinueDlgBehaviour.cs b/Client/Assets/Scripts/XMainClient/UI/BattleContinueDlgBehaviour.cs
new file mode 100644
index 00000000..0bcb9049
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/BattleContinueDlgBehaviour.cs
@@ -0,0 +1,31 @@
+using System;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class BattleContinueDlgBehaviour : DlgBehaviourBase
+ {
+ public IXUIButton m_Continue;
+
+ public IXUITweenTool m_tween;
+
+ public Transform m_Next;
+
+ public IXUILabel m_lblNum;
+
+ public XUIPool m_NextItemPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ private void Awake()
+ {
+ this.m_Continue = (base.transform.Find("Bg/Continue").GetComponent("XUIButton") as IXUIButton);
+ this.m_tween = (base.transform.Find("Bg/Continue").GetComponent("XUIPlayTween") as IXUITweenTool);
+ this.m_Next = base.transform.Find("Bg/Next");
+ this.m_lblNum = (this.m_Next.transform.Find("Num").GetComponent("XUILabel") as IXUILabel);
+ Transform transform = base.transform.Find("Bg/Next/Item");
+ this.m_NextItemPool.SetupPool(transform.parent.gameObject, transform.gameObject, 3u, false);
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/BattleContinueDlgBehaviour.cs.meta b/Client/Assets/Scripts/XMainClient/UI/BattleContinueDlgBehaviour.cs.meta
new file mode 100644
index 00000000..68bc0bc3
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/BattleContinueDlgBehaviour.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 42d3118b80673e341bdd5651094409c5
+timeCreated: 1611403640
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/BattleDebugHandler.cs b/Client/Assets/Scripts/XMainClient/UI/BattleDebugHandler.cs
new file mode 100644
index 00000000..b4decf84
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/BattleDebugHandler.cs
@@ -0,0 +1,43 @@
+using System;
+using System.Collections.Generic;
+using UILib;
+using UnityEngine;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class BattleDebugHandler : DlgHandlerBase
+ {
+ public XUIPool m_EnmityListPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ protected override void Init()
+ {
+ base.Init();
+ Transform transform = base.PanelObject.transform.Find("template");
+ this.m_EnmityListPool.SetupPool(transform.parent.gameObject, transform.gameObject, 10u, false);
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ this.m_EnmityListPool.ReturnAll(false);
+ }
+
+ public override void OnUpdate()
+ {
+ base.OnUpdate();
+ }
+
+ public void UpdateEnmityList(List<Enmity> enmity)
+ {
+ this.m_EnmityListPool.ReturnAll(false);
+ for (int i = 0; i < enmity.Count; i++)
+ {
+ GameObject gameObject = this.m_EnmityListPool.FetchGameObject(false);
+ gameObject.transform.localPosition = new Vector3(this.m_EnmityListPool.TplPos.x, this.m_EnmityListPool.TplPos.y - (float)(i * this.m_EnmityListPool.TplHeight), this.m_EnmityListPool.TplPos.z);
+ IXUILabel ixuilabel = gameObject.transform.Find("name").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel.SetText(enmity[i].entity.Name + ":" + enmity[i].value.ToString());
+ }
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/BattleDebugHandler.cs.meta b/Client/Assets/Scripts/XMainClient/UI/BattleDebugHandler.cs.meta
new file mode 100644
index 00000000..c12ee47a
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/BattleDebugHandler.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 052550b164698a74396f4b0d1f227826
+timeCreated: 1611402962
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/BattleDpsHandler.cs b/Client/Assets/Scripts/XMainClient/UI/BattleDpsHandler.cs
new file mode 100644
index 00000000..3d3c5d9c
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/BattleDpsHandler.cs
@@ -0,0 +1,88 @@
+using System;
+using UILib;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class BattleDpsHandler : DlgHandlerBase
+ {
+ private IXUILabel m_uiInfo;
+
+ private IXUISprite m_uiBg;
+
+ private ulong m_Dps;
+
+ private int m_Rank;
+
+ private XCombatStatisticsDocument doc;
+
+ private string m_strTemplate;
+
+ protected override void Init()
+ {
+ base.Init();
+ this.m_uiInfo = (base.PanelObject.GetComponent("XUILabel") as IXUILabel);
+ this.m_uiBg = (base.PanelObject.transform.Find("Bg").GetComponent("XUISprite") as IXUISprite);
+ this.doc = XDocuments.GetSpecificDocument<XCombatStatisticsDocument>(XCombatStatisticsDocument.uuID);
+ this.doc.DpsHandler = this;
+ this.m_Dps = 0UL;
+ this.m_Rank = 0;
+ this.m_strTemplate = XSingleton<UiUtility>.singleton.ReplaceReturn(XStringDefineProxy.GetString("DPS_INFO"));
+ }
+
+ public override void OnUnload()
+ {
+ base.OnUnload();
+ this.doc.DpsHandler = null;
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ this._Refresh();
+ this.RefreshData();
+ }
+
+ public override void OnUpdate()
+ {
+ base.OnUpdate();
+ bool flag = !XSingleton<XGame>.singleton.SyncMode;
+ if (flag)
+ {
+ this.RefreshData();
+ }
+ }
+
+ public override void RefreshData()
+ {
+ base.RefreshData();
+ this.doc.ReqDps();
+ }
+
+ public void SetDps(double dps, double rank)
+ {
+ ulong num = (ulong)dps;
+ int num2 = (int)rank;
+ bool flag = num != this.m_Dps || num2 != this.m_Rank;
+ if (flag)
+ {
+ this.m_Dps = num;
+ this.m_Rank = num2;
+ this._Refresh();
+ }
+ }
+
+ public void SetInfo(string s)
+ {
+ this.m_uiInfo.SetText(s);
+ this.m_uiBg.UpdateAnchors();
+ }
+
+ private void _Refresh()
+ {
+ string text = string.Format(this.m_strTemplate, XSingleton<UiUtility>.singleton.NumberFormat(this.m_Dps), this.m_Rank.ToString());
+ this.m_uiInfo.SetText(text);
+ this.m_uiBg.UpdateAnchors();
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/BattleDpsHandler.cs.meta b/Client/Assets/Scripts/XMainClient/UI/BattleDpsHandler.cs.meta
new file mode 100644
index 00000000..6799b5e7
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/BattleDpsHandler.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 2edc4d89c6de1824d92c435b8bfff3c1
+timeCreated: 1611403512
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/BattleDramaDlg.cs b/Client/Assets/Scripts/XMainClient/UI/BattleDramaDlg.cs
new file mode 100644
index 00000000..c4295a64
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/BattleDramaDlg.cs
@@ -0,0 +1,259 @@
+using System;
+using UILib;
+using XMainClient.UI.UICommon;
+using XUpdater;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class BattleDramaDlg : DlgBase<BattleDramaDlg, BattleDramaDlgBehaviour>
+ {
+ public override string fileName
+ {
+ get
+ {
+ return "Battle/BattleDramaDlg";
+ }
+ }
+
+ public override int layer
+ {
+ get
+ {
+ return 1;
+ }
+ }
+
+ public override bool exclusive
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override bool autoload
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ private string leftTalker = "";
+
+ private string rightTalker = "";
+
+ private XDummy m_rightDummy;
+
+ private XDummy m_leftDummy;
+
+ private uint _close_timer = 0u;
+
+ public override void RegisterEvent()
+ {
+ IXUISprite ixuisprite = base.uiBehaviour.m_TaskArea.GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.GotoNextTalk));
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ base.Alloc3DAvatarPool("BattleDramaDlg");
+ XSingleton<XLevelAIMgr>.singleton.EnableAllAI(false);
+ bool autoPlayOn = XSingleton<XEntityMgr>.singleton.Player.PlayerAttributes.AutoPlayOn;
+ if (autoPlayOn)
+ {
+ float interval = float.Parse(XSingleton<XGlobalConfig>.singleton.GetValue("CloseDramaDlgTime"));
+ this._close_timer = XSingleton<XTimerMgr>.singleton.SetTimer(interval, new XTimerMgr.ElapsedEventHandler(this.AutoClose), null);
+ }
+ }
+
+ protected override void OnHide()
+ {
+ base.OnHide();
+ XSingleton<X3DAvatarMgr>.singleton.ClearDummy(this.m_dummPool);
+ XSingleton<XTutorialHelper>.singleton.BattleNPCTalkEnd = true;
+ XSingleton<XLevelAIMgr>.singleton.EnableAllAI(true);
+ this.leftTalker = "";
+ this.rightTalker = "";
+ XSingleton<X3DAvatarMgr>.singleton.EnableMainDummy(false, null);
+ bool flag = base.uiBehaviour.m_rightSnapshot != null;
+ if (flag)
+ {
+ base.uiBehaviour.m_rightSnapshot.RefreshRenderQueue = null;
+ }
+ bool flag2 = base.uiBehaviour.m_leftSnapshot != null;
+ if (flag2)
+ {
+ base.uiBehaviour.m_leftSnapshot.RefreshRenderQueue = null;
+ }
+ this.m_leftDummy = null;
+ this.m_rightDummy = null;
+ bool flag3 = this._close_timer > 0u;
+ if (flag3)
+ {
+ XSingleton<XTimerMgr>.singleton.KillTimer(this._close_timer);
+ this._close_timer = 0u;
+ }
+ }
+
+ protected override void OnUnload()
+ {
+ XSingleton<XShell>.singleton.Pause = false;
+ this.leftTalker = "";
+ this.rightTalker = "";
+ base.Return3DAvatarPool();
+ this.m_leftDummy = null;
+ this.m_rightDummy = null;
+ base.OnUnload();
+ }
+
+ private void AutoClose(object obj)
+ {
+ bool flag = base.IsVisible();
+ if (flag)
+ {
+ this.GotoNextTalk(null);
+ this._close_timer = XSingleton<XTimerMgr>.singleton.SetTimer(0.5f, new XTimerMgr.ElapsedEventHandler(this.AutoClose), null);
+ }
+ }
+
+ protected void GotoNextTalk(IXUISprite sp)
+ {
+ XSingleton<XLevelScriptMgr>.singleton.ExecuteNextCmd();
+ }
+
+ public void SetRightAvatar(string talker, string content, string voice)
+ {
+ bool onReconnect = XSingleton<XClientNetwork>.singleton.XConnect.OnReconnect;
+ if (!onReconnect)
+ {
+ XSingleton<XVirtualTab>.singleton.Cancel();
+ bool flag = DlgBase<BattleMain, BattleMainBehaviour>.singleton.IsLoaded();
+ if (flag)
+ {
+ DlgBase<BattleMain, BattleMainBehaviour>.singleton.SkillHandler.ResetPressState();
+ }
+ this.SetVisible(true, true);
+ base.uiBehaviour.m_RightText.gameObject.SetActive(true);
+ base.uiBehaviour.m_name.gameObject.SetActive(true);
+ base.uiBehaviour.m_LeftText.gameObject.SetActive(false);
+ base.uiBehaviour.m_rightSnapshot.transform.localPosition = base.uiBehaviour.m_rightDummyPos;
+ base.uiBehaviour.m_leftSnapshot.transform.localPosition = XGameUI.Far_Far_Away;
+ string text = "";
+ bool flag2 = talker == "[player]";
+ if (flag2)
+ {
+ XSingleton<X3DAvatarMgr>.singleton.EnableMainDummy(false, null);
+ XSingleton<X3DAvatarMgr>.singleton.EnableMainDummy(true, base.uiBehaviour.m_rightSnapshot);
+ XEntityPresentation.RowData byPresentID = XSingleton<XEntityMgr>.singleton.EntityInfo.GetByPresentID(XSingleton<XAttributeMgr>.singleton.XPlayerData.PresentID);
+ bool flag3 = byPresentID != null && byPresentID.AvatarPos != null;
+ if (flag3)
+ {
+ int num = XSingleton<XCommon>.singleton.RandomInt(0, byPresentID.AvatarPos.Length);
+ XSingleton<X3DAvatarMgr>.singleton.SetMainAnimation(byPresentID.AvatarPos[num]);
+ }
+ }
+ else
+ {
+ uint key = uint.Parse(talker);
+ XNpcInfo.RowData byNPCID = XSingleton<XEntityMgr>.singleton.NpcInfo.GetByNPCID(key);
+ text = byNPCID.Name;
+ this.m_rightDummy = XSingleton<X3DAvatarMgr>.singleton.CreateCommonEntityDummy(this.m_dummPool, byNPCID.PresentID, base.uiBehaviour.m_rightSnapshot, this.m_rightDummy, 1f);
+ XEntityPresentation.RowData byPresentID2 = XSingleton<XEntityMgr>.singleton.EntityInfo.GetByPresentID(byNPCID.PresentID);
+ bool flag4 = byPresentID2 != null && byPresentID2.AvatarPos != null;
+ if (flag4)
+ {
+ int num2 = XSingleton<XCommon>.singleton.RandomInt(0, byPresentID2.AvatarPos.Length);
+ this.m_rightDummy.SetAnimation(byPresentID2.AvatarPos[num2]);
+ }
+ }
+ base.uiBehaviour.m_name.SetText(text);
+ base.uiBehaviour.m_RightText.SetText(content);
+ bool flag5 = !string.IsNullOrEmpty(voice);
+ if (flag5)
+ {
+ XSingleton<XAudioMgr>.singleton.PlayUISound(this.GetProfVoice(voice), true, AudioChannel.Action);
+ }
+ this.rightTalker = talker;
+ }
+ }
+
+ public void SetLeftAvatar(string talker, string content, string voice)
+ {
+ bool onReconnect = XSingleton<XClientNetwork>.singleton.XConnect.OnReconnect;
+ if (!onReconnect)
+ {
+ XSingleton<XVirtualTab>.singleton.Cancel();
+ bool flag = DlgBase<BattleMain, BattleMainBehaviour>.singleton.IsLoaded();
+ if (flag)
+ {
+ DlgBase<BattleMain, BattleMainBehaviour>.singleton.SkillHandler.ResetPressState();
+ }
+ this.SetVisible(true, true);
+ base.uiBehaviour.m_RightText.gameObject.SetActive(false);
+ base.uiBehaviour.m_name.gameObject.SetActive(false);
+ base.uiBehaviour.m_LeftText.gameObject.SetActive(true);
+ base.uiBehaviour.m_rightSnapshot.transform.localPosition = XGameUI.Far_Far_Away;
+ base.uiBehaviour.m_leftSnapshot.transform.localPosition = base.uiBehaviour.m_leftDummyPos;
+ string text = "";
+ bool flag2 = talker == "[player]";
+ if (flag2)
+ {
+ XSingleton<X3DAvatarMgr>.singleton.EnableMainDummy(false, null);
+ XSingleton<X3DAvatarMgr>.singleton.EnableMainDummy(true, base.uiBehaviour.m_leftSnapshot);
+ XEntityPresentation.RowData byPresentID = XSingleton<XEntityMgr>.singleton.EntityInfo.GetByPresentID(XSingleton<XAttributeMgr>.singleton.XPlayerData.PresentID);
+ bool flag3 = byPresentID != null && byPresentID.AvatarPos != null;
+ if (flag3)
+ {
+ int num = XSingleton<XCommon>.singleton.RandomInt(0, byPresentID.AvatarPos.Length);
+ XSingleton<X3DAvatarMgr>.singleton.SetMainAnimation(byPresentID.AvatarPos[num]);
+ }
+ }
+ else
+ {
+ uint key = uint.Parse(talker);
+ XNpcInfo.RowData byNPCID = XSingleton<XEntityMgr>.singleton.NpcInfo.GetByNPCID(key);
+ text = byNPCID.Name;
+ this.m_leftDummy = XSingleton<X3DAvatarMgr>.singleton.CreateCommonEntityDummy(this.m_dummPool, byNPCID.PresentID, base.uiBehaviour.m_leftSnapshot, this.m_leftDummy, 1f);
+ XEntityPresentation.RowData byPresentID2 = XSingleton<XEntityMgr>.singleton.EntityInfo.GetByPresentID(byNPCID.PresentID);
+ bool flag4 = byPresentID2 != null && byPresentID2.AvatarPos != null;
+ if (flag4)
+ {
+ int num2 = XSingleton<XCommon>.singleton.RandomInt(0, byPresentID2.AvatarPos.Length);
+ this.m_leftDummy.SetAnimation(byPresentID2.AvatarPos[num2]);
+ }
+ }
+ base.uiBehaviour.m_name.SetText(text);
+ base.uiBehaviour.m_LeftText.SetText(content);
+ bool flag5 = !string.IsNullOrEmpty(voice);
+ if (flag5)
+ {
+ XSingleton<XAudioMgr>.singleton.PlayUISound(this.GetProfVoice(voice), true, AudioChannel.Action);
+ }
+ this.leftTalker = talker;
+ }
+ }
+
+ protected string GetProfVoice(string voice)
+ {
+ string[] array = voice.Split(new char[]
+ {
+ '|'
+ });
+ uint basicTypeID = XSingleton<XAttributeMgr>.singleton.XPlayerData.BasicTypeID;
+ bool flag = (ulong)basicTypeID <= (ulong)((long)array.Length);
+ string result;
+ if (flag)
+ {
+ result = array[(int)(basicTypeID - 1u)];
+ }
+ else
+ {
+ result = array[0];
+ }
+ return result;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/BattleDramaDlg.cs.meta b/Client/Assets/Scripts/XMainClient/UI/BattleDramaDlg.cs.meta
new file mode 100644
index 00000000..14ace7fc
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/BattleDramaDlg.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 96c004cc332064b4c8ab11e325d6fc71
+timeCreated: 1611404186
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/BattleDramaDlgBehaviour.cs b/Client/Assets/Scripts/XMainClient/UI/BattleDramaDlgBehaviour.cs
new file mode 100644
index 00000000..bf7617e1
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/BattleDramaDlgBehaviour.cs
@@ -0,0 +1,38 @@
+using System;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+
+namespace XMainClient.UI
+{
+ internal class BattleDramaDlgBehaviour : DlgBehaviourBase
+ {
+ public IUIDummy m_leftSnapshot;
+
+ public IUIDummy m_rightSnapshot;
+
+ public Vector3 m_leftDummyPos;
+
+ public Vector3 m_rightDummyPos;
+
+ public IXUILabel m_name;
+
+ public Transform m_TaskArea;
+
+ public IXUILabel m_RightText;
+
+ public IXUILabel m_LeftText;
+
+ private void Awake()
+ {
+ this.m_TaskArea = base.transform.Find("_canvas/TalkTextBg/TaskText");
+ this.m_name = (base.transform.Find("_canvas/TalkTextBg/Text").GetComponent("XUILabel") as IXUILabel);
+ this.m_RightText = (base.transform.Find("_canvas/TalkTextBg/TaskText/Text").GetComponent("XUILabel") as IXUILabel);
+ this.m_LeftText = (base.transform.Find("_canvas/TalkTextBg/TaskText/PlayerText").GetComponent("XUILabel") as IXUILabel);
+ this.m_leftSnapshot = (base.transform.Find("_canvas/LeftSnapshot").GetComponent("UIDummy") as IUIDummy);
+ this.m_rightSnapshot = (base.transform.Find("_canvas/RightSnapshot").GetComponent("UIDummy") as IUIDummy);
+ this.m_leftDummyPos = this.m_leftSnapshot.transform.localPosition;
+ this.m_rightDummyPos = this.m_rightSnapshot.transform.localPosition;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/BattleDramaDlgBehaviour.cs.meta b/Client/Assets/Scripts/XMainClient/UI/BattleDramaDlgBehaviour.cs.meta
new file mode 100644
index 00000000..9f49104e
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/BattleDramaDlgBehaviour.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: bc802bb294920cf4795ed19dcd1ebc12
+timeCreated: 1611404447
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/BattleEnemyType.cs b/Client/Assets/Scripts/XMainClient/UI/BattleEnemyType.cs
new file mode 100644
index 00000000..4f6dfdb2
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/BattleEnemyType.cs
@@ -0,0 +1,10 @@
+using System;
+
+namespace XMainClient.UI
+{
+ internal enum BattleEnemyType
+ {
+ BET_BOSS,
+ BET_ROLE
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/BattleEnemyType.cs.meta b/Client/Assets/Scripts/XMainClient/UI/BattleEnemyType.cs.meta
new file mode 100644
index 00000000..9c94e701
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/BattleEnemyType.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 14728630a550c6f4c85a1614c961dc3b
+timeCreated: 1611403259
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/BattleIndicateHandler.cs b/Client/Assets/Scripts/XMainClient/UI/BattleIndicateHandler.cs
new file mode 100644
index 00000000..f9d5f174
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/BattleIndicateHandler.cs
@@ -0,0 +1,1508 @@
+using System;
+using System.Collections.Generic;
+using KKSG;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class BattleIndicateHandler : DlgHandlerBase
+ {
+ public XUIPool m_TeamIndicatePool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ public Transform m_Direction;
+
+ private Vector3 m_DirectPos;
+
+ private Transform m_CachedDirectionTarget;
+
+ private List<BattleIndicator> m_IndicatesList = new List<BattleIndicator>();
+
+ private Dictionary<ulong, BattleIndicator> m_EntityIndicates = new Dictionary<ulong, BattleIndicator>();
+
+ private float _Half_H_Fov;
+
+ private float _tan_half_H_fov;
+
+ private float _Half_V_Fov;
+
+ private float _tan_half_V_fov;
+
+ private float _sqr_tan_half_V_fov;
+
+ private Transform m_MiniMapRotation;
+
+ private IXUITexture m_MiniMap;
+
+ private Transform m_MiniMapCamera;
+
+ private XUIPool m_MiniMapElementPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ private Dictionary<ulong, MiniMapElement> m_MiniMapElements = new Dictionary<ulong, MiniMapElement>();
+
+ private List<MiniMapElement> m_MiniMapDoor = new List<MiniMapElement>();
+
+ private List<MiniMapElement> m_MiniMapBuff = new List<MiniMapElement>();
+
+ private Dictionary<ulong, MiniMapElement> m_MiniMapDoodadDic = new Dictionary<ulong, MiniMapElement>();
+
+ private List<MiniMapElement> m_MiniMapFx = new List<MiniMapElement>();
+
+ private Dictionary<ulong, MiniMapElement> m_MiniMapFxDic = new Dictionary<ulong, MiniMapElement>();
+
+ private List<MiniMapElement> m_MiniMapPic = new List<MiniMapElement>();
+
+ private Dictionary<ulong, MiniMapElement> m_MiniMapPicDic = new Dictionary<ulong, MiniMapElement>();
+
+ private uint m_MiniMapFxToken = 0u;
+
+ private uint m_MiniMapPicToken = 0u;
+
+ private float MiniMapScale;
+
+ private bool _staticMap;
+
+ private Vector3 _referencePos;
+
+ private Vector2 _outSize = Vector2.one;
+
+ private int _heroBattleDepth_O;
+
+ private int _heroBattleDepth_A;
+
+ private static bool _hide_minimap_opponent;
+
+ private XEntity _campEntity;
+
+ private List<ulong> _unInitEntityList = new List<ulong>();
+
+ private Vector2 MiniMapSize;
+
+ private readonly float BASESIZE = 65f;
+
+ private Vector2 MapSizeInTable;
+
+ private int MaxDisplayNum = 0;
+
+ private List<int> m_ShouldShowEnemyIndex = new List<int>();
+
+ private HashSet<ulong> m_ValidSet = new HashSet<ulong>();
+
+ protected override void Init()
+ {
+ base.Init();
+ this._campEntity = XSingleton<XEntityMgr>.singleton.Player;
+ bool flag = DlgBase<BattleMain, BattleMainBehaviour>.singleton.IsLoaded();
+ if (flag)
+ {
+ this.InitTeamIndicate();
+ }
+ this.MiniMapSize = new Vector2(this.BASESIZE, this.BASESIZE);
+ this._staticMap = XSingleton<XSceneMgr>.singleton.GetSceneStaticMiniMapCenter(XSingleton<XScene>.singleton.SceneID, out this._referencePos);
+ this._outSize = Vector2.one;
+ this.SetMiniMapSize(XSingleton<XSceneMgr>.singleton.GetSceneMiniMapOutSize(XSingleton<XScene>.singleton.SceneID), 0f);
+ this.InitMiniMap();
+ this._heroBattleDepth_O = 200;
+ this._heroBattleDepth_A = 100;
+ this.MaxDisplayNum = XSingleton<XGlobalConfig>.singleton.GetInt("MaxEnmeyIndicatorDisplayNum");
+ }
+
+ public void SetMiniMapSize(Vector2 size, float scale = 0f)
+ {
+ bool flag = size != this._outSize;
+ if (flag)
+ {
+ this.SetMiniMapOutSize(Vector2.one);
+ this.SetMiniMapOutSize(size);
+ }
+ bool flag2 = scale > 0f;
+ if (flag2)
+ {
+ this.MiniMapScale = scale;
+ }
+ }
+
+ private void SetMiniMapOutSize(Vector2 size)
+ {
+ Vector2 outSize = this._outSize;
+ this._outSize = size;
+ this.MiniMapSize = new Vector2(this.BASESIZE * this._outSize.x, this.BASESIZE * this._outSize.y);
+ IXUISprite ixuisprite = base.PanelObject.transform.Find("Bg/MapBg").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.spriteWidth = (int)((float)ixuisprite.spriteWidth / outSize.x * this._outSize.x);
+ ixuisprite.spriteHeight = (int)((float)ixuisprite.spriteHeight / outSize.y * this._outSize.y);
+ IXUIPanel ixuipanel = base.PanelObject.transform.Find("MiniMap").GetComponent("XUIPanel") as IXUIPanel;
+ Vector4 clipRange = ixuipanel.ClipRange;
+ float num = clipRange.z;
+ clipRange.z = clipRange.z / outSize.x * this._outSize.x;
+ clipRange.x = -(clipRange.z - num) / 2f;
+ num = clipRange.w;
+ clipRange.w = clipRange.w / outSize.y * this._outSize.y;
+ clipRange.y = -(clipRange.w - num) / 2f;
+ ixuipanel.ClipRange = clipRange;
+ IXUISprite ixuisprite2 = base.PanelObject.transform.Find("MiniMap/Bg").GetComponent("XUISprite") as IXUISprite;
+ Vector3 localPosition = ixuisprite2.transform.localPosition;
+ num = (float)ixuisprite2.spriteWidth;
+ ixuisprite2.spriteWidth = (int)((float)ixuisprite2.spriteWidth / outSize.x * this._outSize.x);
+ localPosition.x = -((float)ixuisprite2.spriteWidth - num) / 2f;
+ num = (float)ixuisprite2.spriteHeight;
+ ixuisprite2.spriteHeight = (int)((float)ixuisprite2.spriteHeight / outSize.y * this._outSize.y);
+ localPosition.y = -((float)ixuisprite2.spriteHeight - num) / 2f;
+ ixuisprite2.transform.localPosition = localPosition;
+ IXUISprite ixuisprite3 = base.PanelObject.transform.Find("Bg/NameBg").GetComponent("XUISprite") as IXUISprite;
+ num = (float)ixuisprite3.spriteWidth;
+ ixuisprite3.spriteWidth = (int)((float)ixuisprite3.spriteWidth / outSize.x * this._outSize.x);
+ localPosition = ixuisprite3.transform.localPosition;
+ ixuisprite3.transform.localPosition = new Vector3(-((float)ixuisprite3.spriteWidth - num) / 2f, localPosition.y);
+ IXUILabel ixuilabel = base.PanelObject.transform.Find("Bg/Name").GetComponent("XUILabel") as IXUILabel;
+ num = (float)ixuilabel.spriteWidth;
+ ixuilabel.spriteWidth = (int)((float)ixuilabel.spriteWidth / outSize.x * this._outSize.x);
+ localPosition = ixuilabel.gameObject.transform.localPosition;
+ ixuilabel.gameObject.transform.localPosition = new Vector3(-((float)ixuilabel.spriteWidth - num) / 2f, localPosition.y);
+ }
+
+ public override void OnUnload()
+ {
+ foreach (MiniMapElement miniMapElement in this.m_MiniMapElements.Values)
+ {
+ this.DestroyFx(miniMapElement.notice);
+ }
+ foreach (MiniMapElement miniMapElement2 in this.m_MiniMapDoodadDic.Values)
+ {
+ this.DestroyFx(miniMapElement2.notice);
+ }
+ foreach (MiniMapElement miniMapElement3 in this.m_MiniMapFxDic.Values)
+ {
+ this.DestroyFx(miniMapElement3.notice);
+ }
+ foreach (MiniMapElement miniMapElement4 in this.m_MiniMapPicDic.Values)
+ {
+ this.DestroyFx(miniMapElement4.notice);
+ }
+ this.m_MiniMapDoor.Clear();
+ this.m_MiniMapElements.Clear();
+ this.m_MiniMapBuff.Clear();
+ this.m_MiniMapDoodadDic.Clear();
+ this.m_MiniMapFx.Clear();
+ this.m_MiniMapPic.Clear();
+ this.m_MiniMapFxDic.Clear();
+ this.m_MiniMapPicDic.Clear();
+ this.m_MiniMapElementPool.ReturnAll(false);
+ this.m_MiniMap.SetTexturePath("");
+ base.OnUnload();
+ }
+
+ private void InitTeamIndicate()
+ {
+ this._Half_V_Fov = 0.0174532924f * (XSingleton<XScene>.singleton.GameCamera.UnityCamera.fieldOfView * 0.5f);
+ float num = (float)XSingleton<XGameUI>.singleton.Base_UI_Width / (float)XSingleton<XGameUI>.singleton.Base_UI_Height;
+ this._Half_H_Fov = (float)Math.Atan(Math.Tan((double)this._Half_V_Fov) * (double)num) * 0.95f;
+ this._tan_half_H_fov = (float)Math.Tan((double)this._Half_H_Fov);
+ this._tan_half_V_fov = (float)Math.Tan((double)this._Half_V_Fov);
+ this._sqr_tan_half_V_fov = this._tan_half_V_fov * this._tan_half_V_fov;
+ Transform transform = base.PanelObject.transform.Find("EnemyIndicate");
+ this.m_TeamIndicatePool.SetupPool(transform.parent.gameObject, transform.gameObject, 10u, true);
+ this.m_Direction = base.PanelObject.transform.Find("Direction");
+ this.m_DirectPos = this.m_Direction.localPosition;
+ this.m_Direction.gameObject.transform.localPosition = XGameUI.Far_Far_Away;
+ this.m_EntityIndicates.Clear();
+ this.m_IndicatesList.Clear();
+ this.m_TeamIndicatePool.ReturnAll(false);
+ }
+
+ private void InitMiniMap()
+ {
+ this.m_MiniMapCamera = base.PanelObject.transform.Find("MiniMap/Bg/Rotation/Camera");
+ this.m_MiniMapCamera.gameObject.SetActive(!this._staticMap);
+ Transform transform = base.PanelObject.transform.Find("MiniMap/Bg/Rotation/Element");
+ this.m_MiniMapElementPool.SetupPool(transform.parent.gameObject, transform.gameObject, 20u, true);
+ this.m_MiniMapRotation = base.PanelObject.transform.Find("MiniMap/Bg/Rotation");
+ this.m_MiniMap = (base.PanelObject.transform.Find("MiniMap/Bg/Rotation/Map").GetComponent("XUITexture") as IXUITexture);
+ this.MiniMapScale = (float)XSingleton<XGlobalConfig>.singleton.GetInt("MiniMapScale") / 10f;
+ this.MiniMapInit();
+ }
+
+ private void MiniMapInit()
+ {
+ this.m_MiniMapDoor.Clear();
+ this.m_MiniMapElements.Clear();
+ this.m_MiniMapBuff.Clear();
+ this.m_MiniMapDoodadDic.Clear();
+ this.m_MiniMapFx.Clear();
+ this.m_MiniMapPic.Clear();
+ this.m_MiniMapFxDic.Clear();
+ this.m_MiniMapPicDic.Clear();
+ this.m_MiniMapElementPool.ReturnAll(false);
+ this.MiniMapAdd(XSingleton<XEntityMgr>.singleton.Player);
+ uint sceneID = XSingleton<XScene>.singleton.SceneID;
+ string sceneMiniMap = XSingleton<XSceneMgr>.singleton.GetSceneMiniMap(sceneID);
+ bool flag = !string.IsNullOrEmpty(sceneMiniMap);
+ if (flag)
+ {
+ this.m_MiniMap.SetTexturePath("atlas/UI/Battle/minimap/" + sceneMiniMap);
+ }
+ short[] sceneMiniMapSize = XSingleton<XSceneMgr>.singleton.GetSceneMiniMapSize(sceneID);
+ bool flag2 = sceneMiniMapSize != null;
+ if (flag2)
+ {
+ bool flag3 = sceneMiniMapSize.Length > 2;
+ if (flag3)
+ {
+ this.MiniMapScale = (float)sceneMiniMapSize[2] / 10f;
+ }
+ this.MapSizeInTable = new Vector2((float)sceneMiniMapSize[0], (float)sceneMiniMapSize[1]);
+ this.m_MiniMap.spriteWidth = (int)(this.MapSizeInTable.x * this.MiniMapScale);
+ this.m_MiniMap.spriteHeight = (int)(this.MapSizeInTable.y * this.MiniMapScale);
+ }
+ this.m_MiniMapRotation.transform.eulerAngles = new Vector3(0f, 0f, (float)XSingleton<XSceneMgr>.singleton.GetSceneMiniMapRotation(sceneID));
+ BattleIndicateHandler._hide_minimap_opponent = false;
+ }
+
+ public void SetMiniMapRotation(float rotation)
+ {
+ bool flag = XSingleton<XSceneMgr>.singleton.GetSceneMiniMapRotation(XSingleton<XScene>.singleton.SceneID) < 0;
+ if (flag)
+ {
+ bool flag2 = this.m_MiniMapRotation != null;
+ if (flag2)
+ {
+ this.m_MiniMapRotation.transform.eulerAngles = new Vector3(0f, 0f, rotation);
+ }
+ }
+ }
+
+ public override void OnUpdate()
+ {
+ base.OnUpdate();
+ bool flag = XSingleton<XEntityMgr>.singleton.Player == null;
+ if (!flag)
+ {
+ bool flag2 = !this._staticMap;
+ if (flag2)
+ {
+ this._referencePos = XSingleton<XEntityMgr>.singleton.Player.EngineObject.Position;
+ }
+ bool flag3 = DlgBase<BattleMain, BattleMainBehaviour>.singleton.IsLoaded();
+ if (flag3)
+ {
+ this.m_ValidSet.Clear();
+ this.UpdateTeamIndicate();
+ this.UpdateEnemyIndicate();
+ this.UpdateDirection();
+ bool flag4 = this.m_IndicatesList.Count != this.m_ValidSet.Count;
+ if (flag4)
+ {
+ for (int i = this.m_IndicatesList.Count - 1; i >= 0; i--)
+ {
+ bool flag5 = !this.m_ValidSet.Contains(this.m_IndicatesList[i].id);
+ if (flag5)
+ {
+ BattleIndicator battleIndicator = this.m_IndicatesList[i];
+ this.m_TeamIndicatePool.ReturnInstance(battleIndicator.sp.gameObject, false);
+ this.m_EntityIndicates.Remove(battleIndicator.id);
+ this.m_IndicatesList.RemoveAt(i);
+ }
+ }
+ }
+ }
+ this.UpdateMiniMap();
+ }
+ }
+
+ private void UpdateMiniMap()
+ {
+ bool flag = this._campEntity == null;
+ if (!flag)
+ {
+ this.m_MiniMap.spriteWidth = (int)(this.MapSizeInTable.x * this.MiniMapScale);
+ this.m_MiniMap.spriteHeight = (int)(this.MapSizeInTable.y * this.MiniMapScale);
+ MiniMapElement element;
+ bool flag2 = this.m_MiniMapElements.TryGetValue(this._campEntity.ID, out element);
+ if (flag2)
+ {
+ this.SetupMiniMapElement(this._campEntity, element, false);
+ this.m_MiniMap.gameObject.transform.localPosition = new Vector3(-this._referencePos.x, -this._referencePos.z) * this.MiniMapScale;
+ }
+ bool flag3 = !this._staticMap && this.m_MiniMapCamera != null && XSingleton<XScene>.singleton.GameCamera.UnityCamera != null;
+ if (flag3)
+ {
+ this.m_MiniMapCamera.localEulerAngles = new Vector3(0f, 0f, -XSingleton<XScene>.singleton.GameCamera.UnityCamera.transform.eulerAngles.y);
+ }
+ List<XEntity> opponent = XSingleton<XEntityMgr>.singleton.GetOpponent(this._campEntity);
+ for (int i = 0; i < opponent.Count; i++)
+ {
+ bool flag4 = this.m_MiniMapElements.TryGetValue(opponent[i].ID, out element);
+ if (flag4)
+ {
+ this.SetupMiniMapElement(opponent[i], element, BattleIndicateHandler._hide_minimap_opponent || !opponent[i].IsVisible);
+ }
+ }
+ List<XEntity> ally = XSingleton<XEntityMgr>.singleton.GetAlly(this._campEntity);
+ for (int j = 0; j < ally.Count; j++)
+ {
+ bool flag5 = this.m_MiniMapElements.TryGetValue(ally[j].ID, out element);
+ if (flag5)
+ {
+ this.SetupMiniMapElement(ally[j], element, false);
+ }
+ }
+ for (int k = 0; k < this.m_MiniMapDoor.Count; k++)
+ {
+ this.SetupMiniMapStatic(this.m_MiniMapDoor[k]);
+ }
+ for (int l = 0; l < this.m_MiniMapBuff.Count; l++)
+ {
+ this.SetupMiniMapStatic(this.m_MiniMapBuff[l]);
+ }
+ for (int m = 0; m < this.m_MiniMapFx.Count; m++)
+ {
+ this.SetupMiniMapFxStatic(this.m_MiniMapFx[m]);
+ }
+ for (int n = 0; n < this.m_MiniMapPic.Count; n++)
+ {
+ this.SetupMiniMapFxStatic(this.m_MiniMapPic[n]);
+ }
+ }
+ }
+
+ private void SetupMiniMapElement(XEntity entity, MiniMapElement element, bool hide = false)
+ {
+ bool deprecated = entity.Deprecated;
+ if (deprecated)
+ {
+ this.m_MiniMapElements.Remove(entity.ID);
+ this.DestroyFx(element.notice);
+ element.notice = null;
+ this.m_MiniMapElementPool.ReturnInstance(element.sp.gameObject, false);
+ }
+ else
+ {
+ Vector3 position = entity.EngineObject.Position;
+ float num = position.x - this._referencePos.x;
+ float num2 = position.z - this._referencePos.z;
+ element.transform.localPosition = new Vector3(num, num2) * this.MiniMapScale;
+ element.transform.parent = element.transform.parent.parent;
+ bool flag = element.transform.localPosition.x > this.MiniMapSize.x;
+ if (flag)
+ {
+ num = this.MiniMapSize.x;
+ }
+ else
+ {
+ bool flag2 = element.transform.localPosition.x < -this.MiniMapSize.x;
+ if (flag2)
+ {
+ num = -this.MiniMapSize.x;
+ }
+ else
+ {
+ num = element.transform.localPosition.x;
+ }
+ }
+ bool flag3 = element.transform.localPosition.y > this.MiniMapSize.y;
+ if (flag3)
+ {
+ num2 = this.MiniMapSize.y;
+ }
+ else
+ {
+ bool flag4 = element.transform.localPosition.y < -this.MiniMapSize.y;
+ if (flag4)
+ {
+ num2 = -this.MiniMapSize.y;
+ }
+ else
+ {
+ num2 = element.transform.localPosition.y;
+ }
+ }
+ element.transform.localPosition = new Vector3(num, num2);
+ element.transform.parent = this.m_MiniMapRotation;
+ element.sp.transform.localEulerAngles = -this.m_MiniMapRotation.transform.eulerAngles;
+ float alpha = 1f;
+ bool isPlayer = entity.IsPlayer;
+ if (!isPlayer)
+ {
+ bool isDead = entity.IsDead;
+ if (isDead)
+ {
+ alpha = 0f;
+ }
+ }
+ if (hide)
+ {
+ alpha = 0f;
+ }
+ element.sp.SetAlpha(alpha);
+ }
+ }
+
+ private void SetupMiniMapStatic(MiniMapElement element)
+ {
+ element.sp.transform.localPosition = new Vector3(element.transform.position.x - this._referencePos.x, element.transform.position.z - this._referencePos.z) * this.MiniMapScale;
+ element.sp.transform.localEulerAngles = -this.m_MiniMapRotation.transform.eulerAngles;
+ }
+
+ private void SetupMiniMapFxStatic(MiniMapElement element)
+ {
+ element.sp.transform.localPosition = new Vector3(element.pos.x - this._referencePos.x, element.pos.z - this._referencePos.z) * this.MiniMapScale;
+ }
+
+ private void SetupMiniMapPicStatic(MiniMapElement element)
+ {
+ element.sp.transform.localPosition = new Vector3(element.pos.x - this._referencePos.x, element.pos.z - this._referencePos.z) * this.MiniMapScale;
+ }
+
+ public void DelTeamIndicate(ulong uid)
+ {
+ BattleIndicator battleIndicator;
+ bool flag = this.m_EntityIndicates.TryGetValue(uid, out battleIndicator);
+ if (flag)
+ {
+ this.m_TeamIndicatePool.ReturnInstance(battleIndicator.sp.gameObject, false);
+ this.m_EntityIndicates.Remove(uid);
+ this.m_IndicatesList.Remove(battleIndicator);
+ }
+ }
+
+ protected void UpdateTeamIndicate()
+ {
+ bool flag = XSingleton<XScene>.singleton.SceneData == null || XSingleton<XScene>.singleton.SceneData.HideTeamIndicate;
+ if (!flag)
+ {
+ List<XEntity> ally = XSingleton<XEntityMgr>.singleton.GetAlly(this._campEntity);
+ for (int i = 0; i < ally.Count; i++)
+ {
+ bool flag2 = ally[i] == XSingleton<XEntityMgr>.singleton.Player;
+ if (!flag2)
+ {
+ bool flag3 = !ally[i].IsRole;
+ if (!flag3)
+ {
+ BattleIndicator bi;
+ bool flag4 = !this.m_EntityIndicates.TryGetValue(ally[i].ID, out bi);
+ if (flag4)
+ {
+ this.CreateEntityIndicate(out bi, ally[i], true);
+ }
+ bool flag5 = !XEntity.ValideEntity(ally[i]);
+ if (!flag5)
+ {
+ this.m_ValidSet.Add(ally[i].ID);
+ this.ShowIndicatePosition(bi, ally[i], true);
+ }
+ }
+ }
+ }
+ }
+ }
+
+ protected void UpdateEnemyIndicate()
+ {
+ List<XEntity> opponent = XSingleton<XEntityMgr>.singleton.GetOpponent(this._campEntity);
+ this.m_ShouldShowEnemyIndex.Clear();
+ for (int i = 0; i < opponent.Count; i++)
+ {
+ bool flag = !opponent[i].IsEnemy;
+ if (!flag)
+ {
+ bool isPuppet = opponent[i].IsPuppet;
+ if (!isPuppet)
+ {
+ bool flag2 = XSingleton<XGame>.singleton.SyncMode && !opponent[i].IsServerFighting;
+ if (!flag2)
+ {
+ bool flag3 = !XSingleton<XGame>.singleton.SyncMode && !opponent[i].IsFighting;
+ if (!flag3)
+ {
+ this.m_ShouldShowEnemyIndex.Add(i);
+ }
+ }
+ }
+ }
+ }
+ bool flag4 = this.m_ShouldShowEnemyIndex.Count > this.MaxDisplayNum;
+ if (flag4)
+ {
+ for (int j = 0; j < this.m_ShouldShowEnemyIndex.Count; j++)
+ {
+ BattleIndicator battleIndicator;
+ bool flag5 = this.m_EntityIndicates.TryGetValue(opponent[this.m_ShouldShowEnemyIndex[j]].ID, out battleIndicator);
+ if (flag5)
+ {
+ this.m_TeamIndicatePool.ReturnInstance(battleIndicator.sp.gameObject, false);
+ this.m_EntityIndicates.Remove(opponent[this.m_ShouldShowEnemyIndex[j]].ID);
+ }
+ }
+ }
+ else
+ {
+ for (int k = 0; k < this.m_ShouldShowEnemyIndex.Count; k++)
+ {
+ int index = this.m_ShouldShowEnemyIndex[k];
+ bool flag6 = XEntity.ValideEntity(opponent[index]);
+ bool flag7 = !flag6;
+ BattleIndicator battleIndicator;
+ bool flag8 = !this.m_EntityIndicates.TryGetValue(opponent[index].ID, out battleIndicator);
+ if (flag8)
+ {
+ bool flag9 = !flag7;
+ if (flag9)
+ {
+ this.CreateEntityIndicate(out battleIndicator, opponent[index], false);
+ }
+ else
+ {
+ flag7 = false;
+ }
+ }
+ bool flag10 = flag7;
+ if (!flag10)
+ {
+ bool flag11 = flag6;
+ if (flag11)
+ {
+ this.ShowIndicatePosition(battleIndicator, opponent[index], false);
+ this.m_ValidSet.Add(opponent[index].ID);
+ }
+ }
+ }
+ }
+ }
+
+ protected void CreateEntityIndicate(out BattleIndicator bi, XEntity e, bool IsTeamMember)
+ {
+ GameObject gameObject = this.m_TeamIndicatePool.FetchGameObject(false);
+ IXUISprite ixuisprite = gameObject.GetComponent("XUISprite") as IXUISprite;
+ bi = default(BattleIndicator);
+ bi.id = e.ID;
+ bi.go = gameObject;
+ bi.sp = ixuisprite;
+ bi.arrow = bi.go.transform.Find("arrow");
+ bi.leader = (bi.go.transform.Find("leader").GetComponent("XUISprite") as IXUISprite);
+ bi.xGameObject = e.EngineObject;
+ this.m_EntityIndicates.Add(e.ID, bi);
+ this.m_IndicatesList.Add(bi);
+ if (IsTeamMember)
+ {
+ string teamIndicateAvatar = XSingleton<XProfessionSkillMgr>.singleton.GetTeamIndicateAvatar(e.TypeID % 10u);
+ ixuisprite.SetSprite(teamIndicateAvatar);
+ }
+ else
+ {
+ ixuisprite.SetSprite("monster_00");
+ }
+ bool flag = XSingleton<XScene>.singleton.SceneType == SceneType.SCENE_PVP;
+ if (flag)
+ {
+ XBattleCaptainPVPDocument specificDocument = XDocuments.GetSpecificDocument<XBattleCaptainPVPDocument>(XBattleCaptainPVPDocument.uuID);
+ bool flag2 = e.ID == specificDocument.MyPosition(false);
+ bi.leader.SetAlpha((float)(flag2 ? 1 : 0));
+ }
+ else
+ {
+ bi.leader.SetAlpha(0f);
+ }
+ }
+
+ protected void ShowIndicatePosition(BattleIndicator bi, XEntity e, bool IsTeamMember)
+ {
+ bool flag = bi.xGameObject == null || XSingleton<XCutScene>.singleton.IsPlaying;
+ if (flag)
+ {
+ bi.sp.gameObject.transform.localPosition = Vector3.one * (float)XGameUI._far_far_away;
+ }
+ else
+ {
+ Vector3 position = e.EngineObject.Position;
+ Camera unityCamera = XSingleton<XScene>.singleton.GameCamera.UnityCamera;
+ Vector3 vector = XSingleton<XEntityMgr>.singleton.Player.EngineObject.Position - position;
+ bool isVisible = bi.xGameObject.IsVisible;
+ if (isVisible)
+ {
+ if (IsTeamMember)
+ {
+ float num = float.Parse(XSingleton<XGlobalConfig>.singleton.GetValue("TeamIndicateDistance"));
+ bool flag2 = vector.sqrMagnitude < num * num;
+ if (flag2)
+ {
+ bi.sp.gameObject.transform.localPosition = Vector3.one * (float)XGameUI._far_far_away;
+ }
+ else
+ {
+ float num2 = e.Height + 0.6f;
+ Vector3 vector2;
+ vector2 = new Vector3(position.x, position.y + num2, position.z);
+ Vector3 vector3 = unityCamera.WorldToViewportPoint(vector2);
+ bi.sp.SetAlpha(1f);
+ bi.sp.gameObject.transform.position = XSingleton<XGameUI>.singleton.UICamera.ViewportToWorldPoint(vector3);
+ vector3 = bi.sp.gameObject.transform.localPosition;
+ vector3.x = (float)Mathf.FloorToInt(vector3.x);
+ vector3.y = (float)Mathf.FloorToInt(vector3.y);
+ vector3.z = 0f;
+ bi.sp.gameObject.transform.localPosition = vector3;
+ }
+ }
+ else
+ {
+ bi.sp.SetAlpha(0f);
+ }
+ }
+ else
+ {
+ int num3 = XSingleton<XGameUI>.singleton.Base_UI_Width / 2;
+ int num4 = XSingleton<XGameUI>.singleton.Base_UI_Height / 2;
+ Vector3 normalized = unityCamera.transform.forward.normalized;
+ Vector3 normalized2 = unityCamera.transform.right.normalized;
+ Vector3 vector4 = position - unityCamera.transform.position;
+ Vector3 vector5 = position - normalized2 * Vector3.Dot(normalized2, vector4);
+ Vector3 vector6 = vector5 - unityCamera.transform.position;
+ Vector3 vector7 = normalized * Vector3.Dot(normalized, vector6);
+ Vector3 vector8 = vector6 - vector7;
+ float num5 = vector8.sqrMagnitude / vector7.sqrMagnitude;
+ bool flag3 = Vector3.Dot(vector8, unityCamera.transform.up) > 0f || num5 < this._sqr_tan_half_V_fov;
+ if (flag3)
+ {
+ vector.Set(vector.x, 0f, vector.z);
+ Vector3 vector9;
+ vector9 = new Vector3(unityCamera.transform.forward.x, 0f, unityCamera.transform.forward.z);
+ float num6 = 0.0174532924f * Vector3.Angle(vector, vector9);
+ bool flag4 = !XSingleton<XCommon>.singleton.Clockwise(vector, vector9);
+ if (flag4)
+ {
+ num6 = -num6;
+ }
+ float num7 = (float)Math.Tan((double)num6) / this._tan_half_H_fov * (float)XSingleton<XGameUI>.singleton.Base_UI_Width * 0.5f;
+ bool flag5 = num6 >= this._Half_H_Fov;
+ if (flag5)
+ {
+ float num8 = num7 - (float)num3;
+ float num9 = num8 * (float)num4 / num7;
+ num9 = Mathf.Clamp(num9, 0f, (float)XSingleton<XGameUI>.singleton.Base_UI_Height);
+ bi.go.transform.localPosition = new Vector3((float)(num3 - this.m_TeamIndicatePool.TplWidth / 2), (float)(-(float)num4) + num9, 0f);
+ bi.arrow.transform.localRotation = Quaternion.identity;
+ bi.arrow.transform.Rotate(0f, 0f, 90f);
+ bool flag6 = num9 < 260f;
+ if (flag6)
+ {
+ bi.sp.SetAlpha(0.5f);
+ }
+ else
+ {
+ bi.sp.SetAlpha(1f);
+ }
+ }
+ else
+ {
+ float num10 = -num7 - (float)num3;
+ float num11 = num10 * (float)num4 / -num7;
+ num11 = Mathf.Clamp(num11, (float)(this.m_TeamIndicatePool.TplHeight / 2), (float)(XSingleton<XGameUI>.singleton.Base_UI_Height - this.m_TeamIndicatePool.TplHeight / 2));
+ bi.go.transform.localPosition = new Vector3((float)(-(float)num3 + this.m_TeamIndicatePool.TplWidth / 2), (float)(-(float)num4) + num11, 0f);
+ bi.arrow.transform.localRotation = Quaternion.identity;
+ bi.arrow.transform.Rotate(0f, 0f, -90f);
+ bi.sp.SetAlpha(1f);
+ }
+ }
+ else
+ {
+ vector.Set(vector.x, 0f, vector.z);
+ Vector3 vector10;
+ vector10 = new Vector3(unityCamera.transform.forward.x, 0f, unityCamera.transform.forward.z);
+ float num12 = 0.0174532924f * Vector3.Angle(vector, vector10);
+ bool flag7 = !XSingleton<XCommon>.singleton.Clockwise(vector, vector10);
+ if (flag7)
+ {
+ num12 = -num12;
+ }
+ float num13 = (float)Math.Tan((double)num12) / this._tan_half_H_fov * (float)XSingleton<XGameUI>.singleton.Base_UI_Width * 0.5f;
+ bool flag8 = num12 <= this._Half_H_Fov && num12 >= -this._Half_H_Fov;
+ if (flag8)
+ {
+ num13 = Mathf.Clamp(num13, (float)(-(float)num3 + this.m_TeamIndicatePool.TplWidth / 2), (float)(num3 - this.m_TeamIndicatePool.TplWidth / 2));
+ bi.go.transform.localPosition = new Vector3(num13, (float)(-(float)num4 + this.m_TeamIndicatePool.TplHeight / 2), 0f);
+ bi.arrow.transform.localRotation = Quaternion.identity;
+ bool flag9 = num13 > 165f;
+ if (flag9)
+ {
+ bi.sp.SetAlpha(0.5f);
+ }
+ else
+ {
+ bi.sp.SetAlpha(1f);
+ }
+ }
+ else
+ {
+ bool flag10 = num12 > this._Half_H_Fov;
+ if (flag10)
+ {
+ float num14 = num13 - (float)num3;
+ float num15 = num14 * (float)num4 / num13;
+ num15 = Mathf.Clamp(num15, 0f, (float)XSingleton<XGameUI>.singleton.Base_UI_Height);
+ bi.go.transform.localPosition = new Vector3((float)(num3 - this.m_TeamIndicatePool.TplWidth / 2), (float)(-(float)num4) + num15, 0f);
+ bi.arrow.transform.localRotation = Quaternion.identity;
+ bi.arrow.transform.Rotate(0f, 0f, 90f);
+ bool flag11 = num15 < 260f;
+ if (flag11)
+ {
+ bi.sp.SetAlpha(0.5f);
+ }
+ else
+ {
+ bi.sp.SetAlpha(1f);
+ }
+ }
+ else
+ {
+ bool flag12 = num12 < this._Half_H_Fov;
+ if (flag12)
+ {
+ float num16 = -num13 - (float)num3;
+ float num17 = num16 * (float)num4 / -num13;
+ num17 = Mathf.Clamp(num17, (float)(this.m_TeamIndicatePool.TplHeight / 2), (float)(XSingleton<XGameUI>.singleton.Base_UI_Height - this.m_TeamIndicatePool.TplHeight / 2));
+ bi.go.transform.localPosition = new Vector3((float)(-(float)num3 + this.m_TeamIndicatePool.TplWidth / 2), (float)(-(float)num4) + num17, 0f);
+ bi.arrow.transform.localRotation = Quaternion.identity;
+ bi.arrow.transform.Rotate(0f, 0f, -90f);
+ bi.sp.SetAlpha(1f);
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+
+ private bool DealWithSpectatorWatchToNull(XEntity e)
+ {
+ bool flag = !XSingleton<XScene>.singleton.bSpectator;
+ bool result;
+ if (flag)
+ {
+ result = false;
+ }
+ else
+ {
+ bool flag2 = XSingleton<XEntityMgr>.singleton.Player.WatchTo == null;
+ if (flag2)
+ {
+ this._unInitEntityList.Add(e.ID);
+ result = true;
+ }
+ else
+ {
+ bool flag3 = e.ID == XSingleton<XEntityMgr>.singleton.Player.WatchTo.ID && this._unInitEntityList.Count != 0;
+ if (flag3)
+ {
+ this._campEntity = XSingleton<XEntityMgr>.singleton.Player.WatchTo;
+ for (int i = 0; i < this._unInitEntityList.Count; i++)
+ {
+ bool flag4 = this._unInitEntityList[i] == XSingleton<XEntityMgr>.singleton.Player.WatchTo.ID;
+ if (!flag4)
+ {
+ XEntity entityConsiderDeath = XSingleton<XEntityMgr>.singleton.GetEntityConsiderDeath(this._unInitEntityList[i]);
+ bool flag5 = entityConsiderDeath != null;
+ if (flag5)
+ {
+ this.MiniMapAdd(entityConsiderDeath);
+ }
+ }
+ }
+ this._unInitEntityList.Clear();
+ }
+ result = false;
+ }
+ }
+ return result;
+ }
+
+ public void MiniMapAdd(XEntity e)
+ {
+ bool flag = e == null || e.Attributes == null;
+ if (!flag)
+ {
+ XEntityStatistics.RowData byID = XSingleton<XEntityMgr>.singleton.EntityStatistics.GetByID(e.Attributes.TypeID);
+ bool flag2 = byID != null && byID.HideInMiniMap;
+ if (!flag2)
+ {
+ bool flag3 = this.DealWithSpectatorWatchToNull(e);
+ if (!flag3)
+ {
+ bool flag4 = XSingleton<XEntityMgr>.singleton.IsNeutral(e) || e.IsPuppet || e.IsSubstance;
+ if (!flag4)
+ {
+ bool flag5 = !this.m_MiniMapElements.ContainsKey(e.ID);
+ if (flag5)
+ {
+ GameObject gameObject = this.m_MiniMapElementPool.FetchGameObject(false);
+ GameObject gameObject2 = gameObject.transform.Find("Circle").gameObject;
+ bool flag6 = gameObject2 != null;
+ if (flag6)
+ {
+ gameObject2.SetActive(false);
+ }
+ IXUISprite ixuisprite = gameObject.GetComponent("XUISprite") as IXUISprite;
+ MiniMapElement miniMapElement = new MiniMapElement();
+ miniMapElement.notice = null;
+ miniMapElement.sp = ixuisprite;
+ ixuisprite.SetAlpha(1f);
+ bool isPlayer = e.IsPlayer;
+ if (isPlayer)
+ {
+ miniMapElement.sp.SetSprite("smap_1");
+ miniMapElement.sp.MakePixelPerfect();
+ miniMapElement.sp.spriteDepth = 35;
+ gameObject.name = "Player";
+ }
+ else
+ {
+ bool flag7 = this.SpecialIsOpponent(this._campEntity, e);
+ if (flag7)
+ {
+ bool isBoss = e.IsBoss;
+ if (isBoss)
+ {
+ miniMapElement.sp.SetSprite("smap_2");
+ miniMapElement.sp.MakePixelPerfect();
+ miniMapElement.sp.spriteDepth = 32;
+ gameObject.name = "Boss";
+ }
+ else
+ {
+ bool isElite = e.IsElite;
+ if (isElite)
+ {
+ miniMapElement.sp.SetSprite("smap_3");
+ miniMapElement.sp.MakePixelPerfect();
+ miniMapElement.sp.spriteDepth = 31;
+ gameObject.name = "Elite";
+ }
+ else
+ {
+ miniMapElement.sp.SetSprite("smap_6");
+ miniMapElement.sp.MakePixelPerfect();
+ miniMapElement.sp.spriteDepth = 30;
+ gameObject.name = "Enemy";
+ }
+ }
+ }
+ else
+ {
+ bool flag8 = this.SpecialIsAlly(this._campEntity, e);
+ if (flag8)
+ {
+ bool isNpc = e.IsNpc;
+ if (isNpc)
+ {
+ miniMapElement.sp.SetSprite("smap_5");
+ miniMapElement.sp.MakePixelPerfect();
+ miniMapElement.sp.spriteDepth = 33;
+ gameObject.name = "Npc";
+ }
+ else
+ {
+ miniMapElement.sp.SetSprite("smap_4");
+ miniMapElement.sp.MakePixelPerfect();
+ miniMapElement.sp.spriteDepth = 34;
+ gameObject.name = "Ally";
+ }
+ }
+ else
+ {
+ miniMapElement.sp.SetSprite("none");
+ miniMapElement.sp.SetAlpha(0f);
+ }
+ }
+ }
+ miniMapElement.transform = gameObject.transform;
+ this.m_MiniMapElements.Add(e.ID, miniMapElement);
+ this.SetupMiniMapElement(e, miniMapElement, false);
+ }
+ this.RefreshOnMoba(e);
+ this.RefreshOnHero(e);
+ }
+ }
+ }
+ }
+ }
+
+ public bool SetMiniMapElement(ulong id, string spriteName, int width = -1, int height = -1)
+ {
+ MiniMapElement miniMapElement;
+ bool flag = this.m_MiniMapElements.TryGetValue(id, out miniMapElement);
+ bool result;
+ if (flag)
+ {
+ miniMapElement.sp.SetSprite(spriteName);
+ bool flag2 = width == -1 && height == -1;
+ if (flag2)
+ {
+ miniMapElement.sp.MakePixelPerfect();
+ }
+ else
+ {
+ miniMapElement.sp.spriteWidth = width;
+ miniMapElement.sp.spriteHeight = height;
+ }
+ result = true;
+ }
+ else
+ {
+ result = false;
+ }
+ return result;
+ }
+
+ public void RefreshOnMoba(XEntity e)
+ {
+ bool flag = XSingleton<XScene>.singleton.SceneType != SceneType.SCENE_MOBA || e.Attributes == null || XSingleton<XAttributeMgr>.singleton.XPlayerData == null;
+ if (!flag)
+ {
+ bool isRole = e.IsRole;
+ if (isRole)
+ {
+ XMobaBattleDocument specificDocument = XDocuments.GetSpecificDocument<XMobaBattleDocument>(XMobaBattleDocument.uuID);
+ MobaMemberData mobaMemberData = null;
+ bool flag2 = specificDocument.MyData == null || !specificDocument.MobaData.TryGetValue(e.ID, out mobaMemberData);
+ if (!flag2)
+ {
+ bool flag3 = mobaMemberData.heroID == 0u;
+ if (!flag3)
+ {
+ this.SetHeroMiniMapElement(e.ID, mobaMemberData.heroID, specificDocument.MyData.teamID == mobaMemberData.teamID, true);
+ }
+ }
+ }
+ }
+ }
+
+ public void RefreshOnHero(XEntity e)
+ {
+ bool flag = XSingleton<XScene>.singleton.SceneType != SceneType.SCENE_HEROBATTLE || e.Attributes == null || XSingleton<XAttributeMgr>.singleton.XPlayerData == null;
+ if (!flag)
+ {
+ bool isRole = e.IsRole;
+ if (isRole)
+ {
+ XHeroBattleDocument specificDocument = XDocuments.GetSpecificDocument<XHeroBattleDocument>(XHeroBattleDocument.uuID);
+ uint num = 0u;
+ bool flag2 = !specificDocument.heroIDIndex.TryGetValue(e.ID, out num);
+ if (!flag2)
+ {
+ bool flag3 = num == 0u;
+ if (!flag3)
+ {
+ this.SetHeroMiniMapElement(e.ID, num, XSingleton<XEntityMgr>.singleton.IsAlly(e), true);
+ }
+ }
+ }
+ }
+ }
+
+ public void SetHeroMiniMapElement(ulong id, uint heroID, bool isMyTeam, bool force = false)
+ {
+ bool flag = heroID == 0u;
+ if (!flag)
+ {
+ MiniMapElement miniMapElement;
+ bool flag2 = this.m_MiniMapElements.TryGetValue(id, out miniMapElement);
+ if (flag2)
+ {
+ bool flag3 = !force && miniMapElement.heroID == heroID;
+ if (!flag3)
+ {
+ XSingleton<XDebug>.singleton.AddGreenLog("SetMiniMap hero ele, uid = ", id.ToString(), ", heroID = ", heroID.ToString(), null, null);
+ miniMapElement.heroID = heroID;
+ XHeroBattleDocument specificDocument = XDocuments.GetSpecificDocument<XHeroBattleDocument>(XHeroBattleDocument.uuID);
+ OverWatchTable.RowData byHeroID = specificDocument.OverWatchReader.GetByHeroID(heroID);
+ miniMapElement.sp.SetSprite(byHeroID.MiniMapIcon, "Battle/battledlg2", false);
+ miniMapElement.sp.MakePixelPerfect();
+ if (isMyTeam)
+ {
+ IXUISprite sp = miniMapElement.sp;
+ int num = this._heroBattleDepth_A;
+ this._heroBattleDepth_A = num + 1;
+ sp.spriteDepth = num;
+ }
+ else
+ {
+ IXUISprite sp2 = miniMapElement.sp;
+ int num = this._heroBattleDepth_O;
+ this._heroBattleDepth_O = num + 1;
+ sp2.spriteDepth = num;
+ }
+ bool flag4 = id == XSingleton<XAttributeMgr>.singleton.XPlayerData.RoleID;
+ if (flag4)
+ {
+ miniMapElement.sp.spriteDepth = 300;
+ }
+ Transform transform = miniMapElement.sp.gameObject.transform.Find("Circle");
+ bool flag5 = transform != null;
+ if (flag5)
+ {
+ IXUISprite ixuisprite = transform.GetComponent("XUISprite") as IXUISprite;
+ bool flag6 = ixuisprite != null;
+ if (flag6)
+ {
+ ixuisprite.SetVisible(true);
+ ixuisprite.SetSprite(isMyTeam ? "smhead_o" : "smhead_e");
+ if (isMyTeam)
+ {
+ IXUISprite ixuisprite2 = ixuisprite;
+ int num = this._heroBattleDepth_A;
+ this._heroBattleDepth_A = num + 1;
+ ixuisprite2.spriteDepth = num;
+ }
+ else
+ {
+ IXUISprite ixuisprite3 = ixuisprite;
+ int num = this._heroBattleDepth_O;
+ this._heroBattleDepth_O = num + 1;
+ ixuisprite3.spriteDepth = num;
+ }
+ bool flag7 = id == XSingleton<XAttributeMgr>.singleton.XPlayerData.RoleID;
+ if (flag7)
+ {
+ ixuisprite.spriteDepth = 301;
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+
+ public void ResetMiniMapAllElement()
+ {
+ List<XEntity> all = XSingleton<XEntityMgr>.singleton.GetAll();
+ for (int i = 0; i < all.Count; i++)
+ {
+ this.ResetMiniMapElement(all[i].ID);
+ }
+ }
+
+ public bool ResetMiniMapElement(ulong id)
+ {
+ MiniMapElement miniMapElement;
+ bool flag = this.m_MiniMapElements.TryGetValue(id, out miniMapElement);
+ bool result;
+ if (flag)
+ {
+ XEntity entityConsiderDeath = XSingleton<XEntityMgr>.singleton.GetEntityConsiderDeath(id);
+ bool flag2 = entityConsiderDeath == null;
+ if (flag2)
+ {
+ result = false;
+ }
+ else
+ {
+ miniMapElement.sp.SetAlpha(1f);
+ bool isPlayer = entityConsiderDeath.IsPlayer;
+ if (isPlayer)
+ {
+ miniMapElement.sp.SetSprite("smap_1");
+ miniMapElement.sp.MakePixelPerfect();
+ miniMapElement.sp.spriteDepth = 35;
+ }
+ else
+ {
+ bool flag3 = this.SpecialIsOpponent(this._campEntity, entityConsiderDeath);
+ if (flag3)
+ {
+ bool isBoss = entityConsiderDeath.IsBoss;
+ if (isBoss)
+ {
+ miniMapElement.sp.SetSprite("smap_2");
+ miniMapElement.sp.MakePixelPerfect();
+ miniMapElement.sp.spriteDepth = 32;
+ }
+ else
+ {
+ bool isElite = entityConsiderDeath.IsElite;
+ if (isElite)
+ {
+ miniMapElement.sp.SetSprite("smap_3");
+ miniMapElement.sp.MakePixelPerfect();
+ miniMapElement.sp.spriteDepth = 31;
+ }
+ else
+ {
+ miniMapElement.sp.SetSprite("smap_6");
+ miniMapElement.sp.MakePixelPerfect();
+ miniMapElement.sp.spriteDepth = 30;
+ }
+ }
+ }
+ else
+ {
+ bool flag4 = this.SpecialIsAlly(this._campEntity, entityConsiderDeath);
+ if (flag4)
+ {
+ bool isNpc = entityConsiderDeath.IsNpc;
+ if (isNpc)
+ {
+ miniMapElement.sp.SetSprite("smap_5");
+ miniMapElement.sp.MakePixelPerfect();
+ miniMapElement.sp.spriteDepth = 33;
+ }
+ else
+ {
+ miniMapElement.sp.SetSprite("smap_4");
+ miniMapElement.sp.MakePixelPerfect();
+ miniMapElement.sp.spriteDepth = 34;
+ }
+ }
+ else
+ {
+ XSingleton<XDebug>.singleton.AddGreenLog("null", null, null, null, null, null);
+ miniMapElement.sp.SetAlpha(0f);
+ }
+ }
+ }
+ this.RefreshOnMoba(entityConsiderDeath);
+ this.RefreshOnHero(entityConsiderDeath);
+ result = true;
+ }
+ }
+ else
+ {
+ result = false;
+ }
+ return result;
+ }
+
+ private bool SpecialIsOpponent(XEntity e1, XEntity e2)
+ {
+ bool flag = XSingleton<XScene>.singleton.bSpectator && XSingleton<XSceneMgr>.singleton.IsPVPScene() && e2.IsRole;
+ bool result;
+ if (flag)
+ {
+ XSpectateSceneDocument specificDocument = XDocuments.GetSpecificDocument<XSpectateSceneDocument>(XSpectateSceneDocument.uuID);
+ bool flag3;
+ bool flag2 = !specificDocument.TryGetEntityIsBlueTeam(e2, out flag3);
+ result = (!flag2 && !flag3);
+ }
+ else
+ {
+ result = XSingleton<XEntityMgr>.singleton.IsOpponent(e1, e2);
+ }
+ return result;
+ }
+
+ private bool SpecialIsAlly(XEntity e1, XEntity e2)
+ {
+ bool flag = XSingleton<XScene>.singleton.bSpectator && XSingleton<XSceneMgr>.singleton.IsPVPScene() && e2.IsRole;
+ bool result;
+ if (flag)
+ {
+ XSpectateSceneDocument specificDocument = XDocuments.GetSpecificDocument<XSpectateSceneDocument>(XSpectateSceneDocument.uuID);
+ bool flag3;
+ bool flag2 = !specificDocument.TryGetEntityIsBlueTeam(e2, out flag3);
+ result = (!flag2 && flag3);
+ }
+ else
+ {
+ result = XSingleton<XEntityMgr>.singleton.IsAlly(e1, e2);
+ }
+ return result;
+ }
+
+ public static void SetMiniMapOpponentStatus(bool hide)
+ {
+ BattleIndicateHandler._hide_minimap_opponent = hide;
+ }
+
+ public void MiniMapAddDoor(Transform go)
+ {
+ Transform transform = go.Find("Target");
+ bool flag = transform != null;
+ if (flag)
+ {
+ GameObject gameObject = this.m_MiniMapElementPool.FetchGameObject(false);
+ GameObject gameObject2 = gameObject.transform.Find("Circle").gameObject;
+ bool flag2 = gameObject2 != null;
+ if (flag2)
+ {
+ gameObject2.SetActive(false);
+ }
+ IXUISprite ixuisprite = gameObject.GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.SetAlpha(1f);
+ MiniMapElement miniMapElement = new MiniMapElement();
+ miniMapElement.notice = null;
+ miniMapElement.sp = ixuisprite;
+ miniMapElement.sp.SetSprite("smap_7");
+ miniMapElement.sp.MakePixelPerfect();
+ gameObject.name = "Door";
+ miniMapElement.transform = go;
+ this.m_MiniMapDoor.Add(miniMapElement);
+ this.SetupMiniMapStatic(miniMapElement);
+ }
+ }
+
+ public void OnMonsterDie(XEntity e)
+ {
+ }
+
+ public void MiniMapDel(ulong uid)
+ {
+ MiniMapElement miniMapElement;
+ bool flag = this.m_MiniMapElements.TryGetValue(uid, out miniMapElement);
+ if (flag)
+ {
+ this.m_MiniMapElements.Remove(uid);
+ this.DestroyFx(miniMapElement.notice);
+ miniMapElement.notice = null;
+ this.m_MiniMapElementPool.ReturnInstance(miniMapElement.sp.gameObject, false);
+ }
+ }
+
+ public void MiniMapDel(XEntity e)
+ {
+ bool flag = XSingleton<XEntityMgr>.singleton.IsAlly(e);
+ if (!flag)
+ {
+ MiniMapElement miniMapElement;
+ bool flag2 = this.m_MiniMapElements.TryGetValue(e.ID, out miniMapElement);
+ if (flag2)
+ {
+ this.m_MiniMapElements.Remove(e.ID);
+ this.DestroyFx(miniMapElement.notice);
+ miniMapElement.notice = null;
+ this.m_MiniMapElementPool.ReturnInstance(miniMapElement.sp.gameObject, false);
+ }
+ }
+ }
+
+ public void MiniMapNoticeAdd(XEntity e)
+ {
+ MiniMapElement element;
+ bool flag = this.m_MiniMapElements.TryGetValue(e.ID, out element);
+ if (flag)
+ {
+ this.CreateAndPlayFxFxFirework(element);
+ }
+ }
+
+ public void MiniMapBuffAdd(XLevelDoodad doo)
+ {
+ BuffTable.RowData buffData = XSingleton<XBuffTemplateManager>.singleton.GetBuffData((int)doo.id, 1);
+ bool flag = buffData == null;
+ if (!flag)
+ {
+ bool flag2 = string.IsNullOrEmpty(buffData.MiniMapIcon);
+ if (!flag2)
+ {
+ bool flag3 = !this.m_MiniMapDoodadDic.ContainsKey((ulong)doo.index);
+ if (flag3)
+ {
+ GameObject gameObject = this.m_MiniMapElementPool.FetchGameObject(false);
+ GameObject gameObject2 = gameObject.transform.Find("Circle").gameObject;
+ bool flag4 = gameObject2 != null;
+ if (flag4)
+ {
+ gameObject2.SetActive(false);
+ }
+ IXUISprite ixuisprite = gameObject.GetComponent("XUISprite") as IXUISprite;
+ MiniMapElement miniMapElement = new MiniMapElement();
+ miniMapElement.notice = null;
+ miniMapElement.sp = ixuisprite;
+ ixuisprite.SetAlpha(1f);
+ miniMapElement.sp.SetSprite(buffData.MiniMapIcon);
+ miniMapElement.sp.MakePixelPerfect();
+ miniMapElement.sp.spriteDepth = 36;
+ gameObject.name = "Buff";
+ miniMapElement.transform = doo.doodad.transform;
+ this.m_MiniMapBuff.Add(miniMapElement);
+ this.m_MiniMapDoodadDic.Add((ulong)doo.index, miniMapElement);
+ this.SetupMiniMapStatic(miniMapElement);
+ }
+ }
+ }
+ }
+
+ public void MiniMapBuffDel(XLevelDoodad doo)
+ {
+ MiniMapElement miniMapElement;
+ bool flag = this.m_MiniMapDoodadDic.TryGetValue((ulong)doo.index, out miniMapElement);
+ if (flag)
+ {
+ this.m_MiniMapBuff.Remove(miniMapElement);
+ this.m_MiniMapDoodadDic.Remove((ulong)doo.index);
+ this.DestroyFx(miniMapElement.notice);
+ miniMapElement.notice = null;
+ this.m_MiniMapElementPool.ReturnInstance(miniMapElement.sp.gameObject, false);
+ }
+ }
+
+ public uint MiniMapFxAdd(Vector3 pos, string fx)
+ {
+ GameObject gameObject = this.m_MiniMapElementPool.FetchGameObject(false);
+ GameObject gameObject2 = gameObject.transform.Find("Circle").gameObject;
+ bool flag = gameObject2 != null;
+ if (flag)
+ {
+ gameObject2.SetActive(false);
+ }
+ IXUISprite ixuisprite = gameObject.GetComponent("XUISprite") as IXUISprite;
+ MiniMapElement miniMapElement = new MiniMapElement();
+ miniMapElement.notice = XSingleton<XFxMgr>.singleton.CreateFx(fx, null, true);
+ bool flag2 = miniMapElement.notice != null;
+ if (flag2)
+ {
+ miniMapElement.notice.Play(ixuisprite.transform, Vector3.zero, Vector3.one, 1f, true, false);
+ XSingleton<XGameUI>.singleton.m_uiTool.MarkParentAsChanged(ixuisprite.gameObject);
+ }
+ miniMapElement.sp = ixuisprite;
+ ixuisprite.SetAlpha(1f);
+ miniMapElement.pos = pos;
+ miniMapElement.sp.SetSprite("");
+ gameObject.name = "Fx";
+ miniMapElement.transform = null;
+ this.m_MiniMapFxToken += 1u;
+ this.m_MiniMapFx.Add(miniMapElement);
+ this.m_MiniMapFxDic.Add((ulong)this.m_MiniMapFxToken, miniMapElement);
+ this.SetupMiniMapFxStatic(miniMapElement);
+ return this.m_MiniMapFxToken;
+ }
+
+ public void MiniMapFxDel(uint token)
+ {
+ MiniMapElement miniMapElement;
+ bool flag = this.m_MiniMapFxDic.TryGetValue((ulong)token, out miniMapElement);
+ if (flag)
+ {
+ this.m_MiniMapFx.Remove(miniMapElement);
+ this.m_MiniMapFxDic.Remove((ulong)token);
+ this.DestroyFx(miniMapElement.notice);
+ miniMapElement.notice = null;
+ this.m_MiniMapElementPool.ReturnInstance(miniMapElement.sp.gameObject, false);
+ }
+ }
+
+ public uint MiniMapPicAdd(Vector3 pos, string pic)
+ {
+ GameObject gameObject = this.m_MiniMapElementPool.FetchGameObject(false);
+ GameObject gameObject2 = gameObject.transform.Find("Circle").gameObject;
+ bool flag = gameObject2 != null;
+ if (flag)
+ {
+ gameObject2.SetActive(false);
+ }
+ IXUISprite ixuisprite = gameObject.GetComponent("XUISprite") as IXUISprite;
+ MiniMapElement miniMapElement = new MiniMapElement();
+ miniMapElement.notice = null;
+ miniMapElement.sp = ixuisprite;
+ ixuisprite.SetAlpha(1f);
+ miniMapElement.pos = pos;
+ miniMapElement.sp.SetSprite(pic);
+ miniMapElement.sp.MakePixelPerfect();
+ miniMapElement.sp.transform.localEulerAngles = -this.m_MiniMapRotation.transform.eulerAngles;
+ miniMapElement.sp.spriteDepth = 36;
+ gameObject.name = "Pic";
+ miniMapElement.transform = null;
+ this.m_MiniMapPicToken += 1u;
+ this.m_MiniMapPic.Add(miniMapElement);
+ this.m_MiniMapPicDic.Add((ulong)this.m_MiniMapPicToken, miniMapElement);
+ this.SetupMiniMapPicStatic(miniMapElement);
+ return this.m_MiniMapPicToken;
+ }
+
+ public void MiniMapPicDel(uint token)
+ {
+ MiniMapElement miniMapElement;
+ bool flag = this.m_MiniMapPicDic.TryGetValue((ulong)token, out miniMapElement);
+ if (flag)
+ {
+ this.m_MiniMapPic.Remove(miniMapElement);
+ this.m_MiniMapPicDic.Remove((ulong)token);
+ this.m_MiniMapElementPool.ReturnInstance(miniMapElement.sp.gameObject, false);
+ }
+ }
+
+ public void CreateAndPlayFxFxFirework(MiniMapElement element)
+ {
+ this.DestroyFx(element.notice);
+ element.notice = null;
+ element.notice = XSingleton<XFxMgr>.singleton.CreateFx("Effects/FX_Particle/UIfx/UI_xdtts", null, true);
+ element.notice.Play(element.sp.transform, Vector3.zero, Vector3.one, 1f, true, false);
+ XSingleton<XGameUI>.singleton.m_uiTool.MarkParentAsChanged(element.sp.gameObject);
+ }
+
+ private void DestroyFx(XFx fx)
+ {
+ bool flag = fx == null;
+ if (!flag)
+ {
+ XSingleton<XFxMgr>.singleton.DestroyFx(fx, true);
+ }
+ }
+
+ public void MiniMapNoticeDel(XEntity e)
+ {
+ MiniMapElement miniMapElement;
+ bool flag = this.m_MiniMapElements.TryGetValue(e.ID, out miniMapElement);
+ if (flag)
+ {
+ this.DestroyFx(miniMapElement.notice);
+ miniMapElement.notice = null;
+ }
+ }
+
+ public void ShowDirection(Transform target)
+ {
+ this.m_CachedDirectionTarget = target;
+ bool flag = !XSingleton<XScene>.singleton.bSpectator;
+ if (flag)
+ {
+ this.m_Direction.localPosition = this.m_DirectPos;
+ }
+ }
+
+ public void UpdateDirection()
+ {
+ bool flag = this.m_CachedDirectionTarget != null;
+ if (flag)
+ {
+ XPlayer player = XSingleton<XEntityMgr>.singleton.Player;
+ Camera unityCamera = XSingleton<XScene>.singleton.GameCamera.UnityCamera;
+ Vector3 position = player.EngineObject.Position;
+ Vector3 vector;
+ vector = new Vector3(this.m_CachedDirectionTarget.transform.position.x, 0f, this.m_CachedDirectionTarget.transform.position.z);
+ Vector3 vector2;
+ vector2 = new Vector3(position.x, 0f, position.z);
+ Vector3 vector3 = vector - vector2;
+ Vector3 vector4;
+ vector4 = new Vector3(unityCamera.transform.forward.x, 0f, unityCamera.transform.forward.z);
+ float sqrMagnitude = vector3.sqrMagnitude;
+ float num = Vector3.Angle(vector4, vector3);
+ bool flag2 = XSingleton<XCommon>.singleton.Clockwise(vector4, vector3);
+ if (flag2)
+ {
+ this.m_Direction.transform.localRotation = Quaternion.AngleAxis(-num, Vector3.forward);
+ }
+ else
+ {
+ this.m_Direction.transform.localRotation = Quaternion.AngleAxis(num, Vector3.forward);
+ }
+ bool flag3 = sqrMagnitude < 50f;
+ if (flag3)
+ {
+ this.m_Direction.localPosition = XGameUI.Far_Far_Away;
+ this.m_CachedDirectionTarget = null;
+ }
+ }
+ }
+
+ public void ClearTeamIndicate()
+ {
+ this.m_EntityIndicates.Clear();
+ this.m_TeamIndicatePool.ReturnAll(false);
+ this.m_IndicatesList.Clear();
+ }
+
+ public void ChangeWatchToEntity(XEntity e)
+ {
+ this._campEntity = e;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/BattleIndicateHandler.cs.meta b/Client/Assets/Scripts/XMainClient/UI/BattleIndicateHandler.cs.meta
new file mode 100644
index 00000000..fb9602fd
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/BattleIndicateHandler.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 993a18a8d4cbf5943aef9e4d9f7b7fbd
+timeCreated: 1611404194
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/BattleIndicator.cs b/Client/Assets/Scripts/XMainClient/UI/BattleIndicator.cs
new file mode 100644
index 00000000..fa8dfe01
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/BattleIndicator.cs
@@ -0,0 +1,22 @@
+using System;
+using UILib;
+using UnityEngine;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal struct BattleIndicator
+ {
+ public ulong id;
+
+ public GameObject go;
+
+ public IXUISprite sp;
+
+ public Transform arrow;
+
+ public IXUISprite leader;
+
+ public XGameObject xGameObject;
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/BattleIndicator.cs.meta b/Client/Assets/Scripts/XMainClient/UI/BattleIndicator.cs.meta
new file mode 100644
index 00000000..b7502114
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/BattleIndicator.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 87fc47d5333edbc47b2c4365d0d0975e
+timeCreated: 1611404082
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/BattleMain.cs b/Client/Assets/Scripts/XMainClient/UI/BattleMain.cs
new file mode 100644
index 00000000..41ccd0fc
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/BattleMain.cs
@@ -0,0 +1,2004 @@
+using System;
+using System.Collections.Generic;
+using KKSG;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUpdater;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class BattleMain : DlgBase<BattleMain, BattleMainBehaviour>
+ {
+ public BattleSkillHandler SkillHandler
+ {
+ get
+ {
+ return (base.uiBehaviour == null) ? null : base.uiBehaviour.m_SkillHandler;
+ }
+ }
+
+ public BattleIndicateHandler IndicateHandler
+ {
+ get
+ {
+ return (base.uiBehaviour == null) ? null : base.uiBehaviour.m_IndicateHandler;
+ }
+ }
+
+ public XTeamMonitorHandler TeamMonitor
+ {
+ get
+ {
+ return (base.uiBehaviour == null) ? null : base.uiBehaviour.m_TeamMonitor;
+ }
+ }
+
+ public XBattleEnemyInfoHandler EnemyInfoHandler
+ {
+ get
+ {
+ return (base.uiBehaviour == null) ? null : base.uiBehaviour.m_EnemyInfoHandler;
+ }
+ }
+
+ public BattleTargetHandler BattleTargetHandler
+ {
+ get
+ {
+ return (base.uiBehaviour == null) ? null : base.uiBehaviour.m_BattleTargetHandler;
+ }
+ }
+
+ public XBattleTeamTowerHandler TeamTowerHandler
+ {
+ get
+ {
+ return (base.uiBehaviour == null) ? null : base.uiBehaviour.m_TeamTowerHandler;
+ }
+ }
+
+ public IXUILabel WarTimeLabel
+ {
+ get
+ {
+ return (base.uiBehaviour == null) ? null : base.uiBehaviour.m_WarTime;
+ }
+ }
+
+ public IXUILabel LeftTimeLabel
+ {
+ get
+ {
+ return (base.uiBehaviour == null) ? null : base.uiBehaviour.m_LeftTime;
+ }
+ }
+
+ public BattleDpsHandler DpsHandler
+ {
+ get
+ {
+ return this.m_DpsHandler;
+ }
+ }
+
+ private float _strength_preseved_precent
+ {
+ get
+ {
+ bool flag = this._current_strength_preseved > this._total_strength_preseved;
+ if (flag)
+ {
+ this._total_strength_preseved = this._current_strength_preseved;
+ }
+ return this._current_strength_preseved / this._total_strength_preseved;
+ }
+ }
+
+ public override string fileName
+ {
+ get
+ {
+ return "Battle/BattleDlg";
+ }
+ }
+
+ public override int layer
+ {
+ get
+ {
+ return 1;
+ }
+ }
+
+ public override bool isMainUI
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public static uint _pool_size = 5u;
+
+ private float NoticeTime = 0f;
+
+ private static Color32 _hp_green = new Color32(110, 174, 0, byte.MaxValue);
+
+ private static Color32 _hp_yellow = new Color32(196, 180, 32, byte.MaxValue);
+
+ private static Color32 _hp_red = new Color32(196, 57, 18, byte.MaxValue);
+
+ private static float _fYellow = 0f;
+
+ private static float _fRed = 0f;
+
+ private bool _can_auto_play = false;
+
+ private Vector2 m_DragDistance = Vector2.zero;
+
+ private bool m_CancelRecord = false;
+
+ private bool m_IsRecording = false;
+
+ private uint m_ChatLabelCd = 0u;
+
+ public ProfressionTrialsHandler ProfTrialsHandler;
+
+ public BattleShowInfoHandler m_BattleShowInfoHandler = null;
+
+ private BattleCaptainPVPHandler m_BattleCaptainPVPHandler = null;
+
+ private GuildMinePVPBattleHandler m_GuildMinePVPBattleHandler = null;
+
+ private GuildMinePVPInfoHandler m_GuildMinePVPInfoHandler = null;
+
+ private SkyArenaBattleHandler m_SkyArenaBattleHandler = null;
+
+ private SkyArenaInfoHandler m_SkyArenaInfoHandler = null;
+
+ private AbyssPartyBattleHandler m_AbyssPartyBattleHandler = null;
+
+ public BigMeleeBattleHandler m_BigMeleeBattleHandler = null;
+
+ public BattleFieldBattleHandler m_BattleFieldBattleHandler = null;
+
+ private XOptionsBattleHandler m_XOptionBattleHandler = null;
+
+ private RaceBattleHandler m_RaceBattleHandler = null;
+
+ public GuildMiniReportHandler m_miniReportHandler = null;
+
+ public BattleRiftHandler m_riftHandler = null;
+
+ public GuildBattleMiniRankHandler m_miniRankHandler = null;
+
+ public HeroBattleSkillHandler m_HeroBattleSkillHandler = null;
+
+ public HeroBattleHandler m_HeroBattleHandler = null;
+
+ public MobaBattleHandler m_MobaBattleHandler = null;
+
+ public WeekendPartyHandler m_WeekendPartyHandler = null;
+
+ public BattleStatisticsHandler m_BattleStatisticsHandler = null;
+
+ private BattleDpsHandler m_DpsHandler = null;
+
+ private SceneType sceneType;
+
+ private XLeftTimeCounter leftTimeCounter;
+
+ public XLeftTimeCounter timeConnter;
+
+ private List<string> _notice_collection = new List<string>();
+
+ private float _notice_duration = 0f;
+
+ private float _notice_pertime = 1f;
+
+ private List<ComboBuff> _combo_buff_list = new List<ComboBuff>();
+
+ private int _combo_buff_to_add = -1;
+
+ private int _combo_buff_added = -1;
+
+ private XBattleDocument _doc;
+
+ private XApolloDocument apolloDoc;
+
+ private uint time_token = 0u;
+
+ public bool SpectateInfoIsShow;
+
+ private XEntity _strength_preseved_entity = null;
+
+ private float _total_strength_preseved = 1f;
+
+ private float _current_strength_preseved = 0f;
+
+ private float _last_check_time = 0f;
+
+ private XTimerMgr.ElapsedEventHandler _showSingleNoticeCb = null;
+
+ private XTimerMgr.ElapsedEventHandler _endBigNoticeCb = null;
+
+ private XTimerMgr.ElapsedEventHandler _endBigNoticeCmdCb = null;
+
+ private XTimerMgr.ElapsedEventHandler _onSwitchToTeamChatCb = null;
+
+ private XTimerMgr.ElapsedEventHandler _hideBattleChatUICb = null;
+
+ private XSwitchSight m_SwitchSight;
+
+ private int _maxHP = 0;
+
+ private int _currentHP = 0;
+
+ private int _maxMP = 0;
+
+ private int _currentMP = 0;
+
+ public XYuyinView _yuyinHandler;
+
+ private int type;
+
+ private float lastPingTime = -60f;
+
+ private float lastDebugUITrigger = -1f;
+
+ private GameObject _big_notice = null;
+
+ private uint _big_notice_timer_token = 0u;
+
+ public BattleMain()
+ {
+ this._showSingleNoticeCb = new XTimerMgr.ElapsedEventHandler(this.ShowSingleNotice);
+ this._endBigNoticeCb = new XTimerMgr.ElapsedEventHandler(this.EndBigNotice);
+ this._endBigNoticeCmdCb = new XTimerMgr.ElapsedEventHandler(this.EndBigNoticeCmd);
+ this._onSwitchToTeamChatCb = new XTimerMgr.ElapsedEventHandler(this.OnSwitchToTeamChat);
+ this._hideBattleChatUICb = new XTimerMgr.ElapsedEventHandler(this.HideBattleChatUI);
+ BattleMain._fYellow = float.Parse(XSingleton<XGlobalConfig>.singleton.GetValue("HP_Yellow"));
+ BattleMain._fRed = float.Parse(XSingleton<XGlobalConfig>.singleton.GetValue("HP_Red"));
+ }
+
+ protected override void Init()
+ {
+ this._doc = XDocuments.GetSpecificDocument<XBattleDocument>(XBattleDocument.uuID);
+ this.apolloDoc = XDocuments.GetSpecificDocument<XApolloDocument>(XApolloDocument.uuID);
+ this._doc.BattleMainView = this;
+ bool flag = XSingleton<XEntityMgr>.singleton.Player != null && XSingleton<XEntityMgr>.singleton.Player.Attributes != null;
+ if (flag)
+ {
+ this._doc.FakeTeamAdd(XSingleton<XEntityMgr>.singleton.Player);
+ }
+ this.leftTimeCounter = new XLeftTimeCounter(base.uiBehaviour.m_LeftTime, true);
+ this.timeConnter = new XLeftTimeCounter(base.uiBehaviour.m_WarTime, false);
+ bool flag2 = XSingleton<XScene>.singleton.SceneType == SceneType.SCENE_MOBA || XSingleton<XScene>.singleton.SceneType == SceneType.SCENE_HORSE_RACE || XSingleton<XScene>.singleton.SceneType == SceneType.SCENE_WEEKEND4V4_HORSERACING;
+ if (flag2)
+ {
+ (base.uiBehaviour.m_PingFrame.GetComponent("PositionGroup") as IXPositionGroup).SetGroup(1);
+ base.uiBehaviour.m_RoleInfo.gameObject.SetActive(false);
+ }
+ string value = XSingleton<XGlobalConfig>.singleton.GetValue("ComboBuff");
+ string[] array = value.Split(XGlobalConfig.AllSeparators);
+ for (int i = 0; i < array.Length; i += 3)
+ {
+ ComboBuff comboBuff = new ComboBuff();
+ comboBuff.combo = int.Parse(array[i]);
+ comboBuff.buffID = int.Parse(array[i + 1]);
+ comboBuff.buffLevel = int.Parse(array[i + 2]);
+ BuffTable.RowData buffData = XSingleton<XBuffTemplateManager>.singleton.GetBuffData(comboBuff.buffID, comboBuff.buffLevel);
+ bool flag3 = buffData != null;
+ if (flag3)
+ {
+ comboBuff.buffName = buffData.BuffName;
+ }
+ else
+ {
+ XSingleton<XDebug>.singleton.AddErrorLog(string.Format("ComboBuff: Buff data not found: [{0} {1}]", comboBuff.buffID, comboBuff.buffLevel), null, null, null, null, null);
+ }
+ this._combo_buff_list.Add(comboBuff);
+ }
+ this.SetupHandler();
+ }
+
+ private void SetupHandler()
+ {
+ SceneType sceneType = XSingleton<XScene>.singleton.SceneType;
+ if (sceneType <= SceneType.SCENE_WEEKEND4V4_DUCK)
+ {
+ if (sceneType != SceneType.SCENE_PVP)
+ {
+ switch (sceneType)
+ {
+ case SceneType.SKYCITY_FIGHTING:
+ DlgHandlerBase.EnsureCreate<SkyArenaBattleHandler>(ref this.m_SkyArenaBattleHandler, base.uiBehaviour.m_canvas, true, this);
+ DlgHandlerBase.EnsureCreate<SkyArenaInfoHandler>(ref this.m_SkyArenaInfoHandler, base.uiBehaviour.m_canvas, true, null);
+ break;
+ case SceneType.SCENE_PROF_TRIALS:
+ DlgHandlerBase.EnsureCreate<ProfressionTrialsHandler>(ref this.ProfTrialsHandler, base.uiBehaviour.m_canvas, true, this);
+ break;
+ case SceneType.SCENE_GPR:
+ break;
+ case SceneType.SCENE_RESWAR_PVP:
+ DlgHandlerBase.EnsureCreate<GuildMinePVPBattleHandler>(ref this.m_GuildMinePVPBattleHandler, base.uiBehaviour.m_canvas, true, null);
+ DlgHandlerBase.EnsureCreate<GuildMinePVPInfoHandler>(ref this.m_GuildMinePVPInfoHandler, base.uiBehaviour.m_canvas, true, null);
+ break;
+ default:
+ switch (sceneType)
+ {
+ case SceneType.SCENE_HORSE_RACE:
+ case SceneType.SCENE_WEEKEND4V4_HORSERACING:
+ DlgHandlerBase.EnsureCreate<RaceBattleHandler>(ref this.m_RaceBattleHandler, base.uiBehaviour.m_canvas, true, this);
+ DlgHandlerBase.EnsureCreate<BattleShowInfoHandler>(ref this.m_BattleShowInfoHandler, base.uiBehaviour.m_canvas, true, this);
+ break;
+ case SceneType.SCENE_HEROBATTLE:
+ DlgHandlerBase.EnsureCreate<HeroBattleSkillHandler>(ref this.m_HeroBattleSkillHandler, base.uiBehaviour.m_canvas, true, this);
+ DlgHandlerBase.EnsureCreate<HeroBattleHandler>(ref this.m_HeroBattleHandler, base.uiBehaviour.m_canvas, true, this);
+ this.m_HeroBattleSkillHandler.HandlerType = 0;
+ break;
+ case SceneType.SCENE_CASTLE_WAIT:
+ case SceneType.SCENE_CASTLE_FIGHT:
+ DlgHandlerBase.EnsureCreate<GuildBattleMiniRankHandler>(ref this.m_miniRankHandler, base.uiBehaviour.m_canvas, true, this);
+ DlgHandlerBase.EnsureCreate<GuildMiniReportHandler>(ref this.m_miniReportHandler, base.uiBehaviour.m_canvas, true, this);
+ break;
+ case SceneType.SCENE_ABYSS_PARTY:
+ DlgHandlerBase.EnsureCreate<AbyssPartyBattleHandler>(ref this.m_AbyssPartyBattleHandler, base.uiBehaviour.m_canvas, true, null);
+ break;
+ case SceneType.SCENE_MOBA:
+ DlgHandlerBase.EnsureCreate<HeroBattleSkillHandler>(ref this.m_HeroBattleSkillHandler, base.uiBehaviour.m_canvas, true, this);
+ DlgHandlerBase.EnsureCreate<MobaBattleHandler>(ref this.m_MobaBattleHandler, base.uiBehaviour.m_canvas, true, this);
+ this.m_HeroBattleSkillHandler.HandlerType = 2;
+ break;
+ case SceneType.SCENE_WEEKEND4V4_MONSTERFIGHT:
+ case SceneType.SCENE_WEEKEND4V4_GHOSTACTION:
+ case SceneType.SCENE_WEEKEND4V4_LIVECHALLENGE:
+ case SceneType.SCENE_WEEKEND4V4_CRAZYBOMB:
+ case SceneType.SCENE_WEEKEND4V4_DUCK:
+ DlgHandlerBase.EnsureCreate<WeekendPartyHandler>(ref this.m_WeekendPartyHandler, base.uiBehaviour.m_canvas, true, this);
+ break;
+ }
+ break;
+ }
+ }
+ else
+ {
+ DlgHandlerBase.EnsureCreate<BattleCaptainPVPHandler>(ref this.m_BattleCaptainPVPHandler, base.uiBehaviour.m_canvas, true, this);
+ }
+ }
+ else if (sceneType != SceneType.SCENE_BIGMELEE_FIGHT)
+ {
+ if (sceneType != SceneType.SCENE_BATTLEFIELD_FIGHT)
+ {
+ if (sceneType == SceneType.SCENE_RIFT)
+ {
+ DlgHandlerBase.EnsureCreate<BattleRiftHandler>(ref this.m_riftHandler, base.uiBehaviour.m_canvas, true, this);
+ }
+ }
+ else
+ {
+ DlgHandlerBase.EnsureCreate<BattleFieldBattleHandler>(ref this.m_BattleFieldBattleHandler, base.uiBehaviour.m_canvas, true, this);
+ }
+ }
+ else
+ {
+ DlgHandlerBase.EnsureCreate<BigMeleeBattleHandler>(ref this.m_BigMeleeBattleHandler, base.uiBehaviour.m_canvas, true, this);
+ }
+ bool loadSkillHandler = XHeroBattleDocument.LoadSkillHandler;
+ if (loadSkillHandler)
+ {
+ DlgHandlerBase.EnsureCreate<HeroBattleSkillHandler>(ref this.m_HeroBattleSkillHandler, base.uiBehaviour.m_canvas, true, this);
+ this.m_HeroBattleSkillHandler.HandlerType = 1;
+ }
+ }
+
+ public override void RegisterEvent()
+ {
+ base.uiBehaviour.m_avatar.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnAvatarClick));
+ base.uiBehaviour.m_pause.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnPauseClick));
+ base.uiBehaviour.m_AutoPlay.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnAutoPlay));
+ base.uiBehaviour.m_CancelAuto.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnAutoPlay));
+ base.uiBehaviour.m_AutoPlayTip.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnAutoPlayTip));
+ base.uiBehaviour.m_HorseRide.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnHorseRideClicked));
+ this.m_SwitchSight = new XSwitchSight(new ButtonClickEventHandler(this.OnSightSelectClick), base.uiBehaviour.m_25D, base.uiBehaviour.m_3D, base.uiBehaviour.m_3DFree);
+ base.uiBehaviour.m_BtnDamageStatistics.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnBattleStatisticsClick));
+ base.uiBehaviour.m_Sight.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnSightClick));
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ XPlayerAttributes xplayerAttributes = XSingleton<XEntityMgr>.singleton.Player.Attributes as XPlayerAttributes;
+ base.uiBehaviour.m_SightSelect.gameObject.SetActive(false);
+ DlgBase<BroadMiniDlg, BroadcastMiniBehaviour>.singleton.Show(true);
+ DlgBase<RadioBattleDlg, RadioBattleBahaviour>.singleton.Show(true);
+ base.uiBehaviour.m_objBossRush.SetActive(XSingleton<XScene>.singleton.SceneType == SceneType.SCENE_BOSSRUSH);
+ this.lastPingTime = -60f;
+ this._combo_buff_to_add = -1;
+ this._combo_buff_added = -1;
+ int profID = XFastEnumIntEqualityComparer<RoleType>.ToInt(XSingleton<XEntityMgr>.singleton.Player.PlayerAttributes.Profession);
+ base.uiBehaviour.m_avatar.spriteName = XSingleton<XProfessionSkillMgr>.singleton.GetProfHeadIcon(profID);
+ this.SetTencentImage();
+ base.uiBehaviour.m_Level.SetText(string.Format("{0}", XSingleton<XAttributeMgr>.singleton.XPlayerData.Level));
+ base.uiBehaviour.m_Name.SetText(XSingleton<XEntityMgr>.singleton.Player.Name);
+ XTeamDocument specificDocument = XDocuments.GetSpecificDocument<XTeamDocument>(XTeamDocument.uuID);
+ this.SpectateInfoIsShow = false;
+ XSpectateSceneDocument specificDocument2 = XDocuments.GetSpecificDocument<XSpectateSceneDocument>(XSpectateSceneDocument.uuID);
+ base.uiBehaviour.m_SpectateInfo.transform.localPosition = Vector3.one * (float)XGameUI._far_far_away;
+ specificDocument2.GetTargetNum(true);
+ this.OnSpectateMessageChange(0, 0);
+ base.uiBehaviour.m_TeamLeader.SetActive(specificDocument.bIsLeader);
+ base.uiBehaviour.m_AutoPlayBorad.SetVisible(false);
+ base.uiBehaviour.m_AutoPlayCancelBoard.SetVisible(false);
+ base.uiBehaviour.m_SkillHandler.SetVisible(true);
+ base.uiBehaviour.m_IndicateHandler.SetVisible(true);
+ base.uiBehaviour.m_lblKill.SetVisible(false);
+ base.uiBehaviour.m_SceneName.SetText(XSingleton<XScene>.singleton.SceneData.Comment);
+ SceneTable.RowData sceneData = XSingleton<XSceneMgr>.singleton.GetSceneData(XSingleton<XScene>.singleton.SceneID);
+ bool flag = sceneData.TimeCounter == null || sceneData.TimeCounter.Length < 1;
+ if (flag)
+ {
+ this.SetTimeRecord();
+ }
+ else
+ {
+ bool flag2 = sceneData.TimeCounter[0] == 1;
+ if (flag2)
+ {
+ bool flag3 = sceneData.TimeCounter.Length > 2;
+ if (flag3)
+ {
+ this.SetLeftTime((uint)sceneData.TimeCounter[1], (int)sceneData.TimeCounter[2]);
+ }
+ else
+ {
+ this.SetLeftTime((uint)sceneData.TimeCounter[1], -1);
+ }
+ }
+ }
+ XCombatStatisticsDocument specificDocument3 = XDocuments.GetSpecificDocument<XCombatStatisticsDocument>(XCombatStatisticsDocument.uuID);
+ DlgHandlerBase.EnsureCreate<BattleDpsHandler>(ref this.m_DpsHandler, base.uiBehaviour.m_DpsPanel, this, specificDocument3.bShowDps);
+ bool visible = false;
+ SeqListRef<int> winCondition = sceneData.WinCondition;
+ for (int i = 0; i < winCondition.Count; i++)
+ {
+ bool flag4 = winCondition[i, 0] == 8;
+ if (flag4)
+ {
+ visible = true;
+ }
+ }
+ base.uiBehaviour.m_lblKill.SetVisible(visible);
+ this.UpdateKill(0);
+ this.sceneType = (SceneType)sceneData.type;
+ SceneType sceneType = this.sceneType;
+ if (sceneType <= SceneType.SCENE_TOWER)
+ {
+ if (sceneType != SceneType.SCENE_BATTLE)
+ {
+ switch (sceneType)
+ {
+ case SceneType.SCENE_WORLDBOSS:
+ case SceneType.SCENE_GUILD_BOSS:
+ base.uiBehaviour.m_WorldBossHandler.SetVisible(true);
+ break;
+ case (SceneType)8:
+ case SceneType.SCENE_BOSSRUSH:
+ case SceneType.SCENE_GUILD_HALL:
+ break;
+ case SceneType.SCENE_PK:
+ {
+ XQualifyingDocument specificDocument4 = XDocuments.GetSpecificDocument<XQualifyingDocument>(XQualifyingDocument.uuID);
+ bool flag5 = specificDocument4.PkInfoList.Count > 0;
+ if (flag5)
+ {
+ this.SetEnemyRoleInfo(specificDocument4.PkInfoList[0].brief.roleName, specificDocument4.PkInfoList[0].brief.roleLevel);
+ }
+ break;
+ }
+ case SceneType.SCENE_ABYSSS:
+ break;
+ default:
+ if (sceneType == SceneType.SCENE_TOWER)
+ {
+ base.uiBehaviour.m_TeamTowerHandler.SetVisible(true);
+ }
+ break;
+ }
+ }
+ }
+ else if (sceneType <= SceneType.SCENE_GUILD_CAMP)
+ {
+ switch (sceneType)
+ {
+ case SceneType.SCENE_GODDESS:
+ case SceneType.SCENE_ENDLESSABYSS:
+ this.GetTeamLeftTimes();
+ break;
+ case SceneType.SCENE_DRAGON_EXP:
+ break;
+ case SceneType.SCENE_RISK:
+ break;
+ default:
+ if (sceneType != SceneType.SCENE_GUILD_CAMP)
+ {
+ }
+ break;
+ }
+ }
+ else if (sceneType != SceneType.SCENE_INVFIGHT)
+ {
+ if (sceneType == SceneType.SCENE_CASTLE_WAIT)
+ {
+ base.uiBehaviour.m_SkillHandler.SetVisible(false);
+ }
+ }
+ else
+ {
+ XPKInvitationDocument specificDocument5 = XDocuments.GetSpecificDocument<XPKInvitationDocument>(XPKInvitationDocument.uuID);
+ bool flag6 = specificDocument5.PKInfoList.Count > 0;
+ if (flag6)
+ {
+ this.SetEnemyRoleInfo(specificDocument5.PKInfoList[0].roleName, specificDocument5.PKInfoList[0].roleLevel);
+ }
+ }
+ this.SetWinConditionTips();
+ this.SetBattleExplainTips();
+ XPlayerAttributes xplayerAttributes2 = XSingleton<XEntityMgr>.singleton.Player.Attributes as XPlayerAttributes;
+ bool flag7 = XSingleton<XSceneMgr>.singleton.CanAutoPlay(XSingleton<XScene>.singleton.SceneID);
+ bool flag8 = XSingleton<XAttributeMgr>.singleton.XPlayerData.Level < uint.Parse(XSingleton<XGlobalConfig>.singleton.GetValue("AutoPlayUnlockLevel"));
+ base.uiBehaviour.m_AutoPlayContent.SetActive(flag7);
+ bool flag9 = flag7;
+ if (flag9)
+ {
+ this._can_auto_play = true;
+ bool flag10 = flag8;
+ if (flag10)
+ {
+ base.uiBehaviour.m_AutoPlayBorad.SetVisible(true);
+ base.uiBehaviour.m_AutoPlay.SetEnable(false, false);
+ base.uiBehaviour.m_AutoPlayLock.SetVisible(true);
+ }
+ else
+ {
+ bool flag11 = this.sceneType == SceneType.SCENE_GODDESS;
+ if (flag11)
+ {
+ base.uiBehaviour.m_AutoPlayCancelBoard.SetVisible(true);
+ }
+ else
+ {
+ bool autoPlayOn = xplayerAttributes2.AutoPlayOn;
+ if (autoPlayOn)
+ {
+ base.uiBehaviour.m_AutoPlayCancelBoard.SetVisible(true);
+ }
+ else
+ {
+ base.uiBehaviour.m_AutoPlayBorad.SetVisible(true);
+ }
+ }
+ base.uiBehaviour.m_AutoPlayLock.SetVisible(false);
+ base.uiBehaviour.m_AutoPlay.SetEnable(true, false);
+ }
+ }
+ else
+ {
+ this._can_auto_play = false;
+ xplayerAttributes2.AutoPlayOn = false;
+ }
+ SceneType sceneType2 = this.sceneType;
+ if (sceneType2 != SceneType.SCENE_ARENA && sceneType2 != SceneType.SCENE_PK && sceneType2 != SceneType.SCENE_INVFIGHT)
+ {
+ this.EnemyInfoHandler.InitBoss();
+ }
+ else
+ {
+ this.EnemyInfoHandler.InitRole();
+ }
+ XTeamDocument specificDocument6 = XDocuments.GetSpecificDocument<XTeamDocument>(XTeamDocument.uuID);
+ bool flag12 = XSingleton<XScene>.singleton.SceneType == SceneType.SCENE_PVP;
+ if (flag12)
+ {
+ XBattleCaptainPVPDocument specificDocument7 = XDocuments.GetSpecificDocument<XBattleCaptainPVPDocument>(XBattleCaptainPVPDocument.uuID);
+ this.TeamMonitor.InitWhenShowMainUIByBloodList(specificDocument7.TeamBlood);
+ }
+ else
+ {
+ bool flag13 = XSingleton<XScene>.singleton.SceneType == SceneType.SCENE_HEROBATTLE;
+ if (flag13)
+ {
+ XHeroBattleDocument specificDocument8 = XDocuments.GetSpecificDocument<XHeroBattleDocument>(XHeroBattleDocument.uuID);
+ this.TeamMonitor.InitWhenShowMainUIByBloodList(specificDocument8.TeamBlood);
+ }
+ else
+ {
+ bool flag14 = XSingleton<XScene>.singleton.SceneType == SceneType.SCENE_WEEKEND4V4_CRAZYBOMB || XSingleton<XScene>.singleton.SceneType == SceneType.SCENE_WEEKEND4V4_GHOSTACTION || XSingleton<XScene>.singleton.SceneType == SceneType.SCENE_WEEKEND4V4_HORSERACING || XSingleton<XScene>.singleton.SceneType == SceneType.SCENE_WEEKEND4V4_LIVECHALLENGE || XSingleton<XScene>.singleton.SceneType == SceneType.SCENE_WEEKEND4V4_MONSTERFIGHT || XSingleton<XScene>.singleton.SceneType == SceneType.SCENE_WEEKEND4V4_DUCK;
+ if (flag14)
+ {
+ XWeekendPartyDocument specificDocument9 = XDocuments.GetSpecificDocument<XWeekendPartyDocument>(XWeekendPartyDocument.uuID);
+ this.TeamMonitor.InitWhenShowMainUIByBloodList(specificDocument9.TeamBlood);
+ }
+ else
+ {
+ this.TeamMonitor.InitWhenShowMainUIByTeam(specificDocument6.MyTeam);
+ }
+ }
+ }
+ bool flag15 = XSingleton<XScene>.singleton.SceneID != 100u && XSingleton<XScene>.singleton.SceneType != SceneType.SCENE_CALLBACK && (ulong)XSingleton<XAttributeMgr>.singleton.XPlayerData.Level >= (ulong)((long)int.Parse(XSingleton<XGlobalConfig>.singleton.GetValue("ShowChatLevelBattle")));
+ if (flag15)
+ {
+ ShowSettingArgs showSettingArgs = new ShowSettingArgs();
+ showSettingArgs.position = 2;
+ showSettingArgs.showsettings = false;
+ showSettingArgs.enablebackclick = true;
+ showSettingArgs.enabledrag = false;
+ DlgBase<XChatSmallView, XChatSmallBehaviour>.singleton.ShowChatMiniUI(showSettingArgs);
+ }
+ base.uiBehaviour.m_StrengthPresevedBar.SetVisible(this._doc.ShowStrengthPresevedBar);
+ this.RefreshYuyin();
+ this.InitView();
+ bool flag16 = this.apolloDoc != null;
+ if (flag16)
+ {
+ this.apolloDoc.RequestJoinRoom();
+ }
+ bool flag17 = XSingleton<XScene>.singleton.SceneType == SceneType.SKYCITY_FIGHTING || XSingleton<XScene>.singleton.SceneType == SceneType.SCENE_BIGMELEE_FIGHT;
+ if (flag17)
+ {
+ base.uiBehaviour.m_SkyAreanStage.gameObject.SetActive(true);
+ }
+ else
+ {
+ base.uiBehaviour.m_SkyAreanStage.gameObject.SetActive(false);
+ }
+ bool flag18 = (ulong)XSingleton<XScene>.singleton.SceneID == (ulong)((long)int.Parse(XSingleton<XGlobalConfig>.singleton.GetValue("GuildCampHorseSceneID")));
+ if (flag18)
+ {
+ base.uiBehaviour.m_HorseRide.gameObject.SetActive(true);
+ }
+ else
+ {
+ base.uiBehaviour.m_HorseRide.gameObject.SetActive(false);
+ }
+ base.uiBehaviour.m_GuildMineBuff.gameObject.SetActive(false);
+ base.uiBehaviour.m_pauseGroup.SetGroup((XSingleton<XScene>.singleton.SceneType == SceneType.SCENE_MOBA) ? 1 : 0);
+ base.uiBehaviour.m_3D25D.gameObject.SetActive(XSingleton<XScene>.singleton.SceneType != SceneType.SCENE_MOBA);
+ base.uiBehaviour.m_BtnDamageStatistics.SetVisible(sceneData.ShowBattleStatistics);
+ base.uiBehaviour.m_Menu.Refresh();
+ }
+
+ private void InitView()
+ {
+ this.SetView(XSingleton<XOperationData>.singleton.OperationMode);
+ }
+
+ public void SetView(XOperationMode mode)
+ {
+ bool flag = base.uiBehaviour == null || base.uiBehaviour.m_SightPic == null || base.uiBehaviour.m_SelectPic == null || base.uiBehaviour.m_SightSelect == null;
+ if (!flag)
+ {
+ switch (mode)
+ {
+ case XOperationMode.X25D:
+ base.uiBehaviour.m_SightPic.SetSprite("l_zdicon_1_1");
+ base.uiBehaviour.m_SelectPic.SetSprite("l_zdicon_1_1");
+ break;
+ case XOperationMode.X3D:
+ base.uiBehaviour.m_SightPic.SetSprite("l_zdicon_1_0");
+ base.uiBehaviour.m_SelectPic.SetSprite("l_zdicon_1_0");
+ break;
+ case XOperationMode.X3D_Free:
+ base.uiBehaviour.m_SightPic.SetSprite("l_zdicon_1_2");
+ base.uiBehaviour.m_SelectPic.SetSprite("l_zdicon_1_2");
+ break;
+ }
+ base.uiBehaviour.m_SightPic.MakePixelPerfect();
+ base.uiBehaviour.m_SelectPic.MakePixelPerfect();
+ base.uiBehaviour.m_SightSelect.gameObject.SetActive(false);
+ }
+ }
+
+ private void SetStartAutoPlay()
+ {
+ this.SetAutoPlay(true);
+ }
+
+ private void GetTeamLeftTimes()
+ {
+ XTeamDocument specificDocument = XDocuments.GetSpecificDocument<XTeamDocument>(XTeamDocument.uuID);
+ specificDocument.ReqTeamOp(TeamOperate.TEAM_QUERYCOUNT, 0UL, null, TeamMemberType.TMT_NORMAL, null);
+ }
+
+ private void SetWinConditionTips()
+ {
+ SceneTable.RowData sceneData = XSingleton<XSceneMgr>.singleton.GetSceneData(XSingleton<XScene>.singleton.SceneID);
+ bool flag = sceneData == null || string.IsNullOrEmpty(sceneData.WinConditionTips);
+ if (flag)
+ {
+ base.uiBehaviour.m_winConditionTips.SetVisible(false);
+ }
+ else
+ {
+ base.uiBehaviour.m_winConditionTips.SetVisible(true);
+ string text = sceneData.WinConditionTips.Replace("/n", "\n");
+ base.uiBehaviour.m_winConditionTips.SetText(text);
+ }
+ }
+
+ private void SetBattleExplainTips()
+ {
+ SceneTable.RowData sceneData = XSingleton<XSceneMgr>.singleton.GetSceneData(XSingleton<XScene>.singleton.SceneID);
+ bool flag = sceneData == null || string.IsNullOrEmpty(sceneData.BattleExplainTips);
+ if (flag)
+ {
+ base.uiBehaviour.m_BattleExplainTips.SetVisible(false);
+ }
+ else
+ {
+ base.uiBehaviour.m_BattleExplainTips.SetVisible(true);
+ string text = XSingleton<UiUtility>.singleton.ReplaceReturn(sceneData.BattleExplainTips);
+ base.uiBehaviour.m_BattleExplainTips.SetText(text);
+ }
+ }
+
+ public void SetTeamLeftTimes()
+ {
+ base.uiBehaviour.m_leftTimes.SetVisible(true);
+ XExpeditionDocument specificDocument = XDocuments.GetSpecificDocument<XExpeditionDocument>(XExpeditionDocument.uuID);
+ SceneTable.RowData sceneData = XSingleton<XSceneMgr>.singleton.GetSceneData(XSingleton<XScene>.singleton.SceneID);
+ bool flag = sceneData.type == 20;
+ if (flag)
+ {
+ int dayCount = specificDocument.GetDayCount(TeamLevelType.TeamLevelGoddessTrial, null);
+ int dayMaxCount = specificDocument.GetDayMaxCount(TeamLevelType.TeamLevelGoddessTrial, null);
+ base.uiBehaviour.m_leftTimes.SetText(string.Format("{0}({1}/{2})", XStringDefineProxy.GetString("GODDESS_NAME"), dayMaxCount - dayCount, dayMaxCount));
+ }
+ else
+ {
+ bool flag2 = sceneData.type == 23;
+ if (flag2)
+ {
+ int dayCount = specificDocument.GetDayCount(TeamLevelType.TeamLevelEndlessAbyss, null);
+ int dayMaxCount = specificDocument.GetDayMaxCount(TeamLevelType.TeamLevelEndlessAbyss, null);
+ base.uiBehaviour.m_leftTimes.SetText(string.Format("{0}({1}/{2})", XStringDefineProxy.GetString("EndlessAbyss"), dayMaxCount - dayCount, dayMaxCount));
+ }
+ else
+ {
+ base.uiBehaviour.m_leftTimes.SetVisible(false);
+ }
+ }
+ }
+
+ protected override void OnLoad()
+ {
+ this._maxHP = 0;
+ this._currentHP = 0;
+ this._maxMP = 0;
+ this._currentMP = 0;
+ base.OnLoad();
+ DlgHandlerBase.EnsureCreate<XYuyinView>(ref this._yuyinHandler, base.uiBehaviour.transform, true, this);
+ }
+
+ protected override void OnHide()
+ {
+ base.uiBehaviour.m_SkillHandler.SetVisible(false);
+ bool flag = DlgBase<XChatSmallView, XChatSmallBehaviour>.singleton.IsLoaded();
+ if (flag)
+ {
+ DlgBase<XChatSmallView, XChatSmallBehaviour>.singleton.SetVisible(false, true);
+ }
+ bool flag2 = DlgBase<BroadMiniDlg, BroadcastMiniBehaviour>.singleton.IsLoaded();
+ if (flag2)
+ {
+ DlgBase<BroadMiniDlg, BroadcastMiniBehaviour>.singleton.Show(false);
+ }
+ bool flag3 = DlgBase<RadioBattleDlg, RadioBattleBahaviour>.singleton.IsLoaded();
+ if (flag3)
+ {
+ DlgBase<RadioBattleDlg, RadioBattleBahaviour>.singleton.Show(false);
+ }
+ bool flag4 = DlgBase<XChatView, XChatBehaviour>.singleton.IsLoaded();
+ if (flag4)
+ {
+ DlgBase<XChatView, XChatBehaviour>.singleton.SetVisible(false, true);
+ }
+ this._maxHP = 0;
+ this._currentHP = 0;
+ this._maxMP = 0;
+ this._currentMP = 0;
+ base.OnHide();
+ }
+
+ protected override void OnUnload()
+ {
+ this.m_uiBehaviour.m_txtHead.SetTexturePath("");
+ DlgHandlerBase.EnsureUnload<BattleShowInfoHandler>(ref this.m_BattleShowInfoHandler);
+ DlgHandlerBase.EnsureUnload<BattleCaptainPVPHandler>(ref this.m_BattleCaptainPVPHandler);
+ DlgHandlerBase.EnsureUnload<GuildMinePVPBattleHandler>(ref this.m_GuildMinePVPBattleHandler);
+ DlgHandlerBase.EnsureUnload<GuildMinePVPInfoHandler>(ref this.m_GuildMinePVPInfoHandler);
+ DlgHandlerBase.EnsureUnload<SkyArenaBattleHandler>(ref this.m_SkyArenaBattleHandler);
+ DlgHandlerBase.EnsureUnload<SkyArenaInfoHandler>(ref this.m_SkyArenaInfoHandler);
+ DlgHandlerBase.EnsureUnload<AbyssPartyBattleHandler>(ref this.m_AbyssPartyBattleHandler);
+ DlgHandlerBase.EnsureUnload<BigMeleeBattleHandler>(ref this.m_BigMeleeBattleHandler);
+ DlgHandlerBase.EnsureUnload<BattleFieldBattleHandler>(ref this.m_BattleFieldBattleHandler);
+ DlgHandlerBase.EnsureUnload<XOptionsBattleHandler>(ref this.m_XOptionBattleHandler);
+ DlgHandlerBase.EnsureUnload<RaceBattleHandler>(ref this.m_RaceBattleHandler);
+ DlgHandlerBase.EnsureUnload<BattleWorldBossHandler>(ref base.uiBehaviour.m_WorldBossHandler);
+ DlgHandlerBase.EnsureUnload<BattleSkillHandler>(ref base.uiBehaviour.m_SkillHandler);
+ DlgHandlerBase.EnsureUnload<BattleIndicateHandler>(ref base.uiBehaviour.m_IndicateHandler);
+ DlgHandlerBase.EnsureUnload<XTeamMonitorHandler>(ref base.uiBehaviour.m_TeamMonitor);
+ DlgHandlerBase.EnsureUnload<XBattleEnemyInfoHandler>(ref base.uiBehaviour.m_EnemyInfoHandler);
+ DlgHandlerBase.EnsureUnload<XBuffMonitorHandler>(ref base.uiBehaviour.m_PlayerBuffMonitorHandler);
+ DlgHandlerBase.EnsureUnload<ProfressionTrialsHandler>(ref this.ProfTrialsHandler);
+ DlgHandlerBase.EnsureUnload<BattleDpsHandler>(ref this.m_DpsHandler);
+ DlgHandlerBase.EnsureUnload<XYuyinView>(ref this._yuyinHandler);
+ DlgHandlerBase.EnsureUnload<HeroBattleSkillHandler>(ref this.m_HeroBattleSkillHandler);
+ DlgHandlerBase.EnsureUnload<HeroBattleHandler>(ref this.m_HeroBattleHandler);
+ DlgHandlerBase.EnsureUnload<MobaBattleHandler>(ref this.m_MobaBattleHandler);
+ DlgHandlerBase.EnsureUnload<GuildMiniReportHandler>(ref this.m_miniReportHandler);
+ DlgHandlerBase.EnsureUnload<GuildBattleMiniRankHandler>(ref this.m_miniRankHandler);
+ DlgHandlerBase.EnsureUnload<BattleRiftHandler>(ref this.m_riftHandler);
+ DlgHandlerBase.EnsureUnload<WeekendPartyHandler>(ref this.m_WeekendPartyHandler);
+ DlgHandlerBase.EnsureUnload<BattleStatisticsHandler>(ref this.m_BattleStatisticsHandler);
+ this._doc.BattleMainView = null;
+ bool flag = this.apolloDoc != null;
+ if (flag)
+ {
+ this.apolloDoc.QuitRoom();
+ }
+ this.ClearBigNotice();
+ base.OnUnload();
+ }
+
+ private void RefreshYuyin()
+ {
+ this.type = XFastEnumIntEqualityComparer<SceneType>.ToInt(XSingleton<XScene>.singleton.SceneType);
+ bool flag = this._yuyinHandler != null;
+ if (flag)
+ {
+ this._yuyinHandler.Refresh(this.type);
+ }
+ }
+
+ public void RefreshYuyin(ulong uid)
+ {
+ bool flag = this._yuyinHandler != null;
+ if (flag)
+ {
+ this._yuyinHandler.Refresh(this.type);
+ }
+ }
+
+ private void SetEnemyRoleInfo(string name, uint level)
+ {
+ }
+
+ private bool OnTailToBackClick(IXUIButton go)
+ {
+ XSingleton<XScene>.singleton.GameCamera.Tail.TailToBack();
+ return true;
+ }
+
+ private bool OnPauseClick(IXUIButton go)
+ {
+ bool flag = !base.IsLoaded();
+ bool result;
+ if (flag)
+ {
+ result = true;
+ }
+ else
+ {
+ SceneTable.RowData sceneData = XSingleton<XSceneMgr>.singleton.GetSceneData(XSingleton<XScene>.singleton.SceneID);
+ bool flag2 = sceneData != null;
+ if (flag2)
+ {
+ bool canPause = sceneData.CanPause;
+ if (canPause)
+ {
+ XSingleton<XShell>.singleton.Pause = true;
+ }
+ }
+ bool flag3 = this.m_XOptionBattleHandler == null;
+ if (flag3)
+ {
+ bool flag4 = base.uiBehaviour != null;
+ if (flag4)
+ {
+ DlgHandlerBase.EnsureCreate<XOptionsBattleHandler>(ref this.m_XOptionBattleHandler, base.uiBehaviour.m_canvas, true, this);
+ }
+ }
+ bool flag5 = this.m_XOptionBattleHandler != null && !this.m_XOptionBattleHandler.IsVisible();
+ if (flag5)
+ {
+ this.m_XOptionBattleHandler.ShowUI();
+ }
+ this.sceneType = XSingleton<XScene>.singleton.SceneType;
+ result = true;
+ }
+ return result;
+ }
+
+ private void OnAvatarClick(IXUISprite go)
+ {
+ bool flag = !base.IsLoaded();
+ if (!flag)
+ {
+ bool flag2 = DlgBase<DemoUI, DemoUIBehaviour>.singleton.IsVisible();
+ DlgBase<DemoUI, DemoUIBehaviour>.singleton.SetVisible(!flag2, true);
+ }
+ }
+
+ public void SetTencentImage()
+ {
+ bool flag = XSingleton<PDatabase>.singleton.playerInfo != null;
+ if (flag)
+ {
+ string pictureLarge = XSingleton<PDatabase>.singleton.playerInfo.data.pictureLarge;
+ XSingleton<XUICacheImage>.singleton.Load(pictureLarge, this.m_uiBehaviour.m_txtHead, this.m_uiBehaviour);
+ }
+ else
+ {
+ XSingleton<XUICacheImage>.singleton.Load(string.Empty, this.m_uiBehaviour.m_txtHead, this.m_uiBehaviour);
+ }
+ XPrerogativeDocument specificDocument = XDocuments.GetSpecificDocument<XPrerogativeDocument>(XPrerogativeDocument.uuID);
+ XSingleton<UiUtility>.singleton.ParseHeadIcon(specificDocument.PlayerSetid, base.uiBehaviour.m_sprFrame);
+ }
+
+ private bool OnBussrushPauseClick(IXUIButton btn)
+ {
+ XSingleton<XScene>.singleton.ReqLeaveScene();
+ DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.SetVisible(false, true);
+ return true;
+ }
+
+ public void ShowBossrushQuit()
+ {
+ DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.SetVisible(true, true);
+ DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.SetSingleButtonMode(false);
+ string @string = XStringDefineProxy.GetString("BOSSRUSH_QUIT");
+ string string2 = XStringDefineProxy.GetString("COMMON_OK");
+ string string3 = XStringDefineProxy.GetString("COMMON_CANCEL");
+ DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.SetLabelsWithSymbols(@string, string2, string3);
+ DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.SetModalCallback(new ButtonClickEventHandler(this.OnBussrushPauseClick), null);
+ }
+
+ private void UpdatePlayerInfo()
+ {
+ XPlayerAttributes xplayerData = XSingleton<XAttributeMgr>.singleton.XPlayerData;
+ bool flag = xplayerData != null;
+ if (flag)
+ {
+ int num = (int)xplayerData.GetAttr(XAttributeDefine.XAttr_MaxHP_Total);
+ int num2 = (int)xplayerData.GetAttr(XAttributeDefine.XAttr_CurrentHP_Basic);
+ int num3 = (int)xplayerData.GetAttr(XAttributeDefine.XAttr_MaxMP_Total);
+ int num4 = (int)xplayerData.GetAttr(XAttributeDefine.XAttr_CurrentMP_Basic);
+ bool flag2 = num2 < 0;
+ if (flag2)
+ {
+ num2 = 0;
+ }
+ float num5 = (float)num2 / (float)num;
+ base.uiBehaviour.m_Hpbar.SetFillAmount(num5);
+ float fillAmount = (float)num4 / (float)num3;
+ base.uiBehaviour.m_Mpbar.SetFillAmount(fillAmount);
+ bool flag3 = this._currentHP != num2 || this._maxHP != num;
+ if (flag3)
+ {
+ base.uiBehaviour.m_HpText.SetText(string.Format("{0}/{1}", num2, num));
+ this._currentHP = num2;
+ this._maxHP = num;
+ }
+ bool flag4 = this._currentMP != num4 || this._maxMP != num3;
+ if (flag4)
+ {
+ base.uiBehaviour.m_MpText.SetText(string.Format("{0}/{1}", num4, num3));
+ this._currentMP = num4;
+ this._maxMP = num3;
+ }
+ Color color;
+ bool active;
+ BattleMain.GetHPColor(num5, out color, out active);
+ base.uiBehaviour.m_LowHP.SetActive(active);
+ }
+ }
+
+ public static void GetHPColor(float hpPercent, out Color color, out bool bLowHP)
+ {
+ bool flag = hpPercent > BattleMain._fYellow;
+ if (flag)
+ {
+ color = BattleMain._hp_green;
+ bLowHP = false;
+ }
+ else
+ {
+ bool flag2 = hpPercent <= BattleMain._fYellow && hpPercent > BattleMain._fRed;
+ if (flag2)
+ {
+ color = BattleMain._hp_yellow;
+ bLowHP = false;
+ }
+ else
+ {
+ color = BattleMain._hp_red;
+ bLowHP = true;
+ }
+ }
+ }
+
+ public void OnPlayerBuffChange()
+ {
+ base.uiBehaviour.m_PlayerBuffMonitorHandler.OnBuffChanged(XSingleton<XEntityMgr>.singleton.Player.Buffs.GetUIBuffList());
+ }
+
+ public override void OnUpdate()
+ {
+ base.uiBehaviour.m_SkillHandler.OnUpdate();
+ bool flag = !XSingleton<XTimerMgr>.singleton.NeedFixedUpdate;
+ if (!flag)
+ {
+ base.OnUpdate();
+ bool flag2 = this.lastDebugUITrigger > 0f;
+ if (flag2)
+ {
+ this.lastDebugUITrigger -= Time.deltaTime;
+ }
+ bool flag3 = this.lastDebugUITrigger <= 0f && Input.GetKey((KeyCode)285);
+ if (flag3)
+ {
+ DlgBase<DemoUI, DemoUIBehaviour>.singleton.Toggle();
+ this.lastDebugUITrigger = 0.05f;
+ }
+ bool key = Input.GetKey((KeyCode)96);
+ if (key)
+ {
+ bool flag4 = Input.GetKey((KeyCode)256) || Input.GetKey((KeyCode)48);
+ if (flag4)
+ {
+ XSingleton<XCommand>.singleton.CustomCommand(0);
+ }
+ bool flag5 = Input.GetKey((KeyCode)257) || Input.GetKey((KeyCode)49);
+ if (flag5)
+ {
+ XSingleton<XCommand>.singleton.CustomCommand(1);
+ }
+ bool flag6 = Input.GetKey((KeyCode)258) || Input.GetKey((KeyCode)50);
+ if (flag6)
+ {
+ XSingleton<XCommand>.singleton.CustomCommand(2);
+ }
+ bool flag7 = Input.GetKey((KeyCode)259) || Input.GetKey((KeyCode)51);
+ if (flag7)
+ {
+ XSingleton<XCommand>.singleton.CustomCommand(3);
+ }
+ bool flag8 = Input.GetKey((KeyCode)260) || Input.GetKey((KeyCode)52);
+ if (flag8)
+ {
+ XSingleton<XCommand>.singleton.CustomCommand(4);
+ }
+ bool flag9 = Input.GetKey((KeyCode)261) || Input.GetKey((KeyCode)53);
+ if (flag9)
+ {
+ XSingleton<XCommand>.singleton.CustomCommand(5);
+ }
+ bool flag10 = Input.GetKey((KeyCode)262) || Input.GetKey((KeyCode)54);
+ if (flag10)
+ {
+ XSingleton<XCommand>.singleton.CustomCommand(6);
+ }
+ bool flag11 = Input.GetKey((KeyCode)263) || Input.GetKey((KeyCode)55);
+ if (flag11)
+ {
+ XSingleton<XCommand>.singleton.CustomCommand(7);
+ }
+ bool flag12 = Input.GetKey((KeyCode)264) || Input.GetKey((KeyCode)56);
+ if (flag12)
+ {
+ XSingleton<XCommand>.singleton.CustomCommand(8);
+ }
+ bool flag13 = Input.GetKey((KeyCode)265) || Input.GetKey((KeyCode)57);
+ if (flag13)
+ {
+ XSingleton<XCommand>.singleton.CustomCommand(9);
+ }
+ }
+ this.UpdatePlayerInfo();
+ this.UpdateWifi();
+ bool flag14 = Time.unscaledTime - this.lastPingTime > 60f || this.lastPingTime < 0f;
+ if (flag14)
+ {
+ this.RefreshPing();
+ this.lastPingTime = Time.unscaledTime;
+ }
+ base.uiBehaviour.m_IndicateHandler.OnUpdate();
+ bool flag15 = Time.time - this._last_check_time > 5f;
+ if (flag15)
+ {
+ this._last_check_time = Time.time;
+ this._doc.SendCheckTime();
+ }
+ this.UpdateTime();
+ this.UpdateLeftTime();
+ bool flag16 = this.NoticeTime > 0f;
+ if (flag16)
+ {
+ bool flag17 = Time.time - this.NoticeTime > this._notice_duration;
+ if (flag17)
+ {
+ base.uiBehaviour.m_NoticeFrame.transform.localPosition = XGameUI.Far_Far_Away;
+ this.NoticeTime = 0f;
+ }
+ }
+ bool active = base.uiBehaviour.m_WorldBossHandler.active;
+ if (active)
+ {
+ base.uiBehaviour.m_WorldBossHandler.OnUpdate();
+ }
+ IXGameSirControl gameSirControl = XSingleton<XUpdater.XUpdater>.singleton.GameSirControl;
+ bool flag18 = gameSirControl != null && gameSirControl.IsConnected() && gameSirControl.GetButton(XGameSirKeyCode.BTN_THUMBR);
+ if (flag18)
+ {
+ XOptionsDocument specificDocument = XDocuments.GetSpecificDocument<XOptionsDocument>(XOptionsDocument.uuID);
+ int num = specificDocument.GetValue(XOptionsDefine.OD_VIEW) + 1;
+ int num2 = XFastEnumIntEqualityComparer<XOperationMode>.ToInt(XOperationMode.X3D_Free);
+ bool flag19 = num > num2;
+ if (flag19)
+ {
+ num = XFastEnumIntEqualityComparer<XOperationMode>.ToInt(XOperationMode.X25D);
+ }
+ specificDocument.SetValue(XOptionsDefine.OD_VIEW, num, false);
+ specificDocument.SetBattleOptionValue();
+ this.SetView((XOperationMode)num);
+ }
+ this.TeamMonitor.OnUpdate();
+ this.EnemyInfoHandler.OnUpdate();
+ base.uiBehaviour.m_PlayerBuffMonitorHandler.OnUpdate();
+ bool flag20 = this._combo_buff_to_add > this._combo_buff_added;
+ if (flag20)
+ {
+ ComboBuff comboBuff = this._combo_buff_list[this._combo_buff_to_add];
+ XBuff buffByID = XSingleton<XEntityMgr>.singleton.Player.Buffs.GetBuffByID(comboBuff.buffID);
+ bool flag21 = buffByID != null;
+ if (flag21)
+ {
+ this._combo_buff_added = this._combo_buff_to_add;
+ this._combo_buff_to_add = -1;
+ }
+ }
+ bool flag22 = this._combo_buff_added >= 0;
+ if (flag22)
+ {
+ ComboBuff comboBuff2 = this._combo_buff_list[this._combo_buff_added];
+ XBuff buffByID2 = XSingleton<XEntityMgr>.singleton.Player.Buffs.GetBuffByID(comboBuff2.buffID);
+ bool flag23 = buffByID2 != null;
+ if (flag23)
+ {
+ float leftTime = buffByID2.GetLeftTime();
+ Color comboQuality = this.GetComboQuality(this._combo_buff_added + 1);
+ base.uiBehaviour.m_ComboBuffName.SetText(comboBuff2.buffName);
+ base.uiBehaviour.m_ComboBuffName.SetColor(comboQuality);
+ base.uiBehaviour.m_ComboBuffTime.gameObject.SetActive(true);
+ bool flag24 = leftTime != -1f;
+ if (flag24)
+ {
+ base.uiBehaviour.m_ComboBuffTime.value = leftTime / buffByID2.Duration;
+ }
+ else
+ {
+ base.uiBehaviour.m_ComboBuffTime.value = 1f;
+ }
+ }
+ else
+ {
+ this._combo_buff_added = -1;
+ base.uiBehaviour.m_ComboBuffTime.gameObject.SetActive(false);
+ }
+ }
+ else
+ {
+ base.uiBehaviour.m_ComboBuffTime.gameObject.SetActive(false);
+ }
+ bool flag25 = base.uiBehaviour.m_StrengthPresevedBar.IsVisible();
+ if (flag25)
+ {
+ this.RefreshStrengthPresevedBar();
+ }
+ }
+ }
+
+ protected Color GetComboQuality(int quality)
+ {
+ Color result;
+ switch (quality)
+ {
+ case 1:
+ result = new Color32(0, byte.MaxValue, 18, byte.MaxValue);
+ break;
+ case 2:
+ result = new Color32(0, 228, byte.MaxValue, byte.MaxValue);
+ break;
+ case 3:
+ result = new Color32(byte.MaxValue, 180, 0, byte.MaxValue);
+ break;
+ case 4:
+ result = new Color32(252, 0, byte.MaxValue, byte.MaxValue);
+ break;
+ default:
+ result = new Color32(252, 0, byte.MaxValue, byte.MaxValue);
+ break;
+ }
+ return result;
+ }
+
+ private void UpdateWifi()
+ {
+ XSingleton<UiUtility>.singleton.UpdateWifi(null, this.m_uiBehaviour.m_sprwifi);
+ }
+
+ private void RefreshPing()
+ {
+ XSingleton<UiUtility>.singleton.RefreshPing(base.uiBehaviour.m_lblTime, base.uiBehaviour.m_sliderBattery, base.uiBehaviour.m_lblfree);
+ }
+
+ public void RefreshBossRush()
+ {
+ XBossBushDocument xbossBushDocument = XSingleton<XGame>.singleton.Doc.GetXComponent(XBossBushDocument.uuID) as XBossBushDocument;
+ bool flag = xbossBushDocument != null && XSingleton<XScene>.singleton.SceneType == SceneType.SCENE_BOSSRUSH;
+ if (flag)
+ {
+ this.m_uiBehaviour.m_sprBuff1.SetSprite(xbossBushDocument.bossBuff1Row.icon);
+ this.m_uiBehaviour.m_sprBuff2.SetSprite(xbossBushDocument.bossBuff2Row.icon);
+ this.m_uiBehaviour.m_lblBuff1.SetText(xbossBushDocument.bossBuff1Row.Comment);
+ this.m_uiBehaviour.m_lblBuff2.SetText(xbossBushDocument.bossBuff2Row.Comment);
+ int quality = xbossBushDocument.bossBuff1Row.Quality;
+ int quality2 = xbossBushDocument.bossBuff2Row.Quality;
+ string value = XSingleton<XGlobalConfig>.singleton.GetValue("Quality" + quality + "Color");
+ string value2 = XSingleton<XGlobalConfig>.singleton.GetValue("Quality" + quality2 + "Color");
+ this.m_uiBehaviour.m_sprBuff1.SetColor(XSingleton<UiUtility>.singleton.ParseColor(value, 0));
+ this.m_uiBehaviour.m_sprBuff2.SetColor(XSingleton<UiUtility>.singleton.ParseColor(value2, 0));
+ this.m_uiBehaviour.m_lblBuff1.SetColor(XSingleton<UiUtility>.singleton.ParseColor(value, 0));
+ this.m_uiBehaviour.m_lblBuff2.SetColor(XSingleton<UiUtility>.singleton.ParseColor(value2, 0));
+ base.uiBehaviour.m_lblTitle.SetText(XStringDefineProxy.GetString("BOSSRUSH_FIGHT", new object[]
+ {
+ xbossBushDocument.respData.currank
+ }) + " " + DlgBase<BossRushDlg, BossRushBehavior>.singleton.bossName);
+ base.uiBehaviour.m_rwdpool.ReturnAll(false);
+ for (int i = 0; i < xbossBushDocument.bossRushRow.reward.Count; i++)
+ {
+ uint itemid = xbossBushDocument.bossRushRow.reward[i, 0];
+ uint num = xbossBushDocument.bossRushRow.reward[i, 1];
+ GameObject gameObject = base.uiBehaviour.m_rwdpool.FetchGameObject(false);
+ XSingleton<XItemDrawerMgr>.singleton.normalItemDrawer.DrawItem(gameObject, (int)itemid, (int)(num * xbossBushDocument.rwdRate), false);
+ bool flag2 = i < 2;
+ if (flag2)
+ {
+ gameObject.transform.localPosition = new Vector3((float)(10 + 100 * i), 0f, 0f);
+ }
+ else
+ {
+ gameObject.transform.localPosition = new Vector3((float)(10 + 100 * (i - 2)), -100f, 0f);
+ }
+ }
+ base.uiBehaviour.m_sprBossbg.spriteHeight = ((xbossBushDocument.bossRushRow.reward.Count > 2) ? 207 : 137);
+ }
+ }
+
+ public void UpdateKill(int cnt)
+ {
+ bool flag = base.IsVisible();
+ if (flag)
+ {
+ string @string = XStringDefineProxy.GetString("SMALLMONSTER_KILL");
+ base.uiBehaviour.m_lblKill.SetText(string.Format(XStringDefineProxy.GetString("SMALLMONSTER_KILL"), cnt));
+ }
+ }
+
+ public void OnComboChange(uint combo)
+ {
+ bool flag = combo > 0u;
+ if (flag)
+ {
+ this.m_uiBehaviour.m_ComboFrame.transform.localPosition = Vector3.zero;
+ this.m_uiBehaviour.m_ComboText.SetText(combo.ToString());
+ IXUITweenTool comboBgTween = this.m_uiBehaviour.m_ComboBgTween;
+ comboBgTween.PlayTween(true, -1f);
+ bool hasComboBuff = XSingleton<XScene>.singleton.SceneData.HasComboBuff;
+ if (hasComboBuff)
+ {
+ int num = -1;
+ bool flag2 = (ulong)combo < (ulong)((long)this._combo_buff_list[0].combo);
+ if (flag2)
+ {
+ num = -1;
+ }
+ else
+ {
+ bool flag3 = (ulong)combo > (ulong)((long)this._combo_buff_list[this._combo_buff_list.Count - 1].combo);
+ if (flag3)
+ {
+ num = -1;
+ }
+ else
+ {
+ for (int i = 0; i < this._combo_buff_list.Count - 1; i++)
+ {
+ bool flag4 = (ulong)combo == (ulong)((long)this._combo_buff_list[i].combo);
+ if (flag4)
+ {
+ num = i;
+ break;
+ }
+ }
+ }
+ }
+ bool flag5 = num >= 0 && num <= this._combo_buff_list.Count - 1;
+ if (flag5)
+ {
+ XBuffAddEventArgs @event = XEventPool<XBuffAddEventArgs>.GetEvent();
+ @event.xBuffDesc.BuffID = this._combo_buff_list[num].buffID;
+ @event.xBuffDesc.BuffLevel = this._combo_buff_list[num].buffLevel;
+ @event.Firer = XSingleton<XEntityMgr>.singleton.Player;
+ @event.xBuffDesc.CasterID = XSingleton<XEntityMgr>.singleton.Player.ID;
+ XSingleton<XEventMgr>.singleton.FireEvent(@event);
+ this._combo_buff_to_add = num;
+ }
+ else
+ {
+ base.uiBehaviour.m_ComboBuffTime.gameObject.SetActive(false);
+ }
+ }
+ else
+ {
+ base.uiBehaviour.m_ComboBuffTime.gameObject.SetActive(false);
+ }
+ }
+ else
+ {
+ this.m_uiBehaviour.m_ComboFrame.transform.localPosition = Vector3.one * (float)XGameUI._far_far_away;
+ }
+ }
+
+ public void ShowNotice(string text, float duration, float pertime = 1f)
+ {
+ this._notice_collection.Clear();
+ string[] array = text.Split(XGlobalConfig.ListSeparator);
+ for (int i = 0; i < array.Length; i++)
+ {
+ this._notice_collection.Add(array[i]);
+ }
+ this._notice_duration = duration;
+ this._notice_pertime = pertime;
+ bool flag = this.time_token > 0u;
+ if (flag)
+ {
+ XSingleton<XTimerMgr>.singleton.KillTimer(this.time_token);
+ this.time_token = 0u;
+ }
+ bool flag2 = this._notice_collection.Count > 0;
+ if (flag2)
+ {
+ this.ShowSingleNotice(0);
+ }
+ }
+
+ protected void ShowSingleNotice(object o)
+ {
+ int num = (int)o;
+ bool flag = num < this._notice_collection.Count;
+ if (flag)
+ {
+ string text = this._notice_collection[num];
+ base.uiBehaviour.m_Notice.SetText(text);
+ base.uiBehaviour.m_NoticeFrame.transform.localPosition = base.uiBehaviour.m_NoticePos;
+ this.NoticeTime = Time.time;
+ this.time_token = XSingleton<XTimerMgr>.singleton.SetTimer(this._notice_pertime, this._showSingleNoticeCb, num + 1);
+ bool flag2 = num == this._notice_collection.Count - 1;
+ if (flag2)
+ {
+ this._notice_collection.Clear();
+ }
+ }
+ }
+
+ public void StopNotice()
+ {
+ bool flag = this.time_token > 0u;
+ if (flag)
+ {
+ XSingleton<XTimerMgr>.singleton.KillTimer(this.time_token);
+ this.time_token = 0u;
+ }
+ base.uiBehaviour.m_NoticeFrame.transform.localPosition = XGameUI.Far_Far_Away;
+ }
+
+ public void ShowSkillRemainingCD(string skillName, float time)
+ {
+ this.ShowBigNotice(XStringDefineProxy.GetString("SkillRemainingCD", new object[]
+ {
+ skillName,
+ time.ToString()
+ }), false);
+ }
+
+ public void ShowBigNotice(string text, bool bCmd)
+ {
+ bool flag = !base.IsVisible();
+ if (!flag)
+ {
+ XSingleton<XTimerMgr>.singleton.KillTimer(this._big_notice_timer_token);
+ bool flag2 = this._big_notice == null;
+ if (flag2)
+ {
+ this._big_notice = (XSingleton<XResourceLoaderMgr>.singleton.CreateFromPrefab("UI/Common/TutorialButtomText", true, false) as GameObject);
+ this._big_notice.transform.parent = base.uiBehaviour.transform;
+ this._big_notice.transform.localPosition = Vector3.zero;
+ this._big_notice.transform.localScale = Vector3.one;
+ }
+ IXUILabel ixuilabel = this._big_notice.transform.Find("TutorialText").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel.SetText(text);
+ IXUITweenTool ixuitweenTool = this._big_notice.GetComponent("XUIPlayTween") as IXUITweenTool;
+ ixuitweenTool.PlayTween(true, -1f);
+ if (bCmd)
+ {
+ this._big_notice_timer_token = XSingleton<XTimerMgr>.singleton.SetTimer(5f, this._endBigNoticeCmdCb, null);
+ }
+ else
+ {
+ this._big_notice_timer_token = XSingleton<XTimerMgr>.singleton.SetTimer(3f, this._endBigNoticeCb, null);
+ }
+ }
+ }
+
+ protected void EndBigNotice(object o)
+ {
+ bool flag = this._big_notice != null;
+ if (flag)
+ {
+ XResourceLoaderMgr.SafeDestroy(ref this._big_notice, true);
+ }
+ this._big_notice_timer_token = 0u;
+ }
+
+ protected void EndBigNoticeCmd(object o)
+ {
+ bool flag = this._big_notice != null;
+ if (flag)
+ {
+ XResourceLoaderMgr.SafeDestroy(ref this._big_notice, true);
+ XSingleton<XLevelScriptMgr>.singleton.ExecuteNextCmd();
+ }
+ this._big_notice_timer_token = 0u;
+ }
+
+ protected void ClearBigNotice()
+ {
+ bool flag = this._big_notice != null;
+ if (flag)
+ {
+ XResourceLoaderMgr.SafeDestroy(ref this._big_notice, true);
+ }
+ XSingleton<XTimerMgr>.singleton.KillTimer(this._big_notice_timer_token);
+ this._big_notice_timer_token = 0u;
+ }
+
+ public void ShowAutoReviveFrame(int time, uint cost, uint costType)
+ {
+ bool flag = base.uiBehaviour.m_WorldBossHandler != null && base.uiBehaviour.m_WorldBossHandler.active;
+ if (flag)
+ {
+ base.uiBehaviour.m_WorldBossHandler.SetAutoRevive(time, cost, costType);
+ }
+ }
+
+ public void OnPlayerRevive()
+ {
+ bool flag = base.uiBehaviour.m_WorldBossHandler != null && base.uiBehaviour.m_WorldBossHandler.active;
+ if (flag)
+ {
+ base.uiBehaviour.m_WorldBossHandler.HideAutoRevive();
+ }
+ base.uiBehaviour.m_LowHP.SetActive(false);
+ }
+
+ public float GetLeftTime()
+ {
+ return this.leftTimeCounter.GetFloatLeftTime();
+ }
+
+ public void HideLeftTime()
+ {
+ this.timeConnter.SetLeftTime(0f, -1);
+ this.leftTimeCounter.SetLeftTime(0f, -1);
+ base.uiBehaviour.m_LeftTime.SetVisible(false);
+ base.uiBehaviour.m_WarTime.SetVisible(false);
+ }
+
+ public void SetLeftTime(uint seconds, int noticeTime = -1)
+ {
+ base.uiBehaviour.m_LeftTime.SetVisible(true);
+ this.leftTimeCounter.SetLeftTime(seconds, noticeTime);
+ base.uiBehaviour.m_WarTime.SetVisible(false);
+ }
+
+ public void SetTimeRecord()
+ {
+ base.uiBehaviour.m_WarTime.SetVisible(true);
+ this.timeConnter.SetForward(1);
+ this.timeConnter.SetLeftTime(0.01f, -1);
+ base.uiBehaviour.m_LeftTime.SetVisible(false);
+ }
+
+ public void ResetLeftTime(int seconds)
+ {
+ SceneTable.RowData sceneData = XSingleton<XSceneMgr>.singleton.GetSceneData(XSingleton<XScene>.singleton.SceneID);
+ bool flag = sceneData.TimeCounter == null || sceneData.TimeCounter.Length < 1;
+ if (flag)
+ {
+ this.timeConnter.SetLeftTime((float)seconds, -1);
+ }
+ else
+ {
+ bool flag2 = sceneData.TimeCounter[0] == 1;
+ if (flag2)
+ {
+ this.leftTimeCounter.SetLeftTime((float)((int)sceneData.TimeCounter[1] - seconds), -1);
+ }
+ }
+ }
+
+ private void UpdateLeftTime()
+ {
+ bool sceneStarted = XSingleton<XScene>.singleton.SceneStarted;
+ if (sceneStarted)
+ {
+ this.leftTimeCounter.Update();
+ }
+ }
+
+ private void UpdateTime()
+ {
+ bool sceneStarted = XSingleton<XScene>.singleton.SceneStarted;
+ if (sceneStarted)
+ {
+ this.timeConnter.Update();
+ }
+ }
+
+ public void OnSwitchToTeamChat(object obj)
+ {
+ DlgBase<XChatView, XChatBehaviour>.singleton.SelectChatTeam();
+ }
+
+ public void OnVoiceButtonDrag(IXUIButton sp, Vector2 delta)
+ {
+ this.m_DragDistance += delta;
+ bool flag = this.m_DragDistance.magnitude >= 100f;
+ if (flag)
+ {
+ this.m_CancelRecord = true;
+ }
+ else
+ {
+ this.m_CancelRecord = false;
+ }
+ }
+
+ public void OnVoiceButton(IXUIButton sp, bool state)
+ {
+ if (state)
+ {
+ XSingleton<XDebug>.singleton.AddLog("Press down", null, null, null, null, null, XDebugColor.XDebug_None);
+ this.m_DragDistance = Vector2.zero;
+ this.m_IsRecording = true;
+ bool useApollo = XChatDocument.UseApollo;
+ if (useApollo)
+ {
+ XSingleton<XChatApolloMgr>.singleton.StartRecord(VoiceUsage.CHAT, null);
+ }
+ else
+ {
+ XSingleton<XChatIFlyMgr>.singleton.StartRecord(VoiceUsage.CHAT, null);
+ }
+ }
+ else
+ {
+ XSingleton<XDebug>.singleton.AddLog("Press up", null, null, null, null, null, XDebugColor.XDebug_None);
+ this.m_IsRecording = false;
+ DlgBase<XChatView, XChatBehaviour>.singleton.SetActiveChannel(ChatChannelType.Team);
+ bool useApollo2 = XChatDocument.UseApollo;
+ if (useApollo2)
+ {
+ XSingleton<XChatApolloMgr>.singleton.StopRecord(this.m_CancelRecord);
+ }
+ else
+ {
+ XSingleton<XChatIFlyMgr>.singleton.StopRecord(this.m_CancelRecord);
+ }
+ }
+ }
+
+ public void OnStopVoiceRecord()
+ {
+ bool isRecording = this.m_IsRecording;
+ if (isRecording)
+ {
+ DlgBase<XChatView, XChatBehaviour>.singleton.SetActiveChannel(ChatChannelType.Team);
+ bool useApollo = XChatDocument.UseApollo;
+ if (useApollo)
+ {
+ XSingleton<XChatApolloMgr>.singleton.StopRecord(this.m_CancelRecord);
+ }
+ else
+ {
+ XSingleton<XChatIFlyMgr>.singleton.StopRecord(this.m_CancelRecord);
+ }
+ this.m_IsRecording = false;
+ }
+ }
+
+ public bool OnCommandBtnClick(IXUIButton btn)
+ {
+ return true;
+ }
+
+ public bool OnAutoPlay(IXUIButton sp)
+ {
+ bool flag = !base.IsLoaded();
+ return flag || this.SetAutoPlay(sp.ID == 1UL);
+ }
+
+ private bool OnHorseRideClicked(IXUIButton btn)
+ {
+ bool flag = !base.IsLoaded();
+ bool result;
+ if (flag)
+ {
+ result = true;
+ }
+ else
+ {
+ XPetDocument specificDocument = XDocuments.GetSpecificDocument<XPetDocument>(XPetDocument.uuID);
+ specificDocument.ReqRecentMount();
+ result = true;
+ }
+ return result;
+ }
+
+ private bool SetAutoPlay(bool isAuto)
+ {
+ XPlayerAttributes xplayerAttributes = XSingleton<XEntityMgr>.singleton.Player.Attributes as XPlayerAttributes;
+ xplayerAttributes.AutoPlayOn = isAuto;
+ XAIComponent ai = XSingleton<XEntityMgr>.singleton.Player.AI;
+ bool flag = ai != null && !XSingleton<XScene>.singleton.bSpectator;
+ if (flag)
+ {
+ XAIEnableAI @event = XEventPool<XAIEnableAI>.GetEvent();
+ @event.Firer = XSingleton<XEntityMgr>.singleton.Player;
+ @event.Enable = isAuto;
+ @event.Puppet = false;
+ XSingleton<XEventMgr>.singleton.FireEvent(@event);
+ }
+ bool autoPlayOn = xplayerAttributes.AutoPlayOn;
+ if (autoPlayOn)
+ {
+ base.uiBehaviour.m_AutoPlayBorad.SetVisible(false);
+ base.uiBehaviour.m_AutoPlayCancelBoard.SetVisible(true);
+ XSingleton<UiUtility>.singleton.ShowSystemNoticeTip(XStringDefineProxy.GetString("AutoPlayNotice"));
+ }
+ else
+ {
+ base.uiBehaviour.m_AutoPlayBorad.SetVisible(true);
+ base.uiBehaviour.m_AutoPlayCancelBoard.SetVisible(false);
+ }
+ return true;
+ }
+
+ private void OnAutoPlayTip(IXUISprite go)
+ {
+ bool flag = !base.IsLoaded();
+ if (!flag)
+ {
+ bool flag2 = XSingleton<XScene>.singleton.SceneType == SceneType.SCENE_ARENA;
+ if (flag2)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemNoticeTip(XStringDefineProxy.GetString("ArenaAutoFight"));
+ }
+ else
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemNoticeTip(string.Format(XStringDefineProxy.GetString("AutoFightOpenLevel"), XSingleton<XGlobalConfig>.singleton.GetValue("AutoPlayUnlockLevel")));
+ }
+ }
+ }
+
+ private bool OnBattleStatisticsClick(IXUIButton btn)
+ {
+ bool flag = base.uiBehaviour == null;
+ bool result;
+ if (flag)
+ {
+ result = true;
+ }
+ else
+ {
+ DlgHandlerBase.EnsureCreate<BattleStatisticsHandler>(ref this.m_BattleStatisticsHandler, base.uiBehaviour.m_canvas.transform, this.m_BattleStatisticsHandler == null || !this.m_BattleStatisticsHandler.IsVisible(), this);
+ result = true;
+ }
+ return result;
+ }
+
+ public void ShowBattleVoice(ChatVoiceInfo info)
+ {
+ bool flag = !base.IsVisible();
+ if (!flag)
+ {
+ this.m_ChatLabelCd = XSingleton<XTimerMgr>.singleton.SetTimer((float)info.voiceTime + 2f, this._hideBattleChatUICb, info);
+ }
+ }
+
+ public void HideBattleChatUI(object info)
+ {
+ this.m_ChatLabelCd = 0u;
+ }
+
+ public void ShowCountDownFrame(bool status)
+ {
+ bool flag = !base.IsVisible();
+ if (!flag)
+ {
+ base.uiBehaviour.m_CountDownFrame.gameObject.SetActive(true);
+ base.uiBehaviour.m_CountDownTimeFrame.gameObject.SetActive(status);
+ base.uiBehaviour.m_CountDownBeginFrame.gameObject.SetActive(!status);
+ (base.uiBehaviour.m_CountDownTimeFrame.gameObject.GetComponent("XUIPlayTween") as IXUITweenTool).PlayTween(status, -1f);
+ (base.uiBehaviour.m_CountDownBeginFrame.gameObject.GetComponent("XUIPlayTween") as IXUITweenTool).PlayTween(!status, -1f);
+ }
+ }
+
+ public void SetAutoPlayUI(bool isInAutoPlay)
+ {
+ bool flag = !this._can_auto_play;
+ if (!flag)
+ {
+ this.SetAutoPlay(isInAutoPlay);
+ }
+ }
+
+ public void OnPlaySuperarmorFx(XEntity enemy, bool bBroken)
+ {
+ for (int i = 0; i < this.EnemyInfoHandler.EnemyList.Count; i++)
+ {
+ bool flag = this.EnemyInfoHandler.EnemyList[i].Entity == enemy;
+ if (flag)
+ {
+ this.EnemyInfoHandler.EnemyList[i].SetSuperArmorState(bBroken);
+ break;
+ }
+ }
+ }
+
+ public void OnStopSuperarmorFx(XEntity enemy)
+ {
+ for (int i = 0; i < this.EnemyInfoHandler.EnemyList.Count; i++)
+ {
+ bool flag = this.EnemyInfoHandler.EnemyList[i].Entity == enemy;
+ if (flag)
+ {
+ this.EnemyInfoHandler.EnemyList[i].StopSuperArmorFx();
+ break;
+ }
+ }
+ }
+
+ public void OnProjectDamage(ProjectDamageResult damage, XEntity entity)
+ {
+ for (int i = 0; i < this.EnemyInfoHandler.EnemyList.Count; i++)
+ {
+ bool flag = this.EnemyInfoHandler.EnemyList[i].Entity == entity;
+ if (flag)
+ {
+ bool flag2 = damage.Caster == XSingleton<XAttributeMgr>.singleton.XPlayerData.RoleID;
+ if (flag2)
+ {
+ this.EnemyInfoHandler.EnemyList[i].OnBeHit(damage);
+ }
+ break;
+ }
+ }
+ }
+
+ public void SetupSpeedFx(XEntity enemy, bool enable, Color c)
+ {
+ for (int i = 0; i < this.EnemyInfoHandler.EnemyList.Count; i++)
+ {
+ bool flag = this.EnemyInfoHandler.EnemyList[i].Entity == enemy;
+ if (flag)
+ {
+ IXUISprite uiSuperArmorSpeedFx = this.EnemyInfoHandler.EnemyList[i].m_uiSuperArmorSpeedFx;
+ uiSuperArmorSpeedFx.gameObject.SetActive(enable);
+ uiSuperArmorSpeedFx.SetColor(c);
+ break;
+ }
+ }
+ }
+
+ public void ShowStrengthPresevedBar(XEntity entity)
+ {
+ base.uiBehaviour.m_StrengthPresevedBar.SetVisible(true);
+ this._strength_preseved_entity = entity;
+ this._total_strength_preseved = (float)this._strength_preseved_entity.Attributes.GetAttr(XAttributeDefine.XAttr_CurrentXULI_Basic);
+ this._current_strength_preseved = this._total_strength_preseved;
+ this.RefreshStrengthPresevedBar();
+ }
+
+ public void HideStrengthPresevedBar()
+ {
+ base.uiBehaviour.m_StrengthPresevedBar.SetVisible(false);
+ this._strength_preseved_entity = null;
+ this._total_strength_preseved = 1f;
+ this._current_strength_preseved = 0f;
+ }
+
+ public void RefreshStrengthPresevedBar()
+ {
+ bool flag = this._strength_preseved_entity != null && this._strength_preseved_entity.Attributes != null;
+ if (flag)
+ {
+ this._current_strength_preseved = (float)this._strength_preseved_entity.Attributes.GetAttr(XAttributeDefine.XAttr_CurrentXULI_Basic);
+ }
+ bool flag2 = base.uiBehaviour != null && base.uiBehaviour.m_StrengthPresevedBar != null;
+ if (flag2)
+ {
+ base.uiBehaviour.m_StrengthPresevedBar.value = this._strength_preseved_precent;
+ }
+ }
+
+ public void SetTargetTabVisable(bool status)
+ {
+ }
+
+ public void OnTargetTabClick(IXUISprite sp)
+ {
+ }
+
+ public bool OnSightSelectClick(IXUIButton sp)
+ {
+ bool flag = !base.IsLoaded();
+ bool result;
+ if (flag)
+ {
+ result = true;
+ }
+ else
+ {
+ this.SetView((XOperationMode)sp.ID);
+ result = true;
+ }
+ return result;
+ }
+
+ public bool OnSightClick(IXUIButton sp)
+ {
+ bool flag = !base.IsLoaded();
+ bool result;
+ if (flag)
+ {
+ result = true;
+ }
+ else
+ {
+ bool flag2 = base.uiBehaviour == null || base.uiBehaviour.m_SightSelect == null;
+ if (flag2)
+ {
+ result = false;
+ }
+ else
+ {
+ bool activeSelf = base.uiBehaviour.m_SightSelect.gameObject.activeSelf;
+ if (activeSelf)
+ {
+ base.uiBehaviour.m_SightSelect.gameObject.SetActive(false);
+ }
+ else
+ {
+ base.uiBehaviour.m_SightSelect.gameObject.SetActive(true);
+ }
+ result = true;
+ }
+ }
+ return result;
+ }
+
+ public void OnSpectateMessageChange(int watchNum, int commendNum)
+ {
+ XSpectateSceneDocument specificDocument = XDocuments.GetSpecificDocument<XSpectateSceneDocument>(XSpectateSceneDocument.uuID);
+ bool spectateInfoIsShow = this.SpectateInfoIsShow;
+ if (spectateInfoIsShow)
+ {
+ base.uiBehaviour.m_WatchNum.SetText(watchNum.ToString());
+ base.uiBehaviour.m_CommendNum.SetText(commendNum.ToString());
+ }
+ else
+ {
+ bool flag = watchNum >= specificDocument.WatchTarget || commendNum >= specificDocument.CommendTarget;
+ if (flag)
+ {
+ XSingleton<XDebug>.singleton.AddLog("watchNum and commendNum are enough now.", null, null, null, null, null, XDebugColor.XDebug_None);
+ this.SpectateInfoIsShow = true;
+ base.uiBehaviour.m_SpectateInfo.transform.localPosition = Vector3.zero;
+ base.uiBehaviour.m_WatchNum.SetText(watchNum.ToString());
+ base.uiBehaviour.m_CommendNum.SetText(commendNum.ToString());
+ }
+ }
+ }
+
+ public void ShowGuildMineBuff(ResWarBuffRes data)
+ {
+ bool flag = data == null || !base.IsLoaded();
+ if (!flag)
+ {
+ bool flag2 = XSingleton<XScene>.singleton.SceneType == SceneType.SCENE_RESWAR_PVE;
+ if (flag2)
+ {
+ GuildMineralBufflist.RowData mineBuffData = XGuildMineMainDocument.GetMineBuffData(data.buffid);
+ bool flag3 = mineBuffData == null;
+ if (flag3)
+ {
+ XSingleton<XDebug>.singleton.AddErrorLog("buffid:" + data.buffid, null, null, null, null, null);
+ }
+ else
+ {
+ uint num = mineBuffData.Quality - 1u;
+ base.uiBehaviour.m_GuildMineBuff.gameObject.SetActive(true);
+ base.uiBehaviour.m_GuildMineBuff.SetSprite(mineBuffData.icon);
+ base.uiBehaviour.m_GuildMineBuffText.SetText(mineBuffData.ratestring);
+ bool flag4 = (ulong)num >= (ulong)((long)DlgBase<GuildMineMainView, GuildMineMainBehaviour>.singleton.BossColor.Length);
+ if (flag4)
+ {
+ XSingleton<XDebug>.singleton.AddErrorLog(string.Concat(new object[]
+ {
+ "bossMineBuffIndex:",
+ num,
+ "\nBossColor:",
+ DlgBase<GuildMineMainView, GuildMineMainBehaviour>.singleton.BossColor.Length
+ }), null, null, null, null, null);
+ num = 0u;
+ }
+ bool flag5 = (ulong)num < (ulong)((long)DlgBase<GuildMineMainView, GuildMineMainBehaviour>.singleton.BossColor.Length);
+ if (flag5)
+ {
+ base.uiBehaviour.m_GuildMineBuff.SetColor(XSingleton<UiUtility>.singleton.ParseColor(DlgBase<GuildMineMainView, GuildMineMainBehaviour>.singleton.BossColor[(int)num], 0));
+ base.uiBehaviour.m_GuildMineBuffText.SetColor(XSingleton<UiUtility>.singleton.ParseColor(DlgBase<GuildMineMainView, GuildMineMainBehaviour>.singleton.BossColor[(int)num], 0));
+ }
+ }
+ }
+ }
+ }
+
+ public void SetLoadingPrompt(List<string> otherPalyerName, bool canAutoClose = false)
+ {
+ bool flag = !base.IsLoaded() || XSingleton<XGame>.singleton.CurrentStage.Stage != EXStage.World || !XSingleton<XGame>.singleton.SyncMode;
+ if (!flag)
+ {
+ bool flag2 = otherPalyerName == null || otherPalyerName.Count == 0;
+ if (flag2)
+ {
+ this.m_uiBehaviour.m_PromptLabel.SetText(XStringDefineProxy.GetString("WAIT_FOR_OTHERS"));
+ bool flag3 = canAutoClose && this.m_uiBehaviour.m_PromptFrame.gameObject.activeSelf;
+ if (flag3)
+ {
+ this.m_uiBehaviour.m_PromptFrame.gameObject.SetActive(false);
+ }
+ }
+ else
+ {
+ string text = string.Format(XSingleton<UiUtility>.singleton.ReplaceReturn(XSingleton<XStringTable>.singleton.GetString("WAIT_OTHER_PLAYER_PVP")), otherPalyerName.Count, otherPalyerName[0]);
+ this.m_uiBehaviour.m_PromptLabel.SetText(text);
+ }
+ }
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/BattleMain.cs.meta b/Client/Assets/Scripts/XMainClient/UI/BattleMain.cs.meta
new file mode 100644
index 00000000..55707455
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/BattleMain.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: e0a5e8597c688044dad69417bb6e7826
+timeCreated: 1611404698
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/BattleMainBehaviour.cs b/Client/Assets/Scripts/XMainClient/UI/BattleMainBehaviour.cs
new file mode 100644
index 00000000..53a9deab
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/BattleMainBehaviour.cs
@@ -0,0 +1,291 @@
+using System;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class BattleMainBehaviour : DlgBehaviourBase
+ {
+ public IXUISprite m_GuildMineBuff;
+
+ public IXUILabel m_GuildMineBuffText;
+
+ public IXUIButton m_HorseRide;
+
+ public Transform m_canvas;
+
+ public Transform m_RoleInfo;
+
+ public Transform m_PingFrame;
+
+ public IXUISprite m_Hpbar = null;
+
+ public IXUISprite m_Mpbar = null;
+
+ public IXUILabel m_HpText;
+
+ public IXUILabel m_MpText;
+
+ public IXUISprite m_HpBackdrop;
+
+ public IXUISprite m_avatar = null;
+
+ public IXUISprite m_sprFrame = null;
+
+ public IXUITexture m_txtHead = null;
+
+ public IXUILabel m_Level = null;
+
+ public IXUILabel m_Name = null;
+
+ public GameObject m_TeamLeader = null;
+
+ public IXUISlider m_sliderBattery;
+
+ public IXUILabel m_lblTime;
+
+ public IXUILabel m_lblfree;
+
+ public GameObject m_avatarGO = null;
+
+ public IXUILabel m_leftTimes = null;
+
+ public IXUILabel m_winConditionTips = null;
+
+ public IXUILabel m_BattleExplainTips = null;
+
+ public IXUIButton m_pause = null;
+
+ public IXPositionGroup m_pauseGroup = null;
+
+ public IXUISprite m_sprwifi;
+
+ public GameObject m_ComboFrame = null;
+
+ public IXUILabel m_ComboText = null;
+
+ public IXUITweenTool m_ComboTextTween = null;
+
+ public IXUITweenTool m_ComboBgTween = null;
+
+ public IXUIProgress m_ComboBuffTime = null;
+
+ public IXUILabel m_ComboBuffName = null;
+
+ public BattleSkillHandler m_SkillHandler;
+
+ public BattleTargetHandler m_BattleTargetHandler;
+
+ public GameObject m_NoticeFrame = null;
+
+ public IXUILabel m_Notice = null;
+
+ public Vector3 m_NoticePos;
+
+ public Transform m_PromptFrame;
+
+ public IXUILabel m_PromptLabel;
+
+ public BattleIndicateHandler m_IndicateHandler;
+
+ public IXUILabel m_LeftTime = null;
+
+ public BattleWorldBossHandler m_WorldBossHandler;
+
+ public XTeamMonitorHandler m_TeamMonitor;
+
+ public XBattleEnemyInfoHandler m_EnemyInfoHandler;
+
+ public XBattleTeamTowerHandler m_TeamTowerHandler;
+
+ public XBuffMonitorHandler m_PlayerBuffMonitorHandler;
+
+ public GameObject m_DpsPanel;
+
+ public GameObject m_LowHP;
+
+ public IXUISprite m_AutoPlayBorad;
+
+ public IXUISprite m_AutoPlayCancelBoard;
+
+ public IXUIButton m_AutoPlay;
+
+ public IXUIButton m_CancelAuto;
+
+ public IXUILabel m_AutoPlayLock;
+
+ public IXUISprite m_AutoPlayTip;
+
+ public IXUILabel m_lblKill;
+
+ public IXUILabel m_WarTime;
+
+ public IXUILabel m_SceneName;
+
+ public Transform m_CountDownFrame;
+
+ public Transform m_CountDownBeginFrame;
+
+ public Transform m_CountDownTimeFrame;
+
+ public IXUIProgress m_StrengthPresevedBar;
+
+ public Transform m_3D25D;
+
+ public Transform m_SightSelect;
+
+ public IXUIButton m_25D;
+
+ public IXUIButton m_3D;
+
+ public IXUIButton m_3DFree;
+
+ public IXUIButton m_Sight;
+
+ public IXUISprite m_SightPic;
+
+ public IXUISprite m_SelectPic;
+
+ public GameObject m_objBossRush;
+
+ public IXUISprite m_sprBuff1;
+
+ public IXUILabel m_lblBuff1;
+
+ public IXUISprite m_sprBuff2;
+
+ public IXUILabel m_lblBuff2;
+
+ public IXUILabel m_lblTitle;
+
+ public GameObject m_objRwd;
+
+ public IXUISprite m_sprBossbg;
+
+ public XUIPool m_rwdpool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ public GameObject m_SpectateInfo;
+
+ public IXUILabel m_WatchNum;
+
+ public IXUILabel m_CommendNum;
+
+ public IXUILabel m_SkyAreanStage;
+
+ public IXUISimpleList m_Menu;
+
+ public GameObject m_AutoPlayContent;
+
+ public IXUIButton m_BtnDamageStatistics;
+
+ private void Awake()
+ {
+ this.m_canvas = base.transform.Find("_canvas");
+ this.m_RoleInfo = base.transform.Find("_canvas/Bg/Bg");
+ this.m_PingFrame = base.transform.Find("_canvas/Bg/PING");
+ this.m_leftTimes = (base.transform.Find("_canvas/LeftTimes").GetComponent("XUILabel") as IXUILabel);
+ this.m_leftTimes.SetVisible(false);
+ this.m_winConditionTips = (base.transform.Find("_canvas/BattleWinTips").GetComponent("XUILabel") as IXUILabel);
+ this.m_winConditionTips.SetVisible(false);
+ this.m_BattleExplainTips = (base.transform.Find("_canvas/BattleExplainTips").GetComponent("XUILabel") as IXUILabel);
+ Transform transform = this.m_RoleInfo.Find("HpBar");
+ this.m_Hpbar = (transform.Find("BackDrop").GetComponent("XUISprite") as IXUISprite);
+ this.m_HpBackdrop = this.m_Hpbar;
+ Transform transform2 = this.m_RoleInfo.Find("MpBar");
+ this.m_Mpbar = (transform2.Find("BackDrop").GetComponent("XUISprite") as IXUISprite);
+ this.m_HpText = (this.m_RoleInfo.Find("HpText").GetComponent("XUILabel") as IXUILabel);
+ this.m_MpText = (this.m_RoleInfo.Find("MpText").GetComponent("XUILabel") as IXUILabel);
+ this.m_sliderBattery = (this.m_PingFrame.Find("Battery").GetComponent("XUISlider") as IXUISlider);
+ this.m_lblTime = (this.m_PingFrame.Find("TIME").GetComponent("XUILabel") as IXUILabel);
+ this.m_lblfree = (this.m_PingFrame.Find("T2").GetComponent("XUILabel") as IXUILabel);
+ Transform transform3 = this.m_RoleInfo.Find("Avatar");
+ this.m_avatar = (transform3.GetComponent("XUISprite") as IXUISprite);
+ this.m_sprFrame = (transform3.Find("AvatarFrame").GetComponent("XUISprite") as IXUISprite);
+ this.m_txtHead = (this.m_RoleInfo.Find("HeadPanel/Head").GetComponent("XUITexture") as IXUITexture);
+ this.m_Level = (this.m_RoleInfo.Find("CoverPanel/Level").GetComponent("XUILabel") as IXUILabel);
+ this.m_Name = (this.m_RoleInfo.Find("PlayerName").GetComponent("XUILabel") as IXUILabel);
+ this.m_TeamLeader = this.m_RoleInfo.Find("CoverPanel/TeamLeader").gameObject;
+ Transform transform4 = base.transform.Find("_canvas/Pause");
+ this.m_pause = (transform4.GetComponent("XUIButton") as IXUIButton);
+ this.m_pauseGroup = (transform4.GetComponent("PositionGroup") as IXPositionGroup);
+ this.m_sprwifi = (this.m_PingFrame.Find("SysWifi").GetComponent("XUISprite") as IXUISprite);
+ DlgHandlerBase.EnsureCreate<BattleIndicateHandler>(ref this.m_IndicateHandler, base.transform.Find("_canvas/Indicate").gameObject, null, false);
+ this.m_lblKill = (base.transform.Find("_canvas/KillFrame/Label").GetComponent("XUILabel") as IXUILabel);
+ this.m_ComboFrame = base.transform.Find("_canvas/ComboFrame/Frame").gameObject;
+ Transform transform5 = base.transform.Find("_canvas/ComboFrame/Frame/Combo/ComboText");
+ this.m_ComboText = (transform5.GetComponent("XUILabel") as IXUILabel);
+ this.m_ComboTextTween = (transform5.GetComponent("XUIPlayTween") as IXUITweenTool);
+ this.m_ComboBgTween = (base.transform.Find("_canvas/ComboFrame/Frame/Combo").GetComponent("XUIPlayTween") as IXUITweenTool);
+ this.m_ComboFrame.transform.localPosition = Vector3.one * (float)XGameUI._far_far_away;
+ this.m_ComboBuffTime = (base.transform.Find("_canvas/ComboFrame/BuffArmor").GetComponent("XUIProgress") as IXUIProgress);
+ this.m_ComboBuffName = (base.transform.Find("_canvas/ComboFrame/BuffArmor/Buff").GetComponent("XUILabel") as IXUILabel);
+ this.m_ComboBuffTime.gameObject.SetActive(false);
+ this.m_PromptFrame = base.transform.Find("_canvas/PromptFrame");
+ this.m_PromptLabel = (base.transform.Find("_canvas/PromptFrame/Notice").GetComponent("XUILabel") as IXUILabel);
+ this.m_PromptFrame.gameObject.SetActive(false);
+ this.m_NoticeFrame = base.transform.Find("_canvas/NoticeFrame").gameObject;
+ transform5 = base.transform.Find("_canvas/NoticeFrame/Notice");
+ this.m_NoticePos = this.m_NoticeFrame.transform.localPosition;
+ this.m_Notice = (transform5.GetComponent("XUILabel") as IXUILabel);
+ this.m_NoticeFrame.transform.localPosition = XGameUI.Far_Far_Away;
+ this.m_LowHP = base.transform.Find("_canvas/LowHPNotice").gameObject;
+ this.m_LowHP.SetActive(false);
+ this.m_LeftTime = (base.transform.Find("_canvas/LeftTime").GetComponent("XUILabel") as IXUILabel);
+ this.m_LeftTime.SetVisible(false);
+ this.m_WarTime = (base.transform.Find("_canvas/WarTime").GetComponent("XUILabel") as IXUILabel);
+ this.m_WarTime.SetVisible(false);
+ this.m_SceneName = (base.transform.Find("_canvas/Indicate/Bg/Name").GetComponent("XUILabel") as IXUILabel);
+ DlgHandlerBase.EnsureCreate<BattleWorldBossHandler>(ref this.m_WorldBossHandler, base.transform.Find("_canvas/WorldBossFrame").gameObject, null, false);
+ DlgHandlerBase.EnsureCreate<BattleSkillHandler>(ref this.m_SkillHandler, base.transform.Find("_canvas/SkillFrame").gameObject, null, false);
+ DlgHandlerBase.EnsureCreate<XTeamMonitorHandler>(ref this.m_TeamMonitor, base.transform.Find("_canvas/TeamFrame").gameObject, null, false);
+ DlgHandlerBase.EnsureCreate<XBattleEnemyInfoHandler>(ref this.m_EnemyInfoHandler, base.transform.Find("_canvas/EnemyInfoFrame").gameObject, null, true);
+ DlgHandlerBase.EnsureCreate<BattleTargetHandler>(ref this.m_BattleTargetHandler, base.transform.Find("_canvas/BattleTaget").gameObject, null, true);
+ DlgHandlerBase.EnsureCreate<XBattleTeamTowerHandler>(ref this.m_TeamTowerHandler, base.transform.Find("_canvas/TeamTower").gameObject, null, false);
+ DlgHandlerBase.EnsureCreate<XBuffMonitorHandler>(ref this.m_PlayerBuffMonitorHandler, this.m_RoleInfo.Find("BuffFrame").gameObject, null, true);
+ this.m_PlayerBuffMonitorHandler.InitMonitor(XSingleton<XGlobalConfig>.singleton.BuffMaxDisplayCountPlayer, true, true);
+ this.m_AutoPlay = (base.transform.Find("_canvas/Menu/AutoPlayContent/AutoPlayBoard/AutoPlay").GetComponent("XUIButton") as IXUIButton);
+ this.m_AutoPlay.ID = 1UL;
+ this.m_AutoPlayBorad = (base.transform.Find("_canvas/Menu/AutoPlayContent/AutoPlayBoard").GetComponent("XUISprite") as IXUISprite);
+ this.m_AutoPlayCancelBoard = (base.transform.Find("_canvas/Menu/AutoPlayContent/AutoPlayCancel").GetComponent("XUISprite") as IXUISprite);
+ this.m_AutoPlayTip = (base.transform.Find("_canvas/Menu/AutoPlayContent/AutoPlayBoard/Content/Lock").GetComponent("XUISprite") as IXUISprite);
+ this.m_CancelAuto = (base.transform.Find("_canvas/Menu/AutoPlayContent/AutoPlayCancel/AutoPlay").GetComponent("XUIButton") as IXUIButton);
+ this.m_CancelAuto.ID = 0UL;
+ this.m_AutoPlayLock = (base.transform.Find("_canvas/Menu/AutoPlayContent/AutoPlayBoard/Content").GetComponent("XUILabel") as IXUILabel);
+ this.m_CountDownFrame = base.transform.Find("_canvas/CountDownFrame");
+ this.m_CountDownBeginFrame = this.m_CountDownFrame.Find("Begin");
+ this.m_CountDownTimeFrame = this.m_CountDownFrame.Find("Time");
+ this.m_CountDownFrame.gameObject.SetActive(false);
+ this.m_StrengthPresevedBar = (base.transform.Find("_canvas/ChargeBar").GetComponent("XUIProgress") as IXUIProgress);
+ this.m_3D25D = base.transform.Find("_canvas/3D25D");
+ this.m_SightSelect = base.transform.Find("_canvas/3D25D/Select");
+ this.m_25D = (base.transform.Find("_canvas/3D25D/Select/25D").GetComponent("XUIButton") as IXUIButton);
+ this.m_3D = (base.transform.Find("_canvas/3D25D/Select/3D").GetComponent("XUIButton") as IXUIButton);
+ this.m_3DFree = (base.transform.Find("_canvas/3D25D/Select/3DFree").GetComponent("XUIButton") as IXUIButton);
+ this.m_Sight = (base.transform.Find("_canvas/3D25D/Sight").GetComponent("XUIButton") as IXUIButton);
+ this.m_SightPic = (base.transform.Find("_canvas/3D25D/Sight/Content").GetComponent("XUISprite") as IXUISprite);
+ this.m_SelectPic = (base.transform.Find("_canvas/3D25D/Select/Content").GetComponent("XUISprite") as IXUISprite);
+ this.m_objBossRush = base.transform.Find("_canvas/BossRushReward").gameObject;
+ this.m_sprBossbg = (this.m_objBossRush.transform.GetComponent("XUISprite") as IXUISprite);
+ this.m_sprBuff1 = (base.transform.Find("_canvas/BossRushReward/BuffIcon").GetComponent("XUISprite") as IXUISprite);
+ this.m_lblBuff1 = (this.m_sprBuff1.gameObject.transform.Find("T2").GetComponent("XUILabel") as IXUILabel);
+ this.m_sprBuff2 = (base.transform.Find("_canvas/BossRushReward/BuffIcon2").GetComponent("XUISprite") as IXUISprite);
+ this.m_lblBuff2 = (this.m_sprBuff2.gameObject.transform.Find("T2").GetComponent("XUILabel") as IXUILabel);
+ this.m_lblTitle = (base.transform.Find("_canvas/BossRushReward/name").GetComponent("XUILabel") as IXUILabel);
+ this.m_objRwd = base.transform.Find("_canvas/BossRushReward/ItemList/Item").gameObject;
+ this.m_rwdpool.SetupPool(this.m_objRwd.transform.parent.gameObject, this.m_objRwd, 2u, true);
+ this.m_SpectateInfo = base.transform.Find("_canvas/Spectate").gameObject;
+ this.m_WatchNum = (this.m_SpectateInfo.transform.Find("WatchNum").GetComponent("XUILabel") as IXUILabel);
+ this.m_CommendNum = (this.m_SpectateInfo.transform.Find("CommendNum").GetComponent("XUILabel") as IXUILabel);
+ this.m_DpsPanel = base.transform.Find("_canvas/Adlet").gameObject;
+ this.m_SkyAreanStage = (base.transform.Find("_canvas/SkyAreanStage").GetComponent("XUILabel") as IXUILabel);
+ this.m_HorseRide = (base.transform.Find("_canvas/LeftButton/HorseRide").GetComponent("XUIButton") as IXUIButton);
+ this.m_GuildMineBuff = (base.transform.Find("_canvas/GuildMineBuff").GetComponent("XUISprite") as IXUISprite);
+ this.m_GuildMineBuffText = (base.transform.Find("_canvas/GuildMineBuff/T").GetComponent("XUILabel") as IXUILabel);
+ this.m_Menu = (base.transform.Find("_canvas/Menu").GetComponent("XUISimpleList") as IXUISimpleList);
+ this.m_AutoPlayContent = this.m_Menu.gameObject.transform.Find("AutoPlayContent").gameObject;
+ this.m_BtnDamageStatistics = (this.m_Menu.gameObject.transform.Find("BtnDamageStatistics").GetComponent("XUIButton") as IXUIButton);
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/BattleMainBehaviour.cs.meta b/Client/Assets/Scripts/XMainClient/UI/BattleMainBehaviour.cs.meta
new file mode 100644
index 00000000..c6a3bee3
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/BattleMainBehaviour.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 398327a0a5df99344b3a0397f8f44608
+timeCreated: 1611403592
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/BattleMysteriourHandler.cs b/Client/Assets/Scripts/XMainClient/UI/BattleMysteriourHandler.cs
new file mode 100644
index 00000000..8615d1b9
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/BattleMysteriourHandler.cs
@@ -0,0 +1,59 @@
+using System;
+using UILib;
+using UnityEngine;
+
+namespace XMainClient.UI
+{
+ internal class BattleMysteriourHandler : DlgHandlerBase
+ {
+ protected override string FileName
+ {
+ get
+ {
+ return "";
+ }
+ }
+
+ private IXUILabel m_lblLevel;
+
+ private IXUILabel m_lblTime;
+
+ private GameObject[] m_icons = new GameObject[3];
+
+ private IXUISlider m_slider;
+
+ protected override void Init()
+ {
+ base.Init();
+ int i = 0;
+ int num = this.m_icons.Length;
+ while (i < num)
+ {
+ this.m_icons[i] = base.transform.Find(string.Concat(i)).gameObject;
+ i++;
+ }
+ this.m_lblLevel = (base.transform.Find("").GetComponent("") as IXUILabel);
+ this.m_lblTime = (base.transform.Find("").GetComponent("") as IXUILabel);
+ this.m_slider = (base.transform.Find("").GetComponent("") as IXUISlider);
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ this.m_lblLevel.SetText("");
+ this.m_lblTime.SetText("");
+ this.RefreshBuff();
+ }
+
+ private void RefreshBuff()
+ {
+ int i = 0;
+ int num = this.m_icons.Length;
+ while (i < num)
+ {
+ this.m_icons[i].SetActive(false);
+ i++;
+ }
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/BattleMysteriourHandler.cs.meta b/Client/Assets/Scripts/XMainClient/UI/BattleMysteriourHandler.cs.meta
new file mode 100644
index 00000000..2337064b
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/BattleMysteriourHandler.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: f512b001dce7d5f4ea2d334c9b28c505
+timeCreated: 1611404875
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/BattleQTEDlg.cs b/Client/Assets/Scripts/XMainClient/UI/BattleQTEDlg.cs
new file mode 100644
index 00000000..799fa763
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/BattleQTEDlg.cs
@@ -0,0 +1,267 @@
+using System;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.Battle;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class BattleQTEDlg : DlgBase<BattleQTEDlg, BattleQTEDlgBehaviour>
+ {
+ public override string fileName
+ {
+ get
+ {
+ return "Battle/BattleQTEDlg";
+ }
+ }
+
+ public override int layer
+ {
+ get
+ {
+ return 1;
+ }
+ }
+
+ public override bool autoload
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ private XBattleDocument _doc = null;
+
+ private QteUIType _type = QteUIType.Bind;
+
+ private float _abnormal_delta = 0.01f;
+
+ private bool _abnormal_flag = false;
+
+ private int _abnormal_wait = 0;
+
+ private int _abnormal_send_wait = 0;
+
+ private float _charge_value = 0f;
+
+ protected override void Init()
+ {
+ base.Init();
+ this._doc = XDocuments.GetSpecificDocument<XBattleDocument>(XBattleDocument.uuID);
+ }
+
+ public void SetStatus(QteUIType type, bool status)
+ {
+ this._type = type;
+ this.SetVisible(status, true);
+ }
+
+ public void SetChargeValue(float value)
+ {
+ this._charge_value = value;
+ base.uiBehaviour.m_ChargeBar.Value = this._charge_value;
+ }
+
+ public void SetAbnormalValue(float value)
+ {
+ this._abnormal_delta = value;
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ base.uiBehaviour.m_Bind.gameObject.SetActive(this._type == QteUIType.Bind);
+ base.uiBehaviour.m_Abnormal.gameObject.SetActive(this._type == QteUIType.Abnormal);
+ base.uiBehaviour.m_Charge.gameObject.SetActive(this._type == QteUIType.Charge);
+ base.uiBehaviour.m_Block.gameObject.SetActive(this._type != QteUIType.Charge);
+ switch (this._type)
+ {
+ case QteUIType.Bind:
+ {
+ base.uiBehaviour.m_BindLeftButton.SetVisible(true);
+ base.uiBehaviour.m_BindRightButton.SetVisible(false);
+ base.uiBehaviour.m_BindArrow.localPosition = new Vector3(base.uiBehaviour.m_BindLeftButton.parent.gameObject.transform.localPosition.x, 0f);
+ bool flag = DlgBase<BattleMain, BattleMainBehaviour>.singleton.IsLoaded() && DlgBase<BattleMain, BattleMainBehaviour>.singleton.SkillHandler != null;
+ if (flag)
+ {
+ DlgBase<BattleMain, BattleMainBehaviour>.singleton.SkillHandler.SetVisible(false);
+ DlgBase<BattleMain, BattleMainBehaviour>.singleton.SkillHandler.ResetPressState();
+ }
+ break;
+ }
+ case QteUIType.Abnormal:
+ {
+ this._abnormal_flag = true;
+ this._abnormal_wait = 0;
+ this._abnormal_send_wait = 0;
+ base.uiBehaviour.m_AbnormalBar.Value = 0f;
+ base.uiBehaviour.m_AbnormalSuccessTween.gameObject.SetActive(false);
+ base.uiBehaviour.m_AbnormalFailTween.gameObject.SetActive(false);
+ base.uiBehaviour.m_AbnormalHitTween.gameObject.SetActive(false);
+ base.uiBehaviour.m_AbnormalBeginTween.PlayTween(true, -1f);
+ bool flag2 = DlgBase<BattleMain, BattleMainBehaviour>.singleton.IsLoaded() && DlgBase<BattleMain, BattleMainBehaviour>.singleton.SkillHandler != null;
+ if (flag2)
+ {
+ DlgBase<BattleMain, BattleMainBehaviour>.singleton.SkillHandler.SetVisible(false);
+ DlgBase<BattleMain, BattleMainBehaviour>.singleton.SkillHandler.ResetPressState();
+ }
+ break;
+ }
+ case QteUIType.Charge:
+ base.uiBehaviour.m_ChargeBar.Value = this._charge_value;
+ break;
+ }
+ }
+
+ protected override void OnHide()
+ {
+ base.OnHide();
+ QteUIType type = this._type;
+ if (type > QteUIType.Abnormal)
+ {
+ if (type != QteUIType.Charge)
+ {
+ }
+ }
+ else
+ {
+ bool flag = DlgBase<BattleMain, BattleMainBehaviour>.singleton.IsLoaded() && DlgBase<BattleMain, BattleMainBehaviour>.singleton.SkillHandler != null;
+ if (flag)
+ {
+ DlgBase<BattleMain, BattleMainBehaviour>.singleton.SkillHandler.SetVisible(true);
+ }
+ }
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ base.uiBehaviour.m_BindLeftButton.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnBindLeftButtonClick));
+ base.uiBehaviour.m_BindRightButton.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnBindRightButtonClick));
+ base.uiBehaviour.m_AbnormalClickSpace.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnAbnormalClicked));
+ }
+
+ private void OnBindLeftButtonClick(IXUISprite sp)
+ {
+ base.uiBehaviour.m_BindLeftButton.SetVisible(false);
+ base.uiBehaviour.m_BindRightButton.SetVisible(true);
+ base.uiBehaviour.m_BindArrow.localPosition = new Vector3(base.uiBehaviour.m_BindRightButton.parent.gameObject.transform.localPosition.x, 0f);
+ this.SendBindOperation();
+ }
+
+ private void OnBindRightButtonClick(IXUISprite sp)
+ {
+ base.uiBehaviour.m_BindLeftButton.SetVisible(true);
+ base.uiBehaviour.m_BindRightButton.SetVisible(false);
+ base.uiBehaviour.m_BindArrow.localPosition = new Vector3(base.uiBehaviour.m_BindLeftButton.parent.gameObject.transform.localPosition.x, 0f);
+ this.SendBindOperation();
+ }
+
+ private void OnAbnormalClicked(IXUISprite sp)
+ {
+ bool flag = !this._abnormal_flag;
+ if (!flag)
+ {
+ this._abnormal_flag = false;
+ bool flag2 = base.uiBehaviour.m_AbnormalLeftTarget.localPosition.x <= base.uiBehaviour.m_AbnormalThumb.localPosition.x && base.uiBehaviour.m_AbnormalRightTarget.localPosition.x >= base.uiBehaviour.m_AbnormalThumb.localPosition.x;
+ if (flag2)
+ {
+ base.uiBehaviour.m_AbnormalSuccessTween.PlayTween(true, -1f);
+ base.uiBehaviour.m_AbnormalHitTween.PlayTween(true, -1f);
+ this._abnormal_send_wait = 30;
+ }
+ else
+ {
+ base.uiBehaviour.m_AbnormalFailTween.PlayTween(true, -1f);
+ this._abnormal_wait = 30;
+ }
+ }
+ }
+
+ private void SendCheckAbnormalOperation()
+ {
+ PtcC2G_QTEOperation ptcC2G_QTEOperation = new PtcC2G_QTEOperation();
+ ptcC2G_QTEOperation.Data.type = 2u;
+ ptcC2G_QTEOperation.Data.monsterid = (ulong)((long)this._doc.AbnormalBuffID);
+ XSingleton<XClientNetwork>.singleton.Send(ptcC2G_QTEOperation);
+ }
+
+ private void SendBindOperation()
+ {
+ bool syncMode = XSingleton<XGame>.singleton.SyncMode;
+ if (syncMode)
+ {
+ PtcC2G_QTEOperation ptcC2G_QTEOperation = new PtcC2G_QTEOperation();
+ ptcC2G_QTEOperation.Data.type = 2u;
+ ptcC2G_QTEOperation.Data.monsterid = (ulong)((long)this._doc.BindBuffID);
+ XSingleton<XClientNetwork>.singleton.Send(ptcC2G_QTEOperation);
+ }
+ else
+ {
+ XBuff xbuff = null;
+ bool flag = XSingleton<XEntityMgr>.singleton.Player != null;
+ if (flag)
+ {
+ xbuff = XSingleton<XEntityMgr>.singleton.Player.Buffs.GetBuffByID(this._doc.BindBuffID);
+ }
+ bool flag2 = xbuff != null;
+ if (flag2)
+ {
+ bool flag3 = XSingleton<XEntityMgr>.singleton.Player.Attributes.GetAttr(XAttributeDefine.XAttr_PhysicalAtkMod_Total) > XSingleton<XEntityMgr>.singleton.Player.Attributes.GetAttr(XAttributeDefine.XAttr_MagicAtkMod_Total);
+ double attr;
+ if (flag3)
+ {
+ attr = XSingleton<XEntityMgr>.singleton.Player.Attributes.GetAttr(XAttributeDefine.XAttr_PhysicalAtkMod_Total);
+ }
+ else
+ {
+ attr = XSingleton<XEntityMgr>.singleton.Player.Attributes.GetAttr(XAttributeDefine.XAttr_MagicAtkMod_Total);
+ }
+ xbuff.ChangeBuffHP((double)((float)(-(float)attr)));
+ }
+ }
+ }
+
+ public override void OnUpdate()
+ {
+ base.OnUpdate();
+ QteUIType type = this._type;
+ if (type == QteUIType.Abnormal)
+ {
+ bool flag = this._abnormal_wait != 0;
+ if (flag)
+ {
+ this._abnormal_wait--;
+ bool flag2 = this._abnormal_wait == 0;
+ if (flag2)
+ {
+ this._abnormal_flag = true;
+ }
+ }
+ bool flag3 = this._abnormal_send_wait != 0;
+ if (flag3)
+ {
+ this._abnormal_send_wait--;
+ bool flag4 = this._abnormal_send_wait == 0;
+ if (flag4)
+ {
+ this.SendCheckAbnormalOperation();
+ }
+ }
+ bool abnormal_flag = this._abnormal_flag;
+ if (abnormal_flag)
+ {
+ base.uiBehaviour.m_AbnormalBar.Value += this._abnormal_delta;
+ bool flag5 = base.uiBehaviour.m_AbnormalBar.Value == 1f || base.uiBehaviour.m_AbnormalBar.Value == 0f;
+ if (flag5)
+ {
+ this._abnormal_delta = -this._abnormal_delta;
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/BattleQTEDlg.cs.meta b/Client/Assets/Scripts/XMainClient/UI/BattleQTEDlg.cs.meta
new file mode 100644
index 00000000..beeb65d9
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/BattleQTEDlg.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 3f70a31e74a13514f86a7edb9d06b307
+timeCreated: 1611403611
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/BattleRecordGameInfo.cs b/Client/Assets/Scripts/XMainClient/UI/BattleRecordGameInfo.cs
new file mode 100644
index 00000000..649760ae
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/BattleRecordGameInfo.cs
@@ -0,0 +1,19 @@
+using System;
+using System.Collections.Generic;
+using KKSG;
+
+namespace XMainClient.UI
+{
+ internal class BattleRecordGameInfo
+ {
+ public List<BattleRecordPlayerInfo> left = new List<BattleRecordPlayerInfo>();
+
+ public List<BattleRecordPlayerInfo> right = new List<BattleRecordPlayerInfo>();
+
+ public HeroBattleOver result;
+
+ public int point2V2;
+
+ public uint militaryExploit;
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/BattleRecordGameInfo.cs.meta b/Client/Assets/Scripts/XMainClient/UI/BattleRecordGameInfo.cs.meta
new file mode 100644
index 00000000..e97de5c0
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/BattleRecordGameInfo.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: c7b4de47fb273cd4db711f9487ff9090
+timeCreated: 1611404532
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/BattleRecordHandler.cs b/Client/Assets/Scripts/XMainClient/UI/BattleRecordHandler.cs
new file mode 100644
index 00000000..997a614c
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/BattleRecordHandler.cs
@@ -0,0 +1,177 @@
+using System;
+using System.Collections.Generic;
+using KKSG;
+using UILib;
+using UnityEngine;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class BattleRecordHandler : DlgHandlerBase
+ {
+ public IXUIButton m_RecordCloseBtn;
+
+ public XUIPool m_RecordMemberPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ public XUIPool m_RecordMessagePool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ public GameObject m_RecordEmpty;
+
+ public Transform m_BattleRecordJustShowTips;
+
+ public IXUIScrollView m_ScrollView;
+
+ protected override void Init()
+ {
+ base.Init();
+ this.m_RecordCloseBtn = (base.PanelObject.transform.Find("Close").GetComponent("XUIButton") as IXUIButton);
+ Transform transform = base.PanelObject.transform.Find("Message/Tpl");
+ this.m_RecordMemberPool.SetupPool(transform.parent.gameObject, transform.gameObject, 32u, false);
+ transform = base.PanelObject.transform.Find("Message/MessTpl");
+ this.m_RecordMessagePool.SetupPool(transform.parent.gameObject, transform.gameObject, 4u, false);
+ this.m_RecordEmpty = base.PanelObject.transform.Find("Empty").gameObject;
+ this.m_BattleRecordJustShowTips = base.PanelObject.transform.Find("Message/JustShow");
+ this.m_ScrollView = (base.PanelObject.transform.Find("Message").GetComponent("XUIScrollView") as IXUIScrollView);
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ this.m_RecordCloseBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnBattleRecordCloseBtnClick));
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ }
+
+ public void SetupRecord(List<BattleRecordGameInfo> RecordList)
+ {
+ base.SetVisible(true);
+ this.m_RecordMemberPool.ReturnAll(true);
+ this.m_RecordMessagePool.ReturnAll(false);
+ this.m_RecordEmpty.SetActive(RecordList.Count == 0);
+ Vector3 tplPos = this.m_RecordMessagePool.TplPos;
+ for (int i = 0; i < RecordList.Count; i++)
+ {
+ GameObject gameObject = this.m_RecordMessagePool.FetchGameObject(false);
+ gameObject.transform.localPosition = new Vector3(tplPos.x, tplPos.y - (float)(i * this.m_RecordMessagePool.TplHeight));
+ IXUISprite ixuisprite = gameObject.transform.Find("res").GetComponent("XUISprite") as IXUISprite;
+ Transform transform = gameObject.transform.Find("MilitaryValue");
+ bool flag = transform != null;
+ if (flag)
+ {
+ IXUILabel ixuilabel = transform.GetComponent("XUILabel") as IXUILabel;
+ bool flag2 = RecordList[i].result == HeroBattleOver.HeroBattleOver_Lose;
+ if (flag2)
+ {
+ ixuilabel.SetText("-" + RecordList[i].militaryExploit.ToString());
+ }
+ else
+ {
+ ixuilabel.SetText("+" + RecordList[i].militaryExploit.ToString());
+ }
+ }
+ transform = gameObject.transform.Find("Point2V2");
+ bool flag3 = transform != null;
+ if (flag3)
+ {
+ IXUILabel ixuilabel2 = transform.GetComponent("XUILabel") as IXUILabel;
+ bool flag4 = RecordList[i].point2V2 >= 0;
+ if (flag4)
+ {
+ ixuilabel2.SetText("+" + RecordList[i].point2V2.ToString());
+ }
+ else
+ {
+ ixuilabel2.SetText("-" + (-RecordList[i].point2V2).ToString());
+ }
+ }
+ switch (RecordList[i].result)
+ {
+ case HeroBattleOver.HeroBattleOver_Win:
+ ixuisprite.spriteName = "bhdz_win";
+ break;
+ case HeroBattleOver.HeroBattleOver_Lose:
+ ixuisprite.spriteName = "bhdz_lose";
+ break;
+ case HeroBattleOver.HeroBattleOver_Draw:
+ ixuisprite.spriteName = "bhdz_p";
+ break;
+ }
+ this.SetupRecordTeam(RecordList[i].left, gameObject.transform.Find("MyTeam"));
+ this.SetupRecordTeam(RecordList[i].right, gameObject.transform.Find("OtherTeam"));
+ }
+ this.m_BattleRecordJustShowTips.gameObject.SetActive(RecordList.Count == 10);
+ bool flag5 = RecordList.Count == 10;
+ if (flag5)
+ {
+ this.m_BattleRecordJustShowTips.localPosition = new Vector3(tplPos.x, tplPos.y - (float)(10 * this.m_RecordMessagePool.TplHeight));
+ }
+ this.m_ScrollView.ResetPosition();
+ }
+
+ private void SetupRecordTeam(List<BattleRecordPlayerInfo> list, Transform parent)
+ {
+ for (int i = 0; i < list.Count; i++)
+ {
+ GameObject gameObject = this.m_RecordMemberPool.FetchGameObject(false);
+ gameObject.transform.parent = parent;
+ gameObject.transform.localPosition = new Vector3((float)(i * this.m_RecordMemberPool.TplWidth), 0f);
+ IXUISprite ixuisprite = gameObject.transform.Find("Icon").GetComponent("XUISprite") as IXUISprite;
+ IXUILabel ixuilabel = gameObject.transform.Find("Name").GetComponent("XUILabel") as IXUILabel;
+ ixuisprite.spriteName = XSingleton<XProfessionSkillMgr>.singleton.GetProfHeadIcon((int)list[i].profression);
+ bool flag = list[i].roleID == XSingleton<XAttributeMgr>.singleton.XPlayerData.RoleID;
+ if (flag)
+ {
+ ixuilabel.SetText(XStringDefineProxy.GetString("ME"));
+ ixuisprite.RegisterSpriteClickEventHandler(null);
+ }
+ else
+ {
+ ixuilabel.SetText(this.CutString(list[i].name));
+ ixuisprite.ID = list[i].roleID;
+ ixuisprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnHeadClicked));
+ }
+ }
+ }
+
+ public string CutString(string str)
+ {
+ int num = 4;
+ int num2 = 0;
+ string text = "";
+ foreach (char c in str)
+ {
+ num2++;
+ bool flag = num2 > num;
+ if (flag)
+ {
+ text += "..";
+ break;
+ }
+ text += c.ToString();
+ }
+ return text;
+ }
+
+ private void OnHeadClicked(IXUISprite iSp)
+ {
+ bool flag = iSp.ID > 0UL;
+ if (flag)
+ {
+ XCharacterCommonMenuDocument.ReqCharacterMenuInfo(iSp.ID, false);
+ }
+ else
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XSingleton<XStringTable>.singleton.GetString("CAPTAIN_PLAYERS_DIFFERENT_SERVER"), "fece00");
+ }
+ }
+
+ private bool OnBattleRecordCloseBtnClick(IXUIButton btn)
+ {
+ base.SetVisible(false);
+ return true;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/BattleRecordHandler.cs.meta b/Client/Assets/Scripts/XMainClient/UI/BattleRecordHandler.cs.meta
new file mode 100644
index 00000000..527ec822
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/BattleRecordHandler.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: f577f4b7eaac1c248867558276a84f0b
+timeCreated: 1611404876
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/BattleRecordPlayerInfo.cs b/Client/Assets/Scripts/XMainClient/UI/BattleRecordPlayerInfo.cs
new file mode 100644
index 00000000..a6f81fe8
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/BattleRecordPlayerInfo.cs
@@ -0,0 +1,13 @@
+using System;
+
+namespace XMainClient.UI
+{
+ internal class BattleRecordPlayerInfo
+ {
+ public string name;
+
+ public uint profression;
+
+ public ulong roleID;
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/BattleRecordPlayerInfo.cs.meta b/Client/Assets/Scripts/XMainClient/UI/BattleRecordPlayerInfo.cs.meta
new file mode 100644
index 00000000..c4611d89
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/BattleRecordPlayerInfo.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 6d7ce280b5cdb264d811a2ce17d67f8a
+timeCreated: 1611403901
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/BattleRiftHandler.cs b/Client/Assets/Scripts/XMainClient/UI/BattleRiftHandler.cs
new file mode 100644
index 00000000..bae05e22
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/BattleRiftHandler.cs
@@ -0,0 +1,202 @@
+using System;
+using System.Collections.Generic;
+using KKSG;
+using UILib;
+using UnityEngine;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class BattleRiftHandler : DlgHandlerBase
+ {
+ protected override string FileName
+ {
+ get
+ {
+ return "Battle/TeamMysteriousBattleDlg";
+ }
+ }
+
+ private XRiftDocument _doc;
+
+ private const int max_buff = 5;
+
+ public uint s_time = 0u;
+
+ private uint all_time = 0u;
+
+ private uint tri_time = 0u;
+
+ private uint dob_time = 0u;
+
+ private uint sceneid;
+
+ public IXUIProgress m_progress;
+
+ public IXUILabel m_lblFloor;
+
+ public IXUILabel m_lblTime1;
+
+ public IXUILabel m_lblTime2;
+
+ private IXUILabel m_lbltip;
+
+ public GameObject[] m_goBuff = new GameObject[5];
+
+ private float dtime = 0f;
+
+ protected override void Init()
+ {
+ base.Init();
+ this._doc = XDocuments.GetSpecificDocument<XRiftDocument>(XRiftDocument.uuID);
+ this.m_lblFloor = (base.transform.Find("Floor").GetComponent("XUILabel") as IXUILabel);
+ this.m_lblTime1 = (base.transform.Find("Time").GetComponent("XUILabel") as IXUILabel);
+ this.m_lblTime2 = (base.transform.Find("Time2").GetComponent("XUILabel") as IXUILabel);
+ this.m_lbltip = (base.transform.Find("Buff/Tip").GetComponent("XUILabel") as IXUILabel);
+ this.m_progress = (base.transform.Find("Progress Bar").GetComponent("XUIProgress") as IXUIProgress);
+ for (int i = 0; i < 5; i++)
+ {
+ this.m_goBuff[i] = base.transform.Find("Buff/BossBuff" + i).gameObject;
+ }
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ this.ParseData();
+ bool flag = this._doc.scene_rift_data != null;
+ if (flag)
+ {
+ this.Refresh((float)this._doc.scene_rift_data.floor, this._doc.scene_rift_data.buffIDs);
+ }
+ this.m_lbltip.SetVisible(false);
+ }
+
+ public void Refresh(float floor, List<Buff> buffs)
+ {
+ this.m_lblFloor.SetText(floor.ToString());
+ this.RefreshBuff(buffs);
+ }
+
+ public override void OnUpdate()
+ {
+ base.OnUpdate();
+ bool flag = Time.time - this.dtime > 1f && this._doc != null && !this._doc.stop_timer;
+ if (flag)
+ {
+ this.dtime = Time.time;
+ this.s_time += 1u;
+ this.RefreshTime();
+ }
+ }
+
+ private void RefreshTime()
+ {
+ float value = 1f - this.s_time / this.all_time;
+ this.m_progress.value = value;
+ this.m_lblTime1.SetText(this.TranNum2Date(this.all_time - this.s_time));
+ bool flag = this.s_time < this.tri_time;
+ if (flag)
+ {
+ this.m_lblTime2.SetText(this.TranNum2Date(this.tri_time - this.s_time));
+ }
+ else
+ {
+ bool flag2 = this.s_time < this.tri_time + this.dob_time;
+ if (flag2)
+ {
+ this.m_lblTime2.SetText(this.TranNum2Date(this.tri_time + this.dob_time - this.s_time));
+ }
+ else
+ {
+ this.m_lblTime2.SetText(this.TranNum2Date(this.all_time - this.s_time));
+ }
+ }
+ }
+
+ private void ParseData()
+ {
+ this.sceneid = XSingleton<XScene>.singleton.SceneID;
+ SceneTable.RowData sceneData = XSingleton<XSceneMgr>.singleton.GetSceneData(this.sceneid);
+ for (int i = 0; i < (int)sceneData.LoseCondition.count; i++)
+ {
+ bool flag = sceneData.LoseCondition[i, 0] == 3;
+ if (flag)
+ {
+ this.all_time = (uint)sceneData.LoseCondition[i, 1];
+ }
+ }
+ for (int j = 0; j < XLevelRewardDocument.Table.Table.Length; j++)
+ {
+ bool flag2 = XLevelRewardDocument.Table.Table[j].scendid == this.sceneid;
+ if (flag2)
+ {
+ this.tri_time = XLevelRewardDocument.Table.Table[j].star3[2];
+ this.dob_time = XLevelRewardDocument.Table.Table[j].star2[2] - this.tri_time;
+ break;
+ }
+ }
+ }
+
+ private string TranNum2Date(uint num)
+ {
+ uint num2 = num / 60u;
+ uint num3 = num % 60u;
+ return num2.ToString("D2") + ":" + num3.ToString("D2");
+ }
+
+ private void RefreshBuff(List<Buff> buffs)
+ {
+ int num = buffs.Count + 2;
+ XTeamDocument specificDocument = XDocuments.GetSpecificDocument<XTeamDocument>(XTeamDocument.uuID);
+ Rift.RowData rowData = this._doc.currRiftRow;
+ bool flag = specificDocument.MyTeam != null && specificDocument.MyTeam.teamBrief != null && specificDocument.MyTeam.teamBrief.rift != null;
+ if (flag)
+ {
+ XTeamRift rift = specificDocument.MyTeam.teamBrief.rift;
+ rowData = this._doc.GetRiftData(rift.floor, (int)rift.id);
+ }
+ this.RefreshBuff(this.m_goBuff[0], string.Empty, XSingleton<XGlobalConfig>.singleton.GetValue("RiftAttr"), rowData.attack + "%");
+ this.RefreshBuff(this.m_goBuff[1], string.Empty, XSingleton<XGlobalConfig>.singleton.GetValue("RiftHP"), rowData.hp + "%");
+ for (int i = 2; i < num; i++)
+ {
+ RiftBuffSuitMonsterType.RowData buffSuitRow = this._doc.GetBuffSuitRow((uint)buffs[i - 2].buffID, buffs[i - 2].buffLevel);
+ this.m_goBuff[i].SetActive(true);
+ this.RefreshBuff(this.m_goBuff[i], buffSuitRow.atlas, buffSuitRow.icon, string.Empty);
+ IXUISprite ixuisprite = this.m_goBuff[i].transform.Find("P").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.ID = (ulong)((long)(i - 2));
+ ixuisprite.RegisterSpritePressEventHandler(new SpritePressEventHandler(this.OnBuffPress));
+ }
+ for (int j = num; j < this.m_goBuff.Length; j++)
+ {
+ this.m_goBuff[j].SetActive(false);
+ }
+ }
+
+ private bool OnBuffPress(IXUISprite spr, bool ispress)
+ {
+ int index = (int)spr.ID;
+ Buff buff = this._doc.scene_rift_data.buffIDs[index];
+ RiftBuffSuitMonsterType.RowData buffSuitRow = this._doc.GetBuffSuitRow((uint)buff.buffID, buff.buffLevel);
+ this.m_lbltip.SetText(XSingleton<UiUtility>.singleton.ReplaceReturn(buffSuitRow.scription));
+ this.m_lbltip.SetVisible(ispress);
+ return true;
+ }
+
+ private void RefreshBuff(GameObject go, string atlas, string sp, string text)
+ {
+ IXUILabel ixuilabel = go.transform.Find("value").GetComponent("XUILabel") as IXUILabel;
+ IXUISprite ixuisprite = go.transform.Find("P").GetComponent("XUISprite") as IXUISprite;
+ ixuilabel.SetText(text);
+ bool flag = string.IsNullOrEmpty(atlas);
+ if (flag)
+ {
+ ixuisprite.SetSprite(sp);
+ }
+ else
+ {
+ ixuisprite.SetSprite(sp, atlas, false);
+ }
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/BattleRiftHandler.cs.meta b/Client/Assets/Scripts/XMainClient/UI/BattleRiftHandler.cs.meta
new file mode 100644
index 00000000..e27c2645
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/BattleRiftHandler.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 1b0f9a44322e30a448348f5597147796
+timeCreated: 1611403313
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/BattleShareHandler.cs b/Client/Assets/Scripts/XMainClient/UI/BattleShareHandler.cs
new file mode 100644
index 00000000..f8f8cd67
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/BattleShareHandler.cs
@@ -0,0 +1,84 @@
+using System;
+using UILib;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class BattleShareHandler : DlgHandlerBase
+ {
+ private XHeroBattleDocument _doc = null;
+
+ public IXUISprite mQQFrame;
+
+ public IXUISprite mWeChatFrame;
+
+ public IXUIButton mQQBtn1;
+
+ public IXUIButton mQQBtn2;
+
+ public IXUIButton mWeChatBtn1;
+
+ public IXUIButton mWeChatBtn2;
+
+ public IXUISprite mQQBackClick;
+
+ public IXUISprite mWeChatBackClick;
+
+ public IXUIButton mReqShareBtn;
+
+ protected override void Init()
+ {
+ base.Init();
+ this._doc = XDocuments.GetSpecificDocument<XHeroBattleDocument>(XHeroBattleDocument.uuID);
+ this.mQQFrame = (base.PanelObject.transform.Find("/QQ").GetComponent("XUISprite") as IXUISprite);
+ this.mWeChatFrame = (base.PanelObject.transform.Find("Wc").GetComponent("XUISprite") as IXUISprite);
+ this.mQQBtn1 = (base.PanelObject.transform.Find("QQ/QQ1").GetComponent("XUIButton") as IXUIButton);
+ this.mQQBtn2 = (base.PanelObject.transform.Find("QQ/QQ2").GetComponent("XUIButton") as IXUIButton);
+ this.mWeChatBtn1 = (base.PanelObject.transform.Find("Wc/Wc1").GetComponent("XUIButton") as IXUIButton);
+ this.mWeChatBtn2 = (base.PanelObject.transform.Find("Wc/Wc2").GetComponent("XUIButton") as IXUIButton);
+ this.mQQBackClick = (base.transform.Find("QQ/back").GetComponent("XUISprite") as IXUISprite);
+ this.mWeChatBackClick = (base.transform.Find("Wc/back").GetComponent("XUISprite") as IXUISprite);
+ this.mReqShareBtn = (base.transform.Find("SwitchAccount").GetComponent("XUIButton") as IXUIButton);
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ this.mReqShareBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.ReqShare));
+ this.mQQBackClick.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnCloseShare));
+ this.mWeChatBackClick.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnCloseShare));
+ }
+
+ public override void OnUnload()
+ {
+ base.OnUnload();
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ }
+
+ public bool ReqShare(IXUIButton btn)
+ {
+ bool flag = XSingleton<XLoginDocument>.singleton.Channel == XAuthorizationChannel.XAuthorization_QQ;
+ if (flag)
+ {
+ this.mQQFrame.SetVisible(true);
+ this.mWeChatFrame.SetVisible(false);
+ }
+ else
+ {
+ this.mQQFrame.SetVisible(false);
+ this.mWeChatFrame.SetVisible(true);
+ }
+ return true;
+ }
+
+ public void OnCloseShare(IXUISprite sp)
+ {
+ this.mQQFrame.SetVisible(false);
+ this.mWeChatFrame.SetVisible(false);
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/BattleShareHandler.cs.meta b/Client/Assets/Scripts/XMainClient/UI/BattleShareHandler.cs.meta
new file mode 100644
index 00000000..d420dbe0
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/BattleShareHandler.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 3b509f994acd342499f057f8b3687a4b
+timeCreated: 1611403598
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/BattleSkillHandler.cs b/Client/Assets/Scripts/XMainClient/UI/BattleSkillHandler.cs
new file mode 100644
index 00000000..68397aba
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/BattleSkillHandler.cs
@@ -0,0 +1,1273 @@
+using System;
+using System.Collections.Generic;
+using KKSG;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUpdater;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class BattleSkillHandler : DlgHandlerBase
+ {
+ public bool IsAwakeSlotSettingOn
+ {
+ get
+ {
+ XOptionsDocument specificDocument = XDocuments.GetSpecificDocument<XOptionsDocument>(XOptionsDocument.uuID);
+ bool flag = specificDocument != null;
+ return !flag || specificDocument.GetValue(XOptionsDefine.OD_Awake_Slot) != 0;
+ }
+ }
+
+ private BattleSkillHandler.XSkillButton[] m_buttons = null;
+
+ private XBattleSkillDocument _doc = null;
+
+ private XSkillTreeDocument _skill_doc = null;
+
+ public float LastAttackTime = 0f;
+
+ private bool bNormalAttackPressed = false;
+
+ private XTimerMgr.ElapsedEventHandler _DestroyShowSkillFx = null;
+
+ private IXGameSirControl m_sirControl;
+
+ private List<string[]> mSkillSets;
+
+ private int mSkillSize = 0;
+
+ private XFx _addFx;
+
+ private XFx _skillFx;
+
+ private XFx _moveFx;
+
+ private int _showSkillNum;
+
+ private uint _fxDelayToken;
+
+ private uint _fxDelayDelToken;
+
+ private XUIPool m_LevelPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ private float _pressTime;
+
+ private List<string>[] skillSet = new List<string>[10];
+
+ public struct XSkillButton
+ {
+ public bool Visible
+ {
+ get
+ {
+ return this.m_visible;
+ }
+ }
+
+ public bool Enabled
+ {
+ get
+ {
+ return this.m_enabled;
+ }
+ }
+
+ public bool Active;
+
+ public bool AlwaysHot;
+
+ public IXUIButton m_skill;
+
+ public IXUISprite m_skillIcon;
+
+ public IXUIProgress m_skillCD;
+
+ public IXUITweenTool m_skillCDOver;
+
+ public GameObject m_skillNoMp;
+
+ public IXUILabel m_skillCDText;
+
+ public float m_skillCost;
+
+ public uint m_skillId;
+
+ public GameObject m_skillHighlight;
+
+ public IXUISprite m_lock;
+
+ public IXUISprite m_add;
+
+ public IXUISprite m_skillLevel;
+
+ public int m_skillMaxLevel;
+
+ public bool m_TimesVis;
+
+ public IXUILabel m_Times;
+
+ private bool m_enabled;
+
+ private bool m_visible;
+
+ private Vector3 m_OriginPos;
+
+ private Vector3 m_CDOverOriginPos;
+
+ public XSkillButton(GameObject panelObject, int idx)
+ {
+ this.AlwaysHot = false;
+ this.Active = true;
+ this.m_visible = true;
+ this.m_TimesVis = false;
+ Transform transform = panelObject.transform.Find("Skill" + idx + "/Bg");
+ this.m_OriginPos = transform.transform.localPosition;
+ this.m_skill = (transform.GetComponent("XUIButton") as IXUIButton);
+ this.m_skill.ID = (ulong)((long)idx);
+ bool flag = XSingleton<XScene>.singleton.SceneType == SceneType.SCENE_MOBA && idx >= 2 && idx <= 5;
+ if (flag)
+ {
+ Transform transform2 = transform.transform.parent.Find("Addsp");
+ transform2.gameObject.SetActive(true);
+ this.m_add = (transform2.GetComponent("XUISprite") as IXUISprite);
+ transform2.gameObject.SetActive(false);
+ transform2 = transform.transform.Find("level");
+ transform2.gameObject.SetActive(true);
+ this.m_skillLevel = (transform2.GetComponent("XUISprite") as IXUISprite);
+ this.m_skillLevel.SetFillAmount(0f);
+ }
+ else
+ {
+ bool flag2 = XSingleton<XScene>.singleton.SceneType == SceneType.SCENE_WEEKEND4V4_CRAZYBOMB & idx == 0;
+ if (flag2)
+ {
+ this.m_add = null;
+ Transform transform3 = transform.transform.Find("level");
+ transform3.gameObject.SetActive(true);
+ this.m_skillLevel = (transform3.GetComponent("XUISprite") as IXUISprite);
+ this.m_skillLevel.SetFillAmount(0f);
+ transform3 = transform.transform.Find("icon/p");
+ transform3.gameObject.SetActive(false);
+ }
+ else
+ {
+ bool flag3 = XSingleton<XScene>.singleton.SceneType == SceneType.SCENE_SURVIVE && idx == 0;
+ if (flag3)
+ {
+ this.m_add = null;
+ this.m_skillLevel = null;
+ Transform transform4 = transform.transform.Find("icon");
+ Transform transform5 = transform.transform.Find("ChickenDinnerIcon");
+ transform5.gameObject.SetActive(true);
+ transform5.localPosition = XGameUI.Far_Far_Away;
+ IXUISprite ixuisprite = transform4.GetComponent("XUISprite") as IXUISprite;
+ IXUISprite ixuisprite2 = transform5.GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.spriteWidth = ixuisprite2.spriteWidth;
+ ixuisprite.spriteHeight = ixuisprite2.spriteHeight;
+ transform4.rotation = transform5.rotation;
+ }
+ else
+ {
+ this.m_add = null;
+ this.m_skillLevel = null;
+ }
+ }
+ }
+ this.m_skillMaxLevel = 0;
+ bool flag4 = (idx >= 2 && idx <= 6) || idx == XSkillTreeDocument.AwakeSkillSlot;
+ if (flag4)
+ {
+ this.m_Times = (transform.transform.Find("icon/Times").GetComponent("XUILabel") as IXUILabel);
+ this.m_Times.gameObject.transform.localPosition = XGameUI.Far_Far_Away;
+ }
+ else
+ {
+ this.m_Times = null;
+ }
+ this.m_skillIcon = (transform.transform.Find("icon").GetComponent("XUISprite") as IXUISprite);
+ this.m_skillCD = (this.m_skillIcon.gameObject.GetComponent("XUIProgress") as IXUIProgress);
+ this.m_skillCDOver = (this.m_skillIcon.transform.Find("cdover").GetComponent("XUIPlayTween") as IXUITweenTool);
+ this.m_CDOverOriginPos = this.m_skillCDOver.gameObject.transform.localPosition;
+ this.m_skillCDOver.gameObject.transform.localPosition = XGameUI.Far_Far_Away;
+ this.m_skillCDText = (this.m_skillIcon.transform.Find("Text").GetComponent("XUILabel") as IXUILabel);
+ this.m_skillNoMp = this.m_skillIcon.transform.Find("nomp").gameObject;
+ this.m_skillHighlight = transform.transform.Find("highlight").gameObject;
+ this.m_skillHighlight.transform.localPosition = XGameUI.Far_Far_Away;
+ this.m_lock = null;
+ Transform transform6 = transform.transform.Find("lock");
+ bool flag5 = transform6 != null;
+ if (flag5)
+ {
+ this.m_lock = (transform6.GetComponent("XUISprite") as IXUISprite);
+ this.m_lock.gameObject.SetActive(false);
+ }
+ this.m_skillCost = 0f;
+ this.m_skillId = 0u;
+ this.m_enabled = true;
+ }
+
+ public void SetButtonStatus(bool enable)
+ {
+ bool flag = this.m_enabled != enable;
+ if (flag)
+ {
+ if (enable)
+ {
+ this.m_skill.SetEnable(true, false);
+ }
+ else
+ {
+ this.m_skillNoMp.transform.localPosition = XGameUI.Far_Far_Away;
+ this.m_skill.SetEnable(false, this.m_skill.ID == 0UL);
+ }
+ }
+ this.m_enabled = enable;
+ }
+
+ public void SetButtonHighlight(bool enable)
+ {
+ this.m_skillHighlight.transform.localPosition = (enable ? Vector3.zero : XGameUI.Far_Far_Away);
+ }
+
+ public void SetButtonInRange(bool enable)
+ {
+ }
+
+ public void SetButton(bool active)
+ {
+ this.m_visible = active;
+ this.m_skill.SetVisible(active);
+ }
+
+ public void SetCDText(bool active)
+ {
+ this.m_skillCDText.gameObject.transform.localPosition = (active ? Vector3.zero : XGameUI.Far_Far_Away);
+ }
+
+ public void SetCDOver(bool active)
+ {
+ }
+
+ public void SetNoMP(bool active)
+ {
+ this.m_skillNoMp.gameObject.transform.localPosition = (active ? Vector3.zero : XGameUI.Far_Far_Away);
+ }
+
+ private void _OnCDOverFinished(IXUITweenTool tween)
+ {
+ this.SetCDOver(false);
+ }
+
+ public void SetSkillLevel(int level)
+ {
+ bool flag = this.m_skillLevel == null;
+ if (!flag)
+ {
+ this.m_skillLevel.SetFillAmount((float)level * 1f / (float)this.m_skillMaxLevel);
+ }
+ }
+ }
+
+ public BattleSkillHandler()
+ {
+ this._DestroyShowSkillFx = new XTimerMgr.ElapsedEventHandler(this.DestroyShowSkillFx);
+ }
+
+ protected override void Init()
+ {
+ base.Init();
+ this._showSkillNum = 0;
+ Transform transform = base.PanelObject.transform.Find("LevelTpl");
+ bool flag = XSingleton<XScene>.singleton.SceneType == SceneType.SCENE_MOBA || XSingleton<XScene>.singleton.SceneType == SceneType.SCENE_WEEKEND4V4_CRAZYBOMB;
+ if (flag)
+ {
+ this.m_LevelPool.SetupPool(transform.parent.gameObject, transform.gameObject, 16u, false);
+ }
+ else
+ {
+ transform.gameObject.SetActive(false);
+ }
+ this.m_buttons = new BattleSkillHandler.XSkillButton[XBattleSkillDocument.Total_skill_slot];
+ int num = 0;
+ while ((long)num < (long)((ulong)XBattleSkillDocument.Total_skill_slot))
+ {
+ this.m_buttons[num] = new BattleSkillHandler.XSkillButton(base.PanelObject, num);
+ num++;
+ }
+ this.m_sirControl = XSingleton<XUpdater.XUpdater>.singleton.GameSirControl;
+ this._doc = XDocuments.GetSpecificDocument<XBattleSkillDocument>(XBattleSkillDocument.uuID);
+ this._doc.BattleView = this;
+ this._doc.Init();
+ this._skill_doc = XDocuments.GetSpecificDocument<XSkillTreeDocument>(XSkillTreeDocument.uuID);
+ this.mSkillSets = new List<string[]>();
+ string[] andSeparateValue = XSingleton<XGlobalConfig>.singleton.GetAndSeparateValue("GameSirKeyCodes", XGlobalConfig.ListSeparator);
+ bool flag2 = andSeparateValue == null || andSeparateValue.Length == 0;
+ if (flag2)
+ {
+ this.mSkillSize = 0;
+ }
+ else
+ {
+ this.mSkillSize = andSeparateValue.Length;
+ for (int i = 0; i < this.mSkillSize; i++)
+ {
+ this.mSkillSets.Add(andSeparateValue[i].Split(XGlobalConfig.SequenceSeparator));
+ }
+ }
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ int num = 0;
+ while ((long)num < (long)((ulong)XBattleSkillDocument.Total_skill_slot))
+ {
+ this.m_buttons[num].m_skill.RegisterPressEventHandler(new ButtonPressEventHandler(this.OnSkillCast));
+ bool flag = this.m_buttons[num].m_add != null;
+ if (flag)
+ {
+ this.m_buttons[num].m_add.ID = (ulong)((long)num);
+ this.m_buttons[num].m_add.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnAddClick));
+ this.m_buttons[num].m_add.RegisterSpritePressEventHandler(new SpritePressEventHandler(this.OnAddPress));
+ }
+ bool flag2 = this.m_buttons[num].m_lock != null;
+ if (flag2)
+ {
+ this.m_buttons[num].m_lock.ID = (ulong)((long)num);
+ this.m_buttons[num].m_lock.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnLockClick));
+ }
+ num++;
+ }
+ this.m_buttons[0].m_skill.RegisterPressEventHandler(new ButtonPressEventHandler(this.OnAttackPressed));
+ }
+
+ public override void OnUnload()
+ {
+ bool flag = this._addFx != null;
+ if (flag)
+ {
+ XSingleton<XFxMgr>.singleton.DestroyFx(this._addFx, true);
+ }
+ bool flag2 = this._skillFx != null;
+ if (flag2)
+ {
+ XSingleton<XFxMgr>.singleton.DestroyFx(this._skillFx, true);
+ }
+ bool flag3 = this._moveFx != null;
+ if (flag3)
+ {
+ XSingleton<XFxMgr>.singleton.DestroyFx(this._moveFx, true);
+ }
+ this._doc.BattleView = null;
+ XSingleton<XTimerMgr>.singleton.KillTimer(this._fxDelayToken);
+ XSingleton<XTimerMgr>.singleton.KillTimer(this._fxDelayDelToken);
+ base.OnUnload();
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ this.bNormalAttackPressed = false;
+ bool flag = XSingleton<XScene>.singleton.SceneType != SceneType.SCENE_HEROBATTLE;
+ if (flag)
+ {
+ this.ResetSkill(false, false);
+ }
+ }
+
+ public void SetButtonNum(int num)
+ {
+ bool flag = this._showSkillNum == num;
+ if (!flag)
+ {
+ this._showSkillNum = num;
+ int group = 0;
+ bool flag2 = num != 0;
+ if (flag2)
+ {
+ group = 5 - num;
+ }
+ int num2 = 2;
+ while (num2 <= 5 && num2 < this.m_buttons.Length)
+ {
+ IXPositionGroup ixpositionGroup = this.m_buttons[num2].m_skill.gameObject.GetComponent("PositionGroup") as IXPositionGroup;
+ ixpositionGroup.SetGroup(group);
+ num2++;
+ }
+ }
+ }
+
+ public void SetupSkillMobaLevel()
+ {
+ bool flag = XSingleton<XEntityMgr>.singleton.Player == null || XSingleton<XEntityMgr>.singleton.Player.Transformer == null;
+ if (!flag)
+ {
+ this.m_LevelPool.ReturnAll(true);
+ bool flag2 = XSingleton<XScene>.singleton.SceneType == SceneType.SCENE_MOBA;
+ if (flag2)
+ {
+ int i = 2;
+ while (i <= 5)
+ {
+ bool flag3 = i < XSingleton<XEntityMgr>.singleton.Player.SkillSlot.Length && i < this.m_buttons.Length;
+ if (flag3)
+ {
+ int skillMaxLevel = XSingleton<XSkillEffectMgr>.singleton.GetSkillMaxLevel(XSingleton<XEntityMgr>.singleton.Player.SkillSlot[i], XSingleton<XEntityMgr>.singleton.Player.SkillCasterTypeID);
+ bool flag4 = skillMaxLevel <= 1;
+ if (!flag4)
+ {
+ Transform parent = this.m_buttons[i].m_skillLevel.gameObject.transform.Find("p");
+ for (int j = 0; j < skillMaxLevel; j++)
+ {
+ float num = (float)j * 2f * 3.14159274f / (float)skillMaxLevel;
+ GameObject gameObject = this.m_LevelPool.FetchGameObject(false);
+ gameObject.transform.parent = parent;
+ gameObject.transform.localScale = Vector3.one;
+ gameObject.transform.localPosition = new Vector3(Mathf.Sin(num) * 40f, Mathf.Cos(num) * 40f);
+ gameObject.transform.eulerAngles = new Vector3(0f, 0f, -num * 57.29578f);
+ }
+ this.m_buttons[i].m_skillMaxLevel = skillMaxLevel;
+ }
+ }
+ IL_1AF:
+ i++;
+ continue;
+ goto IL_1AF;
+ }
+ }
+ else
+ {
+ int skillMaxLevel2 = XSingleton<XSkillEffectMgr>.singleton.GetSkillMaxLevel(XSingleton<XEntityMgr>.singleton.Player.SkillSlot[0], XSingleton<XEntityMgr>.singleton.Player.SkillCasterTypeID);
+ Transform parent2 = this.m_buttons[0].m_skillLevel.gameObject.transform.Find("p");
+ for (int k = 0; k < skillMaxLevel2; k++)
+ {
+ float num2 = (float)k * 2f * 3.14159274f / (float)skillMaxLevel2;
+ GameObject gameObject2 = this.m_LevelPool.FetchGameObject(false);
+ gameObject2.transform.parent = parent2;
+ gameObject2.transform.localScale = Vector3.one;
+ gameObject2.transform.localPosition = new Vector3(Mathf.Sin(num2) * 64f, Mathf.Cos(num2) * 64f);
+ gameObject2.transform.eulerAngles = new Vector3(0f, 0f, -num2 * 57.29578f);
+ }
+ this.m_buttons[0].m_skillMaxLevel = skillMaxLevel2;
+ this.SetMobaSkillLevel(0, false);
+ }
+ }
+ }
+
+ private void _SetAttackGlow(bool bActive)
+ {
+ }
+
+ public void ResetPressState()
+ {
+ this.bNormalAttackPressed = false;
+ this.m_buttons[0].m_skill.ResetState();
+ this._SetAttackGlow(false);
+ }
+
+ public void BindSkill(int idx, uint skill, bool rebind = false)
+ {
+ bool flag = (long)idx >= (long)((ulong)XBattleSkillDocument.Total_skill_slot) || (!rebind && skill == this.m_buttons[idx].m_skillId);
+ if (flag)
+ {
+ bool flag2 = skill == 0u && this.m_buttons[idx].m_lock != null;
+ if (flag2)
+ {
+ uint level = XSingleton<XAttributeMgr>.singleton.XPlayerData.Level;
+ uint skillSlotUnLockLevel = this._skill_doc.GetSkillSlotUnLockLevel(idx);
+ this.m_buttons[idx].SetButton(this._ShouldShowButton(skill, idx));
+ bool flag3 = level < skillSlotUnLockLevel;
+ if (flag3)
+ {
+ this.m_buttons[idx].m_lock.gameObject.SetActive(true);
+ }
+ else
+ {
+ this.m_buttons[idx].m_lock.gameObject.SetActive(false);
+ }
+ }
+ }
+ else
+ {
+ bool flag4 = !this.m_buttons[idx].Active;
+ if (!flag4)
+ {
+ bool flag5 = skill > 0u;
+ if (flag5)
+ {
+ uint skillLevel = XSingleton<XEntityMgr>.singleton.Player.Skill.IsSkillReplaced ? 1u : XSingleton<XEntityMgr>.singleton.Player.Attributes.SkillLevelInfo.GetSkillLevel(skill);
+ SkillList.RowData skillConfig = XSingleton<XSkillEffectMgr>.singleton.GetSkillConfig(skill, skillLevel, XSingleton<XEntityMgr>.singleton.Player.SkillCasterTypeID);
+ bool flag6 = skillConfig != null;
+ if (flag6)
+ {
+ this.m_buttons[idx].m_skillCost = XSingleton<XEntityMgr>.singleton.Player.SkillMgr.GetMPCost(skill);
+ this.m_buttons[idx].m_skillId = skill;
+ this.m_buttons[idx].m_skillIcon.SetSprite(skillConfig.Icon, skillConfig.Atlas, false);
+ bool flag7 = this.m_buttons[idx].m_lock != null;
+ if (flag7)
+ {
+ this.m_buttons[idx].m_lock.gameObject.SetActive(false);
+ }
+ }
+ else
+ {
+ this.m_buttons[idx].m_skillId = 0u;
+ this.m_buttons[idx].m_skillIcon.spriteName = "";
+ this.m_buttons[idx].SetButtonStatus(false);
+ }
+ }
+ else
+ {
+ this.m_buttons[idx].m_skillId = 0u;
+ this.m_buttons[idx].m_skillIcon.spriteName = "";
+ this.m_buttons[idx].SetButtonStatus(false);
+ }
+ }
+ }
+ }
+
+ public void OnSetOptionsValue()
+ {
+ SceneTable.RowData sceneData = XSingleton<XSceneMgr>.singleton.GetSceneData(XSingleton<XScene>.singleton.SceneID);
+ int awakeSkillSlot = XSkillTreeDocument.AwakeSkillSlot;
+ bool flag = awakeSkillSlot < this.m_buttons.Length && awakeSkillSlot < XSingleton<XEntityMgr>.singleton.Player.SkillSlot.Length;
+ if (flag)
+ {
+ this.m_buttons[awakeSkillSlot].SetButton(sceneData.ShowSkill && this._ShouldShowButton(XSingleton<XEntityMgr>.singleton.Player.SkillSlot[awakeSkillSlot], awakeSkillSlot));
+ }
+ }
+
+ private bool IsAwakeSkillSlotNeedOpen()
+ {
+ return this._skill_doc.IsAwakeSkillSlotOpen && this._skill_doc.IsSelfAwaked && this.IsAwakeSlotSettingOn;
+ }
+
+ private bool _ShouldShowButton(uint skillID, int idx)
+ {
+ bool flag = idx == XSkillTreeDocument.AwakeSkillSlot && !this.IsAwakeSkillSlotNeedOpen();
+ bool result;
+ if (flag)
+ {
+ result = false;
+ }
+ else
+ {
+ bool flag2 = skillID > 0u;
+ if (flag2)
+ {
+ result = true;
+ }
+ else
+ {
+ bool flag3 = XSingleton<XEntityMgr>.singleton.Player.IsTransform || XSingleton<XEntityMgr>.singleton.Player.Skill.IsSkillReplaced;
+ if (flag3)
+ {
+ result = false;
+ }
+ else
+ {
+ SkillTypeEnum skillSlotType = this._skill_doc.GetSkillSlotType(idx);
+ result = (skillSlotType != SkillTypeEnum.Skill_Buff || this._skill_doc.GetSkillSlotUnLockLevel(XFastEnumIntEqualityComparer<XSkillSlot>.ToInt(XSkillSlot.Skill_1_Buff)) <= XSingleton<XAttributeMgr>.singleton.XPlayerData.Level);
+ }
+ }
+ }
+ return result;
+ }
+
+ public void ResetSkill(bool showfx = false, bool rebind = false)
+ {
+ int num = 0;
+ while ((long)num < (long)((ulong)XBattleSkillDocument.Total_skill_slot))
+ {
+ this.ResetSkill(num, rebind);
+ bool flag = showfx && this.m_buttons[num].m_skillId > 0u;
+ if (flag)
+ {
+ this.PlayShowSkillFx(num);
+ }
+ this.m_buttons[num].SetButton(this._ShouldShowButton(this.m_buttons[num].m_skillId, num));
+ num++;
+ }
+ bool flag2 = XSingleton<XScene>.singleton.SceneType == SceneType.SCENE_MOBA || XSingleton<XScene>.singleton.SceneType == SceneType.SCENE_WEEKEND4V4_CRAZYBOMB;
+ if (flag2)
+ {
+ DlgBase<BattleMain, BattleMainBehaviour>.singleton.SkillHandler.SetupSkillMobaLevel();
+ int num2 = 0;
+ while ((long)num2 < (long)((ulong)XBattleSkillDocument.Total_skill_slot))
+ {
+ uint num3;
+ bool flag3 = XBattleSkillDocument.SkillLevelDict.TryGetValue(this.m_buttons[num2].m_skillId, out num3);
+ if (flag3)
+ {
+ XBattleSkillDocument.SkillLevel[num2] = (int)num3;
+ DlgBase<BattleMain, BattleMainBehaviour>.singleton.SkillHandler.SetMobaSkillLevel(num2, false);
+ }
+ num2++;
+ }
+ bool flag4 = XSingleton<XScene>.singleton.SceneType == SceneType.SCENE_MOBA;
+ if (flag4)
+ {
+ DlgBase<BattleMain, BattleMainBehaviour>.singleton.SkillHandler.RefreshAddBtn(null);
+ }
+ }
+ SceneTable.RowData sceneData = XSingleton<XSceneMgr>.singleton.GetSceneData(XSingleton<XScene>.singleton.SceneID);
+ bool flag5 = !sceneData.ShowSkill;
+ if (flag5)
+ {
+ int num4 = 1;
+ while ((long)num4 < (long)((ulong)XBattleSkillDocument.Total_skill_slot))
+ {
+ this.m_buttons[num4].SetButton(false);
+ num4++;
+ }
+ }
+ bool flag6 = !sceneData.ShowNormalAttack;
+ if (flag6)
+ {
+ this.m_buttons[0].SetButton(false);
+ }
+ }
+
+ public void ResetSkill(int idx, bool rebind = false)
+ {
+ bool flag = idx < XSingleton<XEntityMgr>.singleton.Player.SkillSlot.Length;
+ if (flag)
+ {
+ this.BindSkill(idx, XSingleton<XEntityMgr>.singleton.Player.SkillSlot[idx], rebind);
+ this.m_buttons[idx].SetButtonHighlight(false);
+ this.m_buttons[idx].SetButtonInRange(false);
+ }
+ else
+ {
+ XSingleton<XDebug>.singleton.AddErrorLog("skill slot ", idx.ToString(), "missing...", null, null, null);
+ }
+ }
+
+ public void CoolDownSkillAll()
+ {
+ int num = 0;
+ while ((long)num < (long)((ulong)XBattleSkillDocument.Total_skill_slot))
+ {
+ bool flag = this.m_buttons[num].m_skillId > 0u;
+ if (flag)
+ {
+ XSkillCore skill = XSingleton<XEntityMgr>.singleton.Player.SkillMgr.GetSkill(this.m_buttons[num].m_skillId);
+ bool flag2 = skill != null;
+ if (flag2)
+ {
+ skill.CoolDown();
+ }
+ this.PlayShowSkillFx(num);
+ }
+ num++;
+ }
+ }
+
+ public void MakeCoolDownAtLaunch()
+ {
+ int num = 0;
+ while ((long)num < (long)((ulong)XBattleSkillDocument.Total_skill_slot))
+ {
+ bool flag = this.m_buttons[num].m_skillId > 0u;
+ if (flag)
+ {
+ XSkillCore skill = XSingleton<XEntityMgr>.singleton.Player.SkillMgr.GetSkill(this.m_buttons[num].m_skillId);
+ bool flag2 = skill != null;
+ if (flag2)
+ {
+ skill.MakeCoolDownAtLaunch();
+ }
+ }
+ num++;
+ }
+ }
+
+ public void DisableSkill(int idx)
+ {
+ this.BindSkill(idx, 0u, false);
+ this.m_buttons[idx].Active = false;
+ this.m_buttons[idx].SetButton(false);
+ }
+
+ public void ShowSkillSlot(int index)
+ {
+ }
+
+ public void EnableSkill(int idx)
+ {
+ this.m_buttons[idx].Active = true;
+ this.m_buttons[idx].SetButton(true);
+ bool flag = idx < XSingleton<XEntityMgr>.singleton.Player.SkillSlot.Length;
+ if (flag)
+ {
+ this.BindSkill(idx, XSingleton<XEntityMgr>.singleton.Player.SkillSlot[idx], false);
+ this.PlayShowSkillFx(idx);
+ }
+ else
+ {
+ XSingleton<XDebug>.singleton.AddErrorLog("skill slot ", idx.ToString(), "missing...", null, null, null);
+ }
+ }
+
+ public void AlwaysHot(int idx, bool isHot)
+ {
+ this.m_buttons[idx].AlwaysHot = isHot;
+ this.m_buttons[idx].SetButtonStatus(true);
+ }
+
+ public void OnDeath()
+ {
+ this.bNormalAttackPressed = false;
+ this.m_buttons[0].m_skill.ResetState();
+ this._SetAttackGlow(false);
+ }
+
+ public override void OnUpdate()
+ {
+ base.OnUpdate();
+ bool flag = this.bNormalAttackPressed;
+ if (flag)
+ {
+ this.CastNormalAttack();
+ }
+ bool flag2 = !DlgBase<DemoUI, DemoUIBehaviour>.singleton.IsMainUIVisible();
+ if (flag2)
+ {
+ this.UpdateKeyBoard();
+ }
+ this.UpdateGameSirControl();
+ this.UpdateSkillInfo();
+ }
+
+ protected void DestroyShowSkillFx(object o)
+ {
+ GameObject o2 = o as GameObject;
+ XSingleton<XResourceLoaderMgr>.singleton.UnSafeDestroy(o2, true, false);
+ }
+
+ public void OnAttackPressed(bool state)
+ {
+ this.OnAttackPressed(null, state);
+ }
+
+ private void OnAttackPressed(IXUIButton go, bool state)
+ {
+ this.bNormalAttackPressed = state;
+ bool flag = !state;
+ if (!flag)
+ {
+ this._doc.OnSlotClicked(0);
+ }
+ }
+
+ private void CastNormalAttack()
+ {
+ this.ImpCast(0);
+ }
+
+ private void OnSkillCast(IXUIButton go, bool state)
+ {
+ bool flag = !state;
+ if (!flag)
+ {
+ this._doc.OnSlotClicked((int)go.ID);
+ this.ImpCast((int)go.ID);
+ }
+ }
+
+ private void OnLockClick(IXUISprite sp)
+ {
+ int slotid = (int)sp.ID;
+ uint skillSlotUnLockLevel = this._skill_doc.GetSkillSlotUnLockLevel(slotid);
+ string text = string.Format(XStringDefineProxy.GetString("OpenSkillAtLevel"), skillSlotUnLockLevel);
+ XSingleton<UiUtility>.singleton.ShowSystemNoticeTip(text);
+ }
+
+ public void OnAddClick(IXUISprite sp)
+ {
+ bool flag = this._pressTime > 1f;
+ if (!flag)
+ {
+ bool flag2 = (int)sp.ID >= this.m_buttons.Length;
+ if (!flag2)
+ {
+ XMobaBattleDocument specificDocument = XDocuments.GetSpecificDocument<XMobaBattleDocument>(XMobaBattleDocument.uuID);
+ bool flag3 = this.IsSkillCanLevelUp((int)sp.ID);
+ if (flag3)
+ {
+ specificDocument.QuerySkillLevelUp(this.m_buttons[(int)sp.ID].m_skillId);
+ }
+ }
+ }
+ }
+
+ public void SetMobaSkillLevel(int slot, bool isLevelUp)
+ {
+ bool flag = isLevelUp && this.m_buttons[slot].m_add != null;
+ if (flag)
+ {
+ bool flag2 = this._addFx != null;
+ if (flag2)
+ {
+ XSingleton<XFxMgr>.singleton.DestroyFx(this._addFx, true);
+ }
+ bool flag3 = this._skillFx != null;
+ if (flag3)
+ {
+ XSingleton<XFxMgr>.singleton.DestroyFx(this._skillFx, true);
+ }
+ bool flag4 = this._moveFx != null;
+ if (flag4)
+ {
+ XSingleton<XFxMgr>.singleton.DestroyFx(this._moveFx, true);
+ }
+ Transform transform = this.m_buttons[slot].m_skillIcon.transform;
+ Transform transform2 = this.m_buttons[slot].m_add.transform.parent.Find("Fx");
+ this._addFx = XSingleton<XFxMgr>.singleton.CreateUIFx("Effects/FX_Particle/UIfx/UI_yxxg_jiahao", transform2, false);
+ this._skillFx = XSingleton<XFxMgr>.singleton.CreateUIFx("Effects/FX_Particle/UIfx/UI_yxxg_jinenglan", transform, false);
+ this._moveFx = XSingleton<XFxMgr>.singleton.CreateUIFx("Effects/FX_Particle/UIfx/UI_yxxg_feixing", transform2, false);
+ this._addFx.Play();
+ this._skillFx.Play();
+ Vector3 vector = transform.position - transform2.position;
+ float num = Vector3.Angle(Vector3.right, vector);
+ bool flag5 = vector.y < 0f;
+ if (flag5)
+ {
+ num = -num;
+ }
+ this._moveFx.Play(transform2.transform.position, Quaternion.Euler(0f, 0f, num), Vector3.one, 1f);
+ }
+ this.m_buttons[slot].SetSkillLevel(XBattleSkillDocument.SkillLevel[slot]);
+ }
+
+ public void DelayRefreshAddBtn()
+ {
+ XSingleton<XTimerMgr>.singleton.KillTimer(this._fxDelayToken);
+ this._fxDelayToken = XSingleton<XTimerMgr>.singleton.SetTimer(0.1f, new XTimerMgr.ElapsedEventHandler(this.RefreshAddBtn), null);
+ XSingleton<XTimerMgr>.singleton.KillTimer(this._fxDelayDelToken);
+ this._fxDelayDelToken = XSingleton<XTimerMgr>.singleton.SetTimer(2f, new XTimerMgr.ElapsedEventHandler(this.DelayRefreshFx), null);
+ }
+
+ public void DelayRefreshFx(object o = null)
+ {
+ bool flag = this._addFx != null;
+ if (flag)
+ {
+ XSingleton<XFxMgr>.singleton.DestroyFx(this._addFx, true);
+ }
+ bool flag2 = this._skillFx != null;
+ if (flag2)
+ {
+ XSingleton<XFxMgr>.singleton.DestroyFx(this._skillFx, true);
+ }
+ bool flag3 = this._moveFx != null;
+ if (flag3)
+ {
+ XSingleton<XFxMgr>.singleton.DestroyFx(this._moveFx, true);
+ }
+ this._addFx = null;
+ this._skillFx = null;
+ this._moveFx = null;
+ }
+
+ public void RefreshAddBtn(object o = null)
+ {
+ bool flag = XBattleSkillDocument.Total_skill_slot <= 5u || XSingleton<XEntityMgr>.singleton.Player == null;
+ if (!flag)
+ {
+ bool flag2 = !XEntity.ValideEntity(XSingleton<XEntityMgr>.singleton.Player.Transformer);
+ if (!flag2)
+ {
+ XMobaBattleDocument specificDocument = XDocuments.GetSpecificDocument<XMobaBattleDocument>(XMobaBattleDocument.uuID);
+ int skillPoint = specificDocument.SkillPoint;
+ for (int i = 2; i <= 5; i++)
+ {
+ this.m_buttons[i].m_add.SetVisible(this.IsSkillCanLevelUp(i));
+ }
+ }
+ }
+ }
+
+ public bool IsSkillCanLevelUp(int index)
+ {
+ bool flag = XBattleSkillDocument.Total_skill_slot <= 5u || XSingleton<XEntityMgr>.singleton.Player == null;
+ bool result;
+ if (flag)
+ {
+ result = false;
+ }
+ else
+ {
+ XMobaBattleDocument specificDocument = XDocuments.GetSpecificDocument<XMobaBattleDocument>(XMobaBattleDocument.uuID);
+ bool flag2 = specificDocument.SkillPoint == 0;
+ if (flag2)
+ {
+ result = false;
+ }
+ else
+ {
+ int skillMaxLevel = XSingleton<XSkillEffectMgr>.singleton.GetSkillMaxLevel(this.m_buttons[index].m_skillId, XSingleton<XEntityMgr>.singleton.Player.SkillCasterTypeID);
+ bool flag3 = XBattleSkillDocument.SkillLevel[index] >= skillMaxLevel;
+ if (flag3)
+ {
+ result = false;
+ }
+ else
+ {
+ SkillList.RowData skillConfig = XSingleton<XSkillEffectMgr>.singleton.GetSkillConfig(this.m_buttons[index].m_skillId, (uint)(XBattleSkillDocument.SkillLevel[index] + 1), XSingleton<XEntityMgr>.singleton.Player.SkillCasterTypeID);
+ bool flag4 = skillConfig == null || XBattleSkillDocument.SkillLevel[index] >= skillConfig.UpReqRoleLevel.Length || (int)skillConfig.UpReqRoleLevel[XBattleSkillDocument.SkillLevel[index]] > specificDocument.MyLevel();
+ result = !flag4;
+ }
+ }
+ }
+ return result;
+ }
+
+ public bool OnAddPress(IXUISprite sp, bool state)
+ {
+ bool flag = (int)sp.ID >= this.m_buttons.Length;
+ bool result;
+ if (flag)
+ {
+ result = false;
+ }
+ else
+ {
+ if (state)
+ {
+ this._pressTime = Time.time;
+ }
+ else
+ {
+ this._pressTime = Time.time - this._pressTime;
+ }
+ bool flag2 = DlgBase<BattleMain, BattleMainBehaviour>.singleton.m_MobaBattleHandler != null;
+ if (flag2)
+ {
+ DlgBase<BattleMain, BattleMainBehaviour>.singleton.m_MobaBattleHandler.ShowSkillTips(state, this.m_buttons[(int)sp.ID].m_skillId, XBattleSkillDocument.SkillLevel[(int)sp.ID] + 1);
+ }
+ result = true;
+ }
+ return result;
+ }
+
+ private void ImpCast(int idx)
+ {
+ bool flag = this.m_buttons[idx].m_skillId == 0u || !this.m_buttons[idx].Enabled || !this.m_buttons[idx].Visible;
+ if (!flag)
+ {
+ uint num = this._doc.NextJASkillBaseOnCurrent();
+ bool flag2 = num == this.m_buttons[idx].m_skillId;
+ if (flag2)
+ {
+ bool flag3 = this._doc.IsInQTEChain(num);
+ if (flag3)
+ {
+ this._doc.CastSkill(this.m_buttons[idx]);
+ }
+ else
+ {
+ bool syncMode = XSingleton<XGame>.singleton.SyncMode;
+ if (syncMode)
+ {
+ this._doc.FireSkillEvent(idx);
+ }
+ else
+ {
+ this.LastAttackTime = Time.time;
+ }
+ }
+ }
+ else
+ {
+ this._doc.CastSkill(this.m_buttons[idx]);
+ }
+ }
+ }
+
+ protected void UpdateSkillInfo()
+ {
+ XPlayer player = XSingleton<XEntityMgr>.singleton.Player;
+ bool flag = player == null;
+ if (!flag)
+ {
+ int num = (int)XSingleton<XEntityMgr>.singleton.Player.Attributes.GetAttr(XAttributeDefine.XAttr_CurrentMP_Basic);
+ int num2 = 0;
+ while ((long)num2 < (long)((ulong)XBattleSkillDocument.Total_skill_slot))
+ {
+ XSkillCore xskillCore = this._doc.HasReplaced(this.m_buttons[num2].m_skillId);
+ bool flag2 = xskillCore != null;
+ if (flag2)
+ {
+ bool showRunningTime = xskillCore.ShowRunningTime;
+ if (showRunningTime)
+ {
+ bool flag3 = this.m_buttons[num2].m_Times != null;
+ if (flag3)
+ {
+ bool flag4 = xskillCore.LeftRunningTime != 0;
+ bool flag5 = this.m_buttons[num2].m_TimesVis != flag4;
+ if (flag5)
+ {
+ this.m_buttons[num2].m_TimesVis = flag4;
+ this.m_buttons[num2].m_Times.gameObject.transform.localPosition = (flag4 ? new Vector3(24f, -30f) : XGameUI.Far_Far_Away);
+ }
+ this.m_buttons[num2].m_Times.SetText(xskillCore.LeftRunningTime.ToString());
+ }
+ }
+ else
+ {
+ bool flag6 = this.m_buttons[num2].m_Times != null;
+ if (flag6)
+ {
+ bool timesVis = this.m_buttons[num2].m_TimesVis;
+ if (timesVis)
+ {
+ this.m_buttons[num2].m_TimesVis = false;
+ this.m_buttons[num2].m_Times.gameObject.transform.localPosition = XGameUI.Far_Far_Away;
+ }
+ }
+ }
+ bool reloading = xskillCore.Reloading;
+ if (reloading)
+ {
+ float coolDown = xskillCore.GetCoolDown();
+ float elapsedCD = xskillCore.GetElapsedCD();
+ float num3 = (coolDown > 0f) ? (1f - elapsedCD / coolDown) : 0f;
+ bool flag7 = num2 > 0 || !XSingleton<XEntityMgr>.singleton.Player.SkillMgr.IsPhysicalAttack(xskillCore.ID);
+ this.m_buttons[num2].m_skillCD.value = (flag7 ? num3 : 0f);
+ bool cooledDown = xskillCore.CooledDown;
+ if (cooledDown)
+ {
+ this.m_buttons[num2].SetCDText(false);
+ }
+ else
+ {
+ this.m_buttons[num2].SetCDText(true);
+ float num4 = coolDown - elapsedCD;
+ bool flag8 = num4 >= 1f;
+ if (flag8)
+ {
+ int num5 = (int)(coolDown - elapsedCD + 0.5f);
+ bool flag9 = this.m_buttons[num2].m_skillCDText.HasIdentityChanged(num5);
+ if (flag9)
+ {
+ string text = flag7 ? num5.ToString() : "";
+ this.m_buttons[num2].m_skillCDText.SetText(text);
+ this.m_buttons[num2].m_skillCDText.SetIdentity(num5);
+ }
+ }
+ else
+ {
+ int num6 = (int)(num4 * 10f);
+ bool flag10 = this.m_buttons[num2].m_skillCDText.HasIdentityChanged(num6);
+ if (flag10)
+ {
+ string text = flag7 ? num4.ToString("F1") : "";
+ this.m_buttons[num2].m_skillCDText.SetText(text);
+ this.m_buttons[num2].m_skillCDText.SetIdentity(num6);
+ }
+ }
+ }
+ }
+ else
+ {
+ this.m_buttons[num2].SetCDText(false);
+ this.m_buttons[num2].m_skillCD.value = 0f;
+ }
+ bool flag11 = this._doc.CanCast(xskillCore.ID, num2);
+ if (flag11)
+ {
+ this.m_buttons[num2].SetButtonStatus(true);
+ this.m_buttons[num2].SetNoMP((float)num < this.m_buttons[num2].m_skillCost);
+ bool flag12 = num2 > 1;
+ if (flag12)
+ {
+ this.m_buttons[num2].SetButtonInRange(xskillCore.CooledDown && this._doc.CanFind(xskillCore.ID));
+ }
+ }
+ else
+ {
+ bool alwaysHot = this.m_buttons[num2].AlwaysHot;
+ if (alwaysHot)
+ {
+ this.m_buttons[num2].SetButtonStatus(true);
+ }
+ else
+ {
+ bool flag13 = num2 > 1;
+ if (flag13)
+ {
+ this.m_buttons[num2].SetButtonInRange(false);
+ }
+ this.m_buttons[num2].SetButtonStatus(false);
+ }
+ }
+ }
+ else
+ {
+ this.m_buttons[num2].m_skillCD.value = 0f;
+ this.m_buttons[num2].SetCDText(false);
+ this.m_buttons[num2].SetButtonStatus(false);
+ }
+ num2++;
+ }
+ }
+ }
+
+ public void UpdateQTESkill(int idx, uint skill)
+ {
+ bool flag = skill > 0u;
+ if (flag)
+ {
+ this.BindSkill(idx, skill, false);
+ bool flag2 = !XSingleton<XEntityMgr>.singleton.Player.QTE.IsInIgnorePresentState();
+ if (flag2)
+ {
+ this.m_buttons[idx].SetButtonHighlight(true);
+ }
+ }
+ }
+
+ private void PlayShowSkillFx(int idx)
+ {
+ this.m_buttons[idx].SetButtonStatus(true);
+ GameObject gameObject = XSingleton<XResourceLoaderMgr>.singleton.CreateFromPrefab("UI/Common/ShowSkillFx", true, false) as GameObject;
+ Transform transform = this.m_buttons[idx].m_skill.gameObject.transform.Find("icon");
+ bool flag = transform == null;
+ if (flag)
+ {
+ XSingleton<XDebug>.singleton.AddErrorLog("Skill Icon No Find", null, null, null, null, null);
+ }
+ else
+ {
+ XSingleton<UiUtility>.singleton.AddChild(transform.gameObject, gameObject);
+ IXUISprite ixuisprite = gameObject.GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.ResetAnimationAndPlay();
+ XSingleton<XTimerMgr>.singleton.SetTimer(5f, this._DestroyShowSkillFx, gameObject);
+ }
+ }
+
+ private bool ExcuteSkill(int index, string[] skillNames)
+ {
+ bool flag = skillNames == null || skillNames.Length == 0;
+ bool result;
+ if (flag)
+ {
+ result = false;
+ }
+ else
+ {
+ bool flag2 = true;
+ int i = 0;
+ int num = skillNames.Length;
+ while (i < num)
+ {
+ flag2 = (flag2 && this.m_sirControl.GetButton(skillNames[i]));
+ bool flag3 = !flag2;
+ if (flag3)
+ {
+ break;
+ }
+ i++;
+ }
+ bool flag4 = flag2;
+ if (flag4)
+ {
+ bool flag5 = index == 0;
+ if (flag5)
+ {
+ this.CastNormalAttack();
+ }
+ else
+ {
+ this.ImpCast(index);
+ }
+ }
+ result = flag2;
+ }
+ return result;
+ }
+
+ private void UpdateGameSirControl()
+ {
+ bool flag = !base.IsVisible();
+ if (!flag)
+ {
+ bool flag2 = this.m_sirControl == null || !this.m_sirControl.IsConnected() || this.mSkillSets == null;
+ if (!flag2)
+ {
+ bool flag3 = this.mSkillSize == 0;
+ if (!flag3)
+ {
+ for (int i = 0; i < this.mSkillSize; i++)
+ {
+ this.ExcuteSkill(i, this.mSkillSets[i]);
+ }
+ }
+ }
+ }
+ }
+
+ public void UpdateKeyBoard()
+ {
+ bool flag = !base.IsVisible();
+ if (!flag)
+ {
+ bool keyDown = Input.GetKeyDown((KeyCode)104);
+ if (keyDown)
+ {
+ this.CastNormalAttack();
+ }
+ bool keyDown2 = Input.GetKeyDown((KeyCode)32);
+ if (keyDown2)
+ {
+ this.ImpCast(1);
+ }
+ bool keyDown3 = Input.GetKeyDown((KeyCode)106);
+ if (keyDown3)
+ {
+ this.ImpCast(2);
+ }
+ bool keyDown4 = Input.GetKeyDown((KeyCode)107);
+ if (keyDown4)
+ {
+ this.ImpCast(3);
+ }
+ bool keyDown5 = Input.GetKeyDown((KeyCode)108);
+ if (keyDown5)
+ {
+ this.ImpCast(4);
+ }
+ bool keyDown6 = Input.GetKeyDown((KeyCode)59);
+ if (keyDown6)
+ {
+ this.ImpCast(5);
+ }
+ bool keyDown7 = Input.GetKeyDown((KeyCode)117);
+ if (keyDown7)
+ {
+ this.ImpCast(6);
+ }
+ bool keyDown8 = Input.GetKeyDown((KeyCode)111);
+ if (keyDown8)
+ {
+ this.ImpCast(7);
+ }
+ bool keyDown9 = Input.GetKeyDown((KeyCode)112);
+ if (keyDown9)
+ {
+ this.ImpCast(8);
+ }
+ bool keyDown10 = Input.GetKeyDown((KeyCode)105);
+ if (keyDown10)
+ {
+ this.ImpCast(9);
+ }
+ }
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/BattleSkillHandler.cs.meta b/Client/Assets/Scripts/XMainClient/UI/BattleSkillHandler.cs.meta
new file mode 100644
index 00000000..a8b95154
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/BattleSkillHandler.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 949985562e22833408ee35c59277dca0
+timeCreated: 1611404155
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/BattleStatisticsHandler.cs b/Client/Assets/Scripts/XMainClient/UI/BattleStatisticsHandler.cs
new file mode 100644
index 00000000..d004f2a2
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/BattleStatisticsHandler.cs
@@ -0,0 +1,159 @@
+using System;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class BattleStatisticsHandler : DlgHandlerBase
+ {
+ protected override string FileName
+ {
+ get
+ {
+ return "Battle/BattleStatistics";
+ }
+ }
+
+ private XCombatStatisticsDocument doc;
+
+ private IXUIScrollView m_ScrollView;
+
+ private IXUIWrapContent m_WrapContent;
+
+ private IXUILabel m_Total;
+
+ private IXUISprite m_BtnHelp;
+
+ private IXUISprite m_BtnReset;
+
+ private GameObject m_HelpFrame;
+
+ private IXUILabel m_LabelHelp;
+
+ private float m_Timer = 0f;
+
+ private static float REFRESH_INTERVAL = 1f;
+
+ protected override void Init()
+ {
+ base.Init();
+ this.doc = XDocuments.GetSpecificDocument<XCombatStatisticsDocument>(XCombatStatisticsDocument.uuID);
+ this.doc.StatisticsHandler = this;
+ this.m_ScrollView = (base.PanelObject.transform.Find("Bg/ScrollView").GetComponent("XUIScrollView") as IXUIScrollView);
+ this.m_WrapContent = (this.m_ScrollView.gameObject.transform.Find("WrapContent").GetComponent("XUIWrapContent") as IXUIWrapContent);
+ this.m_Total = (base.PanelObject.transform.Find("Bg/Total").GetComponent("XUILabel") as IXUILabel);
+ this.m_HelpFrame = base.PanelObject.transform.Find("Bg/HelpsFrame").gameObject;
+ this.m_LabelHelp = (this.m_HelpFrame.transform.Find("Helps").GetComponent("XUILabel") as IXUILabel);
+ this.m_LabelHelp.SetText(XSingleton<UiUtility>.singleton.ReplaceReturn(XStringDefineProxy.GetString("BATTLE_STATISTICS_HELP")));
+ this.m_BtnHelp = (base.PanelObject.transform.Find("Bg/BtnHelp").GetComponent("XUISprite") as IXUISprite);
+ this.m_BtnReset = (base.PanelObject.transform.Find("Bg/BtnReset").GetComponent("XUISprite") as IXUISprite);
+ this.m_HelpFrame.SetActive(false);
+ }
+
+ public override void OnUnload()
+ {
+ base.OnUnload();
+ this.doc.StatisticsHandler = null;
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ this.m_WrapContent.RegisterItemUpdateEventHandler(new WrapItemUpdateEventHandler(this._WrapContentItemUpdated));
+ this.m_BtnHelp.RegisterSpritePressEventHandler(new SpritePressEventHandler(this._OnHelpClicked));
+ this.m_BtnReset.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this._OnResetClicked));
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ this.RefreshData();
+ bool flag = DlgBase<BattleMain, BattleMainBehaviour>.singleton.IsLoaded() && DlgBase<BattleMain, BattleMainBehaviour>.singleton.TeamMonitor != null;
+ if (flag)
+ {
+ DlgBase<BattleMain, BattleMainBehaviour>.singleton.TeamMonitor.TemporarilyHide(true);
+ }
+ }
+
+ protected override void OnHide()
+ {
+ base.OnHide();
+ bool flag = DlgBase<BattleMain, BattleMainBehaviour>.singleton.IsLoaded() && DlgBase<BattleMain, BattleMainBehaviour>.singleton.TeamMonitor != null;
+ if (flag)
+ {
+ DlgBase<BattleMain, BattleMainBehaviour>.singleton.TeamMonitor.TemporarilyHide(false);
+ }
+ }
+
+ public override void OnUpdate()
+ {
+ base.OnUpdate();
+ float time = Time.time;
+ bool flag = time - this.m_Timer > BattleStatisticsHandler.REFRESH_INTERVAL;
+ if (flag)
+ {
+ this.m_Timer = time;
+ this.doc.ReqStatistics();
+ }
+ }
+
+ public override void RefreshData()
+ {
+ base.RefreshData();
+ this.m_WrapContent.SetContentCount(this.doc.StatisticsList.Count, false);
+ this.m_Total.SetText(XSingleton<UiUtility>.singleton.NumberFormat((ulong)this.doc.TotalDamage));
+ }
+
+ private void _WrapContentItemUpdated(Transform t, int index)
+ {
+ bool flag = index < 0 || index >= this.doc.StatisticsList.Count;
+ if (!flag)
+ {
+ XCombatStatisticsInfo xcombatStatisticsInfo = this.doc.StatisticsList[index];
+ bool flag2 = xcombatStatisticsInfo == null;
+ if (!flag2)
+ {
+ IXUILabel ixuilabel = t.Find("Name").GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel2 = t.Find("Count").GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel3 = t.Find("Value").GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel4 = t.Find("Percentage").GetComponent("XUILabel") as IXUILabel;
+ ulong num = (ulong)xcombatStatisticsInfo.value;
+ ixuilabel.SetText(xcombatStatisticsInfo.name);
+ bool flag3 = xcombatStatisticsInfo.count > 999;
+ if (flag3)
+ {
+ ixuilabel2.SetText("...");
+ }
+ else
+ {
+ bool flag4 = num != 0UL && xcombatStatisticsInfo.count == 0;
+ if (flag4)
+ {
+ ixuilabel2.SetText("1");
+ }
+ else
+ {
+ ixuilabel2.SetText(xcombatStatisticsInfo.count.ToString());
+ }
+ }
+ ixuilabel3.SetText(XSingleton<UiUtility>.singleton.NumberFormat(num));
+ ixuilabel4.SetText(string.Format("{0}%", (int)(xcombatStatisticsInfo.percent * 100f)));
+ }
+ }
+ }
+
+ private bool _OnHelpClicked(IXUISprite iSp, bool isPressed)
+ {
+ this.m_HelpFrame.SetActive(isPressed);
+ return true;
+ }
+
+ private void _OnResetClicked(IXUISprite iSp)
+ {
+ this.doc.ResetStatistics();
+ this.doc.ReqStatistics();
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/BattleStatisticsHandler.cs.meta b/Client/Assets/Scripts/XMainClient/UI/BattleStatisticsHandler.cs.meta
new file mode 100644
index 00000000..86f6b321
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/BattleStatisticsHandler.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 781bd63e736b0154c984b9c16f2713bb
+timeCreated: 1611403957
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/BattleTargetHandler.cs b/Client/Assets/Scripts/XMainClient/UI/BattleTargetHandler.cs
new file mode 100644
index 00000000..2ed6e6ab
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/BattleTargetHandler.cs
@@ -0,0 +1,76 @@
+using System;
+using UnityEngine;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class BattleTargetHandler : DlgHandlerBase
+ {
+ public GameObject TargetFx;
+
+ public GameObject PretargetFx;
+
+ protected override void Init()
+ {
+ base.Init();
+ this.TargetFx = base.PanelObject.transform.Find("Taget2").gameObject;
+ this.PretargetFx = base.PanelObject.transform.Find("Taget1").gameObject;
+ this.TargetFx.transform.localPosition = XGameUI.Far_Far_Away;
+ this.PretargetFx.transform.localPosition = XGameUI.Far_Far_Away;
+ }
+
+ public void ShowTargetFx(bool show, XEntity e)
+ {
+ bool flag = !show;
+ if (flag)
+ {
+ this.TargetFx.transform.localPosition = XGameUI.Far_Far_Away;
+ }
+ bool flag2 = !XEntity.ValideEntity(e);
+ if (!flag2)
+ {
+ XSingleton<XTutorialHelper>.singleton.HasTarget = true;
+ this.TargetFx.transform.position = this.EntityOnUI(e);
+ Vector3 localPosition = this.TargetFx.transform.localPosition;
+ localPosition.x = (float)Mathf.FloorToInt(localPosition.x);
+ localPosition.y = (float)Mathf.FloorToInt(localPosition.y);
+ localPosition.z = 0f;
+ this.TargetFx.transform.localPosition = localPosition;
+ }
+ }
+
+ public void ShowPretargetFx(bool show, XEntity e)
+ {
+ bool flag = !show;
+ if (flag)
+ {
+ this.PretargetFx.transform.localPosition = XGameUI.Far_Far_Away;
+ }
+ bool flag2 = !XEntity.ValideEntity(e);
+ if (!flag2)
+ {
+ this.PretargetFx.transform.position = this.EntityOnUI(e);
+ bool flag3 = this.PretargetFx.transform.position.z < 0f;
+ if (flag3)
+ {
+ this.PretargetFx.transform.localPosition = XGameUI.Far_Far_Away;
+ }
+ else
+ {
+ Vector3 localPosition = this.PretargetFx.transform.localPosition;
+ localPosition.x = (float)Mathf.FloorToInt(localPosition.x);
+ localPosition.y = (float)Mathf.FloorToInt(localPosition.y);
+ localPosition.z = 0f;
+ this.PretargetFx.transform.localPosition = localPosition;
+ }
+ }
+ }
+
+ protected Vector3 EntityOnUI(XEntity e)
+ {
+ Vector3 vector = e.EngineObject.Position + new Vector3(0f, e.Height / 2f, 0f);
+ Vector3 vector2 = XSingleton<XScene>.singleton.GameCamera.UnityCamera.WorldToViewportPoint(vector);
+ return XSingleton<XGameUI>.singleton.UICamera.ViewportToWorldPoint(vector2);
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/BattleTargetHandler.cs.meta b/Client/Assets/Scripts/XMainClient/UI/BattleTargetHandler.cs.meta
new file mode 100644
index 00000000..6fa6c5da
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/BattleTargetHandler.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 3403c715bb85c3645832c2a7e607cbe1
+timeCreated: 1611403554
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/BattleVoiceHandler.cs b/Client/Assets/Scripts/XMainClient/UI/BattleVoiceHandler.cs
new file mode 100644
index 00000000..c4e58e7d
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/BattleVoiceHandler.cs
@@ -0,0 +1,67 @@
+using System;
+using System.Collections.Generic;
+using KKSG;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class BattleVoiceHandler : DlgHandlerBase
+ {
+ public GameObject tpl;
+
+ private XUIPool m_pool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ public Dictionary<ulong, BattleVoiceNode> dic = new Dictionary<ulong, BattleVoiceNode>();
+
+ protected override void Init()
+ {
+ base.Init();
+ this.tpl = base.PanelObject.transform.Find("tpl").gameObject;
+ this.m_pool.SetupPool(this.tpl.transform.parent.gameObject, this.tpl, 2u, true);
+ }
+
+ public void Refresh(List<VoipRoomMember> _server)
+ {
+ this.dic.Clear();
+ this.m_pool.ReturnAll(false);
+ for (int i = 0; i < _server.Count; i++)
+ {
+ GameObject gameObject = this.m_pool.FetchGameObject(false);
+ gameObject.transform.localPosition = new Vector3(-147f, (float)(10 - 40 * i), 0f);
+ IXUILabel ixuilabel = gameObject.GetComponent("XUILabel") as IXUILabel;
+ ixuilabel.SetText(_server[i].name);
+ GameObject gameObject2 = gameObject.transform.Find("voice").gameObject;
+ gameObject2.SetActive(true);
+ GameObject gameObject3 = gameObject.transform.Find("speak").gameObject;
+ gameObject3.SetActive(false);
+ BattleVoiceNode battleVoiceNode = new BattleVoiceNode();
+ battleVoiceNode.memberid = _server[i].memberID;
+ battleVoiceNode.sign = false;
+ battleVoiceNode.roleid = _server[i].roleID;
+ battleVoiceNode.speak = gameObject3;
+ battleVoiceNode.voice = gameObject2;
+ this.dic.Add(battleVoiceNode.roleid, battleVoiceNode);
+ }
+ }
+
+ public void Play(ulong[] roleids, int[] states)
+ {
+ bool flag = DlgBase<BattleMain, BattleMainBehaviour>.singleton.IsLoaded();
+ if (flag)
+ {
+ for (int i = 0; i < roleids.Length; i++)
+ {
+ bool flag2 = this.dic.ContainsKey(roleids[i]);
+ if (flag2)
+ {
+ this.dic[roleids[i]].speak.SetActive(states[i] == 2);
+ this.dic[roleids[i]].voice.SetActive(states[i] == 1);
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/BattleVoiceHandler.cs.meta b/Client/Assets/Scripts/XMainClient/UI/BattleVoiceHandler.cs.meta
new file mode 100644
index 00000000..69c1dafc
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/BattleVoiceHandler.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 6cc0305a67fcb554a87aa97a053f8ebc
+timeCreated: 1611403899
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/BattleVoiceNode.cs b/Client/Assets/Scripts/XMainClient/UI/BattleVoiceNode.cs
new file mode 100644
index 00000000..4d82b85c
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/BattleVoiceNode.cs
@@ -0,0 +1,18 @@
+using System;
+using UnityEngine;
+
+namespace XMainClient.UI
+{
+ public class BattleVoiceNode
+ {
+ public int memberid;
+
+ public bool sign;
+
+ public ulong roleid;
+
+ public GameObject voice;
+
+ public GameObject speak;
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/BattleVoiceNode.cs.meta b/Client/Assets/Scripts/XMainClient/UI/BattleVoiceNode.cs.meta
new file mode 100644
index 00000000..91f0ee07
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/BattleVoiceNode.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 4612984a8e59b944aa9c1c437051f73b
+timeCreated: 1611403649
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/BattleWorldBossHandler.cs b/Client/Assets/Scripts/XMainClient/UI/BattleWorldBossHandler.cs
new file mode 100644
index 00000000..2b0ef05f
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/BattleWorldBossHandler.cs
@@ -0,0 +1,475 @@
+using System;
+using System.Collections.Generic;
+using KKSG;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class BattleWorldBossHandler : DlgHandlerBase, IWorldBossBattleView
+ {
+ private IXUIButton _DamageRankBtn;
+
+ private GameObject _EncouragePanel;
+
+ private IXUIButton _DoEncourage;
+
+ private IXUISprite _EncourageClose;
+
+ private IXUILabel _CurrentEncourageEffect;
+
+ private IXUILabel _CurrentEncourageTitle;
+
+ private IXUILabel _CurrentEncourageType;
+
+ private IXUILabel _EncourageEffect;
+
+ private IXUILabel _EncourageMoneyCost;
+
+ private IXUITweenTool _CurrentEncourageEffectTween;
+
+ private GameObject _RankPanel;
+
+ private GameObject _AutoRevivePanel;
+
+ private IXUILabel _AutoReviveLeftTime;
+
+ private IXUILabel _ReviveCost;
+
+ private IXUISprite _ReviveCostIcon;
+
+ private IXUIButton _DoRevive;
+
+ public IXUITweenTool m_EncourageFrameTween;
+
+ public IXUITweenTool m_RankFrameTween;
+
+ private XWorldBossDamageRankHandler _RankHandler;
+
+ public IWorldBossBattleSource BattleSource;
+
+ private XElapseTimer m_AutoReviveLeftTime = new XElapseTimer();
+
+ private int m_nAutoReviveLeftTime;
+
+ private uint _GetBattleInfoToken;
+
+ private EncourageShowInfo[] m_encourageInfos;
+
+ private uint _LeaveSceneToken = 0u;
+
+ private uint _LeaveSceneTime = 0u;
+
+ private int _SelectIndex = 0;
+
+ protected override void Init()
+ {
+ base.Init();
+ this._DamageRankBtn = (base.PanelObject.transform.Find("DamageRankBtn").GetComponent("XUIButton") as IXUIButton);
+ this.m_encourageInfos = new EncourageShowInfo[2];
+ this.m_encourageInfos[0] = new EncourageShowInfo(base.PanelObject.transform.Find("EncourageBtn0"), base.PanelObject.transform.Find("GuildBossbuff"), 0);
+ this.m_encourageInfos[1] = new EncourageShowInfo(base.PanelObject.transform.Find("EncourageBtn1"), base.PanelObject.transform.Find("GuildBossbuff1"), 1);
+ this._EncouragePanel = base.PanelObject.transform.Find("EncourageMenu").gameObject;
+ this._DoEncourage = (this._EncouragePanel.transform.Find("Do").GetComponent("XUIButton") as IXUIButton);
+ this._EncourageClose = (this._EncouragePanel.transform.Find("Close").GetComponent("XUISprite") as IXUISprite);
+ this._CurrentEncourageEffect = (this._EncouragePanel.transform.Find("CurrentEffect").GetComponent("XUILabel") as IXUILabel);
+ this._CurrentEncourageEffectTween = (this._EncouragePanel.transform.Find("CurrentEffect").GetComponent("XUIPlayTween") as IXUITweenTool);
+ this._CurrentEncourageTitle = (this._EncouragePanel.transform.Find("CurrentTitle").GetComponent("XUILabel") as IXUILabel);
+ this._CurrentEncourageType = (this._EncouragePanel.transform.Find("CurrentType").GetComponent("XUILabel") as IXUILabel);
+ this._EncourageEffect = (this._EncouragePanel.transform.Find("Effect").GetComponent("XUILabel") as IXUILabel);
+ this._EncourageMoneyCost = (this._EncouragePanel.transform.Find("Do/MoneyCost").GetComponent("XUILabel") as IXUILabel);
+ this._RankPanel = base.PanelObject.transform.Find("WorldBossRankPanel").gameObject;
+ this._AutoRevivePanel = base.PanelObject.transform.Find("AutoRevivePanel").gameObject;
+ this._AutoReviveLeftTime = (this._AutoRevivePanel.transform.Find("LeftTime").GetComponent("XUILabel") as IXUILabel);
+ this._ReviveCost = (this._AutoRevivePanel.transform.Find("DoRightnow/MoneyCost").GetComponent("XUILabel") as IXUILabel);
+ this._ReviveCostIcon = (this._AutoRevivePanel.transform.Find("DoRightnow/MoneyCost/Icon").GetComponent("XUISprite") as IXUISprite);
+ this._DoRevive = (this._AutoRevivePanel.transform.Find("DoRightnow").GetComponent("XUIButton") as IXUIButton);
+ this.m_EncourageFrameTween = (this._EncouragePanel.GetComponent("XUIPlayTween") as IXUITweenTool);
+ this.m_RankFrameTween = (this._RankPanel.GetComponent("XUIPlayTween") as IXUITweenTool);
+ DlgHandlerBase.EnsureCreate<XWorldBossDamageRankHandler>(ref this._RankHandler, this._RankPanel, null, true);
+ this._EncouragePanel.SetActive(false);
+ this._AutoRevivePanel.SetActive(false);
+ this._RankHandler.SetVisible(false);
+ this._SetupRank();
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ for (int i = 0; i < this.m_encourageInfos.Length; i++)
+ {
+ this.m_encourageInfos[i].RegisterCourageClick(new ButtonClickEventHandler(this._OnEncouragePanelClicked));
+ }
+ this._DamageRankBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this._OnDamageRankClicked));
+ this._DoEncourage.RegisterClickEventHandler(new ButtonClickEventHandler(this._OnEncourageDoClicked));
+ this._EncourageClose.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this._OnEncourageCloseClicked));
+ this._DoRevive.RegisterClickEventHandler(new ButtonClickEventHandler(this._OnReviveDoClicked));
+ this.m_RankFrameTween.RegisterOnFinishEventHandler(new OnTweenFinishEventHandler(this._OnTweenFinishEventHandler));
+ }
+
+ public override void OnUpdate()
+ {
+ base.OnUpdate();
+ bool flag = this._RankHandler != null && this._RankHandler.active;
+ if (flag)
+ {
+ this._RankHandler.OnUpdate();
+ }
+ bool activeInHierarchy = this._AutoRevivePanel.activeInHierarchy;
+ if (activeInHierarchy)
+ {
+ this.m_AutoReviveLeftTime.Update();
+ int num = (int)this.m_AutoReviveLeftTime.LeftTime;
+ bool flag2 = num != this.m_nAutoReviveLeftTime;
+ if (flag2)
+ {
+ this.m_nAutoReviveLeftTime = num;
+ this._AutoReviveLeftTime.SetText(XSingleton<UiUtility>.singleton.TimeFormatString(this.m_nAutoReviveLeftTime, 2, 3, 4, false, true));
+ }
+ }
+ }
+
+ public override void OnUnload()
+ {
+ DlgHandlerBase.EnsureUnload<XWorldBossDamageRankHandler>(ref this._RankHandler);
+ for (int i = 0; i < this.m_encourageInfos.Length; i++)
+ {
+ bool flag = this.m_encourageInfos[i] != null;
+ if (flag)
+ {
+ this.m_encourageInfos[i].OnDispose();
+ }
+ this.m_encourageInfos[i] = null;
+ }
+ this.m_encourageInfos = null;
+ SceneType sceneType = XSingleton<XScene>.singleton.SceneType;
+ SceneType sceneType2 = sceneType;
+ if (sceneType2 != SceneType.SCENE_WORLDBOSS)
+ {
+ if (sceneType2 == SceneType.SCENE_GUILD_BOSS)
+ {
+ XGuildDragonDocument specificDocument = XDocuments.GetSpecificDocument<XGuildDragonDocument>(XGuildDragonDocument.uuID);
+ specificDocument.BattleHandler = null;
+ }
+ }
+ else
+ {
+ XWorldBossDocument specificDocument2 = XDocuments.GetSpecificDocument<XWorldBossDocument>(XWorldBossDocument.uuID);
+ specificDocument2.BattleHandler = null;
+ }
+ this.BattleSource = null;
+ bool flag2 = this._LeaveSceneToken > 0u;
+ if (flag2)
+ {
+ XSingleton<XTimerMgr>.singleton.KillTimer(this._LeaveSceneToken);
+ this._LeaveSceneToken = 0u;
+ }
+ base.OnUnload();
+ }
+
+ private void _SetupRank()
+ {
+ List<RankeType> list = new List<RankeType>();
+ SceneType sceneType = XSingleton<XScene>.singleton.SceneType;
+ SceneType sceneType2 = sceneType;
+ if (sceneType2 != SceneType.SCENE_WORLDBOSS)
+ {
+ if (sceneType2 == SceneType.SCENE_GUILD_BOSS)
+ {
+ XGuildDragonDocument specificDocument = XDocuments.GetSpecificDocument<XGuildDragonDocument>(XGuildDragonDocument.uuID);
+ this.BattleSource = specificDocument;
+ this._RankHandler.RankSource = specificDocument;
+ specificDocument.BattleHandler = this;
+ specificDocument.RankHandler = this._RankHandler;
+ list.Add(RankeType.GuildBossRoleRank);
+ this.m_encourageInfos[0].Valid = true;
+ this.m_encourageInfos[0].attr_string = "GuildBossAddAttr";
+ this.m_encourageInfos[0].cost_string = "GuildBossConsume";
+ this.m_encourageInfos[0].encourage_type = "GUILDBOSS_ENCOURAGE_TYPE";
+ this.m_encourageInfos[0].encourage_title = "GUILDBOSS_ENCOURAGE_TITLE";
+ this.m_encourageInfos[0].encourage_effect = "GUILDBOSS_ENCOURAGE_EFFECT";
+ this.m_encourageInfos[0].BattleSource = specificDocument;
+ this.m_encourageInfos[0].ReqEncourage = new Action(specificDocument.ReqEncourage);
+ this.m_encourageInfos[1].Valid = false;
+ }
+ }
+ else
+ {
+ XWorldBossDocument specificDocument2 = XDocuments.GetSpecificDocument<XWorldBossDocument>(XWorldBossDocument.uuID);
+ this.BattleSource = specificDocument2;
+ this._RankHandler.RankSource = specificDocument2;
+ specificDocument2.BattleHandler = this;
+ specificDocument2.RankHandler = this._RankHandler;
+ list.Add(RankeType.WorldBossDamageRank);
+ list.Add(RankeType.WorldBossGuildRank);
+ this.m_encourageInfos[0].Valid = true;
+ this.m_encourageInfos[0].attr_string = "WorldBossAddAttr";
+ this.m_encourageInfos[0].cost_string = "WorldBossConsume";
+ this.m_encourageInfos[0].encourage_type = "WORLDBOSS_ENCOURAGE_TYPE";
+ this.m_encourageInfos[0].encourage_title = "WORLDBOSS_ENCOURAGE_TITLE";
+ this.m_encourageInfos[0].encourage_effect = "WORLDBOSS_ENCOURAGE_EFFECT";
+ this.m_encourageInfos[0].ReqEncourage = new Action(specificDocument2.ReqEncourage);
+ this.m_encourageInfos[0].BattleSource = specificDocument2;
+ XGuildDocument specificDocument3 = XDocuments.GetSpecificDocument<XGuildDocument>(XGuildDocument.uuID);
+ bool bInGuild = specificDocument3.bInGuild;
+ if (bInGuild)
+ {
+ this.m_encourageInfos[1].Valid = true;
+ this.m_encourageInfos[1].attr_string = "WorldBossGuildAddAttr";
+ this.m_encourageInfos[1].cost_string = "WorldBossGuildConsume";
+ this.m_encourageInfos[1].encourage_type = "GUILDBOSS_ENCOURAGE_TYPE";
+ this.m_encourageInfos[1].encourage_title = "GUILDBOSS_ENCOURAGE_TITLE";
+ this.m_encourageInfos[1].encourage_effect = "GUILDBOSS_ENCOURAGE_EFFECT";
+ this.m_encourageInfos[1].ReqEncourage = new Action(specificDocument2.ReqEncourageTwo);
+ this.m_encourageInfos[1].BattleSource = specificDocument2;
+ list.Add(RankeType.WorldBossGuildRoleRank);
+ }
+ else
+ {
+ this.m_encourageInfos[1].Valid = false;
+ }
+ }
+ this._RankHandler.SetupRanks(list, true);
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ this.ReqBattleInfo();
+ this._OnDamageRankClicked(this._DamageRankBtn);
+ }
+
+ private void ReqBattleInfo()
+ {
+ this.BattleSource.ReqBattleInfo();
+ XSingleton<XTimerMgr>.singleton.KillTimer(this._GetBattleInfoToken);
+ this._GetBattleInfoToken = XSingleton<XTimerMgr>.singleton.SetTimer(10f, new XTimerMgr.ElapsedEventHandler(this.ReqBattleInfoTimer), null);
+ }
+
+ private void ReqBattleInfoTimer(object o)
+ {
+ this.ReqBattleInfo();
+ }
+
+ protected override void OnHide()
+ {
+ bool flag = this._LeaveSceneToken > 0u;
+ if (flag)
+ {
+ XSingleton<XTimerMgr>.singleton.KillTimer(this._LeaveSceneToken);
+ this._LeaveSceneToken = 0u;
+ }
+ base.OnHide();
+ }
+
+ public void RefreshAllEnacourage()
+ {
+ bool flag = this.m_encourageInfos == null;
+ if (!flag)
+ {
+ int i = 0;
+ int num = this.m_encourageInfos.Length;
+ while (i < num)
+ {
+ EncourageShowInfo encourageShowInfo = this.m_encourageInfos[i];
+ bool flag2 = encourageShowInfo == null || !encourageShowInfo.Valid;
+ if (flag2)
+ {
+ break;
+ }
+ this.RefreshEncourage(i);
+ i++;
+ }
+ }
+ }
+
+ public void RefreshEncourage()
+ {
+ this.RefreshEncourage(this._SelectIndex);
+ }
+
+ public void RefreshEncourage(int index)
+ {
+ bool flag = !base.IsVisible();
+ if (!flag)
+ {
+ EncourageShowInfo encourageShowInfo = this.m_encourageInfos[index];
+ bool flag2 = encourageShowInfo == null || !encourageShowInfo.Valid;
+ if (!flag2)
+ {
+ string[] array = XSingleton<XGlobalConfig>.singleton.GetValue(encourageShowInfo.attr_string).Split(XGlobalConfig.ListSeparator);
+ string[] array2 = array[0].Split(XGlobalConfig.SequenceSeparator);
+ int num = int.Parse(array2[1]);
+ encourageShowInfo.SetEncourageValue(num);
+ bool flag3 = index == this._SelectIndex;
+ if (flag3)
+ {
+ this._EncourageEffect.SetText(XStringDefineProxy.GetString(encourageShowInfo.encourage_effect, new object[]
+ {
+ num
+ }));
+ this._CurrentEncourageTitle.SetText(XStringDefineProxy.GetString(encourageShowInfo.encourage_title));
+ this._CurrentEncourageType.SetText(XStringDefineProxy.GetString(encourageShowInfo.encourage_type));
+ this._CurrentEncourageEffect.SetText(string.Format("{0}%", (long)num * (long)((ulong)encourageShowInfo.EncourageCount)));
+ this._CurrentEncourageEffectTween.ResetTween(true);
+ this._CurrentEncourageEffectTween.PlayTween(true, 0.5f);
+ CostInfo costInfo = XSingleton<XTakeCostMgr>.singleton.QueryCost(encourageShowInfo.cost_string, (int)encourageShowInfo.EncourageCount);
+ this._EncourageMoneyCost.SetText(costInfo.count.ToString());
+ }
+ }
+ }
+ }
+
+ private bool _OnEncouragePanelClicked(IXUIButton btn)
+ {
+ this._SelectIndex = (int)btn.ID;
+ XSingleton<XDebug>.singleton.AddGreenLog("_OnEncouragePanelClicked" + this._SelectIndex.ToString(), null, null, null, null, null);
+ this.RefreshEncourage();
+ this.m_EncourageFrameTween.PlayTween(true, -1f);
+ return true;
+ }
+
+ private bool _OnDamageRankClicked(IXUIButton btn)
+ {
+ bool flag = !base.IsVisible();
+ bool result;
+ if (flag)
+ {
+ result = false;
+ }
+ else
+ {
+ IXUISprite ixuisprite = btn.gameObject.GetComponent("XUISprite") as IXUISprite;
+ bool flag2 = ixuisprite == null || this._RankHandler == null || this.m_RankFrameTween == null;
+ if (flag2)
+ {
+ result = false;
+ }
+ else
+ {
+ bool flag3 = !this._RankHandler.active;
+ if (flag3)
+ {
+ this._RankHandler.SetVisible(true);
+ this.m_RankFrameTween.PlayTween(true, -1f);
+ ixuisprite.SetFlipHorizontal(true);
+ }
+ else
+ {
+ this.m_RankFrameTween.PlayTween(false, -1f);
+ ixuisprite.SetFlipHorizontal(false);
+ }
+ result = true;
+ }
+ }
+ return result;
+ }
+
+ private void _OnTweenFinishEventHandler(IXUITweenTool tween)
+ {
+ bool flag = !tween.bPlayForward && this._RankHandler != null;
+ if (flag)
+ {
+ this._RankHandler.SetVisible(false);
+ }
+ }
+
+ private void _OnEncourageCloseClicked(IXUISprite iSp)
+ {
+ this._EncouragePanel.SetActive(false);
+ }
+
+ private bool _OnEncourageDoClicked(IXUIButton btn)
+ {
+ EncourageShowInfo encourageShowInfo = this.m_encourageInfos[this._SelectIndex];
+ bool flag = encourageShowInfo == null || encourageShowInfo.ReqEncourage == null;
+ bool result;
+ if (flag)
+ {
+ result = false;
+ }
+ else
+ {
+ CostInfo costInfo = XSingleton<XTakeCostMgr>.singleton.QueryCost(encourageShowInfo.cost_string, (int)encourageShowInfo.EncourageCount);
+ ulong itemCount = XBagDocument.BagDoc.GetItemCount(XFastEnumIntEqualityComparer<ItemEnum>.ToInt(ItemEnum.DRAGON_COIN));
+ bool flag2 = (ulong)costInfo.count > itemCount;
+ if (flag2)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString("ERR_AUCT_DRAGONCOINLESS"), "fece00");
+ }
+ else
+ {
+ encourageShowInfo.ReqEncourage();
+ }
+ result = true;
+ }
+ return result;
+ }
+
+ public void SetLeftTime(uint leftTime)
+ {
+ bool flag = DlgBase<BattleMain, BattleMainBehaviour>.singleton.IsLoaded();
+ if (flag)
+ {
+ DlgBase<BattleMain, BattleMainBehaviour>.singleton.SetLeftTime(leftTime, -1);
+ }
+ bool flag2 = DlgBase<SpectateSceneView, SpectateSceneBehaviour>.singleton.IsLoaded();
+ if (flag2)
+ {
+ DlgBase<SpectateSceneView, SpectateSceneBehaviour>.singleton.SetLeftTime(leftTime);
+ }
+ }
+
+ private bool _OnReviveDoClicked(IXUIButton btn)
+ {
+ RpcC2G_Revive rpcC2G_Revive = new RpcC2G_Revive();
+ rpcC2G_Revive.oArg.selectBuff = 0u;
+ rpcC2G_Revive.oArg.type = ReviveType.ReviveItem;
+ XSingleton<XClientNetwork>.singleton.Send(rpcC2G_Revive);
+ return true;
+ }
+
+ public void SetAutoRevive(int leftTime, uint cost, uint costType)
+ {
+ bool flag = leftTime <= 0;
+ if (!flag)
+ {
+ this._AutoRevivePanel.SetActive(true);
+ this.m_AutoReviveLeftTime.LeftTime = (float)leftTime;
+ this._AutoReviveLeftTime.SetText(XSingleton<UiUtility>.singleton.TimeFormatString(leftTime, 2, 3, 4, false, true));
+ this._ReviveCost.SetText(cost.ToString());
+ string itemSmallIcon = XBagDocument.GetItemSmallIcon((int)costType, 0u);
+ this._ReviveCostIcon.SetSprite(itemSmallIcon);
+ }
+ }
+
+ public void HideAutoRevive()
+ {
+ this._AutoRevivePanel.SetActive(false);
+ }
+
+ public void OnLeaveSceneCountDown(uint time)
+ {
+ this._LeaveSceneTime = time;
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XSingleton<XStringTable>.singleton.GetString("WORLDBOSS_LEAVE_SCENE_TIP"), "fece00");
+ XSingleton<XTimerMgr>.singleton.KillTimer(this._LeaveSceneToken);
+ this._LeaveSceneToken = XSingleton<XTimerMgr>.singleton.SetTimer(1f, new XTimerMgr.ElapsedEventHandler(this.ShowLeaveSceneTip), null);
+ }
+
+ private void ShowLeaveSceneTip(object o)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(this._LeaveSceneTime.ToString(), "fece00");
+ this._LeaveSceneTime -= 1u;
+ XSingleton<XTimerMgr>.singleton.KillTimer(this._LeaveSceneToken);
+ this._LeaveSceneToken = XSingleton<XTimerMgr>.singleton.SetTimer(1f, new XTimerMgr.ElapsedEventHandler(this.ShowLeaveSceneTip), null);
+ bool flag = this._LeaveSceneTime <= 0u && this._LeaveSceneToken > 0u;
+ if (flag)
+ {
+ XSingleton<XTimerMgr>.singleton.KillTimer(this._LeaveSceneToken);
+ this._LeaveSceneToken = 0u;
+ }
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/BattleWorldBossHandler.cs.meta b/Client/Assets/Scripts/XMainClient/UI/BattleWorldBossHandler.cs.meta
new file mode 100644
index 00000000..1bf834ac
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/BattleWorldBossHandler.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: b14fe224f1b697140ae64b1ca2da161a
+timeCreated: 1611404355
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/BossRushBehavior.cs b/Client/Assets/Scripts/XMainClient/UI/BossRushBehavior.cs
new file mode 100644
index 00000000..53099ca3
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/BossRushBehavior.cs
@@ -0,0 +1,134 @@
+using System;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ public class BossRushBehavior : DlgBehaviourBase
+ {
+ public IXUISprite m_sprBg;
+
+ public IXUILabel m_lblLayer;
+
+ public IXUILabel m_lblProgress;
+
+ public IXUILabel m_lblTitle;
+
+ public IXUILabel m_lblDiff;
+
+ public GameObject m_objAtt;
+
+ public GameObject m_objDef;
+
+ public GameObject m_objLife;
+
+ public IXUILabel m_lblDesc;
+
+ public IXUILabel m_lblLeft;
+
+ public IXUIButton m_btnClose;
+
+ public IXUIButton m_Help;
+
+ public IXUISprite m_sprVip;
+
+ public IXUISprite m_sprPrivilegeBg;
+
+ public IXUILabel m_lblPrivilege;
+
+ public IXUITexture m_txtBoss;
+
+ public XUIPool m_attpool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ public XUIPool m_defpool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ public XUIPool m_lifepool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ public GameObject m_objRwd;
+
+ public IXUISprite m_sprBuff1;
+
+ public IXUISprite m_sprBuff2;
+
+ public IXUILabel m_lblBuff1;
+
+ public IXUILabel m_lblBuff2;
+
+ public XUIPool m_rwdpool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ public IXUILabel m_lblRefresh;
+
+ public IXUILabel m_lblFree;
+
+ public IXUISprite m_sprCoin;
+
+ public IXUILabel m_lblCost;
+
+ public IXUIButton m_btnRefesh;
+
+ public IXUIButton m_btnBattle;
+
+ public IXUILabel m_lblBattle;
+
+ public GameObject m_objFx;
+
+ public IUIDummy m_BossSnapshot;
+
+ public IXUIButton m_SweepButton;
+
+ private void Awake()
+ {
+ this.m_sprVip = (base.transform.Find("Bg/tq").GetComponent("XUISprite") as IXUISprite);
+ this.m_lblPrivilege = (base.transform.Find("Bg/tq/t").GetComponent("XUILabel") as IXUILabel);
+ this.m_sprPrivilegeBg = (base.transform.Find("Bg/tq/p").GetComponent("XUISprite") as IXUISprite);
+ this.m_Help = (base.transform.Find("Bg/Help").GetComponent("XUIButton") as IXUIButton);
+ this.m_lblLayer = (base.transform.Find("Bg/left/Layer").GetComponent("XUILabel") as IXUILabel);
+ this.m_lblProgress = (base.transform.Find("Bg/left/RemainTime").GetComponent("XUILabel") as IXUILabel);
+ this.m_lblTitle = (base.transform.Find("Bg/left/Name").GetComponent("XUILabel") as IXUILabel);
+ this.m_lblDiff = (base.transform.Find("Bg/left/Diff").GetComponent("XUILabel") as IXUILabel);
+ this.m_lblDesc = (base.transform.Find("Bg/left/Boss/SkillName").GetComponent("XUILabel") as IXUILabel);
+ this.m_objAtt = base.transform.Find("Bg/left/Boss/T/attTpl").gameObject;
+ this.m_objDef = base.transform.Find("Bg/left/Boss/T/attTpl").gameObject;
+ this.m_objLife = base.transform.Find("Bg/left/Boss/T/attTpl").gameObject;
+ this.m_btnClose = (base.transform.Find("Bg/Close").GetComponent("XUIButton") as IXUIButton);
+ this.m_lblLeft = (base.transform.Find("Bg/times").GetComponent("XUILabel") as IXUILabel);
+ this.m_objRwd = base.transform.Find("Bg/right/T1/ItemTpl").gameObject;
+ this.m_sprBuff1 = (base.transform.Find("Bg/right/T2/Icon1").GetComponent("XUISprite") as IXUISprite);
+ this.m_sprBuff2 = (base.transform.Find("Bg/right/T2/Icon").GetComponent("XUISprite") as IXUISprite);
+ this.m_lblBuff1 = (base.transform.Find("Bg/right/T2/Icon1/T2").GetComponent("XUILabel") as IXUILabel);
+ this.m_lblBuff2 = (base.transform.Find("Bg/right/T2/Icon/T2").GetComponent("XUILabel") as IXUILabel);
+ this.m_txtBoss = (base.transform.Find("Bg/Boss").GetComponent("XUITexture") as IXUITexture);
+ this.m_lblRefresh = (base.transform.Find("Bg/btm/Refresh/Ti1").GetComponent("XUILabel") as IXUILabel);
+ this.m_lblFree = (base.transform.Find("Bg/btm/Refresh/free").GetComponent("XUILabel") as IXUILabel);
+ this.m_sprCoin = (base.transform.Find("Bg/btm/Refresh/P").GetComponent("XUISprite") as IXUISprite);
+ this.m_lblCost = (base.transform.Find("Bg/btm/Refresh/P/T1").GetComponent("XUILabel") as IXUILabel);
+ this.m_btnRefesh = (base.transform.Find("Bg/btm/Refresh").GetComponent("XUIButton") as IXUIButton);
+ this.m_btnBattle = (base.transform.Find("Bg/btm/Go").GetComponent("XUIButton") as IXUIButton);
+ this.m_lblBattle = (base.transform.Find("Bg/btm/Go/T1").GetComponent("XUILabel") as IXUILabel);
+ this.m_sprBg = (base.transform.Find("Bg").GetComponent("XUISprite") as IXUISprite);
+ this.m_objFx = base.transform.Find("Bg/effect").gameObject;
+ this.m_objFx.SetActive(false);
+ this.m_attpool.SetupPool(this.m_objAtt.transform.parent.gameObject, this.m_objAtt, 2u, true);
+ this.m_defpool.SetupPool(this.m_objDef.transform.parent.gameObject, this.m_objDef, 2u, true);
+ this.m_lifepool.SetupPool(this.m_objLife.transform.parent.gameObject, this.m_objLife, 2u, true);
+ this.m_rwdpool.SetupPool(this.m_objRwd.transform.parent.gameObject, this.m_objRwd, 2u, true);
+ this.m_BossSnapshot = (base.transform.Find("Bg/Boss").GetComponent("UIDummy") as IUIDummy);
+ this.m_SweepButton = (base.transform.Find("Bg/btm/SweepButton").GetComponent("XUIButton") as IXUIButton);
+ }
+
+ public void LoadBossAndStart()
+ {
+ base.StartCoroutine(DlgBase<BossRushDlg, BossRushBehavior>.singleton.LoadBossAssets());
+ }
+
+ public void ResetPool()
+ {
+ this.m_attpool.ReturnAll(false);
+ this.m_defpool.ReturnAll(false);
+ this.m_lifepool.ReturnAll(false);
+ this.m_rwdpool.ReturnAll(false);
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/BossRushBehavior.cs.meta b/Client/Assets/Scripts/XMainClient/UI/BossRushBehavior.cs.meta
new file mode 100644
index 00000000..762e67ee
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/BossRushBehavior.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: d72c440a3d5866f4f953ae9168f2dacf
+timeCreated: 1611404634
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/BossRushDlg.cs b/Client/Assets/Scripts/XMainClient/UI/BossRushDlg.cs
new file mode 100644
index 00000000..d6617bbd
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/BossRushDlg.cs
@@ -0,0 +1,702 @@
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using KKSG;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class BossRushDlg : DlgBase<BossRushDlg, BossRushBehavior>
+ {
+ public override string fileName
+ {
+ get
+ {
+ return "Hall/BossRushNewDlg";
+ }
+ }
+
+ public override bool pushstack
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override int sysid
+ {
+ get
+ {
+ return XFastEnumIntEqualityComparer<XSysDefine>.ToInt(XSysDefine.XSys_BossRush);
+ }
+ }
+
+ public override bool hideMainMenu
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override bool fullscreenui
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public bool isHallUI
+ {
+ get
+ {
+ return XSingleton<XGame>.singleton.CurrentStage.Stage == EXStage.Hall;
+ }
+ }
+
+ public bool isBattle
+ {
+ get
+ {
+ return XSingleton<XGame>.singleton.CurrentStage.Stage == EXStage.World;
+ }
+ }
+
+ public uint killAllMonster
+ {
+ get
+ {
+ bool flag = this._doc == null || this._doc.respData == null;
+ uint result;
+ if (flag)
+ {
+ result = 1u;
+ }
+ else
+ {
+ XLevelState ls = XSingleton<XLevelStatistics>.singleton.ls;
+ result = ((this._doc.respData.currank >= this._doc.respData.maxrank && ls._boss_rush_kill > this.killedboss) ? 1u : 0u);
+ }
+ return result;
+ }
+ }
+
+ public bool isWin
+ {
+ get
+ {
+ bool flag = this._doc == null || this._doc.respData == null;
+ bool result;
+ if (flag)
+ {
+ result = true;
+ }
+ else
+ {
+ XLevelState ls = XSingleton<XLevelStatistics>.singleton.ls;
+ result = (this._doc.respData.currank >= this._doc.respData.maxrank && ls._boss_rush_kill > this.killedboss);
+ }
+ return result;
+ }
+ }
+
+ private bool isPrivilege
+ {
+ get
+ {
+ XWelfareDocument specificDocument = XDocuments.GetSpecificDocument<XWelfareDocument>(XWelfareDocument.uuID);
+ bool flag = specificDocument == null;
+ return !flag && specificDocument.IsOwnMemberPrivilege(MemberPrivilege.KingdomPrivilege_Adventurer);
+ }
+ }
+
+ public string bossName
+ {
+ get
+ {
+ bool flag = this._doc == null;
+ if (flag)
+ {
+ this._doc = XDocuments.GetSpecificDocument<XBossBushDocument>(XBossBushDocument.uuID);
+ }
+ byte[] bossdifficult = this._doc.bossRushRow.bossdifficult;
+ bool flag2 = bossdifficult == null && bossdifficult.Length < 1;
+ string result;
+ if (flag2)
+ {
+ result = "";
+ }
+ else
+ {
+ result = this.colors[(int)(bossdifficult[0] - 1)] + this._doc.entityRow.Name;
+ }
+ return result;
+ }
+ }
+
+ private XBossBushDocument _doc = null;
+
+ private XSweepDocument _sweepDoc = null;
+
+ private XWelfareDocument _welfareDoc = null;
+
+ public GameObject m_animPanel;
+
+ private XDummy m_Dummy;
+
+ private uint m_timertoken = 0u;
+
+ public string[] colors = new string[]
+ {
+ "[00e901]",
+ "[ffffff]",
+ "[ffaf00]",
+ "[aa7de4]"
+ };
+
+ public bool startFromHall = false;
+
+ private int killedboss = 0;
+
+ public bool backHall = false;
+
+ private int refreshCost = 0;
+
+ private int refreshItemid = 1;
+
+ private bool isProcessFighting = false;
+
+ private bool isDelayRefresh = false;
+
+ protected override void Init()
+ {
+ base.Init();
+ this._doc = (XSingleton<XGame>.singleton.Doc.GetXComponent(XBossBushDocument.uuID) as XBossBushDocument);
+ this._sweepDoc = XDocuments.GetSpecificDocument<XSweepDocument>(XSweepDocument.uuID);
+ this._welfareDoc = XDocuments.GetSpecificDocument<XWelfareDocument>(XWelfareDocument.uuID);
+ this.m_animPanel = this.m_uiBehaviour.transform.Find("Bg/RefreshAnim").gameObject;
+ XSingleton<XBossRefreshAnimHander>.singleton.Init(this.m_animPanel);
+ this.colors[0] = "[" + XSingleton<XGlobalConfig>.singleton.GetValue("Diff0Color") + "]";
+ this.colors[1] = "[" + XSingleton<XGlobalConfig>.singleton.GetValue("Diff1Color") + "]";
+ this.colors[2] = "[" + XSingleton<XGlobalConfig>.singleton.GetValue("Diff2Color") + "]";
+ this.colors[3] = "[" + XSingleton<XGlobalConfig>.singleton.GetValue("Diff3Color") + "]";
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ this.m_uiBehaviour.m_btnRefesh.RegisterClickEventHandler(new ButtonClickEventHandler(this.OpenAnimDlg));
+ this.m_uiBehaviour.m_btnBattle.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnGoBattle));
+ base.uiBehaviour.m_SweepButton.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnSweepButtonClicked));
+ this.m_uiBehaviour.m_btnClose.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnClose));
+ this.m_uiBehaviour.m_sprBg.RegisterSpriteDragEventHandler(new SpriteDragEventHandler(this.OnMonsterDrag));
+ base.uiBehaviour.m_Help.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnHelpClicked));
+ base.uiBehaviour.m_sprPrivilegeBg.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnMemberPrivilegeClicked));
+ }
+
+ private void OnMemberPrivilegeClicked(IXUISprite btn)
+ {
+ DlgBase<XWelfareView, XWelfareBehaviour>.singleton.CheckActiveMemberPrivilege(MemberPrivilege.KingdomPrivilege_Adventurer);
+ }
+
+ public bool OnHelpClicked(IXUIButton button)
+ {
+ DlgBase<XCommonHelpTipView, XCommonHelpTipBehaviour>.singleton.ShowHelp(XSysDefine.XSys_BossRush);
+ return true;
+ }
+
+ protected override void OnShow()
+ {
+ this.m_animPanel.SetActive(false);
+ this.m_uiBehaviour.m_objFx.SetActive(false);
+ base.OnShow();
+ base.Alloc3DAvatarPool("BossRushDlg");
+ this._doc = (XSingleton<XGame>.singleton.Doc.GetXComponent(XBossBushDocument.uuID) as XBossBushDocument);
+ this._doc.ParseRefresh();
+ this.isProcessFighting = false;
+ }
+
+ protected bool OnMonsterDrag(Vector2 delta)
+ {
+ bool flag = this.m_Dummy != null;
+ if (flag)
+ {
+ this.m_Dummy.EngineObject.Rotate(Vector3.up, -delta.x / 2f);
+ }
+ return true;
+ }
+
+ public override void StackRefresh()
+ {
+ base.StackRefresh();
+ base.Alloc3DAvatarPool("BossRushDlg");
+ this.RefreshBoss();
+ }
+
+ public override void LeaveStackTop()
+ {
+ base.LeaveStackTop();
+ base.uiBehaviour.m_objFx.SetActive(false);
+ XSingleton<XTimerMgr>.singleton.KillTimer(this.m_timertoken);
+ XSingleton<X3DAvatarMgr>.singleton.DestroyDummy(this.m_dummPool, this.m_Dummy);
+ this.m_Dummy = null;
+ }
+
+ public override void OnUpdate()
+ {
+ base.OnUpdate();
+ bool activeSelf = this.m_animPanel.activeSelf;
+ if (activeSelf)
+ {
+ XSingleton<XBossRefreshAnimHander>.singleton.OnUpdate();
+ }
+ }
+
+ protected override void OnHide()
+ {
+ base.OnHide();
+ XSingleton<XTimerMgr>.singleton.KillTimer(this.m_timertoken);
+ base.Return3DAvatarPool();
+ this.m_Dummy = null;
+ }
+
+ protected override void OnUnload()
+ {
+ XSingleton<XBossRefreshAnimHander>.singleton.OnUnload();
+ base.Return3DAvatarPool();
+ this.m_Dummy = null;
+ bool flag = this.m_timertoken > 0u;
+ if (flag)
+ {
+ XSingleton<XTimerMgr>.singleton.KillTimer(this.m_timertoken);
+ }
+ this.isDelayRefresh = false;
+ base.OnUnload();
+ }
+
+ private bool OnClose(IXUIButton btn)
+ {
+ bool isHallUI = this.isHallUI;
+ if (isHallUI)
+ {
+ this.SetVisible(false, true);
+ }
+ else
+ {
+ this.backHall = true;
+ XSingleton<XScene>.singleton.ReqLeaveScene();
+ }
+ return true;
+ }
+
+ private bool OnGoBattle(IXUIButton btn)
+ {
+ bool flag = XTeamDocument.GoSingleBattleBeforeNeed(new ButtonClickEventHandler(this.OnGoBattle), btn) || this.isProcessFighting;
+ bool result;
+ if (flag)
+ {
+ result = true;
+ }
+ else
+ {
+ this.isProcessFighting = true;
+ bool isBattle = this.isBattle;
+ if (isBattle)
+ {
+ base.uiBehaviour.LoadBossAndStart();
+ }
+ else
+ {
+ this.GoBattle();
+ }
+ result = true;
+ }
+ return result;
+ }
+
+ private bool OnSweepButtonClicked(IXUIButton button)
+ {
+ bool flag = DlgBase<XWelfareView, XWelfareBehaviour>.singleton.CheckActiveMemberPrivilege(MemberPrivilege.KingdomPrivilege_Commerce);
+ if (flag)
+ {
+ this._sweepDoc.TrySweepQuery(2010u, 1u);
+ }
+ return true;
+ }
+
+ public void MakeTips()
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString("BOSSRUSH_NOTE"), "fece00");
+ }
+
+ public bool GoBattle()
+ {
+ XLevelState ls = XSingleton<XLevelStatistics>.singleton.ls;
+ bool flag = ls != null;
+ if (flag)
+ {
+ this.killedboss = ls._boss_rush_kill;
+ }
+ this.startFromHall = this.isHallUI;
+ bool isHallUI = this.isHallUI;
+ if (isHallUI)
+ {
+ List<uint> list = ListPool<uint>.Get();
+ XSingleton<XSceneMgr>.singleton.GetSceneListByType(XChapterType.SCENE_BOSSRUSH, list);
+ bool flag2 = list != null && list.Count > 0;
+ if (flag2)
+ {
+ PtcC2G_EnterSceneReq ptcC2G_EnterSceneReq = new PtcC2G_EnterSceneReq();
+ ptcC2G_EnterSceneReq.Data.sceneID = list[0];
+ XSingleton<XClientNetwork>.singleton.Send(ptcC2G_EnterSceneReq);
+ }
+ else
+ {
+ XSingleton<XDebug>.singleton.AddErrorLog("not config bossrush in scenelist", null, null, null, null, null);
+ }
+ ListPool<uint>.Release(list);
+ }
+ else
+ {
+ bool flag3 = DlgBase<BattleMain, BattleMainBehaviour>.singleton.IsLoaded();
+ if (flag3)
+ {
+ DlgBase<BattleMain, BattleMainBehaviour>.singleton.SetVisiblePure(true);
+ DlgBase<RadioBattleDlg, RadioBattleBahaviour>.singleton.Show(true);
+ DlgBase<XChatSmallView, XChatSmallBehaviour>.singleton.SetVisible(true, true);
+ }
+ bool flag4 = DlgBase<SpectateSceneView, SpectateSceneBehaviour>.singleton.IsLoaded();
+ if (flag4)
+ {
+ DlgBase<SpectateSceneView, SpectateSceneBehaviour>.singleton.SetVisiblePure(true);
+ DlgBase<RadioDlg, RadioBehaviour>.singleton.Show(true);
+ DlgBase<XChatSmallView, XChatSmallBehaviour>.singleton.SetVisible(true, true);
+ }
+ this.OnBossFadein();
+ this.SetVisible(false, true);
+ }
+ return true;
+ }
+
+ public IEnumerator LoadBossAssets()
+ {
+ DlgBase<XBlockInputView, XBlockInputBehaviour>.singleton.SetVisible(true, true);
+ XEntityStatistics.RowData data = this._doc.entityRow;
+ XEntityPresentation.RowData presentData = this._doc.presentRow;
+ XSingleton<XEntityMgr>.singleton.PreloadTemp(data.PresentID, data.ID, (EntitySpecies)data.Type);
+ yield return null;
+ DlgBase<XBlockInputView, XBlockInputBehaviour>.singleton.SetVisible(false, true);
+ this._doc.SendQuery(BossRushReqStatus.BOSSRUSH_REQ_CONTINUE);
+ yield break;
+ }
+
+ public void OnBossFadein()
+ {
+ this.MakeTips();
+ this.ResetState();
+ DlgBase<BattleMain, BattleMainBehaviour>.singleton.RefreshBossRush();
+ this.isProcessFighting = false;
+ bool flag = DlgBase<BattleMain, BattleMainBehaviour>.singleton.timeConnter != null;
+ if (flag)
+ {
+ DlgBase<BattleMain, BattleMainBehaviour>.singleton.SetTimeRecord();
+ }
+ }
+
+ public void ResetState()
+ {
+ XBattleSkillDocument specificDocument = XDocuments.GetSpecificDocument<XBattleSkillDocument>(XBattleSkillDocument.uuID);
+ specificDocument.OnCoolDown(null);
+ }
+
+ private bool OpenAnimDlg(IXUIButton btn)
+ {
+ bool flag = this.isDelayRefresh || this.isProcessFighting;
+ bool result;
+ if (flag)
+ {
+ result = true;
+ }
+ else
+ {
+ bool flag2 = this.refreshCost > 0 && XSingleton<XGame>.singleton.Doc.XBagDoc.GetItemCount(this.refreshItemid) < (ulong)((long)this.refreshCost);
+ if (flag2)
+ {
+ bool flag3 = this.refreshItemid == XFastEnumIntEqualityComparer<ItemEnum>.ToInt(ItemEnum.GOLD);
+ if (flag3)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString("ERR_AUCTGOLDLESS"), "fece00");
+ }
+ else
+ {
+ bool flag4 = this.refreshItemid == XFastEnumIntEqualityComparer<ItemEnum>.ToInt(ItemEnum.DRAGON_COIN);
+ if (flag4)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString("ERR_TEAMBUY_DRAGONCOIN_LESS"), "fece00");
+ }
+ else
+ {
+ bool flag5 = this.refreshItemid == XFastEnumIntEqualityComparer<ItemEnum>.ToInt(ItemEnum.DIAMOND);
+ if (flag5)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString("ERR_TEAMBUY_DIAMOND_LESS"), "fece00");
+ }
+ }
+ }
+ }
+ else
+ {
+ bool flag6 = this._doc.respData.currefreshcount >= this._doc.respData.maxrefreshcount;
+ if (flag6)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString("BOSSRUSH_LIMIT"), "fece00");
+ }
+ else
+ {
+ bool flag7 = !this._doc.isSendingRefreshMsg;
+ if (flag7)
+ {
+ this._doc.isSendingRefreshMsg = true;
+ this._doc.SendQuery(BossRushReqStatus.BOSSRUSH_REQ_REFRESH);
+ }
+ }
+ }
+ result = true;
+ }
+ return result;
+ }
+
+ public void OnResOpenAnimDlg()
+ {
+ bool flag = base.IsVisible();
+ if (flag)
+ {
+ XSingleton<XBossRefreshAnimHander>.singleton.Show();
+ this.m_uiBehaviour.m_objFx.SetActive(false);
+ }
+ }
+
+ public void DelayRefresh()
+ {
+ this.isDelayRefresh = true;
+ this.m_timertoken = XSingleton<XTimerMgr>.singleton.SetTimer(0.3f, new XTimerMgr.ElapsedEventHandler(this.Refresh), null);
+ }
+
+ public void Refresh()
+ {
+ this.Refresh(null);
+ }
+
+ public void Refresh(object obj)
+ {
+ this.isDelayRefresh = false;
+ bool flag = this._doc == null;
+ if (flag)
+ {
+ this.Init();
+ }
+ bool flag2 = this._doc.respData != null;
+ if (flag2)
+ {
+ base.uiBehaviour.ResetPool();
+ this.RefreshBoss();
+ this.RefreshRwd();
+ this.RefreshBtns();
+ }
+ }
+
+ private void RefreshBoss()
+ {
+ byte[] bossdifficult = this._doc.bossRushRow.bossdifficult;
+ bool flag = bossdifficult == null && bossdifficult.Length < 4;
+ if (!flag)
+ {
+ base.uiBehaviour.m_lblLayer.SetText(this._doc.respData.currank.ToString());
+ base.uiBehaviour.m_lblProgress.SetText(this._doc.respData.currank + "/" + this._doc.respData.maxrank);
+ base.uiBehaviour.m_lblTitle.SetText(this.bossName);
+ base.uiBehaviour.m_lblDesc.SetText(this._doc.bossRushRow.bosstip);
+ base.uiBehaviour.m_lblDiff.SetText(XStringDefineProxy.GetString("BOSSRUSH_DIF" + bossdifficult[0]));
+ base.uiBehaviour.m_lblLeft.SetText(this._doc.leftChanllageCnt + "/" + this._doc.respData.joincountmax);
+ for (int i = 0; i < (int)bossdifficult[1]; i++)
+ {
+ GameObject gameObject = base.uiBehaviour.m_attpool.FetchGameObject(false);
+ gameObject.transform.localPosition = new Vector3((float)(-6 + 24 * i), 3f, 0f);
+ }
+ for (int j = 0; j < (int)bossdifficult[2]; j++)
+ {
+ GameObject gameObject2 = base.uiBehaviour.m_defpool.FetchGameObject(false);
+ gameObject2.transform.localPosition = new Vector3((float)(-6 + 24 * j), -23f, 0f);
+ }
+ for (int k = 0; k < (int)bossdifficult[3]; k++)
+ {
+ GameObject gameObject3 = base.uiBehaviour.m_lifepool.FetchGameObject(false);
+ gameObject3.transform.localPosition = new Vector3((float)(-6 + 24 * k), -49f, 0f);
+ }
+ XEntityStatistics.RowData byID = XSingleton<XEntityMgr>.singleton.EntityStatistics.GetByID(this._doc.entityRow.ID);
+ bool flag2 = byID != null && base.uiBehaviour != null;
+ if (flag2)
+ {
+ this.m_Dummy = XSingleton<X3DAvatarMgr>.singleton.CreateCommonEntityDummy(this.m_dummPool, byID.PresentID, this.m_uiBehaviour.m_BossSnapshot, this.m_Dummy, 1f);
+ }
+ else
+ {
+ XSingleton<XDebug>.singleton.AddErrorLog("id: ", this._doc.entityRow.ID.ToString(), " mono: " + (base.uiBehaviour == null).ToString(), " enemydata: " + (byID == null).ToString(), null, null);
+ }
+ }
+ }
+
+ private void RefreshRwd()
+ {
+ for (int i = 0; i < this._doc.bossRushRow.reward.Count; i++)
+ {
+ uint num = this._doc.bossRushRow.reward[i, 0];
+ uint num2 = this._doc.bossRushRow.reward[i, 1];
+ GameObject gameObject = base.uiBehaviour.m_rwdpool.FetchGameObject(false);
+ XSingleton<XItemDrawerMgr>.singleton.normalItemDrawer.DrawItem(gameObject, (int)num, (int)(num2 * this._doc.rwdRate), false);
+ IXUISprite ixuisprite = gameObject.transform.GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.ID = (ulong)num;
+ ixuisprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnIconClick));
+ gameObject.transform.localPosition = new Vector3((float)(36 + 90 * i), -63f, 0f);
+ }
+ this.m_uiBehaviour.m_sprBuff1.SetSprite(this._doc.bossBuff1Row.icon);
+ this.m_uiBehaviour.m_lblBuff1.SetText(this._doc.bossBuff1Row.Comment);
+ this.m_uiBehaviour.m_sprBuff2.SetSprite(this._doc.bossBuff2Row.icon);
+ this.m_uiBehaviour.m_lblBuff2.SetText(this._doc.bossBuff2Row.Comment);
+ int quality = this._doc.bossBuff1Row.Quality;
+ int quality2 = this._doc.bossBuff2Row.Quality;
+ string value = XSingleton<XGlobalConfig>.singleton.GetValue("Quality" + quality + "Color");
+ string value2 = XSingleton<XGlobalConfig>.singleton.GetValue("Quality" + quality2 + "Color");
+ this.m_uiBehaviour.m_lblBuff1.SetColor(XSingleton<UiUtility>.singleton.ParseColor(value, 0));
+ this.m_uiBehaviour.m_sprBuff1.SetColor(XSingleton<UiUtility>.singleton.ParseColor(value, 0));
+ this.m_uiBehaviour.m_lblBuff2.SetColor(XSingleton<UiUtility>.singleton.ParseColor(value2, 0));
+ this.m_uiBehaviour.m_sprBuff2.SetColor(XSingleton<UiUtility>.singleton.ParseColor(value2, 0));
+ }
+
+ private void OnIconClick(IXUISprite spr)
+ {
+ XSingleton<UiUtility>.singleton.ShowTooltipDialog((int)spr.ID, spr.gameObject);
+ }
+
+ private void RefreshBtns()
+ {
+ bool flag = this._doc == null || this._doc.respData == null || !base.IsVisible();
+ if (!flag)
+ {
+ XWelfareDocument specificDocument = XDocuments.GetSpecificDocument<XWelfareDocument>(XWelfareDocument.uuID);
+ bool flag2 = !this.isPrivilege;
+ if (flag2)
+ {
+ this.RefreshNoPriviedge();
+ }
+ else
+ {
+ this.RefreshPriviledge();
+ }
+ this.m_uiBehaviour.m_btnBattle.SetEnable(this._doc.leftChanllageCnt > 0, false);
+ this.m_uiBehaviour.m_lblBattle.SetText((this._doc.respData.currank > 1) ? XStringDefineProxy.GetString("BOSSRUSH_CHANG") : XStringDefineProxy.GetString("BOSSRUSH_CHAN"));
+ base.uiBehaviour.m_lblRefresh.SetVisible(false);
+ base.uiBehaviour.m_sprVip.SetGrey(this.isPrivilege);
+ base.uiBehaviour.m_lblPrivilege.SetEnabled(this.isPrivilege);
+ base.uiBehaviour.m_sprVip.SetSprite(specificDocument.GetMemberPrivilegeIcon(MemberPrivilege.KingdomPrivilege_Adventurer));
+ }
+ }
+
+ private void RefreshPriviledge()
+ {
+ XWelfareDocument specificDocument = XDocuments.GetSpecificDocument<XWelfareDocument>(XWelfareDocument.uuID);
+ PayMemberTable.RowData memberPrivilegeConfig = specificDocument.GetMemberPrivilegeConfig(MemberPrivilege.KingdomPrivilege_Adventurer);
+ int num = (memberPrivilegeConfig == null) ? 0 : memberPrivilegeConfig.BossRushCount;
+ int num2 = (specificDocument.PayMemberPrivilege == null) ? 0 : specificDocument.PayMemberPrivilege.usedBossRushCount;
+ int currefreshcount = this._doc.respData.currefreshcount;
+ bool flag = num2 < num || currefreshcount < num + this._doc.refreshConfig.freeIndex;
+ this.m_uiBehaviour.m_lblFree.SetVisible(flag);
+ this.m_uiBehaviour.m_sprCoin.gameObject.SetActive(!flag);
+ bool flag2 = !flag;
+ if (flag2)
+ {
+ bool flag3 = this._doc.refreshConfig.item1Index > currefreshcount - num2;
+ if (flag3)
+ {
+ this.refreshItemid = this._doc.refreshConfig.item1Id;
+ this.refreshCost = this._doc.refreshConfig.item1Start + this._doc.refreshConfig.item1Add * (currefreshcount - this._doc.refreshConfig.freeIndex - num2);
+ ItemList.RowData itemConf = XBagDocument.GetItemConf(this._doc.refreshConfig.item1Id);
+ string sprite = XSingleton<UiUtility>.singleton.ChooseProfString(itemConf.ItemIcon1, XItemDrawerMgr.Param.Profession);
+ base.uiBehaviour.m_sprCoin.SetSprite(sprite);
+ }
+ else
+ {
+ this.refreshItemid = this._doc.refreshConfig.item2Id;
+ this.refreshCost = this._doc.refreshConfig.item2Start + this._doc.refreshConfig.item2Add * (currefreshcount - this._doc.refreshConfig.item1Index - num2);
+ ItemList.RowData itemConf2 = XBagDocument.GetItemConf(this._doc.refreshConfig.item2Id);
+ bool flag4 = itemConf2 != null;
+ if (flag4)
+ {
+ string sprite2 = XSingleton<UiUtility>.singleton.ChooseProfString(itemConf2.ItemIcon1, XItemDrawerMgr.Param.Profession);
+ base.uiBehaviour.m_sprCoin.SetSprite(sprite2);
+ }
+ }
+ this.m_uiBehaviour.m_lblCost.SetText(this.refreshCost.ToString());
+ }
+ else
+ {
+ this.refreshCost = 0;
+ }
+ base.uiBehaviour.m_lblPrivilege.SetText(XStringDefineProxy.GetString("BOSSRUSH_PRIVILEGE", new object[]
+ {
+ num
+ }));
+ }
+
+ private void RefreshNoPriviedge()
+ {
+ int currefreshcount = this._doc.respData.currefreshcount;
+ bool flag = this._doc.refreshConfig.freeIndex > currefreshcount;
+ this.m_uiBehaviour.m_lblFree.SetVisible(flag);
+ this.m_uiBehaviour.m_sprCoin.gameObject.SetActive(!flag);
+ bool flag2 = !flag;
+ if (flag2)
+ {
+ bool flag3 = this._doc.refreshConfig.item1Index > currefreshcount;
+ if (flag3)
+ {
+ this.refreshItemid = this._doc.refreshConfig.item1Id;
+ this.refreshCost = this._doc.refreshConfig.item1Start + this._doc.refreshConfig.item1Add * (currefreshcount - this._doc.refreshConfig.freeIndex);
+ ItemList.RowData itemConf = XBagDocument.GetItemConf(this._doc.refreshConfig.item1Id);
+ bool flag4 = itemConf != null;
+ if (flag4)
+ {
+ string sprite = XSingleton<UiUtility>.singleton.ChooseProfString(itemConf.ItemIcon1, XItemDrawerMgr.Param.Profession);
+ base.uiBehaviour.m_sprCoin.SetSprite(sprite);
+ }
+ }
+ else
+ {
+ this.refreshItemid = this._doc.refreshConfig.item2Id;
+ this.refreshCost = this._doc.refreshConfig.item2Start + this._doc.refreshConfig.item2Add * (currefreshcount - this._doc.refreshConfig.item1Index);
+ ItemList.RowData itemConf2 = XBagDocument.GetItemConf(this._doc.refreshConfig.item2Id);
+ bool flag5 = itemConf2 != null;
+ if (flag5)
+ {
+ string sprite2 = XSingleton<UiUtility>.singleton.ChooseProfString(itemConf2.ItemIcon1, XItemDrawerMgr.Param.Profession);
+ base.uiBehaviour.m_sprCoin.SetSprite(sprite2);
+ }
+ }
+ this.m_uiBehaviour.m_lblCost.SetText(this.refreshCost.ToString());
+ }
+ else
+ {
+ this.refreshCost = 0;
+ }
+ }
+
+ public void PlayRefreshEff()
+ {
+ base.uiBehaviour.m_objFx.SetActive(true);
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/BossRushDlg.cs.meta b/Client/Assets/Scripts/XMainClient/UI/BossRushDlg.cs.meta
new file mode 100644
index 00000000..dc53fc9c
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/BossRushDlg.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 5e0f380885d278b4cbe4f6ab6cef5b39
+timeCreated: 1611403809
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/CandidatesViewRecommendType.cs b/Client/Assets/Scripts/XMainClient/UI/CandidatesViewRecommendType.cs
new file mode 100644
index 00000000..f1f41c5b
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/CandidatesViewRecommendType.cs
@@ -0,0 +1,11 @@
+using System;
+
+namespace XMainClient.UI
+{
+ public enum CandidatesViewRecommendType
+ {
+ None,
+ Pupil,
+ Master
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/CandidatesViewRecommendType.cs.meta b/Client/Assets/Scripts/XMainClient/UI/CandidatesViewRecommendType.cs.meta
new file mode 100644
index 00000000..6c53ef72
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/CandidatesViewRecommendType.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 7adbb62180257b34aa1da59b7c188fe8
+timeCreated: 1611403992
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/CandidatesViewType.cs b/Client/Assets/Scripts/XMainClient/UI/CandidatesViewType.cs
new file mode 100644
index 00000000..c01dae28
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/CandidatesViewType.cs
@@ -0,0 +1,11 @@
+using System;
+
+namespace XMainClient.UI
+{
+ public enum CandidatesViewType
+ {
+ None,
+ Recommend,
+ Application
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/CandidatesViewType.cs.meta b/Client/Assets/Scripts/XMainClient/UI/CandidatesViewType.cs.meta
new file mode 100644
index 00000000..9bd71d54
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/CandidatesViewType.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 3205fd0a94a0a9b4fab3af01f5724f10
+timeCreated: 1611403548
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/ChallegeType.cs b/Client/Assets/Scripts/XMainClient/UI/ChallegeType.cs
new file mode 100644
index 00000000..d6dfd76c
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/ChallegeType.cs
@@ -0,0 +1,11 @@
+using System;
+
+namespace XMainClient.UI
+{
+ internal enum ChallegeType
+ {
+ CT_COMBO = 2,
+ CT_PASSTIME = 4,
+ CT_OPENCHEST = 7
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/ChallegeType.cs.meta b/Client/Assets/Scripts/XMainClient/UI/ChallegeType.cs.meta
new file mode 100644
index 00000000..5fbb590c
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/ChallegeType.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: f193263023e31974aabdb6dceff213f7
+timeCreated: 1611404838
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/ChallengeDlg.cs b/Client/Assets/Scripts/XMainClient/UI/ChallengeDlg.cs
new file mode 100644
index 00000000..38bf566f
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/ChallengeDlg.cs
@@ -0,0 +1,190 @@
+using System;
+using System.Text;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.Battle;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class ChallengeDlg : DlgBase<ChallengeDlg, ChallengeDlgBehaviour>
+ {
+ public override string fileName
+ {
+ get
+ {
+ return "Battle/ChallengeDlg";
+ }
+ }
+
+ public override int layer
+ {
+ get
+ {
+ return 1;
+ }
+ }
+
+ public override bool autoload
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ private XLevelDocument _doc;
+
+ private RandomTaskTable.RowData _CurrentTaskData;
+
+ private StringBuilder _SB = new StringBuilder();
+
+ protected override void Init()
+ {
+ this._doc = (XSingleton<XGame>.singleton.Doc.GetXComponent(XLevelDocument.uuID) as XLevelDocument);
+ }
+
+ public override void RegisterEvent()
+ {
+ base.uiBehaviour.m_Accept.RegisterLabelClickEventHandler(new LabelClickEventHandler(this.OnAcceptClick));
+ base.uiBehaviour.m_HintBg.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnHintClick));
+ }
+
+ public override void OnUpdate()
+ {
+ base.OnUpdate();
+ this._UpdateState();
+ }
+
+ public void ShowRandomTask(int rtask)
+ {
+ this.SetVisible(true, true);
+ base.uiBehaviour.m_Tween.SetTweenGroup(1);
+ base.uiBehaviour.m_Tween.RegisterOnFinishEventHandler(null);
+ base.uiBehaviour.m_Tween.PlayTween(true, -1f);
+ RandomTaskTable.RowData randomTaskData = this._doc.GetRandomTaskData(rtask);
+ this._CurrentTaskData = randomTaskData;
+ string text = string.Format(randomTaskData.TaskDescription, randomTaskData.TaskParam);
+ base.uiBehaviour.m_MainDesc.SetText(text);
+ base.uiBehaviour.m_HintDesc.SetText(text);
+ bool flag = randomTaskData.TaskReward.Count == 1;
+ if (flag)
+ {
+ base.uiBehaviour.m_RewardValue[0].gameObject.SetActive(false);
+ base.uiBehaviour.m_RewardValue[1].gameObject.SetActive(false);
+ base.uiBehaviour.m_RewardValue[2].gameObject.SetActive(true);
+ this.SetReward(2, randomTaskData.TaskReward[0, 0], randomTaskData.TaskReward[0, 1]);
+ }
+ else
+ {
+ bool flag2 = randomTaskData.TaskReward.Count == 2;
+ if (flag2)
+ {
+ base.uiBehaviour.m_RewardValue[0].gameObject.SetActive(true);
+ base.uiBehaviour.m_RewardValue[1].gameObject.SetActive(true);
+ base.uiBehaviour.m_RewardValue[2].gameObject.SetActive(false);
+ this.SetReward(0, randomTaskData.TaskReward[0, 0], randomTaskData.TaskReward[0, 1]);
+ this.SetReward(1, randomTaskData.TaskReward[1, 0], randomTaskData.TaskReward[1, 1]);
+ }
+ }
+ base.uiBehaviour.m_HintBg.gameObject.SetActive(false);
+ this._UpdateState();
+ }
+
+ protected void OnTweenOver(IXUITweenTool tween)
+ {
+ base.uiBehaviour.m_Tween.gameObject.SetActive(false);
+ }
+
+ protected void SetReward(int slot, int itemid, int value)
+ {
+ base.uiBehaviour.m_RewardValue[slot].SetText(value.ToString());
+ base.uiBehaviour.m_RewardIcon[slot].SetSprite(XBagDocument.GetItemSmallIcon(itemid, 0u));
+ }
+
+ protected void OnAcceptClick(IXUILabel lb)
+ {
+ base.uiBehaviour.m_Tween.SetTweenGroup(2);
+ base.uiBehaviour.m_Tween.RegisterOnFinishEventHandler(new OnTweenFinishEventHandler(this.OnTweenOver));
+ base.uiBehaviour.m_Tween.PlayTween(true, -1f);
+ base.uiBehaviour.m_HintBg.gameObject.SetActive(true);
+ }
+
+ protected void OnHintClick(IXUISprite sp)
+ {
+ base.uiBehaviour.m_Tween.SetTweenGroup(1);
+ base.uiBehaviour.m_Tween.RegisterOnFinishEventHandler(null);
+ base.uiBehaviour.m_Tween.PlayTween(true, -1f);
+ }
+
+ private void _UpdateState()
+ {
+ bool flag = this._CurrentTaskData == null;
+ if (!flag)
+ {
+ string text = null;
+ ChallegeType taskCondition = (ChallegeType)this._CurrentTaskData.TaskCondition;
+ if (taskCondition != ChallegeType.CT_COMBO)
+ {
+ if (taskCondition != ChallegeType.CT_PASSTIME)
+ {
+ if (taskCondition == ChallegeType.CT_OPENCHEST)
+ {
+ bool flag2 = XSingleton<XLevelStatistics>.singleton.ls._box_enemy_kill >= this._CurrentTaskData.TaskParam;
+ if (flag2)
+ {
+ text = XStringDefineProxy.GetString("LEVEL_CHALLENGE_FINISH");
+ }
+ else
+ {
+ text = string.Format("{0}/{1}", XSingleton<XLevelStatistics>.singleton.ls._box_enemy_kill, this._CurrentTaskData.TaskParam);
+ }
+ }
+ }
+ else
+ {
+ bool flag3 = XSingleton<XLevelStatistics>.singleton.ls._end_time > 0f && (float)this._CurrentTaskData.TaskParam - (XSingleton<XLevelStatistics>.singleton.ls._end_time - XSingleton<XLevelStatistics>.singleton.ls._start_time) >= 0f;
+ if (flag3)
+ {
+ text = XStringDefineProxy.GetString("LEVEL_CHALLENGE_FINISH");
+ }
+ else
+ {
+ int num = (int)((float)this._CurrentTaskData.TaskParam - (Time.time - XSingleton<XLevelStatistics>.singleton.ls._start_time));
+ bool flag4 = num < 0;
+ if (flag4)
+ {
+ num = 0;
+ }
+ text = XSingleton<UiUtility>.singleton.TimeFormatString(num, 2, 2, 4, false, true);
+ }
+ }
+ }
+ else
+ {
+ bool flag5 = (ulong)XSingleton<XLevelStatistics>.singleton.ls._max_combo >= (ulong)((long)this._CurrentTaskData.TaskParam);
+ if (flag5)
+ {
+ text = XStringDefineProxy.GetString("LEVEL_CHALLENGE_FINISH");
+ }
+ else
+ {
+ text = string.Format("{0}/{1}", XSingleton<XLevelStatistics>.singleton.ls._max_combo, this._CurrentTaskData.TaskParam);
+ }
+ }
+ bool flag6 = text != null;
+ if (flag6)
+ {
+ this._SB.Remove(0, this._SB.Length);
+ this._SB.Append('(').Append(text).Append(')');
+ base.uiBehaviour.m_HintState.SetText(this._SB.ToString());
+ }
+ else
+ {
+ base.uiBehaviour.m_HintState.SetText("");
+ }
+ }
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/ChallengeDlg.cs.meta b/Client/Assets/Scripts/XMainClient/UI/ChallengeDlg.cs.meta
new file mode 100644
index 00000000..8895f89c
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/ChallengeDlg.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: e1fef16037c7d2d4da2ba9bdfbc7d7e9
+timeCreated: 1611404703
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/CharacterEquipBagHandler.cs b/Client/Assets/Scripts/XMainClient/UI/CharacterEquipBagHandler.cs
new file mode 100644
index 00000000..08bde5ae
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/CharacterEquipBagHandler.cs
@@ -0,0 +1,416 @@
+using System;
+using System.Collections.Generic;
+using KKSG;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class CharacterEquipBagHandler : DlgHandlerBase
+ {
+ private XBagWindow bagWindow
+ {
+ get
+ {
+ return DlgBase<ItemSystemDlg, TabDlgBehaviour>.singleton.BagWindow;
+ }
+ }
+
+ private XItemMorePowerfulTipMgr powerfullMgr
+ {
+ get
+ {
+ return DlgBase<ItemSystemDlg, TabDlgBehaviour>.singleton.RedPointMgr;
+ }
+ }
+
+ private XItemMorePowerfulTipMgr newItemMgr
+ {
+ get
+ {
+ return DlgBase<ItemSystemDlg, TabDlgBehaviour>.singleton.NewItemMgr;
+ }
+ }
+
+ protected override string FileName
+ {
+ get
+ {
+ return "ItemNew/EquipListPanel";
+ }
+ }
+
+ private XCharacterEquipDocument _doc;
+
+ private EnhanceMasterHandler m_EnhanceMasterHandler;
+
+ private GameObject m_topGo;
+
+ private IXUILabel m_masterHisMaxLevelLab;
+
+ private IXUIButton m_mastetBtn;
+
+ private IXUIButton m_BtnShowAttr;
+
+ private IXUIButton m_BtnShowTitle;
+
+ private GameObject m_TitleRedPoint;
+
+ private IXUIButton m_Help;
+
+ private IXUILabel m_bagNumLab;
+
+ private List<int> m_RedPointEquipPosList = new List<int>();
+
+ public IXUIButton m_expandBagBtn;
+
+ protected override void Init()
+ {
+ base.Init();
+ this._doc = (XSingleton<XGame>.singleton.Doc.GetXComponent(XCharacterEquipDocument.uuID) as XCharacterEquipDocument);
+ this._doc.Handler = this;
+ this.m_topGo = base.PanelObject.transform.Find("Top").gameObject;
+ this.m_masterHisMaxLevelLab = (base.PanelObject.transform.Find("Top/Lab").GetComponent("XUILabel") as IXUILabel);
+ this.m_mastetBtn = (base.PanelObject.transform.Find("Top/Btn").GetComponent("XUIButton") as IXUIButton);
+ this.m_BtnShowAttr = (base.transform.Find("ShowAttr").GetComponent("XUIButton") as IXUIButton);
+ this.m_BtnShowTitle = (base.transform.Find("ShowTitle").GetComponent("XUIButton") as IXUIButton);
+ this.m_TitleRedPoint = base.transform.Find("ShowTitle/RedPoint").gameObject;
+ this.m_Help = (base.transform.Find("Help").GetComponent("XUIButton") as IXUIButton);
+ this.m_bagNumLab = (base.PanelObject.transform.Find("BagNum").GetComponent("XUILabel") as IXUILabel);
+ this.m_expandBagBtn = (base.PanelObject.transform.Find("add").GetComponent("XUIButton") as IXUIButton);
+ BagExpandItemListTable.RowData expandItemConfByType = XBagDocument.GetExpandItemConfByType((uint)XFastEnumIntEqualityComparer<BagType>.ToInt(BagType.EquipBag));
+ this.m_expandBagBtn.gameObject.SetActive(expandItemConfByType != null);
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ this.m_mastetBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnShowEnhanceMaster));
+ this.m_BtnShowAttr.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnShowAttrClick));
+ this.m_BtnShowTitle.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnShowTitleClick));
+ this.m_Help.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnHelpClicked));
+ this.m_expandBagBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnBagExpandClicked));
+ }
+
+ public bool OnHelpClicked(IXUIButton button)
+ {
+ DlgBase<XCommonHelpTipView, XCommonHelpTipBehaviour>.singleton.ShowHelp(XSysDefine.XSys_Item_Equip);
+ return true;
+ }
+
+ public override void StackRefresh()
+ {
+ base.StackRefresh();
+ this.RefreshBag();
+ this._doc.NewItems.bCanClear = true;
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ this.RefreshBag();
+ this.ShowEnhanceMasterLevel();
+ this._doc.NewItems.bCanClear = true;
+ bool flag = this.m_EnhanceMasterHandler != null;
+ if (flag)
+ {
+ this.m_EnhanceMasterHandler.SetVisible(false);
+ }
+ this.RefreshRedPoints();
+ this.RefreshTitleRedPoint();
+ this.SetBagNum();
+ }
+
+ public void RefreshRedPoints()
+ {
+ bool flag = DlgBase<ItemSystemDlg, TabDlgBehaviour>.singleton.IsVisible() && DlgBase<ItemSystemDlg, TabDlgBehaviour>.singleton._equipHandler != null;
+ if (flag)
+ {
+ this.m_RedPointEquipPosList.Clear();
+ XEnhanceDocument specificDocument = XDocuments.GetSpecificDocument<XEnhanceDocument>(XEnhanceDocument.uuID);
+ bool flag2 = XSingleton<XGameSysMgr>.singleton.IsSystemOpened(XSysDefine.XSys_Item_Enhance);
+ if (flag2)
+ {
+ for (int i = 0; i < specificDocument.MorePowerfulEquips.Count; i++)
+ {
+ this.m_RedPointEquipPosList.Add(specificDocument.MorePowerfulEquips[i]);
+ }
+ }
+ XSmeltDocument doc = XSmeltDocument.Doc;
+ doc.GetRedDotEquips();
+ bool flag3 = XSingleton<XGameSysMgr>.singleton.IsSystemOpened(XSysDefine.XSys_Item_Smelting);
+ if (flag3)
+ {
+ for (int j = 0; j < doc.MorePowerfulEquips.Count; j++)
+ {
+ bool flag4 = !this.m_RedPointEquipPosList.Contains(doc.MorePowerfulEquips[j]);
+ if (flag4)
+ {
+ this.m_RedPointEquipPosList.Add(doc.MorePowerfulEquips[j]);
+ }
+ }
+ }
+ bool flag5 = XSingleton<XGameSysMgr>.singleton.IsSystemOpened(XSysDefine.XSys_Item_Enchant);
+ if (flag5)
+ {
+ XEnchantDocument specificDocument2 = XDocuments.GetSpecificDocument<XEnchantDocument>(XEnchantDocument.uuID);
+ for (int k = 0; k < XBagDocument.EquipMax; k++)
+ {
+ bool flag6 = specificDocument2.RedPointStates[k];
+ if (flag6)
+ {
+ this.m_RedPointEquipPosList.Add(k);
+ }
+ }
+ }
+ DlgBase<ItemSystemDlg, TabDlgBehaviour>.singleton._equipHandler.SetArrows(this.m_RedPointEquipPosList);
+ }
+ }
+
+ public void RefreshTitleRedPoint()
+ {
+ this.m_BtnShowTitle.SetVisible(XSingleton<XGameSysMgr>.singleton.IsSystemOpened(XSysDefine.XSys_Title));
+ XTitleDocument specificDocument = XDocuments.GetSpecificDocument<XTitleDocument>(XTitleDocument.uuID);
+ this.m_TitleRedPoint.SetActive(specificDocument.bEnableTitleLevelUp);
+ }
+
+ protected override void OnHide()
+ {
+ this.powerfullMgr.ReturnAll();
+ this.newItemMgr.ReturnAll();
+ this.bagWindow.OnHide();
+ this._doc.NewItems.TryClear();
+ base.OnHide();
+ }
+
+ private void RefreshBag()
+ {
+ this.bagWindow.ChangeData(new ItemUpdateHandler(this.WrapContentItemUpdated), new GetItemHandler(this._doc.GetEquips));
+ DlgBase<ItemSystemDlg, TabDlgBehaviour>.singleton._equipHandler.RegisterItemClickEvents(null);
+ this.bagWindow.OnShow();
+ this.SetBagNum();
+ }
+
+ public override void OnUnload()
+ {
+ this._doc.Handler = null;
+ DlgHandlerBase.EnsureUnload<EnhanceMasterHandler>(ref this.m_EnhanceMasterHandler);
+ base.OnUnload();
+ }
+
+ public override void RefreshData()
+ {
+ base.RefreshData();
+ this.RefreshBag();
+ }
+
+ public void Refresh()
+ {
+ this.bagWindow.RefreshWindow();
+ this.SetBagNum();
+ }
+
+ public void ShowEnhanceMasterLevel()
+ {
+ bool flag = !XSingleton<XGameSysMgr>.singleton.IsSystemOpened(XSysDefine.XSys_Item_Enhance);
+ if (flag)
+ {
+ this.m_topGo.SetActive(false);
+ }
+ else
+ {
+ this.m_topGo.SetActive(true);
+ this.m_masterHisMaxLevelLab.SetText(string.Format(XStringDefineProxy.GetString("EnhanceMasterLevel"), XEnhanceDocument.Doc.HistoryMaxLevel));
+ }
+ }
+
+ private void SetBagNum()
+ {
+ int count = this._doc.GetEquips().Count;
+ XRechargeDocument specificDocument = XDocuments.GetSpecificDocument<XRechargeDocument>(XRechargeDocument.uuID);
+ VIPTable.RowData byVIP = specificDocument.VIPReader.GetByVIP((int)specificDocument.VipLevel);
+ bool flag = byVIP != null;
+ if (flag)
+ {
+ uint num = byVIP.EquipMax;
+ BagExpandData bagExpandData = XBagDocument.BagDoc.GetBagExpandData(BagType.EquipBag);
+ bool flag2 = bagExpandData != null;
+ if (flag2)
+ {
+ num += bagExpandData.ExpandNum;
+ }
+ bool flag3 = (long)count >= (long)((ulong)num);
+ if (flag3)
+ {
+ this.m_bagNumLab.SetText(string.Format("[ff4366]{0}[-]/{1}", count, num));
+ }
+ else
+ {
+ this.m_bagNumLab.SetText(string.Format("{0}[-]/{1}", count, num));
+ }
+ }
+ }
+
+ private void WrapContentItemUpdated(Transform t, int index)
+ {
+ Transform transform = t.Find("Icon/SupplementBrought");
+ bool flag = transform != null;
+ if (flag)
+ {
+ transform.gameObject.SetActive(false);
+ }
+ IXUISprite ixuisprite = t.Find("Icon").GetComponent("XUISprite") as IXUISprite;
+ bool flag2 = this.bagWindow.m_XItemList == null || index >= this.bagWindow.m_XItemList.Count || index < 0;
+ if (flag2)
+ {
+ XSingleton<XItemDrawerMgr>.singleton.DrawItem(t.gameObject, null);
+ this.powerfullMgr.ReturnInstance(ixuisprite);
+ this.newItemMgr.ReturnInstance(ixuisprite);
+ t.gameObject.name = XSingleton<XCommon>.singleton.StringCombine("empty", index.ToString());
+ }
+ else
+ {
+ XSingleton<XItemDrawerMgr>.singleton.DrawItem(t.gameObject, this.bagWindow.m_XItemList[index]);
+ ixuisprite.ID = this.bagWindow.m_XItemList[index].uid;
+ ixuisprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this._OnItemClicked));
+ t.gameObject.name = XSingleton<XCommon>.singleton.StringCombine("equip", this.bagWindow.m_XItemList[index].itemID.ToString());
+ EquipCompare mix = this._doc.IsEquipMorePowerful(ixuisprite.ID);
+ EquipCompare final = XCharacterEquipDocument.GetFinal(mix);
+ bool flag3 = final == EquipCompare.EC_MORE_POWERFUL;
+ if (flag3)
+ {
+ this.powerfullMgr.SetTip(ixuisprite);
+ }
+ else
+ {
+ this.powerfullMgr.ReturnInstance(ixuisprite);
+ }
+ bool flag4 = this._doc.NewItems.IsNew(ixuisprite.ID);
+ if (flag4)
+ {
+ this.newItemMgr.SetTip(ixuisprite);
+ }
+ else
+ {
+ this.newItemMgr.ReturnInstance(ixuisprite);
+ }
+ }
+ }
+
+ public void LoadEquip(XItem item, int slot)
+ {
+ DlgBase<EquipTooltipDlg, EquipTooltipDlgBehaviour>.singleton.HideToolTip(true);
+ bool flag = DlgBase<ItemSystemDlg, TabDlgBehaviour>.singleton._equipHandler != null && DlgBase<ItemSystemDlg, TabDlgBehaviour>.singleton._equipHandler.IsVisible();
+ if (flag)
+ {
+ DlgBase<ItemSystemDlg, TabDlgBehaviour>.singleton._equipHandler.SetEquipSlot(slot, item);
+ }
+ this.Refresh();
+ }
+
+ public void UnloadEquip(int slot)
+ {
+ DlgBase<EquipTooltipDlg, EquipTooltipDlgBehaviour>.singleton.HideToolTip(true);
+ bool flag = DlgBase<ItemSystemDlg, TabDlgBehaviour>.singleton._equipHandler != null && DlgBase<ItemSystemDlg, TabDlgBehaviour>.singleton._equipHandler.IsVisible();
+ if (flag)
+ {
+ DlgBase<ItemSystemDlg, TabDlgBehaviour>.singleton._equipHandler.SetEquipSlot(slot, null);
+ }
+ this.Refresh();
+ }
+
+ public void AddItem(List<XItem> items)
+ {
+ this.bagWindow.UpdateBag();
+ this.SetBagNum();
+ }
+
+ public void RemoveItem(List<ulong> uids)
+ {
+ this.bagWindow.UpdateBag();
+ this.SetBagNum();
+ foreach (ulong num in uids)
+ {
+ bool flag = num == DlgBase<EquipTooltipDlg, EquipTooltipDlgBehaviour>.singleton.MainItemUID;
+ if (flag)
+ {
+ DlgBase<EquipTooltipDlg, EquipTooltipDlgBehaviour>.singleton.HideToolTip(false);
+ }
+ }
+ }
+
+ public void ItemNumChanged(XItem item)
+ {
+ this.bagWindow.UpdateItem(item);
+ this.SetBagNum();
+ }
+
+ public void SwapItem(XItem item1, XItem item2, int slot)
+ {
+ DlgBase<EquipTooltipDlg, EquipTooltipDlgBehaviour>.singleton.HideToolTip(true);
+ bool flag = DlgBase<ItemSystemDlg, TabDlgBehaviour>.singleton._equipHandler != null && DlgBase<ItemSystemDlg, TabDlgBehaviour>.singleton._equipHandler.IsVisible();
+ if (flag)
+ {
+ DlgBase<ItemSystemDlg, TabDlgBehaviour>.singleton._equipHandler.SetEquipSlot(slot, item1);
+ }
+ this.bagWindow.ReplaceItem(item1, item2);
+ }
+
+ public void UpdateItem(XItem item)
+ {
+ this.bagWindow.UpdateItem(item);
+ DlgBase<ItemSystemDlg, TabDlgBehaviour>.singleton._equipHandler.UpdateEquipSlot(item);
+ bool flag = item.uid == DlgBase<EquipTooltipDlg, EquipTooltipDlgBehaviour>.singleton.MainItemUID;
+ if (flag)
+ {
+ DlgBase<EquipTooltipDlg, EquipTooltipDlgBehaviour>.singleton.HideToolTip(false);
+ }
+ bool flag2 = item.uid == DlgBase<ItemTooltipDlg, ItemTooltipDlgBehaviour>.singleton.MainItemUID;
+ if (flag2)
+ {
+ DlgBase<ItemTooltipDlg, ItemTooltipDlgBehaviour>.singleton.HideToolTip(true);
+ }
+ }
+
+ private void _OnItemClicked(IXUISprite iSp)
+ {
+ XItem itemByUID = XSingleton<XGame>.singleton.Doc.XBagDoc.GetItemByUID(iSp.ID);
+ bool flag = itemByUID == null;
+ if (!flag)
+ {
+ bool flag2 = this._doc.NewItems.RemoveItem(iSp.ID, itemByUID.Type, false);
+ if (flag2)
+ {
+ this._doc.GetEquips();
+ }
+ CharacterEquipHandler.OnItemClicked(iSp);
+ }
+ }
+
+ private bool OnShowEnhanceMaster(IXUIButton btn)
+ {
+ DlgHandlerBase.EnsureCreate<EnhanceMasterHandler>(ref this.m_EnhanceMasterHandler, base.PanelObject.transform.parent.parent.Find("LeftPanel"), true, this);
+ return true;
+ }
+
+ private bool OnShowAttrClick(IXUIButton btn)
+ {
+ DlgBase<ItemSystemDlg, TabDlgBehaviour>.singleton._CharacterAttrHandler.SetVisible(true);
+ return true;
+ }
+
+ private bool OnShowTitleClick(IXUIButton btn)
+ {
+ DlgBase<TitleDlg, TitleDlgBehaviour>.singleton.SetVisibleWithAnimation(true, null);
+ return true;
+ }
+
+ public bool OnBagExpandClicked(IXUIButton button)
+ {
+ XBagDocument.BagDoc.UseBagExpandTicket(BagType.EquipBag);
+ return true;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/CharacterEquipBagHandler.cs.meta b/Client/Assets/Scripts/XMainClient/UI/CharacterEquipBagHandler.cs.meta
new file mode 100644
index 00000000..21141039
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/CharacterEquipBagHandler.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 7b94fb0ffcd33284295ebb9c29c0604e
+timeCreated: 1611403994
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/CharacterEquipHandler.cs b/Client/Assets/Scripts/XMainClient/UI/CharacterEquipHandler.cs
new file mode 100644
index 00000000..08241a9b
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/CharacterEquipHandler.cs
@@ -0,0 +1,456 @@
+using System;
+using System.Collections.Generic;
+using UILib;
+using UnityEngine;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class CharacterEquipHandler : DlgHandlerBase
+ {
+ public GameObject[] EquipGo
+ {
+ get
+ {
+ return this.m_EquipGo;
+ }
+ }
+
+ protected override string FileName
+ {
+ get
+ {
+ return "ItemNew/EquipFrame";
+ }
+ }
+
+ public string EnhanceMasterPath
+ {
+ get
+ {
+ bool flag = string.IsNullOrEmpty(this.m_enhanceMasterPath);
+ if (flag)
+ {
+ this.m_enhanceMasterPath = XSingleton<XGlobalConfig>.singleton.GetValue("EnhanceMasterEffectPath");
+ }
+ return this.m_enhanceMasterPath;
+ }
+ }
+
+ public static int Equip_Slot_Count = XBagDocument.EquipMax;
+
+ private GameObject[] m_EquipGo = new GameObject[CharacterEquipHandler.Equip_Slot_Count];
+
+ public IXUISprite[] m_EquipSlots = new IXUISprite[CharacterEquipHandler.Equip_Slot_Count];
+
+ public IXUISprite[] m_EquipBg = new IXUISprite[CharacterEquipHandler.Equip_Slot_Count];
+
+ private XItemSelector _ItemSelector = new XItemSelector(0u);
+
+ private XItemMorePowerfulTipMgr _MorePowerfulMgr = new XItemMorePowerfulTipMgr();
+
+ private XItemMorePowerfulTipMgr _WeakMorePowerfulMgr = new XItemMorePowerfulTipMgr();
+
+ private XItemMorePowerfulTipMgr _ItemShining = null;
+
+ private XItemMorePowerfulTipMgr _SuitFxMgr = new XItemMorePowerfulTipMgr();
+
+ private Dictionary<GameObject, uint> _ShiningTimerTokens = new Dictionary<GameObject, uint>();
+
+ private XUIPool m_ItemPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ private bool bNormal = true;
+
+ private XFx m_EnhanceMasterEffect;
+
+ private ArtifactQuanlityFx[] m_fuseBreakFx = new ArtifactQuanlityFx[CharacterEquipHandler.Equip_Slot_Count];
+
+ private EquipFusionDocument m_doc;
+
+ private string m_enhanceMasterPath = string.Empty;
+
+ protected override void Init()
+ {
+ base.Init();
+ this.m_doc = EquipFusionDocument.Doc;
+ this.m_ItemPool.SetupPool(base.PanelObject, base.PanelObject.transform.Find("ItemTpl").gameObject, (uint)CharacterEquipHandler.Equip_Slot_Count, false);
+ for (int i = 0; i < CharacterEquipHandler.Equip_Slot_Count; i++)
+ {
+ this.m_EquipGo[i] = this.m_ItemPool.FetchGameObject(false);
+ GameObject gameObject = base.PanelObject.transform.Find("Part" + i).gameObject;
+ this.m_EquipGo[i].transform.localPosition = gameObject.transform.localPosition;
+ this.m_EquipSlots[i] = (this.m_EquipGo[i].transform.Find("Icon").GetComponent("XUISprite") as IXUISprite);
+ this.m_EquipBg[i] = (gameObject.transform.Find("Bg").GetComponent("XUISprite") as IXUISprite);
+ }
+ this._MorePowerfulMgr.Load("ItemMorePowerfulTip2");
+ this._MorePowerfulMgr.SetupPool(base.PanelObject);
+ this._WeakMorePowerfulMgr.SetupPool(base.PanelObject);
+ Transform transform = base.PanelObject.transform.Find("SuitFx");
+ bool flag = transform != null;
+ if (flag)
+ {
+ this._SuitFxMgr.LoadFromUI(transform.gameObject);
+ this._SuitFxMgr.SetupPool(base.PanelObject);
+ }
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ for (int i = 0; i < CharacterEquipHandler.Equip_Slot_Count; i++)
+ {
+ this.m_EquipBg[i].ID = (ulong)((long)i);
+ this.m_EquipBg[i].RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this._OnSlotBgClick));
+ }
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ bool flag = this.m_EnhanceMasterEffect != null;
+ if (flag)
+ {
+ this.m_EnhanceMasterEffect.SetActive(false);
+ }
+ this._ItemSelector.Hide();
+ this._MorePowerfulMgr.ReturnAll();
+ this._WeakMorePowerfulMgr.ReturnAll();
+ this._SuitFxMgr.ReturnAll();
+ this.ShowEquipments();
+ }
+
+ protected override void OnHide()
+ {
+ bool flag = this.m_EnhanceMasterEffect != null;
+ if (flag)
+ {
+ this.m_EnhanceMasterEffect.SetActive(false);
+ }
+ this._StopItemShining();
+ this.RestQuanlityFx();
+ base.OnHide();
+ }
+
+ public override void OnUnload()
+ {
+ this._ItemSelector.Unload();
+ this._MorePowerfulMgr.Unload();
+ this._WeakMorePowerfulMgr.Unload();
+ this._SuitFxMgr.Unload();
+ bool flag = this.m_EnhanceMasterEffect != null;
+ if (flag)
+ {
+ XSingleton<XFxMgr>.singleton.DestroyFx(this.m_EnhanceMasterEffect, true);
+ this.m_EnhanceMasterEffect = null;
+ }
+ this._StopItemShining();
+ for (int i = 0; i < CharacterEquipHandler.Equip_Slot_Count; i++)
+ {
+ bool flag2 = this.m_fuseBreakFx[i] != null;
+ if (flag2)
+ {
+ this.m_fuseBreakFx[i].Reset();
+ this.m_fuseBreakFx[i] = null;
+ }
+ }
+ base.OnUnload();
+ }
+
+ public override void StackRefresh()
+ {
+ bool flag = this.m_EnhanceMasterEffect != null;
+ if (flag)
+ {
+ this.m_EnhanceMasterEffect.SetActive(false);
+ }
+ base.StackRefresh();
+ }
+
+ private void _StopItemShining()
+ {
+ foreach (uint token in this._ShiningTimerTokens.Values)
+ {
+ XSingleton<XTimerMgr>.singleton.KillTimer(token);
+ }
+ this._ShiningTimerTokens.Clear();
+ }
+
+ private void _StartItemShining()
+ {
+ this._StopItemShining();
+ this._ItemShining.FakeReturnAll();
+ for (int i = XBagDocument.BodyPosition<EquipPosition>(EquipPosition.EQUIP_START); i < XBagDocument.BodyPosition<EquipPosition>(EquipPosition.EQUIP_END); i++)
+ {
+ bool flag = this.m_EquipSlots[i].ID == 0UL;
+ if (!flag)
+ {
+ GameObject gameObject = this._ItemShining.SetTip(this.m_EquipSlots[i]);
+ this._ShowItemShining(gameObject);
+ gameObject.transform.Find("Icon").gameObject.SetActive(false);
+ }
+ }
+ this._ItemShining.ActualReturnAll();
+ }
+
+ private void _ShowItemShining(object o)
+ {
+ GameObject gameObject = o as GameObject;
+ bool flag = this._ShiningTimerTokens.ContainsKey(gameObject);
+ if (flag)
+ {
+ IXUISpriteAnimation ixuispriteAnimation = gameObject.transform.Find("Icon").GetComponent("XUISpriteAnimation") as IXUISpriteAnimation;
+ ixuispriteAnimation.Reset();
+ ixuispriteAnimation.gameObject.SetActive(true);
+ }
+ float interval = XSingleton<XCommon>.singleton.RandomFloat(3f, 15f);
+ this._ShiningTimerTokens[gameObject] = XSingleton<XTimerMgr>.singleton.SetTimer(interval, new XTimerMgr.ElapsedEventHandler(this._ShowItemShining), gameObject);
+ }
+
+ public void SetRedPoints(List<int> equipList)
+ {
+ this._MorePowerfulMgr.ReturnAll();
+ bool flag = equipList != null;
+ if (flag)
+ {
+ foreach (int num in equipList)
+ {
+ this._MorePowerfulMgr.SetTip(this.m_EquipSlots[num]);
+ }
+ }
+ }
+
+ public void SetArrows(List<int> equipList)
+ {
+ this._WeakMorePowerfulMgr.ReturnAll();
+ bool flag = equipList != null;
+ if (flag)
+ {
+ foreach (int num in equipList)
+ {
+ this._WeakMorePowerfulMgr.SetTip(this.m_EquipSlots[num]);
+ }
+ }
+ }
+
+ public void ShowEquipments()
+ {
+ XBodyBag equipBag = XSingleton<XGame>.singleton.Doc.XBagDoc.EquipBag;
+ for (int i = XBagDocument.BodyPosition<EquipPosition>(EquipPosition.EQUIP_START); i < XBagDocument.BodyPosition<EquipPosition>(EquipPosition.EQUIP_END); i++)
+ {
+ XItemDrawerMgr.Param.bHideBinding = true;
+ bool flag = equipBag[i] != null;
+ if (flag)
+ {
+ this.m_EquipGo[i].SetActive(true);
+ XSingleton<XItemDrawerMgr>.singleton.DrawItem(this.m_EquipGo[i], equipBag[i]);
+ this.m_EquipSlots[i].ID = equipBag[i].uid;
+ XEquipItem xequipItem = equipBag[i] as XEquipItem;
+ this.SetEffect(this.m_EquipGo[i], xequipItem.fuseInfo.BreakNum, i);
+ }
+ else
+ {
+ XSingleton<XItemDrawerMgr>.singleton.DrawItem(this.m_EquipGo[i], null);
+ this.m_EquipSlots[i].ID = 0UL;
+ this.SetEffect(this.m_EquipGo[i], 0u, i);
+ }
+ }
+ }
+
+ public void ShowNormalEquip(bool bFlag)
+ {
+ this.bNormal = bFlag;
+ for (int i = XBagDocument.BodyPosition<EquipPosition>(EquipPosition.EQUIP_START); i < XBagDocument.BodyPosition<EquipPosition>(EquipPosition.EQUIP_END); i++)
+ {
+ this.m_EquipGo[i].SetActive(bFlag);
+ }
+ }
+
+ public void PlayEnhanceMasterEffect()
+ {
+ bool flag = this.m_EnhanceMasterEffect != null;
+ if (flag)
+ {
+ this.m_EnhanceMasterEffect.SetActive(false);
+ }
+ bool flag2 = this.m_EnhanceMasterEffect == null;
+ if (flag2)
+ {
+ this.m_EnhanceMasterEffect = XSingleton<XFxMgr>.singleton.CreateFx(this.EnhanceMasterPath, null, true);
+ }
+ else
+ {
+ bool flag3 = this.m_EnhanceMasterEffect != null;
+ if (flag3)
+ {
+ this.m_EnhanceMasterEffect.SetActive(true);
+ }
+ }
+ this.m_EnhanceMasterEffect.Play(base.PanelObject.transform.parent.parent, Vector3.zero, Vector3.one, 1f, true, false);
+ }
+
+ private void SetEffect(GameObject go, uint breakLevel, int slot)
+ {
+ bool flag = slot >= this.m_fuseBreakFx.Length;
+ if (!flag)
+ {
+ bool flag2 = go == null;
+ if (!flag2)
+ {
+ ArtifactQuanlityFx artifactQuanlityFx = this.m_fuseBreakFx[slot];
+ bool flag3 = artifactQuanlityFx == null;
+ if (flag3)
+ {
+ artifactQuanlityFx = new ArtifactQuanlityFx();
+ this.m_fuseBreakFx[slot] = artifactQuanlityFx;
+ }
+ string path;
+ bool flag4 = !this.m_doc.GetEffectPath(breakLevel, out path);
+ if (flag4)
+ {
+ artifactQuanlityFx.Reset();
+ }
+ else
+ {
+ bool flag5 = !artifactQuanlityFx.IsCanReuse((ulong)breakLevel);
+ if (flag5)
+ {
+ artifactQuanlityFx.SetData((ulong)breakLevel, go.transform.Find("Icon/Icon/Effects"), path);
+ }
+ }
+ }
+ }
+ }
+
+ private void RestQuanlityFx()
+ {
+ for (int i = 0; i < CharacterEquipHandler.Equip_Slot_Count; i++)
+ {
+ bool flag = this.m_fuseBreakFx[i] != null;
+ if (flag)
+ {
+ this.m_fuseBreakFx[i].Reset();
+ }
+ }
+ }
+
+ public void UpdateEquipSlot(XItem item)
+ {
+ bool flag = item == null;
+ if (!flag)
+ {
+ EquipList.RowData equipConf = XBagDocument.GetEquipConf(item.itemID);
+ bool flag2 = equipConf == null;
+ if (!flag2)
+ {
+ bool flag3 = this.m_EquipSlots[(int)equipConf.EquipPos].ID == item.uid;
+ if (flag3)
+ {
+ XItemDrawerMgr.Param.bHideBinding = true;
+ XSingleton<XItemDrawerMgr>.singleton.DrawItem(this.m_EquipGo[(int)equipConf.EquipPos], item);
+ XEquipItem xequipItem = item as XEquipItem;
+ this.SetEffect(this.m_EquipGo[(int)equipConf.EquipPos], xequipItem.fuseInfo.BreakNum, (int)equipConf.EquipPos);
+ }
+ }
+ }
+ }
+
+ public void SetEquipSlot(int slot, XItem item)
+ {
+ XItemDrawerMgr.Param.bHideBinding = true;
+ XSingleton<XItemDrawerMgr>.singleton.DrawItem(this.m_EquipGo[slot], item);
+ this.m_EquipSlots[slot].ID = ((item != null) ? item.uid : 0UL);
+ bool flag = item != null;
+ if (flag)
+ {
+ XEquipItem xequipItem = item as XEquipItem;
+ this.SetEffect(this.m_EquipGo[slot], xequipItem.fuseInfo.BreakNum, slot);
+ }
+ else
+ {
+ this.SetEffect(this.m_EquipGo[slot], 0u, slot);
+ }
+ }
+
+ public void RegisterItemClickEvents(SpriteClickEventHandler handle = null)
+ {
+ SpriteClickEventHandler eventHandler = handle;
+ bool flag = handle == null;
+ if (flag)
+ {
+ eventHandler = new SpriteClickEventHandler(CharacterEquipHandler.OnItemClicked);
+ }
+ for (int i = 0; i < CharacterEquipHandler.Equip_Slot_Count; i++)
+ {
+ this.m_EquipSlots[i].RegisterSpriteClickEventHandler(eventHandler);
+ }
+ }
+
+ public void SelectEquip(ulong uid)
+ {
+ bool flag = uid == 0UL;
+ if (flag)
+ {
+ this._ItemSelector.Hide();
+ }
+ else
+ {
+ for (int i = 0; i < CharacterEquipHandler.Equip_Slot_Count; i++)
+ {
+ bool flag2 = this.m_EquipSlots[i].ID == uid;
+ if (flag2)
+ {
+ this._ItemSelector.Select(this.m_EquipSlots[i]);
+ break;
+ }
+ }
+ }
+ }
+
+ public static void OnItemClicked(IXUISprite iSp)
+ {
+ XItem itemByUID = XSingleton<XGame>.singleton.Doc.XBagDoc.GetItemByUID(iSp.ID);
+ bool flag = itemByUID != null;
+ if (flag)
+ {
+ XBodyBag bodyBag = itemByUID.Description.BodyBag;
+ bool flag2 = bodyBag != null && bodyBag.HasItem(itemByUID.uid);
+ if (flag2)
+ {
+ XSingleton<TooltipParam>.singleton.bEquiped = true;
+ XSingleton<UiUtility>.singleton.ShowTooltipDialog(itemByUID, null, iSp, true, 0u);
+ }
+ else
+ {
+ XSingleton<UiUtility>.singleton.ShowTooltipDialogWithSearchingCompare(itemByUID, iSp, true, 0u);
+ }
+ }
+ }
+
+ private void _OnSlotBgClick(IXUISprite iSp)
+ {
+ EquipPosition equipPosition = (EquipPosition)iSp.ID;
+ string text = XSingleton<UiUtility>.singleton.GetEquipPartName(equipPosition, true);
+ bool flag = equipPosition == EquipPosition.Earrings || equipPosition == EquipPosition.Rings || equipPosition == EquipPosition.Necklace;
+ if (flag)
+ {
+ text = XStringDefineProxy.GetString("SHIPIN_FROM", new object[]
+ {
+ text
+ });
+ }
+ XSingleton<UiUtility>.singleton.ShowSystemTip(text, "fece00");
+ }
+
+ public void PlaySuitFx(List<int> equipPos)
+ {
+ this._SuitFxMgr.FakeReturnAll();
+ for (int i = 0; i < equipPos.Count; i++)
+ {
+ GameObject gameObject = this._SuitFxMgr.SetTip(this.m_EquipSlots[equipPos[i]]);
+ IXUITweenTool ixuitweenTool = gameObject.GetComponent("XUIPlayTween") as IXUITweenTool;
+ ixuitweenTool.PlayTween(true, -1f);
+ }
+ this._SuitFxMgr.ActualReturnAll();
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/CharacterEquipHandler.cs.meta b/Client/Assets/Scripts/XMainClient/UI/CharacterEquipHandler.cs.meta
new file mode 100644
index 00000000..1a757895
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/CharacterEquipHandler.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 0e61f0d4af6b8c94fa9e401484bb67c4
+timeCreated: 1611403203
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/CharacterItemBagHandler.cs b/Client/Assets/Scripts/XMainClient/UI/CharacterItemBagHandler.cs
new file mode 100644
index 00000000..4444c86a
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/CharacterItemBagHandler.cs
@@ -0,0 +1,412 @@
+using System;
+using System.Collections.Generic;
+using KKSG;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class CharacterItemBagHandler : DlgHandlerBase
+ {
+ private XItemMorePowerfulTipMgr newItemMgr
+ {
+ get
+ {
+ return DlgBase<ItemSystemDlg, TabDlgBehaviour>.singleton.NewItemMgr;
+ }
+ }
+
+ private XItemMorePowerfulTipMgr redPointMgr
+ {
+ get
+ {
+ return DlgBase<ItemSystemDlg, TabDlgBehaviour>.singleton.RedPointMgr;
+ }
+ }
+
+ public XWheelOfFortuneHandler WheelOfFortune
+ {
+ get
+ {
+ return this._WheelOfFortune;
+ }
+ }
+
+ protected override string FileName
+ {
+ get
+ {
+ return "ItemNew/BagListPanel";
+ }
+ }
+
+ private XCharacterItemDocument m_doc;
+
+ private IXUILabel m_bagNumLab;
+
+ private IXUIButton m_helpBtn;
+
+ private IXUIButton m_expandBagBtn;
+
+ private XBagWindow m_bagWindow;
+
+ private XWheelOfFortuneHandler _WheelOfFortune;
+
+ private XUIPool m_tabTplPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ private Dictionary<uint, GameObject> m_tabReddotDic = new Dictionary<uint, GameObject>();
+
+ private Dictionary<ulong, IXUISprite> itemBtnDic = new Dictionary<ulong, IXUISprite>();
+
+ protected override void Init()
+ {
+ base.Init();
+ GameObject gameObject = base.PanelObject.transform.Find("WheelOfFortune").gameObject;
+ DlgHandlerBase.EnsureCreate<XWheelOfFortuneHandler>(ref this._WheelOfFortune, gameObject, this, false);
+ this.m_bagNumLab = (base.PanelObject.transform.Find("BagNum").GetComponent("XUILabel") as IXUILabel);
+ this.m_expandBagBtn = (base.PanelObject.transform.Find("add").GetComponent("XUIButton") as IXUIButton);
+ this.m_helpBtn = (base.PanelObject.transform.Find("Help").GetComponent("XUIButton") as IXUIButton);
+ gameObject = base.PanelObject.transform.Find("Items").gameObject;
+ this.m_bagWindow = new XBagWindow(gameObject, null, null);
+ this.m_bagWindow.Init();
+ gameObject = base.PanelObject.transform.Find("TabsFrame/Tpl").gameObject;
+ this.m_tabTplPool.SetupPool(gameObject.transform.parent.gameObject, gameObject, 4u, false);
+ this.m_doc = (XSingleton<XGame>.singleton.Doc.GetXComponent(XCharacterItemDocument.uuID) as XCharacterItemDocument);
+ this.m_doc.Handler = this;
+ BagExpandItemListTable.RowData expandItemConfByType = XBagDocument.GetExpandItemConfByType((uint)XFastEnumIntEqualityComparer<BagType>.ToInt(BagType.ItemBag));
+ this.m_expandBagBtn.gameObject.SetActive(expandItemConfByType != null);
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ this.m_expandBagBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnBagExpandClicked));
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ this.m_doc.BagType = 0u;
+ this.FillTabs();
+ }
+
+ protected override void OnHide()
+ {
+ this.m_bagWindow.OnHide();
+ this.itemBtnDic.Clear();
+ this.newItemMgr.ReturnAll();
+ this.redPointMgr.ReturnAll();
+ this.m_doc.NewItems.TryClear();
+ base.OnHide();
+ }
+
+ public override void StackRefresh()
+ {
+ base.StackRefresh();
+ this.RefreshBag();
+ this.UpdateTabRedDot();
+ }
+
+ public override void OnUnload()
+ {
+ DlgHandlerBase.EnsureUnload<XWheelOfFortuneHandler>(ref this._WheelOfFortune);
+ this.m_doc.Handler = null;
+ base.OnUnload();
+ }
+
+ private void FillTabs()
+ {
+ this.m_tabTplPool.ReturnAll(false);
+ bool flag = XCharacterItemDocument.TabList == null;
+ if (!flag)
+ {
+ int count = XCharacterItemDocument.TabList.Count;
+ this.m_tabReddotDic.Clear();
+ for (int i = 0; i < count; i++)
+ {
+ XTuple<uint, string> xtuple = XCharacterItemDocument.TabList[i];
+ bool flag2 = xtuple == null;
+ if (!flag2)
+ {
+ GameObject gameObject = this.m_tabTplPool.FetchGameObject(false);
+ gameObject.transform.localScale = Vector3.one;
+ gameObject.transform.localPosition = new Vector3((float)(this.m_tabTplPool.TplWidth * i), 0f, 0f);
+ IXUICheckBox ixuicheckBox = gameObject.transform.Find("Bg").GetComponent("XUICheckBox") as IXUICheckBox;
+ ixuicheckBox.ID = (ulong)xtuple.Item1;
+ ixuicheckBox.RegisterOnCheckEventHandler(new CheckBoxOnCheckEventHandler(this.OnTabTooggleClicked));
+ this.m_tabReddotDic.Add(xtuple.Item1, gameObject.transform.Find("Bg/RedPoint").gameObject);
+ IXUILabel ixuilabel = gameObject.transform.Find("Bg/TextLabel").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel.SetText(xtuple.Item2);
+ ixuilabel = (gameObject.transform.Find("Bg/SelectedTextLabel").GetComponent("XUILabel") as IXUILabel);
+ ixuilabel.SetText(xtuple.Item2);
+ bool flag3 = i == 0;
+ if (flag3)
+ {
+ ixuicheckBox.ForceSetFlag(true);
+ this.OnTabTooggleClicked(ixuicheckBox);
+ }
+ else
+ {
+ ixuicheckBox.ForceSetFlag(false);
+ }
+ }
+ }
+ this.UpdateTabRedDot();
+ }
+ }
+
+ private void FillContent()
+ {
+ this.RefreshBag();
+ this._WheelOfFortune.SetVisible(false);
+ this.m_doc.NewItems.bCanClear = true;
+ }
+
+ private void RefreshBag()
+ {
+ this.m_bagWindow.ChangeData(new ItemUpdateHandler(this.WrapContentItemUpdated), new GetItemHandler(this.m_doc.GetItem));
+ this.m_bagWindow.OnShow();
+ this.SetBagNum();
+ }
+
+ public void Refresh()
+ {
+ this.m_bagWindow.RefreshWindow();
+ this.SetBagNum();
+ }
+
+ public void UpdateBag()
+ {
+ this.itemBtnDic.Clear();
+ this.m_bagWindow.UpdateBag();
+ this.SetBagNum();
+ }
+
+ public void UpdateTabRedDot()
+ {
+ bool flag = this.m_tabReddotDic == null;
+ if (!flag)
+ {
+ foreach (KeyValuePair<uint, GameObject> keyValuePair in this.m_tabReddotDic)
+ {
+ bool active;
+ bool flag2 = this.m_doc.m_bagTypeRedDotDic.TryGetValue(keyValuePair.Key, out active);
+ if (flag2)
+ {
+ bool flag3 = keyValuePair.Value != null;
+ if (flag3)
+ {
+ keyValuePair.Value.SetActive(active);
+ }
+ }
+ else
+ {
+ bool flag4 = keyValuePair.Value != null;
+ if (flag4)
+ {
+ keyValuePair.Value.SetActive(false);
+ }
+ }
+ }
+ }
+ }
+
+ private void SetBagNum()
+ {
+ int totalNum = this.m_doc.GetTotalNum();
+ XRechargeDocument specificDocument = XDocuments.GetSpecificDocument<XRechargeDocument>(XRechargeDocument.uuID);
+ VIPTable.RowData byVIP = specificDocument.VIPReader.GetByVIP((int)specificDocument.VipLevel);
+ bool flag = byVIP != null;
+ if (flag)
+ {
+ uint num = byVIP.BagMax;
+ BagExpandData bagExpandData = XBagDocument.BagDoc.GetBagExpandData(BagType.ItemBag);
+ bool flag2 = bagExpandData != null;
+ if (flag2)
+ {
+ num += bagExpandData.ExpandNum;
+ }
+ bool flag3 = (long)totalNum >= (long)((ulong)num);
+ if (flag3)
+ {
+ this.m_bagNumLab.SetText(string.Format("[ff4366]{0}[-]/{1}", totalNum, num));
+ }
+ else
+ {
+ this.m_bagNumLab.SetText(string.Format("{0}[-]/{1}", totalNum, num));
+ }
+ }
+ }
+
+ private void WrapContentItemUpdated(Transform t, int index)
+ {
+ IXUISprite ixuisprite = t.Find("Icon").GetComponent("XUISprite") as IXUISprite;
+ GameObject gameObject = t.Find("RedPoint").gameObject;
+ bool flag = this.m_bagWindow.m_XItemList == null || index >= this.m_bagWindow.m_XItemList.Count || index < 0;
+ if (flag)
+ {
+ XSingleton<XItemDrawerMgr>.singleton.DrawItem(t.gameObject, null);
+ this.newItemMgr.ReturnInstance(ixuisprite);
+ gameObject.SetActive(false);
+ t.gameObject.name = XSingleton<XCommon>.singleton.StringCombine("empty", index.ToString());
+ }
+ else
+ {
+ t.gameObject.name = XSingleton<XCommon>.singleton.StringCombine("item", this.m_bagWindow.m_XItemList[index].itemID.ToString());
+ XItem xitem = this.m_bagWindow.m_XItemList[index];
+ XSingleton<XItemDrawerMgr>.singleton.DrawItem(t.gameObject, xitem);
+ ixuisprite.ID = xitem.uid;
+ ixuisprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this._OnItemClicked));
+ bool flag2 = this.itemBtnDic.ContainsKey(ixuisprite.ID);
+ if (flag2)
+ {
+ this.itemBtnDic[ixuisprite.ID] = ixuisprite;
+ }
+ else
+ {
+ this.itemBtnDic.Add(ixuisprite.ID, ixuisprite);
+ }
+ bool flag3 = this.m_doc.NewItems.IsNew(ixuisprite.ID);
+ if (flag3)
+ {
+ this.newItemMgr.SetTip(ixuisprite);
+ }
+ else
+ {
+ this.newItemMgr.ReturnInstance(ixuisprite);
+ }
+ bool flag4 = this.m_doc.AvailableItems.IsNew(ixuisprite.ID);
+ if (flag4)
+ {
+ gameObject.SetActive(true);
+ }
+ else
+ {
+ gameObject.SetActive(false);
+ }
+ }
+ }
+
+ public void AddItem(List<XItem> items)
+ {
+ this.m_bagWindow.UpdateBag();
+ }
+
+ public void RemoveItem(List<ulong> uids)
+ {
+ this.UpdateBag();
+ foreach (ulong num in uids)
+ {
+ bool flag = num == DlgBase<EquipTooltipDlg, EquipTooltipDlgBehaviour>.singleton.MainItemUID;
+ if (flag)
+ {
+ DlgBase<EquipTooltipDlg, EquipTooltipDlgBehaviour>.singleton.HideToolTip(false);
+ }
+ bool flag2 = num == DlgBase<ItemTooltipDlg, ItemTooltipDlgBehaviour>.singleton.MainItemUID;
+ if (flag2)
+ {
+ DlgBase<ItemTooltipDlg, ItemTooltipDlgBehaviour>.singleton.HideToolTip(true);
+ }
+ }
+ }
+
+ public void ItemNumChanged(XItem item)
+ {
+ this.m_bagWindow.UpdateItem(item);
+ }
+
+ public void UpdateItem(XItem item)
+ {
+ EquipList.RowData equipConf = XBagDocument.GetEquipConf(item.itemID);
+ bool flag = equipConf == null;
+ if (flag)
+ {
+ this.m_bagWindow.UpdateItem(item);
+ }
+ bool flag2 = item.uid == DlgBase<EquipTooltipDlg, EquipTooltipDlgBehaviour>.singleton.MainItemUID;
+ if (flag2)
+ {
+ DlgBase<EquipTooltipDlg, EquipTooltipDlgBehaviour>.singleton.HideToolTip(false);
+ }
+ bool flag3 = item.uid == DlgBase<ItemTooltipDlg, ItemTooltipDlgBehaviour>.singleton.MainItemUID;
+ if (flag3)
+ {
+ DlgBase<ItemTooltipDlg, ItemTooltipDlgBehaviour>.singleton.HideToolTip(true);
+ }
+ }
+
+ public void RefreshTips(ulong uid)
+ {
+ IXUISprite ixuisprite;
+ bool flag = this.itemBtnDic.TryGetValue(uid, out ixuisprite);
+ if (flag)
+ {
+ bool flag2 = ixuisprite == null;
+ if (!flag2)
+ {
+ XItem itemByUID = XSingleton<XGame>.singleton.Doc.XBagDoc.GetItemByUID(ixuisprite.ID);
+ bool flag3 = itemByUID == null;
+ if (!flag3)
+ {
+ bool flag4 = itemByUID.Type == ItemType.PANDORA;
+ if (flag4)
+ {
+ PandoraHeart.RowData pandoraHeartConf = XBagDocument.GetPandoraHeartConf(itemByUID.itemID, XSingleton<XAttributeMgr>.singleton.XPlayerData.BasicTypeID);
+ int num = 0;
+ bool flag5 = pandoraHeartConf != null;
+ if (flag5)
+ {
+ num = XBagDocument.BagDoc.ItemBag.GetItemCount((int)pandoraHeartConf.FireID);
+ }
+ bool flag6 = num > 2;
+ if (!flag6)
+ {
+ this._OnItemClicked(ixuisprite);
+ }
+ }
+ }
+ }
+ }
+ }
+
+ private void _OnItemClicked(IXUISprite iSp)
+ {
+ XItem itemByUID = XSingleton<XGame>.singleton.Doc.XBagDoc.GetItemByUID(iSp.ID);
+ bool flag = itemByUID == null;
+ if (!flag)
+ {
+ bool flag2 = this.m_doc.NewItems.RemoveItem(iSp.ID, itemByUID.Type, false);
+ if (flag2)
+ {
+ this.Refresh();
+ }
+ CharacterEquipHandler.OnItemClicked(iSp);
+ }
+ }
+
+ public bool OnBagExpandClicked(IXUIButton button)
+ {
+ XBagDocument.BagDoc.UseBagExpandTicket(BagType.ItemBag);
+ return true;
+ }
+
+ private bool OnTabTooggleClicked(IXUICheckBox cb)
+ {
+ bool flag = !cb.bChecked;
+ bool result;
+ if (flag)
+ {
+ result = false;
+ }
+ else
+ {
+ this.m_doc.BagType = (uint)cb.ID;
+ this.FillContent();
+ result = true;
+ }
+ return result;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/CharacterItemBagHandler.cs.meta b/Client/Assets/Scripts/XMainClient/UI/CharacterItemBagHandler.cs.meta
new file mode 100644
index 00000000..6a2930f4
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/CharacterItemBagHandler.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: a531da2cb0084084e8182b1d900d2762
+timeCreated: 1611404285
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/ComboBuff.cs b/Client/Assets/Scripts/XMainClient/UI/ComboBuff.cs
new file mode 100644
index 00000000..06e475d8
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/ComboBuff.cs
@@ -0,0 +1,15 @@
+using System;
+
+namespace XMainClient.UI
+{
+ internal class ComboBuff
+ {
+ public int combo;
+
+ public int buffID;
+
+ public int buffLevel;
+
+ public string buffName;
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/ComboBuff.cs.meta b/Client/Assets/Scripts/XMainClient/UI/ComboBuff.cs.meta
new file mode 100644
index 00000000..cb7afbf3
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/ComboBuff.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 172f0f05aa8589c4aa2cae850117eb5a
+timeCreated: 1611403292
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/CompeteNestBehaviour.cs b/Client/Assets/Scripts/XMainClient/UI/CompeteNestBehaviour.cs
new file mode 100644
index 00000000..f4272ac4
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/CompeteNestBehaviour.cs
@@ -0,0 +1,54 @@
+using System;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class CompeteNestBehaviour : DlgBehaviourBase
+ {
+ public IXUITexture m_bgTexture;
+
+ public IXUILabel m_tittleLab;
+
+ public IXUILabel m_timesLab;
+
+ public IXUILabel m_tipsLab;
+
+ public IXUIButton m_rankBtn;
+
+ public IXUIButton m_goBattleBtn;
+
+ public IXUIButton m_closedBtn;
+
+ public IXUIButton m_claimBtn;
+
+ public Transform m_claimredpoint;
+
+ public GameObject m_itemsGo;
+
+ public Transform m_rankTra;
+
+ public XUIPool m_ItemPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ private void Awake()
+ {
+ this.m_rankTra = base.transform.Find("Rank");
+ this.m_closedBtn = (base.transform.Find("Close").GetComponent("XUIButton") as IXUIButton);
+ Transform transform = base.transform.Find("Main/Tittles");
+ this.m_tittleLab = (transform.Find("Tittle1").GetComponent("XUILabel") as IXUILabel);
+ this.m_timesLab = (base.transform.Find("Main/Right/Times").GetComponent("XUILabel") as IXUILabel);
+ transform = base.transform.Find("Main");
+ this.m_bgTexture = (transform.Find("P").GetComponent("XUITexture") as IXUITexture);
+ this.m_rankBtn = (transform.Find("RankBtn").GetComponent("XUIButton") as IXUIButton);
+ this.m_goBattleBtn = (transform.Find("Right/BtnStartTeam").GetComponent("XUIButton") as IXUIButton);
+ this.m_claimBtn = (transform.Find("Right/BtnStartSingle").GetComponent("XUIButton") as IXUIButton);
+ this.m_claimredpoint = transform.Find("Right/BtnStartSingle/RedPoint");
+ transform = base.transform.Find("Main/ListPanel");
+ this.m_itemsGo = transform.gameObject;
+ this.m_ItemPool.SetupPool(transform.gameObject, transform.Find("Grid/ItemTpl").gameObject, 2u, false);
+ this.m_tipsLab = (base.transform.Find("Main/t").GetComponent("XUILabel") as IXUILabel);
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/CompeteNestBehaviour.cs.meta b/Client/Assets/Scripts/XMainClient/UI/CompeteNestBehaviour.cs.meta
new file mode 100644
index 00000000..69704770
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/CompeteNestBehaviour.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 37e5ff1e78de5cc4e885fc70a50a0343
+timeCreated: 1611403568
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/CompeteNestDlg.cs b/Client/Assets/Scripts/XMainClient/UI/CompeteNestDlg.cs
new file mode 100644
index 00000000..0cfb694c
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/CompeteNestDlg.cs
@@ -0,0 +1,247 @@
+using System;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class CompeteNestDlg : DlgBase<CompeteNestDlg, CompeteNestBehaviour>
+ {
+ public override string fileName
+ {
+ get
+ {
+ return "OperatingActivity/CompeteNest";
+ }
+ }
+
+ public override int layer
+ {
+ get
+ {
+ return 1;
+ }
+ }
+
+ public override bool autoload
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override bool hideMainMenu
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override bool pushstack
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override bool fullscreenui
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ private XCompeteDocument m_doc;
+
+ public CompeteNestRankHandler m_rankHandler;
+
+ private float m_fCoolTime = 0.5f;
+
+ private float m_fLastClickBtnTime = 0f;
+
+ protected override void Init()
+ {
+ base.Init();
+ this.m_doc = XDocuments.GetSpecificDocument<XCompeteDocument>(XCompeteDocument.uuID);
+ this.m_doc.View = this;
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ base.uiBehaviour.m_goBattleBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnGoBattleClicked));
+ base.uiBehaviour.m_rankBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnRankBtnClicked));
+ base.uiBehaviour.m_closedBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnClickClosed));
+ base.uiBehaviour.m_claimBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnClickClaim));
+ }
+
+ protected override void OnShow()
+ {
+ this.m_doc.HadRedDot = false;
+ base.uiBehaviour.m_tipsLab.SetText(XSingleton<UiUtility>.singleton.ReplaceReturn(XSingleton<XStringTable>.singleton.GetString("WeekDragonTips")));
+ this.m_doc.ReqCompeteDragonInfo();
+ }
+
+ protected override void OnHide()
+ {
+ base.OnHide();
+ }
+
+ public override void StackRefresh()
+ {
+ base.StackRefresh();
+ }
+
+ protected override void OnUnload()
+ {
+ base.uiBehaviour.m_bgTexture.SetTexturePath("");
+ DlgHandlerBase.EnsureUnload<CompeteNestRankHandler>(ref this.m_rankHandler);
+ base.OnUnload();
+ }
+
+ public void Resfresh()
+ {
+ this.FillContent();
+ }
+
+ private void FillContent()
+ {
+ XExpeditionDocument xexpeditionDocument = XSingleton<XGame>.singleton.Doc.GetXComponent(XExpeditionDocument.uuID) as XExpeditionDocument;
+ ExpeditionTable.RowData expeditionDataByID = xexpeditionDocument.GetExpeditionDataByID(this.m_doc.CurDNid);
+ int leftRewardCount = this.m_doc.LeftRewardCount;
+ int getRewardMax = this.m_doc.GetRewardMax;
+ base.uiBehaviour.m_timesLab.SetText(string.Format("{0}/{1}", leftRewardCount, getRewardMax));
+ base.uiBehaviour.m_claimBtn.SetEnable(this.m_doc.CanGetCount != 0, false);
+ base.uiBehaviour.m_claimredpoint.gameObject.SetActive(this.m_doc.CanGetCount > 0);
+ this.FillBgTexture();
+ bool flag = expeditionDataByID != null;
+ if (flag)
+ {
+ base.uiBehaviour.m_tittleLab.SetText(expeditionDataByID.DNExpeditionName);
+ this.FillItem(expeditionDataByID);
+ }
+ }
+
+ private void FillItem(ExpeditionTable.RowData rowData)
+ {
+ base.uiBehaviour.m_ItemPool.ReturnAll(false);
+ bool flag = rowData.ViewableDropList == null || rowData.ViewableDropList.Length == 0;
+ if (!flag)
+ {
+ for (int i = 0; i < rowData.ViewableDropList.Length; i++)
+ {
+ GameObject gameObject = base.uiBehaviour.m_ItemPool.FetchGameObject(false);
+ gameObject.transform.parent = base.uiBehaviour.m_itemsGo.transform;
+ gameObject.name = i.ToString();
+ gameObject.transform.localScale = Vector3.one;
+ gameObject.transform.localPosition = new Vector3((float)(base.uiBehaviour.m_ItemPool.TplWidth * i), 0f, 0f);
+ IXUISprite ixuisprite = gameObject.transform.Find("Icon").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.ID = (ulong)rowData.ViewableDropList[i];
+ XSingleton<XItemDrawerMgr>.singleton.normalItemDrawer.DrawItem(gameObject, (int)rowData.ViewableDropList[i], 0, false);
+ ixuisprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(XSingleton<UiUtility>.singleton.OnItemClick));
+ }
+ }
+ }
+
+ private void FillBgTexture()
+ {
+ string picNameByDNid = this.m_doc.GetPicNameByDNid((uint)this.m_doc.CurDNid);
+ bool flag = picNameByDNid == "" || picNameByDNid == null;
+ if (flag)
+ {
+ base.uiBehaviour.m_bgTexture.SetTexturePath("atlas/UI/common/Pic/Loading_23_h2Split");
+ }
+ else
+ {
+ base.uiBehaviour.m_bgTexture.SetTexturePath("atlas/UI/common/Pic/" + this.m_doc.GetPicNameByDNid((uint)this.m_doc.CurDNid));
+ }
+ }
+
+ private bool OnGoBattleClicked(IXUIButton sp)
+ {
+ bool flag = this.SetButtonCool(this.m_fCoolTime);
+ bool result;
+ if (flag)
+ {
+ result = true;
+ }
+ else
+ {
+ XTeamDocument specificDocument = XDocuments.GetSpecificDocument<XTeamDocument>(XTeamDocument.uuID);
+ specificDocument.SetAndMatch(this.m_doc.CurDNid);
+ result = true;
+ }
+ return result;
+ }
+
+ private bool OnRankBtnClicked(IXUIButton sp)
+ {
+ bool flag = this.SetButtonCool(this.m_fCoolTime);
+ bool result;
+ if (flag)
+ {
+ result = true;
+ }
+ else
+ {
+ DlgHandlerBase.EnsureCreate<CompeteNestRankHandler>(ref this.m_rankHandler, base.uiBehaviour.m_rankTra, true, this);
+ result = true;
+ }
+ return result;
+ }
+
+ private bool OnClickClosed(IXUIButton sp)
+ {
+ bool flag = this.SetButtonCool(this.m_fCoolTime);
+ bool result;
+ if (flag)
+ {
+ result = true;
+ }
+ else
+ {
+ this.SetVisible(false, true);
+ result = true;
+ }
+ return result;
+ }
+
+ private bool OnClickClaim(IXUIButton sp)
+ {
+ bool flag = this.SetButtonCool(this.m_fCoolTime);
+ bool result;
+ if (flag)
+ {
+ result = true;
+ }
+ else
+ {
+ this.m_doc.ReqFetchReward();
+ result = true;
+ }
+ return result;
+ }
+
+ private bool SetButtonCool(float time)
+ {
+ float num = Time.realtimeSinceStartup - this.m_fLastClickBtnTime;
+ bool flag = num < time;
+ bool result;
+ if (flag)
+ {
+ result = true;
+ }
+ else
+ {
+ this.m_fLastClickBtnTime = Time.realtimeSinceStartup;
+ result = false;
+ }
+ return result;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/CompeteNestDlg.cs.meta b/Client/Assets/Scripts/XMainClient/UI/CompeteNestDlg.cs.meta
new file mode 100644
index 00000000..c78d43e7
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/CompeteNestDlg.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: aa57540d408418344ada38c0ea18a0de
+timeCreated: 1611404302
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/CookingHandler.cs b/Client/Assets/Scripts/XMainClient/UI/CookingHandler.cs
new file mode 100644
index 00000000..954f957b
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/CookingHandler.cs
@@ -0,0 +1,602 @@
+using System;
+using System.Collections.Generic;
+using UILib;
+using UnityEngine;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class CookingHandler : DlgHandlerBase
+ {
+ protected override string FileName
+ {
+ get
+ {
+ return "Home/CookingHandler";
+ }
+ }
+
+ protected IXUILabel _upCuisineLevel;
+
+ protected IXUILabel _upExpPercent;
+
+ protected IXUISlider _upProgress;
+
+ protected Transform _middCuisineItem;
+
+ protected IXUILabel _middCuisineName;
+
+ protected IXUILabel _middCuisineAddExp;
+
+ protected IXUILabel _middMakeTimes;
+
+ protected IXUILabel _downCuisineDec;
+
+ protected Transform _needMats;
+
+ protected IXUIButton _makeBtn;
+
+ protected IXUIButton _cancelMakingBtn = null;
+
+ protected IXUIButton _oneKeyCookingBtn = null;
+
+ protected uint _curCookID = 0u;
+
+ protected uint _curCookLevel = 0u;
+
+ protected Transform _selectedFoodItem;
+
+ protected Transform _tabs;
+
+ protected IXUITable _tabTable;
+
+ protected XUIPool _levelCuisinePool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ protected XUIPool _cuisineChildPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ protected XUIPool _foodItemPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ protected List<Transform> _childCuisineItems = new List<Transform>();
+
+ protected List<Transform> _levelItems = new List<Transform>();
+
+ protected ulong _preCookID = 0UL;
+
+ protected bool _isOneKeyCooking = false;
+
+ protected Transform _cookingProgressFrame;
+
+ protected IXUISlider _cookingSlider;
+
+ protected Transform _cookingItem;
+
+ protected Transform _makingTrans;
+
+ protected Transform _successEffect;
+
+ protected Transform _cookingEffect;
+
+ protected IXUIButton _doBtn;
+
+ protected Transform _toggleSprite;
+
+ protected override void Init()
+ {
+ base.Init();
+ this.InitUIPool();
+ this.InitProperties();
+ this.InitClickCallback();
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ this.RefreshUI();
+ }
+
+ protected override void OnHide()
+ {
+ base.OnHide();
+ }
+
+ public override void OnUnload()
+ {
+ base.OnUnload();
+ }
+
+ public void RefreshUI()
+ {
+ this._selectedFoodItem = null;
+ this._curCookLevel = HomeMainDocument.Doc.GetCookingLevel();
+ this.InitLeftPanel();
+ this.InitSelectedFood();
+ this.RefreshRightDetail(this._curCookID);
+ }
+
+ protected void InitSelectedFood()
+ {
+ bool flag = this._levelItems.Count <= 0;
+ if (!flag)
+ {
+ bool flag2 = null != this._selectedFoodItem;
+ IXUICheckBox ixuicheckBox;
+ if (flag2)
+ {
+ ixuicheckBox = (this._selectedFoodItem.GetComponent("XUICheckBox") as IXUICheckBox);
+ }
+ else
+ {
+ bool flag3 = this._childCuisineItems.Count > 0;
+ if (flag3)
+ {
+ ixuicheckBox = (this._childCuisineItems[0].GetComponent("XUICheckBox") as IXUICheckBox);
+ }
+ else
+ {
+ IXUITweenTool ixuitweenTool = this._levelItems[0].GetComponent("XUIPlayTween") as IXUITweenTool;
+ ixuitweenTool.PlayTween(true, -1f);
+ ixuicheckBox = (this._levelItems[0].Find("Children").GetChild(0).GetComponent("XUICheckBox") as IXUICheckBox);
+ }
+ }
+ bool flag4 = ixuicheckBox == null;
+ if (!flag4)
+ {
+ this._curCookID = (uint)ixuicheckBox.ID;
+ ixuicheckBox.ForceSetFlag(true);
+ Transform parent = ixuicheckBox.gameObject.transform.parent.parent;
+ Transform transform = parent.Find("ToggleSprite");
+ transform.gameObject.SetActive(true);
+ this.SwitchToggleSprite(transform);
+ }
+ }
+ }
+
+ private void SwitchToggleSprite(Transform spriteToggle)
+ {
+ bool flag = this._toggleSprite != null && this._toggleSprite != spriteToggle;
+ if (flag)
+ {
+ this._toggleSprite.gameObject.SetActive(false);
+ }
+ this._toggleSprite = spriteToggle;
+ }
+
+ protected void InitProperties()
+ {
+ this._cookingProgressFrame = base.transform.Find("Content/CookingProgressFrame");
+ this._cookingProgressFrame.gameObject.SetActive(true);
+ Transform transform = this._cookingProgressFrame.Find("Making/Bar");
+ this._cookingSlider = (transform.GetComponent("XUISlider") as IXUISlider);
+ this._doBtn = (this._cookingProgressFrame.Find("Do").GetComponent("XUIButton") as IXUIButton);
+ this._cancelMakingBtn = (this._cookingProgressFrame.Find("Cancel").GetComponent("XUIButton") as IXUIButton);
+ this._doBtn.gameObject.SetActive(false);
+ this._cookingItem = this._cookingProgressFrame.Find("Item");
+ this._successEffect = this._cookingProgressFrame.Find("Suc");
+ this._cookingEffect = this._cookingProgressFrame.Find("effex");
+ this._makingTrans = this._cookingProgressFrame.Find("Making");
+ this._successEffect.gameObject.SetActive(false);
+ this._cookingProgressFrame.gameObject.SetActive(false);
+ this._makeBtn = (base.transform.Find("MakeBtn").GetComponent("XUIButton") as IXUIButton);
+ this._oneKeyCookingBtn = (base.transform.Find("AllMake").GetComponent("XUIButton") as IXUIButton);
+ this._oneKeyCookingBtn.gameObject.SetActive(true);
+ this._upCuisineLevel = (base.transform.Find("Content/CookLevel/NameLab").GetComponent("XUILabel") as IXUILabel);
+ this._upExpPercent = (base.transform.Find("Content/CookLevel/planLab").GetComponent("XUILabel") as IXUILabel);
+ this._upProgress = (base.transform.Find("Content/CookLevel/Bar").GetComponent("XUISlider") as IXUISlider);
+ this._middCuisineItem = base.transform.Find("Content/CookItem/Item");
+ this._middCuisineName = (base.transform.Find("Content/CookItem/Name").GetComponent("XUILabel") as IXUILabel);
+ this._middCuisineAddExp = (base.transform.Find("Content/CookItem/Exp").GetComponent("XUILabel") as IXUILabel);
+ this._middMakeTimes = (base.transform.Find("Content/CookItem/Tips").GetComponent("XUILabel") as IXUILabel);
+ this._downCuisineDec = (base.transform.Find("Content/ContentLab").GetComponent("XUILabel") as IXUILabel);
+ }
+
+ protected void InitUIPool()
+ {
+ this._tabs = base.transform.Find("Tabs");
+ this._tabTable = (this._tabs.Find("UITable").GetComponent("XUITable") as IXUITable);
+ this._needMats = base.transform.Find("Content/Items");
+ Transform transform = this._tabs.Find("UITable/TittleTpl");
+ Transform transform2 = this._tabs.Find("UITable/ChildTpl");
+ this._levelCuisinePool.SetupPool(this._tabs.gameObject, transform.gameObject, 2u, false);
+ this._cuisineChildPool.SetupPool(this._tabs.gameObject, transform2.gameObject, 2u, false);
+ this._foodItemPool.SetupPool(this._needMats.gameObject, this._needMats.Find("Item").gameObject, 2u, false);
+ }
+
+ protected void InitLeftPanel()
+ {
+ uint num = Math.Min(this._curCookLevel + 1u, XHomeCookAndPartyDocument.Doc.GetMaxLevel());
+ this._levelCuisinePool.ReturnAll(false);
+ this._cuisineChildPool.ReturnAll(true);
+ this._childCuisineItems.Clear();
+ this._levelItems.Clear();
+ XHomeCookAndPartyDocument.Doc.SortFoodTableData();
+ CookingFoodInfo.RowData[] table = XHomeCookAndPartyDocument.CookingFoolInfoTable.Table;
+ int num2 = 0;
+ int num3 = (int)this._levelCuisinePool.TplPos.y;
+ Transform transform = null;
+ for (int i = 0; i < table.Length; i++)
+ {
+ bool flag = (ulong)table[i].Level != (ulong)((long)num2);
+ if (flag)
+ {
+ num2++;
+ bool flag2 = (long)num2 > (long)((ulong)num);
+ if (flag2)
+ {
+ break;
+ }
+ transform = this.SetLevelItem(ref num3, num2);
+ this._levelItems.Add(transform);
+ }
+ CookingFoodInfo.RowData rowData = table[i];
+ uint basicTypeID = XSingleton<XAttributeMgr>.singleton.XPlayerData.BasicTypeID;
+ foreach (uint num4 in rowData.Profession)
+ {
+ bool flag3 = num4 == basicTypeID;
+ if (flag3)
+ {
+ this.SetChildItem(ref num3, table[i], transform.Find("Children"));
+ break;
+ }
+ }
+ }
+ this._tabTable.Reposition();
+ }
+
+ protected Transform SetLevelItem(ref int height, int level)
+ {
+ GameObject gameObject = this._levelCuisinePool.FetchGameObject(false);
+ gameObject.transform.parent = this._tabs.Find("UITable");
+ gameObject.transform.localPosition = new Vector3(this._levelCuisinePool.TplPos.x, (float)height, 0f);
+ IXUISprite ixuisprite = gameObject.GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.ID = (ulong)((long)level);
+ ixuisprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnClicklevel));
+ height -= this._levelCuisinePool.TplHeight;
+ IXUILabel ixuilabel = gameObject.transform.Find("NameLab").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel.SetText(string.Format(XSingleton<XStringTable>.singleton.GetString("FoodLevel"), level));
+ IXUILabel ixuilabel2 = gameObject.transform.Find("ToggleSprite/NameLab").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel2.SetText(string.Format(XSingleton<XStringTable>.singleton.GetString("FoodLevel"), level));
+ Transform transform = gameObject.transform.Find("ToggleSprite");
+ transform.gameObject.SetActive(false);
+ return gameObject.transform;
+ }
+
+ protected Transform SetChildItem(ref int height, CookingFoodInfo.RowData info, Transform parent)
+ {
+ GameObject gameObject = this._cuisineChildPool.FetchGameObject(false);
+ gameObject.transform.parent = parent;
+ gameObject.transform.localPosition = new Vector3(0f, (float)(-(float)this._levelCuisinePool.TplHeight - (parent.childCount - 1) * this._cuisineChildPool.TplHeight), 0f);
+ height -= this._cuisineChildPool.TplHeight;
+ Transform transform = gameObject.transform.Find("NewSpr");
+ transform.gameObject.SetActive(XHomeCookAndPartyDocument.Doc.IsNewAddedCookItem(info.FoodID));
+ IXUILabel ixuilabel = gameObject.transform.Find("SelectLab").GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel2 = gameObject.transform.Find("UnSelectLab").GetComponent("XUILabel") as IXUILabel;
+ IXUICheckBox ixuicheckBox = gameObject.GetComponent("XUICheckBox") as IXUICheckBox;
+ ixuilabel.SetText(info.FoodName);
+ IXUISprite ixuisprite = gameObject.transform.Find("Sprite").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.RegisterSpriteClickEventHandler(null);
+ ixuisprite.gameObject.GetComponent<BoxCollider>().enabled = false;
+ ixuicheckBox.SetEnable(true);
+ bool flag = HomeMainDocument.Doc.IsFoodIDActive(info.FoodID);
+ if (flag)
+ {
+ ixuicheckBox.ID = (ulong)info.FoodID;
+ ixuilabel2.SetText(info.FoodName);
+ }
+ else
+ {
+ ixuilabel2.SetText("? ? ? ?");
+ ixuicheckBox.ID = 0UL;
+ ixuicheckBox.SetEnable(false);
+ ixuisprite.gameObject.GetComponent<BoxCollider>().enabled = true;
+ ixuisprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnUnactiveFood));
+ }
+ ixuicheckBox.RegisterOnCheckEventHandler(new CheckBoxOnCheckEventHandler(this.OnCuisineToggleChanged));
+ gameObject.transform.localScale = Vector3.one;
+ bool flag2 = this._preCookID != 0UL && (ulong)info.FoodID == this._preCookID;
+ if (flag2)
+ {
+ this._selectedFoodItem = gameObject.transform;
+ }
+ bool flag3 = gameObject.transform.parent.localScale.y > 0.02f;
+ if (flag3)
+ {
+ this._childCuisineItems.Add(gameObject.transform);
+ }
+ return gameObject.transform;
+ }
+
+ protected void OnClicklevel(IXUISprite uiSprite)
+ {
+ foreach (object obj in uiSprite.gameObject.transform)
+ {
+ Transform transform = (Transform)obj;
+ }
+ }
+
+ protected void OnUnactiveFood(IXUISprite sprite)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString("CookMenuNotActive"), "fece00");
+ }
+
+ protected void InitClickCallback()
+ {
+ this._makeBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.StartToCooking));
+ this._oneKeyCookingBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OneShotCooking));
+ this._doBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnClickCookingButtonOK));
+ this._cancelMakingBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.CancelCooking));
+ }
+
+ protected bool OnCuisineToggleChanged(IXUICheckBox checkbox)
+ {
+ bool bChecked = checkbox.bChecked;
+ if (bChecked)
+ {
+ bool flag = checkbox.ID > 0UL;
+ if (flag)
+ {
+ this._curCookID = (uint)checkbox.ID;
+ Transform transform = checkbox.gameObject.transform.parent.parent.Find("ToggleSprite");
+ transform.gameObject.SetActive(true);
+ this.SwitchToggleSprite(transform);
+ bool flag2 = XHomeCookAndPartyDocument.Doc.RemoveNewCookItem(this._curCookID);
+ if (flag2)
+ {
+ Transform transform2 = checkbox.gameObject.transform.Find("NewSpr");
+ transform2.gameObject.SetActive(false);
+ }
+ this.RefreshRightDetail(this._curCookID);
+ return true;
+ }
+ }
+ return false;
+ }
+
+ protected void RefreshRightDetail(uint cuisineId)
+ {
+ CookingFoodInfo.RowData cookInfoByCuisineID = XHomeCookAndPartyDocument.Doc.GetCookInfoByCuisineID(cuisineId);
+ bool flag = cookInfoByCuisineID != null;
+ if (flag)
+ {
+ this._preCookID = (ulong)this._curCookID;
+ this._upCuisineLevel.SetText(this._curCookLevel.ToString());
+ uint cookingExp = HomeMainDocument.Doc.GetCookingExp();
+ uint expByCookLevel = XHomeCookAndPartyDocument.Doc.GetExpByCookLevel(this._curCookLevel);
+ this._upExpPercent.SetText(cookingExp + "/" + expByCookLevel);
+ bool flag2 = expByCookLevel == 0u;
+ if (flag2)
+ {
+ this._upProgress.Value = 0f;
+ }
+ else
+ {
+ this._upProgress.Value = cookingExp / expByCookLevel;
+ }
+ XSingleton<XItemDrawerMgr>.singleton.normalItemDrawer.DrawItem(this._middCuisineItem.gameObject, (int)cuisineId, 1, false);
+ IXUISprite ixuisprite = this._middCuisineItem.transform.Find("Icon").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.ID = (ulong)cuisineId;
+ ixuisprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(XSingleton<UiUtility>.singleton.OnItemClick));
+ this._middCuisineAddExp.SetText(cookInfoByCuisineID.AddExp.ToString());
+ this._middCuisineName.SetText(cookInfoByCuisineID.FoodName);
+ string text = "";
+ bool flag3 = cookInfoByCuisineID.Frequency > 0u;
+ if (flag3)
+ {
+ text = string.Format(XSingleton<XStringTable>.singleton.GetString("CookItemMaxTimes"), cookInfoByCuisineID.Frequency);
+ }
+ this._middMakeTimes.SetText(text);
+ this._downCuisineDec.SetText(cookInfoByCuisineID.Desc);
+ this._foodItemPool.ReturnAll(false);
+ for (int i = 0; i < cookInfoByCuisineID.Ingredients.Count; i++)
+ {
+ GameObject gameObject = this._foodItemPool.FetchGameObject(false);
+ IXUILabel ixuilabel = gameObject.transform.Find("Num").GetComponent("XUILabel") as IXUILabel;
+ uint num = cookInfoByCuisineID.Ingredients[i, 0];
+ ulong itemCount = XBagDocument.BagDoc.GetItemCount((int)num);
+ XSingleton<XItemDrawerMgr>.singleton.normalItemDrawer.DrawItem(gameObject, (int)num, (int)cookInfoByCuisineID.Ingredients[i, 1], true);
+ IXUISprite ixuisprite2 = gameObject.transform.Find("Icon").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite2.ID = (ulong)num;
+ ixuisprite2.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(XSingleton<UiUtility>.singleton.OnItemClick));
+ string text2 = itemCount + "/" + cookInfoByCuisineID.Ingredients[i, 1];
+ bool flag4 = itemCount < (ulong)cookInfoByCuisineID.Ingredients[i, 1];
+ if (flag4)
+ {
+ text2 = string.Concat(new object[]
+ {
+ "[ff0000]",
+ itemCount,
+ "/",
+ cookInfoByCuisineID.Ingredients[i, 1],
+ "[-]"
+ });
+ }
+ ixuilabel.SetText(text2);
+ gameObject.transform.localPosition = new Vector3(this._foodItemPool.TplPos.x + (float)(i * this._foodItemPool.TplWidth), this._foodItemPool.TplPos.y, 0f);
+ }
+ bool flag5 = cookInfoByCuisineID.Level > this._curCookLevel;
+ if (flag5)
+ {
+ this._oneKeyCookingBtn.SetEnable(false, false);
+ this._makeBtn.SetEnable(false, false);
+ }
+ else
+ {
+ this._oneKeyCookingBtn.SetEnable(true, false);
+ this._makeBtn.SetEnable(true, false);
+ }
+ }
+ }
+
+ protected void SendMakeCuisineReq()
+ {
+ XHomeCookAndPartyDocument.Doc.ReqGardenCookingFood(this._curCookID);
+ }
+
+ protected bool StartToCooking(IXUIButton cook)
+ {
+ bool flag = XHomeCookAndPartyDocument.Doc.IsTimeLimited(this._curCookID);
+ bool result;
+ if (flag)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XSingleton<XStringTable>.singleton.GetString("FoodMakingMaxTimes"), "fece00");
+ result = false;
+ }
+ else
+ {
+ bool flag2 = this.IsValidCooking();
+ if (flag2)
+ {
+ XSingleton<XAudioMgr>.singleton.PlayUISound("Audio/UI/Cook_ing", true, AudioChannel.Action);
+ XHomeCookAndPartyDocument.Doc.StartCreateFood(this._curCookID);
+ this.RefreshProgressFrame();
+ result = true;
+ }
+ else
+ {
+ bool isOneKeyCooking = this._isOneKeyCooking;
+ if (isOneKeyCooking)
+ {
+ this.CancelCooking(null);
+ }
+ else
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XSingleton<XStringTable>.singleton.GetString("FoodMatsLack"), "fece00");
+ }
+ result = false;
+ }
+ }
+ return result;
+ }
+
+ protected bool OneShotCooking(IXUIButton cook)
+ {
+ bool flag = XHomeCookAndPartyDocument.Doc.IsTimeLimited(this._curCookID);
+ bool result;
+ if (flag)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XSingleton<XStringTable>.singleton.GetString("FoodMakingMaxTimes"), "fece00");
+ result = false;
+ }
+ else
+ {
+ bool flag2 = this.IsValidCooking();
+ if (flag2)
+ {
+ this.OneKeyContinue(true);
+ this.StartToCooking(null);
+ }
+ else
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XSingleton<XStringTable>.singleton.GetString("FoodMatsLack"), "fece00");
+ }
+ result = true;
+ }
+ return result;
+ }
+
+ private void OneKeyContinue(bool continueCooking)
+ {
+ this._isOneKeyCooking = continueCooking;
+ this._cancelMakingBtn.gameObject.SetActive(continueCooking);
+ this._doBtn.gameObject.SetActive(!continueCooking);
+ }
+
+ private bool CancelCooking(IXUIButton button)
+ {
+ this.OneKeyContinue(false);
+ XHomeCookAndPartyDocument.Doc.StopCreateFoodTimer();
+ XSingleton<XAudioMgr>.singleton.StopUISound();
+ this._cookingEffect.gameObject.SetActive(false);
+ this._cookingProgressFrame.gameObject.SetActive(false);
+ return true;
+ }
+
+ protected void RefreshProgressFrame()
+ {
+ this._cookingProgressFrame.gameObject.SetActive(true);
+ this._successEffect.gameObject.SetActive(false);
+ this._cookingSlider.Value = 0f;
+ this._cookingEffect.gameObject.SetActive(true);
+ this._makingTrans.gameObject.SetActive(true);
+ this._doBtn.gameObject.SetActive(false);
+ XSingleton<XItemDrawerMgr>.singleton.normalItemDrawer.DrawItem(this._cookingItem.gameObject, (int)this._curCookID, 1, false);
+ this._cookingItem.gameObject.SetActive(false);
+ }
+
+ protected bool IsValidCooking()
+ {
+ CookingFoodInfo.RowData cookInfoByCuisineID = XHomeCookAndPartyDocument.Doc.GetCookInfoByCuisineID(this._curCookID);
+ bool flag = cookInfoByCuisineID != null;
+ bool result;
+ if (flag)
+ {
+ for (int i = 0; i < cookInfoByCuisineID.Ingredients.Count; i++)
+ {
+ uint itemid = cookInfoByCuisineID.Ingredients[i, 0];
+ uint num = cookInfoByCuisineID.Ingredients[i, 1];
+ uint num2 = (uint)XBagDocument.BagDoc.GetItemCount((int)itemid);
+ bool flag2 = num2 < num;
+ if (flag2)
+ {
+ return false;
+ }
+ }
+ result = true;
+ }
+ else
+ {
+ result = false;
+ }
+ return result;
+ }
+
+ private bool OnClickCookingButtonOK(IXUIButton btn)
+ {
+ this._successEffect.gameObject.SetActive(false);
+ this._cookingProgressFrame.gameObject.SetActive(false);
+ return true;
+ }
+
+ public void CookingTimeEnd()
+ {
+ this._doBtn.gameObject.SetActive(!this._isOneKeyCooking);
+ this._cookingEffect.gameObject.SetActive(false);
+ this.SendMakeCuisineReq();
+ }
+
+ public void CookingSuccess()
+ {
+ this._successEffect.gameObject.SetActive(true);
+ this._cookingItem.gameObject.SetActive(true);
+ this._makingTrans.gameObject.SetActive(false);
+ this._doBtn.gameObject.SetActive(!this._isOneKeyCooking);
+ this._curCookLevel = HomeMainDocument.Doc.GetCookingLevel();
+ this.RefreshRightDetail(this._curCookID);
+ bool flag = !this._isOneKeyCooking || !this.StartToCooking(null);
+ if (flag)
+ {
+ XSingleton<XAudioMgr>.singleton.StopUISound();
+ XSingleton<XAudioMgr>.singleton.PlayUISound("Audio/UI/Cook_Over", true, AudioChannel.Action);
+ }
+ }
+
+ public void SetProgress(float percent)
+ {
+ this._cookingSlider.Value = percent;
+ bool flag = percent >= 1f;
+ if (flag)
+ {
+ this.CookingTimeEnd();
+ }
+ }
+
+ public void RefreshRightInfo()
+ {
+ this.RefreshRightDetail(this._curCookID);
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/CookingHandler.cs.meta b/Client/Assets/Scripts/XMainClient/UI/CookingHandler.cs.meta
new file mode 100644
index 00000000..38bb4b11
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/CookingHandler.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 7d919ac890684164aa31729a772c8ad5
+timeCreated: 1611404001
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/CrossGVGBattleMember.cs b/Client/Assets/Scripts/XMainClient/UI/CrossGVGBattleMember.cs
new file mode 100644
index 00000000..df4b2129
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/CrossGVGBattleMember.cs
@@ -0,0 +1,16 @@
+using System;
+using KKSG;
+using UILib;
+using UnityEngine;
+
+namespace XMainClient.UI
+{
+ internal class CrossGVGBattleMember : GVGBattleMemberBase
+ {
+ protected override void SetupOtherMemberInfo(Transform t, GmfRole role)
+ {
+ IXUILabel ixuilabel = t.Find("Fight").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel.SetText(role.ppt.ToString());
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/CrossGVGBattleMember.cs.meta b/Client/Assets/Scripts/XMainClient/UI/CrossGVGBattleMember.cs.meta
new file mode 100644
index 00000000..9bcfa9fa
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/CrossGVGBattleMember.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 48a19b5048944a344b014919677ba7c6
+timeCreated: 1611403659
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/CrossGVGBattlePrepareBehaviour.cs b/Client/Assets/Scripts/XMainClient/UI/CrossGVGBattlePrepareBehaviour.cs
new file mode 100644
index 00000000..ba9bd6ff
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/CrossGVGBattlePrepareBehaviour.cs
@@ -0,0 +1,25 @@
+using System;
+using UILib;
+using UnityEngine;
+
+namespace XMainClient.UI
+{
+ internal class CrossGVGBattlePrepareBehaviour : GVGBattlePrepareBehaviour
+ {
+ public GameObject mRankFrame;
+
+ public IGVGBattleMember mRankPanel;
+
+ public IXUIButton mRevive;
+
+ public IXUILabelSymbol mReviveSymbol;
+
+ protected override void Awake()
+ {
+ base.Awake();
+ this.mRankFrame = base.transform.Find("RankFrame").gameObject;
+ this.mRevive = (base.transform.Find("LeftTime/Revive").GetComponent("XUIButton") as IXUIButton);
+ this.mReviveSymbol = (base.transform.Find("LeftTime/Revive/Label").GetComponent("XUILabelSymbol") as IXUILabelSymbol);
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/CrossGVGBattlePrepareBehaviour.cs.meta b/Client/Assets/Scripts/XMainClient/UI/CrossGVGBattlePrepareBehaviour.cs.meta
new file mode 100644
index 00000000..80c45fd3
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/CrossGVGBattlePrepareBehaviour.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: fa14e760ca6fcbd4e9cc3cb6b58b8d9c
+timeCreated: 1611404902
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/CrossGVGBattlePrepareView.cs b/Client/Assets/Scripts/XMainClient/UI/CrossGVGBattlePrepareView.cs
new file mode 100644
index 00000000..b20a12e6
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/CrossGVGBattlePrepareView.cs
@@ -0,0 +1,103 @@
+using System;
+using UILib;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class CrossGVGBattlePrepareView : GVGBattlePrepareBase<CrossGVGBattlePrepareView, CrossGVGBattlePrepareBehaviour>
+ {
+ public override string fileName
+ {
+ get
+ {
+ return "Battle/CrossGVGBattlePrepare";
+ }
+ }
+
+ protected override void OnLoad()
+ {
+ base.OnLoad();
+ base.uiBehaviour.mBluePanel = new CrossGVGBattleMember();
+ base.uiBehaviour.mBluePanel.Setup(base.uiBehaviour.mBlueView, 1);
+ base.uiBehaviour.mRankPanel = new CrossGVGBattleRankFrame();
+ base.uiBehaviour.mRankPanel.Setup(base.uiBehaviour.mRankFrame, 1);
+ base.uiBehaviour.mRevive.RegisterClickEventHandler(new ButtonClickEventHandler(this._OnReviveNotify));
+ }
+
+ public override void ReFreshGroup()
+ {
+ bool flag = !XSingleton<XScene>.singleton.bSpectator && base.uiBehaviour.mRankPanel.IsActive();
+ if (flag)
+ {
+ base.uiBehaviour.mRankPanel.ReFreshData(this._Doc.BlueInfo);
+ }
+ base.ReFreshGroup();
+ }
+
+ protected override void SelectionPattern()
+ {
+ base.uiBehaviour.mCombatScore.SetActive(false);
+ base.uiBehaviour.mBattleDuelInfo.SetVisible(this._Doc.IsGCF());
+ }
+
+ protected override void SectionShowReady()
+ {
+ base.uiBehaviour.mRankPanel.SetActive(false);
+ base.SectionShowReady();
+ }
+
+ protected override void SectionShowBattle()
+ {
+ base.SectionShowBattle();
+ bool flag = !XSingleton<XScene>.singleton.bSpectator && !base.uiBehaviour.mRankPanel.IsActive();
+ if (flag)
+ {
+ base.uiBehaviour.mRankPanel.SetActive(true);
+ }
+ }
+
+ public override void OnUpdate()
+ {
+ base.OnUpdate();
+ bool flag = !XSingleton<XScene>.singleton.bSpectator && base.uiBehaviour.mRankPanel.IsActive();
+ if (flag)
+ {
+ base.uiBehaviour.mRankPanel.OnUpdate();
+ }
+ }
+
+ protected override void OnUnload()
+ {
+ bool flag = base.uiBehaviour.mRankPanel != null;
+ if (flag)
+ {
+ base.uiBehaviour.mRankPanel.Recycle();
+ base.uiBehaviour.mRankPanel = null;
+ }
+ base.OnUnload();
+ }
+
+ protected override void SetupOtherResurgence()
+ {
+ XGuildArenaBattleDocument specificDocument = XDocuments.GetSpecificDocument<XGuildArenaBattleDocument>(XGuildArenaBattleDocument.uuID);
+ bool flag = specificDocument.ReviveItemID > 0u && specificDocument.ReviveItemNumber > 0u;
+ if (flag)
+ {
+ base.uiBehaviour.mRevive.SetVisible(true);
+ string inputText = XLabelSymbolHelper.FormatItemSmallIcon(XStringDefineProxy.GetString("ReviveOntime"), (int)specificDocument.ReviveItemID, (int)specificDocument.ReviveItemNumber);
+ base.uiBehaviour.mReviveSymbol.InputText = inputText;
+ }
+ else
+ {
+ base.uiBehaviour.mRevive.SetVisible(false);
+ }
+ }
+
+ private bool _OnReviveNotify(IXUIButton btn)
+ {
+ XGuildArenaBattleDocument specificDocument = XDocuments.GetSpecificDocument<XGuildArenaBattleDocument>(XGuildArenaBattleDocument.uuID);
+ specificDocument.SendVSPayRevive();
+ return true;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/CrossGVGBattlePrepareView.cs.meta b/Client/Assets/Scripts/XMainClient/UI/CrossGVGBattlePrepareView.cs.meta
new file mode 100644
index 00000000..c24d3c13
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/CrossGVGBattlePrepareView.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 146468024a3ab6b43831724182efb50c
+timeCreated: 1611403257
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/CrossGVGBattleRankFrame.cs b/Client/Assets/Scripts/XMainClient/UI/CrossGVGBattleRankFrame.cs
new file mode 100644
index 00000000..92ac3b1d
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/CrossGVGBattleRankFrame.cs
@@ -0,0 +1,8 @@
+using System;
+
+namespace XMainClient.UI
+{
+ internal class CrossGVGBattleRankFrame : GVGBattleRankFrameBase
+ {
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/CrossGVGBattleRankFrame.cs.meta b/Client/Assets/Scripts/XMainClient/UI/CrossGVGBattleRankFrame.cs.meta
new file mode 100644
index 00000000..d0bfaa64
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/CrossGVGBattleRankFrame.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: f5fefd0eef1ca8148805a07f66d6b958
+timeCreated: 1611404879
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/CrossGVGCombatHandler.cs b/Client/Assets/Scripts/XMainClient/UI/CrossGVGCombatHandler.cs
new file mode 100644
index 00000000..0b207b0e
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/CrossGVGCombatHandler.cs
@@ -0,0 +1,87 @@
+using System;
+using KKSG;
+using UILib;
+
+namespace XMainClient.UI
+{
+ internal class CrossGVGCombatHandler : GVGCombatHandlerBase
+ {
+ protected override string FileName
+ {
+ get
+ {
+ return "Guild/CrossGVG/CrossGVGCombatFrame";
+ }
+ }
+
+ protected override bool InGVGTime
+ {
+ get
+ {
+ return this._doc.TimeStep == CrossGvgTimeState.CGVG_Guess || this._doc.TimeStep == CrossGvgTimeState.CGVG_Knockout || this._doc.TimeStep == CrossGvgTimeState.CGVG_SeasonEnd;
+ }
+ }
+
+ protected override CrossGvgRoomState RoomState
+ {
+ get
+ {
+ return this._doc.RoomState;
+ }
+ }
+
+ protected override bool VisibelEnterBattle
+ {
+ get
+ {
+ return this._doc.VisibleEnterBattle;
+ }
+ }
+
+ protected override bool HasGVGJion
+ {
+ get
+ {
+ return this._doc.HasAvailableJoin;
+ }
+ }
+
+ private XCrossGVGDocument _doc;
+
+ private IXUILabel _SupportLabel;
+
+ private IXUIButton _helpSprite;
+
+ protected override void Init()
+ {
+ base.Init();
+ this._doc = XDocuments.GetSpecificDocument<XCrossGVGDocument>(XCrossGVGDocument.uuID);
+ this.m_helpLabel.SetText(XStringDefineProxy.GetString("CrossGVG_combat_message"));
+ this._SupportLabel = (base.transform.Find("Support").GetComponent("XUILabel") as IXUILabel);
+ this._helpSprite = (base.transform.Find("Title/Help").GetComponent("XUIButton") as IXUIButton);
+ this._helpSprite.SetVisible(false);
+ this.m_showRank.SetVisible(false);
+ }
+
+ protected override void SetupOtherInfo()
+ {
+ this._SupportLabel.SetText(this._doc.ToSupportString());
+ this.m_RegistrationCount.SetText(XStringDefineProxy.GetString("GUILD_ARENA_INDEX", new object[]
+ {
+ this._doc.RegisterationCount
+ }));
+ }
+
+ protected override XGVGCombatGroupData GetCombatGroup(uint roomID)
+ {
+ XGVGCombatGroupData result = null;
+ this._doc.TryGetCombatRoom(roomID, out result);
+ return result;
+ }
+
+ protected override void EnterScene()
+ {
+ this._doc.SendCrossGVGOper(CrossGvgOperType.CGOT_EnterKnockout, 0UL);
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/CrossGVGCombatHandler.cs.meta b/Client/Assets/Scripts/XMainClient/UI/CrossGVGCombatHandler.cs.meta
new file mode 100644
index 00000000..a50c6719
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/CrossGVGCombatHandler.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: ff0444ac33ad852469af0e8ff6870cb9
+timeCreated: 1611404944
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/CrossGVGDuelHandler.cs b/Client/Assets/Scripts/XMainClient/UI/CrossGVGDuelHandler.cs
new file mode 100644
index 00000000..5c8beb9d
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/CrossGVGDuelHandler.cs
@@ -0,0 +1,54 @@
+using System;
+using KKSG;
+using UILib;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class CrossGVGDuelHandler : GVGDuelHandlerBase
+ {
+ protected override string FileName
+ {
+ get
+ {
+ return "Guild/CrossGVG/CrossGVGDuelFrame";
+ }
+ }
+
+ private XCrossGVGDocument _doc;
+
+ protected override void Init()
+ {
+ base.Init();
+ this._doc = XDocuments.GetSpecificDocument<XCrossGVGDocument>(XCrossGVGDocument.uuID);
+ this.m_DuelHelp.SetText(XSingleton<UiUtility>.singleton.ReplaceReturn(XStringDefineProxy.GetString("CrossGVG_duel_message")));
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ this.RefreshData();
+ }
+
+ protected override int GetDuelInfoSize()
+ {
+ return this._doc.GVGDuels.Count;
+ }
+
+ public override void RefreshData()
+ {
+ base.RefreshData();
+ base.ShowOrHide(!this._doc.HasDuelCombat);
+ }
+
+ protected override GVGDuelCombatInfo GetDuelInfo(int index)
+ {
+ return this._doc.GVGDuels[index];
+ }
+
+ protected override void OnEnterScene(IXUISprite sprite)
+ {
+ this._doc.SendCrossGVGOper(CrossGvgOperType.CGOT_EnterPointRace, 0UL);
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/CrossGVGDuelHandler.cs.meta b/Client/Assets/Scripts/XMainClient/UI/CrossGVGDuelHandler.cs.meta
new file mode 100644
index 00000000..740fb266
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/CrossGVGDuelHandler.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 5cd98c4829bff9d47adbe68e9ebb6de7
+timeCreated: 1611403803
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/CrossGVGHallHandle.cs b/Client/Assets/Scripts/XMainClient/UI/CrossGVGHallHandle.cs
new file mode 100644
index 00000000..84910578
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/CrossGVGHallHandle.cs
@@ -0,0 +1,69 @@
+using System;
+using UILib;
+using UnityEngine;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class CrossGVGHallHandle : GVGHallBase
+ {
+ protected override string FileName
+ {
+ get
+ {
+ return "Guild/CrossGVG/CrossGVGHallFrame";
+ }
+ }
+
+ private XCrossGVGDocument _doc;
+
+ protected override void Init()
+ {
+ base.Init();
+ this._doc = XDocuments.GetSpecificDocument<XCrossGVGDocument>(XCrossGVGDocument.uuID);
+ this.SetupRewardList(XSingleton<XGlobalConfig>.singleton.GetAndSeparateValue("CrossGVG_Award", XGlobalConfig.ListSeparator));
+ this.m_HelpText.SetText(XSingleton<UiUtility>.singleton.ReplaceReturn(XStringDefineProxy.GetString("CrossGVG_hall_message")));
+ }
+
+ protected override int GetContentSize()
+ {
+ return this._doc.GVGRanks.Count;
+ }
+
+ protected override void OnItemWrapUpdate(Transform t, int index)
+ {
+ IXUILabel ixuilabel = t.Find("Rank").GetComponent("XUILabel") as IXUILabel;
+ IXUILabelSymbol ixuilabelSymbol = t.Find("GuildName").GetComponent("XUILabelSymbol") as IXUILabelSymbol;
+ IXUILabel ixuilabel2 = t.Find("Score").GetComponent("XUILabel") as IXUILabel;
+ IXUILabelSymbol ixuilabelSymbol2 = t.Find("ServerName").GetComponent("XUILabelSymbol") as IXUILabelSymbol;
+ IXUILabel ixuilabel3 = t.Find("KillNum").GetComponent("XUILabel") as IXUILabel;
+ bool flag = index == -1;
+ if (flag)
+ {
+ ixuilabel.SetText(string.Empty);
+ ixuilabelSymbol.InputText = XStringDefineProxy.GetString("GUILD_ARENA_UNLAYOUT");
+ ixuilabel2.SetText(string.Empty);
+ ixuilabel3.SetText(string.Empty);
+ ixuilabelSymbol2.InputText = string.Empty;
+ }
+ else
+ {
+ XGVGGuildInfo xgvgguildInfo = this._doc.GVGRanks[index];
+ ixuilabel.SetText((index + 1).ToString());
+ ixuilabelSymbol.InputText = xgvgguildInfo.guildName;
+ ixuilabel2.SetText(xgvgguildInfo.score.ToString());
+ ixuilabel3.SetText(xgvgguildInfo.killNum.ToString());
+ ixuilabelSymbol2.InputText = XStringDefineProxy.GetString("CROSS_GVG_GUILDNAME", new object[]
+ {
+ xgvgguildInfo.serverID,
+ ""
+ });
+ bool flag2 = xgvgguildInfo.uid == this.selfGuildID;
+ if (flag2)
+ {
+ this.selfIndex = index;
+ }
+ }
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/CrossGVGHallHandle.cs.meta b/Client/Assets/Scripts/XMainClient/UI/CrossGVGHallHandle.cs.meta
new file mode 100644
index 00000000..3a346c31
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/CrossGVGHallHandle.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 613150806c4752d42813bd82f6cdc5bd
+timeCreated: 1611403837
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/CrossGVGMainView.cs b/Client/Assets/Scripts/XMainClient/UI/CrossGVGMainView.cs
new file mode 100644
index 00000000..c768c2d6
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/CrossGVGMainView.cs
@@ -0,0 +1,225 @@
+using System;
+using System.Collections.Generic;
+using KKSG;
+using UILib;
+using XMainClient.UI.UICommon;
+using XMainClient.Utility;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class CrossGVGMainView : TabDlgBase<CrossGVGMainView>
+ {
+ public override int sysid
+ {
+ get
+ {
+ return XFastEnumIntEqualityComparer<XSysDefine>.ToInt(XSysDefine.XSys_CrossGVG);
+ }
+ }
+
+ public override string fileName
+ {
+ get
+ {
+ return "Guild/CrossGVG/CrossGVGArenaDlg";
+ }
+ }
+
+ public override int layer
+ {
+ get
+ {
+ return 1;
+ }
+ }
+
+ public override int group
+ {
+ get
+ {
+ return 1;
+ }
+ }
+
+ public override bool pushstack
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override bool hideMainMenu
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override bool fullscreenui
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override bool autoload
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ private XCrossGVGDocument _doc;
+
+ private Dictionary<GuildArenaTab, DlgHandlerBase> m_handlers = new Dictionary<GuildArenaTab, DlgHandlerBase>();
+
+ private IXUIButton m_Help;
+
+ private IXUISprite m_maskSprite;
+
+ protected override void Init()
+ {
+ base.Init();
+ this._doc = XDocuments.GetSpecificDocument<XCrossGVGDocument>(XCrossGVGDocument.uuID);
+ this.m_Help = (base.uiBehaviour.m_root.Find("Help").GetComponent("XUIButton") as IXUIButton);
+ this.m_maskSprite = (base.uiBehaviour.m_root.Find("Mask").GetComponent("XUISprite") as IXUISprite);
+ this.RegisterHandler<CrossGVGHallHandle>(GuildArenaTab.Hall);
+ this.RegisterHandler<CrossGVGDuelHandler>(GuildArenaTab.Duel);
+ this.RegisterHandler<CrossGVGCombatHandler>(GuildArenaTab.Combat);
+ }
+
+ private void RegisterHandler<T>(GuildArenaTab index) where T : DlgHandlerBase, new()
+ {
+ bool flag = !this.m_handlers.ContainsKey(index);
+ if (flag)
+ {
+ T t = default(T);
+ t = DlgHandlerBase.EnsureCreate<T>(ref t, base.uiBehaviour.m_root, false, this);
+ this.m_handlers.Add(index, t);
+ }
+ }
+
+ private void RemoveHandler(GuildArenaTab index)
+ {
+ DlgHandlerBase dlgHandlerBase;
+ bool flag = this.m_handlers.TryGetValue(index, out dlgHandlerBase);
+ if (flag)
+ {
+ DlgHandlerBase.EnsureUnload<DlgHandlerBase>(ref dlgHandlerBase);
+ this.m_handlers.Remove(index);
+ }
+ }
+
+ protected override void OnUnload()
+ {
+ this.RemoveHandler(GuildArenaTab.Hall);
+ this.RemoveHandler(GuildArenaTab.Duel);
+ this.RemoveHandler(GuildArenaTab.Combat);
+ base.OnUnload();
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ base.uiBehaviour.m_Close.RegisterClickEventHandler(new ButtonClickEventHandler(this._CloseClickHandle));
+ this.m_Help.RegisterClickEventHandler(new ButtonClickEventHandler(this._OnHelpClick));
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ this.InitTabTableControl();
+ this._doc.SendCrossGVGData();
+ }
+
+ public void SelectTabIndex(GuildArenaTab tab)
+ {
+ bool flag = !base.IsVisible();
+ if (!flag)
+ {
+ ulong num = (ulong)((long)XFastEnumIntEqualityComparer<GuildArenaTab>.ToInt(tab));
+ IXUICheckBox byCheckBoxId = this.m_uiBehaviour.m_tabcontrol.GetByCheckBoxId(num);
+ bool flag2 = byCheckBoxId == null;
+ if (!flag2)
+ {
+ byCheckBoxId.bChecked = true;
+ this._OnTabControlUpdate(num);
+ }
+ }
+ }
+
+ protected override void OnHide()
+ {
+ this.SetHandlerVisible(this._doc.SelectTabIndex, false);
+ this._doc.SendCrossGVGOper(CrossGvgOperType.CGOT_LeaveUI, 0UL);
+ base.OnHide();
+ }
+
+ public void RefreshData()
+ {
+ DlgHandlerBase dlgHandlerBase;
+ bool flag = this.m_handlers.TryGetValue(this._doc.SelectTabIndex, out dlgHandlerBase) && dlgHandlerBase.IsVisible();
+ if (flag)
+ {
+ dlgHandlerBase.RefreshData();
+ }
+ }
+
+ private void InitTabTableControl()
+ {
+ List<int> list = new List<int>
+ {
+ 1,
+ 2,
+ 3
+ };
+ List<string> list2 = new List<string>();
+ int i = 0;
+ int count = list.Count;
+ while (i < count)
+ {
+ list2.Add(string.Format("CrossGVG_Tab{0}", list[i]));
+ i++;
+ }
+ base.uiBehaviour.m_tabcontrol.SetupTabs(list, list2, new XUITabControl.UITabControlCallback(this._OnTabControlUpdate), true, 1f, -1, true);
+ }
+
+ private void SetHandlerVisible(GuildArenaTab handlerID, bool isVisble)
+ {
+ DlgHandlerBase dlgHandlerBase;
+ bool flag = this.m_handlers.TryGetValue(handlerID, out dlgHandlerBase);
+ if (flag)
+ {
+ dlgHandlerBase.SetVisible(isVisble);
+ if (isVisble)
+ {
+ this._doc.SelectTabIndex = handlerID;
+ }
+ }
+ }
+
+ private void _OnTabControlUpdate(ulong handId)
+ {
+ this.SetHandlerVisible(this._doc.SelectTabIndex, false);
+ this.SetHandlerVisible((GuildArenaTab)handId, true);
+ this.m_maskSprite.SetAlpha((this._doc.SelectTabIndex == GuildArenaTab.Hall) ? 0f : 1f);
+ }
+
+ private bool _OnHelpClick(IXUIButton btn)
+ {
+ DlgBase<XCommonHelpTipView, XCommonHelpTipBehaviour>.singleton.ShowHelp(XSysDefine.XSys_CrossGVG);
+ return true;
+ }
+
+ private bool _CloseClickHandle(IXUIButton btn)
+ {
+ this.SetVisibleWithAnimation(false, null);
+ return false;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/CrossGVGMainView.cs.meta b/Client/Assets/Scripts/XMainClient/UI/CrossGVGMainView.cs.meta
new file mode 100644
index 00000000..ac01847b
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/CrossGVGMainView.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: c3d9e949df56a4a4ca783ed4048a84e6
+timeCreated: 1611404499
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/CustomBattle.meta b/Client/Assets/Scripts/XMainClient/UI/CustomBattle.meta
new file mode 100644
index 00000000..25c7a3ad
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/CustomBattle.meta
@@ -0,0 +1,9 @@
+fileFormatVersion: 2
+guid: b83f49e51d735044dbfa71e3c6bae357
+folderAsset: yes
+timeCreated: 1611402943
+licenseType: Free
+DefaultImporter:
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/CustomBattle/CustomBattleBountyModeDetailHandler.cs b/Client/Assets/Scripts/XMainClient/UI/CustomBattle/CustomBattleBountyModeDetailHandler.cs
new file mode 100644
index 00000000..600b3432
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/CustomBattle/CustomBattleBountyModeDetailHandler.cs
@@ -0,0 +1,255 @@
+using System;
+using KKSG;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI.CustomBattle
+{
+ internal class CustomBattleBountyModeDetailHandler : DlgHandlerBase
+ {
+ protected override string FileName
+ {
+ get
+ {
+ return "GameSystem/CustomBattle/BountyModeDetailFrame";
+ }
+ }
+
+ private XCustomBattleDocument _doc = null;
+
+ private IXUISprite _close;
+
+ private IXUILabel _title;
+
+ private IXUILabel _win_count;
+
+ private IXUISprite[] _fail_flag = new IXUISprite[3];
+
+ private IXUISlider _slider;
+
+ private IXUILabel _slider_count;
+
+ private Transform _reward_frame;
+
+ private IXUILabelSymbol _current_reward1;
+
+ private IXUILabelSymbol _current_reward2;
+
+ private IXUILabelSymbol _next_reward1;
+
+ private IXUILabelSymbol _next_reward2;
+
+ private IXUIButton _giveup;
+
+ private IXUIButton _start;
+
+ private IXUISprite _box;
+
+ private IXUILabel _box_time;
+
+ private IXUISprite _game_icon;
+
+ private XLeftTimeCounter _boxCD;
+
+ private IXUILabel _canfetch;
+
+ private Transform _fx_point;
+
+ private XFx _fx = null;
+
+ protected override void Init()
+ {
+ base.Init();
+ this._doc = XDocuments.GetSpecificDocument<XCustomBattleDocument>(XCustomBattleDocument.uuID);
+ this._close = (base.transform.Find("Bg/Close").GetComponent("XUISprite") as IXUISprite);
+ this._title = (base.transform.Find("Bg/Title").GetComponent("XUILabel") as IXUILabel);
+ this._win_count = (base.transform.Find("Bg/Left/Win/Count").GetComponent("XUILabel") as IXUILabel);
+ for (int i = 0; i < 3; i++)
+ {
+ this._fail_flag[i] = (base.transform.Find(string.Format("Bg/Left/Fail/Fail{0}/Flag", i)).GetComponent("XUISprite") as IXUISprite);
+ }
+ this._slider = (base.transform.Find("Bg/Left/Slider").GetComponent("XUISlider") as IXUISlider);
+ this._slider_count = (base.transform.Find("Bg/Left/Slider/Count").GetComponent("XUILabel") as IXUILabel);
+ this._reward_frame = base.transform.Find("Bg/Left/RewardTip");
+ this._current_reward1 = (base.transform.Find("Bg/Left/RewardTip/Current/Reward1").GetComponent("XUILabelSymbol") as IXUILabelSymbol);
+ this._current_reward2 = (base.transform.Find("Bg/Left/RewardTip/Current/Reward2").GetComponent("XUILabelSymbol") as IXUILabelSymbol);
+ this._next_reward1 = (base.transform.Find("Bg/Left/RewardTip/Next/Reward1").GetComponent("XUILabelSymbol") as IXUILabelSymbol);
+ this._next_reward2 = (base.transform.Find("Bg/Left/RewardTip/Next/Reward2").GetComponent("XUILabelSymbol") as IXUILabelSymbol);
+ this._giveup = (base.transform.Find("Bg/Right/BtnGiveup").GetComponent("XUIButton") as IXUIButton);
+ this._start = (base.transform.Find("Bg/Right/BtnStart").GetComponent("XUIButton") as IXUIButton);
+ this._box = (base.transform.Find("Bg/Right/Box").GetComponent("XUISprite") as IXUISprite);
+ this._box_time = (base.transform.Find("Bg/Right/Box/Time").GetComponent("XUILabel") as IXUILabel);
+ this._canfetch = (base.transform.Find("Bg/Right/Box/CanFetch").GetComponent("XUILabel") as IXUILabel);
+ this._fx_point = base.transform.Find("Bg/Right/Box/Fx");
+ this._game_icon = (base.transform.Find("Bg/Right/GameIcon").GetComponent("XUISprite") as IXUISprite);
+ this._boxCD = new XLeftTimeCounter(this._box_time, true);
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ this._close.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnCloseClicked));
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ this.RefreshData();
+ }
+
+ protected override void OnHide()
+ {
+ this._doc.DestoryFx(this._fx);
+ this._fx = null;
+ base.OnHide();
+ }
+
+ public override void OnUnload()
+ {
+ this._doc.DestoryFx(this._fx);
+ this._fx = null;
+ base.OnUnload();
+ }
+
+ public override void RefreshData()
+ {
+ base.RefreshData();
+ this._title.SetText(this._doc.CurrentBountyData.gameName);
+ this._win_count.SetText(this._doc.CurrentBountyData.winCount.ToString());
+ for (int i = 0; i < 3; i++)
+ {
+ this._fail_flag[i].SetAlpha((float)(((long)i < (long)((ulong)this._doc.CurrentBountyData.loseCount)) ? 1 : 0));
+ }
+ this._slider.Value = this._doc.CurrentBountyData.winPrecent;
+ this._slider_count.SetText(this._doc.CurrentBountyData.winText);
+ SeqListRef<uint> systemBattleReward = this._doc.GetSystemBattleReward((uint)this._doc.CurrentBountyData.gameID, this._doc.CurrentBountyData.winCount);
+ this._current_reward1.InputText = "";
+ this._current_reward2.InputText = "";
+ bool flag = systemBattleReward.Count > 0;
+ if (flag)
+ {
+ this._current_reward1.InputText = XLabelSymbolHelper.FormatSmallIcon((int)systemBattleReward[0, 0]) + " " + systemBattleReward[0, 1].ToString();
+ }
+ bool flag2 = systemBattleReward.Count > 1;
+ if (flag2)
+ {
+ this._current_reward2.InputText = XLabelSymbolHelper.FormatSmallIcon((int)systemBattleReward[1, 0]) + " " + systemBattleReward[1, 1].ToString();
+ }
+ SeqListRef<uint> systemBattleReward2 = this._doc.GetSystemBattleReward((uint)this._doc.CurrentBountyData.gameID, this._doc.CurrentBountyData.winCount + 1u);
+ this._next_reward1.InputText = "";
+ this._next_reward2.InputText = "";
+ bool flag3 = systemBattleReward2.Count > 0;
+ if (flag3)
+ {
+ this._next_reward1.InputText = XLabelSymbolHelper.FormatSmallIcon((int)systemBattleReward2[0, 0]) + " " + systemBattleReward2[0, 1].ToString();
+ }
+ else
+ {
+ this._next_reward1.InputText = XSingleton<XStringTable>.singleton.GetString("MaxRewardTip");
+ }
+ bool flag4 = systemBattleReward2.Count > 1;
+ if (flag4)
+ {
+ this._next_reward2.InputText = XLabelSymbolHelper.FormatSmallIcon((int)systemBattleReward2[1, 0]) + " " + systemBattleReward2[1, 1].ToString();
+ }
+ this._doc.DestoryFx(this._fx);
+ this._fx = null;
+ switch (this._doc.CurrentBountyData.status)
+ {
+ case CustomBattleRoleState.CustomBattle_RoleState_Join:
+ this._giveup.SetVisible(true);
+ this._start.SetVisible(true);
+ this._box.SetVisible(false);
+ this._reward_frame.gameObject.SetActive(true);
+ this._giveup.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnGiveUpButtonClicked));
+ this._start.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnStartButtonClicked));
+ break;
+ case CustomBattleRoleState.CustomBattle_RoleState_Reward:
+ {
+ this._giveup.SetVisible(false);
+ this._start.SetVisible(false);
+ this._box.SetVisible(true);
+ this._boxCD.SetLeftTime(this._doc.CurrentBountyData.boxLeftTime, -1);
+ this._reward_frame.gameObject.SetActive(false);
+ this._canfetch.gameObject.SetActive(this._doc.CurrentBountyData.boxLeftTime <= 0u);
+ bool flag5 = this._doc.CurrentBountyData.boxLeftTime <= 0u;
+ if (flag5)
+ {
+ this._fx = XSingleton<XFxMgr>.singleton.CreateUIFx("Effects/FX_Particle/UIfx/UI_BountyModeListFrame_Clip01", this._fx_point, false);
+ }
+ this._box.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnBoxClicked));
+ break;
+ }
+ case CustomBattleRoleState.Custombattle_RoleState_Taken:
+ this._giveup.SetVisible(false);
+ this._start.SetVisible(false);
+ this._box.SetVisible(false);
+ this._reward_frame.gameObject.SetActive(false);
+ break;
+ default:
+ this._giveup.SetVisible(false);
+ this._start.SetVisible(false);
+ this._box.SetVisible(false);
+ this._reward_frame.gameObject.SetActive(false);
+ break;
+ }
+ CustomBattleSystemTable.RowData systemBattleData = this._doc.GetSystemBattleData((uint)this._doc.CurrentBountyData.gameID);
+ bool flag6 = systemBattleData != null;
+ if (flag6)
+ {
+ this._game_icon.SetSprite(systemBattleData.IconSpritePath);
+ }
+ }
+
+ private void OnCloseClicked(IXUISprite sp)
+ {
+ base.SetVisible(false);
+ }
+
+ private bool OnGiveUpButtonClicked(IXUIButton button)
+ {
+ XSingleton<UiUtility>.singleton.ShowModalDialog(XStringDefineProxy.GetString("UnJoinBountyModeTip"), XStringDefineProxy.GetString("COMMON_OK"), XStringDefineProxy.GetString("COMMON_CANCEL"), new ButtonClickEventHandler(this.OnUnJoinOkClicked));
+ return true;
+ }
+
+ private bool OnUnJoinOkClicked(IXUIButton button)
+ {
+ DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.SetVisible(false, true);
+ this._doc.SendCustomBattleDrop(this._doc.CurrentBountyData.gameID);
+ return true;
+ }
+
+ private bool OnStartButtonClicked(IXUIButton button)
+ {
+ bool flag = this._doc.CurrentBountyData.expID == 0;
+ if (flag)
+ {
+ bool flag2 = XTeamDocument.GoSingleBattleBeforeNeed(new ButtonClickEventHandler(this.OnStartButtonClicked), button);
+ if (flag2)
+ {
+ return true;
+ }
+ this._doc.SendCustomBattleMatch(this._doc.CurrentBountyData.gameID);
+ }
+ else
+ {
+ XTeamDocument specificDocument = XDocuments.GetSpecificDocument<XTeamDocument>(XTeamDocument.uuID);
+ specificDocument.SetAndMatch(this._doc.CurrentBountyData.expID);
+ }
+ return true;
+ }
+
+ private void OnBoxClicked(IXUISprite sp)
+ {
+ DlgBase<CustomBattleView, TabDlgBehaviour>.singleton.ShowChestHandler();
+ }
+
+ public override void OnUpdate()
+ {
+ base.OnUpdate();
+ this._boxCD.Update();
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/CustomBattle/CustomBattleBountyModeDetailHandler.cs.meta b/Client/Assets/Scripts/XMainClient/UI/CustomBattle/CustomBattleBountyModeDetailHandler.cs.meta
new file mode 100644
index 00000000..b306da17
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/CustomBattle/CustomBattleBountyModeDetailHandler.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 12230a71528ce9343b0236446ac84acc
+timeCreated: 1611403241
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/CustomBattle/CustomBattleBountyModeListHandler.cs b/Client/Assets/Scripts/XMainClient/UI/CustomBattle/CustomBattleBountyModeListHandler.cs
new file mode 100644
index 00000000..08e5a53c
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/CustomBattle/CustomBattleBountyModeListHandler.cs
@@ -0,0 +1,297 @@
+using System;
+using System.Collections.Generic;
+using KKSG;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI.CustomBattle
+{
+ internal class CustomBattleBountyModeListHandler : DlgHandlerBase
+ {
+ protected override string FileName
+ {
+ get
+ {
+ return "GameSystem/CustomBattle/BountyModeListFrame";
+ }
+ }
+
+ private XCustomBattleDocument _doc = null;
+
+ private IXUILabel _tip;
+
+ private IXUIScrollView _scroll_view;
+
+ private IXUIWrapContent _wrap_content;
+
+ private Dictionary<Transform, XLeftTimeCounter> timers = new Dictionary<Transform, XLeftTimeCounter>();
+
+ private ulong _cache_gameid = 0UL;
+
+ private Dictionary<Transform, XFx> _fx_list = new Dictionary<Transform, XFx>();
+
+ private Vector3 _fx_scale = new Vector3(0.7f, 0.7f);
+
+ protected override void Init()
+ {
+ base.Init();
+ this.timers.Clear();
+ this._doc = XDocuments.GetSpecificDocument<XCustomBattleDocument>(XCustomBattleDocument.uuID);
+ this._tip = (base.transform.Find("Bg/Tip").GetComponent("XUILabel") as IXUILabel);
+ this._tip.SetText(XSingleton<XStringTable>.singleton.GetString("BountyModeGameTip"));
+ this._scroll_view = (base.transform.Find("Bg/Panel").GetComponent("XUIScrollView") as IXUIScrollView);
+ this._wrap_content = (base.transform.Find("Bg/Panel/List").GetComponent("XUIWrapContent") as IXUIWrapContent);
+ this._wrap_content.RegisterItemUpdateEventHandler(new WrapItemUpdateEventHandler(this.WrapContentUpdated));
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ this._doc.SendCustomBattleQueryBountyMode();
+ }
+
+ protected override void OnHide()
+ {
+ this.DestoryAllFx();
+ base.OnHide();
+ }
+
+ public override void OnUnload()
+ {
+ this.DestoryAllFx();
+ base.OnUnload();
+ }
+
+ private void DestoryAllFx()
+ {
+ foreach (KeyValuePair<Transform, XFx> keyValuePair in this._fx_list)
+ {
+ this._doc.DestoryFx(keyValuePair.Value);
+ }
+ this._fx_list.Clear();
+ }
+
+ public override void RefreshData()
+ {
+ base.RefreshData();
+ this._wrap_content.SetContentCount(this._doc.BountyList.Count, false);
+ this._scroll_view.ResetPosition();
+ }
+
+ private void WrapContentUpdated(Transform t, int index)
+ {
+ bool flag = index < 0 || index >= this._doc.BountyList.Count;
+ if (flag)
+ {
+ t.gameObject.SetActive(false);
+ }
+ else
+ {
+ this.SetupBounty(t, index);
+ }
+ }
+
+ private void SetupBounty(Transform t, int index)
+ {
+ Transform transform = t.Find("Box");
+ Transform transform2 = t.Find("BtnEnter");
+ Transform transform3 = t.Find("Course");
+ IXUILabel ixuilabel = t.Find("Course/win/Count").GetComponent("XUILabel") as IXUILabel;
+ IXUISprite[] array = new IXUISprite[3];
+ for (int i = 0; i < 3; i++)
+ {
+ array[i] = (t.Find(string.Format("Course/fail/Flag{0}/Flag", i)).GetComponent("XUISprite") as IXUISprite);
+ }
+ Transform transform4 = t.Find("Lock");
+ IXUILabel ixuilabel2 = t.Find("Lock/Label").GetComponent("XUILabel") as IXUILabel;
+ IXUISprite ixuisprite = t.GetComponent("XUISprite") as IXUISprite;
+ IXUILabel ixuilabel3 = t.Find("Game/name").GetComponent("XUILabel") as IXUILabel;
+ IXUILabelSymbol ixuilabelSymbol = t.Find("Reward1").GetComponent("XUILabelSymbol") as IXUILabelSymbol;
+ IXUILabelSymbol ixuilabelSymbol2 = t.Find("Reward2").GetComponent("XUILabelSymbol") as IXUILabelSymbol;
+ IXUIButton ixuibutton = t.Find("BtnEnter").GetComponent("XUIButton") as IXUIButton;
+ IXUILabelSymbol ixuilabelSymbol3 = t.Find("BtnEnter/Label").GetComponent("XUILabelSymbol") as IXUILabelSymbol;
+ IXUISprite ixuisprite2 = t.Find("Game/Helpicon").GetComponent("XUISprite") as IXUISprite;
+ Transform parent = t.Find("Box/Fx");
+ IXUISprite ixuisprite3 = t.Find("Icon").GetComponent("XUISprite") as IXUISprite;
+ IXUISprite ixuisprite4 = t.Find("Game/NameIcon").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.ID = (ulong)index;
+ ixuibutton.ID = (ulong)index;
+ ixuisprite2.ID = (ulong)this._doc.BountyList[index].gameType;
+ ixuisprite2.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnHelpClicked));
+ ixuilabel3.SetText(this._doc.BountyList[index].gameName);
+ SeqListRef<uint> systemBattleReward = this._doc.GetSystemBattleReward((uint)this._doc.BountyList[index].gameID, this._doc.BountyList[index].winMax);
+ ixuilabelSymbol.InputText = "";
+ ixuilabelSymbol2.InputText = "";
+ bool flag = systemBattleReward.Count > 0;
+ if (flag)
+ {
+ ixuilabelSymbol.InputText = XLabelSymbolHelper.FormatSmallIcon((int)systemBattleReward[0, 0]) + " " + systemBattleReward[0, 1].ToString();
+ }
+ bool flag2 = systemBattleReward.Count > 1;
+ if (flag2)
+ {
+ ixuilabelSymbol2.InputText = XLabelSymbolHelper.FormatSmallIcon((int)systemBattleReward[1, 0]) + " " + systemBattleReward[1, 1].ToString();
+ }
+ IXUILabel ixuilabel4 = t.Find("Box/CanFetch").GetComponent("XUILabel") as IXUILabel;
+ bool flag3 = !this.timers.ContainsKey(t);
+ if (flag3)
+ {
+ IXUILabel label = t.Find("Box/Time").GetComponent("XUILabel") as IXUILabel;
+ this.timers.Add(t, new XLeftTimeCounter(label, true));
+ }
+ bool flag4 = this._fx_list.ContainsKey(t);
+ if (flag4)
+ {
+ this._doc.DestoryFx(this._fx_list[t]);
+ this._fx_list[t] = null;
+ }
+ XLeftTimeCounter xleftTimeCounter = this.timers[t];
+ bool flag5 = this._doc.BountyList[index].boxLeftTime > 0u;
+ if (flag5)
+ {
+ xleftTimeCounter.SetLeftTime(this._doc.BountyList[index].boxLeftTime, -1);
+ ixuilabel4.gameObject.SetActive(false);
+ }
+ else
+ {
+ xleftTimeCounter.SetLeftTime(0f, -1);
+ ixuilabel4.gameObject.SetActive(true);
+ this._fx_list[t] = XSingleton<XFxMgr>.singleton.CreateUIFx("Effects/FX_Particle/UIfx/UI_BountyModeListFrame_Clip01", parent, this._fx_scale, false);
+ }
+ switch (this._doc.BountyList[index].status)
+ {
+ case CustomBattleRoleState.CustomBattle_RoleState_Ready:
+ transform.gameObject.SetActive(false);
+ transform2.gameObject.SetActive(true);
+ transform3.gameObject.SetActive(false);
+ transform4.gameObject.SetActive(false);
+ ixuisprite.RegisterSpriteClickEventHandler(null);
+ ixuibutton.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnJoinClicked));
+ ixuilabelSymbol3.InputText = XLabelSymbolHelper.FormatSmallIcon((int)this._doc.BountyList[index].ticket.itemID) + " " + this._doc.BountyList[index].ticket.itemCount.ToString();
+ break;
+ case CustomBattleRoleState.CustomBattle_RoleState_Join:
+ transform.gameObject.SetActive(false);
+ transform2.gameObject.SetActive(false);
+ transform3.gameObject.SetActive(true);
+ transform4.gameObject.SetActive(false);
+ ixuilabel.SetText(this._doc.BountyList[index].winCount.ToString());
+ for (int j = 0; j < 3; j++)
+ {
+ array[j].SetAlpha((float)(((long)j < (long)((ulong)this._doc.BountyList[index].loseCount)) ? 1 : 0));
+ }
+ ixuisprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnEnterDetailClicked));
+ ixuibutton.RegisterClickEventHandler(null);
+ break;
+ case CustomBattleRoleState.CustomBattle_RoleState_Reward:
+ transform.gameObject.SetActive(true);
+ transform2.gameObject.SetActive(false);
+ transform3.gameObject.SetActive(false);
+ transform4.gameObject.SetActive(false);
+ ixuisprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnEnterDetailClicked));
+ ixuibutton.RegisterClickEventHandler(null);
+ break;
+ case CustomBattleRoleState.Custombattle_RoleState_Taken:
+ transform.gameObject.SetActive(true);
+ transform2.gameObject.SetActive(false);
+ transform3.gameObject.SetActive(false);
+ transform4.gameObject.SetActive(false);
+ ixuisprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnEnterDetailClicked));
+ ixuibutton.RegisterClickEventHandler(null);
+ break;
+ default:
+ transform.gameObject.SetActive(false);
+ transform2.gameObject.SetActive(false);
+ transform3.gameObject.SetActive(false);
+ transform4.gameObject.SetActive(false);
+ break;
+ }
+ CustomBattleSystemTable.RowData systemBattleData = this._doc.GetSystemBattleData((uint)this._doc.BountyList[index].gameID);
+ bool flag6 = systemBattleData != null;
+ if (flag6)
+ {
+ bool flag7 = systemBattleData.levellimit > XSingleton<XAttributeMgr>.singleton.XPlayerData.Level;
+ if (flag7)
+ {
+ transform.gameObject.SetActive(false);
+ transform2.gameObject.SetActive(false);
+ transform3.gameObject.SetActive(false);
+ transform4.gameObject.SetActive(true);
+ ixuilabel2.SetText(XStringDefineProxy.GetString("LEVEL_REQUIRE_LEVEL", new object[]
+ {
+ systemBattleData.levellimit
+ }));
+ ixuisprite.RegisterSpriteClickEventHandler(null);
+ ixuibutton.RegisterClickEventHandler(null);
+ }
+ ixuisprite3.SetSprite(systemBattleData.IconSpritePath);
+ ixuisprite4.SetSprite(systemBattleData.TitleSpriteName);
+ }
+ }
+
+ private void OnEnterDetailClicked(IXUISprite sp)
+ {
+ this.ShowDetailByIndex((int)sp.ID);
+ }
+
+ public void ShowDetailByIndex(int index)
+ {
+ bool flag = index >= this._doc.BountyList.Count;
+ if (!flag)
+ {
+ this._doc.CurrentBountyData = this._doc.BountyList[index];
+ DlgBase<CustomBattleView, TabDlgBehaviour>.singleton.ShowBountyModeDetailHandler();
+ }
+ }
+
+ private void OnHelpClicked(IXUISprite sp)
+ {
+ CustomBattleTypeTable.RowData customBattleTypeData = this._doc.GetCustomBattleTypeData((int)sp.ID);
+ string title = (customBattleTypeData != null) ? customBattleTypeData.name : "";
+ string @string = XSingleton<XStringTable>.singleton.GetString(string.Format("CustomTypeTip_{0}", sp.ID));
+ DlgBase<XCommonHelpTipView, XCommonHelpTipBehaviour>.singleton.ShowHelp(title, @string);
+ }
+
+ private bool OnJoinClicked(IXUIButton button)
+ {
+ bool flag = (int)button.ID >= this._doc.BountyList.Count;
+ bool result;
+ if (flag)
+ {
+ result = false;
+ }
+ else
+ {
+ XSingleton<UiUtility>.singleton.ShowModalDialog(XStringDefineProxy.GetString("JoinBountyCost", new object[]
+ {
+ XLabelSymbolHelper.FormatSmallIcon((int)this._doc.BountyList[(int)button.ID].ticket.itemID) + " " + this._doc.BountyList[(int)button.ID].ticket.itemCount.ToString()
+ }), XStringDefineProxy.GetString("COMMON_OK"), XStringDefineProxy.GetString("COMMON_CANCEL"), new ButtonClickEventHandler(this.OnJoinOkClicked));
+ this._cache_gameid = this._doc.BountyList[(int)button.ID].gameID;
+ result = true;
+ }
+ return result;
+ }
+
+ private bool OnJoinOkClicked(IXUIButton button)
+ {
+ this._doc.SendCustomBattleJoin(this._cache_gameid, false, "");
+ this._cache_gameid = 0UL;
+ DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.SetVisible(false, true);
+ return true;
+ }
+
+ public override void OnUpdate()
+ {
+ base.OnUpdate();
+ foreach (KeyValuePair<Transform, XLeftTimeCounter> keyValuePair in this.timers)
+ {
+ bool activeInHierarchy = keyValuePair.Key.gameObject.activeInHierarchy;
+ if (activeInHierarchy)
+ {
+ keyValuePair.Value.Update();
+ }
+ }
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/CustomBattle/CustomBattleBountyModeListHandler.cs.meta b/Client/Assets/Scripts/XMainClient/UI/CustomBattle/CustomBattleBountyModeListHandler.cs.meta
new file mode 100644
index 00000000..67219963
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/CustomBattle/CustomBattleBountyModeListHandler.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: df292cafa66e9df45827f16016456515
+timeCreated: 1611404691
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/CustomBattle/CustomBattleBriefHandler.cs b/Client/Assets/Scripts/XMainClient/UI/CustomBattle/CustomBattleBriefHandler.cs
new file mode 100644
index 00000000..d4995594
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/CustomBattle/CustomBattleBriefHandler.cs
@@ -0,0 +1,172 @@
+using System;
+using KKSG;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI.CustomBattle
+{
+ internal class CustomBattleBriefHandler : DlgHandlerBase
+ {
+ protected override string FileName
+ {
+ get
+ {
+ return "GameSystem/CustomBattle/CustomModeBriefFrame";
+ }
+ }
+
+ private XCustomBattleDocument _doc = null;
+
+ private IXUISprite _close;
+
+ private IXUILabel _name;
+
+ private IXUILabel _type;
+
+ private IXUILabel _creater;
+
+ private Transform _slider;
+
+ private IXUILabel _left_time;
+
+ private IXUILabel _left_time_tip;
+
+ private IXUILabel _size;
+
+ private IXUILabel _length;
+
+ private IXUILabel _limit;
+
+ private IXUILabel _id;
+
+ private IXUIButton _start;
+
+ private IXUIButton _edit;
+
+ private XLeftTimeCounter _lefttime_counter;
+
+ protected override void Init()
+ {
+ base.Init();
+ this._doc = XDocuments.GetSpecificDocument<XCustomBattleDocument>(XCustomBattleDocument.uuID);
+ this._close = (base.transform.Find("Bg/Close").GetComponent("XUISprite") as IXUISprite);
+ this._name = (base.transform.Find("Bg/Name").GetComponent("XUILabel") as IXUILabel);
+ this._type = (base.transform.Find("Bg/Type").GetComponent("XUILabel") as IXUILabel);
+ this._creater = (base.transform.Find("Bg/Creater").GetComponent("XUILabel") as IXUILabel);
+ this._slider = base.transform.Find("Bg/Slider");
+ this._left_time = (base.transform.Find("Bg/Slider/Time").GetComponent("XUILabel") as IXUILabel);
+ this._left_time_tip = (base.transform.Find("Bg/Slider/Time/Tip").GetComponent("XUILabel") as IXUILabel);
+ this._lefttime_counter = new XLeftTimeCounter(this._left_time, false);
+ this._size = (base.transform.Find("Bg/Size").GetComponent("XUILabel") as IXUILabel);
+ this._length = (base.transform.Find("Bg/Length").GetComponent("XUILabel") as IXUILabel);
+ this._limit = (base.transform.Find("Bg/Limit").GetComponent("XUILabel") as IXUILabel);
+ this._id = (base.transform.Find("Bg/ID").GetComponent("XUILabel") as IXUILabel);
+ this._start = (base.transform.Find("Bg/Start").GetComponent("XUIButton") as IXUIButton);
+ this._edit = (base.transform.Find("Bg/Edit").GetComponent("XUIButton") as IXUIButton);
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ this._close.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnCloseClicked));
+ this._start.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnStartButtonClicked));
+ this._edit.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnEditButtonClicked));
+ }
+
+ private void OnCloseClicked(IXUISprite sp)
+ {
+ base.SetVisible(false);
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ this.RefreshData();
+ }
+
+ public override void RefreshData()
+ {
+ base.RefreshData();
+ bool flag = this._doc.CurrentCustomData == null;
+ if (flag)
+ {
+ base.SetVisible(false);
+ }
+ else
+ {
+ CustomBattleTable.RowData customBattleData = this._doc.GetCustomBattleData(this._doc.CurrentCustomData.configID);
+ this._type.SetText(customBattleData.desc);
+ this._name.SetText(this._doc.CurrentCustomData.gameName);
+ this._id.SetText(this._doc.CurrentCustomData.token);
+ this._creater.SetText(this._doc.CurrentCustomData.gameCreator);
+ this._size.SetText(this._doc.CurrentCustomData.joinText);
+ this._length.SetText(XSingleton<UiUtility>.singleton.TimeAccFormatString((int)this._doc.CurrentCustomData.gameLength, 4, 0));
+ uint num = 1u << XFastEnumIntEqualityComparer<CustomBattleScale>.ToInt(CustomBattleScale.CustomBattle_Scale_Friend);
+ bool flag2 = (this._doc.CurrentCustomData.gameMask & num) == num;
+ num = 1u << XFastEnumIntEqualityComparer<CustomBattleScale>.ToInt(CustomBattleScale.CustomBattle_Scale_Guild);
+ bool flag3 = (this._doc.CurrentCustomData.gameMask & num) == num;
+ string text = "";
+ bool flag4 = flag2;
+ if (flag4)
+ {
+ text += XSingleton<XStringTable>.singleton.GetString("FriendOnlyJoin");
+ }
+ bool flag5 = flag3;
+ if (flag5)
+ {
+ text = text + ((text == "") ? "" : ",") + XSingleton<XStringTable>.singleton.GetString("GuildOnlyJoin");
+ }
+ bool flag6 = text == "";
+ if (flag6)
+ {
+ text = XSingleton<XStringTable>.singleton.GetString("AllJoin");
+ }
+ this._limit.SetText(text);
+ this._start.SetEnable(this._doc.CurrentCustomData.creatorID == XSingleton<XAttributeMgr>.singleton.XPlayerData.RoleID, false);
+ this._edit.SetEnable(this._doc.CurrentCustomData.creatorID == XSingleton<XAttributeMgr>.singleton.XPlayerData.RoleID, false);
+ switch (this._doc.CurrentCustomData.gameStatus)
+ {
+ case CustomBattleState.CustomBattle_Ready:
+ this._left_time_tip.SetText(XSingleton<XStringTable>.singleton.GetString("WaitForStart"));
+ this._lefttime_counter.SetLeftTime(this._doc.CurrentCustomData.gameStartLeftTime, -1);
+ break;
+ case CustomBattleState.CustomBattle_Going:
+ this._left_time_tip.SetText(XSingleton<XStringTable>.singleton.GetString("WaitForEnd"));
+ this._lefttime_counter.SetLeftTime(this._doc.CurrentCustomData.gameEndLeftTime, -1);
+ this._start.SetEnable(false, false);
+ break;
+ case CustomBattleState.CustomBattle_End:
+ this._left_time_tip.SetText(XSingleton<XStringTable>.singleton.GetString("WaitForEnd"));
+ this._lefttime_counter.SetLeftTime(this._doc.CurrentCustomData.gameEndLeftTime, -1);
+ this._start.SetEnable(false, false);
+ break;
+ case CustomBattleState.CustomBattle_Destory:
+ this._left_time_tip.SetText(XSingleton<XStringTable>.singleton.GetString("WaitForEnd"));
+ this._lefttime_counter.SetLeftTime(this._doc.CurrentCustomData.gameEndLeftTime, -1);
+ this._start.SetEnable(false, false);
+ break;
+ }
+ }
+ }
+
+ private bool OnStartButtonClicked(IXUIButton button)
+ {
+ this._doc.SendCustomBattleStartNow(this._doc.CurrentCustomData.gameID);
+ return true;
+ }
+
+ private bool OnEditButtonClicked(IXUIButton button)
+ {
+ DlgBase<CustomBattleView, TabDlgBehaviour>.singleton.ShowPasswordSettingHandler();
+ return true;
+ }
+
+ public override void OnUpdate()
+ {
+ base.OnUpdate();
+ this._lefttime_counter.Update();
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/CustomBattle/CustomBattleBriefHandler.cs.meta b/Client/Assets/Scripts/XMainClient/UI/CustomBattle/CustomBattleBriefHandler.cs.meta
new file mode 100644
index 00000000..e4ef50a4
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/CustomBattle/CustomBattleBriefHandler.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: e36a3045d0e5e2b4c885f6bb1a2d957c
+timeCreated: 1611404732
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/CustomBattle/CustomBattleChestHandler.cs b/Client/Assets/Scripts/XMainClient/UI/CustomBattle/CustomBattleChestHandler.cs
new file mode 100644
index 00000000..22b9569b
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/CustomBattle/CustomBattleChestHandler.cs
@@ -0,0 +1,213 @@
+using System;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI.CustomBattle
+{
+ internal class CustomBattleChestHandler : DlgHandlerBase
+ {
+ protected override string FileName
+ {
+ get
+ {
+ return "GameSystem/CustomBattle/ChestFrame";
+ }
+ }
+
+ private XCustomBattleDocument _doc = null;
+
+ private IXUISprite _close;
+
+ private XUIPool _item_pool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ private IXUIButton _fetch_btn;
+
+ private Transform _wait_open_frame;
+
+ private IXUIButton _open_now;
+
+ private IXUILabel _left_time;
+
+ private IXUILabelSymbol _cost;
+
+ private XLeftTimeCounter _boxCD;
+
+ private Transform _fx_point;
+
+ private XFx _fx = null;
+
+ protected override void Init()
+ {
+ base.Init();
+ this._doc = XDocuments.GetSpecificDocument<XCustomBattleDocument>(XCustomBattleDocument.uuID);
+ this._close = (base.transform.Find("Close").GetComponent("XUISprite") as IXUISprite);
+ Transform transform = base.transform.Find("List/Item");
+ this._item_pool.SetupPool(transform.parent.gameObject, transform.gameObject, 4u, false);
+ this._fetch_btn = (base.transform.Find("FetchBtn").GetComponent("XUIButton") as IXUIButton);
+ this._wait_open_frame = base.transform.Find("WaitFrame");
+ this._open_now = (base.transform.Find("WaitFrame/OpenBtn").GetComponent("XUIButton") as IXUIButton);
+ this._left_time = (base.transform.Find("WaitFrame/Time").GetComponent("XUILabel") as IXUILabel);
+ this._boxCD = new XLeftTimeCounter(this._left_time, false);
+ this._cost = (base.transform.Find("WaitFrame/OpenBtn/Cost").GetComponent("XUILabelSymbol") as IXUILabelSymbol);
+ this._fx_point = base.transform.Find("Title/Box/Fx");
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ this._close.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnCloseClicked));
+ this._fetch_btn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnFetchButtonClicked));
+ this._open_now.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnOpenNowButtonClicked));
+ }
+
+ protected override void OnHide()
+ {
+ this._doc.DestoryFx(this._fx);
+ this._fx = null;
+ base.OnHide();
+ }
+
+ public override void OnUnload()
+ {
+ this._doc.DestoryFx(this._fx);
+ this._fx = null;
+ base.OnUnload();
+ }
+
+ private void OnCloseClicked(IXUISprite sp)
+ {
+ base.SetVisible(false);
+ }
+
+ private bool OnFetchButtonClicked(IXUIButton button)
+ {
+ bool flag = DlgBase<CustomBattleView, TabDlgBehaviour>.singleton._BountyModeDetailHandler != null && DlgBase<CustomBattleView, TabDlgBehaviour>.singleton._BountyModeDetailHandler.IsVisible();
+ if (flag)
+ {
+ this._doc.SendCustomBattleGetReward(this._doc.CurrentBountyData.gameID);
+ }
+ bool flag2 = DlgBase<CustomBattleView, TabDlgBehaviour>.singleton._CustomModeDetailHandler != null && DlgBase<CustomBattleView, TabDlgBehaviour>.singleton._CustomModeDetailHandler.IsVisible();
+ if (flag2)
+ {
+ this._doc.SendCustomBattleGetReward(this._doc.CurrentCustomData.gameID);
+ }
+ return true;
+ }
+
+ private bool OnOpenNowButtonClicked(IXUIButton button)
+ {
+ bool flag = DlgBase<CustomBattleView, TabDlgBehaviour>.singleton._BountyModeDetailHandler != null && DlgBase<CustomBattleView, TabDlgBehaviour>.singleton._BountyModeDetailHandler.IsVisible();
+ if (flag)
+ {
+ this._doc.SendCustomBattleClearCD(this._doc.CurrentBountyData.gameID);
+ }
+ bool flag2 = DlgBase<CustomBattleView, TabDlgBehaviour>.singleton._CustomModeDetailHandler != null && DlgBase<CustomBattleView, TabDlgBehaviour>.singleton._CustomModeDetailHandler.IsVisible();
+ if (flag2)
+ {
+ this._doc.SendCustomBattleClearCD(this._doc.CurrentCustomData.gameID);
+ }
+ return true;
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ this.RefreshData();
+ }
+
+ public override void RefreshData()
+ {
+ base.RefreshData();
+ bool flag = DlgBase<CustomBattleView, TabDlgBehaviour>.singleton._BountyModeDetailHandler != null && DlgBase<CustomBattleView, TabDlgBehaviour>.singleton._BountyModeDetailHandler.IsVisible();
+ if (flag)
+ {
+ this.RefreshBountyData();
+ }
+ bool flag2 = DlgBase<CustomBattleView, TabDlgBehaviour>.singleton._CustomModeDetailHandler != null && DlgBase<CustomBattleView, TabDlgBehaviour>.singleton._CustomModeDetailHandler.IsVisible();
+ if (flag2)
+ {
+ this.RefreshCustomData();
+ }
+ }
+
+ private void RefreshBountyData()
+ {
+ bool flag = this._doc.CurrentBountyData == null;
+ if (!flag)
+ {
+ this._item_pool.ReturnAll(false);
+ SeqListRef<uint> systemBattleReward = this._doc.GetSystemBattleReward((uint)this._doc.CurrentBountyData.gameID, this._doc.CurrentBountyData.winCount);
+ for (int i = 0; i < systemBattleReward.Count; i++)
+ {
+ GameObject gameObject = this._item_pool.FetchGameObject(false);
+ gameObject.transform.localPosition = this._item_pool.TplPos + new Vector3(((float)i - (float)(systemBattleReward.Count - 1) / 2f) * (float)this._item_pool.TplWidth, 0f);
+ XSingleton<XItemDrawerMgr>.singleton.normalItemDrawer.DrawItem(gameObject, (int)systemBattleReward[i, 0], (int)systemBattleReward[i, 1], false);
+ }
+ this._doc.DestoryFx(this._fx);
+ this._fx = null;
+ bool flag2 = this._doc.CurrentBountyData.boxLeftTime == 0u;
+ if (flag2)
+ {
+ this._fetch_btn.SetVisible(true);
+ this._wait_open_frame.gameObject.SetActive(false);
+ this._boxCD.SetLeftTime(0f, -1);
+ this._fx = XSingleton<XFxMgr>.singleton.CreateUIFx("Effects/FX_Particle/UIfx/UI_BountyModeListFrame_Clip01", this._fx_point, false);
+ }
+ else
+ {
+ this._fetch_btn.SetVisible(false);
+ this._wait_open_frame.gameObject.SetActive(true);
+ this._boxCD.SetLeftTime(this._doc.CurrentBountyData.boxLeftTime, -1);
+ SeqRef<uint> systemBattleQuickOpenCost = this._doc.GetSystemBattleQuickOpenCost((uint)this._doc.CurrentBountyData.gameID, this._doc.CurrentBountyData.winCount);
+ this._cost.InputText = XLabelSymbolHelper.FormatSmallIcon((int)systemBattleQuickOpenCost[0]) + " " + systemBattleQuickOpenCost[1].ToString();
+ }
+ }
+ }
+
+ private void RefreshCustomData()
+ {
+ bool flag = this._doc.CurrentCustomData == null;
+ if (!flag)
+ {
+ this._item_pool.ReturnAll(false);
+ SeqListRef<uint> customBattleRewardByRank = this._doc.GetCustomBattleRewardByRank(this._doc.CurrentCustomData.configID, this._doc.CurrentCustomData.selfRank);
+ for (int i = 0; i < customBattleRewardByRank.Count; i++)
+ {
+ GameObject gameObject = this._item_pool.FetchGameObject(false);
+ gameObject.transform.localPosition = this._item_pool.TplPos + new Vector3(((float)i - (float)(customBattleRewardByRank.Count - 1) / 2f) * (float)this._item_pool.TplWidth, 0f);
+ XSingleton<XItemDrawerMgr>.singleton.normalItemDrawer.DrawItem(gameObject, (int)customBattleRewardByRank[i, 0], (int)customBattleRewardByRank[i, 1], false);
+ }
+ this._doc.DestoryFx(this._fx);
+ this._fx = null;
+ bool flag2 = this._doc.CurrentCustomData.boxLeftTime == 0u;
+ if (flag2)
+ {
+ this._fetch_btn.SetVisible(true);
+ this._wait_open_frame.gameObject.SetActive(false);
+ this._boxCD.SetLeftTime(0f, -1);
+ this._fx = XSingleton<XFxMgr>.singleton.CreateUIFx("Effects/FX_Particle/UIfx/UI_BountyModeListFrame_Clip01", this._fx_point, false);
+ }
+ else
+ {
+ this._fetch_btn.SetVisible(false);
+ this._wait_open_frame.gameObject.SetActive(true);
+ this._boxCD.SetLeftTime(this._doc.CurrentCustomData.boxLeftTime, -1);
+ SeqRef<uint> customBattleQuickOpenCost = this._doc.GetCustomBattleQuickOpenCost(this._doc.CurrentCustomData.configID, this._doc.CurrentCustomData.selfRank);
+ this._cost.InputText = XLabelSymbolHelper.FormatSmallIcon((int)customBattleQuickOpenCost[0]) + " " + customBattleQuickOpenCost[1].ToString();
+ }
+ }
+ }
+
+ public override void OnUpdate()
+ {
+ base.OnUpdate();
+ bool activeInHierarchy = this._wait_open_frame.gameObject.activeInHierarchy;
+ if (activeInHierarchy)
+ {
+ this._boxCD.Update();
+ }
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/CustomBattle/CustomBattleChestHandler.cs.meta b/Client/Assets/Scripts/XMainClient/UI/CustomBattle/CustomBattleChestHandler.cs.meta
new file mode 100644
index 00000000..b56b0df7
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/CustomBattle/CustomBattleChestHandler.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 645424fe5db17b9408c4656e13df2952
+timeCreated: 1611403847
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/CustomBattle/CustomBattleCustomModeCreateHandler.cs b/Client/Assets/Scripts/XMainClient/UI/CustomBattle/CustomBattleCustomModeCreateHandler.cs
new file mode 100644
index 00000000..fa6d3f3f
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/CustomBattle/CustomBattleCustomModeCreateHandler.cs
@@ -0,0 +1,491 @@
+using System;
+using System.Collections.Generic;
+using KKSG;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI.CustomBattle
+{
+ internal class CustomBattleCustomModeCreateHandler : DlgHandlerBase
+ {
+ protected override string FileName
+ {
+ get
+ {
+ return "GameSystem/CustomBattle/CustomModeCreateFrame";
+ }
+ }
+
+ private XCustomBattleDocument _doc = null;
+
+ private IXUIButton _close;
+
+ private IXUILabelSymbol _reward1;
+
+ private IXUILabelSymbol _reward2;
+
+ private IXUISprite _add_reward;
+
+ private IXUISprite _sub_reward;
+
+ private IXUISprite _reward_box;
+
+ private IXUISprite _reward_info;
+
+ private IXUILabel _reward_tip;
+
+ private IXUILabel _game_size;
+
+ private IXUILabel _game_wait_time;
+
+ private IXUILabel _game_time;
+
+ private IXUISprite _game_time_add;
+
+ private IXUISprite _game_time_sub;
+
+ private IXUIInput _game_name;
+
+ private IXUISprite _game_name_edit;
+
+ private IXUISprite _friendsonly_switch;
+
+ private IXUISprite _guildonly_switch;
+
+ private IXUISprite _fairmode_switch;
+
+ private IXUISprite _password_switch;
+
+ private IXUITexture _game_type_change;
+
+ private IXUILabel _game_type_name;
+
+ private IXUIButton _game_create;
+
+ private IXUILabelSymbol _game_create_cost;
+
+ private Transform _check_frame;
+
+ private IXUILabel _check_game_name;
+
+ private IXUILabelSymbol _check_game_reward1;
+
+ private IXUILabelSymbol _check_game_reward2;
+
+ private IXUIButton _check_cancel;
+
+ private IXUIButton _check_create;
+
+ private IXUILabelSymbol _check_create_cost;
+
+ private Transform _change_frame;
+
+ private IXUIScrollView _game_type_scrollview;
+
+ private XUIPool _game_type_pool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ private IXUISprite _change_frame_close;
+
+ private Transform _fx_point;
+
+ private XFx _fx = null;
+
+ protected override void Init()
+ {
+ base.Init();
+ this._doc = XDocuments.GetSpecificDocument<XCustomBattleDocument>(XCustomBattleDocument.uuID);
+ this._close = (base.transform.Find("Close").GetComponent("XUIButton") as IXUIButton);
+ this._reward1 = (base.transform.Find("Box/Reward1").GetComponent("XUILabelSymbol") as IXUILabelSymbol);
+ this._reward2 = (base.transform.Find("Box/Reward2").GetComponent("XUILabelSymbol") as IXUILabelSymbol);
+ this._add_reward = (base.transform.Find("Box/Right").GetComponent("XUISprite") as IXUISprite);
+ this._sub_reward = (base.transform.Find("Box/Left").GetComponent("XUISprite") as IXUISprite);
+ this._reward_box = (base.transform.Find("Box/Box").GetComponent("XUISprite") as IXUISprite);
+ this._reward_info = (base.transform.Find("Box/Box/Info").GetComponent("XUISprite") as IXUISprite);
+ this._reward_tip = (base.transform.Find("Box/Box/Tips").GetComponent("XUILabel") as IXUILabel);
+ this._reward_tip.SetText(XSingleton<UiUtility>.singleton.ReplaceReturn(XSingleton<XStringTable>.singleton.GetString("CustomBattleCreateBoxTip")));
+ this._game_size = (base.transform.Find("Box/Size").GetComponent("XUILabel") as IXUILabel);
+ this._game_wait_time = (base.transform.Find("Box/WaitTime").GetComponent("XUILabel") as IXUILabel);
+ this._game_time = (base.transform.Find("Box/Time").GetComponent("XUILabel") as IXUILabel);
+ this._game_time_add = (base.transform.Find("Box/Time/Add").GetComponent("XUISprite") as IXUISprite);
+ this._game_time_sub = (base.transform.Find("Box/Time/Sub").GetComponent("XUISprite") as IXUISprite);
+ this._game_name = (base.transform.Find("Settings/Name/Input").GetComponent("XUIInput") as IXUIInput);
+ this._game_name_edit = (base.transform.Find("Settings/Name/Edit").GetComponent("XUISprite") as IXUISprite);
+ this._friendsonly_switch = (base.transform.Find("Settings/FriendsOnly").GetComponent("XUISprite") as IXUISprite);
+ this._guildonly_switch = (base.transform.Find("Settings/GuildOnly").GetComponent("XUISprite") as IXUISprite);
+ this._fairmode_switch = (base.transform.Find("Settings/FairMode").GetComponent("XUISprite") as IXUISprite);
+ this._password_switch = (base.transform.Find("Settings/Password").GetComponent("XUISprite") as IXUISprite);
+ this._game_type_change = (base.transform.Find("Settings/GameChange").GetComponent("XUITexture") as IXUITexture);
+ this._game_type_name = (base.transform.Find("Settings/GameChange/Name").GetComponent("XUILabel") as IXUILabel);
+ this._game_create = (base.transform.Find("BtnCreate").GetComponent("XUIButton") as IXUIButton);
+ this._game_create_cost = (base.transform.Find("BtnCreate/Cost").GetComponent("XUILabelSymbol") as IXUILabelSymbol);
+ this._check_frame = base.transform.Find("CheckFrame");
+ this._check_game_name = (base.transform.Find("CheckFrame/Name").GetComponent("XUILabel") as IXUILabel);
+ this._check_game_reward1 = (base.transform.Find("CheckFrame/Reward/Reward1").GetComponent("XUILabelSymbol") as IXUILabelSymbol);
+ this._check_game_reward2 = (base.transform.Find("CheckFrame/Reward/Reward2").GetComponent("XUILabelSymbol") as IXUILabelSymbol);
+ this._check_cancel = (base.transform.Find("CheckFrame/Cancel").GetComponent("XUIButton") as IXUIButton);
+ this._check_create = (base.transform.Find("CheckFrame/BtnCreate").GetComponent("XUIButton") as IXUIButton);
+ this._check_create_cost = (base.transform.Find("CheckFrame/BtnCreate/Cost").GetComponent("XUILabelSymbol") as IXUILabelSymbol);
+ this._change_frame = base.transform.Find("ChangeFrame");
+ this._game_type_scrollview = (base.transform.Find("ChangeFrame/Panel").GetComponent("XUIScrollView") as IXUIScrollView);
+ this._change_frame_close = (base.transform.Find("ChangeFrame/Close").GetComponent("XUISprite") as IXUISprite);
+ Transform transform = base.transform.Find("ChangeFrame/Panel/Tpl");
+ this._game_type_pool.SetupPool(transform.parent.gameObject, transform.gameObject, 2u, false);
+ this._fx_point = base.transform.Find("Box/Box/Fx");
+ }
+
+ protected override void OnHide()
+ {
+ this._doc.DestoryFx(this._fx);
+ this._fx = null;
+ base.OnHide();
+ }
+
+ public override void OnUnload()
+ {
+ List<GameObject> list = ListPool<GameObject>.Get();
+ this._game_type_pool.GetActiveList(list);
+ for (int i = 0; i < list.Count; i++)
+ {
+ IXUITexture ixuitexture = list[i].transform.Find("Background").GetComponent("XUITexture") as IXUITexture;
+ ixuitexture.SetTexturePath("");
+ }
+ ListPool<GameObject>.Release(list);
+ this._game_type_change.SetTexturePath("");
+ this._doc.DestoryFx(this._fx);
+ this._fx = null;
+ base.OnUnload();
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ this._close.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnCloseButtonClicked));
+ this._add_reward.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnAddRewardClicked));
+ this._sub_reward.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnSubRewardClicked));
+ this._reward_box.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnRewardBoxClicked));
+ this._reward_info.RegisterSpritePressEventHandler(new SpritePressEventHandler(this.OnRewardInfoPressed));
+ this._game_time_add.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnGameTimeAddClicked));
+ this._game_time_sub.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnGameTimeSubClicked));
+ this._game_name_edit.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnGameNameEditClicked));
+ this._friendsonly_switch.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnFriendOnlySwitchClicked));
+ this._guildonly_switch.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnGuildOnlySwitchClicked));
+ this._fairmode_switch.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnFairModeSwitchClicked));
+ this._password_switch.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnPasswordSwitchClicked));
+ this._game_type_change.RegisterLabelClickEventHandler(new TextureClickEventHandler(this.OnGameTypeChangeClicked));
+ this._game_create.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnGameCreateButtonClicked));
+ this._check_cancel.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnCheckCancelButtonClicked));
+ this._check_create.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnCheckCreateButtonClicked));
+ this._change_frame_close.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnChangeFrameCloseClicked));
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ this._reward_tip.Alpha = 0f;
+ this._doc.DestoryFx(this._fx);
+ this._fx = null;
+ this._fx = XSingleton<XFxMgr>.singleton.CreateUIFx("Effects/FX_Particle/UIfx/UI_BountyModeListFrame_Clip01", this._fx_point, false);
+ this._doc.ResetCustomModeCreateData();
+ this.RefreshData();
+ this.RefreshTypeList();
+ }
+
+ private void RefreshTypeList()
+ {
+ this._game_type_pool.ReturnAll(false);
+ CustomBattleTypeTable.RowData[] customBattleTypelist = this._doc.GetCustomBattleTypelist();
+ for (int i = 0; i < customBattleTypelist.Length; i++)
+ {
+ bool flag = customBattleTypelist[i].gmcreate && !this._doc.IsCreateGM;
+ if (!flag)
+ {
+ GameObject gameObject = this._game_type_pool.FetchGameObject(false);
+ gameObject.transform.localPosition = this._game_type_pool.TplPos + new Vector3(0f, (float)(-(float)i * this._game_type_pool.TplHeight));
+ IXUITexture ixuitexture = gameObject.transform.Find("Background").GetComponent("XUITexture") as IXUITexture;
+ ixuitexture.SetTexturePath("atlas/UI/" + customBattleTypelist[i].show);
+ IXUILabel ixuilabel = gameObject.transform.Find("Name").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel.SetText(customBattleTypelist[i].name);
+ IXUISprite ixuisprite = gameObject.GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.ID = (ulong)((long)customBattleTypelist[i].type);
+ GameObject gameObject2 = gameObject.transform.Find("Lock").gameObject;
+ IXUILabel ixuilabel2 = gameObject2.GetComponent("XUILabel") as IXUILabel;
+ bool notopen = customBattleTypelist[i].notopen;
+ if (notopen)
+ {
+ ixuisprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnTypeSelect));
+ ixuitexture.SetEnabled(true);
+ gameObject2.SetActive(true);
+ }
+ else
+ {
+ ixuisprite.RegisterSpriteClickEventHandler(null);
+ ixuitexture.SetEnabled(false);
+ gameObject2.SetActive(false);
+ }
+ uint customBattleLevelLimitByType = this._doc.GetCustomBattleLevelLimitByType((uint)customBattleTypelist[i].type);
+ bool flag2 = customBattleLevelLimitByType > XSingleton<XAttributeMgr>.singleton.XPlayerData.Level;
+ if (flag2)
+ {
+ gameObject2.SetActive(true);
+ ixuilabel2.SetText(XStringDefineProxy.GetString("LEVEL_REQUIRE_LEVEL", new object[]
+ {
+ customBattleLevelLimitByType
+ }));
+ ixuisprite.RegisterSpriteClickEventHandler(null);
+ }
+ else
+ {
+ gameObject2.SetActive(false);
+ }
+ }
+ }
+ }
+
+ public override void RefreshData()
+ {
+ base.RefreshData();
+ this._change_frame.gameObject.SetActive(false);
+ this._check_frame.gameObject.SetActive(false);
+ this._game_name.SetText(this._doc.CustomCreateData.gameName);
+ uint num = 1u << XFastEnumIntEqualityComparer<CustomBattleScale>.ToInt(CustomBattleScale.CustomBattle_Scale_Friend);
+ bool flag = (this._doc.CustomCreateData.scaleMask & num) == num;
+ num = 1u << XFastEnumIntEqualityComparer<CustomBattleScale>.ToInt(CustomBattleScale.CustomBattle_Scale_Guild);
+ bool flag2 = (this._doc.CustomCreateData.scaleMask & num) == num;
+ this.SetSwitchSprite(this._friendsonly_switch, flag);
+ this.SetSwitchSprite(this._guildonly_switch, flag2);
+ this.SetSwitchSprite(this._fairmode_switch, this._doc.CustomCreateData.isFair);
+ this.SetSwitchSprite(this._password_switch, this._doc.CustomCreateData.hasPassword);
+ this.ShowGameType(1u);
+ }
+
+ public void SetPasswordSwitchSprite(bool flag)
+ {
+ this.SetSwitchSprite(this._password_switch, flag);
+ XSingleton<UiUtility>.singleton.ShowSystemTip(flag ? XSingleton<XStringTable>.singleton.GetString("SetPasswordSucc") : XSingleton<XStringTable>.singleton.GetString("CancelPassword"), "fece00");
+ }
+
+ internal void SetSwitchSprite(IXUISprite sp, bool flag)
+ {
+ sp.SetSprite(flag ? "UI_Sw_on" : "UI_Sw_off");
+ }
+
+ private bool OnCloseButtonClicked(IXUIButton button)
+ {
+ base.SetVisible(false);
+ return true;
+ }
+
+ private void OnAddRewardClicked(IXUISprite sp)
+ {
+ uint customBattleNextID = this._doc.GetCustomBattleNextID(this._doc.CustomCreateData.gameType, this._doc.CustomCreateData.configID);
+ this.ShowConfig(customBattleNextID);
+ }
+
+ private void OnSubRewardClicked(IXUISprite sp)
+ {
+ uint customBattlePreID = this._doc.GetCustomBattlePreID(this._doc.CustomCreateData.gameType, this._doc.CustomCreateData.configID);
+ this.ShowConfig(customBattlePreID);
+ }
+
+ private void OnRewardBoxClicked(IXUISprite sp)
+ {
+ }
+
+ private bool OnRewardInfoPressed(IXUISprite sp, bool isPressed)
+ {
+ this._reward_tip.Alpha = (float)(isPressed ? 1 : 0);
+ return true;
+ }
+
+ private void OnGameTimeAddClicked(IXUISprite sp)
+ {
+ CustomBattleTable.RowData customBattleData = this._doc.GetCustomBattleData(this._doc.CustomCreateData.configID);
+ int num = customBattleData.timespan.Length;
+ bool flag = (ulong)this._doc.CustomCreateData.battleTimeIndex < (ulong)((long)(num - 1));
+ if (flag)
+ {
+ XCustomBattleDocument doc = this._doc;
+ doc.CustomCreateData.battleTimeIndex = doc.CustomCreateData.battleTimeIndex + 1u;
+ }
+ this._game_time.SetText(XSingleton<UiUtility>.singleton.TimeAccFormatString((int)customBattleData.timespan[(int)this._doc.CustomCreateData.battleTimeIndex], 4, 0));
+ }
+
+ private void OnGameTimeSubClicked(IXUISprite sp)
+ {
+ CustomBattleTable.RowData customBattleData = this._doc.GetCustomBattleData(this._doc.CustomCreateData.configID);
+ bool flag = this._doc.CustomCreateData.battleTimeIndex > 0u;
+ if (flag)
+ {
+ XCustomBattleDocument doc = this._doc;
+ doc.CustomCreateData.battleTimeIndex = doc.CustomCreateData.battleTimeIndex - 1u;
+ }
+ this._game_time.SetText(XSingleton<UiUtility>.singleton.TimeAccFormatString((int)customBattleData.timespan[(int)this._doc.CustomCreateData.battleTimeIndex], 4, 0));
+ }
+
+ private void OnGameNameEditClicked(IXUISprite sp)
+ {
+ this._game_name.selected(true);
+ }
+
+ private void OnFriendOnlySwitchClicked(IXUISprite sp)
+ {
+ uint num = 1u << XFastEnumIntEqualityComparer<CustomBattleScale>.ToInt(CustomBattleScale.CustomBattle_Scale_Friend);
+ XCustomBattleDocument doc = this._doc;
+ doc.CustomCreateData.scaleMask = (doc.CustomCreateData.scaleMask ^ num);
+ bool flag = (this._doc.CustomCreateData.scaleMask & num) == num;
+ this.SetSwitchSprite(this._friendsonly_switch, flag);
+ }
+
+ private void OnGuildOnlySwitchClicked(IXUISprite sp)
+ {
+ uint num = 1u << XFastEnumIntEqualityComparer<CustomBattleScale>.ToInt(CustomBattleScale.CustomBattle_Scale_Guild);
+ XCustomBattleDocument doc = this._doc;
+ doc.CustomCreateData.scaleMask = (doc.CustomCreateData.scaleMask ^ num);
+ bool flag = (this._doc.CustomCreateData.scaleMask & num) == num;
+ this.SetSwitchSprite(this._guildonly_switch, flag);
+ }
+
+ private void OnFairModeSwitchClicked(IXUISprite sp)
+ {
+ this._doc.CustomCreateData.isFair = !this._doc.CustomCreateData.isFair;
+ this.SetSwitchSprite(this._fairmode_switch, this._doc.CustomCreateData.isFair);
+ }
+
+ private void OnPasswordSwitchClicked(IXUISprite sp)
+ {
+ bool flag = !this._doc.CustomCreateData.hasPassword;
+ if (flag)
+ {
+ this.SetSwitchSprite(this._password_switch, true);
+ DlgBase<CustomBattleView, TabDlgBehaviour>.singleton.ShowPasswordSettingHandler();
+ }
+ else
+ {
+ this._doc.CustomCreateData.hasPassword = false;
+ this.SetPasswordSwitchSprite(false);
+ }
+ }
+
+ private void OnGameTypeChangeClicked(IXUITexture sp)
+ {
+ this._change_frame.gameObject.SetActive(true);
+ }
+
+ private bool OnGameCreateButtonClicked(IXUIButton button)
+ {
+ this._check_game_name.SetText(this._game_name.GetText());
+ this._doc.CustomCreateData.gameName = this._game_name.GetText();
+ SeqListRef<uint> customBattleBestReward = this._doc.GetCustomBattleBestReward(this._doc.CustomCreateData.configID);
+ this._check_game_reward1.InputText = "";
+ this._check_game_reward2.InputText = "";
+ bool flag = customBattleBestReward.Count > 0;
+ if (flag)
+ {
+ this._check_game_reward1.InputText = XLabelSymbolHelper.FormatSmallIcon((int)customBattleBestReward[0, 0]) + " " + customBattleBestReward[0, 1].ToString();
+ }
+ bool flag2 = customBattleBestReward.Count > 1;
+ if (flag2)
+ {
+ this._check_game_reward2.InputText = XLabelSymbolHelper.FormatSmallIcon((int)customBattleBestReward[1, 0]) + " " + customBattleBestReward[1, 1].ToString();
+ }
+ this._check_create_cost.InputText = XLabelSymbolHelper.FormatSmallIcon((int)this._doc.CustomCreateData.cost.itemID) + " " + this._doc.CustomCreateData.cost.itemCount.ToString();
+ this._check_frame.gameObject.SetActive(true);
+ return true;
+ }
+
+ private bool OnCheckCancelButtonClicked(IXUIButton button)
+ {
+ this._check_frame.gameObject.SetActive(false);
+ return true;
+ }
+
+ private bool OnCheckCreateButtonClicked(IXUIButton button)
+ {
+ this._doc.SendCustomBattleCreate();
+ return true;
+ }
+
+ private void OnChangeFrameCloseClicked(IXUISprite sp)
+ {
+ this._change_frame.gameObject.SetActive(false);
+ }
+
+ private void OnTypeSelect(IXUISprite sp)
+ {
+ uint num = (uint)sp.ID;
+ this._change_frame.gameObject.SetActive(false);
+ bool flag = num != this._doc.CustomCreateData.gameType;
+ if (flag)
+ {
+ this._doc.CustomCreateData.gameType = num;
+ this.ShowGameType(num);
+ }
+ }
+
+ private void ShowGameType(uint typeid)
+ {
+ uint customBattleFirstID = this._doc.GetCustomBattleFirstID(typeid);
+ CustomBattleTypeTable.RowData customBattleTypeData = this._doc.GetCustomBattleTypeData((int)typeid);
+ this._game_type_change.SetTexturePath("atlas/UI/" + customBattleTypeData.show);
+ this._game_type_name.SetText(customBattleTypeData.name);
+ this.ShowConfig(customBattleFirstID);
+ }
+
+ private void ShowConfig(uint configID)
+ {
+ CustomBattleTable.RowData customBattleData = this._doc.GetCustomBattleData(configID);
+ bool flag = customBattleData == null;
+ if (!flag)
+ {
+ this._doc.CustomCreateData.configID = configID;
+ this._doc.CustomCreateData.canJoinCount = customBattleData.joincount;
+ this._doc.CustomCreateData.readyTime = customBattleData.readytimepan;
+ this._game_size.SetText(this._doc.CustomCreateData.canJoinCount.ToString());
+ this._game_wait_time.SetText(XSingleton<UiUtility>.singleton.TimeAccFormatString((int)this._doc.CustomCreateData.readyTime, 4, 0));
+ bool flag2 = (ulong)this._doc.CustomCreateData.battleTimeIndex >= (ulong)((long)customBattleData.timespan.Length);
+ if (flag2)
+ {
+ this._doc.CustomCreateData.battleTimeIndex = (uint)(customBattleData.timespan.Length - 1);
+ }
+ this._game_time.SetText(XSingleton<UiUtility>.singleton.TimeAccFormatString((int)customBattleData.timespan[(int)this._doc.CustomCreateData.battleTimeIndex], 4, 0));
+ SeqListRef<uint> customBattleBestReward = this._doc.GetCustomBattleBestReward(configID);
+ this._reward1.InputText = "";
+ this._reward2.InputText = "";
+ bool flag3 = customBattleBestReward.Count > 0;
+ if (flag3)
+ {
+ this._reward1.InputText = XLabelSymbolHelper.FormatSmallIcon((int)customBattleBestReward[0, 0]) + " " + customBattleBestReward[0, 1].ToString();
+ }
+ bool flag4 = customBattleBestReward.Count > 1;
+ if (flag4)
+ {
+ this._reward2.InputText = XLabelSymbolHelper.FormatSmallIcon((int)customBattleBestReward[1, 0]) + " " + customBattleBestReward[1, 1].ToString();
+ }
+ this._doc.CustomCreateData.cost.itemID = customBattleData.create[0, 0];
+ this._doc.CustomCreateData.cost.itemCount = customBattleData.create[0, 1];
+ this._game_create_cost.InputText = XLabelSymbolHelper.FormatSmallIcon((int)this._doc.CustomCreateData.cost.itemID) + " " + this._doc.CustomCreateData.cost.itemCount.ToString();
+ bool flag5 = uint.MaxValue == this._doc.GetCustomBattleNextID(this._doc.CustomCreateData.gameType, configID);
+ if (flag5)
+ {
+ this._add_reward.SetAlpha(0f);
+ }
+ else
+ {
+ this._add_reward.SetAlpha(1f);
+ }
+ bool flag6 = this._doc.GetCustomBattlePreID(this._doc.CustomCreateData.gameType, configID) == 0u;
+ if (flag6)
+ {
+ this._sub_reward.SetAlpha(0f);
+ }
+ else
+ {
+ this._sub_reward.SetAlpha(1f);
+ }
+ this._reward_box.SetSprite(customBattleData.BoxSpriteName);
+ }
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/CustomBattle/CustomBattleCustomModeCreateHandler.cs.meta b/Client/Assets/Scripts/XMainClient/UI/CustomBattle/CustomBattleCustomModeCreateHandler.cs.meta
new file mode 100644
index 00000000..025a1fec
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/CustomBattle/CustomBattleCustomModeCreateHandler.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: b42979cfc366e224da0f14e9de385864
+timeCreated: 1611404392
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/CustomBattle/CustomBattleCustomModeDetailHandler.cs b/Client/Assets/Scripts/XMainClient/UI/CustomBattle/CustomBattleCustomModeDetailHandler.cs
new file mode 100644
index 00000000..b02aff14
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/CustomBattle/CustomBattleCustomModeDetailHandler.cs
@@ -0,0 +1,386 @@
+using System;
+using KKSG;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI.CustomBattle
+{
+ internal class CustomBattleCustomModeDetailHandler : DlgHandlerBase
+ {
+ protected override string FileName
+ {
+ get
+ {
+ return "GameSystem/CustomBattle/CustomModeDetailFrame";
+ }
+ }
+
+ private XCustomBattleDocument _doc = null;
+
+ private IXUIScrollView _scroll_view;
+
+ private IXUIWrapContent _wrap_content;
+
+ private IXUISprite _selfinfo_rankimage;
+
+ private IXUILabel _selfinfo_rank;
+
+ private IXUILabel _selfinfo_name;
+
+ private IXUILabel _selfinfo_point;
+
+ private IXUILabelSymbol _selfinfo_reward;
+
+ private IXUISprite _game_info_button;
+
+ private IXUILabel _game_type;
+
+ private IXUILabel _game_name;
+
+ private IXUILabel _game_id;
+
+ private IXUILabel _game_creater;
+
+ private IXUILabel _game_size;
+
+ private IXUILabel _game_time;
+
+ private IXUILabel _game_time_tip;
+
+ private Transform _game_time_slider;
+
+ private IXUIButton _game_match;
+
+ private IXUIButton _game_join;
+
+ private IXUIButton _game_exit;
+
+ private IXUISprite _game_box;
+
+ private IXUILabel _game_notice;
+
+ private IXUILabel _game_box_time;
+
+ private IXUILabel _can_fetch;
+
+ private Transform _fx_point;
+
+ private XLeftTimeCounter _left_time;
+
+ private XLeftTimeCounter _box_left_time;
+
+ private IXUIButton _back;
+
+ private XFx _fx;
+
+ protected override void Init()
+ {
+ base.Init();
+ this._doc = XDocuments.GetSpecificDocument<XCustomBattleDocument>(XCustomBattleDocument.uuID);
+ this._scroll_view = (base.transform.Find("Bg/Panel").GetComponent("XUIScrollView") as IXUIScrollView);
+ this._wrap_content = (base.transform.Find("Bg/Panel/List").GetComponent("XUIWrapContent") as IXUIWrapContent);
+ this._wrap_content.RegisterItemUpdateEventHandler(new WrapItemUpdateEventHandler(this.WrapContentUpdated));
+ this._selfinfo_rankimage = (base.transform.Find("Bg/MyInfo/RankImage").GetComponent("XUISprite") as IXUISprite);
+ this._selfinfo_rank = (base.transform.Find("Bg/MyInfo/Rank").GetComponent("XUILabel") as IXUILabel);
+ this._selfinfo_name = (base.transform.Find("Bg/MyInfo/Name").GetComponent("XUILabel") as IXUILabel);
+ this._selfinfo_point = (base.transform.Find("Bg/MyInfo/Point").GetComponent("XUILabel") as IXUILabel);
+ this._selfinfo_reward = (base.transform.Find("Bg/MyInfo/Reward").GetComponent("XUILabelSymbol") as IXUILabelSymbol);
+ this._game_info_button = (base.transform.Find("Bg/GameInfo/Info").GetComponent("XUISprite") as IXUISprite);
+ this._game_type = (base.transform.Find("Bg/GameInfo/Type").GetComponent("XUILabel") as IXUILabel);
+ this._game_name = (base.transform.Find("Bg/GameInfo/Name").GetComponent("XUILabel") as IXUILabel);
+ this._game_id = (base.transform.Find("Bg/GameInfo/ID").GetComponent("XUILabel") as IXUILabel);
+ this._game_creater = (base.transform.Find("Bg/GameInfo/Creater").GetComponent("XUILabel") as IXUILabel);
+ this._game_size = (base.transform.Find("Bg/GameInfo/Size").GetComponent("XUILabel") as IXUILabel);
+ this._game_time = (base.transform.Find("Bg/GameInfo/Slider/Time").GetComponent("XUILabel") as IXUILabel);
+ this._game_time_tip = (base.transform.Find("Bg/GameInfo/Slider/Time/T").GetComponent("XUILabel") as IXUILabel);
+ this._game_time_slider = base.transform.Find("Bg/GameInfo/Slider");
+ this._left_time = new XLeftTimeCounter(this._game_time, false);
+ this._game_match = (base.transform.Find("Bg/GameInfo/BtnStart").GetComponent("XUIButton") as IXUIButton);
+ this._game_join = (base.transform.Find("Bg/GameInfo/BtnJoin").GetComponent("XUIButton") as IXUIButton);
+ this._game_exit = (base.transform.Find("Bg/GameInfo/BtnExit").GetComponent("XUIButton") as IXUIButton);
+ this._game_box = (base.transform.Find("Bg/GameInfo/Box").GetComponent("XUISprite") as IXUISprite);
+ this._game_box_time = (base.transform.Find("Bg/GameInfo/Box/Time").GetComponent("XUILabel") as IXUILabel);
+ this._game_notice = (base.transform.Find("Bg/GameInfo/Notice").GetComponent("XUILabel") as IXUILabel);
+ this._can_fetch = (base.transform.Find("Bg/GameInfo/Box/CanFetch").GetComponent("XUILabel") as IXUILabel);
+ this._box_left_time = new XLeftTimeCounter(this._game_box_time, true);
+ this._fx_point = base.transform.Find("Bg/GameInfo/Box/Fx");
+ this._back = (base.transform.Find("Bg/Back").GetComponent("XUIButton") as IXUIButton);
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ this._game_info_button.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnGameInfoButtonClicked));
+ this._game_match.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnGameMatchButtonClicked));
+ this._game_join.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnGameJoinButtonClicked));
+ this._game_exit.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnGameExitButtonClicked));
+ this._game_box.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnGameBoxClicked));
+ this._back.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnBackButtonClicked));
+ }
+
+ protected override void OnHide()
+ {
+ this._doc.DestoryFx(this._fx);
+ this._fx = null;
+ base.OnHide();
+ }
+
+ public override void OnUnload()
+ {
+ this._doc.DestoryFx(this._fx);
+ this._fx = null;
+ base.OnUnload();
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ this._doc.SendCustomBattleSearchCustomModeList(this._doc.CurrentCustomData.gameID);
+ this._doc.SendCustomBattleQueryCustomModeSelfInfo();
+ this.RefreshData();
+ }
+
+ public override void RefreshData()
+ {
+ base.RefreshData();
+ CustomBattleTable.RowData customBattleData = this._doc.GetCustomBattleData(this._doc.CurrentCustomData.configID);
+ bool flag = customBattleData == null || this._doc.CurrentCustomData == null;
+ if (!flag)
+ {
+ this._game_type.SetText(customBattleData.desc);
+ this._game_name.SetText(this._doc.CurrentCustomData.gameName);
+ this._game_id.SetText(this._doc.CurrentCustomData.token);
+ this._game_creater.SetText(this._doc.CurrentCustomData.gameCreator);
+ this._game_size.SetText(this._doc.CurrentCustomData.joinText);
+ this._doc.DestoryFx(this._fx);
+ this._fx = null;
+ bool flag2 = this._doc.SelfCustomData != null && this._doc.CurrentCustomData.gameID == this._doc.SelfCustomData.gameID;
+ switch (this._doc.CurrentCustomData.gameStatus)
+ {
+ case CustomBattleState.CustomBattle_Ready:
+ this._game_box.SetVisible(false);
+ this._game_match.SetVisible(false);
+ this._game_time_slider.gameObject.SetActive(true);
+ this._game_time_tip.SetText(XSingleton<XStringTable>.singleton.GetString("WaitForStart"));
+ this._left_time.SetLeftTime(this._doc.CurrentCustomData.gameStartLeftTime, -1);
+ this._game_exit.SetVisible(flag2);
+ this._game_join.SetVisible(!flag2);
+ this._game_notice.SetText(flag2 ? XSingleton<XStringTable>.singleton.GetString("WaitForShowMatch") : "");
+ break;
+ case CustomBattleState.CustomBattle_Going:
+ this._game_box.SetVisible(false);
+ this._game_time_slider.gameObject.SetActive(true);
+ this._game_time_tip.SetText(XSingleton<XStringTable>.singleton.GetString("WaitForEnd"));
+ this._left_time.SetLeftTime(this._doc.CurrentCustomData.gameEndLeftTime, -1);
+ this._game_match.SetVisible(flag2);
+ this._game_exit.SetVisible(flag2);
+ this._game_join.SetVisible(!flag2);
+ this._game_notice.SetText("");
+ break;
+ case CustomBattleState.CustomBattle_End:
+ {
+ CustomBattleRoleState selfStatus = this._doc.CurrentCustomData.selfStatus;
+ if (selfStatus != CustomBattleRoleState.CustomBattle_RoleState_Reward)
+ {
+ if (selfStatus != CustomBattleRoleState.Custombattle_RoleState_Taken)
+ {
+ this._game_box.SetVisible(false);
+ this._game_match.SetVisible(false);
+ this._game_join.SetVisible(false);
+ this._game_exit.SetVisible(false);
+ this._game_time_slider.gameObject.SetActive(false);
+ this._game_notice.SetText(XSingleton<XStringTable>.singleton.GetString("GameEnd"));
+ }
+ else
+ {
+ this._game_box.SetVisible(false);
+ this._game_match.SetVisible(false);
+ this._game_join.SetVisible(false);
+ this._game_exit.SetVisible(flag2);
+ this._game_time_slider.gameObject.SetActive(false);
+ this._game_notice.SetText(XSingleton<XStringTable>.singleton.GetString("GameEnd"));
+ }
+ }
+ else
+ {
+ this._game_box.SetVisible(flag2);
+ this._game_match.SetVisible(false);
+ this._game_join.SetVisible(false);
+ this._game_exit.SetVisible(flag2);
+ this._game_time_slider.gameObject.SetActive(false);
+ this._can_fetch.SetVisible(this._doc.CurrentCustomData.boxLeftTime <= 0u);
+ this._box_left_time.SetLeftTime(this._doc.CurrentCustomData.boxLeftTime, -1);
+ bool flag3 = this._doc.CurrentCustomData.boxLeftTime <= 0u;
+ if (flag3)
+ {
+ this._fx = XSingleton<XFxMgr>.singleton.CreateUIFx("Effects/FX_Particle/UIfx/UI_BountyModeListFrame_Clip01", this._fx_point, false);
+ }
+ this._game_notice.SetText(flag2 ? "" : XSingleton<XStringTable>.singleton.GetString("GameEnd"));
+ }
+ break;
+ }
+ case CustomBattleState.CustomBattle_Destory:
+ this._game_box.SetVisible(false);
+ this._game_match.SetVisible(false);
+ this._game_join.SetVisible(false);
+ this._game_exit.SetVisible(false);
+ this._game_time_slider.gameObject.SetActive(false);
+ this._game_notice.SetText(XSingleton<XStringTable>.singleton.GetString("GameEnd"));
+ break;
+ }
+ bool flag4 = this._doc.SelfCustomData != null && this._doc.CurrentCustomData.gameID == this._doc.SelfCustomData.gameID;
+ if (flag4)
+ {
+ }
+ this._wrap_content.SetContentCount(this._doc.CurrentCustomData.rankList.Count, false);
+ this._scroll_view.ResetPosition();
+ this.SetupSelf();
+ }
+ }
+
+ private void WrapContentUpdated(Transform t, int index)
+ {
+ bool flag = index < 0 || index >= this._doc.CurrentCustomData.rankList.Count;
+ if (flag)
+ {
+ t.gameObject.SetActive(false);
+ }
+ else
+ {
+ this.SetupRank(t, index);
+ }
+ }
+
+ private void SetupRank(Transform t, int index)
+ {
+ IXUISprite ixuisprite = t.Find("RankImage").GetComponent("XUISprite") as IXUISprite;
+ IXUILabel ixuilabel = t.Find("Rank").GetComponent("XUILabel") as IXUILabel;
+ IXUISprite ixuisprite2 = t.Find("ViewBattle").GetComponent("XUISprite") as IXUISprite;
+ IXUILabel ixuilabel2 = t.Find("Name").GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel3 = t.Find("Point").GetComponent("XUILabel") as IXUILabel;
+ IXUILabelSymbol ixuilabelSymbol = t.Find("Reward").GetComponent("XUILabelSymbol") as IXUILabelSymbol;
+ CustomBattleRank customBattleRank = this._doc.CurrentCustomData.rankList[index];
+ ixuisprite.SetVisible(index < 3);
+ ixuilabel.SetVisible(index >= 3);
+ ixuisprite2.SetVisible(false);
+ ixuisprite.SetSprite(string.Format("N{0}", index + 1));
+ ixuilabel.SetText((index + 1).ToString());
+ ixuilabel2.SetText(customBattleRank.name);
+ ixuilabel3.SetText(customBattleRank.point.ToString());
+ SeqListRef<uint> customBattleRewardByRank = this._doc.GetCustomBattleRewardByRank(this._doc.CurrentCustomData.configID, (uint)(index + 1));
+ string text = "";
+ for (int i = 0; i < customBattleRewardByRank.Count; i++)
+ {
+ text = string.Concat(new string[]
+ {
+ text,
+ (i == 0) ? "" : " ",
+ XLabelSymbolHelper.FormatSmallIcon((int)customBattleRewardByRank[i, 0]),
+ " ",
+ customBattleRewardByRank[i, 1].ToString()
+ });
+ }
+ ixuilabelSymbol.InputText = text;
+ }
+
+ private void SetupSelf()
+ {
+ bool flag = this._doc.CurrentCustomData.selfRank == 0u;
+ if (flag)
+ {
+ this._selfinfo_rankimage.SetSprite("");
+ this._selfinfo_rank.SetText("");
+ this._selfinfo_name.SetText("");
+ this._selfinfo_point.SetText("");
+ this._selfinfo_reward.InputText = "";
+ }
+ else
+ {
+ this._selfinfo_rankimage.SetVisible(this._doc.CurrentCustomData.selfRank <= 3u);
+ this._selfinfo_rank.SetVisible(this._doc.CurrentCustomData.selfRank > 3u);
+ this._selfinfo_rankimage.SetSprite(string.Format("N{0}", this._doc.CurrentCustomData.selfRank));
+ this._selfinfo_rank.SetText(this._doc.CurrentCustomData.selfRank.ToString());
+ this._selfinfo_name.SetText(XSingleton<XAttributeMgr>.singleton.XPlayerData.Name);
+ this._selfinfo_point.SetText(this._doc.CurrentCustomData.selfPoint.ToString());
+ SeqListRef<uint> customBattleRewardByRank = this._doc.GetCustomBattleRewardByRank(this._doc.CurrentCustomData.configID, this._doc.CurrentCustomData.selfRank);
+ string text = "";
+ for (int i = 0; i < customBattleRewardByRank.Count; i++)
+ {
+ text = string.Concat(new string[]
+ {
+ text,
+ (i == 0) ? "" : " ",
+ XLabelSymbolHelper.FormatSmallIcon((int)customBattleRewardByRank[i, 0]),
+ " ",
+ customBattleRewardByRank[i, 1].ToString()
+ });
+ }
+ this._selfinfo_reward.InputText = text;
+ }
+ }
+
+ private void OnGameInfoButtonClicked(IXUISprite sp)
+ {
+ DlgBase<CustomBattleView, TabDlgBehaviour>.singleton.ShowCustomModeBriefHandler();
+ }
+
+ private bool OnGameMatchButtonClicked(IXUIButton button)
+ {
+ bool flag = this._doc.CurrentCustomData.expID == 0;
+ if (flag)
+ {
+ bool flag2 = XTeamDocument.GoSingleBattleBeforeNeed(new ButtonClickEventHandler(this.OnGameMatchButtonClicked), button);
+ if (flag2)
+ {
+ return true;
+ }
+ this._doc.SendCustomBattleMatch(this._doc.CurrentCustomData.gameID);
+ }
+ else
+ {
+ XTeamDocument specificDocument = XDocuments.GetSpecificDocument<XTeamDocument>(XTeamDocument.uuID);
+ specificDocument.SetAndMatch(this._doc.CurrentCustomData.expID);
+ }
+ return true;
+ }
+
+ private bool OnGameJoinButtonClicked(IXUIButton button)
+ {
+ this._doc.SendCustomBattleJoin(this._doc.CurrentCustomData.gameID, this._doc.CurrentCustomData.hasPassword, "");
+ return true;
+ }
+
+ private bool OnGameExitButtonClicked(IXUIButton button)
+ {
+ XSingleton<UiUtility>.singleton.ShowModalDialog(XStringDefineProxy.GetString("UnJoinCustomModeTip"), XStringDefineProxy.GetString("COMMON_OK"), XStringDefineProxy.GetString("COMMON_CANCEL"), new ButtonClickEventHandler(this.OnUnJoinOkClicked));
+ return true;
+ }
+
+ private bool OnUnJoinOkClicked(IXUIButton button)
+ {
+ DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.SetVisible(false, true);
+ this._doc.SendCustomBattleExit(this._doc.CurrentCustomData.gameID);
+ return true;
+ }
+
+ private void OnGameBoxClicked(IXUISprite sp)
+ {
+ DlgBase<CustomBattleView, TabDlgBehaviour>.singleton.ShowChestHandler();
+ }
+
+ private bool OnBackButtonClicked(IXUIButton button)
+ {
+ DlgBase<CustomBattleView, TabDlgBehaviour>.singleton.ShowCustomModeListHandler();
+ return true;
+ }
+
+ public override void OnUpdate()
+ {
+ base.OnUpdate();
+ this._left_time.Update();
+ this._box_left_time.Update();
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/CustomBattle/CustomBattleCustomModeDetailHandler.cs.meta b/Client/Assets/Scripts/XMainClient/UI/CustomBattle/CustomBattleCustomModeDetailHandler.cs.meta
new file mode 100644
index 00000000..e604b9b2
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/CustomBattle/CustomBattleCustomModeDetailHandler.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 14c6b16e189ff28439a7d7232b922618
+timeCreated: 1611403259
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/CustomBattle/CustomBattleCustomModeListHandler.cs b/Client/Assets/Scripts/XMainClient/UI/CustomBattle/CustomBattleCustomModeListHandler.cs
new file mode 100644
index 00000000..4660c87b
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/CustomBattle/CustomBattleCustomModeListHandler.cs
@@ -0,0 +1,334 @@
+using System;
+using KKSG;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI.CustomBattle
+{
+ internal class CustomBattleCustomModeListHandler : DlgHandlerBase
+ {
+ private int wrapCount
+ {
+ get
+ {
+ bool flag = this._doc == null;
+ int result;
+ if (flag)
+ {
+ result = 0;
+ }
+ else
+ {
+ result = ((this._doc.SelfCustomData == null) ? this._doc.CustomList.Count : (this._doc.CustomList.Count + 1));
+ }
+ return result;
+ }
+ }
+
+ protected override string FileName
+ {
+ get
+ {
+ return "GameSystem/CustomBattle/CustomModeListFrame";
+ }
+ }
+
+ private XCustomBattleDocument _doc = null;
+
+ private IXUIInput _input;
+
+ private IXUISprite _search;
+
+ private IXUIButton _create_game;
+
+ private IXUIButton _my_game;
+
+ private Transform _red_point;
+
+ private IXUIButton _refresh;
+
+ private IXUISprite _show_other;
+
+ private Transform _show_flag;
+
+ private Transform _empty_game;
+
+ private IXUIScrollView _scroll_view;
+
+ private IXUIWrapContent _wrap_content;
+
+ protected override void Init()
+ {
+ base.Init();
+ this._doc = XDocuments.GetSpecificDocument<XCustomBattleDocument>(XCustomBattleDocument.uuID);
+ this._input = (base.transform.Find("Bg/Input").GetComponent("XUIInput") as IXUIInput);
+ this._search = (base.transform.Find("Bg/Input/Search").GetComponent("XUISprite") as IXUISprite);
+ this._create_game = (base.transform.Find("Bg/BtnCreateGame").GetComponent("XUIButton") as IXUIButton);
+ this._my_game = (base.transform.Find("Bg/BtnMyGame").GetComponent("XUIButton") as IXUIButton);
+ this._red_point = base.transform.Find("Bg/BtnMyGame/RedPoint");
+ this._refresh = (base.transform.Find("Bg/BtnRefresh").GetComponent("XUIButton") as IXUIButton);
+ this._show_other = (base.transform.Find("Bg/BtnOther").GetComponent("XUISprite") as IXUISprite);
+ this._show_flag = base.transform.Find("Bg/BtnOther/Flag");
+ this._empty_game = base.transform.Find("Bg/EmptyGame");
+ this._scroll_view = (base.transform.Find("Bg/Panel").GetComponent("XUIScrollView") as IXUIScrollView);
+ this._wrap_content = (base.transform.Find("Bg/Panel/List").GetComponent("XUIWrapContent") as IXUIWrapContent);
+ this._wrap_content.RegisterItemUpdateEventHandler(new WrapItemUpdateEventHandler(this.WrapContentUpdated));
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ this._search.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnSearchClicked));
+ this._create_game.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnCreateGameButtonClicked));
+ this._my_game.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnMyGameButtonClicked));
+ this._refresh.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnRefreshButtonClicked));
+ this._show_other.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnShowOtherClicked));
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ this._input.SetText("");
+ this._show_flag.gameObject.SetActive(this._doc.QueryCross);
+ this._doc.SendCustomBattleQueryCustomModeList(this._doc.QueryCross);
+ this._doc.SendCustomBattleQueryCustomModeSelfInfo();
+ this.RefreshData();
+ }
+
+ public override void RefreshData()
+ {
+ base.RefreshData();
+ bool flag = this._doc.SelfCustomData != null;
+ if (flag)
+ {
+ this._create_game.SetVisible(false);
+ this._my_game.SetVisible(true);
+ this._red_point.gameObject.SetActive(this._doc.SelfCustomData.selfStatus == CustomBattleRoleState.CustomBattle_RoleState_Reward && this._doc.SelfCustomData.boxLeftTime == 0u);
+ }
+ else
+ {
+ this._create_game.SetVisible(true);
+ this._my_game.SetVisible(false);
+ }
+ this._wrap_content.SetContentCount(this.wrapCount, false);
+ this._empty_game.gameObject.SetActive(this.wrapCount == 0);
+ this._scroll_view.ResetPosition();
+ }
+
+ private void WrapContentUpdated(Transform t, int index)
+ {
+ bool flag = index < 0 || index >= this.wrapCount;
+ if (flag)
+ {
+ t.gameObject.SetActive(false);
+ }
+ else
+ {
+ this.SetupCustom(t, index);
+ }
+ }
+
+ private void SetupCustom(Transform t, int index)
+ {
+ Transform transform = t.Find("FairMode");
+ IXUILabelSymbol ixuilabelSymbol = t.Find("Name").GetComponent("XUILabelSymbol") as IXUILabelSymbol;
+ IXUILabel ixuilabel = t.Find("Type").GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel2 = t.Find("Creator").GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel3 = t.Find("JoinCount").GetComponent("XUILabel") as IXUILabel;
+ IXUIButton ixuibutton = t.Find("JoinBtn").GetComponent("XUIButton") as IXUIButton;
+ IXUIButton ixuibutton2 = t.Find("DetailBtn").GetComponent("XUIButton") as IXUIButton;
+ bool flag = this._doc.SelfCustomData == null;
+ XCustomBattleDocument.CustomModeData customModeData;
+ if (flag)
+ {
+ customModeData = this._doc.CustomList[index];
+ }
+ else
+ {
+ bool flag2 = index == 0;
+ if (flag2)
+ {
+ customModeData = this._doc.SelfCustomData;
+ }
+ else
+ {
+ customModeData = this._doc.CustomList[index - 1];
+ }
+ }
+ transform.gameObject.SetActive(customModeData.fairMode);
+ string text = " ";
+ uint num = 1u << XFastEnumIntEqualityComparer<CustomBattleTag>.ToInt(CustomBattleTag.CustomBattle_Tag_Friend);
+ bool flag3 = (customModeData.tagMask & num) == num;
+ num = 1u << XFastEnumIntEqualityComparer<CustomBattleTag>.ToInt(CustomBattleTag.CustomBattle_Tag_Guild);
+ bool flag4 = (customModeData.tagMask & num) == num;
+ num = 1u << XFastEnumIntEqualityComparer<CustomBattleTag>.ToInt(CustomBattleTag.CustomBattle_Tag_Cross);
+ bool flag5 = (customModeData.tagMask & num) == num;
+ num = 1u << XFastEnumIntEqualityComparer<CustomBattleTag>.ToInt(CustomBattleTag.CustomBattle_Tag_GM);
+ bool flag6 = (customModeData.tagMask & num) == num;
+ bool flag7 = flag3;
+ if (flag7)
+ {
+ text += XLabelSymbolHelper.FormatImage("common/Universal", "chat_tag_8");
+ }
+ bool flag8 = flag4;
+ if (flag8)
+ {
+ text += XLabelSymbolHelper.FormatImage("common/Universal", "chat_tag_2");
+ }
+ bool flag9 = flag5;
+ if (flag9)
+ {
+ text += XLabelSymbolHelper.FormatImage("common/Universal", "chat_tag_11");
+ }
+ bool flag10 = flag6;
+ if (flag10)
+ {
+ text += XLabelSymbolHelper.FormatImage("common/Universal", "chat_tag_12");
+ }
+ ixuilabelSymbol.InputText = customModeData.gameName + text;
+ CustomBattleTypeTable.RowData customBattleTypeData = this._doc.GetCustomBattleTypeData((int)customModeData.gameType);
+ ixuilabel.SetText((customBattleTypeData != null) ? customBattleTypeData.name : "");
+ ixuilabel2.SetText(customModeData.gameCreator);
+ ixuilabel3.SetText(customModeData.joinText);
+ ixuibutton.ID = (ulong)((long)index);
+ ixuibutton2.ID = (ulong)((long)index);
+ ixuibutton.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnJoinButtonClicked));
+ ixuibutton2.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnDetailButtonClicked));
+ bool flag11 = this._doc.SelfCustomData != null && this._doc.SelfCustomData.gameID == customModeData.gameID;
+ if (flag11)
+ {
+ ixuibutton.SetEnable(false, false);
+ }
+ else
+ {
+ ixuibutton.SetEnable(true, false);
+ }
+ }
+
+ private void OnSearchClicked(IXUISprite sp)
+ {
+ this._doc.SendCustomBattleSearch(this._input.GetText());
+ this._input.SetText("");
+ }
+
+ private bool OnCreateGameButtonClicked(IXUIButton button)
+ {
+ DlgBase<CustomBattleView, TabDlgBehaviour>.singleton.ShowCustomModeCreateHandler();
+ return true;
+ }
+
+ private bool OnMyGameButtonClicked(IXUIButton button)
+ {
+ bool flag = this._doc.SelfCustomData == null;
+ bool result;
+ if (flag)
+ {
+ result = false;
+ }
+ else
+ {
+ this._doc.CurrentCustomData = this._doc.SelfCustomData;
+ DlgBase<CustomBattleView, TabDlgBehaviour>.singleton.ShowCustomModeDetailHandler();
+ result = true;
+ }
+ return result;
+ }
+
+ private bool OnRefreshButtonClicked(IXUIButton button)
+ {
+ this._doc.SendCustomBattleQueryCustomModeList(this._doc.QueryCross);
+ this._doc.SendCustomBattleQueryCustomModeSelfInfo();
+ this._input.SetText("");
+ return true;
+ }
+
+ private void OnShowOtherClicked(IXUISprite sp)
+ {
+ this._doc.QueryCross = !this._doc.QueryCross;
+ this._show_flag.gameObject.SetActive(this._doc.QueryCross);
+ this.OnRefreshButtonClicked(null);
+ }
+
+ private bool OnJoinButtonClicked(IXUIButton button)
+ {
+ bool flag = (int)button.ID >= this.wrapCount;
+ bool result;
+ if (flag)
+ {
+ result = false;
+ }
+ else
+ {
+ bool flag2 = this._doc.SelfCustomData != null;
+ if (flag2)
+ {
+ bool flag3 = button.ID == 0UL;
+ if (flag3)
+ {
+ this._doc.CurrentCustomData = this._doc.SelfCustomData;
+ this._doc.SendCustomBattleJoin(this._doc.SelfCustomData.gameID, this._doc.SelfCustomData.hasPassword, "");
+ }
+ else
+ {
+ this._doc.CurrentCustomData = this._doc.CustomList[(int)button.ID - 1];
+ this._doc.SendCustomBattleJoin(this._doc.CustomList[(int)button.ID - 1].gameID, this._doc.CustomList[(int)button.ID - 1].hasPassword, "");
+ }
+ }
+ else
+ {
+ this._doc.CurrentCustomData = this._doc.CustomList[(int)button.ID];
+ this._doc.SendCustomBattleJoin(this._doc.CustomList[(int)button.ID].gameID, this._doc.CustomList[(int)button.ID].hasPassword, "");
+ }
+ result = true;
+ }
+ return result;
+ }
+
+ private bool OnDetailButtonClicked(IXUIButton button)
+ {
+ this.ShowDetailByIndex((int)button.ID);
+ return true;
+ }
+
+ public bool ShowDetailByIndex(int index)
+ {
+ bool flag = index >= this.wrapCount;
+ bool result;
+ if (flag)
+ {
+ result = false;
+ }
+ else
+ {
+ bool flag2 = this._doc.SelfCustomData != null;
+ if (flag2)
+ {
+ bool flag3 = index == 0;
+ if (flag3)
+ {
+ this._doc.CurrentCustomData = this._doc.SelfCustomData;
+ }
+ else
+ {
+ this._doc.CurrentCustomData = this._doc.CustomList[index - 1];
+ }
+ }
+ else
+ {
+ this._doc.CurrentCustomData = this._doc.CustomList[index];
+ }
+ DlgBase<CustomBattleView, TabDlgBehaviour>.singleton.ShowCustomModeDetailHandler();
+ result = true;
+ }
+ return result;
+ }
+
+ public void ShowSelfDetail()
+ {
+ this._doc.CurrentCustomData = this._doc.SelfCustomData;
+ DlgBase<CustomBattleView, TabDlgBehaviour>.singleton.ShowCustomModeDetailHandler();
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/CustomBattle/CustomBattleCustomModeListHandler.cs.meta b/Client/Assets/Scripts/XMainClient/UI/CustomBattle/CustomBattleCustomModeListHandler.cs.meta
new file mode 100644
index 00000000..4afdd4b9
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/CustomBattle/CustomBattleCustomModeListHandler.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: ea74f24d0b7939b40aba295ab2204107
+timeCreated: 1611404779
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/CustomBattle/CustomBattleMatchingHandler.cs b/Client/Assets/Scripts/XMainClient/UI/CustomBattle/CustomBattleMatchingHandler.cs
new file mode 100644
index 00000000..14fb4780
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/CustomBattle/CustomBattleMatchingHandler.cs
@@ -0,0 +1,40 @@
+using System;
+using UILib;
+
+namespace XMainClient.UI.CustomBattle
+{
+ internal class CustomBattleMatchingHandler : DlgHandlerBase
+ {
+ protected override string FileName
+ {
+ get
+ {
+ return "GameSystem/CustomBattle/MatchingFrame";
+ }
+ }
+
+ private XCustomBattleDocument _doc = null;
+
+ private IXUIButton _cancel;
+
+ protected override void Init()
+ {
+ base.Init();
+ this._doc = XDocuments.GetSpecificDocument<XCustomBattleDocument>(XCustomBattleDocument.uuID);
+ this._cancel = (base.transform.Find("Cancel").GetComponent("XUIButton") as IXUIButton);
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ this._cancel.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnCancelButtonClicked));
+ }
+
+ private bool OnCancelButtonClicked(IXUIButton button)
+ {
+ this._doc.SendCustomBattleUnMatch();
+ base.SetVisible(false);
+ return true;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/CustomBattle/CustomBattleMatchingHandler.cs.meta b/Client/Assets/Scripts/XMainClient/UI/CustomBattle/CustomBattleMatchingHandler.cs.meta
new file mode 100644
index 00000000..1a772b19
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/CustomBattle/CustomBattleMatchingHandler.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 9a9a41dfb20578340ad1e457c2fec5f5
+timeCreated: 1611404201
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/CustomBattle/CustomBattlePasswordSettingHandler.cs b/Client/Assets/Scripts/XMainClient/UI/CustomBattle/CustomBattlePasswordSettingHandler.cs
new file mode 100644
index 00000000..e45ce9a7
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/CustomBattle/CustomBattlePasswordSettingHandler.cs
@@ -0,0 +1,130 @@
+using System;
+using UILib;
+using XMainClient.UI.UICommon;
+
+namespace XMainClient.UI.CustomBattle
+{
+ internal class CustomBattlePasswordSettingHandler : DlgHandlerBase
+ {
+ protected override string FileName
+ {
+ get
+ {
+ return "GameSystem/CustomBattle/PasswordSettingFrame";
+ }
+ }
+
+ private XCustomBattleDocument _doc = null;
+
+ private IXUIButton _ok;
+
+ private IXUIButton _cancel;
+
+ private IXUIInput _password;
+
+ private bool passwordForJoin = false;
+
+ protected override void Init()
+ {
+ base.Init();
+ this._doc = XDocuments.GetSpecificDocument<XCustomBattleDocument>(XCustomBattleDocument.uuID);
+ this._ok = (base.transform.Find("OK").GetComponent("XUIButton") as IXUIButton);
+ this._cancel = (base.transform.Find("Cancel").GetComponent("XUIButton") as IXUIButton);
+ this._password = (base.transform.Find("Password").GetComponent("XUIInput") as IXUIInput);
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ this._ok.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnOKButtonClicked));
+ this._cancel.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnCancelButtonClicked));
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ this.passwordForJoin = this._doc.passwordForJoin;
+ this._doc.passwordForJoin = false;
+ this.RefreshData();
+ }
+
+ public override void RefreshData()
+ {
+ base.RefreshData();
+ bool flag = DlgBase<CustomBattleView, TabDlgBehaviour>.singleton._CustomModeCreateHandler != null && DlgBase<CustomBattleView, TabDlgBehaviour>.singleton._CustomModeCreateHandler.IsVisible();
+ if (flag)
+ {
+ bool flag2 = this._doc.CustomCreateData.hasPassword && !string.IsNullOrEmpty(this._doc.CustomCreateData.password);
+ if (flag2)
+ {
+ this._password.SetText(this._doc.CustomCreateData.password);
+ }
+ }
+ }
+
+ private bool OnOKButtonClicked(IXUIButton button)
+ {
+ bool flag = this.passwordForJoin;
+ bool result;
+ if (flag)
+ {
+ bool flag2 = this._password.GetText() == this._password.GetDefault();
+ if (flag2)
+ {
+ this._doc.SendCustomBattleJoin(this._doc.CurrentCustomData.gameID, false, "");
+ }
+ else
+ {
+ this._doc.SendCustomBattleJoin(this._doc.CurrentCustomData.gameID, false, this._password.GetText());
+ }
+ base.SetVisible(false);
+ result = true;
+ }
+ else
+ {
+ bool flag3 = this._password.GetText() == "" || this._password.GetText() == this._password.GetDefault();
+ if (flag3)
+ {
+ bool flag4 = DlgBase<CustomBattleView, TabDlgBehaviour>.singleton._CustomModeCreateHandler != null && DlgBase<CustomBattleView, TabDlgBehaviour>.singleton._CustomModeCreateHandler.IsVisible();
+ if (flag4)
+ {
+ this._doc.CustomCreateData.hasPassword = false;
+ this._doc.CustomCreateData.password = "";
+ DlgBase<CustomBattleView, TabDlgBehaviour>.singleton._CustomModeCreateHandler.SetPasswordSwitchSprite(false);
+ }
+ }
+ else
+ {
+ bool flag5 = DlgBase<CustomBattleView, TabDlgBehaviour>.singleton._CustomModeCreateHandler != null && DlgBase<CustomBattleView, TabDlgBehaviour>.singleton._CustomModeCreateHandler.IsVisible();
+ if (flag5)
+ {
+ this._doc.CustomCreateData.hasPassword = true;
+ this._doc.CustomCreateData.password = this._password.GetText();
+ DlgBase<CustomBattleView, TabDlgBehaviour>.singleton._CustomModeCreateHandler.SetPasswordSwitchSprite(true);
+ }
+ }
+ bool flag6 = DlgBase<CustomBattleView, TabDlgBehaviour>.singleton._CustomModeBriefHandler != null && DlgBase<CustomBattleView, TabDlgBehaviour>.singleton._CustomModeBriefHandler.IsVisible();
+ if (flag6)
+ {
+ this._doc.SendCustomBattleModifyPassword(this._doc.CurrentCustomData.gameID, this._password.GetText());
+ }
+ base.SetVisible(false);
+ result = true;
+ }
+ return result;
+ }
+
+ private bool OnCancelButtonClicked(IXUIButton button)
+ {
+ bool flag = DlgBase<CustomBattleView, TabDlgBehaviour>.singleton._CustomModeCreateHandler != null && DlgBase<CustomBattleView, TabDlgBehaviour>.singleton._CustomModeCreateHandler.IsVisible();
+ if (flag)
+ {
+ this._doc.CustomCreateData.hasPassword = false;
+ this._doc.CustomCreateData.password = "";
+ DlgBase<CustomBattleView, TabDlgBehaviour>.singleton._CustomModeCreateHandler.SetPasswordSwitchSprite(false);
+ }
+ base.SetVisible(false);
+ return true;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/CustomBattle/CustomBattlePasswordSettingHandler.cs.meta b/Client/Assets/Scripts/XMainClient/UI/CustomBattle/CustomBattlePasswordSettingHandler.cs.meta
new file mode 100644
index 00000000..ea6be6e6
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/CustomBattle/CustomBattlePasswordSettingHandler.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: efb5e705336a38b4691c4457bfa2ee5c
+timeCreated: 1611404805
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/CustomBattleView.cs b/Client/Assets/Scripts/XMainClient/UI/CustomBattleView.cs
new file mode 100644
index 00000000..656bd634
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/CustomBattleView.cs
@@ -0,0 +1,257 @@
+using System;
+using UILib;
+using XMainClient.UI.CustomBattle;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class CustomBattleView : TabDlgBase<CustomBattleView>
+ {
+ public override string fileName
+ {
+ get
+ {
+ return "GameSystem/CustomBattle/CustomBattleDlg";
+ }
+ }
+
+ public override int layer
+ {
+ get
+ {
+ return 1;
+ }
+ }
+
+ public override bool autoload
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override int sysid
+ {
+ get
+ {
+ return XFastEnumIntEqualityComparer<XSysDefine>.ToInt(XSysDefine.XSys_CustomBattle);
+ }
+ }
+
+ protected override bool bHorizontal
+ {
+ get
+ {
+ return false;
+ }
+ }
+
+ private XCustomBattleDocument _doc = null;
+
+ public CustomBattleBountyModeDetailHandler _BountyModeDetailHandler = null;
+
+ public CustomBattleBountyModeListHandler _BountyModeListHandler = null;
+
+ public CustomBattleBriefHandler _CustomModeBriefHandler = null;
+
+ public CustomBattleChestHandler _ChestHandler = null;
+
+ public CustomBattleCustomModeCreateHandler _CustomModeCreateHandler = null;
+
+ public CustomBattleCustomModeDetailHandler _CustomModeDetailHandler = null;
+
+ public CustomBattleCustomModeListHandler _CustomModeListHandler = null;
+
+ public CustomBattleMatchingHandler _MatchingHandler = null;
+
+ public CustomBattlePasswordSettingHandler _PasswordSettingHandler = null;
+
+ private IXUIButton _help;
+
+ private IXUIButton _shop;
+
+ protected override void Init()
+ {
+ base.Init();
+ this._doc = XDocuments.GetSpecificDocument<XCustomBattleDocument>(XCustomBattleDocument.uuID);
+ this._help = (base.uiBehaviour.transform.Find("Bg/Help").GetComponent("XUIButton") as IXUIButton);
+ this._shop = (base.uiBehaviour.transform.Find("Bg/BtnShop").GetComponent("XUIButton") as IXUIButton);
+ base.RegisterSubSysRedPointMgr(XSysDefine.XSys_CustomBattle);
+ }
+
+ protected override void OnUnload()
+ {
+ DlgHandlerBase.EnsureUnload<CustomBattleBountyModeDetailHandler>(ref this._BountyModeDetailHandler);
+ DlgHandlerBase.EnsureUnload<CustomBattleBountyModeListHandler>(ref this._BountyModeListHandler);
+ DlgHandlerBase.EnsureUnload<CustomBattleBriefHandler>(ref this._CustomModeBriefHandler);
+ DlgHandlerBase.EnsureUnload<CustomBattleChestHandler>(ref this._ChestHandler);
+ DlgHandlerBase.EnsureUnload<CustomBattleCustomModeCreateHandler>(ref this._CustomModeCreateHandler);
+ DlgHandlerBase.EnsureUnload<CustomBattleCustomModeDetailHandler>(ref this._CustomModeDetailHandler);
+ DlgHandlerBase.EnsureUnload<CustomBattleCustomModeListHandler>(ref this._CustomModeListHandler);
+ DlgHandlerBase.EnsureUnload<CustomBattleMatchingHandler>(ref this._MatchingHandler);
+ DlgHandlerBase.EnsureUnload<CustomBattlePasswordSettingHandler>(ref this._PasswordSettingHandler);
+ base.OnUnload();
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ this._help.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnHelpClicked));
+ this._shop.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnShopClicked));
+ }
+
+ private bool OnCloseClicked(IXUIButton button)
+ {
+ this.SetVisible(false, true);
+ return true;
+ }
+
+ private bool OnHelpClicked(IXUIButton button)
+ {
+ DlgBase<XCommonHelpTipView, XCommonHelpTipBehaviour>.singleton.ShowHelp(XSysDefine.XSys_CustomBattle);
+ return true;
+ }
+
+ private bool OnShopClicked(IXUIButton button)
+ {
+ XSingleton<XGameSysMgr>.singleton.OpenSystem(XSysDefine.XSys_Mall_AllPkMatch, 0UL);
+ return true;
+ }
+
+ public void ShowBountyModeDetailHandler()
+ {
+ DlgHandlerBase.EnsureCreate<CustomBattleBountyModeDetailHandler>(ref this._BountyModeDetailHandler, base.uiBehaviour.m_root, true, null);
+ }
+
+ public void ShowBountyModeListHandler()
+ {
+ this.HideAll();
+ DlgHandlerBase.EnsureCreate<CustomBattleBountyModeListHandler>(ref this._BountyModeListHandler, base.uiBehaviour.m_root, true, null);
+ }
+
+ public void ShowCustomModeBriefHandler()
+ {
+ DlgHandlerBase.EnsureCreate<CustomBattleBriefHandler>(ref this._CustomModeBriefHandler, base.uiBehaviour.m_root, true, null);
+ }
+
+ public void ShowChestHandler()
+ {
+ DlgHandlerBase.EnsureCreate<CustomBattleChestHandler>(ref this._ChestHandler, base.uiBehaviour.m_root, true, null);
+ }
+
+ public void ShowCustomModeCreateHandler()
+ {
+ DlgHandlerBase.EnsureCreate<CustomBattleCustomModeCreateHandler>(ref this._CustomModeCreateHandler, base.uiBehaviour.m_root, true, null);
+ }
+
+ public void ShowCustomModeDetailHandler()
+ {
+ this.HideAll();
+ DlgHandlerBase.EnsureCreate<CustomBattleCustomModeDetailHandler>(ref this._CustomModeDetailHandler, base.uiBehaviour.m_root, true, null);
+ }
+
+ public void ShowCustomModeListHandler()
+ {
+ this.HideAll();
+ DlgHandlerBase.EnsureCreate<CustomBattleCustomModeListHandler>(ref this._CustomModeListHandler, base.uiBehaviour.m_root, true, null);
+ }
+
+ public void ShowMatchingHandler()
+ {
+ DlgHandlerBase.EnsureCreate<CustomBattleMatchingHandler>(ref this._MatchingHandler, base.uiBehaviour.m_root, true, null);
+ }
+
+ public void ShowPasswordSettingHandler()
+ {
+ DlgHandlerBase.EnsureCreate<CustomBattlePasswordSettingHandler>(ref this._PasswordSettingHandler, base.uiBehaviour.m_root, true, null);
+ }
+
+ private void HideHandler(DlgHandlerBase handler)
+ {
+ bool flag = handler == null;
+ if (!flag)
+ {
+ handler.SetVisible(false);
+ }
+ }
+
+ private void HideAll()
+ {
+ this.HideHandler(this._BountyModeDetailHandler);
+ this.HideHandler(this._BountyModeListHandler);
+ this.HideHandler(this._CustomModeBriefHandler);
+ this.HideHandler(this._ChestHandler);
+ this.HideHandler(this._CustomModeCreateHandler);
+ this.HideHandler(this._CustomModeDetailHandler);
+ this.HideHandler(this._CustomModeListHandler);
+ this.HideHandler(this._MatchingHandler);
+ this.HideHandler(this._PasswordSettingHandler);
+ }
+
+ public override void SetupHandlers(XSysDefine sys)
+ {
+ if (sys != XSysDefine.XSys_CustomBattle_BountyMode)
+ {
+ if (sys == XSysDefine.XSys_CustomBattle_CustomMode)
+ {
+ bool flag = this._doc.SelfCustomData != null;
+ if (flag)
+ {
+ this._doc.CurrentCustomData = this._doc.SelfCustomData;
+ this.ShowCustomModeDetailHandler();
+ }
+ else
+ {
+ this.ShowCustomModeListHandler();
+ }
+ }
+ }
+ else
+ {
+ bool flag2 = this._doc.CurrentBountyData != null && this._doc.CurrentBountyData.gameID == this._doc.CacheGameID;
+ if (flag2)
+ {
+ this.ShowBountyModeListHandler();
+ this.ShowBountyModeDetailHandler();
+ }
+ else
+ {
+ this.ShowBountyModeListHandler();
+ }
+ }
+ this._doc.CacheGameID = 0UL;
+ }
+
+ public override void OnUpdate()
+ {
+ base.OnUpdate();
+ bool flag = this._BountyModeListHandler != null;
+ if (flag)
+ {
+ this._BountyModeListHandler.OnUpdate();
+ }
+ bool flag2 = this._BountyModeDetailHandler != null;
+ if (flag2)
+ {
+ this._BountyModeDetailHandler.OnUpdate();
+ }
+ bool flag3 = this._CustomModeDetailHandler != null;
+ if (flag3)
+ {
+ this._CustomModeDetailHandler.OnUpdate();
+ }
+ bool flag4 = this._ChestHandler != null;
+ if (flag4)
+ {
+ this._ChestHandler.OnUpdate();
+ }
+ bool flag5 = this._CustomModeBriefHandler != null;
+ if (flag5)
+ {
+ this._CustomModeBriefHandler.OnUpdate();
+ }
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/CustomBattleView.cs.meta b/Client/Assets/Scripts/XMainClient/UI/CustomBattleView.cs.meta
new file mode 100644
index 00000000..fa46dd02
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/CustomBattleView.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: c542c62af9160cb4897a21f1924707be
+timeCreated: 1611404505
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/CutSceneUI.cs b/Client/Assets/Scripts/XMainClient/UI/CutSceneUI.cs
new file mode 100644
index 00000000..887ab86e
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/CutSceneUI.cs
@@ -0,0 +1,121 @@
+using System;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ public class CutSceneUI : DlgBase<CutSceneUI, CutSceneUIBehaviour>
+ {
+ public override string fileName
+ {
+ get
+ {
+ return "Common/CutSceneUI";
+ }
+ }
+
+ public override int layer
+ {
+ get
+ {
+ return 1;
+ }
+ }
+
+ public override bool exclusive
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override bool autoload
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ protected override void Init()
+ {
+ base.uiBehaviour.m_BG.SetVisible(true);
+ base.uiBehaviour.m_Text.SetText("");
+ }
+
+ public override void RegisterEvent()
+ {
+ base.uiBehaviour.m_Skip.RegisterLabelClickEventHandler(new LabelClickEventHandler(this.OnSkipClick));
+ base.uiBehaviour.m_Overlay.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnOverlayClick));
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ base.uiBehaviour.m_Overlay.gameObject.SetActive(true);
+ base.uiBehaviour.m_Skip.gameObject.SetActive(false);
+ base.uiBehaviour.m_IntroTween.gameObject.SetActive(false);
+ }
+
+ protected override void OnHide()
+ {
+ base.OnHide();
+ base.uiBehaviour.m_Text.SetText("");
+ }
+
+ protected void OnSkipClick(IXUILabel uiSprite)
+ {
+ bool isPlaying = XSingleton<XCutScene>.singleton.IsPlaying;
+ if (isPlaying)
+ {
+ XSingleton<XCutScene>.singleton.Stop(false);
+ }
+ }
+
+ protected void OnOverlayClick(IXUISprite go)
+ {
+ bool syncMode = XSingleton<XGame>.singleton.SyncMode;
+ if (!syncMode)
+ {
+ base.uiBehaviour.m_Overlay.gameObject.SetActive(false);
+ base.uiBehaviour.m_Skip.gameObject.SetActive(true);
+ }
+ }
+
+ public void SetText(string text)
+ {
+ bool flag = !base.IsVisible();
+ if (flag)
+ {
+ this.SetVisible(true, true);
+ }
+ base.uiBehaviour.m_Text.SetText(text);
+ }
+
+ public void SetIntroText(bool enabled, string name, string text, float x, float y)
+ {
+ bool flag = !base.IsVisible();
+ if (!flag)
+ {
+ if (enabled)
+ {
+ base.uiBehaviour.m_Name.SetText(name);
+ base.uiBehaviour.m_IntroTween.gameObject.transform.localPosition = new Vector2(x, y);
+ base.uiBehaviour.m_IntroText.SetText(text);
+ base.uiBehaviour.m_IntroTween.SetTweenGroup(0);
+ base.uiBehaviour.m_IntroTween.ResetTweenByGroup(true, 0);
+ base.uiBehaviour.m_IntroTween.PlayTween(true, -1f);
+ }
+ else
+ {
+ base.uiBehaviour.m_IntroTween.SetTweenGroup(1);
+ base.uiBehaviour.m_IntroTween.ResetTweenByGroup(true, 1);
+ base.uiBehaviour.m_IntroTween.PlayTween(true, -1f);
+ }
+ }
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/CutSceneUI.cs.meta b/Client/Assets/Scripts/XMainClient/UI/CutSceneUI.cs.meta
new file mode 100644
index 00000000..7b53d97e
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/CutSceneUI.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 715b5415dfff02b4dbaf6130c89b11d5
+timeCreated: 1611403934
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/CutSceneUIBehaviour.cs b/Client/Assets/Scripts/XMainClient/UI/CutSceneUIBehaviour.cs
new file mode 100644
index 00000000..2618c780
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/CutSceneUIBehaviour.cs
@@ -0,0 +1,35 @@
+using System;
+using UILib;
+using XMainClient.UI.UICommon;
+
+namespace XMainClient.UI
+{
+ public class CutSceneUIBehaviour : DlgBehaviourBase
+ {
+ public IXUISprite m_BG;
+
+ public IXUILabel m_Text;
+
+ public IXUILabel m_Skip;
+
+ public IXUISprite m_Overlay;
+
+ public IXUITweenTool m_IntroTween;
+
+ public IXUILabel m_Name;
+
+ public IXUILabel m_IntroText;
+
+ private void Awake()
+ {
+ this.m_BG = (base.transform.Find("_canvas/DownBG").GetComponent("XUISprite") as IXUISprite);
+ this.m_Text = (base.transform.Find("_canvas/DownBG/Text").GetComponent("XUILabel") as IXUILabel);
+ this.m_Skip = (base.transform.Find("_canvas/DownBG/UpBG/Skip").GetComponent("XUILabel") as IXUILabel);
+ this.m_Overlay = (base.transform.Find("_canvas/Overlay").GetComponent("XUISprite") as IXUISprite);
+ this.m_IntroTween = (base.transform.Find("_canvas/Intro").GetComponent("XUIPlayTween") as IXUITweenTool);
+ this.m_Name = (base.transform.Find("_canvas/Intro/Name").GetComponent("XUILabel") as IXUILabel);
+ this.m_IntroText = (base.transform.Find("_canvas/Intro/Text").GetComponent("XUILabel") as IXUILabel);
+ this.m_IntroTween.gameObject.SetActive(false);
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/CutSceneUIBehaviour.cs.meta b/Client/Assets/Scripts/XMainClient/UI/CutSceneUIBehaviour.cs.meta
new file mode 100644
index 00000000..08b3088a
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/CutSceneUIBehaviour.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: ff16b068406664b4a969727b28c51ee9
+timeCreated: 1611404945
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/DailyActivityDlg.cs b/Client/Assets/Scripts/XMainClient/UI/DailyActivityDlg.cs
new file mode 100644
index 00000000..384755c8
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/DailyActivityDlg.cs
@@ -0,0 +1,96 @@
+using System;
+using UnityEngine;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class DailyActivityDlg : TabDlgBase<DailyActivityDlg>
+ {
+ public ActivityHandler ActivityHandler
+ {
+ get
+ {
+ return this.m_activityHandler;
+ }
+ }
+
+ public override string fileName
+ {
+ get
+ {
+ return "GameSystem/DailyActivity/DailyActivityDlg";
+ }
+ }
+
+ public override int group
+ {
+ get
+ {
+ return 1;
+ }
+ }
+
+ protected override bool bHorizontal
+ {
+ get
+ {
+ return false;
+ }
+ }
+
+ private ActivityHandler m_activityHandler;
+
+ public XDailyActivitiesView _livenessActivityHandler;
+
+ private Transform parent;
+
+ protected override void Init()
+ {
+ base.Init();
+ base.RegisterSubSysRedPointMgr(XSysDefine.XSys_DailyAcitivity);
+ }
+
+ protected override void OnLoad()
+ {
+ base.OnLoad();
+ this.parent = base.uiBehaviour.transform.Find("Bg");
+ }
+
+ protected override void OnUnload()
+ {
+ base.OnUnload();
+ DlgHandlerBase.EnsureUnload<ActivityHandler>(ref this.m_activityHandler);
+ DlgHandlerBase.EnsureUnload<XDailyActivitiesView>(ref this._livenessActivityHandler);
+ }
+
+ public override void SetupHandlers(XSysDefine sys)
+ {
+ XSysDefine xsysDefine = sys;
+ if (xsysDefine != XSysDefine.XSys_Activity)
+ {
+ if (xsysDefine != XSysDefine.XSys_Reward_Activity)
+ {
+ XSingleton<XDebug>.singleton.AddErrorLog("System has not finished:", sys.ToString(), null, null, null, null);
+ }
+ else
+ {
+ base._AddActiveHandler(DlgHandlerBase.EnsureCreate<XDailyActivitiesView>(ref this._livenessActivityHandler, this.parent, true, this));
+ }
+ }
+ else
+ {
+ base._AddActiveHandler(DlgHandlerBase.EnsureCreate<ActivityHandler>(ref this.m_activityHandler, this.parent, true, this));
+ }
+ }
+
+ public void ShowSubSystem(XSysDefine sys)
+ {
+ bool flag = !base.IsLoaded();
+ if (flag)
+ {
+ base.Load();
+ }
+ base.ShowSubGamsSystem(sys);
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/DailyActivityDlg.cs.meta b/Client/Assets/Scripts/XMainClient/UI/DailyActivityDlg.cs.meta
new file mode 100644
index 00000000..9f102eb6
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/DailyActivityDlg.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 70bcc31f37827eb4c90d9f9367cb90c5
+timeCreated: 1611403932
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/DanceMotionHandler.cs b/Client/Assets/Scripts/XMainClient/UI/DanceMotionHandler.cs
new file mode 100644
index 00000000..277680e3
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/DanceMotionHandler.cs
@@ -0,0 +1,192 @@
+using System;
+using System.Collections.Generic;
+using KKSG;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class DanceMotionHandler : DlgHandlerBase
+ {
+ private IXUIList m_MotionList;
+
+ private XUIPool m_MotionPool;
+
+ private IXUISprite m_MotionPanelBg;
+
+ private GameObject m_MotionPanel;
+
+ private GameObject m_ConditionPanel;
+
+ private IXUIList m_ConditionList;
+
+ private XUIPool m_ConditionPool;
+
+ private IXUISprite m_ConditionPanelBg;
+
+ private List<DanceMotionData> m_listMotionData;
+
+ private GameObject m_LastSelect;
+
+ protected override void Init()
+ {
+ this.m_MotionPanel = base.PanelObject.transform.Find("MotionFrame").gameObject;
+ this.m_MotionPanelBg = (base.transform.Find("MotionFrame/Bg").GetComponent("XUISprite") as IXUISprite);
+ this.m_MotionList = (base.transform.Find("MotionFrame/MotionSV/MotionList").GetComponent("XUIList") as IXUIList);
+ GameObject gameObject = this.m_MotionList.gameObject.transform.Find("DanceTpl").gameObject;
+ this.m_MotionPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+ this.m_MotionPool.SetupPool(this.m_MotionList.gameObject, gameObject, 3u, false);
+ this.m_MotionList.Refresh();
+ this.m_ConditionPanel = base.PanelObject.transform.Find("UnlockFrame").gameObject;
+ this.m_ConditionPanel.SetActive(false);
+ this.m_ConditionList = (base.transform.Find("UnlockFrame/Condition/ScrollView/ConditionList").GetComponent("XUIList") as IXUIList);
+ this.m_ConditionPanelBg = (base.PanelObject.transform.Find("UnlockFrame/Bg").GetComponent("XUISprite") as IXUISprite);
+ GameObject gameObject2 = this.m_ConditionList.gameObject.transform.Find("tpl").gameObject;
+ this.m_ConditionPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+ this.m_ConditionPool.SetupPool(this.m_ConditionList.gameObject, gameObject2, 3u, false);
+ this.m_ConditionList.Refresh();
+ base.Init();
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ this.m_MotionPanelBg.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnMotionPanelClicked));
+ this.m_ConditionPanelBg.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnConditionPanelClose));
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ Vector3 position = this.m_MotionPanel.transform.position;
+ position.y = DlgBase<XMainInterface, XMainInterfaceBehaviour>.singleton.GetSelectDanceMotionBtnPos().y;
+ this.m_MotionPanel.transform.position = position;
+ position = this.m_ConditionPanel.transform.position;
+ position.y = DlgBase<XMainInterface, XMainInterfaceBehaviour>.singleton.GetSelectDanceMotionBtnPos().y;
+ this.m_ConditionPanel.transform.position = position;
+ }
+
+ protected override void OnHide()
+ {
+ base.OnHide();
+ this.ShowUnlockPanel(false, 0u, 0u);
+ bool flag = this.m_LastSelect != null;
+ if (flag)
+ {
+ this.m_LastSelect.SetActive(false);
+ }
+ }
+
+ private void OnMotionPanelClicked(IXUISprite btn)
+ {
+ base.SetVisible(false);
+ }
+
+ private void OnConditionPanelClose(IXUISprite btn)
+ {
+ this.ShowUnlockPanel(false, 0u, 0u);
+ }
+
+ public void RefreshMotionPanel(List<DanceMotionData> listMotionData)
+ {
+ bool flag = !base.IsVisible() || !this.m_MotionPanel.activeSelf;
+ if (!flag)
+ {
+ this.m_listMotionData = listMotionData;
+ this.m_MotionPool.FakeReturnAll();
+ for (int i = 0; i < listMotionData.Count; i++)
+ {
+ DanceConfig.RowData danceConfig = XDanceDocument.GetDanceConfig(listMotionData[i].motionID);
+ GameObject gameObject = this.m_MotionPool.FetchGameObject(false);
+ gameObject.name = string.Format("DanceBtn{0}", i);
+ gameObject.transform.parent = this.m_MotionList.gameObject.transform;
+ IXUISprite ixuisprite = gameObject.transform.Find("Icon").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.SetSprite(danceConfig.HallBtnIcon, danceConfig.IconAtlas, false);
+ ixuisprite.MakePixelPerfect();
+ GameObject gameObject2 = gameObject.transform.Find("Lock").gameObject;
+ gameObject2.SetActive(!XDanceDocument.Doc.IsUnlock(listMotionData[i].valid, danceConfig.Condition));
+ IXUIButton ixuibutton = gameObject.transform.GetComponent("XUIButton") as IXUIButton;
+ ixuibutton.ID = (ulong)((long)i);
+ ixuibutton.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnDanceMotionBtnClicked));
+ GameObject gameObject3 = ixuibutton.gameObject.transform.Find("Select").gameObject;
+ gameObject3.SetActive(false);
+ }
+ this.m_MotionPool.ActualReturnAll(false);
+ this.m_MotionList.Refresh();
+ this.ShowUnlockPanel(false, 0u, 0u);
+ }
+ }
+
+ private bool OnDanceMotionBtnClicked(IXUIButton btn)
+ {
+ bool flag = this.m_LastSelect != null;
+ if (flag)
+ {
+ this.m_LastSelect.SetActive(false);
+ }
+ this.m_LastSelect = btn.gameObject.transform.Find("Select").gameObject;
+ this.m_LastSelect.SetActive(true);
+ int num = (int)btn.ID;
+ bool flag2 = this.m_listMotionData != null && num < this.m_listMotionData.Count;
+ if (flag2)
+ {
+ uint motionID = this.m_listMotionData[num].motionID;
+ GameObject gameObject = btn.gameObject.transform.Find("Lock").gameObject;
+ bool activeSelf = gameObject.activeSelf;
+ if (activeSelf)
+ {
+ this.ShowUnlockPanel(true, motionID, this.m_listMotionData[num].valid);
+ }
+ else
+ {
+ this.ShowUnlockPanel(false, 0u, 0u);
+ XDanceDocument.Doc.ReqStartJustDance(motionID);
+ }
+ }
+ return true;
+ }
+
+ private void ShowUnlockPanel(bool show, uint motionID = 0u, uint valid = 0u)
+ {
+ this.m_ConditionPanel.SetActive(show);
+ DanceConfig.RowData danceConfig = XDanceDocument.GetDanceConfig(motionID);
+ bool flag = show && danceConfig != null;
+ if (flag)
+ {
+ this.m_ConditionPool.FakeReturnAll();
+ for (int i = 0; i < danceConfig.Condition.Count; i++)
+ {
+ GameObject gameObject = this.m_ConditionPool.FetchGameObject(false);
+ gameObject.transform.parent = this.m_ConditionList.gameObject.transform;
+ IXUILabel ixuilabel = gameObject.transform.Find("condition1").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel.SetText((i < danceConfig.ConditionDesc.Length) ? danceConfig.ConditionDesc[i] : "?");
+ IXUILabel ixuilabel2 = gameObject.transform.Find("Label").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel2.SetText((i < danceConfig.GoText.Length) ? danceConfig.GoText[i] : "?");
+ ixuilabel2.ID = (ulong)((long)((i < danceConfig.GoSystemID.Length) ? danceConfig.GoSystemID[i] : 0));
+ ixuilabel2.RegisterLabelClickEventHandler(new LabelClickEventHandler(this.OnGoSystemBtnClicked));
+ ixuilabel2.SetVisible(!XDanceDocument.Doc.IsUnlock(valid, danceConfig.Condition[i, 0]));
+ GameObject gameObject2 = gameObject.transform.Find("ok").gameObject;
+ gameObject2.SetActive(XDanceDocument.Doc.IsUnlock(valid, danceConfig.Condition[i, 0]));
+ }
+ this.m_ConditionPool.ActualReturnAll(false);
+ this.m_ConditionList.Refresh();
+ }
+ }
+
+ private void OnGoSystemBtnClicked(IXUILabel label)
+ {
+ int sys = (int)label.ID;
+ bool flag = !XSingleton<XGameSysMgr>.singleton.IsSystemOpen(sys);
+ if (flag)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(ErrorCode.ERR_SYS_NOTOPEN, "fece00");
+ }
+ else
+ {
+ XSingleton<XGameSysMgr>.singleton.OpenSystem(sys);
+ }
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/DanceMotionHandler.cs.meta b/Client/Assets/Scripts/XMainClient/UI/DanceMotionHandler.cs.meta
new file mode 100644
index 00000000..bc147502
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/DanceMotionHandler.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 91539af90cebc23459388b7ad7670df1
+timeCreated: 1611404142
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/DemoUI.cs b/Client/Assets/Scripts/XMainClient/UI/DemoUI.cs
new file mode 100644
index 00000000..33ed55d7
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/DemoUI.cs
@@ -0,0 +1,372 @@
+using System;
+using System.Collections.Generic;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUpdater;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class DemoUI : DlgBase<DemoUI, DemoUIBehaviour>
+ {
+ public override string fileName
+ {
+ get
+ {
+ return "DebugDlg";
+ }
+ }
+
+ public override int layer
+ {
+ get
+ {
+ return 1;
+ }
+ }
+
+ public override bool autoload
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override bool isMainUI
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public static uint MAX_MESSAGE_COUNT = 20u;
+
+ private Queue<string> messages = new Queue<string>();
+
+ private LinkedList<string> inputs = new LinkedList<string>();
+
+ private LinkedListNode<string> lastInput = null;
+
+ private float lastMessageY = 0f;
+
+ private object locker = new object();
+
+ private IPlatform _platform = null;
+
+ protected override void Init()
+ {
+ this._platform = XSingleton<XUpdater.XUpdater>.singleton.XPlatform;
+ }
+
+ public override void Reset()
+ {
+ }
+
+ public override void RegisterEvent()
+ {
+ base.uiBehaviour.m_Button.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnButtonClick));
+ base.uiBehaviour.m_PreviousButton.RegisterClickEventHandler(new ButtonClickEventHandler(this._onPreviousBtnClick));
+ base.uiBehaviour.m_NextButton.RegisterClickEventHandler(new ButtonClickEventHandler(this._onNextBtnClick));
+ base.uiBehaviour.m_Close.RegisterClickEventHandler(new ButtonClickEventHandler(this._onCloseBtnClick));
+ base.uiBehaviour.m_Input.RegisterKeyTriggeredEventHandler(new InputKeyTriggeredEventHandler(this._onKeyTriggered));
+ base.uiBehaviour.m_Input.RegisterSubmitEventHandler(new InputSubmitEventHandler(this.OnSubmit));
+ base.uiBehaviour.m_Open.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnFpsClick));
+ }
+
+ protected override void OnShow()
+ {
+ this._refreshMessages();
+ base.uiBehaviour.m_ScrollView.ResetPosition();
+ base.uiBehaviour.m_Input.selected(true);
+ base.uiBehaviour.m_Bg.SetActive(true);
+ }
+
+ public override void OnUpdate()
+ {
+ this.UpdateFPS();
+ }
+
+ private bool _onPreviousBtnClick(IXUIButton go)
+ {
+ this._onKeyTriggered(base.uiBehaviour.m_Input, (KeyCode)273);
+ return true;
+ }
+
+ private bool _onNextBtnClick(IXUIButton go)
+ {
+ this._onKeyTriggered(base.uiBehaviour.m_Input, (KeyCode)274);
+ return true;
+ }
+
+ private bool _onCloseBtnClick(IXUIButton go)
+ {
+ base.uiBehaviour.m_Bg.SetActive(false);
+ return true;
+ }
+
+ private void _onKeyTriggered(IXUIInput input, KeyCode key)
+ {
+ bool flag = key == (KeyCode)273;
+ if (flag)
+ {
+ bool flag2 = this.inputs.Count == 0;
+ if (flag2)
+ {
+ return;
+ }
+ bool flag3 = this.lastInput != null;
+ if (flag3)
+ {
+ bool flag4 = this.lastInput.Previous != null;
+ if (flag4)
+ {
+ this.lastInput = this.lastInput.Previous;
+ }
+ }
+ else
+ {
+ this.lastInput = this.inputs.Last;
+ }
+ }
+ else
+ {
+ bool flag5 = key == (KeyCode)274;
+ if (!flag5)
+ {
+ return;
+ }
+ bool flag6 = this.inputs.Count == 0;
+ if (flag6)
+ {
+ return;
+ }
+ bool flag7 = this.lastInput != null;
+ if (flag7)
+ {
+ bool flag8 = this.lastInput.Next != null;
+ if (flag8)
+ {
+ this.lastInput = this.lastInput.Next;
+ }
+ }
+ else
+ {
+ this.lastInput = this.inputs.First;
+ }
+ }
+ bool flag9 = this.lastInput != null;
+ if (flag9)
+ {
+ base.uiBehaviour.m_Input.SetText(this.lastInput.Value);
+ }
+ }
+
+ private void UpdateLastLabelPos(IXUILabel label)
+ {
+ this.lastMessageY -= (float)label.spriteHeight;
+ }
+
+ private float GetLastLabelPos(IXUILabel label)
+ {
+ return this.lastMessageY - (float)(label.spriteHeight / 2);
+ }
+
+ private void _refreshMessages()
+ {
+ Vector3 tplPos = base.uiBehaviour.m_MessagePool.TplPos;
+ this.lastMessageY = tplPos.y;
+ base.uiBehaviour.m_MessagePool.ReturnAll(false);
+ base.uiBehaviour.m_ActiveMessages.Clear();
+ foreach (string text in this.messages)
+ {
+ GameObject gameObject = base.uiBehaviour.m_MessagePool.FetchGameObject(false);
+ IXUILabel ixuilabel = gameObject.GetComponent("XUILabel") as IXUILabel;
+ ixuilabel.SetText(text);
+ base.uiBehaviour.m_ActiveMessages.Add(ixuilabel);
+ gameObject.transform.localPosition = new Vector3(tplPos.x, this.GetLastLabelPos(ixuilabel), 0f);
+ this.UpdateLastLabelPos(ixuilabel);
+ }
+ }
+
+ public void AddMessage(string message)
+ {
+ bool flag = !base.IsVisible();
+ if (!flag)
+ {
+ object obj = this.locker;
+ lock (obj)
+ {
+ bool flag2 = (long)this.messages.Count > (long)((ulong)DemoUI.MAX_MESSAGE_COUNT);
+ if (flag2)
+ {
+ this.messages.Dequeue();
+ }
+ this.messages.Enqueue(message);
+ bool flag3 = this.messages.Count != base.uiBehaviour.m_ActiveMessages.Count;
+ if (flag3)
+ {
+ bool flag4 = this.messages.Count - base.uiBehaviour.m_ActiveMessages.Count == 1;
+ if (flag4)
+ {
+ GameObject gameObject = base.uiBehaviour.m_MessagePool.FetchGameObject(false);
+ IXUILabel ixuilabel = gameObject.GetComponent("XUILabel") as IXUILabel;
+ ixuilabel.SetText(message);
+ base.uiBehaviour.m_ActiveMessages.Add(ixuilabel);
+ Vector3 tplPos = base.uiBehaviour.m_MessagePool.TplPos;
+ gameObject.transform.localPosition = new Vector3(tplPos.x, this.GetLastLabelPos(ixuilabel), 0f);
+ this.UpdateLastLabelPos(ixuilabel);
+ }
+ else
+ {
+ this._refreshMessages();
+ }
+ }
+ else
+ {
+ int num = -1;
+ Vector3 tplPos2 = base.uiBehaviour.m_MessagePool.TplPos;
+ this.lastMessageY = tplPos2.y;
+ foreach (string text in this.messages)
+ {
+ IXUILabel ixuilabel2 = base.uiBehaviour.m_ActiveMessages[++num];
+ ixuilabel2.SetText(text);
+ ixuilabel2.gameObject.transform.localPosition = new Vector3(tplPos2.x, this.GetLastLabelPos(ixuilabel2), 0f);
+ this.UpdateLastLabelPos(ixuilabel2);
+ }
+ }
+ base.uiBehaviour.m_ScrollView.ResetPosition();
+ }
+ }
+ }
+
+ private void _addInput(string s)
+ {
+ bool flag = (long)this.inputs.Count > (long)((ulong)DemoUI.MAX_MESSAGE_COUNT);
+ if (flag)
+ {
+ this.inputs.RemoveFirst();
+ }
+ this.inputs.AddLast(s);
+ this.lastInput = null;
+ }
+
+ private void OnSubmit(IXUIInput go)
+ {
+ this.Submit();
+ }
+
+ private bool OnButtonClick(IXUIButton go)
+ {
+ this.Submit();
+ return true;
+ }
+
+ private void Submit()
+ {
+ string text = base.uiBehaviour.m_Input.GetText();
+ this._addInput(text);
+ string[] separator = new string[]
+ {
+ "\n"
+ };
+ string[] array = text.Split(separator, StringSplitOptions.None);
+ for (int i = 0; i < array.Length; i++)
+ {
+ this.AddMessage("> " + array[i]);
+ bool flag = !XSingleton<XCommand>.singleton.ProcessCommand(array[i]);
+ if (flag)
+ {
+ this.AddMessage(string.Format("[ff0000]Invalid Command: {0}[-]", array[i]));
+ }
+ }
+ base.uiBehaviour.m_Input.SetText("");
+ base.uiBehaviour.m_Input.selected(true);
+ }
+
+ private bool OnFpsClick(IXUIButton go)
+ {
+ bool activeInHierarchy = base.uiBehaviour.m_Bg.activeInHierarchy;
+ if (activeInHierarchy)
+ {
+ base.uiBehaviour.m_Bg.SetActive(false);
+ }
+ else
+ {
+ base.uiBehaviour.m_Bg.SetActive(true);
+ }
+ return true;
+ }
+
+ public void UpdateFPS()
+ {
+ bool flag = !XSingleton<XTimerMgr>.singleton.NeedFixedUpdate;
+ if (!flag)
+ {
+ bool flag2 = !this._platform.IsPublish();
+ if (flag2)
+ {
+ bool showBuildLog = XSingleton<XGame>.singleton.ShowBuildLog;
+ if (showBuildLog)
+ {
+ string syncModeString = XSingleton<XGame>.singleton.GetSyncModeString();
+ string text = "Debug Q";
+ base.uiBehaviour.m_fps.SetText(string.Concat(new object[]
+ {
+ text,
+ " Build:",
+ XLinkTimeStamp.BuildDateTime.ToString(),
+ "\nFps: ",
+ XSingleton<XGame>.singleton.Fps.ToString("F1"),
+ " Avg Fps: ",
+ XSingleton<XGame>.singleton.FpsAvg.ToString("F1"),
+ "\n",
+ syncModeString,
+ XSingleton<XClientNetwork>.singleton.ServerIP,
+ "\nSend:",
+ XSingleton<XClientNetwork>.singleton.SendBytes,
+ " Recv:",
+ XSingleton<XClientNetwork>.singleton.RecvBytes,
+ " delay:",
+ XSingleton<XServerTimeMgr>.singleton.GetDelay()
+ }));
+ }
+ else
+ {
+ base.uiBehaviour.m_fps.SetText("");
+ }
+ }
+ }
+ }
+
+ public void Toggle()
+ {
+ bool flag = !base.IsVisible();
+ if (flag)
+ {
+ this.SetVisible(true, true);
+ }
+ else
+ {
+ bool activeInHierarchy = base.uiBehaviour.m_Bg.activeInHierarchy;
+ if (activeInHierarchy)
+ {
+ base.uiBehaviour.m_Bg.SetActive(false);
+ base.uiBehaviour.m_Input.selected(false);
+ }
+ else
+ {
+ base.uiBehaviour.m_Bg.SetActive(true);
+ base.uiBehaviour.m_Input.selected(true);
+ }
+ }
+ }
+
+ public bool IsMainUIVisible()
+ {
+ return base.IsVisible() && base.uiBehaviour.m_Bg.activeInHierarchy;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/DemoUI.cs.meta b/Client/Assets/Scripts/XMainClient/UI/DemoUI.cs.meta
new file mode 100644
index 00000000..1ed3a0b1
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/DemoUI.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 38205e7648d521f428b3b8fed9b6f2f4
+timeCreated: 1611403569
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/DemoUIBehaviour.cs b/Client/Assets/Scripts/XMainClient/UI/DemoUIBehaviour.cs
new file mode 100644
index 00000000..e212625a
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/DemoUIBehaviour.cs
@@ -0,0 +1,70 @@
+using System;
+using System.Collections.Generic;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class DemoUIBehaviour : DlgBehaviourBase
+ {
+ public IXUIButton m_Button = null;
+
+ public IXUIButton m_PreviousButton = null;
+
+ public IXUIButton m_NextButton = null;
+
+ public IXUIInput m_Input = null;
+
+ public IXUIButton m_Close = null;
+
+ public XUIPool m_MessagePool;
+
+ public List<IXUILabel> m_ActiveMessages;
+
+ public IXUIScrollView m_ScrollView;
+
+ public GameObject m_Bg;
+
+ public IXUILabel m_fps = null;
+
+ public IXUIButton m_Open = null;
+
+ private void Awake()
+ {
+ this.m_Bg = base.transform.Find("Bg").gameObject;
+ Transform transform = base.transform.Find("Bg/DebugCommitBtn");
+ bool flag = null != transform;
+ if (flag)
+ {
+ this.m_Button = (transform.GetComponent("XUIButton") as IXUIButton);
+ }
+ this.m_PreviousButton = (base.transform.Find("Bg/PreviousBtn").GetComponent("XUIButton") as IXUIButton);
+ this.m_NextButton = (base.transform.Find("Bg/NextBtn").GetComponent("XUIButton") as IXUIButton);
+ this.m_Close = (base.transform.Find("Bg/Close").GetComponent("XUIButton") as IXUIButton);
+ Transform transform2 = base.transform.Find("Bg/DebugDlgInput");
+ bool flag2 = null != transform2;
+ if (flag2)
+ {
+ this.m_Input = (transform2.GetComponent("XUIInput") as IXUIInput);
+ }
+ this.m_ScrollView = (base.transform.Find("Bg/MessageDisplay").GetComponent("XUIScrollView") as IXUIScrollView);
+ this.m_MessagePool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+ this.m_MessagePool.SetupPool(base.transform.Find("Bg/MessageDisplay").gameObject, base.transform.Find("Bg/MessageDisplay/MessageTpl").gameObject, DemoUI.MAX_MESSAGE_COUNT, false);
+ this.m_ActiveMessages = new List<IXUILabel>((int)DemoUI.MAX_MESSAGE_COUNT);
+ Transform transform3 = base.transform.Find("fps");
+ bool flag3 = null != transform3;
+ if (flag3)
+ {
+ this.m_fps = (transform3.GetComponent("XUILabel") as IXUILabel);
+ Transform transform4 = transform3.Find("Open");
+ bool flag4 = transform4 != null;
+ if (flag4)
+ {
+ this.m_Open = (transform4.GetComponent("XUIButton") as IXUIButton);
+ }
+ }
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/DemoUIBehaviour.cs.meta b/Client/Assets/Scripts/XMainClient/UI/DemoUIBehaviour.cs.meta
new file mode 100644
index 00000000..18229ea2
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/DemoUIBehaviour.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 0a290a8fbe6f3cb478febbb03d98fe28
+timeCreated: 1611403161
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/DragonCrusadeBehavior.cs b/Client/Assets/Scripts/XMainClient/UI/DragonCrusadeBehavior.cs
new file mode 100644
index 00000000..10b4b3d9
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/DragonCrusadeBehavior.cs
@@ -0,0 +1,42 @@
+using System;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+
+namespace XMainClient.UI
+{
+ internal class DragonCrusadeBehavior : DlgBehaviourBase
+ {
+ public IXUIButton m_Help;
+
+ public IXUISprite slideSprite = null;
+
+ public GameObject goLoading = null;
+
+ public IXUILabel goLoadingTxt = null;
+
+ public GameObject mMyRank = null;
+
+ public IXUIButton m_closed = null;
+
+ public IXUIButton m_leftBtn = null;
+
+ public IXUIButton m_rightBtn = null;
+
+ public IXUISprite m_myRankSpr = null;
+
+ private void Awake()
+ {
+ this.m_closed = (base.transform.Find("Bg/Close").GetComponent("XUIButton") as IXUIButton);
+ this.m_myRankSpr = (base.transform.Find("Bg/MyRank").GetComponent("XUISprite") as IXUISprite);
+ this.m_leftBtn = (base.transform.Find("Bg/Left").GetComponent("XUIButton") as IXUIButton);
+ this.m_rightBtn = (base.transform.Find("Bg/Right").GetComponent("XUIButton") as IXUIButton);
+ this.slideSprite = (base.transform.Find("Bg").GetComponent("XUISprite") as IXUISprite);
+ this.mMyRank = base.transform.Find("Bg/MyRank/My").gameObject;
+ this.goLoading = base.transform.Find("Loading").gameObject;
+ this.goLoadingTxt = (base.transform.Find("Loading/Bg/Slogan").GetComponent("XUILabel") as IXUILabel);
+ this.goLoading.SetActive(false);
+ this.m_Help = (base.transform.Find("Help").GetComponent("XUIButton") as IXUIButton);
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/DragonCrusadeBehavior.cs.meta b/Client/Assets/Scripts/XMainClient/UI/DragonCrusadeBehavior.cs.meta
new file mode 100644
index 00000000..30c8e1ff
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/DragonCrusadeBehavior.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: e070011d2c7491749b8089e2e7ca478c
+timeCreated: 1611404697
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/DragonCrusadeDlg.cs b/Client/Assets/Scripts/XMainClient/UI/DragonCrusadeDlg.cs
new file mode 100644
index 00000000..faf13010
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/DragonCrusadeDlg.cs
@@ -0,0 +1,618 @@
+using System;
+using System.Collections.Generic;
+using KKSG;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUpdater;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class DragonCrusadeDlg : DlgBase<DragonCrusadeDlg, DragonCrusadeBehavior>
+ {
+ public override string fileName
+ {
+ get
+ {
+ return "DragonCrusade/DragonCrusadeDlg";
+ }
+ }
+
+ public override bool hideMainMenu
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override bool pushstack
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override bool autoload
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public bool isHallUI
+ {
+ get
+ {
+ return XSingleton<XGame>.singleton.CurrentStage.Stage == EXStage.Hall;
+ }
+ }
+
+ public override bool fullscreenui
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override int sysid
+ {
+ get
+ {
+ return 50;
+ }
+ }
+
+ private XDragonCrusadeDocument mDoc = null;
+
+ private GameObject goDragonExpedition = null;
+
+ private IXDragonExpedition ixDragonExpedition = null;
+
+ private XFx _FxFirework = null;
+
+ private const int MAX_RANK = 3;
+
+ public Dictionary<uint, GameObject> listBillBoards = new Dictionary<uint, GameObject>();
+
+ private Vector3 localDefaultScale = new Vector3(-0.02f, 0.02f, 0.02f);
+
+ private Action<bool> mSyncDoneCallBack = null;
+
+ private bool mSyncLoading = false;
+
+ private bool mDoneFinish = false;
+
+ private float intertime = 0.5f;
+
+ private LoadCallBack mDragonExpeditionLoadTask = null;
+
+ private Dictionary<int, XDummy> m_AvatarDummys = new Dictionary<int, XDummy>();
+
+ private class DragonExpeditionLoadTask
+ {
+ private DragonCrusadeDlg mDlg;
+
+ public DragonExpeditionLoadTask(DragonCrusadeDlg dlg)
+ {
+ this.mDlg = dlg;
+ }
+
+ public void LoadFinish(UnityEngine.Object obj)
+ {
+ bool flag = this.mDlg != null;
+ if (flag)
+ {
+ this.mDlg.goDragonExpedition = (obj as GameObject);
+ this.mDlg.LoadPrefabSyncDone();
+ this.mDlg = null;
+ }
+ }
+ }
+
+ protected override void OnLoad()
+ {
+ base.OnLoad();
+ this.mDoc = (XSingleton<XGame>.singleton.Doc.GetXComponent(XDragonCrusadeDocument.uuID) as XDragonCrusadeDocument);
+ bool flag = this.mDragonExpeditionLoadTask == null;
+ if (flag)
+ {
+ this.mDragonExpeditionLoadTask = new LoadCallBack(this.LoadFinish);
+ }
+ }
+
+ protected override void Init()
+ {
+ base.Init();
+ base.uiBehaviour.goLoadingTxt.SetText(XStringDefineProxy.GetString("DragonLoadMessage"));
+ }
+
+ private void LoadFinish(UnityEngine.Object obj, object cbOjb)
+ {
+ bool flag = !base.IsLoaded();
+ if (!flag)
+ {
+ this.goDragonExpedition = (obj as GameObject);
+ this.LoadPrefabSyncDone();
+ }
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ this.m_uiBehaviour.slideSprite.RegisterSpriteDragEventHandler(new SpriteDragEventHandler(this.OnMonsterDrag));
+ this.m_uiBehaviour.slideSprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnMouseClick));
+ base.uiBehaviour.m_Help.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnHelpClicked));
+ this.m_uiBehaviour.m_myRankSpr.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnRankInfo));
+ base.uiBehaviour.m_closed.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnClose));
+ base.uiBehaviour.m_leftBtn.ID = 1UL;
+ base.uiBehaviour.m_rightBtn.ID = 2UL;
+ }
+
+ public bool OnHelpClicked(IXUIButton button)
+ {
+ DlgBase<XCommonHelpTipView, XCommonHelpTipBehaviour>.singleton.ShowHelp(XSysDefine.XSys_DragonCrusade);
+ return true;
+ }
+
+ protected override void OnHide()
+ {
+ base.OnHide();
+ bool flag = this.ixDragonExpedition != null;
+ if (flag)
+ {
+ this.ixDragonExpedition.GetDragonCamera().enabled = false;
+ }
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ base.Alloc3DAvatarPool("DragonCrusadeDlg");
+ bool flag = this.ixDragonExpedition != null;
+ if (flag)
+ {
+ this.ixDragonExpedition.GetDragonCamera().enabled = true;
+ }
+ }
+
+ protected override void OnUnload()
+ {
+ this.mDoneFinish = false;
+ this.mSyncLoading = false;
+ bool flag = this._FxFirework != null;
+ if (flag)
+ {
+ XSingleton<XFxMgr>.singleton.DestroyFx(this._FxFirework, true);
+ }
+ this._FxFirework = null;
+ this.DeleteAvatar();
+ this.UnloadPrefab();
+ foreach (KeyValuePair<uint, GameObject> keyValuePair in this.listBillBoards)
+ {
+ XSingleton<XResourceLoaderMgr>.singleton.UnSafeDestroy(keyValuePair.Value, true, false);
+ }
+ this.listBillBoards.Clear();
+ base.OnUnload();
+ }
+
+ public override void StackRefresh()
+ {
+ base.StackRefresh();
+ base.Alloc3DAvatarPool("DragonCrusadeDlg");
+ bool flag = this.ixDragonExpedition != null;
+ if (flag)
+ {
+ this.ixDragonExpedition.GetDragonCamera().enabled = true;
+ }
+ }
+
+ public override void OnXNGUIClick(GameObject obj, string path)
+ {
+ base.OnXNGUIClick(obj, path);
+ }
+
+ private void LoadPrefab()
+ {
+ }
+
+ private void UnloadPrefab()
+ {
+ this.ixDragonExpedition = null;
+ XResourceLoaderMgr.SafeDestroy(ref this.goDragonExpedition, true);
+ }
+
+ protected void OnMonsterDrag(IXUIButton button, Vector2 delta)
+ {
+ bool flag = button.ID == 1UL;
+ if (flag)
+ {
+ delta = Vector2.one * (float)Screen.width;
+ }
+ else
+ {
+ delta = Vector2.one * (float)(-(float)Screen.width);
+ }
+ bool flag2 = this.ixDragonExpedition == null;
+ if (!flag2)
+ {
+ this.ixDragonExpedition.Drag(delta.x);
+ }
+ }
+
+ protected bool OnMonsterDrag(Vector2 delta)
+ {
+ bool flag = this.ixDragonExpedition == null;
+ bool result;
+ if (flag)
+ {
+ result = true;
+ }
+ else
+ {
+ this.ixDragonExpedition.Drag(delta.x);
+ result = true;
+ }
+ return result;
+ }
+
+ protected void OnMouseClick(IXUISprite sp)
+ {
+ bool flag = this.ixDragonExpedition == null;
+ if (!flag)
+ {
+ GameObject gameObject = this.ixDragonExpedition.Click();
+ bool flag2 = gameObject != null;
+ if (flag2)
+ {
+ this.OnGateInfo(gameObject.name);
+ }
+ }
+ }
+
+ private bool OnClose(IXUIButton btn)
+ {
+ this.SetVisible(false, true);
+ XSingleton<XTutorialHelper>.singleton.DragonCrusadeOpen = false;
+ return true;
+ }
+
+ private void OnGateInfo(string gatename)
+ {
+ DlgBase<DragonCrusadeGateDlg, DragonCrusadeGateBehavior>.singleton.SetVisibleWithAnimation(true, null);
+ for (int i = 0; i < XDragonCrusadeDocument._DragonCrusageGateDataInfo.Count; i++)
+ {
+ DragonCrusageGateData dragonCrusageGateData = XDragonCrusadeDocument._DragonCrusageGateDataInfo[i];
+ bool flag = dragonCrusageGateData.expData.ResName == gatename;
+ if (flag)
+ {
+ DlgBase<DragonCrusadeGateDlg, DragonCrusadeGateBehavior>.singleton.SetVisible(true, true);
+ DlgBase<DragonCrusadeGateDlg, DragonCrusadeGateBehavior>.singleton.FreshInfo(dragonCrusageGateData);
+ }
+ }
+ }
+
+ public void OnRankInfo(IXUISprite uiSprite)
+ {
+ DlgBase<DragonCrusadeRankDlg, DragonCrusadeRankBehavior>.singleton.SetVisible(true, true);
+ DlgBase<DragonCrusadeRankDlg, DragonCrusadeRankBehavior>.singleton.RefreshRankWindow(this.mDoc.oResRank);
+ }
+
+ public void RefreshRank(DERankRes oRes)
+ {
+ for (int i = 0; i < 3; i++)
+ {
+ Transform transform = base.uiBehaviour.transform.Find("Bg/MyRank/ScrollView/Tpl" + (i + 1).ToString());
+ IXUILabel ixuilabel = transform.Find("Rank").GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel2 = transform.Find("Name").GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel3 = transform.Find("Reward").GetComponent("XUILabel") as IXUILabel;
+ IXUISprite ixuisprite = transform.transform.Find("RankImage").GetComponent("XUISprite") as IXUISprite;
+ DERank derank = (i < oRes.ranks.Count) ? oRes.ranks[i] : null;
+ bool flag = derank != null;
+ if (flag)
+ {
+ ixuilabel.SetText("No." + derank.rank);
+ bool flag2 = i < 3;
+ if (flag2)
+ {
+ ixuisprite.SetSprite("N" + (i + 1));
+ ixuisprite.SetVisible(true);
+ ixuilabel.SetVisible(false);
+ }
+ else
+ {
+ ixuisprite.SetVisible(false);
+ ixuilabel.SetVisible(true);
+ }
+ ixuilabel2.SetText(derank.rolename);
+ string text = string.Empty;
+ for (int j = 0; j < derank.reward.Count; j++)
+ {
+ ItemBrief itemBrief = derank.reward[j];
+ ItemList.RowData itemConf = XBagDocument.GetItemConf((int)itemBrief.itemID);
+ text += itemBrief.itemCount.ToString();
+ }
+ ixuilabel3.gameObject.SetActive(true);
+ ixuilabel3.SetText(text);
+ }
+ else
+ {
+ ixuisprite.SetVisible(false);
+ ixuilabel2.SetText("");
+ ixuilabel.SetText("");
+ ixuilabel3.SetText("");
+ ixuilabel3.gameObject.SetActive(false);
+ }
+ }
+ bool flag3 = false;
+ for (int k = 0; k < oRes.ranks.Count; k++)
+ {
+ DERank derank2 = oRes.ranks[k];
+ bool flag4 = derank2.roleID == XSingleton<XAttributeMgr>.singleton.XPlayerData.RoleID;
+ if (flag4)
+ {
+ flag3 = true;
+ base.SetXUILable("Bg/MyRank/My/Rank", derank2.rank.ToString());
+ base.SetXUILable("Bg/MyRank/My/Name", XSingleton<XAttributeMgr>.singleton.XPlayerData.Name);
+ string text2 = string.Empty;
+ for (int l = 0; l < derank2.reward.Count; l++)
+ {
+ ItemBrief itemBrief2 = derank2.reward[l];
+ ItemList.RowData itemConf2 = XBagDocument.GetItemConf((int)itemBrief2.itemID);
+ text2 += itemBrief2.itemCount.ToString();
+ }
+ base.SetXUILable("Bg/MyRank/My/Reward", text2);
+ bool flag5 = k < 3;
+ if (flag5)
+ {
+ base.uiBehaviour.mMyRank.SetActive(false);
+ }
+ break;
+ }
+ }
+ bool flag6 = !flag3;
+ if (flag6)
+ {
+ base.SetXUILable("Bg/MyRank/My/Rank", "");
+ base.SetXUILable("Bg/MyRank/My/Name", "");
+ base.SetXUILable("Bg/MyRank/My/Reward", "");
+ }
+ }
+
+ private void InitData()
+ {
+ for (int i = 0; i < XDragonCrusadeDocument._DragonCrusageGateDataInfo.Count; i++)
+ {
+ DragonCrusageGateData dragonCrusageGateData = XDragonCrusadeDocument._DragonCrusageGateDataInfo[i];
+ Transform go = this.ixDragonExpedition.GetGO(dragonCrusageGateData.expData.ResName);
+ bool flag = go == null;
+ if (!flag)
+ {
+ GameObject value = null;
+ bool flag2 = !this.listBillBoards.TryGetValue(dragonCrusageGateData.SceneID, out value);
+ if (flag2)
+ {
+ value = this.RefreshGateEnter(dragonCrusageGateData, go.gameObject);
+ this.listBillBoards.Add(dragonCrusageGateData.SceneID, value);
+ }
+ bool flag3 = XDragonCrusadeDocument.SectonChapterMax[dragonCrusageGateData.Chapter] == dragonCrusageGateData.expData.ChapterID[1];
+ if (flag3)
+ {
+ GameObject gameObject = new GameObject("Snap");
+ gameObject.transform.parent = go.gameObject.transform;
+ bool flag4 = dragonCrusageGateData.expData.SnapPos != null && dragonCrusageGateData.expData.SnapPos.Length == 3;
+ if (flag4)
+ {
+ gameObject.transform.localPosition = new Vector3(dragonCrusageGateData.expData.SnapPos[0], dragonCrusageGateData.expData.SnapPos[1], dragonCrusageGateData.expData.SnapPos[2]);
+ }
+ else
+ {
+ gameObject.transform.localPosition = new Vector3(0.1f, -0.26f, -0.49f);
+ }
+ gameObject.transform.localEulerAngles = new Vector3(0f, 20f, 0f);
+ gameObject.transform.localScale = Vector3.one * 1.5f;
+ IUIDummy snapShot = XSingleton<XUpdater.XUpdater>.singleton.XPlatform.AddComponent(gameObject, EComponentType.EUIDummy) as IUIDummy;
+ this.CreateAvatar(snapShot, dragonCrusageGateData);
+ }
+ }
+ }
+ }
+
+ private void UpdateBillBoard()
+ {
+ foreach (KeyValuePair<uint, GameObject> keyValuePair in this.listBillBoards)
+ {
+ GameObject value = keyValuePair.Value;
+ Vector3 normalized = (value.transform.position - this.ixDragonExpedition.GetDragonCamera().transform.position).normalized;
+ value.transform.rotation *= Quaternion.LookRotation(normalized);
+ }
+ }
+
+ private GameObject RefreshGateEnter(DragonCrusageGateData data, GameObject obj)
+ {
+ uint sceneID = data.SceneID;
+ GameObject gameObject = XSingleton<XResourceLoaderMgr>.singleton.CreateFromPrefab("UI/Billboard/DragonCrusadeBillboard", true, false) as GameObject;
+ XSingleton<UiUtility>.singleton.AddChild(obj, gameObject);
+ gameObject.name = data.SceneID + "_" + data.expData.ResName;
+ gameObject.transform.localScale = this.localDefaultScale;
+ gameObject.transform.position = obj.transform.position;
+ IXUILabel ixuilabel = gameObject.transform.Find("Name").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel.SetText(data.sceneData.Comment);
+ return gameObject;
+ }
+
+ public void RefreshProgressFromNet()
+ {
+ bool flag = !this.mDoneFinish;
+ if (!flag)
+ {
+ this.RefreshProgress();
+ }
+ }
+
+ public void RefreshProgressSync(Action<bool> done)
+ {
+ bool flag = this.ixDragonExpedition != null;
+ if (flag)
+ {
+ bool flag2 = done != null;
+ if (flag2)
+ {
+ done(true);
+ }
+ XSingleton<XTutorialHelper>.singleton.DragonCrusadeOpen = true;
+ }
+ else
+ {
+ bool flag3 = this.mSyncLoading;
+ if (!flag3)
+ {
+ this.LoadPrefabSync(done);
+ }
+ }
+ }
+
+ private void LoadPrefabSync(Action<bool> done)
+ {
+ base.uiBehaviour.goLoading.SetActive(true);
+ this.mSyncLoading = true;
+ this.mDoneFinish = false;
+ this.mSyncDoneCallBack = done;
+ XSingleton<XResourceLoaderMgr>.singleton.CreateFromPrefabAsync("Common/DragonExpedition", this.mDragonExpeditionLoadTask, null, true);
+ }
+
+ public override void OnUpdate()
+ {
+ base.OnUpdate();
+ bool flag = !this.mSyncLoading;
+ if (!flag)
+ {
+ bool flag2 = this.mSyncLoading;
+ if (flag2)
+ {
+ }
+ bool flag3 = this.intertime > 0f;
+ if (flag3)
+ {
+ this.intertime -= Time.deltaTime;
+ }
+ else
+ {
+ this.intertime = 0.5f;
+ bool flag4 = this.mSyncLoading && this.mDoneFinish;
+ if (flag4)
+ {
+ bool flag5 = this.mDragonExpeditionLoadTask != null;
+ if (flag5)
+ {
+ this.mDragonExpeditionLoadTask = null;
+ }
+ base.uiBehaviour.goLoading.SetActive(false);
+ this.mSyncLoading = false;
+ }
+ }
+ }
+ }
+
+ private void LoadPrefabSyncDone()
+ {
+ this.ixDragonExpedition = (this.goDragonExpedition.GetComponent("XDragonExpedition") as IXDragonExpedition);
+ this._FxFirework = XSingleton<XFxMgr>.singleton.CreateFx("Effects/FX_Particle/UIfx/UI_lzy_gk", null, true);
+ this.InitData();
+ this.RefreshProgress();
+ this.mDoneFinish = true;
+ bool flag = this.mSyncDoneCallBack != null;
+ if (flag)
+ {
+ this.mSyncDoneCallBack(true);
+ }
+ this.mSyncDoneCallBack = null;
+ bool flag2 = this.ixDragonExpedition != null;
+ if (flag2)
+ {
+ this.ixDragonExpedition.GetDragonCamera().enabled = true;
+ }
+ XSingleton<XTutorialHelper>.singleton.DragonCrusadeOpen = true;
+ }
+
+ private void RefreshProgress()
+ {
+ GameObject gameObject = null;
+ for (int i = 0; i < XDragonCrusadeDocument._DragonCrusageGateDataInfo.Count; i++)
+ {
+ DragonCrusageGateData dragonCrusageGateData = XDragonCrusadeDocument._DragonCrusageGateDataInfo[i];
+ DEProgress deProgress = dragonCrusageGateData.deProgress;
+ bool flag = this.listBillBoards.TryGetValue(deProgress.sceneID, out gameObject);
+ if (flag)
+ {
+ Transform transform = gameObject.transform.Find("StageConquered");
+ Transform transform2 = gameObject.transform.Find("BossHP");
+ IXUIProgress ixuiprogress = transform2.GetComponent("XUIProgress") as IXUIProgress;
+ ixuiprogress.value = (float)deProgress.bossavghppercent / 100f;
+ IXUILabel ixuilabel = gameObject.transform.Find("BossHP/Percent").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel.SetText(deProgress.bossavghppercent + "%");
+ switch (dragonCrusageGateData.deProgress.state)
+ {
+ case DEProgressState.DEPS_FINISH:
+ {
+ transform2.localScale = Vector3.zero;
+ transform.gameObject.SetActive(true);
+ this.ixDragonExpedition.SetLimitPos(dragonCrusageGateData.expData.LimitPos);
+ Transform go = this.ixDragonExpedition.GetGO(dragonCrusageGateData.expData.ResName);
+ Renderer component = go.GetComponent<Renderer>();
+ Material sharedMaterial = component.sharedMaterial;
+ component.material = new Material(sharedMaterial)
+ {
+ shader = ShaderManager._transparentGrayMaskRNoLight,
+ renderQueue = 3002
+ };
+ break;
+ }
+ case DEProgressState.DEPS_FIGHT:
+ {
+ this.ixDragonExpedition.SetLimitPos(dragonCrusageGateData.expData.LimitPos);
+ this._FxFirework.Play(gameObject.transform.position, Quaternion.identity, Vector3.one, 1f);
+ transform2.localScale = Vector3.one;
+ transform.gameObject.SetActive(false);
+ bool flag2 = gameObject.transform.parent != null;
+ if (flag2)
+ {
+ this.ixDragonExpedition.Assign(gameObject.transform.parent.localPosition.x);
+ }
+ break;
+ }
+ case DEProgressState.DEPS_NOTOPEN:
+ transform.gameObject.SetActive(false);
+ transform2.localScale = Vector3.zero;
+ break;
+ }
+ }
+ base.SetXUILable("Bg/ChallengeCount/Value", string.Format("{0}/{1}", dragonCrusageGateData.leftcount, dragonCrusageGateData.allcount));
+ }
+ }
+
+ private void CreateAvatar(IUIDummy snapShot, DragonCrusageGateData data)
+ {
+ XEntityStatistics.RowData byID = XSingleton<XEntityMgr>.singleton.EntityStatistics.GetByID(data.expData.BossID);
+ XEntityPresentation.RowData byPresentID = XSingleton<XEntityMgr>.singleton.EntityInfo.GetByPresentID(byID.PresentID);
+ bool flag = !this.m_AvatarDummys.ContainsKey((int)data.expData.ChapterID[0]);
+ if (flag)
+ {
+ XDummy xdummy = XSingleton<X3DAvatarMgr>.singleton.CreateCommonEntityDummy(this.m_dummPool, byID.PresentID, snapShot, null, 25f);
+ xdummy.Scale = byPresentID.UIAvatarScale;
+ xdummy.EngineObject.SetLocalPRS(Vector3.zero, true, Quaternion.identity, true, Vector3.one * 0.3f, true);
+ this.m_AvatarDummys.Add((int)data.expData.ChapterID[0], xdummy);
+ }
+ }
+
+ private void DeleteAvatar()
+ {
+ base.Return3DAvatarPool();
+ this.m_AvatarDummys.Clear();
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/DragonCrusadeDlg.cs.meta b/Client/Assets/Scripts/XMainClient/UI/DragonCrusadeDlg.cs.meta
new file mode 100644
index 00000000..8adf4bdb
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/DragonCrusadeDlg.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 6e267eada3085bc4e82a2567c2a82a81
+timeCreated: 1611403903
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/DragonCrusadeGateDlg.cs b/Client/Assets/Scripts/XMainClient/UI/DragonCrusadeGateDlg.cs
new file mode 100644
index 00000000..e63adffd
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/DragonCrusadeGateDlg.cs
@@ -0,0 +1,249 @@
+using System;
+using KKSG;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class DragonCrusadeGateDlg : DlgBase<DragonCrusadeGateDlg, DragonCrusadeGateBehavior>
+ {
+ public override string fileName
+ {
+ get
+ {
+ return "DragonCrusade/DragonCrusadeGate";
+ }
+ }
+
+ public override bool hideMainMenu
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override int layer
+ {
+ get
+ {
+ return 1;
+ }
+ }
+
+ public override int group
+ {
+ get
+ {
+ return 1;
+ }
+ }
+
+ public override bool autoload
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override bool pushstack
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override int sysid
+ {
+ get
+ {
+ return 50;
+ }
+ }
+
+ private XDummy m_Dummy;
+
+ private DragonCrusageGateData mDragonCrusageGateData = null;
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ base.uiBehaviour.mClosedBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnClose));
+ base.uiBehaviour.mRwdBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnChallenge));
+ }
+
+ public override void OnXNGUIClick(GameObject obj, string path)
+ {
+ base.OnXNGUIClick(obj, path);
+ }
+
+ protected override void OnShow()
+ {
+ base.Alloc3DAvatarPool("DragonCrusadeGateDlg");
+ base.OnShow();
+ }
+
+ protected override void OnUnload()
+ {
+ base.Return3DAvatarPool();
+ base.OnUnload();
+ }
+
+ public override void StackRefresh()
+ {
+ base.StackRefresh();
+ base.Alloc3DAvatarPool("DragonCrusadeGateDlg");
+ }
+
+ private bool OnClose(IXUIButton btn)
+ {
+ base.Return3DAvatarPool();
+ this.m_Dummy = null;
+ this.SetVisible(false, true);
+ return true;
+ }
+
+ private bool OnChallenge(IXUIButton btn)
+ {
+ bool flag = this.mDragonCrusageGateData.leftcount <= 0;
+ bool result;
+ if (flag)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XSingleton<XStringTable>.singleton.GetString("DragonCrusadeEnoughCount"), "fece00");
+ result = true;
+ }
+ else
+ {
+ bool flag2 = this.mDragonCrusageGateData.deProgress.state == DEProgressState.DEPS_NOTOPEN;
+ if (flag2)
+ {
+ string text = string.Format(XSingleton<XStringTable>.singleton.GetString("DragonCrusadeLast"), this.GetAheadGate().sceneData.Comment);
+ XSingleton<UiUtility>.singleton.ShowSystemTip(text, "fece00");
+ result = true;
+ }
+ else
+ {
+ bool flag3 = XTeamDocument.GoSingleBattleBeforeNeed(new ButtonClickEventHandler(this.OnChallenge), btn);
+ if (flag3)
+ {
+ result = true;
+ }
+ else
+ {
+ PtcC2G_EnterSceneReq ptcC2G_EnterSceneReq = new PtcC2G_EnterSceneReq();
+ ptcC2G_EnterSceneReq.Data.sceneID = this.mDragonCrusageGateData.SceneID;
+ XSingleton<XClientNetwork>.singleton.Send(ptcC2G_EnterSceneReq);
+ XDragonCrusadeDocument.QuitFromCrusade = true;
+ XSingleton<XUICacheMgr>.singleton.CacheUI(XSysDefine.XSys_DragonCrusade, EXStage.Hall);
+ result = true;
+ }
+ }
+ }
+ return result;
+ }
+
+ private DragonCrusageGateData GetAheadGate()
+ {
+ for (int i = 0; i < XDragonCrusadeDocument._DragonCrusageGateDataInfo.Count; i++)
+ {
+ DragonCrusageGateData dragonCrusageGateData = XDragonCrusadeDocument._DragonCrusageGateDataInfo[i];
+ bool flag = dragonCrusageGateData.deProgress.state == DEProgressState.DEPS_FIGHT;
+ if (flag)
+ {
+ return dragonCrusageGateData;
+ }
+ }
+ return null;
+ }
+
+ public void FreshInfo(DragonCrusageGateData data)
+ {
+ this.mDragonCrusageGateData = data;
+ XEntityStatistics.RowData byID = XSingleton<XEntityMgr>.singleton.EntityStatistics.GetByID(data.expData.BossID);
+ XEntityPresentation.RowData byPresentID = XSingleton<XEntityMgr>.singleton.EntityInfo.GetByPresentID(byID.PresentID);
+ GameObject gameObject = base.SetXUILable("Bg/ContentFrame/BossStatus/TitleLabel", data.sceneData.Comment);
+ IUIDummy snapShot = gameObject.transform.Find("SnapShot").GetComponent("UIDummy") as IUIDummy;
+ this.m_Dummy = XSingleton<X3DAvatarMgr>.singleton.CreateCommonEntityDummy(this.m_dummPool, byID.PresentID, snapShot, this.m_Dummy, 25f);
+ this.m_Dummy.Scale = byPresentID.UIAvatarScale;
+ XSingleton<X3DAvatarMgr>.singleton.EnableCommonDummy(this.m_Dummy, snapShot, true);
+ GameObject gameObject2 = base.SetXUILable("Bg/ContentFrame/BossStatus/HP/Percent", data.deProgress.bossavghppercent.ToString() + "%");
+ IXUIProgress ixuiprogress = gameObject2.transform.Find("HP").GetComponent("XUIProgress") as IXUIProgress;
+ ixuiprogress.value = (float)data.deProgress.bossavghppercent / 100f;
+ base.SetXUILable("Bg/ContentFrame/content/contentLabel", data.expData.Description);
+ int num = (int)XSingleton<XAttributeMgr>.singleton.XPlayerData.GetAttr(XAttributeDefine.XAttr_POWER_POINT_Basic);
+ string content = string.Format(XSingleton<XStringTable>.singleton.GetString("DragonCrusadeCurrent"), num);
+ IXUILabel ixuilabel = base.SetXUILable("Bg/ContentFrame/FightValue/Current", content).GetComponent("XUILabel") as IXUILabel;
+ string content2 = string.Format(XSingleton<XStringTable>.singleton.GetString("DragonCrusadeBossFight"), data.sceneData.RecommendPower);
+ IXUILabel ixuilabel2 = base.SetXUILable("Bg/ContentFrame/FightValue/Original", content2).GetComponent("XUILabel") as IXUILabel;
+ bool flag = data.sceneData.RecommendPower >= num;
+ if (flag)
+ {
+ ixuilabel.SetColor(Color.red);
+ }
+ else
+ {
+ ixuilabel.SetColor(Color.green);
+ }
+ GameObject gameObject3 = base.uiBehaviour.transform.Find("Bg/ContentFrame/FightValue/Buff").gameObject;
+ bool flag2 = data.SealLevel < data.expData.SealLevel;
+ if (flag2)
+ {
+ gameObject3.SetActive(true);
+ IXUISprite ixuisprite = gameObject3.GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.SetSprite(data.expData.BuffIcon);
+ base.SetXUILable("Bg/ContentFrame/FightValue/Buff/Label", data.expData.BuffDes);
+ }
+ else
+ {
+ gameObject3.SetActive(false);
+ }
+ base.SetXUILable("Bg/ContentFrame/FightValue/Buff/Label", data.expData.BuffDes);
+ base.SetXUILable("ChallengeCount/Value", string.Format("{0}/{1}", data.leftcount, data.allcount));
+ base.uiBehaviour.mBuff.SetSprite(data.expData.BuffIcon);
+ bool flag3 = (uint)data.sceneData.RequiredLevel > XSingleton<XAttributeMgr>.singleton.XPlayerData.Level;
+ if (flag3)
+ {
+ string content3 = string.Format(XSingleton<XStringTable>.singleton.GetString("DragonCrusadeNeedLevel"), data.sceneData.RequiredLevel);
+ base.SetXUILable("Bg/ContentFrame/NeedLevel", content3);
+ }
+ else
+ {
+ base.SetXUILable("Bg/ContentFrame/NeedLevel", "");
+ }
+ for (int i = 0; i < 4; i++)
+ {
+ GameObject gameObject4 = base.uiBehaviour.transform.Find("Bg/ContentFrame/items/Item" + i.ToString().ToString()).gameObject;
+ bool flag4 = i < data.expData.WinReward.Count;
+ if (flag4)
+ {
+ gameObject4.SetActive(true);
+ XSingleton<XItemDrawerMgr>.singleton.normalItemDrawer.DrawItem(gameObject4, (int)data.expData.WinReward[i, 0], (int)data.expData.WinReward[i, 1], false);
+ IXUISprite ixuisprite2 = gameObject4.transform.Find("Icon").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite2.ID = (ulong)data.expData.WinReward[i, 0];
+ ixuisprite2.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(XSingleton<UiUtility>.singleton.OnItemClick));
+ }
+ else
+ {
+ gameObject4.SetActive(false);
+ }
+ }
+ GameObject gameObject5 = base.SetXUILable("Bg/ContentFrame/ResultLabel", XSingleton<XStringTable>.singleton.GetString("DragonCrusadeDone"));
+ GameObject gameObject6 = base.uiBehaviour.transform.Find("Bg/ContentFrame/btm").gameObject;
+ bool flag5 = this.mDragonCrusageGateData.deProgress.state == DEProgressState.DEPS_FINISH;
+ if (flag5)
+ {
+ gameObject5.SetActive(true);
+ gameObject6.SetActive(false);
+ }
+ else
+ {
+ gameObject6.SetActive(true);
+ gameObject5.SetActive(false);
+ }
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/DragonCrusadeGateDlg.cs.meta b/Client/Assets/Scripts/XMainClient/UI/DragonCrusadeGateDlg.cs.meta
new file mode 100644
index 00000000..b4d8f6b9
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/DragonCrusadeGateDlg.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 6583d2f6d99c14648ac5cd5bfa85b1e7
+timeCreated: 1611403850
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/DragonCrusadeRankBehavior.cs b/Client/Assets/Scripts/XMainClient/UI/DragonCrusadeRankBehavior.cs
new file mode 100644
index 00000000..27e8d97e
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/DragonCrusadeRankBehavior.cs
@@ -0,0 +1,23 @@
+using System;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+
+namespace XMainClient.UI
+{
+ internal class DragonCrusadeRankBehavior : DlgBehaviourBase
+ {
+ public IXUIScrollView m_scroll_view;
+
+ public IXUIButton mClosedBtn = null;
+
+ public GameObject m_EmptyHint;
+
+ private void Awake()
+ {
+ this.mClosedBtn = (base.transform.Find("Bg/Close").GetComponent("XUIButton") as IXUIButton);
+ this.m_scroll_view = (base.transform.Find("ScrollView").GetComponent("XUIScrollView") as IXUIScrollView);
+ this.m_EmptyHint = base.transform.Find("ScrollView/EmptyRank").gameObject;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/DragonCrusadeRankBehavior.cs.meta b/Client/Assets/Scripts/XMainClient/UI/DragonCrusadeRankBehavior.cs.meta
new file mode 100644
index 00000000..bdcee956
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/DragonCrusadeRankBehavior.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 04a58a88605134d43b5b0a13beab0fb5
+timeCreated: 1611402961
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/DragonCrusadeRankDlg.cs b/Client/Assets/Scripts/XMainClient/UI/DragonCrusadeRankDlg.cs
new file mode 100644
index 00000000..39815649
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/DragonCrusadeRankDlg.cs
@@ -0,0 +1,225 @@
+using System;
+using KKSG;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class DragonCrusadeRankDlg : DlgBase<DragonCrusadeRankDlg, DragonCrusadeRankBehavior>
+ {
+ public override string fileName
+ {
+ get
+ {
+ return "DragonCrusade/DragonCrusadeRank";
+ }
+ }
+
+ public override bool hideMainMenu
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override int layer
+ {
+ get
+ {
+ return 1;
+ }
+ }
+
+ public override int group
+ {
+ get
+ {
+ return 1;
+ }
+ }
+
+ public override bool autoload
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override bool pushstack
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public bool isHallUI
+ {
+ get
+ {
+ return XSingleton<XGame>.singleton.CurrentStage.Stage == EXStage.Hall;
+ }
+ }
+
+ public override int sysid
+ {
+ get
+ {
+ return 50;
+ }
+ }
+
+ private XDragonCrusadeDocument mDoc = null;
+
+ private XLeftTimeCounter m_LeftTime;
+
+ private XUIPool m_role_pool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ public override void OnXNGUIClick(GameObject obj, string path)
+ {
+ base.OnXNGUIClick(obj, path);
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ base.uiBehaviour.mClosedBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnClose));
+ }
+
+ protected override void Init()
+ {
+ base.Init();
+ }
+
+ protected override void OnLoad()
+ {
+ base.OnLoad();
+ this.mDoc = (XSingleton<XGame>.singleton.Doc.GetXComponent(XDragonCrusadeDocument.uuID) as XDragonCrusadeDocument);
+ GameObject gameObject = base.SetXUILable("Bg/CountDown/CountDown", "");
+ IXUILabel label = gameObject.GetComponent("XUILabel") as IXUILabel;
+ this.m_LeftTime = new XLeftTimeCounter(label, false);
+ this.ScrollViewInit();
+ }
+
+ public override void OnUpdate()
+ {
+ base.OnUpdate();
+ bool flag = this.m_LeftTime != null;
+ if (flag)
+ {
+ this.m_LeftTime.Update();
+ bool flag2 = this.m_LeftTime.GetLeftTime() <= 0;
+ if (flag2)
+ {
+ }
+ }
+ }
+
+ private void ScrollViewInit()
+ {
+ Transform transform = base.uiBehaviour.transform.Find("ScrollView/GuildList/Tpl");
+ this.m_role_pool.SetupPool(transform.parent.gameObject, transform.gameObject, 10u, false);
+ }
+
+ public void RefreshRankWindow(DERankRes oRes)
+ {
+ bool flag = oRes != null;
+ if (flag)
+ {
+ this.m_LeftTime.SetLeftTime(oRes.rewardlefttime, -1);
+ }
+ bool flag2 = oRes == null || oRes.ranks == null || oRes.ranks.Count == 0;
+ if (flag2)
+ {
+ base.uiBehaviour.m_EmptyHint.SetActive(true);
+ }
+ else
+ {
+ Vector3 tplPos = this.m_role_pool.TplPos;
+ this.m_role_pool.FakeReturnAll();
+ for (int i = 0; i < oRes.ranks.Count; i++)
+ {
+ DERank derank = oRes.ranks[i];
+ GameObject gameObject = this.m_role_pool.FetchGameObject(false);
+ IXUILabel ixuilabel = gameObject.transform.Find("Rank").GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel2 = gameObject.transform.Find("Name").GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel3 = gameObject.transform.Find("Level").GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel4 = gameObject.transform.Find("LeaderName").GetComponent("XUILabel") as IXUILabel;
+ IXUISprite ixuisprite = gameObject.transform.Find("P").GetComponent("XUISprite") as IXUISprite;
+ ixuilabel.SetText(derank.rank.ToString());
+ IXUISprite ixuisprite2 = gameObject.transform.Find("RankImage").GetComponent("XUISprite") as IXUISprite;
+ bool flag3 = i < 3;
+ if (flag3)
+ {
+ ixuisprite2.SetSprite("N" + (i + 1));
+ ixuisprite2.SetVisible(true);
+ ixuilabel.SetVisible(false);
+ }
+ else
+ {
+ ixuisprite2.SetVisible(false);
+ ixuilabel.SetVisible(true);
+ }
+ ixuilabel2.SetText(derank.rolename);
+ string text = string.Empty;
+ for (int j = 0; j < derank.reward.Count; j++)
+ {
+ ItemBrief itemBrief = derank.reward[j];
+ ItemList.RowData itemConf = XBagDocument.GetItemConf((int)itemBrief.itemID);
+ text += itemBrief.itemCount.ToString();
+ }
+ ixuilabel3.SetText(text);
+ bool flag4 = derank.progress != null;
+ if (flag4)
+ {
+ ixuilabel4.SetText(this.mDoc.GetChapter(derank.progress.sceneID) + " " + (100 - derank.progress.bossavghppercent).ToString() + "%");
+ }
+ else
+ {
+ ixuilabel4.SetText(this.mDoc.GetChapter(derank.progress.sceneID) + "info.progress == null%");
+ }
+ ixuilabel2.ID = derank.roleID;
+ bool flag5 = derank.roleID == 0UL;
+ if (flag5)
+ {
+ ixuilabel2.RegisterLabelClickEventHandler(null);
+ }
+ else
+ {
+ ixuilabel2.RegisterLabelClickEventHandler(new LabelClickEventHandler(this.OnRankItemClicked));
+ }
+ bool flag6 = i % 2 == 0;
+ if (flag6)
+ {
+ ixuisprite.SetVisible(true);
+ ixuisprite.SetSprite("Panel_popup2_back");
+ }
+ else
+ {
+ ixuisprite.SetVisible(false);
+ ixuisprite.SetSprite("Panel_popup2_back");
+ }
+ gameObject.transform.localPosition = new Vector3(tplPos.x, tplPos.y - (float)(this.m_role_pool.TplHeight * i), tplPos.z);
+ }
+ this.m_role_pool.ActualReturnAll(false);
+ base.uiBehaviour.m_scroll_view.ResetPosition();
+ base.uiBehaviour.m_EmptyHint.SetActive(false);
+ }
+ }
+
+ private void OnRankItemClicked(IXUILabel label)
+ {
+ XCharacterCommonMenuDocument.ReqCharacterMenuInfo(label.ID, false);
+ }
+
+ protected bool OnClose(IXUIButton btn)
+ {
+ this.SetVisible(false, true);
+ return true;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/DragonCrusadeRankDlg.cs.meta b/Client/Assets/Scripts/XMainClient/UI/DragonCrusadeRankDlg.cs.meta
new file mode 100644
index 00000000..58fb61e2
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/DragonCrusadeRankDlg.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: d56abd953eca54d4ba8085da7dd7124c
+timeCreated: 1611404627
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/DragonGuildLivenessBehaviour.cs b/Client/Assets/Scripts/XMainClient/UI/DragonGuildLivenessBehaviour.cs
new file mode 100644
index 00000000..b82f983a
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/DragonGuildLivenessBehaviour.cs
@@ -0,0 +1,47 @@
+using System;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class DragonGuildLivenessBehaviour : DlgBehaviourBase
+ {
+ public ILoopScrollView m_loopScrool;
+
+ public XUIPool m_ActivityItemPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ public XUIPool m_ChestPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ public XUIPool m_RewardItemPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ public IXUISprite m_closedSpr;
+
+ public XChestProgress m_Progress;
+
+ public IXUILabel m_totalExp;
+
+ public XNumberTween m_TotalExpTween;
+
+ public IXUILabel m_chestTips;
+
+ private void Awake()
+ {
+ Transform transform = base.transform.Find("Bg/RightView/ActivityTpl");
+ this.m_ActivityItemPool.SetupPool(transform.parent.gameObject, transform.gameObject, 10u, false);
+ this.m_closedSpr = (base.transform.Find("Bg/Close").GetComponent("XUISprite") as IXUISprite);
+ this.m_Progress = new XChestProgress(base.transform.Find("Bg/UpView/Progress").GetComponent("XUIProgress") as IXUIProgress);
+ transform = base.transform.Find("Bg/UpView/Progress/Chests/Chest");
+ this.m_ChestPool.SetupPool(transform.parent.gameObject, transform.gameObject, 5u, false);
+ transform = base.transform.Find("Bg/LeftView/Item");
+ this.m_RewardItemPool.SetupPool(transform.parent.gameObject, transform.gameObject, 3u, false);
+ this.m_totalExp = (base.transform.Find("Bg/UpView/CurrentExp").GetComponent("XUILabel") as IXUILabel);
+ this.m_TotalExpTween = XNumberTween.Create(this.m_totalExp);
+ this.m_TotalExpTween.SetNumberWithTween(0UL, "", false, true);
+ this.m_chestTips = (base.transform.Find("Bg/LeftView/BigChest/Tips/Exp").GetComponent("XUILabel") as IXUILabel);
+ this.m_loopScrool = (base.transform.Find("Bg/RightView").GetComponent("LoopScrollView") as ILoopScrollView);
+ this.m_ChestPool.ReturnAll(false);
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/DragonGuildLivenessBehaviour.cs.meta b/Client/Assets/Scripts/XMainClient/UI/DragonGuildLivenessBehaviour.cs.meta
new file mode 100644
index 00000000..2276e62a
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/DragonGuildLivenessBehaviour.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 6656c8889c6335b42af690724fce4673
+timeCreated: 1611403854
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/DragonGuildLivenessDlg.cs b/Client/Assets/Scripts/XMainClient/UI/DragonGuildLivenessDlg.cs
new file mode 100644
index 00000000..c9175cfb
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/DragonGuildLivenessDlg.cs
@@ -0,0 +1,270 @@
+using System;
+using System.Collections.Generic;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class DragonGuildLivenessDlg : DlgBase<DragonGuildLivenessDlg, DragonGuildLivenessBehaviour>
+ {
+ public override string fileName
+ {
+ get
+ {
+ return "DungeonTroop/DungeonTroopLiveness";
+ }
+ }
+
+ public override int layer
+ {
+ get
+ {
+ return 1;
+ }
+ }
+
+ public override bool autoload
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override bool fullscreenui
+ {
+ get
+ {
+ return false;
+ }
+ }
+
+ private static readonly uint m_expIncreaseSpeed = 800u;
+
+ private XDragonGuildDocument m_doc = XDragonGuildDocument.Doc;
+
+ private List<DragonGuildLivenessTable.RowData> m_dragonguildLivenessRow;
+
+ private int m_CurSelectIndex = 0;
+
+ private float m_CoolTime = 0.5f;
+
+ private float m_LastClickTime = 0f;
+
+ protected override void Init()
+ {
+ XDragonGuildDocument.DragonGuildLivenessData.View = this;
+ GameObject tpl = base.uiBehaviour.m_loopScrool.GetTpl();
+ bool flag = tpl != null && tpl.GetComponent<DragonGuildLivenessRecordItem>() == null;
+ if (flag)
+ {
+ tpl.AddComponent<DragonGuildLivenessRecordItem>();
+ }
+ base.uiBehaviour.m_Progress.IncreaseSpeed = DragonGuildLivenessDlg.m_expIncreaseSpeed;
+ this.m_dragonguildLivenessRow = null;
+ XDragonGuildDocument.DragonGuildLivenessData.GetDragonGuildLivenessRowsByLevel(this.m_doc.BaseData.level, out this.m_dragonguildLivenessRow);
+ for (int i = 0; i < this.m_dragonguildLivenessRow.Count; i++)
+ {
+ GameObject chest = base.uiBehaviour.m_ChestPool.FetchGameObject(false);
+ XChest chest2 = new XChest(chest, this.m_dragonguildLivenessRow[i].boxPic);
+ base.uiBehaviour.m_Progress.AddChest(chest2);
+ }
+ this.ChangeChestProgressState(true);
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ base.uiBehaviour.m_closedSpr.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnClosed));
+ this.m_dragonguildLivenessRow = null;
+ XDragonGuildDocument.DragonGuildLivenessData.GetDragonGuildLivenessRowsByLevel(this.m_doc.BaseData.level, out this.m_dragonguildLivenessRow);
+ for (int i = 0; i < this.m_dragonguildLivenessRow.Count; i++)
+ {
+ base.uiBehaviour.m_Progress.ChestList[i].m_Chest.ID = (ulong)((long)i);
+ base.uiBehaviour.m_Progress.ChestList[i].m_Chest.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnChestClicked));
+ }
+ }
+
+ protected override void OnShow()
+ {
+ XDragonGuildDocument.DragonGuildLivenessData.ReqDragonGuildLivenessInfo();
+ bool flag = DlgBase<MallSystemDlg, MallSystemBehaviour>.singleton.IsVisible();
+ if (flag)
+ {
+ DlgBase<MallSystemDlg, MallSystemBehaviour>.singleton.SetRelatedDlg(this);
+ }
+ }
+
+ protected override void OnHide()
+ {
+ base.OnHide();
+ bool flag = DlgBase<MallSystemDlg, MallSystemBehaviour>.singleton.IsVisible();
+ if (flag)
+ {
+ DlgBase<MallSystemDlg, MallSystemBehaviour>.singleton.SetRelatedDlg(null);
+ }
+ }
+
+ public override void StackRefresh()
+ {
+ base.StackRefresh();
+ }
+
+ protected override void OnUnload()
+ {
+ base.OnUnload();
+ base.uiBehaviour.m_Progress.Unload();
+ }
+
+ public override void OnUpdate()
+ {
+ base.OnUpdate();
+ base.uiBehaviour.m_Progress.Update(Time.deltaTime);
+ }
+
+ public void FillContent()
+ {
+ this.RefreshBox();
+ List<LoopItemData> list = new List<LoopItemData>();
+ string empty = string.Empty;
+ for (int i = 0; i < XDragonGuildDocument.DragonGuildLivenessData.RecordList.Count; i++)
+ {
+ DragonGuildLivenessRecord dragonGuildLivenessRecord = XDragonGuildDocument.DragonGuildLivenessData.RecordList[i];
+ dragonGuildLivenessRecord.LoopID = XSingleton<XCommon>.singleton.XHash(XDragonGuildDocument.DragonGuildLivenessData.RecordList[i].ToString() + i);
+ list.Add(dragonGuildLivenessRecord);
+ }
+ base.uiBehaviour.m_loopScrool.Init(list, new DelegateHandler(this.RefreshRecordItem), null, 0, true);
+ }
+
+ public void RefreshBox()
+ {
+ this.ChangeChestProgressState(false);
+ this.SetCurrentExpAmi();
+ this.ShowReward(XDragonGuildDocument.DragonGuildLivenessData.FindNeedShowReward());
+ }
+
+ private void RefreshRecordItem(ILoopItemObject item, LoopItemData data)
+ {
+ DragonGuildLivenessRecord dragonGuildLivenessRecord = data as DragonGuildLivenessRecord;
+ bool flag = dragonGuildLivenessRecord != null;
+ if (flag)
+ {
+ GameObject obj = item.GetObj();
+ bool flag2 = obj != null;
+ if (flag2)
+ {
+ DragonGuildLivenessRecordItem component = obj.GetComponent<DragonGuildLivenessRecordItem>();
+ bool flag3 = component != null;
+ if (flag3)
+ {
+ component.Refresh(dragonGuildLivenessRecord);
+ }
+ }
+ }
+ else
+ {
+ XSingleton<XDebug>.singleton.AddErrorLog("GuildMiniReportItem info is null", null, null, null, null, null);
+ }
+ }
+
+ public void SetCurrentExpAmi()
+ {
+ base.uiBehaviour.m_Progress.TargetExp = XDragonGuildDocument.DragonGuildLivenessData.CurExp;
+ base.uiBehaviour.m_TotalExpTween.SetNumberWithTween((ulong)XDragonGuildDocument.DragonGuildLivenessData.CurExp, "", false, true);
+ }
+
+ public void ChangeChestProgressState(bool init = false)
+ {
+ for (int i = 0; i < this.m_dragonguildLivenessRow.Count; i++)
+ {
+ XChest xchest = base.uiBehaviour.m_Progress.ChestList[i];
+ if (init)
+ {
+ xchest.SetExp(this.m_dragonguildLivenessRow[i].liveness);
+ }
+ xchest.Opened = XDragonGuildDocument.DragonGuildLivenessData.IsChestOpened(i + 1);
+ }
+ if (init)
+ {
+ base.uiBehaviour.m_Progress.SetExp(0u, XDragonGuildDocument.DragonGuildLivenessData.MaxExp);
+ }
+ }
+
+ public void ResetBoxRedDot(int index)
+ {
+ bool flag = index < 0 || index >= base.uiBehaviour.m_Progress.ChestList.Count;
+ if (!flag)
+ {
+ base.uiBehaviour.m_Progress.ChestList[index].Open();
+ }
+ }
+
+ private void OnChestClicked(IXUISprite iSp)
+ {
+ bool flag = this.SetButtonCool(this.m_CoolTime);
+ if (!flag)
+ {
+ int index = (int)iSp.ID;
+ this.ShowReward(index);
+ bool flag2 = base.uiBehaviour.m_Progress.IsExpEnough(index);
+ if (flag2)
+ {
+ DragonGuildLivenessTable.RowData rowData = this.m_dragonguildLivenessRow[index];
+ bool flag3 = rowData != null;
+ if (flag3)
+ {
+ XDragonGuildDocument.DragonGuildLivenessData.ReqTakeDragonGuildChest(rowData.index);
+ }
+ }
+ }
+ }
+
+ public void ShowReward(int index)
+ {
+ this.m_CurSelectIndex = index;
+ base.uiBehaviour.m_RewardItemPool.ReturnAll(false);
+ DragonGuildLivenessTable.RowData rowData = this.m_dragonguildLivenessRow[this.m_CurSelectIndex];
+ for (int i = 0; i < rowData.viewabledrop.Count; i++)
+ {
+ GameObject gameObject = base.uiBehaviour.m_RewardItemPool.FetchGameObject(false);
+ bool flag = rowData.viewabledrop[i, 0] == 4u;
+ if (flag)
+ {
+ XSingleton<XItemDrawerMgr>.singleton.normalItemDrawer.DrawItem(gameObject, (int)rowData.viewabledrop[i, 0], 0, false);
+ }
+ else
+ {
+ XSingleton<XItemDrawerMgr>.singleton.normalItemDrawer.DrawItem(gameObject, (int)rowData.viewabledrop[i, 0], (int)rowData.viewabledrop[i, 1], true);
+ }
+ XSingleton<XItemDrawerMgr>.singleton.normalItemDrawer.OpenClickShowTooltipEvent(gameObject, (int)rowData.viewabledrop[i, 0]);
+ Vector3 tplPos = base.uiBehaviour.m_RewardItemPool.TplPos;
+ gameObject.transform.localPosition = new Vector3(tplPos.x + (float)base.uiBehaviour.m_RewardItemPool.TplWidth * ((float)(-(float)rowData.viewabledrop.Count) / 2f + 0.5f + (float)i), tplPos.y, tplPos.z);
+ }
+ base.uiBehaviour.m_chestTips.SetText(rowData.liveness.ToString());
+ }
+
+ private void OnClosed(IXUISprite spr)
+ {
+ this.SetVisible(false, true);
+ }
+
+ private bool SetButtonCool(float time)
+ {
+ float num = Time.realtimeSinceStartup - this.m_LastClickTime;
+ bool flag = num < time;
+ bool result;
+ if (flag)
+ {
+ result = true;
+ }
+ else
+ {
+ this.m_LastClickTime = Time.realtimeSinceStartup;
+ result = false;
+ }
+ return result;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/DragonGuildLivenessDlg.cs.meta b/Client/Assets/Scripts/XMainClient/UI/DragonGuildLivenessDlg.cs.meta
new file mode 100644
index 00000000..a1659b62
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/DragonGuildLivenessDlg.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 15f439f07b6ddbe4bb6a10219c5892b6
+timeCreated: 1611403267
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/DragonGuildLivenessRecordItem.cs b/Client/Assets/Scripts/XMainClient/UI/DragonGuildLivenessRecordItem.cs
new file mode 100644
index 00000000..824a3f69
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/DragonGuildLivenessRecordItem.cs
@@ -0,0 +1,41 @@
+using System;
+using UILib;
+using UnityEngine;
+
+namespace XMainClient.UI
+{
+ public class DragonGuildLivenessRecordItem : MonoBehaviour
+ {
+ public IXUILabel m_nameLab;
+
+ public IXUILabel m_timeLab;
+
+ public IXUILabel m_contentLab;
+
+ private IXUISprite m_sprRoot;
+
+ private IXUISprite m_bgSpr;
+
+ private void Awake()
+ {
+ this.m_sprRoot = (base.GetComponent("XUISprite") as IXUISprite);
+ this.m_bgSpr = (base.transform.Find("Bg").GetComponent("XUISprite") as IXUISprite);
+ this.m_nameLab = (base.transform.Find("Bg/Name").GetComponent("XUILabel") as IXUILabel);
+ this.m_timeLab = (base.transform.Find("Bg/Time").GetComponent("XUILabel") as IXUILabel);
+ this.m_contentLab = (base.transform.Find("Bg/Description").GetComponent("XUILabel") as IXUILabel);
+ }
+
+ public void Refresh(DragonGuildLivenessRecord record)
+ {
+ bool flag = record == null;
+ if (!flag)
+ {
+ this.m_nameLab.SetText(record.Name);
+ this.m_timeLab.SetText(record.ShowTimeStr);
+ this.m_contentLab.SetText(record.ShowString);
+ this.m_sprRoot.spriteHeight = 46 + this.m_contentLab.spriteHeight;
+ this.m_bgSpr.spriteHeight = this.m_sprRoot.spriteHeight;
+ }
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/DragonGuildLivenessRecordItem.cs.meta b/Client/Assets/Scripts/XMainClient/UI/DragonGuildLivenessRecordItem.cs.meta
new file mode 100644
index 00000000..0ed93a67
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/DragonGuildLivenessRecordItem.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 2d921147122e2334c8ab13204fc3383e
+timeCreated: 1611403506
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/DragonGuildShopRecordsHandler.cs b/Client/Assets/Scripts/XMainClient/UI/DragonGuildShopRecordsHandler.cs
new file mode 100644
index 00000000..0f1d2f21
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/DragonGuildShopRecordsHandler.cs
@@ -0,0 +1,150 @@
+using System;
+using UILib;
+using UnityEngine;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class DragonGuildShopRecordsHandler : DlgHandlerBase
+ {
+ private XDragonGuildDocument m_doc
+ {
+ get
+ {
+ return XDragonGuildDocument.Doc;
+ }
+ }
+
+ protected override string FileName
+ {
+ get
+ {
+ return "Partner/PartnerShopRecords";
+ }
+ }
+
+ private IXUIButton m_closeBtn;
+
+ private IXUIWrapContent m_wrapContent;
+
+ private GameObject m_tipsGo;
+
+ private IXUIScrollView m_ScrollView;
+
+ protected override void Init()
+ {
+ base.Init();
+ this.m_doc.ShopRecordsHandler = this;
+ this.m_closeBtn = (base.PanelObject.transform.Find("Close").GetComponent("XUIButton") as IXUIButton);
+ Transform transform = base.PanelObject.transform.Find("Panel");
+ this.m_ScrollView = (transform.GetComponent("XUIScrollView") as IXUIScrollView);
+ this.m_wrapContent = (transform.Find("Wrap").GetComponent("XUIWrapContent") as IXUIWrapContent);
+ this.m_tipsGo = base.PanelObject.transform.Find("Tips").gameObject;
+ this.m_ScrollView.ResetPosition();
+ this.m_wrapContent.RegisterItemUpdateEventHandler(new WrapItemUpdateEventHandler(this.WrapContentItemUpdated));
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ this.m_closeBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnClosedClicked));
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ this.m_doc.ReqShopRecords();
+ }
+
+ protected override void OnHide()
+ {
+ base.OnHide();
+ }
+
+ public override void StackRefresh()
+ {
+ base.StackRefresh();
+ }
+
+ public override void OnUnload()
+ {
+ this.m_doc.ShopRecordsHandler = null;
+ base.OnUnload();
+ }
+
+ private void FillDefault()
+ {
+ this.m_tipsGo.SetActive(true);
+ this.m_wrapContent.gameObject.SetActive(false);
+ }
+
+ public void FillContent()
+ {
+ bool flag = this.m_doc.ShopRecordList == null;
+ if (flag)
+ {
+ XSingleton<XDebug>.singleton.AddGreenLog("ShopRecordList is null", null, null, null, null, null);
+ }
+ else
+ {
+ bool flag2 = this.m_doc.ShopRecordList.Count == 0;
+ if (flag2)
+ {
+ this.m_tipsGo.SetActive(true);
+ this.m_wrapContent.gameObject.SetActive(false);
+ }
+ else
+ {
+ this.m_tipsGo.SetActive(false);
+ this.m_wrapContent.gameObject.SetActive(true);
+ int count = this.m_doc.ShopRecordList.Count;
+ this.m_wrapContent.SetContentCount(count, false);
+ }
+ }
+ }
+
+ private void WrapContentItemUpdated(Transform t, int index)
+ {
+ bool flag = index >= this.m_doc.ShopRecordList.Count;
+ if (flag)
+ {
+ XSingleton<XDebug>.singleton.AddErrorLog("index >= ShopRecordList.Count", null, null, null, null, null);
+ }
+ else
+ {
+ DragonGuildShopRecord dragonGuildShopRecord = this.m_doc.ShopRecordList[index];
+ IXUILabel ixuilabel = t.Find("Time").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel.SetText(dragonGuildShopRecord.TimeStr.Replace("/n", "\n"));
+ ixuilabel = (t.Find("ItemName").GetComponent("XUILabel") as IXUILabel);
+ ixuilabel.SetText(dragonGuildShopRecord.ItemName);
+ ixuilabel = (t.Find("ItemNum").GetComponent("XUILabel") as IXUILabel);
+ ixuilabel.SetText(dragonGuildShopRecord.BuyCount.ToString());
+ IXUILabelSymbol ixuilabelSymbol = t.Find("PlayerName").GetComponent("XUILabelSymbol") as IXUILabelSymbol;
+ ixuilabelSymbol.InputText = dragonGuildShopRecord.PlayerName;
+ ixuilabelSymbol.ID = (ulong)((long)index);
+ ixuilabelSymbol.RegisterSymbolClickHandler(new LabelSymbolClickEventHandler(this.OnClickName));
+ }
+ }
+
+ private void OnClickName(IXUILabelSymbol iSp)
+ {
+ bool flag = this.m_doc.ShopRecordList == null;
+ if (!flag)
+ {
+ int index = (int)iSp.ID / 100;
+ DragonGuildShopRecord dragonGuildShopRecord = this.m_doc.ShopRecordList[index];
+ bool flag2 = dragonGuildShopRecord == null;
+ if (!flag2)
+ {
+ XCharacterCommonMenuDocument.ReqCharacterMenuInfo(dragonGuildShopRecord.RoleId, false);
+ }
+ }
+ }
+
+ private bool OnClosedClicked(IXUIButton sp)
+ {
+ base.SetVisible(false);
+ return true;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/DragonGuildShopRecordsHandler.cs.meta b/Client/Assets/Scripts/XMainClient/UI/DragonGuildShopRecordsHandler.cs.meta
new file mode 100644
index 00000000..33b87539
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/DragonGuildShopRecordsHandler.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: f44377c413274e445a7b9a644cf3e3d0
+timeCreated: 1611404853
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/DramaDlg.cs b/Client/Assets/Scripts/XMainClient/UI/DramaDlg.cs
new file mode 100644
index 00000000..cd5b318d
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/DramaDlg.cs
@@ -0,0 +1,848 @@
+using System;
+using System.Collections.Generic;
+using KKSG;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class DramaDlg : DlgBase<DramaDlg, DramaDlgBehaviour>
+ {
+ public override string fileName
+ {
+ get
+ {
+ return "Hall/DramaDlg";
+ }
+ }
+
+ public override int layer
+ {
+ get
+ {
+ return 1;
+ }
+ }
+
+ public override bool exclusive
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override bool autoload
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override bool isHideTutorial
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public XNpc m_npc;
+
+ protected XNpcAttributes m_npcAttr;
+
+ public Queue<XDialogSentence> m_DialogQueue = new Queue<XDialogSentence>();
+
+ private XDummy m_npcDummy;
+
+ private XTaskDocument taskDoc;
+
+ private XTaskInfo m_RelativeTask;
+
+ private uint m_RelativeTaskID;
+
+ private XDramaDocument doc;
+
+ private XNPCFavorDramaSend sendHandler = null;
+
+ private XNPCFavorDramaExchange exchangeHandler = null;
+
+ protected override void Init()
+ {
+ this._TogglePage(DramaPage.DP_MAX);
+ this.taskDoc = XDocuments.GetSpecificDocument<XTaskDocument>(XTaskDocument.uuID);
+ this.doc = XDocuments.GetSpecificDocument<XDramaDocument>(XDramaDocument.uuID);
+ DlgHandlerBase.EnsureCreate<XNPCFavorDramaSend>(ref this.sendHandler, base.uiBehaviour.m_FavorFrame, false, this);
+ DlgHandlerBase.EnsureCreate<XNPCFavorDramaExchange>(ref this.exchangeHandler, base.uiBehaviour.m_FavorFrame, false, this);
+ }
+
+ public override void RegisterEvent()
+ {
+ IXUISprite ixuisprite = base.uiBehaviour.m_TaskArea.GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.GotoNextTalk));
+ ixuisprite = (base.uiBehaviour.m_OperateArea.GetComponent("XUISprite") as IXUISprite);
+ ixuisprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this._OnCloseClicked));
+ ixuisprite = (base.uiBehaviour.m_FavorGB.GetComponent("XUISprite") as IXUISprite);
+ ixuisprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this._OnCloseClicked));
+ base.uiBehaviour.m_RewardBg.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnRewardClick));
+ base.uiBehaviour.m_FuncArea.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnNormalFuncClick));
+ base.uiBehaviour.m_BtnAccept.RegisterClickEventHandler(new ButtonClickEventHandler(this._OnBtnAcceptTaskClicked));
+ base.uiBehaviour.m_BtnReject.RegisterClickEventHandler(new ButtonClickEventHandler(this._OnBtnRejectTaskClicked));
+ }
+
+ protected void OnNormalFuncClick(IXUISprite sp)
+ {
+ bool flag = !base.IsLoaded();
+ if (!flag)
+ {
+ bool flag2 = this.m_npc != null && !this.m_npc.Deprecated;
+ if (flag2)
+ {
+ XNpcInfo.RowData byNPCID = XSingleton<XEntityMgr>.singleton.NpcInfo.GetByNPCID(this.m_npc.TypeID);
+ bool flag3 = byNPCID != null && byNPCID.NPCType == 3u;
+ if (flag3)
+ {
+ HomePlantDocument.Doc.HomeSprite.SetNextStepOperation();
+ }
+ bool flag4 = byNPCID != null && byNPCID.NPCType == 4u;
+ if (flag4)
+ {
+ XGuildCollectDocument specificDocument = XDocuments.GetSpecificDocument<XGuildCollectDocument>(XGuildCollectDocument.uuID);
+ specificDocument.OnMeetNpc(this.m_npc.TypeID);
+ }
+ }
+ this.SetVisible(false, true);
+ }
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ base.Alloc3DAvatarPool("DramaDlg");
+ this.m_npc = null;
+ this.m_npcAttr = null;
+ this._TogglePage(DramaPage.DP_MAX);
+ XSingleton<XGameUI>.singleton.HpbarRoot.gameObject.SetActive(false);
+ XSingleton<XGameUI>.singleton.NpcHpbarRoot.gameObject.SetActive(false);
+ XSingleton<XPostEffectMgr>.singleton.MakeEffectEnable(XPostEffect.GausBlur, false);
+ XSingleton<XAudioMgr>.singleton.StopUISound();
+ }
+
+ protected override void OnHide()
+ {
+ this.doc.OnUIClose();
+ this.m_RelativeTask = null;
+ XSingleton<X3DAvatarMgr>.singleton.EnableMainDummy(false, null);
+ bool flag = base.uiBehaviour.m_leftSnapshot != null;
+ if (flag)
+ {
+ base.uiBehaviour.m_rightSnapshot.RefreshRenderQueue = null;
+ }
+ bool flag2 = base.uiBehaviour.m_leftSnapshot != null;
+ if (flag2)
+ {
+ base.uiBehaviour.m_leftSnapshot.RefreshRenderQueue = null;
+ }
+ base.Return3DAvatarPool();
+ this.m_npcDummy = null;
+ XCameraCloseUpEndEventArgs @event = XEventPool<XCameraCloseUpEndEventArgs>.GetEvent();
+ @event.Firer = XSingleton<XScene>.singleton.GameCamera;
+ XSingleton<XEventMgr>.singleton.FireEvent(@event);
+ DlgBase<XMainInterface, XMainInterfaceBehaviour>.singleton.DramaDlgCloseTime = Time.time;
+ XSingleton<XGameUI>.singleton.HpbarRoot.gameObject.SetActive(true);
+ XSingleton<XGameUI>.singleton.NpcHpbarRoot.gameObject.SetActive(true);
+ bool flag3 = this.sendHandler != null;
+ if (flag3)
+ {
+ this.sendHandler.SetVisible(false);
+ }
+ bool flag4 = this.exchangeHandler != null;
+ if (flag4)
+ {
+ this.exchangeHandler.SetVisible(false);
+ }
+ XNPCFavorDocument specificDocument = XDocuments.GetSpecificDocument<XNPCFavorDocument>(XNPCFavorDocument.uuID);
+ DlgBase<XMainInterface, XMainInterfaceBehaviour>.singleton.SetSystemRedPointState(XSysDefine.XSys_NPCFavor, specificDocument.IsNeedShowRedpoint);
+ base.OnHide();
+ }
+
+ protected override void OnUnload()
+ {
+ DlgHandlerBase.EnsureUnload<XNPCFavorDramaSend>(ref this.sendHandler);
+ DlgHandlerBase.EnsureUnload<XNPCFavorDramaExchange>(ref this.exchangeHandler);
+ base.Return3DAvatarPool();
+ this.doc.OnUIClose();
+ base.OnUnload();
+ }
+
+ public override void OnUpdate()
+ {
+ base.OnUpdate();
+ for (int i = 0; i < base.uiBehaviour.MAX_OPERATE_BTN_COUNT; i++)
+ {
+ base.uiBehaviour.m_OperateBtns[i].Update();
+ }
+ for (int j = 0; j < base.uiBehaviour.MAX_OPERATE_LIST_COUNT; j++)
+ {
+ base.uiBehaviour.m_OperateLists[j].Update();
+ }
+ }
+
+ private void _TogglePage(DramaPage page)
+ {
+ base.uiBehaviour.m_TaskArea.gameObject.SetActive(page == DramaPage.DP_DIALOG || page == DramaPage.DP_ACCEPT);
+ base.uiBehaviour.m_RewardArea.gameObject.SetActive(page == DramaPage.DP_REWARD);
+ base.uiBehaviour.m_FuncArea.gameObject.SetActive(page == DramaPage.DP_FUNC);
+ base.uiBehaviour.m_TaskAcceptArea.SetActive(page == DramaPage.DP_ACCEPT);
+ base.uiBehaviour.m_OperateArea.SetActive(page == DramaPage.DP_OPERATE);
+ base.uiBehaviour.m_FavorGB.SetActive(page == DramaPage.DP_FAVOR);
+ }
+
+ public void ShowNpcDialog(XNpc npc)
+ {
+ bool flag = !XEntity.ValideEntity(npc);
+ if (!flag)
+ {
+ XSingleton<XGameUI>.singleton.OnGenericClick();
+ bool flag2 = XSingleton<XChatIFlyMgr>.singleton.IsRecording();
+ if (flag2)
+ {
+ XCameraCloseUpEndEventArgs @event = XEventPool<XCameraCloseUpEndEventArgs>.GetEvent();
+ @event.Firer = XSingleton<XScene>.singleton.GameCamera;
+ XSingleton<XEventMgr>.singleton.FireEvent(@event);
+ }
+ else
+ {
+ this.SetVisible(true, true);
+ this.m_npc = npc;
+ this.m_npcAttr = (npc.Attributes as XNpcAttributes);
+ bool flag3 = this.m_npcAttr == null;
+ if (flag3)
+ {
+ this.SetVisible(false, true);
+ }
+ else
+ {
+ this.SetupTalkerName(this.m_npcAttr.Name);
+ npc.ShowUp(null);
+ NpcTaskState npcTaskState = this.taskDoc.GetNpcTaskState(npc.TypeID, ref this.m_RelativeTask);
+ bool flag4 = this.m_RelativeTask != null;
+ if (flag4)
+ {
+ this.m_RelativeTaskID = this.m_RelativeTask.ID;
+ }
+ else
+ {
+ this.m_RelativeTaskID = 0u;
+ }
+ bool flag5 = npcTaskState == NpcTaskState.Normal || npc.NPCType == 3u;
+ if (flag5)
+ {
+ int index = this.PlayNpcVoice();
+ this.SetupNpcNormalDialog(index, npc.NPCType);
+ }
+ else
+ {
+ this.m_DialogQueue.Clear();
+ XTaskDialog curDialog = this.m_RelativeTask.CurDialog;
+ for (int i = 0; i < curDialog.Dialog.Count; i++)
+ {
+ this.m_DialogQueue.Enqueue(curDialog.Dialog[i]);
+ }
+ this.SetupNpcTaskDialog();
+ }
+ }
+ }
+ }
+ }
+
+ protected void OnRewardClick(IXUISprite sp)
+ {
+ bool flag = !base.IsLoaded();
+ if (!flag)
+ {
+ XTaskInfo xtaskInfo = null;
+ NpcTaskState npcTaskState = this.taskDoc.GetNpcTaskState(this.m_npc.TypeID, ref xtaskInfo);
+ bool flag2 = npcTaskState == NpcTaskState.TaskEnd;
+ if (flag2)
+ {
+ RpcC2G_TaskOperate rpcC2G_TaskOperate = new RpcC2G_TaskOperate();
+ rpcC2G_TaskOperate.oArg.taskID = (int)xtaskInfo.ID;
+ rpcC2G_TaskOperate.oArg.taskOP = 2;
+ XSingleton<XClientNetwork>.singleton.Send(rpcC2G_TaskOperate);
+ XSingleton<XOperationRecord>.singleton.DoScriptRecord("finishtask+" + xtaskInfo.ID);
+ DlgBase<DramaDlg, DramaDlgBehaviour>.singleton.SetVisible(false, true);
+ }
+ }
+ }
+
+ protected void _PlayVoice(string voice, bool isNPC)
+ {
+ if (isNPC)
+ {
+ bool flag = XSingleton<XEntityMgr>.singleton.Player != null && XSingleton<XAudioMgr>.singleton.IsPlayingSound(XSingleton<XEntityMgr>.singleton.Player, AudioChannel.Motion);
+ if (flag)
+ {
+ XSingleton<XAudioMgr>.singleton.StopSound(XSingleton<XEntityMgr>.singleton.Player, AudioChannel.Motion);
+ }
+ bool flag2 = this.m_npc != null && !string.IsNullOrEmpty(voice);
+ if (flag2)
+ {
+ XSingleton<XAudioMgr>.singleton.PlaySound(this.m_npc, AudioChannel.Motion, voice);
+ }
+ }
+ else
+ {
+ bool flag3 = this.m_npc != null && XSingleton<XAudioMgr>.singleton.IsPlayingSound(this.m_npc, AudioChannel.Motion);
+ if (flag3)
+ {
+ XSingleton<XAudioMgr>.singleton.StopSound(this.m_npc, AudioChannel.Motion);
+ }
+ bool flag4 = XSingleton<XEntityMgr>.singleton.Player != null && !string.IsNullOrEmpty(voice);
+ if (flag4)
+ {
+ XSingleton<XAudioMgr>.singleton.PlaySound(XSingleton<XEntityMgr>.singleton.Player, AudioChannel.Motion, voice);
+ }
+ }
+ }
+
+ public void StopVoice()
+ {
+ bool flag = XSingleton<XEntityMgr>.singleton.Player != null && XSingleton<XAudioMgr>.singleton.IsPlayingSound(XSingleton<XEntityMgr>.singleton.Player, AudioChannel.Motion);
+ if (flag)
+ {
+ XSingleton<XAudioMgr>.singleton.StopSound(XSingleton<XEntityMgr>.singleton.Player, AudioChannel.Motion);
+ }
+ bool flag2 = this.m_npc != null && XSingleton<XAudioMgr>.singleton.IsPlayingSound(this.m_npc, AudioChannel.Motion);
+ if (flag2)
+ {
+ XSingleton<XAudioMgr>.singleton.StopSound(this.m_npc, AudioChannel.Motion);
+ }
+ }
+
+ protected void GotoNextTalk(IXUISprite sp)
+ {
+ bool flag = !base.IsLoaded();
+ if (!flag)
+ {
+ bool activeSelf = base.uiBehaviour.m_TaskAcceptArea.activeSelf;
+ if (!activeSelf)
+ {
+ bool flag2 = this.m_DialogQueue.Count > 0;
+ if (flag2)
+ {
+ XDialogSentence xdialogSentence = this.m_DialogQueue.Dequeue();
+ bool flag3 = xdialogSentence.bCanReject && this.m_RelativeTask.Status == TaskStatus.TaskStatus_CanTake;
+ if (flag3)
+ {
+ this._TogglePage(DramaPage.DP_ACCEPT);
+ this.ShowTaskAccept(ref xdialogSentence);
+ }
+ else
+ {
+ this._TogglePage(DramaPage.DP_DIALOG);
+ }
+ bool flag4 = xdialogSentence.Talker == 1;
+ if (flag4)
+ {
+ this.SetupNpcText(this.m_npc, XSingleton<UiUtility>.singleton.ReplaceReturn(xdialogSentence.Content));
+ this._PlayVoice(xdialogSentence.Voice, true);
+ }
+ else
+ {
+ this.SetupPlayerText(XSingleton<UiUtility>.singleton.ReplaceReturn(xdialogSentence.Content));
+ this._PlayVoice(xdialogSentence.Voice, false);
+ }
+ }
+ else
+ {
+ this.SetupNpcText(this.m_npc, "");
+ NpcTaskState npcTaskState = NpcTaskState.Normal;
+ this.m_RelativeTask = this.taskDoc.GetTaskInfo(this.m_RelativeTaskID);
+ bool flag5 = this.m_RelativeTask != null;
+ if (flag5)
+ {
+ npcTaskState = this.m_RelativeTask.NpcState;
+ }
+ bool flag6 = npcTaskState == NpcTaskState.TaskBegin;
+ if (flag6)
+ {
+ RpcC2G_TaskOperate rpcC2G_TaskOperate = new RpcC2G_TaskOperate();
+ rpcC2G_TaskOperate.oArg.taskID = (int)this.m_RelativeTask.ID;
+ rpcC2G_TaskOperate.oArg.taskOP = 1;
+ XSingleton<XClientNetwork>.singleton.Send(rpcC2G_TaskOperate);
+ XSingleton<XOperationRecord>.singleton.DoScriptRecord("accepttask+" + this.m_RelativeTask.ID);
+ bool flag7 = !this.CanAutoContinue(this.m_RelativeTask);
+ if (flag7)
+ {
+ this.SetVisible(false, true);
+ }
+ }
+ else
+ {
+ bool flag8 = npcTaskState == NpcTaskState.TaskEnd;
+ if (flag8)
+ {
+ this.ShowTaskReward(this.m_RelativeTask.ID);
+ }
+ else
+ {
+ this.SetVisible(false, true);
+ }
+ }
+ }
+ }
+ }
+ }
+
+ public bool CanAutoContinue(XTaskInfo taskInfo)
+ {
+ return (taskInfo != null & taskInfo.Conds.Count == 0) && XSingleton<UiUtility>.singleton.ChooseProfData<uint>(taskInfo.TableData.BeginTaskNPCID, 0u) == XSingleton<UiUtility>.singleton.ChooseProfData<uint>(taskInfo.TableData.EndTaskNPCID, 0u);
+ }
+
+ protected void ShowTaskAccept(ref XDialogSentence dialog)
+ {
+ bool flag = this.m_RelativeTask == null || this.m_RelativeTask.TableData == null;
+ if (!flag)
+ {
+ this._TogglePage(DramaPage.DP_ACCEPT);
+ TaskTableNew.RowData tableData = this.m_RelativeTask.TableData;
+ bool flag2 = tableData.RewardItem.Count > 0;
+ if (flag2)
+ {
+ base.uiBehaviour.m_AcceptItemBg.SetActive(true);
+ base.uiBehaviour.m_AcceptItemPool.FakeReturnAll();
+ for (int i = 0; i < tableData.RewardItem.Count; i++)
+ {
+ GameObject gameObject = base.uiBehaviour.m_AcceptItemPool.FetchGameObject(false);
+ gameObject.transform.localPosition = new Vector3(base.uiBehaviour.m_AcceptItemPool.TplPos.x + (float)(i * base.uiBehaviour.m_AcceptItemPool.TplWidth), base.uiBehaviour.m_AcceptItemPool.TplPos.y, base.uiBehaviour.m_AcceptItemPool.TplPos.z);
+ XSingleton<XItemDrawerMgr>.singleton.normalItemDrawer.DrawItem(gameObject, (int)tableData.RewardItem[i, 0], (int)tableData.RewardItem[i, 1], false);
+ }
+ base.uiBehaviour.m_AcceptItemPool.ActualReturnAll(false);
+ }
+ else
+ {
+ base.uiBehaviour.m_AcceptItemBg.SetActive(false);
+ }
+ }
+ }
+
+ protected void ShowTaskReward(uint taskID)
+ {
+ TaskTableNew.RowData taskData = XTaskDocument.GetTaskData(taskID);
+ base.uiBehaviour.m_RewardGold.SetText("0");
+ base.uiBehaviour.m_RewardExp.SetText("0");
+ bool flag = taskData != null;
+ if (flag)
+ {
+ this._TogglePage(DramaPage.DP_REWARD);
+ bool flag2 = taskData.RewardItem.Count > 0;
+ if (flag2)
+ {
+ base.uiBehaviour.m_RewardItemBg.gameObject.SetActive(true);
+ Vector3 localPosition = base.uiBehaviour.m_RewardItemPool._tpl.transform.localPosition;
+ float num = (float)(base.uiBehaviour.m_RewardItemPool.TplWidth + 5);
+ base.uiBehaviour.m_RewardItemPool.ReturnAll(false);
+ int i = 0;
+ int num2 = 0;
+ while (i < taskData.RewardItem.Count)
+ {
+ int num3 = (int)taskData.RewardItem[i, 0];
+ int itemCount = (int)taskData.RewardItem[i, 1];
+ bool flag3 = num3 == 1;
+ if (flag3)
+ {
+ base.uiBehaviour.m_RewardGold.SetText(itemCount.ToString());
+ }
+ else
+ {
+ bool flag4 = num3 == 4;
+ if (flag4)
+ {
+ base.uiBehaviour.m_RewardExp.SetText(itemCount.ToString());
+ }
+ else
+ {
+ GameObject gameObject = base.uiBehaviour.m_RewardItemPool.FetchGameObject(false);
+ gameObject.transform.localPosition = localPosition + new Vector3((float)num2 * num, 0f, 0f);
+ num2++;
+ XSingleton<XItemDrawerMgr>.singleton.normalItemDrawer.DrawItem(gameObject, num3, itemCount, false);
+ XSingleton<XItemDrawerMgr>.singleton.normalItemDrawer.OpenClickShowTooltipEvent(gameObject, num3);
+ }
+ }
+ i++;
+ }
+ }
+ else
+ {
+ base.uiBehaviour.m_RewardItemBg.gameObject.SetActive(false);
+ }
+ }
+ }
+
+ protected void SetupNpcTaskDialog()
+ {
+ bool flag = this.m_DialogQueue.Count > 0;
+ if (flag)
+ {
+ this.GotoNextTalk(null);
+ }
+ }
+
+ protected void SetupNPCAvatar(uint presentID, bool playtween)
+ {
+ base.uiBehaviour.m_rightSnapshot.transform.localPosition = base.uiBehaviour.m_rightDummyPos;
+ base.uiBehaviour.m_leftSnapshot.transform.localPosition = XGameUI.Far_Far_Away;
+ this.m_npcDummy = XSingleton<X3DAvatarMgr>.singleton.CreateCommonEntityDummy(this.m_dummPool, presentID, base.uiBehaviour.m_rightSnapshot, this.m_npcDummy, 1f);
+ XEntityPresentation.RowData byPresentID = XSingleton<XEntityMgr>.singleton.EntityInfo.GetByPresentID(presentID);
+ bool flag = byPresentID != null && byPresentID.AvatarPos != null;
+ if (flag)
+ {
+ int num = XSingleton<XCommon>.singleton.RandomInt(0, byPresentID.AvatarPos.Length);
+ this.m_npcDummy.SetAnimation(byPresentID.AvatarPos[num]);
+ }
+ }
+
+ protected void SetupTalkerName(string name)
+ {
+ base.uiBehaviour.m_name.SetText(name);
+ }
+
+ protected void SetupNpcNormalDialog(int index, uint npcType)
+ {
+ this._TogglePage(DramaPage.DP_FUNC);
+ bool flag = npcType == 3u;
+ if (flag)
+ {
+ HomePlantDocument homePlantDocument = HomePlantDocument.Doc;
+ base.uiBehaviour.m_FuncText.SetText(homePlantDocument.HomeSprite.GetDialogue());
+ this.SetupNPCAvatar(this.m_npcAttr.PresentID, true);
+ }
+ else
+ {
+ index = ((this.m_npcAttr.Content != null && index >= this.m_npcAttr.Content.Length) ? 0 : index);
+ base.uiBehaviour.m_FuncText.SetText(this.m_npcAttr.Content[index]);
+ this.SetupNPCAvatar(this.m_npcAttr.PresentID, true);
+ Vector3 localPosition = base.uiBehaviour.m_FuncPool._tpl.transform.localPosition;
+ float num = (float)(base.uiBehaviour.m_FuncPool.TplHeight + 2);
+ base.uiBehaviour.m_FuncPool.ReturnAll(false);
+ bool flag2 = this.m_npcAttr.Content != null && this.m_npcAttr.FunctionList != null;
+ if (flag2)
+ {
+ for (int i = 0; i < this.m_npcAttr.FunctionList.Length; i++)
+ {
+ GameObject gameObject = base.uiBehaviour.m_FuncPool.FetchGameObject(false);
+ gameObject.transform.localPosition = localPosition + new Vector3(0f, (float)(-(float)i) * num);
+ IXUILabel ixuilabel = gameObject.GetComponent("XUILabel") as IXUILabel;
+ ixuilabel.SetText(XSingleton<XGameSysMgr>.singleton.GetSysName(this.m_npcAttr.FunctionList[i]));
+ ixuilabel.ID = (ulong)((long)this.m_npcAttr.FunctionList[i]);
+ }
+ }
+ bool flag3 = this.m_npcAttr.FunctionList == null || this.m_npcAttr.FunctionList.Length == 0;
+ if (flag3)
+ {
+ base.uiBehaviour.m_FuncTplBg.gameObject.SetActive(false);
+ }
+ else
+ {
+ base.uiBehaviour.m_FuncTplBg.gameObject.SetActive(true);
+ }
+ }
+ }
+
+ protected int PlayNpcVoice()
+ {
+ bool flag = this.m_npcAttr.Voice == null || this.m_npcAttr.Voice.Length == 0;
+ int result;
+ if (flag)
+ {
+ result = 0;
+ }
+ else
+ {
+ bool flag2 = !XSingleton<XAudioMgr>.singleton.IsPlayingSound(this.m_npc, AudioChannel.Motion);
+ if (flag2)
+ {
+ int num = XSingleton<XCommon>.singleton.RandomInt(0, this.m_npcAttr.Voice.Length);
+ XSingleton<XAudioMgr>.singleton.PlaySound(this.m_npc, AudioChannel.Motion, this.m_npcAttr.Voice[num]);
+ result = num;
+ }
+ else
+ {
+ result = 0;
+ }
+ }
+ return result;
+ }
+
+ protected void SetupNpcText(XNpc npc, string text)
+ {
+ base.uiBehaviour.m_NpcText.gameObject.SetActive(true);
+ base.uiBehaviour.m_PlayerText.gameObject.SetActive(false);
+ base.uiBehaviour.m_name.gameObject.transform.parent.gameObject.SetActive(true);
+ this.SetupNPCAvatar(this.m_npcAttr.PresentID, false);
+ base.uiBehaviour.m_NpcText.SetText(text);
+ }
+
+ protected void SetupPlayerText(string text)
+ {
+ base.uiBehaviour.m_NpcText.gameObject.SetActive(false);
+ base.uiBehaviour.m_PlayerText.gameObject.SetActive(true);
+ base.uiBehaviour.m_name.gameObject.transform.parent.gameObject.SetActive(false);
+ base.uiBehaviour.m_PlayerText.SetText(text);
+ base.uiBehaviour.m_rightSnapshot.transform.localPosition = XGameUI.Far_Far_Away;
+ base.uiBehaviour.m_leftSnapshot.transform.localPosition = base.uiBehaviour.m_leftDummyPos;
+ XSingleton<X3DAvatarMgr>.singleton.EnableMainDummy(true, base.uiBehaviour.m_leftSnapshot);
+ XEntityPresentation.RowData byPresentID = XSingleton<XEntityMgr>.singleton.EntityInfo.GetByPresentID(XSingleton<XAttributeMgr>.singleton.XPlayerData.PresentID);
+ bool flag = byPresentID != null && byPresentID.AvatarPos != null;
+ if (flag)
+ {
+ int num = XSingleton<XCommon>.singleton.RandomInt(0, byPresentID.AvatarPos.Length);
+ XSingleton<X3DAvatarMgr>.singleton.SetMainAnimation(byPresentID.AvatarPos[num]);
+ }
+ }
+
+ private bool _OnBtnAcceptTaskClicked(IXUIButton btn)
+ {
+ bool flag = !base.IsLoaded();
+ bool result;
+ if (flag)
+ {
+ result = true;
+ }
+ else
+ {
+ bool flag2 = this.m_RelativeTask == null;
+ if (flag2)
+ {
+ result = true;
+ }
+ else
+ {
+ RpcC2G_TaskOperate rpcC2G_TaskOperate = new RpcC2G_TaskOperate();
+ rpcC2G_TaskOperate.oArg.taskID = (int)this.m_RelativeTask.ID;
+ rpcC2G_TaskOperate.oArg.taskOP = 1;
+ XSingleton<XClientNetwork>.singleton.Send(rpcC2G_TaskOperate);
+ XSingleton<XOperationRecord>.singleton.DoScriptRecord("accepttask+" + this.m_RelativeTask.ID);
+ this.SetVisible(false, true);
+ result = true;
+ }
+ }
+ return result;
+ }
+
+ private bool _OnBtnRejectTaskClicked(IXUIButton btn)
+ {
+ bool flag = !base.IsLoaded();
+ bool result;
+ if (flag)
+ {
+ result = true;
+ }
+ else
+ {
+ this.SetVisible(false, true);
+ result = true;
+ }
+ return result;
+ }
+
+ private void _OnCloseClicked(IXUISprite iSp)
+ {
+ bool flag = !base.IsLoaded();
+ if (!flag)
+ {
+ bool bBlockClose = this.doc.bBlockClose;
+ if (!bBlockClose)
+ {
+ this.SetVisible(false, true);
+ }
+ }
+ }
+
+ public void SetupOperate(XDramaOperateParam param)
+ {
+ bool flag = !base.IsLoaded();
+ if (!flag)
+ {
+ this._TogglePage(DramaPage.DP_OPERATE);
+ bool flag2 = param.Npc != null;
+ if (flag2)
+ {
+ this.m_npc = param.Npc;
+ this.m_npcAttr = (this.m_npc.Attributes as XNpcAttributes);
+ this.SetupTalkerName(this.m_npcAttr.Name);
+ this.m_npc.ShowUp(null);
+ this.SetupNPCAvatar(this.m_npcAttr.PresentID, true);
+ }
+ bool flag3 = param.Text != null;
+ if (flag3)
+ {
+ base.uiBehaviour.m_OperateText.SetText(param.Text);
+ }
+ bool flag4 = param.ButtonCount > 0;
+ if (flag4)
+ {
+ base.uiBehaviour.m_OperateBtnPanel.SetActive(true);
+ int i = 0;
+ while (i < param.ButtonCount && i < base.uiBehaviour.MAX_OPERATE_BTN_COUNT)
+ {
+ XDramaOperateButton xdramaOperateButton = param.Buttons[i];
+ DramaDlgBehaviour.OperateButton operateButton = base.uiBehaviour.m_OperateBtns[i];
+ operateButton.SetActive(true);
+ operateButton.SetButton(xdramaOperateButton.Name, xdramaOperateButton.RID, xdramaOperateButton.ClickEvent, xdramaOperateButton.StateEnable);
+ operateButton.SetLeftTime(xdramaOperateButton.TargetTime - Time.realtimeSinceStartup, xdramaOperateButton.TimeNote);
+ i++;
+ }
+ while (i < base.uiBehaviour.MAX_OPERATE_BTN_COUNT)
+ {
+ base.uiBehaviour.m_OperateBtns[i].SetActive(false);
+ i++;
+ }
+ }
+ else
+ {
+ base.uiBehaviour.m_OperateBtnPanel.SetActive(false);
+ }
+ bool flag5 = param.ListCount > 0;
+ if (flag5)
+ {
+ base.uiBehaviour.m_OperateListPanel.SetActive(true);
+ int j = 0;
+ while (j < param.ListCount && j < base.uiBehaviour.MAX_OPERATE_LIST_COUNT)
+ {
+ XDramaOperateList xdramaOperateList = param.Lists[j];
+ DramaDlgBehaviour.OperateList operateList = base.uiBehaviour.m_OperateLists[j];
+ operateList.SetActive(true);
+ SpriteClickEventHandler spriteClickEventHandler = new SpriteClickEventHandler(xdramaOperateList.ClickEvent.Invoke);
+ spriteClickEventHandler = (SpriteClickEventHandler)Delegate.Combine(spriteClickEventHandler, new SpriteClickEventHandler(this._OnOperateListClicked));
+ operateList.SetList(xdramaOperateList.Name, xdramaOperateList.RID, spriteClickEventHandler);
+ operateList.SetLeftTime(xdramaOperateList.TargetTime - Time.realtimeSinceStartup, xdramaOperateList.TimeNote);
+ this._ToggleOperateListSelection(j, false);
+ j++;
+ }
+ while (j < base.uiBehaviour.MAX_OPERATE_LIST_COUNT)
+ {
+ base.uiBehaviour.m_OperateLists[j].SetActive(false);
+ j++;
+ }
+ }
+ else
+ {
+ base.uiBehaviour.m_OperateListPanel.SetActive(false);
+ }
+ }
+ }
+
+ private void _OnOperateListClicked(IXUISprite iSp)
+ {
+ bool flag = !base.IsLoaded();
+ if (!flag)
+ {
+ this._SelectOperateList((int)iSp.ID);
+ }
+ }
+
+ private void _ToggleOperateListSelection(int index, bool bSelect)
+ {
+ base.uiBehaviour.m_OperateLists[index].SetSelect(bSelect);
+ }
+
+ private void _SelectOperateList(int index)
+ {
+ for (int i = 0; i < base.uiBehaviour.MAX_OPERATE_LIST_COUNT; i++)
+ {
+ this._ToggleOperateListSelection(i, index == i);
+ }
+ }
+
+ public void SetUpFavorParam(XFavorParam param)
+ {
+ bool flag = !base.IsLoaded();
+ if (!flag)
+ {
+ this._TogglePage(DramaPage.DP_FAVOR);
+ bool flag2 = param.Npc != null;
+ if (flag2)
+ {
+ this.m_npc = param.Npc;
+ this.m_npcAttr = (this.m_npc.Attributes as XNpcAttributes);
+ this.SetupTalkerName(this.m_npcAttr.Name);
+ this.m_npc.ShowUp(null);
+ this.SetupNPCAvatar(this.m_npcAttr.PresentID, true);
+ }
+ bool flag3 = param.Text != null;
+ if (flag3)
+ {
+ base.uiBehaviour.m_FavorText.SetText(param.Text);
+ }
+ base.uiBehaviour.m_SendBtn.gameObject.SetActive(param.isShowSend);
+ base.uiBehaviour.m_SendBtn.RegisterClickEventHandler(param.sendCallback);
+ base.uiBehaviour.m_ExchangeBtn.gameObject.SetActive(param.isShowExchange);
+ base.uiBehaviour.m_ExchangeBtn.RegisterClickEventHandler(param.exchangeCallback);
+ base.uiBehaviour.m_ExchangeRedPoint.SetActive(param.isShowExchangeRedpoint);
+ base.uiBehaviour.m_FavorBtnList.Refresh();
+ }
+ }
+
+ public void NtfSendDramaRefresh()
+ {
+ bool flag = this.sendHandler.IsVisible();
+ if (flag)
+ {
+ this.sendHandler.RefreshData();
+ }
+ }
+
+ public void NtfExchangeDramaRefresh()
+ {
+ bool flag = this.exchangeHandler.IsVisible();
+ if (flag)
+ {
+ this.exchangeHandler.RefreshData();
+ }
+ }
+
+ public void NtfExchangeDlgClose()
+ {
+ bool flag = this.exchangeHandler.IsVisible();
+ if (flag)
+ {
+ this.exchangeHandler.SetVisible(false);
+ }
+ }
+
+ public void ShowNPCFavorSend()
+ {
+ bool flag = this.exchangeHandler.IsVisible();
+ if (flag)
+ {
+ this.exchangeHandler.SetVisible(false);
+ }
+ this.sendHandler.SetVisible(true);
+ }
+
+ public void ShowNPCFavorExchnage()
+ {
+ bool flag = this.sendHandler.IsVisible();
+ if (flag)
+ {
+ this.sendHandler.SetVisible(false);
+ }
+ this.exchangeHandler.SetVisible(true);
+ }
+
+ public bool IsSendDilogVisible()
+ {
+ return this.sendHandler != null && this.sendHandler.IsVisible();
+ }
+
+ public bool IsChangeDialogVisible()
+ {
+ return this.exchangeHandler != null && this.exchangeHandler.IsVisible();
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/DramaDlg.cs.meta b/Client/Assets/Scripts/XMainClient/UI/DramaDlg.cs.meta
new file mode 100644
index 00000000..5a23fefa
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/DramaDlg.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 8ccad7e365e6e20479fca0a03a37348d
+timeCreated: 1611404101
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/DramaDlgBehaviour.cs b/Client/Assets/Scripts/XMainClient/UI/DramaDlgBehaviour.cs
new file mode 100644
index 00000000..d5936204
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/DramaDlgBehaviour.cs
@@ -0,0 +1,255 @@
+using System;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class DramaDlgBehaviour : DlgBehaviourBase
+ {
+ public IXUILabel m_name;
+
+ public IUIDummy m_leftSnapshot;
+
+ public IUIDummy m_rightSnapshot;
+
+ public Vector3 m_leftDummyPos;
+
+ public Vector3 m_rightDummyPos;
+
+ public Transform m_TaskArea;
+
+ public Transform m_RewardArea;
+
+ public IXUISprite m_FuncArea;
+
+ public IXUILabel m_NpcText;
+
+ public IXUILabel m_PlayerText;
+
+ public IXUIButton m_TaskNext;
+
+ public IXUISprite m_RewardBg;
+
+ public IXUILabel m_RewardGold;
+
+ public IXUILabel m_RewardExp;
+
+ public XUIPool m_RewardItemPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ public IXUIButton m_RewardNext;
+
+ public Transform m_RewardItemBg;
+
+ public IXUILabel m_FuncText;
+
+ public XUIPool m_FuncPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ public Transform m_FuncTplBg;
+
+ public GameObject m_TaskAcceptArea;
+
+ public IXUIButton m_BtnAccept;
+
+ public IXUIButton m_BtnReject;
+
+ public XUIPool m_AcceptItemPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ public GameObject m_AcceptItemBg;
+
+ public GameObject m_OperateArea;
+
+ public GameObject m_OperateBtnPanel;
+
+ public GameObject m_OperateListPanel;
+
+ public IXUILabel m_OperateText;
+
+ public DramaDlgBehaviour.OperateButton[] m_OperateBtns = new DramaDlgBehaviour.OperateButton[4];
+
+ public DramaDlgBehaviour.OperateList[] m_OperateLists = new DramaDlgBehaviour.OperateList[4];
+
+ public int MAX_OPERATE_BTN_COUNT;
+
+ public int MAX_OPERATE_LIST_COUNT;
+
+ public GameObject m_FavorGB;
+
+ public IXUIList m_FavorBtnList;
+
+ public IXUIButton m_SendBtn;
+
+ public IXUIButton m_ExchangeBtn;
+
+ public GameObject m_ExchangeRedPoint;
+
+ public IXUILabel m_FavorText;
+
+ public Transform m_FavorFrame;
+
+ public class OperateBase
+ {
+ protected GameObject m_go;
+
+ protected XLeftTimeCounter leftTime;
+
+ protected IXUILabel leftTimeNote;
+
+ public OperateBase(GameObject go)
+ {
+ this.m_go = go;
+ }
+
+ public void SetActive(bool bActive)
+ {
+ this.m_go.SetActive(bActive);
+ }
+
+ public void SetLeftTime(float second, string note)
+ {
+ bool flag = this.leftTime != null;
+ if (flag)
+ {
+ this.leftTime.SetLeftTime(second, -1);
+ }
+ bool flag2 = this.leftTimeNote != null;
+ if (flag2)
+ {
+ this.leftTimeNote.SetText(note);
+ }
+ }
+
+ public void Update()
+ {
+ bool flag = !this.m_go.activeSelf;
+ if (!flag)
+ {
+ bool flag2 = this.leftTime != null;
+ if (flag2)
+ {
+ this.leftTime.Update();
+ }
+ }
+ }
+ }
+
+ public class OperateButton : DramaDlgBehaviour.OperateBase
+ {
+ public IXUIButton btn;
+
+ public IXUILabel text;
+
+ public OperateButton(GameObject go) : base(go)
+ {
+ this.btn = (this.m_go.transform.Find("Btn").GetComponent("XUIButton") as IXUIButton);
+ this.text = (this.btn.gameObject.transform.Find("Label").GetComponent("XUILabel") as IXUILabel);
+ this.leftTime = new XLeftTimeCounter(this.m_go.transform.Find("LeftTime").GetComponent("XUILabel") as IXUILabel, true);
+ this.leftTimeNote = (this.m_go.transform.Find("LeftTime/Note").GetComponent("XUILabel") as IXUILabel);
+ }
+
+ public void SetButton(string buttonName, ulong id, ButtonClickEventHandler clickEvent, bool enable)
+ {
+ this.btn.ID = id;
+ this.btn.RegisterClickEventHandler(clickEvent);
+ this.btn.SetEnable(enable, false);
+ this.text.SetText(buttonName);
+ }
+ }
+
+ public class OperateList : DramaDlgBehaviour.OperateBase
+ {
+ public IXUISprite bg;
+
+ public IXUILabel text;
+
+ public GameObject selected;
+
+ public OperateList(GameObject go) : base(go)
+ {
+ this.bg = (this.m_go.GetComponent("XUISprite") as IXUISprite);
+ this.text = (this.m_go.gameObject.transform.Find("Text").GetComponent("XUILabel") as IXUILabel);
+ this.selected = this.m_go.transform.Find("Selected").gameObject;
+ this.leftTime = new XLeftTimeCounter(this.m_go.transform.Find("LeftTime").GetComponent("XUILabel") as IXUILabel, true);
+ this.leftTimeNote = (this.m_go.transform.Find("LeftTime/Note").GetComponent("XUILabel") as IXUILabel);
+ }
+
+ public void SetList(string name, ulong id, SpriteClickEventHandler clickEvent)
+ {
+ this.bg.ID = id;
+ this.bg.RegisterSpriteClickEventHandler(clickEvent);
+ this.text.SetText(name);
+ }
+
+ public void SetSelect(bool bSelect)
+ {
+ this.selected.SetActive(bSelect);
+ }
+ }
+
+ private void Awake()
+ {
+ this.m_name = (base.transform.Find("_canvas/TalkTextBg/Talker/Text").GetComponent("XUILabel") as IXUILabel);
+ this.m_TaskArea = base.transform.Find("_canvas/TalkTextBg/TaskText");
+ this.m_RewardArea = base.transform.Find("_canvas/TalkTextBg/TaskReward");
+ this.m_FuncArea = (base.transform.Find("_canvas/TalkTextBg/NormalFunc").GetComponent("XUISprite") as IXUISprite);
+ this.m_NpcText = (base.transform.Find("_canvas/TalkTextBg/TaskText/Text").GetComponent("XUILabel") as IXUILabel);
+ this.m_TaskNext = (base.transform.Find("_canvas/TalkTextBg/TaskText/Next").GetComponent("XUIButton") as IXUIButton);
+ this.m_PlayerText = (base.transform.Find("_canvas/TalkTextBg/TaskText/PlayerText").GetComponent("XUILabel") as IXUILabel);
+ this.m_RewardBg = (base.transform.Find("_canvas/TalkTextBg/TaskReward").GetComponent("XUISprite") as IXUISprite);
+ this.m_RewardGold = (base.transform.Find("_canvas/TalkTextBg/TaskReward/Gold/Value").GetComponent("XUILabel") as IXUILabel);
+ this.m_RewardExp = (base.transform.Find("_canvas/TalkTextBg/TaskReward/Exp/Value").GetComponent("XUILabel") as IXUILabel);
+ Transform transform = base.transform.Find("_canvas/TalkTextBg/TaskReward/P/ItemTpl");
+ this.m_RewardItemPool.SetupPool(transform.parent.gameObject, transform.gameObject, 4u, false);
+ this.m_RewardNext = (base.transform.Find("_canvas/TalkTextBg/TaskReward/Next").GetComponent("XUIButton") as IXUIButton);
+ this.m_RewardItemBg = base.transform.Find("_canvas/TalkTextBg/TaskReward/P");
+ this.m_FuncText = (base.transform.Find("_canvas/TalkTextBg/NormalFunc/Text").GetComponent("XUILabel") as IXUILabel);
+ transform = base.transform.Find("_canvas/TalkTextBg/NormalFunc/P/FuncTpl");
+ this.m_FuncPool.SetupPool(transform.parent.gameObject, transform.gameObject, 2u, false);
+ this.m_FuncTplBg = base.transform.Find("_canvas/TalkTextBg/NormalFunc/P");
+ this.m_leftSnapshot = (base.transform.Find("_canvas/LeftSnapshot").GetComponent("UIDummy") as IUIDummy);
+ this.m_rightSnapshot = (base.transform.Find("_canvas/RightSnapshot").GetComponent("UIDummy") as IUIDummy);
+ this.m_leftDummyPos = this.m_leftSnapshot.transform.localPosition;
+ this.m_rightDummyPos = this.m_rightSnapshot.transform.localPosition;
+ this.m_TaskAcceptArea = base.transform.Find("_canvas/TalkTextBg/TaskAccept").gameObject;
+ this.m_BtnAccept = (this.m_TaskAcceptArea.transform.Find("BtnOK").GetComponent("XUIButton") as IXUIButton);
+ this.m_BtnReject = (this.m_TaskAcceptArea.transform.Find("BtnCancel").GetComponent("XUIButton") as IXUIButton);
+ this.m_AcceptItemBg = this.m_TaskAcceptArea.transform.Find("ItemList").gameObject;
+ transform = this.m_AcceptItemBg.transform.Find("ItemTpl");
+ this.m_AcceptItemPool.SetupPool(transform.parent.gameObject, transform.gameObject, 4u, false);
+ this.m_OperateArea = base.transform.Find("_canvas/TalkTextBg/Operate").gameObject;
+ this.m_OperateBtnPanel = this.m_OperateArea.transform.Find("Buttons").gameObject;
+ this.m_OperateListPanel = this.m_OperateArea.transform.Find("List").gameObject;
+ this.m_OperateText = (this.m_OperateArea.transform.Find("Text").GetComponent("XUILabel") as IXUILabel);
+ for (int i = 0; i < 5; i++)
+ {
+ transform = this.m_OperateBtnPanel.transform.Find("Btn" + i);
+ bool flag = transform == null;
+ if (flag)
+ {
+ this.MAX_OPERATE_BTN_COUNT = i;
+ break;
+ }
+ this.m_OperateBtns[i] = new DramaDlgBehaviour.OperateButton(transform.gameObject);
+ }
+ for (int j = 0; j < 4; j++)
+ {
+ transform = this.m_OperateListPanel.transform.Find("List" + j);
+ bool flag2 = transform == null;
+ if (flag2)
+ {
+ this.MAX_OPERATE_LIST_COUNT = j;
+ break;
+ }
+ this.m_OperateLists[j] = new DramaDlgBehaviour.OperateList(transform.gameObject);
+ }
+ this.m_FavorGB = base.transform.Find("_canvas/TalkTextBg/NpcBlessing").gameObject;
+ this.m_FavorBtnList = (this.m_FavorGB.transform.Find("Grid").GetComponent("XUIList") as IXUIList);
+ this.m_SendBtn = (this.m_FavorGB.transform.Find("Grid/BtnSend").GetComponent("XUIButton") as IXUIButton);
+ this.m_ExchangeBtn = (this.m_FavorGB.transform.Find("Grid/BtnChange").GetComponent("XUIButton") as IXUIButton);
+ this.m_ExchangeRedPoint = this.m_FavorGB.transform.Find("Grid/BtnChange/RedPoint").gameObject;
+ this.m_FavorText = (this.m_FavorGB.transform.Find("Text").GetComponent("XUILabel") as IXUILabel);
+ this.m_FavorFrame = this.m_FavorGB.transform.Find("FavorFrame");
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/DramaDlgBehaviour.cs.meta b/Client/Assets/Scripts/XMainClient/UI/DramaDlgBehaviour.cs.meta
new file mode 100644
index 00000000..93afd819
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/DramaDlgBehaviour.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 9d357707c085d8a48879f5d3e0ecfccf
+timeCreated: 1611404235
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/DramaPage.cs b/Client/Assets/Scripts/XMainClient/UI/DramaPage.cs
new file mode 100644
index 00000000..75e62c90
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/DramaPage.cs
@@ -0,0 +1,15 @@
+using System;
+
+namespace XMainClient.UI
+{
+ internal enum DramaPage
+ {
+ DP_DIALOG,
+ DP_REWARD,
+ DP_FUNC,
+ DP_ACCEPT,
+ DP_OPERATE,
+ DP_FAVOR,
+ DP_MAX
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/DramaPage.cs.meta b/Client/Assets/Scripts/XMainClient/UI/DramaPage.cs.meta
new file mode 100644
index 00000000..41cefcb4
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/DramaPage.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: d9b96385a5f555a4e8c9fdbd06f13a9d
+timeCreated: 1611404645
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/DungeonSelect.cs b/Client/Assets/Scripts/XMainClient/UI/DungeonSelect.cs
new file mode 100644
index 00000000..865f43e5
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/DungeonSelect.cs
@@ -0,0 +1,2445 @@
+using System;
+using System.Collections.Generic;
+using KKSG;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class DungeonSelect : DlgBase<DungeonSelect, DungeonSelectBehaviour>
+ {
+ private bool _bLevelIsMoving
+ {
+ get
+ {
+ return this.m_bLevelIsMoving;
+ }
+ set
+ {
+ bool flag = base.uiBehaviour.m_hardBox != null;
+ if (flag)
+ {
+ base.uiBehaviour.m_hardBox.enabled = !value;
+ }
+ bool flag2 = base.uiBehaviour.m_normalBox != null;
+ if (flag2)
+ {
+ base.uiBehaviour.m_normalBox.enabled = !value;
+ }
+ this.m_bLevelIsMoving = value;
+ }
+ }
+
+ public string EffectPath
+ {
+ get
+ {
+ bool flag = string.IsNullOrEmpty(this.m_effectPath);
+ if (flag)
+ {
+ this.m_effectPath = XSingleton<XGlobalConfig>.singleton.GetValue("DungeonSelectRoleEffectPath");
+ }
+ return this.m_effectPath;
+ }
+ }
+
+ public string EffectPath1
+ {
+ get
+ {
+ bool flag = string.IsNullOrEmpty(this.m_effectPath1);
+ if (flag)
+ {
+ this.m_effectPath1 = XSingleton<XGlobalConfig>.singleton.GetValue("DungeonSelectRoleEffectPath1");
+ }
+ return this.m_effectPath1;
+ }
+ }
+
+ public override string fileName
+ {
+ get
+ {
+ return "Hall/DungeonSelect";
+ }
+ }
+
+ public override int layer
+ {
+ get
+ {
+ return 1;
+ }
+ }
+
+ public override bool pushstack
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override bool autoload
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override bool fullscreenui
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override bool hideMainMenu
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ private bool _isShowBossAvatar = true;
+
+ private int _HardModeNeedLevel = 0;
+
+ private uint _SelectDifficult = 0u;
+
+ private int _SelectedChapter = 0;
+
+ private uint _SelectScene = 0u;
+
+ private bool _bAutoSelect = false;
+
+ private bool _bAutoSelectChapterId = true;
+
+ private GameObject _MainFrame;
+
+ private GameObject _LeftFrame;
+
+ private GameObject _RightFrame;
+
+ private bool m_bLevelIsMoving = false;
+
+ private int _ChapterRank;
+
+ private int _ChapterTotalRank;
+
+ private const float LEVEL_FRAME_OFFSET = 1136f;
+
+ private uint _FirstNoRankScene = 0u;
+
+ private Dictionary<uint, GameObject> SceneDic = new Dictionary<uint, GameObject>();
+
+ private uint _SceneRemainTime = 9999u;
+
+ public bool IsTaskMode = false;
+
+ private float m_fSweepBtnCoolTime = 0.5f;
+
+ private float m_fGoBattleCoolTime = 5f;
+
+ private float m_fLastClickBtnTime = 0f;
+
+ private DungeonSelect.FrameCache main;
+
+ private DungeonSelect.FrameCache left;
+
+ private DungeonSelect.FrameCache right;
+
+ private XDummy bossDummy = null;
+
+ private XWelfareDocument _welfareDoc;
+
+ private GameObject m_goLevelUpGo;
+
+ private XFx m_fx;
+
+ private XFx m_fx1;
+
+ private string m_effectPath = string.Empty;
+
+ private string m_effectPath1 = string.Empty;
+
+ private struct FrameCache
+ {
+ public IUIDummy snapShot;
+
+ public GameObject fx;
+
+ public void Clear()
+ {
+ this.snapShot = null;
+ this.fx = null;
+ }
+
+ public void Copy(ref DungeonSelect.FrameCache fc)
+ {
+ this.snapShot = fc.snapShot;
+ bool flag = this.fx != null;
+ if (flag)
+ {
+ this.fx.SetActive(false);
+ }
+ this.fx = fc.fx;
+ }
+ }
+
+ protected override void Init()
+ {
+ XLevelDocument xlevelDocument = XSingleton<XGame>.singleton.Doc.GetXComponent(XLevelDocument.uuID) as XLevelDocument;
+ this._welfareDoc = XDocuments.GetSpecificDocument<XWelfareDocument>(XWelfareDocument.uuID);
+ bool flag = this._SelectedChapter == 0;
+ if (flag)
+ {
+ this._SelectedChapter = XSingleton<XStageProgress>.singleton.GetPlayerLastChapter(this._SelectDifficult);
+ }
+ OpenSystemTable.RowData sysData = XSingleton<XGameSysMgr>.singleton.GetSysData(XSysDefineMgr.GetTypeInt(XSysDefine.XSys_Level_Elite));
+ bool flag2 = sysData != null;
+ if (flag2)
+ {
+ this._HardModeNeedLevel = sysData.PlayerLevel;
+ }
+ else
+ {
+ this._HardModeNeedLevel = 1;
+ XSingleton<XDebug>.singleton.AddErrorLog("_sysData is nill", null, null, null, null, null);
+ }
+ }
+
+ public GameObject GetGoLevelUpInfo()
+ {
+ return this.m_goLevelUpGo;
+ }
+
+ public void FadeShow()
+ {
+ bool flag = !base.IsVisible();
+ if (flag)
+ {
+ XAutoFade.FadeOut2In(0.5f, 0.5f);
+ XSingleton<XTimerMgr>.singleton.SetTimer(0.484f, new XTimerMgr.ElapsedEventHandler(this.InnerShow), null);
+ }
+ }
+
+ private void InnerShow(object o)
+ {
+ this.SetVisible(true, true);
+ XTaskDocument specificDocument = XDocuments.GetSpecificDocument<XTaskDocument>(XTaskDocument.uuID);
+ specificDocument.ResetNavi();
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ base.uiBehaviour.m_SceneDetail.SetActive(false);
+ base.Alloc3DAvatarPool("DungeonSelect");
+ XMainInterfaceDocument specificDocument = XDocuments.GetSpecificDocument<XMainInterfaceDocument>(XMainInterfaceDocument.uuID);
+ specificDocument.OnTopUIRefreshed(this);
+ XTaskDocument specificDocument2 = XDocuments.GetSpecificDocument<XTaskDocument>(XTaskDocument.uuID);
+ bool isTaskMode = this.IsTaskMode;
+ if (isTaskMode)
+ {
+ int naviScene = (int)specificDocument2.NaviScene;
+ bool flag = naviScene != 0;
+ if (flag)
+ {
+ this.SetAutoSelectScene(naviScene, 0, 0u);
+ this._bAutoSelect = false;
+ this._bAutoSelectChapterId = true;
+ }
+ this.IsTaskMode = false;
+ }
+ bool flag2 = DlgBase<XPurchaseView, XPurchaseBehaviour>.singleton.IsVisible();
+ if (flag2)
+ {
+ DlgBase<XPurchaseView, XPurchaseBehaviour>.singleton.OnCloseClicked(null);
+ }
+ bool flag3 = DlgBase<XCharacterCommonMenuView, XCharacterCommonMenuBehaviour>.singleton.IsVisible();
+ if (flag3)
+ {
+ DlgBase<XCharacterCommonMenuView, XCharacterCommonMenuBehaviour>.singleton.SetVisible(false, true);
+ }
+ bool flag4 = DlgBase<XOptionsView, XOptionsBehaviour>.singleton.IsVisible();
+ if (flag4)
+ {
+ DlgBase<XOptionsView, XOptionsBehaviour>.singleton.SetVisible(false, true);
+ }
+ bool flag5 = DlgBase<XFlowerSendView, XFlowerSendBehaviour>.singleton.IsVisible();
+ if (flag5)
+ {
+ DlgBase<XFlowerSendView, XFlowerSendBehaviour>.singleton.SetVisible(false, true);
+ }
+ bool flag6 = DlgBase<ScreenShotShareView, ScreenShotShareBehaviour>.singleton.IsLoaded() && DlgBase<ScreenShotShareView, ScreenShotShareBehaviour>.singleton.IsVisible();
+ if (flag6)
+ {
+ DlgBase<ScreenShotShareView, ScreenShotShareBehaviour>.singleton.SetVisible(false, true);
+ }
+ bool flag7 = this._SelectDifficult == 0u;
+ base.uiBehaviour.m_cbNormal.ForceSetFlag(false);
+ base.uiBehaviour.m_cbHard.ForceSetFlag(false);
+ bool bAutoSelect = this._bAutoSelect;
+ if (bAutoSelect)
+ {
+ this.OnSwitchDifficult(flag7 ? base.uiBehaviour.m_Normal : base.uiBehaviour.m_Hard);
+ }
+ else
+ {
+ base.uiBehaviour.m_cbNormal.bChecked = flag7;
+ base.uiBehaviour.m_cbHard.bChecked = !flag7;
+ this.SetupChapterImage();
+ }
+ XTeamDocument specificDocument3 = XDocuments.GetSpecificDocument<XTeamDocument>(XTeamDocument.uuID);
+ specificDocument3.ReqTeamOp(TeamOperate.TEAM_QUERYCOUNT, 0UL, null, TeamMemberType.TMT_NORMAL, null);
+ XDailyActivitiesDocument specificDocument4 = XDocuments.GetSpecificDocument<XDailyActivitiesDocument>(XDailyActivitiesDocument.uuID);
+ specificDocument4.QueryDailyActivityData();
+ }
+
+ private void ResetTexture(GameObject frame)
+ {
+ bool flag = frame != null;
+ if (flag)
+ {
+ Transform transform = frame.transform.Find("BG");
+ bool flag2 = transform != null;
+ if (flag2)
+ {
+ IXUITexture ixuitexture = transform.GetComponent("XUITexture") as IXUITexture;
+ ixuitexture.SetTexturePath("");
+ }
+ }
+ }
+
+ protected override void OnHide()
+ {
+ base.OnHide();
+ this.main.Clear();
+ this.left.Clear();
+ this.right.Clear();
+ base.Return3DAvatarPool();
+ this.bossDummy = null;
+ XSingleton<XInput>.singleton.Freezed = false;
+ this.ResetTexture(this._MainFrame);
+ this.ResetTexture(this._LeftFrame);
+ this.ResetTexture(this._RightFrame);
+ this._bLevelIsMoving = false;
+ base.uiBehaviour.m_LevelTween.StopTween();
+ base.uiBehaviour.m_LevelTween.ResetTweenByGroup(true, 1);
+ base.uiBehaviour.m_cbHard.ForceSetFlag(false);
+ base.uiBehaviour.m_cbNormal.ForceSetFlag(false);
+ }
+
+ protected override void OnUnload()
+ {
+ XSingleton<X3DAvatarMgr>.singleton.OnUIUnloadMainDummy(this.main.snapShot);
+ base.Return3DAvatarPool();
+ this.bossDummy = null;
+ bool flag = this.m_fx != null;
+ if (flag)
+ {
+ XSingleton<XFxMgr>.singleton.DestroyFx(this.m_fx, true);
+ this.m_fx = null;
+ }
+ bool flag2 = this.m_fx1 != null;
+ if (flag2)
+ {
+ XSingleton<XFxMgr>.singleton.DestroyFx(this.m_fx1, true);
+ this.m_fx1 = null;
+ }
+ base.OnUnload();
+ }
+
+ public override void RegisterEvent()
+ {
+ base.uiBehaviour.m_Normal.ID = 0UL;
+ base.uiBehaviour.m_Hard.ID = 1UL;
+ base.uiBehaviour.m_Close.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnCloseClicked));
+ base.uiBehaviour.m_Normal.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnSwitchDifficult));
+ base.uiBehaviour.m_Hard.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnSwitchDifficult));
+ base.uiBehaviour.m_LevelBg.RegisterSpriteDragEventHandler(new SpriteDragEventHandler(this.OnLevelBgDrag));
+ base.uiBehaviour.m_SceneClose.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnDetailClose));
+ base.uiBehaviour.m_SceneQuick1.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnQuickClicked));
+ base.uiBehaviour.m_SceneQuick10.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnQuickClicked));
+ base.uiBehaviour.m_SceneGoBattle.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnGoBattleBtnClicked));
+ base.uiBehaviour.m_SceneSoloBattle.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnSoloBattleClicked));
+ base.uiBehaviour.m_SceneTeamBattle.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnTeamBattleClicked));
+ base.uiBehaviour.m_ShopBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnShopBtnClick));
+ base.uiBehaviour.m_Left.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnMoveLeft));
+ base.uiBehaviour.m_Right.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnMoveRight));
+ base.uiBehaviour.m_BoxFrameBg.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnChapterBoxBgClick));
+ base.uiBehaviour.m_BtnAddHardLeftCount0.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this._OnAddHardCountClicked));
+ base.uiBehaviour.m_BtnAddHardLeftCount1.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this._OnAddHardCountClicked));
+ base.uiBehaviour.m_PrerogativeBg.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnMemberPrivilegeClicked));
+ base.uiBehaviour.m_addTicketSpr.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnClickAddTicketBtn));
+ }
+
+ private void OnMemberPrivilegeClicked(IXUISprite btn)
+ {
+ DlgBase<XWelfareView, XWelfareBehaviour>.singleton.CheckActiveMemberPrivilege(MemberPrivilege.KingdomPrivilege_Adventurer);
+ }
+
+ private void OnClickAddTicketBtn(IXUISprite spr)
+ {
+ XSingleton<UiUtility>.singleton.ShowItemAccess(XSingleton<XGlobalConfig>.singleton.GetInt("SweepTicketId"), null);
+ }
+
+ protected void OnSwitchDifficult(IXUISprite sp)
+ {
+ bool bLevelIsMoving = this._bLevelIsMoving;
+ if (!bLevelIsMoving)
+ {
+ uint num = (uint)sp.ID;
+ bool flag = this._IsHardModeEnable();
+ bool flag2 = 1u == num;
+ if (flag2)
+ {
+ bool flag3 = !flag;
+ if (flag3)
+ {
+ base.uiBehaviour.m_cbHard.bChecked = false;
+ base.uiBehaviour.m_cbNormal.bChecked = true;
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString("DUNGEONSELECT_HARDMODE_LEVEL_LIMIT_FMT", new object[]
+ {
+ this._HardModeNeedLevel
+ }), "fece00");
+ return;
+ }
+ }
+ else
+ {
+ bool flag4 = !XSingleton<XGameSysMgr>.singleton.IsSystemOpened(XSysDefine.XSys_Level_Normal);
+ if (flag4)
+ {
+ return;
+ }
+ }
+ base.uiBehaviour.m_cbHard.bChecked = (1u == num);
+ base.uiBehaviour.m_cbNormal.bChecked = (1u != num);
+ bool bAutoSelectChapterId = this._bAutoSelectChapterId;
+ if (bAutoSelectChapterId)
+ {
+ int playerLocationChapter = XSingleton<XStageProgress>.singleton.GetPlayerLocationChapter(num);
+ this._SelectedChapter = playerLocationChapter;
+ }
+ else
+ {
+ this._bAutoSelectChapterId = true;
+ }
+ this._SelectDifficult = num;
+ this.SetupChapterImage();
+ XSingleton<XDebug>.singleton.AddGreenLog("OnSwitchDifficult", null, null, null, null, null);
+ }
+ }
+
+ private bool _IsHardModeEnable()
+ {
+ bool flag = XSingleton<XAttributeMgr>.singleton.XPlayerData != null;
+ bool result;
+ if (flag)
+ {
+ result = ((long)this._HardModeNeedLevel <= (long)((ulong)XSingleton<XAttributeMgr>.singleton.XPlayerData.Level));
+ }
+ else
+ {
+ XSingleton<XDebug>.singleton.AddGreenLog("XAttributeMgr.singleton.XPlayerData is null", null, null, null, null, null);
+ result = false;
+ }
+ return result;
+ }
+
+ public void AutoShowLastChapter(uint difficult, bool showDetailFrame = true)
+ {
+ bool flag = 1u == difficult && !this._IsHardModeEnable();
+ if (flag)
+ {
+ difficult = 0u;
+ }
+ this._SelectDifficult = difficult;
+ this._SelectedChapter = XSingleton<XStageProgress>.singleton.GetPlayerLocationChapter(this._SelectDifficult);
+ this._SelectScene = XSingleton<XStageProgress>.singleton.GetPlayerLastSceneInChapter(this._SelectedChapter);
+ bool flag2 = this._SelectDifficult == 0u;
+ if (flag2)
+ {
+ this.OnSwitchDifficult(base.uiBehaviour.m_Normal);
+ }
+ else
+ {
+ this.OnSwitchDifficult(base.uiBehaviour.m_Hard);
+ }
+ bool flag3 = this._SelectScene > 0u && showDetailFrame;
+ if (flag3)
+ {
+ this._SetupDetailFrame(this._SelectScene);
+ }
+ }
+
+ protected bool OnQuickClicked(IXUIButton button)
+ {
+ bool flag = this.SetButtonCool(this.m_fSweepBtnCoolTime);
+ bool result;
+ if (flag)
+ {
+ result = true;
+ }
+ else
+ {
+ bool flag2 = XSingleton<XGameSysMgr>.singleton.IsSystemOpened(XSysDefine.XSys_Level_Swap);
+ bool flag3 = !flag2;
+ if (flag3)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString("SWAP_NOT_OPEN"), "fece00");
+ result = true;
+ }
+ else
+ {
+ bool flag4 = this._SelectDifficult == 1u;
+ if (flag4)
+ {
+ XMainInterfaceDocument xmainInterfaceDocument = XSingleton<XGame>.singleton.Doc.GetXComponent(XMainInterfaceDocument.uuID) as XMainInterfaceDocument;
+ SceneTable.RowData sceneData = XSingleton<XSceneMgr>.singleton.GetSceneData(this._SelectScene);
+ bool flag5 = sceneData != null && xmainInterfaceDocument != null && xmainInterfaceDocument.GetPlayerPPT() < sceneData.SweepNeedPPT;
+ if (flag5)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString("SWEEPPPT_NOTENOUGH"), "fece00");
+ return true;
+ }
+ bool flag6 = XSingleton<XGame>.singleton.Doc.XBagDoc.GetItemCount(87) <= 0UL;
+ if (flag6)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString("SWEEPTICKETS_NOTENOUGH"), "fece00");
+ return true;
+ }
+ XExpeditionDocument specificDocument = XDocuments.GetSpecificDocument<XExpeditionDocument>(XExpeditionDocument.uuID);
+ int expIDBySceneID = specificDocument.GetExpIDBySceneID(this._SelectScene);
+ bool flag7 = !specificDocument.CheckCountAndBuy(expIDBySceneID, sceneData);
+ if (flag7)
+ {
+ return true;
+ }
+ }
+ bool flag8 = this.OnLackPower();
+ if (flag8)
+ {
+ result = true;
+ }
+ else
+ {
+ bool flag9 = this._SelectScene > 0u;
+ if (flag9)
+ {
+ XSweepDocument specificDocument2 = XDocuments.GetSpecificDocument<XSweepDocument>(XSweepDocument.uuID);
+ bool flag10 = button.gameObject.name == "Quick1";
+ if (flag10)
+ {
+ specificDocument2.StartSweep(this._SelectScene, 1u);
+ }
+ else
+ {
+ bool flag11 = button.gameObject.name == "Quick10";
+ if (flag11)
+ {
+ bool flag12 = this._SelectDifficult == 0u;
+ if (flag12)
+ {
+ specificDocument2.StartSweep(this._SelectScene, 10u);
+ }
+ else
+ {
+ bool flag13 = this._SelectDifficult == 1u;
+ if (flag13)
+ {
+ specificDocument2.StartSweep(this._SelectScene, 5u);
+ }
+ }
+ }
+ }
+ }
+ result = true;
+ }
+ }
+ }
+ return result;
+ }
+
+ private bool SetButtonCool(float time)
+ {
+ float num = Time.realtimeSinceStartup - this.m_fLastClickBtnTime;
+ bool flag = num < time;
+ bool result;
+ if (flag)
+ {
+ result = true;
+ }
+ else
+ {
+ this.m_fLastClickBtnTime = Time.realtimeSinceStartup;
+ result = false;
+ }
+ return result;
+ }
+
+ protected bool OnCloseClicked(IXUIButton button)
+ {
+ bool bLevelIsMoving = this._bLevelIsMoving;
+ bool result;
+ if (bLevelIsMoving)
+ {
+ XSingleton<XDebug>.singleton.AddLog("isMoving!!!!", null, null, null, null, null, XDebugColor.XDebug_None);
+ result = true;
+ }
+ else
+ {
+ this.SetVisible(false, true);
+ result = true;
+ }
+ return result;
+ }
+
+ protected bool OnResetClicked(IXUIButton button)
+ {
+ int num = 0;
+ XLevelDocument xlevelDocument = XSingleton<XGame>.singleton.Doc.GetXComponent(XLevelDocument.uuID) as XLevelDocument;
+ bool flag = xlevelDocument.SceneBuyCount.ContainsKey(this._SelectScene);
+ if (flag)
+ {
+ num = (int)xlevelDocument.SceneBuyCount[this._SelectScene];
+ }
+ List<uint> list = ListPool<uint>.Get();
+ string[] array = XSingleton<XGlobalConfig>.singleton.GetValue("BuyStageCountCost").Split(XGlobalConfig.ListSeparator);
+ uint num2 = 0u;
+ while ((ulong)num2 < (ulong)((long)array.Length))
+ {
+ list.Add(uint.Parse(array[(int)num2]));
+ num2 += 1u;
+ }
+ bool flag2 = num >= list.Count;
+ if (flag2)
+ {
+ num = list.Count - 1;
+ }
+ uint num3 = list[num];
+ string label = string.Format(XStringDefineProxy.GetString("RESET_LEVEL"), num3);
+ XSingleton<UiUtility>.singleton.ShowModalDialog(label, XStringDefineProxy.GetString("COMMON_OK"), XStringDefineProxy.GetString("COMMON_CANCEL"), new ButtonClickEventHandler(this._ResetScene));
+ ListPool<uint>.Release(list);
+ return true;
+ }
+
+ protected bool _ResetScene(IXUIButton button)
+ {
+ XLevelDocument xlevelDocument = XSingleton<XGame>.singleton.Doc.GetXComponent(XLevelDocument.uuID) as XLevelDocument;
+ xlevelDocument.ResetScene((int)this._SelectScene);
+ XSingleton<UiUtility>.singleton.CloseModalDlg();
+ return true;
+ }
+
+ public void OnResetSucc()
+ {
+ this._SetupDetailFrame(this._SelectScene);
+ }
+
+ public bool OnGoBattleBtnClicked(IXUIButton go)
+ {
+ bool flag = this._SelectScene > 0u;
+ if (flag)
+ {
+ bool flag2 = this.OnLackPower();
+ if (flag2)
+ {
+ return true;
+ }
+ SceneTable.RowData sceneData = XSingleton<XSceneMgr>.singleton.GetSceneData(this._SelectScene);
+ bool flag3 = sceneData == null;
+ if (flag3)
+ {
+ XSingleton<XDebug>.singleton.AddErrorLog("sceneData is null", null, null, null, null, null);
+ return true;
+ }
+ float num = float.Parse(XSingleton<XGlobalConfig>.singleton.GetValue("SceneGotoPower"));
+ bool flag4 = XSingleton<PPTCheckMgr>.singleton.CheckMyPPT(Mathf.FloorToInt((float)sceneData.RecommendPower * num));
+ if (flag4)
+ {
+ this.GoBattle(null);
+ }
+ else
+ {
+ base.uiBehaviour.m_SceneDetail.gameObject.SetActive(false);
+ XSingleton<PPTCheckMgr>.singleton.ShowPPTNotEnoughDlg(0UL, new ButtonClickEventHandler(this.GoBattle));
+ }
+ }
+ return true;
+ }
+
+ public bool OnSoloBattleClicked(IXUIButton go)
+ {
+ bool flag = this._SelectDifficult == 1u;
+ if (flag)
+ {
+ SceneTable.RowData sceneData = XSingleton<XSceneMgr>.singleton.GetSceneData(this._SelectScene);
+ bool flag2 = sceneData == null;
+ if (flag2)
+ {
+ XSingleton<XDebug>.singleton.AddErrorLog("sceneData is null", null, null, null, null, null);
+ return true;
+ }
+ float num = float.Parse(XSingleton<XGlobalConfig>.singleton.GetValue("SceneGotoPower"));
+ bool flag3 = XSingleton<PPTCheckMgr>.singleton.CheckMyPPT(Mathf.FloorToInt((float)sceneData.RecommendPower * num));
+ if (flag3)
+ {
+ this.OnRealSoloBattleClicked(null);
+ }
+ else
+ {
+ base.uiBehaviour.m_SceneDetail.gameObject.SetActive(false);
+ XSingleton<PPTCheckMgr>.singleton.ShowPPTNotEnoughDlg(0UL, new ButtonClickEventHandler(this.OnRealSoloBattleClicked));
+ }
+ }
+ return true;
+ }
+
+ public bool OnRealSoloBattleClicked(IXUIButton go)
+ {
+ bool flag = this.OnLackPower();
+ bool result;
+ if (flag)
+ {
+ result = true;
+ }
+ else
+ {
+ XTeamDocument specificDocument = XDocuments.GetSpecificDocument<XTeamDocument>(XTeamDocument.uuID);
+ bool bInTeam = specificDocument.bInTeam;
+ if (bInTeam)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString("ERR_TEAM_ALREADY_INTEAM"), "fece00");
+ result = true;
+ }
+ else
+ {
+ result = true;
+ }
+ }
+ return result;
+ }
+
+ public bool OnTeamBattleClicked(IXUIButton go)
+ {
+ bool flag = this._SelectDifficult == 1u;
+ if (flag)
+ {
+ SceneTable.RowData sceneData = XSingleton<XSceneMgr>.singleton.GetSceneData(this._SelectScene);
+ float num = float.Parse(XSingleton<XGlobalConfig>.singleton.GetValue("SceneGotoPower"));
+ bool flag2 = sceneData != null;
+ if (flag2)
+ {
+ bool flag3 = XSingleton<PPTCheckMgr>.singleton.CheckMyPPT(Mathf.FloorToInt((float)sceneData.RecommendPower * num));
+ if (flag3)
+ {
+ this.OnRealTeamBattleClicked(null);
+ }
+ else
+ {
+ base.uiBehaviour.m_SceneDetail.gameObject.SetActive(false);
+ XSingleton<PPTCheckMgr>.singleton.ShowPPTNotEnoughDlg(0UL, new ButtonClickEventHandler(this.OnRealTeamBattleClicked));
+ }
+ }
+ }
+ return true;
+ }
+
+ public bool OnRealTeamBattleClicked(IXUIButton go)
+ {
+ XExpeditionDocument specificDocument = XDocuments.GetSpecificDocument<XExpeditionDocument>(XExpeditionDocument.uuID);
+ XTeamDocument specificDocument2 = XDocuments.GetSpecificDocument<XTeamDocument>(XTeamDocument.uuID);
+ int expIDBySceneID = specificDocument.GetExpIDBySceneID(this._SelectScene);
+ specificDocument2.SetAndMatch(expIDBySceneID);
+ return true;
+ }
+
+ private bool OnLackPower()
+ {
+ return this.OnLackPower(1);
+ }
+
+ private bool OnLackPower(int times)
+ {
+ bool flag = !XSingleton<UiUtility>.singleton.CanEnterBattleScene(this._SelectScene, times);
+ bool result;
+ if (flag)
+ {
+ bool flag2 = XSingleton<UiUtility>.singleton.IsMaxBuyPowerCnt();
+ if (flag2)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString("ERR_SCENE_NOFATIGUE"), "fece00");
+ }
+ else
+ {
+ DlgBase<XPurchaseView, XPurchaseBehaviour>.singleton.ShowBorad(ItemEnum.FATIGUE);
+ }
+ result = true;
+ }
+ else
+ {
+ result = false;
+ }
+ return result;
+ }
+
+ protected bool GoBattle(IXUIButton go)
+ {
+ DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.SetVisible(false, true);
+ bool flag = XTeamDocument.GoSingleBattleBeforeNeed(new ButtonClickEventHandler(this.GoBattle), go);
+ bool result;
+ if (flag)
+ {
+ result = true;
+ }
+ else
+ {
+ bool flag2 = this.SetButtonCool(this.m_fGoBattleCoolTime);
+ if (flag2)
+ {
+ result = true;
+ }
+ else
+ {
+ PtcC2G_EnterSceneReq ptcC2G_EnterSceneReq = new PtcC2G_EnterSceneReq();
+ ptcC2G_EnterSceneReq.Data.sceneID = this._SelectScene;
+ XSingleton<XClientNetwork>.singleton.Send(ptcC2G_EnterSceneReq);
+ result = true;
+ }
+ }
+ return result;
+ }
+
+ public void SetAutoSelectScene(int sceneid, int chapterid, uint diff)
+ {
+ this._bAutoSelectChapterId = false;
+ bool flag = sceneid == 0;
+ if (flag)
+ {
+ this._SelectDifficult = diff;
+ this._SelectedChapter = chapterid;
+ this._SelectScene = 0u;
+ bool flag2 = this._SelectedChapter == 0;
+ if (flag2)
+ {
+ this._SelectedChapter = XSingleton<XStageProgress>.singleton.GetPlayerLocationChapter(this._SelectDifficult);
+ }
+ this._bAutoSelect = true;
+ }
+ else
+ {
+ this._SelectScene = (uint)sceneid;
+ this._SelectedChapter = XSingleton<XSceneMgr>.singleton.GetSceneChapter(sceneid);
+ this._SelectDifficult = (uint)XSingleton<XSceneMgr>.singleton.GetSceneDifficult(sceneid);
+ this._bAutoSelect = true;
+ }
+ }
+
+ public void SelectChapter(int chapterid, uint diff)
+ {
+ this._SelectScene = 0u;
+ this._SelectedChapter = chapterid;
+ this._SelectDifficult = diff;
+ this.FadeShow();
+ }
+
+ protected GameObject GetLevelFrame()
+ {
+ return base.uiBehaviour.m_SceneFramePool.FetchGameObject(false);
+ }
+
+ protected void SetupChapterBaseImage(int chapter, uint difficult, GameObject frame)
+ {
+ XLevelDocument xlevelDocument = XSingleton<XGame>.singleton.Doc.GetXComponent(XLevelDocument.uuID) as XLevelDocument;
+ XChapter.RowData chapter2 = XSingleton<XSceneMgr>.singleton.GetChapter(chapter);
+ IXUILabel ixuilabel = frame.transform.Find("Title").GetComponent("XUILabel") as IXUILabel;
+ bool flag = chapter2 != null;
+ if (flag)
+ {
+ ixuilabel.SetText(chapter2.Comment);
+ }
+ Transform transform = frame.transform.Find("me");
+ IXUISprite ixuisprite = frame.transform.Find("me/me/me").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.spriteName = XSingleton<XProfessionSkillMgr>.singleton.GetSuperRiskAvatar(XSingleton<XEntityMgr>.singleton.Player.BasicTypeID);
+ ixuisprite.MakePixelPerfect();
+ transform.gameObject.SetActive(false);
+ Transform transform2 = frame.transform.Find("BG");
+ bool flag2 = transform2 != null;
+ if (flag2)
+ {
+ IXUITexture ixuitexture = transform2.GetComponent("XUITexture") as IXUITexture;
+ bool flag3 = chapter2 != null;
+ if (flag3)
+ {
+ ixuitexture.SetTexturePath("atlas/UI/Hall/LevelBg/" + chapter2.Pic);
+ }
+ }
+ List<uint> list = ListPool<uint>.Get();
+ XSingleton<XSceneMgr>.singleton.GetSceneListByChapter(chapter, list);
+ bool flag4 = list.Count == 0;
+ if (flag4)
+ {
+ ListPool<uint>.Release(list);
+ }
+ else
+ {
+ list.Sort();
+ bool flag5 = difficult == 0u;
+ if (flag5)
+ {
+ base.uiBehaviour.m_NormalBg.SetActive(true);
+ base.uiBehaviour.m_HardBg.SetActive(false);
+ base.uiBehaviour.m_HardLeftCountGo0.SetActive(false);
+ base.uiBehaviour.m_ShopBtn.SetVisible(false);
+ }
+ else
+ {
+ base.uiBehaviour.m_PrerogativeSpr.SetGrey(this._welfareDoc.IsOwnMemberPrivilege(MemberPrivilege.KingdomPrivilege_Adventurer));
+ base.uiBehaviour.m_PrerogativeSpr.SetSprite(this._welfareDoc.GetMemberPrivilegeIcon(MemberPrivilege.KingdomPrivilege_Adventurer));
+ base.uiBehaviour.m_PrerogativeLab.SetEnabled(this._welfareDoc.IsOwnMemberPrivilege(MemberPrivilege.KingdomPrivilege_Adventurer));
+ base.uiBehaviour.m_PrerogativeLab.SetText(string.Format(XStringDefineProxy.GetString("Prerogative_Abyss"), this._welfareDoc.GetMemberPrivilegeConfig(MemberPrivilege.KingdomPrivilege_Adventurer).AbyssCount));
+ base.uiBehaviour.m_NormalBg.SetActive(false);
+ base.uiBehaviour.m_HardBg.SetActive(true);
+ base.uiBehaviour.m_HardLeftCountGo0.SetActive(true);
+ base.uiBehaviour.m_ShopBtn.SetVisible(true);
+ }
+ bool flag6 = false;
+ GameObject fx = null;
+ Transform parent = frame.transform.Find("Levels");
+ XSingleton<X3DAvatarMgr>.singleton.ClearDummy(this.m_dummPool);
+ this.bossDummy = null;
+ bool flag7 = frame == this._MainFrame;
+ if (flag7)
+ {
+ this._isShowBossAvatar = true;
+ }
+ for (int i = 0; i < list.Count; i++)
+ {
+ uint num = list[i];
+ SceneTable.RowData sceneData = XSingleton<XSceneMgr>.singleton.GetSceneData(num);
+ int num2 = XSingleton<XStageProgress>.singleton.GetRank(sceneData.id);
+ bool flag8 = num2 == -1;
+ if (flag8)
+ {
+ num2 = 0;
+ }
+ bool flag9 = sceneData != null;
+ if (flag9)
+ {
+ GameObject gameObject = base.uiBehaviour.m_ScenePool.FetchGameObject(false);
+ gameObject.name = sceneData.id.ToString();
+ gameObject.transform.parent = parent;
+ bool flag10 = sceneData.UIPos != null;
+ if (flag10)
+ {
+ gameObject.transform.localPosition = new Vector3((float)sceneData.UIPos[0], (float)sceneData.UIPos[1], 600f);
+ }
+ else
+ {
+ XSingleton<XDebug>.singleton.AddErrorLog("'uipos' is null,To the plotter(ce hua) Find a solution,please,sceneId = " + num.ToString(), null, null, null, null, null);
+ }
+ gameObject.transform.localScale = Vector3.one;
+ this.SceneDic[num] = gameObject;
+ IXUISprite ixuisprite2 = gameObject.transform.Find("SprBtn").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite2.ID = (ulong)sceneData.id;
+ ixuisprite2.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnSceneSelected));
+ IXUISprite ixuisprite3 = gameObject.transform.Find("LevelPic").GetComponent("XUISprite") as IXUISprite;
+ IXUISprite ixuisprite4 = gameObject.transform.Find("Star1").GetComponent("XUISprite") as IXUISprite;
+ IXUISprite ixuisprite5 = gameObject.transform.Find("Star2").GetComponent("XUISprite") as IXUISprite;
+ IXUISprite ixuisprite6 = gameObject.transform.Find("Star3").GetComponent("XUISprite") as IXUISprite;
+ GameObject gameObject2 = gameObject.transform.Find("TaskHint").gameObject;
+ Transform transform3 = gameObject.transform.Find("Snapshot");
+ IXUISprite ixuisprite7 = gameObject.transform.Find("Box").GetComponent("XUISprite") as IXUISprite;
+ IXUILabel ixuilabel2 = gameObject.transform.Find("Hint").GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel3 = gameObject.transform.Find("Hint/GoLevelup").GetComponent("XUILabel") as IXUILabel;
+ IXUISprite ixuisprite8 = gameObject.transform.Find("BoxFx").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite7.gameObject.SetActive(false);
+ ixuilabel2.gameObject.SetActive(false);
+ ixuisprite8.gameObject.SetActive(false);
+ XTaskDocument specificDocument = XDocuments.GetSpecificDocument<XTaskDocument>(XTaskDocument.uuID);
+ gameObject2.SetActive(specificDocument.GetSceneTaskState(num).Count > 0);
+ bool flag11 = difficult == 0u;
+ if (flag11)
+ {
+ ixuisprite3.SetSprite("gk_0");
+ }
+ else
+ {
+ ixuisprite3.SetSprite("gk_1");
+ }
+ ixuisprite4.gameObject.SetActive(true);
+ ixuisprite4.spriteName = "gk_3";
+ ixuisprite5.gameObject.SetActive(true);
+ ixuisprite5.spriteName = "gk_3";
+ ixuisprite6.gameObject.SetActive(true);
+ ixuisprite6.spriteName = "gk_3";
+ bool flag12 = num2 >= 1;
+ if (flag12)
+ {
+ ixuisprite4.spriteName = "gk_4";
+ }
+ bool flag13 = num2 >= 2;
+ if (flag13)
+ {
+ ixuisprite5.spriteName = "gk_4";
+ }
+ bool flag14 = num2 >= 3;
+ if (flag14)
+ {
+ ixuisprite6.spriteName = "gk_4";
+ }
+ bool flag15 = num2 == 0;
+ if (flag15)
+ {
+ ixuisprite4.gameObject.SetActive(false);
+ ixuisprite5.gameObject.SetActive(false);
+ ixuisprite6.gameObject.SetActive(false);
+ }
+ ixuisprite3.SetGrey(!flag6);
+ bool flag16 = num2 <= 0;
+ if (flag16)
+ {
+ SceneRefuseReason sceneRefuseReason = SceneRefuseReason.Invalid;
+ bool flag17 = !flag6;
+ if (flag17)
+ {
+ sceneRefuseReason = xlevelDocument.CanLevelOpen(num);
+ ixuisprite3.SetGrey(true);
+ transform.localPosition = gameObject.transform.localPosition;
+ fx = transform.gameObject;
+ bool flag18 = i == list.Count - 1;
+ if (flag18)
+ {
+ this._isShowBossAvatar = false;
+ }
+ bool flag19 = sceneRefuseReason != SceneRefuseReason.Admit;
+ if (flag19)
+ {
+ ixuilabel2.gameObject.SetActive(true);
+ bool flag20 = sceneRefuseReason == SceneRefuseReason.PreTask_Notfinish;
+ if (flag20)
+ {
+ ixuilabel3.SetText(XStringDefineProxy.GetString("LEVEL_GO_TASK"));
+ ixuilabel2.SetText(string.Format(XStringDefineProxy.GetString("LEVEl_REQUIRE_TASK"), new object[0]));
+ ixuilabel3.RegisterLabelClickEventHandler(new LabelClickEventHandler(this.OnGoLevelupClick));
+ }
+ else
+ {
+ bool flag21 = sceneRefuseReason == SceneRefuseReason.PreScene_Notfinish;
+ if (flag21)
+ {
+ ixuilabel3.SetText(XStringDefineProxy.GetString("LEVEL_GO_SCENE"));
+ int unFinishedPreSceneID = xlevelDocument.GetUnFinishedPreSceneID(sceneData);
+ SceneTable.RowData sceneData2 = XSingleton<XSceneMgr>.singleton.GetSceneData((uint)unFinishedPreSceneID);
+ bool flag22 = sceneData2 != null;
+ if (flag22)
+ {
+ ixuilabel2.SetText(string.Format(XStringDefineProxy.GetString("LEVEL_REQUIRE_PRELEVEL"), sceneData2.Comment));
+ }
+ ixuilabel3.RegisterLabelClickEventHandler(new LabelClickEventHandler(this.OnGoLevelupClick));
+ }
+ else
+ {
+ bool flag23 = SceneRefuseReason.ReachLimitTimes == sceneRefuseReason;
+ if (flag23)
+ {
+ ixuilabel3.SetText(XStringDefineProxy.GetString("LEVEL_REACH_LIMIT_TIMES"));
+ ixuilabel2.SetText(XStringDefineProxy.GetString("LEVEL_REACH_LIMIT_TIMES"));
+ ixuilabel3.RegisterLabelClickEventHandler(new LabelClickEventHandler(this.OnGoLevelupClick));
+ }
+ else
+ {
+ ixuilabel3.SetText(XStringDefineProxy.GetString("LEVEL_GO_UP"));
+ ixuilabel2.SetText(string.Format(XStringDefineProxy.GetString("LEVEL_REQUIRE_LEVEL"), sceneData.RequiredLevel));
+ this.m_goLevelUpGo = ixuilabel2.gameObject;
+ XSingleton<XDebug>.singleton.AddGreenLog("get farme", null, null, null, null, null);
+ }
+ }
+ }
+ ixuilabel3.ID = (ulong)sceneData.id;
+ }
+ }
+ bool flag24 = sceneRefuseReason == SceneRefuseReason.Admit;
+ if (flag24)
+ {
+ transform.localPosition = gameObject.transform.localPosition;
+ fx = transform.gameObject;
+ }
+ flag6 = true;
+ }
+ else
+ {
+ transform.localPosition = gameObject.transform.localPosition;
+ fx = transform.gameObject;
+ }
+ bool flag25 = sceneData.SceneChest != 0 && sceneData.BoxUIPos != null && sceneData.BoxUIPos.Length == 2;
+ if (flag25)
+ {
+ GameObject gameObject3 = base.uiBehaviour.m_ScenePool.FetchGameObject(false);
+ gameObject3.name = "chest" + num;
+ gameObject3.transform.parent = parent;
+ gameObject3.transform.localPosition = new Vector3((float)sceneData.BoxUIPos[0], (float)sceneData.BoxUIPos[1], 600f);
+ gameObject3.transform.localScale = Vector3.one;
+ this.SetupLevelChest(gameObject3, num, sceneData.SceneChest, num2);
+ }
+ }
+ }
+ ListPool<uint>.Release(list);
+ bool flag26 = frame == this._MainFrame;
+ if (flag26)
+ {
+ this.main.fx = fx;
+ }
+ else
+ {
+ bool flag27 = frame == this._LeftFrame;
+ if (flag27)
+ {
+ this.left.fx = fx;
+ }
+ else
+ {
+ bool flag28 = frame == this._RightFrame;
+ if (flag28)
+ {
+ this.right.fx = fx;
+ }
+ }
+ }
+ }
+ }
+
+ protected void OnGoLevelupClick(IXUILabel go)
+ {
+ uint sceneID = (uint)go.ID;
+ XLevelDocument xlevelDocument = XSingleton<XGame>.singleton.Doc.GetXComponent(XLevelDocument.uuID) as XLevelDocument;
+ switch (xlevelDocument.CanLevelOpen(sceneID))
+ {
+ case SceneRefuseReason.PreTask_Notfinish:
+ {
+ XTaskDocument specificDocument = XDocuments.GetSpecificDocument<XTaskDocument>(XTaskDocument.uuID);
+ XTaskInfo mainTask = specificDocument.TaskRecord.MainTask;
+ bool flag = mainTask != null;
+ if (flag)
+ {
+ uint sceneID2 = XTaskDocument.GetSceneID(ref mainTask.TableData.PassScene);
+ bool flag2 = mainTask.Status == TaskStatus.TaskStatus_Taked && sceneID2 > 0u;
+ if (flag2)
+ {
+ this._SelectedChapter = XSingleton<XSceneMgr>.singleton.GetSceneChapter((int)sceneID2);
+ this._SelectDifficult = (uint)XSingleton<XSceneMgr>.singleton.GetSceneDifficult((int)sceneID2);
+ this._SelectScene = sceneID2;
+ this._SetupDetailFrame(sceneID2);
+ }
+ else
+ {
+ this.SetVisible(false, true);
+ specificDocument.DoTask(mainTask.ID);
+ }
+ }
+ break;
+ }
+ case SceneRefuseReason.PreScene_Notfinish:
+ {
+ SceneTable.RowData sceneData = XSingleton<XSceneMgr>.singleton.GetSceneData(sceneID);
+ bool flag3 = sceneData == null;
+ if (flag3)
+ {
+ XSingleton<XDebug>.singleton.AddGreenLog("scenedata is null", null, null, null, null, null);
+ }
+ else
+ {
+ int unFinishedPreSceneID = xlevelDocument.GetUnFinishedPreSceneID(sceneData);
+ int rank = XSingleton<XStageProgress>.singleton.GetRank(unFinishedPreSceneID);
+ bool flag4 = rank > 0 || xlevelDocument.CanLevelOpen((uint)unFinishedPreSceneID) == SceneRefuseReason.Admit;
+ if (flag4)
+ {
+ this._SelectScene = (uint)unFinishedPreSceneID;
+ int sceneChapter = XSingleton<XSceneMgr>.singleton.GetSceneChapter(unFinishedPreSceneID);
+ int sceneDifficult = XSingleton<XSceneMgr>.singleton.GetSceneDifficult(unFinishedPreSceneID);
+ bool flag5 = sceneChapter != this._SelectedChapter || (long)sceneDifficult != (long)((ulong)this._SelectDifficult);
+ if (flag5)
+ {
+ base.uiBehaviour.m_cbNormal.ForceSetFlag(false);
+ base.uiBehaviour.m_cbHard.ForceSetFlag(false);
+ bool flag6 = sceneDifficult == 0;
+ if (flag6)
+ {
+ base.uiBehaviour.m_cbNormal.bChecked = true;
+ this.OnSwitchDifficult(base.uiBehaviour.m_Normal);
+ }
+ else
+ {
+ base.uiBehaviour.m_cbHard.bChecked = true;
+ this.OnSwitchDifficult(base.uiBehaviour.m_Hard);
+ }
+ this._SelectDifficult = (uint)sceneDifficult;
+ this._SelectedChapter = sceneChapter;
+ }
+ this._SetupDetailFrame((uint)unFinishedPreSceneID);
+ }
+ else
+ {
+ int sceneChapter2 = XSingleton<XSceneMgr>.singleton.GetSceneChapter(unFinishedPreSceneID);
+ int sceneDifficult2 = XSingleton<XSceneMgr>.singleton.GetSceneDifficult(unFinishedPreSceneID);
+ bool flag7 = sceneChapter2 != this._SelectedChapter || (long)sceneDifficult2 != (long)((ulong)this._SelectDifficult);
+ if (flag7)
+ {
+ IXUICheckBox ixuicheckBox = base.uiBehaviour.m_Normal.gameObject.GetComponent("XUICheckBox") as IXUICheckBox;
+ IXUICheckBox ixuicheckBox2 = base.uiBehaviour.m_Hard.gameObject.GetComponent("XUICheckBox") as IXUICheckBox;
+ ixuicheckBox.bChecked = false;
+ ixuicheckBox2.bChecked = false;
+ bool flag8 = sceneDifficult2 == 0;
+ if (flag8)
+ {
+ ixuicheckBox.bChecked = true;
+ this.OnSwitchDifficult(base.uiBehaviour.m_Normal);
+ }
+ else
+ {
+ ixuicheckBox2.bChecked = true;
+ this.OnSwitchDifficult(base.uiBehaviour.m_Hard);
+ }
+ this._SelectDifficult = (uint)sceneDifficult2;
+ this._SelectedChapter = sceneChapter2;
+ }
+ }
+ }
+ break;
+ }
+ }
+ }
+
+ protected void SetupBossAvatar(int chapter, uint difficult, GameObject frame)
+ {
+ bool flag = this.bossDummy != null;
+ if (flag)
+ {
+ XSingleton<X3DAvatarMgr>.singleton.EnableCommonDummy(this.bossDummy, null, false);
+ }
+ List<uint> list = ListPool<uint>.Get();
+ XSingleton<XSceneMgr>.singleton.GetSceneListByChapter(chapter, list);
+ bool flag2 = list.Count == 0;
+ if (flag2)
+ {
+ ListPool<uint>.Release(list);
+ }
+ else
+ {
+ list.Sort();
+ bool flag3 = list.Count == 0;
+ if (!flag3)
+ {
+ uint sceneID = list[list.Count - 1];
+ bool flag4 = !this._isShowBossAvatar;
+ if (!flag4)
+ {
+ int rank = XSingleton<XStageProgress>.singleton.GetRank((int)sceneID);
+ bool flag5 = rank >= 0;
+ if (flag5)
+ {
+ ListPool<uint>.Release(list);
+ }
+ else
+ {
+ bool flag6 = rank < 0 && list.Count > 1;
+ if (flag6)
+ {
+ bool flag7 = list.Count < 2;
+ if (flag7)
+ {
+ return;
+ }
+ XLevelDocument xlevelDocument = XSingleton<XGame>.singleton.Doc.GetXComponent(XLevelDocument.uuID) as XLevelDocument;
+ uint sceneID2 = list[list.Count - 2];
+ int rank2 = XSingleton<XStageProgress>.singleton.GetRank((int)sceneID2);
+ bool flag8 = rank2 > 0 && xlevelDocument.CanLevelOpen(sceneID) == SceneRefuseReason.Admit;
+ if (flag8)
+ {
+ ListPool<uint>.Release(list);
+ return;
+ }
+ }
+ ListPool<uint>.Release(list);
+ Transform transform = frame.transform.Find("Levels");
+ Transform child = transform.GetChild(transform.childCount - 1);
+ bool flag9 = child.gameObject.name.StartsWith("chest");
+ if (flag9)
+ {
+ child = transform.GetChild(transform.childCount - 2);
+ }
+ IUIDummy iuidummy = child.Find("Snapshot").GetComponent("UIDummy") as IUIDummy;
+ Vector3 localPosition = iuidummy.transform.localPosition;
+ localPosition.z = -100f;
+ iuidummy.transform.localPosition = localPosition;
+ XChapter.RowData chapter2 = XSingleton<XSceneMgr>.singleton.GetChapter(chapter);
+ bool flag10 = chapter2 != null;
+ if (flag10)
+ {
+ XEntityStatistics.RowData byID = XSingleton<XEntityMgr>.singleton.EntityStatistics.GetByID((uint)chapter2.BossID);
+ bool flag11 = byID == null;
+ if (!flag11)
+ {
+ this.bossDummy = XSingleton<X3DAvatarMgr>.singleton.CreateCommonEntityDummy(this.m_dummPool, byID.PresentID, iuidummy, this.bossDummy, 1f);
+ }
+ }
+ else
+ {
+ XSingleton<XDebug>.singleton.AddErrorLog(string.Format("error chapterId = {0}", chapter), null, null, null, null, null);
+ }
+ }
+ }
+ }
+ }
+ }
+
+ public void SetupChapterImage()
+ {
+ base.uiBehaviour.m_ScenePool.ReturnAll(true);
+ base.uiBehaviour.m_SceneFramePool.ReturnAll(false);
+ this.SceneDic.Clear();
+ this._MainFrame = null;
+ this._LeftFrame = null;
+ this._RightFrame = null;
+ this._bLevelIsMoving = false;
+ this._MainFrame = this.GetLevelFrame();
+ base.uiBehaviour.m_LevelTween.gameObject.transform.Find("LevelFramePanel").localPosition = Vector3.zero;
+ this._MainFrame.transform.localPosition = Vector3.zero;
+ this._MainFrame.name = string.Format("chapter{0}", this._SelectedChapter);
+ this._ChapterRank = 0;
+ this._ChapterTotalRank = 0;
+ this._FirstNoRankScene = 0u;
+ this.SetupChapterBaseImage(this._SelectedChapter, this._SelectDifficult, this._MainFrame);
+ this.SetupChapterExInfo();
+ bool bAutoSelect = this._bAutoSelect;
+ if (bAutoSelect)
+ {
+ bool flag = this._SelectScene > 0u;
+ if (flag)
+ {
+ this._SetupDetailFrame(this._SelectScene);
+ }
+ this._bAutoSelect = false;
+ }
+ }
+
+ protected void SetupLeftChapterImage()
+ {
+ int previousChapter = XSingleton<XSceneMgr>.singleton.GetPreviousChapter(this._SelectedChapter);
+ bool flag = previousChapter == 0;
+ if (!flag)
+ {
+ bool flag2 = this._LeftFrame == null;
+ if (flag2)
+ {
+ this._LeftFrame = this.GetLevelFrame();
+ }
+ bool flag3 = this._LeftFrame == null;
+ if (flag3)
+ {
+ XSingleton<XDebug>.singleton.AddGreenLog("SetupLeftChapterImage,_LeftFrame is null!", null, null, null, null, null);
+ }
+ else
+ {
+ bool flag4 = this._MainFrame == null;
+ if (flag4)
+ {
+ XSingleton<XDebug>.singleton.AddGreenLog("SetupLeftChapterImage,_MainFrame is null!", null, null, null, null, null);
+ }
+ else
+ {
+ this._LeftFrame.transform.localPosition = this._MainFrame.transform.localPosition + new Vector3(-1136f, 0f);
+ this._LeftFrame.name = "chapter" + previousChapter;
+ this.SetupChapterBaseImage(previousChapter, this._SelectDifficult, this._LeftFrame);
+ }
+ }
+ }
+ }
+
+ protected void SetupRightChapterImage()
+ {
+ int nextChapter = XSingleton<XSceneMgr>.singleton.GetNextChapter(this._SelectedChapter);
+ bool flag = nextChapter == this._SelectedChapter;
+ if (!flag)
+ {
+ int playerLastChapter = XSingleton<XStageProgress>.singleton.GetPlayerLastChapter(this._SelectDifficult);
+ bool flag2 = nextChapter > playerLastChapter;
+ if (!flag2)
+ {
+ bool flag3 = this._RightFrame == null;
+ if (flag3)
+ {
+ this._RightFrame = this.GetLevelFrame();
+ }
+ bool flag4 = this._RightFrame == null;
+ if (flag4)
+ {
+ XSingleton<XDebug>.singleton.AddGreenLog("SetupRightChapterImage,_RightFrame is null!", null, null, null, null, null);
+ }
+ else
+ {
+ bool flag5 = this._MainFrame == null;
+ if (flag5)
+ {
+ XSingleton<XDebug>.singleton.AddGreenLog("SetupRightChapterImage,_MainFrame is null!", null, null, null, null, null);
+ }
+ else
+ {
+ this._RightFrame.transform.localPosition = this._MainFrame.transform.localPosition + new Vector3(1136f, 0f, 0f);
+ this._RightFrame.name = "chapter" + nextChapter;
+ this.SetupChapterBaseImage(nextChapter, this._SelectDifficult, this._RightFrame);
+ }
+ }
+ }
+ }
+ }
+
+ protected void SetupLevelChest(GameObject level, uint sceneID, int dropID, int rank)
+ {
+ IXUISprite ixuisprite = level.transform.Find("LevelPic").GetComponent("XUISprite") as IXUISprite;
+ IXUISprite ixuisprite2 = level.transform.Find("Star1").GetComponent("XUISprite") as IXUISprite;
+ IXUISprite ixuisprite3 = level.transform.Find("Star2").GetComponent("XUISprite") as IXUISprite;
+ IXUISprite ixuisprite4 = level.transform.Find("Star3").GetComponent("XUISprite") as IXUISprite;
+ GameObject gameObject = level.transform.Find("TaskHint").gameObject;
+ IXUISprite ixuisprite5 = level.transform.Find("Box").GetComponent("XUISprite") as IXUISprite;
+ IXUISprite ixuisprite6 = level.transform.Find("BoxFx").GetComponent("XUISprite") as IXUISprite;
+ IXUILabel ixuilabel = level.transform.Find("Hint").GetComponent("XUILabel") as IXUILabel;
+ IXUISprite ixuisprite7 = level.transform.Find("SprBtn").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite7.SetGrey(rank > 0);
+ ixuisprite7.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnSceneChestClicked));
+ ixuisprite7.ID = (ulong)sceneID;
+ ixuisprite6.gameObject.SetActive(false);
+ bool flag = this._SelectDifficult == 0u;
+ if (flag)
+ {
+ ixuisprite.SetSprite("gk_0");
+ }
+ else
+ {
+ ixuisprite.SetSprite("gk_1");
+ }
+ ixuisprite2.gameObject.SetActive(false);
+ ixuisprite3.gameObject.SetActive(false);
+ ixuisprite4.gameObject.SetActive(false);
+ gameObject.gameObject.SetActive(false);
+ ixuilabel.gameObject.SetActive(false);
+ ixuisprite5.gameObject.SetActive(true);
+ ixuisprite5.ID = (ulong)sceneID;
+ }
+
+ public void SetupChangeChapterUI()
+ {
+ XLevelDocument xlevelDocument = XSingleton<XGame>.singleton.Doc.GetXComponent(XLevelDocument.uuID) as XLevelDocument;
+ int previousChapter = XSingleton<XSceneMgr>.singleton.GetPreviousChapter(this._SelectedChapter);
+ bool flag = previousChapter > 0;
+ if (flag)
+ {
+ base.uiBehaviour.m_Left.gameObject.SetActive(true);
+ GameObject gameObject = base.uiBehaviour.m_Left.gameObject.transform.Find("RedPoint").gameObject;
+ bool flag2 = xlevelDocument.HasChapterRedpoint(previousChapter);
+ if (flag2)
+ {
+ gameObject.SetActive(true);
+ }
+ else
+ {
+ gameObject.SetActive(false);
+ }
+ }
+ else
+ {
+ base.uiBehaviour.m_Left.gameObject.SetActive(false);
+ }
+ int nextChapter = XSingleton<XSceneMgr>.singleton.GetNextChapter(this._SelectedChapter);
+ int playerLastChapter = XSingleton<XStageProgress>.singleton.GetPlayerLastChapter(this._SelectDifficult);
+ bool flag3 = nextChapter != this._SelectedChapter && playerLastChapter >= nextChapter;
+ if (flag3)
+ {
+ base.uiBehaviour.m_Right.gameObject.SetActive(true);
+ GameObject gameObject2 = base.uiBehaviour.m_Right.gameObject.transform.Find("RedPoint").gameObject;
+ bool flag4 = xlevelDocument.HasChapterRedpoint(nextChapter);
+ if (flag4)
+ {
+ gameObject2.SetActive(true);
+ }
+ else
+ {
+ gameObject2.SetActive(false);
+ }
+ }
+ else
+ {
+ base.uiBehaviour.m_Right.gameObject.SetActive(false);
+ }
+ bool flag5 = this._SelectDifficult == 0u;
+ if (flag5)
+ {
+ base.uiBehaviour.m_NormalRedpoint.SetActive(false);
+ base.uiBehaviour.m_HardRedpoint.SetActive(xlevelDocument.HasDifficultAllChapterRedpoint(1));
+ }
+ else
+ {
+ base.uiBehaviour.m_HardRedpoint.SetActive(false);
+ base.uiBehaviour.m_NormalRedpoint.SetActive(xlevelDocument.HasDifficultAllChapterRedpoint(0));
+ }
+ }
+
+ public override void StackRefresh()
+ {
+ base.StackRefresh();
+ base.Alloc3DAvatarPool("DungeonSelect");
+ this.SetupPlayerAvatar();
+ this.SetupBossAvatar(this._SelectedChapter, this._SelectDifficult, this._MainFrame);
+ this.RefreshHardLeftCount();
+ }
+
+ public void SetupPlayerAvatar()
+ {
+ bool flag = this.main.fx != null;
+ if (flag)
+ {
+ this.main.fx.SetActive(true);
+ IXUITweenTool ixuitweenTool = this.main.fx.transform.Find("me").GetComponent("XUIPlayTween") as IXUITweenTool;
+ bool flag2 = ixuitweenTool != null;
+ if (flag2)
+ {
+ ixuitweenTool.StopTween();
+ ixuitweenTool.ResetTween(true);
+ ixuitweenTool.PlayTween(true, -1f);
+ }
+ }
+ }
+
+ public void UpdateSceneEnterTime()
+ {
+ bool activeInHierarchy = base.uiBehaviour.m_SceneDetail.activeInHierarchy;
+ if (activeInHierarchy)
+ {
+ this._SetupDetailFrame(this._SelectScene);
+ this.RefreshHardLeftCount();
+ }
+ }
+
+ public void UpdateSceneBox()
+ {
+ XLevelDocument xlevelDocument = XSingleton<XGame>.singleton.Doc.GetXComponent(XLevelDocument.uuID) as XLevelDocument;
+ Transform transform = this._MainFrame.transform.Find("Levels");
+ int childCount = transform.childCount;
+ for (int i = 0; i < childCount; i++)
+ {
+ Transform child = transform.GetChild(i);
+ bool flag = !child.gameObject.name.StartsWith("chest");
+ if (!flag)
+ {
+ IXUISprite ixuisprite = child.Find("LevelPic").GetComponent("XUISprite") as IXUISprite;
+ IXUISprite ixuisprite2 = child.Find("Box").GetComponent("XUISprite") as IXUISprite;
+ IXUISprite ixuisprite3 = child.Find("BoxFx").GetComponent("XUISprite") as IXUISprite;
+ IXUITweenTool ixuitweenTool = child.Find("Box").GetComponent("XUIPlayTween") as IXUITweenTool;
+ uint num = (uint)ixuisprite2.ID;
+ SceneTable.RowData sceneData = XSingleton<XSceneMgr>.singleton.GetSceneData(num);
+ bool flag2 = sceneData != null && sceneData.SceneChest > 0;
+ if (flag2)
+ {
+ ixuisprite2.gameObject.SetActive(true);
+ bool flag3 = xlevelDocument.SceneBox.Contains(num);
+ if (flag3)
+ {
+ ixuisprite2.spriteName = "xz01_1";
+ ixuisprite2.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnSceneChestClicked));
+ ixuisprite3.gameObject.SetActive(false);
+ ixuisprite.SetEnabled(true);
+ ixuitweenTool.ResetTween(true);
+ }
+ else
+ {
+ ixuisprite2.spriteName = "xz01_0";
+ ixuisprite2.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnSceneChestClicked));
+ int rank = XSingleton<XStageProgress>.singleton.GetRank((int)num);
+ bool flag4 = rank <= 0;
+ if (flag4)
+ {
+ ixuisprite3.gameObject.SetActive(false);
+ ixuisprite.SetEnabled(false);
+ ixuitweenTool.ResetTween(true);
+ }
+ else
+ {
+ ixuisprite3.gameObject.SetActive(true);
+ ixuisprite.SetEnabled(true);
+ ixuitweenTool.PlayTween(true, -1f);
+ }
+ }
+ }
+ }
+ }
+ this.SetupChangeChapterUI();
+ }
+
+ protected void OnSceneChestClicked(IXUISprite sp)
+ {
+ base.uiBehaviour.m_BoxFrame.SetActive(true);
+ base.uiBehaviour.m_BoxFetch.ID = sp.ID;
+ SceneTable.RowData sceneData = XSingleton<XSceneMgr>.singleton.GetSceneData((uint)sp.ID);
+ bool flag = sceneData == null;
+ if (flag)
+ {
+ XSingleton<XDebug>.singleton.AddGreenLog("OnSceneChestClicked sceneData is null", null, null, null, null, null);
+ }
+ else
+ {
+ XLevelDocument xlevelDocument = XSingleton<XGame>.singleton.Doc.GetXComponent(XLevelDocument.uuID) as XLevelDocument;
+ base.uiBehaviour.m_BoxRedPoint.SetActive(false);
+ base.uiBehaviour.m_BoxChest.SetActive(true);
+ base.uiBehaviour.m_BoxStar.gameObject.SetActive(false);
+ int rank = XSingleton<XStageProgress>.singleton.GetRank((int)sp.ID);
+ bool flag2 = rank <= 0;
+ if (flag2)
+ {
+ base.uiBehaviour.m_BoxFetch.SetEnable(false, false);
+ base.uiBehaviour.m_BoxFetch.SetCaption(XStringDefineProxy.GetString("SRS_FETCH"));
+ }
+ else
+ {
+ bool flag3 = xlevelDocument.SceneBox.Contains((uint)sceneData.id);
+ if (flag3)
+ {
+ base.uiBehaviour.m_BoxFetch.SetEnable(false, false);
+ base.uiBehaviour.m_BoxFetch.SetCaption(XStringDefineProxy.GetString("SRS_FETCHED"));
+ }
+ else
+ {
+ base.uiBehaviour.m_BoxFetch.SetEnable(true, false);
+ base.uiBehaviour.m_BoxRedPoint.SetActive(true);
+ base.uiBehaviour.m_BoxFetch.SetCaption(XStringDefineProxy.GetString("SRS_FETCH"));
+ }
+ }
+ this.SetupBoxReward(sceneData.SceneChest);
+ base.uiBehaviour.m_BoxFetch.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnSceneChestBoxFetch));
+ }
+ }
+
+ protected void ReturnLevelFrameToPool(GameObject frame)
+ {
+ bool flag = frame == null;
+ if (flag)
+ {
+ XSingleton<XDebug>.singleton.AddErrorLog("ReturnLevelFrameToPool frame is null", null, null, null, null, null);
+ }
+ else
+ {
+ List<GameObject> list = new List<GameObject>();
+ Transform transform = frame.transform.Find("Levels");
+ bool flag2 = transform == null;
+ if (!flag2)
+ {
+ for (int i = 0; i < transform.childCount; i++)
+ {
+ list.Add(transform.GetChild(i).gameObject);
+ }
+ for (int j = 0; j < list.Count; j++)
+ {
+ base.uiBehaviour.m_ScenePool.ReturnInstance(list[j], true);
+ }
+ base.uiBehaviour.m_SceneFramePool.ReturnInstance(frame, false);
+ }
+ }
+ }
+
+ protected bool OnLevelBgDrag(Vector2 delta)
+ {
+ bool flag = delta.x > 0f;
+ if (flag)
+ {
+ this.OnMoveLeft(null);
+ }
+ else
+ {
+ this.OnMoveRight(null);
+ }
+ return true;
+ }
+
+ protected bool OnMoveLeft(IXUIButton go)
+ {
+ bool bLevelIsMoving = this._bLevelIsMoving;
+ bool result;
+ if (bLevelIsMoving)
+ {
+ result = true;
+ }
+ else
+ {
+ int previousChapter = XSingleton<XSceneMgr>.singleton.GetPreviousChapter(this._SelectedChapter);
+ bool flag = previousChapter > 0;
+ if (flag)
+ {
+ this._SelectedChapter = previousChapter;
+ Vector3 localPosition = base.uiBehaviour.m_LevelTween.gameObject.transform.Find("LevelFramePanel").localPosition;
+ Vector3 to = localPosition + new Vector3(1136f, 0f);
+ bool flag2 = base.uiBehaviour.m_LevelTween != null;
+ if (flag2)
+ {
+ this._bLevelIsMoving = true;
+ }
+ base.uiBehaviour.m_LevelTween.ResetTweenByGroup(true, 0);
+ base.uiBehaviour.m_LevelTween.SetPositionTweenPos(1, localPosition, to);
+ base.uiBehaviour.m_LevelTween.RegisterOnFinishEventHandler(new OnTweenFinishEventHandler(this.OnMoveLeftOver));
+ base.uiBehaviour.m_LevelTween.PlayTween(true, -1f);
+ XSingleton<XDebug>.singleton.AddLog("MoveLeft-->> _bLevelIsMoving =" + this._bLevelIsMoving.ToString(), null, null, null, null, null, XDebugColor.XDebug_None);
+ }
+ result = true;
+ }
+ return result;
+ }
+
+ protected void OnMoveLeftOver(IXUITweenTool tween)
+ {
+ this._bLevelIsMoving = false;
+ this.ReturnLevelFrameToPool(this._MainFrame);
+ bool flag = this._RightFrame != null;
+ if (flag)
+ {
+ this.ReturnLevelFrameToPool(this._RightFrame);
+ }
+ this._RightFrame = null;
+ this._MainFrame = this._LeftFrame;
+ this._LeftFrame = null;
+ this.main.Copy(ref this.left);
+ this.left.Clear();
+ this.right.Clear();
+ this.SetupChapterExInfo();
+ XSingleton<XDebug>.singleton.AddLog("MoveLeftOver..... _bLevelIsMoving =" + this._bLevelIsMoving.ToString(), null, null, null, null, null, XDebugColor.XDebug_None);
+ }
+
+ protected bool OnMoveRight(IXUIButton go)
+ {
+ bool bLevelIsMoving = this._bLevelIsMoving;
+ bool result;
+ if (bLevelIsMoving)
+ {
+ result = true;
+ }
+ else
+ {
+ int nextChapter = XSingleton<XSceneMgr>.singleton.GetNextChapter(this._SelectedChapter);
+ int playerLastChapter = XSingleton<XStageProgress>.singleton.GetPlayerLastChapter(this._SelectDifficult);
+ bool flag = nextChapter != this._SelectedChapter && playerLastChapter >= nextChapter;
+ if (flag)
+ {
+ this._SelectedChapter = nextChapter;
+ Vector3 localPosition = base.uiBehaviour.m_LevelTween.gameObject.transform.Find("LevelFramePanel").localPosition;
+ Vector3 to = localPosition + new Vector3(-1136f, 0f);
+ bool flag2 = base.uiBehaviour.m_LevelTween != null;
+ if (flag2)
+ {
+ this._bLevelIsMoving = true;
+ }
+ base.uiBehaviour.m_LevelTween.ResetTweenByGroup(true, 0);
+ base.uiBehaviour.m_LevelTween.SetPositionTweenPos(1, localPosition, to);
+ base.uiBehaviour.m_LevelTween.RegisterOnFinishEventHandler(new OnTweenFinishEventHandler(this.OnMoveRightOver));
+ base.uiBehaviour.m_LevelTween.PlayTween(true, -1f);
+ XSingleton<XDebug>.singleton.AddLog("MoveRight-->> _bLevelIsMoving =" + this._bLevelIsMoving.ToString(), null, null, null, null, null, XDebugColor.XDebug_None);
+ }
+ result = true;
+ }
+ return result;
+ }
+
+ protected void OnMoveRightOver(IXUITweenTool tween)
+ {
+ this._bLevelIsMoving = false;
+ this.ReturnLevelFrameToPool(this._MainFrame);
+ bool flag = this._LeftFrame != null;
+ if (flag)
+ {
+ this.ReturnLevelFrameToPool(this._LeftFrame);
+ }
+ this._LeftFrame = null;
+ this._MainFrame = this._RightFrame;
+ this._RightFrame = null;
+ this.main.Copy(ref this.right);
+ this.left.Clear();
+ this.right.Clear();
+ this.SetupChapterExInfo();
+ XSingleton<XDebug>.singleton.AddLog("MoveRightOver..... _bLevelIsMoving =" + this._bLevelIsMoving.ToString(), null, null, null, null, null, XDebugColor.XDebug_None);
+ }
+
+ protected void SetupChapterExInfo()
+ {
+ bool flag = this._MainFrame == null;
+ if (flag)
+ {
+ this._bLevelIsMoving = false;
+ XSingleton<XDebug>.singleton.AddGreenLog("SetupChapterExInfo,_MainFrame is null!", null, null, null, null, null);
+ }
+ else
+ {
+ Transform parent = this._MainFrame.transform.Find("me/Effect");
+ this.PlayEffect(ref this.m_fx, this.EffectPath, parent);
+ parent = this._MainFrame.transform.Find("me/Effect/Effect");
+ this.PlayEffect(ref this.m_fx1, this.EffectPath1, parent);
+ this.SetupLeftChapterImage();
+ this.SetupRightChapterImage();
+ this.SetupPlayerAvatar();
+ this.SetupBossAvatar(this._SelectedChapter, this._SelectDifficult, this._MainFrame);
+ this.SetupChapterBoxProgress();
+ this.SetupChangeChapterUI();
+ this.UpdateSceneEnterTime();
+ this.UpdateSceneBox();
+ }
+ }
+
+ private void PlayEffect(ref XFx fx, string path, Transform parent)
+ {
+ bool flag = fx == null;
+ if (flag)
+ {
+ fx = XSingleton<XFxMgr>.singleton.CreateFx(path, null, true);
+ }
+ else
+ {
+ fx.SetActive(true);
+ }
+ fx.Play(parent, Vector3.zero, Vector3.one, 1f, true, false);
+ }
+
+ public void SetupChapterBoxProgress()
+ {
+ List<uint> list = ListPool<uint>.Get();
+ XSingleton<XSceneMgr>.singleton.GetSceneListByChapter(this._SelectedChapter, list);
+ bool flag = list.Count == 0;
+ if (flag)
+ {
+ ListPool<uint>.Release(list);
+ }
+ else
+ {
+ list.Sort();
+ this._ChapterTotalRank = (this._ChapterRank = 0);
+ this._FirstNoRankScene = 0u;
+ for (int i = 0; i < list.Count; i++)
+ {
+ uint num = list[i];
+ SceneTable.RowData sceneData = XSingleton<XSceneMgr>.singleton.GetSceneData(num);
+ int num2 = 0;
+ bool flag2 = sceneData != null;
+ if (flag2)
+ {
+ num2 = XSingleton<XStageProgress>.singleton.GetRank(sceneData.id);
+ }
+ bool flag3 = num2 == -1;
+ if (flag3)
+ {
+ num2 = 0;
+ }
+ bool flag4 = sceneData != null;
+ if (flag4)
+ {
+ this._ChapterTotalRank += 3;
+ this._ChapterRank += num2;
+ }
+ bool flag5 = num2 <= 0;
+ if (flag5)
+ {
+ bool flag6 = this._FirstNoRankScene == 0u;
+ if (flag6)
+ {
+ this._FirstNoRankScene = num;
+ }
+ }
+ }
+ ListPool<uint>.Release(list);
+ base.uiBehaviour.m_Rank.SetText(this._ChapterRank + "/" + this._ChapterTotalRank);
+ base.uiBehaviour.m_RankProgress.value = (float)this._ChapterRank / (float)this._ChapterTotalRank;
+ XChapter.RowData chapter = XSingleton<XSceneMgr>.singleton.GetChapter(this._SelectedChapter);
+ bool flag7 = chapter == null;
+ if (flag7)
+ {
+ XSingleton<XDebug>.singleton.AddErrorLog("SetupChapterBoxProgress chData is null", null, null, null, null, null);
+ }
+ else
+ {
+ int num3 = 390;
+ base.uiBehaviour.m_RankBox.FakeReturnAll();
+ for (int j = 0; j < chapter.Drop.Count; j++)
+ {
+ int num4 = chapter.Drop[j, 0];
+ GameObject gameObject = base.uiBehaviour.m_RankBox.FetchGameObject(false);
+ gameObject.transform.localPosition = base.uiBehaviour.m_RankBox.TplPos + new Vector3((float)(num3 * num4 / this._ChapterTotalRank), 0f);
+ IXUISprite ixuisprite = gameObject.GetComponent("XUISprite") as IXUISprite;
+ IXUISprite ixuisprite2 = gameObject.transform.Find("Box").GetComponent("XUISprite") as IXUISprite;
+ IXUILabel ixuilabel = gameObject.transform.Find("Star").GetComponent("XUILabel") as IXUILabel;
+ IXUITweenTool ixuitweenTool = gameObject.transform.Find("Box").GetComponent("XUIPlayTween") as IXUITweenTool;
+ IXUISprite ixuisprite3 = gameObject.transform.Find("Fx").GetComponent("XUISprite") as IXUISprite;
+ ixuilabel.SetText(num4.ToString());
+ ixuisprite2.ID = (ulong)((long)j);
+ ixuisprite2.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnChapterBoxClicked));
+ ixuisprite.ID = (ulong)((long)j);
+ ixuisprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnChapterBoxClicked));
+ bool flag8 = this._ChapterRank >= num4;
+ if (flag8)
+ {
+ bool flag9 = XSingleton<XStageProgress>.singleton.HasChapterBoxFetched(this._SelectedChapter, j);
+ if (flag9)
+ {
+ ixuisprite2.spriteName = "xz02_1";
+ ixuisprite3.SetAlpha(0f);
+ ixuitweenTool.ResetTween(true);
+ }
+ else
+ {
+ ixuisprite2.spriteName = "xz02_0";
+ ixuisprite3.SetAlpha(1f);
+ ixuitweenTool.PlayTween(true, -1f);
+ }
+ }
+ else
+ {
+ ixuisprite2.spriteName = "xz02_0";
+ ixuisprite3.SetAlpha(0f);
+ ixuitweenTool.ResetTween(true);
+ }
+ }
+ base.uiBehaviour.m_RankBox.ActualReturnAll(false);
+ }
+ }
+ }
+
+ protected void OnChapterBoxClicked(IXUISprite sp)
+ {
+ bool bLevelIsMoving = this._bLevelIsMoving;
+ if (!bLevelIsMoving)
+ {
+ base.uiBehaviour.m_BoxFrame.SetActive(true);
+ int index = (int)sp.ID;
+ base.uiBehaviour.m_BoxFetch.ID = sp.ID;
+ base.uiBehaviour.m_BoxRedPoint.SetActive(false);
+ XChapter.RowData chapter = XSingleton<XSceneMgr>.singleton.GetChapter(this._SelectedChapter);
+ bool flag = chapter == null;
+ if (flag)
+ {
+ XSingleton<XDebug>.singleton.AddErrorLog("OnChapterBoxClicked chdata is null", null, null, null, null, null);
+ }
+ else
+ {
+ base.uiBehaviour.m_BoxChest.SetActive(false);
+ base.uiBehaviour.m_BoxStar.gameObject.SetActive(true);
+ base.uiBehaviour.m_BoxStar.SetText(chapter.Drop[index, 0] + "/" + this._ChapterTotalRank);
+ bool flag2 = this._ChapterRank < chapter.Drop[index, 0];
+ if (flag2)
+ {
+ base.uiBehaviour.m_BoxFetch.SetEnable(false, false);
+ base.uiBehaviour.m_BoxFetch.SetCaption(XStringDefineProxy.GetString("SRS_FETCH"));
+ }
+ else
+ {
+ bool flag3 = XSingleton<XStageProgress>.singleton.HasChapterBoxFetched(this._SelectedChapter, index);
+ if (flag3)
+ {
+ base.uiBehaviour.m_BoxFetch.SetEnable(false, false);
+ base.uiBehaviour.m_BoxFetch.SetCaption(XStringDefineProxy.GetString("SRS_FETCHED"));
+ }
+ else
+ {
+ base.uiBehaviour.m_BoxFetch.SetEnable(true, false);
+ base.uiBehaviour.m_BoxRedPoint.SetActive(true);
+ base.uiBehaviour.m_BoxFetch.SetCaption(XStringDefineProxy.GetString("SRS_FETCH"));
+ }
+ }
+ this.SetupBoxReward(chapter.Drop[index, 1]);
+ base.uiBehaviour.m_BoxFetch.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnChapterBoxFetch));
+ }
+ }
+ }
+
+ protected void SetupBoxReward(int dropID)
+ {
+ base.uiBehaviour.m_BoxRewardPool.ReturnAll(false);
+ XLevelDocument xlevelDocument = XSingleton<XGame>.singleton.Doc.GetXComponent(XLevelDocument.uuID) as XLevelDocument;
+ List<XDropData> dropData = xlevelDocument.GetDropData(dropID);
+ bool flag = dropData != null;
+ if (flag)
+ {
+ int num = (dropData.Count + 1) / 2 - 1;
+ int num2 = (int)((float)((dropData.Count + 1) % 2) * base.uiBehaviour.m_BoxRewardPool.TplPos.x);
+ Vector3 vector;
+ vector = new Vector3((float)(num2 - num * base.uiBehaviour.m_BoxRewardPool.TplWidth), base.uiBehaviour.m_BoxRewardPool.TplPos.y);
+ for (int i = 0; i < dropData.Count; i++)
+ {
+ XDropData xdropData = dropData[i];
+ GameObject gameObject = base.uiBehaviour.m_BoxRewardPool.FetchGameObject(false);
+ gameObject.transform.localPosition = vector + new Vector3((float)(i * base.uiBehaviour.m_BoxRewardPool.TplWidth), 0f);
+ XSingleton<XItemDrawerMgr>.singleton.normalItemDrawer.DrawItem(gameObject, xdropData.itemID, xdropData.count, false);
+ IXUISprite ixuisprite = gameObject.transform.Find("Icon").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.ID = (ulong)((long)xdropData.itemID);
+ ixuisprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(XSingleton<UiUtility>.singleton.OnItemClick));
+ }
+ }
+ }
+
+ protected void OnChapterBoxBgClick(IXUISprite sp)
+ {
+ base.uiBehaviour.m_BoxFrame.SetActive(false);
+ }
+
+ protected bool OnChapterBoxFetch(IXUIButton go)
+ {
+ RpcC2G_FetchChapterChest rpcC2G_FetchChapterChest = new RpcC2G_FetchChapterChest();
+ rpcC2G_FetchChapterChest.oArg.chapterID = this._SelectedChapter;
+ rpcC2G_FetchChapterChest.oArg.chestID = (int)go.ID;
+ XSingleton<XClientNetwork>.singleton.Send(rpcC2G_FetchChapterChest);
+ return true;
+ }
+
+ protected bool OnSceneChestBoxFetch(IXUIButton go)
+ {
+ RpcC2G_OpenSceneChest rpcC2G_OpenSceneChest = new RpcC2G_OpenSceneChest();
+ rpcC2G_OpenSceneChest.oArg.sceneID = (uint)go.ID;
+ XSingleton<XClientNetwork>.singleton.Send(rpcC2G_OpenSceneChest);
+ return true;
+ }
+
+ public void OnFetchSceneChestSucc()
+ {
+ base.uiBehaviour.m_BoxFrame.SetActive(false);
+ this.UpdateSceneBox();
+ }
+
+ public void OnFetchChapterBoxSucc()
+ {
+ base.uiBehaviour.m_BoxFrame.SetActive(false);
+ XLevelDocument xlevelDocument = XSingleton<XGame>.singleton.Doc.GetXComponent(XLevelDocument.uuID) as XLevelDocument;
+ xlevelDocument.RefreshRedPoint();
+ this.SetupChapterBoxProgress();
+ }
+
+ protected void _SetupDetailFrame(uint sceneID)
+ {
+ XLevelDocument xlevelDocument = XSingleton<XGame>.singleton.Doc.GetXComponent(XLevelDocument.uuID) as XLevelDocument;
+ XMainInterfaceDocument xmainInterfaceDocument = XSingleton<XGame>.singleton.Doc.GetXComponent(XMainInterfaceDocument.uuID) as XMainInterfaceDocument;
+ base.uiBehaviour.m_SceneDetail.gameObject.SetActive(true);
+ this._SceneRemainTime = 9999u;
+ SceneTable.RowData sceneData = XSingleton<XSceneMgr>.singleton.GetSceneData(sceneID);
+ int rank = XSingleton<XStageProgress>.singleton.GetRank((int)sceneID);
+ uint sceneDifficult = (uint)XSingleton<XSceneMgr>.singleton.GetSceneDifficult((int)sceneID);
+ bool flag = sceneData == null;
+ if (flag)
+ {
+ XSingleton<XDebug>.singleton.AddErrorLog("_SetupDetailFrame sceneData is null", null, null, null, null, null);
+ }
+ else
+ {
+ base.uiBehaviour.m_SceneRecommendHint.SetVisible(0 < sceneData.RecommendHint.Length);
+ base.uiBehaviour.m_SceneRecommendHint.SetText(string.Format(" {0}", sceneData.RecommendHint));
+ bool flag2 = sceneDifficult == 0u;
+ if (flag2)
+ {
+ base.uiBehaviour.m_SceneNormal.SetActive(true);
+ base.uiBehaviour.m_SceneHard.SetActive(false);
+ base.uiBehaviour.m_HardLeftCountGo1.SetActive(false);
+ base.uiBehaviour.m_SceneSoloBattle.gameObject.SetActive(false);
+ base.uiBehaviour.m_SceneTeamBattle.gameObject.SetActive(false);
+ base.uiBehaviour.m_SceneGoBattle.gameObject.SetActive(true);
+ }
+ else
+ {
+ base.uiBehaviour.m_SceneNormal.SetActive(false);
+ base.uiBehaviour.m_SceneHard.SetActive(true);
+ base.uiBehaviour.m_HardLeftCountGo1.SetActive(true);
+ base.uiBehaviour.m_SceneGoBattle.gameObject.SetActive(false);
+ bool flag3 = rank <= 0;
+ if (flag3)
+ {
+ base.uiBehaviour.m_SceneSoloBattle.gameObject.SetActive(false);
+ base.uiBehaviour.m_SceneTeamBattle.gameObject.SetActive(true);
+ base.uiBehaviour.m_SceneTeamBattle.gameObject.transform.localPosition = base.uiBehaviour.m_SceneGoBattle.gameObject.transform.localPosition;
+ }
+ else
+ {
+ base.uiBehaviour.m_SceneSoloBattle.gameObject.SetActive(false);
+ base.uiBehaviour.m_SceneTeamBattle.gameObject.SetActive(true);
+ base.uiBehaviour.m_SceneTeamBattle.gameObject.transform.localPosition = base.uiBehaviour.m_SceneTeamBattlePos;
+ }
+ }
+ base.uiBehaviour.m_SceneName.SetText(sceneData.Comment);
+ int num = -1;
+ for (int i = 0; i < XLevelRewardDocument.Table.Table.Length; i++)
+ {
+ bool flag4 = XLevelRewardDocument.Table.Table[i].scendid == sceneID;
+ if (flag4)
+ {
+ num = i;
+ break;
+ }
+ }
+ bool flag5 = num >= 0;
+ if (flag5)
+ {
+ base.uiBehaviour.m_SceneStarCond[1].SetText(LevelRewardGerenalHandler.GetReqText(XLevelRewardDocument.Table.Table[num], 1));
+ base.uiBehaviour.m_SceneStarCond[2].SetText(LevelRewardGerenalHandler.GetReqText(XLevelRewardDocument.Table.Table[num], 2));
+ }
+ for (int j = 0; j < 3; j++)
+ {
+ bool rankDetail = XSingleton<XStageProgress>.singleton.GetRankDetail((int)sceneID, j);
+ if (rankDetail)
+ {
+ base.uiBehaviour.m_SceneStar[j].SetColor(Color.white);
+ }
+ else
+ {
+ base.uiBehaviour.m_SceneStar[j].SetColor(Color.grey);
+ }
+ }
+ base.uiBehaviour.m_SceneDropPool.ReturnAll(false);
+ Vector3 tplPos = base.uiBehaviour.m_SceneDropPool.TplPos;
+ int tplWidth = base.uiBehaviour.m_SceneDropPool.TplWidth;
+ int tplHeight = base.uiBehaviour.m_SceneDropPool.TplHeight;
+ bool flag6 = XSingleton<XAttributeMgr>.singleton.XPlayerData != null;
+ if (flag6)
+ {
+ int num2 = (int)(xlevelDocument.GetExpAddition((int)XSingleton<XAttributeMgr>.singleton.XPlayerData.Level) * (double)sceneData.Exp);
+ base.uiBehaviour.m_DropExpLab.SetText(num2.ToString());
+ }
+ bool flag7 = sceneData.Money == 0;
+ if (flag7)
+ {
+ base.uiBehaviour.m_DropExpLab1.gameObject.transform.parent.gameObject.SetActive(false);
+ }
+ else
+ {
+ base.uiBehaviour.m_DropExpLab1.gameObject.transform.parent.gameObject.SetActive(true);
+ base.uiBehaviour.m_DropExpLab1.SetText(sceneData.Money.ToString());
+ }
+ int num3 = (sceneData.ViewableDropList != null) ? sceneData.ViewableDropList.Length : 0;
+ int num4 = 6;
+ int num5 = Mathf.Max(num3, num4);
+ for (int k = 0; k < num5; k++)
+ {
+ int num6 = k;
+ GameObject gameObject = base.uiBehaviour.m_SceneDropPool.FetchGameObject(false);
+ gameObject.name = k.ToString();
+ gameObject.transform.localPosition = tplPos + new Vector3((float)(tplWidth * num6), 0f, 0f);
+ gameObject.transform.localScale = Vector3.one;
+ GameObject gameObject2 = gameObject.transform.Find("Item").gameObject;
+ bool flag8 = k >= num3 && k < num4;
+ if (flag8)
+ {
+ gameObject2.SetActive(false);
+ }
+ else
+ {
+ gameObject2.SetActive(true);
+ XSingleton<XItemDrawerMgr>.singleton.normalItemDrawer.DrawItem(gameObject2, sceneData.ViewableDropList[k], 0, false);
+ IXUISprite ixuisprite = gameObject2.transform.Find("Icon").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.ID = (ulong)sceneData.ViewableDropList[k];
+ ixuisprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnClickItemIcon));
+ }
+ }
+ int playerPPT = xmainInterfaceDocument.GetPlayerPPT();
+ string difficulty = XLevelDocument.GetDifficulty(playerPPT, sceneData.RecommendPower);
+ base.uiBehaviour.m_SceneHint.SetText(difficulty);
+ base.uiBehaviour.m_SceneRecommendPPT.SetText(string.Format("{0}{1}[-]", difficulty.Substring(0, 8), sceneData.RecommendPower));
+ base.uiBehaviour.m_SceneMyPPT.SetText(playerPPT.ToString());
+ bool flag9 = this._SelectDifficult == 1u;
+ if (flag9)
+ {
+ bool flag10 = playerPPT >= sceneData.SweepNeedPPT;
+ string arg;
+ if (flag10)
+ {
+ arg = "[9ce500]";
+ }
+ else
+ {
+ arg = "[e30000]";
+ }
+ bool flag11 = XSingleton<XAttributeMgr>.singleton.XPlayerData != null;
+ if (flag11)
+ {
+ bool flag12 = (ulong)XSingleton<XAttributeMgr>.singleton.XPlayerData.Level < (ulong)((long)XSingleton<XGlobalConfig>.singleton.GetInt("SweepPPTLevelLimit"));
+ if (flag12)
+ {
+ base.uiBehaviour.m_SweepPPT.gameObject.SetActive(false);
+ base.uiBehaviour.m_SweepPPTName.SetActive(false);
+ }
+ else
+ {
+ base.uiBehaviour.m_SweepPPT.gameObject.SetActive(true);
+ base.uiBehaviour.m_SweepPPT.SetText(string.Format("{0}{1}[-]", arg, sceneData.SweepNeedPPT));
+ base.uiBehaviour.m_SweepPPTName.SetActive(true);
+ base.uiBehaviour.m_SweepTicketLab.SetText(XBagDocument.BagDoc.GetItemCount(XSingleton<XGlobalConfig>.singleton.GetInt("SweepTicketId")).ToString());
+ }
+ }
+ base.uiBehaviour.m_SceneQuick10Lab.SetText(string.Format(XStringDefineProxy.GetString("SWEEP_TITLE"), 5));
+ }
+ else
+ {
+ base.uiBehaviour.m_SweepPPT.SetText("");
+ base.uiBehaviour.m_SweepPPTName.SetActive(false);
+ base.uiBehaviour.m_SceneQuick10Lab.SetText(string.Format(XStringDefineProxy.GetString("SWEEP_TITLE"), 10));
+ }
+ uint num7 = sceneData.DayLimitGroupID;
+ bool flag13 = num7 == 0u;
+ if (flag13)
+ {
+ num7 = sceneID;
+ }
+ uint num8 = 0u;
+ bool flag14 = xlevelDocument.SceneDayEnter.TryGetValue(num7, out num8);
+ if (flag14)
+ {
+ this._SceneRemainTime = (uint)sceneData.DayLimit - num8;
+ bool flag15 = (long)sceneData.DayLimit - (long)((ulong)num8) == 0L;
+ if (flag15)
+ {
+ base.uiBehaviour.m_SceneQuick1.gameObject.SetActive(false);
+ base.uiBehaviour.m_SceneQuick10.gameObject.SetActive(false);
+ }
+ else
+ {
+ base.uiBehaviour.m_SceneQuick1.gameObject.SetActive(true);
+ base.uiBehaviour.m_SceneQuick10.gameObject.SetActive(true);
+ }
+ }
+ else
+ {
+ base.uiBehaviour.m_SceneQuick1.gameObject.SetActive(true);
+ base.uiBehaviour.m_SceneQuick10.gameObject.SetActive(true);
+ }
+ bool flag16 = rank < 3;
+ if (flag16)
+ {
+ base.uiBehaviour.m_SceneQuick1.gameObject.SetActive(false);
+ base.uiBehaviour.m_SceneQuick10.gameObject.SetActive(false);
+ base.uiBehaviour.m_SweepTicketGo.SetActive(false);
+ base.uiBehaviour.m_SceneFirstSSS.SetActive(true);
+ string text = "";
+ for (int l = 0; l < sceneData.FirstSSS.Count; l++)
+ {
+ text += XLabelSymbolHelper.FormatCostWithIcon((int)sceneData.FirstSSS[l, 1], (ItemEnum)sceneData.FirstSSS[l, 0]);
+ }
+ base.uiBehaviour.m_SceneFirstSSSReward.InputText = text;
+ }
+ else
+ {
+ bool flag17 = this._SelectDifficult == 0u;
+ if (flag17)
+ {
+ base.uiBehaviour.m_SceneQuick1.gameObject.SetActive(true);
+ base.uiBehaviour.m_SceneQuick10.gameObject.SetActive(true);
+ base.uiBehaviour.m_SweepTicketGo.SetActive(false);
+ }
+ else
+ {
+ bool flag18 = XSingleton<XAttributeMgr>.singleton.XPlayerData != null;
+ if (flag18)
+ {
+ bool flag19 = (ulong)XSingleton<XAttributeMgr>.singleton.XPlayerData.Level < (ulong)((long)XSingleton<XGlobalConfig>.singleton.GetInt("SweepPPTLevelLimit"));
+ if (flag19)
+ {
+ base.uiBehaviour.m_SceneQuick1.gameObject.SetActive(false);
+ base.uiBehaviour.m_SceneQuick10.gameObject.SetActive(false);
+ base.uiBehaviour.m_SweepTicketGo.SetActive(false);
+ }
+ else
+ {
+ base.uiBehaviour.m_SceneQuick1.gameObject.SetActive(true);
+ base.uiBehaviour.m_SceneQuick10.gameObject.SetActive(true);
+ base.uiBehaviour.m_SweepTicketGo.SetActive(true);
+ }
+ }
+ }
+ base.uiBehaviour.m_SceneFirstSSS.SetActive(false);
+ }
+ base.uiBehaviour.m_Cost.InputText = XLabelSymbolHelper.FormatCostWithIcon(sceneData.FatigueCost[0, 1], ItemEnum.FATIGUE);
+ base.uiBehaviour.m_SceneSoloBattleCost.InputText = XLabelSymbolHelper.FormatCostWithIcon(sceneData.FatigueCost[0, 1], ItemEnum.FATIGUE);
+ base.uiBehaviour.m_SceneTeamBattleCost.InputText = XLabelSymbolHelper.FormatCostWithIcon(sceneData.FatigueCost[0, 1], ItemEnum.FATIGUE);
+ }
+ }
+
+ private void OnClickItemIcon(IXUISprite spr)
+ {
+ XItem mainItem = XBagDocument.MakeXItem((int)spr.ID, false);
+ XSingleton<UiUtility>.singleton.ShowTooltipDialogWithSearchingCompare(mainItem, spr, false, 0u);
+ }
+
+ private void OnSceneSelected(IXUISprite sp)
+ {
+ XLevelDocument xlevelDocument = XSingleton<XGame>.singleton.Doc.GetXComponent(XLevelDocument.uuID) as XLevelDocument;
+ this._SelectScene = (uint)sp.ID;
+ bool flag = this._FirstNoRankScene > 0u;
+ if (flag)
+ {
+ bool flag2 = this._SelectScene == this._FirstNoRankScene;
+ if (flag2)
+ {
+ SceneTable.RowData sceneData = XSingleton<XSceneMgr>.singleton.GetSceneData(this._SelectScene);
+ bool flag3 = sceneData == null;
+ if (flag3)
+ {
+ XSingleton<XDebug>.singleton.AddErrorLog("OnSceneSelected sceneData is null", null, null, null, null, null);
+ return;
+ }
+ SceneRefuseReason sceneRefuseReason = xlevelDocument.CanLevelOpen(this._SelectScene);
+ bool flag4 = sceneRefuseReason == SceneRefuseReason.PreTask_Notfinish;
+ if (flag4)
+ {
+ base.uiBehaviour.m_MainHintText.SetText(string.Format(XStringDefineProxy.GetString("LEVEl_REQUIRE_TASK"), sceneData.RequiredLevel));
+ base.uiBehaviour.m_MainHint.PlayTween(true, -1f);
+ return;
+ }
+ bool flag5 = sceneRefuseReason == SceneRefuseReason.PreScene_Notfinish;
+ if (flag5)
+ {
+ int unFinishedPreSceneID = xlevelDocument.GetUnFinishedPreSceneID(sceneData);
+ SceneTable.RowData sceneData2 = XSingleton<XSceneMgr>.singleton.GetSceneData((uint)unFinishedPreSceneID);
+ bool flag6 = sceneData2 != null;
+ if (flag6)
+ {
+ base.uiBehaviour.m_MainHintText.SetText(string.Format(XStringDefineProxy.GetString("LEVEL_REQUIRE_PRELEVEL"), sceneData2.Comment));
+ }
+ base.uiBehaviour.m_MainHint.PlayTween(true, -1f);
+ return;
+ }
+ bool flag7 = sceneRefuseReason == SceneRefuseReason.Level_NotEnough;
+ if (flag7)
+ {
+ base.uiBehaviour.m_MainHintText.SetText(string.Format(XStringDefineProxy.GetString("LEVEL_REQUIRE_LEVEL"), sceneData.RequiredLevel));
+ base.uiBehaviour.m_MainHint.PlayTween(true, -1f);
+ return;
+ }
+ bool flag8 = sceneRefuseReason == SceneRefuseReason.ReachLimitTimes;
+ if (flag8)
+ {
+ base.uiBehaviour.m_MainHintText.SetText(XStringDefineProxy.GetString("LEVEL_REACH_LIMIT_TIMES"));
+ base.uiBehaviour.m_MainHint.PlayTween(false, -1f);
+ return;
+ }
+ }
+ bool flag9 = this._SelectScene > this._FirstNoRankScene;
+ if (flag9)
+ {
+ base.uiBehaviour.m_MainHintText.SetText(string.Format(XStringDefineProxy.GetString("LEVEL_REQUIRE_DEFAULT"), new object[0]));
+ base.uiBehaviour.m_MainHint.PlayTween(true, -1f);
+ return;
+ }
+ }
+ this._SetupDetailFrame(this._SelectScene);
+ }
+
+ public void OnPlayerLevelUp()
+ {
+ bool flag = base.IsVisible();
+ if (flag)
+ {
+ this.SetupChapterImage();
+ }
+ }
+
+ public void OnGotSweepRes()
+ {
+ bool flag = base.IsVisible();
+ if (flag)
+ {
+ this.SetupChapterImage();
+ }
+ }
+
+ public bool OnDetailClose(IXUIButton go)
+ {
+ base.uiBehaviour.m_SceneDetail.SetActive(false);
+ return true;
+ }
+
+ public void RefreshHardLeftCount()
+ {
+ XExpeditionDocument specificDocument = XDocuments.GetSpecificDocument<XExpeditionDocument>(XExpeditionDocument.uuID);
+ int dayCount = specificDocument.GetDayCount(TeamLevelType.TeamLevelAbyss, null);
+ int dayMaxCount = specificDocument.GetDayMaxCount(TeamLevelType.TeamLevelAbyss, null);
+ string text = string.Format("{0}/{1}", dayCount, dayMaxCount);
+ base.uiBehaviour.m_HardLeftCount1.SetText(text);
+ bool flag = this._welfareDoc.IsOwnMemberPrivilege(MemberPrivilege.KingdomPrivilege_Adventurer);
+ if (flag)
+ {
+ int num = 0;
+ PayMemberTable.RowData memberPrivilegeConfig = this._welfareDoc.GetMemberPrivilegeConfig(MemberPrivilege.KingdomPrivilege_Adventurer);
+ bool flag2 = memberPrivilegeConfig != null;
+ if (flag2)
+ {
+ num = memberPrivilegeConfig.AbyssCount;
+ }
+ int num2 = 0;
+ bool flag3 = this._welfareDoc.PayMemberPrivilege != null;
+ if (flag3)
+ {
+ num2 = this._welfareDoc.PayMemberPrivilege.usedAbyssCount;
+ }
+ bool flag4 = num2 >= num;
+ if (flag4)
+ {
+ base.uiBehaviour.m_HardLeftCount0.SetText(string.Format("{0}/{1}", dayCount, dayMaxCount));
+ base.uiBehaviour.m_HardLeftCount1.SetText(string.Format("{0}/{1}", dayCount, dayMaxCount));
+ }
+ else
+ {
+ base.uiBehaviour.m_HardLeftCount0.SetText(string.Format("[ffb400][c]{0}[/c][-]/{1}", dayCount, dayMaxCount));
+ base.uiBehaviour.m_HardLeftCount1.SetText(string.Format("[ffb400][c]{0}[/c][-]/{1}", dayCount, dayMaxCount));
+ }
+ }
+ else
+ {
+ base.uiBehaviour.m_HardLeftCount0.SetText(string.Format("{0}/{1}", dayCount, dayMaxCount));
+ base.uiBehaviour.m_HardLeftCount1.SetText(string.Format("{0}/{1}", dayCount, dayMaxCount));
+ }
+ }
+
+ private void _OnAddHardCountClicked(IXUISprite iSp)
+ {
+ DlgBase<XBuyCountView, XBuyCountBehaviour>.singleton.ActiveShow(TeamLevelType.TeamLevelAbyss);
+ }
+
+ private bool OnShopBtnClick(IXUIButton btn)
+ {
+ SeqList<int> sequenceList = XSingleton<XGlobalConfig>.singleton.GetSequenceList("AbyssTeamShopLevel", true);
+ List<int> intList = XSingleton<XGlobalConfig>.singleton.GetIntList("AbyssTeamShopType");
+ int num = 0;
+ bool flag = XSingleton<XAttributeMgr>.singleton.XPlayerData != null;
+ if (flag)
+ {
+ num = (int)XSingleton<XAttributeMgr>.singleton.XPlayerData.Level;
+ }
+ for (int i = 0; i < (int)sequenceList.Count; i++)
+ {
+ bool flag2 = num >= sequenceList[i, 0] && num <= sequenceList[i, 1];
+ if (flag2)
+ {
+ XSysDefine xsysDefine = (XSysDefine)(XFastEnumIntEqualityComparer<XSysDefine>.ToInt(XSysDefine.XSys_Mall_MystShop) + intList[i]);
+ bool flag3 = XSingleton<XGameSysMgr>.singleton.IsSystemOpened(xsysDefine);
+ bool result;
+ if (flag3)
+ {
+ DlgBase<MallSystemDlg, MallSystemBehaviour>.singleton.ShowShopSystem(xsysDefine, 0UL);
+ result = true;
+ }
+ else
+ {
+ int sysOpenLevel = XSingleton<XGameSysMgr>.singleton.GetSysOpenLevel(XFastEnumIntEqualityComparer<XSysDefine>.ToInt(xsysDefine));
+ XSingleton<UiUtility>.singleton.ShowSystemTip(string.Format(XStringDefineProxy.GetString("SHOP_OPEN_LEVEL"), sysOpenLevel), "fece00");
+ result = false;
+ }
+ return result;
+ }
+ }
+ XSingleton<XDebug>.singleton.AddErrorLog("Can't find player level state from golbalconfig by AbyssTeamShop. level = ", num.ToString(), null, null, null, null);
+ return true;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/DungeonSelect.cs.meta b/Client/Assets/Scripts/XMainClient/UI/DungeonSelect.cs.meta
new file mode 100644
index 00000000..2f995017
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/DungeonSelect.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 221f66d310983b749a204191c1ba59e0
+timeCreated: 1611403419
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/DungeonSelectBehaviour.cs b/Client/Assets/Scripts/XMainClient/UI/DungeonSelectBehaviour.cs
new file mode 100644
index 00000000..f69ef925
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/DungeonSelectBehaviour.cs
@@ -0,0 +1,238 @@
+using System;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class DungeonSelectBehaviour : DlgBehaviourBase
+ {
+ public IXUIButton m_Close;
+
+ public IXUISprite m_Normal;
+
+ public IXUISprite m_Hard;
+
+ public IXUICheckBox m_cbNormal;
+
+ public IXUICheckBox m_cbHard;
+
+ public GameObject m_NormalRedpoint;
+
+ public GameObject m_HardRedpoint;
+
+ public GameObject m_NormalBg;
+
+ public GameObject m_HardBg;
+
+ public BoxCollider m_hardBox;
+
+ public BoxCollider m_normalBox;
+
+ public IXUISprite m_LevelBg;
+
+ public IXUITweenTool m_LevelTween;
+
+ public XUIPool m_SceneFramePool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ public XUIPool m_ScenePool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ public IXUILabel m_Rank;
+
+ public IXUIProgress m_RankProgress;
+
+ public XUIPool m_RankBox = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ public GameObject m_BoxFrame;
+
+ public IXUISprite m_BoxFrameBg;
+
+ public GameObject m_BoxChest;
+
+ public IXUILabel m_BoxStar;
+
+ public XUIPool m_BoxRewardPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ public IXUIButton m_BoxFetch;
+
+ public GameObject m_BoxRedPoint;
+
+ public GameObject m_SceneDetail;
+
+ public GameObject m_SceneNormal;
+
+ public GameObject m_SceneHard;
+
+ public IXUILabel m_SceneName;
+
+ public IXUIButton m_SceneClose;
+
+ public IXUILabel[] m_SceneStarCond = new IXUILabel[3];
+
+ public IXUISprite[] m_SceneStar = new IXUISprite[3];
+
+ public XUIPool m_SceneDropPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ public IXUILabel m_SceneHint;
+
+ public IXUILabel m_SceneMyPPT;
+
+ public IXUILabel m_SceneRecommendPPT;
+
+ public IXUILabel m_SweepPPT;
+
+ public GameObject m_SweepPPTName;
+
+ public IXUILabel m_SweepTicketLab;
+
+ public IXUISprite m_addTicketSpr;
+
+ public GameObject m_SweepTicketGo;
+
+ public IXUIButton m_SceneGoBattle;
+
+ public IXUIButton m_SceneSoloBattle;
+
+ public IXUIButton m_SceneTeamBattle;
+
+ public IXUILabelSymbol m_SceneSoloBattleCost;
+
+ public IXUILabelSymbol m_SceneTeamBattleCost;
+
+ public IXUIButton m_SceneQuick1;
+
+ public IXUIButton m_SceneQuick10;
+
+ public IXUILabel m_SceneQuick10Lab;
+
+ public IXUILabel m_DropExpLab;
+
+ public IXUILabel m_DropExpLab1;
+
+ public GameObject m_SceneFirstSSS;
+
+ public IXUILabelSymbol m_SceneFirstSSSReward;
+
+ public IXUILabelSymbol m_Cost;
+
+ public IXUILabel m_SceneRecommendHint;
+
+ public Vector3 m_SceneTeamBattlePos;
+
+ public IXUIButton m_Left;
+
+ public IXUIButton m_Right;
+
+ public IXUITweenTool m_MainHint;
+
+ public IXUILabel m_MainHintText;
+
+ public GameObject m_HardLeftCountGo0;
+
+ public GameObject m_HardLeftCountGo1;
+
+ public IXUILabel m_HardLeftCount0;
+
+ public IXUILabel m_HardLeftCount1;
+
+ public IXUISprite m_BtnAddHardLeftCount0;
+
+ public IXUISprite m_BtnAddHardLeftCount1;
+
+ public IXUISprite m_PrerogativeSpr;
+
+ public IXUILabel m_PrerogativeLab;
+
+ public IXUISprite m_PrerogativeBg;
+
+ public IXUIButton m_ShopBtn;
+
+ private void Awake()
+ {
+ this.m_Close = (base.transform.Find("Bg/Close").GetComponent("XUIButton") as IXUIButton);
+ this.m_Normal = (base.transform.Find("Bg/Normal").GetComponent("XUISprite") as IXUISprite);
+ this.m_Hard = (base.transform.Find("Bg/Hard").GetComponent("XUISprite") as IXUISprite);
+ this.m_NormalRedpoint = base.transform.Find("Bg/Normal/RedPoint").gameObject;
+ this.m_HardRedpoint = base.transform.Find("Bg/Hard/RedPoint").gameObject;
+ this.m_cbNormal = (this.m_Normal.gameObject.GetComponent("XUICheckBox") as IXUICheckBox);
+ this.m_cbHard = (this.m_Hard.gameObject.GetComponent("XUICheckBox") as IXUICheckBox);
+ this.m_normalBox = base.transform.Find("Bg/Normal").GetComponent<BoxCollider>();
+ this.m_hardBox = base.transform.Find("Bg/Hard").GetComponent<BoxCollider>();
+ Transform transform = base.transform.Find("Bg/PlayTween");
+ this.m_LevelTween = (transform.GetComponent("XUIPlayTween") as IXUITweenTool);
+ this.m_LevelBg = (transform.GetComponent("XUISprite") as IXUISprite);
+ Transform transform2 = base.transform.Find("Bg/PlayTween/LevelFramePanel/LevelFrame/LevelTpl");
+ this.m_ScenePool.SetupPool(transform.Find("LevelFramePanel").gameObject, transform2.gameObject, 20u, false);
+ transform2 = base.transform.Find("Bg/PlayTween/LevelFramePanel/LevelFrame");
+ this.m_SceneFramePool.SetupPool(transform2.parent.gameObject, transform2.gameObject, 3u, false);
+ this.m_NormalBg = base.transform.Find("Bg/NormalBg").gameObject;
+ this.m_HardBg = base.transform.Find("Bg/HardBg").gameObject;
+ this.m_Rank = (base.transform.Find("Bg/StarBar/Text").GetComponent("XUILabel") as IXUILabel);
+ this.m_RankProgress = (base.transform.Find("Bg/StarBar").GetComponent("XUIProgress") as IXUIProgress);
+ transform2 = base.transform.Find("Bg/StarBar/Reward");
+ this.m_RankBox.SetupPool(transform2.parent.gameObject, transform2.gameObject, 3u, false);
+ this.m_BoxFrame = base.transform.Find("Bg/BoxFrame").gameObject;
+ this.m_BoxFrame.SetActive(false);
+ this.m_BoxFrameBg = (base.transform.Find("Bg/BoxFrame/Bg").GetComponent("XUISprite") as IXUISprite);
+ this.m_BoxChest = base.transform.Find("Bg/BoxFrame/T1").gameObject;
+ this.m_BoxStar = (base.transform.Find("Bg/BoxFrame/Text").GetComponent("XUILabel") as IXUILabel);
+ transform2 = base.transform.Find("Bg/BoxFrame/DropFrame/ItemTpl");
+ this.m_BoxRewardPool.SetupPool(transform2.parent.gameObject, transform2.gameObject, 10u, false);
+ this.m_BoxFetch = (base.transform.Find("Bg/BoxFrame/Fetch").GetComponent("XUIButton") as IXUIButton);
+ this.m_BoxRedPoint = base.transform.Find("Bg/BoxFrame/RedPoint").gameObject;
+ this.m_SceneDetail = base.transform.Find("Bg/DetailFrame").gameObject;
+ this.m_SceneDetail.gameObject.SetActive(false);
+ this.m_SceneNormal = this.m_SceneDetail.transform.Find("Normal").gameObject;
+ this.m_SceneHard = this.m_SceneDetail.transform.Find("Hard").gameObject;
+ this.m_SceneName = (this.m_SceneDetail.transform.Find("Name").GetComponent("XUILabel") as IXUILabel);
+ this.m_SceneClose = (this.m_SceneDetail.transform.Find("Close").GetComponent("XUIButton") as IXUIButton);
+ for (int i = 0; i < 3; i++)
+ {
+ this.m_SceneStarCond[i] = (this.m_SceneDetail.transform.Find("Name/Star" + (i + 1) + "/Desc").GetComponent("XUILabel") as IXUILabel);
+ this.m_SceneStar[i] = (this.m_SceneDetail.transform.Find("Name/Star" + (i + 1)).GetComponent("XUISprite") as IXUISprite);
+ }
+ transform2 = this.m_SceneDetail.transform.Find("DropFrame/Panel/Grid/ItemTpl");
+ this.m_SceneDropPool.SetupPool(transform2.parent.gameObject, transform2.gameObject, 10u, false);
+ this.m_DropExpLab = (this.m_SceneDetail.transform.Find("DropFrame/ResouceDrop/Label").GetComponent("XUILabel") as IXUILabel);
+ this.m_DropExpLab1 = (this.m_SceneDetail.transform.Find("DropFrame/ResouceDrop1/Label").GetComponent("XUILabel") as IXUILabel);
+ transform2 = this.m_SceneDetail.transform.Find("Bg");
+ this.m_SceneHint = (transform2.Find("Hint").GetComponent("XUILabel") as IXUILabel);
+ this.m_SceneMyPPT = (transform2.Find("MyPPT").GetComponent("XUILabel") as IXUILabel);
+ this.m_SceneRecommendPPT = (transform2.Find("RecommendPPT").GetComponent("XUILabel") as IXUILabel);
+ this.m_SweepPPT = (transform2.Find("SweepPPT").GetComponent("XUILabel") as IXUILabel);
+ this.m_SweepPPTName = this.m_SceneDetail.transform.Find("P/T4").gameObject;
+ this.m_SweepTicketGo = transform2.Find("SweepQuantity").gameObject;
+ this.m_SweepTicketLab = (this.m_SweepTicketGo.transform.GetComponent("XUILabel") as IXUILabel);
+ this.m_addTicketSpr = (this.m_SweepTicketGo.transform.Find("BtnAdd").GetComponent("XUISprite") as IXUISprite);
+ this.m_SceneGoBattle = (transform2.Find("GoBattle").GetComponent("XUIButton") as IXUIButton);
+ this.m_SceneSoloBattle = (transform2.Find("GoAloneBattle").GetComponent("XUIButton") as IXUIButton);
+ this.m_SceneSoloBattleCost = (transform2.Find("GoAloneBattle/Cost").GetComponent("XUILabelSymbol") as IXUILabelSymbol);
+ this.m_SceneTeamBattle = (transform2.Find("GoTeamBattle").GetComponent("XUIButton") as IXUIButton);
+ this.m_SceneTeamBattleCost = (transform2.Find("GoTeamBattle/Cost").GetComponent("XUILabelSymbol") as IXUILabelSymbol);
+ this.m_SceneTeamBattlePos = this.m_SceneTeamBattle.gameObject.transform.localPosition;
+ this.m_SceneQuick1 = (transform2.Find("Quick1").GetComponent("XUIButton") as IXUIButton);
+ this.m_SceneQuick10 = (transform2.Find("Quick10").GetComponent("XUIButton") as IXUIButton);
+ this.m_SceneQuick10Lab = (transform2.Find("Quick10/T1").GetComponent("XUILabel") as IXUILabel);
+ this.m_Cost = (transform2.Find("GoBattle/Cost").GetComponent("XUILabelSymbol") as IXUILabelSymbol);
+ this.m_SceneFirstSSS = transform2.Find("First3Star").gameObject;
+ this.m_SceneFirstSSSReward = (this.m_SceneFirstSSS.transform.Find("Num").GetComponent("XUILabelSymbol") as IXUILabelSymbol);
+ this.m_SceneRecommendHint = (base.transform.Find("Bg/DetailFrame/Tj").GetComponent("XUILabel") as IXUILabel);
+ this.m_Left = (base.transform.Find("Bg/Left").GetComponent("XUIButton") as IXUIButton);
+ this.m_Right = (base.transform.Find("Bg/Right").GetComponent("XUIButton") as IXUIButton);
+ this.m_MainHint = (base.transform.Find("Bg/MainHint").GetComponent("XUIPlayTween") as IXUITweenTool);
+ this.m_MainHintText = (base.transform.Find("Bg/MainHint").GetComponent("XUILabel") as IXUILabel);
+ this.m_HardLeftCountGo0 = base.transform.Find("Bg/HardLeftCount").gameObject;
+ this.m_HardLeftCountGo1 = base.transform.Find("Bg/DetailFrame/HardLeftCount").gameObject;
+ this.m_PrerogativeBg = (this.m_HardLeftCountGo0.transform.Find("tq/p").GetComponent("XUISprite") as IXUISprite);
+ this.m_PrerogativeSpr = (this.m_HardLeftCountGo0.transform.Find("tq").GetComponent("XUISprite") as IXUISprite);
+ this.m_PrerogativeLab = (this.m_HardLeftCountGo0.transform.Find("tq/t").GetComponent("XUILabel") as IXUILabel);
+ this.m_HardLeftCount0 = (this.m_HardLeftCountGo0.transform.Find("Value").GetComponent("XUILabel") as IXUILabel);
+ this.m_HardLeftCount1 = (this.m_HardLeftCountGo1.transform.Find("Value").GetComponent("XUILabel") as IXUILabel);
+ this.m_BtnAddHardLeftCount0 = (this.m_HardLeftCountGo0.transform.Find("BtnAdd").GetComponent("XUISprite") as IXUISprite);
+ this.m_BtnAddHardLeftCount1 = (this.m_HardLeftCountGo1.transform.Find("BtnAdd").GetComponent("XUISprite") as IXUISprite);
+ this.m_MainHint.gameObject.SetActive(false);
+ this.m_ShopBtn = (base.transform.Find("Bg/BtnShop").GetComponent("XUIButton") as IXUIButton);
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/DungeonSelectBehaviour.cs.meta b/Client/Assets/Scripts/XMainClient/UI/DungeonSelectBehaviour.cs.meta
new file mode 100644
index 00000000..bee8fc41
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/DungeonSelectBehaviour.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: a2337a4966ae78f48a19b09a1a1ee21d
+timeCreated: 1611404256
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/EFavorState.cs b/Client/Assets/Scripts/XMainClient/UI/EFavorState.cs
new file mode 100644
index 00000000..52c4053d
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/EFavorState.cs
@@ -0,0 +1,12 @@
+using System;
+
+namespace XMainClient.UI
+{
+ internal enum EFavorState
+ {
+ None,
+ CanSend,
+ SendWithExchange,
+ Exchange
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/EFavorState.cs.meta b/Client/Assets/Scripts/XMainClient/UI/EFavorState.cs.meta
new file mode 100644
index 00000000..720d9bc3
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/EFavorState.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 830715e3e88d3264abcf0675d05b9118
+timeCreated: 1611404042
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/EmblemBagMode.cs b/Client/Assets/Scripts/XMainClient/UI/EmblemBagMode.cs
new file mode 100644
index 00000000..de742773
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/EmblemBagMode.cs
@@ -0,0 +1,10 @@
+using System;
+
+namespace XMainClient.UI
+{
+ internal enum EmblemBagMode
+ {
+ EBM_NORMAL,
+ EBM_SELECT
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/EmblemBagMode.cs.meta b/Client/Assets/Scripts/XMainClient/UI/EmblemBagMode.cs.meta
new file mode 100644
index 00000000..16644815
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/EmblemBagMode.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 2f97b3ca60ff1f64a9095451069e09f8
+timeCreated: 1611403517
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/EmblemBagView.cs b/Client/Assets/Scripts/XMainClient/UI/EmblemBagView.cs
new file mode 100644
index 00000000..45a6c528
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/EmblemBagView.cs
@@ -0,0 +1,328 @@
+using System;
+using System.Collections.Generic;
+using KKSG;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class EmblemBagView : DlgHandlerBase
+ {
+ private XItemMorePowerfulTipMgr powerfullMgr
+ {
+ get
+ {
+ return DlgBase<ItemSystemDlg, TabDlgBehaviour>.singleton.RedPointMgr;
+ }
+ }
+
+ private XItemMorePowerfulTipMgr newItemMgr
+ {
+ get
+ {
+ return DlgBase<ItemSystemDlg, TabDlgBehaviour>.singleton.NewItemMgr;
+ }
+ }
+
+ private XBagWindow bagWindow
+ {
+ get
+ {
+ return DlgBase<ItemSystemDlg, TabDlgBehaviour>.singleton.BagWindow;
+ }
+ }
+
+ public string IdentifyEffectPath
+ {
+ get
+ {
+ bool flag = string.IsNullOrEmpty(this.m_identifyEffectPath);
+ if (flag)
+ {
+ this.m_identifyEffectPath = XSingleton<XGlobalConfig>.singleton.GetValue("EmblemIdentifyEffectPath");
+ }
+ return this.m_identifyEffectPath;
+ }
+ }
+
+ protected override string FileName
+ {
+ get
+ {
+ return "ItemNew/EmblemListPanel";
+ }
+ }
+
+ public IXUIButton m_Help;
+
+ private XEmblemDocument _doc;
+
+ private IXUILabel m_bagNumLab;
+
+ private Dictionary<ulong, IXUISprite> itemBtnDic = new Dictionary<ulong, IXUISprite>();
+
+ public IXUIButton m_expandBagBtn;
+
+ private Transform EffectTra;
+
+ private XFx m_identifyFx;
+
+ private uint m_emblemIdentifyToken = 0u;
+
+ private string m_identifyEffectPath = string.Empty;
+
+ protected override void Init()
+ {
+ base.Init();
+ this._doc = XDocuments.GetSpecificDocument<XEmblemDocument>(XEmblemDocument.uuID);
+ this._doc._BagHandler = this;
+ this.m_Help = (base.transform.Find("Help").GetComponent("XUIButton") as IXUIButton);
+ this.m_bagNumLab = (base.PanelObject.transform.Find("Panel/BagNum").GetComponent("XUILabel") as IXUILabel);
+ this.m_expandBagBtn = (base.PanelObject.transform.Find("add").GetComponent("XUIButton") as IXUIButton);
+ BagExpandItemListTable.RowData expandItemConfByType = XBagDocument.GetExpandItemConfByType((uint)XFastEnumIntEqualityComparer<BagType>.ToInt(BagType.EmblemBag));
+ this.m_expandBagBtn.gameObject.SetActive(expandItemConfByType != null);
+ this.EffectTra = base.PanelObject.transform.Find("Effect");
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ this.m_Help.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnHelpClicked));
+ this.m_expandBagBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnBagExpandClicked));
+ }
+
+ public bool OnHelpClicked(IXUIButton button)
+ {
+ DlgBase<XCommonHelpTipView, XCommonHelpTipBehaviour>.singleton.ShowHelp(XSysDefine.XSys_Char_Emblem);
+ return true;
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ this.Show();
+ }
+
+ private void Show()
+ {
+ this.bagWindow.ChangeData(new ItemUpdateHandler(this.WrapContentItemUpdated), new GetItemHandler(this._doc.GetEmblemItems));
+ this.bagWindow.OnShow();
+ this.SetBagNum();
+ this._doc.NewItems.bCanClear = true;
+ }
+
+ protected override void OnHide()
+ {
+ this.powerfullMgr.ReturnAll();
+ this.newItemMgr.ReturnAll();
+ this.bagWindow.OnHide();
+ this._doc.NewItems.TryClear();
+ this.itemBtnDic.Clear();
+ XSingleton<XTimerMgr>.singleton.KillTimer(this.m_emblemIdentifyToken);
+ this.HideEffect(this.m_identifyFx);
+ base.OnHide();
+ }
+
+ public override void StackRefresh()
+ {
+ base.StackRefresh();
+ this.Show();
+ }
+
+ public override void OnUnload()
+ {
+ this._doc._BagHandler = null;
+ bool flag = this.m_identifyFx != null;
+ if (flag)
+ {
+ XSingleton<XFxMgr>.singleton.DestroyFx(this.m_identifyFx, true);
+ this.m_identifyFx = null;
+ }
+ base.OnUnload();
+ }
+
+ public void Refresh()
+ {
+ this.bagWindow.RefreshWindow();
+ this.SetBagNum();
+ }
+
+ public void RefreshTips(ulong uid)
+ {
+ IXUISprite ixuisprite;
+ bool flag = this.itemBtnDic.TryGetValue(uid, out ixuisprite);
+ if (flag)
+ {
+ bool flag2 = ixuisprite != null;
+ if (flag2)
+ {
+ this.OnItemClicked(ixuisprite);
+ }
+ }
+ }
+
+ private void SetBagNum()
+ {
+ int count = this._doc.GetEmblemItems().Count;
+ XRechargeDocument specificDocument = XDocuments.GetSpecificDocument<XRechargeDocument>(XRechargeDocument.uuID);
+ VIPTable.RowData byVIP = specificDocument.VIPReader.GetByVIP((int)specificDocument.VipLevel);
+ bool flag = byVIP != null;
+ if (flag)
+ {
+ uint num = byVIP.EmblemMax;
+ BagExpandData bagExpandData = XBagDocument.BagDoc.GetBagExpandData(BagType.EmblemBag);
+ bool flag2 = bagExpandData != null;
+ if (flag2)
+ {
+ num += bagExpandData.ExpandNum;
+ }
+ bool flag3 = (long)count >= (long)((ulong)num);
+ if (flag3)
+ {
+ this.m_bagNumLab.SetText(string.Format("[ff4366]{0}[-]/{1}", count, num));
+ }
+ else
+ {
+ this.m_bagNumLab.SetText(string.Format("{0}[-]/{1}", count, num));
+ }
+ }
+ }
+
+ private void WrapContentItemUpdated(Transform t, int index)
+ {
+ Transform transform = t.Find("Icon/SupplementBrought");
+ bool flag = transform != null;
+ if (flag)
+ {
+ transform.gameObject.SetActive(false);
+ }
+ IXUISprite ixuisprite = t.Find("Icon").GetComponent("XUISprite") as IXUISprite;
+ bool flag2 = this.bagWindow.m_XItemList == null || index >= this.bagWindow.m_XItemList.Count || index < 0;
+ if (flag2)
+ {
+ XSingleton<XItemDrawerMgr>.singleton.DrawItem(t.gameObject, null);
+ this.powerfullMgr.ReturnInstance(ixuisprite);
+ this.newItemMgr.ReturnInstance(ixuisprite);
+ t.gameObject.name = XSingleton<XCommon>.singleton.StringCombine("empty", index.ToString());
+ }
+ else
+ {
+ t.gameObject.name = XSingleton<XCommon>.singleton.StringCombine("emblem", this.bagWindow.m_XItemList[index].itemID.ToString());
+ XSingleton<XItemDrawerMgr>.singleton.DrawItem(t.gameObject, this.bagWindow.m_XItemList[index]);
+ ixuisprite.ID = this.bagWindow.m_XItemList[index].uid;
+ ixuisprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnItemClicked));
+ bool flag3 = this.itemBtnDic.ContainsKey(ixuisprite.ID);
+ if (flag3)
+ {
+ this.itemBtnDic[ixuisprite.ID] = ixuisprite;
+ }
+ else
+ {
+ this.itemBtnDic.Add(ixuisprite.ID, ixuisprite);
+ }
+ XEmblemItem xemblemItem = this.bagWindow.m_XItemList[index] as XEmblemItem;
+ bool flag4 = this._doc.IsEmblemMorePowerful(ixuisprite.ID);
+ if (flag4)
+ {
+ this.powerfullMgr.SetTip(ixuisprite);
+ }
+ else
+ {
+ this.powerfullMgr.ReturnInstance(ixuisprite);
+ }
+ bool flag5 = this._doc.NewItems.IsNew(ixuisprite.ID);
+ if (flag5)
+ {
+ this.newItemMgr.SetTip(ixuisprite);
+ }
+ else
+ {
+ this.newItemMgr.ReturnInstance(ixuisprite);
+ }
+ }
+ }
+
+ public void ShowEmblemIdentifyEffect()
+ {
+ bool flag = this.m_identifyFx == null;
+ if (flag)
+ {
+ this.m_identifyFx = XSingleton<XFxMgr>.singleton.CreateFx(this.IdentifyEffectPath, null, true);
+ }
+ else
+ {
+ this.m_identifyFx.SetActive(true);
+ }
+ this.m_identifyFx.Play(this.EffectTra, Vector3.zero, Vector3.one, 1f, true, false);
+ XSingleton<XTimerMgr>.singleton.KillTimer(this.m_emblemIdentifyToken);
+ this.m_emblemIdentifyToken = XSingleton<XTimerMgr>.singleton.SetTimerAccurate(5f, new XTimerMgr.AccurateElapsedEventHandler(this.OnEmblemIdentifyTimer), null);
+ }
+
+ private void OnEmblemIdentifyTimer(object param, float delay)
+ {
+ this.HideEffect(this.m_identifyFx);
+ XSingleton<XTimerMgr>.singleton.KillTimer(this.m_emblemIdentifyToken);
+ this.m_emblemIdentifyToken = 0u;
+ }
+
+ private void HideEffect(XFx fx)
+ {
+ bool flag = fx != null;
+ if (flag)
+ {
+ fx.Stop();
+ fx.SetActive(false);
+ }
+ }
+
+ public void OnItemClicked(IXUISprite iSp)
+ {
+ XItem itemByUID = XSingleton<XGame>.singleton.Doc.XBagDoc.GetItemByUID(iSp.ID);
+ bool flag = itemByUID == null;
+ if (!flag)
+ {
+ bool flag2 = this._doc.NewItems.RemoveItem(iSp.ID, itemByUID.Type, false);
+ if (flag2)
+ {
+ this.Refresh();
+ }
+ CharacterEquipHandler.OnItemClicked(iSp);
+ }
+ }
+
+ public void OnAddItem()
+ {
+ this.bagWindow.UpdateBag();
+ this.SetBagNum();
+ }
+
+ public void OnRemoveItem()
+ {
+ this.bagWindow.UpdateBag();
+ this.SetBagNum();
+ }
+
+ public void OnItemCountChanged(XItem item)
+ {
+ this.bagWindow.UpdateItem(item);
+ }
+
+ public void OnSwapItem(XItem item1, XItem item2, int slot)
+ {
+ this.bagWindow.ReplaceItem(item1, item2);
+ }
+
+ public void OnUpdateItem(XItem item)
+ {
+ this.bagWindow.UpdateItem(item);
+ }
+
+ public bool OnBagExpandClicked(IXUIButton button)
+ {
+ XBagDocument.BagDoc.UseBagExpandTicket(BagType.EmblemBag);
+ return true;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/EmblemBagView.cs.meta b/Client/Assets/Scripts/XMainClient/UI/EmblemBagView.cs.meta
new file mode 100644
index 00000000..50b1cc2d
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/EmblemBagView.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 76576883e0547554dbe810dfc522ec75
+timeCreated: 1611403949
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/EmblemEquipView.cs b/Client/Assets/Scripts/XMainClient/UI/EmblemEquipView.cs
new file mode 100644
index 00000000..78403e24
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/EmblemEquipView.cs
@@ -0,0 +1,300 @@
+using System;
+using System.Collections.Generic;
+using UILib;
+using UnityEngine;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class EmblemEquipView : DlgHandlerBase
+ {
+ protected override string FileName
+ {
+ get
+ {
+ return "ItemNew/EmblemOperateFrame";
+ }
+ }
+
+ public XEmblemDocument _doc;
+
+ public XSmeltDocument _smeltDoc;
+
+ public static int Emblem_Slot_Count = XBagDocument.BodyPosition<EmblemPosition>(EmblemPosition.EMBLEM_END);
+
+ public GameObject[] m_EmblemBg = new GameObject[EmblemEquipView.Emblem_Slot_Count];
+
+ public IXUISprite[] m_EmblemSlots = new IXUISprite[EmblemEquipView.Emblem_Slot_Count];
+
+ public IXUISprite[] m_EmblemSlotCovers = new IXUISprite[EmblemEquipView.Emblem_Slot_Count];
+
+ public IXUISprite[] m_EmblemP = new IXUISprite[EmblemEquipView.Emblem_Slot_Count];
+
+ public IXUISprite[] m_EmblemSlotBgs = new IXUISprite[EmblemEquipView.Emblem_Slot_Count];
+
+ public XUIPool m_EmblemPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ private XEmbleAttrView<XAttrPlayerFile> embleAttrView;
+
+ private Transform TotalAttriPanel;
+
+ private IXUITweenTool m_BuySlotTween;
+
+ private SpriteClickEventHandler m_finalHandle = null;
+
+ private ulong m_slottingSlot = 0UL;
+
+ private static int GetSlotIndex(EquipPosition pos)
+ {
+ int num = XBagDocument.BodyPosition<EquipPosition>(pos);
+ bool flag = num >= XEmblemDocument.Position_TotalStart && num < XEmblemDocument.Position_TotalEnd;
+ int result;
+ if (flag)
+ {
+ result = num - XEmblemDocument.Position_TotalStart;
+ }
+ else
+ {
+ result = -1;
+ }
+ return result;
+ }
+
+ protected override void Init()
+ {
+ base.Init();
+ this.TotalAttriPanel = base.PanelObject.transform.Find("TotalAttriPanel");
+ IXUIButton ixuibutton = base.PanelObject.transform.Find("Panel/Btn").GetComponent("XUIButton") as IXUIButton;
+ ixuibutton.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnClickEmblemAccess));
+ IXUIButton ixuibutton2 = base.PanelObject.transform.Find("Panel/AttriBtn").GetComponent("XUIButton") as IXUIButton;
+ ixuibutton2.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnClickAttriBtn));
+ this.m_EmblemPool.SetupPool(base.PanelObject.transform.Find("Panel/Frame/Emblems").gameObject, base.PanelObject.transform.Find("Panel/Frame/Emblems/EmblemTpl").gameObject, (uint)EmblemEquipView.Emblem_Slot_Count, false);
+ for (int i = 0; i < EmblemEquipView.Emblem_Slot_Count; i++)
+ {
+ Transform transform = base.PanelObject.transform.Find("Panel/Frame/Emblems/Emblem" + i);
+ GameObject gameObject = this.m_EmblemPool.FetchGameObject(false);
+ this.m_EmblemBg[i] = gameObject;
+ gameObject.transform.localPosition = transform.localPosition;
+ gameObject.transform.localScale = transform.localScale;
+ this.m_EmblemSlots[i] = (gameObject.transform.Find("Icon").GetComponent("XUISprite") as IXUISprite);
+ this.m_EmblemP[i] = (gameObject.transform.Find("P").GetComponent("XUISprite") as IXUISprite);
+ this.m_EmblemSlotCovers[i] = (gameObject.transform.Find("Cover").GetComponent("XUISprite") as IXUISprite);
+ this.m_EmblemSlotCovers[i].ID = (ulong)((long)i);
+ this.m_EmblemSlotCovers[i].RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnSlotCoverClicked));
+ this.m_EmblemSlotBgs[i] = (gameObject.transform.Find("Bg").GetComponent("XUISprite") as IXUISprite);
+ this.m_EmblemSlotBgs[i].RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnSlotBgClicked));
+ }
+ this.m_BuySlotTween = (base.PanelObject.transform.Find("Panel/Frame/Emblems/Light").GetComponent("XUIPlayTween") as IXUITweenTool);
+ this.m_BuySlotTween.gameObject.SetActive(false);
+ DlgHandlerBase.EnsureCreate<XEmbleAttrView<XAttrPlayerFile>>(ref this.embleAttrView, this.TotalAttriPanel, false, this);
+ this._doc = XDocuments.GetSpecificDocument<XEmblemDocument>(XEmblemDocument.uuID);
+ this._doc._EquipHandler = this;
+ this._smeltDoc = XSmeltDocument.Doc;
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ this.ShowEquipments();
+ this.m_BuySlotTween.gameObject.SetActive(false);
+ }
+
+ public override void StackRefresh()
+ {
+ base.StackRefresh();
+ this.ShowEquipments();
+ }
+
+ public override void OnUnload()
+ {
+ DlgHandlerBase.EnsureUnload<XEmbleAttrView<XAttrPlayerFile>>(ref this.embleAttrView);
+ this._doc._EquipHandler = null;
+ base.OnUnload();
+ }
+
+ public void ShowEquipments()
+ {
+ this._doc.UpdateEquipLockState(XSingleton<XAttributeMgr>.singleton.XPlayerData.Level);
+ this._doc.UpdateEquipSlottingState();
+ XBodyBag emblemBag = XSingleton<XGame>.singleton.Doc.XBagDoc.EmblemBag;
+ EmblemSlotStatus[] equipLock = this._doc.EquipLock;
+ for (int i = XEmblemDocument.Position_TotalStart; i < XEmblemDocument.Position_TotalEnd; i++)
+ {
+ this.SetSlot(i, emblemBag[i], equipLock[i - XEmblemDocument.Position_TotalStart]);
+ }
+ }
+
+ public void SetSlot(int slot, XItem item, EmblemSlotStatus slotStatus = null)
+ {
+ int num = slot - XEmblemDocument.Position_TotalStart;
+ bool flag = slotStatus != null && slotStatus.IsLock;
+ if (flag)
+ {
+ XSingleton<XItemDrawerMgr>.singleton.DrawItem(this.m_EmblemBg[num], null);
+ this.m_EmblemSlots[num].RegisterSpriteClickEventHandler(null);
+ this.m_EmblemBg[num].transform.Find("RedPoint").gameObject.SetActive(false);
+ this.m_EmblemSlotCovers[num].SetVisible(true);
+ this.m_EmblemP[num].gameObject.SetActive(!slotStatus.LevelIsdOpen);
+ }
+ else
+ {
+ bool flag2 = item == null || item.itemID == 0 || (ulong)item.type != (ulong)((long)XFastEnumIntEqualityComparer<ItemType>.ToInt(ItemType.EMBLEM));
+ if (flag2)
+ {
+ XSingleton<XItemDrawerMgr>.singleton.DrawItem(this.m_EmblemBg[num], null);
+ this.m_EmblemSlotCovers[num].SetVisible(false);
+ this.m_EmblemP[num].SetVisible(false);
+ this.m_EmblemSlots[num].RegisterSpriteClickEventHandler(null);
+ this.m_EmblemBg[num].transform.Find("RedPoint").gameObject.SetActive(false);
+ }
+ else
+ {
+ this.m_EmblemSlotCovers[num].SetVisible(false);
+ this.m_EmblemP[num].SetVisible(false);
+ XItemDrawerMgr.Param.bHideBinding = true;
+ XSingleton<XItemDrawerMgr>.singleton.DrawItem(this.m_EmblemBg[num], item);
+ bool flag3 = this.m_finalHandle == null;
+ if (flag3)
+ {
+ this.m_EmblemSlots[num].RegisterSpriteClickEventHandler(new SpriteClickEventHandler(CharacterEquipHandler.OnItemClicked));
+ }
+ this.m_EmblemSlots[num].ID = item.uid;
+ bool active = XSingleton<XGameSysMgr>.singleton.IsSystemOpened(XSysDefine.XSys_Item_Smelting) && this._smeltDoc.IsHadRedDot(item);
+ this.m_EmblemBg[num].transform.Find("RedPoint").gameObject.SetActive(active);
+ }
+ }
+ }
+
+ public void RegisterItemClickEvents(SpriteClickEventHandler handle = null)
+ {
+ this.m_finalHandle = handle;
+ bool flag = this.m_finalHandle == null;
+ if (flag)
+ {
+ for (int i = 0; i < EmblemEquipView.Emblem_Slot_Count; i++)
+ {
+ this.m_EmblemSlots[i].RegisterSpriteClickEventHandler(new SpriteClickEventHandler(CharacterEquipHandler.OnItemClicked));
+ }
+ }
+ else
+ {
+ for (int j = 0; j < EmblemEquipView.Emblem_Slot_Count; j++)
+ {
+ this.m_EmblemSlots[j].RegisterSpriteClickEventHandler(this.m_finalHandle);
+ }
+ }
+ }
+
+ public void OnSlotBgClicked(IXUISprite iSp)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString("EMBLEM_SLOT_NO_SELECT"), "fece00");
+ }
+
+ public bool OnClickEmblemAccess(IXUIButton btn)
+ {
+ XSingleton<XGameSysMgr>.singleton.OpenSystem(XSysDefine.XSys_EquipCreate_EmblemSet, 0UL);
+ return true;
+ }
+
+ public bool OnClickAttriBtn(IXUIButton btn)
+ {
+ this.embleAttrView.SetBaseData(XSingleton<XGame>.singleton.Doc.XBagDoc.EmblemBag);
+ this.embleAttrView.SetVisible(true);
+ return true;
+ }
+
+ public void OnSlotCoverClicked(IXUISprite iSp)
+ {
+ EmblemSlotStatus[] equipLock = this._doc.EquipLock;
+ checked
+ {
+ bool flag = equipLock[(int)((IntPtr)iSp.ID)] == null;
+ if (!flag)
+ {
+ this.m_slottingSlot = iSp.ID;
+ bool isLock = equipLock[(int)((IntPtr)iSp.ID)].IsLock;
+ if (isLock)
+ {
+ List<uint> emblemSlotUnlockLevel = this._doc.emblemSlotUnlockLevel;
+ int num = unchecked((int)iSp.ID);
+ bool flag2 = !equipLock[(int)((IntPtr)iSp.ID)].LevelIsdOpen;
+ if (flag2)
+ {
+ bool flag3 = num < XEmblemDocument.Position_AttrEnd;
+ string @string;
+ if (flag3)
+ {
+ @string = XStringDefineProxy.GetString("EMBLEM_ATTR");
+ }
+ else
+ {
+ @string = XStringDefineProxy.GetString("EMBLEM_SKILL");
+ }
+ XSingleton<UiUtility>.singleton.ShowSystemTip(@string + XStringDefineProxy.GetString("EMBLEM_SLOT_OPEN_AT_LEVEL", new object[]
+ {
+ emblemSlotUnlockLevel[num]
+ }), "ff0000");
+ }
+ else
+ {
+ bool flag4 = !equipLock[(int)((IntPtr)iSp.ID)].HadSlotting;
+ if (flag4)
+ {
+ int num2 = this._doc.IsCanSlotting(equipLock[(int)((IntPtr)iSp.ID)].Slot);
+ bool flag5 = num2 == 0;
+ if (flag5)
+ {
+ XSingleton<UiUtility>.singleton.ShowModalDialog(string.Format(XStringDefineProxy.GetString("SlotThisEmblemNeedMoney"), this._doc.SlottingNeedMoney(equipLock[(int)((IntPtr)iSp.ID)].Slot)), XStringDefineProxy.GetString("COMMON_OK"), XStringDefineProxy.GetString("COMMON_CANCEL"), new ButtonClickEventHandler(this.EmblemSlotting));
+ }
+ else
+ {
+ bool flag6 = num2 == 1;
+ if (flag6)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString("NeedUnlockLastSlotting"), "fece00");
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+
+ public void PlayBuySlotFx(int index)
+ {
+ bool flag = index >= this.m_EmblemBg.Length;
+ if (!flag)
+ {
+ this.m_BuySlotTween.gameObject.transform.localPosition = this.m_EmblemBg[index].transform.localPosition;
+ this.m_BuySlotTween.PlayTween(true, -1f);
+ XSingleton<XAudioMgr>.singleton.PlayUISound("Audio/UI/UI_winfavor", true, AudioChannel.Action);
+ }
+ }
+
+ private bool EmblemSlotting(IXUIButton btn)
+ {
+ this._doc.ReqEmbleSlotting(this.m_slottingSlot);
+ XSingleton<UiUtility>.singleton.CloseModalDlg();
+ return true;
+ }
+
+ public static void OnItemClicked(IXUISprite iSp)
+ {
+ XItem itemByUID = XSingleton<XGame>.singleton.Doc.XBagDoc.GetItemByUID(iSp.ID);
+ bool flag = itemByUID != null;
+ if (flag)
+ {
+ bool flag2 = XSingleton<XGame>.singleton.Doc.XBagDoc.EmblemBag.HasItem(itemByUID.uid);
+ if (flag2)
+ {
+ XSingleton<UiUtility>.singleton.ShowTooltipDialog(itemByUID, null, iSp, true, 0u);
+ }
+ else
+ {
+ XSingleton<UiUtility>.singleton.ShowTooltipDialogWithSearchingCompare(itemByUID, iSp, true, 0u);
+ }
+ }
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/EmblemEquipView.cs.meta b/Client/Assets/Scripts/XMainClient/UI/EmblemEquipView.cs.meta
new file mode 100644
index 00000000..718fc850
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/EmblemEquipView.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 55540edbed91f20479809fff16966633
+timeCreated: 1611403737
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/EmblemTooltipDlg.cs b/Client/Assets/Scripts/XMainClient/UI/EmblemTooltipDlg.cs
new file mode 100644
index 00000000..d9b07c7f
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/EmblemTooltipDlg.cs
@@ -0,0 +1,321 @@
+using System;
+using UILib;
+using UnityEngine;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class EmblemTooltipDlg : TooltipDlg<EmblemTooltipDlg, EmblemTooltipDlgBehaviour>
+ {
+ public override string fileName
+ {
+ get
+ {
+ return "GameSystem/EmblemToolTipDlg";
+ }
+ }
+
+ private AttrFrameParam tmpAttrFrameParam = new AttrFrameParam();
+
+ protected override void Init()
+ {
+ base.Init();
+ this.m_OperateList[0, 0] = new TooltipButtonOperateEmblemPutOn();
+ this.m_OperateList[0, 1] = new TooltipButtonOperateIdentify();
+ this.m_OperateList[0, 2] = new TooltipButtonOperateRecycle(XSysDefine.XSys_Char_Emblem);
+ this.m_OperateList[0, 3] = new TooltipButtonOperateSell();
+ this.m_OperateList[0, 4] = new TooltipButtonOperateSmeltReturn();
+ this.m_OperateList[1, 0] = new TooltipButtonOperateTakeOff();
+ this.m_OperateList[1, 1] = new TooltipButtonOperateEmblemSmelt();
+ }
+
+ public void ShowToolTip(ulong MainUID, ulong CompareUID, bool bShowButtons = true)
+ {
+ XItem itemByUID = XSingleton<XGame>.singleton.Doc.XBagDoc.GetItemByUID(MainUID);
+ XItem xitem = XSingleton<XGame>.singleton.Doc.XBagDoc.GetItemByUID(CompareUID);
+ bool flag = xitem.uid == 0UL;
+ if (flag)
+ {
+ xitem = null;
+ }
+ this.ShowToolTip(itemByUID, xitem, bShowButtons, 0u);
+ }
+
+ protected override void SetupOtherFrame(GameObject goToolTip, XItem mainItem, XItem compareItem, bool bMain)
+ {
+ Transform transform = goToolTip.transform.Find("ScrollPanel");
+ IXUISprite ixuisprite = transform.Find("Description").GetComponent("XUISprite") as IXUISprite;
+ IXUILabel ixuilabel = ixuisprite.gameObject.transform.Find("Text").GetComponent("XUILabel") as IXUILabel;
+ XEmblemItem xemblemItem = mainItem as XEmblemItem;
+ EmblemBasic.RowData emblemConf = XBagDocument.GetEmblemConf(xemblemItem.itemID);
+ bool flag = emblemConf != null;
+ if (flag)
+ {
+ bool flag2 = emblemConf.EmblemType <= 1000;
+ if (flag2)
+ {
+ base._SetTopFrameLabel(goToolTip, 0, XStringDefineProxy.GetString("ToolTipText_Type"), XStringDefineProxy.GetString("EMBLEM_ATTR"));
+ ixuisprite.gameObject.SetActive(false);
+ }
+ else
+ {
+ base._SetTopFrameLabel(goToolTip, 0, XStringDefineProxy.GetString("ToolTipText_Type"), XStringDefineProxy.GetString("EMBLEM_SKILL"));
+ ixuisprite.gameObject.SetActive(true);
+ ixuilabel.SetText(XEmblemDocument.GetEmblemSkillAttrString(emblemConf.EmblemID));
+ base.AppendFrame(ixuisprite.gameObject, (float)ixuisprite.spriteHeight, null);
+ }
+ }
+ else
+ {
+ base._SetTopFrameLabel(goToolTip, 0, XStringDefineProxy.GetString("ToolTipText_Type"), string.Empty);
+ }
+ IXUISprite ixuisprite2 = transform.Find("IdentifyHint").GetComponent("XUISprite") as IXUISprite;
+ bool flag3 = xemblemItem.emblemInfo.thirdslot == 1u;
+ if (flag3)
+ {
+ ixuisprite2.gameObject.SetActive(true);
+ base.AppendFrame(ixuisprite2.gameObject, (float)ixuisprite2.spriteHeight, null);
+ }
+ else
+ {
+ ixuisprite2.gameObject.SetActive(false);
+ }
+ base.SetupOtherFrame(goToolTip, mainItem, compareItem, bMain);
+ }
+
+ protected override void SetupTopFrame(GameObject goToolTip, ItemList.RowData data, bool bMain, XItem instanceData = null, XItem compareData = null)
+ {
+ base.SetupTopFrame(goToolTip, data, bMain, instanceData, compareData);
+ base._SetupType(goToolTip, data, 0);
+ base._SetupLevel(goToolTip, data, 1);
+ base._SetupProf(goToolTip, data, bMain, instanceData, 2);
+ }
+
+ protected override int SetupAttrFrame(GameObject attrFrame, AttrFrameParam param, bool bMain)
+ {
+ int num = 0;
+ IXUILabel ixuilabel = attrFrame.transform.Find("Title").GetComponent("XUILabel") as IXUILabel;
+ bool flag = !string.IsNullOrEmpty(param.Title);
+ int num2;
+ if (flag)
+ {
+ ixuilabel.SetText(param.Title);
+ ixuilabel.SetVisible(true);
+ num2 = (int)ixuilabel.gameObject.transform.localPosition.y - ixuilabel.spriteHeight;
+ }
+ else
+ {
+ ixuilabel.SetVisible(false);
+ num2 = (int)ixuilabel.gameObject.transform.localPosition.y;
+ }
+ int num3 = 0;
+ while (num3 < param.AttrList.Count && num3 < 2)
+ {
+ GameObject gameObject = base.uiBehaviour.m_AttrPool.FetchGameObject(false);
+ gameObject.transform.parent = attrFrame.transform;
+ XSingleton<XGameUI>.singleton.m_uiTool.MarkParentAsChanged(gameObject);
+ gameObject.transform.localPosition = new Vector3(base.uiBehaviour.m_AttrPool.TplPos.x, (float)(num2 + num), base.uiBehaviour.m_AttrPool.TplPos.z);
+ gameObject.transform.localScale = Vector3.one;
+ IXUILabel ixuilabel2 = gameObject.transform.Find("Text").GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel3 = gameObject.transform.Find("Value").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel2.SetText(param.AttrList[num3].strText);
+ ixuilabel3.SetText(param.AttrList[num3].strValue);
+ num -= base.uiBehaviour.m_AttrPool.TplHeight;
+ num3++;
+ }
+ IXUISprite ixuisprite = attrFrame.GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.spriteHeight = -num - num2;
+ return ixuisprite.spriteHeight;
+ }
+
+ protected override void SetAllAttrFrames(GameObject goToolTip, XAttrItem item, XAttrItem compareItem, bool bMain)
+ {
+ bool flag = item == null || item.changeAttr.Count == 0;
+ if (!flag)
+ {
+ GameObject gameObject = goToolTip.transform.Find("ScrollPanel").gameObject;
+ this.SetEmlemAttrFrame(gameObject, item, compareItem, bMain);
+ }
+ }
+
+ protected void SetEmlemAttrFrame(GameObject scrollPanel, XAttrItem item, XAttrItem compareItem, bool bMain)
+ {
+ GameObject gameObject = base.uiBehaviour.m_AttrFramePool.FetchGameObject(false);
+ gameObject.transform.parent = scrollPanel.transform;
+ this.tmpAttrFrameParam.Clear();
+ this.tmpAttrFrameParam.Title = XStringDefineProxy.GetString("TOOLTIP_BASIC_ATTR");
+ int num;
+ int endIndex;
+ XEquipCreateDocument.GetEmblemAttrDataByID((uint)item.itemID, out num, out endIndex);
+ bool flag = num >= 0;
+ if (flag)
+ {
+ for (int i = 0; i < item.changeAttr.Count; i++)
+ {
+ AttrParam item2 = default(AttrParam);
+ AttrParam.ResetSb();
+ XItemChangeAttr xitemChangeAttr = item.changeAttr[i];
+ bool flag2 = !XAttributeCommon.IsPercentRange((int)xitemChangeAttr.AttrID);
+ if (flag2)
+ {
+ AttributeEmblem.RowData rowData = XEquipCreateDocument.FindAttr(num, endIndex, i, xitemChangeAttr.AttrID);
+ bool flag3 = rowData != null;
+ if (flag3)
+ {
+ string prefixColor = XEquipCreateDocument.GetPrefixColor(rowData, xitemChangeAttr.AttrValue);
+ AttrParam.Append(xitemChangeAttr, prefixColor, prefixColor);
+ AttrParam.ValueSb.Append(" [");
+ AttrParam.ValueSb.Append(rowData.Range[0]);
+ AttrParam.ValueSb.Append(" - ");
+ AttrParam.ValueSb.Append(rowData.Range[1]);
+ AttrParam.ValueSb.Append("] ");
+ }
+ else
+ {
+ AttrParam.Append(xitemChangeAttr, "", "");
+ }
+ }
+ else
+ {
+ AttrParam.Append(xitemChangeAttr, "", "");
+ }
+ item2.SetTextFromSb();
+ item2.SetValueFromSb();
+ this.tmpAttrFrameParam.AttrList.Add(item2);
+ }
+ }
+ base.AppendFrame(gameObject, (float)this.SetupAttrFrame(gameObject, this.tmpAttrFrameParam, bMain), new Vector3?(base.uiBehaviour.m_AttrFramePool.TplPos));
+ this.SetAttrOther(scrollPanel.transform, this.tmpAttrFrameParam);
+ XSingleton<XGameUI>.singleton.m_uiTool.MarkParentAsChanged(gameObject);
+ }
+
+ protected override void SetAttrOther(Transform ParentTra, AttrFrameParam param)
+ {
+ bool flag = param.AttrList.Count <= 2;
+ if (!flag)
+ {
+ GameObject gameObject = base.uiBehaviour.m_AttrFramePool.FetchGameObject(false);
+ gameObject.transform.parent = ParentTra;
+ base.AppendFrame(gameObject, (float)this.SetAttrThird(gameObject, param), new Vector3?(base.uiBehaviour.m_AttrFramePool.TplPos));
+ }
+ }
+
+ private int SetAttrThird(GameObject attrFrame, AttrFrameParam param)
+ {
+ int num = 0;
+ IXUILabel ixuilabel = attrFrame.transform.Find("Title").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel.SetText(XStringDefineProxy.GetString("IdentifyThird"));
+ ixuilabel.SetVisible(true);
+ int num2 = (int)ixuilabel.gameObject.transform.localPosition.y - ixuilabel.spriteHeight;
+ for (int i = 2; i < param.AttrList.Count; i++)
+ {
+ GameObject gameObject = base.uiBehaviour.m_AttrPool.FetchGameObject(false);
+ gameObject.transform.parent = attrFrame.transform;
+ XSingleton<XGameUI>.singleton.m_uiTool.MarkParentAsChanged(gameObject);
+ gameObject.transform.localPosition = new Vector3(base.uiBehaviour.m_AttrPool.TplPos.x, (float)(num2 + num), base.uiBehaviour.m_AttrPool.TplPos.z);
+ gameObject.transform.localScale = Vector3.one;
+ IXUILabel ixuilabel2 = gameObject.transform.Find("Text").GetComponent("XUILabel") as IXUILabel;
+ IXUILabelSymbol ixuilabelSymbol = gameObject.transform.Find("Value").GetComponent("XUILabelSymbol") as IXUILabelSymbol;
+ bool flag = ixuilabelSymbol.gameObject.transform.localPosition.x > 230f;
+ if (flag)
+ {
+ ixuilabelSymbol.gameObject.transform.localPosition = new Vector3(120f, -13f, 0f);
+ }
+ ixuilabel2.SetText(param.AttrList[i].strText);
+ ixuilabelSymbol.InputText = param.AttrList[i].strValue;
+ num -= base.uiBehaviour.m_AttrPool.TplHeight;
+ }
+ IXUISprite ixuisprite = attrFrame.GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.spriteHeight = -num - num2;
+ return ixuisprite.spriteHeight;
+ }
+
+ protected override int _GetPPT(XItem item, bool bMain, ref string valueText)
+ {
+ XEmblemItem xemblemItem = item as XEmblemItem;
+ bool flag = xemblemItem == null;
+ int result;
+ if (flag)
+ {
+ result = -1;
+ }
+ else
+ {
+ bool bIsSkillEmblem = xemblemItem.bIsSkillEmblem;
+ if (bIsSkillEmblem)
+ {
+ SkillEmblem.RowData emblemSkillConf = XEmblemDocument.GetEmblemSkillConf((uint)xemblemItem.itemID);
+ bool flag2 = emblemSkillConf == null;
+ if (flag2)
+ {
+ valueText = "SKILL EMBLEM.";
+ result = -1;
+ }
+ else
+ {
+ valueText = emblemSkillConf.SkillPPT.ToString();
+ result = (int)emblemSkillConf.SkillPPT;
+ }
+ }
+ else
+ {
+ XAttributes attributes = bMain ? XSingleton<TooltipParam>.singleton.mainAttributes : XSingleton<TooltipParam>.singleton.compareAttributes;
+ bool flag3 = xemblemItem.emblemInfo.thirdslot == 1u || xemblemItem.emblemInfo.thirdslot == 10u;
+ if (flag3)
+ {
+ int num;
+ int endIndex;
+ XEquipCreateDocument.GetEmblemAttrDataByID((uint)item.itemID, out num, out endIndex);
+ bool flag4 = num >= 0;
+ if (flag4)
+ {
+ bool flag5 = xemblemItem.emblemInfo.thirdslot == 1u;
+ uint num2;
+ uint num3;
+ if (flag5)
+ {
+ uint ppt = xemblemItem.GetPPT(attributes);
+ XEquipCreateDocument.GetRandomPPT(num, endIndex, out num2, out num3);
+ }
+ else
+ {
+ XEquipCreateDocument.GetPPT(num, endIndex, false, true, out num2, out num3);
+ }
+ valueText = string.Format("{0} - {1}", num2, num3);
+ }
+ result = -1;
+ }
+ else
+ {
+ uint ppt = xemblemItem.GetPPT(attributes);
+ valueText = xemblemItem.GetPPT(attributes).ToString();
+ result = (int)ppt;
+ }
+ }
+ }
+ return result;
+ }
+
+ protected override void SetupToolTipButtons(GameObject goToolTip, XItem item, bool bMain)
+ {
+ base.SetupToolTipButtons(goToolTip, item, bMain);
+ bool flag = !this.bShowButtons;
+ if (!flag)
+ {
+ XEmblemItem xemblemItem = item as XEmblemItem;
+ if (bMain)
+ {
+ bool flag2 = XSingleton<XGame>.singleton.Doc.XBagDoc.EmblemBag.HasItem(item.uid);
+ if (flag2)
+ {
+ base._SetupButtonVisiability(goToolTip, 1, item);
+ }
+ else
+ {
+ base._SetupButtonVisiability(goToolTip, 0, item);
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/EmblemTooltipDlg.cs.meta b/Client/Assets/Scripts/XMainClient/UI/EmblemTooltipDlg.cs.meta
new file mode 100644
index 00000000..0049a563
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/EmblemTooltipDlg.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 15102da85de58214fa4da2c35697a9eb
+timeCreated: 1611403261
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/EmblemTooltipDlgBehaviour.cs b/Client/Assets/Scripts/XMainClient/UI/EmblemTooltipDlgBehaviour.cs
new file mode 100644
index 00000000..113148a0
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/EmblemTooltipDlgBehaviour.cs
@@ -0,0 +1,8 @@
+using System;
+
+namespace XMainClient.UI
+{
+ internal class EmblemTooltipDlgBehaviour : TooltipDlgBehaviour
+ {
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/EmblemTooltipDlgBehaviour.cs.meta b/Client/Assets/Scripts/XMainClient/UI/EmblemTooltipDlgBehaviour.cs.meta
new file mode 100644
index 00000000..314b3eb7
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/EmblemTooltipDlgBehaviour.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: d86499bf6ee41e3458f0c88ad396ad0d
+timeCreated: 1611404639
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/EmblemTotalAttributeView.cs b/Client/Assets/Scripts/XMainClient/UI/EmblemTotalAttributeView.cs
new file mode 100644
index 00000000..51768e49
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/EmblemTotalAttributeView.cs
@@ -0,0 +1,179 @@
+using System;
+using System.Collections.Generic;
+using UILib;
+using UnityEngine;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class EmblemTotalAttributeView : DlgHandlerBase
+ {
+ protected override string FileName
+ {
+ get
+ {
+ return "ItemNew/TotalAttribute";
+ }
+ }
+
+ private XEmblemDocument m_doc;
+
+ private GameObject _HadGo;
+
+ private GameObject _NoGo;
+
+ public IXUISprite m_closedBtn;
+
+ public XUIPool m_AttriPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ public XUIPool m_SkillPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ public XUIPool m_TittlePool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ protected override void Init()
+ {
+ base.Init();
+ this.m_doc = XDocuments.GetSpecificDocument<XEmblemDocument>(XEmblemDocument.uuID);
+ this.m_closedBtn = (base.PanelObject.transform.Find("ClisedSpr").GetComponent("XUISprite") as IXUISprite);
+ this.m_closedBtn.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnClickClosedBtn));
+ this._HadGo = base.PanelObject.transform.Find("HadEmblem").gameObject;
+ this._NoGo = base.PanelObject.transform.Find("NoEmblem").gameObject;
+ Transform transform = this._HadGo.transform.Find("Grid");
+ this.m_AttriPool.SetupPool(transform.gameObject, this._HadGo.transform.Find("AttriItem").gameObject, 2u, false);
+ this.m_SkillPool.SetupPool(transform.gameObject, this._HadGo.transform.Find("SkillItem").gameObject, 2u, false);
+ this.m_TittlePool.SetupPool(transform.gameObject, this._HadGo.transform.Find("TittleItem").gameObject, 2u, false);
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ this.FillContent();
+ }
+
+ public override void OnUnload()
+ {
+ base.OnUnload();
+ }
+
+ private void FillContent()
+ {
+ this._HadGo.SetActive(false);
+ this._NoGo.SetActive(false);
+ bool isEquipEmblem = this.m_doc.IsEquipEmblem;
+ if (isEquipEmblem)
+ {
+ this.FillHadContent();
+ }
+ else
+ {
+ this.FillNoContent();
+ }
+ }
+
+ private void FillHadContent()
+ {
+ this._HadGo.SetActive(true);
+ this.m_AttriPool.ReturnAll(false);
+ this.m_TittlePool.ReturnAll(false);
+ this.m_SkillPool.ReturnAll(false);
+ List<ShowAttriData> list = new List<ShowAttriData>();
+ List<ShowAttriData> list2 = new List<ShowAttriData>();
+ List<ShowAttriData> list3 = new List<ShowAttriData>();
+ this.GetData(ref list, ref list2, ref list3);
+ int num = 0;
+ GameObject gameObject = this.m_TittlePool.FetchGameObject(false);
+ gameObject.transform.localPosition = new Vector3(0f, (float)(-(float)num), 0f);
+ IXUILabel ixuilabel = gameObject.transform.Find("Tittle").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel.SetText(XStringDefineProxy.GetString("EmblemAttriTittle"));
+ num += this.m_TittlePool.TplHeight;
+ for (int i = 0; i < list.Count; i++)
+ {
+ gameObject = this.m_AttriPool.FetchGameObject(false);
+ gameObject.transform.localPosition = new Vector3(0f, (float)(-(float)num), 0f);
+ ixuilabel = (gameObject.transform.Find("Name").GetComponent("XUILabel") as IXUILabel);
+ ixuilabel.SetText(list[i].Name);
+ ixuilabel = (gameObject.transform.Find("Num").GetComponent("XUILabel") as IXUILabel);
+ ixuilabel.SetText(list[i].NumStr);
+ num += this.m_AttriPool.TplHeight;
+ }
+ num += 20;
+ for (int j = 0; j < list2.Count; j++)
+ {
+ gameObject = this.m_AttriPool.FetchGameObject(false);
+ gameObject.transform.localPosition = new Vector3(0f, (float)(-(float)num), 0f);
+ ixuilabel = (gameObject.transform.Find("Name").GetComponent("XUILabel") as IXUILabel);
+ ixuilabel.SetText(list2[j].Name);
+ ixuilabel = (gameObject.transform.Find("Num").GetComponent("XUILabel") as IXUILabel);
+ ixuilabel.SetText(list2[j].NumStr);
+ num += this.m_AttriPool.TplHeight;
+ }
+ bool flag = list3.Count <= 0;
+ if (!flag)
+ {
+ num += 30;
+ gameObject = this.m_TittlePool.FetchGameObject(false);
+ gameObject.transform.localPosition = new Vector3(0f, (float)(-(float)num), 0f);
+ ixuilabel = (gameObject.transform.Find("Tittle").GetComponent("XUILabel") as IXUILabel);
+ ixuilabel.SetText(XStringDefineProxy.GetString("EmblemSkillTittle"));
+ num += this.m_TittlePool.TplHeight;
+ for (int k = 0; k < list3.Count; k++)
+ {
+ gameObject = this.m_SkillPool.FetchGameObject(false);
+ gameObject.transform.localPosition = new Vector3(0f, (float)(-(float)num), 0f);
+ ixuilabel = (gameObject.transform.Find("Level").GetComponent("XUILabel") as IXUILabel);
+ ixuilabel.SetText(list3[k].NeedLevelStr);
+ ixuilabel = (gameObject.transform.Find("SkillName").GetComponent("XUILabel") as IXUILabel);
+ ixuilabel.SetText(list3[k].SkillDes);
+ num += this.m_SkillPool.TplHeight;
+ }
+ }
+ }
+
+ private void GetData(ref List<ShowAttriData> lst1, ref List<ShowAttriData> lst2, ref List<ShowAttriData> lst3)
+ {
+ List<ShowAttriData> list = this.m_doc.AttriDataList();
+ for (int i = 0; i < list.Count; i++)
+ {
+ bool flag = list[i].TypeID == 1u;
+ if (flag)
+ {
+ lst1.Add(list[i]);
+ }
+ else
+ {
+ bool flag2 = list[i].TypeID == 2u;
+ if (flag2)
+ {
+ lst2.Add(list[i]);
+ }
+ else
+ {
+ bool flag3 = list[i].TypeID == 3u;
+ if (flag3)
+ {
+ lst3.Add(list[i]);
+ }
+ }
+ }
+ }
+ }
+
+ private void FillNoContent()
+ {
+ this._NoGo.SetActive(true);
+ IXUILabel ixuilabel = this._NoGo.transform.Find("Tittle1").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel.SetText(XStringDefineProxy.GetString("EmblemAttriTittle"));
+ ixuilabel = (this._NoGo.transform.Find("Content1").GetComponent("XUILabel") as IXUILabel);
+ ixuilabel.SetText(XStringDefineProxy.GetString("EmblemAttriDes"));
+ ixuilabel = (this._NoGo.transform.Find("Tittle2").GetComponent("XUILabel") as IXUILabel);
+ ixuilabel.SetText(XStringDefineProxy.GetString("EmblemSkillTittle"));
+ ixuilabel = (this._NoGo.transform.Find("Content2").GetComponent("XUILabel") as IXUILabel);
+ ixuilabel.SetText(XStringDefineProxy.GetString("EmblemSkillDes"));
+ }
+
+ private void OnClickClosedBtn(IXUISprite spr)
+ {
+ base.SetVisible(false);
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/EmblemTotalAttributeView.cs.meta b/Client/Assets/Scripts/XMainClient/UI/EmblemTotalAttributeView.cs.meta
new file mode 100644
index 00000000..dd3d98de
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/EmblemTotalAttributeView.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: a4a5652c36c14d94ba3b106af241a5d7
+timeCreated: 1611404283
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/EnchantActiveHandler.cs b/Client/Assets/Scripts/XMainClient/UI/EnchantActiveHandler.cs
new file mode 100644
index 00000000..9074b47d
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/EnchantActiveHandler.cs
@@ -0,0 +1,194 @@
+using System;
+using System.Collections.Generic;
+using UILib;
+using UnityEngine;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class EnchantActiveHandler : DlgHandlerBase
+ {
+ protected override string FileName
+ {
+ get
+ {
+ return "ItemNew/EnchantActivationPanel";
+ }
+ }
+
+ private XEnchantDocument _doc = null;
+
+ private IXUIWrapContent _wrapContent;
+
+ private IXUIScrollView _scrollView;
+
+ private uint _curSelectedAttribute;
+
+ private XEnchantInfo _curEnchantInfo;
+
+ private GameObject _uiEquipItem;
+
+ private GameObject _emptyTag;
+
+ protected override void Init()
+ {
+ base.Init();
+ this.InitProperties();
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ this.RefreshData();
+ }
+
+ protected override void OnHide()
+ {
+ base.OnHide();
+ }
+
+ public override void OnUnload()
+ {
+ this._doc._EnchantActiveHandler = null;
+ base.OnUnload();
+ }
+
+ public override void StackRefresh()
+ {
+ base.StackRefresh();
+ this.RefreshData();
+ }
+
+ public override void RefreshData()
+ {
+ base.RefreshData();
+ XEquipItem xequipItem = XSingleton<XGame>.singleton.Doc.XBagDoc.GetItemByUID(this._doc.SelectedEquipUID) as XEquipItem;
+ bool flag = xequipItem == null;
+ if (!flag)
+ {
+ this._curSelectedAttribute = xequipItem.enchantInfo.ChooseAttr;
+ this._curEnchantInfo = xequipItem.enchantInfo;
+ this._wrapContent.SetContentCount(this._curEnchantInfo.AttrList.Count, false);
+ this._scrollView.ResetPosition();
+ this._emptyTag.SetActive(this._curEnchantInfo.AttrList.Count == 0);
+ XSingleton<XItemDrawerMgr>.singleton.DrawItem(this._uiEquipItem, xequipItem);
+ }
+ }
+
+ private void SetChooseAttrItem()
+ {
+ List<GameObject> list = new List<GameObject>();
+ this._wrapContent.GetActiveList(list);
+ for (int i = 0; i < list.Count; i++)
+ {
+ IXUICheckBox ixuicheckBox = list[i].GetComponent("XUICheckBox") as IXUICheckBox;
+ bool flag = ixuicheckBox.ID == (ulong)this._curEnchantInfo.ChooseAttr;
+ if (flag)
+ {
+ ixuicheckBox.bChecked = true;
+ break;
+ }
+ }
+ }
+
+ private void InitProperties()
+ {
+ this._doc = XDocuments.GetSpecificDocument<XEnchantDocument>(XEnchantDocument.uuID);
+ this._doc._EnchantActiveHandler = this;
+ this._scrollView = (base.transform.Find("BagPanel").GetComponent("XUIScrollView") as IXUIScrollView);
+ this._wrapContent = (base.transform.Find("BagPanel/WrapContent").GetComponent("XUIWrapContent") as IXUIWrapContent);
+ this._wrapContent.RegisterItemInitEventHandler(new WrapItemInitEventHandler(this.WrapContentInit));
+ this._wrapContent.RegisterItemUpdateEventHandler(new WrapItemUpdateEventHandler(this.WrapContentUpdate));
+ IXUIButton ixuibutton = base.transform.Find("BtnOk").GetComponent("XUIButton") as IXUIButton;
+ ixuibutton.RegisterClickEventHandler(new ButtonClickEventHandler(this.ConfirmActiveAttribute));
+ this._uiEquipItem = base.transform.Find("Top/EquipItem").gameObject;
+ IXUISprite ixuisprite = this._uiEquipItem.transform.Find("Icon").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this._OnEquipIconClicked));
+ IXUISprite ixuisprite2 = base.transform.Find("Close").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite2.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnClose));
+ this._emptyTag = base.transform.Find("Empty").gameObject;
+ }
+
+ private void OnClose(IXUISprite uiSprite)
+ {
+ base.SetVisible(false);
+ }
+
+ private bool ConfirmActiveAttribute(IXUIButton button)
+ {
+ bool flag = this._curSelectedAttribute == 0u || this._curSelectedAttribute == this._curEnchantInfo.ChooseAttr;
+ bool result;
+ if (flag)
+ {
+ result = true;
+ }
+ else
+ {
+ this._doc.SendEnchantActiveAttribute(this._curSelectedAttribute);
+ result = true;
+ }
+ return result;
+ }
+
+ private void _OnEquipIconClicked(IXUISprite iSp)
+ {
+ XSingleton<UiUtility>.singleton.ShowTooltipDialog(XSingleton<XGame>.singleton.Doc.XBagDoc.GetItemByUID(this._doc.SelectedEquipUID), null, iSp, false, 0u);
+ }
+
+ private void WrapContentUpdate(Transform itemTransform, int index)
+ {
+ bool flag = index >= this._curEnchantInfo.AttrList.Count;
+ if (!flag)
+ {
+ XItemChangeAttr xitemChangeAttr = this._curEnchantInfo.AttrList[index];
+ uint attrID = xitemChangeAttr.AttrID;
+ uint attrValue = xitemChangeAttr.AttrValue;
+ IXUICheckBox ixuicheckBox = itemTransform.GetComponent("XUICheckBox") as IXUICheckBox;
+ ixuicheckBox.ID = (ulong)attrID;
+ IXUILabel ixuilabel = itemTransform.Find("Attr").GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel2 = itemTransform.Find("Attr/Value").GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel3 = itemTransform.Find("PPT").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel.SetText(XAttributeCommon.GetAttrStr((int)attrID));
+ ixuilabel2.SetText("+" + attrValue);
+ bool flag2 = this._curSelectedAttribute == attrID;
+ if (flag2)
+ {
+ ixuicheckBox.bChecked = true;
+ }
+ else
+ {
+ ixuicheckBox.ForceSetFlag(false);
+ }
+ double ppt = XSingleton<XPowerPointCalculator>.singleton.GetPPT(attrID, attrValue, null, -1);
+ ixuilabel3.SetText(((int)ppt).ToString());
+ }
+ }
+
+ private void WrapContentInit(Transform itemTransform, int index)
+ {
+ IXUICheckBox ixuicheckBox = itemTransform.GetComponent("XUICheckBox") as IXUICheckBox;
+ ixuicheckBox.RegisterOnCheckEventHandler(new CheckBoxOnCheckEventHandler(this.OnSelectAttributeItem));
+ }
+
+ private bool OnSelectAttributeItem(IXUICheckBox iXUICheckBox)
+ {
+ bool flag = !iXUICheckBox.bChecked;
+ bool result;
+ if (flag)
+ {
+ result = false;
+ }
+ else
+ {
+ this._curSelectedAttribute = (uint)iXUICheckBox.ID;
+ result = true;
+ }
+ return result;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/EnchantActiveHandler.cs.meta b/Client/Assets/Scripts/XMainClient/UI/EnchantActiveHandler.cs.meta
new file mode 100644
index 00000000..b7f0c00c
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/EnchantActiveHandler.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 5d679026e0d15eb438d22521355344ce
+timeCreated: 1611403805
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/EnchantAttrPreviewHandler.cs b/Client/Assets/Scripts/XMainClient/UI/EnchantAttrPreviewHandler.cs
new file mode 100644
index 00000000..c664c6ff
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/EnchantAttrPreviewHandler.cs
@@ -0,0 +1,89 @@
+using System;
+using UILib;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class EnchantAttrPreviewHandler : DlgHandlerBase
+ {
+ private XEnchantDocument _doc = null;
+
+ private IXUISprite m_Close;
+
+ private IXUILabel m_AttrName;
+
+ private IXUILabel m_AttrValue;
+
+ private EnchantEquip.RowData m_Data;
+
+ protected override void Init()
+ {
+ base.Init();
+ this._doc = XDocuments.GetSpecificDocument<XEnchantDocument>(XEnchantDocument.uuID);
+ this.m_Close = (base.PanelObject.transform.Find("Close").GetComponent("XUISprite") as IXUISprite);
+ this.m_AttrName = (base.PanelObject.transform.Find("Detail/AttrName").GetComponent("XUILabel") as IXUILabel);
+ this.m_AttrValue = (base.PanelObject.transform.Find("Detail/AttrValue").GetComponent("XUILabel") as IXUILabel);
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ this.m_Close.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this._OnCloseClicked));
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ this.RefreshData();
+ }
+
+ public override void RefreshData()
+ {
+ base.RefreshData();
+ bool flag = this.m_Data == null;
+ if (!flag)
+ {
+ XPrefixAttributes enchantAttrs = this._doc.GetEnchantAttrs(this.m_Data.EnchantID);
+ bool flag2 = enchantAttrs == null;
+ if (!flag2)
+ {
+ XSingleton<XCommon>.singleton.shareSB.Length = 0;
+ for (int i = 0; i < enchantAttrs.AttributeList.Count; i++)
+ {
+ XSingleton<XCommon>.singleton.shareSB.Append(XAttributeCommon.GetAttrStr((int)enchantAttrs.AttributeList[i].attrid));
+ XSingleton<XCommon>.singleton.shareSB.Append('\n');
+ }
+ this.m_AttrName.SetText(XSingleton<XCommon>.singleton.shareSB.ToString());
+ XSingleton<XCommon>.singleton.shareSB.Length = 0;
+ for (int j = 0; j < enchantAttrs.AttributeList.Count; j++)
+ {
+ XSingleton<XCommon>.singleton.shareSB.Append(XAttributeCommon.GetAttrValueStr(enchantAttrs.AttributeList[j].attrid, (uint)enchantAttrs.AttributeList[j].minValue, true));
+ XSingleton<XCommon>.singleton.shareSB.Append('~');
+ XSingleton<XCommon>.singleton.shareSB.Append(XAttributeCommon.GetAttrValueStr(enchantAttrs.AttributeList[j].attrid, (uint)enchantAttrs.AttributeList[j].maxValue, false));
+ XSingleton<XCommon>.singleton.shareSB.Append('\n');
+ }
+ this.m_AttrValue.SetText(XSingleton<XCommon>.singleton.shareSB.ToString());
+ }
+ }
+ }
+
+ private void _OnCloseClicked(IXUISprite iSp)
+ {
+ base.SetVisible(false);
+ }
+
+ public void Show(int itemid)
+ {
+ this.m_Data = this._doc.GetEnchantEquipData(itemid);
+ bool flag = this.m_Data == null;
+ if (flag)
+ {
+ XSingleton<XDebug>.singleton.AddErrorLog("Cant find enchant item config: " + itemid, null, null, null, null, null);
+ }
+ else
+ {
+ base.SetVisible(true);
+ }
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/EnchantAttrPreviewHandler.cs.meta b/Client/Assets/Scripts/XMainClient/UI/EnchantAttrPreviewHandler.cs.meta
new file mode 100644
index 00000000..4ae9c269
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/EnchantAttrPreviewHandler.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: bd4a77338ced97f4bb195e66a5d12cfe
+timeCreated: 1611404450
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/EnchantBagHandler.cs b/Client/Assets/Scripts/XMainClient/UI/EnchantBagHandler.cs
new file mode 100644
index 00000000..5281d425
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/EnchantBagHandler.cs
@@ -0,0 +1,152 @@
+using System;
+using UILib;
+using UnityEngine;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class EnchantBagHandler : DlgHandlerBase
+ {
+ protected override string FileName
+ {
+ get
+ {
+ return "ItemNew/EnchantListPanel";
+ }
+ }
+
+ private XEnchantDocument _doc = null;
+
+ private IXUIWrapContent m_WrapContent;
+
+ private IXUIScrollView m_ScrollView;
+
+ private IXUISprite m_Close;
+
+ private IXUIButton m_BtnObtain;
+
+ private GameObject m_Empty;
+
+ protected override void Init()
+ {
+ base.Init();
+ this._doc = XDocuments.GetSpecificDocument<XEnchantDocument>(XEnchantDocument.uuID);
+ this._doc._EnchantBagHandler = this;
+ this.m_WrapContent = (base.PanelObject.transform.Find("BagPanel/WrapContent").GetComponent("XUIWrapContent") as IXUIWrapContent);
+ this.m_ScrollView = (base.PanelObject.transform.Find("BagPanel").GetComponent("XUIScrollView") as IXUIScrollView);
+ this.m_Close = (base.PanelObject.transform.Find("Close").GetComponent("XUISprite") as IXUISprite);
+ this.m_BtnObtain = (base.PanelObject.transform.Find("Empty/BtnObtain").GetComponent("XUIButton") as IXUIButton);
+ this.m_Empty = base.PanelObject.transform.Find("Empty").gameObject;
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ this.m_WrapContent.RegisterItemUpdateEventHandler(new WrapItemUpdateEventHandler(this._OnBagWrapContentUpdated));
+ this.m_Close.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this._OnCloseClicked));
+ this.m_BtnObtain.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnObtainClicked));
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ this.RefreshData();
+ }
+
+ protected override void OnHide()
+ {
+ base.OnHide();
+ }
+
+ public override void OnUnload()
+ {
+ this._doc._EnchantBagHandler = null;
+ base.OnUnload();
+ }
+
+ public override void StackRefresh()
+ {
+ base.StackRefresh();
+ this.RefreshData();
+ }
+
+ public override void RefreshData()
+ {
+ base.RefreshData();
+ this._doc.GetEnchantItems();
+ this.m_WrapContent.SetContentCount(this._doc.ItemList.Count, false);
+ this.m_Empty.SetActive(this._doc.ItemList.Count == 0);
+ this.m_ScrollView.ResetPosition();
+ }
+
+ private void _OnBagWrapContentUpdated(Transform t, int index)
+ {
+ bool flag = index < 0 || index >= this._doc.ItemList.Count;
+ if (!flag)
+ {
+ IXUILabel ixuilabel = t.Find("AttrName").GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel2 = t.Find("AttrValue").GetComponent("XUILabel") as IXUILabel;
+ GameObject gameObject = t.Find("ItemTpl").gameObject;
+ XSingleton<XItemDrawerMgr>.singleton.DrawItem(gameObject, this._doc.ItemList[index]);
+ IXUISprite ixuisprite = t.GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.ID = (ulong)((long)index);
+ ixuisprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this._OnItemClicked));
+ }
+ }
+
+ private void _OnCloseClicked(IXUISprite iSp)
+ {
+ base.SetVisible(false);
+ }
+
+ private void _OnItemClicked(IXUISprite iSp)
+ {
+ int num = (int)iSp.ID;
+ bool flag = num < 0 || num >= this._doc.ItemList.Count;
+ if (!flag)
+ {
+ XItem xitem = this._doc.ItemList[num];
+ EnchantEquip.RowData enchantEquipData = this._doc.GetEnchantEquipData(xitem.itemID);
+ EnchantCheckResult enchantCheckResult = this._doc.CanEnchant(enchantEquipData);
+ bool flag2 = enchantCheckResult == EnchantCheckResult.ECR_OK;
+ if (flag2)
+ {
+ this._doc.SelectEnchantItem(xitem.itemID);
+ }
+ else
+ {
+ bool flag3 = xitem.itemConf != null;
+ if (flag3)
+ {
+ EnchantCheckResult enchantCheckResult2 = enchantCheckResult;
+ if (enchantCheckResult2 != EnchantCheckResult.ECR_ITEM_TOO_LOW)
+ {
+ if (enchantCheckResult2 == EnchantCheckResult.ECR_ITEM_TOO_HIGH)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString("EnchantIntervalRequired", new object[]
+ {
+ xitem.itemConf.ReqLevel,
+ XEnchantDocument.EnchantNeedLevel[(int)enchantEquipData.EnchantLevel]
+ }), "fece00");
+ }
+ }
+ else
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString("EnchantMaxLevelRequired", new object[]
+ {
+ xitem.itemConf.ReqLevel,
+ xitem.itemConf.ReqLevel
+ }), "fece00");
+ }
+ }
+ }
+ }
+ }
+
+ private bool OnObtainClicked(IXUIButton btn)
+ {
+ XSingleton<UiUtility>.singleton.ShowItemAccess(240, null);
+ return true;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/EnchantBagHandler.cs.meta b/Client/Assets/Scripts/XMainClient/UI/EnchantBagHandler.cs.meta
new file mode 100644
index 00000000..fad472b0
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/EnchantBagHandler.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 396a08bd9bca2714f9ddc8f7a9ed1236
+timeCreated: 1611403592
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/EnchantOperateHandler.cs b/Client/Assets/Scripts/XMainClient/UI/EnchantOperateHandler.cs
new file mode 100644
index 00000000..62eb0ee7
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/EnchantOperateHandler.cs
@@ -0,0 +1,528 @@
+using System;
+using System.Collections.Generic;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class EnchantOperateHandler : DlgHandlerBase
+ {
+ protected override string FileName
+ {
+ get
+ {
+ return "ItemNew/EnchantFrame";
+ }
+ }
+
+ private XEnchantDocument _doc = null;
+
+ private EnchantBagHandler _BagHandler = null;
+
+ private EnchantAttrPreviewHandler _PreviewHandler = null;
+
+ private EnchantActiveHandler _activeHandler = null;
+
+ private EnchantResultHandler _resultHandler = null;
+
+ private GameObject m_uiOperateFrame;
+
+ private GameObject m_uiSelectFrame;
+
+ private GameObject m_uiEquipItem;
+
+ private GameObject m_uiEnchantItem;
+
+ private IXUIButton m_BtnOK;
+
+ private IXUIButton m_BtnClose;
+
+ private IXUIButton m_BtnHelp;
+
+ private IXUILabel m_tipsLab;
+
+ private GameObject m_uiNoBeforeAttr;
+
+ private IXUILabel m_uiCostValue;
+
+ private IXUISprite m_uiCostIcon;
+
+ private IXUISprite m_uiSelect;
+
+ private IXUISprite m_uiPreview;
+
+ private IXUISprite m_uiActiveAttribute;
+
+ private IXUIWrapContent _curEnchantPropertiesContent;
+
+ private IXUIScrollView _scrollView;
+
+ private XItemRequiredCollector m_ItemRequiredCollector = new XItemRequiredCollector();
+
+ private List<int> m_RedPointEquipPosList = new List<int>();
+
+ private XEnchantInfo _curEnchantInfo;
+
+ protected override void Init()
+ {
+ base.Init();
+ this._doc = XDocuments.GetSpecificDocument<XEnchantDocument>(XEnchantDocument.uuID);
+ this._doc._EnchantOperateHandler = this;
+ this.m_tipsLab = (base.PanelObject.transform.Find("Bg/AttrTip/T2").GetComponent("XUILabel") as IXUILabel);
+ this.m_BtnClose = (base.PanelObject.transform.Find("Bg/Close").GetComponent("XUIButton") as IXUIButton);
+ this.m_BtnHelp = (base.PanelObject.transform.Find("Bg/Help").GetComponent("XUIButton") as IXUIButton);
+ this.m_uiOperateFrame = base.PanelObject.transform.Find("Bg/OperateFrame").gameObject;
+ this.m_uiSelectFrame = base.PanelObject.transform.Find("Bg/SelectFrame").gameObject;
+ this.m_uiSelect = (this.m_uiSelectFrame.transform.Find("Select").GetComponent("XUISprite") as IXUISprite);
+ this.m_uiPreview = (this.m_uiOperateFrame.transform.Find("Preview").GetComponent("XUISprite") as IXUISprite);
+ this.m_uiActiveAttribute = (base.transform.Find("Bg/BtnActivation").GetComponent("XUISprite") as IXUISprite);
+ this.m_uiEquipItem = base.PanelObject.transform.Find("Bg/Top/EquipItem").gameObject;
+ this.m_uiEnchantItem = this.m_uiOperateFrame.transform.Find("EnchantItem").gameObject;
+ this.m_BtnOK = (base.transform.Find("Bg/BtnOK").GetComponent("XUIButton") as IXUIButton);
+ this.m_uiCostValue = (this.m_uiOperateFrame.transform.Find("Bottom/Cost").GetComponent("XUILabel") as IXUILabel);
+ this.m_uiCostIcon = (this.m_uiOperateFrame.transform.Find("Bottom/Cost/Icon").GetComponent("XUISprite") as IXUISprite);
+ this.m_uiNoBeforeAttr = base.transform.Find("Bg/Enchant/NoBeforeAttr").gameObject;
+ this._curEnchantPropertiesContent = (base.transform.Find("Bg/Enchant/CurEnchantList").GetComponent("XUIWrapContent") as IXUIWrapContent);
+ this._scrollView = (base.transform.Find("Bg/Enchant").GetComponent("XUIScrollView") as IXUIScrollView);
+ this.m_tipsLab.SetText(XSingleton<UiUtility>.singleton.ReplaceReturn(XSingleton<XStringTable>.singleton.GetString("EnchantNewTip")));
+ DlgHandlerBase.EnsureCreate<EnchantBagHandler>(ref this._BagHandler, base.PanelObject.transform, false, this);
+ DlgHandlerBase.EnsureCreate<EnchantAttrPreviewHandler>(ref this._PreviewHandler, base.PanelObject.transform.Find("Bg/AttrPanel").gameObject, this, false);
+ DlgHandlerBase.EnsureCreate<EnchantActiveHandler>(ref this._activeHandler, base.PanelObject.transform, false, this);
+ DlgHandlerBase.EnsureCreate<EnchantResultHandler>(ref this._resultHandler, base.PanelObject.transform, false, this);
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ this.m_BtnOK.RegisterClickEventHandler(new ButtonClickEventHandler(this._OnOKClicked));
+ this.m_BtnClose.RegisterClickEventHandler(new ButtonClickEventHandler(this._OnCloseClicked));
+ this.m_uiSelect.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this._OnEnchantItemClicked));
+ this.m_BtnHelp.RegisterClickEventHandler(new ButtonClickEventHandler(this._OnHelpClicked));
+ this.m_uiPreview.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this._OnPreviewClicked));
+ this.m_uiActiveAttribute.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this._OnToActiveEnchantAttribute));
+ IXUISprite ixuisprite = this.m_uiEquipItem.transform.Find("Icon").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this._OnEquipIconClicked));
+ IXUISprite ixuisprite2 = this.m_uiEnchantItem.transform.Find("Icon").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite2.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this._OnEnchantItemClicked));
+ this._curEnchantPropertiesContent.RegisterItemUpdateEventHandler(new WrapItemUpdateEventHandler(this.EnchantListUpdate));
+ }
+
+ private void EnchantListUpdate(Transform itemTransform, int index)
+ {
+ bool flag = index < this._curEnchantInfo.AttrList.Count;
+ if (flag)
+ {
+ XItemChangeAttr xitemChangeAttr = this._curEnchantInfo.AttrList[index];
+ IXUISprite ixuisprite = itemTransform.Find("Sprite").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.SetVisible(this._curEnchantInfo.ChooseAttr == xitemChangeAttr.AttrID);
+ IXUILabel ixuilabel = itemTransform.Find("Value").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel.SetText("+" + xitemChangeAttr.AttrValue);
+ IXUILabel ixuilabel2 = itemTransform.GetComponent("XUILabel") as IXUILabel;
+ ixuilabel2.SetText(XAttributeCommon.GetAttrStr((int)xitemChangeAttr.AttrID));
+ IXUILabel ixuilabel3 = itemTransform.Find("AfterAttr").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel3.SetText("");
+ EnchantEquip.RowData enchantEquipData = this._doc.GetEnchantEquipData(this._doc.SelectedItemID);
+ bool flag2 = false;
+ bool flag3 = enchantEquipData != null;
+ if (flag3)
+ {
+ for (int i = 0; i < (int)enchantEquipData.Attribute.count; i++)
+ {
+ bool flag4 = enchantEquipData.Attribute[i, 0] == xitemChangeAttr.AttrID;
+ if (flag4)
+ {
+ ixuilabel3.SetText(string.Concat(new object[]
+ {
+ "[",
+ enchantEquipData.Attribute[i, 1],
+ ",",
+ enchantEquipData.Attribute[i, 2],
+ "]"
+ }));
+ flag2 = true;
+ break;
+ }
+ }
+ }
+ bool flag5 = !flag2 && !this.m_uiSelectFrame.activeInHierarchy;
+ if (flag5)
+ {
+ ixuilabel3.SetText(XSingleton<XStringTable>.singleton.GetString("CurEnchantNoAttr"));
+ }
+ }
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ bool flag = DlgBase<ItemSystemDlg, TabDlgBehaviour>.singleton._equipHandler != null;
+ if (flag)
+ {
+ DlgBase<ItemSystemDlg, TabDlgBehaviour>.singleton._equipHandler.RegisterItemClickEvents(new SpriteClickEventHandler(this._OnEquipClicked));
+ }
+ bool flag2 = this._BagHandler.IsVisible();
+ if (flag2)
+ {
+ this._BagHandler.SetVisible(false);
+ }
+ bool flag3 = this._PreviewHandler.IsVisible();
+ if (flag3)
+ {
+ this._PreviewHandler.SetVisible(false);
+ }
+ bool flag4 = this._activeHandler.IsVisible();
+ if (flag4)
+ {
+ this._activeHandler.SetVisible(false);
+ }
+ bool flag5 = this._resultHandler.IsVisible();
+ if (flag5)
+ {
+ this._resultHandler.SetVisible(false);
+ }
+ this.UpdateShowingItems();
+ this.RefreshData();
+ }
+
+ public override void StackRefresh()
+ {
+ base.StackRefresh();
+ this.RefreshData();
+ bool flag = this._BagHandler != null && this._BagHandler.IsVisible();
+ if (flag)
+ {
+ this._BagHandler.StackRefresh();
+ }
+ bool flag2 = DlgBase<ItemSystemDlg, TabDlgBehaviour>.singleton._equipHandler != null;
+ if (flag2)
+ {
+ DlgBase<ItemSystemDlg, TabDlgBehaviour>.singleton._equipHandler.RegisterItemClickEvents(new SpriteClickEventHandler(this._OnEquipClicked));
+ }
+ }
+
+ protected override void OnHide()
+ {
+ this._doc.ToggleBlock(false);
+ this._KillTimer();
+ DlgBase<ItemSystemDlg, TabDlgBehaviour>.singleton.OnPopHandlerSetVisible(false, null);
+ DlgBase<ItemSystemDlg, TabDlgBehaviour>.singleton.StackRefresh();
+ bool flag = DlgBase<ItemSystemDlg, TabDlgBehaviour>.singleton._equipHandler != null;
+ if (flag)
+ {
+ DlgBase<ItemSystemDlg, TabDlgBehaviour>.singleton._equipHandler.RegisterItemClickEvents(null);
+ DlgBase<ItemSystemDlg, TabDlgBehaviour>.singleton._equipHandler.SelectEquip(0UL);
+ }
+ base.OnHide();
+ }
+
+ public override void OnUnload()
+ {
+ DlgHandlerBase.EnsureUnload<EnchantBagHandler>(ref this._BagHandler);
+ DlgHandlerBase.EnsureUnload<EnchantAttrPreviewHandler>(ref this._PreviewHandler);
+ DlgHandlerBase.EnsureUnload<EnchantResultHandler>(ref this._resultHandler);
+ DlgHandlerBase.EnsureUnload<EnchantActiveHandler>(ref this._activeHandler);
+ this._doc._EnchantOperateHandler = null;
+ this._KillTimer();
+ base.OnUnload();
+ }
+
+ public override void RefreshData()
+ {
+ base.RefreshData();
+ this._RefreshPage();
+ }
+
+ private void _RefreshPage()
+ {
+ XEquipItem xequipItem = XSingleton<XGame>.singleton.Doc.XBagDoc.GetItemByUID(this._doc.SelectedEquipUID) as XEquipItem;
+ bool flag = xequipItem == null;
+ if (flag)
+ {
+ base.SetVisible(false);
+ }
+ else
+ {
+ this._curEnchantInfo = xequipItem.enchantInfo;
+ this._doc.ToggleBlock(false);
+ this.ResetOKCD();
+ XSingleton<XItemDrawerMgr>.singleton.DrawItem(this.m_uiEquipItem, xequipItem);
+ EquipList.RowData equipConf = XBagDocument.GetEquipConf(xequipItem.itemID);
+ bool flag2 = equipConf == null;
+ if (!flag2)
+ {
+ EnchantEquip.RowData enchantEquipData = this._doc.GetEnchantEquipData(this._doc.SelectedItemID);
+ ItemList.RowData itemConf = XBagDocument.GetItemConf(this._doc.SelectedItemID);
+ bool flag3 = XEnchantDocument.IsEnchantMatched(equipConf, enchantEquipData) && this._doc.CanEnchant(enchantEquipData) == EnchantCheckResult.ECR_OK;
+ if (flag3)
+ {
+ this._ShowOperatePage(xequipItem, enchantEquipData);
+ }
+ else
+ {
+ this._ShowSelectPage();
+ }
+ this._curEnchantPropertiesContent.SetContentCount(xequipItem.enchantInfo.AttrList.Count, false);
+ this._scrollView.ResetPosition();
+ this._RefreshNoAttr(xequipItem, enchantEquipData);
+ }
+ }
+ }
+
+ private void _ShowOperatePage(XEquipItem equipItem, EnchantEquip.RowData enchantData)
+ {
+ this.m_uiOperateFrame.SetActive(true);
+ this.m_uiSelectFrame.SetActive(false);
+ this._RefreshItems(enchantData);
+ }
+
+ private void _RefreshItems(EnchantEquip.RowData enchantData)
+ {
+ this.m_ItemRequiredCollector.Init();
+ this._RefreshEnchantItem(enchantData);
+ this._RefreshCost(enchantData);
+ }
+
+ private void _RefreshEnchantItem(EnchantEquip.RowData enchantData)
+ {
+ bool flag = this._doc.SelectedItemID == 0 || enchantData == null;
+ if (!flag)
+ {
+ XItemRequired requiredItem = this.m_ItemRequiredCollector.GetRequiredItem((uint)this._doc.SelectedItemID, (ulong)enchantData.Num, 1f);
+ bool flag2 = requiredItem == null;
+ if (!flag2)
+ {
+ Color value = requiredItem.bEnough ? Color.white : Color.red;
+ XItemDrawerMgr.Param.MaxItemCount = (int)enchantData.Num;
+ XItemDrawerMgr.Param.NumColor = new Color?(value);
+ XSingleton<XItemDrawerMgr>.singleton.normalItemDrawer.DrawItem(this.m_uiEnchantItem, this._doc.SelectedItemID, (int)requiredItem.ownedCount, true);
+ }
+ }
+ }
+
+ private void _RefreshNoAttr(XEquipItem equipItem, EnchantEquip.RowData enchantData)
+ {
+ bool flag = equipItem == null;
+ if (flag)
+ {
+ equipItem = (XSingleton<XGame>.singleton.Doc.XBagDoc.GetItemByUID(this._doc.SelectedEquipUID) as XEquipItem);
+ }
+ this.m_uiActiveAttribute.gameObject.SetActive(this._curEnchantInfo.AttrList.Count > 0);
+ this.m_uiNoBeforeAttr.SetActive(true);
+ IXUILabel ixuilabel = this.m_uiNoBeforeAttr.GetComponent("XUILabel") as IXUILabel;
+ bool flag2 = this.m_uiSelectFrame.activeInHierarchy && equipItem.enchantInfo.AttrList.Count == 0;
+ if (flag2)
+ {
+ ixuilabel.SetText(XSingleton<UiUtility>.singleton.ReplaceReturn(XSingleton<XStringTable>.singleton.GetString("EnchantNOItemTip")));
+ }
+ else
+ {
+ bool flag3 = equipItem != null && equipItem.enchantInfo.AttrList.Count == 0;
+ if (flag3)
+ {
+ ixuilabel.SetText(XSingleton<UiUtility>.singleton.ReplaceReturn(XSingleton<XStringTable>.singleton.GetString("EnchantNOAttrTip")));
+ }
+ else
+ {
+ this.m_uiNoBeforeAttr.SetActive(false);
+ }
+ }
+ }
+
+ private void _RefreshOMG(ref XEnchantInfo info)
+ {
+ }
+
+ public void RefreshItems()
+ {
+ EnchantEquip.RowData enchantEquipData = this._doc.GetEnchantEquipData(this._doc.SelectedItemID);
+ this._RefreshItems(enchantEquipData);
+ }
+
+ private void _RefreshCost(EnchantEquip.RowData enchantData)
+ {
+ bool flag = enchantData != null;
+ if (flag)
+ {
+ for (int i = 0; i < enchantData.Cost.Count; i++)
+ {
+ XItemRequired requiredItem = this.m_ItemRequiredCollector.GetRequiredItem(enchantData.Cost[i, 0], (ulong)enchantData.Cost[i, 1], 1f);
+ bool flag2 = requiredItem == null;
+ if (!flag2)
+ {
+ this.m_uiCostValue.SetText(requiredItem.requiredCount.ToString());
+ this.m_uiCostValue.SetColor(requiredItem.bEnough ? Color.white : Color.red);
+ this.m_uiCostIcon.SetSprite(XBagDocument.GetItemSmallIcon(requiredItem.itemID, 0u));
+ }
+ }
+ }
+ }
+
+ private void _ShowSelectPage()
+ {
+ this.m_uiOperateFrame.SetActive(false);
+ this.m_uiSelectFrame.SetActive(true);
+ }
+
+ public void RefreshRedPoints()
+ {
+ bool flag = DlgBase<ItemSystemDlg, TabDlgBehaviour>.singleton.IsVisible() && DlgBase<ItemSystemDlg, TabDlgBehaviour>.singleton._equipHandler != null;
+ if (flag)
+ {
+ this.m_RedPointEquipPosList.Clear();
+ for (int i = 0; i < XBagDocument.EquipMax; i++)
+ {
+ bool flag2 = this._doc.RedPointStates[i];
+ if (flag2)
+ {
+ this.m_RedPointEquipPosList.Add(i);
+ }
+ }
+ DlgBase<ItemSystemDlg, TabDlgBehaviour>.singleton._equipHandler.SetArrows(this.m_RedPointEquipPosList);
+ }
+ }
+
+ private bool _OnCloseClicked(IXUIButton btn)
+ {
+ base.SetVisible(false);
+ return true;
+ }
+
+ private bool _OnOKClicked(IXUIButton btn)
+ {
+ bool activeInHierarchy = this.m_uiSelectFrame.activeInHierarchy;
+ bool result;
+ if (activeInHierarchy)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XSingleton<XStringTable>.singleton.GetString("NoEnchantItem"), "fece00");
+ result = true;
+ }
+ else
+ {
+ bool flag = !this.m_ItemRequiredCollector.bItemsEnough;
+ if (flag)
+ {
+ for (int i = 0; i < this.m_ItemRequiredCollector.RequiredItems.Count; i++)
+ {
+ bool flag2 = !this.m_ItemRequiredCollector.RequiredItems[i].bEnough;
+ if (flag2)
+ {
+ DlgBase<XPurchaseView, XPurchaseBehaviour>.singleton.ShowBorad(this.m_ItemRequiredCollector.RequiredItems[i].itemID);
+ break;
+ }
+ }
+ result = true;
+ }
+ else
+ {
+ XEquipItem xequipItem = XSingleton<XGame>.singleton.Doc.XBagDoc.GetItemByUID(this._doc.SelectedEquipUID) as XEquipItem;
+ bool flag3 = xequipItem == null;
+ if (flag3)
+ {
+ result = true;
+ }
+ else
+ {
+ this._DoOK(null);
+ result = true;
+ }
+ }
+ }
+ return result;
+ }
+
+ private bool _DoOK(IXUIButton btn)
+ {
+ this._resultHandler.SetVisible(true);
+ bool flag = DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.IsVisible();
+ if (flag)
+ {
+ XOptionsDocument specificDocument = XDocuments.GetSpecificDocument<XOptionsDocument>(XOptionsDocument.uuID);
+ specificDocument.SetValue(XOptionsDefine.OD_NO_ENCHANT_REPLACE_CONFIRM, DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.GetTempTip(XTempTipDefine.OD_ENCHANT_REPLACE) ? 1 : 0, false);
+ }
+ XSingleton<UiUtility>.singleton.CloseModalDlg();
+ return true;
+ }
+
+ private bool _DoCancel(IXUIButton btn)
+ {
+ XOptionsDocument specificDocument = XDocuments.GetSpecificDocument<XOptionsDocument>(XOptionsDocument.uuID);
+ specificDocument.SetValue(XOptionsDefine.OD_NO_ENCHANT_REPLACE_CONFIRM, DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.GetTempTip(XTempTipDefine.OD_ENCHANT_REPLACE) ? 1 : 0, false);
+ XSingleton<UiUtility>.singleton.CloseModalDlg();
+ return true;
+ }
+
+ public void PlayFx()
+ {
+ }
+
+ private void _KillTimer()
+ {
+ }
+
+ private void _OnEnchantItemClicked(IXUISprite iSp)
+ {
+ this._doc.GetEnchantItems();
+ bool flag = this._doc.ItemList.Count > 0;
+ if (flag)
+ {
+ this._BagHandler.SetVisible(true);
+ }
+ else
+ {
+ int itemid = (this._doc.SelectedItemID == 0) ? 240 : this._doc.SelectedItemID;
+ XSingleton<UiUtility>.singleton.ShowItemAccess(itemid, null);
+ }
+ }
+
+ private void _OnEquipClicked(IXUISprite iSp)
+ {
+ XItem itemByUID = XSingleton<XGame>.singleton.Doc.XBagDoc.GetItemByUID(iSp.ID);
+ bool flag = itemByUID != null;
+ if (flag)
+ {
+ this._doc.SelectEquip(itemByUID.uid);
+ }
+ }
+
+ private bool _OnHelpClicked(IXUIButton btn)
+ {
+ DlgBase<XCommonHelpTipView, XCommonHelpTipBehaviour>.singleton.ShowHelp(XSysDefine.XSys_Item_Enchant);
+ return true;
+ }
+
+ private void _OnEquipIconClicked(IXUISprite iSp)
+ {
+ XSingleton<UiUtility>.singleton.ShowTooltipDialog(XSingleton<XGame>.singleton.Doc.XBagDoc.GetItemByUID(this._doc.SelectedEquipUID), null, iSp, false, 0u);
+ }
+
+ private void _OnEnchantIconClicked(IXUISprite iSp)
+ {
+ XSingleton<UiUtility>.singleton.ShowTooltipDialog(this._doc.SelectedItemID, iSp, 0u);
+ }
+
+ private void _OnPreviewClicked(IXUISprite iSp)
+ {
+ bool flag = this._doc.SelectedItemID > 0;
+ if (flag)
+ {
+ this._PreviewHandler.Show(this._doc.SelectedItemID);
+ }
+ }
+
+ private void _OnToActiveEnchantAttribute(IXUISprite uiSprite)
+ {
+ this._activeHandler.SetVisible(true);
+ }
+
+ private void UpdateShowingItems()
+ {
+ }
+
+ public void ResetOKCD()
+ {
+ this.m_BtnOK.ResetCD();
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/EnchantOperateHandler.cs.meta b/Client/Assets/Scripts/XMainClient/UI/EnchantOperateHandler.cs.meta
new file mode 100644
index 00000000..85495056
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/EnchantOperateHandler.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: e75dec414cb5ffb4892874b71f6e2f95
+timeCreated: 1611404749
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/EnchantResultHandler.cs b/Client/Assets/Scripts/XMainClient/UI/EnchantResultHandler.cs
new file mode 100644
index 00000000..a87bc1ae
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/EnchantResultHandler.cs
@@ -0,0 +1,305 @@
+using System;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class EnchantResultHandler : DlgHandlerBase
+ {
+ protected override string FileName
+ {
+ get
+ {
+ return "ItemNew/EnchantResultPanel";
+ }
+ }
+
+ private XEnchantDocument _doc = null;
+
+ private GameObject _equipItem;
+
+ private IXUISprite _enchantIcon;
+
+ private IXUIButton _accessBtn;
+
+ private XItemRequiredCollector m_ItemRequiredCollector = new XItemRequiredCollector();
+
+ private IXUILabel _costStone;
+
+ private IXUILabel m_uiCostValue;
+
+ private IXUISprite m_uiCostIcon;
+
+ private IXUISprite m_Close;
+
+ private IXUIScrollView _scrollView;
+
+ private IXUIWrapContent _wrapContent;
+
+ private XEnchantInfo _curEnchantInfo;
+
+ protected override void Init()
+ {
+ base.Init();
+ this._doc = XDocuments.GetSpecificDocument<XEnchantDocument>(XEnchantDocument.uuID);
+ this._doc._EnchantResultHandler = this;
+ this.InitProperties();
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ this._doc.ReqEnchant();
+ }
+
+ protected override void OnHide()
+ {
+ base.OnHide();
+ }
+
+ public override void OnUnload()
+ {
+ this._doc._EnchantResultHandler = null;
+ this._doc = null;
+ base.OnUnload();
+ }
+
+ public override void StackRefresh()
+ {
+ base.StackRefresh();
+ this.RefreshData();
+ }
+
+ public override void RefreshData()
+ {
+ base.RefreshData();
+ XEquipItem xequipItem = XSingleton<XGame>.singleton.Doc.XBagDoc.GetItemByUID(this._doc.SelectedEquipUID) as XEquipItem;
+ bool flag = xequipItem == null;
+ if (flag)
+ {
+ base.SetVisible(false);
+ }
+ else
+ {
+ this._curEnchantInfo = xequipItem.enchantInfo;
+ this._RefreshCost();
+ this._wrapContent.SetContentCount(this._curEnchantInfo.AttrList.Count, false);
+ this._scrollView.ResetPosition();
+ }
+ }
+
+ private void InitProperties()
+ {
+ IXUIButton ixuibutton = base.PanelObject.transform.Find("Bottom/BtnOK").GetComponent("XUIButton") as IXUIButton;
+ ixuibutton.RegisterClickEventHandler(new ButtonClickEventHandler(this.ContinueToEnchant));
+ this.m_uiCostValue = (base.transform.Find("Bottom/Cost").GetComponent("XUILabel") as IXUILabel);
+ this.m_uiCostIcon = (base.transform.Find("Bottom/Cost/Icon").GetComponent("XUISprite") as IXUISprite);
+ this.m_Close = (base.transform.Find("Close").GetComponent("XUISprite") as IXUISprite);
+ this.m_Close.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnClose));
+ this._equipItem = base.transform.Find("Top/EquipItem").gameObject;
+ this._enchantIcon = (base.transform.Find("Bottom/CostStone/Icon").GetComponent("XUISprite") as IXUISprite);
+ this._accessBtn = (base.transform.Find("Bottom/BtnGet").GetComponent("XUIButton") as IXUIButton);
+ this._accessBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.ToAccesss));
+ this._costStone = (base.transform.Find("Bottom/CostStone").GetComponent("XUILabel") as IXUILabel);
+ this._wrapContent = (base.transform.Find("Detail/wrapcontent").GetComponent("XUIWrapContent") as IXUIWrapContent);
+ this._wrapContent.RegisterItemUpdateEventHandler(new WrapItemUpdateEventHandler(this.UpdateWrapContent));
+ this._scrollView = (base.transform.Find("Detail").GetComponent("XUIScrollView") as IXUIScrollView);
+ }
+
+ private void UpdateWrapContent(Transform itemTransform, int index)
+ {
+ bool flag = index >= this._curEnchantInfo.AttrList.Count;
+ if (!flag)
+ {
+ GameObject gameObject = itemTransform.Find("New").gameObject;
+ IXUILabel ixuilabel = itemTransform.GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel2 = itemTransform.Find("Right").GetComponent("XUILabel") as IXUILabel;
+ GameObject gameObject2 = itemTransform.Find("Jt/Up").gameObject;
+ GameObject gameObject3 = itemTransform.Find("Jt/Down").gameObject;
+ GameObject gameObject4 = itemTransform.Find("Jt/unchanged").gameObject;
+ gameObject2.SetActive(false);
+ gameObject3.SetActive(false);
+ gameObject4.SetActive(false);
+ gameObject.SetActive(false);
+ XItemChangeAttr xitemChangeAttr = this._curEnchantInfo.AttrList[index];
+ string text = XAttributeCommon.GetAttrStr((int)xitemChangeAttr.AttrID) + "+" + xitemChangeAttr.AttrValue;
+ bool flag2 = xitemChangeAttr.AttrID == this._doc.LastEnchantAttr.AttrID;
+ if (flag2)
+ {
+ int changedPreAttrValue = this.GetChangedPreAttrValue();
+ gameObject.SetActive(changedPreAttrValue < 0);
+ bool flag3 = changedPreAttrValue >= 0;
+ if (flag3)
+ {
+ gameObject4.gameObject.SetActive((long)changedPreAttrValue == (long)((ulong)this._doc.LastEnchantAttr.AttrValue));
+ gameObject2.SetActive((long)changedPreAttrValue < (long)((ulong)this._doc.LastEnchantAttr.AttrValue));
+ gameObject3.SetActive((long)changedPreAttrValue > (long)((ulong)this._doc.LastEnchantAttr.AttrValue));
+ bool flag4 = (long)changedPreAttrValue < (long)((ulong)this._doc.LastEnchantAttr.AttrValue);
+ if (flag4)
+ {
+ text = string.Concat(new object[]
+ {
+ "[00ff00]",
+ text,
+ " ",
+ (long)((ulong)this._doc.LastEnchantAttr.AttrValue - (ulong)((long)changedPreAttrValue)),
+ "[-]"
+ });
+ }
+ else
+ {
+ bool flag5 = (long)changedPreAttrValue > (long)((ulong)this._doc.LastEnchantAttr.AttrValue);
+ if (flag5)
+ {
+ text = string.Concat(new object[]
+ {
+ text,
+ " [ff0000]",
+ (long)changedPreAttrValue - (long)((ulong)this._doc.LastEnchantAttr.AttrValue),
+ "[-]"
+ });
+ }
+ }
+ }
+ }
+ string text2 = "";
+ EnchantEquip.RowData enchantEquipData = this._doc.GetEnchantEquipData(this._doc.SelectedItemID);
+ bool flag6 = enchantEquipData != null;
+ if (flag6)
+ {
+ for (int i = 0; i < (int)enchantEquipData.Attribute.count; i++)
+ {
+ bool flag7 = enchantEquipData.Attribute[i, 0] == xitemChangeAttr.AttrID;
+ if (flag7)
+ {
+ text2 = string.Concat(new object[]
+ {
+ " [",
+ enchantEquipData.Attribute[i, 1],
+ ",",
+ enchantEquipData.Attribute[i, 2],
+ "]"
+ });
+ break;
+ }
+ }
+ }
+ ixuilabel.SetText(text);
+ ixuilabel2.SetText(text2);
+ }
+ }
+
+ private bool ToAccesss(IXUIButton button)
+ {
+ XSingleton<UiUtility>.singleton.ShowItemAccess(240, null);
+ return true;
+ }
+
+ private bool ContinueToEnchant(IXUIButton button)
+ {
+ bool flag = !this.m_ItemRequiredCollector.bItemsEnough;
+ bool result;
+ if (flag)
+ {
+ for (int i = 0; i < this.m_ItemRequiredCollector.RequiredItems.Count; i++)
+ {
+ bool flag2 = !this.m_ItemRequiredCollector.RequiredItems[i].bEnough;
+ if (flag2)
+ {
+ DlgBase<XPurchaseView, XPurchaseBehaviour>.singleton.ShowBorad(this.m_ItemRequiredCollector.RequiredItems[i].itemID);
+ break;
+ }
+ }
+ result = true;
+ }
+ else
+ {
+ XEquipItem xequipItem = XSingleton<XGame>.singleton.Doc.XBagDoc.GetItemByUID(this._doc.SelectedEquipUID) as XEquipItem;
+ bool flag3 = xequipItem == null;
+ if (flag3)
+ {
+ result = true;
+ }
+ else
+ {
+ this._doc.ReqEnchant();
+ result = true;
+ }
+ }
+ return result;
+ }
+
+ private void OnClose(IXUISprite uiSprite)
+ {
+ base.SetVisible(false);
+ }
+
+ private void _RefreshCost()
+ {
+ ItemList.RowData itemConf = XBagDocument.GetItemConf(this._doc.SelectedItemID);
+ bool flag = itemConf != null;
+ if (flag)
+ {
+ this._enchantIcon.SetSprite(itemConf.ItemIcon1[0]);
+ }
+ XEquipItem xequipItem = XSingleton<XGame>.singleton.Doc.XBagDoc.GetItemByUID(this._doc.SelectedEquipUID) as XEquipItem;
+ bool flag2 = xequipItem != null;
+ if (flag2)
+ {
+ XSingleton<XItemDrawerMgr>.singleton.DrawItem(this._equipItem, xequipItem);
+ }
+ this.m_ItemRequiredCollector.Init();
+ EnchantEquip.RowData enchantEquipData = this._doc.GetEnchantEquipData(this._doc.SelectedItemID);
+ bool flag3 = enchantEquipData != null;
+ if (flag3)
+ {
+ for (int i = 0; i < enchantEquipData.Cost.Count; i++)
+ {
+ XItemRequired requiredItem = this.m_ItemRequiredCollector.GetRequiredItem(enchantEquipData.Cost[i, 0], (ulong)enchantEquipData.Cost[i, 1], 1f);
+ bool flag4 = requiredItem == null;
+ if (!flag4)
+ {
+ this.m_uiCostValue.SetText(requiredItem.requiredCount.ToString());
+ this.m_uiCostValue.SetColor(requiredItem.bEnough ? Color.white : Color.red);
+ this.m_uiCostIcon.SetSprite(XBagDocument.GetItemSmallIcon(requiredItem.itemID, 0u));
+ }
+ }
+ }
+ XItemRequired requiredItem2 = this.m_ItemRequiredCollector.GetRequiredItem((uint)this._doc.SelectedItemID, (ulong)enchantEquipData.Num, 1f);
+ ulong itemCount = XBagDocument.BagDoc.GetItemCount(this._doc.SelectedItemID);
+ uint num = (enchantEquipData == null) ? 0u : enchantEquipData.Num;
+ this._costStone.SetText(itemCount + "/" + num);
+ this._costStone.SetColor((itemCount >= (ulong)num) ? Color.white : Color.red);
+ this._costStone.gameObject.transform.Find("GetTip").gameObject.SetActive(itemCount < (ulong)num);
+ }
+
+ private void RefreshAfterAttri()
+ {
+ }
+
+ private int GetChangedPreAttrValue()
+ {
+ XEnchantInfo preEnchantInfo = this._doc.GetPreEnchantInfo();
+ XEnchantInfo curEnchantInfo = this._curEnchantInfo;
+ int result = -1;
+ uint attrID = this._doc.LastEnchantAttr.AttrID;
+ for (int i = 0; i < preEnchantInfo.AttrList.Count; i++)
+ {
+ bool flag = preEnchantInfo.AttrList[i].AttrID == attrID;
+ if (flag)
+ {
+ result = (int)preEnchantInfo.AttrList[i].AttrValue;
+ break;
+ }
+ }
+ return result;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/EnchantResultHandler.cs.meta b/Client/Assets/Scripts/XMainClient/UI/EnchantResultHandler.cs.meta
new file mode 100644
index 00000000..48bda0d0
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/EnchantResultHandler.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: ee6524004232b9b44ad9171a91cd0d95
+timeCreated: 1611404797
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/EncourageShowInfo.cs b/Client/Assets/Scripts/XMainClient/UI/EncourageShowInfo.cs
new file mode 100644
index 00000000..c3c729d7
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/EncourageShowInfo.cs
@@ -0,0 +1,112 @@
+using System;
+using UILib;
+using UnityEngine;
+
+namespace XMainClient.UI
+{
+ public class EncourageShowInfo
+ {
+ public uint EncourageCount
+ {
+ get
+ {
+ return this._battleSource.GetEncourageCount(this._index);
+ }
+ }
+
+ public bool Valid
+ {
+ get
+ {
+ return this._valid;
+ }
+ set
+ {
+ this._valid = value;
+ this.ReqEncourage = null;
+ this._encourageTransform.gameObject.SetActive(value);
+ this._buffTransfrom.gameObject.SetActive(value);
+ }
+ }
+
+ public IWorldBossBattleSource BattleSource
+ {
+ get
+ {
+ return this._battleSource;
+ }
+ set
+ {
+ this._battleSource = value;
+ }
+ }
+
+ public string attr_string;
+
+ public string cost_string;
+
+ public string encourage_type;
+
+ public string encourage_title;
+
+ public string encourage_effect;
+
+ private IWorldBossBattleSource _battleSource;
+
+ private bool _valid = true;
+
+ private IXUIButton _courageBtn;
+
+ private IXUILabel _courageValueText;
+
+ private IXUITweenTool _courageValueTween;
+
+ private IXUILabel _courageLabel;
+
+ private Transform _encourageTransform;
+
+ private Transform _buffTransfrom;
+
+ private int _index;
+
+ public Action ReqEncourage = null;
+
+ public bool isNeedGuild = false;
+
+ public EncourageShowInfo(Transform encourage, Transform buff, int index)
+ {
+ this._index = index;
+ this._encourageTransform = encourage;
+ this._buffTransfrom = buff;
+ this._courageBtn = (encourage.GetComponent("XUIButton") as IXUIButton);
+ this._courageValueText = (buff.transform.Find("buff").GetComponent("XUILabel") as IXUILabel);
+ this._courageValueTween = (buff.transform.Find("buff").GetComponent("XUIPlayTween") as IXUITweenTool);
+ this._courageLabel = (buff.transform.Find("text").GetComponent("XUILabel") as IXUILabel);
+ this._courageValueText.SetText("0%");
+ this._courageBtn.ID = (ulong)((long)index);
+ }
+
+ public void RegisterCourageClick(ButtonClickEventHandler handler)
+ {
+ bool flag = this._courageBtn != null;
+ if (flag)
+ {
+ this._courageBtn.RegisterClickEventHandler(handler);
+ }
+ }
+
+ public void SetEncourageValue(int attrValue)
+ {
+ this._courageLabel.SetText(XStringDefineProxy.GetString(this.encourage_title));
+ this._courageValueText.SetVisible(true);
+ this._courageValueText.SetText(string.Format("{0}%", (long)attrValue * (long)((ulong)this.EncourageCount)));
+ this._courageValueTween.ResetTween(true);
+ this._courageValueTween.PlayTween(true, 0.5f);
+ }
+
+ public void OnDispose()
+ {
+ this.ReqEncourage = null;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/EncourageShowInfo.cs.meta b/Client/Assets/Scripts/XMainClient/UI/EncourageShowInfo.cs.meta
new file mode 100644
index 00000000..8545e343
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/EncourageShowInfo.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: ca2b1983fc5e1284cb61fdf754d3f82c
+timeCreated: 1611404540
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/EndlessAbyssBehaviour.cs b/Client/Assets/Scripts/XMainClient/UI/EndlessAbyssBehaviour.cs
new file mode 100644
index 00000000..5481db72
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/EndlessAbyssBehaviour.cs
@@ -0,0 +1,39 @@
+using System;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class EndlessAbyssBehaviour : DlgBehaviourBase
+ {
+ public IXUIButton m_closedBtn;
+
+ public IXUIButton m_Help;
+
+ public IXUIButton m_shopBtn;
+
+ public IXUIButton m_goBattleBtn;
+
+ public GameObject m_noTimesGo;
+
+ public XUIPool m_ItemPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ public IXUILabel m_canJoinTimeslab;
+
+ private void Awake()
+ {
+ Transform transform = base.transform.Find("Bg");
+ this.m_closedBtn = (transform.Find("Close").GetComponent("XUIButton") as IXUIButton);
+ this.m_Help = (base.transform.Find("Bg/Help").GetComponent("XUIButton") as IXUIButton);
+ this.m_goBattleBtn = (transform.Find("GoBattle").GetComponent("XUIButton") as IXUIButton);
+ this.m_shopBtn = (transform.Find("BtnShop").GetComponent("XUIButton") as IXUIButton);
+ this.m_noTimesGo = transform.Find("NoJoinTimesTips").gameObject;
+ Transform transform2 = transform.Find("Reward/Item/ItemTpl");
+ this.m_ItemPool.SetupPool(transform2.parent.gameObject, transform2.gameObject, 3u, false);
+ this.m_canJoinTimeslab = (transform.Find("times").GetComponent("XUILabel") as IXUILabel);
+ this.m_canJoinTimeslab.SetText("");
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/EndlessAbyssBehaviour.cs.meta b/Client/Assets/Scripts/XMainClient/UI/EndlessAbyssBehaviour.cs.meta
new file mode 100644
index 00000000..f810e204
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/EndlessAbyssBehaviour.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: ee108dbd68ca97c48883ebb6c5b0ad7b
+timeCreated: 1611404794
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/EndlessAbyssDlg.cs b/Client/Assets/Scripts/XMainClient/UI/EndlessAbyssDlg.cs
new file mode 100644
index 00000000..df205601
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/EndlessAbyssDlg.cs
@@ -0,0 +1,211 @@
+using System;
+using System.Collections.Generic;
+using KKSG;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class EndlessAbyssDlg : DlgBase<EndlessAbyssDlg, EndlessAbyssBehaviour>
+ {
+ public override string fileName
+ {
+ get
+ {
+ return "GameSystem/EndlessAbyssDlg";
+ }
+ }
+
+ public override int layer
+ {
+ get
+ {
+ return 1;
+ }
+ }
+
+ public override bool autoload
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override bool hideMainMenu
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override bool pushstack
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override bool fullscreenui
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ private XExpeditionDocument _doc;
+
+ protected override void Init()
+ {
+ this._doc = XDocuments.GetSpecificDocument<XExpeditionDocument>(XExpeditionDocument.uuID);
+ this.RefreshTimes();
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ base.uiBehaviour.m_closedBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnCloseDlg));
+ base.uiBehaviour.m_goBattleBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnEnterTeamClick));
+ base.uiBehaviour.m_shopBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnGoToShop));
+ base.uiBehaviour.m_Help.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnHelpClicked));
+ }
+
+ public bool OnHelpClicked(IXUIButton button)
+ {
+ DlgBase<XCommonHelpTipView, XCommonHelpTipBehaviour>.singleton.ShowHelp(XSysDefine.XSys_EndlessAbyss);
+ return true;
+ }
+
+ protected override void OnShow()
+ {
+ this.RequstLeftCount();
+ this.FillItem();
+ }
+
+ protected override void OnHide()
+ {
+ }
+
+ private bool OnGoToShop(IXUIButton button)
+ {
+ DlgBase<MallSystemDlg, MallSystemBehaviour>.singleton.ShowShopSystem(EndlessAbyssDlg.GetShopSystem(), 0UL);
+ return true;
+ }
+
+ public static XSysDefine GetShopSystem()
+ {
+ SeqList<int> sequenceList = XSingleton<XGlobalConfig>.singleton.GetSequenceList("EndlessabyssLevelInterval", true);
+ List<int> intList = XSingleton<XGlobalConfig>.singleton.GetIntList("EndlessabyssShopType");
+ int level = (int)XSingleton<XAttributeMgr>.singleton.XPlayerData.Level;
+ for (int i = 0; i < (int)sequenceList.Count; i++)
+ {
+ bool flag = level >= sequenceList[i, 0] && level <= sequenceList[i, 1];
+ if (flag)
+ {
+ return (XSysDefine)(XFastEnumIntEqualityComparer<XSysDefine>.ToInt(XSysDefine.XSys_Mall_MystShop) + intList[i]);
+ }
+ }
+ XSingleton<XDebug>.singleton.AddErrorLog("Can't find player level state from golbalconfig EndlessabyssLevelInterval. level = ", level.ToString(), null, null, null, null);
+ return XSysDefine.XSys_Mall_32A;
+ }
+
+ private void FillItem()
+ {
+ string text = "";
+ List<string> stringList = XSingleton<XGlobalConfig>.singleton.GetStringList("EndlessabyssDropShow");
+ SeqList<int> sequenceList = XSingleton<XGlobalConfig>.singleton.GetSequenceList("EndlessabyssLevelInterval", true);
+ bool flag = (int)sequenceList.Count != stringList.Count;
+ if (flag)
+ {
+ XSingleton<XDebug>.singleton.AddErrorLog("EndlessAbyss reward config error! level interval's count is not the same as reward interval's cout.", null, null, null, null, null);
+ }
+ uint level = XSingleton<XAttributeMgr>.singleton.XPlayerData.Level;
+ for (int i = 0; i < (int)sequenceList.Count; i++)
+ {
+ bool flag2 = (ulong)level >= (ulong)((long)sequenceList[i, 0]) && (ulong)level <= (ulong)((long)sequenceList[i, 1]);
+ if (flag2)
+ {
+ text = stringList[i];
+ }
+ }
+ bool flag3 = text == "";
+ if (flag3)
+ {
+ XSingleton<XDebug>.singleton.AddErrorLog("Can't find the reward of EndlessAbyss from globalconfig, level = ", level.ToString(), null, null, null, null);
+ }
+ string[] array = text.Split(XGlobalConfig.SequenceSeparator);
+ base.uiBehaviour.m_ItemPool.ReturnAll(false);
+ Vector3 tplPos = base.uiBehaviour.m_ItemPool.TplPos;
+ float num = tplPos.x - ((float)array.Length - 1f) / 2f * (float)base.uiBehaviour.m_ItemPool.TplWidth;
+ for (int j = 0; j < array.Length; j++)
+ {
+ int num2 = int.Parse(array[j]);
+ GameObject gameObject = base.uiBehaviour.m_ItemPool.FetchGameObject(false);
+ gameObject.transform.localPosition = new Vector3(num + (float)(j * base.uiBehaviour.m_ItemPool.TplWidth), tplPos.y);
+ XSingleton<XItemDrawerMgr>.singleton.normalItemDrawer.DrawItem(gameObject, num2, 0, false);
+ IXUISprite ixuisprite = gameObject.transform.Find("Icon").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.ID = (ulong)((long)num2);
+ ixuisprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.ShowTip));
+ }
+ }
+
+ public void RefreshTimes()
+ {
+ bool flag = this._doc == null || !base.IsVisible();
+ if (!flag)
+ {
+ int dayCount = this._doc.GetDayCount(TeamLevelType.TeamLevelEndlessAbyss, null);
+ int dayMaxCount = this._doc.GetDayMaxCount(TeamLevelType.TeamLevelEndlessAbyss, null);
+ base.uiBehaviour.m_canJoinTimeslab.SetText(string.Format("{0}/{1}", dayCount, dayMaxCount));
+ bool flag2 = dayCount > 0;
+ base.uiBehaviour.m_goBattleBtn.SetVisible(flag2);
+ base.uiBehaviour.m_noTimesGo.SetActive(!flag2);
+ }
+ }
+
+ private void RequstLeftCount()
+ {
+ List<ExpeditionTable.RowData> expeditionList = this._doc.GetExpeditionList(TeamLevelType.TeamLevelEndlessAbyss);
+ bool flag = expeditionList != null && expeditionList.Count > 0;
+ if (flag)
+ {
+ XLevelSealDocument specificDocument = XDocuments.GetSpecificDocument<XLevelSealDocument>(XLevelSealDocument.uuID);
+ for (int i = 0; i < expeditionList.Count; i++)
+ {
+ bool flag2 = specificDocument.SealType == expeditionList[i].LevelSealType;
+ if (flag2)
+ {
+ this._doc.ExpeditionId = expeditionList[i].DNExpeditionID;
+ XTeamDocument specificDocument2 = XDocuments.GetSpecificDocument<XTeamDocument>(XTeamDocument.uuID);
+ specificDocument2.ReqTeamOp(TeamOperate.TEAM_QUERYCOUNT, 0UL, null, TeamMemberType.TMT_NORMAL, null);
+ return;
+ }
+ }
+ }
+ XSingleton<XDebug>.singleton.AddLog("Df data is error,not find target DATA!", null, null, null, null, null, XDebugColor.XDebug_None);
+ }
+
+ private bool OnCloseDlg(IXUIButton btn)
+ {
+ this.SetVisibleWithAnimation(false, null);
+ return true;
+ }
+
+ private bool OnEnterTeamClick(IXUIButton button)
+ {
+ XTeamDocument specificDocument = XDocuments.GetSpecificDocument<XTeamDocument>(XTeamDocument.uuID);
+ specificDocument.SetAndMatch(this._doc.ExpeditionId);
+ return true;
+ }
+
+ private void ShowTip(IXUISprite sp)
+ {
+ XSingleton<UiUtility>.singleton.OnItemClick(sp);
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/EndlessAbyssDlg.cs.meta b/Client/Assets/Scripts/XMainClient/UI/EndlessAbyssDlg.cs.meta
new file mode 100644
index 00000000..356665b4
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/EndlessAbyssDlg.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: a9939addb79472248b61b06ec7453634
+timeCreated: 1611404299
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/EnemyInfoUpdater.cs b/Client/Assets/Scripts/XMainClient/UI/EnemyInfoUpdater.cs
new file mode 100644
index 00000000..481a4be2
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/EnemyInfoUpdater.cs
@@ -0,0 +1,6 @@
+using System;
+
+namespace XMainClient.UI
+{
+ internal delegate void EnemyInfoUpdater();
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/EnemyInfoUpdater.cs.meta b/Client/Assets/Scripts/XMainClient/UI/EnemyInfoUpdater.cs.meta
new file mode 100644
index 00000000..f979c721
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/EnemyInfoUpdater.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: c29e43c5d6efc6046bd0fcd4b6b89890
+timeCreated: 1611404494
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/EnhanceMasterHandler.cs b/Client/Assets/Scripts/XMainClient/UI/EnhanceMasterHandler.cs
new file mode 100644
index 00000000..fd403e21
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/EnhanceMasterHandler.cs
@@ -0,0 +1,158 @@
+using System;
+using UILib;
+using UnityEngine;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class EnhanceMasterHandler : DlgHandlerBase
+ {
+ private XEnhanceDocument m_doc
+ {
+ get
+ {
+ return XEnhanceDocument.Doc;
+ }
+ }
+
+ protected override string FileName
+ {
+ get
+ {
+ return "ItemNew/EnhanceMaster";
+ }
+ }
+
+ private XUIPool m_AttrPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ private IXUILabel m_HistoryMaxLevel;
+
+ private IXUILabel m_NextStageLevel;
+
+ private IXUILabel m_effectTipsLab;
+
+ private IXUISprite m_closedSpr;
+
+ private GameObject m_CurAttrListGo;
+
+ private GameObject m_NextStageAttrListGo;
+
+ private GameObject m_NoTipsGo;
+
+ private GameObject m_MaxTipsGo;
+
+ private readonly int m_gap = 30;
+
+ protected override void Init()
+ {
+ base.Init();
+ Transform transform = base.PanelObject.transform.Find("AttriTpl");
+ this.m_AttrPool.SetupPool(base.PanelObject, transform.gameObject, 2u, false);
+ this.m_CurAttrListGo = base.PanelObject.transform.Find("CurAttrList").gameObject;
+ this.m_NextStageAttrListGo = base.PanelObject.transform.Find("NextStageAttrList").gameObject;
+ this.m_NoTipsGo = base.PanelObject.transform.Find("NoTips").gameObject;
+ this.m_MaxTipsGo = base.PanelObject.transform.Find("MaxTips").gameObject;
+ this.m_HistoryMaxLevel = (base.PanelObject.transform.Find("HistoryLevel/Num").GetComponent("XUILabel") as IXUILabel);
+ this.m_NextStageLevel = (base.PanelObject.transform.Find("NextStage/Num").GetComponent("XUILabel") as IXUILabel);
+ this.m_effectTipsLab = (base.PanelObject.transform.Find("EffectTips").GetComponent("XUILabel") as IXUILabel);
+ this.m_closedSpr = (base.PanelObject.transform.Find("Bg/Box").GetComponent("XUISprite") as IXUISprite);
+ this.m_doc.enhanceMasterView = this;
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ this.m_closedSpr.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnClickClose));
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ this.FillContent();
+ }
+
+ protected override void OnHide()
+ {
+ base.OnHide();
+ this.m_AttrPool.ReturnAll(false);
+ }
+
+ public override void OnUnload()
+ {
+ base.OnUnload();
+ }
+
+ public void RefreshView()
+ {
+ this.FillContent();
+ }
+
+ private void FillContent()
+ {
+ this.m_HistoryMaxLevel.SetText(string.Format("{0}{1}", this.m_doc.HistoryMaxLevel, XStringDefineProxy.GetString("LevelName")));
+ this.m_NextStageLevel.SetText("");
+ this.m_effectTipsLab.SetText(XEquipDocument.GetTips(XSingleton<XAttributeMgr>.singleton.XPlayerData.BasicTypeID, this.m_doc.HistoryMaxLevel));
+ this.m_AttrPool.ReturnAll(false);
+ bool flag = this.m_doc.HistoryMaxLevel == 0u;
+ if (flag)
+ {
+ this.m_NoTipsGo.SetActive(true);
+ }
+ else
+ {
+ this.m_NoTipsGo.SetActive(false);
+ EnhanceMaster.RowData curStageEnhanceMasterRowData = this.m_doc.GetCurStageEnhanceMasterRowData(this.m_doc.HistoryMaxLevel);
+ bool flag2 = curStageEnhanceMasterRowData != null;
+ if (flag2)
+ {
+ for (int i = 0; i < curStageEnhanceMasterRowData.Attribute.Count; i++)
+ {
+ GameObject gameObject = this.m_AttrPool.FetchGameObject(false);
+ gameObject.name = i.ToString();
+ gameObject.transform.parent = this.m_CurAttrListGo.transform;
+ gameObject.transform.localScale = Vector3.one;
+ gameObject.transform.localPosition = new Vector3(0f, (float)(-(float)i * this.m_gap), 0f);
+ this.FillAttrItem(gameObject, curStageEnhanceMasterRowData.Attribute[i, 0], curStageEnhanceMasterRowData.Attribute[i, 1]);
+ }
+ }
+ }
+ bool flag3 = this.m_doc.HistoryMaxLevel >= this.m_doc.TheMasterMaxLevel;
+ if (flag3)
+ {
+ this.m_MaxTipsGo.SetActive(true);
+ }
+ else
+ {
+ this.m_MaxTipsGo.SetActive(false);
+ EnhanceMaster.RowData nextStageEnhanceMasterRowData = this.m_doc.GetNextStageEnhanceMasterRowData(this.m_doc.HistoryMaxLevel);
+ bool flag4 = nextStageEnhanceMasterRowData != null;
+ if (flag4)
+ {
+ for (int j = 0; j < nextStageEnhanceMasterRowData.Attribute.Count; j++)
+ {
+ GameObject gameObject = this.m_AttrPool.FetchGameObject(false);
+ gameObject.name = j.ToString();
+ gameObject.transform.parent = this.m_NextStageAttrListGo.transform;
+ gameObject.transform.localScale = Vector3.one;
+ gameObject.transform.localPosition = new Vector3(0f, (float)(-(float)j * this.m_gap), 0f);
+ this.FillAttrItem(gameObject, nextStageEnhanceMasterRowData.Attribute[j, 0], nextStageEnhanceMasterRowData.Attribute[j, 1]);
+ }
+ this.m_NextStageLevel.SetText(string.Format("{0}{1}", nextStageEnhanceMasterRowData.TotalEnhanceLevel, XStringDefineProxy.GetString("LevelName")));
+ }
+ }
+ }
+
+ private void FillAttrItem(GameObject go, uint id, uint value)
+ {
+ IXUILabel ixuilabel = go.transform.Find("Name").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel.SetText(XStringDefineProxy.GetString((XAttributeDefine)id));
+ ixuilabel = (go.transform.Find("Num").GetComponent("XUILabel") as IXUILabel);
+ ixuilabel.SetText(string.Format("+{0}", value));
+ }
+
+ private void OnClickClose(IXUISprite sp)
+ {
+ base.SetVisible(false);
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/EnhanceMasterHandler.cs.meta b/Client/Assets/Scripts/XMainClient/UI/EnhanceMasterHandler.cs.meta
new file mode 100644
index 00000000..4c96592b
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/EnhanceMasterHandler.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: e2ea59cb0cfad6741b6b2181d5584d3f
+timeCreated: 1611404730
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/EnhanceView.cs b/Client/Assets/Scripts/XMainClient/UI/EnhanceView.cs
new file mode 100644
index 00000000..460f891e
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/EnhanceView.cs
@@ -0,0 +1,772 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class EnhanceView : DlgHandlerBase
+ {
+ private XEnhanceDocument m_doc
+ {
+ get
+ {
+ return XEnhanceDocument.Doc;
+ }
+ }
+
+ protected override string FileName
+ {
+ get
+ {
+ return "ItemNew/EnhanceFrame";
+ }
+ }
+
+ public string EnhanceSucPath
+ {
+ get
+ {
+ bool flag = string.IsNullOrEmpty(this.m_enhanceSucPath);
+ if (flag)
+ {
+ this.m_enhanceSucPath = XSingleton<XGlobalConfig>.singleton.GetValue("EnhanceSucEffectPath");
+ }
+ return this.m_enhanceSucPath;
+ }
+ }
+
+ public string BreakSucPath
+ {
+ get
+ {
+ bool flag = string.IsNullOrEmpty(this.m_breakSucPath);
+ if (flag)
+ {
+ this.m_breakSucPath = XSingleton<XGlobalConfig>.singleton.GetValue("BreakSucEffectPath");
+ }
+ return this.m_breakSucPath;
+ }
+ }
+
+ public string EnhanceLostPath
+ {
+ get
+ {
+ bool flag = string.IsNullOrEmpty(this.m_enhanceLostPath);
+ if (flag)
+ {
+ this.m_enhanceLostPath = XSingleton<XGlobalConfig>.singleton.GetValue("EnhanceLostEffectPath");
+ }
+ return this.m_enhanceLostPath;
+ }
+ }
+
+ private XUIPool m_BeforeAttrPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ private XUIPool m_AfterAttrPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ private IXUIButton m_Help;
+
+ private IXUIButton m_CloseBtn;
+
+ private IXUIButton m_EnhanceBtn;
+
+ private IXUILabel m_SuccessRateLab;
+
+ private IXUILabel m_AddRateLab;
+
+ private IXUILabel m_TipsLab;
+
+ private IXUILabel m_TittleLab;
+
+ private IXUILabel m_EnhanceBtnLab;
+
+ private IXUILabel m_MaxTipsLab;
+
+ private IXUILabel m_BreakRateLab;
+
+ private GameObject m_topItemGo;
+
+ private GameObject m_EnhanceGo;
+
+ private GameObject m_EnhanceMaxGo;
+
+ private GameObject m_BeforeEnhanceGo;
+
+ private GameObject m_AfterEnhanceGo;
+
+ private GameObject m_MaxAttrListGo;
+
+ private List<GameObject> m_effectGoList = new List<GameObject>();
+
+ private Transform m_effectsTra;
+
+ private XFx m_EnhanceSucceedEffect;
+
+ private XFx m_BreakSucceedEffect;
+
+ private XFx m_EnhanceLostEffect;
+
+ private List<Transform> m_costItemTras;
+
+ private uint m_token = 0u;
+
+ private uint m_effectToken;
+
+ private readonly int m_gap = 30;
+
+ private bool m_bIsCanClick = true;
+
+ private float m_delayTime = 0.5f;
+
+ private float m_fLastClickBtnTime = 0f;
+
+ private string m_enhanceSucPath = string.Empty;
+
+ private string m_breakSucPath = string.Empty;
+
+ private string m_enhanceLostPath = string.Empty;
+
+ protected override void Init()
+ {
+ base.Init();
+ this.m_CloseBtn = (base.PanelObject.transform.Find("Bg/Close").GetComponent("XUIButton") as IXUIButton);
+ this.m_Help = (base.transform.Find("Bg/Help").GetComponent("XUIButton") as IXUIButton);
+ Transform transform = base.PanelObject.transform.Find("Bg/Top");
+ this.m_topItemGo = transform.Find("EnhanceItem").gameObject;
+ this.m_SuccessRateLab = (transform.Find("SuccessRate").GetComponent("XUILabel") as IXUILabel);
+ this.m_AddRateLab = (transform.Find("AddRate").GetComponent("XUILabel") as IXUILabel);
+ this.m_BreakRateLab = (transform.Find("BreakRate").GetComponent("XUILabel") as IXUILabel);
+ transform = base.PanelObject.transform.Find("Bg/EnhanceMax");
+ this.m_EnhanceMaxGo = transform.gameObject;
+ this.m_MaxAttrListGo = transform.Find("MaxAttrList").gameObject;
+ this.m_MaxTipsLab = (transform.Find("Bottom/MaxTips").GetComponent("XUILabel") as IXUILabel);
+ this.m_EnhanceGo = base.PanelObject.transform.Find("Bg/Enhance").gameObject;
+ transform = this.m_EnhanceGo.transform.Find("EnhanceAttr");
+ this.m_BeforeEnhanceGo = transform.Find("BeforeEnhance").gameObject;
+ this.m_AfterEnhanceGo = transform.Find("AfterEnhance").gameObject;
+ this.m_TipsLab = (transform.Find("Tips").GetComponent("XUILabel") as IXUILabel);
+ this.m_effectsTra = base.PanelObject.transform.Find("Bg/Effects");
+ transform = this.m_EnhanceGo.transform.Find("Bottom");
+ this.m_TittleLab = (transform.Find("Tittle").GetComponent("XUILabel") as IXUILabel);
+ this.m_EnhanceBtn = (transform.Find("EnhanceBtn").GetComponent("XUIButton") as IXUIButton);
+ this.m_EnhanceBtnLab = (transform.Find("EnhanceBtn/T").GetComponent("XUILabel") as IXUILabel);
+ bool flag = this.m_costItemTras == null;
+ if (flag)
+ {
+ this.m_costItemTras = new List<Transform>();
+ }
+ else
+ {
+ this.m_costItemTras.Clear();
+ }
+ this.m_costItemTras.Add(transform.Find("CostItem2"));
+ this.m_costItemTras.Add(transform.Find("CostItem1"));
+ transform = base.PanelObject.transform.Find("Bg/BeforeAttrTpl");
+ this.m_BeforeAttrPool.SetupPool(this.m_BeforeEnhanceGo, transform.gameObject, 3u, false);
+ transform = base.PanelObject.transform.Find("Bg/AfterAttrTpl");
+ this.m_AfterAttrPool.SetupPool(this.m_AfterEnhanceGo, transform.gameObject, 3u, false);
+ this.m_doc.enhanceView = this;
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ this.m_CloseBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this._OnCloseClicked));
+ this.m_EnhanceBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnEnhanceClicked));
+ this.m_Help.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnHelpClicked));
+ }
+
+ public bool OnHelpClicked(IXUIButton button)
+ {
+ DlgBase<XCommonHelpTipView, XCommonHelpTipBehaviour>.singleton.ShowHelp(XSysDefine.XSys_Item_Enhance);
+ return true;
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ this.RefreshData();
+ }
+
+ public override void StackRefresh()
+ {
+ this.RefreshData();
+ base.StackRefresh();
+ }
+
+ protected override void OnHide()
+ {
+ this.m_BeforeAttrPool.ReturnAll(false);
+ this.m_AfterAttrPool.ReturnAll(false);
+ XSingleton<XTimerMgr>.singleton.KillTimer(this.m_token);
+ XSingleton<XTimerMgr>.singleton.KillTimer(this.m_effectToken);
+ this.DeActiveEffect();
+ DlgBase<ItemSystemDlg, TabDlgBehaviour>.singleton.OnPopHandlerSetVisible(false, null);
+ DlgBase<ItemSystemDlg, TabDlgBehaviour>.singleton.StackRefresh();
+ bool flag = DlgBase<ItemSystemDlg, TabDlgBehaviour>.singleton._equipHandler != null;
+ if (flag)
+ {
+ DlgBase<ItemSystemDlg, TabDlgBehaviour>.singleton._equipHandler.SelectEquip(0UL);
+ DlgBase<ItemSystemDlg, TabDlgBehaviour>.singleton._equipHandler.RegisterItemClickEvents(null);
+ }
+ base.OnHide();
+ }
+
+ public override void OnUnload()
+ {
+ this.m_doc.enhanceView = null;
+ bool flag = this.m_EnhanceSucceedEffect != null;
+ if (flag)
+ {
+ XSingleton<XFxMgr>.singleton.DestroyFx(this.m_EnhanceSucceedEffect, true);
+ this.m_EnhanceSucceedEffect = null;
+ }
+ bool flag2 = this.m_BreakSucceedEffect != null;
+ if (flag2)
+ {
+ XSingleton<XFxMgr>.singleton.DestroyFx(this.m_BreakSucceedEffect, true);
+ this.m_BreakSucceedEffect = null;
+ }
+ bool flag3 = this.m_EnhanceLostEffect != null;
+ if (flag3)
+ {
+ XSingleton<XFxMgr>.singleton.DestroyFx(this.m_EnhanceLostEffect, true);
+ this.m_EnhanceLostEffect = null;
+ }
+ base.OnUnload();
+ }
+
+ public override void RefreshData()
+ {
+ base.RefreshData();
+ DlgBase<ItemSystemDlg, TabDlgBehaviour>.singleton._equipHandler.RegisterItemClickEvents(new SpriteClickEventHandler(this.OnEquipClicked));
+ XItem itemByUID = XSingleton<XGame>.singleton.Doc.XBagDoc.EquipBag.GetItemByUID(this.m_doc.selectedEquip);
+ bool flag = itemByUID == null;
+ if (flag)
+ {
+ this.m_doc.SelectEquip(0UL);
+ }
+ else
+ {
+ this.m_doc.SelectEquip(this.m_doc.selectedEquip);
+ }
+ this.ChangeEquip();
+ }
+
+ public void ChangeEquip()
+ {
+ this.DeActiveEffect();
+ this.FillContent();
+ this.m_doc.ReqEnhanceAttr();
+ }
+
+ public void RefreshPage()
+ {
+ this.DeActiveEffect();
+ this.FillContent();
+ this.m_doc.ReqEnhanceAttr();
+ }
+
+ public void PlayEffect()
+ {
+ this.m_bIsCanClick = false;
+ this.DeActiveEffect();
+ bool flag = this.m_doc.CombainItems != null && this.m_doc.CombainItems.Count != 0;
+ if (flag)
+ {
+ StringBuilder stringBuilder = new StringBuilder();
+ for (int i = 0; i < this.m_doc.CombainItems.Count; i++)
+ {
+ bool flag2 = this.m_doc.CombainItems[i].itemId <= 0u;
+ if (!flag2)
+ {
+ ItemList.RowData itemConf = XBagDocument.GetItemConf((int)this.m_doc.CombainItems[i].itemId);
+ bool flag3 = itemConf == null;
+ if (!flag3)
+ {
+ stringBuilder.Append(this.m_doc.CombainItems[i].comNum).Append(XStringDefineProxy.GetString("Ge")).Append(itemConf.ItemName[0]).Append(",");
+ }
+ }
+ }
+ float interval = 0f;
+ bool flag4 = stringBuilder.Length > 1;
+ if (flag4)
+ {
+ stringBuilder.Remove(stringBuilder.Length - 1, 1);
+ string text = string.Format(XStringDefineProxy.GetString("CombainSucceed"), stringBuilder.ToString());
+ XSingleton<UiUtility>.singleton.ShowSystemTip(text, "fece00");
+ interval = 1f;
+ }
+ XSingleton<XTimerMgr>.singleton.KillTimer(this.m_token);
+ this.m_token = XSingleton<XTimerMgr>.singleton.SetTimer(interval, new XTimerMgr.ElapsedEventHandler(this.DelayPlayEffect), null);
+ }
+ else
+ {
+ this.DelayPlayEffect(null);
+ }
+ }
+
+ public void FillAttrUi()
+ {
+ XEquipItem xequipItem = XBagDocument.BagDoc.GetItemByUID(this.m_doc.selectedEquip) as XEquipItem;
+ bool flag = xequipItem == null;
+ if (!flag)
+ {
+ this.m_EnhanceGo.SetActive(false);
+ this.m_EnhanceMaxGo.SetActive(false);
+ bool flag2 = xequipItem.enhanceInfo.EnhanceLevel >= this.m_doc.GetMaxEnhanceLevel();
+ if (flag2)
+ {
+ this.FillMaxEnhanceInfo();
+ }
+ else
+ {
+ this.FillEnhanceInfo();
+ }
+ }
+ }
+
+ private void PlayEnhanceSucceedEffect()
+ {
+ bool flag = this.m_EnhanceSucceedEffect == null;
+ if (flag)
+ {
+ this.m_EnhanceSucceedEffect = XSingleton<XFxMgr>.singleton.CreateFx(this.EnhanceSucPath, null, true);
+ }
+ else
+ {
+ this.m_EnhanceSucceedEffect.SetActive(true);
+ }
+ this.m_EnhanceSucceedEffect.Play(this.m_effectsTra, Vector3.zero, Vector3.one, 1f, true, false);
+ XSingleton<XTimerMgr>.singleton.KillTimer(this.m_effectToken);
+ this.m_effectToken = XSingleton<XTimerMgr>.singleton.SetTimer(this.m_delayTime, new XTimerMgr.ElapsedEventHandler(this.DelayRefresh), null);
+ }
+
+ private void PlayBreakSucceedEffect()
+ {
+ bool flag = this.m_BreakSucceedEffect == null;
+ if (flag)
+ {
+ this.m_BreakSucceedEffect = XSingleton<XFxMgr>.singleton.CreateFx(this.BreakSucPath, null, true);
+ }
+ else
+ {
+ this.m_BreakSucceedEffect.SetActive(true);
+ }
+ this.m_BreakSucceedEffect.Play(this.m_effectsTra, Vector3.zero, Vector3.one, 1f, true, false);
+ XSingleton<XTimerMgr>.singleton.KillTimer(this.m_effectToken);
+ this.m_effectToken = XSingleton<XTimerMgr>.singleton.SetTimer(this.m_delayTime, new XTimerMgr.ElapsedEventHandler(this.DelayRefresh), null);
+ }
+
+ private void PlayEnhanceLostEffect()
+ {
+ bool flag = this.m_EnhanceLostEffect == null;
+ if (flag)
+ {
+ this.m_EnhanceLostEffect = XSingleton<XFxMgr>.singleton.CreateFx(this.EnhanceLostPath, null, true);
+ }
+ else
+ {
+ this.m_EnhanceLostEffect.SetActive(true);
+ }
+ this.m_EnhanceLostEffect.Play(this.m_effectsTra, Vector3.zero, Vector3.one, 1f, true, false);
+ XSingleton<XTimerMgr>.singleton.KillTimer(this.m_effectToken);
+ this.m_effectToken = XSingleton<XTimerMgr>.singleton.SetTimer(this.m_delayTime, new XTimerMgr.ElapsedEventHandler(this.DelayRefresh), null);
+ }
+
+ private void DeActiveEffect()
+ {
+ bool flag = this.m_EnhanceSucceedEffect != null;
+ if (flag)
+ {
+ this.m_EnhanceSucceedEffect.SetActive(false);
+ }
+ bool flag2 = this.m_BreakSucceedEffect != null;
+ if (flag2)
+ {
+ this.m_BreakSucceedEffect.SetActive(false);
+ }
+ bool flag3 = this.m_EnhanceLostEffect != null;
+ if (flag3)
+ {
+ this.m_EnhanceLostEffect.SetActive(false);
+ }
+ }
+
+ private void FillContent()
+ {
+ bool flag = this.m_doc.rpcState == XEnhanceRpcState.ERS_RECEIVING;
+ if (!flag)
+ {
+ this.m_bIsCanClick = true;
+ XEquipItem xequipItem = XBagDocument.BagDoc.GetItemByUID(this.m_doc.selectedEquip) as XEquipItem;
+ bool flag2 = xequipItem == null;
+ if (!flag2)
+ {
+ EnhanceTable.RowData enhanceRowData = this.m_doc.GetEnhanceRowData(xequipItem);
+ bool flag3 = enhanceRowData != null;
+ if (flag3)
+ {
+ this.m_doc.IsNeedBreak = (enhanceRowData.IsNeedBreak > 0u);
+ }
+ this.FillTopInfo();
+ }
+ }
+ }
+
+ private void FillTopInfo()
+ {
+ XEquipItem xequipItem = XBagDocument.BagDoc.GetItemByUID(this.m_doc.selectedEquip) as XEquipItem;
+ bool flag = xequipItem == null;
+ if (!flag)
+ {
+ XSingleton<XItemDrawerMgr>.singleton.DrawItem(this.m_topItemGo, xequipItem);
+ IXUISprite ixuisprite = this.m_topItemGo.transform.Find("Icon").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.ID = ((xequipItem != null) ? xequipItem.uid : 0UL);
+ ixuisprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnSelectedItemClicked));
+ bool flag2 = xequipItem.enhanceInfo.EnhanceLevel >= this.m_doc.GetMaxEnhanceLevel();
+ if (flag2)
+ {
+ this.m_SuccessRateLab.gameObject.SetActive(false);
+ this.m_AddRateLab.gameObject.SetActive(false);
+ this.m_BreakRateLab.gameObject.SetActive(false);
+ }
+ else
+ {
+ EnhanceTable.RowData enhanceRowData = this.m_doc.GetEnhanceRowData(xequipItem);
+ bool flag3 = !this.m_doc.IsNeedBreak;
+ if (flag3)
+ {
+ this.m_SuccessRateLab.gameObject.SetActive(true);
+ this.m_AddRateLab.gameObject.SetActive(true);
+ this.m_BreakRateLab.gameObject.SetActive(false);
+ uint num = 0u;
+ uint num2 = 0u;
+ this.m_doc.GetSuccessRate(xequipItem, ref num, ref num2);
+ bool flag4 = num2 == 0u;
+ if (flag4)
+ {
+ this.m_SuccessRateLab.SetText(string.Format("[efd156]{0}{1}%[-]", XStringDefineProxy.GetString("EnhanceRate"), num));
+ }
+ else
+ {
+ this.m_SuccessRateLab.SetText(string.Format("[efd156]{0}{1}%[-] [63ff85]+ {2}%[-]", XStringDefineProxy.GetString("EnhanceRate"), num, num2));
+ }
+ this.m_AddRateLab.SetText(string.Format("{0}+{1}%", XStringDefineProxy.GetString("EnhanceAddRate"), enhanceRowData.UpRate));
+ }
+ else
+ {
+ this.m_SuccessRateLab.gameObject.SetActive(false);
+ this.m_AddRateLab.gameObject.SetActive(false);
+ this.m_BreakRateLab.gameObject.SetActive(true);
+ this.m_BreakRateLab.SetText(XStringDefineProxy.GetString("FullBreakRate"));
+ }
+ }
+ }
+ }
+
+ private void FillEnhanceInfo()
+ {
+ this.m_BeforeAttrPool.ReturnAll(false);
+ this.m_AfterAttrPool.ReturnAll(false);
+ this.m_EnhanceGo.SetActive(true);
+ XEquipItem xequipItem = XBagDocument.BagDoc.GetItemByUID(this.m_doc.selectedEquip) as XEquipItem;
+ bool flag = xequipItem == null;
+ if (!flag)
+ {
+ EnhanceTable.RowData enhanceRowData = this.m_doc.GetEnhanceRowData(xequipItem);
+ List<EnhanceAttr> list = new List<EnhanceAttr>();
+ bool isNeedBreak = this.m_doc.IsNeedBreak;
+ if (isNeedBreak)
+ {
+ this.m_TittleLab.SetText(XStringDefineProxy.GetString("BreakCons"));
+ this.m_EnhanceBtnLab.SetText(XStringDefineProxy.GetString("Break"));
+ this.m_TipsLab.SetText(XStringDefineProxy.GetString("AfterBreakCanEnhance"));
+ string @string = XStringDefineProxy.GetString("EnhanceLevel");
+ list.Add(new EnhanceAttr(@string, xequipItem.enhanceInfo.EnhanceLevel, xequipItem.enhanceInfo.EnhanceLevel + 1u));
+ list.AddRange(this.m_doc.EnhanceAttrLst);
+ }
+ else
+ {
+ this.m_TittleLab.SetText(XStringDefineProxy.GetString("EnhanceConsume"));
+ this.m_EnhanceBtnLab.SetText(XStringDefineProxy.GetString("XSys_Item_Enhance"));
+ this.m_TipsLab.SetText(XStringDefineProxy.GetString("EnhanceCanFullTrans"));
+ list = this.m_doc.EnhanceAttrLst;
+ }
+ float num = (float)((list.Count - 1) * this.m_gap / 2);
+ for (int i = 0; i < list.Count; i++)
+ {
+ GameObject gameObject = this.m_BeforeAttrPool.FetchGameObject(false);
+ gameObject.name = i.ToString();
+ gameObject.transform.parent = this.m_BeforeEnhanceGo.transform;
+ gameObject.transform.localScale = Vector3.one;
+ gameObject.transform.localPosition = new Vector3(0f, num - (float)(this.m_gap * i), 0f);
+ this.FillAttrWithName(gameObject, list[i]);
+ gameObject = this.m_AfterAttrPool.FetchGameObject(false);
+ gameObject.name = i.ToString();
+ gameObject.transform.parent = this.m_AfterEnhanceGo.transform;
+ gameObject.transform.localScale = Vector3.one;
+ gameObject.transform.localPosition = new Vector3(0f, num - (float)(this.m_gap * i), 0f);
+ this.FillAttrNoName(gameObject, list[i]);
+ }
+ this.FillCostItem(enhanceRowData);
+ }
+ }
+
+ private void FillMaxEnhanceInfo()
+ {
+ this.m_BeforeAttrPool.ReturnAll(false);
+ this.m_EnhanceMaxGo.SetActive(true);
+ float num = (float)((this.m_doc.EnhanceAttrLst.Count - 1) * this.m_gap / 2);
+ for (int i = 0; i < this.m_doc.EnhanceAttrLst.Count; i++)
+ {
+ GameObject gameObject = this.m_BeforeAttrPool.FetchGameObject(false);
+ gameObject.name = i.ToString();
+ gameObject.transform.parent = this.m_MaxAttrListGo.transform;
+ gameObject.transform.localScale = Vector3.one;
+ gameObject.transform.localPosition = new Vector3(0f, num - (float)(this.m_gap * i), 0f);
+ this.FillAttrWithName(gameObject, this.m_doc.EnhanceAttrLst[i]);
+ }
+ this.m_TipsLab.SetText(XStringDefineProxy.GetString("EnhanceCanFullTrans"));
+ XEquipItem xequipItem = XBagDocument.BagDoc.GetItemByUID(this.m_doc.selectedEquip) as XEquipItem;
+ bool flag = xequipItem == null;
+ if (!flag)
+ {
+ ItemList.RowData itemConf = XBagDocument.GetItemConf(xequipItem.itemID);
+ this.m_MaxTipsLab.SetText(XStringDefineProxy.GetString("CanEnhanceMaxLevel", new object[]
+ {
+ itemConf.ReqLevel,
+ this.m_doc.GetMaxEnhanceLevel()
+ }));
+ }
+ }
+
+ private void FillAttrWithName(GameObject go, EnhanceAttr attr)
+ {
+ IXUILabel ixuilabel = go.transform.GetComponent("XUILabel") as IXUILabel;
+ ixuilabel.SetText(attr.Name);
+ ixuilabel = (go.transform.Find("Value").GetComponent("XUILabel") as IXUILabel);
+ ixuilabel.SetText(attr.BeforeAttrNum.ToString());
+ }
+
+ private void FillAttrNoName(GameObject go, EnhanceAttr attr)
+ {
+ IXUILabel ixuilabel = go.transform.GetComponent("XUILabel") as IXUILabel;
+ ixuilabel.SetText(attr.AfterAttrNum.ToString());
+ bool flag = attr.D_value == 0;
+ if (flag)
+ {
+ go.transform.Find("Up").gameObject.SetActive(false);
+ go.transform.Find("Down").gameObject.SetActive(false);
+ }
+ else
+ {
+ bool flag2 = attr.D_value > 0;
+ if (flag2)
+ {
+ go.transform.Find("Down").gameObject.SetActive(false);
+ ixuilabel = (go.transform.Find("Up").GetComponent("XUILabel") as IXUILabel);
+ ixuilabel.SetText(string.Format("[63ff85]{0}[-]", attr.D_value));
+ ixuilabel.gameObject.SetActive(true);
+ }
+ else
+ {
+ go.transform.Find("Up").gameObject.SetActive(false);
+ ixuilabel = (go.transform.Find("Down").GetComponent("XUILabel") as IXUILabel);
+ ixuilabel.SetText(string.Format("[ff3e3e]{0}[-]", -attr.D_value));
+ ixuilabel.gameObject.SetActive(true);
+ }
+ }
+ }
+
+ private void FillCostItem(EnhanceTable.RowData rowData)
+ {
+ for (int i = 0; i < this.m_costItemTras.Count; i++)
+ {
+ bool flag = rowData.NeedItem.Count <= i;
+ if (flag)
+ {
+ this.m_costItemTras[i].gameObject.SetActive(false);
+ }
+ else
+ {
+ this.m_costItemTras[i].gameObject.SetActive(true);
+ ItemList.RowData itemConf = XBagDocument.GetItemConf((int)rowData.NeedItem[i, 0]);
+ bool flag2 = itemConf != null;
+ if (flag2)
+ {
+ IXUISprite ixuisprite = this.m_costItemTras[i].Find("Icon").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.SetSprite(itemConf.ItemIcon1[0]);
+ }
+ ulong itemCountByID = this.m_doc.GetItemCountByID(rowData.NeedItem[i, 0]);
+ IXUILabel ixuilabel = this.m_costItemTras[i].GetComponent("XUILabel") as IXUILabel;
+ bool flag3 = itemCountByID >= (ulong)rowData.NeedItem[i, 1];
+ if (flag3)
+ {
+ ixuilabel.SetText(string.Format("{0}/{1}", XSingleton<UiUtility>.singleton.NumberFormat(itemCountByID), rowData.NeedItem[i, 1]));
+ }
+ else
+ {
+ ixuilabel.SetText(string.Format(XStringDefineProxy.GetString("COMMON_COUNT_TOTAL_NOTENOUGH_FMT"), XSingleton<UiUtility>.singleton.NumberFormat(itemCountByID), rowData.NeedItem[i, 1]));
+ }
+ IXUIButton ixuibutton = this.m_costItemTras[i].Find("LabBtn").GetComponent("XUIButton") as IXUIButton;
+ bool flag4 = itemCountByID < (ulong)rowData.NeedItem[i, 1];
+ if (flag4)
+ {
+ ixuibutton.gameObject.SetActive(true);
+ ixuibutton.ID = (ulong)rowData.NeedItem[i, 0];
+ ixuibutton.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnGetItemAccess));
+ }
+ else
+ {
+ ixuibutton.gameObject.SetActive(false);
+ }
+ }
+ }
+ }
+
+ private void DelayPlayEffect(object o = null)
+ {
+ bool flag = this.m_doc.rpcState == XEnhanceRpcState.ERS_ENHANCESUCCEED;
+ if (flag)
+ {
+ this.PlayEnhanceSucceedEffect();
+ }
+ else
+ {
+ bool flag2 = this.m_doc.rpcState == XEnhanceRpcState.ERS_BREAKSUCCEED;
+ if (flag2)
+ {
+ this.PlayBreakSucceedEffect();
+ }
+ else
+ {
+ bool flag3 = this.m_doc.rpcState == XEnhanceRpcState.ERS_ENHANCEFAIED;
+ if (flag3)
+ {
+ this.PlayEnhanceLostEffect();
+ }
+ else
+ {
+ this.FillContent();
+ this.FillAttrUi();
+ }
+ }
+ }
+ }
+
+ private void DelayRefresh(object o = null)
+ {
+ this.FillContent();
+ this.FillAttrUi();
+ }
+
+ private bool _OnCloseClicked(IXUIButton btn)
+ {
+ base.SetVisible(false);
+ return true;
+ }
+
+ private bool OnGetItemAccess(IXUIButton btn)
+ {
+ int itemid = (int)btn.ID;
+ this.DeActiveEffect();
+ XSingleton<UiUtility>.singleton.ShowItemAccess(itemid, null);
+ return true;
+ }
+
+ private void OnSelectedItemClicked(IXUISprite iSp)
+ {
+ ulong id = iSp.ID;
+ XSingleton<UiUtility>.singleton.ShowTooltipDialog(XSingleton<XGame>.singleton.Doc.XBagDoc.GetItemByUID(id), null, iSp, false, 0u);
+ }
+
+ public void OnEquipClicked(IXUISprite iSp)
+ {
+ this.m_doc.SelectEquip(iSp.ID);
+ }
+
+ private bool OnEnhanceClicked(IXUIButton btn)
+ {
+ bool flag = !this.m_bIsCanClick;
+ bool result;
+ if (flag)
+ {
+ result = true;
+ }
+ else
+ {
+ bool flag2 = this.SetButtonCool(this.m_delayTime);
+ if (flag2)
+ {
+ result = true;
+ }
+ else
+ {
+ XEquipItem xequipItem = XBagDocument.BagDoc.GetItemByUID(this.m_doc.selectedEquip) as XEquipItem;
+ bool flag3 = xequipItem == null;
+ if (flag3)
+ {
+ result = true;
+ }
+ else
+ {
+ bool flag4 = xequipItem.enhanceInfo.EnhanceLevel >= this.m_doc.GetMaxEnhanceLevel();
+ if (flag4)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString("EnhanceMoreThanMax"), "fece00");
+ result = true;
+ }
+ else
+ {
+ EnhanceTable.RowData enhanceRowData = this.m_doc.GetEnhanceRowData(xequipItem);
+ bool flag5 = enhanceRowData != null;
+ if (flag5)
+ {
+ for (int i = 0; i < enhanceRowData.NeedItem.Count; i++)
+ {
+ ulong itemCountByID = this.m_doc.GetItemCountByID(enhanceRowData.NeedItem[i, 0]);
+ bool flag6 = itemCountByID < (ulong)enhanceRowData.NeedItem[i, 1];
+ if (flag6)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString("ERR_REINFORCE_LACKMONEY"), "fece00");
+ return true;
+ }
+ }
+ }
+ else
+ {
+ XSingleton<XDebug>.singleton.AddErrorLog(xequipItem.itemID.ToString(), "is not find in enhanceTab", null, null, null, null);
+ }
+ this.m_doc.ReqEnhance();
+ result = true;
+ }
+ }
+ }
+ }
+ return result;
+ }
+
+ private bool SetButtonCool(float time)
+ {
+ float num = Time.realtimeSinceStartup - this.m_fLastClickBtnTime;
+ bool flag = num < time;
+ bool result;
+ if (flag)
+ {
+ result = true;
+ }
+ else
+ {
+ this.m_fLastClickBtnTime = Time.realtimeSinceStartup;
+ result = false;
+ }
+ return result;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/EnhanceView.cs.meta b/Client/Assets/Scripts/XMainClient/UI/EnhanceView.cs.meta
new file mode 100644
index 00000000..19d4941a
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/EnhanceView.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 2f4ca468c26697140967773b9e4348c4
+timeCreated: 1611403514
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/EquipCreateDlg.cs b/Client/Assets/Scripts/XMainClient/UI/EquipCreateDlg.cs
new file mode 100644
index 00000000..29df6591
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/EquipCreateDlg.cs
@@ -0,0 +1,143 @@
+using System;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class EquipCreateDlg : TabDlgBase<EquipCreateDlg>
+ {
+ public override string fileName
+ {
+ get
+ {
+ return "GameSystem/EquipCreateDlg";
+ }
+ }
+
+ public override int group
+ {
+ get
+ {
+ return 1;
+ }
+ }
+
+ protected override bool bHorizontal
+ {
+ get
+ {
+ return false;
+ }
+ }
+
+ public EquipSetHandler equipSetHandler;
+
+ private GameObject equipSetFrame;
+
+ public EmblemSetHandler emblemSetHandler;
+
+ private GameObject emblemSetFrame;
+
+ public EquipSetCreateHandler equipSetCreateHandler;
+
+ private GameObject equipSetCreateFrame;
+
+ public EquipSetCreateConfirmHandler equipSetCreateConfirmHandler;
+
+ private GameObject equipSetCreateConfirmFrame;
+
+ public ArtifactSetHandler m_artifactSetHandler;
+
+ private GameObject m_artifactSetFrame;
+
+ public IXUIButton m_Help;
+
+ protected override void Init()
+ {
+ base.Init();
+ this.m_Help = (base.uiBehaviour.transform.Find("Bg/Help").GetComponent("XUIButton") as IXUIButton);
+ base.RegisterSubSysRedPointMgr(XSysDefine.XSys_EquipCreate);
+ }
+
+ protected override void OnLoad()
+ {
+ base.OnLoad();
+ this.equipSetFrame = base.uiBehaviour.transform.Find("Bg/EquipSetFrame").gameObject;
+ this.emblemSetFrame = base.uiBehaviour.transform.Find("Bg/EmblemSetFrame").gameObject;
+ this.equipSetCreateFrame = base.uiBehaviour.transform.Find("Bg/EquipSetCreateFrame").gameObject;
+ this.equipSetCreateConfirmFrame = base.uiBehaviour.transform.Find("Bg/EquipSetCreateConfirmFrame").gameObject;
+ this.m_artifactSetFrame = base.uiBehaviour.transform.Find("Bg/ArtifactSetFrame").gameObject;
+ DlgHandlerBase.EnsureCreate<EquipSetHandler>(ref this.equipSetHandler, this.equipSetFrame, null, false);
+ DlgHandlerBase.EnsureCreate<EmblemSetHandler>(ref this.emblemSetHandler, this.emblemSetFrame, null, false);
+ DlgHandlerBase.EnsureCreate<EquipSetCreateHandler>(ref this.equipSetCreateHandler, this.equipSetCreateFrame, null, false);
+ DlgHandlerBase.EnsureCreate<EquipSetCreateConfirmHandler>(ref this.equipSetCreateConfirmHandler, this.equipSetCreateConfirmFrame, null, false);
+ DlgHandlerBase.EnsureCreate<ArtifactSetHandler>(ref this.m_artifactSetHandler, this.m_artifactSetFrame, null, false);
+ }
+
+ protected override void OnUnload()
+ {
+ DlgHandlerBase.EnsureUnload<EquipSetCreateHandler>(ref this.equipSetCreateHandler);
+ this.equipSetCreateFrame = null;
+ DlgHandlerBase.EnsureUnload<EquipSetCreateConfirmHandler>(ref this.equipSetCreateConfirmHandler);
+ this.equipSetCreateConfirmFrame = null;
+ DlgHandlerBase.EnsureUnload<EquipSetHandler>(ref this.equipSetHandler);
+ this.equipSetFrame = null;
+ DlgHandlerBase.EnsureUnload<EmblemSetHandler>(ref this.emblemSetHandler);
+ this.emblemSetFrame = null;
+ DlgHandlerBase.EnsureUnload<ArtifactSetHandler>(ref this.m_artifactSetHandler);
+ this.m_artifactSetFrame = null;
+ base.OnUnload();
+ }
+
+ public override void SetupRedpointEx()
+ {
+ base.SetupRedpointEx();
+ }
+
+ public override void StackRefresh()
+ {
+ for (int i = 0; i < this.m_ActiveHandlers.Count; i++)
+ {
+ bool flag = this.m_ActiveHandlers[i] != null;
+ if (flag)
+ {
+ this.m_ActiveHandlers[i].StackRefresh();
+ }
+ }
+ base.StackRefresh();
+ }
+
+ public override void SetupHandlers(XSysDefine sys)
+ {
+ switch (sys)
+ {
+ case XSysDefine.XSys_EquipCreate_EquipSet:
+ base._AddActiveHandler(DlgHandlerBase.EnsureCreate<EquipSetHandler>(ref this.equipSetHandler, this.equipSetFrame, this, true));
+ break;
+ case XSysDefine.XSys_EquipCreate_EmblemSet:
+ base._AddActiveHandler(DlgHandlerBase.EnsureCreate<EmblemSetHandler>(ref this.emblemSetHandler, this.emblemSetFrame, this, true));
+ break;
+ case XSysDefine.XSys_EquipCreate_ArtifactSet:
+ base._AddActiveHandler(DlgHandlerBase.EnsureCreate<ArtifactSetHandler>(ref this.m_artifactSetHandler, this.m_artifactSetFrame, this, true));
+ break;
+ default:
+ XSingleton<XDebug>.singleton.AddErrorLog("System has not finished:", sys.ToString(), null, null, null, null);
+ break;
+ }
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ this.m_Help.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnHelpClicked));
+ }
+
+ public bool OnHelpClicked(IXUIButton button)
+ {
+ DlgBase<XCommonHelpTipView, XCommonHelpTipBehaviour>.singleton.ShowHelp(XSysDefine.XSys_EquipCreate);
+ return true;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/EquipCreateDlg.cs.meta b/Client/Assets/Scripts/XMainClient/UI/EquipCreateDlg.cs.meta
new file mode 100644
index 00000000..77bd4bc4
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/EquipCreateDlg.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 3497745796ccbfc47b44a55454605006
+timeCreated: 1611403556
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/EquipFusionHandler.cs b/Client/Assets/Scripts/XMainClient/UI/EquipFusionHandler.cs
new file mode 100644
index 00000000..b5a7d21c
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/EquipFusionHandler.cs
@@ -0,0 +1,732 @@
+using System;
+using System.Collections.Generic;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class EquipFusionHandler : DlgHandlerBase
+ {
+ public string FxPath
+ {
+ get
+ {
+ bool flag = string.IsNullOrEmpty(this.m_fxPath);
+ if (flag)
+ {
+ this.m_fxPath = XSingleton<XGlobalConfig>.singleton.GetValue("EquipfuseEffectPath");
+ }
+ return this.m_fxPath;
+ }
+ }
+
+ protected override string FileName
+ {
+ get
+ {
+ return "ItemNew/EquipFusionFrame";
+ }
+ }
+
+ private EquipFusionDocument m_doc;
+
+ private EquipFusionSelectHandler m_selectHandler;
+
+ private IXUIButton m_closedBtn;
+
+ private IXUIButton m_helpBtn;
+
+ private IXUIButton m_fuseHelpBtn;
+
+ private IXUIButton m_fuseBtn;
+
+ private IXUILabel m_breakLevelLab;
+
+ private IXUILabel m_processValueLab;
+
+ private IXUILabel m_previewValueLab;
+
+ private IXUILabel m_contentLab;
+
+ private IXUILabelSymbol m_symbolLab;
+
+ private IXUILabel m_tipsLab;
+
+ private IXUIProgress m_process;
+
+ private IXUISprite m_addSpr;
+
+ private IXUISprite m_previewSpr;
+
+ private GameObject m_equipItemGo;
+
+ private GameObject m_itemGo;
+
+ private GameObject m_contentGo;
+
+ private XUIPool m_tplPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ private List<GameObject> m_itemsGoList;
+
+ private bool m_materialIsEnough = true;
+
+ private float m_delayTime = 0.5f;
+
+ private float m_fLastClickBtnTime = 0f;
+
+ private XFx m_fuseBreakFx;
+
+ private XFx m_fx;
+
+ private string m_fxPath = string.Empty;
+
+ protected override void Init()
+ {
+ base.Init();
+ this.m_doc = EquipFusionDocument.Doc;
+ this.m_doc.Handler = this;
+ this.m_closedBtn = (base.PanelObject.transform.Find("Close").GetComponent("XUIButton") as IXUIButton);
+ this.m_helpBtn = (base.PanelObject.transform.Find("Help").GetComponent("XUIButton") as IXUIButton);
+ Transform transform = base.PanelObject.transform.Find("Top");
+ this.m_equipItemGo = transform.Find("FuseItem").gameObject;
+ this.m_symbolLab = (transform.Find("Name").GetComponent("XUILabelSymbol") as IXUILabelSymbol);
+ this.m_breakLevelLab = (transform.Find("RzLabel").GetComponent("XUILabel") as IXUILabel);
+ transform = base.PanelObject.transform.Find("Process");
+ this.m_contentGo = transform.Find("Panel/Content").gameObject;
+ this.m_contentLab = (this.m_contentGo.transform.GetComponent("XUILabel") as IXUILabel);
+ this.m_contentGo.SetActive(false);
+ this.m_processValueLab = (transform.Find("ProcessValue").GetComponent("XUILabel") as IXUILabel);
+ this.m_process = (transform.Find("Slider").GetComponent("XUIProgress") as IXUIProgress);
+ this.m_fuseHelpBtn = (transform.Find("Help").GetComponent("XUIButton") as IXUIButton);
+ this.m_previewValueLab = (transform.Find("PreviewValue").GetComponent("XUILabel") as IXUILabel);
+ this.m_previewSpr = (transform.Find("Slider/preview").GetComponent("XUISprite") as IXUISprite);
+ transform = base.PanelObject.transform.Find("ResultPanel");
+ this.m_tplPool.SetupPool(transform.gameObject, transform.Find("Tpl").gameObject, 2u, false);
+ transform = base.PanelObject.transform.Find("Bottom");
+ this.m_itemGo = transform.Find("Item").gameObject;
+ this.m_addSpr = (transform.Find("BoxAdd").GetComponent("XUISprite") as IXUISprite);
+ this.m_fuseBtn = (transform.Find("FuseBtn").GetComponent("XUIButton") as IXUIButton);
+ this.m_tipsLab = (transform.Find("BoxAdd/T").GetComponent("XUILabel") as IXUILabel);
+ this.m_itemsGoList = new List<GameObject>();
+ transform = transform.Find("Items");
+ for (int i = 0; i < transform.childCount; i++)
+ {
+ this.m_itemsGoList.Add(transform.GetChild(i).gameObject);
+ }
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ this.m_closedBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnClosed));
+ this.m_helpBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnHelp));
+ this.m_fuseHelpBtn.RegisterPressEventHandler(new ButtonPressEventHandler(this.OnFuseHelpPress));
+ this.m_fuseBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnFuse));
+ this.m_addSpr.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnSelectItem));
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ this.RefreshData();
+ }
+
+ protected override void OnHide()
+ {
+ base.OnHide();
+ DlgBase<ItemSystemDlg, TabDlgBehaviour>.singleton.OnPopHandlerSetVisible(false, null);
+ DlgBase<ItemSystemDlg, TabDlgBehaviour>.singleton.StackRefresh();
+ this.DeActiveEffect();
+ bool flag = DlgBase<ItemSystemDlg, TabDlgBehaviour>.singleton._equipHandler != null;
+ if (flag)
+ {
+ DlgBase<ItemSystemDlg, TabDlgBehaviour>.singleton._equipHandler.SelectEquip(0UL);
+ DlgBase<ItemSystemDlg, TabDlgBehaviour>.singleton._equipHandler.RegisterItemClickEvents(null);
+ }
+ bool flag2 = this.m_selectHandler != null;
+ if (flag2)
+ {
+ this.m_selectHandler.SetVisible(false);
+ }
+ }
+
+ public override void OnUnload()
+ {
+ base.OnUnload();
+ DlgHandlerBase.EnsureUnload<EquipFusionSelectHandler>(ref this.m_selectHandler);
+ bool flag = this.m_fx != null;
+ if (flag)
+ {
+ XSingleton<XFxMgr>.singleton.DestroyFx(this.m_fx, true);
+ this.m_fx = null;
+ }
+ bool flag2 = this.m_fuseBreakFx != null;
+ if (flag2)
+ {
+ XSingleton<XFxMgr>.singleton.DestroyFx(this.m_fuseBreakFx, true);
+ this.m_fuseBreakFx = null;
+ }
+ }
+
+ public override void RefreshData()
+ {
+ base.RefreshData();
+ bool flag = DlgBase<ItemSystemDlg, TabDlgBehaviour>.singleton._equipHandler != null;
+ if (flag)
+ {
+ DlgBase<ItemSystemDlg, TabDlgBehaviour>.singleton._equipHandler.RegisterItemClickEvents(new SpriteClickEventHandler(this.OnEquipClicked));
+ }
+ XItem itemByUID = XSingleton<XGame>.singleton.Doc.XBagDoc.EquipBag.GetItemByUID(this.m_doc.SelectUid);
+ bool flag2 = itemByUID == null;
+ if (flag2)
+ {
+ this.m_doc.SelectEquip(0UL);
+ }
+ else
+ {
+ this.m_doc.SelectEquip(this.m_doc.SelectUid);
+ }
+ this.FillContent();
+ }
+
+ public override void StackRefresh()
+ {
+ base.StackRefresh();
+ this.RefreshData();
+ }
+
+ public void ShowUI(bool playEffect = false)
+ {
+ if (playEffect)
+ {
+ this.PlayBreakEffect();
+ }
+ this.FillContent();
+ }
+
+ private void PlayBreakEffect()
+ {
+ bool flag = this.m_fx == null;
+ if (flag)
+ {
+ this.m_fx = XSingleton<XFxMgr>.singleton.CreateFx(this.FxPath, null, true);
+ }
+ else
+ {
+ this.m_fx.SetActive(true);
+ }
+ this.m_fx.Play(base.PanelObject.transform.Find("Effect"), Vector3.zero, Vector3.one, 1f, true, false);
+ }
+
+ private void FillContent()
+ {
+ this.m_contentGo.SetActive(false);
+ XItem itemByUID = XBagDocument.BagDoc.GetItemByUID(this.m_doc.SelectUid);
+ bool flag = itemByUID == null || itemByUID.Type != ItemType.EQUIP;
+ if (!flag)
+ {
+ EquipList.RowData equipConf = XBagDocument.GetEquipConf(itemByUID.itemID);
+ bool flag2 = equipConf == null;
+ if (!flag2)
+ {
+ XSingleton<XItemDrawerMgr>.singleton.DrawItem(this.m_equipItemGo, itemByUID);
+ IXUISprite ixuisprite = this.m_equipItemGo.transform.Find("Icon").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.ID = itemByUID.uid;
+ ixuisprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnClickItem));
+ this.SetEffect(this.m_equipItemGo, (itemByUID as XEquipItem).fuseInfo.BreakNum);
+ XEquipItem xequipItem = itemByUID as XEquipItem;
+ bool flag3 = equipConf.FuseCanBreakNum > 0;
+ if (flag3)
+ {
+ this.m_breakLevelLab.SetText(string.Format(XSingleton<XStringTable>.singleton.GetString("FuseBreakNum"), xequipItem.fuseInfo.BreakNum, equipConf.FuseCanBreakNum));
+ }
+ else
+ {
+ this.m_breakLevelLab.SetText("");
+ }
+ bool flag4 = itemByUID.itemConf != null;
+ if (flag4)
+ {
+ bool flag5 = xequipItem.fuseInfo.BreakNum > 0u;
+ string text;
+ if (flag5)
+ {
+ text = this.m_doc.GetFuseIconName(xequipItem.fuseInfo.BreakNum);
+ bool flag6 = text != "";
+ if (flag6)
+ {
+ text = XLabelSymbolHelper.FormatAnimation("Item/Item", text, 10);
+ }
+ text = string.Format("{0}[{1}]{2}", text, XSingleton<UiUtility>.singleton.GetItemQualityColorStr((int)itemByUID.itemConf.ItemQuality), itemByUID.itemConf.ItemName[0]);
+ bool flag7 = xequipItem.enhanceInfo.EnhanceLevel > 0u;
+ if (flag7)
+ {
+ text = XSingleton<XCommon>.singleton.StringCombine(text, "+", xequipItem.enhanceInfo.EnhanceLevel.ToString());
+ }
+ }
+ else
+ {
+ text = string.Format("[{0}]{1}", XSingleton<UiUtility>.singleton.GetItemQualityColorStr((int)itemByUID.itemConf.ItemQuality), itemByUID.itemConf.ItemName[0]);
+ bool flag8 = xequipItem.enhanceInfo.EnhanceLevel > 0u;
+ if (flag8)
+ {
+ text = string.Format("{0}+{1}", text, xequipItem.enhanceInfo.EnhanceLevel);
+ }
+ }
+ this.m_symbolLab.InputText = text;
+ }
+ this.m_contentLab.SetText(XSingleton<XStringTable>.singleton.GetString("EquipFuseTips"));
+ this.FillAttribute();
+ this.FillButtom(xequipItem.fuseInfo, equipConf);
+ }
+ }
+ }
+
+ private void FillAttribute()
+ {
+ this.m_tplPool.ReturnAll(false);
+ float num = (float)((this.m_doc.FuseDataList.Count - 1) * this.m_tplPool.TplHeight / 2);
+ for (int i = 0; i < this.m_doc.FuseDataList.Count; i++)
+ {
+ GameObject gameObject = this.m_tplPool.FetchGameObject(false);
+ gameObject.name = i.ToString();
+ gameObject.transform.localScale = Vector3.one;
+ gameObject.transform.localPosition = new Vector3(0f, num - (float)(i * this.m_tplPool.TplHeight), 0f);
+ EquipFuseData equipFuseData = this.m_doc.FuseDataList[i];
+ IXUILabel ixuilabel = gameObject.transform.Find("Now").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel.SetText(string.Format("{0}", XStringDefineProxy.GetString((XAttributeDefine)equipFuseData.AttrId)));
+ ixuilabel = (gameObject.transform.Find("Now/NowValue").GetComponent("XUILabel") as IXUILabel);
+ ixuilabel.SetText(equipFuseData.BeforeAddNum.ToString());
+ ixuilabel = (gameObject.transform.Find("AfterValue").GetComponent("XUILabel") as IXUILabel);
+ ixuilabel.SetText(equipFuseData.AfterAddNum.ToString());
+ uint upNum = equipFuseData.UpNum;
+ ixuilabel = (gameObject.transform.Find("Up").GetComponent("XUILabel") as IXUILabel);
+ bool flag = upNum == 0u;
+ if (flag)
+ {
+ ixuilabel.gameObject.SetActive(false);
+ }
+ else
+ {
+ ixuilabel.gameObject.SetActive(true);
+ ixuilabel.SetText(string.Format("+{0}", upNum));
+ }
+ }
+ }
+
+ private void SetItemActive(bool flag)
+ {
+ bool flag2 = this.m_itemsGoList == null;
+ if (!flag2)
+ {
+ for (int i = 0; i < this.m_itemsGoList.Count; i++)
+ {
+ this.m_itemsGoList[i].SetActive(false);
+ }
+ }
+ }
+
+ private void FillButtom(XequipFuseInfo info, EquipList.RowData row)
+ {
+ bool flag = XSingleton<XEntityMgr>.singleton.Player == null;
+ if (!flag)
+ {
+ EquipFusionTable.RowData fuseData = this.m_doc.GetFuseData(XSingleton<XEntityMgr>.singleton.Player.BasicTypeID, row, info.BreakNum);
+ bool flag2 = fuseData == null;
+ if (!flag2)
+ {
+ this.FillNeedItem(row.ItemID, fuseData);
+ IXUILabel ixuilabel = this.m_fuseBtn.gameObject.transform.Find("T").GetComponent("XUILabel") as IXUILabel;
+ bool isBreak = this.m_doc.IsBreak;
+ if (isBreak)
+ {
+ this.m_tipsLab.SetText(XSingleton<XStringTable>.singleton.GetString("EquipFuseNoCoreItem"));
+ ixuilabel.SetText(XSingleton<XStringTable>.singleton.GetString("CATD_ATTRIBUTE_ACTIVE2"));
+ }
+ else
+ {
+ this.m_tipsLab.SetText(XSingleton<XStringTable>.singleton.GetString("EquipFuseNoCoreItem1"));
+ ixuilabel.SetText(XSingleton<XStringTable>.singleton.GetString("EquipFusion"));
+ }
+ IXUISprite ixuisprite = this.m_fuseBtn.gameObject.GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.SetGrey(!this.m_doc.IsMax);
+ }
+ }
+ }
+
+ private void FillNeedItem(int itemId, EquipFusionTable.RowData fuseRow)
+ {
+ bool isBreak = this.m_doc.IsBreak;
+ if (isBreak)
+ {
+ this.m_itemGo.SetActive(false);
+ this.SetItemActive(false);
+ this.m_addSpr.gameObject.SetActive(false);
+ this.m_materialIsEnough = true;
+ this.UpdateProcessBar();
+ int num = 0;
+ while (num < (int)fuseRow.BreakNeedMaterial.count && num < this.m_itemsGoList.Count)
+ {
+ ItemList.RowData itemConf = XBagDocument.GetItemConf((int)fuseRow.BreakNeedMaterial[num, 0]);
+ bool flag = itemConf == null;
+ if (!flag)
+ {
+ GameObject gameObject = this.m_itemsGoList[num];
+ gameObject.SetActive(true);
+ XSingleton<XItemDrawerMgr>.singleton.normalItemDrawer.DrawItem(gameObject, (int)fuseRow.BreakNeedMaterial[num, 0], 0, false);
+ IXUILabel ixuilabel = gameObject.transform.Find("Num").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel.gameObject.SetActive(true);
+ ulong itemCount = XBagDocument.BagDoc.GetItemCount((int)fuseRow.BreakNeedMaterial[num, 0]);
+ IXUISprite ixuisprite = gameObject.transform.Find("Icon").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.RegisterSpriteClickEventHandler(null);
+ bool flag2 = itemConf.ItemType == 3;
+ if (flag2)
+ {
+ ixuilabel.SetText(fuseRow.BreakNeedMaterial[num, 1].ToString());
+ bool flag3 = (ulong)fuseRow.BreakNeedMaterial[num, 1] > itemCount;
+ if (flag3)
+ {
+ ixuilabel.SetText(string.Format("[ff0000]{0}[-]", fuseRow.BreakNeedMaterial[num, 1]));
+ this.m_materialIsEnough = false;
+ }
+ else
+ {
+ ixuilabel.SetText(fuseRow.BreakNeedMaterial[num, 1].ToString());
+ }
+ }
+ else
+ {
+ bool flag4 = (ulong)fuseRow.BreakNeedMaterial[num, 1] > itemCount;
+ if (flag4)
+ {
+ ixuilabel.SetText(string.Format("{0} [ff0000]{1}[-]/{2}", itemConf.ItemName[0], itemCount, fuseRow.BreakNeedMaterial[num, 1]));
+ this.m_materialIsEnough = false;
+ ixuisprite.ID = (ulong)fuseRow.BreakNeedMaterial[num, 0];
+ ixuisprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnClickItemIcon));
+ }
+ else
+ {
+ ixuilabel.SetText(string.Format("{0} [00ff00]{1}[-]/{2}", itemConf.ItemName[0], itemCount, fuseRow.BreakNeedMaterial[num, 1]));
+ }
+ }
+ }
+ num++;
+ }
+ }
+ else
+ {
+ this.UpdateItem();
+ }
+ }
+
+ public void UpdateItem()
+ {
+ this.SetItemActive(false);
+ this.m_addSpr.gameObject.SetActive(true);
+ this.m_materialIsEnough = true;
+ this.UpdateProcessBar();
+ bool flag = this.m_doc.MaterialId == 0;
+ if (flag)
+ {
+ this.m_materialIsEnough = false;
+ this.m_itemGo.SetActive(false);
+ }
+ else
+ {
+ bool flag2 = XSingleton<XEntityMgr>.singleton.Player == null;
+ if (!flag2)
+ {
+ XItem itemByUID = XBagDocument.BagDoc.GetItemByUID(this.m_doc.SelectUid);
+ bool flag3 = itemByUID == null || itemByUID.Type != ItemType.EQUIP;
+ if (!flag3)
+ {
+ EquipList.RowData equipConf = XBagDocument.GetEquipConf(itemByUID.itemID);
+ bool flag4 = equipConf == null;
+ if (!flag4)
+ {
+ XEquipItem xequipItem = itemByUID as XEquipItem;
+ EquipFusionTable.RowData fuseData = this.m_doc.GetFuseData(XSingleton<XEntityMgr>.singleton.Player.BasicTypeID, equipConf, xequipItem.fuseInfo.BreakNum);
+ bool flag5 = fuseData == null;
+ if (!flag5)
+ {
+ uint addExp = this.m_doc.GetAddExp((uint)this.m_doc.MaterialId);
+ uint num = (fuseData.NeedExpPerLevel % addExp == 0u) ? (fuseData.NeedExpPerLevel / addExp) : (fuseData.NeedExpPerLevel / addExp + 1u);
+ ulong itemCount = XBagDocument.BagDoc.GetItemCount(this.m_doc.MaterialId);
+ this.m_itemGo.SetActive(true);
+ XSingleton<XItemDrawerMgr>.singleton.normalItemDrawer.DrawItem(this.m_itemGo, this.m_doc.MaterialId, 0, false);
+ IXUILabel ixuilabel = this.m_itemGo.transform.Find("Num").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel.gameObject.SetActive(true);
+ bool flag6 = itemCount >= (ulong)num;
+ if (flag6)
+ {
+ ixuilabel.SetText(string.Format("[00ff00]{0}[-]/{1}", itemCount, num));
+ }
+ else
+ {
+ this.m_materialIsEnough = false;
+ ixuilabel.SetText(string.Format("[ff0000]{0}[-]/{1}", itemCount, num));
+ }
+ SeqListRef<uint> assistItems = this.m_doc.GetAssistItems((uint)this.m_doc.MaterialId);
+ int num2 = 0;
+ while (num2 < (int)assistItems.count && num2 < this.m_itemsGoList.Count)
+ {
+ ItemList.RowData itemConf = XBagDocument.GetItemConf((int)assistItems[num2, 0]);
+ bool flag7 = itemConf == null;
+ if (!flag7)
+ {
+ GameObject gameObject = this.m_itemsGoList[num2];
+ gameObject.SetActive(true);
+ XSingleton<XItemDrawerMgr>.singleton.normalItemDrawer.DrawItem(gameObject, (int)assistItems[num2, 0], 0, false);
+ ixuilabel = (gameObject.transform.Find("Num").GetComponent("XUILabel") as IXUILabel);
+ ixuilabel.gameObject.SetActive(true);
+ itemCount = XBagDocument.BagDoc.GetItemCount((int)assistItems[num2, 0]);
+ IXUISprite ixuisprite = gameObject.transform.Find("Icon").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.RegisterSpriteClickEventHandler(null);
+ bool flag8 = itemConf.ItemType == 3;
+ if (flag8)
+ {
+ bool flag9 = (ulong)(assistItems[num2, 1] * num) > itemCount;
+ if (flag9)
+ {
+ ixuilabel.SetText(string.Format("[ff0000]{0}[-]", assistItems[num2, 1] * num));
+ this.m_materialIsEnough = false;
+ }
+ else
+ {
+ ixuilabel.SetText((assistItems[num2, 1] * num).ToString());
+ }
+ }
+ else
+ {
+ bool flag10 = (ulong)(assistItems[num2, 1] * num) > itemCount;
+ if (flag10)
+ {
+ ixuilabel.SetText(string.Format("{0} [ff0000]{1}[-]/{2}", itemConf.ItemName[0], itemCount, assistItems[num2, 1] * num));
+ this.m_materialIsEnough = false;
+ ixuisprite.ID = (ulong)assistItems[num2, 0];
+ ixuisprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnClickItemIcon));
+ }
+ else
+ {
+ ixuilabel.SetText(string.Format("{0} [00ff00]{1}[-]/{2}", itemConf.ItemName[0], itemCount, assistItems[num2, 1] * num));
+ }
+ }
+ }
+ num2++;
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+
+ private void UpdateProcessBar()
+ {
+ XItem itemByUID = XBagDocument.BagDoc.GetItemByUID(this.m_doc.SelectUid);
+ bool flag = itemByUID == null || itemByUID.Type != ItemType.EQUIP;
+ if (!flag)
+ {
+ bool flag2 = XSingleton<XEntityMgr>.singleton.Player == null;
+ if (!flag2)
+ {
+ EquipList.RowData equipConf = XBagDocument.GetEquipConf(itemByUID.itemID);
+ bool flag3 = equipConf == null;
+ if (!flag3)
+ {
+ XEquipItem xequipItem = itemByUID as XEquipItem;
+ EquipFusionTable.RowData fuseData = this.m_doc.GetFuseData(XSingleton<XEntityMgr>.singleton.Player.BasicTypeID, equipConf, xequipItem.fuseInfo.BreakNum);
+ bool flag4 = fuseData == null;
+ if (!flag4)
+ {
+ uint num = fuseData.NeedExpPerLevel * fuseData.LevelNum;
+ this.m_processValueLab.SetText(string.Format("{0}/{1}", xequipItem.fuseInfo.FuseExp, num));
+ float num2 = xequipItem.fuseInfo.FuseExp / num;
+ this.m_process.value = ((num2 > 1f) ? 1f : num2);
+ bool flag5 = this.m_doc.MaterialId == 0 || this.m_doc.IsBreak;
+ if (flag5)
+ {
+ this.m_previewValueLab.SetText("");
+ this.m_previewSpr.SetFillAmount((num2 > 1f) ? 1f : num2);
+ }
+ else
+ {
+ uint num3 = this.m_doc.GetAddExp((uint)this.m_doc.MaterialId);
+ num3 = Math.Max(num3, fuseData.NeedExpPerLevel);
+ this.m_previewValueLab.SetText(string.Format("+{0}", num3));
+ num2 = (xequipItem.fuseInfo.FuseExp + num3) / num;
+ this.m_previewSpr.SetFillAmount((num2 > 1f) ? 1f : num2);
+ }
+ }
+ }
+ }
+ }
+ }
+
+ public void UpdateButtom()
+ {
+ XItem itemByUID = XBagDocument.BagDoc.GetItemByUID(this.m_doc.SelectUid);
+ bool flag = itemByUID == null || itemByUID.Type != ItemType.EQUIP;
+ if (!flag)
+ {
+ EquipList.RowData equipConf = XBagDocument.GetEquipConf(itemByUID.itemID);
+ bool flag2 = equipConf == null;
+ if (!flag2)
+ {
+ XEquipItem xequipItem = itemByUID as XEquipItem;
+ this.FillButtom(xequipItem.fuseInfo, equipConf);
+ }
+ }
+ }
+
+ private void DeActiveEffect()
+ {
+ bool flag = this.m_fx != null;
+ if (flag)
+ {
+ this.m_fx.SetActive(false);
+ }
+ bool flag2 = this.m_fuseBreakFx != null;
+ if (flag2)
+ {
+ this.m_fuseBreakFx.SetActive(false);
+ }
+ }
+
+ private void SetEffect(GameObject go, uint breakLevel)
+ {
+ bool flag = go == null;
+ if (!flag)
+ {
+ bool flag2 = this.m_fuseBreakFx != null;
+ if (flag2)
+ {
+ XSingleton<XFxMgr>.singleton.DestroyFx(this.m_fuseBreakFx, true);
+ this.m_fuseBreakFx = null;
+ }
+ string location;
+ bool flag3 = !this.m_doc.GetEffectPath(breakLevel, out location);
+ if (!flag3)
+ {
+ this.m_fuseBreakFx = XSingleton<XFxMgr>.singleton.CreateUIFx(location, go.transform.Find("Icon/Icon/Effects"), false);
+ XFx.SyncRefreshUIRenderQueue(this.m_fuseBreakFx);
+ }
+ }
+ }
+
+ private bool OnClosed(IXUIButton btn)
+ {
+ base.SetVisible(false);
+ return true;
+ }
+
+ private bool OnHelp(IXUIButton btn)
+ {
+ DlgBase<XCommonHelpTipView, XCommonHelpTipBehaviour>.singleton.ShowHelp(XSysDefine.XSys_EquipFusion);
+ return true;
+ }
+
+ private bool OnFuse(IXUIButton btn)
+ {
+ bool flag = this.SetButtonCool(this.m_delayTime);
+ bool result;
+ if (flag)
+ {
+ result = false;
+ }
+ else
+ {
+ bool isMax = this.m_doc.IsMax;
+ if (isMax)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XSingleton<XStringTable>.singleton.GetString("EquipFuseBreakMax"), "fece00");
+ result = false;
+ }
+ else
+ {
+ bool flag2 = !this.m_doc.IsBreak && this.m_doc.MaterialId == 0;
+ if (flag2)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XSingleton<XStringTable>.singleton.GetString("EquipFuseNoCoreItem1"), "fece00");
+ result = false;
+ }
+ else
+ {
+ bool flag3 = !this.m_materialIsEnough;
+ if (flag3)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XSingleton<XStringTable>.singleton.GetString("EquipFuseMaterialNotEnough"), "fece00");
+ result = false;
+ }
+ else
+ {
+ this.m_doc.ReqEquipFuseMes();
+ result = true;
+ }
+ }
+ }
+ }
+ return result;
+ }
+
+ private void OnSelectItem(IXUISprite spr)
+ {
+ bool flag = this.m_doc.IsBreak || this.m_doc.IsMax;
+ if (!flag)
+ {
+ DlgHandlerBase.EnsureCreate<EquipFusionSelectHandler>(ref this.m_selectHandler, base.PanelObject.transform, true, this);
+ }
+ }
+
+ private void OnClickItem(IXUISprite iSp)
+ {
+ ulong id = iSp.ID;
+ XItem xitem = XBagDocument.BagDoc.GetItemByUID(id);
+ bool flag = xitem == null;
+ if (flag)
+ {
+ xitem = XBagDocument.MakeXItem((int)id, false);
+ }
+ bool flag2 = xitem == null;
+ if (!flag2)
+ {
+ XSingleton<UiUtility>.singleton.ShowTooltipDialog(xitem, null, iSp, false, 0u);
+ }
+ }
+
+ public void OnEquipClicked(IXUISprite iSp)
+ {
+ this.m_doc.SelectEquip(iSp.ID);
+ }
+
+ private void OnClickItemIcon(IXUISprite spr)
+ {
+ int itemid = (int)spr.ID;
+ XSingleton<UiUtility>.singleton.ShowItemAccess(itemid, null);
+ }
+
+ private void OnFuseHelpPress(IXUIButton btn, bool isPressed)
+ {
+ this.m_contentGo.SetActive(isPressed);
+ }
+
+ private bool SetButtonCool(float time)
+ {
+ float num = Time.realtimeSinceStartup - this.m_fLastClickBtnTime;
+ bool flag = num < time;
+ bool result;
+ if (flag)
+ {
+ result = true;
+ }
+ else
+ {
+ this.m_fLastClickBtnTime = Time.realtimeSinceStartup;
+ result = false;
+ }
+ return result;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/EquipFusionHandler.cs.meta b/Client/Assets/Scripts/XMainClient/UI/EquipFusionHandler.cs.meta
new file mode 100644
index 00000000..860ed4f2
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/EquipFusionHandler.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 2396afd01ec002741af4abac3e36ca08
+timeCreated: 1611403455
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/EquipFusionSelectHandler.cs b/Client/Assets/Scripts/XMainClient/UI/EquipFusionSelectHandler.cs
new file mode 100644
index 00000000..efb796f5
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/EquipFusionSelectHandler.cs
@@ -0,0 +1,148 @@
+using System;
+using UILib;
+using UnityEngine;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class EquipFusionSelectHandler : DlgHandlerBase
+ {
+ protected override string FileName
+ {
+ get
+ {
+ return "ItemNew/EquipFusionSelectWindow";
+ }
+ }
+
+ private EquipFusionDocument m_doc;
+
+ private IXUIButton m_closeBtn;
+
+ private uint[] m_needMaterial;
+
+ private uint m_needExp = 0u;
+
+ private Transform m_parentTra;
+
+ private XUIPool m_tplPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ protected override void Init()
+ {
+ base.Init();
+ this.m_doc = EquipFusionDocument.Doc;
+ this.m_closeBtn = (base.PanelObject.transform.Find("Close").GetComponent("XUIButton") as IXUIButton);
+ this.m_parentTra = base.PanelObject.transform.Find("Bg/Panel");
+ this.m_tplPool.SetupPool(base.PanelObject.transform.Find("Bg").gameObject, this.m_parentTra.Find("ItemTpl").gameObject, 2u, false);
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ this.m_closeBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnClosed));
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ XItem itemByUID = XBagDocument.BagDoc.GetItemByUID(this.m_doc.SelectUid);
+ bool flag = itemByUID == null;
+ if (!flag)
+ {
+ EquipList.RowData equipConf = XBagDocument.GetEquipConf(itemByUID.itemID);
+ bool flag2 = equipConf == null;
+ if (!flag2)
+ {
+ this.m_needMaterial = equipConf.FuseCoreItems;
+ bool flag3 = XSingleton<XEntityMgr>.singleton.Player == null;
+ if (!flag3)
+ {
+ XEquipItem xequipItem = itemByUID as XEquipItem;
+ EquipFusionTable.RowData fuseData = this.m_doc.GetFuseData(XSingleton<XEntityMgr>.singleton.Player.BasicTypeID, equipConf, xequipItem.fuseInfo.BreakNum);
+ bool flag4 = fuseData == null;
+ if (!flag4)
+ {
+ this.m_needExp = fuseData.NeedExpPerLevel;
+ this.FillItems();
+ }
+ }
+ }
+ }
+ }
+
+ protected override void OnHide()
+ {
+ base.OnHide();
+ this.m_tplPool.ReturnAll(false);
+ }
+
+ public override void OnUnload()
+ {
+ base.OnUnload();
+ this.m_tplPool.ReturnAll(false);
+ }
+
+ public override void RefreshData()
+ {
+ base.RefreshData();
+ }
+
+ public override void StackRefresh()
+ {
+ base.StackRefresh();
+ }
+
+ private void FillItems()
+ {
+ this.m_tplPool.ReturnAll(false);
+ for (int i = 0; i < this.m_needMaterial.Length; i++)
+ {
+ GameObject gameObject = this.m_tplPool.FetchGameObject(false);
+ gameObject.transform.parent = this.m_parentTra;
+ gameObject.transform.localScale = Vector3.one;
+ gameObject.transform.localPosition = new Vector3((float)(this.m_tplPool.TplWidth * (i % 2)), (float)(-(float)this.m_tplPool.TplHeight * (i / 2)), 0f);
+ uint num = this.m_needMaterial[i];
+ ulong itemCount = XBagDocument.BagDoc.GetItemCount((int)num);
+ XSingleton<XItemDrawerMgr>.singleton.normalItemDrawer.DrawItem(gameObject, (int)num, 0, false);
+ IXUISprite ixuisprite = gameObject.transform.Find("Icon").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.ID = (ulong)((long)i);
+ ixuisprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnClickItem));
+ IXUILabel ixuilabel = gameObject.transform.Find("Num").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel.gameObject.SetActive(true);
+ uint addExp = this.m_doc.GetAddExp(num);
+ uint num2 = 0u;
+ bool flag = addExp > 0u;
+ if (flag)
+ {
+ num2 = ((this.m_needExp % addExp == 0u) ? (this.m_needExp / addExp) : (this.m_needExp / addExp + 1u));
+ }
+ bool flag2 = itemCount >= (ulong)num2;
+ if (flag2)
+ {
+ ixuilabel.SetText(string.Format("[00ff00]{0}[-]/{1}", itemCount, num2));
+ }
+ else
+ {
+ ixuilabel.SetText(string.Format("[ff0000]{0}[-]/{1}", itemCount, num2));
+ }
+ }
+ }
+
+ private bool OnClosed(IXUIButton btn)
+ {
+ base.SetVisible(false);
+ return true;
+ }
+
+ private void OnClickItem(IXUISprite spr)
+ {
+ int num = (int)spr.ID;
+ bool flag = num >= this.m_needMaterial.Length;
+ if (!flag)
+ {
+ this.m_doc.AddMaterial((int)this.m_needMaterial[num]);
+ base.SetVisible(false);
+ }
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/EquipFusionSelectHandler.cs.meta b/Client/Assets/Scripts/XMainClient/UI/EquipFusionSelectHandler.cs.meta
new file mode 100644
index 00000000..05872169
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/EquipFusionSelectHandler.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 58b1d481efbb14a4d922c4762ccc2aef
+timeCreated: 1611403759
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/EquipSetItemBaseView.cs b/Client/Assets/Scripts/XMainClient/UI/EquipSetItemBaseView.cs
new file mode 100644
index 00000000..8a304a51
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/EquipSetItemBaseView.cs
@@ -0,0 +1,266 @@
+using System;
+using UILib;
+using UnityEngine;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class EquipSetItemBaseView
+ {
+ public IXUILabel lbProfName;
+
+ public IXUILabel lbLevel;
+
+ public IXUILabel lbPartName;
+
+ public GameObject goItem;
+
+ public GameObject goHadGet;
+
+ public EquipSetItemBaseView.stQualityEffectItem[] qualityEffectItemArr;
+
+ public GameObject goCurrentEffect;
+
+ private XItem mXItemToShow;
+
+ private bool bBinding = false;
+
+ public struct stQualityEffectItem
+ {
+ public GameObject effect;
+
+ public int quality;
+ }
+
+ public struct stEquipInfoParam
+ {
+ public bool isShowTooltip;
+
+ public int playerProf;
+ }
+
+ public void SetFinishItem(XItem item)
+ {
+ this.mXItemToShow = item;
+ XSingleton<XItemDrawerMgr>.singleton.normalItemDrawer.OpenClickShowTooltipEvent(this.goItem, item.itemID, new SpriteClickEventHandler(this._OnClickItemIcon));
+ }
+
+ public virtual void FindFrom(Transform t)
+ {
+ bool flag = null != t;
+ if (flag)
+ {
+ Transform transform = t.Find("Level");
+ bool flag2 = transform == null;
+ if (flag2)
+ {
+ this.lbLevel = null;
+ }
+ else
+ {
+ this.lbLevel = (transform.GetComponent("XUILabel") as IXUILabel);
+ }
+ transform = t.Find("Prof");
+ bool flag3 = transform == null;
+ if (flag3)
+ {
+ this.lbProfName = null;
+ }
+ else
+ {
+ this.lbProfName = (transform.GetComponent("XUILabel") as IXUILabel);
+ }
+ transform = t.Find("Part");
+ bool flag4 = transform == null;
+ if (flag4)
+ {
+ this.lbPartName = null;
+ }
+ else
+ {
+ this.lbPartName = (transform.GetComponent("XUILabel") as IXUILabel);
+ }
+ this.goItem = t.Find("Item").gameObject;
+ transform = t.Find("Item/Yyy");
+ bool flag5 = transform != null;
+ if (flag5)
+ {
+ this.goHadGet = transform.gameObject;
+ }
+ else
+ {
+ this.goHadGet = null;
+ }
+ transform = t.Find("Item/Name");
+ int childCount = transform.childCount;
+ bool flag6 = childCount > 0;
+ if (flag6)
+ {
+ this.qualityEffectItemArr = new EquipSetItemBaseView.stQualityEffectItem[childCount];
+ for (int i = 0; i < childCount; i++)
+ {
+ this.qualityEffectItemArr[i].effect = transform.GetChild(i).gameObject;
+ this.qualityEffectItemArr[i].effect.SetActive(false);
+ int.TryParse(this.qualityEffectItemArr[i].effect.name, out this.qualityEffectItemArr[i].quality);
+ }
+ }
+ else
+ {
+ this.qualityEffectItemArr = null;
+ }
+ }
+ }
+
+ public void SetItemInfo(int _itemID, EquipSetItemBaseView.stEquipInfoParam _param, bool _isBind = false)
+ {
+ ItemList.RowData itemConf = XBagDocument.GetItemConf(_itemID);
+ this.SetItemInfo(itemConf, _param, _isBind);
+ }
+
+ public void SetItemInfo(XItem item, EquipSetItemBaseView.stEquipInfoParam _param, bool _isBind = false)
+ {
+ bool flag = item == null;
+ if (!flag)
+ {
+ ItemList.RowData itemConf = XBagDocument.GetItemConf(item.itemID);
+ this.SetItemInfo(itemConf, _param, _isBind);
+ XSingleton<XItemDrawerMgr>.singleton.DrawItem(this.goItem, item);
+ }
+ }
+
+ public void SetItemInfo(ItemList.RowData _item, EquipSetItemBaseView.stEquipInfoParam _param, bool _isBind = false)
+ {
+ bool flag = _item == null;
+ if (!flag)
+ {
+ this.bBinding = _isBind;
+ XItemDrawerMgr.Param.bBinding = _isBind;
+ XSingleton<XItemDrawerMgr>.singleton.normalItemDrawer.DrawItem(this.goItem, _item.ItemID, 0, false);
+ bool flag2 = true;
+ bool flag3 = this.qualityEffectItemArr != null && _item != null;
+ if (flag3)
+ {
+ for (int i = 0; i < this.qualityEffectItemArr.Length; i++)
+ {
+ bool flag4 = this.qualityEffectItemArr[i].quality == (int)_item.ItemQuality;
+ if (flag4)
+ {
+ this.goCurrentEffect = this.qualityEffectItemArr[i].effect;
+ flag2 = false;
+ break;
+ }
+ }
+ }
+ bool flag5 = flag2;
+ if (flag5)
+ {
+ this.goCurrentEffect = null;
+ }
+ bool flag6 = this.qualityEffectItemArr != null;
+ if (flag6)
+ {
+ for (int j = 0; j < this.qualityEffectItemArr.Length; j++)
+ {
+ this.qualityEffectItemArr[j].effect.SetActive(false);
+ }
+ }
+ bool isShowTooltip = _param.isShowTooltip;
+ if (isShowTooltip)
+ {
+ XSingleton<XItemDrawerMgr>.singleton.normalItemDrawer.OpenClickShowTooltipEvent(this.goItem, _item.ItemID, new SpriteClickEventHandler(this._OnClickItemIcon));
+ this.mXItemToShow = XBagDocument.MakeXItem(_item.ItemID, _isBind);
+ }
+ else
+ {
+ XSingleton<XItemDrawerMgr>.singleton.normalItemDrawer.CloseClickShowTooltipEvent(this.goItem);
+ this.mXItemToShow = null;
+ }
+ int num = 0;
+ bool flag7 = _item != null;
+ if (flag7)
+ {
+ num = (int)_item.Profession;
+ }
+ string profName = XSingleton<XProfessionSkillMgr>.singleton.GetProfName(num);
+ bool flag8 = _param.playerProf == 0 || _param.playerProf == num || num == 0;
+ if (flag8)
+ {
+ bool flag9 = this.lbProfName != null;
+ if (flag9)
+ {
+ this.lbProfName.SetText(profName);
+ }
+ bool flag10 = this.goCurrentEffect != null;
+ if (flag10)
+ {
+ this.goCurrentEffect.SetActive(true);
+ }
+ }
+ else
+ {
+ bool flag11 = this.lbProfName != null;
+ if (flag11)
+ {
+ this.lbProfName.SetText(string.Format(XStringDefineProxy.GetString("EQUIPCREATE_ERROR_FMT"), profName));
+ }
+ bool flag12 = this.goCurrentEffect != null;
+ if (flag12)
+ {
+ this.goCurrentEffect.SetActive(false);
+ }
+ }
+ bool flag13 = this.lbPartName != null;
+ if (flag13)
+ {
+ EquipList.RowData rowData = null;
+ ItemType itemType = (ItemType)_item.ItemType;
+ bool flag14 = itemType == ItemType.EQUIP;
+ if (flag14)
+ {
+ rowData = XBagDocument.GetEquipConf(_item.ItemID);
+ }
+ bool flag15 = rowData != null;
+ if (flag15)
+ {
+ this.lbPartName.SetText(XSingleton<UiUtility>.singleton.GetEquipPartName((EquipPosition)rowData.EquipPos, true));
+ }
+ else
+ {
+ this.lbPartName.SetText(XSingleton<UiUtility>.singleton.GetItemTypeStr(itemType));
+ }
+ }
+ bool flag16 = this.goHadGet != null;
+ if (flag16)
+ {
+ ulong num2 = 0UL;
+ ItemType itemType2 = (ItemType)_item.ItemType;
+ bool flag17 = itemType2 == ItemType.EQUIP || itemType2 == ItemType.ARTIFACT;
+ if (flag17)
+ {
+ num2 = XSingleton<XGame>.singleton.Doc.XBagDoc.GetItemCount(_item.ItemID);
+ }
+ bool flag18 = num2 > 0UL;
+ if (flag18)
+ {
+ this.goHadGet.SetActive(true);
+ }
+ else
+ {
+ num2 = (ulong)((long)XSingleton<XGame>.singleton.Doc.XBagDoc.GetBodyItemCountByID(_item.ItemID));
+ this.goHadGet.SetActive(num2 > 0UL);
+ }
+ }
+ }
+ }
+
+ private void _OnClickItemIcon(IXUISprite spr)
+ {
+ bool flag = this.mXItemToShow == null;
+ if (flag)
+ {
+ this.mXItemToShow = XBagDocument.MakeXItem((int)spr.ID, this.bBinding);
+ }
+ XSingleton<UiUtility>.singleton.ShowTooltipDialogWithSearchingCompare(this.mXItemToShow, spr, false, 0u);
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/EquipSetItemBaseView.cs.meta b/Client/Assets/Scripts/XMainClient/UI/EquipSetItemBaseView.cs.meta
new file mode 100644
index 00000000..3c0d171c
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/EquipSetItemBaseView.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: c50db2ea9ed22d44e89bfaad7aa7302b
+timeCreated: 1611404504
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/EquipSetItemView.cs b/Client/Assets/Scripts/XMainClient/UI/EquipSetItemView.cs
new file mode 100644
index 00000000..ff0d8146
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/EquipSetItemView.cs
@@ -0,0 +1,51 @@
+using System;
+using UILib;
+using UnityEngine;
+
+namespace XMainClient.UI
+{
+ internal class EquipSetItemView : EquipSetItemBaseView
+ {
+ public GameObject goItem1;
+
+ public GameObject goItem2;
+
+ public GameObject goItem3;
+
+ public GameObject goItem4;
+
+ public IXUILabel lbItemCount1;
+
+ public IXUILabel lbItemCount2;
+
+ public IXUILabel lbItemCount3;
+
+ public IXUILabel lbItemCount4;
+
+ public IXUIButton btnCreate;
+
+ public IXUILabel lbCost;
+
+ public GameObject goRedpoint;
+
+ public override void FindFrom(Transform t)
+ {
+ bool flag = null != t;
+ if (flag)
+ {
+ base.FindFrom(t);
+ this.goItem1 = t.Find("Item1").gameObject;
+ this.lbItemCount1 = (this.goItem1.transform.Find("FCount").GetComponent("XUILabel") as IXUILabel);
+ this.goItem2 = t.Find("Item2").gameObject;
+ this.lbItemCount2 = (this.goItem2.transform.Find("FCount").GetComponent("XUILabel") as IXUILabel);
+ this.goItem3 = t.Find("Item3").gameObject;
+ this.lbItemCount3 = (this.goItem3.transform.Find("FCount").GetComponent("XUILabel") as IXUILabel);
+ this.goItem4 = t.Find("Item4").gameObject;
+ this.lbItemCount4 = (this.goItem4.transform.Find("FCount").GetComponent("XUILabel") as IXUILabel);
+ this.btnCreate = (t.Find("Create").GetComponent("XUIButton") as IXUIButton);
+ this.lbCost = (this.btnCreate.gameObject.transform.Find("V").GetComponent("XUILabel") as IXUILabel);
+ this.goRedpoint = this.btnCreate.gameObject.transform.Find("RedPoint").gameObject;
+ }
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/EquipSetItemView.cs.meta b/Client/Assets/Scripts/XMainClient/UI/EquipSetItemView.cs.meta
new file mode 100644
index 00000000..12df82c7
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/EquipSetItemView.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: bc193587d2c412a459a40f575f89993b
+timeCreated: 1611404444
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/EquipTooltipDlg.cs b/Client/Assets/Scripts/XMainClient/UI/EquipTooltipDlg.cs
new file mode 100644
index 00000000..c2dfc8ff
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/EquipTooltipDlg.cs
@@ -0,0 +1,669 @@
+using System;
+using System.Collections.Generic;
+using UILib;
+using UnityEngine;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class EquipTooltipDlg : TooltipDlg<EquipTooltipDlg, EquipTooltipDlgBehaviour>
+ {
+ public override string fileName
+ {
+ get
+ {
+ return "GameSystem/EquipToolTipDlg";
+ }
+ }
+
+ protected override int compareWindowDistance
+ {
+ get
+ {
+ return 20;
+ }
+ }
+
+ protected override void Init()
+ {
+ base.Init();
+ this.m_OperateList[0, 0] = new TooltipButtonOperatePutOn();
+ this.m_OperateList[0, 1] = new TooltipButtonOperateEnhanceTransform();
+ this.m_OperateList[0, 2] = new TooltipButtonOperateEnchantTransform();
+ this.m_OperateList[0, 3] = new TooltipButtonOperateRecycle(XSysDefine.XSys_Item_Equip);
+ this.m_OperateList[0, 4] = new TooltipButtonOperateSmeltReturn();
+ this.m_OperateList[1, 0] = new TooltipButtonOperateTakeOff();
+ this.m_OperateList[1, 1] = new TooltipButtonOperateEnhance();
+ this.m_OperateList[1, 2] = new TooltipButtonOperateSmelt();
+ this.m_OperateList[1, 3] = new TooltipButtonOperateForge();
+ this.m_OperateList[1, 4] = new TooltipButtonOperateEnchant();
+ this.m_OperateList[1, 5] = new TooltipButtonOperateEquipFusion();
+ this.m_OperateList[1, 6] = new TooltipButtonOperateEquipUpgrade();
+ }
+
+ public override bool HideToolTip(bool forceHide = false)
+ {
+ bool flag = base.HideToolTip(forceHide);
+ bool result;
+ if (flag)
+ {
+ base.uiBehaviour.m_JadeItemPool.ReturnAll(false);
+ result = true;
+ }
+ else
+ {
+ result = false;
+ }
+ return result;
+ }
+
+ public void ShowToolTip(ulong MainUID, ulong CompareUID, bool bShowButtons = true)
+ {
+ XItem itemByUID = XSingleton<XGame>.singleton.Doc.XBagDoc.GetItemByUID(MainUID);
+ XItem xitem = XSingleton<XGame>.singleton.Doc.XBagDoc.GetItemByUID(CompareUID);
+ bool flag = xitem.uid == 0UL;
+ if (flag)
+ {
+ xitem = null;
+ }
+ this.ShowToolTip(itemByUID, xitem, bShowButtons, 0u);
+ }
+
+ private void _SetEnhanceAttrFrame(GameObject scrollPanel, XEquipItem equipItem, bool bMain)
+ {
+ GameObject gameObject = base.uiBehaviour.m_AttrFramePool.FetchGameObject(false);
+ gameObject.transform.parent = scrollPanel.transform;
+ string itemQualityColorStr = XSingleton<UiUtility>.singleton.GetItemQualityColorStr(1);
+ AttrFrameParam attrFrameParam = new AttrFrameParam();
+ attrFrameParam.Title = XStringDefineProxy.GetString("TOOLTIP_ENHANCE_ATTR");
+ for (int i = 0; i < equipItem.enhanceInfo.EnhanceAttr.Count; i++)
+ {
+ AttrParam item = default(AttrParam);
+ AttrParam.ResetSb();
+ AttrParam.Append(equipItem.enhanceInfo.EnhanceAttr[i], itemQualityColorStr, itemQualityColorStr);
+ item.SetTextFromSb();
+ item.SetValueFromSb();
+ attrFrameParam.AttrList.Add(item);
+ }
+ base.AppendFrame(gameObject, (float)this.SetupAttrFrame(gameObject, attrFrameParam, bMain), new Vector3?(base.uiBehaviour.m_AttrFramePool.TplPos));
+ XSingleton<XGameUI>.singleton.m_uiTool.MarkParentAsChanged(gameObject);
+ }
+
+ private void _SetJadeAttrFrame(GameObject scrollPanel, XEquipItem equipItem, bool bMain)
+ {
+ bool flag = equipItem == null;
+ if (!flag)
+ {
+ uint level = 0u;
+ bool flag2 = XSingleton<XAttributeMgr>.singleton.XPlayerData != null;
+ if (flag2)
+ {
+ level = XSingleton<XAttributeMgr>.singleton.XPlayerData.Level;
+ }
+ bool flag3 = XSingleton<TooltipParam>.singleton.mainAttributes != null;
+ if (flag3)
+ {
+ level = XSingleton<TooltipParam>.singleton.mainAttributes.Level;
+ }
+ XJadeDocument specificDocument = XDocuments.GetSpecificDocument<XJadeDocument>(XJadeDocument.uuID);
+ EquipList.RowData equipConf = XBagDocument.GetEquipConf(equipItem.itemID);
+ bool flag4 = equipConf == null;
+ if (!flag4)
+ {
+ bool flag5 = specificDocument.JadeIsOpen(equipConf.EquipPos, level);
+ bool flag6 = !flag5;
+ if (!flag6)
+ {
+ GameObject gameObject = null;
+ AttrFrameParam attrFrameParam = null;
+ for (int i = 0; i < equipItem.jadeInfo.jades.Length; i++)
+ {
+ XJadeItem xjadeItem = equipItem.jadeInfo.jades[i];
+ bool flag7 = xjadeItem == null;
+ if (!flag7)
+ {
+ ItemList.RowData itemConf = XBagDocument.GetItemConf(xjadeItem.itemID);
+ bool flag8 = itemConf == null;
+ if (!flag8)
+ {
+ bool flag9 = gameObject == null;
+ if (flag9)
+ {
+ gameObject = base.uiBehaviour.m_AttrFramePool.FetchGameObject(false);
+ gameObject.transform.parent = scrollPanel.gameObject.transform;
+ attrFrameParam = new AttrFrameParam();
+ attrFrameParam.Title = XStringDefineProxy.GetString("TOOLTIP_JADE_ATTR");
+ }
+ foreach (XItemChangeAttr attr in xjadeItem.BasicAttr())
+ {
+ AttrParam item = default(AttrParam);
+ AttrParam.ResetSb();
+ AttrParam.TextSb.Append(XSingleton<UiUtility>.singleton.ChooseProfString(itemConf.ItemName, base.profession)).Append(" ");
+ AttrParam.Append(attr, "", "");
+ item.SetTextFromSb();
+ item.SetValueFromSb();
+ attrFrameParam.AttrList.Add(item);
+ }
+ }
+ }
+ }
+ bool flag10 = gameObject != null;
+ if (flag10)
+ {
+ base.AppendFrame(gameObject, (float)this.SetupAttrFrame(gameObject, attrFrameParam, bMain), new Vector3?(base.uiBehaviour.m_AttrFramePool.TplPos));
+ XSingleton<XGameUI>.singleton.m_uiTool.MarkParentAsChanged(gameObject);
+ }
+ }
+ }
+ }
+ }
+
+ protected override void SetAllAttrFrames(GameObject goToolTip, XAttrItem item, XAttrItem compareItem, bool bMain)
+ {
+ XEquipItem xequipItem = item as XEquipItem;
+ bool flag = xequipItem == null;
+ if (!flag)
+ {
+ GameObject gameObject = goToolTip.transform.Find("ScrollPanel").gameObject;
+ this.SetBasicAttrFrame(gameObject, item, compareItem, bMain);
+ this._SetupRandAndForgeFrame(goToolTip, item, bMain);
+ this._SetupEnchantFrame(goToolTip, item, compareItem, bMain);
+ bool flag2 = xequipItem.enhanceInfo.EnhanceLevel > 0u;
+ if (flag2)
+ {
+ this._SetEnhanceAttrFrame(gameObject, xequipItem, bMain);
+ }
+ uint level = 0u;
+ bool flag3 = XSingleton<XAttributeMgr>.singleton.XPlayerData != null;
+ if (flag3)
+ {
+ level = XSingleton<XAttributeMgr>.singleton.XPlayerData.Level;
+ }
+ bool flag4 = XSingleton<TooltipParam>.singleton.mainAttributes != null;
+ if (flag4)
+ {
+ level = XSingleton<TooltipParam>.singleton.mainAttributes.Level;
+ }
+ XJadeDocument specificDocument = XDocuments.GetSpecificDocument<XJadeDocument>(XJadeDocument.uuID);
+ bool flag5 = false;
+ EquipList.RowData equipConf = XBagDocument.GetEquipConf(xequipItem.itemID);
+ bool flag6 = equipConf != null;
+ if (flag6)
+ {
+ flag5 = specificDocument.JadeIsOpen(equipConf.EquipPos, level);
+ }
+ bool flag7 = flag5;
+ if (flag7)
+ {
+ this._SetJadeAttrFrame(gameObject, xequipItem, bMain);
+ }
+ }
+ }
+
+ protected new void SetBasicAttrFrame(GameObject scrollPanel, XAttrItem item, XAttrItem compareItem, bool bMain)
+ {
+ GameObject gameObject = base.uiBehaviour.m_AttrFramePool.FetchGameObject(false);
+ gameObject.transform.parent = scrollPanel.transform;
+ uint profession = 0u;
+ bool flag = XSingleton<XEntityMgr>.singleton.Player != null;
+ if (flag)
+ {
+ profession = XSingleton<XEntityMgr>.singleton.Player.BasicTypeID;
+ }
+ bool flag2 = XSingleton<TooltipParam>.singleton.mainAttributes != null;
+ if (flag2)
+ {
+ profession = XSingleton<TooltipParam>.singleton.mainAttributes.BasicTypeID;
+ }
+ List<EquipFuseData> nowFuseData = EquipFusionDocument.Doc.GetNowFuseData(item, profession);
+ AttrFrameParam attrFrameParam = new AttrFrameParam();
+ attrFrameParam.Title = XStringDefineProxy.GetString("TOOLTIP_BASIC_ATTR");
+ for (int i = 0; i < nowFuseData.Count; i++)
+ {
+ AttrParam item2 = default(AttrParam);
+ AttrParam.ResetSb();
+ AttrParam.TextSb.Append(XAttributeCommon.GetAttrStr((int)nowFuseData[i].AttrId)).Append(" ").Append(nowFuseData[i].BeforeBaseAttrNum);
+ bool flag3 = nowFuseData[i].BeforeAddNum > 0u;
+ if (flag3)
+ {
+ AttrParam.ValueSb.Append("+").Append(nowFuseData[i].BeforeAddNum);
+ }
+ item2.IsShowTipsIcon = nowFuseData[i].IsExtra;
+ item2.IconName = "zb_rzsx";
+ item2.SetTextFromSb();
+ item2.SetValueFromSb();
+ attrFrameParam.AttrList.Add(item2);
+ }
+ base.AppendFrame(gameObject, (float)this.SetupAttrFrame(gameObject, attrFrameParam, bMain), new Vector3?(base.uiBehaviour.m_AttrFramePool.TplPos));
+ this.SetAttrOther(scrollPanel.transform, attrFrameParam);
+ Transform transform = gameObject.transform.Find("EquipRz");
+ XEquipItem xequipItem = item as XEquipItem;
+ bool flag4 = transform != null;
+ if (flag4)
+ {
+ bool flag5 = xequipItem.fuseInfo.BreakNum == 0u;
+ if (flag5)
+ {
+ transform.gameObject.SetActive(false);
+ }
+ else
+ {
+ string fuseIconName = EquipFusionDocument.Doc.GetFuseIconName(xequipItem.fuseInfo.BreakNum);
+ bool flag6 = fuseIconName != null;
+ if (flag6)
+ {
+ transform.gameObject.SetActive(true);
+ IXUISprite ixuisprite = transform.GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.spriteName = fuseIconName;
+ }
+ }
+ }
+ transform = gameObject.transform.Find("RzLabel");
+ bool flag7 = transform != null;
+ if (flag7)
+ {
+ EquipList.RowData equipConf = XBagDocument.GetEquipConf(xequipItem.itemID);
+ bool flag8 = equipConf != null;
+ if (flag8)
+ {
+ bool flag9 = equipConf.FuseCanBreakNum > 0;
+ if (flag9)
+ {
+ transform.gameObject.SetActive(true);
+ IXUILabel ixuilabel = transform.GetComponent("XUILabel") as IXUILabel;
+ ixuilabel.SetText(string.Format(XSingleton<XStringTable>.singleton.GetString("FuseBreakNum"), xequipItem.fuseInfo.BreakNum, equipConf.FuseCanBreakNum));
+ }
+ else
+ {
+ transform.gameObject.SetActive(false);
+ }
+ }
+ else
+ {
+ transform.gameObject.SetActive(false);
+ }
+ }
+ XSingleton<XGameUI>.singleton.m_uiTool.MarkParentAsChanged(gameObject);
+ }
+
+ protected override void SetupTopFrame(GameObject goToolTip, ItemList.RowData data, bool bMain, XItem instanceData = null, XItem compareData = null)
+ {
+ base.SetupTopFrame(goToolTip, data, bMain, instanceData, compareData);
+ Transform transform = goToolTip.transform;
+ GameObject gameObject = transform.Find("TopFrame/State").gameObject;
+ base._SetupLevel(goToolTip, data, 0);
+ base._SetupProf(goToolTip, data, bMain, instanceData, 1);
+ EquipList.RowData equipConf = XBagDocument.GetEquipConf(data.ItemID);
+ base._SetTopFrameLabel(goToolTip, 2, XStringDefineProxy.GetString("ToolTipText_Part"), (equipConf != null) ? XSingleton<UiUtility>.singleton.GetEquipPartName((EquipPosition)equipConf.EquipPos, true) : string.Empty);
+ gameObject.SetActive(!bMain || XSingleton<TooltipParam>.singleton.bEquiped);
+ }
+
+ protected override int _GetPPT(XItem item, bool bMain, ref string valueText)
+ {
+ XEquipItem xequipItem = item as XEquipItem;
+ bool flag = xequipItem == null;
+ int result;
+ if (flag)
+ {
+ result = -1;
+ }
+ else
+ {
+ XAttributes attributes = bMain ? XSingleton<TooltipParam>.singleton.mainAttributes : XSingleton<TooltipParam>.singleton.compareAttributes;
+ double num = xequipItem.GetPPT(attributes);
+ bool bPreview = xequipItem.randAttrInfo.bPreview;
+ if (bPreview)
+ {
+ uint num2 = 0u;
+ uint num3 = 0u;
+ EquipSlotAttrDatas attrData = XCharacterEquipDocument.RandomAttrMgr.GetAttrData((uint)xequipItem.itemID);
+ bool flag2 = attrData != null;
+ if (flag2)
+ {
+ num2 = (uint)num + EquipSlotAttrDatas.GetMinPPT(attrData, attributes, false);
+ num3 = (uint)num + EquipSlotAttrDatas.GetMaxPPT(attrData, attributes);
+ }
+ EquipSlotAttrDatas attrData2 = XForgeDocument.ForgeAttrMgr.GetAttrData((uint)xequipItem.itemID);
+ bool flag3 = attrData2 != null;
+ if (flag3)
+ {
+ num2 += (uint)num + EquipSlotAttrDatas.GetMinPPT(attrData, attributes, true);
+ num3 += (uint)num + EquipSlotAttrDatas.GetMaxPPT(attrData, attributes);
+ }
+ valueText = string.Format("{0} - {1}", num2, num3);
+ result = -1;
+ }
+ else
+ {
+ for (int i = 0; i < xequipItem.randAttrInfo.RandAttr.Count; i++)
+ {
+ num += XSingleton<XPowerPointCalculator>.singleton.GetPPT(xequipItem.randAttrInfo.RandAttr[i], attributes, -1);
+ }
+ for (int j = 0; j < xequipItem.forgeAttrInfo.ForgeAttr.Count; j++)
+ {
+ num += (uint)XSingleton<XPowerPointCalculator>.singleton.GetPPT(xequipItem.forgeAttrInfo.ForgeAttr[j], attributes, -1);
+ }
+ valueText = ((uint)num).ToString();
+ result = (int)num;
+ }
+ }
+ return result;
+ }
+
+ protected override void SetupOtherFrame(GameObject goToolTip, XItem mainItem, XItem compareItem, bool bMain)
+ {
+ this._SetupSuitFrame(goToolTip, mainItem, compareItem, bMain);
+ this._SetupJadeFrame(goToolTip, mainItem, compareItem, bMain);
+ base.SetupOtherFrame(goToolTip, mainItem, compareItem, bMain);
+ }
+
+ private void _SetupJadeFrame(GameObject goToolTip, XItem mainItem, XItem compareItem, bool bMain)
+ {
+ XEquipItem xequipItem = mainItem as XEquipItem;
+ bool flag = xequipItem == null;
+ if (!flag)
+ {
+ EquipList.RowData equipConf = XBagDocument.GetEquipConf(xequipItem.itemID);
+ bool flag2 = equipConf == null;
+ if (flag2)
+ {
+ XSingleton<XDebug>.singleton.AddErrorLog("equipListRowData == null while id = ", xequipItem.itemID.ToString(), null, null, null, null);
+ }
+ else
+ {
+ uint num = 0u;
+ bool flag3 = XSingleton<XAttributeMgr>.singleton.XPlayerData != null;
+ if (flag3)
+ {
+ num = XSingleton<XAttributeMgr>.singleton.XPlayerData.Level;
+ }
+ bool flag4 = XSingleton<TooltipParam>.singleton.mainAttributes != null;
+ if (flag4)
+ {
+ num = XSingleton<TooltipParam>.singleton.mainAttributes.Level;
+ }
+ XJadeDocument specificDocument = XDocuments.GetSpecificDocument<XJadeDocument>(XJadeDocument.uuID);
+ IXUISprite ixuisprite = goToolTip.transform.Find("JadeFrame").GetComponent("XUISprite") as IXUISprite;
+ bool flag5 = specificDocument.JadeIsOpen(equipConf.EquipPos, num);
+ bool flag6 = !flag5;
+ if (flag6)
+ {
+ ixuisprite.SetVisible(false);
+ }
+ else
+ {
+ SeqListRef<uint> slotInfoByPos = specificDocument.GetSlotInfoByPos(equipConf.EquipPos);
+ int num2 = 4;
+ int i;
+ for (i = 0; i < (int)slotInfoByPos.count; i++)
+ {
+ bool flag7 = i >= num2;
+ if (flag7)
+ {
+ break;
+ }
+ bool flag8 = num >= slotInfoByPos[i, 1];
+ if (flag8)
+ {
+ GameObject gameObject = base.uiBehaviour.m_JadeItemPool.FetchGameObject(false);
+ gameObject.name = "jadeItem" + i;
+ Transform transform = goToolTip.transform.Find("JadeFrame/Jade" + i);
+ gameObject.transform.parent = ixuisprite.gameObject.transform;
+ gameObject.transform.localPosition = transform.localPosition;
+ gameObject.transform.localScale = Vector3.one;
+ XSingleton<XGameUI>.singleton.m_uiTool.MarkParentAsChanged(gameObject);
+ XJadeItem realItem = xequipItem.jadeInfo.jades[i];
+ XItemDrawerMgr.Param.Profession = base.profession;
+ XSingleton<XItemDrawerMgr>.singleton.jadeSlotDrawer.DrawItem(gameObject, slotInfoByPos[i, 0], false, realItem);
+ }
+ }
+ bool flag9 = i > 0;
+ if (flag9)
+ {
+ this.bHadJade = true;
+ ixuisprite.SetVisible(true);
+ Vector3 localPosition = ixuisprite.gameObject.transform.localPosition;
+ ixuisprite.gameObject.transform.localPosition = new Vector3(localPosition.x, -this.totalFrameHeight, localPosition.z);
+ this.totalFrameHeight += (float)ixuisprite.spriteHeight;
+ }
+ else
+ {
+ ixuisprite.SetVisible(false);
+ }
+ }
+ }
+ }
+ }
+
+ private void _SetupRandAndForgeFrame(GameObject goToolTip, XItem mainItem, bool bMain)
+ {
+ XEquipItem xequipItem = mainItem as XEquipItem;
+ bool flag = !xequipItem.randAttrInfo.bPreview && xequipItem.randAttrInfo.RandAttr.Count == 0 && !xequipItem.forgeAttrInfo.bPreview && xequipItem.forgeAttrInfo.ForgeAttr.Count == 0;
+ if (!flag)
+ {
+ EquipSlotAttrDatas attrData = XCharacterEquipDocument.RandomAttrMgr.GetAttrData((uint)xequipItem.itemID);
+ EquipSlotAttrDatas attrData2 = XForgeDocument.ForgeAttrMgr.GetAttrData((uint)xequipItem.itemID);
+ bool flag2 = attrData == null && attrData2 == null;
+ if (!flag2)
+ {
+ GameObject gameObject = goToolTip.transform.Find("ScrollPanel").gameObject;
+ GameObject gameObject2 = base.uiBehaviour.m_AttrFramePool.FetchGameObject(false);
+ gameObject2.transform.parent = gameObject.transform;
+ string itemQualityColorStr = XSingleton<UiUtility>.singleton.GetItemQualityColorStr(2);
+ AttrFrameParam attrFrameParam = new AttrFrameParam();
+ attrFrameParam.Title = XStringDefineProxy.GetString("HIDDEN_ATTR");
+ bool bPreview = xequipItem.randAttrInfo.bPreview;
+ if (bPreview)
+ {
+ AttrParam item = default(AttrParam);
+ AttrParam.ResetSb();
+ AttrParam.Append(AttrParam.TextSb, XStringDefineProxy.GetString("HIDDEN_ATTR"), itemQualityColorStr);
+ AttrParam.Append(AttrParam.ValueSb, "???", itemQualityColorStr);
+ item.SetTextFromSb();
+ item.SetValueFromSb();
+ attrFrameParam.AttrList.Add(item);
+ }
+ int count = xequipItem.randAttrInfo.RandAttr.Count;
+ List<XItemChangeAttr> list = new List<XItemChangeAttr>();
+ for (int i = 0; i < count; i++)
+ {
+ list.Add(xequipItem.randAttrInfo.RandAttr[i]);
+ }
+ for (int j = 0; j < xequipItem.forgeAttrInfo.ForgeAttr.Count; j++)
+ {
+ list.Add(xequipItem.forgeAttrInfo.ForgeAttr[j]);
+ }
+ for (int k = 0; k < list.Count; k++)
+ {
+ XItemChangeAttr xitemChangeAttr = list[k];
+ bool flag3 = xitemChangeAttr.AttrID == 0u;
+ if (!flag3)
+ {
+ bool flag4 = k < count;
+ bool flag5 = flag4;
+ EquipSlotAttrDatas equipSlotAttrDatas;
+ int slot;
+ if (flag5)
+ {
+ equipSlotAttrDatas = attrData;
+ slot = k + 1;
+ }
+ else
+ {
+ equipSlotAttrDatas = attrData2;
+ slot = count - k + 1;
+ }
+ bool flag6 = equipSlotAttrDatas == null;
+ if (!flag6)
+ {
+ AttrParam item2 = default(AttrParam);
+ AttrParam.ResetSb();
+ item2.IsShowTipsIcon = !flag4;
+ item2.IconName = "zb_dzsx";
+ EquipAttrData attrData3 = equipSlotAttrDatas.GetAttrData(slot, xitemChangeAttr);
+ bool flag7 = attrData3 != null;
+ if (flag7)
+ {
+ string color = equipSlotAttrDatas.GetColor(slot, xitemChangeAttr);
+ AttrParam.Append(xitemChangeAttr, color, color);
+ AttrParam.ValueSb.Append(" [");
+ AttrParam.ValueSb.Append(attrData3.RangValue.Min);
+ AttrParam.ValueSb.Append(" - ");
+ AttrParam.ValueSb.Append(attrData3.RangValue.Max);
+ AttrParam.ValueSb.Append("] ");
+ }
+ else
+ {
+ AttrParam.Append(xitemChangeAttr, itemQualityColorStr, itemQualityColorStr);
+ }
+ item2.SetTextFromSb();
+ item2.SetValueFromSb();
+ attrFrameParam.AttrList.Add(item2);
+ }
+ }
+ }
+ base.AppendFrame(gameObject2, (float)this.SetupAttrFrame(gameObject2, attrFrameParam, bMain), new Vector3?(base.uiBehaviour.m_AttrFramePool.TplPos));
+ XSingleton<XGameUI>.singleton.m_uiTool.MarkParentAsChanged(gameObject2);
+ }
+ }
+ }
+
+ private void _SetupEnchantFrame(GameObject goToolTip, XItem mainItem, XItem compareItem, bool bMain)
+ {
+ XEquipItem xequipItem = mainItem as XEquipItem;
+ bool flag = !xequipItem.enchantInfo.bHasEnchant;
+ if (!flag)
+ {
+ GameObject gameObject = goToolTip.transform.Find("ScrollPanel").gameObject;
+ GameObject gameObject2 = base.uiBehaviour.m_AttrFramePool.FetchGameObject(false);
+ gameObject2.transform.parent = gameObject.transform;
+ string itemQualityColorStr = XSingleton<UiUtility>.singleton.GetItemQualityColorStr(2);
+ AttrFrameParam attrFrameParam = new AttrFrameParam();
+ attrFrameParam.Title = XStringDefineProxy.GetString("TOOLTIP_ENCHANT_ATTR");
+ XEnchantInfo enchantInfo = xequipItem.enchantInfo;
+ bool flag2 = enchantInfo.ChooseAttr > 0u;
+ if (flag2)
+ {
+ for (int i = 0; i < xequipItem.enchantInfo.AttrList.Count; i++)
+ {
+ bool flag3 = enchantInfo.AttrList[i].AttrID == enchantInfo.ChooseAttr;
+ if (flag3)
+ {
+ AttrParam item = default(AttrParam);
+ AttrParam.ResetSb();
+ AttrParam.Append(xequipItem.enchantInfo.AttrList[i], "", "");
+ item.SetTextFromSb();
+ item.SetValueFromSb();
+ attrFrameParam.AttrList.Add(item);
+ }
+ }
+ }
+ base.AppendFrame(gameObject2, (float)this.SetupAttrFrame(gameObject2, attrFrameParam, bMain), new Vector3?(base.uiBehaviour.m_AttrFramePool.TplPos));
+ XSingleton<XGameUI>.singleton.m_uiTool.MarkParentAsChanged(gameObject2);
+ }
+ }
+
+ private void _SetupSuitFrame(GameObject goToolTip, XItem mainItem, XItem compareItem, bool bMain)
+ {
+ IXUISprite ixuisprite = goToolTip.transform.Find("ScrollPanel/SuitFrame").GetComponent("XUISprite") as IXUISprite;
+ bool flag = mainItem == null;
+ if (flag)
+ {
+ ixuisprite.SetVisible(false);
+ }
+ else
+ {
+ int itemID = mainItem.itemID;
+ EquipSuitTable.RowData suit = XCharacterEquipDocument.SuitManager.GetSuit(itemID, true);
+ bool flag2 = suit == null;
+ if (flag2)
+ {
+ ixuisprite.SetVisible(false);
+ }
+ else
+ {
+ ixuisprite.SetVisible(true);
+ bool flag3 = XSingleton<TooltipParam>.singleton.BodyBag == null;
+ if (flag3)
+ {
+ XSingleton<TooltipParam>.singleton.BodyBag = XSingleton<XGame>.singleton.Doc.XBagDoc.EquipBag;
+ }
+ int num = XEquipSuitManager.GetEquipedSuits(suit, XSingleton<TooltipParam>.singleton.BodyBag, null);
+ bool flag4 = bMain && XEquipSuitManager.WillChangeEquipedCount(suit, mainItem.itemID, XSingleton<TooltipParam>.singleton.BodyBag);
+ if (flag4)
+ {
+ num++;
+ }
+ int num2 = 0;
+ AttrFrameParam attrFrameParam = new AttrFrameParam();
+ for (int i = 0; i < XEquipSuitManager.GetEffectDataCount(); i++)
+ {
+ int num3 = 0;
+ int effectData = XEquipSuitManager.GetEffectData(suit, i, out num3);
+ bool flag5 = (float)effectData != 0f;
+ if (flag5)
+ {
+ bool flag6 = i <= num;
+ string text;
+ string color;
+ if (flag6)
+ {
+ text = "ffffff";
+ color = XSingleton<UiUtility>.singleton.GetColorStr(new Color(0.996078432f, 0.807843149f, 0f));
+ }
+ else
+ {
+ text = XSingleton<UiUtility>.singleton.GetColorStr(new Color(0.5019608f, 0.5019608f, 0.5019608f));
+ color = text;
+ }
+ AttrParam item = default(AttrParam);
+ AttrParam.ResetSb();
+ AttrParam.Append(AttrParam.TextSb, XStringDefineProxy.GetString("EQUIP_SUIT_EFFECT", new object[]
+ {
+ i
+ }), color);
+ string s = string.Format("{0} +{1}", XStringDefineProxy.GetString((XAttributeDefine)effectData), num3);
+ AttrParam.Append(AttrParam.ValueSb, s, text);
+ item.SetTextFromSb();
+ item.SetValueFromSb();
+ attrFrameParam.AttrList.Add(item);
+ num2++;
+ }
+ }
+ bool flag7 = num2 > 0;
+ if (flag7)
+ {
+ attrFrameParam.Title = string.Format("({0}/{1})", num, suit.SuitNum);
+ base.AppendFrame(ixuisprite.gameObject, (float)this.SetupAttrFrame(ixuisprite.gameObject, attrFrameParam, bMain), null);
+ }
+ else
+ {
+ ixuisprite.SetVisible(false);
+ }
+ }
+ }
+ }
+
+ protected override void SetupToolTipButtons(GameObject goToolTip, XItem item, bool bMain)
+ {
+ base.SetupToolTipButtons(goToolTip, item, bMain);
+ bool flag = !this.bShowButtons;
+ if (!flag)
+ {
+ if (bMain)
+ {
+ XEquipItem xequipItem = item as XEquipItem;
+ bool flag2 = XSingleton<XGame>.singleton.Doc.XBagDoc.EquipBag.HasItem(item.uid);
+ if (flag2)
+ {
+ base._SetupButtonVisiability(goToolTip, 1, item);
+ }
+ else
+ {
+ base._SetupButtonVisiability(goToolTip, 0, item);
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/EquipTooltipDlg.cs.meta b/Client/Assets/Scripts/XMainClient/UI/EquipTooltipDlg.cs.meta
new file mode 100644
index 00000000..af4cd17b
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/EquipTooltipDlg.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 1472322bc6d198f4181e200943bcc4c1
+timeCreated: 1611403258
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/EquipTooltipDlgBehaviour.cs b/Client/Assets/Scripts/XMainClient/UI/EquipTooltipDlgBehaviour.cs
new file mode 100644
index 00000000..49b276be
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/EquipTooltipDlgBehaviour.cs
@@ -0,0 +1,16 @@
+using System;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class EquipTooltipDlgBehaviour : TooltipDlgBehaviour
+ {
+ public XUIPool m_JadeItemPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ protected override void Awake()
+ {
+ this.m_JadeItemPool.SetupPool(base.transform.Find("Bg/Bg").gameObject, base.transform.Find("Bg/Bg/ToolTip/JadeFrame/JadeTpl").gameObject, 2u, false);
+ base.Awake();
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/EquipTooltipDlgBehaviour.cs.meta b/Client/Assets/Scripts/XMainClient/UI/EquipTooltipDlgBehaviour.cs.meta
new file mode 100644
index 00000000..9645ca1f
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/EquipTooltipDlgBehaviour.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: a0f5616f1d7203648b573dfcca7fffe7
+timeCreated: 1611404251
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/EquipUpgradeHandler.cs b/Client/Assets/Scripts/XMainClient/UI/EquipUpgradeHandler.cs
new file mode 100644
index 00000000..65710a56
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/EquipUpgradeHandler.cs
@@ -0,0 +1,330 @@
+using System;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class EquipUpgradeHandler : DlgHandlerBase
+ {
+ protected override string FileName
+ {
+ get
+ {
+ return "ItemNew/UpgradeFrame";
+ }
+ }
+
+ private EquipUpgradeDocument m_doc;
+
+ private GameObject m_beforeItem;
+
+ private GameObject m_afterItem;
+
+ private GameObject m_beforeUpgradeGo;
+
+ private GameObject m_afterUpgradeGo;
+
+ private IXUIButton m_helpBtn;
+
+ private IXUIButton m_closeBtn;
+
+ private IXUIButton m_upgradeBtn;
+
+ private XUIPool m_needItemPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ private XUIPool m_BeforeAttrPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ private XUIPool m_AfterAttrPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ private readonly int m_gap = 30;
+
+ private float m_delayTime = 0.5f;
+
+ private float m_fLastClickBtnTime = 0f;
+
+ protected override void Init()
+ {
+ base.Init();
+ this.m_doc = EquipUpgradeDocument.Doc;
+ this.m_doc.Handler = this;
+ Transform transform = base.PanelObject.transform.Find("Bg/Top");
+ this.m_beforeItem = transform.Find("UpgradeItemBefore").gameObject;
+ this.m_afterItem = transform.Find("UpgradeItemAfter").gameObject;
+ transform = base.PanelObject.transform.Find("Bg");
+ this.m_helpBtn = (transform.Find("Help").GetComponent("XUIButton") as IXUIButton);
+ this.m_closeBtn = (transform.Find("Close").GetComponent("XUIButton") as IXUIButton);
+ transform = base.PanelObject.transform.Find("Bg/Bottom");
+ this.m_upgradeBtn = (transform.Find("UpgradeBtn").GetComponent("XUIButton") as IXUIButton);
+ transform = transform.Find("Items");
+ this.m_needItemPool.SetupPool(transform.gameObject, transform.Find("Item").gameObject, 2u, true);
+ transform = base.PanelObject.transform.Find("Bg/UpgradeAttr");
+ this.m_beforeUpgradeGo = transform.Find("BeforeEnhance").gameObject;
+ this.m_afterUpgradeGo = transform.Find("AfterEnhance").gameObject;
+ this.m_BeforeAttrPool.SetupPool(this.m_beforeUpgradeGo, transform.Find("BeforeAttrTpl").gameObject, 2u, false);
+ this.m_AfterAttrPool.SetupPool(this.m_afterUpgradeGo, transform.Find("AfterAttrTpl").gameObject, 2u, false);
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ this.m_closeBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnClosed));
+ this.m_helpBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnHelp));
+ this.m_upgradeBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnUpgrade));
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ this.RefreshData();
+ }
+
+ protected override void OnHide()
+ {
+ base.OnHide();
+ DlgBase<ItemSystemDlg, TabDlgBehaviour>.singleton.OnPopHandlerSetVisible(false, null);
+ DlgBase<ItemSystemDlg, TabDlgBehaviour>.singleton.StackRefresh();
+ bool flag = DlgBase<ItemSystemDlg, TabDlgBehaviour>.singleton._equipHandler != null;
+ if (flag)
+ {
+ DlgBase<ItemSystemDlg, TabDlgBehaviour>.singleton._equipHandler.SelectEquip(0UL);
+ DlgBase<ItemSystemDlg, TabDlgBehaviour>.singleton._equipHandler.RegisterItemClickEvents(null);
+ }
+ }
+
+ public override void OnUnload()
+ {
+ base.OnUnload();
+ }
+
+ public override void RefreshData()
+ {
+ base.RefreshData();
+ bool flag = DlgBase<ItemSystemDlg, TabDlgBehaviour>.singleton._equipHandler != null;
+ if (flag)
+ {
+ DlgBase<ItemSystemDlg, TabDlgBehaviour>.singleton._equipHandler.RegisterItemClickEvents(new SpriteClickEventHandler(this.OnEquipClicked));
+ }
+ XItem itemByUID = XSingleton<XGame>.singleton.Doc.XBagDoc.EquipBag.GetItemByUID(this.m_doc.SelectUid);
+ bool flag2 = itemByUID == null;
+ if (flag2)
+ {
+ this.m_doc.SelectEquip(0UL);
+ }
+ else
+ {
+ this.m_doc.SelectEquip(this.m_doc.SelectUid);
+ }
+ this.FillContent();
+ }
+
+ public override void StackRefresh()
+ {
+ this.RefreshData();
+ base.StackRefresh();
+ }
+
+ public void ShowUI()
+ {
+ this.FillContent();
+ }
+
+ private void FillContent()
+ {
+ XItem itemByUID = XBagDocument.BagDoc.GetItemByUID(this.m_doc.SelectUid);
+ bool flag = itemByUID == null;
+ if (!flag)
+ {
+ EquipList.RowData equipConf = XBagDocument.GetEquipConf(itemByUID.itemID);
+ bool flag2 = equipConf == null;
+ if (!flag2)
+ {
+ XSingleton<XItemDrawerMgr>.singleton.DrawItem(this.m_beforeItem, itemByUID);
+ IXUISprite ixuisprite = this.m_beforeItem.transform.Find("Icon").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.ID = itemByUID.uid;
+ ixuisprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnClickItem));
+ EquipList.RowData equipConf2 = XBagDocument.GetEquipConf((int)equipConf.UpgadeTargetID);
+ bool flag3 = equipConf2 != null;
+ if (flag3)
+ {
+ XSingleton<XItemDrawerMgr>.singleton.normalItemDrawer.DrawItem(this.m_afterItem, equipConf2.ItemID, 0, false);
+ ixuisprite = (this.m_afterItem.transform.Find("Icon").GetComponent("XUISprite") as IXUISprite);
+ ixuisprite.ID = (ulong)equipConf2.ItemID;
+ ixuisprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnClickItem));
+ }
+ this.FillAttribute(equipConf, equipConf2);
+ this.FillNeedItem(equipConf.UpgradeNeedMaterials);
+ }
+ }
+ }
+
+ private void FillAttribute(EquipList.RowData row, EquipList.RowData targetRow)
+ {
+ bool flag = targetRow == null;
+ if (!flag)
+ {
+ this.m_BeforeAttrPool.ReturnAll(false);
+ this.m_AfterAttrPool.ReturnAll(false);
+ SeqListRef<int> attributes = row.Attributes;
+ float num = (float)((attributes.Count - 1) * this.m_gap / 2);
+ for (int i = 0; i < attributes.Count; i++)
+ {
+ GameObject gameObject = this.m_BeforeAttrPool.FetchGameObject(false);
+ gameObject.name = i.ToString();
+ gameObject.transform.parent = this.m_beforeUpgradeGo.transform;
+ gameObject.transform.localScale = Vector3.one;
+ gameObject.transform.localPosition = new Vector3(0f, num - (float)(this.m_gap * i), 0f);
+ this.FillAttrWithName(gameObject, attributes[i, 0], attributes[i, 1]);
+ int data = this.GetData(attributes[i, 0], targetRow.Attributes);
+ int dvalue = data - attributes[i, 1];
+ gameObject = this.m_AfterAttrPool.FetchGameObject(false);
+ gameObject.name = i.ToString();
+ gameObject.transform.parent = this.m_afterUpgradeGo.transform;
+ gameObject.transform.localScale = Vector3.one;
+ gameObject.transform.localPosition = new Vector3(0f, num - (float)(this.m_gap * i), 0f);
+ this.FillAttrNoName(gameObject, data, dvalue);
+ }
+ }
+ }
+
+ private void FillAttrWithName(GameObject go, int attrId, int num)
+ {
+ IXUILabel ixuilabel = go.transform.GetComponent("XUILabel") as IXUILabel;
+ ixuilabel.SetText(XStringDefineProxy.GetString((XAttributeDefine)attrId));
+ ixuilabel = (go.transform.Find("Value").GetComponent("XUILabel") as IXUILabel);
+ ixuilabel.SetText(num.ToString());
+ }
+
+ private void FillAttrNoName(GameObject go, int num, int dvalue)
+ {
+ IXUILabel ixuilabel = go.transform.GetComponent("XUILabel") as IXUILabel;
+ ixuilabel.SetText(num.ToString());
+ bool flag = dvalue > 0;
+ if (flag)
+ {
+ ixuilabel = (go.transform.Find("Up").GetComponent("XUILabel") as IXUILabel);
+ ixuilabel.SetText(string.Format("[63ff85]{0}[-]", dvalue));
+ ixuilabel.gameObject.SetActive(true);
+ }
+ else
+ {
+ go.transform.Find("Up").gameObject.SetActive(false);
+ }
+ }
+
+ private int GetData(int id, SeqListRef<int> seq)
+ {
+ for (int i = 0; i < (int)seq.count; i++)
+ {
+ bool flag = seq[i, 0] == id;
+ if (flag)
+ {
+ return seq[i, 1];
+ }
+ }
+ return 0;
+ }
+
+ private void FillNeedItem(SeqListRef<uint> items)
+ {
+ this.m_needItemPool.ReturnAll(false);
+ for (int i = 0; i < (int)items.count; i++)
+ {
+ uint num = items[i, 0];
+ GameObject gameObject = this.m_needItemPool.FetchGameObject(false);
+ gameObject.name = num.ToString();
+ gameObject.transform.localPosition = new Vector3((float)(this.m_needItemPool.TplWidth * i), 0f, 0f);
+ XSingleton<XItemDrawerMgr>.singleton.normalItemDrawer.DrawItem(gameObject, (int)num, 0, false);
+ IXUISprite ixuisprite = gameObject.transform.Find("Icon").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.ID = (ulong)num;
+ IXUILabel ixuilabel = gameObject.transform.Find("Num").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel.gameObject.SetActive(true);
+ uint num2 = (uint)XBagDocument.BagDoc.GetItemCount((int)num);
+ bool flag = num2 >= items[i, 1];
+ if (flag)
+ {
+ ixuisprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnClickItem));
+ ixuilabel.SetText(string.Format("[00ff00]{0}[-]/{1}", num2, items[i, 1]));
+ }
+ else
+ {
+ ixuisprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnGetItemAccess));
+ ixuilabel.SetText(string.Format("[ff0000]{0}[-]/{1}", num2, items[i, 1]));
+ }
+ }
+ }
+
+ private bool OnClosed(IXUIButton btn)
+ {
+ base.SetVisible(false);
+ return true;
+ }
+
+ private bool OnHelp(IXUIButton btn)
+ {
+ DlgBase<XCommonHelpTipView, XCommonHelpTipBehaviour>.singleton.ShowHelp(XSysDefine.XSys_EquipUpgrade);
+ return true;
+ }
+
+ private bool OnUpgrade(IXUIButton btn)
+ {
+ bool flag = this.SetButtonCool(this.m_delayTime);
+ bool result;
+ if (flag)
+ {
+ result = true;
+ }
+ else
+ {
+ this.m_doc.ReqUpgrade();
+ result = true;
+ }
+ return result;
+ }
+
+ private void OnClickItem(IXUISprite iSp)
+ {
+ ulong id = iSp.ID;
+ XItem xitem = XBagDocument.BagDoc.GetItemByUID(id);
+ bool flag = xitem == null;
+ if (flag)
+ {
+ xitem = XBagDocument.MakeXItem((int)id, false);
+ }
+ bool flag2 = xitem == null;
+ if (!flag2)
+ {
+ XSingleton<UiUtility>.singleton.ShowTooltipDialog(xitem, null, iSp, false, 0u);
+ }
+ }
+
+ public void OnEquipClicked(IXUISprite iSp)
+ {
+ this.m_doc.SelectEquip(iSp.ID);
+ }
+
+ private void OnGetItemAccess(IXUISprite iSp)
+ {
+ int itemid = (int)iSp.ID;
+ XSingleton<UiUtility>.singleton.ShowItemAccess(itemid, null);
+ }
+
+ private bool SetButtonCool(float time)
+ {
+ float num = Time.realtimeSinceStartup - this.m_fLastClickBtnTime;
+ bool flag = num < time;
+ bool result;
+ if (flag)
+ {
+ result = true;
+ }
+ else
+ {
+ this.m_fLastClickBtnTime = Time.realtimeSinceStartup;
+ result = false;
+ }
+ return result;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/EquipUpgradeHandler.cs.meta b/Client/Assets/Scripts/XMainClient/UI/EquipUpgradeHandler.cs.meta
new file mode 100644
index 00000000..1c038ee2
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/EquipUpgradeHandler.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 33c57c402a0505e42b655ba5cd456477
+timeCreated: 1611403553
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/ExchangeItemBehaviour.cs b/Client/Assets/Scripts/XMainClient/UI/ExchangeItemBehaviour.cs
new file mode 100644
index 00000000..15957ec0
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/ExchangeItemBehaviour.cs
@@ -0,0 +1,94 @@
+using System;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class ExchangeItemBehaviour : DlgBehaviourBase
+ {
+ public IXUIButton m_Close;
+
+ public IXUILabel m_Title;
+
+ public XUIPool m_MyItemPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ public IXUIScrollView m_ItemScrollView;
+
+ public GameObject m_MySelect;
+
+ public GameObject m_MyItemGo;
+
+ public IXUILabel m_MyItemName;
+
+ public GameObject m_OtherSelect;
+
+ public GameObject m_OtherItemGo;
+
+ public IXUILabel m_OtherItemName;
+
+ public IXUILabel m_Tips;
+
+ public IXUILabel m_MyEnsureText;
+
+ public IXUILabel m_OtherEnsureText;
+
+ public IXUIButton m_EnsureBtn;
+
+ public IXUIButton m_Input;
+
+ public IXUIButton m_SpeakBtn;
+
+ public IXUISprite m_MyVoiceBtn;
+
+ public IXUISprite m_OtherVoiceBtn;
+
+ public GameObject m_MyInputGo;
+
+ public GameObject m_OtherInputGo;
+
+ public IXUILabel m_MyInputText;
+
+ public IXUILabel m_OtherInputText;
+
+ public IXUILabel m_MyVoiceText;
+
+ public IXUILabel m_OtherVoiceText;
+
+ public IXUISpriteAnimation m_MyVoiceAni;
+
+ public IXUISpriteAnimation m_OtherVoiceAni;
+
+ private void Awake()
+ {
+ this.m_Close = (base.transform.Find("Bg/Close").GetComponent("XUIButton") as IXUIButton);
+ this.m_Title = (base.transform.Find("Bg/Title/content").GetComponent("XUILabel") as IXUILabel);
+ Transform transform = base.transform.Find("Bg/Self/List/ItemTpl");
+ this.m_MyItemPool.SetupPool(transform.parent.gameObject, transform.gameObject, 16u, false);
+ this.m_ItemScrollView = (base.transform.Find("Bg/Self/List").GetComponent("XUIScrollView") as IXUIScrollView);
+ this.m_MySelect = base.transform.Find("Bg/Self/MyItem/Item").gameObject;
+ this.m_MyItemGo = base.transform.Find("Bg/Self/MyItem").gameObject;
+ this.m_MyItemName = (base.transform.Find("Bg/Self/MyItem/Name").GetComponent("XUILabel") as IXUILabel);
+ this.m_OtherSelect = base.transform.Find("Bg/Other/OtherItem/Item").gameObject;
+ this.m_OtherItemGo = base.transform.Find("Bg/Other/OtherItem").gameObject;
+ this.m_OtherItemName = (base.transform.Find("Bg/Other/OtherItem/Name").GetComponent("XUILabel") as IXUILabel);
+ this.m_Tips = (base.transform.Find("Bg/Self/Tips").GetComponent("XUILabel") as IXUILabel);
+ this.m_MyEnsureText = (base.transform.Find("Bg/Self/OK/Text").GetComponent("XUILabel") as IXUILabel);
+ this.m_OtherEnsureText = (base.transform.Find("Bg/Other/Tips").GetComponent("XUILabel") as IXUILabel);
+ this.m_EnsureBtn = (base.transform.Find("Bg/Self/OK").GetComponent("XUIButton") as IXUIButton);
+ this.m_Input = (base.transform.Find("Bg/Input").GetComponent("XUIButton") as IXUIButton);
+ this.m_SpeakBtn = (base.transform.Find("Bg/Speak").GetComponent("XUIButton") as IXUIButton);
+ this.m_MyVoiceBtn = (base.transform.Find("Bg/Self/chatvoice").GetComponent("XUISprite") as IXUISprite);
+ this.m_MyInputGo = base.transform.Find("Bg/Self/chattext").gameObject;
+ this.m_MyInputText = (base.transform.Find("Bg/Self/chattext/text/content").GetComponent("XUILabel") as IXUILabel);
+ this.m_MyVoiceText = (base.transform.Find("Bg/Self/chatvoice/voice/content").GetComponent("XUILabel") as IXUILabel);
+ this.m_MyVoiceAni = (base.transform.Find("Bg/Self/chatvoice/voice/sign").GetComponent("XUISpriteAnimation") as IXUISpriteAnimation);
+ this.m_OtherVoiceBtn = (base.transform.Find("Bg/Other/chatvoice").GetComponent("XUISprite") as IXUISprite);
+ this.m_OtherInputGo = base.transform.Find("Bg/Other/chattext").gameObject;
+ this.m_OtherInputText = (base.transform.Find("Bg/Other/chattext/text/content").GetComponent("XUILabel") as IXUILabel);
+ this.m_OtherVoiceText = (base.transform.Find("Bg/Other/chatvoice/voice/content").GetComponent("XUILabel") as IXUILabel);
+ this.m_OtherVoiceAni = (base.transform.Find("Bg/Other/chatvoice/voice/sign").GetComponent("XUISpriteAnimation") as IXUISpriteAnimation);
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/ExchangeItemBehaviour.cs.meta b/Client/Assets/Scripts/XMainClient/UI/ExchangeItemBehaviour.cs.meta
new file mode 100644
index 00000000..d276cd30
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/ExchangeItemBehaviour.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: bd61be3370f37ef43b4fb668ac01429c
+timeCreated: 1611404451
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/ExchangeItemDlg.cs b/Client/Assets/Scripts/XMainClient/UI/ExchangeItemDlg.cs
new file mode 100644
index 00000000..6b9fcc8e
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/ExchangeItemDlg.cs
@@ -0,0 +1,367 @@
+using System;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class ExchangeItemDlg : DlgBase<ExchangeItemDlg, ExchangeItemBehaviour>
+ {
+ public override bool autoload
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override string fileName
+ {
+ get
+ {
+ return "Guild/GuildCollect/ExchangeItemDlg";
+ }
+ }
+
+ private XExchangeItemDocument _doc = null;
+
+ private readonly int COLNUM = 4;
+
+ private Vector2 m_DragDistance = Vector2.zero;
+
+ private bool m_CancelRecord = false;
+
+ private uint _audioPlayToken;
+
+ protected override void Init()
+ {
+ base.Init();
+ this._doc = XDocuments.GetSpecificDocument<XExchangeItemDocument>(XExchangeItemDocument.uuID);
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ base.uiBehaviour.m_Close.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnCloseBtnClick));
+ base.uiBehaviour.m_EnsureBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnEnsureBtnClick));
+ base.uiBehaviour.m_Input.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnInputBtnClick));
+ base.uiBehaviour.m_SpeakBtn.RegisterPressEventHandler(new ButtonPressEventHandler(this.OnVoiceButton));
+ base.uiBehaviour.m_SpeakBtn.RegisterDragEventHandler(new ButtonDragEventHandler(this.OnVoiceButtonDrag));
+ base.uiBehaviour.m_MyVoiceBtn.ID = 0UL;
+ base.uiBehaviour.m_MyVoiceBtn.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnAudioPlayClick));
+ base.uiBehaviour.m_OtherVoiceBtn.ID = 1UL;
+ base.uiBehaviour.m_OtherVoiceBtn.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnAudioPlayClick));
+ }
+
+ protected override void OnShow()
+ {
+ base.uiBehaviour.m_MyVoiceBtn.SetVisible(false);
+ base.uiBehaviour.m_MyInputGo.SetActive(false);
+ base.uiBehaviour.m_OtherVoiceBtn.SetVisible(false);
+ base.uiBehaviour.m_OtherInputGo.SetActive(false);
+ XSingleton<XAudioMgr>.singleton.SetBusStatuMute("bus:/MainGroupControl/Except_Quiz", 0f);
+ XSingleton<XAudioMgr>.singleton.SetBusStatuMute("bus:/MainGroupControl/Quiz ", 1f);
+ DlgBase<XChatMaqueeView, XChatMaqueeBehaviour>.singleton.SetMaqueeSwitch(false);
+ XSingleton<XChatIFlyMgr>.singleton.EnableAutoPlay(false);
+ base.OnShow();
+ }
+
+ public void InitShow(string name, uint prof)
+ {
+ this.SetVisibleWithAnimation(true, null);
+ base.uiBehaviour.m_Title.SetText(string.Format(XStringDefineProxy.GetString("ExchangeTitle"), this._doc.ExchangeItemStr));
+ base.uiBehaviour.m_MyItemGo.SetActive(false);
+ base.uiBehaviour.m_OtherItemGo.SetActive(false);
+ IXUILabel ixuilabel = base.uiBehaviour.transform.Find("Bg/Other/Name").GetComponent("XUILabel") as IXUILabel;
+ IXUISprite ixuisprite = base.uiBehaviour.transform.Find("Bg/Other/head").GetComponent("XUISprite") as IXUISprite;
+ ixuilabel.SetText(name);
+ ixuisprite.spriteName = XSingleton<XProfessionSkillMgr>.singleton.GetSuperRiskAvatar(prof % 10u);
+ bool flag = XSingleton<XAttributeMgr>.singleton.XPlayerData != null;
+ if (flag)
+ {
+ IXUILabel ixuilabel2 = base.uiBehaviour.transform.Find("Bg/Self/Name").GetComponent("XUILabel") as IXUILabel;
+ IXUISprite ixuisprite2 = base.uiBehaviour.transform.Find("Bg/Self/head").GetComponent("XUISprite") as IXUISprite;
+ ixuilabel2.SetText(XSingleton<XAttributeMgr>.singleton.XPlayerData.Name);
+ ixuisprite2.spriteName = XSingleton<XProfessionSkillMgr>.singleton.GetSuperRiskAvatar(XSingleton<XAttributeMgr>.singleton.XPlayerData.TypeID % 10u);
+ }
+ this.OnTipsChange();
+ this.OnEnsureStateChange();
+ ulong typeFilter = 1UL << this._doc.ExchangeType;
+ this._doc.ItemList.Clear();
+ XSingleton<XGame>.singleton.Doc.XBagDoc.GetItemsByType(typeFilter, ref this._doc.ItemList);
+ this.RefreshMyItemList();
+ base.uiBehaviour.m_ItemScrollView.ResetPosition();
+ }
+
+ public void RefreshMyItemList()
+ {
+ base.uiBehaviour.m_MyItemPool.FakeReturnAll();
+ Vector3 tplPos = base.uiBehaviour.m_MyItemPool.TplPos;
+ int num = 0;
+ for (int i = 0; i < this._doc.ItemList.Count; i++)
+ {
+ bool flag = this._doc.ItemList[i].uid == this._doc.CurrentSelectUid && this._doc.ItemList[i].itemCount == 1;
+ if (!flag)
+ {
+ GameObject gameObject = base.uiBehaviour.m_MyItemPool.FetchGameObject(false);
+ gameObject.transform.localPosition = new Vector3(tplPos.x + (float)(num % this.COLNUM * base.uiBehaviour.m_MyItemPool.TplWidth), tplPos.y - (float)(num / this.COLNUM * base.uiBehaviour.m_MyItemPool.TplHeight), 0f);
+ ItemList.RowData itemConf = XBagDocument.GetItemConf(this._doc.ItemList[i].itemID);
+ int itemCount = (this._doc.ItemList[i].uid == this._doc.CurrentSelectUid) ? (this._doc.ItemList[i].itemCount - 1) : this._doc.ItemList[i].itemCount;
+ XSingleton<XItemDrawerMgr>.singleton.normalItemDrawer.DrawItem(gameObject, itemConf, itemCount, false);
+ IXUISprite ixuisprite = gameObject.transform.Find("Icon").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.ID = this._doc.ItemList[i].uid;
+ ixuisprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnItemClick));
+ num++;
+ }
+ }
+ base.uiBehaviour.m_MyItemPool.ActualReturnAll(false);
+ }
+
+ public void OnMySelectChange(ulong SelectID)
+ {
+ bool flag = SelectID == 0UL;
+ if (flag)
+ {
+ base.uiBehaviour.m_MyItemGo.SetActive(false);
+ }
+ else
+ {
+ base.uiBehaviour.m_MyItemGo.SetActive(true);
+ int i = 0;
+ while (i < this._doc.ItemList.Count)
+ {
+ bool flag2 = this._doc.ItemList[i].uid == SelectID;
+ if (flag2)
+ {
+ ItemList.RowData itemConf = XBagDocument.GetItemConf(this._doc.ItemList[i].itemID);
+ bool flag3 = itemConf == null;
+ if (flag3)
+ {
+ XSingleton<XDebug>.singleton.AddErrorLog("Can't find my select itemid for itemlist. selectID = ", SelectID.ToString(), null, null, null, null);
+ return;
+ }
+ XSingleton<XItemDrawerMgr>.singleton.normalItemDrawer.DrawItem(base.uiBehaviour.m_MySelect, itemConf, 0, false);
+ base.uiBehaviour.m_MyItemName.SetText(XSingleton<UiUtility>.singleton.ChooseProfString(itemConf.ItemName, 0u));
+ IXUISprite ixuisprite = base.uiBehaviour.m_MySelect.transform.Find("Icon").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.ID = 0UL;
+ ixuisprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnItemClick));
+ return;
+ }
+ else
+ {
+ i++;
+ }
+ }
+ XSingleton<XDebug>.singleton.AddErrorLog("Can't find MySelectID for bag. MySelectID = ", SelectID.ToString(), null, null, null, null);
+ }
+ }
+
+ public void OnOtherSelectChange(int SelectID)
+ {
+ bool flag = SelectID == 0;
+ if (flag)
+ {
+ base.uiBehaviour.m_OtherItemGo.SetActive(false);
+ }
+ else
+ {
+ base.uiBehaviour.m_OtherItemGo.SetActive(true);
+ ItemList.RowData itemConf = XBagDocument.GetItemConf(SelectID);
+ bool flag2 = itemConf == null;
+ if (flag2)
+ {
+ XSingleton<XDebug>.singleton.AddErrorLog("Can't find Other select itemid for itemlist. selectID = ", SelectID.ToString(), null, null, null, null);
+ }
+ else
+ {
+ XSingleton<XItemDrawerMgr>.singleton.normalItemDrawer.DrawItem(base.uiBehaviour.m_OtherSelect, itemConf, 0, false);
+ XSingleton<XItemDrawerMgr>.singleton.normalItemDrawer.OpenClickShowTooltipEvent(base.uiBehaviour.m_OtherSelect, SelectID);
+ base.uiBehaviour.m_OtherItemName.SetText(XSingleton<UiUtility>.singleton.ChooseProfString(itemConf.ItemName, 0u));
+ }
+ }
+ }
+
+ public void OnEnsureStateChange()
+ {
+ base.uiBehaviour.m_MyEnsureText.SetText(XStringDefineProxy.GetString(string.Format("ExchangeMyEnsureTips_{0}", this._doc.MyEnsureState ? 1 : 0)));
+ base.uiBehaviour.m_OtherEnsureText.SetText(XStringDefineProxy.GetString(string.Format("ExchangeOtherEnsureTips_{0}", this._doc.OtherEnsureState ? 1 : 0)));
+ }
+
+ public void OnTipsChange()
+ {
+ string text = XStringDefineProxy.GetString(string.Format("ExchangeTips_{0}", this._doc.TipsState));
+ bool flag = this._doc.TipsState == 0 || this._doc.TipsState == 2;
+ if (flag)
+ {
+ text = string.Format(text, this._doc.ExchangeItemStr);
+ }
+ base.uiBehaviour.m_Tips.SetText(text);
+ }
+
+ protected override void OnHide()
+ {
+ XSingleton<XTimerMgr>.singleton.KillTimer(this._audioPlayToken);
+ XSingleton<XAudioMgr>.singleton.SetBusStatuMute("bus:/MainGroupControl/Except_Quiz", 1f);
+ XSingleton<XAudioMgr>.singleton.SetBusStatuMute("bus:/MainGroupControl/Quiz ", 1f);
+ DlgBase<XChatMaqueeView, XChatMaqueeBehaviour>.singleton.SetMaqueeSwitch(true);
+ XSingleton<XChatIFlyMgr>.singleton.EnableAutoPlay(true);
+ XSingleton<XChatIFlyMgr>.singleton.StopAutoPlay();
+ base.OnHide();
+ }
+
+ protected override void OnUnload()
+ {
+ XSingleton<XTimerMgr>.singleton.KillTimer(this._audioPlayToken);
+ base.OnUnload();
+ }
+
+ private bool OnCloseBtnClick(IXUIButton btn)
+ {
+ this._doc.QueryCloseUI();
+ return true;
+ }
+
+ private void OnItemClick(IXUISprite iSp)
+ {
+ bool flag = this._doc.CurrentSelectUid != iSp.ID;
+ if (flag)
+ {
+ this._doc.QuerySelectItem(iSp.ID);
+ }
+ }
+
+ private bool OnEnsureBtnClick(IXUIButton btn)
+ {
+ this._doc.QueryEnsureExchange(!this._doc.MyEnsureState);
+ return true;
+ }
+
+ public void RefreshMyChat()
+ {
+ bool flag = this._doc.MyAudioID == 0UL;
+ if (flag)
+ {
+ base.uiBehaviour.m_MyInputGo.SetActive(true);
+ base.uiBehaviour.m_MyVoiceBtn.SetVisible(false);
+ base.uiBehaviour.m_MyInputText.SetText(this._doc.MyInputText);
+ }
+ else
+ {
+ base.uiBehaviour.m_MyInputGo.SetActive(false);
+ base.uiBehaviour.m_MyVoiceBtn.SetVisible(true);
+ this.OnAudioPlayClick(base.uiBehaviour.m_MyVoiceBtn);
+ base.uiBehaviour.m_MyVoiceText.SetText(this._doc.MyInputText);
+ }
+ }
+
+ public void RefreshOtherChat()
+ {
+ bool flag = this._doc.OtherAudioID == 0UL;
+ if (flag)
+ {
+ base.uiBehaviour.m_OtherInputGo.SetActive(true);
+ base.uiBehaviour.m_OtherVoiceBtn.SetVisible(false);
+ base.uiBehaviour.m_OtherInputText.SetText(this._doc.OtherInputText);
+ }
+ else
+ {
+ base.uiBehaviour.m_OtherInputGo.SetActive(false);
+ base.uiBehaviour.m_OtherVoiceBtn.SetVisible(true);
+ this.OnAudioPlayClick(base.uiBehaviour.m_OtherVoiceBtn);
+ base.uiBehaviour.m_OtherVoiceText.SetText(this._doc.OtherInputText);
+ }
+ }
+
+ private void OnAudioPlayClick(IXUISprite iSp)
+ {
+ XSingleton<XChatIFlyMgr>.singleton.StopAutoPlay();
+ base.uiBehaviour.m_MyVoiceAni.StopAndReset();
+ base.uiBehaviour.m_OtherVoiceAni.StopAndReset();
+ XSingleton<XTimerMgr>.singleton.KillTimer(this._audioPlayToken);
+ bool flag = iSp.ID == 0UL;
+ if (flag)
+ {
+ XSingleton<XChatIFlyMgr>.singleton.StartPlayAudioId(this._doc.MyAudioID);
+ base.uiBehaviour.m_MyVoiceAni.Reset();
+ this._audioPlayToken = XSingleton<XTimerMgr>.singleton.SetTimer(this._doc.MyAudioTime / 1000f, new XTimerMgr.ElapsedEventHandler(this.OnPlayEnd), null);
+ XSingleton<XDebug>.singleton.AddLog("exchange my voice time = ", this._doc.MyAudioTime.ToString(), null, null, null, null, XDebugColor.XDebug_None);
+ }
+ else
+ {
+ XSingleton<XChatIFlyMgr>.singleton.StartPlayAudioId(this._doc.OtherAudioID);
+ base.uiBehaviour.m_OtherVoiceAni.Reset();
+ this._audioPlayToken = XSingleton<XTimerMgr>.singleton.SetTimer(this._doc.OtherAudioTime / 1000f, new XTimerMgr.ElapsedEventHandler(this.OnPlayEnd), null);
+ XSingleton<XDebug>.singleton.AddLog("exchange other voice time = ", this._doc.OtherAudioTime.ToString(), null, null, null, null, XDebugColor.XDebug_None);
+ }
+ }
+
+ private void OnPlayEnd(object o = null)
+ {
+ base.uiBehaviour.m_MyVoiceAni.StopAndReset();
+ base.uiBehaviour.m_OtherVoiceAni.StopAndReset();
+ }
+
+ private bool OnInputBtnClick(IXUIButton btn)
+ {
+ DlgBase<XChatInputView, XChatInputBehaviour>.singleton.ShowChatInput(new ChatInputStringBack(this.OnInputStringGet));
+ DlgBase<XChatInputView, XChatInputBehaviour>.singleton.SetInputType(ChatInputType.TEXT);
+ DlgBase<XChatInputView, XChatInputBehaviour>.singleton.SetCharacterLimit(50);
+ return true;
+ }
+
+ public void OnInputStringGet(string str)
+ {
+ XSingleton<XDebug>.singleton.AddLog("Player input string is ", str, null, null, null, null, XDebugColor.XDebug_None);
+ this._doc.SendChat(str, 0UL, 0u);
+ }
+
+ private void OnVoiceButtonDrag(IXUIButton sp, Vector2 delta)
+ {
+ this.m_DragDistance += delta;
+ bool flag = this.m_DragDistance.magnitude >= 100f;
+ if (flag)
+ {
+ this.m_CancelRecord = true;
+ }
+ else
+ {
+ this.m_CancelRecord = false;
+ }
+ }
+
+ private void OnVoiceButton(IXUIButton sp, bool state)
+ {
+ if (state)
+ {
+ this.m_CancelRecord = false;
+ XSingleton<XDebug>.singleton.AddLog("Press down", null, null, null, null, null, XDebugColor.XDebug_None);
+ this.m_DragDistance = Vector2.zero;
+ bool answerUseApollo = XChatDocument.m_AnswerUseApollo;
+ if (answerUseApollo)
+ {
+ XSingleton<XChatApolloMgr>.singleton.StartRecord(VoiceUsage.GUILDCOLLECT, null);
+ }
+ else
+ {
+ XSingleton<XChatIFlyMgr>.singleton.StartRecord(VoiceUsage.GUILDCOLLECT, null);
+ }
+ }
+ else
+ {
+ XSingleton<XDebug>.singleton.AddLog("Press up", null, null, null, null, null, XDebugColor.XDebug_None);
+ DlgBase<XChatView, XChatBehaviour>.singleton.SetActiveChannel(ChatChannelType.Team);
+ bool answerUseApollo2 = XChatDocument.m_AnswerUseApollo;
+ if (answerUseApollo2)
+ {
+ XSingleton<XChatApolloMgr>.singleton.StopRecord(this.m_CancelRecord);
+ }
+ else
+ {
+ XSingleton<XChatIFlyMgr>.singleton.StopRecord(this.m_CancelRecord);
+ }
+ this.m_CancelRecord = false;
+ }
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/ExchangeItemDlg.cs.meta b/Client/Assets/Scripts/XMainClient/UI/ExchangeItemDlg.cs.meta
new file mode 100644
index 00000000..7232794a
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/ExchangeItemDlg.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 95e221fe61ee412498d6a0602a1046d3
+timeCreated: 1611404182
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/FashionAttrTotalHandler.cs b/Client/Assets/Scripts/XMainClient/UI/FashionAttrTotalHandler.cs
new file mode 100644
index 00000000..0056a506
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/FashionAttrTotalHandler.cs
@@ -0,0 +1,233 @@
+using System;
+using System.Collections.Generic;
+using UILib;
+using UnityEngine;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class FashionAttrTotalHandler : DlgHandlerBase
+ {
+ private XUIPool AttrPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ private XUIPool SuitAttrPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ private XUIPool CharmAttrPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ private XFashionDocument _doc;
+
+ private XFashionStorageDocument _fsDoc;
+
+ private IXUIScrollView m_scrollView;
+
+ private IXUISprite _close;
+
+ private IXUISprite _closebg;
+
+ private GameObject SuitFrame = null;
+
+ private GameObject BaseFrame = null;
+
+ private GameObject NoAttrGo = null;
+
+ private GameObject NoSuitAttrGo = null;
+
+ private GameObject SuitFrameAnchor = null;
+
+ private GameObject CharmFrame = null;
+
+ private GameObject NotCharmAttrGo = null;
+
+ private List<uint> UDataSource = null;
+
+ public bool ShowCharm = false;
+
+ protected override void Init()
+ {
+ this._doc = (XSingleton<XGame>.singleton.Doc.GetXComponent(XFashionDocument.uuID) as XFashionDocument);
+ this._fsDoc = XDocuments.GetSpecificDocument<XFashionStorageDocument>(XFashionStorageDocument.uuID);
+ this._close = (base.PanelObject.transform.Find("ToolTip/Close").GetComponent("XUISprite") as IXUISprite);
+ this._closebg = (base.PanelObject.transform.Find("ToolTip/CloseBg").GetComponent("XUISprite") as IXUISprite);
+ this.m_scrollView = (base.PanelObject.transform.Find("ToolTip/Frame").GetComponent("XUIScrollView") as IXUIScrollView);
+ this.SuitFrameAnchor = base.PanelObject.transform.Find("ToolTip/Frame/SuitFrameAnchor").gameObject;
+ this.CharmFrame = base.PanelObject.transform.Find("ToolTip/Frame/CharmFrame").gameObject;
+ Transform transform = this.CharmFrame.transform.Find("Attr1");
+ this.CharmAttrPool.SetupPool(transform.parent.gameObject, transform.gameObject, 3u, false);
+ this.NotCharmAttrGo = this.CharmFrame.transform.Find("NoSuitAttr").gameObject;
+ this.BaseFrame = base.PanelObject.transform.Find("ToolTip/Frame/BaseFrame").gameObject;
+ transform = this.BaseFrame.transform.Find("Attr1");
+ this.AttrPool.SetupPool(transform.parent.gameObject, transform.gameObject, 3u, false);
+ this.NoAttrGo = base.PanelObject.transform.Find("ToolTip/Frame/BaseFrame/NoSuitAttr").gameObject;
+ this.SuitFrame = base.PanelObject.transform.Find("ToolTip/Frame/SuitFrame").gameObject;
+ this.NoSuitAttrGo = this.SuitFrame.transform.Find("NoSuitAttr").gameObject;
+ transform = this.SuitFrame.transform.Find("Attr1");
+ this.SuitAttrPool.SetupPool(transform.parent.gameObject, transform.gameObject, 3u, false);
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ this._close.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnClose));
+ this._closebg.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnClose));
+ }
+
+ protected void OnClose(IXUISprite sp)
+ {
+ base.SetVisible(false);
+ }
+
+ public void SetDataSource(List<uint> s)
+ {
+ this.UDataSource = s;
+ }
+
+ protected override void OnShow()
+ {
+ Vector3 localPosition = this.SuitFrameAnchor.transform.localPosition;
+ bool showCharm = this.ShowCharm;
+ Dictionary<uint, uint> dictionary;
+ if (showCharm)
+ {
+ this.CharmFrame.SetActive(true);
+ int num = 0;
+ int num2 = 0;
+ this.CharmFrame.transform.localPosition = localPosition;
+ bool flag = this._fsDoc.TryGetCharmAttr(out dictionary, out num, out num2);
+ this.CharmAttrPool.ReturnAll(false);
+ int num3 = 0;
+ bool flag2 = flag;
+ if (flag2)
+ {
+ foreach (KeyValuePair<uint, uint> keyValuePair in dictionary)
+ {
+ bool flag3 = keyValuePair.Value == 0u;
+ if (!flag3)
+ {
+ GameObject gameObject = this.CharmAttrPool.FetchGameObject(false);
+ gameObject.transform.localPosition = this.CharmAttrPool.TplPos + new Vector3(0f, (float)(-(float)num3 * this.CharmAttrPool.TplHeight));
+ IXUILabel ixuilabel = gameObject.transform.Find("Text").GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel2 = gameObject.transform.Find("Value").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel.SetText(XStringDefineProxy.GetString((XAttributeDefine)keyValuePair.Key));
+ ixuilabel2.SetText(string.Format(" +{0}", keyValuePair.Value));
+ num3++;
+ }
+ }
+ }
+ this.NotCharmAttrGo.SetActive(num3 == 0);
+ bool flag4 = num3 == 0;
+ if (flag4)
+ {
+ num3 += 2;
+ }
+ else
+ {
+ num3++;
+ }
+ localPosition.y -= (float)(this.CharmAttrPool.TplHeight * num3);
+ }
+ else
+ {
+ this.CharmFrame.SetActive(false);
+ this.NotCharmAttrGo.SetActive(false);
+ }
+ this.BaseFrame.transform.localPosition = localPosition;
+ int num4 = 0;
+ dictionary = ((this.UDataSource == null) ? this._doc.GetOnBodyAttr() : this._doc.GetFashonListAttr(this.UDataSource));
+ this.AttrPool.ReturnAll(false);
+ foreach (KeyValuePair<uint, uint> keyValuePair2 in dictionary)
+ {
+ GameObject gameObject2 = this.AttrPool.FetchGameObject(false);
+ gameObject2.transform.localPosition = this.AttrPool.TplPos + new Vector3(0f, (float)(-(float)num4 * this.AttrPool.TplHeight));
+ IXUILabel ixuilabel3 = gameObject2.transform.Find("Text").GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel4 = gameObject2.transform.Find("Value").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel3.SetText(XStringDefineProxy.GetString((XAttributeDefine)keyValuePair2.Key));
+ ixuilabel4.SetText(string.Format(" +{0}", keyValuePair2.Value));
+ num4++;
+ }
+ this.NoAttrGo.SetActive(num4 == 0);
+ bool flag5 = num4 == 0;
+ if (flag5)
+ {
+ num4 += 2;
+ }
+ else
+ {
+ num4++;
+ }
+ localPosition.y -= (float)(this.AttrPool.TplHeight * num4);
+ this.SuitFrame.transform.localPosition = localPosition;
+ int num5 = 0;
+ Dictionary<int, uint> dictionary2 = (this.UDataSource == null) ? this._doc.GetTotalQualityCountOnBody(false) : this._doc.GetTotalQualityCount(this.UDataSource, false);
+ this.SuitAttrPool.ReturnAll(false);
+ foreach (KeyValuePair<int, uint> keyValuePair3 in dictionary2)
+ {
+ for (int i = 2; i <= 7; i++)
+ {
+ bool flag6 = (long)i > (long)((ulong)keyValuePair3.Value);
+ if (flag6)
+ {
+ break;
+ }
+ SeqListRef<uint> qualityEffect = this._doc.GetQualityEffect(keyValuePair3.Key, i, false);
+ bool flag7 = qualityEffect.Count == 0;
+ if (!flag7)
+ {
+ for (int j = 0; j < qualityEffect.Count; j++)
+ {
+ bool flag8 = qualityEffect[j, 0] == 0u;
+ if (!flag8)
+ {
+ GameObject gameObject3 = this.SuitAttrPool.FetchGameObject(false);
+ gameObject3.transform.localPosition = this.SuitAttrPool.TplPos + new Vector3(0f, (float)(-(float)num5 * this.SuitAttrPool.TplHeight));
+ IXUILabel ixuilabel5 = gameObject3.transform.Find("Text").GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel6 = gameObject3.transform.Find("Value").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel5.SetText(XStringDefineProxy.GetString("SUIT_PART_COUNT_EFFECT", new object[]
+ {
+ this._doc.GetQualityName(keyValuePair3.Key) + XStringDefineProxy.GetString("SUIT_QUALITY") + i
+ }));
+ ixuilabel6.SetText(XStringDefineProxy.GetString((XAttributeDefine)qualityEffect[j, 0]) + XAttributeCommon.GetAttrValueStr((int)qualityEffect[j, 0], (float)qualityEffect[j, 1]));
+ num5++;
+ }
+ }
+ }
+ }
+ }
+ Dictionary<int, uint> dictionary3 = (this.UDataSource == null) ? this._doc.GetTotalQualityCountOnBody(true) : this._doc.GetTotalQualityCount(this.UDataSource, true);
+ foreach (KeyValuePair<int, uint> keyValuePair4 in dictionary3)
+ {
+ for (int k = 2; k <= 7; k++)
+ {
+ bool flag9 = (long)k > (long)((ulong)keyValuePair4.Value);
+ if (flag9)
+ {
+ break;
+ }
+ SeqListRef<uint> qualityEffect2 = this._doc.GetQualityEffect(keyValuePair4.Key, k, true);
+ bool flag10 = qualityEffect2.Count == 0;
+ if (!flag10)
+ {
+ for (int l = 0; l < qualityEffect2.Count; l++)
+ {
+ bool flag11 = qualityEffect2[l, 0] == 0u;
+ if (!flag11)
+ {
+ GameObject gameObject4 = this.SuitAttrPool.FetchGameObject(false);
+ gameObject4.transform.localPosition = this.SuitAttrPool.TplPos + new Vector3(0f, (float)(-(float)num5 * this.SuitAttrPool.TplHeight));
+ IXUILabel ixuilabel7 = gameObject4.transform.Find("Text").GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel8 = gameObject4.transform.Find("Value").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel7.SetText(XStringDefineProxy.GetString("SUIT_PART_COUNT_EFFECT", new object[]
+ {
+ this._doc.GetQualityName(keyValuePair4.Key) + XStringDefineProxy.GetString("SUIT_QUALITY_THREE") + k
+ }));
+ ixuilabel8.SetText(XStringDefineProxy.GetString((XAttributeDefine)qualityEffect2[l, 0]) + XAttributeCommon.GetAttrValueStr((int)qualityEffect2[l, 0], (float)qualityEffect2[l, 1]));
+ num5++;
+ }
+ }
+ }
+ }
+ }
+ this.NoSuitAttrGo.SetActive(num5 == 0);
+ this.m_scrollView.ResetPosition();
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/FashionAttrTotalHandler.cs.meta b/Client/Assets/Scripts/XMainClient/UI/FashionAttrTotalHandler.cs.meta
new file mode 100644
index 00000000..fe254b54
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/FashionAttrTotalHandler.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: ad77266f7099f9f45bcdfa03ca8a084d
+timeCreated: 1611404335
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/FashionBagHandler.cs b/Client/Assets/Scripts/XMainClient/UI/FashionBagHandler.cs
new file mode 100644
index 00000000..8cdc7024
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/FashionBagHandler.cs
@@ -0,0 +1,356 @@
+using System;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class FashionBagHandler : DlgHandlerBase
+ {
+ protected override string FileName
+ {
+ get
+ {
+ return "ItemNew/FashionListPanel";
+ }
+ }
+
+ public GameObject m_ComboBox;
+
+ public GameObject m_ItemBagPanel;
+
+ public IXUIButton m_ShopButton;
+
+ public IXUIButton m_BtnClothes;
+
+ public IXUISprite m_OutLookRedPoint;
+
+ public IXUIButton m_CollectionButton;
+
+ public IXUIButton m_TotalAttrButton;
+
+ public GameObject m_TotalAttrPanel;
+
+ public IXUIButton m_Help;
+
+ public IXUISprite[] m_Fashion = new IXUISprite[10];
+
+ public IXUISprite[] m_FashionBg = new IXUISprite[10];
+
+ private FashionAttrTotalHandler _attrHandler;
+
+ private XFashionDocument _doc;
+
+ private FashionComboBox _comboBox;
+
+ private XBagWindow bagWindow;
+
+ private uint _timer;
+
+ private float update_interval = 180f;
+
+ protected override void Init()
+ {
+ base.Init();
+ this._doc = (XSingleton<XGame>.singleton.Doc.GetXComponent(XFashionDocument.uuID) as XFashionDocument);
+ this._doc.FashionDlg = this;
+ this.m_ComboBox = base.PanelObject.transform.Find("ComboBox").gameObject;
+ this.m_ItemBagPanel = base.PanelObject.gameObject;
+ this.m_ShopButton = (base.PanelObject.transform.Find("BtnShop").GetComponent("XUIButton") as IXUIButton);
+ this.m_Help = (base.transform.Find("Help").GetComponent("XUIButton") as IXUIButton);
+ for (int i = XBagDocument.BodyPosition<FashionPosition>(FashionPosition.FASHION_START); i < XBagDocument.BodyPosition<FashionPosition>(FashionPosition.FASHION_END); i++)
+ {
+ this.m_Fashion[i] = (base.PanelObject.transform.Find("EquipFrame/Part" + i + "/Icon").GetComponent("XUISprite") as IXUISprite);
+ this.m_FashionBg[i] = (base.PanelObject.transform.Find("EquipFrame/Part" + i + "/Bg").GetComponent("XUISprite") as IXUISprite);
+ this.m_FashionBg[i].ID = (ulong)((long)i);
+ }
+ this.m_CollectionButton = (base.PanelObject.transform.Find("BtnCollection").GetComponent("XUIButton") as IXUIButton);
+ this.m_TotalAttrButton = (base.PanelObject.transform.Find("BtnAttrTotal").GetComponent("XUIButton") as IXUIButton);
+ this.m_TotalAttrPanel = base.PanelObject.transform.Find("AttrTotal").gameObject;
+ this.bagWindow = new XBagWindow(this.m_ItemBagPanel, new ItemUpdateHandler(this.WrapContentItemUpdated), new GetItemHandler(this._doc.GetItem));
+ this.bagWindow.Init();
+ this._comboBox = new FashionComboBox(this.m_ComboBox, new ComboboxClickEventHandler(this.OnSelectPart), 2);
+ this.m_BtnClothes = (base.PanelObject.transform.Find("Btnclothes").GetComponent("XUIButton") as IXUIButton);
+ this.m_OutLookRedPoint = (base.PanelObject.transform.Find("Btnclothes/RedPoint").GetComponent("XUISprite") as IXUISprite);
+ this.m_OutLookRedPoint.SetVisible(false);
+ for (int j = XBagDocument.BodyPosition<FashionPosition>(FashionPosition.FASHION_START); j < XBagDocument.BodyPosition<FashionPosition>(FashionPosition.FASHION_END); j++)
+ {
+ this._comboBox.AddItem(XSingleton<UiUtility>.singleton.GetFashionPartName((FashionPosition)j, false), j);
+ }
+ this._comboBox.AddItem(XSingleton<UiUtility>.singleton.GetFashionPartName(FashionPosition.Hair, false), XFastEnumIntEqualityComparer<FashionPosition>.ToInt(FashionPosition.Hair));
+ this._comboBox.AddItem(XStringDefineProxy.GetString("ALL"), -1);
+ this._comboBox.SetSelect(-1);
+ DlgHandlerBase.EnsureCreate<FashionAttrTotalHandler>(ref this._attrHandler, this.m_TotalAttrPanel, null, false);
+ this._attrHandler.ShowCharm = true;
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ for (int i = XBagDocument.BodyPosition<FashionPosition>(FashionPosition.FASHION_START); i < XBagDocument.BodyPosition<FashionPosition>(FashionPosition.FASHION_END); i++)
+ {
+ this.m_Fashion[i].RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this._OnItemClicked));
+ this.m_FashionBg[i].RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this._OnBgClicked));
+ }
+ this.m_BtnClothes.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnClothClick));
+ this.m_TotalAttrButton.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnTotalAttrClick));
+ this.m_CollectionButton.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnCollectionClick));
+ this.m_ShopButton.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnShopClick));
+ this.m_Help.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnHelpClicked));
+ }
+
+ public void RefreshOutLookRedPoint()
+ {
+ this.m_BtnClothes.SetVisible(XSingleton<XGameSysMgr>.singleton.IsSystemOpened(XSysDefine.XSys_Fashion_OutLook));
+ XFashionStorageDocument specificDocument = XDocuments.GetSpecificDocument<XFashionStorageDocument>(XFashionStorageDocument.uuID);
+ this.m_OutLookRedPoint.SetVisible(specificDocument.RedPoint);
+ }
+
+ public bool OnHelpClicked(IXUIButton button)
+ {
+ DlgBase<XCommonHelpTipView, XCommonHelpTipBehaviour>.singleton.ShowHelp(XSysDefine.XSys_Fashion_Fashion);
+ return true;
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ this.ShowFashions();
+ this.RefreshOutLookRedPoint();
+ this.bagWindow.ChangeData(new ItemUpdateHandler(this.WrapContentItemUpdated), new GetItemHandler(this._doc.GetItem));
+ this.bagWindow.OnShow();
+ this._timer = XSingleton<XTimerMgr>.singleton.SetTimer(this.update_interval, new XTimerMgr.ElapsedEventHandler(this.UpdateFahionCD), null);
+ }
+
+ protected override void OnHide()
+ {
+ this.bagWindow.OnHide();
+ bool flag = this._timer > 0u;
+ if (flag)
+ {
+ XSingleton<XTimerMgr>.singleton.KillTimer(this._timer);
+ this._timer = 0u;
+ }
+ base.OnHide();
+ }
+
+ public override void OnUnload()
+ {
+ bool flag = this._timer > 0u;
+ if (flag)
+ {
+ XSingleton<XTimerMgr>.singleton.KillTimer(this._timer);
+ this._timer = 0u;
+ }
+ DlgHandlerBase.EnsureUnload<FashionAttrTotalHandler>(ref this._attrHandler);
+ this._doc.FashionDlg = null;
+ this.bagWindow = null;
+ base.OnUnload();
+ }
+
+ public override void StackRefresh()
+ {
+ base.StackRefresh();
+ this.ShowFashions();
+ this.RefreshOutLookRedPoint();
+ this.bagWindow.OnShow();
+ bool flag = this._timer > 0u;
+ if (flag)
+ {
+ XSingleton<XTimerMgr>.singleton.KillTimer(this._timer);
+ this._timer = 0u;
+ }
+ this._timer = XSingleton<XTimerMgr>.singleton.SetTimer(this.update_interval, new XTimerMgr.ElapsedEventHandler(this.UpdateFahionCD), null);
+ }
+
+ public void ShowFashions()
+ {
+ for (int i = XBagDocument.BodyPosition<FashionPosition>(FashionPosition.FASHION_START); i < XBagDocument.BodyPosition<FashionPosition>(FashionPosition.FASHION_END); i++)
+ {
+ ClientFashionData partFashion = this._doc.GetPartFashion(i);
+ this.m_Fashion[i].ID = partFashion.uid;
+ XSingleton<XItemDrawerMgr>.singleton.fashionDrawer.DrawItem(this.m_Fashion[i].gameObject.transform.parent.gameObject, partFashion);
+ this.m_Fashion[i].RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this._OnItemClicked));
+ this.SetFashionCD(this.m_Fashion[i].gameObject.transform.parent.gameObject, partFashion);
+ }
+ bool flag = this.bagWindow != null;
+ if (flag)
+ {
+ this.bagWindow.RefreshWindow();
+ }
+ }
+
+ public void UpdateBag()
+ {
+ this.bagWindow.UpdateBag();
+ }
+
+ private void UpdateFahionCD(object o)
+ {
+ bool flag = base.IsVisible();
+ if (flag)
+ {
+ for (int i = XBagDocument.BodyPosition<FashionPosition>(FashionPosition.FASHION_START); i < XBagDocument.BodyPosition<FashionPosition>(FashionPosition.FASHION_END); i++)
+ {
+ ClientFashionData partFashion = this._doc.GetPartFashion(i);
+ this.SetFashionCD(this.m_Fashion[i].gameObject.transform.parent.gameObject, partFashion);
+ }
+ bool flag2 = this.bagWindow != null;
+ if (flag2)
+ {
+ this.bagWindow.RefreshWindow();
+ }
+ }
+ this._timer = XSingleton<XTimerMgr>.singleton.SetTimer(this.update_interval, new XTimerMgr.ElapsedEventHandler(this.UpdateFahionCD), null);
+ }
+
+ private void SetFashionCD(GameObject item, ClientFashionData d)
+ {
+ Transform transform = item.transform.Find("Icon/TimeBg/cd");
+ bool flag = transform == null;
+ if (!flag)
+ {
+ bool flag2 = d == null;
+ if (flag2)
+ {
+ transform.parent.gameObject.SetActive(false);
+ }
+ else
+ {
+ IXUISprite ixuisprite = transform.GetComponent("XUISprite") as IXUISprite;
+ ItemList.RowData itemConf = XBagDocument.GetItemConf((int)d.itemID);
+ bool flag3 = itemConf != null;
+ if (flag3)
+ {
+ bool flag4 = itemConf.TimeLimit == 0u;
+ if (flag4)
+ {
+ transform.parent.gameObject.SetActive(false);
+ }
+ else
+ {
+ transform.parent.gameObject.SetActive(true);
+ bool flag5 = d.timeleft < 0.0;
+ if (flag5)
+ {
+ ixuisprite.SetFillAmount(0f);
+ }
+ else
+ {
+ ixuisprite.SetFillAmount(1f - (float)d.timeleft / itemConf.TimeLimit);
+ }
+ }
+ }
+ else
+ {
+ transform.parent.gameObject.SetActive(false);
+ }
+ }
+ }
+ }
+
+ private void WrapContentItemUpdated(Transform t, int index)
+ {
+ IXUISprite ixuisprite = t.Find("Icon").GetComponent("XUISprite") as IXUISprite;
+ GameObject gameObject = t.Find("P").gameObject;
+ GameObject gameObject2 = t.Find("RedPoint").gameObject;
+ bool flag = this.bagWindow.m_XItemList == null || index >= this.bagWindow.m_XItemList.Count || index < 0;
+ if (flag)
+ {
+ XSingleton<XItemDrawerMgr>.singleton.DrawItem(t.gameObject, null);
+ this.SetFashionCD(t.gameObject, null);
+ gameObject2.SetActive(false);
+ }
+ else
+ {
+ XItem xitem = this.bagWindow.m_XItemList[index];
+ ClientFashionData clientFashionData = this._doc.FindFashion(xitem.uid);
+ bool flag2 = clientFashionData == null;
+ if (flag2)
+ {
+ XSingleton<XItemDrawerMgr>.singleton.DrawItem(t.gameObject, null);
+ this.SetFashionCD(t.gameObject, null);
+ gameObject2.SetActive(false);
+ }
+ else
+ {
+ XSingleton<XItemDrawerMgr>.singleton.fashionDrawer.DrawItem(t.gameObject, clientFashionData);
+ ixuisprite.ID = xitem.uid;
+ ixuisprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this._OnItemClicked));
+ bool flag3 = index % this.bagWindow.COL_COUNT == 0;
+ if (flag3)
+ {
+ gameObject.SetActive(true);
+ }
+ else
+ {
+ gameObject.SetActive(false);
+ }
+ this.SetFashionCD(t.gameObject, clientFashionData);
+ gameObject2.SetActive(this._doc.HasFashionRedPoint(clientFashionData));
+ }
+ }
+ }
+
+ private bool OnClothClick(IXUIButton btn)
+ {
+ DlgBase<FashionStorageDlg, FashionStorageBehaviour>.singleton.SetVisibleWithAnimation(true, null);
+ return true;
+ }
+
+ private void _OnItemClicked(IXUISprite sp)
+ {
+ ulong id = sp.ID;
+ ClientFashionData clientFashionData = this._doc.FindFashion(id);
+ bool flag = clientFashionData != null;
+ if (flag)
+ {
+ XItem mainItem = this._doc.MakeXItem(clientFashionData);
+ XSingleton<UiUtility>.singleton.ShowTooltipDialog(mainItem, null, sp, true, 0u);
+ }
+ }
+
+ private void _OnBgClicked(IXUISprite sp)
+ {
+ int part = (int)sp.ID;
+ XSingleton<UiUtility>.singleton.ShowSystemTip(string.Format(XStringDefineProxy.GetString("FASHION_EQUIP_HINT"), XSingleton<UiUtility>.singleton.GetFashionPartName((FashionPosition)part, false)), "fece00");
+ }
+
+ private bool OnTotalAttrClick(IXUIButton button)
+ {
+ this._attrHandler.SetVisible(true);
+ return true;
+ }
+
+ private void OnSelectPart(int value)
+ {
+ this._doc.fashion_filter = value;
+ this.bagWindow.UpdateBag();
+ }
+
+ private bool OnCollectionClick(IXUIButton button)
+ {
+ DlgBase<FashionCollectionDlg, FashionCollectionDlgBehaviour>.singleton.SetVisible(true, true);
+ return true;
+ }
+
+ private bool OnShopClick(IXUIButton button)
+ {
+ XSingleton<UiUtility>.singleton.ShowItemAccess(199, null);
+ return true;
+ }
+
+ public void OnBodyFashionDisappear(int pos)
+ {
+ ClientFashionData partFashion = this._doc.GetPartFashion(pos);
+ XSingleton<XItemDrawerMgr>.singleton.fashionDrawer.DrawItem(this.m_Fashion[pos].gameObject.transform.parent.gameObject, partFashion);
+ this.SetFashionCD(this.m_Fashion[pos].gameObject.transform.parent.gameObject, partFashion);
+ }
+
+ public void OnBagFashionDisappear(ulong uid)
+ {
+ this.bagWindow.UpdateBag();
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/FashionBagHandler.cs.meta b/Client/Assets/Scripts/XMainClient/UI/FashionBagHandler.cs.meta
new file mode 100644
index 00000000..c6b29fc3
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/FashionBagHandler.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 93254620c3685ad43afe911dcf084da2
+timeCreated: 1611404149
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/FashionCollectionDlg.cs b/Client/Assets/Scripts/XMainClient/UI/FashionCollectionDlg.cs
new file mode 100644
index 00000000..fabaa7fa
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/FashionCollectionDlg.cs
@@ -0,0 +1,262 @@
+using System;
+using System.Collections.Generic;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class FashionCollectionDlg : DlgBase<FashionCollectionDlg, FashionCollectionDlgBehaviour>
+ {
+ public override bool autoload
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override string fileName
+ {
+ get
+ {
+ return "GameSystem/FashionColletionDlg";
+ }
+ }
+
+ public override bool pushstack
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override bool fullscreenui
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override bool hideMainMenu
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public XCharacterInfoView _InfoView;
+
+ private XFashionDocument _doc;
+
+ private int _selectedSuit = 0;
+
+ private List<int> allSuit = new List<int>();
+
+ protected override void Init()
+ {
+ base.Init();
+ this._doc = (XSingleton<XGame>.singleton.Doc.GetXComponent(XFashionDocument.uuID) as XFashionDocument);
+ DlgHandlerBase.EnsureCreate<XCharacterInfoView>(ref this._InfoView, base.uiBehaviour.m_CharacterInfoFrame, null, true);
+ base.uiBehaviour.m_WrapContent.RegisterItemUpdateEventHandler(new WrapItemUpdateEventHandler(this.WrapContentItemUpdated));
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ base.uiBehaviour.m_Close.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnCloseClick));
+ base.uiBehaviour.m_ShopBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnShopClick));
+ }
+
+ protected bool OnCloseClick(IXUIButton button)
+ {
+ XSingleton<X3DAvatarMgr>.singleton.OnFashionChanged(XSingleton<XEntityMgr>.singleton.Player);
+ XSingleton<X3DAvatarMgr>.singleton.EnableMainDummy(false, null);
+ this.SetVisible(false, true);
+ return true;
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ this.RefreshData();
+ }
+
+ public override void StackRefresh()
+ {
+ this._InfoView.StackRefresh();
+ this.RefreshData();
+ }
+
+ private void RefreshData()
+ {
+ bool flag = this.m_uiBehaviour.m_SnapShot != null;
+ if (flag)
+ {
+ XSingleton<X3DAvatarMgr>.singleton.EnableMainDummy(true, this.m_uiBehaviour.m_SnapShot);
+ }
+ this.ShowSuitList();
+ }
+
+ protected override void OnUnload()
+ {
+ XSingleton<X3DAvatarMgr>.singleton.OnUIUnloadMainDummy(this.m_uiBehaviour.m_SnapShot);
+ this._selectedSuit = 0;
+ this.allSuit.Clear();
+ DlgHandlerBase.EnsureUnload<XCharacterInfoView>(ref this._InfoView);
+ }
+
+ private void WrapContentItemUpdated(Transform t, int index)
+ {
+ bool flag = index < this.allSuit.Count && index >= 0;
+ if (flag)
+ {
+ FashionSuitTable.RowData suitData = this._doc.GetSuitData(this.allSuit[index]);
+ IXUILabel ixuilabel = t.Find("Label").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel.SetText(suitData.SuitName);
+ IXUISprite ixuisprite = t.Find("Icon").GetComponent("XUISprite") as IXUISprite;
+ string strAtlas = "";
+ string strSprite = "";
+ this._doc.GetSuitIcon(suitData, ref strAtlas, ref strSprite);
+ ixuisprite.SetSprite(strSprite, strAtlas, false);
+ IXUISprite ixuisprite2 = t.Find("Quality").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite2.SetSprite(XSingleton<UiUtility>.singleton.GetItemQualityFrame(suitData.SuitQuality, 1));
+ IXUILabel ixuilabel2 = t.Find("Num").GetComponent("XUILabel") as IXUILabel;
+ GameObject gameObject = t.Find("GetAll").gameObject;
+ GameObject gameObject2 = t.Find("NoSale").gameObject;
+ int suitCollectCount = this._doc.GetSuitCollectCount(this.allSuit[index]);
+ int suitTotalCount = this._doc.GetSuitTotalCount(this.allSuit[index]);
+ bool flag2 = suitCollectCount == suitTotalCount;
+ if (flag2)
+ {
+ ixuilabel2.gameObject.SetActive(false);
+ gameObject.SetActive(true);
+ }
+ else
+ {
+ ixuilabel2.gameObject.SetActive(true);
+ gameObject.SetActive(false);
+ ixuilabel2.SetText(suitCollectCount + "/" + suitTotalCount);
+ }
+ gameObject2.SetActive(this._doc.IsSuitNoSale(this.allSuit[index]));
+ IXUICheckBox ixuicheckBox = t.GetComponent("XUICheckBox") as IXUICheckBox;
+ ixuicheckBox.ID = (ulong)((long)this.allSuit[index]);
+ bool flag3 = this._selectedSuit == this.allSuit[index];
+ if (flag3)
+ {
+ ixuicheckBox.bChecked = true;
+ }
+ else
+ {
+ ixuicheckBox.ForceSetFlag(false);
+ }
+ ixuicheckBox.RegisterOnCheckEventHandler(new CheckBoxOnCheckEventHandler(this.OnSuitClick));
+ bool flag4 = this._selectedSuit == 0 && index == 0;
+ if (flag4)
+ {
+ ixuicheckBox.bChecked = true;
+ }
+ }
+ }
+
+ protected void ShowSuitList()
+ {
+ bool flag = this.allSuit.Count == 0;
+ if (flag)
+ {
+ this.allSuit = this._doc.GetSuitCollectionList();
+ base.uiBehaviour.m_WrapContent.SetContentCount(this.allSuit.Count, false);
+ base.uiBehaviour.m_ScrollView.ResetPosition();
+ }
+ base.uiBehaviour.m_TotalCollection.SetText(this._doc.GetFullCollectionSuitCount() + "/" + this.allSuit.Count);
+ }
+
+ protected bool OnSuitClick(IXUICheckBox box)
+ {
+ bool flag = !box.bChecked;
+ bool result;
+ if (flag)
+ {
+ result = false;
+ }
+ else
+ {
+ this._selectedSuit = (int)box.ID;
+ FashionSuitTable.RowData suitData = this._doc.GetSuitData(this._selectedSuit);
+ this.EquipSuit(suitData);
+ this.SetSuitInfo(suitData);
+ result = true;
+ }
+ return result;
+ }
+
+ protected void EquipSuit(FashionSuitTable.RowData suitData)
+ {
+ XSingleton<X3DAvatarMgr>.singleton.OnFashionSuitChanged(XSingleton<XEntityMgr>.singleton.Player, suitData);
+ }
+
+ protected void SetSuitInfo(FashionSuitTable.RowData suitData)
+ {
+ base.uiBehaviour.m_SuitName.SetText(suitData.SuitName);
+ base.uiBehaviour.FashionPool.ReturnAll(false);
+ bool flag = suitData.FashionID != null;
+ if (flag)
+ {
+ for (int i = 0; i < suitData.FashionID.Length; i++)
+ {
+ GameObject gameObject = base.uiBehaviour.FashionPool.FetchGameObject(false);
+ gameObject.transform.localPosition = base.uiBehaviour.ShowPos[i];
+ IXUISprite ixuisprite = gameObject.transform.Find("Icon").GetComponent("XUISprite") as IXUISprite;
+ XSingleton<XItemDrawerMgr>.singleton.fashionDrawer.DrawItem(gameObject.gameObject, (int)suitData.FashionID[i]);
+ ixuisprite.SetGrey(this._doc.HasCollected(suitData.FashionID[i]));
+ ixuisprite.ID = (ulong)suitData.FashionID[i];
+ ixuisprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this._OnItemClicked));
+ }
+ }
+ base.uiBehaviour.AttrPool.ReturnAll(false);
+ int num = 0;
+ for (int j = 2; j <= 7; j++)
+ {
+ SeqListRef<uint> suitPartCountEffect = this._doc.GetSuitPartCountEffect(suitData.SuitID, j);
+ bool flag2 = suitPartCountEffect.Count == 0;
+ if (!flag2)
+ {
+ for (int k = 0; k < suitPartCountEffect.Count; k++)
+ {
+ bool flag3 = suitPartCountEffect[k, 0] == 0u;
+ if (!flag3)
+ {
+ GameObject gameObject2 = base.uiBehaviour.AttrPool.FetchGameObject(false);
+ gameObject2.transform.localPosition = base.uiBehaviour.AttrPool.TplPos + new Vector3(0f, (float)(-(float)num * base.uiBehaviour.AttrPool.TplHeight));
+ IXUILabel ixuilabel = gameObject2.transform.Find("Text").GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel2 = gameObject2.transform.Find("Value").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel.SetText(XStringDefineProxy.GetString("EQUIP_SUIT_EFFECT", new object[]
+ {
+ j
+ }));
+ ixuilabel2.SetText(XStringDefineProxy.GetString((XAttributeDefine)suitPartCountEffect[k, 0]) + XAttributeCommon.GetAttrValueStr((int)suitPartCountEffect[k, 0], (float)suitPartCountEffect[k, 1]));
+ num++;
+ }
+ }
+ }
+ }
+ }
+
+ private void _OnItemClicked(IXUISprite sp)
+ {
+ int itemID = (int)sp.ID;
+ XItem mainItem = XBagDocument.MakeXItem(itemID, false);
+ XSingleton<UiUtility>.singleton.ShowTooltipDialog(mainItem, null, sp, false, 0u);
+ }
+
+ private bool OnShopClick(IXUIButton go)
+ {
+ DlgBase<GameMallDlg, TabDlgBehaviour>.singleton.ShowMall(XSysDefine.XSys_GameMall_Diamond, MallType.FASHION, 0UL);
+ return true;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/FashionCollectionDlg.cs.meta b/Client/Assets/Scripts/XMainClient/UI/FashionCollectionDlg.cs.meta
new file mode 100644
index 00000000..0a303c91
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/FashionCollectionDlg.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: adcee32d3dd1be84c9679a432b81c068
+timeCreated: 1611404336
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/FashionCollectionDlgBehaviour.cs b/Client/Assets/Scripts/XMainClient/UI/FashionCollectionDlgBehaviour.cs
new file mode 100644
index 00000000..0e41f9ce
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/FashionCollectionDlgBehaviour.cs
@@ -0,0 +1,54 @@
+using System;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class FashionCollectionDlgBehaviour : DlgBehaviourBase
+ {
+ public IXUIButton m_Close;
+
+ public GameObject m_CharacterInfoFrame;
+
+ public IXUILabel m_TotalCollection;
+
+ public IXUIWrapContent m_WrapContent;
+
+ public IXUIScrollView m_ScrollView;
+
+ public IXUILabel m_SuitName;
+
+ public IXUIButton m_ShopBtn;
+
+ public XUIPool FashionPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ public XUIPool AttrPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ public Vector3[] ShowPos = new Vector3[7];
+
+ public IUIDummy m_SnapShot = null;
+
+ private void Awake()
+ {
+ this.m_CharacterInfoFrame = base.transform.Find("Bg/CharacterInfoFrame").gameObject;
+ this.m_Close = (base.transform.Find("Bg/Close").GetComponent("XUIButton") as IXUIButton);
+ this.m_TotalCollection = (base.transform.Find("Bg/ListFrame/Bg/P/CollectNum/Label").GetComponent("XUILabel") as IXUILabel);
+ this.m_ScrollView = (base.transform.Find("Bg/ListFrame/ListPanel").GetComponent("XUIScrollView") as IXUIScrollView);
+ this.m_WrapContent = (base.transform.Find("Bg/ListFrame/ListPanel/WrapContent").GetComponent("XUIWrapContent") as IXUIWrapContent);
+ this.m_SuitName = (base.transform.Find("Bg/InfoFrame/SuitName").GetComponent("XUILabel") as IXUILabel);
+ this.m_ShopBtn = (base.transform.Find("Bg/InfoFrame/BtnShop").GetComponent("XUIButton") as IXUIButton);
+ for (int i = 0; i < 7; i++)
+ {
+ Transform transform = base.transform.Find("Bg/InfoFrame/ItemLocation" + (i + 1));
+ this.ShowPos[i] = transform.localPosition;
+ }
+ Transform transform2 = base.transform.Find("Bg/InfoFrame/ItemTpl");
+ this.FashionPool.SetupPool(transform2.parent.gameObject, transform2.gameObject, 7u, false);
+ transform2 = base.transform.Find("Bg/InfoFrame/AttrFrame/AttrTpl");
+ this.AttrPool.SetupPool(transform2.parent.gameObject, transform2.gameObject, 3u, false);
+ this.m_SnapShot = (this.m_CharacterInfoFrame.transform.Find("CharacterFrame/Snapshot").GetComponent("UIDummy") as IUIDummy);
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/FashionCollectionDlgBehaviour.cs.meta b/Client/Assets/Scripts/XMainClient/UI/FashionCollectionDlgBehaviour.cs.meta
new file mode 100644
index 00000000..e65f0c68
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/FashionCollectionDlgBehaviour.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 017e84820c1513342b9b656e1c6dbee4
+timeCreated: 1611402953
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/FashionComboBox.cs b/Client/Assets/Scripts/XMainClient/UI/FashionComboBox.cs
new file mode 100644
index 00000000..ed0ab8d1
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/FashionComboBox.cs
@@ -0,0 +1,88 @@
+using System;
+using System.Collections.Generic;
+using UILib;
+using UnityEngine;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class FashionComboBox
+ {
+ private ComboboxClickEventHandler _handler;
+
+ private IXUISprite selector = null;
+
+ private Transform droplist = null;
+
+ private IXUISprite close = null;
+
+ private IXUILabel selecttext = null;
+
+ private XUIPool itempool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ private int itemPerRow = 0;
+
+ private int itemcount = 0;
+
+ private Dictionary<int, string> value2string = new Dictionary<int, string>();
+
+ public FashionComboBox(GameObject go, ComboboxClickEventHandler handler, int PerRow = 2)
+ {
+ this._handler = handler;
+ this.itemPerRow = PerRow;
+ this.selector = (go.transform.Find("Difficulty").GetComponent("XUISprite") as IXUISprite);
+ this.close = (go.transform.Find("Difficulty/DropList/Close").GetComponent("XUISprite") as IXUISprite);
+ this.selecttext = (go.transform.Find("Difficulty/SelectedText").GetComponent("XUILabel") as IXUILabel);
+ this.droplist = go.transform.Find("Difficulty/DropList");
+ Transform transform = go.transform.Find("Difficulty/DropList/ItemTpl");
+ this.itempool.SetupPool(this.droplist.gameObject, transform.gameObject, 6u, false);
+ this.droplist.gameObject.SetActive(false);
+ this.selector.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnSelectorClick));
+ this.close.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnCloseClick));
+ }
+
+ private void OnSelectorClick(IXUISprite sp)
+ {
+ this.droplist.gameObject.SetActive(true);
+ }
+
+ private void OnCloseClick(IXUISprite sp)
+ {
+ this.droplist.gameObject.SetActive(false);
+ }
+
+ public void AddItem(string text, int value)
+ {
+ GameObject gameObject = this.itempool.FetchGameObject(false);
+ int num = this.itemcount % this.itemPerRow;
+ int num2 = this.itemcount / this.itemPerRow;
+ gameObject.transform.localPosition = this.itempool.TplPos + new Vector3((float)(num * this.itempool.TplWidth), (float)(-(float)num2 * this.itempool.TplHeight));
+ IXUISprite ixuisprite = gameObject.GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.ID = (ulong)((long)value);
+ ixuisprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnItemClick));
+ IXUILabel ixuilabel = gameObject.transform.Find("ItemText").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel.SetText(text);
+ this.value2string.Add(value, text);
+ this.itemcount++;
+ }
+
+ private void OnItemClick(IXUISprite sp)
+ {
+ this.selecttext.SetText(this.value2string[(int)sp.ID]);
+ this.droplist.gameObject.SetActive(false);
+ this._handler((int)sp.ID);
+ }
+
+ public void SetSelect(int value)
+ {
+ string text;
+ bool flag = this.value2string.TryGetValue(value, out text);
+ if (flag)
+ {
+ this.selecttext.SetText(text);
+ this.droplist.gameObject.SetActive(false);
+ this._handler(value);
+ }
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/FashionComboBox.cs.meta b/Client/Assets/Scripts/XMainClient/UI/FashionComboBox.cs.meta
new file mode 100644
index 00000000..1a76d153
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/FashionComboBox.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 65139ca98ebdb1b49a7356c9c2b1ce99
+timeCreated: 1611403849
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/FashionHairToolTipBehaviour.cs b/Client/Assets/Scripts/XMainClient/UI/FashionHairToolTipBehaviour.cs
new file mode 100644
index 00000000..c719d405
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/FashionHairToolTipBehaviour.cs
@@ -0,0 +1,12 @@
+using System;
+
+namespace XMainClient.UI
+{
+ internal class FashionHairToolTipBehaviour : TooltipDlgBehaviour
+ {
+ protected override void Awake()
+ {
+ base.Awake();
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/FashionHairToolTipBehaviour.cs.meta b/Client/Assets/Scripts/XMainClient/UI/FashionHairToolTipBehaviour.cs.meta
new file mode 100644
index 00000000..bdd667ff
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/FashionHairToolTipBehaviour.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 2c5b794873787a6468fcfe8a25c1eade
+timeCreated: 1611403502
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/FashionHairToolTipDlg.cs b/Client/Assets/Scripts/XMainClient/UI/FashionHairToolTipDlg.cs
new file mode 100644
index 00000000..c89b86b3
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/FashionHairToolTipDlg.cs
@@ -0,0 +1,137 @@
+using System;
+using UILib;
+using UnityEngine;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class FashionHairToolTipDlg : TooltipDlg<FashionHairToolTipDlg, FashionHairToolTipBehaviour>
+ {
+ public override string fileName
+ {
+ get
+ {
+ return "GameSystem/FashionHairToolToolDlg";
+ }
+ }
+
+ private XFashionDocument _doc;
+
+ private IXUILabel time;
+
+ public override bool HideToolTip(bool forceHide = false)
+ {
+ return base.HideToolTip(forceHide);
+ }
+
+ protected override void Init()
+ {
+ base.Init();
+ this.m_OperateList[0, 0] = new TooltipButtonOperateRecycle(XSysDefine.XSys_Fashion_Fashion);
+ this.m_OperateList[0, 1] = new TooltipButtonOperateSell();
+ this.m_OperateList[0, 2] = new TooltipButtonActivateFashion();
+ this._doc = XDocuments.GetSpecificDocument<XFashionDocument>(XFashionDocument.uuID);
+ }
+
+ protected override void SetupTopFrame(GameObject goToolTip, ItemList.RowData data, bool bMain, XItem instanceData = null, XItem compareData = null)
+ {
+ base.SetupTopFrame(goToolTip, data, bMain, instanceData, compareData);
+ base._SetupLevel(goToolTip, data, 0);
+ base._SetupProf(goToolTip, data, bMain, instanceData, 1);
+ FashionList.RowData fashionConf = XBagDocument.GetFashionConf(data.ItemID);
+ base._SetTopFrameLabel(goToolTip, 2, XStringDefineProxy.GetString("ToolTipText_Part"), (fashionConf != null) ? XSingleton<UiUtility>.singleton.GetFashionPartName((FashionPosition)fashionConf.EquipPos, true) : string.Empty);
+ this.time = (goToolTip.transform.Find("TopFrame/Time/Left").GetComponent("XUILabel") as IXUILabel);
+ ClientFashionData clientFashionData = this._doc.FindFashion(this.mainItemUID);
+ ItemList.RowData itemConf = XBagDocument.GetItemConf(data.ItemID);
+ bool flag = itemConf != null;
+ if (flag)
+ {
+ bool flag2 = itemConf.TimeLimit == 0u;
+ if (flag2)
+ {
+ this.time.SetText(XStringDefineProxy.GetString("FASHION_LIMIT_ALWAYS"));
+ }
+ else
+ {
+ bool flag3 = clientFashionData == null;
+ if (flag3)
+ {
+ this.time.SetText(XSingleton<UiUtility>.singleton.TimeDuarationFormatString((int)itemConf.TimeLimit, 5) + XStringDefineProxy.GetString("FASHION_LIMIT_UNWEAR"));
+ }
+ else
+ {
+ bool flag4 = clientFashionData.timeleft < 0.0;
+ if (flag4)
+ {
+ this.time.SetText(XSingleton<UiUtility>.singleton.TimeDuarationFormatString((int)itemConf.TimeLimit, 5) + XStringDefineProxy.GetString("FASHION_LIMIT_UNWEAR"));
+ }
+ else
+ {
+ this.time.SetText(XSingleton<UiUtility>.singleton.TimeDuarationFormatString((int)itemConf.TimeLimit, 5));
+ }
+ }
+ }
+ }
+ }
+
+ protected override void SetAllAttrFrames(GameObject goToolTip, XAttrItem item, XAttrItem compareItem, bool bMain)
+ {
+ }
+
+ protected override void SetupOtherFrame(GameObject goToolTip, XItem item, XItem compareItem, bool bMain)
+ {
+ ItemList.RowData itemConf = XBagDocument.GetItemConf(item.itemID);
+ this._SetupDescription(goToolTip, itemConf);
+ }
+
+ protected override void SetupOtherFrame(GameObject goToolTip, ItemList.RowData data)
+ {
+ this._SetupDescription(goToolTip, data);
+ }
+
+ protected void _SetupDescription(GameObject goToolTip, ItemList.RowData data)
+ {
+ Transform transform = goToolTip.transform;
+ IXUISprite ixuisprite = transform.Find("ScrollPanel/Description").GetComponent("XUISprite") as IXUISprite;
+ IXUILabel ixuilabel = ixuisprite.gameObject.transform.Find("Text").GetComponent("XUILabel") as IXUILabel;
+ bool flag = data == null;
+ if (flag)
+ {
+ ixuilabel.SetText("");
+ }
+ else
+ {
+ ixuilabel.SetText(XSingleton<UiUtility>.singleton.ReplaceReturn(data.ItemDescription));
+ }
+ ixuisprite.spriteHeight = ixuilabel.spriteHeight + -(int)ixuilabel.gameObject.transform.localPosition.y;
+ this.totalFrameHeight += (float)ixuisprite.spriteHeight;
+ }
+
+ protected override void SetupToolTipButtons(GameObject goToolTip, XItem item, bool bMain)
+ {
+ base.SetupToolTipButtons(goToolTip, item, bMain);
+ bool flag = !this.bShowButtons;
+ if (!flag)
+ {
+ if (bMain)
+ {
+ base._SetupButtonVisiability(goToolTip, 0, item);
+ }
+ }
+ }
+
+ public override void OnUpdate()
+ {
+ ClientFashionData clientFashionData = this._doc.FindFashion(this.mainItemUID);
+ bool flag = clientFashionData != null && clientFashionData.timeleft > 0.0;
+ if (flag)
+ {
+ bool flag2 = this.time != null;
+ if (flag2)
+ {
+ this.time.SetText(XSingleton<UiUtility>.singleton.TimeDuarationFormatString((int)clientFashionData.timeleft, 5));
+ }
+ }
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/FashionHairToolTipDlg.cs.meta b/Client/Assets/Scripts/XMainClient/UI/FashionHairToolTipDlg.cs.meta
new file mode 100644
index 00000000..ddf416e9
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/FashionHairToolTipDlg.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 98007569a6de00b43919383a887bc275
+timeCreated: 1611404190
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/FashionStorageAttributeFrame.cs b/Client/Assets/Scripts/XMainClient/UI/FashionStorageAttributeFrame.cs
new file mode 100644
index 00000000..9b979ec4
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/FashionStorageAttributeFrame.cs
@@ -0,0 +1,171 @@
+using System;
+using System.Collections.Generic;
+using UILib;
+using UnityEngine;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ public class FashionStorageAttributeFrame : DlgHandlerBase
+ {
+ private IXUIScrollView m_scrollView;
+
+ private IXUIWrapContent m_wrapContent;
+
+ private IXUILabel m_titleLabel;
+
+ private IXUIButton m_editPortrait;
+
+ private IXUISprite m_redPoint;
+
+ private IFashionStorageSelect m_select;
+
+ private XFashionStorageDocument m_doc;
+
+ private Color m_normaColor = new Color(225f, 145f, 65f);
+
+ private IXUILabel m_descLabel;
+
+ private Transform m_getAll;
+
+ private IXUILabel m_fightLabel;
+
+ protected override void Init()
+ {
+ base.Init();
+ this.m_doc = XDocuments.GetSpecificDocument<XFashionStorageDocument>(XFashionStorageDocument.uuID);
+ this.m_titleLabel = (base.transform.Find("Title").GetComponent("XUILabel") as IXUILabel);
+ this.m_editPortrait = (base.transform.Find("EditPortrait").GetComponent("XUIButton") as IXUIButton);
+ this.m_scrollView = (base.transform.Find("ScrollView").GetComponent("XUIScrollView") as IXUIScrollView);
+ this.m_wrapContent = (base.transform.Find("ScrollView/WrapContent").GetComponent("XUIWrapContent") as IXUIWrapContent);
+ this.m_redPoint = (base.transform.Find("EditPortrait/RedPoint").GetComponent("XUISprite") as IXUISprite);
+ this.m_descLabel = (base.transform.Find("T").GetComponent("XUILabel") as IXUILabel);
+ this.m_getAll = base.transform.Find("T22");
+ this.m_wrapContent.RegisterItemUpdateEventHandler(new WrapItemUpdateEventHandler(this.OnWrapContentUpdate));
+ this.m_editPortrait.RegisterClickEventHandler(new ButtonClickEventHandler(this.ClickEditPortrait));
+ this.m_fightLabel = (base.transform.Find("T2").GetComponent("XUILabel") as IXUILabel);
+ }
+
+ private bool ClickEditPortrait(IXUIButton btn)
+ {
+ bool flag = btn.ID == 0UL || this.m_select == null;
+ bool result;
+ if (flag)
+ {
+ result = false;
+ }
+ else
+ {
+ bool redPoint = this.m_select.RedPoint;
+ if (redPoint)
+ {
+ this.m_doc.SendActivateFashion((uint)btn.ID);
+ }
+ else
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString("FASHION_STORAGE_ACTIVATE_TIPS"), "fece00");
+ }
+ result = true;
+ }
+ return result;
+ }
+
+ private void OnWrapContentUpdate(Transform t, int index)
+ {
+ bool flag = this.m_select == null;
+ if (!flag)
+ {
+ bool flag2 = index < this.m_select.GetAttributeCharm().Count && index >= 0;
+ if (flag2)
+ {
+ IXUILabel ixuilabel = t.GetComponent("XUILabel") as IXUILabel;
+ AttributeCharm attributeCharm = this.m_select.GetAttributeCharm()[index];
+ string @string = XStringDefineProxy.GetString((XAttributeDefine)attributeCharm.key);
+ ixuilabel.SetText(XStringDefineProxy.GetString("FASHION_STORAGE_ATT", new object[]
+ {
+ attributeCharm.index,
+ @string,
+ attributeCharm.value
+ }));
+ ixuilabel.SetColor(attributeCharm.active ? this.m_normaColor : Color.gray);
+ }
+ }
+ }
+
+ private int GetPPT(List<AttributeCharm> charms)
+ {
+ double num = 0.0;
+ int i = 0;
+ int count = charms.Count;
+ while (i < count)
+ {
+ num += XSingleton<XPowerPointCalculator>.singleton.GetPPT(charms[i].key, charms[i].value, null, -1);
+ i++;
+ }
+ return (int)num;
+ }
+
+ internal void SetFashionCharm(IFashionStorageSelect select = null)
+ {
+ this.m_select = select;
+ bool flag = select == null;
+ if (flag)
+ {
+ this.m_wrapContent.SetContentCount(0, false);
+ this.m_scrollView.ResetPosition();
+ this.m_titleLabel.SetText("");
+ this.m_editPortrait.SetVisible(false);
+ this.m_editPortrait.ID = 0UL;
+ this.m_redPoint.SetVisible(false);
+ this.m_descLabel.SetText("");
+ this.m_fightLabel.SetText("");
+ bool flag2 = this.m_getAll != null;
+ if (flag2)
+ {
+ this.m_getAll.gameObject.SetActive(false);
+ }
+ }
+ else
+ {
+ this.m_wrapContent.SetContentCount(this.m_select.GetAttributeCharm().Count, false);
+ this.m_scrollView.ResetPosition();
+ this.m_editPortrait.ID = (ulong)((long)this.m_select.GetID());
+ this.m_titleLabel.SetText(XStringDefineProxy.GetString("FASHIONSTORAGE_ATT_TITLE", new object[]
+ {
+ this.m_select.GetCount(),
+ this.m_select.GetFashionList().Length
+ }));
+ this.m_editPortrait.SetVisible(!this.m_select.ActivateAll);
+ this.m_fightLabel.SetText(XStringDefineProxy.GetString("FASHION_FIGHT_DESC", new object[]
+ {
+ this.m_select.GetFashionList().Length,
+ this.GetPPT(this.m_select.GetAttributeCharm())
+ }));
+ this.m_redPoint.SetVisible(this.m_select.RedPoint);
+ bool flag3 = this.m_getAll != null;
+ if (flag3)
+ {
+ this.m_getAll.gameObject.SetActive(this.m_select.ActivateAll);
+ }
+ this.m_editPortrait.SetGrey(this.m_select.RedPoint);
+ bool flag4 = this.m_select is FashionStorageFashionCollection;
+ if (flag4)
+ {
+ this.m_descLabel.SetText(XStringDefineProxy.GetString("FASHION_STORAGE_FASHION_DESC"));
+ }
+ else
+ {
+ bool flag5 = this.m_select is FashionStorageEquipCollection;
+ if (flag5)
+ {
+ this.m_descLabel.SetText(XStringDefineProxy.GetString("FASHION_STORAGE_EQUIP_DESC"));
+ }
+ else
+ {
+ this.m_descLabel.SetText("");
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/FashionStorageAttributeFrame.cs.meta b/Client/Assets/Scripts/XMainClient/UI/FashionStorageAttributeFrame.cs.meta
new file mode 100644
index 00000000..a8f0741c
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/FashionStorageAttributeFrame.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: b61967f1507a3e14b91e36cbd24b4b47
+timeCreated: 1611404396
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/FashionStorageBehaviour.cs b/Client/Assets/Scripts/XMainClient/UI/FashionStorageBehaviour.cs
new file mode 100644
index 00000000..535467a4
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/FashionStorageBehaviour.cs
@@ -0,0 +1,91 @@
+using System;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class FashionStorageBehaviour : DlgBehaviourBase
+ {
+ public IXUIButton m_close;
+
+ public IXUICheckBox m_outLook;
+
+ public IXUICheckBox m_equipRecord;
+
+ public IXUICheckBox m_fashionRecord;
+
+ public IXUIScrollView m_scrollView;
+
+ public IXUIWrapContent m_wrapContent;
+
+ public Transform m_effectContainer;
+
+ public IXUISprite m_outLookRedPoint;
+
+ public IXUISprite m_fashionCharmRedPoint;
+
+ public IXUISprite m_equipCharmRedPoint;
+
+ public IXUISprite m_avatarSprite;
+
+ public IUIDummy m_Snapshot;
+
+ public GameObject m_fashionList;
+
+ public GameObject m_attributeInfo;
+
+ public GameObject m_hairFrame;
+
+ public GameObject m_effectFrame;
+
+ public IXUISprite m_colorSprite;
+
+ public IXUISprite m_effectIcon;
+
+ public IXUISprite m_effectSprite;
+
+ public IXUISprite m_effectRedPoint;
+
+ public Transform[] m_partList;
+
+ private void Awake()
+ {
+ this.m_close = (base.transform.Find("Close").GetComponent("XUIButton") as IXUIButton);
+ this.m_avatarSprite = (base.transform.Find("Bg/Bg3").GetComponent("XUISprite") as IXUISprite);
+ this.m_outLook = (base.transform.Find("Navigation/OutLook").GetComponent("XUICheckBox") as IXUICheckBox);
+ this.m_outLook.ID = 0UL;
+ this.m_outLookRedPoint = (base.transform.Find("Navigation/OutLook/RedPoint").GetComponent("XUISprite") as IXUISprite);
+ this.m_equipRecord = (base.transform.Find("Navigation/EquipRecord").GetComponent("XUICheckBox") as IXUICheckBox);
+ this.m_equipRecord.ID = 2UL;
+ this.m_equipCharmRedPoint = (base.transform.Find("Navigation/EquipRecord/RedPoint").GetComponent("XUISprite") as IXUISprite);
+ this.m_fashionRecord = (base.transform.Find("Navigation/FashionRecord").GetComponent("XUICheckBox") as IXUICheckBox);
+ this.m_fashionRecord.ID = 1UL;
+ this.m_fashionCharmRedPoint = (base.transform.Find("Navigation/FashionRecord/RedPoint").GetComponent("XUISprite") as IXUISprite);
+ this.m_Snapshot = (base.transform.Find("Snapshot").GetComponent("UIDummy") as IUIDummy);
+ this.m_scrollView = (base.transform.Find("Select/ScrollView").GetComponent("XUIScrollView") as IXUIScrollView);
+ this.m_wrapContent = (base.transform.Find("Select/ScrollView/WrapContent").GetComponent("XUIWrapContent") as IXUIWrapContent);
+ this.m_effectContainer = base.transform.Find("Bg/Bg2");
+ this.m_fashionList = base.transform.Find("FashionList").gameObject;
+ this.m_attributeInfo = base.transform.Find("Attribute").gameObject;
+ this.m_hairFrame = base.transform.Find("HairFrame").gameObject;
+ this.m_effectFrame = base.transform.Find("EffectFrame").gameObject;
+ int num = XBagDocument.BodyPosition<FashionPosition>(FashionPosition.FASHION_START);
+ int num2 = XBagDocument.BodyPosition<FashionPosition>(FashionPosition.FASHION_ALL_END);
+ bool flag = this.m_partList == null;
+ if (flag)
+ {
+ this.m_partList = new Transform[num2];
+ }
+ for (int i = num; i < num2; i++)
+ {
+ this.m_partList[i] = base.transform.Find(string.Format("EquipFrame/Part{0}", i));
+ }
+ this.m_effectIcon = (base.transform.Find("EffectSprite/Icon").GetComponent("XUISprite") as IXUISprite);
+ this.m_effectSprite = (base.transform.Find("EffectSprite").GetComponent("XUISprite") as IXUISprite);
+ this.m_colorSprite = (base.transform.Find(string.Format("EquipFrame/Part{0}/Icon/Color", XFastEnumIntEqualityComparer<FashionPosition>.ToInt(FashionPosition.Hair))).GetComponent("XUISprite") as IXUISprite);
+ this.m_effectRedPoint = (base.transform.Find("EffectSprite/RedPoint").GetComponent("XUISprite") as IXUISprite);
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/FashionStorageBehaviour.cs.meta b/Client/Assets/Scripts/XMainClient/UI/FashionStorageBehaviour.cs.meta
new file mode 100644
index 00000000..209a83f9
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/FashionStorageBehaviour.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: af3054d914eb03e41867cbf676b695ca
+timeCreated: 1611404343
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/FashionStorageButtonGoFashion.cs b/Client/Assets/Scripts/XMainClient/UI/FashionStorageButtonGoFashion.cs
new file mode 100644
index 00000000..c1684ea7
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/FashionStorageButtonGoFashion.cs
@@ -0,0 +1,29 @@
+using System;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class FashionStorageButtonGoFashion : TooltipButtonOperateBase
+ {
+ public override string GetButtonText()
+ {
+ return XStringDefineProxy.GetString("FASHION_STORAGE_GO");
+ }
+
+ public override bool HasRedPoint(XItem item)
+ {
+ return false;
+ }
+
+ public override bool IsButtonVisible(XItem item)
+ {
+ XFashionStorageDocument specificDocument = XDocuments.GetSpecificDocument<XFashionStorageDocument>(XFashionStorageDocument.uuID);
+ return !specificDocument.InDisplay((uint)item.itemID);
+ }
+
+ public override void OnButtonClick(ulong mainUID, ulong compareUID)
+ {
+ XSingleton<UiUtility>.singleton.ShowItemAccess((int)mainUID, null);
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/FashionStorageButtonGoFashion.cs.meta b/Client/Assets/Scripts/XMainClient/UI/FashionStorageButtonGoFashion.cs.meta
new file mode 100644
index 00000000..c27d7c6b
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/FashionStorageButtonGoFashion.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: efb2cde36742e68439e9a51751f70cc6
+timeCreated: 1611404805
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/FashionStorageColouring.cs b/Client/Assets/Scripts/XMainClient/UI/FashionStorageColouring.cs
new file mode 100644
index 00000000..5ba4d085
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/FashionStorageColouring.cs
@@ -0,0 +1,30 @@
+using System;
+
+namespace XMainClient.UI
+{
+ internal class FashionStorageColouring : TooltipButtonOperateBase
+ {
+ public override string GetButtonText()
+ {
+ return XStringDefineProxy.GetString("HAIR_COULORING");
+ }
+
+ public override bool HasRedPoint(XItem item)
+ {
+ return false;
+ }
+
+ public override bool IsButtonVisible(XItem item)
+ {
+ XFashionStorageDocument specificDocument = XDocuments.GetSpecificDocument<XFashionStorageDocument>(XFashionStorageDocument.uuID);
+ bool flag = specificDocument.fashionStorageType > FashionStorageType.OutLook;
+ return !flag && XFashionDocument.IsTargetPart(item.itemID, FashionPosition.Hair);
+ }
+
+ public override void OnButtonClick(ulong mainUID, ulong compareUID)
+ {
+ XFashionStorageDocument specificDocument = XDocuments.GetSpecificDocument<XFashionStorageDocument>(XFashionStorageDocument.uuID);
+ specificDocument.SelectHair((uint)mainUID);
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/FashionStorageColouring.cs.meta b/Client/Assets/Scripts/XMainClient/UI/FashionStorageColouring.cs.meta
new file mode 100644
index 00000000..2b0b5957
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/FashionStorageColouring.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 8c2e4ccce4bb4ce41bd6c4b56f8ef015
+timeCreated: 1611404098
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/FashionStorageDlg.cs b/Client/Assets/Scripts/XMainClient/UI/FashionStorageDlg.cs
new file mode 100644
index 00000000..e73adf0c
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/FashionStorageDlg.cs
@@ -0,0 +1,632 @@
+using System;
+using System.Collections.Generic;
+using KKSG;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class FashionStorageDlg : DlgBase<FashionStorageDlg, FashionStorageBehaviour>
+ {
+ public override string fileName
+ {
+ get
+ {
+ return "GameSystem/FashionStorageDlg";
+ }
+ }
+
+ public override bool pushstack
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override bool autoload
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override bool hideMainMenu
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ private OutLook outLook
+ {
+ get
+ {
+ bool flag = this.m_outLook == null;
+ if (flag)
+ {
+ this.m_outLook = new OutLook();
+ }
+ bool flag2 = this.m_outLook.display_fashion == null;
+ if (flag2)
+ {
+ this.m_outLook.display_fashion = new OutLookDisplayFashion();
+ }
+ return this.m_outLook;
+ }
+ }
+
+ private XFashionStorageDocument m_doc;
+
+ private List<IFashionStorageSelect> m_SelectList;
+
+ private IFashionStorageSelect m_select;
+
+ private FashionStotageDisplayHandle m_FashinListFrame;
+
+ private FashionStorageAttributeFrame m_AttributeFrame;
+
+ private FashionStorageHairColorFrame m_HairColorFrame;
+
+ private FashionStorageEffectFrame m_effectFrame;
+
+ private Vector3 m_dummyAngle = new Vector3(0f, 180f, 0f);
+
+ private XFx m_fashionFx;
+
+ private XDummy m_Dummy;
+
+ private string m_fashionFxURL = "Effects/FX_Particle/UIfx/UI_UI_FashionStorageDlg_fx01";
+
+ private FashionStoragePreview m_previewType = FashionStoragePreview.None;
+
+ private uint[] allParts = null;
+
+ private OutLook m_outLook;
+
+ protected override void Init()
+ {
+ base.Init();
+ this.m_doc = XDocuments.GetSpecificDocument<XFashionStorageDocument>(XFashionStorageDocument.uuID);
+ base.uiBehaviour.m_wrapContent.RegisterItemUpdateEventHandler(new WrapItemUpdateEventHandler(this.ItemWrapContentUpdate));
+ base.uiBehaviour.m_avatarSprite.RegisterSpriteDragEventHandler(new SpriteDragEventHandler(this.OnAvatarDrag));
+ this.m_FashinListFrame = DlgHandlerBase.EnsureCreate<FashionStotageDisplayHandle>(ref this.m_FashinListFrame, base.uiBehaviour.m_fashionList, null, false);
+ this.m_AttributeFrame = DlgHandlerBase.EnsureCreate<FashionStorageAttributeFrame>(ref this.m_AttributeFrame, base.uiBehaviour.m_attributeInfo, null, false);
+ this.m_HairColorFrame = DlgHandlerBase.EnsureCreate<FashionStorageHairColorFrame>(ref this.m_HairColorFrame, base.uiBehaviour.m_hairFrame, null, false);
+ this.m_effectFrame = DlgHandlerBase.EnsureCreate<FashionStorageEffectFrame>(ref this.m_effectFrame, base.uiBehaviour.m_effectFrame, null, false);
+ }
+
+ private void ItemWrapContentUpdate(Transform t, int index)
+ {
+ bool flag = this.m_SelectList == null || index >= this.m_SelectList.Count || this.m_SelectList[index] == null;
+ if (!flag)
+ {
+ IFashionStorageSelect fashionStorageSelect = this.m_SelectList[index];
+ IXUISprite ixuisprite = t.Find("Bg").GetComponent("XUISprite") as IXUISprite;
+ IXUILabel ixuilabel = t.Find("Bg/TextLabel").GetComponent("XUILabel") as IXUILabel;
+ IXUISprite ixuisprite2 = t.Find("Bg/Selected").GetComponent("XUISprite") as IXUISprite;
+ IXUILabel ixuilabel2 = t.Find("Bg/SelectedTextLabel").GetComponent("XUILabel") as IXUILabel;
+ IXUISprite ixuisprite3 = t.Find("RedPoint").GetComponent("XUISprite") as IXUISprite;
+ IXUILabel ixuilabel3 = t.Find("Count").GetComponent("XUILabel") as IXUILabel;
+ Transform transform = t.Find("p");
+ ixuisprite.ID = (ulong)((long)index);
+ ixuisprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnSelectClick));
+ string name = fashionStorageSelect.GetName();
+ ixuilabel.SetText(name);
+ ixuilabel2.SetText(name);
+ float alpha = fashionStorageSelect.Select ? 1f : 0f;
+ ixuilabel2.Alpha = alpha;
+ ixuisprite2.SetAlpha(alpha);
+ ixuisprite3.SetVisible(fashionStorageSelect.RedPoint);
+ ixuilabel3.SetText(fashionStorageSelect.GetLabel());
+ transform.gameObject.SetActive(fashionStorageSelect.GetItems().Count == fashionStorageSelect.GetFashionList().Length && this.m_doc.fashionStorageType > FashionStorageType.OutLook);
+ }
+ }
+
+ public void Refresh()
+ {
+ this.OnTabChange(this.m_doc.fashionStorageType, true, false);
+ bool flag = this.m_HairColorFrame != null && this.m_HairColorFrame.IsVisible();
+ if (flag)
+ {
+ this.m_HairColorFrame.RefreshData();
+ }
+ bool flag2 = this.m_effectFrame != null && this.m_effectFrame.IsVisible();
+ if (flag2)
+ {
+ this.m_effectFrame.RefreshData();
+ }
+ bool showEffect = this.m_doc.ShowEffect;
+ if (showEffect)
+ {
+ XSingleton<XFxMgr>.singleton.CreateAndPlay("Effects/FX_Particle/UIfx/UI_yh", base.uiBehaviour.transform, Vector3.zero, Vector3.one, 1f, true, 5f, true);
+ }
+ }
+
+ private void RefreshRedPoint()
+ {
+ base.uiBehaviour.m_outLookRedPoint.SetVisible(this.m_doc.SuitRedPoint);
+ base.uiBehaviour.m_fashionCharmRedPoint.SetVisible(this.m_doc.FashionRedPoint);
+ base.uiBehaviour.m_equipCharmRedPoint.SetVisible(this.m_doc.EquipRedPoint);
+ base.uiBehaviour.m_effectRedPoint.SetVisible(this.m_doc.fashionStorageType == FashionStorageType.OutLook && this.m_doc.SuitRedPoint);
+ }
+
+ private void SetSelectIndex(int index = -1)
+ {
+ bool flag = this.m_SelectList == null || this.m_SelectList.Count == 0;
+ if (!flag)
+ {
+ bool flag2 = index > -1;
+ if (flag2)
+ {
+ int i = 0;
+ int count = this.m_SelectList.Count;
+ while (i < count)
+ {
+ this.m_SelectList[i].Select = (i == index);
+ i++;
+ }
+ }
+ else
+ {
+ index = 0;
+ bool flag3 = false;
+ int j = 0;
+ int count2 = this.m_SelectList.Count;
+ while (j < count2)
+ {
+ bool select = this.m_SelectList[j].Select;
+ if (select)
+ {
+ index = j;
+ flag3 = true;
+ break;
+ }
+ j++;
+ }
+ bool flag4 = !flag3;
+ if (flag4)
+ {
+ this.m_SelectList[index].Select = true;
+ }
+ }
+ base.uiBehaviour.m_wrapContent.RefreshAllVisibleContents();
+ this.m_select = this.m_SelectList[index];
+ this.OnReSelect();
+ }
+ }
+
+ private void OnReSelect()
+ {
+ uint[] fashionList = this.m_select.GetFashionList();
+ this.ShowAvatar(fashionList);
+ this.SetPartInfo(fashionList);
+ FashionStorageType fashionStorageType = this.m_doc.fashionStorageType;
+ if (fashionStorageType != FashionStorageType.OutLook)
+ {
+ if (fashionStorageType - FashionStorageType.FashionCollection <= 1)
+ {
+ this.m_AttributeFrame.SetFashionCharm(this.m_select);
+ }
+ }
+ else
+ {
+ this.m_FashinListFrame.SetFashionStorageSelect(this.m_select);
+ }
+ }
+
+ private void SetupEffect(uint effectid)
+ {
+ bool flag = effectid == 0u;
+ if (flag)
+ {
+ base.uiBehaviour.m_effectIcon.SetSprite(null, null, false);
+ }
+ else
+ {
+ FashionSuitSpecialEffects.RowData specialEffect = XFashionStorageDocument.GetSpecialEffect(effectid);
+ bool flag2 = specialEffect == null;
+ if (flag2)
+ {
+ base.uiBehaviour.m_effectIcon.SetSprite(null, null, false);
+ }
+ else
+ {
+ string[] array = string.IsNullOrEmpty(specialEffect.Icon) ? null : specialEffect.Icon.Split(XGlobalConfig.SequenceSeparator);
+ bool flag3 = array != null;
+ if (flag3)
+ {
+ bool flag4 = array.Length > 1;
+ if (flag4)
+ {
+ base.uiBehaviour.m_effectIcon.SetSprite(array[1], array[0], false);
+ }
+ else
+ {
+ bool flag5 = array.Length != 0;
+ if (flag5)
+ {
+ base.uiBehaviour.m_effectIcon.SetSprite(array[0]);
+ }
+ else
+ {
+ base.uiBehaviour.m_effectIcon.SetSprite(null, null, false);
+ }
+ }
+ }
+ }
+ }
+ }
+
+ private void ReSetSelect()
+ {
+ this.ShowAvatar(null);
+ this.SetPartInfo(null);
+ FashionStorageType fashionStorageType = this.m_doc.fashionStorageType;
+ if (fashionStorageType != FashionStorageType.OutLook)
+ {
+ if (fashionStorageType - FashionStorageType.FashionCollection <= 1)
+ {
+ this.m_AttributeFrame.SetFashionCharm(null);
+ }
+ }
+ else
+ {
+ this.m_FashinListFrame.SetFashionStorageSelect(null);
+ }
+ }
+
+ private void ShowFx(bool fx = false)
+ {
+ bool flag = this.m_fashionFx == null;
+ if (flag)
+ {
+ this.m_fashionFx = XSingleton<XFxMgr>.singleton.CreateUIFx(this.m_fashionFxURL, base.uiBehaviour.m_effectContainer, false);
+ }
+ }
+
+ private void DestroyFx()
+ {
+ bool flag = this.m_fashionFx == null;
+ if (!flag)
+ {
+ XSingleton<XFxMgr>.singleton.DestroyFx(this.m_fashionFx, true);
+ this.m_fashionFx = null;
+ }
+ }
+
+ private void ResetNormalParts()
+ {
+ bool flag = this.allParts == null;
+ if (flag)
+ {
+ this.allParts = new uint[XFastEnumIntEqualityComparer<FashionPosition>.ToInt(FashionPosition.FASHION_ALL_END)];
+ }
+ int i = 0;
+ int num = this.allParts.Length;
+ while (i < num)
+ {
+ this.allParts[i] = 0u;
+ i++;
+ }
+ }
+
+ private void SetPartInfo(uint[] part = null)
+ {
+ this.ResetNormalParts();
+ bool flag = part != null;
+ int i;
+ int num;
+ if (flag)
+ {
+ i = 0;
+ num = part.Length;
+ while (i < num)
+ {
+ uint num2 = part[i];
+ FashionList.RowData fashionConf = XBagDocument.GetFashionConf((int)num2);
+ bool flag2 = fashionConf != null;
+ if (flag2)
+ {
+ this.allParts[(int)fashionConf.EquipPos] = num2;
+ }
+ else
+ {
+ EquipList.RowData equipConf = XBagDocument.GetEquipConf((int)num2);
+ bool flag3 = equipConf != null;
+ if (flag3)
+ {
+ this.allParts[(int)equipConf.EquipPos] = num2;
+ }
+ }
+ i++;
+ }
+ }
+ XItemDrawerMgr.Param.Reset();
+ int num3 = XFastEnumIntEqualityComparer<FashionPosition>.ToInt(FashionPosition.Hair);
+ i = 0;
+ num = this.allParts.Length;
+ while (i < num)
+ {
+ uint num4 = this.allParts[i];
+ bool flag4 = base.uiBehaviour.m_partList[i] == null;
+ if (!flag4)
+ {
+ Transform transform = base.uiBehaviour.m_partList[i];
+ IXUISprite ixuisprite = transform.Find("Icon").GetComponent("XUISprite") as IXUISprite;
+ XSingleton<XItemDrawerMgr>.singleton.normalItemDrawer.DrawItem(ixuisprite.gameObject, (int)num4, 0, false);
+ IXUISprite ixuisprite2 = transform.Find("unGet").GetComponent("XUISprite") as IXUISprite;
+ IXUISprite ixuisprite3 = transform.Find("Icon/Icon").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite3.ID = (ulong)num4;
+ ixuisprite3.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnClickPart));
+ bool flag5 = num4 > 0u && (this.m_doc.fashionStorageType == FashionStorageType.EquipCollection || this.m_doc.fashionStorageType == FashionStorageType.FashionCollection);
+ if (flag5)
+ {
+ bool flag6 = this.m_select != null && this.m_select.GetItems().Contains(num4);
+ ixuisprite2.SetVisible(!flag6);
+ ixuisprite.SetGrey(flag6);
+ }
+ else
+ {
+ ixuisprite2.SetVisible(false);
+ ixuisprite.SetGrey(true);
+ }
+ bool flag7 = i == num3;
+ if (flag7)
+ {
+ HairColorTable.RowData rowData = null;
+ bool flag8 = num4 > 0u && this.m_doc.TryGetSelfHairColor(out rowData);
+ if (flag8)
+ {
+ base.uiBehaviour.m_colorSprite.SetVisible(true);
+ base.uiBehaviour.m_colorSprite.SetSprite(rowData.Icon);
+ base.uiBehaviour.m_colorSprite.SetColor(XSingleton<UiUtility>.singleton.GetColor(rowData.Color));
+ this.Switch(this.m_previewType);
+ }
+ else
+ {
+ base.uiBehaviour.m_colorSprite.SetVisible(false);
+ bool flag9 = this.m_previewType == FashionStoragePreview.Hair;
+ if (flag9)
+ {
+ this.Switch(FashionStoragePreview.None);
+ }
+ }
+ }
+ }
+ i++;
+ }
+ }
+
+ private void _EffectSpriteClick(IXUISprite sprite)
+ {
+ XSingleton<XDebug>.singleton.AddGreenLog("_EffectSpriteClick", null, null, null, null, null);
+ this.Switch(FashionStoragePreview.Effect);
+ }
+
+ private void OnClickPart(IXUISprite sprite)
+ {
+ bool flag = sprite.ID == 0UL;
+ if (!flag)
+ {
+ int itemID = (int)sprite.ID;
+ XItem item = XBagDocument.MakeXItem(itemID, true);
+ XSingleton<UiUtility>.singleton.ShowOutLookDialog(item, null, 0u);
+ XSingleton<XDebug>.singleton.AddGreenLog("sprite id :" + sprite.ID.ToString(), null, null, null, null, null);
+ }
+ }
+
+ private void OnSelectClick(IXUISprite sprite)
+ {
+ this.Switch(FashionStoragePreview.None);
+ this.SetSelectIndex((int)sprite.ID);
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ base.uiBehaviour.m_close.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnCloseClick));
+ base.uiBehaviour.m_outLook.RegisterOnCheckEventHandler(new CheckBoxOnCheckEventHandler(this.OnTabClick));
+ base.uiBehaviour.m_equipRecord.RegisterOnCheckEventHandler(new CheckBoxOnCheckEventHandler(this.OnTabClick));
+ base.uiBehaviour.m_fashionRecord.RegisterOnCheckEventHandler(new CheckBoxOnCheckEventHandler(this.OnTabClick));
+ base.uiBehaviour.m_effectSprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this._EffectSpriteClick));
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ base.Alloc3DAvatarPool("FashionStorageDlg");
+ base.uiBehaviour.m_outLook.bChecked = true;
+ this.Switch(FashionStoragePreview.None);
+ this.ShowFx(true);
+ this.OnTabChange(this.m_doc.fashionStorageType, true, true);
+ }
+
+ protected override void OnHide()
+ {
+ this.DestroyFx();
+ this.m_previewType = FashionStoragePreview.None;
+ bool flag = this.m_HairColorFrame != null;
+ if (flag)
+ {
+ this.m_HairColorFrame.SetVisible(false);
+ }
+ bool flag2 = this.m_dummPool != -1;
+ if (flag2)
+ {
+ XSingleton<X3DAvatarMgr>.singleton.DestroyDummy(this.m_dummPool, this.m_Dummy);
+ }
+ this.m_dummPool = -1;
+ base.OnHide();
+ }
+
+ public override void StackRefresh()
+ {
+ base.StackRefresh();
+ base.Alloc3DAvatarPool("FashionStorageDlg");
+ }
+
+ public void ShowAvatar()
+ {
+ bool flag = !base.IsVisible();
+ if (!flag)
+ {
+ bool flag2 = this.m_select == null;
+ if (flag2)
+ {
+ this.ShowAvatar(null);
+ }
+ else
+ {
+ this.ShowAvatar(this.m_select.GetFashionList());
+ }
+ }
+ }
+
+ private void ShowAvatar(uint[] fashionList = null)
+ {
+ this.outLook.display_fashion.display_fashions.Clear();
+ this.m_dummyAngle.y = 180f;
+ bool flag = fashionList != null;
+ if (flag)
+ {
+ this.outLook.display_fashion.display_fashions.AddRange(fashionList);
+ }
+ bool flag2 = this.m_doc.fashionStorageType == FashionStorageType.OutLook;
+ if (flag2)
+ {
+ bool flag3 = this.m_doc.preview == FashionStoragePreview.Hair;
+ if (flag3)
+ {
+ this.outLook.display_fashion.hair_color_id = this.m_doc.previewHairColor;
+ }
+ else
+ {
+ this.outLook.display_fashion.hair_color_id = this.m_doc.selfHairColor;
+ }
+ bool flag4 = this.m_doc.preview == FashionStoragePreview.Effect;
+ if (flag4)
+ {
+ this.outLook.display_fashion.special_effects_id = this.m_doc.previewEffectID;
+ }
+ else
+ {
+ this.outLook.display_fashion.special_effects_id = this.m_doc.selfEffectID;
+ }
+ }
+ else
+ {
+ this.outLook.display_fashion.hair_color_id = 0u;
+ this.outLook.display_fashion.special_effects_id = 0u;
+ }
+ XPlayerAttributes xplayerData = XSingleton<XAttributeMgr>.singleton.XPlayerData;
+ uint unitType = (uint)XFastEnumIntEqualityComparer<RoleType>.ToInt(xplayerData.Profession);
+ this.m_Dummy = XSingleton<X3DAvatarMgr>.singleton.CreateCommonRoleDummy(this.m_dummPool, xplayerData.RoleID, unitType, this.outLook, base.uiBehaviour.m_Snapshot, this.m_Dummy);
+ bool flag5 = this.m_Dummy != null;
+ if (flag5)
+ {
+ this.m_Dummy.EngineObject.LocalEulerAngles = this.m_dummyAngle;
+ }
+ }
+
+ private bool OnAvatarDrag(Vector2 delta)
+ {
+ bool flag = this.m_Dummy != null;
+ if (flag)
+ {
+ this.m_Dummy.EngineObject.Rotate(Vector2.up, -delta.x / 2f);
+ this.m_dummyAngle = this.m_Dummy.EngineObject.LocalEulerAngles;
+ }
+ else
+ {
+ XSingleton<X3DAvatarMgr>.singleton.RotateMain(-delta.x / 2f);
+ }
+ return true;
+ }
+
+ protected override void OnUnload()
+ {
+ this.m_outLook = null;
+ this.DestroyFx();
+ bool flag = this.m_dummPool > -1;
+ if (flag)
+ {
+ XSingleton<X3DAvatarMgr>.singleton.DestroyDummy(this.m_dummPool, this.m_Dummy);
+ }
+ this.m_dummPool = -1;
+ DlgHandlerBase.EnsureUnload<FashionStotageDisplayHandle>(ref this.m_FashinListFrame);
+ DlgHandlerBase.EnsureUnload<FashionStorageAttributeFrame>(ref this.m_AttributeFrame);
+ DlgHandlerBase.EnsureUnload<FashionStorageHairColorFrame>(ref this.m_HairColorFrame);
+ DlgHandlerBase.EnsureUnload<FashionStorageEffectFrame>(ref this.m_effectFrame);
+ base.OnUnload();
+ }
+
+ private bool OnCloseClick(IXUIButton btn)
+ {
+ this.SetVisibleWithAnimation(false, null);
+ return false;
+ }
+
+ private bool OnTabClick(IXUICheckBox check)
+ {
+ bool bChecked = check.bChecked;
+ if (bChecked)
+ {
+ FashionStorageType define = (FashionStorageType)check.ID;
+ this.Switch(FashionStoragePreview.None);
+ this.OnTabChange(define, false, true);
+ }
+ return true;
+ }
+
+ private void OnTabChange(FashionStorageType define, bool atOnce = false, bool reset = false)
+ {
+ bool flag = !atOnce && define == this.m_doc.fashionStorageType;
+ if (!flag)
+ {
+ this.m_doc.fashionStorageType = define;
+ this.SwitchOutLook();
+ this.m_AttributeFrame.SetVisible(define == FashionStorageType.FashionCollection || define == FashionStorageType.EquipCollection);
+ this.m_doc.GetCollection(ref this.m_SelectList, define);
+ base.uiBehaviour.m_wrapContent.SetContentCount(this.m_SelectList.Count, false);
+ if (reset)
+ {
+ base.uiBehaviour.m_scrollView.ResetPosition();
+ }
+ bool flag2 = this.m_SelectList.Count > 0;
+ if (flag2)
+ {
+ this.SetSelectIndex(-1);
+ }
+ else
+ {
+ this.ReSetSelect();
+ }
+ }
+ }
+
+ public void Switch(FashionStoragePreview preview)
+ {
+ bool flag = !base.IsVisible() || this.m_previewType == preview;
+ if (!flag)
+ {
+ this.m_previewType = preview;
+ this.SwitchOutLook();
+ }
+ }
+
+ private void SwitchOutLook()
+ {
+ bool flag = this.m_doc.fashionStorageType == FashionStorageType.OutLook;
+ this.m_HairColorFrame.SetVisible(flag && this.m_previewType == FashionStoragePreview.Hair);
+ this.m_FashinListFrame.SetVisible(flag && this.m_previewType == FashionStoragePreview.None);
+ this.m_effectFrame.SetVisible(flag && this.m_previewType == FashionStoragePreview.Effect);
+ this.RefreshRedPoint();
+ this.SetupEffect(flag ? this.m_doc.selfEffectID : 0u);
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/FashionStorageDlg.cs.meta b/Client/Assets/Scripts/XMainClient/UI/FashionStorageDlg.cs.meta
new file mode 100644
index 00000000..139c7f49
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/FashionStorageDlg.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 1cb5f08e7de4d5c4c9f1d839cd7bacb7
+timeCreated: 1611403348
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/FashionStorageEffectFrame.cs b/Client/Assets/Scripts/XMainClient/UI/FashionStorageEffectFrame.cs
new file mode 100644
index 00000000..cf986d04
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/FashionStorageEffectFrame.cs
@@ -0,0 +1,203 @@
+using System;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class FashionStorageEffectFrame : DlgHandlerBase
+ {
+ private IXUIButton _Close;
+
+ private IXUIButton _EditPortrait;
+
+ private IXUILabel _Message;
+
+ private IXUIScrollView _ScrollView;
+
+ private IXUIWrapContent _WrapContent;
+
+ private XBetterList<IFashionStorageSelect> _ActivateSuits;
+
+ private uint _SelectEffectID = 0u;
+
+ private XFashionStorageDocument _doc;
+
+ private IFashionStorageSelect _activateSuit;
+
+ private IXUILabel _Content;
+
+ protected override void Init()
+ {
+ base.Init();
+ this._doc = XDocuments.GetSpecificDocument<XFashionStorageDocument>(XFashionStorageDocument.uuID);
+ this._Close = (base.transform.Find("Close").GetComponent("XUIButton") as IXUIButton);
+ this._Message = (base.transform.Find("Message").GetComponent("XUILabel") as IXUILabel);
+ this._Content = (base.transform.Find("t").GetComponent("XUILabel") as IXUILabel);
+ this._EditPortrait = (base.transform.Find("EditPortrait").GetComponent("XUIButton") as IXUIButton);
+ this._ScrollView = (base.transform.Find("ScrollView").GetComponent("XUIScrollView") as IXUIScrollView);
+ this._WrapContent = (base.transform.Find("ScrollView/WrapContent").GetComponent("XUIWrapContent") as IXUIWrapContent);
+ this._WrapContent.RegisterItemUpdateEventHandler(new WrapItemUpdateEventHandler(this._EffectWrapContent));
+ this._Close.RegisterClickEventHandler(new ButtonClickEventHandler(this._CloseClick));
+ this._EditPortrait.RegisterClickEventHandler(new ButtonClickEventHandler(this._OnEditPortrait));
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ this.RefreshData();
+ }
+
+ protected override void OnHide()
+ {
+ bool flag = this._doc.preview == FashionStoragePreview.Effect;
+ if (flag)
+ {
+ this._doc.preview = FashionStoragePreview.None;
+ this._doc.previewEffectID = 0u;
+ DlgBase<FashionStorageDlg, FashionStorageBehaviour>.singleton.ShowAvatar();
+ }
+ base.OnHide();
+ }
+
+ public override void RefreshData()
+ {
+ this._ActivateSuits = this._doc.GetActivateSuits();
+ this._WrapContent.SetContentCount((this._ActivateSuits == null) ? 0 : this._ActivateSuits.Count, false);
+ this._ScrollView.ResetPosition();
+ this.ShowActivateSuitPortrait();
+ }
+
+ private void _EffectWrapContent(Transform tr, int index)
+ {
+ Transform transform = tr.Find("detal");
+ IXUISprite ixuisprite = tr.GetComponent("XUISprite") as IXUISprite;
+ IXUILabel ixuilabel = tr.Find("Name").GetComponent("XUILabel") as IXUILabel;
+ bool flag = index >= XFashionStorageDocument.SpecialEffectIDs.Length;
+ if (flag)
+ {
+ transform.gameObject.SetActive(false);
+ ixuisprite.SetEnabled(false);
+ ixuilabel.SetText("");
+ }
+ else
+ {
+ ixuisprite.SetEnabled(true);
+ IFashionStorageSelect fashionStorageSelect = this._ActivateSuits[index];
+ IXUICheckBox ixuicheckBox = transform.GetComponent("XUICheckBox") as IXUICheckBox;
+ IXUISprite ixuisprite2 = transform.Find("Color").GetComponent("XUISprite") as IXUISprite;
+ IXUISprite ixuisprite3 = transform.Find("Lock").GetComponent("XUISprite") as IXUISprite;
+ IXUISprite ixuisprite4 = transform.Find("Selected").GetComponent("XUISprite") as IXUISprite;
+ IXUISprite ixuisprite5 = transform.Find("Select").GetComponent("XUISprite") as IXUISprite;
+ IXUISprite ixuisprite6 = transform.Find("RedPoint").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.ID = (ulong)((long)fashionStorageSelect.GetID());
+ ixuisprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this._OnSelectEffect));
+ FashionSuitSpecialEffects.RowData specialEffect = XFashionStorageDocument.GetSpecialEffect((uint)fashionStorageSelect.GetID());
+ ixuilabel.SetText(fashionStorageSelect.GetName());
+ ixuisprite6.SetVisible(fashionStorageSelect.RedPoint);
+ string[] array = string.IsNullOrEmpty(specialEffect.Icon) ? null : specialEffect.Icon.Split(XGlobalConfig.SequenceSeparator);
+ bool flag2 = array != null;
+ if (flag2)
+ {
+ bool flag3 = array.Length > 1;
+ if (flag3)
+ {
+ ixuisprite2.SetSprite(array[1], array[0], false);
+ }
+ else
+ {
+ bool flag4 = array.Length != 0;
+ if (flag4)
+ {
+ ixuisprite2.SetSprite(array[0]);
+ }
+ else
+ {
+ ixuisprite2.SetSprite(null, null, false);
+ }
+ }
+ }
+ bool flag5 = this._doc.selfEffectID == specialEffect.suitid;
+ if (flag5)
+ {
+ ixuisprite4.SetAlpha(1f);
+ ixuicheckBox.bChecked = true;
+ this._SelectEffectID = specialEffect.suitid;
+ }
+ else
+ {
+ ixuisprite4.SetAlpha(0f);
+ }
+ ixuisprite5.SetAlpha((this._SelectEffectID == specialEffect.suitid) ? 1f : 0f);
+ ixuisprite3.SetVisible(!this._doc.isActivateEffect(specialEffect.suitid));
+ }
+ }
+
+ private bool _CloseClick(IXUIButton btn)
+ {
+ DlgBase<FashionStorageDlg, FashionStorageBehaviour>.singleton.Switch(FashionStoragePreview.None);
+ return true;
+ }
+
+ private bool _OnEditPortrait(IXUIButton btn)
+ {
+ this._doc.GetActiveSuitEffect(this._SelectEffectID);
+ return true;
+ }
+
+ private void _OnSelectEffect(IXUISprite sprite)
+ {
+ this._SelectEffectID = (uint)sprite.ID;
+ IXUICheckBox ixuicheckBox = sprite.transform.Find("detal").GetComponent("XUICheckBox") as IXUICheckBox;
+ bool flag = ixuicheckBox != null;
+ if (flag)
+ {
+ ixuicheckBox.bChecked = true;
+ }
+ bool flag2 = this._doc.isActivateEffect(this._SelectEffectID);
+ if (flag2)
+ {
+ this._EditPortrait.SetVisible(false);
+ this._doc.preview = FashionStoragePreview.None;
+ this._doc.GetActiveSuitEffect(this._SelectEffectID);
+ }
+ else
+ {
+ this._doc.preview = FashionStoragePreview.Effect;
+ this._doc.previewEffectID = this._SelectEffectID;
+ DlgBase<FashionStorageDlg, FashionStorageBehaviour>.singleton.ShowAvatar();
+ }
+ this.ShowActivateSuitPortrait();
+ }
+
+ private void ShowActivateSuitPortrait()
+ {
+ this._activateSuit = this._doc.GetActivateSuit(this._SelectEffectID);
+ this._EditPortrait.SetVisible(this._activateSuit != null && this._activateSuit.RedPoint);
+ bool flag = this._activateSuit == null || this._activateSuit.Active;
+ if (flag)
+ {
+ this._Content.SetText("");
+ }
+ else
+ {
+ this._Content.SetText(XStringDefineProxy.GetString("FASHION_STORAGE_EFFECT_CONTENT", new object[]
+ {
+ this._activateSuit.GetName()
+ }));
+ }
+ }
+
+ public override void OnUnload()
+ {
+ bool flag = this._doc.preview == FashionStoragePreview.Effect;
+ if (flag)
+ {
+ this._doc.preview = FashionStoragePreview.None;
+ this._doc.previewEffectID = 0u;
+ }
+ base.OnUnload();
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/FashionStorageEffectFrame.cs.meta b/Client/Assets/Scripts/XMainClient/UI/FashionStorageEffectFrame.cs.meta
new file mode 100644
index 00000000..86b7d43a
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/FashionStorageEffectFrame.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: e6546e7c38791b843b85d3cd8a8322a4
+timeCreated: 1611404745
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/FashionStorageEquipToolTipDlg.cs b/Client/Assets/Scripts/XMainClient/UI/FashionStorageEquipToolTipDlg.cs
new file mode 100644
index 00000000..5918d3c0
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/FashionStorageEquipToolTipDlg.cs
@@ -0,0 +1,51 @@
+using System;
+using UILib;
+using UnityEngine;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class FashionStorageEquipToolTipDlg : FashionStorageTooltipBase<FashionStorageEquipToolTipDlg, ItemTooltipDlgBehaviour>
+ {
+ public override string fileName
+ {
+ get
+ {
+ return "GameSystem/FashionStorageEquipToolTipDlg";
+ }
+ }
+
+ protected override void SetAllAttrFrames(GameObject goToolTip, XAttrItem item, XAttrItem compareItem, bool bMain)
+ {
+ }
+
+ protected override void SetupTopFrame(GameObject goToolTip, ItemList.RowData data, bool bMain, XItem instanceData = null, XItem compareData = null)
+ {
+ base.SetupTopFrame(goToolTip, data, bMain, instanceData, compareData);
+ base._SetupLevel(goToolTip, data, 0);
+ base._SetupProf(goToolTip, data, bMain, instanceData, 1);
+ base._SetupType(goToolTip, data, 2);
+ }
+
+ protected override void SetupOtherFrame(GameObject goToolTip, XItem item, XItem compareItem, bool bMain)
+ {
+ ItemList.RowData itemConf = XBagDocument.GetItemConf(item.itemID);
+ this._SetupDescription(goToolTip, itemConf);
+ }
+
+ protected override void SetupOtherFrame(GameObject goToolTip, ItemList.RowData data)
+ {
+ this._SetupDescription(goToolTip, data);
+ }
+
+ protected void _SetupDescription(GameObject goToolTip, ItemList.RowData data)
+ {
+ Transform transform = goToolTip.transform;
+ IXUISprite ixuisprite = transform.Find("ScrollPanel/Description").GetComponent("XUISprite") as IXUISprite;
+ IXUILabel ixuilabel = ixuisprite.gameObject.transform.Find("Text").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel.SetText(XSingleton<UiUtility>.singleton.ReplaceReturn((data == null) ? "" : data.ItemDescription));
+ ixuisprite.spriteHeight = ixuilabel.spriteHeight + -(int)ixuilabel.gameObject.transform.localPosition.y;
+ this.totalFrameHeight += (float)ixuisprite.spriteHeight;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/FashionStorageEquipToolTipDlg.cs.meta b/Client/Assets/Scripts/XMainClient/UI/FashionStorageEquipToolTipDlg.cs.meta
new file mode 100644
index 00000000..841ddf2d
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/FashionStorageEquipToolTipDlg.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 2036a15c40194da46a4a3ccd5fbbb31c
+timeCreated: 1611403405
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/FashionStorageFashionHairToolTipDlg.cs b/Client/Assets/Scripts/XMainClient/UI/FashionStorageFashionHairToolTipDlg.cs
new file mode 100644
index 00000000..4b2c6c15
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/FashionStorageFashionHairToolTipDlg.cs
@@ -0,0 +1,65 @@
+using System;
+using UILib;
+using UnityEngine;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class FashionStorageFashionHairToolTipDlg : FashionStorageTooltipBase<FashionStorageFashionHairToolTipDlg, FashionHairToolTipBehaviour>
+ {
+ public override string fileName
+ {
+ get
+ {
+ return "GameSystem/FashionStorageFashionHairToolTipDlg";
+ }
+ }
+
+ private IXUILabel time = null;
+
+ protected override void SetupTopFrame(GameObject goToolTip, ItemList.RowData data, bool bMain, XItem instanceData = null, XItem compareData = null)
+ {
+ base.SetupTopFrame(goToolTip, data, bMain, instanceData, compareData);
+ base._SetupLevel(goToolTip, data, 0);
+ base._SetupProf(goToolTip, data, bMain, instanceData, 1);
+ FashionList.RowData fashionConf = XBagDocument.GetFashionConf(data.ItemID);
+ base._SetTopFrameLabel(goToolTip, 2, XStringDefineProxy.GetString("ToolTipText_Part"), (fashionConf != null) ? XSingleton<UiUtility>.singleton.GetFashionPartName((FashionPosition)fashionConf.EquipPos, true) : string.Empty);
+ this.time = (goToolTip.transform.Find("TopFrame/Time/Left").GetComponent("XUILabel") as IXUILabel);
+ ItemList.RowData itemConf = XBagDocument.GetItemConf(data.ItemID);
+ bool flag = itemConf == null || itemConf.TimeLimit == 0u;
+ if (flag)
+ {
+ this.time.SetText(XStringDefineProxy.GetString("FASHION_LIMIT_ALWAYS"));
+ }
+ else
+ {
+ this.time.SetText(XStringDefineProxy.GetString("Designation_Tab_Name5"));
+ }
+ }
+
+ protected override void SetAllAttrFrames(GameObject goToolTip, XAttrItem item, XAttrItem compareItem, bool bMain)
+ {
+ }
+
+ protected override void SetupOtherFrame(GameObject goToolTip, XItem item, XItem compareItem, bool bMain)
+ {
+ ItemList.RowData itemConf = XBagDocument.GetItemConf(item.itemID);
+ this._SetupDescription(goToolTip, itemConf);
+ }
+
+ protected override void SetupOtherFrame(GameObject goToolTip, ItemList.RowData data)
+ {
+ this._SetupDescription(goToolTip, data);
+ }
+
+ protected void _SetupDescription(GameObject goToolTip, ItemList.RowData data)
+ {
+ Transform transform = goToolTip.transform;
+ IXUISprite ixuisprite = transform.Find("ScrollPanel/Description").GetComponent("XUISprite") as IXUISprite;
+ IXUILabel ixuilabel = ixuisprite.gameObject.transform.Find("Text").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel.SetText(XSingleton<UiUtility>.singleton.ReplaceReturn((data == null) ? "" : data.ItemDescription));
+ ixuisprite.spriteHeight = ixuilabel.spriteHeight + -(int)ixuilabel.gameObject.transform.localPosition.y;
+ this.totalFrameHeight += (float)ixuisprite.spriteHeight;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/FashionStorageFashionHairToolTipDlg.cs.meta b/Client/Assets/Scripts/XMainClient/UI/FashionStorageFashionHairToolTipDlg.cs.meta
new file mode 100644
index 00000000..28094793
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/FashionStorageFashionHairToolTipDlg.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 006f97b4b5f560d4e9cd48ea62ee5ee8
+timeCreated: 1611402950
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/FashionStorageFashionPutOn.cs b/Client/Assets/Scripts/XMainClient/UI/FashionStorageFashionPutOn.cs
new file mode 100644
index 00000000..9002c462
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/FashionStorageFashionPutOn.cs
@@ -0,0 +1,62 @@
+using System;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class FashionStorageFashionPutOn : TooltipButtonOperateBase
+ {
+ public override string GetButtonText()
+ {
+ return XStringDefineProxy.GetString("PUT_FASHION");
+ }
+
+ public override bool HasRedPoint(XItem item)
+ {
+ return false;
+ }
+
+ public override bool IsButtonVisible(XItem item)
+ {
+ XFashionStorageDocument specificDocument = XDocuments.GetSpecificDocument<XFashionStorageDocument>(XFashionStorageDocument.uuID);
+ bool flag = specificDocument.fashionStorageType > FashionStorageType.OutLook;
+ bool result;
+ if (flag)
+ {
+ result = false;
+ }
+ else
+ {
+ XFashionDocument specificDocument2 = XDocuments.GetSpecificDocument<XFashionDocument>(XFashionDocument.uuID);
+ result = !specificDocument2.IsOverAll(item.itemID);
+ }
+ return result;
+ }
+
+ public override void OnButtonClick(ulong mainUID, ulong compareUID)
+ {
+ XFashionDocument specificDocument = XDocuments.GetSpecificDocument<XFashionDocument>(XFashionDocument.uuID);
+ bool flag = specificDocument.IsOverAll((int)mainUID);
+ if (!flag)
+ {
+ XFashionStorageDocument specificDocument2 = XDocuments.GetSpecificDocument<XFashionStorageDocument>(XFashionStorageDocument.uuID);
+ bool flag2 = XFashionDocument.IsTargetPart((int)mainUID, FashionPosition.FASHION_START);
+ if (flag2)
+ {
+ specificDocument2.CheckMutuexHeadgear((int)mainUID);
+ }
+ else
+ {
+ bool flag3 = XFashionDocument.IsTargetPart((int)mainUID, FashionPosition.Hair);
+ if (flag3)
+ {
+ specificDocument2.CheckMutuexHair((int)mainUID);
+ }
+ }
+ RpcC2G_UseItem rpcC2G_UseItem = new RpcC2G_UseItem();
+ rpcC2G_UseItem.oArg.OpType = ItemUseMgr.GetItemUseValue(ItemUse.FashionDisplayWear);
+ rpcC2G_UseItem.oArg.itemID = (uint)mainUID;
+ XSingleton<XClientNetwork>.singleton.Send(rpcC2G_UseItem);
+ }
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/FashionStorageFashionPutOn.cs.meta b/Client/Assets/Scripts/XMainClient/UI/FashionStorageFashionPutOn.cs.meta
new file mode 100644
index 00000000..dfd2ab0c
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/FashionStorageFashionPutOn.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 42b7239b2c5bb5d4fb14b0836a9977c0
+timeCreated: 1611403640
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/FashionStorageFashionPutOnSuit.cs b/Client/Assets/Scripts/XMainClient/UI/FashionStorageFashionPutOnSuit.cs
new file mode 100644
index 00000000..2619d3fc
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/FashionStorageFashionPutOnSuit.cs
@@ -0,0 +1,95 @@
+using System;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class FashionStorageFashionPutOnSuit : TooltipButtonOperateBase
+ {
+ public override string GetButtonText()
+ {
+ return XStringDefineProxy.GetString("PUT_FASHIONSUIT");
+ }
+
+ public override bool HasRedPoint(XItem item)
+ {
+ return false;
+ }
+
+ public override bool IsButtonVisible(XItem item)
+ {
+ XFashionStorageDocument specificDocument = XDocuments.GetSpecificDocument<XFashionStorageDocument>(XFashionStorageDocument.uuID);
+ bool flag = specificDocument.fashionStorageType == FashionStorageType.OutLook;
+ bool result;
+ if (flag)
+ {
+ XFashionDocument specificDocument2 = XDocuments.GetSpecificDocument<XFashionDocument>(XFashionDocument.uuID);
+ bool flag2 = specificDocument2.GetFashionSuit(item.itemID) > 0;
+ result = (flag2 || XCharacterEquipDocument.SuitManager.GetSuit(item.itemID, false) != null);
+ }
+ else
+ {
+ result = false;
+ }
+ return result;
+ }
+
+ public override void OnButtonClick(ulong mainUID, ulong compareUID)
+ {
+ XFashionDocument specificDocument = XDocuments.GetSpecificDocument<XFashionDocument>(XFashionDocument.uuID);
+ XFashionStorageDocument specificDocument2 = XDocuments.GetSpecificDocument<XFashionStorageDocument>(XFashionStorageDocument.uuID);
+ int num = specificDocument.GetFashionSuit((int)mainUID);
+ bool flag = num == 0;
+ if (flag)
+ {
+ EquipSuitTable.RowData suit = XCharacterEquipDocument.SuitManager.GetSuit((int)mainUID, false);
+ bool flag2 = suit != null;
+ if (flag2)
+ {
+ bool flag3 = suit.EquipID != null;
+ if (flag3)
+ {
+ for (int i = 0; i < suit.EquipID.Length; i++)
+ {
+ int num2 = suit.EquipID[i];
+ bool flag4 = XFashionDocument.IsTargetPart(num2, FashionPosition.FASHION_START);
+ if (flag4)
+ {
+ specificDocument2.CheckMutuexHeadgear(num2);
+ break;
+ }
+ }
+ }
+ num = suit.SuitID;
+ }
+ }
+ else
+ {
+ FashionSuitTable.RowData suitData = specificDocument.GetSuitData(num);
+ bool flag5 = suitData != null && suitData.FashionID != null;
+ if (flag5)
+ {
+ int j = 0;
+ int num3 = suitData.FashionID.Length;
+ while (j < num3)
+ {
+ bool flag6 = XFashionDocument.IsTargetPart((int)suitData.FashionID[j], FashionPosition.FASHION_START);
+ if (flag6)
+ {
+ specificDocument2.CheckMutuexHeadgear((int)suitData.FashionID[j]);
+ break;
+ }
+ j++;
+ }
+ }
+ }
+ bool flag7 = num == 0;
+ if (!flag7)
+ {
+ RpcC2G_UseItem rpcC2G_UseItem = new RpcC2G_UseItem();
+ rpcC2G_UseItem.oArg.OpType = ItemUseMgr.GetItemUseValue(ItemUse.FashionSuitDisplayWear);
+ rpcC2G_UseItem.oArg.suit_id = (uint)num;
+ XSingleton<XClientNetwork>.singleton.Send(rpcC2G_UseItem);
+ }
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/FashionStorageFashionPutOnSuit.cs.meta b/Client/Assets/Scripts/XMainClient/UI/FashionStorageFashionPutOnSuit.cs.meta
new file mode 100644
index 00000000..b8069d7f
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/FashionStorageFashionPutOnSuit.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 2159be446da174c4882e233966c558e1
+timeCreated: 1611403413
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/FashionStorageFashionTakeOff.cs b/Client/Assets/Scripts/XMainClient/UI/FashionStorageFashionTakeOff.cs
new file mode 100644
index 00000000..a025f789
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/FashionStorageFashionTakeOff.cs
@@ -0,0 +1,48 @@
+using System;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class FashionStorageFashionTakeOff : TooltipButtonOperateBase
+ {
+ public override string GetButtonText()
+ {
+ return XStringDefineProxy.GetString("TAKEOFF_FASHION");
+ }
+
+ public override bool HasRedPoint(XItem item)
+ {
+ return false;
+ }
+
+ public override bool IsButtonVisible(XItem item)
+ {
+ XFashionStorageDocument specificDocument = XDocuments.GetSpecificDocument<XFashionStorageDocument>(XFashionStorageDocument.uuID);
+ bool flag = specificDocument.fashionStorageType > FashionStorageType.OutLook;
+ bool result;
+ if (flag)
+ {
+ result = false;
+ }
+ else
+ {
+ XFashionDocument specificDocument2 = XDocuments.GetSpecificDocument<XFashionDocument>(XFashionDocument.uuID);
+ result = !specificDocument2.IsOverAll(item.itemID);
+ }
+ return result;
+ }
+
+ public override void OnButtonClick(ulong mainUID, ulong compareUID)
+ {
+ XFashionDocument specificDocument = XDocuments.GetSpecificDocument<XFashionDocument>(XFashionDocument.uuID);
+ bool flag = specificDocument.IsOverAll((int)mainUID);
+ if (!flag)
+ {
+ RpcC2G_UseItem rpcC2G_UseItem = new RpcC2G_UseItem();
+ rpcC2G_UseItem.oArg.OpType = ItemUseMgr.GetItemUseValue(ItemUse.FashionDisplayOff);
+ rpcC2G_UseItem.oArg.itemID = (uint)mainUID;
+ XSingleton<XClientNetwork>.singleton.Send(rpcC2G_UseItem);
+ }
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/FashionStorageFashionTakeOff.cs.meta b/Client/Assets/Scripts/XMainClient/UI/FashionStorageFashionTakeOff.cs.meta
new file mode 100644
index 00000000..01b49d46
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/FashionStorageFashionTakeOff.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: f91f43752213f5c4290857ddb0f53260
+timeCreated: 1611404897
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/FashionStorageFashionToolTipDlg.cs b/Client/Assets/Scripts/XMainClient/UI/FashionStorageFashionToolTipDlg.cs
new file mode 100644
index 00000000..e66997f4
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/FashionStorageFashionToolTipDlg.cs
@@ -0,0 +1,203 @@
+using System;
+using UILib;
+using UnityEngine;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class FashionStorageFashionToolTipDlg : FashionStorageTooltipBase<FashionStorageFashionToolTipDlg, FashionTooltipDlgBehaviour>
+ {
+ public override string fileName
+ {
+ get
+ {
+ return "GameSystem/FashionStorageFashionToolTip";
+ }
+ }
+
+ private IXUILabel time = null;
+
+ protected override void SetupTopFrame(GameObject goToolTip, ItemList.RowData data, bool bMain, XItem instanceData = null, XItem compareData = null)
+ {
+ base.SetupTopFrame(goToolTip, data, bMain, instanceData, compareData);
+ base._SetupLevel(goToolTip, data, 0);
+ base._SetupProf(goToolTip, data, bMain, instanceData, 1);
+ FashionList.RowData fashionConf = XBagDocument.GetFashionConf(data.ItemID);
+ base._SetTopFrameLabel(goToolTip, 2, XStringDefineProxy.GetString("ToolTipText_Part"), (fashionConf != null) ? XSingleton<UiUtility>.singleton.GetFashionPartName((FashionPosition)fashionConf.EquipPos, true) : string.Empty);
+ Transform transform = goToolTip.transform;
+ GameObject gameObject = transform.Find("TopFrame/State").gameObject;
+ gameObject.SetActive(false);
+ this.time = (transform.Find("TopFrame/Time/Left").GetComponent("XUILabel") as IXUILabel);
+ ItemList.RowData itemConf = XBagDocument.GetItemConf(data.ItemID);
+ bool flag = itemConf == null || itemConf.TimeLimit == 0u;
+ if (flag)
+ {
+ this.time.SetText(XStringDefineProxy.GetString("FASHION_LIMIT_ALWAYS"));
+ }
+ else
+ {
+ this.time.SetText(XStringDefineProxy.GetString("Designation_Tab_Name5"));
+ }
+ }
+
+ protected override void SetupOtherFrame(GameObject goToolTip, XItem item, XItem compareItem, bool bMain)
+ {
+ this._SetupSuitFrame(goToolTip, item, compareItem, bMain);
+ base.SetupOtherFrame(goToolTip, item, compareItem, bMain);
+ }
+
+ protected override int _GetPPT(XItem item, bool bMain, ref string valueText)
+ {
+ bool flag = item == null;
+ int result;
+ if (flag)
+ {
+ result = -1;
+ }
+ else
+ {
+ uint ppt = item.GetPPT(bMain ? XSingleton<TooltipParam>.singleton.mainAttributes : XSingleton<TooltipParam>.singleton.compareAttributes);
+ valueText = ppt.ToString();
+ result = (int)ppt;
+ }
+ return result;
+ }
+
+ private void _SetupSuitFrame(GameObject goToolTip, XItem mainItem, XItem compareItem, bool bMain)
+ {
+ IXUISprite ixuisprite = goToolTip.transform.Find("ScrollPanel/SuitFrame").GetComponent("XUISprite") as IXUISprite;
+ bool flag = mainItem == null;
+ if (flag)
+ {
+ ixuisprite.SetVisible(false);
+ }
+ else
+ {
+ ixuisprite.SetVisible(true);
+ ItemList.RowData itemConf = XBagDocument.GetItemConf(mainItem.itemID);
+ int itemQuality = (int)itemConf.ItemQuality;
+ bool flag2 = this.m_fashionDoc.IsFashionThreeSpecial(mainItem.itemID);
+ int fashionSuit = this.m_fashionDoc.GetFashionSuit(mainItem.itemID);
+ bool flag3 = flag2 && fashionSuit == 0;
+ if (flag3)
+ {
+ ixuisprite.SetVisible(false);
+ }
+ else
+ {
+ int num = 0;
+ int num2 = (XSingleton<TooltipParam>.singleton.FashionOnBody == null) ? this.m_fashionDoc.GetQualityCountOnBody(itemQuality, flag2) : this.GetFashionCount(itemQuality, flag2);
+ AttrFrameParam attrFrameParam = new AttrFrameParam();
+ for (int i = 2; i <= 7; i++)
+ {
+ SeqListRef<uint> qualityEffect = this.m_fashionDoc.GetQualityEffect(itemQuality, i, flag2);
+ bool flag4 = qualityEffect.Count == 0;
+ if (!flag4)
+ {
+ for (int j = 0; j < qualityEffect.Count; j++)
+ {
+ bool flag5 = qualityEffect[j, 0] == 0u;
+ if (!flag5)
+ {
+ bool flag6 = i <= num2;
+ string text;
+ string color;
+ if (flag6)
+ {
+ text = "ffffff";
+ color = XSingleton<UiUtility>.singleton.GetColorStr(new Color(0.996078432f, 0.807843149f, 0f));
+ }
+ else
+ {
+ text = XSingleton<UiUtility>.singleton.GetColorStr(new Color(0.5019608f, 0.5019608f, 0.5019608f));
+ color = text;
+ }
+ AttrParam item = default(AttrParam);
+ AttrParam.ResetSb();
+ AttrParam.Append(AttrParam.TextSb, XStringDefineProxy.GetString("EQUIP_SUIT_EFFECT", new object[]
+ {
+ i
+ }), color);
+ string s = string.Format("{0}{1}", XStringDefineProxy.GetString((XAttributeDefine)qualityEffect[j, 0]), XAttributeCommon.GetAttrValueStr((int)qualityEffect[j, 0], (float)qualityEffect[j, 1]));
+ AttrParam.Append(AttrParam.ValueSb, s, text);
+ item.SetTextFromSb();
+ item.SetValueFromSb();
+ attrFrameParam.AttrList.Add(item);
+ num++;
+ }
+ }
+ }
+ }
+ bool flag7 = num > 0;
+ if (flag7)
+ {
+ bool flag8 = !flag2;
+ if (flag8)
+ {
+ string @string = XStringDefineProxy.GetString("EQUIP_SUIT_TITLE", new object[]
+ {
+ this.m_fashionDoc.GetQualityName(itemQuality)
+ });
+ string str = string.Format("({0}/{1})", num2, 7);
+ attrFrameParam.Title = @string + str;
+ }
+ else
+ {
+ string string2 = XStringDefineProxy.GetString("EQUIP_SUIT_THREE_TITLE", new object[]
+ {
+ this.m_fashionDoc.GetQualityName(itemQuality)
+ });
+ string str2 = string.Format("({0}/{1})", num2, 3);
+ attrFrameParam.Title = string2 + str2;
+ }
+ base.AppendFrame(ixuisprite.gameObject, (float)this.SetupAttrFrame(ixuisprite.gameObject, attrFrameParam, bMain), null);
+ }
+ else
+ {
+ ixuisprite.SetVisible(false);
+ }
+ }
+ }
+ }
+
+ private int GetFashionCount(int quality, bool IsThreeSuit)
+ {
+ bool flag = XSingleton<TooltipParam>.singleton.FashionOnBody == null;
+ int result;
+ if (flag)
+ {
+ result = 0;
+ }
+ else
+ {
+ int num = 0;
+ int i = 0;
+ int count = XSingleton<TooltipParam>.singleton.FashionOnBody.Count;
+ while (i < count)
+ {
+ ItemList.RowData itemConf = XBagDocument.GetItemConf((int)XSingleton<TooltipParam>.singleton.FashionOnBody[i]);
+ bool flag2 = itemConf == null;
+ if (!flag2)
+ {
+ bool flag3 = IsThreeSuit ^ this.m_fashionDoc.IsFashionThreeSpecial((int)XSingleton<TooltipParam>.singleton.FashionOnBody[i]);
+ if (!flag3)
+ {
+ bool flag4 = IsThreeSuit && this.m_fashionDoc.GetFashionSuit((int)XSingleton<TooltipParam>.singleton.FashionOnBody[i]) == 0;
+ if (!flag4)
+ {
+ bool flag5 = (int)itemConf.ItemQuality == quality;
+ if (flag5)
+ {
+ num++;
+ }
+ }
+ }
+ }
+ i++;
+ }
+ result = num;
+ }
+ return result;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/FashionStorageFashionToolTipDlg.cs.meta b/Client/Assets/Scripts/XMainClient/UI/FashionStorageFashionToolTipDlg.cs.meta
new file mode 100644
index 00000000..e2afea78
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/FashionStorageFashionToolTipDlg.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 3d690433352eca24c8ebc4efa0b5598f
+timeCreated: 1611403604
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/FashionStorageFashtionTakeOffSuit.cs b/Client/Assets/Scripts/XMainClient/UI/FashionStorageFashtionTakeOffSuit.cs
new file mode 100644
index 00000000..ab29e261
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/FashionStorageFashtionTakeOffSuit.cs
@@ -0,0 +1,60 @@
+using System;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class FashionStorageFashtionTakeOffSuit : TooltipButtonOperateBase
+ {
+ public override string GetButtonText()
+ {
+ return XStringDefineProxy.GetString("TAKEOFF_FASHIONSUIT");
+ }
+
+ public override bool HasRedPoint(XItem item)
+ {
+ return false;
+ }
+
+ public override bool IsButtonVisible(XItem item)
+ {
+ XFashionStorageDocument specificDocument = XDocuments.GetSpecificDocument<XFashionStorageDocument>(XFashionStorageDocument.uuID);
+ bool flag = specificDocument.fashionStorageType == FashionStorageType.OutLook;
+ bool result;
+ if (flag)
+ {
+ XFashionDocument specificDocument2 = XDocuments.GetSpecificDocument<XFashionDocument>(XFashionDocument.uuID);
+ bool flag2 = specificDocument2.GetFashionSuit(item.itemID) > 0;
+ result = (flag2 || XCharacterEquipDocument.SuitManager.GetSuit(item.itemID, false) != null);
+ }
+ else
+ {
+ result = false;
+ }
+ return result;
+ }
+
+ public override void OnButtonClick(ulong mainUID, ulong compareUID)
+ {
+ XFashionDocument specificDocument = XDocuments.GetSpecificDocument<XFashionDocument>(XFashionDocument.uuID);
+ int num = specificDocument.GetFashionSuit((int)mainUID);
+ bool flag = num == 0;
+ if (flag)
+ {
+ EquipSuitTable.RowData suit = XCharacterEquipDocument.SuitManager.GetSuit((int)mainUID, false);
+ bool flag2 = suit != null;
+ if (flag2)
+ {
+ num = suit.SuitID;
+ }
+ }
+ bool flag3 = num == 0;
+ if (!flag3)
+ {
+ RpcC2G_UseItem rpcC2G_UseItem = new RpcC2G_UseItem();
+ rpcC2G_UseItem.oArg.OpType = ItemUseMgr.GetItemUseValue(ItemUse.FashionSuitDisplayOff);
+ rpcC2G_UseItem.oArg.suit_id = (uint)num;
+ XSingleton<XClientNetwork>.singleton.Send(rpcC2G_UseItem);
+ }
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/FashionStorageFashtionTakeOffSuit.cs.meta b/Client/Assets/Scripts/XMainClient/UI/FashionStorageFashtionTakeOffSuit.cs.meta
new file mode 100644
index 00000000..ec09a7f0
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/FashionStorageFashtionTakeOffSuit.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 3dd9c3522633e7843ab451c221b7b0b7
+timeCreated: 1611403605
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/FashionStorageHairColorFrame.cs b/Client/Assets/Scripts/XMainClient/UI/FashionStorageHairColorFrame.cs
new file mode 100644
index 00000000..8bba35ff
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/FashionStorageHairColorFrame.cs
@@ -0,0 +1,206 @@
+using System;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class FashionStorageHairColorFrame : DlgHandlerBase
+ {
+ private IXUIButton m_Submit;
+
+ private IXUIButton m_Close;
+
+ private IXUIButton m_EditPortrait;
+
+ private IXUILabelSymbol m_EditorPortraitLabel;
+
+ private IXUIScrollView m_ScrollView;
+
+ private IXUIWrapContent m_WrapContent;
+
+ private XFashionStorageDocument m_Doc;
+
+ private uint m_SelectColorID = 0u;
+
+ private IFashionStorageSelect m_SelectHairData;
+
+ private IXUILabel m_HairNameLabel;
+
+ private IXUILabel m_MessageLabel;
+
+ protected override void Init()
+ {
+ this.m_Doc = XDocuments.GetSpecificDocument<XFashionStorageDocument>(XFashionStorageDocument.uuID);
+ this.m_Submit = (base.transform.Find("Submit").GetComponent("XUIButton") as IXUIButton);
+ this.m_Close = (base.transform.Find("Close").GetComponent("XUIButton") as IXUIButton);
+ this.m_EditPortrait = (base.transform.Find("EditPortrait").GetComponent("XUIButton") as IXUIButton);
+ this.m_EditorPortraitLabel = (base.transform.Find("EditPortrait/T").GetComponent("XUILabelSymbol") as IXUILabelSymbol);
+ this.m_ScrollView = (base.transform.Find("ScrollView").GetComponent("XUIScrollView") as IXUIScrollView);
+ this.m_WrapContent = (base.transform.Find("ScrollView/WrapContent").GetComponent("XUIWrapContent") as IXUIWrapContent);
+ this.m_HairNameLabel = (base.transform.Find("HairName").GetComponent("XUILabel") as IXUILabel);
+ this.m_MessageLabel = (base.transform.Find("Message").GetComponent("XUILabel") as IXUILabel);
+ this.m_MessageLabel.SetText(XStringDefineProxy.GetString("FASHION_STORAGE_HARI_MESSAGE"));
+ this.m_WrapContent.RegisterItemUpdateEventHandler(new WrapItemUpdateEventHandler(this.OnWrapContentUpdate));
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ this.RefreshData();
+ }
+
+ protected override void OnHide()
+ {
+ bool flag = this.m_Doc.preview == FashionStoragePreview.Hair;
+ if (flag)
+ {
+ this.m_Doc.preview = FashionStoragePreview.None;
+ this.m_Doc.previewHairColor = 0u;
+ DlgBase<FashionStorageDlg, FashionStorageBehaviour>.singleton.ShowAvatar();
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString("FASHION_HAIRCOLOR_UNSAVE"), "fece00");
+ }
+ base.OnHide();
+ }
+
+ public override void OnUnload()
+ {
+ bool flag = (this.m_Doc.preview & FashionStoragePreview.Hair) == FashionStoragePreview.Hair;
+ if (flag)
+ {
+ this.m_Doc.preview = FashionStoragePreview.None;
+ this.m_Doc.previewHairColor = 0u;
+ }
+ base.OnUnload();
+ }
+
+ public override void RefreshData()
+ {
+ base.RefreshData();
+ this.m_SelectHairData = this.m_Doc.GetFashionHair(this.m_Doc.selectHairID);
+ this.m_HairNameLabel.SetText(this.m_SelectHairData.GetName());
+ bool flag = this.m_SelectHairData == null;
+ if (flag)
+ {
+ this.m_WrapContent.SetContentCount(0, false);
+ this.m_MessageLabel.SetVisible(true);
+ }
+ else
+ {
+ this.m_WrapContent.SetContentCount(this.m_SelectHairData.GetFashionList().Length, false);
+ this.m_MessageLabel.SetVisible(this.m_SelectHairData.GetFashionList().Length <= this.m_WrapContent.widthDimension * 2);
+ }
+ this.m_ScrollView.ResetPosition();
+ }
+
+ private void OnWrapContentUpdate(Transform tr, int index)
+ {
+ Transform transform = tr.Find("detal");
+ IXUISprite ixuisprite = tr.GetComponent("XUISprite") as IXUISprite;
+ IXUILabel ixuilabel = tr.Find("Name").GetComponent("XUILabel") as IXUILabel;
+ bool flag = index >= this.m_SelectHairData.GetFashionList().Length;
+ if (flag)
+ {
+ transform.gameObject.SetActive(false);
+ ixuisprite.SetEnabled(false);
+ ixuilabel.SetText("");
+ }
+ else
+ {
+ ixuisprite.SetEnabled(true);
+ IXUICheckBox ixuicheckBox = transform.GetComponent("XUICheckBox") as IXUICheckBox;
+ IXUISprite ixuisprite2 = transform.Find("Color").GetComponent("XUISprite") as IXUISprite;
+ IXUISprite ixuisprite3 = transform.Find("Lock").GetComponent("XUISprite") as IXUISprite;
+ IXUISprite ixuisprite4 = transform.Find("Selected").GetComponent("XUISprite") as IXUISprite;
+ IXUISprite ixuisprite5 = transform.Find("Select").GetComponent("XUISprite") as IXUISprite;
+ HairColorTable.RowData hairColorData = this.m_Doc.GetHairColorData(this.m_SelectHairData.GetFashionList()[index]);
+ ixuisprite.ID = (ulong)hairColorData.ID;
+ ixuisprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnSelectHairColor));
+ ixuilabel.SetText(hairColorData.Name);
+ ixuisprite2.SetColor(XSingleton<UiUtility>.singleton.GetColor(hairColorData.Color));
+ bool flag2 = this.m_Doc.CurHairColor == hairColorData.ID;
+ if (flag2)
+ {
+ ixuisprite4.SetAlpha(1f);
+ ixuicheckBox.bChecked = true;
+ this.m_SelectColorID = hairColorData.ID;
+ this.ShowActivateHairPortrait();
+ }
+ else
+ {
+ ixuisprite4.SetAlpha(0f);
+ }
+ ixuisprite5.SetAlpha((this.m_SelectColorID == hairColorData.ID) ? 1f : 0f);
+ ixuisprite3.SetVisible(!this.m_SelectHairData.GetItems().Contains(hairColorData.ID));
+ }
+ }
+
+ private void OnSelectHairColor(IXUISprite sprite)
+ {
+ this.m_SelectColorID = (uint)sprite.ID;
+ IXUICheckBox ixuicheckBox = sprite.transform.Find("detal").GetComponent("XUICheckBox") as IXUICheckBox;
+ bool flag = ixuicheckBox != null;
+ if (flag)
+ {
+ ixuicheckBox.bChecked = true;
+ }
+ bool flag2 = this.m_Doc.IsActivateHairColor(this.m_Doc.selectHairID, this.m_SelectColorID);
+ if (flag2)
+ {
+ this.m_EditPortrait.SetVisible(false);
+ this.m_Doc.preview = FashionStoragePreview.None;
+ this.m_Doc.GetActivateHairColor(this.m_Doc.selectHairID, this.m_SelectColorID);
+ }
+ else
+ {
+ this.m_Doc.preview = FashionStoragePreview.Hair;
+ this.m_Doc.previewHairColor = this.m_SelectColorID;
+ DlgBase<FashionStorageDlg, FashionStorageBehaviour>.singleton.ShowAvatar();
+ }
+ this.ShowActivateHairPortrait();
+ }
+
+ private void ShowActivateHairPortrait()
+ {
+ uint num;
+ uint cost = 0;
+ bool flag = !this.m_Doc.IsActivateHairColor(this.m_Doc.selectHairID, this.m_SelectColorID) && this.m_Doc.TryGetActivateUseItem(this.m_Doc.selectHairID, this.m_SelectColorID, out num, out cost);
+ if (flag)
+ {
+ this.m_EditPortrait.SetVisible(true);
+ this.m_EditorPortraitLabel.InputText = XSingleton<XCommon>.singleton.StringCombine(XLabelSymbolHelper.FormatCostWithIcon((int)cost, ItemEnum.HAIR_COLORING), " ", XStringDefineProxy.GetString("HAIR_COULORING"));
+ }
+ else
+ {
+ this.m_EditPortrait.SetVisible(false);
+ }
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ this.m_Submit.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnSubmitHandle));
+ this.m_Close.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnCloseHandle));
+ this.m_EditPortrait.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnEditPortrait));
+ }
+
+ private bool OnCloseHandle(IXUIButton btn)
+ {
+ DlgBase<FashionStorageDlg, FashionStorageBehaviour>.singleton.Switch(FashionStoragePreview.None);
+ return true;
+ }
+
+ private bool OnEditPortrait(IXUIButton btn)
+ {
+ this.m_Doc.GetActivateHairColor(this.m_Doc.selectHairID, this.m_Doc.previewHairColor);
+ return true;
+ }
+
+ private bool OnSubmitHandle(IXUIButton btn)
+ {
+ XSingleton<UiUtility>.singleton.ShowItemAccess(XFastEnumIntEqualityComparer<ItemEnum>.ToInt(ItemEnum.HAIR_COLORING), null);
+ return true;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/FashionStorageHairColorFrame.cs.meta b/Client/Assets/Scripts/XMainClient/UI/FashionStorageHairColorFrame.cs.meta
new file mode 100644
index 00000000..e6210488
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/FashionStorageHairColorFrame.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: d317a9f21c2a1554e965a271cce97b22
+timeCreated: 1611404598
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/FashionStorageTooltipBase.cs b/Client/Assets/Scripts/XMainClient/UI/FashionStorageTooltipBase.cs
new file mode 100644
index 00000000..ec07084d
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/FashionStorageTooltipBase.cs
@@ -0,0 +1,103 @@
+using System;
+using UILib;
+using UnityEngine;
+
+namespace XMainClient.UI
+{
+ internal class FashionStorageTooltipBase<TDlgClass, TUIBehaviour> : TooltipDlg<TDlgClass, TUIBehaviour>, ITooltipDlg where TDlgClass : IXUIDlg, new() where TUIBehaviour : TooltipDlgBehaviour
+ {
+ public override string fileName
+ {
+ get
+ {
+ return "GameSystem/FashionStorageToolTip";
+ }
+ }
+
+ protected XFashionStorageDocument m_doc;
+
+ protected XFashionDocument m_fashionDoc;
+
+ protected int itemID;
+
+ public override bool HideToolTip(bool forceHide = false)
+ {
+ return base.HideToolTip(forceHide);
+ }
+
+ protected override void Init()
+ {
+ base.Init();
+ this.m_OperateList[0, 0] = new FashionStorageFashionPutOn();
+ this.m_OperateList[0, 1] = new FashionStorageFashionPutOnSuit();
+ this.m_OperateList[1, 0] = new FashionStorageFashionTakeOff();
+ this.m_OperateList[1, 1] = new FashionStorageFashtionTakeOffSuit();
+ this.m_OperateList[1, 2] = new FashionStorageColouring();
+ this.m_OperateList[2, 0] = new FashionStorageButtonGoFashion();
+ this.m_fashionDoc = XDocuments.GetSpecificDocument<XFashionDocument>(XFashionDocument.uuID);
+ this.m_doc = XDocuments.GetSpecificDocument<XFashionStorageDocument>(XFashionStorageDocument.uuID);
+ }
+
+ protected override void SetupToolTipButtons(GameObject goToolTip, XItem item, bool bMain)
+ {
+ base.SetupToolTipButtons(goToolTip, item, bMain);
+ this.itemID = item.itemID;
+ if (bMain)
+ {
+ bool flag = this.m_doc.fashionStorageType == FashionStorageType.OutLook;
+ if (flag)
+ {
+ bool flag2 = this.m_doc.FashionInBody(item.itemID);
+ if (flag2)
+ {
+ base._SetupButtonVisiability(goToolTip, 1, item);
+ }
+ else
+ {
+ base._SetupButtonVisiability(goToolTip, 0, item);
+ }
+ }
+ else
+ {
+ base._SetupButtonVisiability(goToolTip, 2, item);
+ }
+ }
+ }
+
+ protected override bool OnButton1Clicked(IXUIButton button)
+ {
+ this._bButtonClickedThisFrame = true;
+ bool flag = this.m_OperateList[(int)button.ID, 0] != null;
+ if (flag)
+ {
+ this.m_OperateList[(int)button.ID, 0].OnButtonClick((ulong)((long)this.itemID), 0UL);
+ }
+ this.HideToolTip(true);
+ return true;
+ }
+
+ protected override bool OnButton2Clicked(IXUIButton button)
+ {
+ this._bButtonClickedThisFrame = true;
+ bool flag = this.m_OperateList[(int)button.ID, 1] != null;
+ if (flag)
+ {
+ this.m_OperateList[(int)button.ID, 1].OnButtonClick((ulong)((long)this.itemID), 0UL);
+ }
+ this.HideToolTip(true);
+ return true;
+ }
+
+ protected override bool OnButton3Clicked(IXUIButton button)
+ {
+ this._bButtonClickedThisFrame = true;
+ bool flag = this.m_OperateList[(int)button.ID, 2] != null;
+ if (flag)
+ {
+ this.m_OperateList[(int)button.ID, 2].OnButtonClick((ulong)((long)this.itemID), 0UL);
+ }
+ this.HideToolTip(true);
+ return true;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/FashionStorageTooltipBase.cs.meta b/Client/Assets/Scripts/XMainClient/UI/FashionStorageTooltipBase.cs.meta
new file mode 100644
index 00000000..dab0dc4b
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/FashionStorageTooltipBase.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 9d438609be3ef7445a31baded42ef145
+timeCreated: 1611404235
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/FashionStorageType.cs b/Client/Assets/Scripts/XMainClient/UI/FashionStorageType.cs
new file mode 100644
index 00000000..750fd55b
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/FashionStorageType.cs
@@ -0,0 +1,11 @@
+using System;
+
+namespace XMainClient.UI
+{
+ public enum FashionStorageType
+ {
+ OutLook,
+ FashionCollection,
+ EquipCollection
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/FashionStorageType.cs.meta b/Client/Assets/Scripts/XMainClient/UI/FashionStorageType.cs.meta
new file mode 100644
index 00000000..08f5f8b1
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/FashionStorageType.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: ff782ddf615a4d348a3cd22da92e853b
+timeCreated: 1611404947
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/FashionStotageDisplayHandle.cs b/Client/Assets/Scripts/XMainClient/UI/FashionStotageDisplayHandle.cs
new file mode 100644
index 00000000..765b891d
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/FashionStotageDisplayHandle.cs
@@ -0,0 +1,76 @@
+using System;
+using UILib;
+using UnityEngine;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class FashionStotageDisplayHandle : DlgHandlerBase
+ {
+ private IXUIScrollView m_fashionBagView;
+
+ private IXUIWrapContent m_fashionWrapContent;
+
+ private IFashionStorageSelect m_Select;
+
+ private XFashionStorageDocument m_doc;
+
+ protected override void Init()
+ {
+ base.Init();
+ this.m_doc = XDocuments.GetSpecificDocument<XFashionStorageDocument>(XFashionStorageDocument.uuID);
+ this.m_fashionBagView = (base.transform.GetComponent("XUIScrollView") as IXUIScrollView);
+ this.m_fashionWrapContent = (base.FindInChild("XUIWrapContent", "WrapContent") as IXUIWrapContent);
+ this.m_fashionWrapContent.RegisterItemUpdateEventHandler(new WrapItemUpdateEventHandler(this.ItemWrapContentUpdate));
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ }
+
+ private void ItemWrapContentUpdate(Transform t, int index)
+ {
+ uint num = (this.m_Select != null && index >= 0 && index < this.m_Select.GetItems().Count) ? this.m_Select.GetItems()[index] : 0u;
+ IXUISprite ixuisprite = t.GetComponent("XUISprite") as IXUISprite;
+ IXUISprite ixuisprite2 = t.Find("RedPoint").GetComponent("XUISprite") as IXUISprite;
+ XSingleton<XItemDrawerMgr>.singleton.normalItemDrawer.DrawItem(t.gameObject, (int)num, 0, false);
+ ixuisprite.ID = (ulong)num;
+ ixuisprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.ItemClick));
+ ixuisprite2.SetAlpha(this.m_doc.FashionInBody((int)num) ? 1f : 0f);
+ }
+
+ private void ItemClick(IXUISprite iconSprite)
+ {
+ bool flag = iconSprite.ID == 0UL;
+ if (!flag)
+ {
+ int itemID = (int)iconSprite.ID;
+ XItem item = XBagDocument.MakeXItem(itemID, true);
+ XSingleton<UiUtility>.singleton.ShowOutLookDialog(item, iconSprite, 0u);
+ }
+ }
+
+ public void SetFashionStorageSelect(IFashionStorageSelect select = null)
+ {
+ this.m_Select = select;
+ int num = (this.m_Select == null) ? 0 : this.m_Select.GetItems().Count;
+ int num2 = this.m_fashionWrapContent.widthDimension * this.m_fashionWrapContent.heightDimensionMax;
+ bool flag = num > this.m_fashionWrapContent.widthDimension * this.m_fashionWrapContent.heightDimensionMax;
+ if (flag)
+ {
+ bool flag2 = num % this.m_fashionWrapContent.widthDimension > 0;
+ if (flag2)
+ {
+ num = (num / this.m_fashionWrapContent.widthDimension + 1) * this.m_fashionWrapContent.widthDimension;
+ }
+ }
+ else
+ {
+ num = num2;
+ }
+ this.m_fashionWrapContent.SetContentCount(num, false);
+ this.m_fashionBagView.ResetPosition();
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/FashionStotageDisplayHandle.cs.meta b/Client/Assets/Scripts/XMainClient/UI/FashionStotageDisplayHandle.cs.meta
new file mode 100644
index 00000000..89ec149b
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/FashionStotageDisplayHandle.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: bf8fc20cf7ed83045939fc0586c33b6a
+timeCreated: 1611404483
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/FashionTooltipDlg.cs b/Client/Assets/Scripts/XMainClient/UI/FashionTooltipDlg.cs
new file mode 100644
index 00000000..50baf82d
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/FashionTooltipDlg.cs
@@ -0,0 +1,297 @@
+using System;
+using UILib;
+using UnityEngine;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class FashionTooltipDlg : TooltipDlg<FashionTooltipDlg, FashionTooltipDlgBehaviour>
+ {
+ public override string fileName
+ {
+ get
+ {
+ return "GameSystem/FashionToolTipDlg";
+ }
+ }
+
+ protected override int compareWindowDistance
+ {
+ get
+ {
+ return 20;
+ }
+ }
+
+ private XFashionDocument _doc;
+
+ private IXUILabel time = null;
+
+ protected override void Init()
+ {
+ base.Init();
+ this.m_OperateList[0, 0] = new TooltipButtonOperateFashionPutOn();
+ this.m_OperateList[0, 1] = new TooltipButtonOperateFashionPutOnSuit();
+ this.m_OperateList[0, 2] = new TooltipButtonOperateRecycle(XSysDefine.XSys_Fashion_Fashion);
+ this.m_OperateList[0, 3] = new TooltipButtonOperateSell();
+ this.m_OperateList[0, 4] = new TooltipButtonActivateFashion();
+ this.m_OperateList[1, 0] = new TooltipButtonOperateFashionTakeOff();
+ this.m_OperateList[1, 1] = new TooltipButtonOperateFashionTakeOffSuit();
+ this._doc = XDocuments.GetSpecificDocument<XFashionDocument>(XFashionDocument.uuID);
+ }
+
+ public override bool HideToolTip(bool forceHide = false)
+ {
+ return base.HideToolTip(forceHide);
+ }
+
+ protected override void SetupTopFrame(GameObject goToolTip, ItemList.RowData data, bool bMain, XItem instanceData = null, XItem compareData = null)
+ {
+ base.SetupTopFrame(goToolTip, data, bMain, instanceData, compareData);
+ base._SetupLevel(goToolTip, data, 0);
+ base._SetupProf(goToolTip, data, bMain, instanceData, 1);
+ FashionList.RowData fashionConf = XBagDocument.GetFashionConf(data.ItemID);
+ base._SetTopFrameLabel(goToolTip, 2, XStringDefineProxy.GetString("ToolTipText_Part"), (fashionConf != null) ? XSingleton<UiUtility>.singleton.GetFashionPartName((FashionPosition)fashionConf.EquipPos, true) : string.Empty);
+ Transform transform = goToolTip.transform;
+ GameObject gameObject = transform.Find("TopFrame/State").gameObject;
+ this.time = (transform.Find("TopFrame/Time/Left").GetComponent("XUILabel") as IXUILabel);
+ bool flag = this.mainItemUID > 0UL;
+ if (flag)
+ {
+ gameObject.SetActive(this._doc.IsFashionEquipOn(this.mainItemUID));
+ }
+ else
+ {
+ gameObject.SetActive(false);
+ }
+ ClientFashionData clientFashionData = this._doc.FindFashion(this.mainItemUID);
+ ItemList.RowData itemConf = XBagDocument.GetItemConf(data.ItemID);
+ bool flag2 = itemConf != null;
+ if (flag2)
+ {
+ bool flag3 = itemConf.TimeLimit == 0u;
+ if (flag3)
+ {
+ this.time.SetText(XStringDefineProxy.GetString("FASHION_LIMIT_ALWAYS"));
+ }
+ else
+ {
+ bool flag4 = clientFashionData == null;
+ if (flag4)
+ {
+ this.time.SetText(XSingleton<UiUtility>.singleton.TimeDuarationFormatString((int)itemConf.TimeLimit, 5) + XStringDefineProxy.GetString("FASHION_LIMIT_UNWEAR"));
+ }
+ else
+ {
+ bool flag5 = clientFashionData.timeleft < 0.0;
+ if (flag5)
+ {
+ this.time.SetText(XSingleton<UiUtility>.singleton.TimeDuarationFormatString((int)itemConf.TimeLimit, 5) + XStringDefineProxy.GetString("FASHION_LIMIT_UNWEAR"));
+ }
+ else
+ {
+ this.time.SetText(XSingleton<UiUtility>.singleton.TimeDuarationFormatString((int)itemConf.TimeLimit, 5));
+ }
+ }
+ }
+ }
+ }
+
+ protected override int _GetPPT(XItem item, bool bMain, ref string valueText)
+ {
+ bool flag = item == null;
+ int result;
+ if (flag)
+ {
+ result = -1;
+ }
+ else
+ {
+ uint ppt = item.GetPPT(bMain ? XSingleton<TooltipParam>.singleton.mainAttributes : XSingleton<TooltipParam>.singleton.compareAttributes);
+ valueText = ppt.ToString();
+ result = (int)ppt;
+ }
+ return result;
+ }
+
+ protected override void SetupOtherFrame(GameObject goToolTip, XItem mainItem, XItem compareItem, bool bMain)
+ {
+ this._SetupSuitFrame(goToolTip, mainItem, compareItem, bMain);
+ base.SetupOtherFrame(goToolTip, mainItem, compareItem, bMain);
+ }
+
+ protected override void SetupToolTipButtons(GameObject goToolTip, XItem item, bool bMain)
+ {
+ base.SetupToolTipButtons(goToolTip, item, bMain);
+ bool flag = !this.bShowButtons;
+ if (!flag)
+ {
+ if (bMain)
+ {
+ bool flag2 = this._doc.IsFashionEquipOn(item.uid);
+ if (flag2)
+ {
+ base._SetupButtonVisiability(goToolTip, 1, item);
+ }
+ else
+ {
+ base._SetupButtonVisiability(goToolTip, 0, item);
+ }
+ }
+ }
+ }
+
+ private void _SetupSuitFrame(GameObject goToolTip, XItem mainItem, XItem compareItem, bool bMain)
+ {
+ IXUISprite ixuisprite = goToolTip.transform.Find("ScrollPanel/SuitFrame").GetComponent("XUISprite") as IXUISprite;
+ bool flag = mainItem == null;
+ if (flag)
+ {
+ ixuisprite.SetVisible(false);
+ }
+ else
+ {
+ ixuisprite.SetVisible(true);
+ ItemList.RowData itemConf = XBagDocument.GetItemConf(mainItem.itemID);
+ int itemQuality = (int)itemConf.ItemQuality;
+ bool flag2 = this._doc.IsFashionThreeSpecial(mainItem.itemID);
+ int fashionSuit = this._doc.GetFashionSuit(mainItem.itemID);
+ bool flag3 = flag2 && fashionSuit == 0;
+ if (flag3)
+ {
+ ixuisprite.SetVisible(false);
+ }
+ else
+ {
+ int num = 0;
+ int num2 = (XSingleton<TooltipParam>.singleton.FashionOnBody == null) ? this._doc.GetQualityCountOnBody(itemQuality, flag2) : this.GetFashionCount(itemQuality, flag2);
+ AttrFrameParam attrFrameParam = new AttrFrameParam();
+ for (int i = 2; i <= 7; i++)
+ {
+ SeqListRef<uint> qualityEffect = this._doc.GetQualityEffect(itemQuality, i, flag2);
+ bool flag4 = qualityEffect.Count == 0;
+ if (!flag4)
+ {
+ for (int j = 0; j < qualityEffect.Count; j++)
+ {
+ bool flag5 = qualityEffect[j, 0] == 0u;
+ if (!flag5)
+ {
+ bool flag6 = i <= num2;
+ string text;
+ string color;
+ if (flag6)
+ {
+ text = "ffffff";
+ color = XSingleton<UiUtility>.singleton.GetColorStr(new Color(0.996078432f, 0.807843149f, 0f));
+ }
+ else
+ {
+ text = XSingleton<UiUtility>.singleton.GetColorStr(new Color(0.5019608f, 0.5019608f, 0.5019608f));
+ color = text;
+ }
+ AttrParam item = default(AttrParam);
+ AttrParam.ResetSb();
+ AttrParam.Append(AttrParam.TextSb, XStringDefineProxy.GetString("EQUIP_SUIT_EFFECT", new object[]
+ {
+ i
+ }), color);
+ string s = string.Format("{0}{1}", XStringDefineProxy.GetString((XAttributeDefine)qualityEffect[j, 0]), XAttributeCommon.GetAttrValueStr((int)qualityEffect[j, 0], (float)qualityEffect[j, 1]));
+ AttrParam.Append(AttrParam.ValueSb, s, text);
+ item.SetTextFromSb();
+ item.SetValueFromSb();
+ attrFrameParam.AttrList.Add(item);
+ num++;
+ }
+ }
+ }
+ }
+ bool flag7 = num > 0;
+ if (flag7)
+ {
+ bool flag8 = !flag2;
+ if (flag8)
+ {
+ string @string = XStringDefineProxy.GetString("EQUIP_SUIT_TITLE", new object[]
+ {
+ this._doc.GetQualityName(itemQuality)
+ });
+ string str = string.Format("({0}/{1})", num2, 7);
+ attrFrameParam.Title = @string + str;
+ }
+ else
+ {
+ string string2 = XStringDefineProxy.GetString("EQUIP_SUIT_THREE_TITLE", new object[]
+ {
+ this._doc.GetQualityName(itemQuality)
+ });
+ string str2 = string.Format("({0}/{1})", num2, 3);
+ attrFrameParam.Title = string2 + str2;
+ }
+ base.AppendFrame(ixuisprite.gameObject, (float)this.SetupAttrFrame(ixuisprite.gameObject, attrFrameParam, bMain), null);
+ ixuisprite.SetVisible(false);
+ ixuisprite.SetVisible(true);
+ }
+ else
+ {
+ ixuisprite.SetVisible(false);
+ }
+ }
+ }
+ }
+
+ private int GetFashionCount(int quality, bool IsThreeSuit)
+ {
+ bool flag = XSingleton<TooltipParam>.singleton.FashionOnBody == null;
+ int result;
+ if (flag)
+ {
+ result = 0;
+ }
+ else
+ {
+ int num = 0;
+ int i = 0;
+ int count = XSingleton<TooltipParam>.singleton.FashionOnBody.Count;
+ while (i < count)
+ {
+ ItemList.RowData itemConf = XBagDocument.GetItemConf((int)XSingleton<TooltipParam>.singleton.FashionOnBody[i]);
+ bool flag2 = itemConf == null;
+ if (!flag2)
+ {
+ bool flag3 = IsThreeSuit ^ this._doc.IsFashionThreeSpecial((int)XSingleton<TooltipParam>.singleton.FashionOnBody[i]);
+ if (!flag3)
+ {
+ bool flag4 = IsThreeSuit && this._doc.GetFashionSuit((int)XSingleton<TooltipParam>.singleton.FashionOnBody[i]) == 0;
+ if (!flag4)
+ {
+ bool flag5 = (int)itemConf.ItemQuality == quality;
+ if (flag5)
+ {
+ num++;
+ }
+ }
+ }
+ }
+ i++;
+ }
+ result = num;
+ }
+ return result;
+ }
+
+ public override void OnUpdate()
+ {
+ ClientFashionData clientFashionData = this._doc.FindFashion(this.mainItemUID);
+ bool flag = clientFashionData != null && clientFashionData.timeleft > 0.0;
+ if (flag)
+ {
+ bool flag2 = this.time != null;
+ if (flag2)
+ {
+ this.time.SetText(XSingleton<UiUtility>.singleton.TimeDuarationFormatString((int)clientFashionData.timeleft, 5));
+ }
+ }
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/FashionTooltipDlg.cs.meta b/Client/Assets/Scripts/XMainClient/UI/FashionTooltipDlg.cs.meta
new file mode 100644
index 00000000..184b3e40
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/FashionTooltipDlg.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 95ed526ff5cc54747b482ba0515e07d9
+timeCreated: 1611404183
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/FashionTooltipDlgBehaviour.cs b/Client/Assets/Scripts/XMainClient/UI/FashionTooltipDlgBehaviour.cs
new file mode 100644
index 00000000..5d676ec4
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/FashionTooltipDlgBehaviour.cs
@@ -0,0 +1,12 @@
+using System;
+
+namespace XMainClient.UI
+{
+ internal class FashionTooltipDlgBehaviour : TooltipDlgBehaviour
+ {
+ protected override void Awake()
+ {
+ base.Awake();
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/FashionTooltipDlgBehaviour.cs.meta b/Client/Assets/Scripts/XMainClient/UI/FashionTooltipDlgBehaviour.cs.meta
new file mode 100644
index 00000000..7aa78030
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/FashionTooltipDlgBehaviour.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: f22a4614a61609345a835b979f6e728d
+timeCreated: 1611404842
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/FeastHandler.cs b/Client/Assets/Scripts/XMainClient/UI/FeastHandler.cs
new file mode 100644
index 00000000..b00e49ce
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/FeastHandler.cs
@@ -0,0 +1,287 @@
+using System;
+using System.Collections.Generic;
+using UILib;
+using UnityEngine;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class FeastHandler : DlgHandlerBase
+ {
+ protected override string FileName
+ {
+ get
+ {
+ return "Home/FeastHandler";
+ }
+ }
+
+ protected XUIPool _tabPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ protected XUIPool _itemPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ private Transform _rewardSnap;
+
+ private IXUILabel _packageName;
+
+ private IXUILabel _partyDesc;
+
+ private Transform _tabs;
+
+ private Transform _items;
+
+ private IXUIButton _inviteBtn;
+
+ private IXUIButton _holdPartyBtn;
+
+ private List<Transform> _tabList = new List<Transform>();
+
+ private uint _banquetID = 0u;
+
+ protected override void Init()
+ {
+ base.Init();
+ this.InitProperties();
+ this.InitLeftTabs();
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ this.RefreshUI();
+ }
+
+ protected override void OnHide()
+ {
+ base.OnHide();
+ }
+
+ public override void OnUnload()
+ {
+ base.OnUnload();
+ }
+
+ public void RefreshUI()
+ {
+ this.SetHoldPatryState();
+ this.SetDefaultTab();
+ }
+
+ public void BeginToFeast()
+ {
+ XSingleton<XDebug>.singleton.AddGreenLog("BeginToFeast", null, null, null, null, null);
+ this.RefreshPartyBtnState(false);
+ }
+
+ public void RefreshPartyBtnState(bool enable)
+ {
+ this._holdPartyBtn.SetEnable(enable, false);
+ }
+
+ private void InitLeftTabs()
+ {
+ this._tabList.Clear();
+ this._tabPool.ReturnAll(false);
+ GardenBanquetCfg.RowData[] table = XHomeCookAndPartyDocument.GardenBanquetCfgTable.Table;
+ for (int i = 0; i < table.Length; i++)
+ {
+ GameObject gameObject = this._tabPool.FetchGameObject(false);
+ this.InitTabItem(gameObject.transform, table[i]);
+ gameObject.transform.parent = this._tabs;
+ gameObject.transform.localPosition = new Vector3(this._tabPool.TplPos.x, this._tabPool.TplPos.y - (float)(i * this._tabPool.TplHeight), 0f);
+ this._tabList.Add(gameObject.transform);
+ }
+ }
+
+ private void InitProperties()
+ {
+ this._tabs = base.transform.Find("Tabs");
+ this._tabPool.SetupPool(this._tabs.gameObject, this._tabs.Find("Combo").gameObject, 2u, false);
+ this._items = base.transform.Find("Content/NeedFood/Items");
+ this._itemPool.SetupPool(this._items.gameObject, this._items.Find("Item").gameObject, 2u, false);
+ this._packageName = (base.transform.Find("Content/Tittle/Name").GetComponent("XUILabel") as IXUILabel);
+ this._partyDesc = (base.transform.Find("Content/FeastDes/ContentLab").GetComponent("XUILabel") as IXUILabel);
+ this._rewardSnap = base.transform.Find("Content/FeastReward/SnapShot");
+ this._holdPartyBtn = (base.transform.Find("HoldFeastBtn").GetComponent("XUIButton") as IXUIButton);
+ this._holdPartyBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnClickHoldParty));
+ this._inviteBtn = (base.transform.Find("InviteFriendsBtn").GetComponent("XUIButton") as IXUIButton);
+ this._inviteBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnClickInviteBtn));
+ }
+
+ private void InitTabItem(Transform item, GardenBanquetCfg.RowData info)
+ {
+ IXUICheckBox ixuicheckBox = item.GetComponent("XUICheckBox") as IXUICheckBox;
+ ixuicheckBox.ID = (ulong)info.BanquetID;
+ ixuicheckBox.RegisterOnCheckEventHandler(new CheckBoxOnCheckEventHandler(this.OnPackageChange));
+ Transform transform = item.Find("Tittle");
+ IXUILabel ixuilabel = item.Find("Tittle").GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel2 = item.Find("Select/SL").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel.SetText(info.BanquetName);
+ ixuilabel2.SetText(info.BanquetName);
+ }
+
+ private void SetDefaultTab()
+ {
+ bool flag = this._tabList.Count > 0;
+ if (flag)
+ {
+ IXUICheckBox ixuicheckBox = this._tabList[0].GetComponent("XUICheckBox") as IXUICheckBox;
+ ixuicheckBox.ForceSetFlag(true);
+ this.RefreshRightPanel((uint)ixuicheckBox.ID);
+ }
+ }
+
+ private void RefreshRightPanel(uint id)
+ {
+ GardenBanquetCfg.RowData gardenBanquetInfoByID = XHomeCookAndPartyDocument.Doc.GetGardenBanquetInfoByID(id);
+ bool flag = gardenBanquetInfoByID != null;
+ if (flag)
+ {
+ this._itemPool.ReturnAll(false);
+ this._packageName.SetText(gardenBanquetInfoByID.BanquetName);
+ this._partyDesc.SetText(gardenBanquetInfoByID.Desc);
+ for (int i = 0; i < gardenBanquetInfoByID.Stuffs.Count; i++)
+ {
+ Transform transform = this.DrawItem((int)gardenBanquetInfoByID.Stuffs[i, 0], (int)gardenBanquetInfoByID.Stuffs[i, 1], this._items, i);
+ IXUILabel ixuilabel = transform.transform.Find("Num").GetComponent("XUILabel") as IXUILabel;
+ uint itemid = gardenBanquetInfoByID.Stuffs[i, 0];
+ ulong itemCount = XBagDocument.BagDoc.GetItemCount((int)itemid);
+ string text = itemCount + "/" + gardenBanquetInfoByID.Stuffs[i, 1];
+ bool flag2 = itemCount < (ulong)gardenBanquetInfoByID.Stuffs[i, 1];
+ if (flag2)
+ {
+ text = string.Concat(new object[]
+ {
+ "[ff0000]",
+ itemCount,
+ "/",
+ gardenBanquetInfoByID.Stuffs[i, 1],
+ "[-]"
+ });
+ }
+ ixuilabel.SetText(text);
+ }
+ for (int j = 0; j < gardenBanquetInfoByID.BanquetAwards.Count; j++)
+ {
+ this.DrawItem((int)gardenBanquetInfoByID.BanquetAwards[j, 0], (int)gardenBanquetInfoByID.BanquetAwards[j, 1], this._rewardSnap, j);
+ }
+ }
+ }
+
+ private Transform DrawItem(int itemID, int num, Transform parent, int index)
+ {
+ GameObject gameObject = this._itemPool.FetchGameObject(false);
+ gameObject.transform.parent = parent;
+ gameObject.transform.localPosition = new Vector3((float)(index * this._itemPool.TplWidth), 0f, 0f);
+ XSingleton<XItemDrawerMgr>.singleton.normalItemDrawer.DrawItem(gameObject, itemID, num, true);
+ IXUISprite ixuisprite = gameObject.transform.Find("Icon").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.ID = (ulong)((long)itemID);
+ ixuisprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(XSingleton<UiUtility>.singleton.OnItemClick));
+ return gameObject.transform;
+ }
+
+ private bool OnPackageChange(IXUICheckBox box)
+ {
+ bool bChecked = box.bChecked;
+ bool result;
+ if (bChecked)
+ {
+ uint num = (uint)box.ID;
+ this._banquetID = num;
+ this.RefreshRightPanel(num);
+ result = true;
+ }
+ else
+ {
+ result = false;
+ }
+ return result;
+ }
+
+ private bool OnClickInviteBtn(IXUIButton btn)
+ {
+ XActivityInviteDocument.Doc.ShowActivityInviteView(2, XActivityInviteDocument.OpType.Invite);
+ return true;
+ }
+
+ private bool OnClickHoldParty(IXUIButton btn)
+ {
+ bool flag = !this.IsFoodEnough();
+ bool result;
+ if (flag)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XSingleton<XStringTable>.singleton.GetString("FoodNotEnough"), "fece00");
+ result = false;
+ }
+ else
+ {
+ bool flag2 = this.IsHasEnoughParters();
+ if (flag2)
+ {
+ XHomeCookAndPartyDocument.Doc.SendGardenBanquet(this._banquetID);
+ result = true;
+ }
+ else
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XSingleton<XStringTable>.singleton.GetString("GargenPepleLack"), "fece00");
+ result = false;
+ }
+ }
+ return result;
+ }
+
+ private bool IsHasEnoughParters()
+ {
+ List<XEntity> all = XSingleton<XEntityMgr>.singleton.GetAll();
+ int num = 0;
+ for (int i = 0; i < all.Count; i++)
+ {
+ bool isRole = all[i].IsRole;
+ if (isRole)
+ {
+ num++;
+ }
+ }
+ return num >= XSingleton<XGlobalConfig>.singleton.GetInt("GardenBanquetGuests");
+ }
+
+ private void SetHoldPatryState()
+ {
+ bool flag = !HomeMainDocument.Doc.IsInMyOwnHomeGarden() || XHomeCookAndPartyDocument.Doc.CurBanquetState > 0u;
+ if (flag)
+ {
+ this._holdPartyBtn.SetEnable(false, false);
+ }
+ else
+ {
+ this._holdPartyBtn.SetEnable(true, false);
+ }
+ }
+
+ protected bool IsFoodEnough()
+ {
+ GardenBanquetCfg.RowData gardenBanquetInfoByID = XHomeCookAndPartyDocument.Doc.GetGardenBanquetInfoByID(this._banquetID);
+ bool flag = gardenBanquetInfoByID != null;
+ if (flag)
+ {
+ for (int i = 0; i < gardenBanquetInfoByID.Stuffs.Count; i++)
+ {
+ uint itemid = gardenBanquetInfoByID.Stuffs[i, 0];
+ uint num = gardenBanquetInfoByID.Stuffs[i, 1];
+ uint num2 = (uint)XBagDocument.BagDoc.GetItemCount((int)itemid);
+ bool flag2 = num2 < num;
+ if (flag2)
+ {
+ return false;
+ }
+ }
+ }
+ return true;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/FeastHandler.cs.meta b/Client/Assets/Scripts/XMainClient/UI/FeastHandler.cs.meta
new file mode 100644
index 00000000..8261bd7b
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/FeastHandler.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 69805867e355647468bdd357c6b82830
+timeCreated: 1611403886
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/FindBackData.cs b/Client/Assets/Scripts/XMainClient/UI/FindBackData.cs
new file mode 100644
index 00000000..ba98f73e
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/FindBackData.cs
@@ -0,0 +1,25 @@
+using System;
+using System.Collections.Generic;
+using KKSG;
+
+namespace XMainClient.UI
+{
+ internal class FindBackData
+ {
+ public int findid = 0;
+
+ public int maxfindback = 0;
+
+ public int findindex = 0;
+
+ public bool isfind = false;
+
+ public int findbacklevel = 0;
+
+ public List<ItemFindBackInfo2Client> findbackinfo = new List<ItemFindBackInfo2Client>();
+
+ public Dictionary<int, List<int>> goldItemCount = new Dictionary<int, List<int>>();
+
+ public Dictionary<int, List<int>> dragonCoinItemCount = new Dictionary<int, List<int>>();
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/FindBackData.cs.meta b/Client/Assets/Scripts/XMainClient/UI/FindBackData.cs.meta
new file mode 100644
index 00000000..f843595c
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/FindBackData.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 2b2f8f7591cbfd84c98062ab5d938f57
+timeCreated: 1611403498
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/FirstPassGhjcHandler.cs b/Client/Assets/Scripts/XMainClient/UI/FirstPassGhjcHandler.cs
new file mode 100644
index 00000000..dadd2bc4
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/FirstPassGhjcHandler.cs
@@ -0,0 +1,42 @@
+using System;
+using UILib;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class FirstPassGhjcHandler : DlgHandlerBase
+ {
+ protected override string FileName
+ {
+ get
+ {
+ return "OperatingActivity/FirstPassGhjc";
+ }
+ }
+
+ public IXUIButton m_btnGo;
+
+ protected override void Init()
+ {
+ base.Init();
+ this.m_btnGo = (base.transform.Find("BtnGo").GetComponent("XUIButton") as IXUIButton);
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ this.m_btnGo.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnBtnClick));
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ }
+
+ private bool OnBtnClick(IXUIButton btn)
+ {
+ XSingleton<XGameSysMgr>.singleton.OpenSystem(XSysDefine.XSys_Team, 0UL);
+ return true;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/FirstPassGhjcHandler.cs.meta b/Client/Assets/Scripts/XMainClient/UI/FirstPassGhjcHandler.cs.meta
new file mode 100644
index 00000000..71a907c2
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/FirstPassGhjcHandler.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 0ea7e12eb5dfe2d4791c13f81c31715a
+timeCreated: 1611403204
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/FirstPassGuindRankHandler.cs b/Client/Assets/Scripts/XMainClient/UI/FirstPassGuindRankHandler.cs
new file mode 100644
index 00000000..7e32e57f
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/FirstPassGuindRankHandler.cs
@@ -0,0 +1,283 @@
+using System;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class FirstPassGuindRankHandler : DlgHandlerBase
+ {
+ protected override string FileName
+ {
+ get
+ {
+ return "OperatingActivity/FirstPassGuildRank";
+ }
+ }
+
+ private IXUILabel m_TimeLabel;
+
+ private IXUILabel m_DescLabel;
+
+ private IXUILabel m_MarkLabel;
+
+ private IXUILabel m_UnJoinLabel;
+
+ private IXUILabel m_GuildRankLabel;
+
+ private IXUIButton m_ShowRank;
+
+ private IXUIButton m_JoinGuild;
+
+ private IXUIScrollView m_ScrollView;
+
+ private IXUIWrapContent m_WrapContent;
+
+ private uint m_timer = 0u;
+
+ private XGuildRankDocument _Doc;
+
+ protected override void Init()
+ {
+ base.Init();
+ this._Doc = XDocuments.GetSpecificDocument<XGuildRankDocument>(XGuildRankDocument.uuID);
+ this.m_TimeLabel = (base.transform.Find("Titles/Time").GetComponent("XUILabel") as IXUILabel);
+ this.m_DescLabel = (base.transform.Find("Titles/Desc").GetComponent("XUILabel") as IXUILabel);
+ this.m_MarkLabel = (base.transform.Find("Titles/Mark").GetComponent("XUILabel") as IXUILabel);
+ this.m_UnJoinLabel = (base.transform.Find("Control/UnJoin").GetComponent("XUILabel") as IXUILabel);
+ this.m_GuildRankLabel = (base.transform.Find("Control/Rank").GetComponent("XUILabel") as IXUILabel);
+ this.m_ShowRank = (base.transform.Find("Control/ShowRank").GetComponent("XUIButton") as IXUIButton);
+ this.m_JoinGuild = (base.transform.Find("Control/JoinGuild").GetComponent("XUIButton") as IXUIButton);
+ this.m_ScrollView = (base.transform.Find("RankContent/ScrollView").GetComponent("XUIScrollView") as IXUIScrollView);
+ this.m_WrapContent = (base.transform.Find("RankContent/ScrollView/GuildList").GetComponent("XUIWrapContent") as IXUIWrapContent);
+ this.m_WrapContent.RegisterItemUpdateEventHandler(new WrapItemUpdateEventHandler(this.OnWrapContentUpdate));
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ this._Doc.SendGuildRankInfo();
+ this.CheckInGuild();
+ this.RefreshTitles();
+ this.SetRewardInfo();
+ this.CheckTime();
+ }
+
+ public override void StackRefresh()
+ {
+ base.StackRefresh();
+ this.CheckInGuild();
+ this.RefreshTitles();
+ this.CheckTime();
+ }
+
+ public override void RefreshData()
+ {
+ base.RefreshData();
+ this.RefreshTitles();
+ this.CheckInGuild();
+ this.CheckTime();
+ }
+
+ private void SetRewardInfo()
+ {
+ this.m_WrapContent.SetContentCount(XGuildRankDocument.m_RankRewardTable.Table.Length, false);
+ this.m_ScrollView.ResetPosition();
+ }
+
+ private void OnWrapContentUpdate(Transform t, int index)
+ {
+ GuildRankRewardTable.RowData rowData = XGuildRankDocument.m_RankRewardTable.Table[index];
+ IXUILabel ixuilabel = t.Find("Rank").GetComponent("XUILabel") as IXUILabel;
+ IXUISprite ixuisprite = t.Find("IndexSprite").GetComponent("XUISprite") as IXUISprite;
+ bool flag = rowData.Rank[0] == rowData.Rank[1];
+ if (flag)
+ {
+ bool flag2 = rowData.Rank[0] <= 3u;
+ if (flag2)
+ {
+ ixuisprite.SetAlpha(1f);
+ ixuilabel.Alpha = 0f;
+ ixuisprite.SetSprite(XSingleton<XCommon>.singleton.StringCombine("N", rowData.Rank[0].ToString()));
+ }
+ else
+ {
+ ixuisprite.SetAlpha(0f);
+ ixuilabel.Alpha = 1f;
+ ixuilabel.SetText(XStringDefineProxy.GetString("Qualifying_Rank_Reward_Desc1", new object[]
+ {
+ rowData.Rank[0]
+ }));
+ }
+ }
+ else
+ {
+ ixuisprite.SetAlpha(0f);
+ ixuilabel.Alpha = 1f;
+ ixuilabel.SetText(XStringDefineProxy.GetString("Qualifying_Rank_Reward_Desc4", new object[]
+ {
+ rowData.Rank[0],
+ rowData.Rank[1]
+ }));
+ }
+ this.SetRewardList(t.Find("Leader"), ref rowData.LeaderReward);
+ this.SetRewardList(t.Find("Officer"), ref rowData.OfficerRreward);
+ this.SetRewardList(t.Find("Member"), ref rowData.MemberReward);
+ }
+
+ private void SetRewardList(Transform t, ref SeqListRef<uint> rewards)
+ {
+ IXUIList ixuilist = t.GetComponent("XUIList") as IXUIList;
+ int i = 0;
+ int num = 3;
+ while (i < num)
+ {
+ Transform transform = t.Find(XSingleton<XCommon>.singleton.StringCombine("Item", i.ToString()));
+ bool flag = i < rewards.Count;
+ if (flag)
+ {
+ transform.gameObject.SetActive(true);
+ IXUISprite ixuisprite = transform.Find("Icon").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.ID = (ulong)rewards[i, 0];
+ XSingleton<XItemDrawerMgr>.singleton.normalItemDrawer.DrawItem(transform.gameObject, (int)rewards[i, 0], (int)rewards[i, 1], false);
+ ixuisprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnIconClick));
+ }
+ else
+ {
+ transform.gameObject.SetActive(false);
+ }
+ i++;
+ }
+ ixuilist.Refresh();
+ }
+
+ private void OnIconClick(IXUISprite spr)
+ {
+ XItem mainItem = XBagDocument.MakeXItem((int)spr.ID, false);
+ XSingleton<UiUtility>.singleton.ShowTooltipDialogWithSearchingCompare(mainItem, spr, false, 0u);
+ }
+
+ private void RefreshTitles()
+ {
+ this.m_MarkLabel.SetText(XStringDefineProxy.GetString("GUILD_RANK_MARK", new object[]
+ {
+ XSingleton<UiUtility>.singleton.TimeFormatSince1970((int)this._Doc.KeepTime, XStringDefineProxy.GetString("TIME_FORMAT_YYMMDD"), true)
+ }));
+ this.m_DescLabel.SetText(XStringDefineProxy.GetString("GUILD_RANK_DESC"));
+ }
+
+ private void CheckTime()
+ {
+ XSingleton<XTimerMgr>.singleton.KillTimer(this.m_timer);
+ bool flag = this._Doc.LastTime > 0;
+ if (flag)
+ {
+ XGuildRankDocument doc = this._Doc;
+ int lastTime = doc.LastTime;
+ doc.LastTime = lastTime - 1;
+ this.m_timer = XSingleton<XTimerMgr>.singleton.SetTimer(1f, new XTimerMgr.ElapsedEventHandler(this.DoTimer), null);
+ bool flag2 = this._Doc.LastTime >= 86400;
+ if (flag2)
+ {
+ this.m_TimeLabel.SetText(XStringDefineProxy.GetString("GUILD_RANK_TIME", new object[]
+ {
+ XSingleton<UiUtility>.singleton.TimeFormatSince1970((int)this._Doc.EndTime, XStringDefineProxy.GetString("TIME_FORMAT_YYMMDD"), true),
+ XStringDefineProxy.GetString("GUILD_QUALIFER_STYLE1", new object[]
+ {
+ XSingleton<UiUtility>.singleton.TimeDuarationFormatString(this._Doc.LastTime, 2)
+ })
+ }));
+ }
+ else
+ {
+ this.m_TimeLabel.SetText(XStringDefineProxy.GetString("GUILD_RANK_TIME", new object[]
+ {
+ XSingleton<UiUtility>.singleton.TimeFormatSince1970((int)this._Doc.EndTime, XStringDefineProxy.GetString("TIME_FORMAT_YYMMDD"), true),
+ XStringDefineProxy.GetString("GUILD_QUALIFER_STYLE1", new object[]
+ {
+ XSingleton<UiUtility>.singleton.TimeDuarationFormatString(this._Doc.LastTime, 5)
+ })
+ }));
+ }
+ }
+ else
+ {
+ this.m_TimeLabel.SetText(XStringDefineProxy.GetString("GUILD_RANK_TIME", new object[]
+ {
+ XSingleton<UiUtility>.singleton.TimeFormatSince1970((int)this._Doc.EndTime, XStringDefineProxy.GetString("TIME_FORMAT_YYMMDD"), true),
+ XStringDefineProxy.GetString("GUILD_QUALIFER_STYLE2")
+ }));
+ }
+ }
+
+ private void DoTimer(object o = null)
+ {
+ XSingleton<XTimerMgr>.singleton.KillTimer(this.m_timer);
+ this.CheckTime();
+ }
+
+ protected override void OnHide()
+ {
+ XSingleton<XTimerMgr>.singleton.KillTimer(this.m_timer);
+ base.OnHide();
+ }
+
+ public override void OnUnload()
+ {
+ XSingleton<XTimerMgr>.singleton.KillTimer(this.m_timer);
+ base.OnUnload();
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ this.m_ShowRank.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnShowRankClick));
+ this.m_JoinGuild.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnJoinGuild));
+ }
+
+ private bool OnShowRankClick(IXUIButton btn)
+ {
+ DlgBase<XRankView, XRankBehaviour>.singleton.ShowRank(XSysDefine.XSys_Rank_Guild);
+ return false;
+ }
+
+ private bool OnJoinGuild(IXUIButton btn)
+ {
+ bool flag = XSingleton<XGameSysMgr>.singleton.IsSystemOpened(XSysDefine.XSys_Guild);
+ if (flag)
+ {
+ XGuildDocument specificDocument = XDocuments.GetSpecificDocument<XGuildDocument>(XGuildDocument.uuID);
+ bool flag2 = specificDocument != null;
+ if (flag2)
+ {
+ specificDocument.TryShowGuildHallUI();
+ }
+ }
+ else
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString("GUILD_UNJION"), "fece00");
+ }
+ return true;
+ }
+
+ private void CheckInGuild()
+ {
+ XGuildDocument specificDocument = XDocuments.GetSpecificDocument<XGuildDocument>(XGuildDocument.uuID);
+ bool bInGuild = specificDocument.bInGuild;
+ if (bInGuild)
+ {
+ this.m_JoinGuild.SetVisible(false);
+ this.m_UnJoinLabel.SetVisible(false);
+ this.m_GuildRankLabel.SetVisible(true);
+ this.m_GuildRankLabel.SetText(this._Doc.RankIndex.ToString());
+ }
+ else
+ {
+ this.m_JoinGuild.SetVisible(true);
+ this.m_UnJoinLabel.SetVisible(true);
+ this.m_GuildRankLabel.SetVisible(false);
+ }
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/FirstPassGuindRankHandler.cs.meta b/Client/Assets/Scripts/XMainClient/UI/FirstPassGuindRankHandler.cs.meta
new file mode 100644
index 00000000..66b8a942
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/FirstPassGuindRankHandler.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: edb5dc5fb2a301d4d9819a09cb973d24
+timeCreated: 1611404792
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/FirstPassMainHandler.cs b/Client/Assets/Scripts/XMainClient/UI/FirstPassMainHandler.cs
new file mode 100644
index 00000000..1260c5b1
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/FirstPassMainHandler.cs
@@ -0,0 +1,391 @@
+using System;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class FirstPassMainHandler : DlgHandlerBase
+ {
+ private FirstPassDocument m_doc
+ {
+ get
+ {
+ return FirstPassDocument.Doc;
+ }
+ }
+
+ public FirstPassTeamInfoHandler TeamInfoHandler
+ {
+ get
+ {
+ return this.m_TeamInfoHandler;
+ }
+ }
+
+ protected override string FileName
+ {
+ get
+ {
+ return "OperatingActivity/FirstPassMain";
+ }
+ }
+
+ private IXUILabel m_tittle1Lab;
+
+ private IXUILabel m_tittle2Lab;
+
+ private IXUILabel m_myRankLab;
+
+ private IXUILabel m_itemTittleLab;
+
+ private IXUILabel m_goLab;
+
+ private IXUILabel m_tipsLab;
+
+ private IXUILabel m_timeLab;
+
+ private IXUIButton m_viewRewardBtn;
+
+ private IXUIButton m_topTeamInfoBtn;
+
+ private IXUIButton m_goBtn;
+
+ private IXUISprite m_leftSpr;
+
+ private IXUISprite m_rightSpr;
+
+ private IXUITexture m_bgTexture;
+
+ private GameObject m_getRewardRedDot;
+
+ private GameObject m_leftRedDot;
+
+ private GameObject m_rightRedDot;
+
+ private GameObject m_itemsGo;
+
+ private GameObject m_PariseRedDot;
+
+ private FirstPassTeamInfoHandler m_TeamInfoHandler;
+
+ private XUIPool m_ItemPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ protected override void Init()
+ {
+ base.Init();
+ this.m_doc.View = this;
+ this.m_leftSpr = (base.PanelObject.transform.Find("Arrow/Left").GetComponent("XUISprite") as IXUISprite);
+ this.m_rightSpr = (base.PanelObject.transform.Find("Arrow/Right").GetComponent("XUISprite") as IXUISprite);
+ this.m_leftRedDot = this.m_leftSpr.gameObject.transform.Find("RedPoint").gameObject;
+ this.m_rightRedDot = this.m_rightSpr.gameObject.transform.Find("RedPoint").gameObject;
+ Transform transform = base.PanelObject.transform.Find("Main/Tittles");
+ this.m_tittle1Lab = (transform.Find("Tittle1").GetComponent("XUILabel") as IXUILabel);
+ this.m_tittle2Lab = (transform.Find("Tittle2").GetComponent("XUILabel") as IXUILabel);
+ this.m_myRankLab = (transform.Find("MyRank").GetComponent("XUILabel") as IXUILabel);
+ this.m_tipsLab = (transform.Find("Tips").GetComponent("XUILabel") as IXUILabel);
+ transform = base.PanelObject.transform.Find("Main/Btns");
+ this.m_viewRewardBtn = (transform.Find("ViewRewardBtn").GetComponent("XUIButton") as IXUIButton);
+ this.m_topTeamInfoBtn = (transform.Find("TopTeamInfoBtn").GetComponent("XUIButton") as IXUIButton);
+ this.m_goBtn = (transform.Find("GoBtn").GetComponent("XUIButton") as IXUIButton);
+ this.m_goLab = (transform.Find("GoBtn/T").GetComponent("XUILabel") as IXUILabel);
+ this.m_getRewardRedDot = transform.Find("GoBtn/RedPoint").gameObject;
+ this.m_PariseRedDot = transform.Find("TopTeamInfoBtn/RedPoint").gameObject;
+ this.m_bgTexture = (base.PanelObject.transform.Find("Main/P").GetComponent("XUITexture") as IXUITexture);
+ transform = base.PanelObject.transform.Find("Main/Items");
+ this.m_itemsGo = transform.gameObject;
+ this.m_ItemPool.SetupPool(this.m_itemsGo, transform.Find("Item").gameObject, 2u, false);
+ this.m_itemTittleLab = (transform.Find("Tittle").GetComponent("XUILabel") as IXUILabel);
+ this.m_timeLab = (base.PanelObject.transform.Find("Main/TimeLab").GetComponent("XUILabel") as IXUILabel);
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ this.m_viewRewardBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnViewRewardClicked));
+ this.m_topTeamInfoBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnTopTeamInfoClicked));
+ this.m_goBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnGoClicked));
+ this.m_leftSpr.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnLeftClicked));
+ this.m_rightSpr.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnRightClicked));
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ this.m_doc.CurData = this.m_doc.AutoSelectFirstPassData;
+ this.FillBgTexture();
+ this.m_doc.ReqFirstPassInfo();
+ }
+
+ protected override void OnHide()
+ {
+ base.OnHide();
+ this.m_bgTexture.SetTexturePath("");
+ bool flag = this.m_TeamInfoHandler != null;
+ if (flag)
+ {
+ this.m_TeamInfoHandler.SetVisible(false);
+ }
+ }
+
+ public override void StackRefresh()
+ {
+ base.StackRefresh();
+ }
+
+ public override void OnUnload()
+ {
+ DlgHandlerBase.EnsureUnload<FirstPassTeamInfoHandler>(ref this.m_TeamInfoHandler);
+ base.OnUnload();
+ }
+
+ public void RefreshUI()
+ {
+ this.FillContent();
+ }
+
+ public void UiBackRefrsh()
+ {
+ this.FillBgTexture();
+ this.FillContent();
+ }
+
+ private void FillContent()
+ {
+ bool flag = this.m_doc.CurData == null;
+ if (!flag)
+ {
+ this.FillTime();
+ this.m_tittle1Lab.SetText(string.Format(XStringDefineProxy.GetString("FirstPassTips"), this.m_doc.CurData.FirstPassRow.Des));
+ string text = string.Format(XStringDefineProxy.GetString("CanGetReward"), this.m_doc.NeedPassTeamCount);
+ text = string.Format("{0}({1}/{2})", text, this.m_doc.CurData.PassTeamCount, this.m_doc.NeedPassTeamCount);
+ this.m_tittle2Lab.SetText(text);
+ bool flag2 = this.m_doc.CurData.CurRank == 0;
+ if (flag2)
+ {
+ text = XStringDefineProxy.GetString("NoPass");
+ }
+ else
+ {
+ text = string.Format(XStringDefineProxy.GetString("MyRank"), this.m_doc.CurData.CurRank);
+ }
+ this.m_myRankLab.SetText(text);
+ bool isHadReward = this.m_doc.CurData.IsHadReward;
+ if (isHadReward)
+ {
+ this.m_goLab.SetText(XStringDefineProxy.GetString("SRS_FETCH"));
+ this.m_getRewardRedDot.SetActive(true);
+ }
+ else
+ {
+ this.m_goLab.SetText(XStringDefineProxy.GetString("GoToBattle"));
+ this.m_getRewardRedDot.SetActive(false);
+ }
+ this.m_leftSpr.gameObject.SetActive(this.m_doc.IsHadLastData);
+ this.m_rightSpr.gameObject.SetActive(this.m_doc.IsHadNextData);
+ this.m_leftRedDot.SetActive(this.m_doc.MainArrowRedDot(ArrowDirection.Left));
+ this.m_rightRedDot.SetActive(this.m_doc.MainArrowRedDot(ArrowDirection.Right));
+ this.m_PariseRedDot.SetActive(this.m_doc.CurData.IsCanPrise);
+ bool flag3 = this.m_doc.CurData.PassTeamCount >= this.m_doc.NeedPassTeamCount;
+ if (flag3)
+ {
+ this.m_tipsLab.gameObject.SetActive(true);
+ this.m_tipsLab.SetText(XStringDefineProxy.GetString("RewardIsNone"));
+ this.m_itemsGo.SetActive(false);
+ }
+ else
+ {
+ this.m_tipsLab.gameObject.SetActive(false);
+ this.m_itemsGo.SetActive(true);
+ bool flag4 = !this.m_doc.CurData.IsHadReward;
+ if (flag4)
+ {
+ this.FileItems(this.m_doc.CurData.GetFirstPassReward(this.m_doc.CurData.PassTeamCount + 1));
+ }
+ else
+ {
+ this.FileItems(this.m_doc.CurData.GetFirstPassReward(this.m_doc.CurData.CurRank));
+ }
+ }
+ }
+ }
+
+ private void FillTime()
+ {
+ XExpeditionDocument specificDocument = XDocuments.GetSpecificDocument<XExpeditionDocument>(XExpeditionDocument.uuID);
+ bool flag = this.m_doc.CurData == null || this.m_doc.CurData.FirstPassRow == null || this.m_doc.CurData.FirstPassRow.SceneID.Length < 1;
+ if (!flag)
+ {
+ ExpeditionTable.RowData expeditionDataByID = specificDocument.GetExpeditionDataByID(this.m_doc.CurData.FirstPassRow.SceneID[0]);
+ bool flag2 = expeditionDataByID == null;
+ if (flag2)
+ {
+ this.m_timeLab.SetText("");
+ }
+ else
+ {
+ string text = "";
+ int num = (int)expeditionDataByID.ServerOpenTime[0];
+ int num2 = (int)expeditionDataByID.ServerOpenTime[1];
+ XActivityDocument doc = XActivityDocument.Doc;
+ uint severOpenSecond = doc.SeverOpenSecond;
+ bool flag3 = doc.ServerOpenDay < num;
+ if (flag3)
+ {
+ text = string.Format(XSingleton<XStringTable>.singleton.GetString("MulActivity_ServerOpenDay"), num - doc.ServerOpenDay);
+ }
+ else
+ {
+ bool flag4 = doc.ServerOpenDay == num;
+ if (flag4)
+ {
+ bool flag5 = severOpenSecond % 3600u == 0u;
+ uint num3;
+ if (flag5)
+ {
+ num3 = severOpenSecond / 3600u;
+ }
+ else
+ {
+ num3 = severOpenSecond / 3600u + 1u;
+ }
+ bool flag6 = (ulong)num3 < (ulong)((long)num2);
+ if (flag6)
+ {
+ text = string.Format("{0}{1}", (long)num2 - (long)((ulong)num3), XSingleton<XStringTable>.singleton.GetString("HOUR_DUARATION"));
+ text = string.Format(XSingleton<XStringTable>.singleton.GetString("ActivityOpenTime"), text);
+ }
+ else
+ {
+ bool flag7 = (ulong)num3 == (ulong)((long)num2);
+ if (flag7)
+ {
+ bool flag8 = severOpenSecond % 3600u < 60u;
+ if (flag8)
+ {
+ text = string.Format(XSingleton<XStringTable>.singleton.GetString("ActivityOpenTime"), XSingleton<XStringTable>.singleton.GetString("LessOneHour"));
+ }
+ }
+ }
+ }
+ }
+ this.m_timeLab.SetText(text);
+ }
+ }
+ }
+
+ private void FillBgTexture()
+ {
+ this.m_bgTexture.SetTexturePath("atlas/UI/common/Pic/" + this.m_doc.CurData.FirstPassRow.BgTexName);
+ }
+
+ private void FileItems(RewardAuxData data)
+ {
+ bool flag = data == null;
+ if (!flag)
+ {
+ bool flag2 = data.RankRang[1] == 1;
+ if (flag2)
+ {
+ this.m_itemTittleLab.SetText(XStringDefineProxy.GetString("FirstPassReward"));
+ }
+ else
+ {
+ this.m_itemTittleLab.SetText(string.Format(XStringDefineProxy.GetString("RankReward1"), data.RankRang[1]));
+ }
+ this.m_ItemPool.ReturnAll(false);
+ for (int i = 0; i < data.RewardDataList.Count; i++)
+ {
+ GameObject gameObject = this.m_ItemPool.FetchGameObject(false);
+ gameObject.transform.parent = this.m_itemsGo.transform;
+ gameObject.name = i.ToString();
+ gameObject.transform.localScale = Vector3.one;
+ gameObject.transform.localPosition = new Vector3((float)(this.m_ItemPool.TplWidth * i), 0f, 0f);
+ IXUISprite ixuisprite = gameObject.transform.Find("Icon").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.ID = (ulong)((long)data.RewardDataList[i].Id);
+ XSingleton<XItemDrawerMgr>.singleton.normalItemDrawer.DrawItem(gameObject, data.RewardDataList[i].Id, data.RewardDataList[i].Count, false);
+ ixuisprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(XSingleton<UiUtility>.singleton.OnItemClick));
+ }
+ }
+ }
+
+ private bool OnViewRewardClicked(IXUIButton sp)
+ {
+ DlgBase<FirstPassRewardView, FirstPassRewardBehaviour>.singleton.SetVisible(true, true);
+ return true;
+ }
+
+ private bool OnTopTeamInfoClicked(IXUIButton sp)
+ {
+ this.m_leftSpr.gameObject.SetActive(false);
+ this.m_rightSpr.gameObject.SetActive(false);
+ DlgHandlerBase.EnsureCreate<FirstPassTeamInfoHandler>(ref this.m_TeamInfoHandler, this.parent, true, this);
+ return true;
+ }
+
+ private bool OnGoClicked(IXUIButton sp)
+ {
+ bool flag = this.m_doc.CurData == null;
+ bool result;
+ if (flag)
+ {
+ result = true;
+ }
+ else
+ {
+ bool isHadReward = this.m_doc.CurData.IsHadReward;
+ if (isHadReward)
+ {
+ this.m_doc.ReqFirstPassReward(this.m_doc.CurData.Id);
+ }
+ else
+ {
+ bool flag2 = !XSingleton<XGameSysMgr>.singleton.IsSystemOpened((XSysDefine)this.m_doc.CurData.FirstPassRow.SystemId);
+ if (flag2)
+ {
+ int sysOpenServerDay = XSingleton<XGameSysMgr>.singleton.GetSysOpenServerDay(this.m_doc.CurData.FirstPassRow.SystemId);
+ XActivityDocument specificDocument = XDocuments.GetSpecificDocument<XActivityDocument>(XActivityDocument.uuID);
+ int serverOpenDay = specificDocument.ServerOpenDay;
+ int num = sysOpenServerDay - serverOpenDay;
+ bool flag3 = sysOpenServerDay == 0 || num <= 0;
+ if (flag3)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString("SYSTEM_NOT_OPEN"), "fece00");
+ }
+ else
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(string.Format(XStringDefineProxy.GetString("MulActivity_ServerOpenDay"), num), "fece00");
+ }
+ return true;
+ }
+ XSingleton<XGameSysMgr>.singleton.OpenSystem(this.m_doc.CurData.FirstPassRow.SystemId);
+ }
+ result = true;
+ }
+ return result;
+ }
+
+ private void OnLeftClicked(IXUISprite sp)
+ {
+ bool isHadLastData = this.m_doc.IsHadLastData;
+ if (isHadLastData)
+ {
+ this.m_doc.CurData = this.m_doc.GetLastFirstPassData();
+ this.FillBgTexture();
+ this.FillContent();
+ }
+ }
+
+ private void OnRightClicked(IXUISprite sp)
+ {
+ bool isHadNextData = this.m_doc.IsHadNextData;
+ if (isHadNextData)
+ {
+ this.m_doc.CurData = this.m_doc.GetNextFirstPassData();
+ this.FillBgTexture();
+ this.FillContent();
+ }
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/FirstPassMainHandler.cs.meta b/Client/Assets/Scripts/XMainClient/UI/FirstPassMainHandler.cs.meta
new file mode 100644
index 00000000..83a26604
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/FirstPassMainHandler.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 5d7a96e3d8f3e9d4fadff7e8f5d426eb
+timeCreated: 1611403806
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/FirstPassMwcxHandler.cs b/Client/Assets/Scripts/XMainClient/UI/FirstPassMwcxHandler.cs
new file mode 100644
index 00000000..11edbe7b
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/FirstPassMwcxHandler.cs
@@ -0,0 +1,25 @@
+using System;
+
+namespace XMainClient.UI
+{
+ internal class FirstPassMwcxHandler : DlgHandlerBase
+ {
+ protected override string FileName
+ {
+ get
+ {
+ return "OperatingActivity/FirstPassMwcx";
+ }
+ }
+
+ protected override void Init()
+ {
+ base.Init();
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/FirstPassMwcxHandler.cs.meta b/Client/Assets/Scripts/XMainClient/UI/FirstPassMwcxHandler.cs.meta
new file mode 100644
index 00000000..c22e2312
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/FirstPassMwcxHandler.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 0cc41d3e7fa61da47b751f15421df0fc
+timeCreated: 1611403175
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/FirstPassTeamInfoHandler.cs b/Client/Assets/Scripts/XMainClient/UI/FirstPassTeamInfoHandler.cs
new file mode 100644
index 00000000..309184cb
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/FirstPassTeamInfoHandler.cs
@@ -0,0 +1,412 @@
+using System;
+using System.Collections.Generic;
+using KKSG;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class FirstPassTeamInfoHandler : DlgHandlerBase
+ {
+ private FirstPassDocument m_doc
+ {
+ get
+ {
+ return FirstPassDocument.Doc;
+ }
+ }
+
+ protected override string FileName
+ {
+ get
+ {
+ return "OperatingActivity/FirstPassTeamInfo";
+ }
+ }
+
+ private IXUIButton m_returnBtn;
+
+ private IXUIButton m_rankBtn;
+
+ private IXUIButton m_priseBtn;
+
+ private IXUISprite m_leftSpr;
+
+ private IXUISprite m_rightSpr;
+
+ private IXUILabel m_tittleLab2;
+
+ private IXUILabel m_priseLab;
+
+ private IXUILabel m_starLab;
+
+ private GameObject m_starGo;
+
+ private GameObject m_leftRedDot;
+
+ private GameObject m_rightRedDot;
+
+ private GameObject m_fourPos;
+
+ private GameObject m_sixPos;
+
+ private GameObject m_tipsGo;
+
+ private GameObject m_redDotGo;
+
+ private GameObject m_priseGo2;
+
+ private List<GameObject> m_fourList;
+
+ private List<GameObject> m_sixList;
+
+ private XUIPool m_ItemPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ private float m_fCoolTime = 0.5f;
+
+ private float m_fLastClickBtnTime = 0f;
+
+ private IUIDummy[] m_Snapshots = new IUIDummy[FirstPassDocument.MaxAvata];
+
+ private XDummy[] m_dummys = new XDummy[FirstPassDocument.MaxAvata];
+
+ protected override void Init()
+ {
+ base.Init();
+ this.m_leftSpr = (base.PanelObject.transform.Find("Left").GetComponent("XUISprite") as IXUISprite);
+ this.m_rightSpr = (base.PanelObject.transform.Find("Right").GetComponent("XUISprite") as IXUISprite);
+ this.m_leftRedDot = this.m_leftSpr.gameObject.transform.Find("RedPoint").gameObject;
+ this.m_rightRedDot = this.m_rightSpr.gameObject.transform.Find("RedPoint").gameObject;
+ Transform transform = base.PanelObject.transform.Find("Btns");
+ this.m_returnBtn = (transform.Find("BackBtn").GetComponent("XUIButton") as IXUIButton);
+ this.m_rankBtn = (transform.Find("RankBtn").GetComponent("XUIButton") as IXUIButton);
+ this.m_priseBtn = (transform.Find("PaiseBtn").GetComponent("XUIButton") as IXUIButton);
+ this.m_priseGo2 = transform.Find("PaiseBtn2").gameObject;
+ this.m_priseLab = (transform.Find("PaiseBtn/T").GetComponent("XUILabel") as IXUILabel);
+ this.m_redDotGo = transform.Find("PaiseBtn/RedPoint").gameObject;
+ transform = base.PanelObject.transform.Find("Tittles");
+ this.m_tittleLab2 = (transform.Find("Tittle2").GetComponent("XUILabel") as IXUILabel);
+ this.m_tipsGo = base.PanelObject.transform.Find("Tips").gameObject;
+ this.m_starGo = transform.Find("Image").gameObject;
+ this.m_starLab = (this.m_starGo.transform.Find("Rank").GetComponent("XUILabel") as IXUILabel);
+ transform = base.PanelObject.transform.Find("Item");
+ this.m_ItemPool.SetupPool(transform.parent.gameObject, transform.gameObject, 4u, false);
+ this.m_fourList = new List<GameObject>();
+ transform = base.PanelObject.transform.Find("FourPos");
+ this.m_fourPos = transform.gameObject;
+ for (int i = 0; i < transform.childCount; i++)
+ {
+ this.m_fourList.Add(transform.GetChild(i).gameObject);
+ }
+ this.m_sixList = new List<GameObject>();
+ transform = base.PanelObject.transform.Find("SixPos");
+ this.m_sixPos = transform.gameObject;
+ for (int j = 0; j < transform.childCount; j++)
+ {
+ this.m_sixList.Add(transform.GetChild(j).gameObject);
+ }
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ this.m_returnBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnReturnClicked));
+ this.m_rankBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnRankClicked));
+ this.m_priseBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnPriseClicked));
+ this.m_leftSpr.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnLeftClicked));
+ this.m_rightSpr.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnRightClicked));
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ base.Alloc3DAvatarPool("FirstPassTeamInfoHandler", 1);
+ this.FillContent();
+ }
+
+ protected override void OnHide()
+ {
+ base.OnHide();
+ base.Return3DAvatarPool();
+ }
+
+ public override void StackRefresh()
+ {
+ base.StackRefresh();
+ base.Alloc3DAvatarPool("FirstPassTeamInfoHandler", 1);
+ }
+
+ public override void OnUnload()
+ {
+ base.Return3DAvatarPool();
+ base.OnUnload();
+ }
+
+ private void FillContent()
+ {
+ this.SetDefault();
+ this.m_leftSpr.gameObject.SetActive(this.m_doc.IsHadLastData);
+ this.m_rightSpr.gameObject.SetActive(this.m_doc.IsHadNextData);
+ this.m_doc.ReqFirstPassTopRoleInfo(this.m_doc.CurData.Id);
+ }
+
+ public void RefreshUI()
+ {
+ bool flag = this.m_doc.CurData.PassTeamCount == 0;
+ if (flag)
+ {
+ this.m_priseGo2.SetActive(false);
+ this.m_priseBtn.gameObject.SetActive(false);
+ }
+ else
+ {
+ bool flag2 = !this.m_doc.CurData.IsGivedPrise;
+ if (flag2)
+ {
+ this.m_priseBtn.gameObject.SetActive(true);
+ this.m_priseGo2.SetActive(false);
+ }
+ else
+ {
+ this.m_priseBtn.gameObject.SetActive(false);
+ this.m_priseGo2.SetActive(true);
+ }
+ }
+ this.RefreshArrowRedDot();
+ }
+
+ public void FillAvata()
+ {
+ this.RefreshUI();
+ bool flag = this.m_doc.CurData.TeamInfoList == null || this.m_doc.CurData.TeamInfoList.Count == 0;
+ if (flag)
+ {
+ this.SetDefault();
+ }
+ else
+ {
+ this.FillTopLab();
+ List<GameObject> list = null;
+ this.m_tipsGo.SetActive(false);
+ bool flag2 = this.m_doc.CurData.TeamInfoList.Count <= 4;
+ if (flag2)
+ {
+ this.m_fourPos.SetActive(true);
+ this.m_sixPos.SetActive(false);
+ list = this.m_fourList;
+ }
+ else
+ {
+ bool flag3 = this.m_doc.CurData.TeamInfoList.Count <= 6;
+ if (flag3)
+ {
+ this.m_fourPos.SetActive(false);
+ this.m_sixPos.SetActive(true);
+ list = this.m_sixList;
+ }
+ }
+ bool flag4 = list == null;
+ if (!flag4)
+ {
+ this.m_ItemPool.ReturnAll(false);
+ for (int i = 0; i < this.m_doc.CurData.TeamInfoList.Count; i++)
+ {
+ UnitAppearance unitAppearance = this.m_doc.CurData.TeamInfoList[i];
+ GameObject gameObject = this.m_ItemPool.FetchGameObject(false);
+ gameObject.transform.parent = list[i].transform;
+ gameObject.transform.localScale = Vector3.one;
+ gameObject.transform.localPosition = Vector3.zero;
+ IXUILabel ixuilabel = gameObject.transform.Find("Name/Lab").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel.SetText(unitAppearance.unitName);
+ IXUISprite ixuisprite = gameObject.transform.Find("Name/Icon").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.SetSprite(XSingleton<XProfessionSkillMgr>.singleton.GetProfIcon((int)(unitAppearance.unitType % 10u)));
+ ixuilabel = (gameObject.transform.Find("GuildName/Lab").GetComponent("XUILabel") as IXUILabel);
+ ixuilabel.SetText((unitAppearance.outlook != null && unitAppearance.outlook.guild != null) ? unitAppearance.outlook.guild.name : "");
+ ixuisprite = (gameObject.transform.Find("GuildName/Icon").GetComponent("XUISprite") as IXUISprite);
+ ixuisprite.SetSprite((unitAppearance.outlook != null && unitAppearance.outlook.guild != null) ? unitAppearance.outlook.guild.icon.ToString() : "");
+ this.m_Snapshots[i] = (gameObject.transform.Find("Snapshot").GetComponent("UIDummy") as IUIDummy);
+ ixuisprite = (gameObject.transform.Find("Box").GetComponent("XUISprite") as IXUISprite);
+ ixuisprite.ID = unitAppearance.uID;
+ ixuisprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnClickavata));
+ }
+ int j = this.m_doc.CurData.TeamInfoList.Count;
+ int num = this.m_Snapshots.Length;
+ while (j < num)
+ {
+ this.m_Snapshots[j] = null;
+ j++;
+ }
+ this.RefreshAvataData();
+ }
+ }
+ }
+
+ private void SetDefault()
+ {
+ this.m_starGo.SetActive(false);
+ this.m_tittleLab2.SetText("");
+ this.m_fourPos.SetActive(false);
+ this.m_sixPos.SetActive(false);
+ this.m_tipsGo.SetActive(true);
+ }
+
+ private void FillTopLab()
+ {
+ bool flag = this.m_doc.CurData == null;
+ if (!flag)
+ {
+ bool flag2 = this.m_doc.CurData.PassTimeStr != string.Empty;
+ if (flag2)
+ {
+ this.m_tittleLab2.SetText(string.Format("{0}{1}", this.m_doc.CurData.PassTimeStr, this.m_doc.CurData.SceneName));
+ }
+ else
+ {
+ this.m_tittleLab2.SetText("");
+ }
+ bool flag3 = this.m_doc.CurData.Star == -1;
+ if (flag3)
+ {
+ this.m_starGo.SetActive(false);
+ }
+ else
+ {
+ this.m_starGo.SetActive(true);
+ this.m_starLab.SetText(this.m_doc.CurData.Star.ToString());
+ }
+ }
+ }
+
+ private void RefreshArrowRedDot()
+ {
+ this.m_leftRedDot.SetActive(this.m_doc.InfoArrowRedDot(ArrowDirection.Left));
+ this.m_rightRedDot.SetActive(this.m_doc.InfoArrowRedDot(ArrowDirection.Right));
+ }
+
+ private void RefreshAvataData()
+ {
+ int num = 0;
+ while (num < this.m_doc.CurData.TeamInfoList.Count && num < FirstPassDocument.MaxAvata)
+ {
+ bool flag = this.m_Snapshots[num] != null;
+ if (flag)
+ {
+ this.m_dummys[num] = XSingleton<X3DAvatarMgr>.singleton.CreateCommonRoleDummy(this.m_dummPool, this.m_doc.CurData.TeamInfoList[num], this.m_Snapshots[num], this.m_dummys[num]);
+ }
+ num++;
+ }
+ }
+
+ private bool OnReturnClicked(IXUIButton sp)
+ {
+ base.SetVisible(false);
+ bool flag = this.m_doc.View != null;
+ if (flag)
+ {
+ this.m_doc.View.UiBackRefrsh();
+ }
+ return true;
+ }
+
+ private bool OnRankClicked(IXUIButton sp)
+ {
+ bool flag = this.SetButtonCool(this.m_fCoolTime);
+ bool result;
+ if (flag)
+ {
+ result = true;
+ }
+ else
+ {
+ DlgBase<FirstPassRankView, FitstpassRankBehaviour>.singleton.SetVisible(true, true);
+ result = true;
+ }
+ return result;
+ }
+
+ private bool OnPriseClicked(IXUIButton sp)
+ {
+ bool flag = this.SetButtonCool(this.m_fCoolTime);
+ bool result;
+ if (flag)
+ {
+ result = true;
+ }
+ else
+ {
+ bool flag2 = this.m_doc.CurData == null;
+ if (flag2)
+ {
+ result = true;
+ }
+ else
+ {
+ bool isCanPrise = this.m_doc.CurData.IsCanPrise;
+ if (isCanPrise)
+ {
+ this.m_doc.ReqCommendFirstPass(this.m_doc.CurData.Id);
+ }
+ result = true;
+ }
+ }
+ return result;
+ }
+
+ private void OnLeftClicked(IXUISprite sp)
+ {
+ bool flag = this.SetButtonCool(this.m_fCoolTime);
+ if (!flag)
+ {
+ bool isHadLastData = this.m_doc.IsHadLastData;
+ if (isHadLastData)
+ {
+ this.m_doc.CurData = this.m_doc.GetLastFirstPassData();
+ this.FillContent();
+ }
+ }
+ }
+
+ private void OnRightClicked(IXUISprite sp)
+ {
+ bool flag = this.SetButtonCool(this.m_fCoolTime);
+ if (!flag)
+ {
+ bool isHadNextData = this.m_doc.IsHadNextData;
+ if (isHadNextData)
+ {
+ this.m_doc.CurData = this.m_doc.GetNextFirstPassData();
+ this.FillContent();
+ }
+ }
+ }
+
+ private bool SetButtonCool(float time)
+ {
+ float num = Time.realtimeSinceStartup - this.m_fLastClickBtnTime;
+ bool flag = num < time;
+ bool result;
+ if (flag)
+ {
+ result = true;
+ }
+ else
+ {
+ this.m_fLastClickBtnTime = Time.realtimeSinceStartup;
+ result = false;
+ }
+ return result;
+ }
+
+ private void OnClickavata(IXUISprite sp)
+ {
+ bool flag = sp == null;
+ if (!flag)
+ {
+ ulong id = sp.ID;
+ XCharacterCommonMenuDocument.ReqCharacterMenuInfo(id, false);
+ }
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/FirstPassTeamInfoHandler.cs.meta b/Client/Assets/Scripts/XMainClient/UI/FirstPassTeamInfoHandler.cs.meta
new file mode 100644
index 00000000..dcbe3bff
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/FirstPassTeamInfoHandler.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 8de90214e1d2e2b4e83b0f509a0d1863
+timeCreated: 1611404106
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/FlowerActivityHandler.cs b/Client/Assets/Scripts/XMainClient/UI/FlowerActivityHandler.cs
new file mode 100644
index 00000000..ffbe4f6a
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/FlowerActivityHandler.cs
@@ -0,0 +1,82 @@
+using System;
+using UILib;
+using UnityEngine;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class FlowerActivityHandler : DlgHandlerBase
+ {
+ protected override string FileName
+ {
+ get
+ {
+ return "OperatingActivity/FlowerActivityFrame";
+ }
+ }
+
+ private IXUILabel m_Tip1;
+
+ private IXUILabel m_Tip2;
+
+ private IXUILabel m_AwardRankCount;
+
+ private IXUIButton m_GoWeekRank;
+
+ private Transform m_AwardRoot;
+
+ private XUIPool m_ItemPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ protected override void Init()
+ {
+ base.Init();
+ this.m_Tip1 = (base.PanelObject.transform.Find("Main/Tip1").GetComponent("XUILabel") as IXUILabel);
+ this.m_Tip2 = (base.PanelObject.transform.Find("Main/Tip2").GetComponent("XUILabel") as IXUILabel);
+ this.m_AwardRankCount = (base.PanelObject.transform.Find("Main/Items/RankNum").GetComponent("XUILabel") as IXUILabel);
+ this.m_GoWeekRank = (base.PanelObject.transform.Find("Main/Btns/ViewRewardBtn").GetComponent("XUIButton") as IXUIButton);
+ this.m_AwardRoot = base.PanelObject.transform.Find("Main/Items");
+ GameObject gameObject = base.PanelObject.transform.Find("Main/Items/Item").gameObject;
+ this.m_ItemPool.SetupPool(this.m_AwardRoot.gameObject, gameObject, 7u, false);
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ this.m_Tip1.SetText(XSingleton<XStringTable>.singleton.GetString("FLOWER_ACTIVITY_TIP1"));
+ this.m_Tip2.SetText(XSingleton<XStringTable>.singleton.GetString("FLOWER_ACTIVITY_TIP3"));
+ this.m_AwardRankCount.SetText(XSingleton<XStringTable>.singleton.GetString("FLOWER_ACTIVITY_AWARD_RANK"));
+ this.SetAwardsInfo();
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ this.m_GoWeekRank.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnGoWeekRankClicked));
+ }
+
+ private bool OnGoWeekRankClicked(IXUIButton btn)
+ {
+ XSingleton<XGameSysMgr>.singleton.OpenSystem(XSysDefine.XSys_Flower_Rank_Week, 0UL);
+ return true;
+ }
+
+ private void SetAwardsInfo()
+ {
+ XFlowerRankDocument specificDocument = XDocuments.GetSpecificDocument<XFlowerRankDocument>(XFlowerRankDocument.uuID);
+ SeqListRef<int> weekRankAward = specificDocument.GetWeekRankAward(1);
+ this.m_ItemPool.ReturnAll(false);
+ for (int i = 0; i < weekRankAward.Count; i++)
+ {
+ GameObject gameObject = this.m_ItemPool.FetchGameObject(false);
+ gameObject.transform.parent = this.m_AwardRoot;
+ gameObject.name = i.ToString();
+ gameObject.transform.localScale = Vector3.one;
+ gameObject.transform.localPosition = new Vector3((float)(this.m_ItemPool.TplWidth * i), 0f, 0f);
+ IXUISprite ixuisprite = gameObject.transform.Find("Icon").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.ID = (ulong)((long)weekRankAward[i, 0]);
+ XSingleton<XItemDrawerMgr>.singleton.normalItemDrawer.DrawItem(gameObject, weekRankAward[i, 0], weekRankAward[i, 1], false);
+ ixuisprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(XSingleton<UiUtility>.singleton.OnItemClick));
+ }
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/FlowerActivityHandler.cs.meta b/Client/Assets/Scripts/XMainClient/UI/FlowerActivityHandler.cs.meta
new file mode 100644
index 00000000..0983b81b
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/FlowerActivityHandler.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 1bf8dcefa7b2e6d4e8801cccd25ebf9f
+timeCreated: 1611403341
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/ForgeAttrPreViewHandler.cs b/Client/Assets/Scripts/XMainClient/UI/ForgeAttrPreViewHandler.cs
new file mode 100644
index 00000000..255de326
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/ForgeAttrPreViewHandler.cs
@@ -0,0 +1,141 @@
+using System;
+using System.Collections.Generic;
+using UILib;
+using UnityEngine;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class ForgeAttrPreViewHandler : DlgHandlerBase
+ {
+ private XForgeDocument m_doc;
+
+ private IXUISprite m_closeBtn;
+
+ private IXUIScrollView m_scrollView;
+
+ private GameObject m_detailGo;
+
+ private GameObject m_WithoutAttrGo;
+
+ private GameObject m_WithAttrGo;
+
+ private XUIPool m_itemPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ protected override void Init()
+ {
+ base.Init();
+ this.m_doc = XForgeDocument.Doc;
+ this.m_closeBtn = (base.PanelObject.transform.Find("Close").GetComponent("XUISprite") as IXUISprite);
+ this.m_scrollView = (base.PanelObject.transform.Find("Detail").GetComponent("XUIScrollView") as IXUIScrollView);
+ this.m_detailGo = base.PanelObject.transform.Find("Detail").gameObject;
+ this.m_itemPool.SetupPool(base.PanelObject, base.PanelObject.transform.Find("Tpl").gameObject, 3u, true);
+ this.m_WithoutAttrGo = base.PanelObject.transform.Find("Withoutattr").gameObject;
+ this.m_WithAttrGo = base.PanelObject.transform.Find("Withattr").gameObject;
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ this.m_closeBtn.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnCloseClicked));
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ this.FillContent();
+ }
+
+ protected override void OnHide()
+ {
+ this.m_itemPool.ReturnAll(false);
+ base.OnHide();
+ }
+
+ public override void OnUnload()
+ {
+ this.m_doc.View = null;
+ base.OnUnload();
+ }
+
+ private void FillContent()
+ {
+ this.m_itemPool.ReturnAll(true);
+ XItem itemByUID = XBagDocument.BagDoc.GetItemByUID(this.m_doc.CurUid);
+ bool flag = itemByUID == null;
+ if (!flag)
+ {
+ XEquipItem xequipItem = itemByUID as XEquipItem;
+ bool flag2 = xequipItem.forgeAttrInfo.ForgeAttr.Count == 0;
+ if (flag2)
+ {
+ this.m_WithoutAttrGo.SetActive(true);
+ this.m_WithAttrGo.SetActive(false);
+ }
+ else
+ {
+ this.m_WithoutAttrGo.SetActive(false);
+ this.m_WithAttrGo.SetActive(true);
+ }
+ EquipSlotAttrDatas attrData = XForgeDocument.ForgeAttrMgr.GetAttrData((uint)itemByUID.itemID);
+ bool flag3 = attrData == null;
+ if (!flag3)
+ {
+ EquipSlotAttrData attrData2 = attrData.GetAttrData(1);
+ bool flag4 = attrData2 == null;
+ if (!flag4)
+ {
+ int num = 0;
+ for (int i = 0; i < attrData2.AttrDataList.Count; i++)
+ {
+ EquipAttrData equipAttrData = attrData2.AttrDataList[i];
+ bool flag5 = equipAttrData.Prob == 0u;
+ if (!flag5)
+ {
+ string text = XAttributeCommon.GetAttrStr((int)equipAttrData.AttrId);
+ bool flag6 = XSingleton<XAttributeMgr>.singleton.XPlayerData != null;
+ if (flag6)
+ {
+ ProfessionTable.RowData byProfID = XSingleton<XEntityMgr>.singleton.RoleInfo.GetByProfID(XSingleton<XAttributeMgr>.singleton.XPlayerData.BasicTypeID);
+ bool flag7 = byProfID != null;
+ if (flag7)
+ {
+ List<int> list;
+ bool flag8 = this.m_doc.AttackTypeDic.TryGetValue((int)byProfID.AttackType, out list);
+ if (flag8)
+ {
+ for (int j = 0; j < list.Count; j++)
+ {
+ bool flag9 = (long)list[j] == (long)((ulong)equipAttrData.AttrId);
+ if (flag9)
+ {
+ text = string.Empty;
+ break;
+ }
+ }
+ }
+ }
+ }
+ bool flag10 = text == string.Empty;
+ if (!flag10)
+ {
+ GameObject gameObject = this.m_itemPool.FetchGameObject(false);
+ gameObject.transform.parent = this.m_detailGo.transform;
+ gameObject.transform.localPosition = this.m_itemPool.TplPos + new Vector3((float)(this.m_itemPool.TplWidth * (num % 2)), (float)(-(float)this.m_itemPool.TplHeight * (num / 2)), 0f);
+ IXUILabel ixuilabel = gameObject.transform.Find("AttrName").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel.SetText(text);
+ num++;
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+
+ private void OnCloseClicked(IXUISprite spr)
+ {
+ base.SetVisible(false);
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/ForgeAttrPreViewHandler.cs.meta b/Client/Assets/Scripts/XMainClient/UI/ForgeAttrPreViewHandler.cs.meta
new file mode 100644
index 00000000..2e6d47dc
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/ForgeAttrPreViewHandler.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: c4679cdc789ec4e478b99eb29eb7fcbd
+timeCreated: 1611404501
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/ForgeMainHandler.cs b/Client/Assets/Scripts/XMainClient/UI/ForgeMainHandler.cs
new file mode 100644
index 00000000..c2b0c9d8
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/ForgeMainHandler.cs
@@ -0,0 +1,766 @@
+using System;
+using KKSG;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class ForgeMainHandler : DlgHandlerBase
+ {
+ public ForgeSuccessHandler ForgeSuccessHandler
+ {
+ get
+ {
+ return this.m_forgeSuccessHandler;
+ }
+ }
+
+ public ForgeReplaceHandler ForgeReplaceHandler
+ {
+ get
+ {
+ return this.m_forgeReplaceHandler;
+ }
+ }
+
+ protected override string FileName
+ {
+ get
+ {
+ return "ItemNew/ForgeMainHandler";
+ }
+ }
+
+ public string ForgeSucPath
+ {
+ get
+ {
+ bool flag = string.IsNullOrEmpty(this.m_forgeSucPath);
+ if (flag)
+ {
+ this.m_forgeSucPath = XSingleton<XGlobalConfig>.singleton.GetValue("ForgeSucEffectPath");
+ }
+ return this.m_forgeSucPath;
+ }
+ }
+
+ public string ForgeLostPath
+ {
+ get
+ {
+ bool flag = string.IsNullOrEmpty(this.m_forgeLostPath);
+ if (flag)
+ {
+ this.m_forgeLostPath = XSingleton<XGlobalConfig>.singleton.GetValue("ForgeLostEffectPath");
+ }
+ return this.m_forgeLostPath;
+ }
+ }
+
+ private XForgeDocument m_doc;
+
+ private bool m_bIsPlayingEffect = false;
+
+ private float m_delayTime = 0.5f;
+
+ private float m_fLastClickBtnTime = 0f;
+
+ private uint m_effectToken = 0u;
+
+ private bool m_bStoneIsEnough = false;
+
+ private bool m_bMetailIsEnough = false;
+
+ private XFx m_ForgeSucceedEffect;
+
+ private XFx m_ForgeLostEffect;
+
+ private IXUIButton m_closeBtn;
+
+ private IXUIButton m_detailBtn;
+
+ private IXUIButton m_forgeBtn;
+
+ private IXUIButton m_helpBtn;
+
+ private IXUISprite m_checkBoxSpr;
+
+ private IXUILabel m_rateLab;
+
+ private IXUILabel m_attrValueLab;
+
+ private IXUILabel m_tipsLab;
+
+ private IXUILabel m_tipsLab1;
+
+ private IXUILabel m_emptyLab;
+
+ private IXUILabel m_refreshLab;
+
+ private GameObject m_attrGo;
+
+ private GameObject m_popGo;
+
+ private GameObject m_resultNewGo;
+
+ private GameObject m_topItemGo;
+
+ private GameObject m_redefinStoneGo;
+
+ private Transform m_effectsTra;
+
+ private XUIPool m_needItemPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ private ForgeAttrPreViewHandler m_forgeAttrPreviewHandler;
+
+ private ForgeSuccessHandler m_forgeSuccessHandler;
+
+ private ForgeReplaceHandler m_forgeReplaceHandler;
+
+ private int m_lessItemId = 0;
+
+ private int m_lessStoneId = 0;
+
+ private string m_forgeSucPath = string.Empty;
+
+ private string m_forgeLostPath = string.Empty;
+
+ protected override void Init()
+ {
+ base.Init();
+ this.m_doc = XForgeDocument.Doc;
+ this.m_doc.View = this;
+ this.m_closeBtn = (base.PanelObject.transform.Find("Close").GetComponent("XUIButton") as IXUIButton);
+ this.m_detailBtn = (base.PanelObject.transform.Find("DetailBtn").GetComponent("XUIButton") as IXUIButton);
+ this.m_forgeBtn = (base.PanelObject.transform.Find("ForgeBtn").GetComponent("XUIButton") as IXUIButton);
+ this.m_helpBtn = (base.PanelObject.transform.Find("Tittle/Help").GetComponent("XUIButton") as IXUIButton);
+ this.m_attrGo = base.PanelObject.transform.Find("Attr").gameObject;
+ this.m_popGo = base.PanelObject.transform.Find("Pop").gameObject;
+ this.m_resultNewGo = base.PanelObject.transform.Find("ResultNew").gameObject;
+ this.m_topItemGo = base.PanelObject.transform.Find("Top").gameObject;
+ this.m_effectsTra = base.PanelObject.transform.Find("Effect");
+ Transform transform = base.PanelObject.transform.Find("Special");
+ this.m_checkBoxSpr = (transform.Find("Toggle").GetComponent("XUISprite") as IXUISprite);
+ this.m_tipsLab = (transform.Find("Tips").GetComponent("XUILabel") as IXUILabel);
+ this.m_redefinStoneGo = transform.Find("DaZaoShi").gameObject;
+ transform = base.PanelObject.transform.Find("Result");
+ this.m_refreshLab = (transform.Find("RefreshLab").GetComponent("XUILabel") as IXUILabel);
+ this.m_rateLab = (transform.Find("RateLab").GetComponent("XUILabel") as IXUILabel);
+ transform = transform.Find("AttrItem");
+ this.m_attrValueLab = (transform.Find("NowValue").GetComponent("XUILabel") as IXUILabel);
+ this.m_emptyLab = (transform.Find("Empty").GetComponent("XUILabel") as IXUILabel);
+ transform = base.PanelObject.transform.Find("Bottom");
+ this.m_tipsLab1 = (transform.Find("Tips1").GetComponent("XUILabel") as IXUILabel);
+ transform = transform.Find("Items");
+ this.m_needItemPool.SetupPool(transform.gameObject, transform.Find("Item").gameObject, 2u, true);
+ DlgHandlerBase.EnsureCreate<ForgeAttrPreViewHandler>(ref this.m_forgeAttrPreviewHandler, this.m_attrGo, null, false);
+ DlgHandlerBase.EnsureCreate<ForgeSuccessHandler>(ref this.m_forgeSuccessHandler, this.m_popGo, null, false);
+ DlgHandlerBase.EnsureCreate<ForgeReplaceHandler>(ref this.m_forgeReplaceHandler, this.m_resultNewGo, null, false);
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ this.m_closeBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnCloseClicked));
+ this.m_forgeBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnClickForge));
+ this.m_detailBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnClickDetail));
+ this.m_helpBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnHelpClicked));
+ this.m_checkBoxSpr.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnClickToggle));
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ this.RefreshData();
+ }
+
+ protected override void OnHide()
+ {
+ this.m_doc.Clear();
+ this.DeActiveEffect();
+ this.m_bIsPlayingEffect = false;
+ XSingleton<XTimerMgr>.singleton.KillTimer(this.m_effectToken);
+ DlgBase<ItemSystemDlg, TabDlgBehaviour>.singleton.OnPopHandlerSetVisible(false, null);
+ DlgBase<ItemSystemDlg, TabDlgBehaviour>.singleton.StackRefresh();
+ bool flag = DlgBase<ItemSystemDlg, TabDlgBehaviour>.singleton._equipHandler != null;
+ if (flag)
+ {
+ DlgBase<ItemSystemDlg, TabDlgBehaviour>.singleton._equipHandler.SelectEquip(0UL);
+ DlgBase<ItemSystemDlg, TabDlgBehaviour>.singleton._equipHandler.RegisterItemClickEvents(null);
+ }
+ base.OnHide();
+ }
+
+ public override void OnUnload()
+ {
+ this.m_doc.View = null;
+ bool flag = this.m_forgeAttrPreviewHandler != null;
+ if (flag)
+ {
+ DlgHandlerBase.EnsureUnload<ForgeAttrPreViewHandler>(ref this.m_forgeAttrPreviewHandler);
+ this.m_forgeAttrPreviewHandler = null;
+ }
+ bool flag2 = this.m_forgeSuccessHandler != null;
+ if (flag2)
+ {
+ DlgHandlerBase.EnsureUnload<ForgeSuccessHandler>(ref this.m_forgeSuccessHandler);
+ this.m_forgeSuccessHandler = null;
+ }
+ bool flag3 = this.m_forgeReplaceHandler != null;
+ if (flag3)
+ {
+ DlgHandlerBase.EnsureUnload<ForgeReplaceHandler>(ref this.m_forgeReplaceHandler);
+ this.m_forgeReplaceHandler = null;
+ }
+ bool flag4 = this.m_ForgeSucceedEffect != null;
+ if (flag4)
+ {
+ XSingleton<XFxMgr>.singleton.DestroyFx(this.m_ForgeSucceedEffect, true);
+ this.m_ForgeSucceedEffect = null;
+ }
+ bool flag5 = this.m_ForgeLostEffect != null;
+ if (flag5)
+ {
+ XSingleton<XFxMgr>.singleton.DestroyFx(this.m_ForgeLostEffect, true);
+ this.m_ForgeLostEffect = null;
+ }
+ base.OnUnload();
+ }
+
+ public override void RefreshData()
+ {
+ base.RefreshData();
+ this.DeActiveEffect();
+ GameObject gameObject = this.m_checkBoxSpr.transform.Find("selected").gameObject;
+ bool flag = !this.m_doc.IsUsedStone;
+ if (flag)
+ {
+ this.m_checkBoxSpr.ID = 0UL;
+ gameObject.SetActive(false);
+ }
+ else
+ {
+ this.m_checkBoxSpr.ID = 1UL;
+ gameObject.SetActive(true);
+ }
+ bool flag2 = DlgBase<ItemSystemDlg, TabDlgBehaviour>.singleton._equipHandler != null;
+ if (flag2)
+ {
+ DlgBase<ItemSystemDlg, TabDlgBehaviour>.singleton._equipHandler.RegisterItemClickEvents(new SpriteClickEventHandler(this.OnEquipClicked));
+ }
+ this.FillContent();
+ }
+
+ public override void StackRefresh()
+ {
+ this.RefreshData();
+ base.StackRefresh();
+ }
+
+ public void ShowUI()
+ {
+ this.FillContent();
+ }
+
+ public void ShowEffect(bool isSucceed)
+ {
+ this.DeActiveEffect();
+ if (isSucceed)
+ {
+ this.PlayForgeSucceedEffect();
+ }
+ else
+ {
+ this.PlayForgeLostEffect();
+ }
+ }
+
+ public void ShowReplaceHandler()
+ {
+ bool flag = this.m_forgeReplaceHandler != null && !this.m_forgeReplaceHandler.IsVisible();
+ if (flag)
+ {
+ this.m_forgeReplaceHandler.SetVisible(true);
+ }
+ }
+
+ private void FillContent()
+ {
+ this.m_tipsLab1.SetText(XSingleton<XStringTable>.singleton.GetString("ForgeTips1"));
+ this.m_emptyLab.SetText(XSingleton<XStringTable>.singleton.GetString("NoForgeAttr"));
+ bool flag = this.m_doc.EquipRow == null;
+ if (flag)
+ {
+ this.m_tipsLab.SetText(string.Format(XSingleton<XStringTable>.singleton.GetString("ForgeTips"), this.m_doc.EquipRow.ForgeHighRate));
+ }
+ else
+ {
+ this.m_tipsLab.SetText(string.Format(XSingleton<XStringTable>.singleton.GetString("ForgeTips"), 100));
+ }
+ XItem itemByUID = XBagDocument.BagDoc.GetItemByUID(this.m_doc.CurUid);
+ bool flag2 = itemByUID == null;
+ if (!flag2)
+ {
+ XSingleton<XItemDrawerMgr>.singleton.DrawItem(this.m_topItemGo, itemByUID);
+ IXUISprite ixuisprite = this.m_topItemGo.transform.Find("Icon").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.ID = this.m_doc.CurUid;
+ ixuisprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnSelectedHadItemClicked));
+ XEquipItem xequipItem = itemByUID as XEquipItem;
+ this.FillAttribute(xequipItem);
+ this.SetSelectStatus();
+ this.RefreshOnSelectRedfinStone();
+ this.FillNeedItem();
+ bool flag3 = xequipItem.forgeAttrInfo.UnSavedAttrid != 0u && xequipItem.forgeAttrInfo.ForgeAttr.Count > 0;
+ if (flag3)
+ {
+ this.ShowReplaceHandler();
+ }
+ }
+ }
+
+ private void FillAttribute(XEquipItem item)
+ {
+ bool flag = item.forgeAttrInfo.ForgeAttr.Count == 0;
+ if (flag)
+ {
+ this.m_emptyLab.gameObject.SetActive(true);
+ this.m_attrValueLab.gameObject.SetActive(false);
+ }
+ else
+ {
+ this.m_emptyLab.gameObject.SetActive(false);
+ this.m_attrValueLab.gameObject.SetActive(true);
+ EquipSlotAttrDatas attrData = XForgeDocument.ForgeAttrMgr.GetAttrData((uint)item.itemID);
+ bool flag2 = attrData == null;
+ if (!flag2)
+ {
+ string color = attrData.GetColor(1, item.forgeAttrInfo.ForgeAttr[0]);
+ string arg = string.Format("[{0}]{1}[-]", color, XAttributeCommon.GetAttrStr((int)item.forgeAttrInfo.ForgeAttr[0].AttrID));
+ string arg2 = string.Format("[{0}]{1}[-]", color, item.forgeAttrInfo.ForgeAttr[0].AttrValue);
+ this.m_attrValueLab.SetText(string.Format("{0} {1}", arg, arg2));
+ }
+ }
+ }
+
+ private void FillNeedItem()
+ {
+ bool flag = this.m_doc.EquipRow == null;
+ if (flag)
+ {
+ XSingleton<XDebug>.singleton.AddErrorLog("m_doc.EquipRow is null", null, null, null, null, null);
+ }
+ else
+ {
+ XItem itemByUID = XBagDocument.BagDoc.GetItemByUID(this.m_doc.CurUid);
+ bool flag2 = itemByUID == null;
+ if (!flag2)
+ {
+ this.m_needItemPool.ReturnAll(false);
+ this.m_bMetailIsEnough = true;
+ bool flag3 = (itemByUID as XEquipItem).forgeAttrInfo.ForgeAttr.Count == 0;
+ SeqListRef<uint> seqListRef;
+ if (flag3)
+ {
+ seqListRef = this.m_doc.EquipRow.ForgeNeedItem;
+ }
+ else
+ {
+ seqListRef = this.m_doc.EquipRow.ForgeNeedItemAfter;
+ }
+ for (int i = 0; i < (int)seqListRef.count; i++)
+ {
+ GameObject gameObject = this.m_needItemPool.FetchGameObject(false);
+ gameObject.transform.localPosition = this.m_needItemPool.TplPos + new Vector3((float)(i * this.m_needItemPool.TplWidth), 0f, 0f);
+ int num = (int)seqListRef[i, 0];
+ int num2 = (int)seqListRef[i, 1];
+ int num3 = (int)XBagDocument.BagDoc.GetItemCount(num);
+ XSingleton<XItemDrawerMgr>.singleton.normalItemDrawer.DrawItem(gameObject, num, num2, true);
+ IXUILabel ixuilabel = gameObject.transform.Find("Num").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel.gameObject.SetActive(true);
+ bool flag4 = num3 >= num2;
+ if (flag4)
+ {
+ ixuilabel.SetText(string.Format(XStringDefineProxy.GetString("COMMON_COUNT_TOTAL_ENOUGH_FMT"), num3, num2));
+ }
+ else
+ {
+ ixuilabel.SetText(string.Format(XStringDefineProxy.GetString("COMMON_COUNT_TOTAL_NOTENOUGH_FMT"), num3, num2));
+ }
+ IXUISprite ixuisprite = gameObject.transform.Find("Icon").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.ID = (ulong)((long)num);
+ bool flag5 = num2 > num3;
+ if (flag5)
+ {
+ bool bMetailIsEnough = this.m_bMetailIsEnough;
+ if (bMetailIsEnough)
+ {
+ this.m_lessItemId = num;
+ }
+ this.m_bMetailIsEnough = false;
+ ixuisprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnGetItemAccess));
+ }
+ else
+ {
+ ixuisprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnSelectedItemClicked));
+ }
+ }
+ }
+ }
+ }
+
+ private void SetSelectStatus()
+ {
+ bool isSelect = this.m_doc.IsSelect;
+ if (!isSelect)
+ {
+ bool flag = this.m_doc.EquipRow == null;
+ if (flag)
+ {
+ XSingleton<XDebug>.singleton.AddErrorLog("m_doc.EquipRow is null", null, null, null, null, null);
+ }
+ else
+ {
+ XItem itemByUID = XBagDocument.BagDoc.GetItemByUID(this.m_doc.CurUid);
+ bool flag2 = itemByUID == null;
+ if (!flag2)
+ {
+ int count = (itemByUID as XEquipItem).forgeAttrInfo.ForgeAttr.Count;
+ bool flag3 = count == 0;
+ SeqRef<uint> seqRef;
+ if (flag3)
+ {
+ seqRef = this.m_doc.EquipRow.ForgeSpecialItem;
+ }
+ else
+ {
+ seqRef = this.m_doc.EquipRow.ForgeSpecialItemAfter;
+ }
+ int itemid = (int)seqRef[0];
+ int num = (int)seqRef[1];
+ int num2 = (int)XBagDocument.BagDoc.GetItemCount(itemid);
+ bool flag4 = num2 < num;
+ if (flag4)
+ {
+ this.m_doc.IsUsedStone = false;
+ this.m_checkBoxSpr.ID = 0UL;
+ }
+ else
+ {
+ this.m_doc.IsUsedStone = true;
+ this.m_checkBoxSpr.ID = 1UL;
+ this.m_doc.IsSelect = true;
+ }
+ }
+ }
+ }
+ }
+
+ private void RefreshOnSelectRedfinStone()
+ {
+ bool flag = this.m_doc.EquipRow == null;
+ if (flag)
+ {
+ XSingleton<XDebug>.singleton.AddErrorLog("m_doc.EquipRow is null", null, null, null, null, null);
+ }
+ else
+ {
+ XItem itemByUID = XBagDocument.BagDoc.GetItemByUID(this.m_doc.CurUid);
+ bool flag2 = itemByUID == null;
+ if (!flag2)
+ {
+ int count = (itemByUID as XEquipItem).forgeAttrInfo.ForgeAttr.Count;
+ bool flag3 = count == 0;
+ SeqRef<uint> seqRef;
+ uint num;
+ uint num2;
+ if (flag3)
+ {
+ seqRef = this.m_doc.EquipRow.ForgeSpecialItem;
+ num = (uint)this.m_doc.EquipRow.ForgeLowRate;
+ num2 = (uint)this.m_doc.EquipRow.ForgeHighRate;
+ }
+ else
+ {
+ seqRef = this.m_doc.EquipRow.ForgeSpecialItemAfter;
+ num = (uint)this.m_doc.EquipRow.ForgeLowRateAfter;
+ num2 = (uint)this.m_doc.EquipRow.ForgeHighRateAfter;
+ }
+ int num3 = (int)seqRef[0];
+ int num4 = (int)seqRef[1];
+ int num5 = (int)XBagDocument.BagDoc.GetItemCount(num3);
+ XSingleton<XItemDrawerMgr>.singleton.normalItemDrawer.DrawItem(this.m_redefinStoneGo, num3, num4, true);
+ IXUILabel ixuilabel = this.m_redefinStoneGo.transform.Find("Num").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel.gameObject.SetActive(true);
+ bool flag4 = num5 >= num4;
+ if (flag4)
+ {
+ ixuilabel.SetText(string.Format(XStringDefineProxy.GetString("COMMON_COUNT_TOTAL_ENOUGH_FMT"), num5, num4));
+ }
+ else
+ {
+ ixuilabel.SetText(string.Format(XStringDefineProxy.GetString("COMMON_COUNT_TOTAL_NOTENOUGH_FMT"), num5, num4));
+ }
+ IXUISprite ixuisprite = this.m_redefinStoneGo.transform.Find("Icon").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.SetGrey(this.m_doc.IsUsedStone);
+ IXUISprite ixuisprite2 = this.m_redefinStoneGo.transform.Find("Quality").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite2.SetGrey(this.m_doc.IsUsedStone);
+ GameObject gameObject = this.m_checkBoxSpr.transform.Find("selected").gameObject;
+ gameObject.SetActive(this.m_doc.IsUsedStone);
+ ixuisprite.ID = (ulong)((long)num3);
+ bool flag5 = num5 < num4;
+ if (flag5)
+ {
+ ixuisprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnGetItemAccess));
+ }
+ else
+ {
+ ixuisprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.SelectReDefineStone));
+ }
+ this.m_lessStoneId = num3;
+ this.m_bStoneIsEnough = (num5 >= num4);
+ bool flag6 = !this.m_doc.IsUsedStone;
+ int num6;
+ if (flag6)
+ {
+ this.m_bStoneIsEnough = true;
+ num6 = (int)(100u - num);
+ bool flag7 = count != 0;
+ if (flag7)
+ {
+ this.m_rateLab.SetText(string.Format(XSingleton<XStringTable>.singleton.GetString("RefreshForgeOriAttr"), XSingleton<XCommon>.singleton.StringCombine(num.ToString(), "%")));
+ }
+ else
+ {
+ this.m_rateLab.SetText(string.Format(XSingleton<XStringTable>.singleton.GetString("ActivityForgeOriAttr"), XSingleton<XCommon>.singleton.StringCombine(num.ToString(), "%")));
+ }
+ }
+ else
+ {
+ num6 = (int)(100u - num2);
+ bool flag8 = count != 0;
+ if (flag8)
+ {
+ this.m_rateLab.SetText(string.Format(XSingleton<XStringTable>.singleton.GetString("RefreshForgeOriAttrFull"), XSingleton<XCommon>.singleton.StringCombine(num2.ToString(), "%")));
+ }
+ else
+ {
+ this.m_rateLab.SetText(string.Format(XSingleton<XStringTable>.singleton.GetString("ActivityForgeOriAttrFull"), XSingleton<XCommon>.singleton.StringCombine(num2.ToString(), "%")));
+ }
+ }
+ bool flag9 = num6 > 0 && count != 0;
+ if (flag9)
+ {
+ this.m_refreshLab.gameObject.SetActive(true);
+ this.m_refreshLab.SetText(string.Format(XSingleton<XStringTable>.singleton.GetString("SaveForgeOriAttr"), num6));
+ }
+ else
+ {
+ this.m_refreshLab.gameObject.SetActive(false);
+ }
+ }
+ }
+ }
+
+ private void PlayForgeSucceedEffect()
+ {
+ bool flag = this.m_ForgeSucceedEffect == null;
+ if (flag)
+ {
+ this.m_ForgeSucceedEffect = XSingleton<XFxMgr>.singleton.CreateFx(this.ForgeSucPath, null, true);
+ }
+ else
+ {
+ this.m_ForgeSucceedEffect.SetActive(true);
+ }
+ this.m_ForgeSucceedEffect.Play(this.m_effectsTra, Vector3.zero, Vector3.one, 1f, true, false);
+ this.m_bIsPlayingEffect = true;
+ XSingleton<XTimerMgr>.singleton.KillTimer(this.m_effectToken);
+ this.m_effectToken = XSingleton<XTimerMgr>.singleton.SetTimer(1f, new XTimerMgr.ElapsedEventHandler(this.DelayShowTipsUI), null);
+ }
+
+ private void DelayShowTipsUI(object o = null)
+ {
+ this.m_bIsPlayingEffect = false;
+ }
+
+ private void PlayForgeLostEffect()
+ {
+ bool flag = this.m_ForgeLostEffect == null;
+ if (flag)
+ {
+ this.m_ForgeLostEffect = XSingleton<XFxMgr>.singleton.CreateFx(this.ForgeLostPath, null, true);
+ }
+ else
+ {
+ this.m_ForgeLostEffect.SetActive(true);
+ }
+ this.m_ForgeLostEffect.Play(this.m_effectsTra, Vector3.zero, Vector3.one, 1f, true, false);
+ }
+
+ private void DeActiveEffect()
+ {
+ bool flag = this.m_ForgeSucceedEffect != null;
+ if (flag)
+ {
+ this.m_ForgeSucceedEffect.SetActive(false);
+ }
+ bool flag2 = this.m_ForgeLostEffect != null;
+ if (flag2)
+ {
+ this.m_ForgeLostEffect.SetActive(false);
+ }
+ }
+
+ public void OnEquipClicked(IXUISprite iSp)
+ {
+ this.m_doc.SelectEquip(iSp.ID);
+ }
+
+ private bool OnHelpClicked(IXUIButton button)
+ {
+ DlgBase<XCommonHelpTipView, XCommonHelpTipBehaviour>.singleton.ShowHelp(XSysDefine.XSys_Item_Forge);
+ return true;
+ }
+
+ private bool OnCloseClicked(IXUIButton btn)
+ {
+ base.SetVisible(false);
+ return true;
+ }
+
+ private bool OnClickForge(IXUIButton btn)
+ {
+ bool bIsPlayingEffect = this.m_bIsPlayingEffect;
+ bool result;
+ if (bIsPlayingEffect)
+ {
+ result = true;
+ }
+ else
+ {
+ bool flag = this.SetButtonCool(this.m_delayTime);
+ if (flag)
+ {
+ result = true;
+ }
+ else
+ {
+ bool flag2 = !this.m_bStoneIsEnough;
+ if (flag2)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XSingleton<XStringTable>.singleton.GetString("RedefineStoneNotEnough"), "fece00");
+ XSingleton<UiUtility>.singleton.ShowItemAccess(this.m_lessStoneId, null);
+ result = true;
+ }
+ else
+ {
+ bool flag3 = !this.m_bMetailIsEnough;
+ if (flag3)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XSingleton<XStringTable>.singleton.GetString("FoodNotEnough"), "fece00");
+ XSingleton<UiUtility>.singleton.ShowItemAccess(this.m_lessItemId, null);
+ result = true;
+ }
+ else
+ {
+ this.m_doc.ReqForgeEquip(ForgeOpType.Forge_Equip);
+ result = true;
+ }
+ }
+ }
+ }
+ return result;
+ }
+
+ private bool OnClickDetail(IXUIButton btn)
+ {
+ bool bIsPlayingEffect = this.m_bIsPlayingEffect;
+ bool result;
+ if (bIsPlayingEffect)
+ {
+ result = true;
+ }
+ else
+ {
+ bool flag = this.SetButtonCool(this.m_delayTime);
+ if (flag)
+ {
+ result = true;
+ }
+ else
+ {
+ bool flag2 = this.m_forgeAttrPreviewHandler != null;
+ if (flag2)
+ {
+ this.m_forgeAttrPreviewHandler.SetVisible(true);
+ }
+ result = true;
+ }
+ }
+ return result;
+ }
+
+ private void OnClickToggle(IXUISprite spr)
+ {
+ GameObject gameObject = spr.transform.Find("selected").gameObject;
+ bool flag = spr.ID == 0UL;
+ if (flag)
+ {
+ spr.ID = 1UL;
+ gameObject.SetActive(true);
+ this.m_doc.IsUsedStone = true;
+ }
+ else
+ {
+ spr.ID = 0UL;
+ gameObject.SetActive(false);
+ this.m_doc.IsUsedStone = false;
+ }
+ this.RefreshOnSelectRedfinStone();
+ }
+
+ private void OnGetItemAccess(IXUISprite iSp)
+ {
+ this.DeActiveEffect();
+ int itemid = (int)iSp.ID;
+ XSingleton<UiUtility>.singleton.ShowItemAccess(itemid, null);
+ }
+
+ private void OnSelectedItemClicked(IXUISprite iSp)
+ {
+ XItem mainItem = XBagDocument.MakeXItem((int)iSp.ID, false);
+ XSingleton<UiUtility>.singleton.ShowTooltipDialogWithSearchingCompare(mainItem, iSp, false, 0u);
+ }
+
+ private void SelectReDefineStone(IXUISprite iSp)
+ {
+ XSingleton<UiUtility>.singleton.OnItemClick(iSp);
+ DlgBase<ItemTooltipDlg, ItemTooltipDlgBehaviour>.singleton.ItemSelector.Hide();
+ }
+
+ private void OnSelectedHadItemClicked(IXUISprite iSp)
+ {
+ ulong id = iSp.ID;
+ XSingleton<UiUtility>.singleton.ShowTooltipDialog(XSingleton<XGame>.singleton.Doc.XBagDoc.GetItemByUID(id), null, iSp, false, 0u);
+ }
+
+ private bool SetButtonCool(float time)
+ {
+ float num = Time.realtimeSinceStartup - this.m_fLastClickBtnTime;
+ bool flag = num < time;
+ bool result;
+ if (flag)
+ {
+ result = true;
+ }
+ else
+ {
+ this.m_fLastClickBtnTime = Time.realtimeSinceStartup;
+ result = false;
+ }
+ return result;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/ForgeMainHandler.cs.meta b/Client/Assets/Scripts/XMainClient/UI/ForgeMainHandler.cs.meta
new file mode 100644
index 00000000..85f0e502
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/ForgeMainHandler.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 04b96a87f10e313459dbd3e52ad4df88
+timeCreated: 1611402961
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/FriendsWeddingHandler.cs b/Client/Assets/Scripts/XMainClient/UI/FriendsWeddingHandler.cs
new file mode 100644
index 00000000..044e5baa
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/FriendsWeddingHandler.cs
@@ -0,0 +1,477 @@
+using System;
+using KKSG;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class FriendsWeddingHandler : DlgHandlerBase
+ {
+ protected override string FileName
+ {
+ get
+ {
+ return "GameSystem/Wedding/FriendsWeddingFrame";
+ }
+ }
+
+ private XWeddingDocument m_doc = XWeddingDocument.Doc;
+
+ private IUIDummy[] m_Snapshots = new IUIDummy[XWeddingDocument.MaxAvata];
+
+ private float m_fCoolTime = 0.5f;
+
+ private float m_fLastClickBtnTime = 0f;
+
+ private GameObject m_emptyGo;
+
+ private GameObject m_obtainedGo;
+
+ private IXUIButton m_gotoBtn;
+
+ private IXUILabel m_noPartnerTips;
+
+ private IXUILabel m_ruleLab;
+
+ private XUIPool m_emptyItemPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ private IXUIButton m_ShopBtn;
+
+ private IXUIButton m_livenessBtn;
+
+ private IXUIButton m_levelBtn;
+
+ private IXUILabel m_levelText;
+
+ private IXUIButton m_weddingTeamBtn;
+
+ private IXUILabel m_buffName;
+
+ private XUIPool m_itemPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ private IXUILabel m_CloseValue;
+
+ private GameObject m_CloseValueMax;
+
+ private IXUIButton m_CloseValueHelp;
+
+ private IXUIProgress m_CloseValueProgress;
+
+ private GameObject m_CloseValueHelpPanel;
+
+ private IXUIButton m_HelpClose;
+
+ private IXUILabel m_HelpContent;
+
+ private IXUILabel m_LoverLevel;
+
+ private IXUIButton m_LoverPrivilegeBtn;
+
+ private IXUIButton m_LoverPrivilegeClose;
+
+ private GameObject m_PrivilegeFrame;
+
+ private FriendsWeddingPrivilegeHandler m_PrivilegeHandler;
+
+ protected override void Init()
+ {
+ base.Init();
+ this.m_doc.View = this;
+ this.m_emptyGo = base.PanelObject.transform.Find("Bg/Empty").gameObject;
+ this.m_obtainedGo = base.PanelObject.transform.Find("Bg/Obtained").gameObject;
+ Transform transform = this.m_emptyGo.transform.Find("PartnerPrior/Grid");
+ this.m_emptyItemPool.SetupPool(transform.gameObject, transform.Find("Tpl").gameObject, 3u, false);
+ this.m_gotoBtn = (this.m_emptyGo.transform.Find("ButtonR").GetComponent("XUIButton") as IXUIButton);
+ this.m_noPartnerTips = (this.m_emptyGo.transform.Find("T").GetComponent("XUILabel") as IXUILabel);
+ this.m_ruleLab = (this.m_emptyGo.transform.Find("RulePanel/RuleLab").GetComponent("XUILabel") as IXUILabel);
+ this.m_weddingTeamBtn = (this.m_emptyGo.transform.Find("Buttonf").GetComponent("XUIButton") as IXUIButton);
+ this.m_livenessBtn = (this.m_obtainedGo.transform.Find("LivenessBtn").GetComponent("XUIButton") as IXUIButton);
+ this.m_levelBtn = (this.m_obtainedGo.transform.Find("BreakupBtn").GetComponent("XUIButton") as IXUIButton);
+ this.m_levelText = (this.m_levelBtn.gameObject.transform.Find("T").GetComponent("XUILabel") as IXUILabel);
+ this.m_ShopBtn = (this.m_obtainedGo.transform.Find("BtnShop").GetComponent("XUIButton") as IXUIButton);
+ transform = this.m_obtainedGo.transform.Find("ModleParent");
+ this.m_itemPool.SetupPool(transform.gameObject, transform.Find("Tpl").gameObject, 4u, false);
+ this.m_buffName = (base.PanelObject.transform.Find("Bg/Obtained/FriendBonusFrame/Active/Buff").GetComponent("XUILabel") as IXUILabel);
+ this.m_CloseValueMax = this.m_obtainedGo.transform.Find("LoverDetail/Progress/Max").gameObject;
+ this.m_CloseValue = (this.m_obtainedGo.transform.Find("LoverDetail/Progress/Exp").GetComponent("XUILabel") as IXUILabel);
+ this.m_CloseValueHelp = (this.m_obtainedGo.transform.Find("LoverDetail/Help").GetComponent("XUIButton") as IXUIButton);
+ this.m_CloseValueProgress = (this.m_obtainedGo.transform.Find("LoverDetail/Progress").GetComponent("XUIProgress") as IXUIProgress);
+ this.m_LoverLevel = (this.m_obtainedGo.transform.Find("LoverDetail/Level/Value").GetComponent("XUILabel") as IXUILabel);
+ this.m_LoverPrivilegeBtn = (this.m_obtainedGo.transform.Find("LoverDetail/Go").GetComponent("XUIButton") as IXUIButton);
+ this.m_CloseValueHelpPanel = this.m_obtainedGo.transform.Find("Help").gameObject;
+ this.m_CloseValueHelpPanel.SetActive(false);
+ this.m_HelpClose = (this.m_obtainedGo.transform.Find("Help/Close").GetComponent("XUIButton") as IXUIButton);
+ this.m_HelpContent = (this.m_obtainedGo.transform.Find("Help/Content").GetComponent("XUILabel") as IXUILabel);
+ this.m_LoverPrivilegeClose = (this.m_obtainedGo.transform.Find("Privilege/Close").GetComponent("XUIButton") as IXUIButton);
+ this.m_PrivilegeFrame = this.m_obtainedGo.transform.Find("Privilege").gameObject;
+ DlgHandlerBase.EnsureCreate<FriendsWeddingPrivilegeHandler>(ref this.m_PrivilegeHandler, this.m_PrivilegeFrame, null, false);
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ this.m_gotoBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnClickGoToBtn));
+ this.m_weddingTeamBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnWeddingTeamBtn));
+ this.m_livenessBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnClickLivenessBtn));
+ this.m_levelBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnClickLevelBtn));
+ this.m_ShopBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnShopClick));
+ this.m_CloseValueHelp.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnCloseValueHelpBtnClicked));
+ this.m_LoverPrivilegeBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnPrivilegeBtnClicked));
+ this.m_HelpClose.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnHelpCloseBtnClicked));
+ this.m_LoverPrivilegeClose.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnPrivilegeCloseClicked));
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ base.Alloc3DAvatarPool("FriendsWeddingHandler", 1);
+ this.m_doc.ReqPartnerDetailInfo();
+ this.m_ShopBtn.gameObject.SetActive(XSingleton<XGameSysMgr>.singleton.IsSystemOpened(XSysDefine.XSys_Mall_WeddingLover));
+ this.m_HelpContent.SetText(XSingleton<UiUtility>.singleton.ReplaceReturn(XSingleton<XStringTable>.singleton.GetString("WeddingLoverCloseHelp")));
+ this.CheckMarriageLevelUp();
+ }
+
+ protected override void OnHide()
+ {
+ base.Return3DAvatarPool();
+ base.OnHide();
+ }
+
+ public override void StackRefresh()
+ {
+ base.StackRefresh();
+ base.Alloc3DAvatarPool("FriendsWeddingHandler", 1);
+ }
+
+ public override void OnUnload()
+ {
+ base.Return3DAvatarPool();
+ this.m_doc.View = null;
+ DlgHandlerBase.EnsureUnload<FriendsWeddingPrivilegeHandler>(ref this.m_PrivilegeHandler);
+ this.m_PrivilegeHandler = null;
+ base.OnUnload();
+ }
+
+ private void FillContent()
+ {
+ this.m_emptyGo.SetActive(false);
+ this.m_obtainedGo.SetActive(false);
+ bool flag = this.m_doc.PartnerList.Count == 0;
+ if (flag)
+ {
+ this.FillNoPartner();
+ }
+ else
+ {
+ this.m_doc.ReqPartnerDetailInfo();
+ }
+ }
+
+ public void RefreshUi()
+ {
+ this.m_emptyGo.SetActive(false);
+ this.m_obtainedGo.SetActive(false);
+ bool flag = this.m_doc.PartnerList.Count == 0;
+ if (flag)
+ {
+ this.FillNoPartner();
+ }
+ else
+ {
+ this.FillHadPartner();
+ }
+ }
+
+ private void FillNoPartner()
+ {
+ this.m_emptyGo.SetActive(true);
+ this.m_emptyItemPool.ReturnAll(false);
+ string[] array = XSingleton<XStringTable>.singleton.GetString("WeddingWelfare").Split(new char[]
+ {
+ '|'
+ });
+ for (int i = 0; i < array.Length; i++)
+ {
+ GameObject gameObject = this.m_emptyItemPool.FetchGameObject(false);
+ gameObject.SetActive(true);
+ gameObject.transform.localPosition = new Vector3(0f, (float)(-(float)i * this.m_emptyItemPool.TplHeight), 0f);
+ IXUILabel ixuilabel = gameObject.transform.Find("Tip").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel.SetText(XSingleton<UiUtility>.singleton.ReplaceReturn(array[i]));
+ }
+ this.m_ruleLab.SetText(XSingleton<UiUtility>.singleton.ReplaceReturn(XSingleton<XStringTable>.singleton.GetString("WeddingRule")));
+ this.m_noPartnerTips.SetText(XSingleton<XStringTable>.singleton.GetString("NoWeddingTips"));
+ }
+
+ private void FillHadPartner()
+ {
+ this.m_obtainedGo.SetActive(true);
+ this.RefreshUIRedPoint();
+ this.m_itemPool.ReturnAll(false);
+ int num = 0;
+ for (int i = 0; i < this.m_doc.PartnerList.Count; i++)
+ {
+ GameObject gameObject = this.m_itemPool.FetchGameObject(false);
+ gameObject.SetActive(true);
+ gameObject.transform.localPosition = new Vector3((float)(this.m_itemPool.TplWidth * num), 0f, 0f);
+ this.FillAvataItem(gameObject, this.m_doc.PartnerList[i], num);
+ num++;
+ }
+ base.Return3DAvatarPool();
+ base.Alloc3DAvatarPool("PartnerMainHandler", 1);
+ int j = this.m_doc.PartnerList.Count;
+ int num2 = this.m_Snapshots.Length;
+ while (j < num2)
+ {
+ this.m_Snapshots[j] = null;
+ j++;
+ }
+ this.RefreshAvataData();
+ XExpeditionDocument specificDocument = XDocuments.GetSpecificDocument<XExpeditionDocument>(XExpeditionDocument.uuID);
+ int dayCount = specificDocument.GetDayCount(TeamLevelType.TeamLevelWedding, null);
+ int dayMaxCount = specificDocument.GetDayMaxCount(TeamLevelType.TeamLevelWedding, null);
+ this.m_levelText.SetText(XStringDefineProxy.GetString("WeddingLevel", new object[]
+ {
+ dayCount,
+ dayMaxCount
+ }));
+ WeddingType myWeddingType = XWeddingDocument.Doc.GetMyWeddingType();
+ string[] array = null;
+ WeddingType weddingType = myWeddingType;
+ if (weddingType != WeddingType.WeddingType_Normal)
+ {
+ if (weddingType == WeddingType.WeddingType_Luxury)
+ {
+ array = XSingleton<XGlobalConfig>.singleton.GetAndSeparateValue("PartnerSkill2", XGlobalConfig.SequenceSeparator);
+ }
+ }
+ else
+ {
+ array = XSingleton<XGlobalConfig>.singleton.GetAndSeparateValue("PartnerSkill", XGlobalConfig.SequenceSeparator);
+ }
+ bool flag = array != null && array.Length == 2;
+ if (flag)
+ {
+ BuffTable.RowData buffData = XSingleton<XBuffTemplateManager>.singleton.GetBuffData(int.Parse(array[0]), int.Parse(array[1]));
+ bool flag2 = buffData != null;
+ if (flag2)
+ {
+ this.m_buffName.SetText(buffData.BuffName);
+ }
+ }
+ this.RefreshMarriageLevelValue();
+ }
+
+ private void FillAvataItem(GameObject go, RoleOutLookBrief partner, int count)
+ {
+ bool flag = partner == null || go == null || partner == null;
+ if (!flag)
+ {
+ IXUISprite ixuisprite = go.transform.Find("ProfIcon").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.SetSprite(XSingleton<XProfessionSkillMgr>.singleton.GetProfIcon((int)((int)partner.profession % 10)));
+ IXUILabel ixuilabel = go.transform.Find("Name").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel.SetText(partner.name);
+ ixuilabel = (go.transform.Find("Level").GetComponent("XUILabel") as IXUILabel);
+ ixuilabel.SetText(partner.level.ToString());
+ ixuilabel = (go.transform.Find("Battlepoint").GetComponent("XUILabel") as IXUILabel);
+ ixuilabel.SetText(partner.ppt.ToString());
+ ixuisprite = (go.transform.Find("Bg/BgSmall").GetComponent("XUISprite") as IXUISprite);
+ ixuisprite.ID = partner.roleid;
+ ixuisprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnClickavata));
+ this.m_Snapshots[count] = (go.transform.Find("Snapshot").GetComponent("UIDummy") as IUIDummy);
+ }
+ }
+
+ private void RefreshAvataData()
+ {
+ int num = 0;
+ for (int i = 0; i < this.m_doc.PartnerList.Count; i++)
+ {
+ bool flag = num >= XWeddingDocument.MaxAvata;
+ if (flag)
+ {
+ break;
+ }
+ bool flag2 = this.m_Snapshots[num] != null;
+ if (flag2)
+ {
+ XDummy xdummy = XSingleton<X3DAvatarMgr>.singleton.CreateCommonRoleDummy(this.m_dummPool, this.m_doc.PartnerList[i].roleid, (uint)XFastEnumIntEqualityComparer<RoleType>.ToInt(this.m_doc.PartnerList[i].profession), this.m_doc.PartnerList[i].outlook, this.m_Snapshots[num], null);
+ num++;
+ }
+ }
+ }
+
+ public void RefreshUIRedPoint()
+ {
+ this.m_livenessBtn.gameObject.transform.Find("RedPoint").gameObject.SetActive(this.m_doc.IsHadLivenessRedPoint);
+ }
+
+ public void CheckMarriageLevelUp()
+ {
+ bool flag = this.m_doc.MarriageLevelUp > 0;
+ if (flag)
+ {
+ MarriageLevel.RowData byLevel = XWeddingDocument.MarriageLevelTable.GetByLevel(this.m_doc.MarriageLevelUp);
+ bool flag2 = byLevel != null;
+ if (flag2)
+ {
+ bool flag3 = byLevel.PrerogativeID != 0u || byLevel.PrivilegeBuffs[0] > 0u;
+ if (flag3)
+ {
+ DlgBase<FriendsWeddingLevelUpView, FriendsWeddingLevelUpBehaviour>.singleton.SetVisible(true, true);
+ }
+ }
+ }
+ }
+
+ public void RefreshMarriageLevelValue()
+ {
+ bool flag = this.m_doc.MarriageLevel != null;
+ if (flag)
+ {
+ int key = this.m_doc.MarriageLevel.marriageLevel + 1;
+ MarriageLevel.RowData byLevel = XWeddingDocument.MarriageLevelTable.GetByLevel(key);
+ bool flag2 = byLevel != null;
+ if (flag2)
+ {
+ this.m_CloseValueMax.SetActive(false);
+ this.m_CloseValue.gameObject.SetActive(true);
+ this.m_CloseValue.SetText(string.Format("{0}/{1}", this.m_doc.MarriageLevel.marriageLevelValue, byLevel.NeedIntimacyValue));
+ this.m_CloseValueProgress.value = ((byLevel.NeedIntimacyValue == 0) ? 1f : ((float)this.m_doc.MarriageLevel.marriageLevelValue / (float)byLevel.NeedIntimacyValue));
+ }
+ else
+ {
+ this.m_CloseValueMax.SetActive(true);
+ this.m_CloseValue.gameObject.SetActive(false);
+ this.m_CloseValueProgress.value = 1f;
+ }
+ this.m_LoverLevel.SetText(string.Format("{0}/{1}", this.m_doc.MarriageLevel.marriageLevel, XWeddingDocument.MaxMarriageLevel));
+ }
+ }
+
+ private bool OnClickGoToBtn(IXUIButton btn)
+ {
+ bool flag = this.SetButtonCool(this.m_fCoolTime);
+ bool result;
+ if (flag)
+ {
+ result = true;
+ }
+ else
+ {
+ XSingleton<UIManager>.singleton.CloseAllUI();
+ uint num = 0u;
+ XNpcInfo npcInfo = XSingleton<XEntityMgr>.singleton.NpcInfo;
+ for (int i = 0; i < npcInfo.Table.Length; i++)
+ {
+ bool flag2 = npcInfo.Table[i].LinkSystem == 702;
+ if (flag2)
+ {
+ num = npcInfo.Table[i].ID;
+ break;
+ }
+ }
+ bool flag3 = num == 0u;
+ if (flag3)
+ {
+ XSingleton<XDebug>.singleton.AddErrorLog("had not find partner npc", null, null, null, null, null);
+ result = true;
+ }
+ else
+ {
+ XSingleton<XInput>.singleton.LastNpc = XSingleton<XEntityMgr>.singleton.GetNpc(num);
+ result = true;
+ }
+ }
+ return result;
+ }
+
+ private bool OnWeddingTeamBtn(IXUIButton btn)
+ {
+ XTeamDocument specificDocument = XDocuments.GetSpecificDocument<XTeamDocument>(XTeamDocument.uuID);
+ specificDocument.SetAndMatch(XSingleton<XGlobalConfig>.singleton.GetInt("WeddingTeamLevel"));
+ return true;
+ }
+
+ private bool OnClickLivenessBtn(IXUIButton btn)
+ {
+ bool flag = this.SetButtonCool(this.m_fCoolTime);
+ bool result;
+ if (flag)
+ {
+ result = true;
+ }
+ else
+ {
+ DlgBase<LoversLivenessDlg, LoversLivenessBehaviour>.singleton.SetVisibleWithAnimation(true, null);
+ result = true;
+ }
+ return result;
+ }
+
+ private bool OnClickLevelBtn(IXUIButton btn)
+ {
+ XTeamDocument specificDocument = XDocuments.GetSpecificDocument<XTeamDocument>(XTeamDocument.uuID);
+ specificDocument.SetAndMatch(XSingleton<XGlobalConfig>.singleton.GetInt("WeddingLevel"));
+ return true;
+ }
+
+ private void OnClickavata(IXUISprite sp)
+ {
+ bool flag = sp == null;
+ if (!flag)
+ {
+ ulong id = sp.ID;
+ XCharacterCommonMenuDocument.ReqCharacterMenuInfo(id, false);
+ }
+ }
+
+ private bool SetButtonCool(float time)
+ {
+ float num = Time.realtimeSinceStartup - this.m_fLastClickBtnTime;
+ bool flag = num < time;
+ bool result;
+ if (flag)
+ {
+ result = true;
+ }
+ else
+ {
+ this.m_fLastClickBtnTime = Time.realtimeSinceStartup;
+ result = false;
+ }
+ return result;
+ }
+
+ private bool OnShopClick(IXUIButton btn)
+ {
+ DlgBase<MallSystemDlg, MallSystemBehaviour>.singleton.ShowShopSystem(XSysDefine.XSys_Mall_WeddingLover, 0UL);
+ return true;
+ }
+
+ private bool OnCloseValueHelpBtnClicked(IXUIButton btn)
+ {
+ this.m_CloseValueHelpPanel.SetActive(true);
+ return true;
+ }
+
+ private bool OnHelpCloseBtnClicked(IXUIButton btn)
+ {
+ this.m_CloseValueHelpPanel.SetActive(false);
+ return true;
+ }
+
+ private bool OnPrivilegeCloseClicked(IXUIButton btn)
+ {
+ this.m_PrivilegeHandler.SetVisible(false);
+ return false;
+ }
+
+ private bool OnPrivilegeBtnClicked(IXUIButton btn)
+ {
+ this.m_PrivilegeHandler.SetVisible(true);
+ return true;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/FriendsWeddingHandler.cs.meta b/Client/Assets/Scripts/XMainClient/UI/FriendsWeddingHandler.cs.meta
new file mode 100644
index 00000000..8681d544
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/FriendsWeddingHandler.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: d1aa9981a6431344fac36f5dd5a13c7f
+timeCreated: 1611404592
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/FriendsWeddingLevelUpBehaviour.cs b/Client/Assets/Scripts/XMainClient/UI/FriendsWeddingLevelUpBehaviour.cs
new file mode 100644
index 00000000..cd780ac4
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/FriendsWeddingLevelUpBehaviour.cs
@@ -0,0 +1,41 @@
+using System;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+
+namespace XMainClient.UI
+{
+ internal class FriendsWeddingLevelUpBehaviour : DlgBehaviourBase
+ {
+ public IXUILabel m_LevelTip;
+
+ public IXUIButton m_GetBtn;
+
+ public GameObject m_ItemDesc;
+
+ public IXUILabel m_SkillName;
+
+ public IXUISprite m_SkillIcon;
+
+ public GameObject m_Skill;
+
+ public IXUILabel m_ItemName;
+
+ public Transform m_ItemIconTran;
+
+ public GameObject m_Item;
+
+ private void Awake()
+ {
+ this.m_LevelTip = (base.transform.Find("open/Tips").GetComponent("XUILabel") as IXUILabel);
+ this.m_GetBtn = (base.transform.Find("open/OK").GetComponent("XUIButton") as IXUIButton);
+ this.m_ItemDesc = base.transform.Find("open/desc").gameObject;
+ this.m_Skill = base.transform.Find("open/Skill").gameObject;
+ this.m_SkillName = (base.transform.Find("open/Skill/tmp/Name").GetComponent("XUILabel") as IXUILabel);
+ this.m_SkillIcon = (base.transform.Find("open/Skill/tmp/SkillIcon").GetComponent("XUISprite") as IXUISprite);
+ this.m_Item = base.transform.Find("open/items").gameObject;
+ this.m_ItemName = (base.transform.Find("open/items/tmp/Name").GetComponent("XUILabel") as IXUILabel);
+ this.m_ItemIconTran = base.transform.Find("open/items/tmp");
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/FriendsWeddingLevelUpBehaviour.cs.meta b/Client/Assets/Scripts/XMainClient/UI/FriendsWeddingLevelUpBehaviour.cs.meta
new file mode 100644
index 00000000..7f3f6755
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/FriendsWeddingLevelUpBehaviour.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: cd8afe4a983393b449079998b769872a
+timeCreated: 1611404555
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/FriendsWeddingLevelUpView.cs b/Client/Assets/Scripts/XMainClient/UI/FriendsWeddingLevelUpView.cs
new file mode 100644
index 00000000..5445661e
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/FriendsWeddingLevelUpView.cs
@@ -0,0 +1,90 @@
+using System;
+using UILib;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class FriendsWeddingLevelUpView : DlgBase<FriendsWeddingLevelUpView, FriendsWeddingLevelUpBehaviour>
+ {
+ public override bool autoload
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override string fileName
+ {
+ get
+ {
+ return "GameSystem/Wedding/WeddingLoverLevelUpDlg";
+ }
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ bool flag = XWeddingDocument.Doc.MarriageLevelUp > 0;
+ if (flag)
+ {
+ base.uiBehaviour.m_LevelTip.SetText(XStringDefineProxy.GetString("WeddingLoverLevelUpTip", new object[]
+ {
+ XWeddingDocument.Doc.MarriageLevelUp
+ }));
+ MarriageLevel.RowData byLevel = XWeddingDocument.MarriageLevelTable.GetByLevel(XWeddingDocument.Doc.MarriageLevelUp);
+ bool flag2 = byLevel != null;
+ if (flag2)
+ {
+ bool flag3 = byLevel.PrerogativeID > 0u;
+ if (flag3)
+ {
+ base.uiBehaviour.m_Skill.SetActive(false);
+ base.uiBehaviour.m_Item.SetActive(true);
+ base.uiBehaviour.m_ItemDesc.SetActive(true);
+ PrerogativeContent.RowData prerogativeByID = XPrerogativeDocument.GetPrerogativeByID(byLevel.PrerogativeID);
+ PreSettingNodeHandler.SetupPrerogativeTpl(base.uiBehaviour.m_ItemIconTran, prerogativeByID);
+ string @string = XStringDefineProxy.GetString(XSingleton<XCommon>.singleton.StringCombine("PRE_TYPE_NAME", prerogativeByID.Type.ToString()));
+ base.uiBehaviour.m_ItemName.SetText(@string);
+ }
+ else
+ {
+ bool flag4 = byLevel.PrivilegeBuffs[0] > 0u;
+ if (flag4)
+ {
+ base.uiBehaviour.m_Skill.SetActive(true);
+ base.uiBehaviour.m_Item.SetActive(false);
+ base.uiBehaviour.m_ItemDesc.SetActive(false);
+ BuffTable.RowData buffData = XSingleton<XBuffTemplateManager>.singleton.GetBuffData((int)byLevel.PrivilegeBuffs[0], (int)byLevel.PrivilegeBuffs[1]);
+ bool flag5 = buffData != null;
+ if (flag5)
+ {
+ base.uiBehaviour.m_SkillName.SetText(buffData.BuffName);
+ }
+ string[] array = byLevel.BuffIcon.Split(new char[]
+ {
+ '='
+ });
+ base.uiBehaviour.m_SkillIcon.SetSprite(array[1], array[0], false);
+ }
+ }
+ }
+ }
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ base.uiBehaviour.m_GetBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnCloseBtnClicked));
+ }
+
+ private bool OnCloseBtnClicked(IXUIButton btn)
+ {
+ XWeddingDocument specificDocument = XDocuments.GetSpecificDocument<XWeddingDocument>(XWeddingDocument.uuID);
+ specificDocument.GetMarriagePrivilege();
+ this.SetVisibleWithAnimation(false, null);
+ return false;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/FriendsWeddingLevelUpView.cs.meta b/Client/Assets/Scripts/XMainClient/UI/FriendsWeddingLevelUpView.cs.meta
new file mode 100644
index 00000000..30fd4db3
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/FriendsWeddingLevelUpView.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 5b77bd6ce54868a4495918b746d06865
+timeCreated: 1611403799
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/FriendsWeddingPrivilegeHandler.cs b/Client/Assets/Scripts/XMainClient/UI/FriendsWeddingPrivilegeHandler.cs
new file mode 100644
index 00000000..f757a587
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/FriendsWeddingPrivilegeHandler.cs
@@ -0,0 +1,152 @@
+using System;
+using System.Collections.Generic;
+using UILib;
+using UnityEngine;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class FriendsWeddingPrivilegeHandler : DlgHandlerBase
+ {
+ private XWeddingDocument m_doc = XWeddingDocument.Doc;
+
+ private IXUILabel m_CurrLevel;
+
+ private IXUILabel m_NextLevel;
+
+ private IXUIWrapContent m_CurrWrapContent;
+
+ private IXUIScrollView m_CurrScrollView;
+
+ private GameObject m_NextOnlyOne;
+
+ private GameObject m_MaxLevelText;
+
+ private GameObject m_CurrEmpty;
+
+ private List<MarriageLevel.RowData> m_PrivilegeList = new List<MarriageLevel.RowData>();
+
+ protected override void Init()
+ {
+ base.Init();
+ this.m_CurrLevel = (base.PanelObject.transform.Find("Bg/Curr/Level").GetComponent("XUILabel") as IXUILabel);
+ this.m_NextLevel = (base.PanelObject.transform.Find("Bg/Next/Level").GetComponent("XUILabel") as IXUILabel);
+ this.m_MaxLevelText = base.PanelObject.transform.Find("Bg/Next/MaxLevel").gameObject;
+ this.m_MaxLevelText.SetActive(false);
+ this.m_CurrEmpty = base.PanelObject.transform.Find("T2").gameObject;
+ this.m_CurrEmpty.SetActive(false);
+ this.m_CurrWrapContent = (base.PanelObject.transform.Find("Bg/Curr/ScrollView/WrapContent").GetComponent("XUIWrapContent") as IXUIWrapContent);
+ this.m_CurrScrollView = (base.PanelObject.transform.Find("Bg/Curr/ScrollView").GetComponent("XUIScrollView") as IXUIScrollView);
+ this.m_NextOnlyOne = base.PanelObject.transform.Find("Bg/Next/OnlyOne").gameObject;
+ this.m_NextOnlyOne.SetActive(false);
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ this.m_CurrWrapContent.RegisterItemUpdateEventHandler(new WrapItemUpdateEventHandler(this.CurrPrivilegeWrapListUpdated));
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ this.m_PrivilegeList.Clear();
+ bool flag = this.m_doc.MarriageLevel != null;
+ if (flag)
+ {
+ this.m_CurrLevel.SetText(this.m_doc.MarriageLevel.marriageLevel.ToString());
+ int key = this.m_doc.MarriageLevel.marriageLevel + 1;
+ MarriageLevel.RowData byLevel = XWeddingDocument.MarriageLevelTable.GetByLevel(key);
+ bool flag2 = byLevel != null;
+ if (flag2)
+ {
+ this.m_NextLevel.SetText(key.ToString());
+ this.SetNextPrivilegeInfo(byLevel);
+ }
+ this.m_NextLevel.gameObject.SetActive(byLevel != null);
+ this.m_MaxLevelText.gameObject.SetActive(byLevel == null);
+ this.m_NextOnlyOne.SetActive(byLevel != null);
+ for (int i = 1; i <= this.m_doc.MarriageLevel.marriageLevel; i++)
+ {
+ MarriageLevel.RowData byLevel2 = XWeddingDocument.MarriageLevelTable.GetByLevel(i);
+ bool flag3 = byLevel2.PrerogativeID != 0u || byLevel2.PrivilegeBuffs[0] > 0u;
+ if (flag3)
+ {
+ this.m_PrivilegeList.Add(byLevel2);
+ }
+ }
+ this.m_CurrEmpty.SetActive(this.m_PrivilegeList.Count == 0);
+ this.m_CurrWrapContent.SetContentCount(this.m_PrivilegeList.Count, false);
+ this.m_CurrScrollView.ResetPosition();
+ }
+ }
+
+ private void SetNextPrivilegeInfo(MarriageLevel.RowData rowData)
+ {
+ IXUILabel ixuilabel = this.m_NextOnlyOne.transform.Find("Name").GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel2 = this.m_NextOnlyOne.transform.Find("Desc").GetComponent("XUILabel") as IXUILabel;
+ IXUISprite ixuisprite = this.m_NextOnlyOne.transform.Find("Icon").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.SetColor(Color.white);
+ bool flag = rowData.PrerogativeID > 0u;
+ if (flag)
+ {
+ PrerogativeContent.RowData prerogativeByID = XPrerogativeDocument.GetPrerogativeByID(rowData.PrerogativeID);
+ PreSettingNodeHandler.SetupPrerogativeTpl(this.m_NextOnlyOne.transform, prerogativeByID);
+ string @string = XStringDefineProxy.GetString(XSingleton<XCommon>.singleton.StringCombine("PRE_TYPE_NAME", prerogativeByID.Type.ToString()));
+ ixuilabel.SetText(@string);
+ }
+ else
+ {
+ bool flag2 = rowData.PrivilegeBuffs[0] > 0u;
+ if (flag2)
+ {
+ ixuilabel.SetText(XSingleton<XStringTable>.singleton.GetString("WeddingBuffDesc"));
+ string[] array = rowData.BuffIcon.Split(new char[]
+ {
+ '='
+ });
+ ixuisprite.SetSprite(array[1], array[0], false);
+ }
+ }
+ ixuilabel2.SetText(rowData.Desc);
+ }
+
+ private void CurrPrivilegeWrapListUpdated(Transform item, int index)
+ {
+ bool flag = index >= this.m_PrivilegeList.Count;
+ if (!flag)
+ {
+ IXUILabel ixuilabel = item.Find("Desc").GetComponent("XUILabel") as IXUILabel;
+ IXUISprite ixuisprite = item.Find("Icon").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.SetColor(Color.white);
+ MarriageLevel.RowData rowData = this.m_PrivilegeList[index];
+ bool flag2 = rowData.PrerogativeID > 0u;
+ if (flag2)
+ {
+ PrerogativeContent.RowData prerogativeByID = XPrerogativeDocument.GetPrerogativeByID(rowData.PrerogativeID);
+ PreSettingNodeHandler.SetupPrerogativeTpl(item, prerogativeByID);
+ string @string = XStringDefineProxy.GetString(XSingleton<XCommon>.singleton.StringCombine("PRE_TYPE_NAME", prerogativeByID.Type.ToString()));
+ ixuilabel.SetText(@string);
+ }
+ else
+ {
+ bool flag3 = rowData.PrivilegeBuffs[0] > 0u;
+ if (flag3)
+ {
+ BuffTable.RowData buffData = XSingleton<XBuffTemplateManager>.singleton.GetBuffData((int)rowData.PrivilegeBuffs[0], (int)rowData.PrivilegeBuffs[1]);
+ bool flag4 = buffData != null;
+ if (flag4)
+ {
+ ixuilabel.SetText(buffData.BuffName);
+ }
+ string[] array = rowData.BuffIcon.Split(new char[]
+ {
+ '='
+ });
+ ixuisprite.SetSprite(array[1], array[0], false);
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/FriendsWeddingPrivilegeHandler.cs.meta b/Client/Assets/Scripts/XMainClient/UI/FriendsWeddingPrivilegeHandler.cs.meta
new file mode 100644
index 00000000..819bb2ed
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/FriendsWeddingPrivilegeHandler.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 5f0395444a828494ca9777cb858eaff0
+timeCreated: 1611403811
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/FrozenSealHandler.cs b/Client/Assets/Scripts/XMainClient/UI/FrozenSealHandler.cs
new file mode 100644
index 00000000..064a18f0
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/FrozenSealHandler.cs
@@ -0,0 +1,365 @@
+using System;
+using System.Collections.Generic;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class FrozenSealHandler : DlgHandlerBase
+ {
+ protected override string FileName
+ {
+ get
+ {
+ return "OperatingActivity/CrushingSeal";
+ }
+ }
+
+ protected XUIPool _frozenSealPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ protected XUIPool _rewardPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ protected Dictionary<ulong, Transform> _itemsDic = new Dictionary<ulong, Transform>();
+
+ protected List<FrozenSealHandler.FrozenSealSortData> _sortList = new List<FrozenSealHandler.FrozenSealSortData>();
+
+ protected uint curActid = 0u;
+
+ protected IXUIScrollView _scrollview;
+
+ protected IXUILabel _timeLabel;
+
+ public class FrozenSealSortData
+ {
+ public ulong id = 0UL;
+
+ public FrozenSealState state = FrozenSealState.None;
+ }
+
+ protected override void Init()
+ {
+ base.Init();
+ this.curActid = XOperatingActivityDocument.Doc.CurSealActID;
+ bool flag = this.curActid > 0u;
+ if (flag)
+ {
+ this.InitUIPool();
+ this.InitScrollView();
+ }
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ uint num = this.curActid;
+ this.curActid = XOperatingActivityDocument.Doc.CurSealActID;
+ bool flag = num > 0u && this.curActid != num;
+ if (flag)
+ {
+ this.Clear();
+ this.InitScrollView();
+ }
+ bool flag2 = this.curActid > 0u;
+ if (flag2)
+ {
+ this.RefreshAllItem();
+ }
+ }
+
+ protected bool OnFetch(IXUIButton btn)
+ {
+ RpcC2G_GetSpActivityReward rpcC2G_GetSpActivityReward = new RpcC2G_GetSpActivityReward();
+ rpcC2G_GetSpActivityReward.oArg.actid = this.curActid;
+ rpcC2G_GetSpActivityReward.oArg.taskid = (uint)btn.ID;
+ XSingleton<XClientNetwork>.singleton.Send(rpcC2G_GetSpActivityReward);
+ return true;
+ }
+
+ protected bool OnJump(IXUIButton btn)
+ {
+ uint num = (uint)btn.ID;
+ List<SuperActivityTask.RowData> sealDatas = XOperatingActivityDocument.Doc.SealDatas;
+ for (int i = 0; i < sealDatas.Count; i++)
+ {
+ bool flag = sealDatas[i].taskid == num;
+ if (flag)
+ {
+ SuperActivityTask.RowData rowData = sealDatas[i];
+ bool flag2 = rowData.arg != null && rowData.arg.Length != 0;
+ if (flag2)
+ {
+ bool flag3 = rowData.arg[0] == 1;
+ if (flag3)
+ {
+ DlgBase<DungeonSelect, DungeonSelectBehaviour>.singleton.SelectChapter(rowData.arg[1], (uint)rowData.arg[2]);
+ }
+ else
+ {
+ bool flag4 = rowData.arg[0] == 2;
+ if (flag4)
+ {
+ DlgBase<TheExpView, TheExpBehaviour>.singleton.ShowView(rowData.arg[1]);
+ }
+ }
+ }
+ else
+ {
+ XSingleton<XGameSysMgr>.singleton.OpenSystem((int)rowData.jump);
+ }
+ return true;
+ }
+ }
+ return false;
+ }
+
+ protected void InitItemInfo(Transform item, SuperActivityTask.RowData data)
+ {
+ IXUILabel ixuilabel = item.Find("Name").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel.SetText(data.title);
+ Transform transform = item.Find("Fetch");
+ IXUIButton ixuibutton = transform.GetComponent("XUIButton") as IXUIButton;
+ ixuibutton.ID = (ulong)data.taskid;
+ ixuibutton.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnFetch));
+ Transform transform2 = item.Find("Go");
+ IXUIButton ixuibutton2 = transform2.GetComponent("XUIButton") as IXUIButton;
+ ixuibutton2.ID = (ulong)data.taskid;
+ ixuibutton2.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnJump));
+ IXUILabel ixuilabel2 = item.Find("Go/Tip").GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel3 = item.Find("Go/LinkTo").GetComponent("XUILabel") as IXUILabel;
+ transform.gameObject.SetActive(false);
+ bool flag = data.jump > 0u;
+ if (flag)
+ {
+ this._sortList.Add(new FrozenSealHandler.FrozenSealSortData
+ {
+ id = (ulong)data.taskid,
+ state = FrozenSealState.LeaveFor
+ });
+ ixuilabel2.gameObject.SetActive(true);
+ ixuilabel3.gameObject.SetActive(false);
+ }
+ else
+ {
+ this._sortList.Add(new FrozenSealHandler.FrozenSealSortData
+ {
+ id = (ulong)data.taskid,
+ state = FrozenSealState.UnFinish
+ });
+ ixuibutton2.SetEnable(false, false);
+ ixuilabel3.gameObject.SetActive(true);
+ ixuilabel2.gameObject.SetActive(false);
+ }
+ item.Find("Fetched").gameObject.SetActive(false);
+ Transform parent = item.Find("ItemReward");
+ for (int i = 0; i < data.items.Count; i++)
+ {
+ GameObject gameObject = this._rewardPool.FetchGameObject(false);
+ gameObject.transform.parent = parent;
+ gameObject.transform.localPosition = new Vector3((float)(this._rewardPool.TplWidth * i), 0f, 0f);
+ uint num = data.items[i, 0];
+ XSingleton<XItemDrawerMgr>.singleton.normalItemDrawer.DrawItem(gameObject, (int)num, (int)data.items[i, 1], false);
+ IXUISprite ixuisprite = gameObject.transform.Find("Icon").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.ID = (ulong)num;
+ ixuisprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(XSingleton<UiUtility>.singleton.OnItemClick));
+ }
+ }
+
+ protected void RefreshItemState(uint taskid, ActivityTaskState state)
+ {
+ Transform parent = null;
+ bool flag = this._itemsDic.TryGetValue((ulong)taskid, out parent);
+ if (flag)
+ {
+ Transform childByName = this.GetChildByName(parent, "Fetch");
+ Transform childByName2 = this.GetChildByName(parent, "Go");
+ Transform childByName3 = this.GetChildByName(parent, "Fetched");
+ bool flag2 = state == ActivityTaskState.Uncomplete;
+ if (!flag2)
+ {
+ bool flag3 = state == ActivityTaskState.Complete;
+ if (flag3)
+ {
+ childByName2.gameObject.SetActive(false);
+ childByName.gameObject.SetActive(true);
+ }
+ else
+ {
+ bool flag4 = state == ActivityTaskState.Fetched;
+ if (flag4)
+ {
+ childByName.gameObject.SetActive(false);
+ childByName2.gameObject.SetActive(false);
+ childByName3.gameObject.SetActive(true);
+ }
+ }
+ }
+ }
+ }
+
+ protected void UpdateItemState(uint taskid, ActivityTaskState state)
+ {
+ for (int i = 0; i < this._sortList.Count; i++)
+ {
+ bool flag = this._sortList[i].id == (ulong)taskid;
+ if (flag)
+ {
+ bool flag2 = state == ActivityTaskState.Complete;
+ if (flag2)
+ {
+ this._sortList[i].state = FrozenSealState.CanFetch;
+ }
+ else
+ {
+ bool flag3 = state == ActivityTaskState.Fetched;
+ if (flag3)
+ {
+ this._sortList[i].state = FrozenSealState.Fetched;
+ }
+ }
+ }
+ }
+ }
+
+ protected FrozenSealState GetFrozenSealStateById(ulong id)
+ {
+ return FrozenSealState.CanFetch;
+ }
+
+ protected Transform GetChildByName(Transform parent, string name)
+ {
+ foreach (object obj in parent)
+ {
+ Transform transform = (Transform)obj;
+ bool flag = transform.name.Equals(name);
+ if (flag)
+ {
+ return transform;
+ }
+ }
+ XSingleton<XDebug>.singleton.AddErrorLog("wrong child name", null, null, null, null, null);
+ return null;
+ }
+
+ protected void RefreshAllItem()
+ {
+ this.UpdateTime();
+ this.RefreshAllStates();
+ this.SortListItems();
+ this._scrollview.SetPosition(0f);
+ }
+
+ public void UpdateTime()
+ {
+ int remainDays = XTempActivityDocument.Doc.GetRemainDays(this.curActid);
+ bool flag = remainDays == 1;
+ if (flag)
+ {
+ this._timeLabel.SetText(XStringDefineProxy.GetString("CarnivalLast"));
+ }
+ else
+ {
+ this._timeLabel.SetText(XStringDefineProxy.GetString("CarnivalEnd", new object[]
+ {
+ remainDays
+ }));
+ }
+ }
+
+ protected void UpdateStates()
+ {
+ for (int i = 0; i < XOperatingActivityDocument.Doc.SealDatas.Count; i++)
+ {
+ SuperActivityTask.RowData rowData = XOperatingActivityDocument.Doc.SealDatas[i];
+ FrozenSealHandler.FrozenSealSortData frozenSealSortData = this._sortList[i];
+ uint activityState = XTempActivityDocument.Doc.GetActivityState(this.curActid, rowData.taskid);
+ bool flag = activityState == 1u;
+ if (flag)
+ {
+ frozenSealSortData.state = FrozenSealState.CanFetch;
+ }
+ else
+ {
+ bool flag2 = activityState == 2u;
+ if (flag2)
+ {
+ frozenSealSortData.state = FrozenSealState.Fetched;
+ }
+ }
+ }
+ }
+
+ protected void RefreshAllStates()
+ {
+ List<SuperActivityTask.RowData> sealDatas = XOperatingActivityDocument.Doc.SealDatas;
+ for (int i = 0; i < sealDatas.Count; i++)
+ {
+ uint activityState = XTempActivityDocument.Doc.GetActivityState(this.curActid, sealDatas[i].taskid);
+ this.RefreshItemState(sealDatas[i].taskid, (ActivityTaskState)activityState);
+ this.UpdateItemState(sealDatas[i].taskid, (ActivityTaskState)activityState);
+ }
+ }
+
+ protected int SortItemList(FrozenSealHandler.FrozenSealSortData x1, FrozenSealHandler.FrozenSealSortData x2)
+ {
+ int num = (x1.state.CompareTo(x2.state) == 0) ? x1.id.CompareTo(x2.id) : x1.state.CompareTo(x2.state);
+ return -num;
+ }
+
+ public void SortListItems()
+ {
+ this._sortList.Sort(new Comparison<FrozenSealHandler.FrozenSealSortData>(this.SortItemList));
+ for (int i = 0; i < this._sortList.Count; i++)
+ {
+ this._itemsDic[this._sortList[i].id].name = i.ToString("D2");
+ this._itemsDic[this._sortList[i].id].localPosition = new Vector3(this._frozenSealPool.TplPos.x, this._frozenSealPool.TplPos.y - (float)(this._frozenSealPool.TplHeight * i), 0f);
+ }
+ }
+
+ public void InitScrollView()
+ {
+ this._scrollview = (base.transform.Find("Scrollview").GetComponent("XUIScrollView") as IXUIScrollView);
+ this._timeLabel = (base.transform.Find("CountDown/Time").GetComponent("XUILabel") as IXUILabel);
+ this._frozenSealPool.ReturnAll(false);
+ this._rewardPool.ReturnAll(false);
+ this._scrollview.SetPosition(0f);
+ List<SuperActivityTask.RowData> sealDatas = XOperatingActivityDocument.Doc.SealDatas;
+ for (int i = 0; i < sealDatas.Count; i++)
+ {
+ GameObject gameObject = this._frozenSealPool.FetchGameObject(false);
+ this.InitItemInfo(gameObject.transform, sealDatas[i]);
+ this._itemsDic.Add((ulong)sealDatas[i].taskid, gameObject.transform);
+ gameObject.transform.localPosition = new Vector3(this._frozenSealPool.TplPos.x, this._frozenSealPool.TplPos.y - (float)(this._frozenSealPool.TplHeight * i), 0f);
+ }
+ }
+
+ public void RefreshItemWithTaskidAndState(uint taskId, ActivityTaskState state)
+ {
+ this.UpdateItemState(taskId, state);
+ this.RefreshItemState(taskId, state);
+ this.SortListItems();
+ }
+
+ public void Clear()
+ {
+ this._itemsDic.Clear();
+ this._sortList.Clear();
+ this._rewardPool.ReturnAll(false);
+ this._frozenSealPool.ReturnAll(false);
+ }
+
+ private void InitUIPool()
+ {
+ Transform transform = base.transform.Find("Scrollview/FirstPassFsItem");
+ this._frozenSealPool.SetupPool(transform.parent.gameObject, transform.gameObject, 3u, false);
+ Transform transform2 = base.transform.Find("Scrollview/ItemTpl");
+ this._rewardPool.SetupPool(base.transform.gameObject, transform2.gameObject, 2u, false);
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/FrozenSealHandler.cs.meta b/Client/Assets/Scripts/XMainClient/UI/FrozenSealHandler.cs.meta
new file mode 100644
index 00000000..93418219
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/FrozenSealHandler.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: b047241c72750bc4d9b29c49a8e200fa
+timeCreated: 1611404350
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/FrozenSealState.cs b/Client/Assets/Scripts/XMainClient/UI/FrozenSealState.cs
new file mode 100644
index 00000000..5795e7bb
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/FrozenSealState.cs
@@ -0,0 +1,13 @@
+using System;
+
+namespace XMainClient.UI
+{
+ public enum FrozenSealState
+ {
+ None,
+ Fetched,
+ UnFinish,
+ LeaveFor,
+ CanFetch
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/FrozenSealState.cs.meta b/Client/Assets/Scripts/XMainClient/UI/FrozenSealState.cs.meta
new file mode 100644
index 00000000..a6d5d6b9
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/FrozenSealState.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: c61808cf2d2b7ef4d836822efdf7a07e
+timeCreated: 1611404507
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/FunctionDef.cs b/Client/Assets/Scripts/XMainClient/UI/FunctionDef.cs
new file mode 100644
index 00000000..47826660
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/FunctionDef.cs
@@ -0,0 +1,19 @@
+using System;
+
+namespace XMainClient.UI
+{
+ public enum FunctionDef
+ {
+ ZHANLI,
+ DENGJI,
+ FASHION,
+ JINBI,
+ LONGBI,
+ EQUIP,
+ QIANGHUA,
+ EMBLEM,
+ JADE,
+ SKILL,
+ END
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/FunctionDef.cs.meta b/Client/Assets/Scripts/XMainClient/UI/FunctionDef.cs.meta
new file mode 100644
index 00000000..3fcf772a
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/FunctionDef.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: d1e393f0f8a47c14abcb2f6adeeaba5d
+timeCreated: 1611404593
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/GVGBattleMemberBase.cs b/Client/Assets/Scripts/XMainClient/UI/GVGBattleMemberBase.cs
new file mode 100644
index 00000000..a62e837d
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/GVGBattleMemberBase.cs
@@ -0,0 +1,317 @@
+using System;
+using System.Collections.Generic;
+using KKSG;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class GVGBattleMemberBase : IGVGBattleMember
+ {
+ private Transform transform;
+
+ private IXUIWrapContent m_WrapContent;
+
+ private IXUIScrollView m_ScrollView;
+
+ private IXUILabelSymbol m_GuildName;
+
+ private XGuildArenaBattleDocument _Doc;
+
+ private XGuildDocument _GuildDoc;
+
+ private List<GmfRole> mRoles;
+
+ private int mIndex = 1;
+
+ private bool isSelfGuild = false;
+
+ private ulong needRemoveID;
+
+ public void Setup(GameObject sv, int index)
+ {
+ this.mIndex = index;
+ this._Doc = XDocuments.GetSpecificDocument<XGuildArenaBattleDocument>(XGuildArenaBattleDocument.uuID);
+ this._GuildDoc = XDocuments.GetSpecificDocument<XGuildDocument>(XGuildDocument.uuID);
+ this.transform = sv.transform;
+ this.m_GuildName = (this.transform.Find("Title/Title1").GetComponent("XUILabelSymbol") as IXUILabelSymbol);
+ this.m_ScrollView = (this.transform.Find("MemberScrollView").GetComponent("XUIScrollView") as IXUIScrollView);
+ this.m_WrapContent = (this.transform.Find("MemberScrollView/MemberList").GetComponent("XUIWrapContent") as IXUIWrapContent);
+ this.m_WrapContent.RegisterItemUpdateEventHandler(new WrapItemUpdateEventHandler(this.WrapItemUpdateEventHandler));
+ }
+
+ private void FormatRole(ref List<GmfRole> roles)
+ {
+ bool flag = roles == null;
+ if (flag)
+ {
+ roles = new List<GmfRole>();
+ }
+ int battleSignNumber = this._Doc.GetBattleSignNumber();
+ bool flag2 = roles.Count < battleSignNumber;
+ if (flag2)
+ {
+ int count = roles.Count;
+ for (int i = count; i < battleSignNumber; i++)
+ {
+ GmfRole gmfRole = new GmfRole();
+ gmfRole.rolename = XSingleton<XStringTable>.singleton.GetString("GUILD_ARENA_TAB_PERSON");
+ gmfRole.index = i;
+ gmfRole.roleID = 0UL;
+ gmfRole.profession = 0;
+ roles.Add(gmfRole);
+ }
+ }
+ }
+
+ public void ReFreshData(GVGBattleInfo battleInfo)
+ {
+ bool flag = battleInfo.Base == null || battleInfo.Group == null;
+ if (!flag)
+ {
+ bool flag2 = this.mRoles == null;
+ if (flag2)
+ {
+ this.mRoles = new List<GmfRole>();
+ }
+ this.mRoles.Clear();
+ this.mRoles.AddRange(battleInfo.Group);
+ this.FormatRole(ref this.mRoles);
+ this.isSelfGuild = (this._GuildDoc.bInGuild && this._GuildDoc.BasicData.uid == battleInfo.Base.guildid);
+ this.m_WrapContent.SetContentCount(this.mRoles.Count, false);
+ this.m_ScrollView.ResetPosition();
+ bool flag3 = this._Doc.IsGCF();
+ if (flag3)
+ {
+ this.m_GuildName.InputText = XStringDefineProxy.GetString("CROSS_GVG_GUILDNAME", new object[]
+ {
+ battleInfo.Base.serverid,
+ battleInfo.Base.guildname
+ });
+ }
+ else
+ {
+ this.m_GuildName.InputText = battleInfo.Base.guildname;
+ }
+ }
+ }
+
+ private void WrapItemUpdateEventHandler(Transform t, int index)
+ {
+ bool flag = index < 0 || index >= this.mRoles.Count;
+ if (!flag)
+ {
+ GmfRole gmfRole = this.mRoles[index];
+ bool flag2 = gmfRole == null;
+ if (flag2)
+ {
+ XSingleton<XDebug>.singleton.AddErrorLog("XMainClient.UI.GuildArenaBattleMemberPanel.WrapItemUpdateEventHandler is null ", null, null, null, null, null);
+ }
+ else
+ {
+ IXUILabel ixuilabel = t.Find("Status/Num").GetComponent("XUILabel") as IXUILabel;
+ IXUISprite ixuisprite = t.Find("Status/Battle").GetComponent("XUISprite") as IXUISprite;
+ IXUILabel ixuilabel2 = t.Find("Fight").GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel3 = t.Find("Name").GetComponent("XUILabel") as IXUILabel;
+ IXUISprite ixuisprite2 = t.Find("kick").GetComponent("XUISprite") as IXUISprite;
+ IXUISprite ixuisprite3 = t.Find("job").GetComponent("XUISprite") as IXUISprite;
+ GameObject gameObject = t.Find("icon").gameObject;
+ ixuilabel.SetText((index + 1).ToString());
+ ixuilabel3.SetText(gmfRole.rolename);
+ ixuisprite3.SetAlpha(1f);
+ ixuisprite3.SetSprite(XSingleton<XProfessionSkillMgr>.singleton.GetProfIcon(gmfRole.profession));
+ ixuisprite2.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnRemove));
+ ixuisprite2.ID = gmfRole.roleID;
+ bool flag3 = gmfRole.roleID == 0UL;
+ if (flag3)
+ {
+ ixuisprite.gameObject.SetActive(false);
+ ixuilabel2.gameObject.SetActive(false);
+ ixuisprite2.gameObject.SetActive(false);
+ gameObject.SetActive(false);
+ ixuilabel.SetVisible(true);
+ ixuilabel.SetColor(Color.white);
+ ixuilabel3.SetColor(Color.white);
+ ixuilabel2.SetColor(Color.white);
+ bool flag4 = ixuisprite3 != null;
+ if (flag4)
+ {
+ ixuisprite3.SetAlpha(0f);
+ }
+ }
+ else
+ {
+ ixuisprite.gameObject.SetActive(true);
+ ixuilabel2.gameObject.SetActive(true);
+ ixuisprite2.gameObject.SetActive(true);
+ gameObject.SetActive(true);
+ this.SetupOtherMemberInfo(t, gmfRole);
+ bool flag5 = this.isSelfGuild;
+ XGuildArenaBattleDocument.GuildArenaSection mArenaSection = this._Doc.mArenaSection;
+ if (mArenaSection != XGuildArenaBattleDocument.GuildArenaSection.Prepare)
+ {
+ if (mArenaSection == XGuildArenaBattleDocument.GuildArenaSection.Battle)
+ {
+ flag5 &= this.SetMatchFightState(gmfRole, ixuisprite, ixuilabel, ixuilabel3, ixuilabel2);
+ }
+ }
+ else
+ {
+ flag5 &= this.SetPrepareFightState(gmfRole, ixuisprite, ixuilabel, ixuilabel3);
+ }
+ bool flag6 = this._GuildDoc.Position != GuildPosition.GPOS_LEADER && this._GuildDoc.Position != GuildPosition.GPOS_VICELEADER;
+ if (flag6)
+ {
+ flag5 = false;
+ }
+ else
+ {
+ bool flag7 = this._GuildDoc.Position == GuildPosition.GPOS_VICELEADER;
+ if (flag7)
+ {
+ bool flag8 = gmfRole.guildpos == 0 || gmfRole.guildpos == 1;
+ if (flag8)
+ {
+ flag5 = false;
+ }
+ }
+ }
+ bool flag9 = gmfRole.roleID == XSingleton<XAttributeMgr>.singleton.XPlayerData.RoleID;
+ if (flag9)
+ {
+ flag5 = false;
+ }
+ bool flag10 = this._Doc.MyReadyType == XGuildArenaBattleDocument.ReadyType.Observer;
+ if (flag10)
+ {
+ flag5 = false;
+ }
+ ixuisprite2.gameObject.SetActive(flag5);
+ }
+ }
+ }
+ }
+
+ protected virtual void SetupOtherMemberInfo(Transform t, GmfRole role)
+ {
+ }
+
+ private void OnRemove(IXUISprite button)
+ {
+ this.needRemoveID = button.ID;
+ XSingleton<UiUtility>.singleton.ShowModalDialog(XStringDefineProxy.GetString("GUILD_ARENA_KICK"), XStringDefineProxy.GetString(XStringDefine.COMMON_OK), XStringDefineProxy.GetString("COMMON_CANCEL"), new ButtonClickEventHandler(this.OnRemoveQuery));
+ }
+
+ private bool OnRemoveQuery(IXUIButton btn)
+ {
+ DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.SetVisible(false, true);
+ bool flag = this.needRemoveID > 0UL;
+ if (flag)
+ {
+ this._Doc.ReadyReq(this.needRemoveID, GMFReadyType.GMF_READY_KICK);
+ }
+ this.needRemoveID = 0UL;
+ return true;
+ }
+
+ private bool SetPrepareFightState(GmfRole roleInfo, IXUISprite sprite, IXUILabel rank, IXUILabel name)
+ {
+ rank.gameObject.SetActive(true);
+ sprite.gameObject.SetActive(false);
+ Color color = Color.white;
+ bool flag = roleInfo.roleID == XSingleton<XAttributeMgr>.singleton.XPlayerData.RoleID;
+ if (flag)
+ {
+ color = Color.green;
+ }
+ name.SetColor(color);
+ return true;
+ }
+
+ private bool SetMatchFightState(GmfRole roleInfo, IXUISprite sprite, IXUILabel rank, IXUILabel name, IXUILabel fight)
+ {
+ bool result = true;
+ Color color = Color.white;
+ bool flag = roleInfo.roleID == XSingleton<XAttributeMgr>.singleton.XPlayerData.RoleID;
+ if (flag)
+ {
+ color = Color.green;
+ }
+ switch (roleInfo.state)
+ {
+ case GuildMatchFightState.GUILD_MF_WAITING:
+ {
+ sprite.gameObject.SetActive(false);
+ rank.gameObject.SetActive(true);
+ bool flag2 = this._GuildDoc.Position != GuildPosition.GPOS_LEADER && this._GuildDoc.Position != GuildPosition.GPOS_VICELEADER;
+ result = !flag2;
+ break;
+ }
+ case GuildMatchFightState.GUILD_MF_FIGHTING:
+ {
+ sprite.gameObject.SetActive(true);
+ rank.gameObject.SetActive(false);
+ bool flag3 = this.mIndex == 2;
+ string sprite2;
+ if (flag3)
+ {
+ sprite2 = "guildpvp_icon_4";
+ color = new Color(0.92f, 0.23f, 0.23f);
+ }
+ else
+ {
+ sprite2 = "guildpvp_icon_3";
+ color= new Color(0f, 0.658f, 1f);
+ }
+ sprite.SetSprite(sprite2);
+ result = false;
+ break;
+ }
+ case GuildMatchFightState.GUILD_MF_FAILED:
+ {
+ sprite.gameObject.SetActive(true);
+ rank.gameObject.SetActive(false);
+ string sprite2 = "guildpvp_icon_0";
+ sprite.SetSprite(sprite2);
+ color = Color.white;
+ result = false;
+ break;
+ }
+ }
+ rank.SetColor(color);
+ name.SetColor(color);
+ fight.SetColor(color);
+ return result;
+ }
+
+ public void OnUpdate()
+ {
+ }
+
+ public void SetActive(bool active)
+ {
+ bool flag = this.transform != null;
+ if (flag)
+ {
+ this.transform.gameObject.SetActive(active);
+ }
+ }
+
+ public bool IsActive()
+ {
+ return this.transform != null && this.transform.gameObject.activeSelf;
+ }
+
+ public void Recycle()
+ {
+ bool flag = this.mRoles != null;
+ if (flag)
+ {
+ this.mRoles.Clear();
+ this.mRoles = null;
+ }
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/GVGBattleMemberBase.cs.meta b/Client/Assets/Scripts/XMainClient/UI/GVGBattleMemberBase.cs.meta
new file mode 100644
index 00000000..d8376d65
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/GVGBattleMemberBase.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: e6eb60297399f2241aa724c70982d662
+timeCreated: 1611404747
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/GVGBattlePrepareBase.cs b/Client/Assets/Scripts/XMainClient/UI/GVGBattlePrepareBase.cs
new file mode 100644
index 00000000..846b270f
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/GVGBattlePrepareBase.cs
@@ -0,0 +1,599 @@
+using System;
+using System.Collections.Generic;
+using KKSG;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class GVGBattlePrepareBase<T, V> : DlgBase<T, V>, IGVGBattlePrepare, IXUIDlg where T : IXUIDlg, new() where V : GVGBattlePrepareBehaviour
+ {
+ public override int layer
+ {
+ get
+ {
+ return 1;
+ }
+ }
+
+ public override bool autoload
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ protected XGuildArenaBattleDocument _Doc;
+
+ private int m_leftTime = 0;
+
+ private uint m_leftTimerID = 0u;
+
+ private int blue_label_num = 0;
+
+ private int red_label_num = 0;
+
+ private bool blueState = true;
+
+ private XElapseTimer m_lastTime = new XElapseTimer();
+
+ private List<int> inspires = null;
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ this._Doc = XDocuments.GetSpecificDocument<XGuildArenaBattleDocument>(XGuildArenaBattleDocument.uuID);
+ this.SetResurgence(0);
+ bool flag = !DlgBase<BattleMain, BattleMainBehaviour>.singleton.IsVisible();
+ if (flag)
+ {
+ DlgBase<BattleMain, BattleMainBehaviour>.singleton.SetVisible(true, true);
+ }
+ this.RefreshSection();
+ this.blueState = true;
+ this.OnLeftToogle(null);
+ this.OnInitInspire();
+ }
+
+ private void OnInitInspire()
+ {
+ int num = 0;
+ float value = 0f;
+ bool progress = this.GetProgress(this._Doc.BlueInfo.Inspire, out num, out value);
+ if (progress)
+ {
+ base.SetXUILable("Battle/Encourage/Blue/Time", XSingleton<XCommon>.singleton.StringCombine("x", num.ToString()));
+ base.uiBehaviour.mBlueCourageBar.Value = value;
+ }
+ bool progress2 = this.GetProgress(this._Doc.RedInfo.Inspire, out num, out value);
+ if (progress2)
+ {
+ base.SetXUILable("Battle/Encourage/Red/Time", XSingleton<XCommon>.singleton.StringCombine("x", num.ToString()));
+ base.uiBehaviour.mRedCourageBar.Value = value;
+ }
+ }
+
+ protected override void OnHide()
+ {
+ base.OnHide();
+ this.SetResurgence(0);
+ this.ResetCommonUI();
+ }
+
+ protected override void OnUnload()
+ {
+ bool flag = base.uiBehaviour.mBluePanel != null;
+ if (flag)
+ {
+ base.uiBehaviour.mBluePanel.Recycle();
+ base.uiBehaviour.mBluePanel = null;
+ }
+ this.ResetCommonUI();
+ base.OnUnload();
+ }
+
+ public override void OnUpdate()
+ {
+ this.UpdateCountTime();
+ this.UpdateInspireTime();
+ bool bSpectator = XSingleton<XScene>.singleton.bSpectator;
+ if (bSpectator)
+ {
+ bool flag = DlgBase<SpectateSceneView, SpectateSceneBehaviour>.singleton.IsLoaded();
+ if (flag)
+ {
+ DlgBase<SpectateSceneView, SpectateSceneBehaviour>.singleton.LeftTime.SetVisible(false);
+ }
+ }
+ else
+ {
+ bool flag2 = DlgBase<BattleMain, BattleMainBehaviour>.singleton.IsLoaded();
+ if (flag2)
+ {
+ DlgBase<BattleMain, BattleMainBehaviour>.singleton.WarTimeLabel.SetVisible(false);
+ DlgBase<BattleMain, BattleMainBehaviour>.singleton.LeftTimeLabel.SetVisible(false);
+ }
+ }
+ }
+
+ protected override void OnLoad()
+ {
+ base.uiBehaviour.mInspireCD = new GuildArenaInspireCD(base.uiBehaviour.mEncourageButton.transform);
+ base.uiBehaviour.mBattleDuelInfo = new GuildArenaBattleDuelInfo();
+ base.uiBehaviour.mBattleDuelInfo.Init(base.uiBehaviour.mCombatInfo);
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ base.uiBehaviour.mLetmedieUpSpr.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnUp));
+ base.uiBehaviour.mLetmedieDownSpr.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnDown));
+ base.uiBehaviour.mEncourageSpr.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnInspireReq));
+ base.uiBehaviour.mHelpSpr.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnHelp));
+ base.uiBehaviour.mLeftCloseSpr.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnLeftToogle));
+ }
+
+ public override void OnXNGUIClick(GameObject obj, string path)
+ {
+ base.OnXNGUIClick(obj, path);
+ }
+
+ private void OnLeftToogle(IXUISprite spr)
+ {
+ bool flag = this.blueState;
+ if (flag)
+ {
+ this.m_uiBehaviour.mBlueView.transform.localPosition = new Vector3(-413f, 49f, 0f);
+ base.uiBehaviour.mUpSprite.transform.localPosition = new Vector3(-406f, -160f, 0f);
+ base.uiBehaviour.mDownSprite.transform.localPosition = new Vector3(-406f, -160f, 0f);
+ base.uiBehaviour.mDownTips.transform.localPosition = new Vector3(-406f, -112f, 0f);
+ base.uiBehaviour.mUpTips.transform.localPosition = new Vector3(-406f, -112f, 0f);
+ this.blueState = false;
+ }
+ else
+ {
+ this.m_uiBehaviour.mBlueView.transform.localPosition = new Vector3(-665f, 49f, 0f);
+ base.uiBehaviour.mUpSprite.transform.localPosition = new Vector3(-740f, -160f, 0f);
+ base.uiBehaviour.mDownSprite.transform.localPosition = new Vector3(-740f, -160f, 0f);
+ base.uiBehaviour.mUpTips.transform.localPosition = new Vector3(-740f, -112f, 0f);
+ base.uiBehaviour.mDownTips.transform.localPosition = new Vector3(-740f, -112f, 0f);
+ this.blueState = true;
+ }
+ }
+
+ public void OnEnterSceneFinally()
+ {
+ bool flag = !base.IsLoaded();
+ if (!flag)
+ {
+ this.RefreshSection();
+ }
+ }
+
+ private void RefreshCommonUI()
+ {
+ bool bSpectator = XSingleton<XScene>.singleton.bSpectator;
+ if (bSpectator)
+ {
+ bool flag = DlgBase<SpectateSceneView, SpectateSceneBehaviour>.singleton.IsLoaded();
+ if (flag)
+ {
+ DlgBase<SpectateSceneView, SpectateSceneBehaviour>.singleton.LeftTime.SetVisible(false);
+ }
+ }
+ else
+ {
+ bool flag2 = DlgBase<BattleMain, BattleMainBehaviour>.singleton.IsLoaded() && DlgBase<BattleMain, BattleMainBehaviour>.singleton.IsVisible();
+ if (flag2)
+ {
+ DlgBase<BattleMain, BattleMainBehaviour>.singleton.SkillHandler.SetVisible(false);
+ DlgBase<BattleMain, BattleMainBehaviour>.singleton.IndicateHandler.SetVisible(false);
+ DlgBase<BattleMain, BattleMainBehaviour>.singleton.WarTimeLabel.SetVisible(false);
+ DlgBase<BattleMain, BattleMainBehaviour>.singleton.LeftTimeLabel.SetVisible(false);
+ }
+ }
+ }
+
+ private void ResetCommonUI()
+ {
+ bool flag = DlgBase<BattleMain, BattleMainBehaviour>.singleton.IsLoaded() && DlgBase<BattleMain, BattleMainBehaviour>.singleton.IsVisible();
+ if (flag)
+ {
+ DlgBase<BattleMain, BattleMainBehaviour>.singleton.SkillHandler.SetVisible(true);
+ DlgBase<BattleMain, BattleMainBehaviour>.singleton.IndicateHandler.SetVisible(true);
+ DlgBase<BattleMain, BattleMainBehaviour>.singleton.WarTimeLabel.SetVisible(true);
+ DlgBase<BattleMain, BattleMainBehaviour>.singleton.LeftTimeLabel.SetVisible(true);
+ }
+ bool bSpectator = XSingleton<XScene>.singleton.bSpectator;
+ if (bSpectator)
+ {
+ bool flag2 = DlgBase<SpectateSceneView, SpectateSceneBehaviour>.singleton.IsLoaded();
+ if (flag2)
+ {
+ DlgBase<SpectateSceneView, SpectateSceneBehaviour>.singleton.LeftTime.SetVisible(true);
+ }
+ }
+ }
+
+ public void RefreshSection()
+ {
+ this.RefreshCommonUI();
+ XGuildArenaBattleDocument.GuildArenaSection mArenaSection = this._Doc.mArenaSection;
+ if (mArenaSection != XGuildArenaBattleDocument.GuildArenaSection.Prepare)
+ {
+ if (mArenaSection == XGuildArenaBattleDocument.GuildArenaSection.Battle)
+ {
+ base.uiBehaviour.mGoPrepare.SetActive(false);
+ base.uiBehaviour.mGoBattle.SetActive(true);
+ this.ShowOrHideLetmedie(false);
+ base.uiBehaviour.mRoundLabel.SetVisible(this._Doc.IsGPR() || this._Doc.IsGCF());
+ base.uiBehaviour.mRoundLabel.SetText(XStringDefineProxy.GetString("GUILD_ARENA_ROUNDLABEL", new object[]
+ {
+ this._Doc.Round + 1u
+ }));
+ }
+ }
+ else
+ {
+ base.uiBehaviour.mGoPrepare.SetActive(true);
+ base.uiBehaviour.mGoBattle.SetActive(false);
+ this.ShowOrHideLetmedie(true);
+ base.uiBehaviour.mRoundLabel.SetVisible(false);
+ }
+ this.OnSectionShow();
+ }
+
+ private void ShowOrHideLetmedie(bool isActive)
+ {
+ base.uiBehaviour.mDownSprite.SetVisible(isActive);
+ base.uiBehaviour.mUpSprite.SetVisible(isActive);
+ base.uiBehaviour.mUpTips.SetActive(isActive);
+ base.uiBehaviour.mDownTips.SetActive(isActive);
+ }
+
+ private void InPlayerLetmedie(bool isActive)
+ {
+ base.uiBehaviour.mDownSprite.SetVisible(!isActive);
+ base.uiBehaviour.mDownTips.SetActive(!isActive);
+ base.uiBehaviour.mUpSprite.SetVisible(isActive);
+ base.uiBehaviour.mUpTips.SetActive(isActive);
+ }
+
+ public void OnSectionShow()
+ {
+ bool bSpectator = XSingleton<XScene>.singleton.bSpectator;
+ if (bSpectator)
+ {
+ base.uiBehaviour.mGoBg.SetActive(this._Doc.IsGMF());
+ this.ShowOrHideLetmedie(false);
+ }
+ else
+ {
+ base.uiBehaviour.mEncourageButton.SetActive(false);
+ }
+ XGuildArenaBattleDocument.GuildArenaSection mArenaSection = this._Doc.mArenaSection;
+ if (mArenaSection != XGuildArenaBattleDocument.GuildArenaSection.Prepare)
+ {
+ if (mArenaSection == XGuildArenaBattleDocument.GuildArenaSection.Battle)
+ {
+ this.SectionShowBattle();
+ }
+ }
+ else
+ {
+ this.SectionShowReady();
+ }
+ this.SelectionPattern();
+ this.ReFreshGroup();
+ }
+
+ protected virtual void SelectionPattern()
+ {
+ }
+
+ protected virtual void SectionShowReady()
+ {
+ this.RefreshCommonUI();
+ base.uiBehaviour.mGoBg.SetActive(true);
+ base.SetXUILable("Prepare/T", XSingleton<XStringTable>.singleton.GetString("GUILD_ARENA_READY"));
+ switch (this._Doc.MyReadyType)
+ {
+ case XGuildArenaBattleDocument.ReadyType.Ready:
+ this.InPlayerLetmedie(false);
+ break;
+ case XGuildArenaBattleDocument.ReadyType.NoReady:
+ this.InPlayerLetmedie(true);
+ break;
+ case XGuildArenaBattleDocument.ReadyType.Observer:
+ this.ShowOrHideLetmedie(false);
+ break;
+ }
+ }
+
+ protected virtual void SectionShowBattle()
+ {
+ base.uiBehaviour.mGoBg.SetActive(false);
+ this.ShowOrHideLetmedie(false);
+ base.uiBehaviour.mEncourageButton.SetActive(false);
+ bool bSpectator = XSingleton<XScene>.singleton.bSpectator;
+ if (bSpectator)
+ {
+ bool flag = this._Doc.MyReadyType == XGuildArenaBattleDocument.ReadyType.NoReady || this._Doc.MyReadyType == XGuildArenaBattleDocument.ReadyType.Ready;
+ if (flag)
+ {
+ base.uiBehaviour.mGoBg.SetActive(this._Doc.IsGMF());
+ base.uiBehaviour.mEncourageButton.SetActive(true);
+ }
+ }
+ bool flag2 = this._Doc.MyFightState == GuildMatchFightState.GUILD_MF_FIGHTING;
+ if (flag2)
+ {
+ base.uiBehaviour.mEncourageButton.SetActive(false);
+ bool flag3 = DlgBase<BattleMain, BattleMainBehaviour>.singleton.IsLoaded();
+ if (flag3)
+ {
+ DlgBase<BattleMain, BattleMainBehaviour>.singleton.SkillHandler.SetVisible(true);
+ DlgBase<BattleMain, BattleMainBehaviour>.singleton.IndicateHandler.SetVisible(true);
+ DlgBase<BattleMain, BattleMainBehaviour>.singleton.WarTimeLabel.SetVisible(false);
+ DlgBase<BattleMain, BattleMainBehaviour>.singleton.LeftTimeLabel.SetVisible(false);
+ }
+ }
+ }
+
+ private void OnHelp(IXUISprite spr)
+ {
+ DlgBase<XCommonHelpTipView, XCommonHelpTipBehaviour>.singleton.ShowHelp(XSysDefine.XSys_Arena);
+ }
+
+ public void RefreahCountTime(float time)
+ {
+ this.m_lastTime.LeftTime = time;
+ bool flag = DlgBase<BattleMain, BattleMainBehaviour>.singleton.IsLoaded() && DlgBase<BattleMain, BattleMainBehaviour>.singleton.IsVisible();
+ if (flag)
+ {
+ DlgBase<BattleMain, BattleMainBehaviour>.singleton.HideLeftTime();
+ }
+ }
+
+ private void UpdateCountTime()
+ {
+ this.m_lastTime.Update();
+ bool flag = this.m_lastTime.LeftTime > 0f;
+ if (flag)
+ {
+ base.SetXUILable("Time/countdown", XSingleton<UiUtility>.singleton.TimeFormatString((int)this.m_lastTime.LeftTime, 2, 3, 4, false, true));
+ }
+ }
+
+ private void OnUp(IXUISprite spr)
+ {
+ bool bCantUpForKicked = this._Doc.bCantUpForKicked;
+ if (bCantUpForKicked)
+ {
+ double num = 0.0;
+ bool flag = this._Doc._kicked_token > 0u;
+ if (flag)
+ {
+ num = XSingleton<XTimerMgr>.singleton.TimeLeft(this._Doc._kicked_token);
+ }
+ string text = string.Format(XSingleton<XStringTable>.singleton.GetString("GUILD_ARENA_UP_HINT_BY_KICKED"), num.ToString("f0"));
+ XSingleton<UiUtility>.singleton.ShowSystemTip(text, "fece00");
+ }
+ else
+ {
+ bool flag2 = this._Doc.BlueInfo.Size >= this._Doc.GetBattleSignNumber();
+ if (flag2)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XSingleton<XStringTable>.singleton.GetString("GUILD_ARENA_TAB_FULL"), "fece00");
+ }
+ else
+ {
+ this._Doc.ReadyReq(XSingleton<XAttributeMgr>.singleton.XPlayerData.RoleID, GMFReadyType.GMF_READY_UP);
+ }
+ }
+ }
+
+ private void OnDown(IXUISprite spr)
+ {
+ this._Doc.ReadyReq(XSingleton<XAttributeMgr>.singleton.XPlayerData.RoleID, GMFReadyType.GMF_READY_DOWN);
+ }
+
+ public void UpdateDownUp()
+ {
+ switch (this._Doc.MyReadyType)
+ {
+ case XGuildArenaBattleDocument.ReadyType.Ready:
+ this.InPlayerLetmedie(false);
+ base.SetXUILable("Bg/LetmedieDownBg/T", XSingleton<XStringTable>.singleton.GetString("GUILD_ARENA_DOWN_HINT"));
+ break;
+ case XGuildArenaBattleDocument.ReadyType.NoReady:
+ this.InPlayerLetmedie(true);
+ base.SetXUILable("Bg/LetmedieDownBg/T", "");
+ break;
+ case XGuildArenaBattleDocument.ReadyType.Observer:
+ this.ShowOrHideLetmedie(false);
+ base.SetXUILable("Bg/LetmedieDownBg/T", XSingleton<XStringTable>.singleton.GetString("GUILD_ARENA_UP_HINT"));
+ break;
+ }
+ base.uiBehaviour.mUpSprite.SetGrey(!this._Doc.bCantUpForKicked);
+ base.uiBehaviour.mDownSprite.SetGrey(!this._Doc.bCantUpForKicked);
+ }
+
+ public virtual void ReFreshGroup()
+ {
+ XSingleton<XDebug>.singleton.AddGreenLog("targetBlueCourage:", this._Doc.BlueInfo.Inspire.ToString(), " targetRedCourage", this._Doc.RedInfo.Inspire.ToString(), null, null);
+ this.SetProgress(this._Doc.BlueInfo.Inspire, base.uiBehaviour.mBlueCourageBar, ref this.blue_label_num, "Battle/Encourage/Blue/Time", base.uiBehaviour.BlueInspireTween, base.uiBehaviour.mBlueCourage, "Effects/FX_Particle/UIfx/UI_GuildArenaPrepareDlg_Blue");
+ this.SetProgress(this._Doc.RedInfo.Inspire, base.uiBehaviour.mRedCourageBar, ref this.red_label_num, "Battle/Encourage/Red/Time", base.uiBehaviour.RedInspireTween, base.uiBehaviour.mRedCourage, "Effects/FX_Particle/UIfx/UI_GuildArenaPrepareDlg_Red");
+ base.uiBehaviour.mBluePanel.ReFreshData(this._Doc.BlueInfo);
+ bool flag = this._Doc.Pattern == GuildArenaBattlePattern.GMF;
+ if (flag)
+ {
+ base.SetXUILable("Battle/Score/Bluenum", this._Doc.GMFGroupBlueMatchPoint.ToString());
+ base.SetXUILable("Battle/Score/Rednum", this._Doc.GMFGroupRedMatchPoint.ToString());
+ }
+ else
+ {
+ base.uiBehaviour.mBattleDuelInfo.RedInfo.Set(this._Doc.redCombatInfo);
+ base.uiBehaviour.mBattleDuelInfo.BlueInfo.Set(this._Doc.blueCombatInfo);
+ }
+ this.UpdateDownUp();
+ }
+
+ private void UpdateInspireTime()
+ {
+ bool flag = base.uiBehaviour.mInspireCD != null;
+ if (flag)
+ {
+ base.uiBehaviour.mInspireCD.ExcuteInspireCD(this._Doc.InspireCDTime);
+ }
+ }
+
+ private void OnInspireReq(IXUISprite spr)
+ {
+ bool flag = this._Doc.InspireCDTime > 0.0;
+ if (flag)
+ {
+ string @string = XStringDefineProxy.GetString("GUILD_ARENA_UP_HINT_BY_INSPIRT", new object[]
+ {
+ this._Doc.InspireCDTime.ToString("f0")
+ });
+ XSingleton<UiUtility>.singleton.ShowSystemTip(@string, "fece00");
+ }
+ else
+ {
+ this._Doc.InspireReq();
+ }
+ }
+
+ public void RefreshInspire()
+ {
+ bool flag = this._Doc.fxEncourageButton != null;
+ if (flag)
+ {
+ this._Doc.fxEncourageButton.Play(base.uiBehaviour.mEncourageButton.transform, Vector3.zero, Vector3.one, 1f, true, false);
+ }
+ bool flag2 = this._Doc.fxEncourageProgressAdd != null;
+ if (flag2)
+ {
+ this._Doc.fxEncourageProgressAdd.Play(base.uiBehaviour.mEncourageButton.transform, Vector3.zero, Vector3.one, 1f, true, false);
+ }
+ }
+
+ private bool GetProgress(float spiritCount, out int label, out float progress)
+ {
+ label = 0;
+ progress = 0f;
+ bool flag = this.inspires == null;
+ if (flag)
+ {
+ this.inspires = XSingleton<XGlobalConfig>.singleton.GetIntList("GuildArenaInspireCount");
+ }
+ bool flag2 = this.inspires == null;
+ bool result;
+ if (flag2)
+ {
+ XSingleton<XDebug>.singleton.AddErrorLog("XMainClient.UI.GuildArenaBattlePrepareDlg.GetProgress inspires == null", null, null, null, null, null);
+ result = false;
+ }
+ else
+ {
+ int num = 0;
+ int num2 = 0;
+ int i = 0;
+ int count = this.inspires.Count;
+ while (i < count)
+ {
+ bool flag3 = spiritCount <= (float)this.inspires[i];
+ if (flag3)
+ {
+ label = i;
+ num = this.inspires[i];
+ break;
+ }
+ num2 = this.inspires[i];
+ i++;
+ }
+ bool flag4 = spiritCount >= (float)num;
+ if (flag4)
+ {
+ spiritCount = (float)num;
+ }
+ progress = (spiritCount - (float)num2) / (float)(num - num2);
+ result = true;
+ }
+ return result;
+ }
+
+ private void SetProgress(float cour, IXUISlider progress, ref int cur_label_num, string labelName, GameObject labelTween, GameObject effectParent, string effectName)
+ {
+ int num = 0;
+ float value = 0f;
+ bool progress2 = this.GetProgress(cour, out num, out value);
+ if (progress2)
+ {
+ progress.Value = value;
+ base.SetXUILable(labelName, num.ToString());
+ bool flag = cur_label_num != num;
+ if (flag)
+ {
+ cur_label_num = num;
+ bool flag2 = this._Doc.fxEncourageProgressNum != null;
+ if (flag2)
+ {
+ this._Doc.fxEncourageProgressNum.Play(labelTween.transform, Vector3.zero, Vector3.one, 1f, true, false);
+ }
+ bool flag3 = this._Doc.fxEncourageProgressAdd != null;
+ if (flag3)
+ {
+ this._Doc.fxEncourageProgressAdd.Play(base.uiBehaviour.mEncourageButtonBg.transform, Vector3.zero, Vector3.one, 1f, true, false);
+ }
+ bool flag4 = !string.IsNullOrEmpty(effectName);
+ if (flag4)
+ {
+ XSingleton<XFxMgr>.singleton.CreateAndPlay(effectName, effectParent.transform, Vector3.zero, Vector3.one, 1f, true, 3f, true);
+ }
+ }
+ }
+ }
+
+ public void SetResurgence(int leftTime)
+ {
+ this.m_leftTime = leftTime;
+ this.SetResurgenceTime(this.m_leftTime);
+ }
+
+ private void SetResurgenceTime(int time)
+ {
+ bool flag = time > 0;
+ base.uiBehaviour.mLeftTime.SetVisible(flag);
+ bool flag2 = flag;
+ if (flag2)
+ {
+ base.uiBehaviour.mLeftTime.SetText(time.ToString());
+ this.m_leftTimerID = XSingleton<XTimerMgr>.singleton.SetTimer(1f, new XTimerMgr.ElapsedEventHandler(this.UpdateTimeFrame), null);
+ this.SetupOtherResurgence();
+ }
+ else
+ {
+ bool flag3 = this.m_leftTimerID > 0u;
+ if (flag3)
+ {
+ XSingleton<XTimerMgr>.singleton.KillTimer(this.m_leftTimerID);
+ }
+ }
+ }
+
+ protected virtual void SetupOtherResurgence()
+ {
+ }
+
+ private void UpdateTimeFrame(object o)
+ {
+ this.m_leftTime--;
+ this.SetResurgence(this.m_leftTime);
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/GVGBattlePrepareBase.cs.meta b/Client/Assets/Scripts/XMainClient/UI/GVGBattlePrepareBase.cs.meta
new file mode 100644
index 00000000..aa7ddca5
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/GVGBattlePrepareBase.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: b51ff48fa84b4db47ad9e87b4d573cc0
+timeCreated: 1611404394
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/GVGBattlePrepareBehaviour.cs b/Client/Assets/Scripts/XMainClient/UI/GVGBattlePrepareBehaviour.cs
new file mode 100644
index 00000000..fa59385d
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/GVGBattlePrepareBehaviour.cs
@@ -0,0 +1,104 @@
+using System;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+
+namespace XMainClient.UI
+{
+ internal class GVGBattlePrepareBehaviour : DlgBehaviourBase
+ {
+ protected internal GameObject mBlueView;
+
+ protected internal IXUISlider mBlueCourageBar;
+
+ protected internal IXUISlider mRedCourageBar;
+
+ protected internal GameObject BlueInspireTween = null;
+
+ protected internal GameObject RedInspireTween = null;
+
+ protected internal GameObject mUp;
+
+ protected internal GameObject mDown;
+
+ protected internal IXUISprite mUpSprite;
+
+ protected internal IXUISprite mDownSprite;
+
+ protected internal GameObject mUpTips;
+
+ protected internal GameObject mDownTips;
+
+ protected internal GameObject mGoPrepare = null;
+
+ protected internal GameObject mGoBattle = null;
+
+ protected internal GameObject mGoBg = null;
+
+ protected internal IGVGBattleMember mBluePanel;
+
+ protected internal GuildArenaInspireCD mInspireCD;
+
+ protected internal GameObject mEncourageButton;
+
+ protected internal GameObject mEncourageButtonBg;
+
+ protected internal Transform mCombatInfo;
+
+ protected internal GameObject mCombatScore;
+
+ protected internal IXUILabel mLeftTime;
+
+ protected internal IXUILabel mRoundLabel;
+
+ protected internal GameObject mBlueCourage;
+
+ protected internal GameObject mRedCourage;
+
+ protected internal GuildArenaBattleDuelInfo mBattleDuelInfo;
+
+ protected internal Transform mBattleSkillTransform;
+
+ protected internal IXUISprite mLetmedieUpSpr;
+
+ protected internal IXUISprite mLetmedieDownSpr;
+
+ protected internal IXUISprite mEncourageSpr;
+
+ protected internal IXUISprite mHelpSpr;
+
+ protected internal IXUISprite mLeftCloseSpr;
+
+ protected virtual void Awake()
+ {
+ this.mGoBg = base.transform.Find("Bg").gameObject;
+ this.mGoPrepare = base.transform.Find("Prepare").gameObject;
+ this.mGoBattle = base.transform.Find("Battle").gameObject;
+ this.mCombatInfo = base.transform.Find("Battle/Info");
+ this.mCombatScore = base.transform.Find("Battle/Score").gameObject;
+ this.mBlueView = base.transform.Find("Bg/LeftView").gameObject;
+ this.mBlueCourage = base.transform.Find("Battle/Encourage/Blue").gameObject;
+ this.mRedCourage = base.transform.Find("Battle/Encourage/Red").gameObject;
+ this.mBlueCourageBar = (base.transform.Find("Battle/Encourage/Blue/Bar").GetComponent("XUISlider") as IXUISlider);
+ this.mRedCourageBar = (base.transform.Find("Battle/Encourage/Red/Bar").GetComponent("XUISlider") as IXUISlider);
+ this.mUp = base.transform.Find("Bg/LetmedieUp").gameObject;
+ this.mUpSprite = (this.mUp.GetComponent("XUISprite") as IXUISprite);
+ this.mDown = base.transform.Find("Bg/LetmedieDown").gameObject;
+ this.mDownSprite = (this.mDown.GetComponent("XUISprite") as IXUISprite);
+ this.BlueInspireTween = base.transform.Find("Battle/Encourage/Blue/Time").gameObject;
+ this.RedInspireTween = base.transform.Find("Battle/Encourage/Red/Time").gameObject;
+ this.mEncourageButton = base.transform.Find("Battle/GuildMember/Encourage").gameObject;
+ this.mEncourageButtonBg = base.transform.Find("Battle/Encourage/Bg1").gameObject;
+ this.mLeftTime = (base.transform.Find("LeftTime").GetComponent("XUILabel") as IXUILabel);
+ this.mRoundLabel = (base.transform.Find("GuildAreanStage").GetComponent("XUILabel") as IXUILabel);
+ this.mBattleSkillTransform = base.transform.Find("KillInfo");
+ this.mLetmedieUpSpr = (this.mGoBg.transform.Find("LetmedieUp").GetComponent("XUISprite") as IXUISprite);
+ this.mLetmedieDownSpr = (this.mGoBg.transform.Find("LetmedieDown").GetComponent("XUISprite") as IXUISprite);
+ this.mUpTips = base.transform.Find("Bg/LetmedieUpBg").gameObject;
+ this.mDownTips = base.transform.Find("Bg/LetmedieDownBg").gameObject;
+ this.mEncourageSpr = (base.transform.Find("Battle/GuildMember/Encourage").GetComponent("XUISprite") as IXUISprite);
+ this.mHelpSpr = (base.transform.Find("Prepare/Help").GetComponent("XUISprite") as IXUISprite);
+ this.mLeftCloseSpr = (this.mGoBg.transform.Find("LeftView/close").GetComponent("XUISprite") as IXUISprite);
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/GVGBattlePrepareBehaviour.cs.meta b/Client/Assets/Scripts/XMainClient/UI/GVGBattlePrepareBehaviour.cs.meta
new file mode 100644
index 00000000..744c2335
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/GVGBattlePrepareBehaviour.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 19f7cf1ee3b45294e88a05f35d16b388
+timeCreated: 1611403307
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/GVGBattleRankFrameBase.cs b/Client/Assets/Scripts/XMainClient/UI/GVGBattleRankFrameBase.cs
new file mode 100644
index 00000000..602fca8c
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/GVGBattleRankFrameBase.cs
@@ -0,0 +1,133 @@
+using System;
+using System.Collections.Generic;
+using KKSG;
+using UILib;
+using UnityEngine;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class GVGBattleRankFrameBase : IGVGBattleMember
+ {
+ private int _index = 0;
+
+ private IXUIScrollView _scrollView;
+
+ private IXUIWrapContent _wrapContent;
+
+ private GameObject _gameObject;
+
+ private Transform _transform;
+
+ private List<GmfRole> _roles;
+
+ private GVGBattleInfo _battleInfo;
+
+ public void ReFreshData(GVGBattleInfo battleInfo)
+ {
+ this._battleInfo = battleInfo;
+ bool flag = this._roles == null;
+ if (flag)
+ {
+ this._roles = new List<GmfRole>();
+ }
+ else
+ {
+ this._roles.Clear();
+ }
+ bool flag2 = battleInfo.Group != null;
+ if (flag2)
+ {
+ this._roles.AddRange(battleInfo.Group);
+ }
+ this._wrapContent.SetContentCount(this._roles.Count, false);
+ this._wrapContent.RefreshAllVisibleContents();
+ }
+
+ public void Setup(GameObject sv, int index)
+ {
+ this._index = index;
+ this._gameObject = sv;
+ this._transform = sv.transform;
+ this._scrollView = (this._transform.GetComponent("XUIScrollView") as IXUIScrollView);
+ this._wrapContent = (this._transform.Find("RankList").GetComponent("XUIWrapContent") as IXUIWrapContent);
+ this._wrapContent.RegisterItemUpdateEventHandler(new WrapItemUpdateEventHandler(this._OnWrapContentUpdate));
+ }
+
+ private void _OnWrapContentUpdate(Transform t, int index)
+ {
+ bool flag = this._roles.Count <= index;
+ if (!flag)
+ {
+ IXUIProgress ixuiprogress = t.Find("HpBar").GetComponent("XUIProgress") as IXUIProgress;
+ IXUILabel ixuilabel = t.Find("Name").GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel2 = t.Find("KillValue").GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel3 = t.Find("DieValue").GetComponent("XUILabel") as IXUILabel;
+ IXUISprite ixuisprite = t.Find("job").GetComponent("XUISprite") as IXUISprite;
+ GmfRole gmfRole = this._roles[index];
+ ixuisprite.SetSprite(XSingleton<XProfessionSkillMgr>.singleton.GetProfIcon(gmfRole.profession));
+ ixuilabel.SetText(gmfRole.rolename);
+ GmfCombat gmfCombat = null;
+ bool flag2 = this._battleInfo != null && this._battleInfo.TryGetCombat(gmfRole.roleID, out gmfCombat);
+ if (flag2)
+ {
+ ixuilabel2.SetText(gmfCombat.killcount.ToString());
+ ixuilabel3.SetText(gmfCombat.deadcount.ToString());
+ }
+ else
+ {
+ ixuilabel2.SetText("0");
+ ixuilabel3.SetText("0");
+ }
+ XEntity entity = XSingleton<XEntityMgr>.singleton.GetEntity(gmfRole.roleID);
+ float value = 1f;
+ bool flag3 = entity != null && entity.Attributes != null;
+ if (flag3)
+ {
+ int num = (int)entity.Attributes.GetAttr(XAttributeDefine.XAttr_MaxHP_Total);
+ int num2 = (int)entity.Attributes.GetAttr(XAttributeDefine.XAttr_CurrentHP_Basic);
+ bool flag4 = num2 < 0;
+ if (flag4)
+ {
+ num2 = 0;
+ }
+ value = (float)num2 / (float)num;
+ }
+ ixuiprogress.value = value;
+ }
+ }
+
+ public void OnUpdate()
+ {
+ bool flag = !this.IsActive();
+ if (!flag)
+ {
+ this._wrapContent.RefreshAllVisibleContents();
+ }
+ }
+
+ public void SetActive(bool active)
+ {
+ bool flag = this._transform != null;
+ if (flag)
+ {
+ this._transform.gameObject.SetActive(active);
+ }
+ }
+
+ public bool IsActive()
+ {
+ return this._transform != null && this._transform.gameObject.activeSelf;
+ }
+
+ public void Recycle()
+ {
+ bool flag = this._roles != null;
+ if (flag)
+ {
+ this._roles.Clear();
+ this._roles = null;
+ }
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/GVGBattleRankFrameBase.cs.meta b/Client/Assets/Scripts/XMainClient/UI/GVGBattleRankFrameBase.cs.meta
new file mode 100644
index 00000000..6adbcc99
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/GVGBattleRankFrameBase.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 43dfb4206547cf549bb47b693b5c8dc1
+timeCreated: 1611403643
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/GVGCombatGuildDisplay.cs b/Client/Assets/Scripts/XMainClient/UI/GVGCombatGuildDisplay.cs
new file mode 100644
index 00000000..f380b96c
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/GVGCombatGuildDisplay.cs
@@ -0,0 +1,157 @@
+using System;
+using KKSG;
+using UILib;
+using UnityEngine;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class GVGCombatGuildDisplay
+ {
+ private IXUILabel m_GuildNameLabel;
+
+ private IXUISprite m_GuildHeadSprite;
+
+ private IXUISprite m_unKnowSprite;
+
+ private Transform _Support;
+
+ private XGuildBasicData _baseData;
+
+ public void Setup(Transform t)
+ {
+ this.m_GuildNameLabel = (t.Find("txt_GuildName").GetComponent("XUILabel") as IXUILabel);
+ this.m_GuildHeadSprite = (t.Find("GuildIcon").GetComponent("XUISprite") as IXUISprite);
+ this.m_unKnowSprite = (t.Find("UnKnow").GetComponent("XUISprite") as IXUISprite);
+ this._Support = t.Find("BtnSupport");
+ this.SetEmptyMember();
+ }
+
+ public void Recycle()
+ {
+ this._Support = null;
+ this.m_GuildHeadSprite = null;
+ this.m_GuildNameLabel = null;
+ this.m_unKnowSprite = null;
+ }
+
+ public void SetGuildMember(XGuildBasicData baseData, XGuildBasicData winData = null, bool isCup = false)
+ {
+ this._baseData = baseData;
+ bool flag = baseData == null;
+ if (flag)
+ {
+ this.SetEmptyMember();
+ bool flag2 = this._Support != null;
+ if (flag2)
+ {
+ this._Support.gameObject.SetActive(false);
+ }
+ if (isCup)
+ {
+ this.m_unKnowSprite.SetVisible(false);
+ }
+ }
+ else
+ {
+ this.SetShowMember();
+ XGuildArenaDocument specificDocument = XDocuments.GetSpecificDocument<XGuildArenaDocument>(XGuildArenaDocument.uuID);
+ XGuildDocument specificDocument2 = XDocuments.GetSpecificDocument<XGuildDocument>(XGuildDocument.uuID);
+ this.m_GuildHeadSprite.ID = baseData.uid;
+ this.m_GuildNameLabel.SetText(baseData.ToGuildNameString());
+ this.m_GuildHeadSprite.SetSprite(XGuildDocument.GetPortraitName(baseData.portraitIndex));
+ this.m_GuildNameLabel.SetColor((specificDocument2.bInGuild && specificDocument2.BasicData.uid == baseData.uid) ? Color.green : Color.white);
+ bool flag3 = winData == null;
+ if (flag3)
+ {
+ this.m_GuildHeadSprite.SetGrey(true);
+ }
+ else
+ {
+ this.m_GuildHeadSprite.SetGrey(winData.uid == baseData.uid);
+ }
+ bool flag4 = this._Support != null;
+ if (flag4)
+ {
+ XCrossGVGDocument specificDocument3 = XDocuments.GetSpecificDocument<XCrossGVGDocument>(XCrossGVGDocument.uuID);
+ bool flag5 = specificDocument3.TimeStep == CrossGvgTimeState.CGVG_Guess;
+ if (flag5)
+ {
+ this._Support.gameObject.SetActive(true);
+ IXUIButton ixuibutton = this._Support.GetComponent("XUIButton") as IXUIButton;
+ IXUILabel ixuilabel = this._Support.Find("Label").GetComponent("XUILabel") as IXUILabel;
+ bool flag6 = specificDocument3.IsSupportExist(baseData.uid);
+ bool flag7 = flag6;
+ if (flag7)
+ {
+ ixuilabel.SetText(XStringDefineProxy.GetString("CROSSGVG_SUPPORT_TRUE"));
+ }
+ else
+ {
+ ixuilabel.SetText(XStringDefineProxy.GetString("CROSSGVG_SUPPORT_FALSE"));
+ }
+ ixuibutton.SetEnable(!flag6 && !specificDocument3.IsSupportFull(), false);
+ ixuibutton.ID = baseData.uid;
+ ixuibutton.RegisterClickEventHandler(new ButtonClickEventHandler(this._OnSupportClick));
+ }
+ else
+ {
+ this._Support.gameObject.SetActive(false);
+ }
+ }
+ }
+ }
+
+ private bool _OnSupportClick(IXUIButton btn)
+ {
+ bool flag = this._baseData == null;
+ bool result;
+ if (flag)
+ {
+ result = true;
+ }
+ else
+ {
+ XSingleton<UiUtility>.singleton.ShowModalDialog(XStringDefineProxy.GetString("CrossGVG_confirm_message", new object[]
+ {
+ this._baseData.ToGuildNameString()
+ }), XStringDefineProxy.GetString("COMMON_OK"), XStringDefineProxy.GetString("COMMON_CANCEL"), new ButtonClickEventHandler(this._OnSureSupport));
+ result = true;
+ }
+ return result;
+ }
+
+ private bool _OnSureSupport(IXUIButton btn)
+ {
+ XSingleton<UiUtility>.singleton.CloseModalDlg();
+ bool flag = this._baseData == null;
+ bool result;
+ if (flag)
+ {
+ result = false;
+ }
+ else
+ {
+ XCrossGVGDocument specificDocument = XDocuments.GetSpecificDocument<XCrossGVGDocument>(XCrossGVGDocument.uuID);
+ specificDocument.SendCrossGVGOper(CrossGvgOperType.CGOT_SupportGuild, this._baseData.uid);
+ result = true;
+ }
+ return result;
+ }
+
+ private void SetShowMember()
+ {
+ this.m_GuildNameLabel.SetVisible(true);
+ this.m_GuildHeadSprite.SetVisible(true);
+ this.m_unKnowSprite.SetVisible(false);
+ }
+
+ private void SetEmptyMember()
+ {
+ this.m_GuildHeadSprite.ID = 0UL;
+ this.m_GuildNameLabel.SetVisible(false);
+ this.m_GuildHeadSprite.SetVisible(false);
+ this.m_unKnowSprite.SetVisible(true);
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/GVGCombatGuildDisplay.cs.meta b/Client/Assets/Scripts/XMainClient/UI/GVGCombatGuildDisplay.cs.meta
new file mode 100644
index 00000000..f1f5acf8
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/GVGCombatGuildDisplay.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 969d658f6deb33d4db7091c5576e5bf8
+timeCreated: 1611404186
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/GVGCombatHandlerBase.cs b/Client/Assets/Scripts/XMainClient/UI/GVGCombatHandlerBase.cs
new file mode 100644
index 00000000..2210c998
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/GVGCombatHandlerBase.cs
@@ -0,0 +1,272 @@
+using System;
+using System.Collections.Generic;
+using KKSG;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class GVGCombatHandlerBase : DlgHandlerBase
+ {
+ protected virtual bool InGVGTime
+ {
+ get
+ {
+ return false;
+ }
+ }
+
+ protected virtual bool HasGVGJion
+ {
+ get
+ {
+ return false;
+ }
+ }
+
+ protected virtual bool VisibelEnterBattle
+ {
+ get
+ {
+ return false;
+ }
+ }
+
+ protected virtual CrossGvgRoomState RoomState
+ {
+ get
+ {
+ return CrossGvgRoomState.CGRS_Idle;
+ }
+ }
+
+ protected virtual GuildArenaState TimeState
+ {
+ get
+ {
+ return GuildArenaState.GUILD_ARENA_END;
+ }
+ }
+
+ private Transform m_CombatPanel;
+
+ private Transform m_NaPanel;
+
+ private List<GVGCombatInfoDisplay> m_GuildCombat = new List<GVGCombatInfoDisplay>();
+
+ private GVGCombatGuildDisplay m_GuildCup;
+
+ private IXUILabel m_combatTips;
+
+ private IXUISprite m_honorSprite;
+
+ private IXUILabel m_naLabel;
+
+ private IXUIButton m_enterBattle;
+
+ protected IXUIButton m_showRank;
+
+ protected IXUILabel m_RegistrationCount;
+
+ protected IXUILabel m_helpLabel;
+
+ protected uint FirstRoomSize = 4u;
+
+ protected uint SecondRoomSize = 2u;
+
+ protected uint TopRoomSize = 1u;
+
+ protected virtual XGVGCombatGroupData GetCombatGroup(uint roomID)
+ {
+ return null;
+ }
+
+ protected virtual void SetupOtherInfo()
+ {
+ }
+
+ protected virtual void EnterScene()
+ {
+ }
+
+ public override void RefreshData()
+ {
+ base.RefreshData();
+ bool inGVGTime = this.InGVGTime;
+ if (inGVGTime)
+ {
+ this.m_RegistrationCount.SetVisible(true);
+ this.m_CombatPanel.gameObject.SetActive(true);
+ this.m_NaPanel.gameObject.SetActive(false);
+ this.RefreshMessage();
+ this.RefreshCombatHandle();
+ }
+ else
+ {
+ this.m_RegistrationCount.SetVisible(false);
+ this.m_CombatPanel.gameObject.SetActive(false);
+ this.m_NaPanel.gameObject.SetActive(true);
+ }
+ this.SetupOtherInfo();
+ bool flag = this.HasGVGJion && this.VisibelEnterBattle;
+ if (flag)
+ {
+ this.m_enterBattle.SetVisible(true);
+ this.m_enterBattle.SetGrey(this.RoomState == CrossGvgRoomState.CGRS_Fighting);
+ }
+ else
+ {
+ this.m_enterBattle.SetVisible(false);
+ }
+ }
+
+ protected override void Init()
+ {
+ base.Init();
+ this.m_CombatPanel = base.PanelObject.transform.Find("Combat");
+ this.m_NaPanel = base.PanelObject.transform.Find("NA");
+ this.m_naLabel = (base.PanelObject.transform.Find("NA/tip").GetComponent("XUILabel") as IXUILabel);
+ this.m_naLabel.SetText(XStringDefineProxy.GetString("GUILD_ARENA_COMBAT_NA"));
+ this.m_helpLabel = (base.PanelObject.transform.Find("txt_helpLabel").GetComponent("XUILabel") as IXUILabel);
+ this.m_GuildCup = new GVGCombatGuildDisplay();
+ this.m_GuildCup.Setup(base.PanelObject.transform.Find("Combat/Cup"));
+ this.m_combatTips = (base.PanelObject.transform.Find("Combat/txt_TimeLabel").GetComponent("XUILabel") as IXUILabel);
+ this.m_honorSprite = (base.PanelObject.transform.Find("Combat/honor").GetComponent("XUISprite") as IXUISprite);
+ this.m_enterBattle = (base.PanelObject.transform.Find("Combat/LetMeDie").GetComponent("XUIButton") as IXUIButton);
+ this.m_enterBattle.SetVisible(false);
+ this.m_showRank = (base.PanelObject.transform.Find("TopRankBtn").GetComponent("XUIButton") as IXUIButton);
+ this.m_RegistrationCount = (base.PanelObject.transform.Find("Title/Period").GetComponent("XUILabel") as IXUILabel);
+ this.m_RegistrationCount.SetVisible(false);
+ this.InitCombatHandle();
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ this.m_enterBattle.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnEnterBattleClick));
+ this.m_showRank.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnShowRankClick));
+ }
+
+ private bool OnShowRankClick(IXUIButton btn)
+ {
+ DlgBase<GuildArenaRankDlg, GuildArenaRankBehaviour>.singleton.SetVisibleWithAnimation(true, null);
+ return true;
+ }
+
+ private bool OnEnterBattleClick(IXUIButton btn)
+ {
+ bool flag = this.RoomState != CrossGvgRoomState.CGRS_Fighting;
+ bool result;
+ if (flag)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString("GUILD_ARENA_OUTTIME"), "fece00");
+ result = false;
+ }
+ else
+ {
+ this.EnterScene();
+ result = false;
+ }
+ return result;
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ this.RefreshData();
+ }
+
+ public override void OnUnload()
+ {
+ this.UnLoadCombatHandle(ref this.m_GuildCombat);
+ bool flag = this.m_GuildCup != null;
+ if (flag)
+ {
+ this.m_GuildCup.Recycle();
+ this.m_GuildCup = null;
+ }
+ base.OnUnload();
+ }
+
+ private void InitCombatHandle()
+ {
+ this.CreateCombatHandle(0, this.FirstRoomSize);
+ this.CreateCombatHandle(1, this.SecondRoomSize);
+ this.CreateCombatHandle(2, this.TopRoomSize);
+ }
+
+ private void UnLoadCombatHandle(ref List<GVGCombatInfoDisplay> guildCombats)
+ {
+ bool flag = guildCombats == null;
+ if (!flag)
+ {
+ int i = 0;
+ int count = guildCombats.Count;
+ while (i < count)
+ {
+ bool flag2 = guildCombats[i] != null;
+ if (flag2)
+ {
+ guildCombats[i].Recycle();
+ guildCombats[i] = null;
+ }
+ i++;
+ }
+ guildCombats.Clear();
+ guildCombats = null;
+ }
+ }
+
+ private void CreateCombatHandle(int combat, uint size)
+ {
+ int num = 0;
+ while ((long)num < (long)((ulong)size))
+ {
+ string text = string.Format("Combat/Battle/Battle_{0}_{1}", combat, num);
+ GVGCombatInfoDisplay gvgcombatInfoDisplay = new GVGCombatInfoDisplay();
+ gvgcombatInfoDisplay.Setup(base.PanelObject.transform.Find(text));
+ gvgcombatInfoDisplay.Set(combat, num);
+ this.m_GuildCombat.Add(gvgcombatInfoDisplay);
+ num++;
+ }
+ }
+
+ private void RefreshCombatHandle()
+ {
+ int i = 0;
+ int count = this.m_GuildCombat.Count;
+ while (i < count)
+ {
+ this.m_GuildCombat[i].SetGroup(this.GetCombatGroup(this.m_GuildCombat[i].RoomID));
+ i++;
+ }
+ XGVGCombatGroupData combatGroup = this.GetCombatGroup(7u);
+ this.m_GuildCup.SetGuildMember((combatGroup != null && combatGroup.Winner != null) ? combatGroup.Winner : null, null, true);
+ }
+
+ private void RefreshMessage()
+ {
+ string text = string.Empty;
+ switch (this.TimeState)
+ {
+ case GuildArenaState.GUILD_ARENA_NOT_BEGIN:
+ case GuildArenaState.GUILD_ARENA_BEGIN:
+ case GuildArenaState.GUILD_ARENA_BATTLE_ONE:
+ text = XStringDefineProxy.GetString("GUILD_ARENA_MESSAGE1");
+ break;
+ case GuildArenaState.GUILD_ARENA_BATTLE_TWO:
+ text = XStringDefineProxy.GetString("GUILD_ARENA_MESSAGE2");
+ break;
+ case GuildArenaState.GUILD_ARENA_BATTLE_FINAL:
+ text = XStringDefineProxy.GetString("GUILD_ARENA_MESSAGE3");
+ break;
+ default:
+ text = string.Empty;
+ break;
+ }
+ this.m_combatTips.SetText(text);
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/GVGCombatHandlerBase.cs.meta b/Client/Assets/Scripts/XMainClient/UI/GVGCombatHandlerBase.cs.meta
new file mode 100644
index 00000000..e1b2571a
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/GVGCombatHandlerBase.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: d13a3dc77a918ff4eadbb4210d9b6827
+timeCreated: 1611404591
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/GVGCombatInfoDisplay.cs b/Client/Assets/Scripts/XMainClient/UI/GVGCombatInfoDisplay.cs
new file mode 100644
index 00000000..aba484a6
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/GVGCombatInfoDisplay.cs
@@ -0,0 +1,116 @@
+using System;
+using KKSG;
+using UILib;
+using UnityEngine;
+
+namespace XMainClient.UI
+{
+ internal class GVGCombatInfoDisplay
+ {
+ public uint RoomID
+ {
+ get
+ {
+ return this.m_battleID;
+ }
+ }
+
+ public uint BattleID
+ {
+ get
+ {
+ return this.m_battleID;
+ }
+ }
+
+ private GVGCombatGuildDisplay m_guildMemberA;
+
+ private GVGCombatGuildDisplay m_guildMemberB;
+
+ private IXUIButton m_watchBtn;
+
+ private int m_combatID;
+
+ private int m_index;
+
+ private uint m_battleID;
+
+ public void Setup(Transform t)
+ {
+ this.m_watchBtn = (t.Find("btn_Watch").GetComponent("XUIButton") as IXUIButton);
+ this.m_guildMemberA = new GVGCombatGuildDisplay();
+ this.m_guildMemberA.Setup(t.Find("Team1"));
+ this.m_guildMemberB = new GVGCombatGuildDisplay();
+ this.m_guildMemberB.Setup(t.Find("Team2"));
+ this.m_watchBtn.SetVisible(false);
+ this.m_watchBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnWatchClick));
+ }
+
+ public void Set(int combat, int index)
+ {
+ this.m_combatID = combat;
+ this.m_index = index;
+ switch (combat)
+ {
+ case 0:
+ this.m_battleID = (uint)(index + 1);
+ break;
+ case 1:
+ this.m_battleID = (uint)(index + 5);
+ break;
+ case 2:
+ this.m_battleID = 7u;
+ break;
+ }
+ }
+
+ public void SetGroup(XGVGCombatGroupData combat)
+ {
+ bool flag = combat == null;
+ if (flag)
+ {
+ this.m_watchBtn.ID = 0UL;
+ this.SetCombatState((CrossGvgRoomState)0, 0u);
+ }
+ else
+ {
+ this.m_watchBtn.ID = (ulong)combat.WatchID;
+ this.m_guildMemberA.SetGuildMember(combat.GuildOne, combat.Winner, false);
+ this.m_guildMemberB.SetGuildMember(combat.GuildTwo, combat.Winner, false);
+ this.SetCombatState(combat.RoomState, combat.WatchID);
+ }
+ }
+
+ public void SetCombatState(CrossGvgRoomState state, uint watchID = 0u)
+ {
+ this.m_watchBtn.SetVisible(state == CrossGvgRoomState.CGRS_Fighting && watchID > 0u);
+ }
+
+ public void Recycle()
+ {
+ bool flag = this.m_guildMemberA != null;
+ if (flag)
+ {
+ this.m_guildMemberA.Recycle();
+ this.m_guildMemberA = null;
+ }
+ bool flag2 = this.m_guildMemberB != null;
+ if (flag2)
+ {
+ this.m_guildMemberB.Recycle();
+ this.m_guildMemberB = null;
+ }
+ }
+
+ private bool OnWatchClick(IXUIButton watchBtn)
+ {
+ bool flag = watchBtn.ID > 0UL;
+ if (flag)
+ {
+ XSpectateDocument specificDocument = XDocuments.GetSpecificDocument<XSpectateDocument>(XSpectateDocument.uuID);
+ specificDocument.EnterSpectateBattle((uint)watchBtn.ID, LiveType.LIVE_CROSSGVG);
+ }
+ return false;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/GVGCombatInfoDisplay.cs.meta b/Client/Assets/Scripts/XMainClient/UI/GVGCombatInfoDisplay.cs.meta
new file mode 100644
index 00000000..ce38696f
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/GVGCombatInfoDisplay.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 9ef7c70338ad56940851c4dc0438f388
+timeCreated: 1611404243
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/GVGDuelHandlerBase.cs b/Client/Assets/Scripts/XMainClient/UI/GVGDuelHandlerBase.cs
new file mode 100644
index 00000000..3f23e154
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/GVGDuelHandlerBase.cs
@@ -0,0 +1,76 @@
+using System;
+using UILib;
+using UnityEngine;
+
+namespace XMainClient.UI
+{
+ internal class GVGDuelHandlerBase : DlgHandlerBase
+ {
+ private IXUIWrapContent _WrapContent;
+
+ private IXUIScrollView _WrapScroll;
+
+ private Transform _emptyTransform;
+
+ protected IXUILabel m_DuelHelp;
+
+ private GVGDuelWrapDisplay _display;
+
+ protected override void Init()
+ {
+ this._WrapScroll = (base.transform.Find("DuelList").GetComponent("XUIScrollView") as IXUIScrollView);
+ this._WrapContent = (base.transform.Find("DuelList/WrapContent").GetComponent("XUIWrapContent") as IXUIWrapContent);
+ this.m_DuelHelp = (base.transform.Find("Intro").GetComponent("XUILabel") as IXUILabel);
+ this._emptyTransform = base.transform.Find("UnApply");
+ this._WrapContent.RegisterItemUpdateEventHandler(new WrapItemUpdateEventHandler(this.OnItemWrapContentUpdate));
+ }
+
+ public override void OnUnload()
+ {
+ bool flag = this._display != null;
+ if (flag)
+ {
+ this._display.Recycle();
+ this._display = null;
+ }
+ base.OnUnload();
+ }
+
+ public override void RefreshData()
+ {
+ int duelInfoSize = this.GetDuelInfoSize();
+ this._WrapContent.SetContentCount(duelInfoSize, false);
+ this._WrapScroll.ResetPosition();
+ }
+
+ protected void ShowOrHide(bool active)
+ {
+ this._emptyTransform.gameObject.SetActive(active);
+ }
+
+ protected virtual void OnEnterScene(IXUISprite sprite)
+ {
+ }
+
+ protected virtual int GetDuelInfoSize()
+ {
+ return 0;
+ }
+
+ protected virtual GVGDuelCombatInfo GetDuelInfo(int index)
+ {
+ return null;
+ }
+
+ private void OnItemWrapContentUpdate(Transform t, int index)
+ {
+ bool flag = this._display == null;
+ if (flag)
+ {
+ this._display = new GVGDuelWrapDisplay();
+ }
+ this._display.Setup(t, index, new SpriteClickEventHandler(this.OnEnterScene));
+ this._display.Set(this.GetDuelInfo(index));
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/GVGDuelHandlerBase.cs.meta b/Client/Assets/Scripts/XMainClient/UI/GVGDuelHandlerBase.cs.meta
new file mode 100644
index 00000000..bce99258
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/GVGDuelHandlerBase.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 197d656f6b79a984ba4e731aef9d85ee
+timeCreated: 1611403302
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/GVGDuelWrapDisplay.cs b/Client/Assets/Scripts/XMainClient/UI/GVGDuelWrapDisplay.cs
new file mode 100644
index 00000000..1bd74fca
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/GVGDuelWrapDisplay.cs
@@ -0,0 +1,160 @@
+using System;
+using UILib;
+using UnityEngine;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class GVGDuelWrapDisplay
+ {
+ private IXUILabel m_time;
+
+ private IXUILabel m_guildNameCurrent;
+
+ private IXUILabel m_guildNameUsed;
+
+ private IXUILabel m_guildNameNext;
+
+ private IXUISprite m_PortraitCurrent;
+
+ private IXUISprite m_PortraitUsed;
+
+ private IXUISprite m_PortraitNext;
+
+ private IXUISprite m_enterBattle;
+
+ private IXUILabel m_score;
+
+ private Transform m_UsedPortraitEmpty;
+
+ private Transform m_CurrentPortraitEmpty;
+
+ private Transform m_NextPortraitEmpty;
+
+ private Transform m_CurrentVS;
+
+ private Transform m_CurrentMessage;
+
+ private Transform m_win;
+
+ private Transform m_lose;
+
+ private Transform m_current;
+
+ private Transform m_next;
+
+ private Transform m_used;
+
+ private int _index;
+
+ public void Setup(Transform t, int index, SpriteClickEventHandler handler)
+ {
+ this._index = index;
+ this.m_current = t.Find("Current");
+ this.m_next = t.Find("Next");
+ this.m_used = t.Find("Used");
+ this.m_win = t.Find("Used/Result/Win");
+ this.m_lose = t.Find("Used/Result/Lose");
+ this.m_time = (t.Find("Day").GetComponent("XUILabel") as IXUILabel);
+ this.m_guildNameCurrent = (t.Find("Current/GuildName").GetComponent("XUILabel") as IXUILabel);
+ this.m_guildNameUsed = (t.Find("Used/GuildName").GetComponent("XUILabel") as IXUILabel);
+ this.m_guildNameNext = (t.Find("Next/GuildName").GetComponent("XUILabel") as IXUILabel);
+ this.m_PortraitCurrent = (t.Find("Current/Portrait").GetComponent("XUISprite") as IXUISprite);
+ this.m_PortraitUsed = (t.Find("Used/Portrait").GetComponent("XUISprite") as IXUISprite);
+ this.m_PortraitNext = (t.Find("Next/Portrait").GetComponent("XUISprite") as IXUISprite);
+ this.m_CurrentPortraitEmpty = t.Find("Current/Portrait_empty");
+ this.m_UsedPortraitEmpty = t.Find("Used/Portrait_empty");
+ this.m_NextPortraitEmpty = t.Find("Next/Portrait_empty");
+ this.m_CurrentVS = t.Find("Current/VS");
+ this.m_CurrentMessage = t.Find("Current/VS_empty");
+ this.m_score = (t.Find("Used/Score").GetComponent("XUILabel") as IXUILabel);
+ this.m_enterBattle = (t.Find("Current/Btn").GetComponent("XUISprite") as IXUISprite);
+ this.m_enterBattle.RegisterSpriteClickEventHandler(handler);
+ this.m_enterBattle.ID = (ulong)((long)index);
+ }
+
+ public void Reset()
+ {
+ this.m_time.SetText(string.Empty);
+ this.m_next.gameObject.SetActive(true);
+ this.m_used.gameObject.SetActive(false);
+ this.m_current.gameObject.SetActive(false);
+ }
+
+ public void Set(GVGDuelCombatInfo combatInfo)
+ {
+ bool flag = combatInfo == null;
+ if (flag)
+ {
+ this.Reset();
+ }
+ else
+ {
+ this.m_time.SetText(combatInfo.ToTimeString());
+ this.m_next.gameObject.SetActive(combatInfo.gs == GVGDuelStatu.IDLE);
+ this.m_used.gameObject.SetActive(combatInfo.gs == GVGDuelStatu.FINISH);
+ this.m_current.gameObject.SetActive(combatInfo.gs == GVGDuelStatu.FIGHTING);
+ GVGDuelStatu gs = combatInfo.gs;
+ if (gs != GVGDuelStatu.FINISH)
+ {
+ if (gs != GVGDuelStatu.FIGHTING)
+ {
+ this.m_guildNameNext.SetText(combatInfo.GetGuildName());
+ this.m_PortraitNext.SetSprite(combatInfo.GetPortraitName());
+ this.m_PortraitNext.SetVisible(combatInfo.Pass());
+ this.m_PortraitNext.SetVisible(combatInfo.Pass());
+ this.m_PortraitNext.ID = combatInfo.GuildID;
+ this.m_NextPortraitEmpty.gameObject.SetActive(!combatInfo.Pass());
+ }
+ else
+ {
+ this.m_guildNameCurrent.SetText(combatInfo.GetGuildName());
+ this.m_PortraitCurrent.SetSprite(combatInfo.GetPortraitName());
+ this.m_PortraitCurrent.SetVisible(combatInfo.Pass());
+ this.m_PortraitCurrent.SetVisible(combatInfo.Pass());
+ this.m_PortraitCurrent.ID = combatInfo.GuildID;
+ this.m_CurrentPortraitEmpty.gameObject.SetActive(!combatInfo.Pass());
+ this.m_enterBattle.SetGrey(combatInfo.gs == GVGDuelStatu.FIGHTING);
+ this.m_enterBattle.SetVisible(combatInfo.Pass());
+ this.m_CurrentVS.gameObject.SetActive(combatInfo.Pass());
+ this.m_CurrentMessage.gameObject.SetActive(!combatInfo.Pass());
+ }
+ }
+ else
+ {
+ this.m_guildNameUsed.SetText(combatInfo.GetGuildName());
+ this.m_PortraitUsed.SetSprite(combatInfo.GetPortraitName());
+ this.m_UsedPortraitEmpty.gameObject.SetActive(!combatInfo.Pass());
+ this.m_PortraitUsed.SetVisible(combatInfo.Pass());
+ this.m_score.SetText(XSingleton<XCommon>.singleton.StringCombine("+", combatInfo.AddScore.ToString()));
+ this.m_win.gameObject.SetActive(combatInfo.Winner);
+ this.m_lose.gameObject.SetActive(!combatInfo.Winner);
+ this.m_PortraitUsed.ID = combatInfo.GuildID;
+ }
+ }
+ }
+
+ public void Recycle()
+ {
+ this.m_time = null;
+ this.m_guildNameCurrent = null;
+ this.m_guildNameUsed = null;
+ this.m_guildNameNext = null;
+ this.m_PortraitCurrent = null;
+ this.m_PortraitUsed = null;
+ this.m_PortraitNext = null;
+ this.m_enterBattle = null;
+ this.m_score = null;
+ this.m_UsedPortraitEmpty = null;
+ this.m_CurrentPortraitEmpty = null;
+ this.m_NextPortraitEmpty = null;
+ this.m_CurrentVS = null;
+ this.m_CurrentMessage = null;
+ this.m_win = null;
+ this.m_lose = null;
+ this.m_current = null;
+ this.m_next = null;
+ this.m_used = null;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/GVGDuelWrapDisplay.cs.meta b/Client/Assets/Scripts/XMainClient/UI/GVGDuelWrapDisplay.cs.meta
new file mode 100644
index 00000000..ea5c32fa
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/GVGDuelWrapDisplay.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 324de7c8e6533484fb424b872196035c
+timeCreated: 1611403549
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/GVGHallBase.cs b/Client/Assets/Scripts/XMainClient/UI/GVGHallBase.cs
new file mode 100644
index 00000000..29049f70
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/GVGHallBase.cs
@@ -0,0 +1,91 @@
+using System;
+using UILib;
+using UnityEngine;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class GVGHallBase : DlgHandlerBase
+ {
+ private IXUIWrapContent _rankWrapContent;
+
+ private IXUIScrollView _rankScrollView;
+
+ private Transform _selfTransform;
+
+ private XUIPool m_ItemPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ private Transform m_ItemReward;
+
+ protected IXUILabel m_HelpText;
+
+ protected ulong selfGuildID = 0UL;
+
+ protected int selfIndex = -1;
+
+ protected override void Init()
+ {
+ Transform transform = base.PanelObject.transform.Find("Reward/item");
+ this.m_ItemPool.SetupPool(transform.parent.gameObject, transform.gameObject, 3u, false);
+ this.m_ItemReward = base.PanelObject.transform.Find("Reward");
+ this._rankScrollView = (base.PanelObject.transform.Find("RankList/ScrollView").GetComponent("XUIScrollView") as IXUIScrollView);
+ this._rankWrapContent = (base.PanelObject.transform.Find("RankList/ScrollView/WrapContent").GetComponent("XUIWrapContent") as IXUIWrapContent);
+ this._selfTransform = base.PanelObject.transform.Find("MyRank/Detail");
+ this._rankWrapContent.RegisterItemUpdateEventHandler(new WrapItemUpdateEventHandler(this.OnItemWrapUpdate));
+ this.m_HelpText = (base.PanelObject.transform.Find("help/Intro/Text").GetComponent("XUILabel") as IXUILabel);
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ this.RefreshData();
+ }
+
+ public override void RefreshData()
+ {
+ base.RefreshData();
+ this.SetupRankList();
+ }
+
+ private void SetupRankList()
+ {
+ this.selfIndex = -1;
+ XGuildDocument specificDocument = XDocuments.GetSpecificDocument<XGuildDocument>(XGuildDocument.uuID);
+ this.selfGuildID = specificDocument.BasicData.uid;
+ this._rankWrapContent.SetContentCount(this.GetContentSize(), false);
+ this._rankScrollView.ResetPosition();
+ this.SetSelfGuildInfo(this.selfIndex);
+ }
+
+ protected virtual int GetContentSize()
+ {
+ return 0;
+ }
+
+ protected void SetSelfGuildInfo(int index)
+ {
+ this.OnItemWrapUpdate(this._selfTransform, index);
+ }
+
+ protected virtual void OnItemWrapUpdate(Transform t, int index)
+ {
+ }
+
+ protected virtual void SetupRewardList(string[] values)
+ {
+ int num = values.Length;
+ this.m_ItemPool.ReturnAll(false);
+ for (int i = 0; i < num; i++)
+ {
+ GameObject gameObject = this.m_ItemPool.FetchGameObject(false);
+ gameObject.transform.parent = this.m_ItemReward;
+ gameObject.transform.localPosition = new Vector3((float)(i * 80), 0f);
+ int num2 = int.Parse(values[i]);
+ XSingleton<XItemDrawerMgr>.singleton.normalItemDrawer.DrawItem(gameObject, num2, 0, false);
+ IXUISprite ixuisprite = gameObject.transform.Find("Icon").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.ID = (ulong)((long)num2);
+ ixuisprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(XSingleton<UiUtility>.singleton.OnItemClick));
+ }
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/GVGHallBase.cs.meta b/Client/Assets/Scripts/XMainClient/UI/GVGHallBase.cs.meta
new file mode 100644
index 00000000..fe9c60db
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/GVGHallBase.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 67515b6ba6cc1904884b10b452ef0e60
+timeCreated: 1611403857
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/GameCommunityHandler.cs b/Client/Assets/Scripts/XMainClient/UI/GameCommunityHandler.cs
new file mode 100644
index 00000000..1433a267
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/GameCommunityHandler.cs
@@ -0,0 +1,358 @@
+using System;
+using System.Collections.Generic;
+using KKSG;
+using MiniJSON;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUpdater;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class GameCommunityHandler : DlgHandlerBase
+ {
+ protected override string FileName
+ {
+ get
+ {
+ return "GameSystem/GameCommunityDlg";
+ }
+ }
+
+ private XMainInterfaceDocument _doc = null;
+
+ private int _bgWidthDelta;
+
+ private bool _widthInit = false;
+
+ public IXUISprite m_Bg;
+
+ public Transform m_SystemParent;
+
+ protected override void Init()
+ {
+ base.Init();
+ this._doc = XDocuments.GetSpecificDocument<XMainInterfaceDocument>(XMainInterfaceDocument.uuID);
+ this.m_Bg = (base.transform.Find("Bg/Bg").GetComponent("XUISprite") as IXUISprite);
+ this.m_SystemParent = base.transform.Find("Bg/Sys");
+ XSingleton<XChatIFlyMgr>.singleton.RefreshWebViewConfig();
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ bool flag = XSingleton<XLoginDocument>.singleton.Channel == XAuthorizationChannel.XAuthorization_QQ;
+ int num = 0;
+ int num2 = 0;
+ for (int i = 0; i < this._doc.GameCommunityReader.Table.Length; i++)
+ {
+ GameCommunityTable.RowData rowData = this._doc.GameCommunityReader.Table[i];
+ IXUIButton ixuibutton = this.m_SystemParent.Find(rowData.ButtonName).GetComponent("XUIButton") as IXUIButton;
+ ixuibutton.SetVisible(false);
+ GameObject gameObject = ixuibutton.gameObject.transform.Find("RedPoint").gameObject;
+ bool flag2 = i == 0;
+ if (flag2)
+ {
+ num2 = ixuibutton.spriteWidth;
+ bool flag3 = !this._widthInit;
+ if (flag3)
+ {
+ this._widthInit = true;
+ this._bgWidthDelta = this.m_Bg.spriteWidth - num2;
+ }
+ }
+ bool flag4 = (ulong)XSingleton<XAttributeMgr>.singleton.XPlayerData.Level < (ulong)((long)rowData.OpenLevel);
+ if (!flag4)
+ {
+ bool flag5 = !XSingleton<XGameSysMgr>.singleton.IsSystemOpened((XSysDefine)rowData.SysID);
+ if (!flag5)
+ {
+ bool flag6 = !this.LoginStateTrue(rowData);
+ if (!flag6)
+ {
+ bool flag7 = rowData.ID == 13;
+ if (flag7)
+ {
+ bool flag8 = this.IsSuportReplay();
+ if (flag8)
+ {
+ ixuibutton.SetVisible(true);
+ ixuibutton.gameObject.transform.localPosition = new Vector3((float)(num * num2), 0f);
+ ixuibutton.ID = (ulong)((long)rowData.ID);
+ ixuibutton.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnSysBtnClick));
+ num++;
+ }
+ }
+ else
+ {
+ bool flag9 = rowData.ID == 12;
+ if (flag9)
+ {
+ bool flag10 = this.GetQuestionnaireStage() == 0;
+ if (!flag10)
+ {
+ ixuibutton.SetVisible(true);
+ ixuibutton.gameObject.transform.localPosition = new Vector3((float)(num * num2), 0f);
+ ixuibutton.ID = (ulong)((long)rowData.ID);
+ ixuibutton.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnSysBtnClick));
+ num++;
+ gameObject.SetActive(XSingleton<XGameSysMgr>.singleton.GetSysRedPointStateConsiderBlock(XSysDefine.XSys_Questionnaire));
+ }
+ }
+ else
+ {
+ bool flag11 = rowData.ID == 14;
+ if (flag11)
+ {
+ XSingleton<XDebug>.singleton.AddLog("Is show tv: ", this._doc.ShowWebView.ToString(), null, null, null, null, XDebugColor.XDebug_None);
+ bool flag12 = SystemInfo.processorType.StartsWith("Intel");
+ int num3 = int.Parse(XSingleton<XGlobalConfig>.singleton.GetValue("HideWebView"));
+ bool flag13 = SystemInfo.systemMemorySize >= XSingleton<XGlobalConfig>.singleton.GetInt("WebMemory");
+ XSingleton<XDebug>.singleton.AddLog("memory: ", flag13.ToString(), " x86: ", flag12.ToString(), " hide: ", num3.ToString(), XDebugColor.XDebug_None);
+ bool flag14 = this._doc.ShowWebView && num3 != 1 && !flag12 && flag13;
+ ixuibutton.SetVisible(flag14);
+ bool flag15 = flag14;
+ if (flag15)
+ {
+ ixuibutton.gameObject.transform.localPosition = new Vector3((float)(num * num2), 0f);
+ ixuibutton.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnSysBtnClick));
+ num++;
+ ixuibutton.ID = (ulong)((long)rowData.ID);
+ }
+ }
+ else
+ {
+ bool flag16 = rowData.ID == 8 && (XSingleton<XLoginDocument>.singleton.GetLaunchTypeServerInfo() != StartUpType.StartUp_QQ || XSingleton<XLoginDocument>.singleton.Channel != XAuthorizationChannel.XAuthorization_QQ);
+ if (!flag16)
+ {
+ bool flag17 = rowData.ID == 9 && (XSingleton<XLoginDocument>.singleton.GetLaunchTypeServerInfo() != StartUpType.StartUp_WX || XSingleton<XLoginDocument>.singleton.Channel != XAuthorizationChannel.XAuthorization_WeChat);
+ if (!flag17)
+ {
+ ixuibutton.SetVisible(true);
+ ixuibutton.gameObject.transform.localPosition = new Vector3((float)(num * num2), 0f);
+ ixuibutton.ID = (ulong)((long)rowData.ID);
+ ixuibutton.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnSysBtnClick));
+ num++;
+ gameObject.SetActive(XSingleton<XGameSysMgr>.singleton.GetSysRedPointStateConsiderBlock((XSysDefine)rowData.SysID));
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ this.m_Bg.spriteWidth = this._bgWidthDelta + num * num2;
+ }
+
+ private bool OnSysBtnClick(IXUIButton btn)
+ {
+ Dictionary<string, string> dictionary = new Dictionary<string, string>();
+ ulong id = btn.ID;
+ ulong num = id - 1UL;
+ if (num <= 15UL)
+ {
+ switch ((uint)num)
+ {
+ case 0u:
+ {
+ PtcC2G_CloseHintNtf ptcC2G_CloseHintNtf = new PtcC2G_CloseHintNtf();
+ ptcC2G_CloseHintNtf.Data.systemid = (uint)XFastEnumIntEqualityComparer<XSysDefine>.ToInt(XSysDefine.XSys_GC_XinYueVIP);
+ XSingleton<XClientNetwork>.singleton.Send(ptcC2G_CloseHintNtf);
+ XSingleton<XGameSysMgr>.singleton.SetSysRedPointState(XSysDefine.XSys_GC_XinYueVIP, false);
+ XSingleton<XGameSysMgr>.singleton.RecalculateRedPointState(XSysDefine.XSys_GameCommunity, true);
+ GameObject gameObject = btn.gameObject.transform.Find("RedPoint").gameObject;
+ gameObject.SetActive(false);
+ string text = string.Format("{0}?game_id={1}&opencode={2}&partition_id={3}&role_id={4}", new object[]
+ {
+ XSingleton<XGlobalConfig>.singleton.GetValue("XinYueInternalURL"),
+ XSingleton<XClientNetwork>.singleton.GameId,
+ XSingleton<XClientNetwork>.singleton.OpenCode,
+ XSingleton<XClientNetwork>.singleton.ServerID,
+ XSingleton<XAttributeMgr>.singleton.XPlayerData.RoleID
+ });
+ XSingleton<XDebug>.singleton.AddLog("url = " + text, null, null, null, null, null, XDebugColor.XDebug_None);
+ dictionary["url"] = text;
+ dictionary["screendir"] = "SENSOR";
+ XSingleton<XUpdater.XUpdater>.singleton.XPlatform.SendExtDara("open_url", Json.Serialize(dictionary));
+ break;
+ }
+ case 6u:
+ XSingleton<UiUtility>.singleton.OpenHtmlUrl("DeepLinkAddress");
+ break;
+ case 7u:
+ case 8u:
+ DlgBase<XQQWXGameCenterPrivilegeView, XQQWXGameCenterPrivilegeBehaviour>.singleton.SetVisibleWithAnimation(true, null);
+ break;
+ case 9u:
+ {
+ string text = string.Format("{0}?partition={1}&roleid={2}&area={3}&algorithm={4}&version={5}&timestamp={6}&appid={7}&openid={8}&sig={9}&encode={10}", new object[]
+ {
+ XSingleton<XGlobalConfig>.singleton.GetValue("MicroCommunityURL"),
+ XSingleton<XClientNetwork>.singleton.ServerID,
+ XSingleton<XAttributeMgr>.singleton.XPlayerData.RoleID,
+ XSingleton<XClientNetwork>.singleton.AreaId,
+ "v2",
+ XSingleton<XUpdater.XUpdater>.singleton.Version,
+ XSingleton<UiUtility>.singleton.GetTimeStamp(),
+ XSingleton<XClientNetwork>.singleton.AppId,
+ XSingleton<XLoginDocument>.singleton.OpenID,
+ XSingleton<XUpdater.XUpdater>.singleton.XPlatform.GetMD5(string.Format("{0}{1}", XSingleton<XClientNetwork>.singleton.MSDKKey, XSingleton<UiUtility>.singleton.GetTimeStamp())),
+ "2"
+ });
+ XSingleton<XDebug>.singleton.AddLog("url = " + text, null, null, null, null, null, XDebugColor.XDebug_None);
+ dictionary["url"] = text;
+ dictionary["screendir"] = "SENSOR";
+ XSingleton<XUpdater.XUpdater>.singleton.XPlatform.SendExtDara("open_url", Json.Serialize(dictionary));
+ break;
+ }
+ case 10u:
+ XSingleton<UiUtility>.singleton.OpenHtmlUrl("HordeInsideAddress");
+ break;
+ case 11u:
+ {
+ PtcC2G_CancelRedDotReq ptcC2G_CancelRedDotReq = new PtcC2G_CancelRedDotReq();
+ ptcC2G_CancelRedDotReq.Data.systemid = (uint)XFastEnumIntEqualityComparer<XSysDefine>.ToInt(XSysDefine.XSys_Questionnaire);
+ XSingleton<XClientNetwork>.singleton.Send(ptcC2G_CancelRedDotReq);
+ XSingleton<XGameSysMgr>.singleton.SetSysRedPointState(XSysDefine.XSys_Questionnaire, false);
+ XSingleton<XGameSysMgr>.singleton.RecalculateRedPointState(XSysDefine.XSys_GameCommunity, true);
+ GameObject gameObject2 = btn.gameObject.transform.Find("RedPoint").gameObject;
+ gameObject2.SetActive(false);
+ int questionnaireStage = this.GetQuestionnaireStage();
+ dictionary["url"] = XSingleton<XGlobalConfig>.singleton.GetValue(string.Format("QuestionnaireUrl{0}", questionnaireStage));
+ dictionary["screendir"] = "SENSOR";
+ XSingleton<XUpdater.XUpdater>.singleton.XPlatform.SendExtDara("open_url", Json.Serialize(dictionary));
+ break;
+ }
+ case 12u:
+ this.OnReplayClick(btn);
+ break;
+ case 13u:
+ DlgBase<WebView, WebViewBehaviour>.singleton.SetVisible(true, true);
+ break;
+ case 14u:
+ {
+ XSingleton<UiUtility>.singleton.CloseSysAndNoticeServer((uint)XFastEnumIntEqualityComparer<XSysDefine>.ToInt(XSysDefine.XSys_GC_XiaoYueGuanJia));
+ btn.gameObject.transform.Find("RedPoint").gameObject.SetActive(false);
+ string text2 = ((int)Application.platform == 11) ? "1" : "0";
+ string text = string.Format("{0}?game_id={1}&opencode={2}&sig={3}&timestamp={4}&role_id={5}&partition_id={6}&plat_id={7}", new object[]
+ {
+ XSingleton<XGlobalConfig>.singleton.GetValue("XiaoYueUrl"),
+ XSingleton<XGlobalConfig>.singleton.GetValue("XiaoYueGameID"),
+ XSingleton<XClientNetwork>.singleton.OpenCode,
+ XSingleton<XUpdater.XUpdater>.singleton.XPlatform.GetMD5(string.Format("{0}{1}", XSingleton<XClientNetwork>.singleton.MSDKKey, XSingleton<UiUtility>.singleton.GetTimeStamp())),
+ XSingleton<UiUtility>.singleton.GetTimeStamp(),
+ XSingleton<UiUtility>.singleton.GetRoleId(),
+ XSingleton<XClientNetwork>.singleton.ServerID,
+ text2
+ });
+ XSingleton<XDebug>.singleton.AddLog("url = " + text, null, null, null, null, null, XDebugColor.XDebug_None);
+ dictionary["url"] = text;
+ dictionary["screendir"] = "SENSOR";
+ XSingleton<XUpdater.XUpdater>.singleton.XPlatform.SendExtDara("open_url", Json.Serialize(dictionary));
+ break;
+ }
+ case 15u:
+ XSingleton<UiUtility>.singleton.OpenHtmlUrl("LibaozhongxinUrl");
+ break;
+ }
+ }
+ return true;
+ }
+
+ private bool LoginStateTrue(GameCommunityTable.RowData data)
+ {
+ bool flag = (int)Application.platform == 7 || Application.platform == 0;
+ bool result;
+ if (flag)
+ {
+ result = true;
+ }
+ else
+ {
+ switch (XSingleton<XLoginDocument>.singleton.Channel)
+ {
+ case XAuthorizationChannel.XAuthorization_QQ:
+ result = data.QQ;
+ break;
+ case XAuthorizationChannel.XAuthorization_WeChat:
+ result = data.WX;
+ break;
+ case XAuthorizationChannel.XAuthorization_Guest:
+ result = data.YK;
+ break;
+ default:
+ result = false;
+ break;
+ }
+ }
+ return result;
+ }
+
+ public bool IsSuportReplay()
+ {
+ bool flag = (int)Application.platform == 8;
+ return flag && !this.isIpadMode() && XSingleton<XUpdater.XUpdater>.singleton.XPlatform.CheckStatus("is_screen_record_available", "");
+ }
+
+ private bool isIpadMode()
+ {
+ return false;
+ }
+
+ private bool OnReplayClick(IXUIButton btn)
+ {
+ bool flag = DlgBase<ReplaykitDlg, ReplayBehaviour>.singleton.isPlaying || DlgBase<ReplaykitDlg, ReplayBehaviour>.singleton.isReadyPlaying;
+ if (flag)
+ {
+ XSingleton<XDebug>.singleton.AddLog("Close Replay..", null, null, null, null, null, XDebugColor.XDebug_None);
+ DlgBase<ReplaykitDlg, ReplayBehaviour>.singleton.OnStopClick(null);
+ }
+ else
+ {
+ bool isBroadcast = DlgBase<BroadMiniDlg, BroadcastMiniBehaviour>.singleton.isBroadcast;
+ if (isBroadcast)
+ {
+ XSingleton<XDebug>.singleton.AddLog("replay isBroadcasting", null, null, null, null, null, XDebugColor.XDebug_None);
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString("Replay_IsBroadcasting"), "fece00");
+ }
+ else
+ {
+ bool flag2 = XSingleton<XUpdater.XUpdater>.singleton.XPlatform.CheckStatus("is_broadcasting", "");
+ XSingleton<XDebug>.singleton.AddLog("open: ", flag2.ToString(), null, null, null, null, XDebugColor.XDebug_None);
+ bool flag3 = !flag2;
+ if (flag3)
+ {
+ DlgBase<ReplaykitDlg, ReplayBehaviour>.singleton.OpenRepaly();
+ }
+ else
+ {
+ bool flag4 = (int) Application.platform == 7;
+ if (flag4)
+ {
+ DlgBase<ReplaykitDlg, ReplayBehaviour>.singleton.Show(true);
+ }
+ }
+ }
+ }
+ return true;
+ }
+
+ private int GetQuestionnaireStage()
+ {
+ uint level = XSingleton<XAttributeMgr>.singleton.XPlayerData.Level;
+ SeqList<int> sequenceList = XSingleton<XGlobalConfig>.singleton.GetSequenceList("QuestionnaireLevel", true);
+ for (int i = 0; i < (int)sequenceList.Count; i++)
+ {
+ bool flag = (ulong)level >= (ulong)((long)sequenceList[i, 0]) && (ulong)level <= (ulong)((long)sequenceList[i, 1]);
+ if (flag)
+ {
+ return i + 1;
+ }
+ }
+ return 0;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/GameCommunityHandler.cs.meta b/Client/Assets/Scripts/XMainClient/UI/GameCommunityHandler.cs.meta
new file mode 100644
index 00000000..fa0bf02d
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/GameCommunityHandler.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 7a74d05d2a25d8b45ad75e55d7aa81d7
+timeCreated: 1611403989
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/GameSystem.meta b/Client/Assets/Scripts/XMainClient/UI/GameSystem.meta
new file mode 100644
index 00000000..0cafc76d
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/GameSystem.meta
@@ -0,0 +1,9 @@
+fileFormatVersion: 2
+guid: 77e6f7b6b85b95c4794ce41ed992e45a
+folderAsset: yes
+timeCreated: 1611402943
+licenseType: Free
+DefaultImporter:
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/GameSystem/SkillDlgPromoteHandler.cs b/Client/Assets/Scripts/XMainClient/UI/GameSystem/SkillDlgPromoteHandler.cs
new file mode 100644
index 00000000..ec15c8e9
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/GameSystem/SkillDlgPromoteHandler.cs
@@ -0,0 +1,783 @@
+using System;
+using System.Collections.Generic;
+using KKSG;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI.GameSystem
+{
+ internal class SkillDlgPromoteHandler : DlgHandlerBase
+ {
+ private XSkillTreeDocument _doc = null;
+
+ public int CurrStage;
+
+ public bool IsShowAwake = false;
+
+ private GameObject m_NormalTurnPro;
+
+ private GameObject m_PreviewWindow;
+
+ private GameObject m_AwakePage;
+
+ private IXUILabel m_AwakePoint;
+
+ private IXUILabel m_AwakeTips;
+
+ private IXUITexture m_AwakeBgTex;
+
+ private IXUIButton m_TurnAwakeBtn;
+
+ private IXUILabel m_TurnAwakeBtnText;
+
+ private IXUILabel m_AwakeDesc;
+
+ private int _awakePro;
+
+ private int _pro_L;
+
+ private int _pro_R;
+
+ private int _pro_V;
+
+ private int _currChoosePro;
+
+ private int _currSkill;
+
+ private IXUIButton m_PreviewClose;
+
+ private IXUITexture m_BgTex;
+
+ private readonly string TEXPATH = "atlas/UI/common/ProfPic";
+
+ private string _texPath;
+
+ private GameObject m_BranchGo1;
+
+ private GameObject m_BranchGo2;
+
+ private GameObject m_BranchGo3;
+
+ private IXUIButton m_PreViewBtn;
+
+ private IXUIButton m_TurnProBtn;
+
+ private IXUILabel m_CurrSelectPro;
+
+ private IXUILabel m_TurnProTips;
+
+ private IXUILabel m_TurnProBtnText;
+
+ private IXUICheckBox m_ProChoose_L;
+
+ private IXUICheckBox m_ProChoose_R;
+
+ private IXUICheckBox m_ProChoose_V;
+
+ private XUIPool m_PreViewSkillPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ public IXUITexture m_Snapshot;
+
+ private RenderTexture skillPreView;
+
+ public IXUISprite m_PlayBtn;
+
+ private IXUILabel m_SkillName;
+
+ private IXUILabel m_SkillDesc;
+
+ private XUIPool m_Star_L = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ private XUIPool m_Star_R = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ private XUIPool m_Star_V = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ private int old_branch = 0;
+
+ protected override void Init()
+ {
+ base.Init();
+ this._doc = XDocuments.GetSpecificDocument<XSkillTreeDocument>(XSkillTreeDocument.uuID);
+ this.m_PreviewWindow = base.PanelObject.transform.Find("PreviewWindow").gameObject;
+ this.m_PreviewClose = (base.PanelObject.transform.Find("PreviewWindow/Bg/Close").GetComponent("XUIButton") as IXUIButton);
+ this.m_BgTex = (base.PanelObject.transform.Find("Bg/Texture").GetComponent("XUITexture") as IXUITexture);
+ this.m_BranchGo1 = base.PanelObject.transform.Find("Bg/TurnBranch1").gameObject;
+ this.m_BranchGo2 = base.PanelObject.transform.Find("Bg/TurnBranch2").gameObject;
+ this.m_BranchGo3 = base.PanelObject.transform.Find("Bg/TurnBranch3").gameObject;
+ this.m_PreViewBtn = (base.PanelObject.transform.Find("Bg/PreviewBtn").GetComponent("XUIButton") as IXUIButton);
+ this.m_TurnProBtn = (base.PanelObject.transform.Find("Bg/TurnProBtn").GetComponent("XUIButton") as IXUIButton);
+ this.m_CurrSelectPro = (base.PanelObject.transform.Find("Bg/ProName").GetComponent("XUILabel") as IXUILabel);
+ this.m_TurnProTips = (base.PanelObject.transform.Find("Bg/Tips").GetComponent("XUILabel") as IXUILabel);
+ this.m_TurnProBtnText = (this.m_TurnProBtn.gameObject.transform.Find("Text").GetComponent("XUILabel") as IXUILabel);
+ Transform transform = base.PanelObject.transform.Find("PreviewWindow/ShowFrame/ShowSkill/Tpl");
+ this.m_PreViewSkillPool.SetupPool(transform.parent.gameObject, transform.gameObject, 5u, false);
+ this.m_Snapshot = (base.PanelObject.transform.Find("PreviewWindow/ShowFrame/Snapshot").GetComponent("XUITexture") as IXUITexture);
+ this.m_PlayBtn = (base.PanelObject.transform.Find("PreviewWindow/Play").GetComponent("XUISprite") as IXUISprite);
+ this.m_SkillName = (base.PanelObject.transform.Find("PreviewWindow/ShowFrame/SkillDesc/SkillName").GetComponent("XUILabel") as IXUILabel);
+ this.m_SkillDesc = (base.PanelObject.transform.Find("PreviewWindow/ShowFrame/SkillDesc/SkillDesc").GetComponent("XUILabel") as IXUILabel);
+ this.m_NormalTurnPro = base.PanelObject.transform.Find("Bg").gameObject;
+ this.m_AwakePage = base.PanelObject.transform.Find("Awake").gameObject;
+ this.m_AwakePoint = (base.PanelObject.transform.Find("Awake/Point/value").GetComponent("XUILabel") as IXUILabel);
+ this.m_AwakeTips = (base.PanelObject.transform.Find("Awake/Tips").GetComponent("XUILabel") as IXUILabel);
+ this.m_AwakeBgTex = (base.PanelObject.transform.Find("Awake/Texture").GetComponent("XUITexture") as IXUITexture);
+ this.m_TurnAwakeBtn = (base.PanelObject.transform.Find("Awake/TurnAwakeBtn").GetComponent("XUIButton") as IXUIButton);
+ this.m_TurnAwakeBtnText = (this.m_TurnAwakeBtn.gameObject.transform.Find("Text").GetComponent("XUILabel") as IXUILabel);
+ this.m_AwakeDesc = (base.PanelObject.transform.Find("Awake/Text").GetComponent("XUILabel") as IXUILabel);
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ this.m_PreviewClose.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnWindowCloseClicked));
+ this.m_PreViewBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnPreViewBtnClick));
+ this.m_PlayBtn.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnPlayBtnClick));
+ }
+
+ public bool OnWindowCloseClicked(IXUIButton go)
+ {
+ this.m_PreviewWindow.SetActive(false);
+ return true;
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ bool flag = this.skillPreView == null;
+ if (flag)
+ {
+ this.skillPreView = new RenderTexture(634, 357, 1, 0, 0);
+ this.skillPreView.name = "SkillPreview";
+ this.skillPreView.autoGenerateMips = false;
+ this.skillPreView.Create();
+ }
+ this.m_Snapshot.SetRuntimeTex(this.skillPreView, true);
+ this._doc.SetSkillPreviewTexture(this.skillPreView);
+ this.SetUVRectangle();
+ this.m_PreviewWindow.SetActive(false);
+ bool flag2 = !this.IsShowAwake;
+ if (flag2)
+ {
+ bool flag3 = !this.m_NormalTurnPro.activeSelf;
+ if (flag3)
+ {
+ this.m_NormalTurnPro.SetActive(true);
+ }
+ bool activeSelf = this.m_AwakePage.activeSelf;
+ if (activeSelf)
+ {
+ this.m_AwakePage.SetActive(false);
+ }
+ this.CalPro();
+ this.SetInfo();
+ }
+ else
+ {
+ bool activeSelf2 = this.m_NormalTurnPro.activeSelf;
+ if (activeSelf2)
+ {
+ this.m_NormalTurnPro.SetActive(false);
+ }
+ bool flag4 = !this.m_AwakePage.activeSelf;
+ if (flag4)
+ {
+ this.m_AwakePage.SetActive(true);
+ }
+ this.SetAwakeInfo();
+ }
+ }
+
+ protected override void OnHide()
+ {
+ this.m_BgTex.SetTexturePath("");
+ bool flag = DlgBase<XSkillTreeView, XSkillTreeBehaviour>.singleton.IsVisible();
+ if (flag)
+ {
+ this._doc.SetSkillPreviewTexture(DlgBase<XSkillTreeView, XSkillTreeBehaviour>.singleton.skillPreView);
+ XSingleton<XSkillPreViewMgr>.singleton.SkillShowEnd(this._doc.Dummy);
+ }
+ bool flag2 = this.skillPreView != null;
+ if (flag2)
+ {
+ this.m_Snapshot.SetRuntimeTex(null, true);
+ this.skillPreView = null;
+ }
+ base.OnHide();
+ }
+
+ public override void OnUnload()
+ {
+ base.OnUnload();
+ }
+
+ private void CalPro()
+ {
+ int num = 1;
+ for (int i = 0; i < this.CurrStage; i++)
+ {
+ num *= 10;
+ }
+ this._pro_L = num + (int)XSingleton<XAttributeMgr>.singleton.XPlayerData.TypeID;
+ this._pro_R = num * 2 + (int)XSingleton<XAttributeMgr>.singleton.XPlayerData.TypeID;
+ this._pro_V = num * 3 + (int)XSingleton<XAttributeMgr>.singleton.XPlayerData.TypeID;
+ bool flag = !XSingleton<XProfessionSkillMgr>.singleton.GetProfIsInLeft(this._pro_L);
+ if (flag)
+ {
+ int pro_L = this._pro_L;
+ this._pro_L = this._pro_R;
+ this._pro_R = pro_L;
+ }
+ bool flag2 = this._currChoosePro != this._pro_L && this._currChoosePro != this._pro_R && this._currChoosePro != this._pro_V;
+ if (flag2)
+ {
+ this._currChoosePro = this._pro_L;
+ this.m_CurrSelectPro.SetText(XSingleton<XProfessionSkillMgr>.singleton.GetProfName(this._currChoosePro));
+ }
+ }
+
+ private void ChangeGo()
+ {
+ bool flag = XSingleton<XProfessionSkillMgr>.singleton.IsExistProf(this._pro_L);
+ bool flag2 = XSingleton<XProfessionSkillMgr>.singleton.IsExistProf(this._pro_R);
+ bool flag3 = XSingleton<XProfessionSkillMgr>.singleton.IsExistProf(this._pro_V);
+ bool flag4 = flag3;
+ if (flag4)
+ {
+ flag3 = XSkillTreeDocument.IsAvengerTaskDone(this._pro_V);
+ }
+ int num = 0;
+ bool flag5 = flag;
+ if (flag5)
+ {
+ num++;
+ }
+ bool flag6 = flag2;
+ if (flag6)
+ {
+ num++;
+ }
+ bool flag7 = flag3;
+ if (flag7)
+ {
+ num++;
+ }
+ bool flag8 = num != this.old_branch;
+ if (flag8)
+ {
+ this.m_BranchGo1.SetActive(1 == num);
+ this.m_BranchGo2.SetActive(2 == num);
+ this.m_BranchGo3.SetActive(3 == num);
+ }
+ Transform transform = base.PanelObject.transform.Find(string.Format("Bg/TurnBranch{0}", num));
+ bool flag9 = transform != null;
+ if (flag9)
+ {
+ bool flag10 = flag;
+ if (flag10)
+ {
+ GameObject gameObject = transform.Find("ProDetail1").gameObject;
+ this.SetProGo(gameObject, this._pro_L, num);
+ }
+ bool flag11 = flag2;
+ if (flag11)
+ {
+ GameObject gameObject2 = transform.Find("ProDetail2").gameObject;
+ this.SetProGo(gameObject2, this._pro_R, num);
+ }
+ bool flag12 = flag3;
+ if (flag12)
+ {
+ GameObject gameObject3 = transform.Find("ProDetail3").gameObject;
+ this.SetProGo(gameObject3, this._pro_V, num);
+ }
+ }
+ string profPic = XSingleton<XProfessionSkillMgr>.singleton.GetProfPic((!flag3) ? this._pro_L : this._pro_V);
+ this._texPath = string.Format("{0}/{1}", this.TEXPATH, profPic);
+ this.m_BgTex.SetTexturePath(this._texPath);
+ this.old_branch = num;
+ }
+
+ private void SetInfo()
+ {
+ this.ChangeGo();
+ this.SetProfBtnInfo();
+ }
+
+ private void SetProfBtnInfo()
+ {
+ bool flag = this.IsAvengr(this._currChoosePro);
+ if (flag)
+ {
+ bool flag2 = XSkillTreeDocument.IsAvengerTaskDone(this._currChoosePro);
+ if (flag2)
+ {
+ this.m_TurnProTips.SetVisible(false);
+ this.m_TurnProBtnText.SetText(XStringDefineProxy.GetString("TurnProfessionBtnTips2"));
+ this.m_TurnProBtn.SetGrey(true);
+ this.m_TurnProBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnTurnProBtnClick));
+ }
+ else
+ {
+ this.m_TurnProTips.SetVisible(false);
+ this.m_TurnProBtnText.SetText(XStringDefineProxy.GetString("TurnProfessionBtnTips2"));
+ this.m_TurnProBtn.SetGrey(false);
+ this.m_TurnProBtn.RegisterClickEventHandler(null);
+ }
+ }
+ else
+ {
+ XTaskDocument specificDocument = XDocuments.GetSpecificDocument<XTaskDocument>(XTaskDocument.uuID);
+ uint taskid = (uint)this._doc.TurnProTaskIDList[this.CurrStage - 1];
+ bool flag3 = specificDocument.TaskRecord.IsTaskFinished(taskid);
+ if (flag3)
+ {
+ this.m_TurnProTips.SetVisible(false);
+ this.m_TurnProBtnText.SetText(XStringDefineProxy.GetString("TurnProfessionBtnTips2"));
+ this.m_TurnProBtn.SetGrey(true);
+ this.m_TurnProBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnTurnProBtnClick));
+ }
+ else
+ {
+ this.m_TurnProTips.SetVisible(true);
+ this.m_TurnProTips.SetText(this._doc.TransferLimit[this.CurrStage].ToString());
+ this.m_TurnProBtnText.SetText(XStringDefineProxy.GetString("TurnProfessionBtnTips1"));
+ bool flag4 = XSingleton<XAttributeMgr>.singleton.XPlayerData.Level >= this._doc.TransferLimit[this.CurrStage];
+ if (flag4)
+ {
+ this.m_TurnProBtn.SetGrey(true);
+ this.m_TurnProBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnGoToTask));
+ }
+ else
+ {
+ this.m_TurnProBtn.SetGrey(false);
+ this.m_TurnProBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnCanNotGoToTaskClick));
+ }
+ }
+ }
+ }
+
+ private void SetAwakeInfo()
+ {
+ int num = 1;
+ for (int i = 0; i < this.CurrStage; i++)
+ {
+ num *= 10;
+ }
+ this._awakePro = num + (int)XSingleton<XAttributeMgr>.singleton.XPlayerData.TypeID;
+ string profPic = XSingleton<XProfessionSkillMgr>.singleton.GetProfPic(this._awakePro);
+ this._texPath = string.Format("{0}/{1}", this.TEXPATH, profPic);
+ this.m_AwakeBgTex.SetTexturePath(this._texPath);
+ this.m_AwakeDesc.SetText(XSingleton<XProfessionSkillMgr>.singleton.GetProfDesc(this._awakePro));
+ XTaskDocument specificDocument = XDocuments.GetSpecificDocument<XTaskDocument>(XTaskDocument.uuID);
+ bool flag = false;
+ bool flag2 = this.CurrStage - 1 < this._doc.TurnProTaskIDList.Count;
+ if (flag2)
+ {
+ uint taskid = (uint)this._doc.TurnProTaskIDList[this.CurrStage - 1];
+ flag = specificDocument.TaskRecord.IsTaskFinished(taskid);
+ }
+ else
+ {
+ XSingleton<XDebug>.singleton.AddLog("GlobalConfig 觉醒任务ID未配置!", null, null, null, null, null, XDebugColor.XDebug_None);
+ }
+ bool flag3 = flag;
+ if (flag3)
+ {
+ this.m_AwakeTips.SetVisible(false);
+ this.m_TurnAwakeBtnText.SetText(XStringDefineProxy.GetString("TurnAwakeBtnTips2"));
+ this.m_TurnAwakeBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnAwakeComplete));
+ }
+ else
+ {
+ this.m_AwakeTips.SetVisible(true);
+ this.m_AwakeTips.SetText(XStringDefineProxy.GetString("TurnAwakeTips"));
+ this.m_TurnAwakeBtnText.SetText(XStringDefineProxy.GetString("TurnProfessionBtnTips1"));
+ bool flag4 = XSingleton<XAttributeMgr>.singleton.XPlayerData.Level >= this._doc.TransferLimit[this.CurrStage];
+ if (flag4)
+ {
+ this.m_TurnAwakeBtn.SetGrey(true);
+ this.m_TurnAwakeBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnGoToAwakeTask));
+ }
+ else
+ {
+ this.m_TurnAwakeBtn.SetGrey(false);
+ this.m_TurnAwakeBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnCanNotGoToAwakeTaskClick));
+ }
+ }
+ int num2 = (int)XSingleton<XGame>.singleton.Doc.XBagDoc.GetVirtualItemCount(ItemEnum.AWAKE_POINT);
+ int @int = XSingleton<XGlobalConfig>.singleton.GetInt("AwakeNeedPoint");
+ this.m_AwakePoint.SetText(string.Format("{0}{1}/{2}", (num2 < @int) ? "[e60012]" : "", num2, @int));
+ }
+
+ private void SetProGo(GameObject go, int pro, int branch)
+ {
+ IXUILabel ixuilabel = go.transform.Find("Name").GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel2 = go.transform.Find("Desc").GetComponent("XUILabel") as IXUILabel;
+ IXUISprite ixuisprite = go.transform.Find("Icon").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.spriteName = XSingleton<XProfessionSkillMgr>.singleton.GetProfIcon(pro);
+ ixuilabel.SetText(XSingleton<XProfessionSkillMgr>.singleton.GetProfName(pro));
+ ixuilabel2.SetText(XSingleton<XProfessionSkillMgr>.singleton.GetProfDesc(pro));
+ IXUICheckBox ixuicheckBox = go.GetComponent("XUICheckBox") as IXUICheckBox;
+ ixuicheckBox.ID = (ulong)((long)pro);
+ ixuicheckBox.RegisterOnCheckEventHandler(new CheckBoxOnCheckEventHandler(this.OnProClick));
+ bool flag = pro == this._pro_L;
+ XUIPool xuipool;
+ if (flag)
+ {
+ this.m_ProChoose_L = ixuicheckBox;
+ bool flag2 = branch != this.old_branch;
+ if (flag2)
+ {
+ Transform transform = base.PanelObject.transform.Find(string.Format("Bg/TurnBranch{0}/ProDetail1/Star/Tpl", branch));
+ this.m_Star_L.SetupPool(transform.parent.gameObject, transform.gameObject, 5u, false);
+ }
+ xuipool = this.m_Star_L;
+ }
+ else
+ {
+ bool flag3 = pro == this._pro_V;
+ if (flag3)
+ {
+ this.m_ProChoose_V = ixuicheckBox;
+ bool flag4 = branch != this.old_branch;
+ if (flag4)
+ {
+ Transform transform2 = base.PanelObject.transform.Find(string.Format("Bg/TurnBranch{0}/ProDetail3/Star/Tpl", branch));
+ this.m_Star_V.SetupPool(transform2.parent.gameObject, transform2.gameObject, 5u, false);
+ }
+ xuipool = this.m_Star_V;
+ }
+ else
+ {
+ this.m_ProChoose_R = ixuicheckBox;
+ bool flag5 = branch != this.old_branch;
+ if (flag5)
+ {
+ Transform transform3 = base.PanelObject.transform.Find(string.Format("Bg/TurnBranch{0}/ProDetail2/Star/Tpl", branch));
+ this.m_Star_R.SetupPool(transform3.parent.gameObject, transform3.gameObject, 5u, false);
+ }
+ xuipool = this.m_Star_R;
+ }
+ }
+ ixuicheckBox.bChecked = (pro == this._currChoosePro);
+ xuipool.ReturnAll(false);
+ Vector3 tplPos = xuipool.TplPos;
+ uint profOperateLevel = XSingleton<XProfessionSkillMgr>.singleton.GetProfOperateLevel(pro);
+ int @int = XSingleton<XGlobalConfig>.singleton.GetInt("ProfOperateLevelMax");
+ for (int i = 0; i < @int; i++)
+ {
+ GameObject gameObject = xuipool.FetchGameObject(false);
+ gameObject.transform.localPosition = new Vector3(tplPos.x + (float)(i * xuipool.TplWidth), tplPos.y);
+ IXUISprite ixuisprite2 = gameObject.transform.Find("Star").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite2.spriteName = (((long)i < (long)((ulong)profOperateLevel)) ? "BossrushStar_1" : "BossrushStar_0");
+ }
+ }
+
+ private bool OnProClick(IXUICheckBox icb)
+ {
+ bool flag = !icb.bChecked;
+ bool result;
+ if (flag)
+ {
+ result = true;
+ }
+ else
+ {
+ this._currChoosePro = (int)icb.ID;
+ this.m_CurrSelectPro.SetText(XSingleton<XProfessionSkillMgr>.singleton.GetProfName(this._currChoosePro));
+ this.SetProfBtnInfo();
+ result = true;
+ }
+ return result;
+ }
+
+ private bool IsAvengr(int prof)
+ {
+ return prof > 10 && prof / 10 % 10 == 3;
+ }
+
+ private bool OnPreViewBtnClick(IXUIButton btn)
+ {
+ this.ShowPreView();
+ return true;
+ }
+
+ private void ShowPreView()
+ {
+ this.m_PreviewWindow.SetActive(true);
+ this.SetupPreViewTab();
+ this.SetupPreViewInfo();
+ }
+
+ private bool OnPreViewCheckBoxClick(IXUICheckBox icb)
+ {
+ bool flag = !icb.bChecked;
+ bool result;
+ if (flag)
+ {
+ result = true;
+ }
+ else
+ {
+ this._currChoosePro = (int)icb.ID;
+ this.m_CurrSelectPro.SetText(XSingleton<XProfessionSkillMgr>.singleton.GetProfName(this._currChoosePro));
+ bool flag2 = this._currChoosePro == this._pro_L;
+ if (flag2)
+ {
+ this.m_ProChoose_L.bChecked = true;
+ }
+ else
+ {
+ bool flag3 = this._currChoosePro == this._pro_V;
+ if (flag3)
+ {
+ this.m_ProChoose_V.bChecked = true;
+ }
+ else
+ {
+ this.m_ProChoose_R.bChecked = true;
+ }
+ }
+ this.SetupPreViewInfo();
+ result = true;
+ }
+ return result;
+ }
+
+ private void SetupPreViewTab()
+ {
+ IXUICheckBox ixuicheckBox = base.PanelObject.transform.Find("PreviewWindow/ShowFrame/Tab1").GetComponent("XUICheckBox") as IXUICheckBox;
+ IXUICheckBox ixuicheckBox2 = base.PanelObject.transform.Find("PreviewWindow/ShowFrame/Tab2").GetComponent("XUICheckBox") as IXUICheckBox;
+ IXUICheckBox ixuicheckBox3 = base.PanelObject.transform.Find("PreviewWindow/ShowFrame/Tab3").GetComponent("XUICheckBox") as IXUICheckBox;
+ ixuicheckBox.ID = (ulong)((long)this._pro_L);
+ ixuicheckBox2.ID = (ulong)((long)this._pro_R);
+ ixuicheckBox3.ID = (ulong)((long)this._pro_V);
+ bool flag = this._currChoosePro == this._pro_L;
+ if (flag)
+ {
+ ixuicheckBox.bChecked = true;
+ }
+ else
+ {
+ bool flag2 = this._currChoosePro == this._pro_R;
+ if (flag2)
+ {
+ ixuicheckBox2.bChecked = true;
+ }
+ else
+ {
+ ixuicheckBox3.bChecked = true;
+ }
+ }
+ bool flag3 = XSingleton<XProfessionSkillMgr>.singleton.IsExistProf(this._pro_L);
+ bool flag4 = XSingleton<XProfessionSkillMgr>.singleton.IsExistProf(this._pro_R);
+ bool flag5 = XSingleton<XProfessionSkillMgr>.singleton.IsExistProf(this._pro_V);
+ bool flag6 = flag5;
+ if (flag6)
+ {
+ flag5 = XSkillTreeDocument.IsAvengerTaskDone(this._pro_V);
+ }
+ ixuicheckBox.gameObject.SetActive(flag3);
+ ixuicheckBox2.gameObject.SetActive(flag4);
+ ixuicheckBox3.gameObject.SetActive(flag5);
+ bool flag7 = flag3;
+ if (flag7)
+ {
+ ixuicheckBox.RegisterOnCheckEventHandler(new CheckBoxOnCheckEventHandler(this.OnPreViewCheckBoxClick));
+ string profName = XSingleton<XProfessionSkillMgr>.singleton.GetProfName(this._pro_L);
+ IXUILabel ixuilabel = ixuicheckBox.gameObject.transform.Find("TextLabel").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel.SetText(profName);
+ ixuilabel = (ixuicheckBox.gameObject.transform.Find("SelectedTextLabel").GetComponent("XUILabel") as IXUILabel);
+ ixuilabel.SetText(profName);
+ }
+ bool flag8 = flag4;
+ if (flag8)
+ {
+ ixuicheckBox2.RegisterOnCheckEventHandler(new CheckBoxOnCheckEventHandler(this.OnPreViewCheckBoxClick));
+ string profName2 = XSingleton<XProfessionSkillMgr>.singleton.GetProfName(this._pro_R);
+ IXUILabel ixuilabel2 = ixuicheckBox2.gameObject.transform.Find("TextLabel").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel2.SetText(profName2);
+ ixuilabel2 = (ixuicheckBox2.gameObject.transform.Find("SelectedTextLabel").GetComponent("XUILabel") as IXUILabel);
+ ixuilabel2.SetText(profName2);
+ }
+ bool flag9 = flag5;
+ if (flag9)
+ {
+ ixuicheckBox3.RegisterOnCheckEventHandler(new CheckBoxOnCheckEventHandler(this.OnPreViewCheckBoxClick));
+ string profName3 = XSingleton<XProfessionSkillMgr>.singleton.GetProfName(this._pro_V);
+ IXUILabel ixuilabel3 = ixuicheckBox3.gameObject.transform.Find("TextLabel").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel3.SetText(profName3);
+ ixuilabel3 = (ixuicheckBox3.gameObject.transform.Find("SelectedTextLabel").GetComponent("XUILabel") as IXUILabel);
+ ixuilabel3.SetText(profName3);
+ }
+ }
+
+ private void SetupPreViewInfo()
+ {
+ List<uint> profSkillID = XSingleton<XProfessionSkillMgr>.singleton.GetProfSkillID(this._currChoosePro);
+ this.m_PreViewSkillPool.ReturnAll(false);
+ Vector3 tplPos = this.m_PreViewSkillPool.TplPos;
+ IXUICheckBox ixuicheckBox = null;
+ for (int i = 0; i < profSkillID.Count; i++)
+ {
+ SkillList.RowData skillConfig = XSingleton<XSkillEffectMgr>.singleton.GetSkillConfig(profSkillID[i], 0u);
+ GameObject gameObject = this.m_PreViewSkillPool.FetchGameObject(false);
+ gameObject.name = profSkillID[i].ToString();
+ gameObject.transform.localPosition = new Vector3(tplPos.x, tplPos.y - (float)(i * this.m_PreViewSkillPool.TplHeight));
+ IXUISprite ixuisprite = gameObject.transform.Find("Bg").GetComponent("XUISprite") as IXUISprite;
+ bool flag = skillConfig.SkillType == 2;
+ if (flag)
+ {
+ ixuisprite.SetSprite("JN_dk_0");
+ }
+ else
+ {
+ ixuisprite.SetSprite("JN_dk");
+ }
+ IXUISprite ixuisprite2 = gameObject.transform.Find("Icon").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite2.SetSprite(skillConfig.Icon, skillConfig.Atlas, false);
+ IXUICheckBox ixuicheckBox2 = gameObject.GetComponent("XUICheckBox") as IXUICheckBox;
+ ixuicheckBox2.ID = (ulong)profSkillID[i];
+ ixuicheckBox2.RegisterOnCheckEventHandler(new CheckBoxOnCheckEventHandler(this.OnSkillPreViewClick));
+ bool flag2 = i == 0;
+ if (flag2)
+ {
+ this._currSkill = (int)profSkillID[i];
+ ixuicheckBox = ixuicheckBox2;
+ this.SetupSkillInfo();
+ }
+ }
+ bool flag3 = ixuicheckBox != null;
+ if (flag3)
+ {
+ ixuicheckBox.bChecked = true;
+ }
+ }
+
+ private bool OnSkillPreViewClick(IXUICheckBox icb)
+ {
+ bool flag = !icb.bChecked;
+ bool result;
+ if (flag)
+ {
+ result = true;
+ }
+ else
+ {
+ this._currSkill = (int)icb.ID;
+ this.SetupSkillInfo();
+ result = true;
+ }
+ return result;
+ }
+
+ private void SetupSkillInfo()
+ {
+ SkillList.RowData skillConfig = XSingleton<XSkillEffectMgr>.singleton.GetSkillConfig((uint)this._currSkill, 0u);
+ this.m_SkillName.SetText(skillConfig.ScriptName);
+ this.m_SkillDesc.SetText(skillConfig.CurrentLevelDescription);
+ this.m_PlayBtn.SetVisible(true);
+ XSingleton<XSkillPreViewMgr>.singleton.SkillShowEnd(this._doc.Dummy);
+ XSingleton<XSkillPreViewMgr>.singleton.SkillShowBegin(this._doc.Dummy, this._doc.BlackHouseCamera);
+ }
+
+ private void OnPlayBtnClick(IXUISprite iSp)
+ {
+ this.PlaySkill(this._currSkill);
+ }
+
+ private void PlaySkill(int pro)
+ {
+ this.m_PlayBtn.SetVisible(false);
+ XSingleton<XSkillPreViewMgr>.singleton.ShowSkill(this._doc.Dummy, (uint)this._currSkill, 0u);
+ }
+
+ protected bool OnTurnProBtnClick(IXUIButton go)
+ {
+ DlgBase<ModalDlg, ModalDlgBehaviour>.singleton._bHasGrey = false;
+ DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.SetVisible(false, true);
+ DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.SetSingleButtonMode(false);
+ DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.SetLabels(string.Format(XStringDefineProxy.GetString(XStringDefine.SKILL_WILL_PROMOTE), XSingleton<XProfessionSkillMgr>.singleton.GetProfName(this._currChoosePro)), XStringDefineProxy.GetString(XStringDefine.COMMON_OK), XStringDefineProxy.GetString(XStringDefine.COMMON_CANCEL));
+ DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.SetModalCallback(new ButtonClickEventHandler(this.OnPromoteConfirmed), null);
+ DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.SetTweenTargetAndPlay(DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.uiBehaviour.gameObject);
+ return true;
+ }
+
+ private bool OnPromoteConfirmed(IXUIButton go)
+ {
+ RpcC2G_ChooseProfession rpcC2G_ChooseProfession = new RpcC2G_ChooseProfession();
+ rpcC2G_ChooseProfession.oArg.prof = (RoleType)this._currChoosePro;
+ XSingleton<XClientNetwork>.singleton.Send(rpcC2G_ChooseProfession);
+ DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.SetVisible(false, true);
+ return true;
+ }
+
+ private bool OnGoToTask(IXUIButton btn)
+ {
+ bool flag = XSingleton<XScene>.singleton.SceneType != SceneType.SCENE_HALL;
+ bool result;
+ if (flag)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString("SKILL_HALL_REQUIRED"), "fece00");
+ result = true;
+ }
+ else
+ {
+ DlgBase<XSkillTreeView, XSkillTreeBehaviour>.singleton.SetVisible(false, true);
+ XSingleton<XDebug>.singleton.AddLog("Find Npc ", this._doc.NpcID[(int)(XSingleton<XAttributeMgr>.singleton.XPlayerData.TypeID % 10u - 1u)].ToString(), null, null, null, null, XDebugColor.XDebug_None);
+ XSingleton<XInput>.singleton.LastNpc = XSingleton<XEntityMgr>.singleton.GetNpc((uint)this._doc.NpcID[(int)(XSingleton<XAttributeMgr>.singleton.XPlayerData.TypeID % 10u - 1u)]);
+ result = true;
+ }
+ return result;
+ }
+
+ private bool OnCanNotGoToTaskClick(IXUIButton btn)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString("TURNPROF_LEVELFAIL"), "fece00");
+ return true;
+ }
+
+ public void SetUVRectangle()
+ {
+ Rect rect = this._doc.BlackHouseCamera.rect;
+ rect.y = (rect.y * 357f + 1f) / 357f;
+ rect.height = (rect.height * 357f - 2f) / 357f;
+ this.m_Snapshot.SetUVRect(rect);
+ }
+
+ private bool OnAwakeComplete(IXUIButton btn)
+ {
+ XSingleton<XDebug>.singleton.AddLog("Awake Completed", null, null, null, null, null, XDebugColor.XDebug_None);
+ RpcC2G_ChooseProfession rpcC2G_ChooseProfession = new RpcC2G_ChooseProfession();
+ rpcC2G_ChooseProfession.oArg.prof = (RoleType)this._awakePro;
+ XSingleton<XClientNetwork>.singleton.Send(rpcC2G_ChooseProfession);
+ return true;
+ }
+
+ private bool OnGoToAwakeTask(IXUIButton btn)
+ {
+ bool flag = XSingleton<XScene>.singleton.SceneType != SceneType.SCENE_HALL;
+ bool result;
+ if (flag)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString("SKILL_HALL_REQUIRED"), "fece00");
+ result = true;
+ }
+ else
+ {
+ DlgBase<XSkillTreeView, XSkillTreeBehaviour>.singleton.SetVisible(false, true);
+ XSingleton<XDebug>.singleton.AddLog("Find Npc ", this._doc.NpcID[(int)(XSingleton<XAttributeMgr>.singleton.XPlayerData.TypeID % 10u - 1u)].ToString(), null, null, null, null, XDebugColor.XDebug_None);
+ XSingleton<XInput>.singleton.LastNpc = XSingleton<XEntityMgr>.singleton.GetNpc((uint)this._doc.NpcID[(int)(XSingleton<XAttributeMgr>.singleton.XPlayerData.TypeID % 10u - 1u)]);
+ result = true;
+ }
+ return result;
+ }
+
+ private bool OnCanNotGoToAwakeTaskClick(IXUIButton btn)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString("TURNAWAKE_LEVELFAIL"), "fece00");
+ return true;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/GameSystem/SkillDlgPromoteHandler.cs.meta b/Client/Assets/Scripts/XMainClient/UI/GameSystem/SkillDlgPromoteHandler.cs.meta
new file mode 100644
index 00000000..3a393e3f
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/GameSystem/SkillDlgPromoteHandler.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 2f6345300aa83cf4d9a476ba56bcce9a
+timeCreated: 1611403516
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/GuildArenaBattleDuelInfo.cs b/Client/Assets/Scripts/XMainClient/UI/GuildArenaBattleDuelInfo.cs
new file mode 100644
index 00000000..8b855f85
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/GuildArenaBattleDuelInfo.cs
@@ -0,0 +1,40 @@
+using System;
+using UnityEngine;
+
+namespace XMainClient.UI
+{
+ public class GuildArenaBattleDuelInfo
+ {
+ private Transform transfrom;
+
+ public GuildArenaBattleDuelTeamInfo BlueInfo;
+
+ public GuildArenaBattleDuelTeamInfo RedInfo;
+
+ public void Init(Transform t)
+ {
+ this.transfrom = t;
+ this.BlueInfo = new GuildArenaBattleDuelTeamInfo();
+ this.BlueInfo.Init(this.transfrom.Find("Blue"));
+ this.RedInfo = new GuildArenaBattleDuelTeamInfo();
+ this.RedInfo.Init(this.transfrom.Find("Red"));
+ }
+
+ public void SetVisible(bool active)
+ {
+ this.transfrom.gameObject.SetActive(active);
+ }
+
+ public void Reset()
+ {
+ this.BlueInfo.Reset();
+ this.RedInfo.Reset();
+ }
+
+ public void Destroy()
+ {
+ this.BlueInfo = null;
+ this.RedInfo = null;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/GuildArenaBattleDuelInfo.cs.meta b/Client/Assets/Scripts/XMainClient/UI/GuildArenaBattleDuelInfo.cs.meta
new file mode 100644
index 00000000..bf97a98e
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/GuildArenaBattleDuelInfo.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 919462975f8595f4da996c8b090b2339
+timeCreated: 1611404143
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/GuildArenaBattleDuelTeamInfo.cs b/Client/Assets/Scripts/XMainClient/UI/GuildArenaBattleDuelTeamInfo.cs
new file mode 100644
index 00000000..63958e78
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/GuildArenaBattleDuelTeamInfo.cs
@@ -0,0 +1,58 @@
+using System;
+using System.Collections.Generic;
+using UILib;
+using UnityEngine;
+
+namespace XMainClient.UI
+{
+ public class GuildArenaBattleDuelTeamInfo
+ {
+ private Transform transform;
+
+ private IXUILabel m_damageLabel;
+
+ private IXUILabel m_killLabel;
+
+ private List<IXUISprite> m_scoreSprites = new List<IXUISprite>();
+
+ public void Init(Transform t)
+ {
+ this.transform = t;
+ this.m_damageLabel = (this.transform.Find("Damage").GetComponent("XUILabel") as IXUILabel);
+ this.m_killLabel = (this.transform.Find("Kill").GetComponent("XUILabel") as IXUILabel);
+ string format = "Score/Score{0}/Win";
+ string format2 = "Score/Score{0}/Lose";
+ for (int i = 1; i < 4; i++)
+ {
+ IXUISprite item = this.transform.Find(string.Format(format, i)).GetComponent("XUISprite") as IXUISprite;
+ this.m_scoreSprites.Add(item);
+ IXUISprite ixuisprite = this.transform.Find(string.Format(format2, i)).GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.SetAlpha(0f);
+ }
+ this.Reset();
+ }
+
+ public void Set(GVGCombatInfo info)
+ {
+ this.Set(info.DamageString, info.KillCountString, info.Score);
+ }
+
+ public void Reset()
+ {
+ this.Set("0", "0", 0);
+ }
+
+ private void Set(string damage, string kill, int score)
+ {
+ this.m_damageLabel.SetText(damage);
+ this.m_killLabel.SetText(kill);
+ int i = 0;
+ int count = this.m_scoreSprites.Count;
+ while (i < count)
+ {
+ this.m_scoreSprites[i].SetAlpha((score > i) ? 1f : 0f);
+ i++;
+ }
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/GuildArenaBattleDuelTeamInfo.cs.meta b/Client/Assets/Scripts/XMainClient/UI/GuildArenaBattleDuelTeamInfo.cs.meta
new file mode 100644
index 00000000..6d90f097
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/GuildArenaBattleDuelTeamInfo.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 14d8a4dde45b0e441af160fe9038b938
+timeCreated: 1611403260
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/GuildArenaCombatHandle.cs b/Client/Assets/Scripts/XMainClient/UI/GuildArenaCombatHandle.cs
new file mode 100644
index 00000000..2e45d867
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/GuildArenaCombatHandle.cs
@@ -0,0 +1,264 @@
+using System;
+using System.Collections.Generic;
+using KKSG;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XMainClient.Utility;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class GuildArenaCombatHandle : DlgHandlerBase
+ {
+ protected override string FileName
+ {
+ get
+ {
+ return "Guild/GuildArena/CombatFrame";
+ }
+ }
+
+ private Transform m_CombatPanel;
+
+ private Transform m_NaPanel;
+
+ private XUITabControl m_tabControl = new XUITabControl();
+
+ private List<GuildArenaCombatInfo> m_GuildCombat = new List<GuildArenaCombatInfo>();
+
+ private GuildArenaGuildInfo m_GuildCup;
+
+ private IXUILabel m_combatTips;
+
+ private XGuildArenaDocument _Doc = null;
+
+ private IXUISprite m_honorSprite;
+
+ private IXUILabel m_naLabel;
+
+ private IXUIButton m_enterBattle;
+
+ private IXUIButton m_showRank;
+
+ private IXUILabel m_RegistrationCount;
+
+ public override void RefreshData()
+ {
+ base.RefreshData();
+ bool bInArenaTime = this._Doc.bInArenaTime;
+ if (bInArenaTime)
+ {
+ this.m_RegistrationCount.SetVisible(true);
+ this.m_CombatPanel.gameObject.SetActive(true);
+ this.m_NaPanel.gameObject.SetActive(false);
+ this.RefreshMessage();
+ this.RefreshCombatHandle();
+ }
+ else
+ {
+ this.m_RegistrationCount.SetVisible(false);
+ this.m_CombatPanel.gameObject.SetActive(false);
+ this.m_NaPanel.gameObject.SetActive(true);
+ }
+ bool flag = this._Doc.bHasAvailableJion && this._Doc.VisibleEnterBattle;
+ if (flag)
+ {
+ this.m_enterBattle.SetVisible(true);
+ uint canEnterBattle = this._Doc.CanEnterBattle;
+ if (canEnterBattle - 1u > 1u)
+ {
+ if (canEnterBattle != 3u)
+ {
+ this.m_enterBattle.SetGrey(false);
+ }
+ else
+ {
+ this.m_enterBattle.SetGrey(false);
+ }
+ }
+ else
+ {
+ this.m_enterBattle.SetGrey(true);
+ }
+ }
+ else
+ {
+ this.m_enterBattle.SetVisible(false);
+ }
+ }
+
+ protected override void Init()
+ {
+ base.Init();
+ this._Doc = XDocuments.GetSpecificDocument<XGuildArenaDocument>(XGuildArenaDocument.uuID);
+ this.m_CombatPanel = base.PanelObject.transform.Find("Combat");
+ this.m_NaPanel = base.PanelObject.transform.Find("NA");
+ this.m_naLabel = (base.PanelObject.transform.Find("NA/tip").GetComponent("XUILabel") as IXUILabel);
+ this.m_naLabel.SetText(XStringDefineProxy.GetString("GUILD_ARENA_COMBAT_NA"));
+ Transform tabTpl = base.PanelObject.transform.Find("Combat/Tabs/TabTpl");
+ this.m_tabControl.SetTabTpl(tabTpl);
+ this.m_GuildCup = DlgHandlerBase.EnsureCreate<GuildArenaGuildInfo>(ref this.m_GuildCup, base.PanelObject.transform.Find("Combat/Cup").gameObject, null, true);
+ this.m_combatTips = (base.PanelObject.transform.Find("Combat/txt_TimeLabel").GetComponent("XUILabel") as IXUILabel);
+ this.m_honorSprite = (base.PanelObject.transform.Find("Combat/honor").GetComponent("XUISprite") as IXUISprite);
+ this.m_enterBattle = (base.PanelObject.transform.Find("Combat/LetMeDie").GetComponent("XUIButton") as IXUIButton);
+ this.m_enterBattle.SetVisible(false);
+ this.m_showRank = (base.PanelObject.transform.Find("TopRankBtn").GetComponent("XUIButton") as IXUIButton);
+ this.m_RegistrationCount = (base.PanelObject.transform.Find("Title/Period").GetComponent("XUILabel") as IXUILabel);
+ this.m_RegistrationCount.SetVisible(false);
+ this.InitCombatHandle();
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ this.m_enterBattle.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnEnterBattleClick));
+ this.m_showRank.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnShowRankClick));
+ }
+
+ private bool OnShowRankClick(IXUIButton btn)
+ {
+ DlgBase<GuildArenaRankDlg, GuildArenaRankBehaviour>.singleton.SetVisibleWithAnimation(true, null);
+ return true;
+ }
+
+ private bool OnEnterBattleClick(IXUIButton btn)
+ {
+ bool flag = this._Doc.CanEnterBattle != 1u && this._Doc.CanEnterBattle != 2u;
+ bool result;
+ if (flag)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString("GUILD_ARENA_OUTTIME"), "fece00");
+ result = false;
+ }
+ else
+ {
+ this._Doc.SendGuildArenaJoinBattle();
+ result = false;
+ }
+ return result;
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ this.RefreshData();
+ this.m_RegistrationCount.SetText(XStringDefineProxy.GetString("CROSS_GVG_Registration", new object[]
+ {
+ this._Doc.RegistrationCount
+ }));
+ this._Doc.SendGuildArenaInfo();
+ }
+
+ public override void OnUnload()
+ {
+ this.UnLoadCombatHandle(ref this.m_GuildCombat);
+ DlgHandlerBase.EnsureUnload<GuildArenaGuildInfo>(ref this.m_GuildCup);
+ bool flag = this.m_tabControl != null;
+ if (flag)
+ {
+ this.m_tabControl = null;
+ }
+ base.OnUnload();
+ }
+
+ private void InitCombatHandle()
+ {
+ this.CreateCombatHandle(0, 4);
+ this.CreateCombatHandle(1, 2);
+ this.CreateCombatHandle(2, 1);
+ }
+
+ private void UnLoadCombatHandle(ref List<GuildArenaCombatInfo> guildCombats)
+ {
+ bool flag = guildCombats == null;
+ if (!flag)
+ {
+ int i = 0;
+ int count = guildCombats.Count;
+ while (i < count)
+ {
+ bool flag2 = guildCombats[i] != null;
+ if (flag2)
+ {
+ guildCombats[i].OnUnload();
+ guildCombats[i] = null;
+ }
+ i++;
+ }
+ guildCombats.Clear();
+ guildCombats = null;
+ }
+ }
+
+ private void CreateCombatHandle(int combat, int size)
+ {
+ for (int i = 0; i < size; i++)
+ {
+ string text = string.Format("Combat/Battle/Battle_{0}_{1}", combat, i);
+ GuildArenaCombatInfo guildArenaCombatInfo = null;
+ guildArenaCombatInfo = DlgHandlerBase.EnsureCreate<GuildArenaCombatInfo>(ref guildArenaCombatInfo, base.PanelObject.transform.Find(text).gameObject, null, true);
+ guildArenaCombatInfo.Set(combat, i);
+ this.m_GuildCombat.Add(guildArenaCombatInfo);
+ }
+ }
+
+ private void RefreshCombatHandle()
+ {
+ this.RefreshTitleHandle();
+ int i = 0;
+ int count = this.m_GuildCombat.Count;
+ while (i < count)
+ {
+ this.m_GuildCombat[i].SetCombatGroup((uint)this._Doc.SelectWarIndex);
+ i++;
+ }
+ uint battleID = 7u;
+ ulong arenaWinnerGuildID = this._Doc.GetArenaWinnerGuildID((uint)this._Doc.SelectWarIndex, battleID);
+ this.m_GuildCup.SetGuildMember(arenaWinnerGuildID, arenaWinnerGuildID, true);
+ }
+
+ private void RefreshTitleHandle()
+ {
+ string sprite = string.Empty;
+ switch (this._Doc.SelectWarIndex)
+ {
+ case 1:
+ sprite = "guildpvp_honor_0";
+ break;
+ case 2:
+ sprite = "guildpvp_honor_1";
+ break;
+ case 3:
+ sprite = "guildpvp_honor_2";
+ break;
+ }
+ this.m_honorSprite.SetSprite(sprite);
+ this.m_honorSprite.MakePixelPerfect();
+ }
+
+ private void RefreshMessage()
+ {
+ GuildArenaState timeState = this._Doc.TimeState;
+ string text = string.Empty;
+ switch (timeState)
+ {
+ case GuildArenaState.GUILD_ARENA_NOT_BEGIN:
+ case GuildArenaState.GUILD_ARENA_BEGIN:
+ case GuildArenaState.GUILD_ARENA_BATTLE_ONE:
+ text = XStringDefineProxy.GetString("GUILD_ARENA_MESSAGE1");
+ break;
+ case GuildArenaState.GUILD_ARENA_BATTLE_TWO:
+ text = XStringDefineProxy.GetString("GUILD_ARENA_MESSAGE2");
+ break;
+ case GuildArenaState.GUILD_ARENA_BATTLE_FINAL:
+ text = XStringDefineProxy.GetString("GUILD_ARENA_MESSAGE3");
+ break;
+ default:
+ text = string.Empty;
+ break;
+ }
+ this.m_combatTips.SetText(text);
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/GuildArenaCombatHandle.cs.meta b/Client/Assets/Scripts/XMainClient/UI/GuildArenaCombatHandle.cs.meta
new file mode 100644
index 00000000..0420259b
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/GuildArenaCombatHandle.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 83e338be6d361d5429b91b2c2a08b4dd
+timeCreated: 1611404046
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/GuildArenaCombatInfo.cs b/Client/Assets/Scripts/XMainClient/UI/GuildArenaCombatInfo.cs
new file mode 100644
index 00000000..fea0b6e3
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/GuildArenaCombatInfo.cs
@@ -0,0 +1,128 @@
+using System;
+using KKSG;
+using UILib;
+
+namespace XMainClient.UI
+{
+ internal class GuildArenaCombatInfo : DlgHandlerBase
+ {
+ public uint BattleID
+ {
+ get
+ {
+ return this.m_battleID;
+ }
+ }
+
+ private GuildArenaGuildInfo m_guildMemberA;
+
+ private GuildArenaGuildInfo m_guildMemberB;
+
+ private IXUIButton m_watchBtn;
+
+ private int m_combatID;
+
+ private int m_index;
+
+ private uint m_battleID;
+
+ private XGuildArenaDocument m_Doc;
+
+ private GuildArenaGroupData m_GroupData;
+
+ protected override void Init()
+ {
+ base.Init();
+ this.m_Doc = XDocuments.GetSpecificDocument<XGuildArenaDocument>(XGuildArenaDocument.uuID);
+ this.m_watchBtn = (base.PanelObject.transform.Find("btn_Watch").GetComponent("XUIButton") as IXUIButton);
+ this.m_guildMemberA = DlgHandlerBase.EnsureCreate<GuildArenaGuildInfo>(ref this.m_guildMemberA, base.PanelObject.transform.Find("Team1").gameObject, null, true);
+ this.m_guildMemberB = DlgHandlerBase.EnsureCreate<GuildArenaGuildInfo>(ref this.m_guildMemberB, base.PanelObject.transform.Find("Team2").gameObject, null, true);
+ this.m_watchBtn.SetVisible(false);
+ }
+
+ public void Set(int combat, int index)
+ {
+ this.m_combatID = combat;
+ this.m_index = index;
+ switch (combat)
+ {
+ case 0:
+ this.m_battleID = (uint)(index + 1);
+ break;
+ case 1:
+ this.m_battleID = (uint)(index + 5);
+ break;
+ case 2:
+ this.m_battleID = 7u;
+ break;
+ }
+ }
+
+ public void SetCombatGroup(uint selectTabIndex)
+ {
+ this.m_GroupData = this.m_Doc.GetGuildGroup(selectTabIndex, this.BattleID);
+ bool flag = this.m_GroupData == null;
+ if (flag)
+ {
+ this.m_watchBtn.ID = 0UL;
+ this.SetCombatState(0u, 0u);
+ this.SetNextWinner(selectTabIndex);
+ }
+ else
+ {
+ this.m_watchBtn.ID = (ulong)this.m_GroupData.watchId;
+ this.m_guildMemberA.SetGuildMember(this.m_GroupData.guildOneId, this.m_GroupData.winerId, false);
+ this.m_guildMemberB.SetGuildMember(this.m_GroupData.guildTwoId, this.m_GroupData.winerId, false);
+ this.SetCombatState(this.m_GroupData.warstate, this.m_GroupData.watchId);
+ }
+ }
+
+ private void SetNextWinner(uint selectTabIndex)
+ {
+ switch (this.m_battleID)
+ {
+ case 5u:
+ this.m_guildMemberA.SetGuildMember(this.m_Doc.GetArenaWinnerGuildID(selectTabIndex, 1u), 0UL, false);
+ this.m_guildMemberB.SetGuildMember(this.m_Doc.GetArenaWinnerGuildID(selectTabIndex, 2u), 0UL, false);
+ break;
+ case 6u:
+ this.m_guildMemberA.SetGuildMember(this.m_Doc.GetArenaWinnerGuildID(selectTabIndex, 3u), 0UL, false);
+ this.m_guildMemberB.SetGuildMember(this.m_Doc.GetArenaWinnerGuildID(selectTabIndex, 4u), 0UL, false);
+ break;
+ case 7u:
+ this.m_guildMemberA.SetGuildMember(this.m_Doc.GetArenaWinnerGuildID(selectTabIndex, 5u), 0UL, false);
+ this.m_guildMemberB.SetGuildMember(this.m_Doc.GetArenaWinnerGuildID(selectTabIndex, 6u), 0UL, false);
+ break;
+ }
+ }
+
+ public void SetCombatState(uint state, uint watchID = 0u)
+ {
+ this.m_watchBtn.SetVisible(state == 2u && watchID > 0u);
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ this.m_watchBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnWatchClick));
+ }
+
+ public override void OnUnload()
+ {
+ DlgHandlerBase.EnsureUnload<GuildArenaGuildInfo>(ref this.m_guildMemberA);
+ DlgHandlerBase.EnsureUnload<GuildArenaGuildInfo>(ref this.m_guildMemberB);
+ base.OnUnload();
+ }
+
+ private bool OnWatchClick(IXUIButton watchBtn)
+ {
+ bool flag = watchBtn.ID > 0UL;
+ if (flag)
+ {
+ XSpectateDocument specificDocument = XDocuments.GetSpecificDocument<XSpectateDocument>(XSpectateDocument.uuID);
+ specificDocument.EnterSpectateBattle((uint)watchBtn.ID, LiveType.LIVE_GUILDBATTLE);
+ }
+ return false;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/GuildArenaCombatInfo.cs.meta b/Client/Assets/Scripts/XMainClient/UI/GuildArenaCombatInfo.cs.meta
new file mode 100644
index 00000000..980cce29
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/GuildArenaCombatInfo.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: d94a5e3ee05832648a40b3a50497b387
+timeCreated: 1611404643
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/GuildArenaDefeatBehaviour.cs b/Client/Assets/Scripts/XMainClient/UI/GuildArenaDefeatBehaviour.cs
new file mode 100644
index 00000000..22f53edb
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/GuildArenaDefeatBehaviour.cs
@@ -0,0 +1,41 @@
+using System;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+
+namespace XMainClient.UI
+{
+ internal class GuildArenaDefeatBehaviour : DlgBehaviourBase
+ {
+ public GameObject mRoundResult;
+
+ public GameObject mFinalResult;
+
+ public IXUISprite blueSprite;
+
+ public IXUISprite redSprite;
+
+ public IXUISprite uiBlueAvatar;
+
+ public IXUISprite uiRedAvatar;
+
+ public IXUISprite mReturnSpr;
+
+ protected internal IXUISprite mBlueGuildHeadSprite;
+
+ protected internal IXUISprite mRedGuildHeadSprite;
+
+ private void Awake()
+ {
+ this.mRoundResult = base.transform.Find("RoundResult").gameObject;
+ this.mFinalResult = base.transform.Find("FinalResult").gameObject;
+ this.uiBlueAvatar = (base.transform.Find("RoundResult/Blue/head").GetComponent("XUISprite") as IXUISprite);
+ this.uiRedAvatar = (base.transform.Find("RoundResult/Red/head").GetComponent("XUISprite") as IXUISprite);
+ this.blueSprite = (base.transform.Find("FinalResult/Blue/Portrait").GetComponent("XUISprite") as IXUISprite);
+ this.redSprite = (base.transform.Find("FinalResult/Red/Portrait").GetComponent("XUISprite") as IXUISprite);
+ this.mBlueGuildHeadSprite = (base.transform.Find("FinalResult/Blue/Portrait").GetComponent("XUISprite") as IXUISprite);
+ this.mRedGuildHeadSprite = (base.transform.Find("FinalResult/Red/Portrait").GetComponent("XUISprite") as IXUISprite);
+ this.mReturnSpr = (base.transform.Find("FinalResult/return").GetComponent("XUISprite") as IXUISprite);
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/GuildArenaDefeatBehaviour.cs.meta b/Client/Assets/Scripts/XMainClient/UI/GuildArenaDefeatBehaviour.cs.meta
new file mode 100644
index 00000000..3ab9e8b5
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/GuildArenaDefeatBehaviour.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: d63e44c9e0ac2874e81957a26c1422fd
+timeCreated: 1611404630
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/GuildArenaDefeatDlg.cs b/Client/Assets/Scripts/XMainClient/UI/GuildArenaDefeatDlg.cs
new file mode 100644
index 00000000..7fb92772
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/GuildArenaDefeatDlg.cs
@@ -0,0 +1,234 @@
+using System;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class GuildArenaDefeatDlg : DlgBase<GuildArenaDefeatDlg, GuildArenaDefeatBehaviour>
+ {
+ public override string fileName
+ {
+ get
+ {
+ return "Battle/GuildArenaBattleResult";
+ }
+ }
+
+ public override int layer
+ {
+ get
+ {
+ return 1;
+ }
+ }
+
+ public override bool isMainUI
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override bool autoload
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ private XGuildArenaBattleDocument _Doc;
+
+ private XElapseTimer m_lastTime = new XElapseTimer();
+
+ private bool Countdown = false;
+
+ private bool mDone = false;
+
+ protected override void Init()
+ {
+ base.Init();
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ bool bSpectator = XSingleton<XScene>.singleton.bSpectator;
+ if (bSpectator)
+ {
+ bool flag = DlgBase<SpectateSceneView, SpectateSceneBehaviour>.singleton.IsLoaded();
+ if (flag)
+ {
+ DlgBase<SpectateSceneView, SpectateSceneBehaviour>.singleton.SetVisible(false, true);
+ }
+ }
+ else
+ {
+ bool flag2 = DlgBase<BattleMain, BattleMainBehaviour>.singleton.IsLoaded();
+ if (flag2)
+ {
+ DlgBase<BattleMain, BattleMainBehaviour>.singleton.SetVisible(false, true);
+ }
+ }
+ base.uiBehaviour.mRoundResult.SetActive(false);
+ base.uiBehaviour.mFinalResult.SetActive(false);
+ }
+
+ protected override void OnHide()
+ {
+ base.OnHide();
+ bool bSpectator = XSingleton<XScene>.singleton.bSpectator;
+ if (bSpectator)
+ {
+ bool flag = DlgBase<SpectateSceneView, SpectateSceneBehaviour>.singleton.IsLoaded();
+ if (flag)
+ {
+ DlgBase<SpectateSceneView, SpectateSceneBehaviour>.singleton.SetVisible(true, true);
+ }
+ }
+ else
+ {
+ bool flag2 = DlgBase<BattleMain, BattleMainBehaviour>.singleton.IsLoaded();
+ if (flag2)
+ {
+ DlgBase<BattleMain, BattleMainBehaviour>.singleton.SetVisible(true, true);
+ }
+ }
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ this._Doc = XDocuments.GetSpecificDocument<XGuildArenaBattleDocument>(XGuildArenaBattleDocument.uuID);
+ base.uiBehaviour.mReturnSpr.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnReturn));
+ }
+
+ public override void OnXNGUIClick(GameObject obj, string path)
+ {
+ }
+
+ public override void OnUpdate()
+ {
+ base.OnUpdate();
+ this.UpdateCountTime();
+ }
+
+ public void SetSmallResult(string descrption)
+ {
+ base.uiBehaviour.mRoundResult.SetActive(true);
+ base.uiBehaviour.mFinalResult.SetActive(false);
+ this.RoundResult();
+ }
+
+ private void RoundResult()
+ {
+ base.SetXUILable("RoundResult/Score/Bluenum", this._Doc.GMFGroupBlueMatchPoint.ToString());
+ base.SetXUILable("RoundResult/Blue/GuildName", this._Doc.blueBattleEndData.Guild.guildname);
+ base.SetXUILable("RoundResult/Blue/name", this._Doc.blueBattleEndData.Role.rolename);
+ bool isWin = this._Doc.blueBattleEndData.isWin;
+ if (isWin)
+ {
+ base.uiBehaviour.mRoundResult.transform.Find("Blue/Result/Win").gameObject.SetActive(true);
+ base.uiBehaviour.mRoundResult.transform.Find("Blue/Result/Lose").gameObject.SetActive(false);
+ }
+ else
+ {
+ base.uiBehaviour.mRoundResult.transform.Find("Blue/Result/Win").gameObject.SetActive(false);
+ base.uiBehaviour.mRoundResult.transform.Find("Blue/Result/Lose").gameObject.SetActive(true);
+ }
+ base.uiBehaviour.uiBlueAvatar.SetSprite(XSingleton<XProfessionSkillMgr>.singleton.GetProfHeadIcon2((int)this._Doc.blueBattleEndData.Role.profession));
+ base.SetXUILable("RoundResult/Score/Rednum", this._Doc.GMFGroupRedMatchPoint.ToString());
+ base.SetXUILable("RoundResult/Red/GuildName", this._Doc.redBattleEndData.Guild.guildname);
+ base.SetXUILable("RoundResult/Red/name", this._Doc.redBattleEndData.Role.rolename);
+ bool isWin2 = this._Doc.redBattleEndData.isWin;
+ if (isWin2)
+ {
+ base.uiBehaviour.mRoundResult.transform.Find("Red/Result/Win").gameObject.SetActive(true);
+ base.uiBehaviour.mRoundResult.transform.Find("Red/Result/Lose").gameObject.SetActive(false);
+ }
+ else
+ {
+ base.uiBehaviour.mRoundResult.transform.Find("Red/Result/Win").gameObject.SetActive(false);
+ base.uiBehaviour.mRoundResult.transform.Find("Red/Result/Lose").gameObject.SetActive(true);
+ }
+ base.uiBehaviour.uiRedAvatar.SetSprite(XSingleton<XProfessionSkillMgr>.singleton.GetProfHeadIcon2((int)this._Doc.redBattleEndData.Role.profession));
+ }
+
+ public void RefreahCountTime(float time, bool Done)
+ {
+ this.m_lastTime.LeftTime = time;
+ this.Countdown = true;
+ this.mDone = Done;
+ }
+
+ private void UpdateCountTime()
+ {
+ bool flag = !this.Countdown;
+ if (!flag)
+ {
+ this.m_lastTime.Update();
+ bool flag2 = this.m_lastTime.LeftTime > 0f;
+ if (flag2)
+ {
+ base.SetXUILable("CountDown/Time", XSingleton<UiUtility>.singleton.TimeFormatString((int)this.m_lastTime.LeftTime, 1, 3, 4, false, true));
+ }
+ else
+ {
+ this.Countdown = false;
+ bool flag3 = this.mDone;
+ if (flag3)
+ {
+ this.OnReturn(null);
+ }
+ }
+ }
+ }
+
+ private void OnReturn(IXUISprite spr)
+ {
+ XSingleton<XScene>.singleton.ReqLeaveScene();
+ }
+
+ public void SetGuildResult(string descrption)
+ {
+ base.uiBehaviour.mFinalResult.SetActive(true);
+ base.uiBehaviour.mRoundResult.SetActive(false);
+ this.FinalResult();
+ }
+
+ private void FinalResult()
+ {
+ base.SetXUILable("FinalResult/ScoreBig/Bluenum", this._Doc.GMFGroupBlueMatchPoint.ToString());
+ base.SetXUILable("FinalResult/Blue/GuildName", this._Doc.blueAllFightEnd.Guild.guildname);
+ base.uiBehaviour.mBlueGuildHeadSprite.SetSprite(XGuildDocument.GetPortraitName((int)this._Doc.blueAllFightEnd.Guild.guildicon));
+ bool isWin = this._Doc.blueAllFightEnd.isWin;
+ if (isWin)
+ {
+ base.uiBehaviour.mFinalResult.transform.Find("Blue/Result/Win").gameObject.SetActive(true);
+ base.uiBehaviour.mFinalResult.transform.Find("Blue/Result/Lose").gameObject.SetActive(false);
+ }
+ else
+ {
+ base.uiBehaviour.mFinalResult.transform.Find("Blue/Result/Win").gameObject.SetActive(false);
+ base.uiBehaviour.mFinalResult.transform.Find("Blue/Result/Lose").gameObject.SetActive(true);
+ }
+ base.SetXUILable("FinalResult/ScoreBig/Rednum", this._Doc.GMFGroupRedMatchPoint.ToString());
+ base.SetXUILable("FinalResult/Red/GuildName", this._Doc.redAllFightEnd.Guild.guildname);
+ base.uiBehaviour.mRedGuildHeadSprite.SetSprite(XGuildDocument.GetPortraitName((int)this._Doc.redAllFightEnd.Guild.guildicon));
+ bool isWin2 = this._Doc.redAllFightEnd.isWin;
+ if (isWin2)
+ {
+ base.uiBehaviour.mFinalResult.transform.Find("Red/Result/Win").gameObject.SetActive(true);
+ base.uiBehaviour.mFinalResult.transform.Find("Red/Result/Lose").gameObject.SetActive(false);
+ }
+ else
+ {
+ base.uiBehaviour.mFinalResult.transform.Find("Red/Result/Win").gameObject.SetActive(false);
+ base.uiBehaviour.mFinalResult.transform.Find("Red/Result/Lose").gameObject.SetActive(true);
+ }
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/GuildArenaDefeatDlg.cs.meta b/Client/Assets/Scripts/XMainClient/UI/GuildArenaDefeatDlg.cs.meta
new file mode 100644
index 00000000..07736cde
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/GuildArenaDefeatDlg.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 52b14d314b38cdb46a5d13d82e9c5cce
+timeCreated: 1611403709
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/GuildArenaDuelFinalResultBehaviour.cs b/Client/Assets/Scripts/XMainClient/UI/GuildArenaDuelFinalResultBehaviour.cs
new file mode 100644
index 00000000..e843bc2e
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/GuildArenaDuelFinalResultBehaviour.cs
@@ -0,0 +1,25 @@
+using System;
+using UILib;
+using XMainClient.UI.UICommon;
+
+namespace XMainClient.UI
+{
+ internal class GuildArenaDuelFinalResultBehaviour : DlgBehaviourBase
+ {
+ public IXUISprite m_maskSprite;
+
+ public IXUILabel m_timeLabel;
+
+ public GuildArenadDuelFinalInfo m_BlueInfo = new GuildArenadDuelFinalInfo();
+
+ public GuildArenadDuelFinalInfo m_RedInfo = new GuildArenadDuelFinalInfo();
+
+ private void Awake()
+ {
+ this.m_BlueInfo.Init(base.transform.Find("Bg/Blue"));
+ this.m_RedInfo.Init(base.transform.Find("Bg/Red"));
+ this.m_maskSprite = (base.transform.Find("Bg/Mask").GetComponent("XUISprite") as IXUISprite);
+ this.m_timeLabel = (base.transform.Find("Bg/CountDown/Time").GetComponent("XUILabel") as IXUILabel);
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/GuildArenaDuelFinalResultBehaviour.cs.meta b/Client/Assets/Scripts/XMainClient/UI/GuildArenaDuelFinalResultBehaviour.cs.meta
new file mode 100644
index 00000000..5f78aa71
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/GuildArenaDuelFinalResultBehaviour.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 74fdbe7563a7101428ed1463a96ec439
+timeCreated: 1611403945
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/GuildArenaDuelFinalResultDlg.cs b/Client/Assets/Scripts/XMainClient/UI/GuildArenaDuelFinalResultDlg.cs
new file mode 100644
index 00000000..34e65b8a
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/GuildArenaDuelFinalResultDlg.cs
@@ -0,0 +1,158 @@
+using System;
+using UILib;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class GuildArenaDuelFinalResultDlg : DlgBase<GuildArenaDuelFinalResultDlg, GuildArenaDuelFinalResultBehaviour>
+ {
+ public override string fileName
+ {
+ get
+ {
+ return "Battle/GuildArenaDuelFinalResultDlg";
+ }
+ }
+
+ public override int layer
+ {
+ get
+ {
+ return 1;
+ }
+ }
+
+ public override bool autoload
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ private XGuildArenaBattleDocument _Doc;
+
+ private XElapseTimer m_lastTime = new XElapseTimer();
+
+ private bool Countdown = false;
+
+ private bool mDone = false;
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ this.RefreshData();
+ this.RefreahCountTime(10f, true);
+ bool flag = DlgBase<GuildArenaDuelRoundResultDlg, GuildArenaDuelRoundResultBehaviour>.singleton.IsVisible();
+ if (flag)
+ {
+ DlgBase<GuildArenaDuelRoundResultDlg, GuildArenaDuelRoundResultBehaviour>.singleton.SetVisible(false, true);
+ }
+ bool bSpectator = XSingleton<XScene>.singleton.bSpectator;
+ if (bSpectator)
+ {
+ bool flag2 = DlgBase<SpectateSceneView, SpectateSceneBehaviour>.singleton.IsLoaded();
+ if (flag2)
+ {
+ DlgBase<SpectateSceneView, SpectateSceneBehaviour>.singleton.SetVisible(false, true);
+ }
+ }
+ else
+ {
+ bool flag3 = DlgBase<BattleMain, BattleMainBehaviour>.singleton.IsLoaded() && DlgBase<BattleMain, BattleMainBehaviour>.singleton.IsVisible();
+ if (flag3)
+ {
+ DlgBase<BattleMain, BattleMainBehaviour>.singleton.SkillHandler.ResetPressState();
+ DlgBase<BattleMain, BattleMainBehaviour>.singleton.SetVisible(false, true);
+ }
+ }
+ }
+
+ protected override void OnHide()
+ {
+ base.OnHide();
+ bool bSpectator = XSingleton<XScene>.singleton.bSpectator;
+ if (bSpectator)
+ {
+ bool flag = DlgBase<SpectateSceneView, SpectateSceneBehaviour>.singleton.IsLoaded();
+ if (flag)
+ {
+ DlgBase<SpectateSceneView, SpectateSceneBehaviour>.singleton.SetVisible(true, true);
+ }
+ }
+ else
+ {
+ bool flag2 = DlgBase<BattleMain, BattleMainBehaviour>.singleton.IsLoaded();
+ if (flag2)
+ {
+ DlgBase<BattleMain, BattleMainBehaviour>.singleton.SetVisible(true, true);
+ }
+ }
+ }
+
+ protected override void Init()
+ {
+ base.Init();
+ this._Doc = XDocuments.GetSpecificDocument<XGuildArenaBattleDocument>(XGuildArenaBattleDocument.uuID);
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ base.uiBehaviour.m_maskSprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.ClickClose));
+ }
+
+ private void RefreshData()
+ {
+ base.uiBehaviour.m_BlueInfo.Set(this._Doc.BlueDuelResult);
+ base.uiBehaviour.m_RedInfo.Set(this._Doc.RedDuelResult);
+ }
+
+ private void ClickClose(IXUISprite sprite)
+ {
+ this.ReturnHall();
+ }
+
+ public void RefreahCountTime(float time, bool Done)
+ {
+ this.m_lastTime.LeftTime = time;
+ this.Countdown = true;
+ this.mDone = Done;
+ }
+
+ public override void OnUpdate()
+ {
+ base.OnUpdate();
+ this.UpdateCountTime();
+ }
+
+ private void UpdateCountTime()
+ {
+ bool flag = !this.Countdown;
+ if (!flag)
+ {
+ this.m_lastTime.Update();
+ bool flag2 = this.m_lastTime.LeftTime > 0f;
+ if (flag2)
+ {
+ base.uiBehaviour.m_timeLabel.SetText(XSingleton<UiUtility>.singleton.TimeDuarationFormatString((int)this.m_lastTime.LeftTime, 5));
+ }
+ else
+ {
+ this.Countdown = false;
+ bool flag3 = this.mDone;
+ if (flag3)
+ {
+ this.ReturnHall();
+ }
+ }
+ }
+ }
+
+ private void ReturnHall()
+ {
+ XSingleton<XScene>.singleton.ReqLeaveScene();
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/GuildArenaDuelFinalResultDlg.cs.meta b/Client/Assets/Scripts/XMainClient/UI/GuildArenaDuelFinalResultDlg.cs.meta
new file mode 100644
index 00000000..020d0156
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/GuildArenaDuelFinalResultDlg.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: be7e7ffbfe054214d8450a5e72fd7d40
+timeCreated: 1611404461
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/GuildArenaDuelHandler.cs b/Client/Assets/Scripts/XMainClient/UI/GuildArenaDuelHandler.cs
new file mode 100644
index 00000000..98ec59a2
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/GuildArenaDuelHandler.cs
@@ -0,0 +1,73 @@
+using System;
+using System.Collections.Generic;
+using UILib;
+using UnityEngine;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class GuildArenaDuelHandler : DlgHandlerBase
+ {
+ protected override string FileName
+ {
+ get
+ {
+ return "Guild/GuildArena/DuelFrame";
+ }
+ }
+
+ private XGuildArenaDocument _Doc;
+
+ private List<GuildArenaDuelInfo> m_duelInfos;
+
+ private Transform m_UnApply;
+
+ private Transform m_DuelList;
+
+ private int m_length = 4;
+
+ private IXUILabel m_DuelHelp;
+
+ protected override void Init()
+ {
+ base.Init();
+ this._Doc = XDocuments.GetSpecificDocument<XGuildArenaDocument>(XGuildArenaDocument.uuID);
+ this.m_UnApply = base.transform.Find("UnApply");
+ this.m_DuelList = base.transform.Find("DuelList");
+ this.m_DuelHelp = (base.transform.Find("Intro").GetComponent("XUILabel") as IXUILabel);
+ this.m_duelInfos = new List<GuildArenaDuelInfo>();
+ for (int i = 0; i < this.m_length; i++)
+ {
+ GuildArenaDuelInfo guildArenaDuelInfo = new GuildArenaDuelInfo();
+ guildArenaDuelInfo.Init(base.transform.Find(XSingleton<XCommon>.singleton.StringCombine("DuelList/Duel", i.ToString())), i);
+ guildArenaDuelInfo.Reset();
+ this.m_duelInfos.Add(guildArenaDuelInfo);
+ }
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ this._Doc.SendIntegralBattleInfo();
+ this.RefreshData();
+ }
+
+ public override void RefreshData()
+ {
+ base.RefreshData();
+ this.m_UnApply.gameObject.SetActive(!this._Doc.RegistrationStatu);
+ this.m_DuelList.gameObject.SetActive(this._Doc.RegistrationStatu);
+ bool registrationStatu = this._Doc.RegistrationStatu;
+ if (registrationStatu)
+ {
+ int i = 0;
+ int count = this.m_duelInfos.Count;
+ while (i < count)
+ {
+ this.m_duelInfos[i].Refresh();
+ i++;
+ }
+ }
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/GuildArenaDuelHandler.cs.meta b/Client/Assets/Scripts/XMainClient/UI/GuildArenaDuelHandler.cs.meta
new file mode 100644
index 00000000..5da4d6c3
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/GuildArenaDuelHandler.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 8a5ea8868b543544eb202c5e6f10f596
+timeCreated: 1611404091
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/GuildArenaDuelInfo.cs b/Client/Assets/Scripts/XMainClient/UI/GuildArenaDuelInfo.cs
new file mode 100644
index 00000000..836be32e
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/GuildArenaDuelInfo.cs
@@ -0,0 +1,137 @@
+using System;
+using KKSG;
+using UILib;
+using UnityEngine;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class GuildArenaDuelInfo
+ {
+ private IXUILabel m_time;
+
+ private IXUILabel m_guildNameCurrent;
+
+ private IXUILabel m_guildNameUsed;
+
+ private IXUISprite m_PortraitCurrent;
+
+ private IXUISprite m_PortraitUsed;
+
+ private IXUISprite m_enterBattle;
+
+ private IXUILabel m_score;
+
+ private Transform m_UsedPortraitEmpty;
+
+ private Transform m_CurrentPortraitEmpty;
+
+ private Transform m_CurrentVS;
+
+ private Transform m_CurrentMessage;
+
+ private Transform m_win;
+
+ private Transform m_lose;
+
+ private Transform m_current;
+
+ private Transform m_next;
+
+ private Transform m_used;
+
+ private int m_index;
+
+ public void Init(Transform t, int index)
+ {
+ this.m_index = index;
+ this.m_current = t.Find("Current");
+ this.m_next = t.Find("Next");
+ this.m_used = t.Find("Used");
+ this.m_win = t.Find("Used/Result/Win");
+ this.m_lose = t.Find("Used/Result/Lose");
+ this.m_time = (t.Find("Day").GetComponent("XUILabel") as IXUILabel);
+ this.m_guildNameCurrent = (t.Find("Current/GuildName").GetComponent("XUILabel") as IXUILabel);
+ this.m_guildNameUsed = (t.Find("Used/GuildName").GetComponent("XUILabel") as IXUILabel);
+ this.m_PortraitCurrent = (t.Find("Current/Portrait").GetComponent("XUISprite") as IXUISprite);
+ this.m_PortraitUsed = (t.Find("Used/Portrait").GetComponent("XUISprite") as IXUISprite);
+ this.m_CurrentPortraitEmpty = t.Find("Current/Portrait_empty");
+ this.m_UsedPortraitEmpty = t.Find("Used/Portrait_empty");
+ this.m_CurrentVS = t.Find("Current/VS");
+ this.m_CurrentMessage = t.Find("Current/VS_empty");
+ this.m_score = (t.Find("Used/Score").GetComponent("XUILabel") as IXUILabel);
+ this.m_enterBattle = (t.Find("Current/Btn").GetComponent("XUISprite") as IXUISprite);
+ this.m_PortraitCurrent.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnClickGuildHandle));
+ this.m_PortraitUsed.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnClickGuildHandle));
+ this.m_enterBattle.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnEnterBattle));
+ }
+
+ public void Refresh()
+ {
+ XGuildArenaDocument specificDocument = XDocuments.GetSpecificDocument<XGuildArenaDocument>(XGuildArenaDocument.uuID);
+ bool flag = this.m_index < specificDocument.DuelCombatInfos.Count;
+ if (flag)
+ {
+ GuildArenaDuelCombatInfo guildArenaDuelCombatInfo = specificDocument.DuelCombatInfos[this.m_index];
+ this.m_time.SetText(guildArenaDuelCombatInfo.ToTimeString());
+ this.m_next.gameObject.SetActive(guildArenaDuelCombatInfo.Statu == GuildArenaDuelCombatStatu.Next);
+ this.m_used.gameObject.SetActive(guildArenaDuelCombatInfo.Statu == GuildArenaDuelCombatStatu.Used);
+ this.m_current.gameObject.SetActive(guildArenaDuelCombatInfo.Statu == GuildArenaDuelCombatStatu.Current);
+ GuildArenaDuelCombatStatu statu = guildArenaDuelCombatInfo.Statu;
+ if (statu != GuildArenaDuelCombatStatu.Used)
+ {
+ if (statu == GuildArenaDuelCombatStatu.Current)
+ {
+ this.m_guildNameCurrent.SetText(guildArenaDuelCombatInfo.GetGuildName());
+ this.m_PortraitCurrent.SetSprite(guildArenaDuelCombatInfo.GetPortraitName());
+ this.m_PortraitCurrent.SetVisible(guildArenaDuelCombatInfo.Pass());
+ this.m_PortraitCurrent.SetVisible(guildArenaDuelCombatInfo.Pass());
+ this.m_CurrentPortraitEmpty.gameObject.SetActive(!guildArenaDuelCombatInfo.Pass());
+ this.m_enterBattle.SetGrey(guildArenaDuelCombatInfo.Step == IntegralState.integralenterscene || guildArenaDuelCombatInfo.Step == IntegralState.integralwatch);
+ this.m_enterBattle.SetVisible(guildArenaDuelCombatInfo.Pass());
+ this.m_CurrentVS.gameObject.SetActive(guildArenaDuelCombatInfo.Pass());
+ this.m_CurrentMessage.gameObject.SetActive(!guildArenaDuelCombatInfo.Pass());
+ }
+ }
+ else
+ {
+ this.m_guildNameUsed.SetText(guildArenaDuelCombatInfo.GetGuildName());
+ this.m_PortraitUsed.SetSprite(guildArenaDuelCombatInfo.GetPortraitName());
+ this.m_UsedPortraitEmpty.gameObject.SetActive(!guildArenaDuelCombatInfo.Pass());
+ this.m_PortraitUsed.SetVisible(guildArenaDuelCombatInfo.Pass());
+ this.m_score.SetText(XSingleton<XCommon>.singleton.StringCombine("+", guildArenaDuelCombatInfo.GuildScore.ToString()));
+ this.m_win.gameObject.SetActive(guildArenaDuelCombatInfo.Winner);
+ this.m_lose.gameObject.SetActive(!guildArenaDuelCombatInfo.Winner);
+ }
+ }
+ else
+ {
+ this.Reset();
+ }
+ }
+
+ private void OnEnterBattle(IXUISprite sprite)
+ {
+ XGuildArenaDocument specificDocument = XDocuments.GetSpecificDocument<XGuildArenaDocument>(XGuildArenaDocument.uuID);
+ specificDocument.SendEnterDuelBattle(this.m_index);
+ }
+
+ public void Reset()
+ {
+ this.m_time.SetText(string.Empty);
+ this.m_next.gameObject.SetActive(true);
+ this.m_used.gameObject.SetActive(false);
+ this.m_current.gameObject.SetActive(false);
+ }
+
+ private void OnClickGuildHandle(IXUISprite sprite)
+ {
+ bool flag = sprite.ID > 0UL;
+ if (flag)
+ {
+ XGuildViewDocument specificDocument = XDocuments.GetSpecificDocument<XGuildViewDocument>(XGuildViewDocument.uuID);
+ specificDocument.View(sprite.ID);
+ }
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/GuildArenaDuelInfo.cs.meta b/Client/Assets/Scripts/XMainClient/UI/GuildArenaDuelInfo.cs.meta
new file mode 100644
index 00000000..58b995ef
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/GuildArenaDuelInfo.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 6bee550eacee18d4dbf68e87b18397af
+timeCreated: 1611403893
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/GuildArenaDuelResultInfo.cs b/Client/Assets/Scripts/XMainClient/UI/GuildArenaDuelResultInfo.cs
new file mode 100644
index 00000000..e51ad80b
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/GuildArenaDuelResultInfo.cs
@@ -0,0 +1,94 @@
+using System;
+using System.Collections.Generic;
+using KKSG;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class GuildArenaDuelResultInfo
+ {
+ private IXUIScrollView m_SccrollView;
+
+ private IXUIWrapContent m_WrapContent;
+
+ private Transform m_LoseTransform;
+
+ private Transform m_WinTransform;
+
+ private IXUILabel m_DamageLabel;
+
+ private IXUILabel m_GuildName;
+
+ private IXUISprite m_GuildIcon;
+
+ private IXUILabel m_TotalKiller;
+
+ private List<GmfRoleCombat> m_combats;
+
+ private Transform m_EmptyTransform;
+
+ public void Init(Transform t)
+ {
+ this.m_SccrollView = (t.Find("ScrollView").GetComponent("XUIScrollView") as IXUIScrollView);
+ this.m_WrapContent = (t.Find("ScrollView/WrapContent").GetComponent("XUIWrapContent") as IXUIWrapContent);
+ this.m_LoseTransform = t.Find("Result/Lose");
+ this.m_WinTransform = t.Find("Result/Win");
+ this.m_DamageLabel = (t.Find("Damage").GetComponent("XUILabel") as IXUILabel);
+ this.m_GuildName = (t.Find("GuildInfo/GuildName").GetComponent("XUILabel") as IXUILabel);
+ this.m_GuildIcon = (t.Find("GuildInfo/GuildIcon").GetComponent("XUISprite") as IXUISprite);
+ this.m_TotalKiller = (t.Find("GuildInfo/TotalKiller").GetComponent("XUILabel") as IXUILabel);
+ this.m_EmptyTransform = t.Find("Empty");
+ this.m_WrapContent.RegisterItemUpdateEventHandler(new WrapItemUpdateEventHandler(this.OnWrapContentUpdate));
+ }
+
+ public void Set(GVGDuelResult result)
+ {
+ this.m_LoseTransform.gameObject.SetActive(!result.isWinner);
+ this.m_WinTransform.gameObject.SetActive(result.isWinner);
+ this.m_GuildName.SetText(result.ToGuildNameString());
+ this.m_GuildIcon.SetSprite(XGuildDocument.GetPortraitName((int)result.Guild.guildicon));
+ this.m_combats = result.RoleCombats;
+ this.m_TotalKiller.SetText(result.TotalKiller.ToString());
+ this.m_DamageLabel.SetText(((int)result.TotalDamage).ToString());
+ this.m_WrapContent.SetContentCount(this.m_combats.Count, false);
+ this.m_SccrollView.ResetPosition();
+ this.m_EmptyTransform.gameObject.SetActive(this.m_combats.Count == 0);
+ }
+
+ private void OnWrapContentUpdate(Transform t, int index)
+ {
+ bool flag = this.m_combats == null || index >= this.m_combats.Count;
+ if (!flag)
+ {
+ GmfRoleCombat gmfRoleCombat = this.m_combats[index];
+ IXUISprite ixuisprite = t.Find("Avatar").GetComponent("XUISprite") as IXUISprite;
+ IXUISprite ixuisprite2 = t.Find("MVP").GetComponent("XUISprite") as IXUISprite;
+ IXUILabel ixuilabel = t.Find("Name").GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel2 = t.Find("Level").GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel3 = t.Find("Kill").GetComponent("XUILabel") as IXUILabel;
+ IXUISprite ixuisprite3 = t.Find("AddFriend").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.SetSprite(XSingleton<XProfessionSkillMgr>.singleton.GetProfHeadIcon((int)gmfRoleCombat.gmfrole.profession));
+ ixuisprite2.SetAlpha(0f);
+ ixuilabel.SetText(gmfRoleCombat.gmfrole.rolename);
+ ixuilabel2.SetText(string.Format("Lv.{0}", 0));
+ ixuilabel2.Alpha = 0f;
+ ixuilabel3.SetText(gmfRoleCombat.combat.killcount.ToString());
+ ixuisprite3.ID = gmfRoleCombat.gmfrole.roleid;
+ ixuisprite3.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnAddFriendClick));
+ bool flag2 = gmfRoleCombat.gmfrole.roleid == XSingleton<XAttributeMgr>.singleton.XPlayerData.RoleID;
+ if (flag2)
+ {
+ ixuisprite3.SetVisible(false);
+ }
+ }
+ }
+
+ private void OnAddFriendClick(IXUISprite sp)
+ {
+ DlgBase<XFriendsView, XFriendsBehaviour>.singleton.AddFriendById(sp.ID);
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/GuildArenaDuelResultInfo.cs.meta b/Client/Assets/Scripts/XMainClient/UI/GuildArenaDuelResultInfo.cs.meta
new file mode 100644
index 00000000..283e792f
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/GuildArenaDuelResultInfo.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 13e0df7f899d57a439c7cce96cf58354
+timeCreated: 1611403251
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/GuildArenaDuelRoundResultBehaviour.cs b/Client/Assets/Scripts/XMainClient/UI/GuildArenaDuelRoundResultBehaviour.cs
new file mode 100644
index 00000000..382e708e
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/GuildArenaDuelRoundResultBehaviour.cs
@@ -0,0 +1,35 @@
+using System;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+
+namespace XMainClient.UI
+{
+ internal class GuildArenaDuelRoundResultBehaviour : DlgBehaviourBase
+ {
+ public IXUILabel m_RoundLabel;
+
+ public IXUILabel m_TimeLabel;
+
+ public IXUISprite m_MaskSprite;
+
+ public IXUILabel m_GuildName;
+
+ public Transform m_EmptyWin;
+
+ public GuildArenaDuelResultInfo m_Blue = new GuildArenaDuelResultInfo();
+
+ public GuildArenaDuelResultInfo m_Red = new GuildArenaDuelResultInfo();
+
+ private void Awake()
+ {
+ this.m_Blue.Init(base.transform.Find("Bg/Blue"));
+ this.m_Red.Init(base.transform.Find("Bg/Red"));
+ this.m_RoundLabel = (base.transform.Find("Bg/Round").GetComponent("XUILabel") as IXUILabel);
+ this.m_TimeLabel = (base.transform.Find("Bg/Time").GetComponent("XUILabel") as IXUILabel);
+ this.m_MaskSprite = (base.transform.Find("Bg/Mask").GetComponent("XUISprite") as IXUISprite);
+ this.m_GuildName = (base.transform.Find("Bg/EmptyWin/GuildName").GetComponent("XUILabel") as IXUILabel);
+ this.m_EmptyWin = base.transform.Find("Bg/EmptyWin");
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/GuildArenaDuelRoundResultBehaviour.cs.meta b/Client/Assets/Scripts/XMainClient/UI/GuildArenaDuelRoundResultBehaviour.cs.meta
new file mode 100644
index 00000000..507402d9
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/GuildArenaDuelRoundResultBehaviour.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: e6e669a6f987ef24390bb5d58e425751
+timeCreated: 1611404747
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/GuildArenaDuelRoundResultDlg.cs b/Client/Assets/Scripts/XMainClient/UI/GuildArenaDuelRoundResultDlg.cs
new file mode 100644
index 00000000..b5337d9a
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/GuildArenaDuelRoundResultDlg.cs
@@ -0,0 +1,202 @@
+using System;
+using UILib;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class GuildArenaDuelRoundResultDlg : DlgBase<GuildArenaDuelRoundResultDlg, GuildArenaDuelRoundResultBehaviour>
+ {
+ public override string fileName
+ {
+ get
+ {
+ return "Battle/GuildArenaDuelRoundResultDlg";
+ }
+ }
+
+ public override int layer
+ {
+ get
+ {
+ return 1;
+ }
+ }
+
+ public override bool autoload
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ private XGuildArenaBattleDocument _Doc;
+
+ private XElapseTimer m_lastTime;
+
+ private bool Countdown = false;
+
+ private bool mDone = false;
+
+ protected override void Init()
+ {
+ base.Init();
+ this._Doc = XDocuments.GetSpecificDocument<XGuildArenaBattleDocument>(XGuildArenaBattleDocument.uuID);
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ this.OnHideBattle();
+ this.RefreshData();
+ this.RefreahCountTime((float)XSingleton<XGlobalConfig>.singleton.GetInt("GPRFightAfterTime"), true);
+ }
+
+ private void OnHideBattle()
+ {
+ bool bSpectator = XSingleton<XScene>.singleton.bSpectator;
+ if (bSpectator)
+ {
+ bool flag = DlgBase<SpectateSceneView, SpectateSceneBehaviour>.singleton.IsLoaded();
+ if (flag)
+ {
+ DlgBase<SpectateSceneView, SpectateSceneBehaviour>.singleton.SetVisible(false, true);
+ }
+ }
+ else
+ {
+ bool flag2 = DlgBase<BattleMain, BattleMainBehaviour>.singleton.IsLoaded();
+ if (flag2)
+ {
+ DlgBase<BattleMain, BattleMainBehaviour>.singleton.SetVisible(false, true);
+ }
+ }
+ }
+
+ private void RefreshData()
+ {
+ base.uiBehaviour.m_RoundLabel.SetText(XStringDefineProxy.GetString("GUILD_ARENA_ROUNDLABEL", new object[]
+ {
+ this._Doc.Round
+ }));
+ base.uiBehaviour.m_Blue.Set(this._Doc.BlueDuelResult);
+ base.uiBehaviour.m_Red.Set(this._Doc.RedDuelResult);
+ bool flag = this._Doc.BlueDuelResult.RoleCombats.Count == 0 && this._Doc.RedDuelResult.RoleCombats.Count == 0;
+ base.uiBehaviour.m_EmptyWin.gameObject.SetActive(flag);
+ bool flag2 = flag;
+ if (flag2)
+ {
+ bool isWinner = this._Doc.BlueDuelResult.isWinner;
+ if (isWinner)
+ {
+ base.uiBehaviour.m_GuildName.SetText(this._Doc.BlueDuelResult.Guild.guildname);
+ }
+ else
+ {
+ bool isWinner2 = this._Doc.RedDuelResult.isWinner;
+ if (isWinner2)
+ {
+ base.uiBehaviour.m_GuildName.SetText(this._Doc.RedDuelResult.Guild.guildname);
+ }
+ else
+ {
+ base.uiBehaviour.m_GuildName.SetText(string.Empty);
+ }
+ }
+ }
+ }
+
+ private void ClickClose(IXUISprite sprite)
+ {
+ this.ReturnHall();
+ }
+
+ protected override void OnUnload()
+ {
+ this.m_lastTime = null;
+ base.OnUnload();
+ }
+
+ public void RefreahCountTime(float time, bool Done)
+ {
+ bool flag = this.m_lastTime == null;
+ if (flag)
+ {
+ this.m_lastTime = new XElapseTimer();
+ }
+ bool flag2 = !this._Doc.InBattleGroup;
+ if (flag2)
+ {
+ this.m_lastTime.LeftTime = time - 2f;
+ }
+ else
+ {
+ this.m_lastTime.LeftTime = time;
+ }
+ this.Countdown = true;
+ this.mDone = Done;
+ }
+
+ public override void OnUpdate()
+ {
+ base.OnUpdate();
+ this.UpdateCountTime();
+ }
+
+ private void UpdateCountTime()
+ {
+ bool flag = !this.Countdown || this.m_lastTime == null;
+ if (!flag)
+ {
+ this.m_lastTime.Update();
+ bool flag2 = this.m_lastTime.LeftTime > 0f;
+ if (flag2)
+ {
+ bool flag3 = this._Doc.Round == 3u;
+ if (flag3)
+ {
+ base.uiBehaviour.m_TimeLabel.SetText(XStringDefineProxy.GetString("GUILD_ARENA_FINALWATTING", new object[]
+ {
+ XSingleton<UiUtility>.singleton.TimeDuarationFormatString((int)this.m_lastTime.LeftTime, 5)
+ }));
+ }
+ else
+ {
+ base.uiBehaviour.m_TimeLabel.SetText(XStringDefineProxy.GetString("GUILD_ARENA_ROUNDWATTING", new object[]
+ {
+ XSingleton<UiUtility>.singleton.TimeDuarationFormatString((int)this.m_lastTime.LeftTime, 5)
+ }));
+ }
+ }
+ else
+ {
+ this.Countdown = false;
+ bool flag4 = this.mDone;
+ if (flag4)
+ {
+ this.ReturnHall();
+ }
+ }
+ }
+ }
+
+ public void ReturnHall()
+ {
+ bool flag = !this._Doc.InBattleGroup;
+ if (flag)
+ {
+ XSingleton<XScene>.singleton.ReqLeaveScene();
+ }
+ else
+ {
+ this.SetVisibleWithAnimation(false, null);
+ }
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/GuildArenaDuelRoundResultDlg.cs.meta b/Client/Assets/Scripts/XMainClient/UI/GuildArenaDuelRoundResultDlg.cs.meta
new file mode 100644
index 00000000..d60cf328
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/GuildArenaDuelRoundResultDlg.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: cdd467cb215473b4e9819635f9a39fb4
+timeCreated: 1611404576
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/GuildArenaGuildInfo.cs b/Client/Assets/Scripts/XMainClient/UI/GuildArenaGuildInfo.cs
new file mode 100644
index 00000000..b6fdd168
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/GuildArenaGuildInfo.cs
@@ -0,0 +1,88 @@
+using System;
+using UILib;
+using UnityEngine;
+
+namespace XMainClient.UI
+{
+ internal class GuildArenaGuildInfo : DlgHandlerBase
+ {
+ private IXUILabel m_GuildNameLabel;
+
+ private IXUISprite m_GuildHeadSprite;
+
+ private IXUISprite m_unKnowSprite;
+
+ protected override void Init()
+ {
+ base.Init();
+ this.m_GuildNameLabel = (base.PanelObject.transform.Find("txt_GuildName").GetComponent("XUILabel") as IXUILabel);
+ this.m_GuildHeadSprite = (base.PanelObject.transform.Find("GuildIcon").GetComponent("XUISprite") as IXUISprite);
+ this.m_unKnowSprite = (base.PanelObject.transform.Find("UnKnow").GetComponent("XUISprite") as IXUISprite);
+ this.SetEmptyMember();
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ this.m_GuildHeadSprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnGuildHeadClickHandle));
+ }
+
+ public void SetGuildMember(ulong guildID, ulong winnerID = 0UL, bool isCup = false)
+ {
+ XGuildArenaDocument specificDocument = XDocuments.GetSpecificDocument<XGuildArenaDocument>(XGuildArenaDocument.uuID);
+ XGuildDocument specificDocument2 = XDocuments.GetSpecificDocument<XGuildDocument>(XGuildDocument.uuID);
+ XGuildBasicData xguildBasicData = null;
+ bool flag = !specificDocument.TryGetGuildInfo(guildID, out xguildBasicData);
+ if (flag)
+ {
+ this.SetEmptyMember();
+ if (isCup)
+ {
+ this.m_unKnowSprite.SetVisible(false);
+ }
+ }
+ else
+ {
+ this.SetShowMember();
+ this.m_GuildHeadSprite.ID = guildID;
+ this.m_GuildNameLabel.SetText(xguildBasicData.guildName);
+ this.m_GuildHeadSprite.SetSprite(XGuildDocument.GetPortraitName(xguildBasicData.portraitIndex));
+ this.m_GuildNameLabel.SetColor((specificDocument2.bInGuild && specificDocument2.BasicData.uid == guildID) ? Color.green : Color.white);
+ bool flag2 = winnerID == 0UL;
+ if (flag2)
+ {
+ this.m_GuildHeadSprite.SetGrey(true);
+ }
+ else
+ {
+ this.m_GuildHeadSprite.SetGrey(winnerID == guildID);
+ }
+ }
+ }
+
+ private void OnGuildHeadClickHandle(IXUISprite sprite)
+ {
+ bool flag = sprite.ID > 0UL;
+ if (flag)
+ {
+ XGuildViewDocument specificDocument = XDocuments.GetSpecificDocument<XGuildViewDocument>(XGuildViewDocument.uuID);
+ specificDocument.View(sprite.ID);
+ }
+ }
+
+ private void SetShowMember()
+ {
+ this.m_GuildNameLabel.SetVisible(true);
+ this.m_GuildHeadSprite.SetVisible(true);
+ this.m_unKnowSprite.SetVisible(false);
+ }
+
+ private void SetEmptyMember()
+ {
+ this.m_GuildHeadSprite.ID = 0UL;
+ this.m_GuildNameLabel.SetVisible(false);
+ this.m_GuildHeadSprite.SetVisible(false);
+ this.m_unKnowSprite.SetVisible(true);
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/GuildArenaGuildInfo.cs.meta b/Client/Assets/Scripts/XMainClient/UI/GuildArenaGuildInfo.cs.meta
new file mode 100644
index 00000000..69df89e3
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/GuildArenaGuildInfo.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 2ed9765b565b55e4988a9db5c5e8d758
+timeCreated: 1611403511
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/GuildArenaHallHandle.cs b/Client/Assets/Scripts/XMainClient/UI/GuildArenaHallHandle.cs
new file mode 100644
index 00000000..4b9f4d50
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/GuildArenaHallHandle.cs
@@ -0,0 +1,222 @@
+using System;
+using KKSG;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class GuildArenaHallHandle : GVGHallBase
+ {
+ protected override string FileName
+ {
+ get
+ {
+ return "Guild/GuildArena/HallFrame";
+ }
+ }
+
+ private XGuildArenaDocument _Doc;
+
+ private IXUILabel m_Status;
+
+ private IXUIButton m_SignUp;
+
+ private IXUILabel m_SignUpLabel;
+
+ private bool m_responseNow = false;
+
+ public override void OnUpdate()
+ {
+ base.OnUpdate();
+ bool responseNow = this.m_responseNow;
+ if (responseNow)
+ {
+ this.UpdateSignUpTime();
+ }
+ }
+
+ protected override void Init()
+ {
+ base.Init();
+ this._Doc = XDocuments.GetSpecificDocument<XGuildArenaDocument>(XGuildArenaDocument.uuID);
+ this.m_Status = (base.PanelObject.transform.Find("Go/Status").GetComponent("XUILabel") as IXUILabel);
+ this.m_SignUp = (base.PanelObject.transform.Find("Go/Btn_Go").GetComponent("XUIButton") as IXUIButton);
+ this.m_SignUpLabel = (base.PanelObject.transform.Find("Go/Btn_Go/Go").GetComponent("XUILabel") as IXUILabel);
+ this.SetupRewardList(XSingleton<XGlobalConfig>.singleton.GetAndSeparateValue("Guild_Arena_Award", XGlobalConfig.ListSeparator));
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ this.StackRefresh();
+ }
+
+ protected override int GetContentSize()
+ {
+ return this._Doc.IntegralUnits.Count;
+ }
+
+ public override void StackRefresh()
+ {
+ this._Doc.SendGetApplyGuildList();
+ this.UpdateSignStatu();
+ }
+
+ public override void RefreshData()
+ {
+ base.RefreshData();
+ this.UpdateSignStatu();
+ }
+
+ protected override void OnItemWrapUpdate(Transform t, int index)
+ {
+ IXUILabel ixuilabel = t.Find("Rank").GetComponent("XUILabel") as IXUILabel;
+ IXUILabelSymbol ixuilabelSymbol = t.Find("GuildName").GetComponent("XUILabelSymbol") as IXUILabelSymbol;
+ IXUILabel ixuilabel2 = t.Find("Score").GetComponent("XUILabel") as IXUILabel;
+ bool flag = index == -1;
+ if (flag)
+ {
+ ixuilabel.SetText(string.Empty);
+ ixuilabelSymbol.InputText = XStringDefineProxy.GetString("GUILD_ARENA_UNLAYOUT");
+ ixuilabel2.SetText(string.Empty);
+ }
+ else
+ {
+ Integralunit integralunit = this._Doc.IntegralUnits[index];
+ ixuilabel.SetText((index + 1).ToString());
+ ixuilabelSymbol.InputText = integralunit.name;
+ ixuilabel2.SetText(integralunit.guildscore.ToString());
+ bool flag2 = integralunit.guildid == this.selfGuildID;
+ if (flag2)
+ {
+ this.selfIndex = index;
+ }
+ }
+ }
+
+ private void UpdateSignUpTime()
+ {
+ bool flag = this._Doc.RegistrationTime > 0.0;
+ if (flag)
+ {
+ this.m_Status.SetText(XStringDefineProxy.GetString("GUILD_ARENA_SIGN_TIME", new object[]
+ {
+ XSingleton<UiUtility>.singleton.TimeDuarationFormatString((int)this._Doc.RegistrationTime, 5)
+ }));
+ }
+ else
+ {
+ this.m_Status.SetText(XStringDefineProxy.GetString("GUILD_ARENA_OVER"));
+ this.UpdateSignStatu();
+ }
+ }
+
+ private void UpdateSignStatu()
+ {
+ this.m_responseNow = false;
+ bool flag = this._Doc.BattleStep == GuildArenaType.notopen;
+ if (flag)
+ {
+ this.m_Status.SetText(XStringDefineProxy.GetString("GUILD_ARENA_UNOPEN"));
+ }
+ else
+ {
+ bool flag2 = this._Doc.BattleStep == GuildArenaType.resttime;
+ if (flag2)
+ {
+ this.m_Status.SetText(XStringDefineProxy.GetString("GUILD_ARENA_OVER"));
+ }
+ else
+ {
+ bool flag3 = this._Doc.RegistrationTime > 0.0;
+ if (flag3)
+ {
+ this.m_responseNow = true;
+ }
+ else
+ {
+ this.m_Status.SetText(XStringDefineProxy.GetString("GUILD_ARENA_OVER"));
+ }
+ }
+ }
+ bool flag4 = this._Doc.BattleStep == GuildArenaType.notopen || !this._Doc.RegistrationStatu;
+ if (flag4)
+ {
+ this.m_SignUpLabel.SetText(XStringDefineProxy.GetString("GUILD_ARENA_SIGN_HAVE"));
+ }
+ else
+ {
+ this.m_SignUpLabel.SetText(XStringDefineProxy.GetString("GUILD_ARENA_SIGN_SHOW"));
+ }
+ XGuildDocument specificDocument = XDocuments.GetSpecificDocument<XGuildDocument>(XGuildDocument.uuID);
+ bool flag5 = specificDocument.Position == GuildPosition.GPOS_VICELEADER || specificDocument.Position == GuildPosition.GPOS_LEADER;
+ this.m_SignUp.SetGrey(this._Doc.RegistrationStatu || (this._Doc.BattleStep == GuildArenaType.apply && flag5));
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ this.m_SignUp.RegisterClickEventHandler(new ButtonClickEventHandler(this.RegistractionClick));
+ }
+
+ private bool RegistractionClick(IXUIButton btn)
+ {
+ bool flag = this._Doc.BattleStep == GuildArenaType.notopen;
+ bool result;
+ if (flag)
+ {
+ result = false;
+ }
+ else
+ {
+ bool registrationStatu = this._Doc.RegistrationStatu;
+ if (registrationStatu)
+ {
+ bool flag2 = this._Doc.BattleStep == GuildArenaType.battlefinal;
+ if (flag2)
+ {
+ DlgBase<XGuildArenaDlg, TabDlgBehaviour>.singleton.SelectTabIndex(GuildArenaTab.Combat);
+ }
+ else
+ {
+ DlgBase<XGuildArenaDlg, TabDlgBehaviour>.singleton.SelectTabIndex(GuildArenaTab.Duel);
+ }
+ }
+ else
+ {
+ bool flag3 = this._Doc.BattleStep != GuildArenaType.apply;
+ if (flag3)
+ {
+ return false;
+ }
+ bool flag4 = this._Doc.RegistrationTime > 0.0;
+ if (flag4)
+ {
+ XGuildDocument specificDocument = XDocuments.GetSpecificDocument<XGuildDocument>(XGuildDocument.uuID);
+ bool flag5 = specificDocument.CheckUnlockLevel(XSysDefine.XSys_GuildPvp);
+ if (flag5)
+ {
+ bool flag6 = specificDocument.Position == GuildPosition.GPOS_VICELEADER || specificDocument.Position == GuildPosition.GPOS_LEADER;
+ if (flag6)
+ {
+ this._Doc.SendApplyGuildArena();
+ }
+ else
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString("GUILD_ARENA_SIGN_PROFESSION"), "fece00");
+ }
+ }
+ else
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString("GUILD_ARENA_SIGN_LOW_LEVEL"), "fece00");
+ }
+ }
+ }
+ result = true;
+ }
+ return result;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/GuildArenaHallHandle.cs.meta b/Client/Assets/Scripts/XMainClient/UI/GuildArenaHallHandle.cs.meta
new file mode 100644
index 00000000..d1ea84cb
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/GuildArenaHallHandle.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: e4b5a8b7bd422e44bb808b4bb6d54f2f
+timeCreated: 1611404739
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/GuildArenaInspireCD.cs b/Client/Assets/Scripts/XMainClient/UI/GuildArenaInspireCD.cs
new file mode 100644
index 00000000..7fd6f4e6
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/GuildArenaInspireCD.cs
@@ -0,0 +1,81 @@
+using System;
+using UILib;
+using UnityEngine;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class GuildArenaInspireCD
+ {
+ private IXUILabel m_cdText;
+
+ private IXUISprite m_cdSprite;
+
+ private double m_inspireCdTotal = 20.0;
+
+ private bool m_canInspire = true;
+
+ private Transform transform;
+
+ public GuildArenaInspireCD(Transform t)
+ {
+ this.transform = t;
+ this.m_inspireCdTotal = double.Parse(XSingleton<XGlobalConfig>.singleton.GetValue("GMFInspireCoolDown"));
+ this.m_cdText = (t.Find("cd").GetComponent("XUILabel") as IXUILabel);
+ this.m_cdSprite = (t.Find("cd/Quan").GetComponent("XUISprite") as IXUISprite);
+ this.ClearInspireCD();
+ }
+
+ public bool IsActive()
+ {
+ return !(this.transform == null) && this.transform.gameObject.activeInHierarchy;
+ }
+
+ private void ClearInspireCD()
+ {
+ this.m_canInspire = true;
+ this.m_cdSprite.SetAlpha(0f);
+ this.m_cdText.Alpha = 0f;
+ }
+
+ public void ExcuteInspireCD(double curInspire)
+ {
+ bool flag = !this.IsActive();
+ if (!flag)
+ {
+ bool flag2 = curInspire > 0.0;
+ if (flag2)
+ {
+ bool flag3 = curInspire > this.m_inspireCdTotal;
+ if (flag3)
+ {
+ curInspire = this.m_inspireCdTotal;
+ }
+ float fillAmount = (float)(curInspire / this.m_inspireCdTotal);
+ this.m_cdText.Alpha = 1f;
+ this.m_cdSprite.SetAlpha(1f);
+ this.m_cdSprite.SetFillAmount(fillAmount);
+ this.m_canInspire = false;
+ bool flag4 = curInspire >= 1.0;
+ if (flag4)
+ {
+ int num = (int)(curInspire + 0.5);
+ this.m_cdText.SetText(num.ToString());
+ }
+ else
+ {
+ this.m_cdText.SetText(curInspire.ToString("F1"));
+ }
+ }
+ else
+ {
+ bool flag5 = !this.m_canInspire;
+ if (flag5)
+ {
+ this.ClearInspireCD();
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/GuildArenaInspireCD.cs.meta b/Client/Assets/Scripts/XMainClient/UI/GuildArenaInspireCD.cs.meta
new file mode 100644
index 00000000..15c19808
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/GuildArenaInspireCD.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 7f6f5c236e22d4d4a96fb74657a80d27
+timeCreated: 1611404030
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/GuildArenaRankBehaviour.cs b/Client/Assets/Scripts/XMainClient/UI/GuildArenaRankBehaviour.cs
new file mode 100644
index 00000000..190a8636
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/GuildArenaRankBehaviour.cs
@@ -0,0 +1,26 @@
+using System;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+
+namespace XMainClient.UI
+{
+ internal class GuildArenaRankBehaviour : DlgBehaviourBase
+ {
+ public IXUIButton m_Close;
+
+ public IXUIScrollView m_ScrollView;
+
+ public IXUIWrapContent m_WrapContent;
+
+ public Transform m_NA;
+
+ private void Awake()
+ {
+ this.m_NA = base.transform.Find("Bg/NA");
+ this.m_Close = (base.transform.Find("Bg/Close").GetComponent("XUIButton") as IXUIButton);
+ this.m_ScrollView = (base.transform.Find("Bg/ScrollView").GetComponent("XUIScrollView") as IXUIScrollView);
+ this.m_WrapContent = (base.transform.Find("Bg/ScrollView/WrapContent").GetComponent("XUIWrapContent") as IXUIWrapContent);
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/GuildArenaRankBehaviour.cs.meta b/Client/Assets/Scripts/XMainClient/UI/GuildArenaRankBehaviour.cs.meta
new file mode 100644
index 00000000..92502b95
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/GuildArenaRankBehaviour.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: a092cc8751443564ea29bb35d61707fe
+timeCreated: 1611404249
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/GuildArenaRankDlg.cs b/Client/Assets/Scripts/XMainClient/UI/GuildArenaRankDlg.cs
new file mode 100644
index 00000000..d867c98f
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/GuildArenaRankDlg.cs
@@ -0,0 +1,114 @@
+using System;
+using System.Collections.Generic;
+using KKSG;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+
+namespace XMainClient.UI
+{
+ internal class GuildArenaRankDlg : DlgBase<GuildArenaRankDlg, GuildArenaRankBehaviour>
+ {
+ public override string fileName
+ {
+ get
+ {
+ return "Guild/GuildArena/GuildArenaRankDlg";
+ }
+ }
+
+ public override int layer
+ {
+ get
+ {
+ return 1;
+ }
+ }
+
+ public override bool autoload
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ private List<GuildArenaHistory> m_historys;
+
+ protected override void Init()
+ {
+ base.Init();
+ base.uiBehaviour.m_WrapContent.RegisterItemUpdateEventHandler(new WrapItemUpdateEventHandler(this.OnWrapContentUpdate));
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ this.Refresh();
+ XGuildArenaDocument specificDocument = XDocuments.GetSpecificDocument<XGuildArenaDocument>(XGuildArenaDocument.uuID);
+ specificDocument.SendReqGuildArenaHistory();
+ }
+
+ private void OnWrapContentUpdate(Transform t, int index)
+ {
+ IXUILabelSymbol ixuilabelSymbol = t.Find("First").GetComponent("XUILabelSymbol") as IXUILabelSymbol;
+ IXUILabelSymbol ixuilabelSymbol2 = t.Find("Second").GetComponent("XUILabelSymbol") as IXUILabelSymbol;
+ IXUILabel ixuilabel = t.Find("Number").GetComponent("XUILabel") as IXUILabel;
+ IXUIButton ixuibutton = t.Find("Btn_View").GetComponent("XUIButton") as IXUIButton;
+ ixuibutton.SetVisible(false);
+ ixuibutton.RegisterClickEventHandler(new ButtonClickEventHandler(this.ClickShow));
+ ixuilabel.SetText(XStringDefineProxy.GetString("GUILD_ARENA_INDEX", new object[]
+ {
+ index + 1
+ }));
+ bool flag = this.m_historys == null || index >= this.m_historys.Count;
+ if (flag)
+ {
+ ixuilabelSymbol.InputText = "?";
+ ixuilabelSymbol2.InputText = "?";
+ }
+ else
+ {
+ GuildArenaHistory guildArenaHistory = this.m_historys[index];
+ ixuilabelSymbol.InputText = guildArenaHistory.first;
+ ixuilabelSymbol2.InputText = guildArenaHistory.second;
+ }
+ }
+
+ public void SetHistoryList(List<GuildArenaHistory> historys)
+ {
+ this.m_historys = historys;
+ this.Refresh();
+ }
+
+ public void Refresh()
+ {
+ int num = 0;
+ bool flag = this.m_historys != null;
+ if (flag)
+ {
+ num = this.m_historys.Count;
+ }
+ base.uiBehaviour.m_WrapContent.SetContentCount(num, false);
+ base.uiBehaviour.m_ScrollView.ResetPosition();
+ base.uiBehaviour.m_NA.gameObject.SetActive(num == 0);
+ }
+
+ private bool ClickShow(IXUIButton btn)
+ {
+ return false;
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ base.uiBehaviour.m_Close.RegisterClickEventHandler(new ButtonClickEventHandler(this.ClickClose));
+ }
+
+ private bool ClickClose(IXUIButton btn)
+ {
+ this.SetVisibleWithAnimation(false, null);
+ return true;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/GuildArenaRankDlg.cs.meta b/Client/Assets/Scripts/XMainClient/UI/GuildArenaRankDlg.cs.meta
new file mode 100644
index 00000000..157d6b48
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/GuildArenaRankDlg.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: b4e47669a8725324bb6a508a26ad998f
+timeCreated: 1611404393
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/GuildArenadDuelFinalInfo.cs b/Client/Assets/Scripts/XMainClient/UI/GuildArenadDuelFinalInfo.cs
new file mode 100644
index 00000000..38f904e0
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/GuildArenadDuelFinalInfo.cs
@@ -0,0 +1,41 @@
+using System;
+using UILib;
+using UnityEngine;
+
+namespace XMainClient.UI
+{
+ internal class GuildArenadDuelFinalInfo
+ {
+ private IXUISprite m_Portrait;
+
+ private IXUILabel m_GuildName;
+
+ private Transform m_LoseTransform;
+
+ private Transform m_WinTransform;
+
+ private IXUILabel m_WinLabel;
+
+ private IXUILabel m_LoseLabel;
+
+ public void Init(Transform t)
+ {
+ this.m_Portrait = (t.Find("Portrait").GetComponent("XUISprite") as IXUISprite);
+ this.m_GuildName = (t.Find("GuildName").GetComponent("XUILabel") as IXUILabel);
+ this.m_LoseTransform = t.Find("Result/Lose");
+ this.m_WinTransform = t.Find("Result/Win");
+ this.m_WinLabel = (t.Find("WinLabel").GetComponent("XUILabel") as IXUILabel);
+ this.m_LoseLabel = (t.Find("LoseLabel").GetComponent("XUILabel") as IXUILabel);
+ }
+
+ public void Set(GVGDuelResult result)
+ {
+ this.m_GuildName.SetText(result.ToGuildNameString());
+ this.m_Portrait.SetSprite(XGuildDocument.GetPortraitName((int)result.Guild.guildicon));
+ this.m_LoseTransform.gameObject.SetActive(!result.isWinner);
+ this.m_WinTransform.gameObject.SetActive(result.isWinner);
+ this.m_WinLabel.SetText(result.Score.ToString());
+ this.m_LoseLabel.SetText(string.Empty);
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/GuildArenadDuelFinalInfo.cs.meta b/Client/Assets/Scripts/XMainClient/UI/GuildArenadDuelFinalInfo.cs.meta
new file mode 100644
index 00000000..8e5f230d
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/GuildArenadDuelFinalInfo.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 6121bde23d1da444cb617a588f42ab41
+timeCreated: 1611403837
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/GuildBuffOperationHandler.cs b/Client/Assets/Scripts/XMainClient/UI/GuildBuffOperationHandler.cs
new file mode 100644
index 00000000..aa1140ee
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/GuildBuffOperationHandler.cs
@@ -0,0 +1,508 @@
+using System;
+using System.Collections.Generic;
+using UILib;
+using UnityEngine;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class GuildBuffOperationHandler : DlgHandlerBase
+ {
+ protected override string FileName
+ {
+ get
+ {
+ return "Guild/GuildMine/PropsFrame";
+ }
+ }
+
+ private IXUITweenTool _slider;
+
+ private IXUITweenTool _curTween = null;
+
+ private ulong _curTargetGuildID = 0UL;
+
+ private uint _curBuffItemID = 0u;
+
+ private Dictionary<uint, Transform> _tableChildren = new Dictionary<uint, Transform>();
+
+ protected XUIPool _buffDetailItemPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ protected XUIPool _personalUseItemPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ protected XUIPool _guildUseItemPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ protected IXUITable _buffTable;
+
+ protected Transform _buffTableTrans;
+
+ private bool _close;
+
+ private bool _inited;
+
+ private bool sliding = false;
+
+ protected override void Init()
+ {
+ base.Init();
+ this.InitProperties();
+ this.InitUIPool();
+ this.InitUI();
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ this._close = false;
+ this.RefreshUI();
+ this.sliding = true;
+ this.StartToSlide();
+ bool flag = !this._inited;
+ if (flag)
+ {
+ this._inited = true;
+ this.FoldChildren();
+ }
+ }
+
+ protected override void OnHide()
+ {
+ this._close = false;
+ base.OnHide();
+ }
+
+ public override void OnUnload()
+ {
+ this._tableChildren.Clear();
+ this._slider = null;
+ this._curTween = null;
+ this._curTargetGuildID = 0UL;
+ this._curBuffItemID = 0u;
+ base.OnUnload();
+ }
+
+ public void StartToSlide()
+ {
+ bool flag = this._slider != null;
+ if (flag)
+ {
+ bool bPlayForward = this._slider.bPlayForward;
+ if (bPlayForward)
+ {
+ bool flag2 = this._curTween != null;
+ if (flag2)
+ {
+ this._curTween.PlayTween(false, -1f);
+ }
+ this._curTween = null;
+ this._slider.PlayTween(false, -1f);
+ }
+ else
+ {
+ this._slider.PlayTween(true, -1f);
+ }
+ }
+ }
+
+ public void RefreshCardCd()
+ {
+ GuildBuffTable guildBuffData = XGuildResContentionBuffDocument.GuildBuffData;
+ uint guildBuffCDTime = XGuildResContentionBuffDocument.Doc.GuildBuffCDTime;
+ for (int i = 0; i < guildBuffData.Table.Length; i++)
+ {
+ Transform transform = null;
+ uint itemid = guildBuffData.Table[i].itemid;
+ bool flag = this._tableChildren.TryGetValue(itemid, out transform);
+ if (flag)
+ {
+ Transform transform2 = transform.Find("CDTime");
+ transform2.gameObject.SetActive(true);
+ IXUILabel ixuilabel = transform2.GetComponent("XUILabel") as IXUILabel;
+ bool flag2 = guildBuffCDTime > 0u;
+ if (flag2)
+ {
+ ixuilabel.SetText(XGuildResContentionBuffDocument.Doc.GuildBuffCDTime.ToString());
+ }
+ else
+ {
+ transform2.gameObject.SetActive(false);
+ }
+ }
+ }
+ }
+
+ public void RefreshOwnedBuffItem(uint itemID, uint cd)
+ {
+ this.UpdateBuffItemByItemID(itemID);
+ bool flag = cd > 0u && this._curTween != null;
+ if (flag)
+ {
+ this._curTween.PlayTween(false, -1f);
+ this._curTween = null;
+ }
+ uint guildBuffCDTime = XGuildResContentionBuffDocument.Doc.GuildBuffCDTime;
+ bool flag2 = guildBuffCDTime > 0u;
+ if (flag2)
+ {
+ this.RefreshCardCd();
+ }
+ }
+
+ public void FoldByHasGuildBuffCd()
+ {
+ uint guildBuffCDTime = XGuildResContentionBuffDocument.Doc.GuildBuffCDTime;
+ bool flag = guildBuffCDTime > 0u && this._curTween != null;
+ if (flag)
+ {
+ this._curTween.PlayTween(false, -1f);
+ this._curTween = null;
+ }
+ }
+
+ public void ResetPostion()
+ {
+ bool flag = this._slider != null;
+ if (flag)
+ {
+ this._slider.ResetTween(true);
+ }
+ }
+
+ private void InitProperties()
+ {
+ this._buffTableTrans = base.transform.Find("ScrollPanel/UITable");
+ this._buffTable = (this._buffTableTrans.GetComponent("XUITable") as IXUITable);
+ this._slider = (base.transform.GetComponent("XUIPlayTween") as IXUITweenTool);
+ this._slider.RegisterOnFinishEventHandler(new OnTweenFinishEventHandler(this.SetVisible));
+ IXUIButton ixuibutton = base.transform.Find("Close").GetComponent("XUIButton") as IXUIButton;
+ ixuibutton.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnclickCloseBtn));
+ this._inited = false;
+ }
+
+ private void FoldChildren()
+ {
+ foreach (object obj in this._buffTableTrans)
+ {
+ Transform transform = (Transform)obj;
+ bool activeSelf = transform.gameObject.activeSelf;
+ if (activeSelf)
+ {
+ Transform transform2 = transform.gameObject.transform.Find("Child");
+ IXUITweenTool ixuitweenTool = transform2.GetComponent("XUIPlayTween") as IXUITweenTool;
+ ixuitweenTool.PlayTween(true, -1f);
+ }
+ }
+ }
+
+ private bool OnclickCloseBtn(IXUIButton button)
+ {
+ bool flag = this.sliding;
+ bool result;
+ if (flag)
+ {
+ result = true;
+ }
+ else
+ {
+ this.StartToSlide();
+ this._close = true;
+ result = true;
+ }
+ return result;
+ }
+
+ private void SetVisible(IXUITweenTool tween)
+ {
+ bool close = this._close;
+ if (close)
+ {
+ base.SetVisible(false);
+ }
+ else
+ {
+ this.sliding = false;
+ }
+ }
+
+ private void InitUIPool()
+ {
+ this._buffDetailItemPool.SetupPool(this._buffTableTrans.gameObject, this._buffTableTrans.Find("ItemTpl").gameObject, 10u, false);
+ this._guildUseItemPool.SetupPool(this._buffTableTrans.gameObject, this._buffTableTrans.Find("Other").gameObject, 7u, false);
+ this._personalUseItemPool.SetupPool(this._buffTableTrans.gameObject, this._buffTableTrans.Find("Use").gameObject, 4u, false);
+ }
+
+ private void InitUI()
+ {
+ this._tableChildren.Clear();
+ this._buffDetailItemPool.ReturnAll(false);
+ this._guildUseItemPool.ReturnAll(false);
+ this._personalUseItemPool.ReturnAll(false);
+ foreach (GuildMineralStorage.RowData rowData in XGuildResContentionBuffDocument.GuildMineralStorageTable.Table)
+ {
+ Transform transform = this._buffDetailItemPool.FetchGameObject(false).transform;
+ Transform transform2 = transform.Find("Child");
+ Transform transform3 = null;
+ GuildBuffTargetType self = (GuildBuffTargetType)rowData.self;
+ if (self > GuildBuffTargetType.SelfGuild)
+ {
+ if (self == GuildBuffTargetType.OtherGuild)
+ {
+ transform3 = this._guildUseItemPool.FetchGameObject(false).transform;
+ }
+ }
+ else
+ {
+ transform3 = this._personalUseItemPool.FetchGameObject(false).transform;
+ }
+ Vector2 vector = transform2.localScale;
+ transform.parent = this._buffTableTrans;
+ transform2.localScale = Vector3.one;
+ transform3.parent = transform2;
+ transform2.localScale = vector;
+ this._tableChildren.Add(rowData.itemid, transform);
+ }
+ }
+
+ private void RefreshUI()
+ {
+ this._curTween = null;
+ foreach (GuildMineralStorage.RowData rowData in XGuildResContentionBuffDocument.GuildMineralStorageTable.Table)
+ {
+ Transform transform = null;
+ bool flag = this._tableChildren.TryGetValue(rowData.itemid, out transform);
+ if (flag)
+ {
+ Transform transform2 = transform.Find("Child");
+ Transform child = transform2.GetChild(0);
+ this.UpdateBuffItem(transform, child, rowData);
+ }
+ }
+ uint guildBuffCDTime = XGuildResContentionBuffDocument.Doc.GuildBuffCDTime;
+ bool flag2 = guildBuffCDTime > 0u;
+ if (flag2)
+ {
+ this.RefreshCardCd();
+ }
+ }
+
+ private void UpdateBuffItem(Transform parent, Transform child, GuildMineralStorage.RowData info)
+ {
+ IXUICheckBox ixuicheckBox = parent.GetComponent("XUICheckBox") as IXUICheckBox;
+ ixuicheckBox.ID = (ulong)info.itemid;
+ ixuicheckBox.ForceSetFlag(true);
+ ixuicheckBox.ForceSetFlag(false);
+ IXUISprite ixuisprite = ixuicheckBox.gameObject.GetComponent("XUISprite") as IXUISprite;
+ IXUILabel ixuilabel = parent.Find("BuffName").GetComponent("XUILabel") as IXUILabel;
+ ItemList.RowData itemConf = XBagDocument.GetItemConf((int)info.itemid);
+ ixuilabel.SetText(itemConf.ItemName[0]);
+ IXUISprite ixuisprite2 = parent.Find("BuffIcon").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite2.SetSprite(itemConf.ItemIcon[0]);
+ IXUILabel ixuilabel2 = parent.Find("Des").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel2.SetText(info.effect);
+ IXUILabel ixuilabel3 = parent.Find("Count").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel3.SetText("");
+ Transform transform = parent.Find("CDTime");
+ transform.gameObject.SetActive(false);
+ Transform transform2 = parent.Find("TargetPersonal");
+ transform2.gameObject.SetActive(info.self == 0u);
+ Transform transform3 = parent.Find("TargetOtherGuild");
+ transform3.gameObject.SetActive(info.self == 2u);
+ Transform transform4 = parent.Find("TargetMyGuild");
+ transform4.gameObject.SetActive(info.self == 1u);
+ GuildBuffInfo ownedBuffInfo = this.GetOwnedBuffInfo(info);
+ bool flag = ownedBuffInfo == null;
+ if (flag)
+ {
+ ixuisprite.SetColor(new Color(0f, 0f, 0f, 1f));
+ ixuisprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnNoBuffCard));
+ }
+ else
+ {
+ ixuisprite.SetColor(Color.white);
+ ixuilabel3.SetText("X" + ownedBuffInfo.count);
+ ixuisprite.ID = (ulong)info.itemid;
+ ixuisprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnclickBuffSprite));
+ }
+ bool flag2 = info.self == 2u;
+ if (flag2)
+ {
+ WarResGuildInfo pkguildInfos = XGuildResContentionBuffDocument.Doc.GetPKGuildInfos(1);
+ bool flag3 = pkguildInfos != null;
+ if (flag3)
+ {
+ Transform transform5 = child.Find("OneGuild");
+ IXUIButton ixuibutton = transform5.GetComponent("XUIButton") as IXUIButton;
+ ixuibutton.ID = pkguildInfos.guildID;
+ ixuibutton.RegisterClickEventHandler(new ButtonClickEventHandler(this.UseBuffOnGuild));
+ IXUILabel ixuilabel4 = transform5.Find("Name").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel4.SetText(pkguildInfos.guildName);
+ }
+ pkguildInfos = XGuildResContentionBuffDocument.Doc.GetPKGuildInfos(2);
+ bool flag4 = pkguildInfos != null;
+ if (flag4)
+ {
+ Transform transform6 = child.Find("TwoGuild");
+ IXUIButton ixuibutton2 = transform6.GetComponent("XUIButton") as IXUIButton;
+ ixuibutton2.ID = pkguildInfos.guildID;
+ ixuibutton2.RegisterClickEventHandler(new ButtonClickEventHandler(this.UseBuffOnGuild));
+ IXUILabel ixuilabel5 = transform6.Find("Name").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel5.SetText(pkguildInfos.guildName);
+ }
+ }
+ else
+ {
+ IXUIButton ixuibutton3 = child.GetComponent("XUIButton") as IXUIButton;
+ ixuibutton3.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnUsePositiveBuff));
+ }
+ }
+
+ private void OnNoBuffCard(IXUISprite uiSprite)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XSingleton<XStringTable>.singleton.GetString("ERR_GUILDBUFF_ITEM"), "fece00");
+ }
+
+ private GuildBuffInfo GetOwnedBuffInfo(GuildMineralStorage.RowData info)
+ {
+ bool flag = info.self > 0u;
+ GuildBuffInfo result;
+ if (flag)
+ {
+ result = XGuildResContentionBuffDocument.Doc.GetGuildOwnedSomeCardInfo(info.itemid);
+ }
+ else
+ {
+ result = XGuildResContentionBuffDocument.Doc.GetMyOwnedSomeCardInfo(info.itemid);
+ }
+ return result;
+ }
+
+ private void OnclickBuffSprite(IXUISprite uiSprite)
+ {
+ Transform transform = uiSprite.gameObject.transform.Find("Child");
+ IXUITweenTool ixuitweenTool = transform.GetComponent("XUIPlayTween") as IXUITweenTool;
+ bool bPlayForward = ixuitweenTool.bPlayForward;
+ if (bPlayForward)
+ {
+ ixuitweenTool.PlayTween(false, -1f);
+ }
+ else
+ {
+ ixuitweenTool.PlayTween(true, -1f);
+ }
+ this._curBuffItemID = (uint)uiSprite.ID;
+ bool flag = this._curTween == null;
+ if (flag)
+ {
+ this._curTween = ixuitweenTool;
+ }
+ else
+ {
+ bool flag2 = this._curTween != ixuitweenTool;
+ if (flag2)
+ {
+ this._curTween.PlayTween(false, -1f);
+ this._curTween = ixuitweenTool;
+ }
+ else
+ {
+ this._curTween = null;
+ }
+ }
+ }
+
+ private bool OnClickBuffItem(IXUICheckBox iXUICheckBox)
+ {
+ return false;
+ }
+
+ private void UpdateBuffItemByItemID(uint itemID)
+ {
+ Transform transform = null;
+ bool flag = this._tableChildren.TryGetValue(itemID, out transform);
+ if (flag)
+ {
+ GuildMineralStorage.RowData mineralStorageByID = XGuildResContentionBuffDocument.Doc.GetMineralStorageByID(itemID);
+ bool flag2 = mineralStorageByID == null;
+ if (!flag2)
+ {
+ Transform child = transform.Find("Child").GetChild(0);
+ bool flag3 = this._curBuffItemID == itemID;
+ if (flag3)
+ {
+ GuildBuffInfo ownedBuffInfo = this.GetOwnedBuffInfo(mineralStorageByID);
+ bool flag4 = ownedBuffInfo == null;
+ if (flag4)
+ {
+ bool flag5 = this._curTween != null;
+ if (flag5)
+ {
+ this._curTween.PlayTween(false, -1f);
+ this._curTween = null;
+ }
+ }
+ }
+ this.UpdateBuffItem(transform, child, mineralStorageByID);
+ }
+ }
+ }
+
+ private bool UseBuffOnGuild(IXUIButton button)
+ {
+ bool flag = this.HasNoCardCD();
+ if (flag)
+ {
+ this._curTargetGuildID = button.ID;
+ XGuildResContentionBuffDocument.Doc.SendGuildBuffReq(this._curTargetGuildID, this._curBuffItemID);
+ }
+ else
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(string.Format(XSingleton<XStringTable>.singleton.GetString("HasGuildBuffCD"), XGuildResContentionBuffDocument.Doc.GuildBuffCDTime), "fece00");
+ }
+ return true;
+ }
+
+ private bool OnUsePositiveBuff(IXUIButton button)
+ {
+ GuildMineralStorage.RowData mineralStorageByID = XGuildResContentionBuffDocument.Doc.GetMineralStorageByID(this._curBuffItemID);
+ bool flag = mineralStorageByID == null;
+ bool result;
+ if (flag)
+ {
+ result = true;
+ }
+ else
+ {
+ bool flag2 = mineralStorageByID.self == 0u;
+ if (flag2)
+ {
+ XGuildResContentionBuffDocument.Doc.SendPersonalBuffOpReq(XSingleton<XAttributeMgr>.singleton.XPlayerData.RoleID, this._curBuffItemID, PersonalBuffOpType.UseBuff);
+ }
+ else
+ {
+ XGuildResContentionBuffDocument.Doc.SendGuildBuffReq(XGuildResContentionBuffDocument.Doc.GuildID, this._curBuffItemID);
+ }
+ result = true;
+ }
+ return result;
+ }
+
+ private bool HasNoCardCD()
+ {
+ return XGuildResContentionBuffDocument.Doc.GuildBuffCDTime <= 0u;
+ }
+
+ private void ResetBuffItemSpriteState()
+ {
+ foreach (KeyValuePair<uint, Transform> keyValuePair in this._tableChildren)
+ {
+ IXUISprite ixuisprite = keyValuePair.Value.GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.SetEnabled(true);
+ }
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/GuildBuffOperationHandler.cs.meta b/Client/Assets/Scripts/XMainClient/UI/GuildBuffOperationHandler.cs.meta
new file mode 100644
index 00000000..3478ef09
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/GuildBuffOperationHandler.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 418a013697dc34b4fb1d3d1d998cf135
+timeCreated: 1611403617
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/GuildCollectRewardBehaviour.cs b/Client/Assets/Scripts/XMainClient/UI/GuildCollectRewardBehaviour.cs
new file mode 100644
index 00000000..05d1c2d8
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/GuildCollectRewardBehaviour.cs
@@ -0,0 +1,32 @@
+using System;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class GuildCollectRewardBehaviour : DlgBehaviourBase
+ {
+ public IXUIButton m_Close;
+
+ public IXUIButton m_Help;
+
+ public IXUILabel m_LeftTime;
+
+ public XUIPool m_CollectPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ public XUIPool m_ItemPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ private void Awake()
+ {
+ this.m_Close = (base.transform.Find("Bg/Close").GetComponent("XUIButton") as IXUIButton);
+ this.m_Help = (base.transform.Find("Bg/Title/Help").GetComponent("XUIButton") as IXUIButton);
+ this.m_LeftTime = (base.transform.Find("Bg/LeftTime").GetComponent("XUILabel") as IXUILabel);
+ Transform transform = base.transform.Find("Bg/Panel/Tpl");
+ this.m_CollectPool.SetupPool(transform.parent.gameObject, transform.gameObject, 10u, false);
+ transform = base.transform.Find("Bg/Panel/ItemTpl");
+ this.m_ItemPool.SetupPool(transform.parent.gameObject, transform.gameObject, 30u, false);
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/GuildCollectRewardBehaviour.cs.meta b/Client/Assets/Scripts/XMainClient/UI/GuildCollectRewardBehaviour.cs.meta
new file mode 100644
index 00000000..3ea8baa4
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/GuildCollectRewardBehaviour.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 4236f5a89faf3a6439eff418c51dcb26
+timeCreated: 1611403639
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/GuildCollectRewardDlg.cs b/Client/Assets/Scripts/XMainClient/UI/GuildCollectRewardDlg.cs
new file mode 100644
index 00000000..424dd77f
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/GuildCollectRewardDlg.cs
@@ -0,0 +1,161 @@
+using System;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class GuildCollectRewardDlg : DlgBase<GuildCollectRewardDlg, GuildCollectRewardBehaviour>
+ {
+ public override bool autoload
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override bool pushstack
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override string fileName
+ {
+ get
+ {
+ return "Guild/GuildCollect/GuildCollectReward";
+ }
+ }
+
+ private XGuildCollectDocument _doc = null;
+
+ private string _tipsStr;
+
+ protected override void Init()
+ {
+ base.Init();
+ this._doc = XDocuments.GetSpecificDocument<XGuildCollectDocument>(XGuildCollectDocument.uuID);
+ this._tipsStr = XStringDefineProxy.GetString("GuildCollectRewardTimeTips");
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ base.uiBehaviour.m_Close.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnCloseBtnClick));
+ base.uiBehaviour.m_Help.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnHelpBtnClick));
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ this._doc.QueryGetRewardCount();
+ this.Refresh();
+ }
+
+ protected override void OnHide()
+ {
+ base.OnHide();
+ }
+
+ public override void StackRefresh()
+ {
+ base.StackRefresh();
+ }
+
+ public override void LeaveStackTop()
+ {
+ base.LeaveStackTop();
+ }
+
+ protected override void OnUnload()
+ {
+ base.OnUnload();
+ }
+
+ public void Refresh()
+ {
+ base.uiBehaviour.m_CollectPool.ReturnAll(false);
+ base.uiBehaviour.m_ItemPool.ReturnAll(true);
+ Vector3 tplPos = base.uiBehaviour.m_CollectPool.TplPos;
+ for (int i = 0; i < this._doc.RewardReader.Table.Length; i++)
+ {
+ GuildCampPartyReward.RowData rowData = this._doc.RewardReader.Table[i];
+ GameObject gameObject = base.uiBehaviour.m_CollectPool.FetchGameObject(false);
+ gameObject.transform.localPosition = new Vector3(tplPos.x, tplPos.y - (float)(i * base.uiBehaviour.m_CollectPool.TplHeight));
+ Transform parent = gameObject.transform.Find("CollectList");
+ Transform parent2 = gameObject.transform.Find("RewardList");
+ IXUIButton ixuibutton = gameObject.transform.Find("BtnFetch").GetComponent("XUIButton") as IXUIButton;
+ GameObject gameObject2 = gameObject.transform.Find("Get").gameObject;
+ bool grey = true;
+ for (int j = 0; j < rowData.Items.Count; j++)
+ {
+ GameObject gameObject3 = base.uiBehaviour.m_ItemPool.FetchGameObject(false);
+ gameObject3.transform.parent = parent;
+ gameObject3.transform.localPosition = new Vector3((float)(j * base.uiBehaviour.m_ItemPool.TplWidth), 0f);
+ XSingleton<XItemDrawerMgr>.singleton.normalItemDrawer.DrawItem(gameObject3, (int)rowData.Items[j, 0], (int)rowData.Items[j, 1], true);
+ XSingleton<XItemDrawerMgr>.singleton.normalItemDrawer.OpenClickShowTooltipEvent(gameObject3, (int)rowData.Items[j, 0]);
+ IXUILabel ixuilabel = gameObject3.transform.Find("Num").GetComponent("XUILabel") as IXUILabel;
+ int num = (int)XBagDocument.BagDoc.GetItemCount((int)rowData.Items[j, 0]);
+ ixuilabel.SetText(string.Format("{0}{1}/{2}", (num >= (int)rowData.Items[j, 1]) ? "[ffffff]" : "[fd4343]", num, (int)rowData.Items[j, 1]));
+ bool flag = num < (int)rowData.Items[j, 1];
+ if (flag)
+ {
+ grey = false;
+ }
+ }
+ for (int k = 0; k < rowData.Reward.Count; k++)
+ {
+ GameObject gameObject4 = base.uiBehaviour.m_ItemPool.FetchGameObject(false);
+ gameObject4.transform.parent = parent2;
+ gameObject4.transform.localPosition = new Vector3((float)(k * base.uiBehaviour.m_ItemPool.TplWidth), 0f);
+ XSingleton<XItemDrawerMgr>.singleton.normalItemDrawer.DrawItem(gameObject4, (int)rowData.Reward[k, 0], (int)rowData.Reward[k, 1], false);
+ XSingleton<XItemDrawerMgr>.singleton.normalItemDrawer.OpenClickShowTooltipEvent(gameObject4, (int)rowData.Reward[k, 0]);
+ }
+ int num2 = 0;
+ this._doc.CollectUseDict.TryGetValue(rowData.ID, out num2);
+ bool flag2 = num2 > 0;
+ if (flag2)
+ {
+ gameObject2.SetActive(true);
+ ixuibutton.SetVisible(false);
+ }
+ else
+ {
+ gameObject2.SetActive(false);
+ ixuibutton.SetVisible(true);
+ ixuibutton.SetGrey(grey);
+ ixuibutton.ID = (ulong)rowData.ID;
+ ixuibutton.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnFetchBtnClick));
+ }
+ }
+ }
+
+ private bool OnCloseBtnClick(IXUIButton btn)
+ {
+ this.SetVisibleWithAnimation(false, null);
+ return true;
+ }
+
+ private bool OnFetchBtnClick(IXUIButton btn)
+ {
+ this._doc.QueryGetReward((uint)btn.ID);
+ return true;
+ }
+
+ private bool OnHelpBtnClick(IXUIButton btn)
+ {
+ DlgBase<XCommonHelpTipView, XCommonHelpTipBehaviour>.singleton.ShowHelp(XSysDefine.XSys_GuildCollect);
+ return true;
+ }
+
+ public void RefreshTime(int time)
+ {
+ base.uiBehaviour.m_LeftTime.SetText(string.Format(this._tipsStr, XSingleton<UiUtility>.singleton.TimeDuarationFormatString(time, 5)));
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/GuildCollectRewardDlg.cs.meta b/Client/Assets/Scripts/XMainClient/UI/GuildCollectRewardDlg.cs.meta
new file mode 100644
index 00000000..3c01e3e0
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/GuildCollectRewardDlg.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 0959331cee8738f48aee5dc2024e68b8
+timeCreated: 1611403155
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/GuildDragonChallengeResultView.cs b/Client/Assets/Scripts/XMainClient/UI/GuildDragonChallengeResultView.cs
new file mode 100644
index 00000000..78572ee8
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/GuildDragonChallengeResultView.cs
@@ -0,0 +1,66 @@
+using System;
+using UILib;
+using XMainClient.UI.UICommon;
+
+namespace XMainClient.UI
+{
+ internal class GuildDragonChallengeResultView : DlgBase<GuildDragonChallengeResultView, GuildDragonChallengeResultBehaviour>
+ {
+ public override string fileName
+ {
+ get
+ {
+ return "Battle/Comcotinue";
+ }
+ }
+
+ public override int layer
+ {
+ get
+ {
+ return 1;
+ }
+ }
+
+ public override bool pushstack
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override bool autoload
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ private XGuildDragonDocument _Doc;
+
+ protected override void Init()
+ {
+ base.Init();
+ this._Doc = XDocuments.GetSpecificDocument<XGuildDragonDocument>(XGuildDragonDocument.uuID);
+ this._Doc._GuildDragonChallengeResultView = this;
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ base.uiBehaviour.m_ReturnBtn.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnReturn));
+ }
+
+ private void OnReturn(IXUISprite sp)
+ {
+ this._Doc.ReqQutiScene();
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/GuildDragonChallengeResultView.cs.meta b/Client/Assets/Scripts/XMainClient/UI/GuildDragonChallengeResultView.cs.meta
new file mode 100644
index 00000000..f6a3d6dd
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/GuildDragonChallengeResultView.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 1926ad50b218d254d9125b0e49f4d4e4
+timeCreated: 1611403301
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/GuildFiexdRedPackageView.cs b/Client/Assets/Scripts/XMainClient/UI/GuildFiexdRedPackageView.cs
new file mode 100644
index 00000000..0a627ed0
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/GuildFiexdRedPackageView.cs
@@ -0,0 +1,149 @@
+using System;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class GuildFiexdRedPackageView : DlgBase<GuildFiexdRedPackageView, GuildFiexdRedPackageBehaviour>
+ {
+ public override string fileName
+ {
+ get
+ {
+ return "Guild/GuildFiexdRedPacketDlg";
+ }
+ }
+
+ public override int sysid
+ {
+ get
+ {
+ return XFastEnumIntEqualityComparer<XSysDefine>.ToInt(XSysDefine.XSys_SevenActivity);
+ }
+ }
+
+ public override int layer
+ {
+ get
+ {
+ return 1;
+ }
+ }
+
+ public override bool pushstack
+ {
+ get
+ {
+ return false;
+ }
+ }
+
+ public override bool autoload
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ private XGuildRedPacketDocument _Doc;
+
+ protected override void Init()
+ {
+ base.Init();
+ this._Doc = XDocuments.GetSpecificDocument<XGuildRedPacketDocument>(XGuildRedPacketDocument.uuID);
+ base.uiBehaviour.m_WrapContent.RegisterItemUpdateEventHandler(new WrapItemUpdateEventHandler(this.OnWrapContentUpdate));
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ base.uiBehaviour.m_Close.RegisterClickEventHandler(new ButtonClickEventHandler(this.ClickClose));
+ base.uiBehaviour.m_HelpBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.ClickHelp));
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ this._Doc.SendGuildBonusSendList();
+ }
+
+ private bool ClickClose(IXUIButton btn)
+ {
+ this.SetVisibleWithAnimation(false, null);
+ return false;
+ }
+
+ private bool OnSendClick(IXUIButton btn)
+ {
+ this._Doc.SendGuildBonusInSend((uint)btn.ID);
+ return true;
+ }
+
+ private bool ClickHelp(IXUIButton btn)
+ {
+ DlgBase<XCommonHelpTipView, XCommonHelpTipBehaviour>.singleton.ShowHelp(XSysDefine.XSys_GuildBoon_FixedRedPacket);
+ return true;
+ }
+
+ public void Refresh()
+ {
+ int count = this._Doc.GuildBonusSendList.Count;
+ base.uiBehaviour.m_WrapContent.SetContentCount(count, false);
+ base.uiBehaviour.m_ScrollView.ResetPosition();
+ base.uiBehaviour.m_Empty.gameObject.SetActive(count == 0);
+ }
+
+ private void OnWrapContentUpdate(Transform t, int index)
+ {
+ bool flag = index >= this._Doc.GuildBonusSendList.Count;
+ if (!flag)
+ {
+ IXUIButton ixuibutton = t.Find("Go").GetComponent("XUIButton") as IXUIButton;
+ IXUILabel ixuilabel = t.Find("Name").GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel2 = t.Find("Desc").GetComponent("XUILabel") as IXUILabel;
+ IXUILabelSymbol ixuilabelSymbol = t.Find("Value").GetComponent("XUILabelSymbol") as IXUILabelSymbol;
+ IXUISprite ixuisprite = t.Find("Icon").GetComponent("XUISprite") as IXUISprite;
+ XGuildRedPackageSendBrief xguildRedPackageSendBrief = this._Doc.GuildBonusSendList[index];
+ ixuilabel.SetText(xguildRedPackageSendBrief.senderName);
+ ItemEnum itemid = (ItemEnum)xguildRedPackageSendBrief.itemid;
+ string sprite = string.Empty;
+ bool flag2 = itemid == ItemEnum.GOLD;
+ if (flag2)
+ {
+ sprite = "l_red_jinbi_01";
+ }
+ else
+ {
+ bool flag3 = itemid == ItemEnum.DRAGON_COIN;
+ if (flag3)
+ {
+ sprite = "l_red_longbi_01";
+ }
+ else
+ {
+ sprite = "l_red_longbi_01";
+ }
+ }
+ ixuisprite.SetSprite(sprite);
+ ixuisprite.MakePixelPerfect();
+ ixuibutton.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnSendClick));
+ ixuibutton.ID = xguildRedPackageSendBrief.uid;
+ ixuibutton.SetVisible(xguildRedPackageSendBrief.senderType == BonusSender.Bonus_Self);
+ bool flag4 = xguildRedPackageSendBrief.bonusInfo != null;
+ if (flag4)
+ {
+ ixuilabel2.SetText(xguildRedPackageSendBrief.bonusInfo.GuildBonusName);
+ ixuilabelSymbol.InputText = XLabelSymbolHelper.FormatCostWithIcon((int)xguildRedPackageSendBrief.bonusInfo.GuildBonusReward[1], (ItemEnum)xguildRedPackageSendBrief.bonusInfo.GuildBonusReward[0]);
+ }
+ else
+ {
+ ixuilabel2.SetText(string.Empty);
+ ixuilabelSymbol.InputText = string.Empty;
+ }
+ }
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/GuildFiexdRedPackageView.cs.meta b/Client/Assets/Scripts/XMainClient/UI/GuildFiexdRedPackageView.cs.meta
new file mode 100644
index 00000000..2dc9687a
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/GuildFiexdRedPackageView.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 06d4e68b2e49c264f92063c2098a9c9b
+timeCreated: 1611402966
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/GuildInheritBehaviour.cs b/Client/Assets/Scripts/XMainClient/UI/GuildInheritBehaviour.cs
new file mode 100644
index 00000000..4e3dcec0
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/GuildInheritBehaviour.cs
@@ -0,0 +1,28 @@
+using System;
+using UILib;
+using XMainClient.UI.UICommon;
+
+namespace XMainClient.UI
+{
+ internal class GuildInheritBehaviour : DlgBehaviourBase
+ {
+ public IXUIButton Close;
+
+ public IXUIScrollView ScrollView;
+
+ public IXUIWrapContent WrapContent;
+
+ public IXUIButton OverLook;
+
+ public IXUIButton NotAccept;
+
+ private void Awake()
+ {
+ this.Close = (base.transform.Find("Close").GetComponent("XUIButton") as IXUIButton);
+ this.ScrollView = (base.transform.Find("ScrollView").GetComponent("XUIScrollView") as IXUIScrollView);
+ this.WrapContent = (base.transform.Find("ScrollView/WrapContent").GetComponent("XUIWrapContent") as IXUIWrapContent);
+ this.OverLook = (base.transform.Find("OverLook").GetComponent("XUIButton") as IXUIButton);
+ this.NotAccept = (base.transform.Find("NotAccept").GetComponent("XUIButton") as IXUIButton);
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/GuildInheritBehaviour.cs.meta b/Client/Assets/Scripts/XMainClient/UI/GuildInheritBehaviour.cs.meta
new file mode 100644
index 00000000..141681e0
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/GuildInheritBehaviour.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 0fbd8f01c5c13d24b8e83708336fc929
+timeCreated: 1611403212
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/GuildInheritDlg.cs b/Client/Assets/Scripts/XMainClient/UI/GuildInheritDlg.cs
new file mode 100644
index 00000000..5eec78fd
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/GuildInheritDlg.cs
@@ -0,0 +1,114 @@
+using System;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+
+namespace XMainClient.UI
+{
+ internal class GuildInheritDlg : DlgBase<GuildInheritDlg, GuildInheritBehaviour>
+ {
+ public override string fileName
+ {
+ get
+ {
+ return "Guild/GuildInheritDlg";
+ }
+ }
+
+ public override int layer
+ {
+ get
+ {
+ return 1;
+ }
+ }
+
+ public override int group
+ {
+ get
+ {
+ return 1;
+ }
+ }
+
+ public override bool autoload
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ private XGuildInheritDocument _Doc;
+
+ protected override void Init()
+ {
+ base.Init();
+ this._Doc = XDocuments.GetSpecificDocument<XGuildInheritDocument>(XGuildInheritDocument.uuID);
+ base.uiBehaviour.WrapContent.RegisterItemUpdateEventHandler(new WrapItemUpdateEventHandler(this.OnItemUpdateHandler));
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ base.uiBehaviour.OverLook.RegisterClickEventHandler(new ButtonClickEventHandler(this.CloseClick));
+ base.uiBehaviour.Close.RegisterClickEventHandler(new ButtonClickEventHandler(this.CloseClick));
+ base.uiBehaviour.NotAccept.RegisterClickEventHandler(new ButtonClickEventHandler(this.OverLookClick));
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ this._Doc.SendInheritList();
+ }
+
+ public void RefreshData()
+ {
+ base.uiBehaviour.WrapContent.SetContentCount(this._Doc.InheritList.Count, false);
+ base.uiBehaviour.ScrollView.ResetPosition();
+ }
+
+ private bool OverLookClick(IXUIButton btn)
+ {
+ this._Doc.SendDelInherit();
+ this.SetVisibleWithAnimation(false, null);
+ return false;
+ }
+
+ private bool CloseClick(IXUIButton btn)
+ {
+ this.SetVisibleWithAnimation(false, null);
+ return false;
+ }
+
+ private void OnItemUpdateHandler(Transform t, int index)
+ {
+ bool flag = index >= this._Doc.InheritList.Count;
+ if (!flag)
+ {
+ IXUILabelSymbol ixuilabelSymbol = t.Find("Name").GetComponent("XUILabelSymbol") as IXUILabelSymbol;
+ IXUILabel ixuilabel = t.Find("Level").GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel2 = t.Find("Position").GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel3 = t.Find("LastLoginTime").GetComponent("XUILabel") as IXUILabel;
+ IXUIButton ixuibutton = t.Find("BtnReceive").GetComponent("XUIButton") as IXUIButton;
+ GuildInheritInfo guildInheritInfo = this._Doc.InheritList[index];
+ ixuibutton.ID = (ulong)((long)index);
+ ixuibutton.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnClickReceive));
+ ixuilabel.SetText(guildInheritInfo.GetLevelString());
+ ixuilabel2.SetText(guildInheritInfo.GetSceneName());
+ ixuilabel3.SetText(guildInheritInfo.GetTimeString());
+ ixuilabelSymbol.InputText = guildInheritInfo.name;
+ }
+ }
+
+ private bool OnClickReceive(IXUIButton btn)
+ {
+ bool flag = btn.ID >= 0UL;
+ if (flag)
+ {
+ this._Doc.SendAccpetInherit((int)btn.ID);
+ }
+ return true;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/GuildInheritDlg.cs.meta b/Client/Assets/Scripts/XMainClient/UI/GuildInheritDlg.cs.meta
new file mode 100644
index 00000000..78e77953
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/GuildInheritDlg.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 87b3a5bfe3b9f9346b368e15755f1692
+timeCreated: 1611404081
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/GuildInheritProcessBehaviour.cs b/Client/Assets/Scripts/XMainClient/UI/GuildInheritProcessBehaviour.cs
new file mode 100644
index 00000000..386f6052
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/GuildInheritProcessBehaviour.cs
@@ -0,0 +1,22 @@
+using System;
+using UILib;
+using XMainClient.UI.UICommon;
+
+namespace XMainClient.UI
+{
+ public class GuildInheritProcessBehaviour : DlgBehaviourBase
+ {
+ protected internal IXUISlider mProcessSlider;
+
+ protected internal IXUILabel mProcessLabel;
+
+ protected internal IXUILabel mContentLabel;
+
+ private void Awake()
+ {
+ this.mProcessSlider = (base.transform.Find("Bg/Process").GetComponent("XUISlider") as IXUISlider);
+ this.mProcessLabel = (base.transform.Find("Bg/ProcessLabel").GetComponent("XUILabel") as IXUILabel);
+ this.mContentLabel = (base.transform.Find("Bg/Content").GetComponent("XUILabel") as IXUILabel);
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/GuildInheritProcessBehaviour.cs.meta b/Client/Assets/Scripts/XMainClient/UI/GuildInheritProcessBehaviour.cs.meta
new file mode 100644
index 00000000..d19d1d41
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/GuildInheritProcessBehaviour.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 87f931453d16aee4f8f2440a81493588
+timeCreated: 1611404082
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/GuildInheritProcessDlg.cs b/Client/Assets/Scripts/XMainClient/UI/GuildInheritProcessDlg.cs
new file mode 100644
index 00000000..9762b083
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/GuildInheritProcessDlg.cs
@@ -0,0 +1,90 @@
+using System;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class GuildInheritProcessDlg : DlgBase<GuildInheritProcessDlg, GuildInheritProcessBehaviour>
+ {
+ public override string fileName
+ {
+ get
+ {
+ return "Guild/GuildInheritProcessDlg";
+ }
+ }
+
+ public override bool isMainUI
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ private XElapseTimer m_lastTime;
+
+ private float m_totalTime;
+
+ private GuildInheritProcessDlg.OnSliderProcessEnd _endEvent;
+
+ public delegate void OnSliderProcessEnd();
+
+ public void ShowProcess(float countdownTime, string mess, string tips, GuildInheritProcessDlg.OnSliderProcessEnd events = null)
+ {
+ bool flag = this.m_lastTime == null;
+ if (flag)
+ {
+ this.m_lastTime = new XElapseTimer();
+ }
+ this._endEvent = events;
+ this.m_totalTime = countdownTime;
+ this.m_lastTime.LeftTime = this.m_totalTime;
+ this.SetVisibleWithAnimation(true, null);
+ base.uiBehaviour.mProcessLabel.SetText(mess);
+ base.uiBehaviour.mContentLabel.SetText(tips);
+ }
+
+ public void HideProcess()
+ {
+ this.SetVisibleWithAnimation(false, null);
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ }
+
+ protected override void OnUnload()
+ {
+ this.m_lastTime = null;
+ base.OnUnload();
+ }
+
+ public override void OnUpdate()
+ {
+ base.OnUpdate();
+ this.UpdateTime();
+ }
+
+ private void UpdateTime()
+ {
+ this.m_lastTime.Update();
+ bool flag = this.m_lastTime.LeftTime > 0f;
+ if (flag)
+ {
+ float value = this.m_lastTime.LeftTime / this.m_totalTime;
+ base.uiBehaviour.mProcessSlider.Value = value;
+ }
+ else
+ {
+ this.SetVisibleWithAnimation(false, null);
+ bool flag2 = this._endEvent != null;
+ if (flag2)
+ {
+ this._endEvent();
+ }
+ }
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/GuildInheritProcessDlg.cs.meta b/Client/Assets/Scripts/XMainClient/UI/GuildInheritProcessDlg.cs.meta
new file mode 100644
index 00000000..72d0cd7d
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/GuildInheritProcessDlg.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: d618896f254a1334e840b7b3c9b0a37e
+timeCreated: 1611404630
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/GuildJockerMatchView.cs b/Client/Assets/Scripts/XMainClient/UI/GuildJockerMatchView.cs
new file mode 100644
index 00000000..6031f501
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/GuildJockerMatchView.cs
@@ -0,0 +1,17 @@
+using System;
+using UILib;
+using XMainClient.UI.UICommon;
+
+namespace XMainClient.UI
+{
+ internal class GuildJockerMatchView<T> : DlgBase<T, XGuildJokerBehaviour> where T : IXUIDlg, new()
+ {
+ public override string fileName
+ {
+ get
+ {
+ return "Guild/GuildSystem/GuildJokerMatchDlg";
+ }
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/GuildJockerMatchView.cs.meta b/Client/Assets/Scripts/XMainClient/UI/GuildJockerMatchView.cs.meta
new file mode 100644
index 00000000..5b915e06
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/GuildJockerMatchView.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 97f903093522b744795869050ac95fea
+timeCreated: 1611404189
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/GuildMiniReportHandler.cs b/Client/Assets/Scripts/XMainClient/UI/GuildMiniReportHandler.cs
new file mode 100644
index 00000000..6a793bd1
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/GuildMiniReportHandler.cs
@@ -0,0 +1,373 @@
+using System;
+using System.Collections.Generic;
+using KKSG;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class GuildMiniReportHandler : DlgHandlerBase
+ {
+ protected override string FileName
+ {
+ get
+ {
+ return "Battle/BattleMiniReportDlg";
+ }
+ }
+
+ public readonly int max_count = 40;
+
+ public static List<ReportMsg> msgs = new List<ReportMsg>();
+
+ public string lastCahceMsg = string.Empty;
+
+ public ILoopScrollView loopScrool;
+
+ public IXUIButton m_btnReport;
+
+ public IXUIButton m_btnHelp;
+
+ public GameObject m_objpreparing;
+
+ public IXUITweenTool m_tween;
+
+ private Vector3 infoDis;
+
+ public XUIPool m_ShowIntoPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ public IXUILabel[] m_Killer = new IXUILabel[XBattleCaptainPVPDocument.GAME_INFO];
+
+ public IXUILabel[] m_Dead = new IXUILabel[XBattleCaptainPVPDocument.GAME_INFO];
+
+ public IXUISprite[] m_InfoIcon = new IXUISprite[XBattleCaptainPVPDocument.GAME_INFO];
+
+ public Transform m_objMyinfo;
+
+ public IXUILabel m_lblRank;
+
+ public IXUILabel m_lblAttack;
+
+ public IXUILabel m_lblAccupy;
+
+ private XGuildTerritoryDocument _doc;
+
+ private bool isopen = true;
+
+ private Vector3 NoVisible = new Vector3(2000f, 0f, 0f);
+
+ protected override void Init()
+ {
+ base.Init();
+ this._doc = XDocuments.GetSpecificDocument<XGuildTerritoryDocument>(XGuildTerritoryDocument.uuID);
+ this.m_btnReport = (base.transform.Find("Bg/Report").GetComponent("XUIButton") as IXUIButton);
+ this.m_btnHelp = (base.transform.Find("Bg/help").GetComponent("XUIButton") as IXUIButton);
+ this.loopScrool = (base.transform.Find("Bg/items").GetComponent("LoopScrollView") as ILoopScrollView);
+ this.m_objpreparing = base.transform.Find("Bg/Preparing").gameObject;
+ this.m_tween = (base.transform.Find("Bg/BeginFrame").GetComponent("XUIPlayTween") as IXUITweenTool);
+ Transform transform = base.transform.Find("Bg/buffs/InfoTpl");
+ this.m_ShowIntoPool.SetupPool(transform.parent.gameObject, transform.gameObject, 4u, false);
+ this.m_ShowIntoPool.FakeReturnAll();
+ int num = 0;
+ while ((long)num < (long)((ulong)XGuildTerritoryDocument.GAME_INFO))
+ {
+ GameObject gameObject = this.m_ShowIntoPool.FetchGameObject(false);
+ IXUISprite ixuisprite = gameObject.GetComponent("XUISprite") as IXUISprite;
+ this.infoDis = new Vector3(0f, (float)(-(float)ixuisprite.spriteHeight), 0f);
+ gameObject.transform.localPosition = this.infoDis * (float)num;
+ this.m_Killer[num] = (gameObject.transform.Find("killer").GetComponent("XUILabel") as IXUILabel);
+ this.m_Dead[num] = (gameObject.transform.Find("dead").GetComponent("XUILabel") as IXUILabel);
+ this.m_InfoIcon[num] = (gameObject.transform.Find("icon").GetComponent("XUISprite") as IXUISprite);
+ num++;
+ }
+ this.m_ShowIntoPool.ActualReturnAll(false);
+ this.m_objMyinfo = base.transform.Find("Bg/MyInfo");
+ this.m_lblRank = (this.m_objMyinfo.Find("Label_rank").GetComponent("XUILabel") as IXUILabel);
+ this.m_lblAttack = (this.m_objMyinfo.Find("Label_attack").GetComponent("XUILabel") as IXUILabel);
+ this.m_lblAccupy = (this.m_objMyinfo.Find("Label_accupy").GetComponent("XUILabel") as IXUILabel);
+ this.m_objpreparing.SetActive(false);
+ this.m_tween.gameObject.SetActive(false);
+ this.m_objMyinfo.gameObject.SetActive(XSingleton<XScene>.singleton.SceneType == SceneType.SCENE_CASTLE_FIGHT);
+ GameObject tpl = this.loopScrool.GetTpl();
+ bool flag = tpl != null && tpl.GetComponent<GuildMiniReportItem>() == null;
+ if (flag)
+ {
+ tpl.AddComponent<GuildMiniReportItem>();
+ }
+ bool flag2 = XSingleton<XScene>.singleton.SceneType != SceneType.SCENE_CASTLE_WAIT && XSingleton<XScene>.singleton.SceneType != SceneType.SCENE_CASTLE_FIGHT;
+ if (flag2)
+ {
+ GuildMiniReportHandler.msgs.Clear();
+ }
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ this.m_btnReport.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnReportClick));
+ this.m_btnHelp.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnHelpClick));
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ this._doc.qInfo.Clear();
+ this.ShowList();
+ this.ShowBuffs();
+ }
+
+ public void Push(GCFG2CSynType type, GCFG2CSynPara para)
+ {
+ string text = string.Empty;
+ switch (type)
+ {
+ case GCFG2CSynType.GCF_G2C_SYN_MUL_POINT:
+ {
+ TerritoryBattle.RowData byID = XGuildTerritoryDocument.mGuildTerritoryList.GetByID(para.territoryid);
+ GuildTransfer.RowData bySceneID = this.GetBySceneID(para.mapid);
+ bool flag = byID == null;
+ if (flag)
+ {
+ XSingleton<XDebug>.singleton.AddErrorLog("territory id: " + para.territoryid, null, null, null, null, null);
+ }
+ else
+ {
+ bool flag2 = byID.territorylevel == 1u;
+ if (flag2)
+ {
+ text = XStringDefineProxy.GetString("TERRITORY_TYPE3", new object[]
+ {
+ bySceneID.name,
+ byID.territoryname,
+ para.mulpoint
+ });
+ }
+ else
+ {
+ bool flag3 = byID.territorylevel == 2u;
+ if (flag3)
+ {
+ text = XStringDefineProxy.GetString("TERRITORY_TYPE4", new object[]
+ {
+ bySceneID.name,
+ byID.territoryname,
+ para.mulpoint
+ });
+ }
+ else
+ {
+ bool flag4 = byID.territorylevel == 3u;
+ if (flag4)
+ {
+ text = XStringDefineProxy.GetString("TERRITORY_TYPE5", new object[]
+ {
+ bySceneID.name,
+ byID.territoryname,
+ para.mulpoint
+ });
+ }
+ }
+ }
+ }
+ break;
+ }
+ case GCFG2CSynType.GCF_G2C_SYN_OCCUPY:
+ {
+ int num = XFastEnumIntEqualityComparer<GCFJvDianType>.ToInt(para.jvdian.type);
+ XEntity entity = XSingleton<XEntityMgr>.singleton.GetEntity(para.roleid);
+ bool flag5 = entity != null;
+ if (flag5)
+ {
+ string @string = XStringDefineProxy.GetString("Territory_judian" + num);
+ text = XStringDefineProxy.GetString("TERRITORY_TYPE2", new object[]
+ {
+ entity.Name,
+ para.jvdian.guildname,
+ @string
+ });
+ }
+ else
+ {
+ XSingleton<XDebug>.singleton.AddWarningLog("entity is null, roleid: ", para.roleid.ToString(), null, null, null, null);
+ }
+ break;
+ }
+ }
+ bool flag6 = !string.IsNullOrEmpty(text);
+ if (flag6)
+ {
+ this.Push(text);
+ }
+ }
+
+ public GuildTransfer.RowData GetBySceneID(uint sceneid)
+ {
+ for (int i = 0; i < XGuildTerritoryDocument.mGuildTransfer.Table.Length; i++)
+ {
+ bool flag = XGuildTerritoryDocument.mGuildTransfer.Table[i].sceneid == sceneid;
+ if (flag)
+ {
+ return XGuildTerritoryDocument.mGuildTransfer.Table[i];
+ }
+ }
+ return null;
+ }
+
+ public void Push(string content)
+ {
+ ReportMsg reportMsg = new ReportMsg();
+ reportMsg.LoopID = XSingleton<XCommon>.singleton.XHash(content + DateTime.Now.ToString());
+ reportMsg.content = content;
+ GuildMiniReportHandler.msgs.Add(reportMsg);
+ this.ShowList();
+ }
+
+ public void ShowPrepare(bool show)
+ {
+ bool flag = this.m_objpreparing != null;
+ if (flag)
+ {
+ this.m_objpreparing.SetActive(show);
+ }
+ bool flag2 = this.m_objMyinfo != null;
+ if (flag2)
+ {
+ this.m_objMyinfo.gameObject.SetActive(!show);
+ }
+ }
+
+ public void ShowBegin(bool open)
+ {
+ bool flag = this.m_tween != null;
+ if (flag)
+ {
+ bool flag2 = open && open != this.isopen;
+ if (flag2)
+ {
+ this.m_tween.gameObject.SetActive(true);
+ this.m_tween.ResetTween(true);
+ this.m_tween.PlayTween(true, -1f);
+ }
+ this.isopen = open;
+ }
+ }
+
+ public void ShowList()
+ {
+ bool flag = base.IsVisible();
+ if (flag)
+ {
+ List<LoopItemData> list = new List<LoopItemData>();
+ string b = string.Empty;
+ for (int i = 0; i < GuildMiniReportHandler.msgs.Count; i++)
+ {
+ ReportMsg reportMsg = new ReportMsg();
+ reportMsg.LoopID = XSingleton<XCommon>.singleton.XHash(GuildMiniReportHandler.msgs[i].content + i);
+ reportMsg.content = GuildMiniReportHandler.msgs[i].content;
+ list.Add(reportMsg);
+ b = reportMsg.content;
+ }
+ bool flag2 = string.IsNullOrEmpty(this.lastCahceMsg) || this.lastCahceMsg != b;
+ if (flag2)
+ {
+ this.loopScrool.Init(list, new DelegateHandler(this.RefreshItem), null, (GuildMiniReportHandler.msgs.Count < 4) ? 0 : 1, false);
+ }
+ bool flag3 = GuildMiniReportHandler.msgs != null && GuildMiniReportHandler.msgs.Count > 0;
+ if (flag3)
+ {
+ int index = GuildMiniReportHandler.msgs.Count - 1;
+ this.lastCahceMsg = GuildMiniReportHandler.msgs[index].content;
+ }
+ }
+ }
+
+ public void ShowBuffs()
+ {
+ bool flag = this._doc == null;
+ if (flag)
+ {
+ this._doc = XDocuments.GetSpecificDocument<XGuildTerritoryDocument>(XGuildTerritoryDocument.uuID);
+ }
+ this.m_ShowIntoPool.FakeReturnAll();
+ int num = 0;
+ while ((long)num < (long)((ulong)XGuildTerritoryDocument.GAME_INFO))
+ {
+ GameObject gameObject = this.m_ShowIntoPool.FetchGameObject(false);
+ bool flag2 = this._doc.qInfo.Count <= num;
+ if (flag2)
+ {
+ gameObject.transform.localPosition = this.NoVisible;
+ }
+ else
+ {
+ gameObject.transform.localPosition = this.infoDis * (float)num;
+ int num2 = 0;
+ foreach (XBattleCaptainPVPDocument.KillInfo killInfo in this._doc.qInfo)
+ {
+ bool flag3 = num2 == num;
+ if (flag3)
+ {
+ this.m_Killer[num].SetText(killInfo.KillName);
+ this.m_Dead[num].SetText(killInfo.DeadName);
+ this.m_InfoIcon[num].SetSprite("hall_zljt_0");
+ break;
+ }
+ num2++;
+ }
+ }
+ num++;
+ }
+ this.m_ShowIntoPool.ActualReturnAll(false);
+ }
+
+ private void RefreshItem(ILoopItemObject item, LoopItemData data)
+ {
+ ReportMsg reportMsg = data as ReportMsg;
+ bool flag = reportMsg != null;
+ if (flag)
+ {
+ GameObject obj = item.GetObj();
+ bool flag2 = obj != null;
+ if (flag2)
+ {
+ GuildMiniReportItem component = obj.GetComponent<GuildMiniReportItem>();
+ bool flag3 = component != null;
+ if (flag3)
+ {
+ component.Refresh(reportMsg.content);
+ }
+ }
+ }
+ else
+ {
+ XSingleton<XDebug>.singleton.AddErrorLog("GuildMiniReportItem info is null", null, null, null, null, null);
+ }
+ }
+
+ private bool OnReportClick(IXUIButton btn)
+ {
+ DlgBase<GuildTerritoryReportDlg, GuildTerritoryBahaviour>.singleton.SetVisible(true, true);
+ return true;
+ }
+
+ private bool OnHelpClick(IXUIButton btn)
+ {
+ DlgBase<XCommonHelpTipView, XCommonHelpTipBehaviour>.singleton.ShowHelp(XSysDefine.XSys_GuildTerritory);
+ return true;
+ }
+
+ public void RefreshMyInfo(GCFRoleBrief info)
+ {
+ bool flag = info != null;
+ if (flag)
+ {
+ uint rank = info.rank;
+ this.m_lblRank.SetText((rank == 0u) ? "-" : rank.ToString());
+ this.m_lblAttack.SetText(info.killcount.ToString());
+ this.m_lblAccupy.SetText(info.occupycount.ToString());
+ }
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/GuildMiniReportHandler.cs.meta b/Client/Assets/Scripts/XMainClient/UI/GuildMiniReportHandler.cs.meta
new file mode 100644
index 00000000..e444c556
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/GuildMiniReportHandler.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: bc97ef1c054759b418fd07b0f7cbd9a5
+timeCreated: 1611404448
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/GuildMiniReportItem.cs b/Client/Assets/Scripts/XMainClient/UI/GuildMiniReportItem.cs
new file mode 100644
index 00000000..c1f987da
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/GuildMiniReportItem.cs
@@ -0,0 +1,29 @@
+using System;
+using UILib;
+using UnityEngine;
+
+namespace XMainClient.UI
+{
+ public class GuildMiniReportItem : MonoBehaviour
+ {
+ public IXUILabel m_lblContent;
+
+ public IXUISprite m_sprRoot;
+
+ private void Awake()
+ {
+ this.m_sprRoot = (base.GetComponent("XUISprite") as IXUISprite);
+ this.m_lblContent = (base.transform.Find("content").GetComponent("XUILabel") as IXUILabel);
+ }
+
+ public void Refresh(string content)
+ {
+ bool flag = this.m_lblContent != null && !string.IsNullOrEmpty(content);
+ if (flag)
+ {
+ this.m_lblContent.SetText(content);
+ this.m_sprRoot.spriteHeight = 10 + this.m_lblContent.spriteHeight;
+ }
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/GuildMiniReportItem.cs.meta b/Client/Assets/Scripts/XMainClient/UI/GuildMiniReportItem.cs.meta
new file mode 100644
index 00000000..e5d47d47
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/GuildMiniReportItem.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 4ad5f85db53d91444ad6042587ed3bcf
+timeCreated: 1611403666
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/GuildPositionBehaviour.cs b/Client/Assets/Scripts/XMainClient/UI/GuildPositionBehaviour.cs
new file mode 100644
index 00000000..5301052d
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/GuildPositionBehaviour.cs
@@ -0,0 +1,25 @@
+using System;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class GuildPositionBehaviour : DlgBehaviourBase
+ {
+ public XUIPool m_MenuPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ public IXUISprite m_backSprite;
+
+ public IXUISprite m_memuSprite;
+
+ private void Awake()
+ {
+ Transform transform = base.transform.Find("Memu/template");
+ this.m_MenuPool.SetupPool(transform.parent.gameObject, transform.gameObject, 5u, true);
+ this.m_backSprite = (base.transform.Find("Memu/back").GetComponent("XUISprite") as IXUISprite);
+ this.m_memuSprite = (base.transform.Find("Memu").GetComponent("XUISprite") as IXUISprite);
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/GuildPositionBehaviour.cs.meta b/Client/Assets/Scripts/XMainClient/UI/GuildPositionBehaviour.cs.meta
new file mode 100644
index 00000000..68725840
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/GuildPositionBehaviour.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: cd5519b0f6c2aef499fe4519c5950d5b
+timeCreated: 1611404554
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/GuildPositionMenu.cs b/Client/Assets/Scripts/XMainClient/UI/GuildPositionMenu.cs
new file mode 100644
index 00000000..44201fa2
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/GuildPositionMenu.cs
@@ -0,0 +1,128 @@
+using System;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class GuildPositionMenu : DlgBase<GuildPositionMenu, GuildPositionBehaviour>
+ {
+ public override string fileName
+ {
+ get
+ {
+ return "Guild/GuildPositionMenu";
+ }
+ }
+
+ private GuildPosition _SelectPosition;
+
+ private ulong _MemberID;
+
+ private XGuildMemberDocument _memberDoc;
+
+ public void ShowMenu(ulong MemberID)
+ {
+ this._MemberID = MemberID;
+ bool flag = base.IsVisible();
+ if (flag)
+ {
+ this.RefreshView();
+ }
+ else
+ {
+ this.SetVisibleWithAnimation(true, null);
+ }
+ }
+
+ protected override void Init()
+ {
+ base.Init();
+ this._memberDoc = XDocuments.GetSpecificDocument<XGuildMemberDocument>(XGuildMemberDocument.uuID);
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ this.RefreshView();
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ base.uiBehaviour.m_memuSprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.ClickClose));
+ }
+
+ private void RefreshView()
+ {
+ base.uiBehaviour.m_MenuPool.ReturnAll(false);
+ float x = base.uiBehaviour.m_MenuPool.TplPos.x;
+ float num = base.uiBehaviour.m_MenuPool.TplPos.y;
+ float z = base.uiBehaviour.m_MenuPool.TplPos.z;
+ int num2 = XFastEnumIntEqualityComparer<GuildPosition>.ToInt(GuildPosition.GPOS_COUNT);
+ bool flag = num2 > 2;
+ if (flag)
+ {
+ num += (float)((num2 - 2) * base.uiBehaviour.m_MenuPool.TplHeight / 2);
+ }
+ int spriteHeight = base.uiBehaviour.m_MenuPool.TplHeight * (num2 - 1);
+ int num3 = XFastEnumIntEqualityComparer<GuildPosition>.ToInt(this._memberDoc.GetMemberPosition(this._MemberID));
+ for (int i = 0; i < num2; i++)
+ {
+ bool flag2 = num3 == i;
+ if (!flag2)
+ {
+ GameObject gameObject = base.uiBehaviour.m_MenuPool.FetchGameObject(false);
+ bool flag3 = i < num3;
+ if (flag3)
+ {
+ gameObject.transform.localPosition = new Vector3(x, num - (float)(base.uiBehaviour.m_MenuPool.TplHeight * i), z);
+ }
+ else
+ {
+ gameObject.transform.localPosition = new Vector3(x, num - (float)(base.uiBehaviour.m_MenuPool.TplHeight * (i - 1)), z);
+ }
+ IXUIButton ixuibutton = gameObject.transform.Find("button").GetComponent("XUIButton") as IXUIButton;
+ IXUILabel ixuilabel = gameObject.transform.Find("button/name").GetComponent("XUILabel") as IXUILabel;
+ ixuibutton.ID = (ulong)((long)i);
+ ixuibutton.RegisterClickEventHandler(new ButtonClickEventHandler(this.ClickHandler));
+ ixuilabel.SetText(XGuildDocument.GuildPP.GetPositionName((GuildPosition)i, false));
+ }
+ }
+ base.uiBehaviour.m_memuSprite.spriteHeight = spriteHeight;
+ }
+
+ private bool ClickHandler(IXUIButton btn)
+ {
+ DlgBase<GuildPositionMenu, GuildPositionBehaviour>.singleton.SetVisibleWithAnimation(false, null);
+ DlgBase<XOtherPlayerInfoView, XOtherPlayerInfoBehaviour>.singleton.SetVisibleWithAnimation(false, null);
+ this._SelectPosition = (GuildPosition)btn.ID;
+ bool flag = this._SelectPosition == GuildPosition.GPOS_LEADER;
+ if (flag)
+ {
+ XSingleton<UiUtility>.singleton.ShowModalDialog(XStringDefineProxy.GetString("GUILD_CHANGELEADER_CONFIRM", new object[]
+ {
+ XGuildDocument.GuildPP.GetPositionName(GuildPosition.GPOS_LEADER, false)
+ }), XStringDefineProxy.GetString("COMMON_OK"), XStringDefineProxy.GetString("COMMON_CANCEL"), new ButtonClickEventHandler(this.OnSelectPositionHandler));
+ }
+ else
+ {
+ this.OnSelectPositionHandler(null);
+ }
+ return true;
+ }
+
+ private bool OnSelectPositionHandler(IXUIButton btn)
+ {
+ XSingleton<UiUtility>.singleton.CloseModalDlg();
+ this._memberDoc.ReqChangePosition(this._MemberID, this._SelectPosition);
+ return true;
+ }
+
+ private void ClickClose(IXUISprite sprite)
+ {
+ this.SetVisibleWithAnimation(false, null);
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/GuildPositionMenu.cs.meta b/Client/Assets/Scripts/XMainClient/UI/GuildPositionMenu.cs.meta
new file mode 100644
index 00000000..55d755c2
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/GuildPositionMenu.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 89c26ea92e2324d46aca5d4004ecaa95
+timeCreated: 1611404089
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/GuildQualifierBehavior.cs b/Client/Assets/Scripts/XMainClient/UI/GuildQualifierBehavior.cs
new file mode 100644
index 00000000..04fed371
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/GuildQualifierBehavior.cs
@@ -0,0 +1,72 @@
+using System;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class GuildQualifierBehavior : DlgBehaviourBase
+ {
+ public IXUIButton m_Close;
+
+ public IXUIButton m_Go;
+
+ public IXUIScrollView m_RankScrollView;
+
+ public IXUIWrapContent m_RankWrapContent;
+
+ public IXUIScrollView m_FrameScrollView;
+
+ public IXUIWrapContent m_FrameWrapContent;
+
+ public IXUILabel m_Time;
+
+ public IXUILabel m_Rule;
+
+ public IXUILabel m_Content;
+
+ public IXUILabel m_EmptyRank;
+
+ public Transform m_SelfRankWrapItem;
+
+ public IXUICheckBox m_SelectAll;
+
+ public IXUICheckBox m_SelectSelf;
+
+ public Transform m_RewardList;
+
+ public XUIPool m_FrameItemPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ public XUIPool m_RewardPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ public Transform m_unJoin;
+
+ public Transform m_Rank;
+
+ public Transform m_Frame;
+
+ private void Awake()
+ {
+ this.m_Close = (base.transform.Find("Bg/Close").GetComponent("XUIButton") as IXUIButton);
+ this.m_Go = (base.transform.Find("Bg/Frame/Go").GetComponent("XUIButton") as IXUIButton);
+ this.m_RankScrollView = (base.transform.Find("Bg/Rank/ScrollView").GetComponent("XUIScrollView") as IXUIScrollView);
+ this.m_RankWrapContent = (base.transform.Find("Bg/Rank/ScrollView/WrapContent").GetComponent("XUIWrapContent") as IXUIWrapContent);
+ this.m_FrameScrollView = (base.transform.Find("Bg/Frame/ScrollView").GetComponent("XUIScrollView") as IXUIScrollView);
+ this.m_FrameWrapContent = (base.transform.Find("Bg/Frame/ScrollView/WrapContent").GetComponent("XUIWrapContent") as IXUIWrapContent);
+ this.m_SelfRankWrapItem = base.transform.Find("Bg/Rank/RankTpl");
+ this.m_EmptyRank = (base.transform.Find("Bg/Rank/EmptyRank").GetComponent("XUILabel") as IXUILabel);
+ this.m_SelectAll = (base.transform.Find("Bg/Rank/Select/All").GetComponent("XUICheckBox") as IXUICheckBox);
+ this.m_SelectSelf = (base.transform.Find("Bg/Rank/Select/Self").GetComponent("XUICheckBox") as IXUICheckBox);
+ this.m_Time = (base.transform.Find("Bg/Frame/Title/Time").GetComponent("XUILabel") as IXUILabel);
+ this.m_Rule = (base.transform.Find("Bg/Frame/Title/Rule").GetComponent("XUILabel") as IXUILabel);
+ this.m_Content = (base.transform.Find("Bg/Frame/content").GetComponent("XUILabel") as IXUILabel);
+ this.m_unJoin = base.transform.Find("Bg/EmptyRank");
+ this.m_Rank = base.transform.Find("Bg/Rank");
+ this.m_Frame = base.transform.Find("Bg/Frame");
+ this.m_RewardList = base.transform.Find("Bg/Frame/Reward");
+ Transform transform = base.transform.Find("Bg/Frame/Reward/item");
+ this.m_RewardPool.SetupPool(transform.parent.parent.gameObject, transform.gameObject, 3u, true);
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/GuildQualifierBehavior.cs.meta b/Client/Assets/Scripts/XMainClient/UI/GuildQualifierBehavior.cs.meta
new file mode 100644
index 00000000..1eadc651
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/GuildQualifierBehavior.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 3c711b5fbe325924698ece826d5ae6b9
+timeCreated: 1611403601
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/GuildQualifierDlg.cs b/Client/Assets/Scripts/XMainClient/UI/GuildQualifierDlg.cs
new file mode 100644
index 00000000..41c04476
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/GuildQualifierDlg.cs
@@ -0,0 +1,362 @@
+using System;
+using System.Collections.Generic;
+using KKSG;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class GuildQualifierDlg : DlgBase<GuildQualifierDlg, GuildQualifierBehavior>
+ {
+ public override string fileName
+ {
+ get
+ {
+ return "Guild/GuildQualifierDlg";
+ }
+ }
+
+ public override int layer
+ {
+ get
+ {
+ return 1;
+ }
+ }
+
+ public override int group
+ {
+ get
+ {
+ return 1;
+ }
+ }
+
+ public override bool pushstack
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override bool hideMainMenu
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override bool autoload
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ private XGuildQualifierDocument _Doc;
+
+ private Vector3 m_ItemScale = new Vector3(0.5f, 0.5f, 0.5f);
+
+ public override void OnUpdate()
+ {
+ base.OnUpdate();
+ this.RespositionActive();
+ }
+
+ protected override void Init()
+ {
+ base.Init();
+ this._Doc = XDocuments.GetSpecificDocument<XGuildQualifierDocument>(XGuildQualifierDocument.uuID);
+ this._Doc.QualifierView = this;
+ base.uiBehaviour.m_FrameWrapContent.RegisterItemUpdateEventHandler(new WrapItemUpdateEventHandler(this.OnFrameWrapUpdate));
+ base.uiBehaviour.m_RankWrapContent.RegisterItemUpdateEventHandler(new WrapItemUpdateEventHandler(this.OnRankWrapUpdate));
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ base.uiBehaviour.m_Close.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnClickClose));
+ base.uiBehaviour.m_Go.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnGoHandler));
+ base.uiBehaviour.m_SelectAll.RegisterOnCheckEventHandler(new CheckBoxOnCheckEventHandler(this.OnSelectAllChecked));
+ base.uiBehaviour.m_SelectSelf.RegisterOnCheckEventHandler(new CheckBoxOnCheckEventHandler(this.OnSelectSelfChecked));
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ this.InitAwardList();
+ this._Doc.Select = GuildQualifierSelect.ALL;
+ base.uiBehaviour.m_SelectAll.bChecked = true;
+ this._Doc.SendSelectQualifierList();
+ this.RefreshData();
+ }
+
+ public override void StackRefresh()
+ {
+ base.StackRefresh();
+ this._Doc.SendSelectQualifierList();
+ }
+
+ public void RefreshData()
+ {
+ this.m_uiBehaviour.m_Frame.gameObject.SetActive(this._Doc.ServerActive);
+ this.m_uiBehaviour.m_Rank.gameObject.SetActive(this._Doc.ServerActive);
+ this.m_uiBehaviour.m_unJoin.gameObject.SetActive(!this._Doc.ServerActive);
+ bool serverActive = this._Doc.ServerActive;
+ if (serverActive)
+ {
+ this.RepositionRank();
+ this.RepositionFrame();
+ this.RespositionActive();
+ this.RepositionLastRewardCount();
+ }
+ }
+
+ private void RespositionActive()
+ {
+ bool flag = this._Doc.ActiveTime > 0.0;
+ if (flag)
+ {
+ base.uiBehaviour.m_Time.SetText(XSingleton<XCommon>.singleton.StringCombine(XStringDefineProxy.GetString("GUILD_QUALIFIER_TIME"), "(", XStringDefineProxy.GetString("GUILD_QUALIFER_STYLE1", new object[]
+ {
+ XSingleton<UiUtility>.singleton.TimeDuarationFormatString((int)this._Doc.ActiveTime, 5)
+ }), ")"));
+ }
+ else
+ {
+ base.uiBehaviour.m_Time.SetText(XSingleton<XCommon>.singleton.StringCombine(XStringDefineProxy.GetString("GUILD_QUALIFIER_TIME"), XStringDefineProxy.GetString("GUILD_QUALIFER_STYLE2")));
+ }
+ }
+
+ private void RepositionLastRewardCount()
+ {
+ uint lastRewardCount = this._Doc.GetLastRewardCount();
+ base.uiBehaviour.m_Content.SetText(XStringDefineProxy.GetString("GUILD_QUALIFIER_CONTENT", new object[]
+ {
+ lastRewardCount
+ }));
+ base.uiBehaviour.m_Rule.SetText(XStringDefineProxy.GetString("GUILD_QUALIFIER_RULE"));
+ }
+
+ private void RepositionRank()
+ {
+ List<GuildLadderRoleRank> guildRoleRankList = this._Doc.GuildRoleRankList;
+ bool flag = guildRoleRankList == null || guildRoleRankList.Count == 0;
+ if (flag)
+ {
+ base.uiBehaviour.m_SelfRankWrapItem.gameObject.SetActive(false);
+ base.uiBehaviour.m_RankWrapContent.SetContentCount(0, false);
+ base.uiBehaviour.m_EmptyRank.Alpha = 1f;
+ }
+ else
+ {
+ base.uiBehaviour.m_RankWrapContent.SetContentCount(guildRoleRankList.Count, false);
+ base.uiBehaviour.m_RankScrollView.ResetPosition();
+ base.uiBehaviour.m_EmptyRank.Alpha = (float)((guildRoleRankList.Count > 0) ? 0 : 1);
+ int num = -1;
+ int i = 0;
+ int count = guildRoleRankList.Count;
+ while (i < count)
+ {
+ bool flag2 = guildRoleRankList[i].roleid == XSingleton<XAttributeMgr>.singleton.XPlayerData.RoleID;
+ if (flag2)
+ {
+ num = i;
+ break;
+ }
+ i++;
+ }
+ bool flag3 = num >= 0;
+ if (flag3)
+ {
+ base.uiBehaviour.m_SelfRankWrapItem.gameObject.SetActive(true);
+ this.OnRankWrapUpdate(base.uiBehaviour.m_SelfRankWrapItem, num);
+ }
+ else
+ {
+ base.uiBehaviour.m_SelfRankWrapItem.gameObject.SetActive(false);
+ }
+ }
+ }
+
+ private void RepositionFrame()
+ {
+ List<GuildLadderRank> guildRankList = this._Doc.GuildRankList;
+ bool flag = guildRankList == null || guildRankList.Count == 0;
+ if (flag)
+ {
+ base.uiBehaviour.m_FrameWrapContent.SetContentCount(0, false);
+ }
+ else
+ {
+ base.uiBehaviour.m_FrameWrapContent.SetContentCount(guildRankList.Count, false);
+ }
+ base.uiBehaviour.m_RankScrollView.ResetPosition();
+ }
+
+ private void OnRankWrapUpdate(Transform t, int index)
+ {
+ bool flag = t == null;
+ if (!flag)
+ {
+ List<GuildLadderRoleRank> guildRoleRankList = this._Doc.GuildRoleRankList;
+ bool flag2 = index >= guildRoleRankList.Count || index < 0;
+ if (!flag2)
+ {
+ GuildLadderRoleRank guildLadderRoleRank = guildRoleRankList[index];
+ IXUILabelSymbol ixuilabelSymbol = t.Find("Name").GetComponent("XUILabelSymbol") as IXUILabelSymbol;
+ IXUILabel ixuilabel = t.Find("Rank3").GetComponent("XUILabel") as IXUILabel;
+ IXUISprite ixuisprite = t.Find("Rank").GetComponent("XUISprite") as IXUISprite;
+ IXUILabel ixuilabel2 = t.Find("Win").GetComponent("XUILabel") as IXUILabel;
+ uint index2;
+ bool flag3 = this._Doc.TryGetGuildIcon(guildLadderRoleRank.guildid, out index2);
+ string inputText;
+ if (flag3)
+ {
+ inputText = XSingleton<XCommon>.singleton.StringCombine(XLabelSymbolHelper.FormatImage("common/Billboard", XGuildDocument.GetPortraitName((int)index2)), guildLadderRoleRank.name);
+ }
+ else
+ {
+ inputText = guildLadderRoleRank.name;
+ }
+ ixuilabelSymbol.InputText = inputText;
+ bool flag4 = index + 1 > 3;
+ ixuilabel.Alpha = (float)(flag4 ? 1 : 0);
+ ixuilabel.SetText((index + 1).ToString());
+ ixuisprite.SetAlpha((float)(flag4 ? 0 : 1));
+ ixuisprite.SetSprite(XSingleton<XCommon>.singleton.StringCombine("N", (index + 1).ToString()));
+ ixuilabel2.SetText(guildLadderRoleRank.wintimes.ToString());
+ }
+ }
+ }
+
+ private void OnFrameWrapUpdate(Transform t, int index)
+ {
+ bool flag = t == null;
+ if (!flag)
+ {
+ List<GuildLadderRank> guildRankList = this._Doc.GuildRankList;
+ bool flag2 = index >= guildRankList.Count || index < 0;
+ if (!flag2)
+ {
+ GuildLadderRank guildLadderRank = guildRankList[index];
+ IXUILabelSymbol ixuilabelSymbol = t.Find("Name").GetComponent("XUILabelSymbol") as IXUILabelSymbol;
+ IXUILabel ixuilabel = t.Find("Rank3").GetComponent("XUILabel") as IXUILabel;
+ IXUISprite ixuisprite = t.Find("Rank").GetComponent("XUISprite") as IXUISprite;
+ IXUILabel ixuilabel2 = t.Find("Win").GetComponent("XUILabel") as IXUILabel;
+ string s = XLabelSymbolHelper.FormatImage("common/Billboard", XGuildDocument.GetPortraitName((int)guildLadderRank.icon));
+ ixuilabelSymbol.InputText = XSingleton<XCommon>.singleton.StringCombine(s, guildLadderRank.guildname);
+ bool flag3 = index + 1 > 3;
+ ixuilabel.Alpha = (float)(flag3 ? 1 : 0);
+ ixuisprite.SetAlpha((float)(flag3 ? 0 : 1));
+ ixuilabel2.SetText(XStringDefineProxy.GetString("GUILD_QUALIFER_WINNER", new object[]
+ {
+ guildLadderRank.wintimes
+ }));
+ ixuisprite.SetSprite(XSingleton<XCommon>.singleton.StringCombine("N", (index + 1).ToString()));
+ Transform transform = t.Find("AwardList");
+ GuildPkRankReward.RowData rowData;
+ bool flag4 = XGuildQualifierDocument.TryGetRankReward(index + 1, out rowData);
+ if (flag4)
+ {
+ transform.gameObject.SetActive(true);
+ SeqListRef<uint> reward = rowData.reward;
+ for (int i = 0; i < 4; i++)
+ {
+ GameObject gameObject = transform.Find(XSingleton<XCommon>.singleton.StringCombine("item", i.ToString())).gameObject;
+ bool flag5 = i < reward.Count;
+ if (flag5)
+ {
+ gameObject.SetActive(true);
+ IXUISprite ixuisprite2 = gameObject.transform.Find("Icon").GetComponent("XUISprite") as IXUISprite;
+ IXUISprite ixuisprite3 = gameObject.transform.Find("Quality").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite2.ID = (ulong)reward[i, 0];
+ XSingleton<XItemDrawerMgr>.singleton.normalItemDrawer.DrawItem(gameObject, (int)reward[i, 0], (int)reward[i, 1], false);
+ ixuisprite2.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(XSingleton<UiUtility>.singleton.OnItemClick));
+ }
+ else
+ {
+ gameObject.SetActive(false);
+ }
+ }
+ }
+ else
+ {
+ transform.gameObject.SetActive(false);
+ }
+ }
+ }
+ }
+
+ private void InitAwardList()
+ {
+ SeqList<int> sequenceList = XSingleton<XGlobalConfig>.singleton.GetSequenceList("GuildLadderReward", true);
+ base.uiBehaviour.m_RewardPool.ReturnAll(false);
+ int i = 0;
+ int count = (int)sequenceList.Count;
+ while (i < count)
+ {
+ GameObject gameObject = base.uiBehaviour.m_RewardPool.FetchGameObject(false);
+ gameObject.transform.parent = base.uiBehaviour.m_RewardList;
+ gameObject.transform.localPosition = new Vector3((float)(i * 100), 0f, 0f);
+ gameObject.transform.localScale = Vector3.one;
+ XSingleton<XItemDrawerMgr>.singleton.normalItemDrawer.DrawItem(gameObject, sequenceList[i, 0], sequenceList[i, 1], false);
+ IXUISprite ixuisprite = gameObject.transform.Find("Icon").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.ID = (ulong)((long)sequenceList[i, 0]);
+ ixuisprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(XSingleton<UiUtility>.singleton.OnItemClick));
+ i++;
+ }
+ }
+
+ private bool OnSelectSelfChecked(IXUICheckBox checkBox)
+ {
+ bool flag = !checkBox.bChecked;
+ bool result;
+ if (flag)
+ {
+ result = false;
+ }
+ else
+ {
+ this._Doc.Select = GuildQualifierSelect.SELF;
+ this.RepositionRank();
+ result = false;
+ }
+ return result;
+ }
+
+ private bool OnSelectAllChecked(IXUICheckBox checkBox)
+ {
+ bool flag = !checkBox.bChecked;
+ bool result;
+ if (flag)
+ {
+ result = false;
+ }
+ else
+ {
+ this._Doc.Select = GuildQualifierSelect.ALL;
+ this.RepositionRank();
+ result = false;
+ }
+ return result;
+ }
+
+ private bool OnClickClose(IXUIButton btn)
+ {
+ this.SetVisibleWithAnimation(false, null);
+ return true;
+ }
+
+ private bool OnGoHandler(IXUIButton btn)
+ {
+ XSingleton<XGameSysMgr>.singleton.OpenSystem(XSysDefine.XSys_Qualifying, 0UL);
+ return false;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/GuildQualifierDlg.cs.meta b/Client/Assets/Scripts/XMainClient/UI/GuildQualifierDlg.cs.meta
new file mode 100644
index 00000000..bf5a33aa
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/GuildQualifierDlg.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 9132b5d86d56d93469b34b67c3c498ab
+timeCreated: 1611404142
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/GuildQualifierHandler.cs b/Client/Assets/Scripts/XMainClient/UI/GuildQualifierHandler.cs
new file mode 100644
index 00000000..45aebc84
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/GuildQualifierHandler.cs
@@ -0,0 +1,128 @@
+using System;
+using KKSG;
+using UILib;
+using UnityEngine;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class GuildQualifierHandler : DlgHandlerBase
+ {
+ protected override string FileName
+ {
+ get
+ {
+ return "Guild/GuildQualifierRankFrame";
+ }
+ }
+
+ private IXUIWrapContent m_qualifierContent;
+
+ private IXUIScrollView m_qualifierScrollView;
+
+ private IXUILabel m_timeLabel;
+
+ private XGuildQualifierDocument _Doc;
+
+ private uint refreshTime = 0u;
+
+ protected override void Init()
+ {
+ base.Init();
+ this._Doc = XDocuments.GetSpecificDocument<XGuildQualifierDocument>(XGuildQualifierDocument.uuID);
+ this.m_qualifierContent = (base.transform.Find("ScrollView/Rank").GetComponent("XUIWrapContent") as IXUIWrapContent);
+ this.m_qualifierScrollView = (base.transform.Find("ScrollView").GetComponent("XUIScrollView") as IXUIScrollView);
+ this.m_timeLabel = (base.transform.Find("Time").GetComponent("XUILabel") as IXUILabel);
+ this.m_qualifierContent.RegisterItemUpdateEventHandler(new WrapItemUpdateEventHandler(this.GuildQualifierWrapUpdate));
+ }
+
+ protected override void OnHide()
+ {
+ base.OnHide();
+ XSingleton<XTimerMgr>.singleton.KillTimer(this.refreshTime);
+ }
+
+ public override void OnUnload()
+ {
+ XSingleton<XTimerMgr>.singleton.KillTimer(this.refreshTime);
+ base.OnUnload();
+ }
+
+ public override void OnUpdate()
+ {
+ base.OnUpdate();
+ this.CheckActive();
+ }
+
+ public override void RefreshData()
+ {
+ base.RefreshData();
+ bool flag = this.refreshTime > 0u;
+ if (flag)
+ {
+ XSingleton<XTimerMgr>.singleton.KillTimer(this.refreshTime);
+ }
+ this.CheckActive();
+ this.refreshTime = XSingleton<XTimerMgr>.singleton.SetTimer((float)XSingleton<XGlobalConfig>.singleton.GetInt("GuildLadderRefreshTime"), new XTimerMgr.ElapsedEventHandler(this.UpdateTimeFrame), null);
+ bool flag2 = this._Doc.GuildRankList == null;
+ if (flag2)
+ {
+ this.m_qualifierContent.SetContentCount(0, false);
+ }
+ else
+ {
+ this.m_qualifierContent.SetContentCount(this._Doc.GuildRankList.Count, false);
+ }
+ }
+
+ private void CheckActive()
+ {
+ bool flag = this._Doc.ActiveTime > 0.0;
+ if (flag)
+ {
+ this.m_timeLabel.SetText(XStringDefineProxy.GetString("GUILD_QUALIFER_STYLE1", new object[]
+ {
+ XSingleton<UiUtility>.singleton.TimeDuarationFormatString((int)this._Doc.ActiveTime, 5)
+ }));
+ }
+ else
+ {
+ this.m_timeLabel.SetText(XStringDefineProxy.GetString("GUILD_QUALIFER_STYLE2"));
+ }
+ }
+
+ private void UpdateTimeFrame(object o)
+ {
+ XSingleton<XTimerMgr>.singleton.KillTimer(this.refreshTime);
+ this._Doc.SendGuildLadderRankInfo();
+ }
+
+ private void GuildQualifierWrapUpdate(Transform t, int index)
+ {
+ bool flag = index >= this._Doc.GuildRankList.Count;
+ if (!flag)
+ {
+ GuildLadderRank guildLadderRank = this._Doc.GuildRankList[index];
+ IXUISprite ixuisprite = t.Find("IndexSprite").GetComponent("XUISprite") as IXUISprite;
+ IXUILabel ixuilabel = t.Find("Index").GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel2 = t.Find("Winner").GetComponent("XUILabel") as IXUILabel;
+ IXUILabelSymbol ixuilabelSymbol = t.Find("Name").GetComponent("XUILabelSymbol") as IXUILabelSymbol;
+ string s = XLabelSymbolHelper.FormatImage("common/Billboard", XGuildDocument.GetPortraitName((int)guildLadderRank.icon));
+ ixuilabel2.SetText(guildLadderRank.wintimes.ToString());
+ ixuilabelSymbol.InputText = XSingleton<XCommon>.singleton.StringCombine(s, guildLadderRank.guildname);
+ bool flag2 = index < 3;
+ if (flag2)
+ {
+ ixuilabel.Alpha = 0f;
+ ixuisprite.SetAlpha(1f);
+ ixuisprite.SetSprite(XSingleton<XCommon>.singleton.StringCombine("N", (index + 1).ToString()));
+ }
+ else
+ {
+ ixuilabel.Alpha = 1f;
+ ixuisprite.SetAlpha(0f);
+ }
+ }
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/GuildQualifierHandler.cs.meta b/Client/Assets/Scripts/XMainClient/UI/GuildQualifierHandler.cs.meta
new file mode 100644
index 00000000..9e6f26bc
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/GuildQualifierHandler.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 2aa770c5f33020f449325b1da024cfdc
+timeCreated: 1611403496
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/GuildSalaryDescHandler.cs b/Client/Assets/Scripts/XMainClient/UI/GuildSalaryDescHandler.cs
new file mode 100644
index 00000000..f3f7021a
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/GuildSalaryDescHandler.cs
@@ -0,0 +1,133 @@
+using System;
+using System.Collections.Generic;
+using UILib;
+using UnityEngine;
+using XMainClient.Utility;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class GuildSalaryDescHandler : DlgHandlerBase
+ {
+ protected override string FileName
+ {
+ get
+ {
+ return "Guild/GuildSalaryDescDlg";
+ }
+ }
+
+ private IXUIButton m_Close;
+
+ private XUITabControl m_tabControl = new XUITabControl();
+
+ private IXUIProgress m_Progress;
+
+ private IXUILabel m_ScoreValue;
+
+ private IXUILabel m_ScoreMark;
+
+ private IXUILabel m_ProgressLabel;
+
+ private IXUIScrollView m_ScrollView;
+
+ private IXUIWrapContent m_WrapContent;
+
+ private XGuildSalaryDocument _Doc;
+
+ private List<GuildSalaryDesc.RowData> m_salaryDesc;
+
+ protected override void Init()
+ {
+ base.Init();
+ this._Doc = XDocuments.GetSpecificDocument<XGuildSalaryDocument>(XGuildSalaryDocument.uuID);
+ this.m_Close = (base.transform.Find("Bg/Close").GetComponent("XUIButton") as IXUIButton);
+ Transform tabTpl = base.transform.Find("Bg/Tabs/TabTpl");
+ this.m_tabControl.SetTabTpl(tabTpl);
+ this.m_Progress = (base.transform.Find("Bg/Progress").GetComponent("XUIProgress") as IXUIProgress);
+ this.m_WrapContent = (base.transform.Find("Bg/ScrollView/WrapContent").GetComponent("XUIWrapContent") as IXUIWrapContent);
+ this.m_ScrollView = (base.transform.Find("Bg/ScrollView").GetComponent("XUIScrollView") as IXUIScrollView);
+ this.m_ScoreMark = (base.transform.Find("Bg/Progress/FriendTxt").GetComponent("XUILabel") as IXUILabel);
+ this.m_ProgressLabel = (base.transform.Find("Bg/Progress/Num").GetComponent("XUILabel") as IXUILabel);
+ this.m_ScoreValue = (base.transform.Find("Bg/P/Num").GetComponent("XUILabel") as IXUILabel);
+ this.m_WrapContent.RegisterItemUpdateEventHandler(new WrapItemUpdateEventHandler(this.OnWrapUpdateContent));
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ this.m_Close.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnClickClose));
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ this.InitTabInfos();
+ this.SetBaseInfo();
+ }
+
+ private void InitTabInfos()
+ {
+ List<int> tabIndexs = XGuildSalaryDocument.TabIndexs;
+ List<string> tabNames = XGuildSalaryDocument.TabNames;
+ this.m_tabControl.SetupTabs(tabIndexs, tabNames, new XUITabControl.UITabControlCallback(this.OnSelectTable), true, 1f, this._Doc.SelectTabs, true);
+ }
+
+ private void OnSelectTable(ulong id)
+ {
+ int num = (int)id;
+ this._Doc.SelectTabs = num;
+ this.SetBaseInfo();
+ bool flag = XGuildSalaryDocument.GuildSalaryDescDic.TryGetValue(num, out this.m_salaryDesc);
+ if (flag)
+ {
+ this.m_WrapContent.SetContentCount(this.m_salaryDesc.Count, false);
+ }
+ else
+ {
+ this.m_WrapContent.SetContentCount(0, false);
+ }
+ this.m_ScrollView.ResetPosition();
+ }
+
+ private bool OnClickClose(IXUIButton btn)
+ {
+ base.SetVisible(false);
+ return true;
+ }
+
+ private void OnWrapUpdateContent(Transform t, int index)
+ {
+ bool flag = this.m_salaryDesc == null || index >= this.m_salaryDesc.Count;
+ if (!flag)
+ {
+ IXUILabel ixuilabel = t.Find("Content").GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel2 = t.Find("Go/Go").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel2.RegisterLabelClickEventHandler(new LabelClickEventHandler(this.OnClickGoHandler));
+ GuildSalaryDesc.RowData rowData = this.m_salaryDesc[index];
+ ixuilabel.SetText(rowData.Desc);
+ ixuilabel2.SetText(rowData.GoLabel);
+ ixuilabel2.ID = (ulong)((long)rowData.Go);
+ ixuilabel2.SetVisible(rowData.Go > 0);
+ }
+ }
+
+ private void OnClickGoHandler(IXUILabel label)
+ {
+ bool flag = label.ID > 0UL;
+ if (flag)
+ {
+ XSingleton<XGameSysMgr>.singleton.OpenSystem((int)label.ID);
+ }
+ }
+
+ private void SetBaseInfo()
+ {
+ XGuildSalaryInfo value = this._Doc.GetValue(this._Doc.SelectTabs);
+ this.m_ScoreValue.SetText(value.Score.ToString());
+ this.m_ScoreMark.SetText(XGuildSalaryDocument.GetGradeName((int)value.Grade));
+ this.m_Progress.value = value.Percent;
+ this.m_ProgressLabel.SetText(string.Format("{0}/{1}", value.Value, value.TotalScore));
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/GuildSalaryDescHandler.cs.meta b/Client/Assets/Scripts/XMainClient/UI/GuildSalaryDescHandler.cs.meta
new file mode 100644
index 00000000..c82702d0
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/GuildSalaryDescHandler.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 059651832fd569443a1907ec5918ca03
+timeCreated: 1611402963
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/GuildSalayBehavior.cs b/Client/Assets/Scripts/XMainClient/UI/GuildSalayBehavior.cs
new file mode 100644
index 00000000..8c952d8d
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/GuildSalayBehavior.cs
@@ -0,0 +1,103 @@
+using System;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class GuildSalayBehavior : DlgBehaviourBase
+ {
+ public Transform m_Root;
+
+ public Transform m_Right;
+
+ public Transform m_Empty;
+
+ public IXUIButton m_Close;
+
+ public IXUILabel m_thisWeekScore;
+
+ public IXUITexture m_thisWeekGrade;
+
+ public GuildScoreInfo m_BottomInfo = new GuildScoreInfo();
+
+ public GuildScoreInfo m_LeftInfo = new GuildScoreInfo();
+
+ public GuildScoreInfo m_UpInfo = new GuildScoreInfo();
+
+ public GuildScoreInfo m_RightInfo = new GuildScoreInfo();
+
+ public IXRadarMap m_radarMap;
+
+ public IXUILabel m_LastWeekScore;
+
+ public IXUITexture m_LastWeekGrade;
+
+ public IXUILabel m_LastScoreLabel;
+
+ public IXUILabel m_GuildLevel;
+
+ public IXUILabel m_GuildPosition;
+
+ public IXUILabel m_TitleLabel;
+
+ public IXUIScrollView m_RewardScrollView;
+
+ public IXUIWrapContent m_WrapContent;
+
+ public IXUIButton m_GetButton;
+
+ public IXUILabel m_GetLabel;
+
+ public IXUILabel m_CanNot;
+
+ public IXUILabel m_ShowNextReward;
+
+ public Transform m_DropView;
+
+ public IXUIScrollView m_DropScrollView;
+
+ public IXUIWrapContent m_DropWrapContent;
+
+ public IXUISprite m_DropClose;
+
+ public IXUILabel[] topPlayers = new IXUILabel[5];
+
+ private void Awake()
+ {
+ this.m_Root = base.transform.Find("Bg");
+ this.m_Right = base.transform.Find("Bg/frame/Right");
+ this.m_Empty = base.transform.Find("Bg/frame/Empty");
+ this.m_Close = (base.transform.Find("Bg/Close").GetComponent("XUIButton") as IXUIButton);
+ this.m_thisWeekGrade = (base.transform.Find("Bg/frame/Left/Score/Grade").GetComponent("XUITexture") as IXUITexture);
+ this.m_thisWeekScore = (base.transform.Find("Bg/frame/Left/Score/ScoreValue").GetComponent("XUILabel") as IXUILabel);
+ this.m_BottomInfo.Init(base.transform.Find("Bg/frame/Left/Bottom"), 0);
+ this.m_LeftInfo.Init(base.transform.Find("Bg/frame/Left/Left"), 1);
+ this.m_UpInfo.Init(base.transform.Find("Bg/frame/Left/Up"), 2);
+ this.m_RightInfo.Init(base.transform.Find("Bg/frame/Left/Right"), 3);
+ this.m_radarMap = (base.transform.Find("Bg/frame/Left/RadarMap/RadarMap").GetComponent("XRadarMap") as IXRadarMap);
+ this.m_WrapContent = (base.transform.Find("Bg/frame/Right/CanGet/ScrollView/Reward").GetComponent("XUIWrapContent") as IXUIWrapContent);
+ this.m_RewardScrollView = (base.transform.Find("Bg/frame/Right/CanGet/ScrollView").GetComponent("XUIScrollView") as IXUIScrollView);
+ this.m_LastWeekGrade = (base.transform.Find("Bg/frame/Right/Score/Grade").GetComponent("XUITexture") as IXUITexture);
+ this.m_LastWeekScore = (base.transform.Find("Bg/frame/Right/Score/ScoreValue").GetComponent("XUILabel") as IXUILabel);
+ this.m_LastScoreLabel = (base.transform.Find("Bg/frame/Right/Score/Last").GetComponent("XUILabel") as IXUILabel);
+ this.m_TitleLabel = (base.transform.Find("Bg/frame/Right/Score/Title").GetComponent("XUILabel") as IXUILabel);
+ this.m_GuildLevel = (base.transform.Find("Bg/frame/Right/Level/Value").GetComponent("XUILabel") as IXUILabel);
+ this.m_GuildPosition = (base.transform.Find("Bg/frame/Right/CanGet/Position/Value").GetComponent("XUILabel") as IXUILabel);
+ this.m_GetButton = (base.transform.Find("Bg/frame/Right/CanGet/Get").GetComponent("XUIButton") as IXUIButton);
+ this.m_GetLabel = (base.transform.Find("Bg/frame/Right/CanGet/Get/Label").GetComponent("XUILabel") as IXUILabel);
+ this.m_CanNot = (base.transform.Find("Bg/frame/Right/CanNot").GetComponent("XUILabel") as IXUILabel);
+ this.m_ShowNextReward = (base.transform.Find("Bg/frame/Right/Score/t").GetComponent("XUILabel") as IXUILabel);
+ this.m_DropView = base.transform.Find("Bg/BoxFrame");
+ this.m_DropScrollView = (this.m_DropView.Find("ScrollView").GetComponent("XUIScrollView") as IXUIScrollView);
+ this.m_DropWrapContent = (this.m_DropView.Find("ScrollView/DropFrame").GetComponent("XUIWrapContent") as IXUIWrapContent);
+ this.m_DropClose = (this.m_DropView.Find("Close").GetComponent("XUISprite") as IXUISprite);
+ for (int i = 0; i < this.topPlayers.Length; i++)
+ {
+ this.topPlayers[i] = (base.transform.Find(XSingleton<XCommon>.singleton.StringCombine("Bg/frame/Right/p5/player", i.ToString())).GetComponent("XUILabel") as IXUILabel);
+ this.topPlayers[i].SetText("");
+ }
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/GuildSalayBehavior.cs.meta b/Client/Assets/Scripts/XMainClient/UI/GuildSalayBehavior.cs.meta
new file mode 100644
index 00000000..c2df4df5
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/GuildSalayBehavior.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 02b3ebe048d96ee4684234089c4555b8
+timeCreated: 1611402957
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/GuildSalayDlg.cs b/Client/Assets/Scripts/XMainClient/UI/GuildSalayDlg.cs
new file mode 100644
index 00000000..e10f4f2f
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/GuildSalayDlg.cs
@@ -0,0 +1,349 @@
+using System;
+using System.Collections.Generic;
+using KKSG;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class GuildSalayDlg : DlgBase<GuildSalayDlg, GuildSalayBehavior>
+ {
+ public override string fileName
+ {
+ get
+ {
+ return "Guild/GuildSalaryDlg";
+ }
+ }
+
+ public override int layer
+ {
+ get
+ {
+ return 1;
+ }
+ }
+
+ public override int group
+ {
+ get
+ {
+ return 1;
+ }
+ }
+
+ public override bool pushstack
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override bool hideMainMenu
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override bool fullscreenui
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override bool autoload
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ private XGuildSalaryDocument _Doc;
+
+ private GuildSalaryDescHandler m_DescHandler;
+
+ private SeqListRef<uint> m_GuildSalayList;
+
+ private SeqListRef<uint> m_NextGuildSalayList;
+
+ protected override void Init()
+ {
+ base.Init();
+ this._Doc = XDocuments.GetSpecificDocument<XGuildSalaryDocument>(XGuildSalaryDocument.uuID);
+ base.uiBehaviour.m_WrapContent.RegisterItemUpdateEventHandler(new WrapItemUpdateEventHandler(this.OnRewardWrapUpdate));
+ base.uiBehaviour.m_DropWrapContent.RegisterItemUpdateEventHandler(new WrapItemUpdateEventHandler(this.OnNextRewardUpdate));
+ base.uiBehaviour.m_CanNot.SetText(XStringDefineProxy.GetString("GuildSalaryMessage"));
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ this._Doc.SendAskGuildWageInfo();
+ this.Refresh();
+ }
+
+ public void Refresh()
+ {
+ this.SetSalaryInfo();
+ this.RefreshTopPlayers();
+ bool flag = this._Doc.RewardState == WageRewardState.notreward;
+ if (flag)
+ {
+ this.SetLastWeekBaseInfo();
+ }
+ else
+ {
+ this.SetThisWeekInfo();
+ }
+ }
+
+ private void SetLastWeekBaseInfo()
+ {
+ base.uiBehaviour.m_GuildLevel.SetText(this._Doc.LastLevel.ToString());
+ base.uiBehaviour.m_TitleLabel.SetText(XStringDefineProxy.GetString("GUILD_SALAY_LASTWEEK"));
+ base.uiBehaviour.m_GuildPosition.SetText(XGuildDocument.GuildPP.GetPositionName(this._Doc.LastPosition, false));
+ bool flag = this._Doc.LastGrade < 1u;
+ if (flag)
+ {
+ base.uiBehaviour.m_LastWeekGrade.SetTexturePath("atlas/UI/GameSystem/Activity/pj_0");
+ }
+ else
+ {
+ base.uiBehaviour.m_LastWeekGrade.SetTexturePath(string.Format("atlas/UI/GameSystem/Activity/pj_{0}", this._Doc.LastGrade - 1u));
+ }
+ base.uiBehaviour.m_LastWeekScore.SetText(this._Doc.LastScore.ToString());
+ this.m_GuildSalayList = this._Doc.GetGuildSalayList(this._Doc.LastLevel, this._Doc.LastPosition, this._Doc.LastGrade);
+ base.uiBehaviour.m_WrapContent.SetContentCount((this.m_GuildSalayList.Count > 0) ? this.m_GuildSalayList.Count : 0, false);
+ base.uiBehaviour.m_RewardScrollView.ResetPosition();
+ this.SetNextRewardTemp(this._Doc.LastGrade, this._Doc.MulMaxScore);
+ base.uiBehaviour.m_GetButton.SetVisible(true);
+ }
+
+ private void SetThisWeekInfo()
+ {
+ XGuildDocument specificDocument = XDocuments.GetSpecificDocument<XGuildDocument>(XGuildDocument.uuID);
+ base.uiBehaviour.m_TitleLabel.SetText(XStringDefineProxy.GetString("GUILD_SALAY_THISWEEK"));
+ base.uiBehaviour.m_GuildLevel.SetText(specificDocument.BasicData.level.ToString());
+ base.uiBehaviour.m_GuildPosition.SetText(XGuildDocument.GuildPP.GetPositionName(specificDocument.Position, false));
+ bool flag = this._Doc.CurGrade < 1u;
+ if (flag)
+ {
+ base.uiBehaviour.m_LastWeekGrade.SetTexturePath("atlas/UI/GameSystem/Activity/pj_0");
+ }
+ else
+ {
+ base.uiBehaviour.m_LastWeekGrade.SetTexturePath(string.Format("atlas/UI/GameSystem/Activity/pj_{0}", this._Doc.CurGrade - 1u));
+ }
+ base.uiBehaviour.m_LastWeekScore.SetText(this._Doc.CurScore.ToString());
+ this.m_GuildSalayList = this._Doc.GetGuildSalayList(specificDocument.BasicData.level, specificDocument.Position, this._Doc.CurGrade);
+ this.SetNextRewardTemp(this._Doc.CurGrade, this._Doc.CurMulScore);
+ base.uiBehaviour.m_WrapContent.SetContentCount((this.m_GuildSalayList.Count > 0) ? this.m_GuildSalayList.Count : 0, false);
+ base.uiBehaviour.m_RewardScrollView.ResetPosition();
+ base.uiBehaviour.m_GetButton.SetVisible(false);
+ base.uiBehaviour.m_DropView.gameObject.SetActive(false);
+ }
+
+ private void SetSalaryInfo()
+ {
+ bool flag = this._Doc.CurGrade < 1u;
+ if (flag)
+ {
+ base.uiBehaviour.m_thisWeekGrade.SetTexturePath("atlas/UI/GameSystem/Activity/pj_0");
+ }
+ else
+ {
+ base.uiBehaviour.m_thisWeekGrade.SetTexturePath(string.Format("atlas/UI/GameSystem/Activity/pj_{0}", this._Doc.CurGrade - 1u));
+ }
+ base.uiBehaviour.m_thisWeekScore.SetText(this._Doc.CurScore.ToString());
+ base.uiBehaviour.m_BottomInfo.SetInfo(this._Doc.RoleNum.Score, this._Doc.RoleNum.Value);
+ base.uiBehaviour.m_radarMap.SetSite(0, this._Doc.RoleNum.Percent);
+ base.uiBehaviour.m_LeftInfo.SetInfo(this._Doc.Prestige.Score, this._Doc.Prestige.Value);
+ base.uiBehaviour.m_radarMap.SetSite(2, this._Doc.Prestige.Percent);
+ base.uiBehaviour.m_UpInfo.SetInfo(this._Doc.Activity.Score, this._Doc.Activity.Value);
+ base.uiBehaviour.m_radarMap.SetSite(3, this._Doc.Activity.Percent);
+ base.uiBehaviour.m_RightInfo.SetInfo(this._Doc.Exp.Score, this._Doc.Exp.Value);
+ base.uiBehaviour.m_radarMap.SetSite(1, this._Doc.Exp.Percent);
+ }
+
+ private void RefreshTopPlayers()
+ {
+ List<GuildActivityRole> topPlayers = this._Doc.TopPlayers;
+ int num = (topPlayers == null) ? 0 : topPlayers.Count;
+ int i = 0;
+ int num2 = base.uiBehaviour.topPlayers.Length;
+ while (i < num2)
+ {
+ bool flag = i < num;
+ if (flag)
+ {
+ base.uiBehaviour.topPlayers[i].SetVisible(true);
+ base.uiBehaviour.topPlayers[i].SetText(topPlayers[i].name);
+ IXUILabel ixuilabel = base.uiBehaviour.topPlayers[i].gameObject.transform.Find("t1").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel.SetText(topPlayers[i].score.ToString());
+ }
+ else
+ {
+ base.uiBehaviour.topPlayers[i].SetVisible(false);
+ }
+ i++;
+ }
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ base.uiBehaviour.m_Close.RegisterClickEventHandler(new ButtonClickEventHandler(this.ClickClose));
+ base.uiBehaviour.m_GetButton.RegisterClickEventHandler(new ButtonClickEventHandler(this.ClickGet));
+ base.uiBehaviour.m_BottomInfo.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnClickDescHandler));
+ base.uiBehaviour.m_UpInfo.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnClickDescHandler));
+ base.uiBehaviour.m_LeftInfo.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnClickDescHandler));
+ base.uiBehaviour.m_RightInfo.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnClickDescHandler));
+ base.uiBehaviour.m_DropClose.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnClickNextHandler));
+ base.uiBehaviour.m_ShowNextReward.RegisterLabelClickEventHandler(new LabelClickEventHandler(this.OnShowNextReward));
+ }
+
+ private void SetNextRewardTemp(uint grade, uint mul)
+ {
+ bool flag = grade > 1u && grade <= 5u;
+ base.uiBehaviour.m_ShowNextReward.SetVisible(flag);
+ base.uiBehaviour.m_LastScoreLabel.SetVisible(flag);
+ bool flag2 = flag;
+ if (flag2)
+ {
+ string nextGradeString = this.GetNextGradeString(grade);
+ base.uiBehaviour.m_ShowNextReward.SetText(XStringDefineProxy.GetString("GuildSalaryNextReward", new object[]
+ {
+ nextGradeString
+ }));
+ base.uiBehaviour.m_LastScoreLabel.SetText(XStringDefineProxy.GetString("GuildSalaryMulDesc", new object[]
+ {
+ nextGradeString,
+ mul
+ }));
+ }
+ }
+
+ private string GetNextGradeString(uint grade)
+ {
+ string result = "S";
+ switch (grade)
+ {
+ case 2u:
+ result = "S";
+ break;
+ case 3u:
+ result = "A";
+ break;
+ case 4u:
+ result = "B";
+ break;
+ case 5u:
+ result = "C";
+ break;
+ }
+ return result;
+ }
+
+ protected override void OnHide()
+ {
+ base.OnHide();
+ bool flag = this.m_DescHandler != null;
+ if (flag)
+ {
+ this.m_DescHandler.SetVisible(false);
+ }
+ }
+
+ protected override void OnUnload()
+ {
+ base.uiBehaviour.m_thisWeekGrade.SetTexturePath("");
+ base.uiBehaviour.m_LastWeekGrade.SetTexturePath("");
+ base.OnUnload();
+ }
+
+ protected override void OnLoad()
+ {
+ bool flag = this.m_DescHandler != null;
+ if (flag)
+ {
+ DlgHandlerBase.EnsureUnload<GuildSalaryDescHandler>(ref this.m_DescHandler);
+ }
+ base.OnLoad();
+ }
+
+ private bool OnClickDescHandler(IXUIButton sprite)
+ {
+ this._Doc.SelectTabs = (int)sprite.ID;
+ DlgHandlerBase.EnsureCreate<GuildSalaryDescHandler>(ref this.m_DescHandler, base.uiBehaviour.m_Root, true, null);
+ return true;
+ }
+
+ private bool ClickClose(IXUIButton btn)
+ {
+ this.SetVisibleWithAnimation(false, null);
+ return true;
+ }
+
+ private bool ClickGet(IXUIButton btn)
+ {
+ this._Doc.SendGuildWageReward();
+ return true;
+ }
+
+ private void OnRewardWrapUpdate(Transform t, int index)
+ {
+ bool flag = index >= this.m_GuildSalayList.Count;
+ if (!flag)
+ {
+ this.SetWrapContent(t, this.m_GuildSalayList[index, 0], this.m_GuildSalayList[index, 1]);
+ }
+ }
+
+ private void OnNextRewardUpdate(Transform t, int index)
+ {
+ bool flag = index >= this.m_NextGuildSalayList.Count;
+ if (!flag)
+ {
+ this.SetWrapContent(t, this.m_NextGuildSalayList[index, 0], this.m_NextGuildSalayList[index, 1]);
+ }
+ }
+
+ private void OnClickNextHandler(IXUISprite sprite)
+ {
+ base.uiBehaviour.m_DropView.gameObject.SetActive(false);
+ }
+
+ private void OnShowNextReward(IXUILabel label)
+ {
+ base.uiBehaviour.m_DropView.gameObject.SetActive(true);
+ bool flag = this._Doc.RewardState == WageRewardState.notreward;
+ if (flag)
+ {
+ this.m_NextGuildSalayList = this._Doc.GetGuildSalayList(this._Doc.LastLevel, this._Doc.LastPosition, this._Doc.LastGrade - 1u);
+ }
+ else
+ {
+ XGuildDocument specificDocument = XDocuments.GetSpecificDocument<XGuildDocument>(XGuildDocument.uuID);
+ this.m_NextGuildSalayList = this._Doc.GetGuildSalayList(specificDocument.BasicData.level, specificDocument.Position, this._Doc.CurGrade - 1u);
+ }
+ base.uiBehaviour.m_DropWrapContent.SetContentCount((this.m_NextGuildSalayList.Count > 0) ? this.m_GuildSalayList.Count : 0, false);
+ base.uiBehaviour.m_DropScrollView.ResetPosition();
+ }
+
+ private void SetWrapContent(Transform t, uint seq0, uint seq1)
+ {
+ XSingleton<XItemDrawerMgr>.singleton.normalItemDrawer.DrawItem(t.gameObject, (int)seq0, (int)seq1, false);
+ IXUISprite ixuisprite = t.Find("Icon").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.ID = (ulong)seq0;
+ ixuisprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(XSingleton<UiUtility>.singleton.OnItemClick));
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/GuildSalayDlg.cs.meta b/Client/Assets/Scripts/XMainClient/UI/GuildSalayDlg.cs.meta
new file mode 100644
index 00000000..70c48b23
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/GuildSalayDlg.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 910cb7f218f50a847addfd1f0ec31d7e
+timeCreated: 1611404141
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/GuildScoreInfo.cs b/Client/Assets/Scripts/XMainClient/UI/GuildScoreInfo.cs
new file mode 100644
index 00000000..57ec0f12
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/GuildScoreInfo.cs
@@ -0,0 +1,53 @@
+using System;
+using UILib;
+using UnityEngine;
+
+namespace XMainClient.UI
+{
+ internal class GuildScoreInfo
+ {
+ public int Index
+ {
+ get
+ {
+ return this.m_index;
+ }
+ }
+
+ private Transform m_transform;
+
+ private IXUILabel m_Score;
+
+ private IXUILabel m_Value;
+
+ private IXUIButton m_Go;
+
+ private int m_index;
+
+ public void Init(Transform t, int index)
+ {
+ this.m_transform = t;
+ this.m_index = index;
+ this.m_Score = (t.Find("Score").GetComponent("XUILabel") as IXUILabel);
+ this.m_Value = (t.Find("Value").GetComponent("XUILabel") as IXUILabel);
+ this.m_Go = (t.Find("Go").GetComponent("XUIButton") as IXUIButton);
+ this.m_Go.ID = (ulong)((long)this.m_index);
+ }
+
+ public void SetInfo(uint score, uint value)
+ {
+ this.m_Score.SetText(score.ToString());
+ this.m_Value.SetText(value.ToString());
+ }
+
+ public void RegisterClickEventHandler(ButtonClickEventHandler click)
+ {
+ this.m_Go.RegisterClickEventHandler(click);
+ }
+
+ public void Destroy()
+ {
+ this.m_Go.RegisterClickEventHandler(null);
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/GuildScoreInfo.cs.meta b/Client/Assets/Scripts/XMainClient/UI/GuildScoreInfo.cs.meta
new file mode 100644
index 00000000..a7070bb0
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/GuildScoreInfo.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: cd676b6dd831bc04fad6c3054529ce00
+timeCreated: 1611404555
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/GuildTerritoryBahaviour.cs b/Client/Assets/Scripts/XMainClient/UI/GuildTerritoryBahaviour.cs
new file mode 100644
index 00000000..82fe2a20
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/GuildTerritoryBahaviour.cs
@@ -0,0 +1,31 @@
+using System;
+using UILib;
+using XMainClient.UI.UICommon;
+
+namespace XMainClient.UI
+{
+ internal class GuildTerritoryBahaviour : DlgBehaviourBase
+ {
+ public IXUIButton _close_btn;
+
+ public IXUILabel m_lblGuildName;
+
+ public IXUILabel m_lblTime;
+
+ public IXUISprite m_sprIcon;
+
+ public IXUIScrollView m_scroll;
+
+ public IXUIWrapContent m_wrap;
+
+ private void Awake()
+ {
+ this._close_btn = (base.transform.Find("Close").GetComponent("XUIButton") as IXUIButton);
+ this.m_lblGuildName = (base.transform.Find("Winner/Guild").GetComponent("XUILabel") as IXUILabel);
+ this.m_lblTime = (base.transform.Find("Time/Guild").GetComponent("XUILabel") as IXUILabel);
+ this.m_sprIcon = (base.transform.Find("Sprite").GetComponent("XUISprite") as IXUISprite);
+ this.m_wrap = (base.transform.Find("ScrollView/WrapContent").GetComponent("XUIWrapContent") as IXUIWrapContent);
+ this.m_scroll = (base.transform.Find("ScrollView").GetComponent("XUIScrollView") as IXUIScrollView);
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/GuildTerritoryBahaviour.cs.meta b/Client/Assets/Scripts/XMainClient/UI/GuildTerritoryBahaviour.cs.meta
new file mode 100644
index 00000000..e65f4f16
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/GuildTerritoryBahaviour.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 8a2d7f6b7c212534e9fd3043650c3ff3
+timeCreated: 1611404090
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/GuildTerritoryDeclareBehaviour.cs b/Client/Assets/Scripts/XMainClient/UI/GuildTerritoryDeclareBehaviour.cs
new file mode 100644
index 00000000..199a092a
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/GuildTerritoryDeclareBehaviour.cs
@@ -0,0 +1,49 @@
+using System;
+using UILib;
+using XMainClient.UI.UICommon;
+
+namespace XMainClient.UI
+{
+ internal class GuildTerritoryDeclareBehaviour : DlgBehaviourBase
+ {
+ public IXUIButton mClose;
+
+ public IXUISprite mSprite;
+
+ public IXUIScrollView mAllianceScrollView;
+
+ public IXUIWrapContent mAllianceWrapContent;
+
+ public IXUILabel mMessage;
+
+ public IXUILabel mTerritoryName;
+
+ public IXUILabel mTerritoryGuildName;
+
+ public IXUILabel mTerritoryCount;
+
+ public IXUILabel mTerritoryLevel;
+
+ public IXUIButton mTerritoryDeclare;
+
+ public IXUIButton mTerritoryJoin;
+
+ public IXUILabel mTerritoryMessage;
+
+ private void Awake()
+ {
+ this.mAllianceScrollView = (base.transform.Find("Alliance").GetComponent("XUIScrollView") as IXUIScrollView);
+ this.mAllianceWrapContent = (base.transform.Find("Alliance/WrapContent").GetComponent("XUIWrapContent") as IXUIWrapContent);
+ this.mSprite = (base.transform.Find("Sprite").GetComponent("XUISprite") as IXUISprite);
+ this.mClose = (base.transform.Find("Close").GetComponent("XUIButton") as IXUIButton);
+ this.mMessage = (base.transform.Find("Message").GetComponent("XUILabel") as IXUILabel);
+ this.mTerritoryName = (base.transform.Find("TerritoryName").GetComponent("XUILabel") as IXUILabel);
+ this.mTerritoryGuildName = (base.transform.Find("TerritoryGuildName").GetComponent("XUILabel") as IXUILabel);
+ this.mTerritoryLevel = (base.transform.Find("TerritoryLevel").GetComponent("XUILabel") as IXUILabel);
+ this.mTerritoryCount = (base.transform.Find("TerritoryCount").GetComponent("XUILabel") as IXUILabel);
+ this.mTerritoryDeclare = (base.transform.Find("Declare").GetComponent("XUIButton") as IXUIButton);
+ this.mTerritoryJoin = (base.transform.Find("Join").GetComponent("XUIButton") as IXUIButton);
+ this.mTerritoryMessage = (base.transform.Find("TerritoryMessage").GetComponent("XUILabel") as IXUILabel);
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/GuildTerritoryDeclareBehaviour.cs.meta b/Client/Assets/Scripts/XMainClient/UI/GuildTerritoryDeclareBehaviour.cs.meta
new file mode 100644
index 00000000..84b3386d
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/GuildTerritoryDeclareBehaviour.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 318d36caa53ee204b83702631f73162a
+timeCreated: 1611403546
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/GuildTerritoryDeclareDlg.cs b/Client/Assets/Scripts/XMainClient/UI/GuildTerritoryDeclareDlg.cs
new file mode 100644
index 00000000..223f3e70
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/GuildTerritoryDeclareDlg.cs
@@ -0,0 +1,379 @@
+using System;
+using KKSG;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class GuildTerritoryDeclareDlg : DlgBase<GuildTerritoryDeclareDlg, GuildTerritoryDeclareBehaviour>
+ {
+ public override string fileName
+ {
+ get
+ {
+ return "Guild/GuildTerritory/GuildTerritoryDeclareDlg";
+ }
+ }
+
+ private XGuildTerritoryDocument _Doc;
+
+ private XElapseTimer m_lastTime;
+
+ private bool mCountDown = false;
+
+ private ulong AllianceGuildID = 0UL;
+
+ protected override void Init()
+ {
+ base.Init();
+ this._Doc = XDocuments.GetSpecificDocument<XGuildTerritoryDocument>(XGuildTerritoryDocument.uuID);
+ base.uiBehaviour.mMessage.SetText(XStringDefineProxy.GetString("TB_DECLEAR_MESSAGE"));
+ base.uiBehaviour.mAllianceWrapContent.RegisterItemUpdateEventHandler(new WrapItemUpdateEventHandler(this.OnTerritoryUpdate));
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ base.uiBehaviour.mClose.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnCloseClick));
+ base.uiBehaviour.mTerritoryDeclare.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnTerritoryDeclareClick));
+ base.uiBehaviour.mTerritoryJoin.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnTerritoryJoinClick));
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ this.RefreshWhenShow();
+ }
+
+ protected override void OnUnload()
+ {
+ this.m_lastTime = null;
+ base.OnUnload();
+ }
+
+ protected override void OnHide()
+ {
+ base.uiBehaviour.mAllianceWrapContent.SetContentCount(0, false);
+ base.OnHide();
+ }
+
+ private bool OnTerritoryDeclareClick(IXUIButton btn)
+ {
+ CityData cityData;
+ bool flag = !this._Doc.TryGetCityData(this._Doc.CurrentTerritoryID, out cityData);
+ bool result;
+ if (flag)
+ {
+ result = false;
+ }
+ else
+ {
+ bool flag2 = cityData.type != GUILDTERRTYPE.ALLIANCE;
+ if (flag2)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString("ERR_TB_ENTRANCE_NO_PERMISSION"), "fece00");
+ result = false;
+ }
+ else
+ {
+ string territoryname = XGuildTerritoryDocument.mGuildTerritoryList.GetByID(this._Doc.CurrentTerritoryID).territoryname;
+ string[] andSeparateValue = XSingleton<XGlobalConfig>.singleton.GetAndSeparateValue("GuildTerritoryCost", XGlobalConfig.SequenceSeparator);
+ string arg = XLabelSymbolHelper.FormatCostWithIcon(int.Parse(andSeparateValue[1]), (ItemEnum)int.Parse(andSeparateValue[0]));
+ string format = XSingleton<UiUtility>.singleton.ReplaceReturn(XStringDefineProxy.GetString("TB_DECLEAR_COST"));
+ string label = string.Format(format, arg, territoryname);
+ string @string = XStringDefineProxy.GetString("COMMON_OK");
+ string string2 = XStringDefineProxy.GetString("COMMON_CANCEL");
+ XSingleton<UiUtility>.singleton.ShowModalDialog(label, @string, string2, new ButtonClickEventHandler(this.OnSureAllianceGuildTerr), 100);
+ result = true;
+ }
+ }
+ return result;
+ }
+
+ private bool OnSureAllianceGuildTerr(IXUIButton btn)
+ {
+ XSingleton<UiUtility>.singleton.CloseModalDlg();
+ this._Doc.SendAllianceGuildTerr(this._Doc.CurrentTerritoryID);
+ return true;
+ }
+
+ private bool OnTerritoryJoinClick(IXUIButton btn)
+ {
+ bool flag = this.m_lastTime != null && this.m_lastTime.LeftTime > 0f;
+ bool result;
+ if (flag)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString("TERRITORY_CDTIME", new object[]
+ {
+ (int)this.m_lastTime.LeftTime
+ }), "fece00");
+ result = false;
+ }
+ else
+ {
+ this._Doc.SendWaitScene(this._Doc.CurrentTerritoryID);
+ result = true;
+ }
+ return result;
+ }
+
+ private bool OnCloseClick(IXUIButton btn)
+ {
+ this.SetVisibleWithAnimation(false, null);
+ return true;
+ }
+
+ private void OnListUpdate(Transform t, int index)
+ {
+ GuildTerrChallInfo guildTerrChallInfo = this._Doc.GuildTerrChallList[index];
+ IXUILabel ixuilabel = t.Find("Index").GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel2 = t.Find("GuildName").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel.SetText((index + 1).ToString());
+ ixuilabel2.SetText(guildTerrChallInfo.guildname);
+ }
+
+ private void OnTerritoryUpdate(Transform t, int index)
+ {
+ XGuildDocument specificDocument = XDocuments.GetSpecificDocument<XGuildDocument>(XGuildDocument.uuID);
+ GuildTerritoryAllianceInfo guildTerritoryAllianceInfo = this._Doc.GuildTerrAllianceInfos[index];
+ IXUILabel ixuilabel = t.Find("Index").GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel2 = t.Find("GuildName").GetComponent("XUILabel") as IXUILabel;
+ IXUISprite ixuisprite = t.Find("Alliance").GetComponent("XUISprite") as IXUISprite;
+ IXUISprite ixuisprite2 = t.Find("Allianced").GetComponent("XUISprite") as IXUISprite;
+ ixuilabel.SetText((index + 1).ToString());
+ ixuilabel2.SetText(guildTerritoryAllianceInfo.GetAllinceString());
+ IXUIButton ixuibutton = t.Find("Get").GetComponent("XUIButton") as IXUIButton;
+ ixuibutton.ID = guildTerritoryAllianceInfo.GuildID;
+ CityData cityData;
+ bool flag = this._Doc.TryGetCityData(this._Doc.CurrentTerritoryID, out cityData);
+ if (flag)
+ {
+ ixuibutton.SetVisible(!guildTerritoryAllianceInfo.isAllicance && this._Doc.SelfAllianceID == 0UL && this._Doc.CurrentTerritoryID != this._Doc.SelfGuildTerritoryID && !guildTerritoryAllianceInfo.Contains(specificDocument.BasicData.uid) && specificDocument.BasicData.uid != guildTerritoryAllianceInfo.GuildID && this._Doc.CurrentTerritoryID == this._Doc.SelfTargetTerritoryID && cityData.guildid > 0UL);
+ ixuibutton.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnAllianceClick));
+ ixuisprite2.SetVisible(guildTerritoryAllianceInfo.isAllicance);
+ ixuisprite.SetVisible(!guildTerritoryAllianceInfo.isAllicance && this._Doc.SelfAllianceID == 0UL && guildTerritoryAllianceInfo.Contains(specificDocument.BasicData.uid));
+ }
+ else
+ {
+ ixuibutton.SetVisible(false);
+ ixuisprite.SetVisible(false);
+ ixuisprite2.SetVisible(false);
+ }
+ }
+
+ private bool OnAllianceClick(IXUIButton btn)
+ {
+ XSingleton<XDebug>.singleton.AddGreenLog("Alliance:", btn.ID.ToString(), null, null, null, null);
+ XGuildDocument specificDocument = XDocuments.GetSpecificDocument<XGuildDocument>(XGuildDocument.uuID);
+ bool flag = specificDocument.Position != GuildPosition.GPOS_LEADER && specificDocument.Position != GuildPosition.GPOS_VICELEADER;
+ bool result;
+ if (flag)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString("ERR_TB_ALLIANCE_NO_PERMISSON"), "fece00");
+ result = false;
+ }
+ else
+ {
+ bool flag2 = this._Doc.CurrentTerritoryID != this._Doc.SelfTargetTerritoryID;
+ if (flag2)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString("ERR_TB_ALLIANCE_NO_DECLEAR"), "fece00");
+ result = false;
+ }
+ else
+ {
+ CityData cityData;
+ bool flag3 = !this._Doc.TryGetCityData(this._Doc.CurrentTerritoryID, out cityData);
+ if (flag3)
+ {
+ result = false;
+ }
+ else
+ {
+ string text;
+ bool flag4 = !this._Doc.TryGetTerritoryGuildName(btn.ID, out text);
+ if (flag4)
+ {
+ result = false;
+ }
+ else
+ {
+ bool flag5 = cityData.guildid > 0UL;
+ if (flag5)
+ {
+ string territoryname = XGuildTerritoryDocument.mGuildTerritoryList.GetByID(this._Doc.CurrentTerritoryID).territoryname;
+ string @string = XStringDefineProxy.GetString("TB_ALLIANCE_SEND", new object[]
+ {
+ text,
+ territoryname
+ });
+ string string2 = XStringDefineProxy.GetString("COMMON_OK");
+ string string3 = XStringDefineProxy.GetString("COMMON_CANCEL");
+ this.AllianceGuildID = btn.ID;
+ XSingleton<UiUtility>.singleton.ShowModalDialog(@string, string2, string3, new ButtonClickEventHandler(this.TrySendTryAlliance), 100);
+ }
+ else
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString("ERR_TB_DECLEAR_NO_ALLIANCE"), "fece00");
+ }
+ result = true;
+ }
+ }
+ }
+ }
+ return result;
+ }
+
+ public override void OnUpdate()
+ {
+ base.OnUpdate();
+ bool flag = !this.mCountDown;
+ if (!flag)
+ {
+ bool flag2 = this.m_lastTime == null;
+ if (flag2)
+ {
+ this.mCountDown = false;
+ }
+ else
+ {
+ this.m_lastTime.Update();
+ bool flag3 = this.m_lastTime.LeftTime <= 0f;
+ if (flag3)
+ {
+ this.mCountDown = false;
+ this._Doc.RefreshGuildTerritoryInfo();
+ }
+ }
+ }
+ }
+
+ private bool TrySendTryAlliance(IXUIButton btn)
+ {
+ XSingleton<UiUtility>.singleton.CloseModalDlg();
+ bool flag = this.AllianceGuildID > 0UL;
+ if (flag)
+ {
+ this._Doc.SendTryAlliance(this.AllianceGuildID);
+ }
+ return false;
+ }
+
+ private bool CheckDeclare(CityData cityData)
+ {
+ return cityData.id != this._Doc.SelfTargetTerritoryID && cityData.type == GUILDTERRTYPE.ALLIANCE;
+ }
+
+ public void RefreshWhenShow()
+ {
+ XSingleton<UiUtility>.singleton.CloseModalDlg();
+ TerritoryBattle.RowData byID = XGuildTerritoryDocument.mGuildTerritoryList.GetByID(this._Doc.CurrentTerritoryID);
+ bool flag = byID == null;
+ if (flag)
+ {
+ base.uiBehaviour.mTerritoryName.SetText(string.Empty);
+ base.uiBehaviour.mTerritoryLevel.SetText(string.Empty);
+ base.uiBehaviour.mSprite.SetSprite(string.Empty);
+ base.uiBehaviour.mTerritoryCount.SetText("0");
+ base.uiBehaviour.mSprite.MakePixelPerfect();
+ }
+ else
+ {
+ base.uiBehaviour.mTerritoryName.SetText(byID.territoryname);
+ base.uiBehaviour.mTerritoryLevel.SetText(byID.territorylevelname);
+ base.uiBehaviour.mSprite.SetSprite(byID.territoryIcon);
+ base.uiBehaviour.mTerritoryCount.SetText(this._Doc.GuildTerrChallList.Count.ToString());
+ base.uiBehaviour.mSprite.MakePixelPerfect();
+ }
+ CityData cityData;
+ bool flag2 = this._Doc.TryGetCityData(this._Doc.CurrentTerritoryID, out cityData);
+ if (flag2)
+ {
+ bool flag3 = cityData.guildid > 0UL;
+ if (flag3)
+ {
+ base.uiBehaviour.mTerritoryGuildName.SetText(cityData.guildname);
+ }
+ else
+ {
+ base.uiBehaviour.mTerritoryGuildName.SetText(XStringDefineProxy.GetString("TERRITORY_EMPTY"));
+ }
+ bool flag4 = cityData.type == GUILDTERRTYPE.TERR_WARING || cityData.type == GUILDTERRTYPE.WAITING;
+ bool flag5 = this.CheckDeclare(cityData);
+ base.uiBehaviour.mTerritoryDeclare.SetVisible(flag5);
+ base.uiBehaviour.mTerritoryJoin.SetVisible(flag4);
+ int num = 0;
+ bool flag6 = !flag4 && (this._Doc.CurrentType == GUILDTERRTYPE.TERR_WARING || this._Doc.CurrentType == GUILDTERRTYPE.WAITING);
+ if (flag6)
+ {
+ int targetTerrioryType = (int)this._Doc.GetTargetTerrioryType(cityData.id);
+ int targetTerrioryType2 = (int)this._Doc.GetTargetTerrioryType(this._Doc.SelfGuildTerritoryID);
+ int num2 = targetTerrioryType - targetTerrioryType2;
+ bool flag7 = num2 == 1;
+ if (flag7)
+ {
+ base.uiBehaviour.mTerritoryMessage.SetText(XStringDefineProxy.GetString("ERR_TB_ALLIANCE_NO_DECLEAR"));
+ }
+ else
+ {
+ base.uiBehaviour.mTerritoryMessage.SetText(XStringDefineProxy.GetString("ERR_TB_ENTRANCE_NO_PERMISSION"));
+ }
+ }
+ else
+ {
+ bool flag8 = this._Doc.CurrentType == GUILDTERRTYPE.ALLIANCE && !flag5 && !this._Doc.TryTerritoryAlliance(cityData.id, out num) && num > 0;
+ if (flag8)
+ {
+ string @string = XStringDefineProxy.GetString(string.Format("ERR_TB_DECLEAR_LIMIT{0}", num));
+ base.uiBehaviour.mTerritoryMessage.SetText(@string);
+ }
+ else
+ {
+ base.uiBehaviour.mTerritoryMessage.SetText(string.Empty);
+ }
+ }
+ XSingleton<XDebug>.singleton.AddGreenLog(string.Format("{0} -- {1}", this._Doc.CurrentType, num), null, null, null, null, null);
+ bool flag9 = cityData.type == GUILDTERRTYPE.WAITING;
+ if (flag9)
+ {
+ bool flag10 = this.m_lastTime == null;
+ if (flag10)
+ {
+ this.m_lastTime = new XElapseTimer();
+ }
+ this.m_lastTime.LeftTime = this._Doc.EnterBattleTime;
+ this.mCountDown = true;
+ }
+ }
+ else
+ {
+ base.uiBehaviour.mTerritoryGuildName.SetText(XStringDefineProxy.GetString("TERRITORY_EMPTY"));
+ base.uiBehaviour.mTerritoryDeclare.SetVisible(false);
+ base.uiBehaviour.mTerritoryJoin.SetVisible(false);
+ base.uiBehaviour.mTerritoryMessage.SetText(string.Empty);
+ this.mCountDown = false;
+ }
+ this.RefreshAllianceContent();
+ }
+
+ private void RefreshAllianceContent()
+ {
+ bool flag = !base.uiBehaviour.mAllianceScrollView.IsVisible();
+ if (!flag)
+ {
+ bool flag2 = this._Doc.GuildTerrAllianceInfos == null;
+ if (flag2)
+ {
+ base.uiBehaviour.mAllianceWrapContent.SetContentCount(0, false);
+ }
+ else
+ {
+ base.uiBehaviour.mAllianceWrapContent.SetContentCount(this._Doc.GuildTerrAllianceInfos.Count, false);
+ }
+ base.uiBehaviour.mAllianceWrapContent.RefreshAllVisibleContents();
+ }
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/GuildTerritoryDeclareDlg.cs.meta b/Client/Assets/Scripts/XMainClient/UI/GuildTerritoryDeclareDlg.cs.meta
new file mode 100644
index 00000000..d1029f63
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/GuildTerritoryDeclareDlg.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 5cd99f1cc0364304da798c919d497e41
+timeCreated: 1611403803
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/GuildTerritoryDisplay.cs b/Client/Assets/Scripts/XMainClient/UI/GuildTerritoryDisplay.cs
new file mode 100644
index 00000000..1ca6222b
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/GuildTerritoryDisplay.cs
@@ -0,0 +1,106 @@
+using System;
+using KKSG;
+using UILib;
+using UnityEngine;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class GuildTerritoryDisplay
+ {
+ public Transform transform;
+
+ public IXUILabel mGuildName;
+
+ public IXUISprite mGuildIcon;
+
+ public Transform mOccupy;
+
+ public IXUISprite mTerritoryIcon;
+
+ public IXUILabel mTerritoryName;
+
+ public IXUISprite mTerritorySprite;
+
+ public IXUIButton mTerritoryButton;
+
+ public Transform mCrossGVGPrimary;
+
+ public uint mTerritoryID = 0u;
+
+ public void Init(uint territoryID, Transform t)
+ {
+ this.transform = t;
+ this.mTerritoryID = territoryID;
+ this.mOccupy = this.transform.Find("guildname/Occupy");
+ this.mGuildName = (this.transform.Find("guildname/Occupy/GuildName").GetComponent("XUILabel") as IXUILabel);
+ this.mGuildIcon = (this.transform.Find("guildname/Occupy/GuildIcon").GetComponent("XUISprite") as IXUISprite);
+ this.mTerritoryIcon = (this.transform.Find("guildname/Icon").GetComponent("XUISprite") as IXUISprite);
+ this.mTerritoryName = (this.transform.Find("guildname/Name").GetComponent("XUILabel") as IXUILabel);
+ this.mTerritorySprite = (this.transform.Find("Sprite").GetComponent("XUISprite") as IXUISprite);
+ this.mTerritoryButton = (this.transform.GetComponent("XUIButton") as IXUIButton);
+ this.mTerritoryButton.ID = (ulong)((long)int.Parse(this.transform.name));
+ this.mCrossGVGPrimary = this.transform.Find("CrossGVGPrimary");
+ this.mTerritoryButton.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnTerritoryClick));
+ this.Clear();
+ }
+
+ private void Clear()
+ {
+ this.mOccupy.gameObject.SetActive(false);
+ this.mCrossGVGPrimary.gameObject.SetActive(false);
+ }
+
+ public void Refresh()
+ {
+ XGuildTerritoryDocument specificDocument = XDocuments.GetSpecificDocument<XGuildTerritoryDocument>(XGuildTerritoryDocument.uuID);
+ XCrossGVGDocument specificDocument2 = XDocuments.GetSpecificDocument<XCrossGVGDocument>(XCrossGVGDocument.uuID);
+ CityData cityData;
+ bool flag = specificDocument.TryGetCityData(this.mTerritoryID, out cityData);
+ if (flag)
+ {
+ this.mOccupy.gameObject.SetActive(cityData.guildid > 0UL);
+ this.mGuildName.SetText(cityData.guildname);
+ XSingleton<XDebug>.singleton.AddGreenLog("cityData Singlon :", cityData.type.ToString(), null, null, null, null);
+ string sprite;
+ float alpha;
+ switch (cityData.type)
+ {
+ case GUILDTERRTYPE.ALLIANCE:
+ sprite = "Guild_icon05";
+ alpha = 1f;
+ goto IL_DD;
+ case GUILDTERRTYPE.TERR_WARING:
+ case GUILDTERRTYPE.WAITING:
+ sprite = "Guild_icon06";
+ alpha = 1f;
+ goto IL_DD;
+ }
+ sprite = string.Empty;
+ alpha = 0f;
+ IL_DD:
+ this.mTerritoryIcon.SetAlpha(alpha);
+ this.mTerritoryIcon.SetSprite(sprite);
+ this.mTerritoryIcon.MakePixelPerfect();
+ uint targetTerrioryType = specificDocument.GetTargetTerrioryType(this.mTerritoryID);
+ uint @int = (uint)XSingleton<XGlobalConfig>.singleton.GetInt("CrossGvgTerrLevel");
+ this.mCrossGVGPrimary.gameObject.SetActive(specificDocument2.TimeStep == CrossGvgTimeState.CGVG_Select && targetTerrioryType >= @int);
+ }
+ else
+ {
+ this.mOccupy.gameObject.SetActive(false);
+ this.mTerritoryIcon.SetAlpha(0f);
+ this.mCrossGVGPrimary.gameObject.SetActive(false);
+ }
+ }
+
+ private bool OnTerritoryClick(IXUIButton btn)
+ {
+ uint uid = (uint)btn.ID;
+ XGuildTerritoryDocument specificDocument = XDocuments.GetSpecificDocument<XGuildTerritoryDocument>(XGuildTerritoryDocument.uuID);
+ specificDocument.SendGuildTerritoryChallInfo(uid);
+ XSingleton<XDebug>.singleton.AddGreenLog("OnTerritoryClick:", uid.ToString(), null, null, null, null);
+ return true;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/GuildTerritoryDisplay.cs.meta b/Client/Assets/Scripts/XMainClient/UI/GuildTerritoryDisplay.cs.meta
new file mode 100644
index 00000000..70f6a936
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/GuildTerritoryDisplay.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 382c2c88ada599342a10fa2e55291573
+timeCreated: 1611403569
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/GuildTerritoryLeagueBehaviour.cs b/Client/Assets/Scripts/XMainClient/UI/GuildTerritoryLeagueBehaviour.cs
new file mode 100644
index 00000000..79869cfd
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/GuildTerritoryLeagueBehaviour.cs
@@ -0,0 +1,28 @@
+using System;
+using UILib;
+using XMainClient.UI.UICommon;
+
+namespace XMainClient.UI
+{
+ internal class GuildTerritoryLeagueBehaviour : DlgBehaviourBase
+ {
+ public IXUICheckBox mCheckBox;
+
+ public IXUIButton mClose;
+
+ public IXUIButton mClear;
+
+ public IXUIScrollView mScrollView;
+
+ public IXUIWrapContent mWrapContent;
+
+ private void Awake()
+ {
+ this.mCheckBox = (base.transform.Find("AllSelItem").GetComponent("XUICheckBox") as IXUICheckBox);
+ this.mClose = (base.transform.Find("Close").GetComponent("XUIButton") as IXUIButton);
+ this.mClear = (base.transform.Find("Clear").GetComponent("XUIButton") as IXUIButton);
+ this.mScrollView = (base.transform.Find("ScrollView").GetComponent("XUIScrollView") as IXUIScrollView);
+ this.mWrapContent = (base.transform.Find("ScrollView/WrapContent").GetComponent("XUIWrapContent") as IXUIWrapContent);
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/GuildTerritoryLeagueBehaviour.cs.meta b/Client/Assets/Scripts/XMainClient/UI/GuildTerritoryLeagueBehaviour.cs.meta
new file mode 100644
index 00000000..9cf4d48c
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/GuildTerritoryLeagueBehaviour.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: afacf21856d2be44bb95d30f3bda9215
+timeCreated: 1611404346
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/GuildTerritoryLeagueDlg.cs b/Client/Assets/Scripts/XMainClient/UI/GuildTerritoryLeagueDlg.cs
new file mode 100644
index 00000000..798ebe94
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/GuildTerritoryLeagueDlg.cs
@@ -0,0 +1,105 @@
+using System;
+using KKSG;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class GuildTerritoryLeagueDlg : DlgBase<GuildTerritoryLeagueDlg, GuildTerritoryLeagueBehaviour>
+ {
+ public override string fileName
+ {
+ get
+ {
+ return "Guild/GuildTerritory/GuildTerritoryLeagueDlg";
+ }
+ }
+
+ private XGuildTerritoryDocument _Doc;
+
+ protected override void Init()
+ {
+ base.Init();
+ this._Doc = XDocuments.GetSpecificDocument<XGuildTerritoryDocument>(XGuildTerritoryDocument.uuID);
+ base.uiBehaviour.mWrapContent.RegisterItemUpdateEventHandler(new WrapItemUpdateEventHandler(this.OnTerritoryLeagueHandler));
+ base.uiBehaviour.mCheckBox.SetVisible(false);
+ base.uiBehaviour.mCheckBox.bChecked = this._Doc.mShowMessage;
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ this._Doc.SendGuildTerrAllianceInfo();
+ }
+
+ public void RefreshData()
+ {
+ this.RefreshWhenShow();
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ base.uiBehaviour.mClose.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnCloseClick));
+ base.uiBehaviour.mClear.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnClearClick));
+ }
+
+ private bool OnCloseClick(IXUIButton btn)
+ {
+ this.SetVisibleWithAnimation(false, null);
+ return true;
+ }
+
+ private bool OnClearClick(IXUIButton btn)
+ {
+ this._Doc.SendClearGuildTerrAlliance();
+ this.SetVisibleWithAnimation(false, null);
+ return false;
+ }
+
+ private bool OnCheckBoxClick(IXUICheckBox checkBox)
+ {
+ this._Doc.mShowMessage = checkBox.bChecked;
+ return true;
+ }
+
+ private void OnTerritoryLeagueHandler(Transform t, int index)
+ {
+ IXUILabel ixuilabel = t.Find("GuildName").GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel2 = t.Find("MemberCount").GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel3 = t.Find("Time").GetComponent("XUILabel") as IXUILabel;
+ IXUIButton ixuibutton = t.Find("OK").GetComponent("XUIButton") as IXUIButton;
+ IXUILabel ixuilabel4 = t.Find("nb").GetComponent("XUILabel") as IXUILabel;
+ GuildTerrAllianceInfo guildTerrAllianceInfo = this._Doc.guildAllianceInfos[index];
+ ixuilabel.SetText(guildTerrAllianceInfo.guildname);
+ ixuilabel4.SetText(string.Format("Lv:{0}", guildTerrAllianceInfo.guildlvl));
+ ixuilabel2.SetText(guildTerrAllianceInfo.guildRoleNum.ToString());
+ ixuilabel3.SetText(XSingleton<UiUtility>.singleton.TimeAgoFormatString((int)guildTerrAllianceInfo.time));
+ ixuibutton.ID = guildTerrAllianceInfo.guildId;
+ ixuibutton.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnSureClick));
+ }
+
+ private bool OnSureClick(IXUIButton btn)
+ {
+ XGuildTerritoryDocument specificDocument = XDocuments.GetSpecificDocument<XGuildTerritoryDocument>(XGuildTerritoryDocument.uuID);
+ specificDocument.SendRecAlliance(btn.ID);
+ return true;
+ }
+
+ private void RefreshWhenShow()
+ {
+ bool flag = this._Doc.guildAllianceInfos == null;
+ if (flag)
+ {
+ base.uiBehaviour.mWrapContent.SetContentCount(0, false);
+ }
+ else
+ {
+ base.uiBehaviour.mWrapContent.SetContentCount(this._Doc.guildAllianceInfos.Count, false);
+ }
+ base.uiBehaviour.mScrollView.ResetPosition();
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/GuildTerritoryLeagueDlg.cs.meta b/Client/Assets/Scripts/XMainClient/UI/GuildTerritoryLeagueDlg.cs.meta
new file mode 100644
index 00000000..bf866409
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/GuildTerritoryLeagueDlg.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: c093ce3f4f73fb7449fff39574eed3fa
+timeCreated: 1611404487
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/GuildTerritoryMainBehaviour.cs b/Client/Assets/Scripts/XMainClient/UI/GuildTerritoryMainBehaviour.cs
new file mode 100644
index 00000000..feb0728d
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/GuildTerritoryMainBehaviour.cs
@@ -0,0 +1,50 @@
+using System;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+
+namespace XMainClient.UI
+{
+ internal class GuildTerritoryMainBehaviour : DlgBehaviourBase
+ {
+ public IXUIButton mClose;
+
+ public IXUIButton mMessage;
+
+ public IXUILabel mContent;
+
+ public IXUIButton mHelp;
+
+ public IXUIButton mRwd;
+
+ public IXUIScrollView mScrollView;
+
+ public IXUIWrapContent mWrapContent;
+
+ public IXUILabel mTerritoryName;
+
+ public IXUILabel mTerritoryTarget;
+
+ public Transform mTerritoryTransform;
+
+ public Transform mCrossGVG;
+
+ public IXUILabel mCrossGVGDescribe;
+
+ private void Awake()
+ {
+ this.mClose = (base.transform.Find("Bg/Close").GetComponent("XUIButton") as IXUIButton);
+ this.mMessage = (base.transform.Find("Bg/OK").GetComponent("XUIButton") as IXUIButton);
+ this.mContent = (base.transform.Find("Bg/Message").GetComponent("XUILabel") as IXUILabel);
+ this.mScrollView = (base.transform.Find("Bg/ScrollView").GetComponent("XUIScrollView") as IXUIScrollView);
+ this.mWrapContent = (base.transform.Find("Bg/ScrollView/WrapContent").GetComponent("XUIWrapContent") as IXUIWrapContent);
+ this.mHelp = (base.transform.Find("Bg/Help").GetComponent("XUIButton") as IXUIButton);
+ this.mRwd = (base.transform.Find("Bg/Rwd").GetComponent("XUIButton") as IXUIButton);
+ this.mTerritoryName = (base.transform.Find("Bg/Name").GetComponent("XUILabel") as IXUILabel);
+ this.mTerritoryTarget = (base.transform.Find("Bg/Target").GetComponent("XUILabel") as IXUILabel);
+ this.mTerritoryTransform = base.transform.Find("Bg/Territories");
+ this.mCrossGVG = base.transform.Find("Bg/CrossGVG");
+ this.mCrossGVGDescribe = (base.transform.Find("Bg/CrossGVG/Describe").GetComponent("XUILabel") as IXUILabel);
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/GuildTerritoryMainBehaviour.cs.meta b/Client/Assets/Scripts/XMainClient/UI/GuildTerritoryMainBehaviour.cs.meta
new file mode 100644
index 00000000..e1eab6ab
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/GuildTerritoryMainBehaviour.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 570280d136bcbfd40a51efcbed1a5b73
+timeCreated: 1611403746
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/GuildTerritoryMainDlg.cs b/Client/Assets/Scripts/XMainClient/UI/GuildTerritoryMainDlg.cs
new file mode 100644
index 00000000..580da933
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/GuildTerritoryMainDlg.cs
@@ -0,0 +1,155 @@
+using System;
+using System.Collections.Generic;
+using KKSG;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class GuildTerritoryMainDlg : DlgBase<GuildTerritoryMainDlg, GuildTerritoryMainBehaviour>
+ {
+ public override string fileName
+ {
+ get
+ {
+ return "Guild/GuildTerritory/GuildTerritoryMainDlg";
+ }
+ }
+
+ public override bool fullscreenui
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ private List<GuildTerritoryDisplay> mTerritoryDisplays;
+
+ private XGuildTerritoryDocument _Doc;
+
+ private SeqList<int> TerritoryRewardValues;
+
+ protected override void Init()
+ {
+ base.Init();
+ this._Doc = XDocuments.GetSpecificDocument<XGuildTerritoryDocument>(XGuildTerritoryDocument.uuID);
+ base.uiBehaviour.mWrapContent.RegisterItemUpdateEventHandler(new WrapItemUpdateEventHandler(this.OnItemWrapUpdate));
+ XSingleton<XDebug>.singleton.AddGreenLog(XSingleton<XGlobalConfig>.singleton.GetValue("TerritoryReward"), null, null, null, null, null);
+ this.TerritoryRewardValues = XSingleton<XGlobalConfig>.singleton.GetSequenceList("TerritoryReward", false);
+ base.uiBehaviour.mWrapContent.SetContentCount((int)this.TerritoryRewardValues.Count, false);
+ base.uiBehaviour.mContent.SetText(XStringDefineProxy.GetString("TERRITORY_MAIN_DESCRIPTION"));
+ base.uiBehaviour.mCrossGVGDescribe.SetText(XStringDefineProxy.GetString("CrossGVG_selectweek_message"));
+ this.InitTerritoryDisplay();
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ base.uiBehaviour.mMessage.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnClickMessage));
+ base.uiBehaviour.mClose.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnClickClose));
+ base.uiBehaviour.mHelp.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnHelpHandler));
+ base.uiBehaviour.mRwd.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnRwdClick));
+ }
+
+ private bool OnHelpHandler(IXUIButton btn)
+ {
+ DlgBase<XCommonHelpTipView, XCommonHelpTipBehaviour>.singleton.ShowHelp(XSysDefine.XSys_GuildTerritory);
+ return false;
+ }
+
+ private bool OnRwdClick(IXUIButton btn)
+ {
+ DlgBase<GuildTerritoryRewardDlg, GuildTerritoryRewardBehaviour>.singleton.SetVisible(true, true);
+ return false;
+ }
+
+ public void RefreshData()
+ {
+ int i = 0;
+ int count = this.mTerritoryDisplays.Count;
+ while (i < count)
+ {
+ this.mTerritoryDisplays[i].Refresh();
+ i++;
+ }
+ bool flag = this._Doc.SelfGuildTerritoryID > 0u;
+ if (flag)
+ {
+ TerritoryBattle.RowData byID = XGuildTerritoryDocument.mGuildTerritoryList.GetByID(this._Doc.SelfGuildTerritoryID);
+ base.uiBehaviour.mTerritoryName.SetText(byID.territoryname);
+ }
+ else
+ {
+ base.uiBehaviour.mTerritoryName.SetText(XStringDefineProxy.GetString("TERRITORY_CURRENT"));
+ }
+ bool flag2 = this._Doc.SelfTargetTerritoryID > 0u;
+ if (flag2)
+ {
+ TerritoryBattle.RowData byID2 = XGuildTerritoryDocument.mGuildTerritoryList.GetByID(this._Doc.SelfTargetTerritoryID);
+ base.uiBehaviour.mTerritoryTarget.SetText(byID2.territoryname);
+ }
+ else
+ {
+ base.uiBehaviour.mTerritoryTarget.SetText(XStringDefineProxy.GetString("TERRITORY_TARGET"));
+ }
+ base.uiBehaviour.mMessage.SetVisible(this._Doc.CurrentType == GUILDTERRTYPE.TERR_END);
+ XCrossGVGDocument specificDocument = XDocuments.GetSpecificDocument<XCrossGVGDocument>(XCrossGVGDocument.uuID);
+ base.uiBehaviour.mCrossGVG.gameObject.SetActive(specificDocument.TimeStep == CrossGvgTimeState.CGVG_Select);
+ }
+
+ public override void StackRefresh()
+ {
+ this._Doc.SendGuildTerritoryCityInfo();
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ this._Doc.SendGuildTerritoryCityInfo();
+ }
+
+ private void OnItemWrapUpdate(Transform t, int index)
+ {
+ int num = this.TerritoryRewardValues[index, 0];
+ XSingleton<XItemDrawerMgr>.singleton.normalItemDrawer.DrawItem(t.gameObject, num, 0, false);
+ IXUISprite ixuisprite = t.Find("Icon").GetComponent("XUISprite") as IXUISprite;
+ Transform transform = t.Find("Flag");
+ transform.gameObject.SetActive(this.TerritoryRewardValues[index, 1] == 1);
+ ixuisprite.ID = (ulong)((long)num);
+ ixuisprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(XSingleton<UiUtility>.singleton.OnItemClick));
+ }
+
+ private bool OnClickClose(IXUIButton btn)
+ {
+ this.SetVisibleWithAnimation(false, null);
+ return true;
+ }
+
+ private bool OnClickMessage(IXUIButton btn)
+ {
+ DlgBase<GuildTerritoryMessageDlg, GuildTerritoryMessageBehaviour>.singleton.SetVisibleWithAnimation(true, null);
+ return true;
+ }
+
+ private void InitTerritoryDisplay()
+ {
+ bool flag = this.mTerritoryDisplays == null;
+ if (flag)
+ {
+ this.mTerritoryDisplays = new List<GuildTerritoryDisplay>();
+ }
+ this.mTerritoryDisplays.Clear();
+ int childCount = base.uiBehaviour.mTerritoryTransform.childCount;
+ for (int i = 0; i < childCount; i++)
+ {
+ Transform child = base.uiBehaviour.mTerritoryTransform.GetChild(i);
+ GuildTerritoryDisplay guildTerritoryDisplay = new GuildTerritoryDisplay();
+ guildTerritoryDisplay.Init(uint.Parse(child.name), child);
+ this.mTerritoryDisplays.Add(guildTerritoryDisplay);
+ }
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/GuildTerritoryMainDlg.cs.meta b/Client/Assets/Scripts/XMainClient/UI/GuildTerritoryMainDlg.cs.meta
new file mode 100644
index 00000000..6da13e43
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/GuildTerritoryMainDlg.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 7fdd53466732cce4fb82d5b844f26f8a
+timeCreated: 1611404032
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/GuildTerritoryMessageBehaviour.cs b/Client/Assets/Scripts/XMainClient/UI/GuildTerritoryMessageBehaviour.cs
new file mode 100644
index 00000000..a89bd643
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/GuildTerritoryMessageBehaviour.cs
@@ -0,0 +1,25 @@
+using System;
+using UILib;
+using XMainClient.UI.UICommon;
+
+namespace XMainClient.UI
+{
+ internal class GuildTerritoryMessageBehaviour : DlgBehaviourBase
+ {
+ public IXUIButton mClose;
+
+ public IXUIScrollView mScrollView;
+
+ public IXUIWrapContent mWrapContent;
+
+ public IXUILabel mNameLabel;
+
+ private void Awake()
+ {
+ this.mClose = (base.transform.Find("Close").GetComponent("XUIButton") as IXUIButton);
+ this.mScrollView = (base.transform.Find("ScrollView").GetComponent("XUIScrollView") as IXUIScrollView);
+ this.mNameLabel = (base.transform.Find("Name").GetComponent("XUILabel") as IXUILabel);
+ this.mWrapContent = (base.transform.Find("ScrollView/WrapContent").GetComponent("XUIWrapContent") as IXUIWrapContent);
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/GuildTerritoryMessageBehaviour.cs.meta b/Client/Assets/Scripts/XMainClient/UI/GuildTerritoryMessageBehaviour.cs.meta
new file mode 100644
index 00000000..48e11bbc
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/GuildTerritoryMessageBehaviour.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: a2c2655a94efb684689ea20028804a8c
+timeCreated: 1611404258
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/GuildTerritoryMessageDlg.cs b/Client/Assets/Scripts/XMainClient/UI/GuildTerritoryMessageDlg.cs
new file mode 100644
index 00000000..c8aa32e8
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/GuildTerritoryMessageDlg.cs
@@ -0,0 +1,105 @@
+using System;
+using System.Collections.Generic;
+using KKSG;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class GuildTerritoryMessageDlg : DlgBase<GuildTerritoryMessageDlg, GuildTerritoryMessageBehaviour>
+ {
+ public override string fileName
+ {
+ get
+ {
+ return "Guild/GuildTerritory/GuildTerritoryMessageDlg";
+ }
+ }
+
+ private XGuildTerritoryDocument _Doc;
+
+ private List<TerrData> mCityDataList;
+
+ protected override void Init()
+ {
+ base.Init();
+ this._Doc = XDocuments.GetSpecificDocument<XGuildTerritoryDocument>(XGuildTerritoryDocument.uuID);
+ base.uiBehaviour.mNameLabel.SetText(string.Empty);
+ base.uiBehaviour.mWrapContent.RegisterItemUpdateEventHandler(new WrapItemUpdateEventHandler(this.OnWrapUpdateItem));
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ this._Doc.SendReceiveTerritroyInfo();
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ base.uiBehaviour.mClose.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnClickClose));
+ }
+
+ public void SetNewInfo(List<TerrData> dataList)
+ {
+ this.mCityDataList = dataList;
+ this.ShowMessage();
+ base.uiBehaviour.mWrapContent.SetContentCount(this.mCityDataList.Count, false);
+ base.uiBehaviour.mScrollView.ResetPosition();
+ }
+
+ private void ShowMessage()
+ {
+ bool flag = false;
+ string text = string.Empty;
+ int i = 0;
+ int count = this.mCityDataList.Count;
+ while (i < count)
+ {
+ bool flag2 = this.mCityDataList[i].id == 13u;
+ if (flag2)
+ {
+ bool flag3 = this.mCityDataList[i].guildid > 0UL;
+ if (flag3)
+ {
+ flag = true;
+ text = XStringDefineProxy.GetString("TERRITORY_RESULT1", new object[]
+ {
+ this.mCityDataList[i].name
+ });
+ }
+ break;
+ }
+ i++;
+ }
+ bool flag4 = !flag;
+ if (flag4)
+ {
+ text = XStringDefineProxy.GetString("TERRITORY_RESULT");
+ }
+ base.uiBehaviour.mNameLabel.SetText(text);
+ }
+
+ private bool OnClickClose(IXUIButton btn)
+ {
+ this.SetVisibleWithAnimation(false, null);
+ return false;
+ }
+
+ private void OnWrapUpdateItem(Transform t, int index)
+ {
+ IXUISprite ixuisprite = t.Find("Sprite").GetComponent("XUISprite") as IXUISprite;
+ IXUILabel ixuilabel = t.Find("GuildName").GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel2 = t.Find("Name").GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel3 = t.Find("nb").GetComponent("XUILabel") as IXUILabel;
+ TerrData terrData = this.mCityDataList[index];
+ TerritoryBattle.RowData byID = XGuildTerritoryDocument.mGuildTerritoryList.GetByID(terrData.id);
+ ixuisprite.SetSprite(byID.territoryIcon);
+ ixuilabel2.SetText(byID.territoryname);
+ ixuilabel3.SetText(byID.territorylevelname);
+ ixuilabel.SetText(terrData.name);
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/GuildTerritoryMessageDlg.cs.meta b/Client/Assets/Scripts/XMainClient/UI/GuildTerritoryMessageDlg.cs.meta
new file mode 100644
index 00000000..fc2f57a7
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/GuildTerritoryMessageDlg.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 564a347efb8f1374f9b57fad8bd097ef
+timeCreated: 1611403743
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/GuildTerritoryReportDlg.cs b/Client/Assets/Scripts/XMainClient/UI/GuildTerritoryReportDlg.cs
new file mode 100644
index 00000000..16758002
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/GuildTerritoryReportDlg.cs
@@ -0,0 +1,185 @@
+using System;
+using System.Collections.Generic;
+using KKSG;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class GuildTerritoryReportDlg : DlgBase<GuildTerritoryReportDlg, GuildTerritoryBahaviour>
+ {
+ public override string fileName
+ {
+ get
+ {
+ return "Battle/GuildTerritoryBattleInfo";
+ }
+ }
+
+ public override bool autoload
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override bool hideMainMenu
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ private XGuildTerritoryDocument _doc = null;
+
+ private Dictionary<uint, GuildTransfer.RowData> dic = new Dictionary<uint, GuildTransfer.RowData>();
+
+ private List<ReportNode> reportList = new List<ReportNode>();
+
+ public XLeftTimeCounter timeConnter;
+
+ protected override void Init()
+ {
+ this._doc = XDocuments.GetSpecificDocument<XGuildTerritoryDocument>(XGuildTerritoryDocument.uuID);
+ base.uiBehaviour.m_wrap.RegisterItemUpdateEventHandler(new WrapItemUpdateEventHandler(this.UpdateItem));
+ GuildTransfer.RowData[] table = XGuildTerritoryDocument.mGuildTransfer.Table;
+ this.dic.Clear();
+ for (int i = 0; i < table.Length; i++)
+ {
+ bool flag = !this.dic.ContainsKey(table[i].sceneid);
+ if (flag)
+ {
+ this.dic.Add(table[i].sceneid, table[i]);
+ }
+ }
+ this.timeConnter = new XLeftTimeCounter(base.uiBehaviour.m_lblTime, false);
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ base.uiBehaviour._close_btn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnCloseClick));
+ }
+
+ protected override void OnShow()
+ {
+ this._doc.SendGCFCommonReq(GCFReqType.GCF_FIGHT_REPORT);
+ }
+
+ public void RefreshAll()
+ {
+ this.MergeInfo();
+ this.RefreshTitleInfo();
+ this.RefreshList();
+ }
+
+ public override void OnUpdate()
+ {
+ bool flag = this.timeConnter != null;
+ if (flag)
+ {
+ this.timeConnter.Update();
+ }
+ }
+
+ private void MergeInfo()
+ {
+ this.reportList.Clear();
+ List<GCFBattleField> fields = this._doc.fields;
+ for (int i = 0; i < fields.Count; i++)
+ {
+ ReportNode reportNode = new ReportNode();
+ reportNode.row = this.dic[fields[i].mapid];
+ for (int j = 0; j < fields[i].jvdians.Count; j++)
+ {
+ bool flag = fields[i].jvdians[j].type == GCFJvDianType.GCF_JUDIAN_UP;
+ if (flag)
+ {
+ reportNode.up = fields[i].jvdians[j].guildname;
+ }
+ else
+ {
+ bool flag2 = fields[i].jvdians[j].type == GCFJvDianType.GCF_JUDIAN_MID;
+ if (flag2)
+ {
+ reportNode.mid = fields[i].jvdians[j].guildname;
+ }
+ else
+ {
+ bool flag3 = fields[i].jvdians[j].type == GCFJvDianType.GCF_JUDIAN_DOWN;
+ if (flag3)
+ {
+ reportNode.btm = fields[i].jvdians[j].guildname;
+ }
+ }
+ }
+ }
+ reportNode.info = fields[i].zhanchinfo;
+ this.reportList.Add(reportNode);
+ }
+ }
+
+ private void RefreshTitleInfo()
+ {
+ bool flag = this._doc == null;
+ if (flag)
+ {
+ this._doc = XDocuments.GetSpecificDocument<XGuildTerritoryDocument>(XGuildTerritoryDocument.uuID);
+ }
+ GCFGuildBrief winguild = this._doc.winguild;
+ base.uiBehaviour.m_lblGuildName.SetText(winguild.guildname);
+ this.timeConnter.SetLeftTime(this._doc.fight_lefttime, -1);
+ TerritoryBattle.RowData byID = XGuildTerritoryDocument.mGuildTerritoryList.GetByID(this._doc.territoryid);
+ base.uiBehaviour.m_sprIcon.SetSprite(byID.territoryIcon);
+ }
+
+ private void RefreshList()
+ {
+ base.uiBehaviour.m_scroll.ResetPosition();
+ base.uiBehaviour.m_wrap.SetContentCount(6, false);
+ }
+
+ private void UpdateItem(Transform t, int index)
+ {
+ bool flag = this.reportList.Count > index;
+ if (flag)
+ {
+ IXUISprite ixuisprite = t.Find("Gate").GetComponent("XUISprite") as IXUISprite;
+ IXUILabel ixuilabel = t.Find("Top/GuildName").GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel2 = t.Find("Middle/GuildName").GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel3 = t.Find("Bottom/GuildName").GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel4 = t.Find("Name").GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel5 = t.Find("Triple/T").GetComponent("XUILabel") as IXUILabel;
+ GameObject gameObject = t.Find("Triple").gameObject;
+ IXUILabel ixuilabel6 = t.Find("PlayerNum").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel4.SetText(this.reportList[index].row.name);
+ ixuilabel.SetText(string.IsNullOrEmpty(this.reportList[index].up) ? "-" : this.reportList[index].up);
+ ixuilabel2.SetText(string.IsNullOrEmpty(this.reportList[index].mid) ? "-" : this.reportList[index].mid);
+ ixuilabel3.SetText(string.IsNullOrEmpty(this.reportList[index].btm) ? "-" : this.reportList[index].btm);
+ ixuisprite.SetSprite(this.reportList[index].row.icon);
+ GCFZhanChBriefInfo info = this.reportList[index].info;
+ bool flag2 = info != null;
+ if (flag2)
+ {
+ gameObject.SetActive(info.multipoint >= 2u);
+ ixuilabel5.SetText(XStringDefineProxy.GetString("Territtory_Score" + info.multipoint));
+ ixuilabel6.SetText(info.curusercount + "/" + info.maxusercount);
+ }
+ else
+ {
+ XSingleton<XDebug>.singleton.AddLog("info is nil " + ixuilabel4.GetText(), null, null, null, null, null, XDebugColor.XDebug_None);
+ }
+ }
+ }
+
+ private bool OnCloseClick(IXUIButton button)
+ {
+ this.SetVisible(false, true);
+ return true;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/GuildTerritoryReportDlg.cs.meta b/Client/Assets/Scripts/XMainClient/UI/GuildTerritoryReportDlg.cs.meta
new file mode 100644
index 00000000..ce66186d
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/GuildTerritoryReportDlg.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 382ed534363f5a841a3ae0283155e9d2
+timeCreated: 1611403569
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/GuildTerritoryRewardBehaviour.cs b/Client/Assets/Scripts/XMainClient/UI/GuildTerritoryRewardBehaviour.cs
new file mode 100644
index 00000000..f40b557f
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/GuildTerritoryRewardBehaviour.cs
@@ -0,0 +1,30 @@
+using System;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class GuildTerritoryRewardBehaviour : DlgBehaviourBase
+ {
+ public IXUIButton _close_btn;
+
+ public IXUIWrapContent m_wrap;
+
+ public IXUIScrollView m_scrool;
+
+ public GameObject m_objTpl;
+
+ public XUIPool m_RewardItemPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ private void Awake()
+ {
+ this.m_scrool = (base.transform.Find("Bg/Bg/ScrollView").GetComponent("XUIScrollView") as IXUIScrollView);
+ this.m_objTpl = base.transform.Find("Bg/Bg/ScrollView/wrapcontent/Item").gameObject;
+ this._close_btn = (base.transform.Find("Bg/Close").GetComponent("XUIButton") as IXUIButton);
+ this.m_wrap = (base.transform.Find("Bg/Bg/ScrollView/wrapcontent").GetComponent("XUIWrapContent") as IXUIWrapContent);
+ this.m_RewardItemPool.SetupPool(base.transform.gameObject, this.m_objTpl, 30u, false);
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/GuildTerritoryRewardBehaviour.cs.meta b/Client/Assets/Scripts/XMainClient/UI/GuildTerritoryRewardBehaviour.cs.meta
new file mode 100644
index 00000000..9f90124a
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/GuildTerritoryRewardBehaviour.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: b59a00ed2683e244f8fcfb23c6072b00
+timeCreated: 1611404396
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/GuildTerritoryRewardDlg.cs b/Client/Assets/Scripts/XMainClient/UI/GuildTerritoryRewardDlg.cs
new file mode 100644
index 00000000..f08d4fd7
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/GuildTerritoryRewardDlg.cs
@@ -0,0 +1,107 @@
+using System;
+using System.Collections.Generic;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class GuildTerritoryRewardDlg : DlgBase<GuildTerritoryRewardDlg, GuildTerritoryRewardBehaviour>
+ {
+ private XGuildTerritoryDocument doc
+ {
+ get
+ {
+ return XDocuments.GetSpecificDocument<XGuildTerritoryDocument>(XGuildTerritoryDocument.uuID);
+ }
+ }
+
+ public override string fileName
+ {
+ get
+ {
+ return "Guild/GuildTerritory/GuildTerritoryReward";
+ }
+ }
+
+ public override bool autoload
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override bool hideMainMenu
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ private List<TerritoryRewd.RowData> list = new List<TerritoryRewd.RowData>();
+
+ protected override void Init()
+ {
+ base.uiBehaviour.m_wrap.RegisterItemUpdateEventHandler(new WrapItemUpdateEventHandler(this.UpdateItem));
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ base.uiBehaviour._close_btn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnCloseClick));
+ }
+
+ protected override void OnShow()
+ {
+ this.CulResult();
+ base.uiBehaviour.m_wrap.SetContentCount(this.list.Count, false);
+ base.uiBehaviour.m_scrool.ResetPosition();
+ }
+
+ private void CulResult()
+ {
+ XLevelSealDocument specificDocument = XDocuments.GetSpecificDocument<XLevelSealDocument>(XLevelSealDocument.uuID);
+ uint sealType = specificDocument.SealType;
+ this.list.Clear();
+ foreach (TerritoryRewd.RowData rowData in XGuildTerritoryDocument.mTerritoryRewd.Table)
+ {
+ bool flag = (long)rowData.ID == (long)((ulong)sealType);
+ if (flag)
+ {
+ this.list.Add(rowData);
+ }
+ }
+ }
+
+ private void UpdateItem(Transform t, int index)
+ {
+ IXUILabel ixuilabel = t.transform.Find("Bg/Rank/RankNum").GetComponent("XUILabel") as IXUILabel;
+ bool flag = this.list.Count > index;
+ if (flag)
+ {
+ TerritoryRewd.RowData rowData = this.list[index];
+ ixuilabel.SetText(rowData.Point.ToString());
+ for (int i = 0; i < rowData.Reward.Count; i++)
+ {
+ GameObject gameObject = base.uiBehaviour.m_RewardItemPool.FetchGameObject(false);
+ gameObject.transform.parent = t;
+ gameObject.transform.localScale = Vector3.one;
+ gameObject.transform.localPosition = new Vector3((float)(base.uiBehaviour.m_RewardItemPool.TplWidth * i) + base.uiBehaviour.m_RewardItemPool._tpl.transform.localPosition.x, 0f);
+ IXUISprite ixuisprite = gameObject.transform.Find("Icon").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.ID = (ulong)rowData.Reward[i, 0];
+ XSingleton<XItemDrawerMgr>.singleton.normalItemDrawer.DrawItem(gameObject, (int)rowData.Reward[i, 0], (int)rowData.Reward[i, 1], false);
+ ixuisprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(XSingleton<UiUtility>.singleton.OnItemClick));
+ }
+ }
+ }
+
+ private bool OnCloseClick(IXUIButton button)
+ {
+ this.SetVisible(false, true);
+ return true;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/GuildTerritoryRewardDlg.cs.meta b/Client/Assets/Scripts/XMainClient/UI/GuildTerritoryRewardDlg.cs.meta
new file mode 100644
index 00000000..9d71825e
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/GuildTerritoryRewardDlg.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 4dd8e88909805604cbce0079a3e76252
+timeCreated: 1611403697
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/HallFameBehavior.cs b/Client/Assets/Scripts/XMainClient/UI/HallFameBehavior.cs
new file mode 100644
index 00000000..528f07ae
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/HallFameBehavior.cs
@@ -0,0 +1,52 @@
+using System;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class HallFameBehavior : DlgBehaviourBase
+ {
+ public IXUIButton CloseBtn;
+
+ public IXUIButton RankBtn;
+
+ public IXUIButton ShareBtn;
+
+ public IXUIButton SupportBtn;
+
+ public IXUIButton HelpBtn;
+
+ public IXUILabel DateSeasonLabel;
+
+ public XUIPool TabPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ public Transform RoleList;
+
+ public Transform RoleDetail;
+
+ public Transform RecentEmpty;
+
+ public Transform CurrentEmpty;
+
+ public GameObject EffectWidget;
+
+ private void Awake()
+ {
+ this.CloseBtn = (base.transform.Find("Bg/Close").GetComponent("XUIButton") as IXUIButton);
+ this.RankBtn = (base.transform.Find("Bg/RankList").GetComponent("XUIButton") as IXUIButton);
+ this.ShareBtn = (base.transform.Find("Bg/BtnShare").GetComponent("XUIButton") as IXUIButton);
+ this.SupportBtn = (base.transform.Find("Bg/Support").GetComponent("XUIButton") as IXUIButton);
+ this.HelpBtn = (base.transform.Find("Bg/Help").GetComponent("XUIButton") as IXUIButton);
+ this.DateSeasonLabel = (base.transform.Find("Bg/date").GetComponent("XUILabel") as IXUILabel);
+ Transform transform = base.transform.Find("Bg/Tabs/TabTpl");
+ this.TabPool.SetupPool(transform.parent.gameObject, transform.gameObject, 4u, false);
+ this.RoleList = base.transform.Find("Bg/RoleList");
+ this.RoleDetail = base.transform.Find("Bg/RoleDetail");
+ this.RecentEmpty = this.RoleDetail.Find("HistoryRecord/Emport");
+ this.CurrentEmpty = this.RoleDetail.Find("Empty");
+ this.EffectWidget = base.transform.Find("Bg/EffectWidget").gameObject;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/HallFameBehavior.cs.meta b/Client/Assets/Scripts/XMainClient/UI/HallFameBehavior.cs.meta
new file mode 100644
index 00000000..8b565c83
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/HallFameBehavior.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 02a837b2cc9c3c947a94fd7cbd389574
+timeCreated: 1611402957
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/HallFameDlg.cs b/Client/Assets/Scripts/XMainClient/UI/HallFameDlg.cs
new file mode 100644
index 00000000..507f43ca
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/HallFameDlg.cs
@@ -0,0 +1,542 @@
+using System;
+using System.Collections.Generic;
+using KKSG;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class HallFameDlg : DlgBase<HallFameDlg, HallFameBehavior>
+ {
+ public override string fileName
+ {
+ get
+ {
+ return "GameSystem/HallFameDlg";
+ }
+ }
+
+ public override int layer
+ {
+ get
+ {
+ return 1;
+ }
+ }
+
+ public override bool autoload
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override bool pushstack
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override bool fullscreenui
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override bool hideMainMenu
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override int sysid
+ {
+ get
+ {
+ return XFastEnumIntEqualityComparer<XSysDefine>.ToInt(XSysDefine.XSys_HallFame);
+ }
+ }
+
+ public ArenaStarType CurSelectedType
+ {
+ get
+ {
+ return this._curSelectedType;
+ }
+ }
+
+ private List<IXUICheckBox> _tabs = new List<IXUICheckBox>();
+
+ private ArenaStarType _curSelectedType;
+
+ private const int avatarMax = 4;
+
+ private const int maxShowDetail = 4;
+
+ private const int maxShowTopOneIcon = 5;
+
+ private XDummy[] _avatars = new XDummy[4];
+
+ private XFx _selectedRoleEffect;
+
+ private ulong _curRoleID;
+
+ private IUIDummy _mainPlayerDummy;
+
+ protected override void Init()
+ {
+ base.Init();
+ this.InitProperties();
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ this.UpdateTabs();
+ }
+
+ public override void StackRefresh()
+ {
+ base.StackRefresh();
+ this.RefreshRightView(this._curSelectedType);
+ }
+
+ protected override void OnHide()
+ {
+ XSingleton<X3DAvatarMgr>.singleton.EnableMainDummy(false, null);
+ base.Return3DAvatarPool();
+ this.ClearAvatarStates();
+ bool flag = this._selectedRoleEffect != null;
+ if (flag)
+ {
+ this._selectedRoleEffect.SetActive(false);
+ }
+ this._mainPlayerDummy = null;
+ this._curRoleID = 0UL;
+ base.OnHide();
+ }
+
+ protected override void OnUnload()
+ {
+ this._tabs.Clear();
+ base.uiBehaviour.TabPool.ReturnAll(false);
+ base.Return3DAvatarPool();
+ bool flag = this._selectedRoleEffect != null;
+ if (flag)
+ {
+ XSingleton<XFxMgr>.singleton.DestroyFx(this._selectedRoleEffect, true);
+ this._selectedRoleEffect = null;
+ }
+ this._curSelectedType = (ArenaStarType)0;
+ base.OnUnload();
+ }
+
+ public void RefreshRightView(ArenaStarType id)
+ {
+ bool flag = id == this._curSelectedType;
+ if (flag)
+ {
+ base.Return3DAvatarPool();
+ this.ClearAvatarStates();
+ this._mainPlayerDummy = null;
+ XSingleton<X3DAvatarMgr>.singleton.EnableMainDummy(false, null);
+ base.Alloc3DAvatarPool("HallFameDlg");
+ List<HallFameRoleInfo> rankInfoListBySysID = XHallFameDocument.Doc.GetRankInfoListBySysID(id);
+ int num = Mathf.Min(rankInfoListBySysID.Count, base.uiBehaviour.RoleList.childCount);
+ int i = 0;
+ while (i < num)
+ {
+ HallFameRoleInfo roleInfo = rankInfoListBySysID[i];
+ Transform child = base.uiBehaviour.RoleList.GetChild(i++);
+ this.SetRankRoleInfoShow(child, roleInfo, i - 1);
+ }
+ while (i < base.uiBehaviour.RoleList.childCount)
+ {
+ Transform child2 = base.uiBehaviour.RoleList.GetChild(i++);
+ child2.gameObject.SetActive(false);
+ }
+ bool flag2 = num > 0;
+ if (flag2)
+ {
+ this.SelectDefaultRole();
+ }
+ else
+ {
+ base.uiBehaviour.RoleDetail.gameObject.SetActive(false);
+ }
+ bool active = false;
+ for (int j = 0; j < rankInfoListBySysID.Count; j++)
+ {
+ bool flag3 = XSingleton<XAttributeMgr>.singleton.XPlayerData != null && rankInfoListBySysID[j].OutLook.roleid == XSingleton<XAttributeMgr>.singleton.XPlayerData.RoleID;
+ if (flag3)
+ {
+ active = true;
+ break;
+ }
+ }
+ base.uiBehaviour.RankBtn.gameObject.SetActive(this.CurSelectedType != ArenaStarType.AST_LEAGUE);
+ base.uiBehaviour.ShareBtn.gameObject.SetActive(active);
+ this.UpdateSeasonDate();
+ this.RefreshRedPoint();
+ }
+ }
+
+ private void SelectDefaultRole()
+ {
+ base.uiBehaviour.RoleDetail.gameObject.SetActive(true);
+ Transform child = base.uiBehaviour.RoleList.GetChild(0);
+ IXUISprite uiSprite = child.GetComponent("XUISprite") as IXUISprite;
+ this.OnRoleSelected(uiSprite);
+ }
+
+ private void InitProperties()
+ {
+ this._curSelectedType = (ArenaStarType)0;
+ base.uiBehaviour.CloseBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnClickCloseBtn));
+ base.uiBehaviour.ShareBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnClickShareBtn));
+ base.uiBehaviour.SupportBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnClickSupportBtn));
+ base.uiBehaviour.RankBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnClickRankBtn));
+ base.uiBehaviour.HelpBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnHelpClicked));
+ base.uiBehaviour.TabPool.ReturnAll(false);
+ ArenaStarType[] array = (ArenaStarType[])Enum.GetValues(typeof(ArenaStarType));
+ this._tabs.Clear();
+ for (int i = 0; i < array.Length; i++)
+ {
+ GameObject gameObject = base.uiBehaviour.TabPool.FetchGameObject(false);
+ IXUICheckBox ixuicheckBox = gameObject.GetComponent("XUICheckBox") as IXUICheckBox;
+ ixuicheckBox.ID = (ulong)((long)array[i]);
+ ixuicheckBox.RegisterOnCheckEventHandler(new CheckBoxOnCheckEventHandler(this.OnCheckTabItem));
+ Transform transform = ixuicheckBox.gameObject.transform;
+ transform.localPosition = new Vector3(base.uiBehaviour.TabPool.TplPos.x, base.uiBehaviour.TabPool.TplPos.y - (float)(base.uiBehaviour.TabPool.TplHeight * i), 0f);
+ IXUILabel ixuilabel = transform.Find("Selected/SelectedTextLabel").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel.SetText(XSingleton<XStringTable>.singleton.GetString(array[i].ToString() + "_Hall_Fame"));
+ ixuilabel = (transform.Find("NormalTextLabel").GetComponent("XUILabel") as IXUILabel);
+ ixuilabel.SetText(XSingleton<XStringTable>.singleton.GetString(array[i].ToString() + "_Hall_Fame"));
+ this._tabs.Add(ixuicheckBox);
+ }
+ this._selectedRoleEffect = XSingleton<XFxMgr>.singleton.CreateFx("Effects/FX_Particle/UIfx/UI_HallFameDlg_fx01", null, true);
+ this._selectedRoleEffect.SetActive(false);
+ }
+
+ private bool OnClickRankBtn(IXUIButton button)
+ {
+ switch (this._curSelectedType)
+ {
+ case ArenaStarType.AST_PK:
+ {
+ XQualifyingDocument specificDocument = XDocuments.GetSpecificDocument<XQualifyingDocument>(XQualifyingDocument.uuID);
+ DlgBase<XQualifyingLastSeasonRankDlg, XQualifyingLastSeasonRankBehavior>.singleton.SetVisibleWithAnimation(true, null);
+ DlgBase<XQualifyingLastSeasonRankDlg, XQualifyingLastSeasonRankBehavior>.singleton.SetupRankWindow(specificDocument.LastSeasonRankList);
+ break;
+ }
+ case ArenaStarType.AST_HEROBATTLE:
+ DlgBase<HeroBattleRankDlg, HeroBattleRankBehavior>.singleton.SetVisibleWithAnimation(true, null);
+ DlgBase<HeroBattleRankDlg, HeroBattleRankBehavior>.singleton.SetupRankFrame();
+ break;
+ case ArenaStarType.AST_WEEKNEST:
+ DlgBase<WeekNestRankDlg, WeekNestRankBehavior>.singleton.SetVisibleWithAnimation(true, null);
+ DlgBase<WeekNestRankDlg, WeekNestRankBehavior>.singleton.Refresh();
+ break;
+ case ArenaStarType.AST_LEAGUE:
+ {
+ DlgBase<XTeamLeagueRankView, XTeamLeagueRankBehavior>.singleton.SetVisibleWithAnimation(true, null);
+ XRankDocument specificDocument2 = XDocuments.GetSpecificDocument<XRankDocument>(XRankDocument.uuID);
+ DlgBase<XTeamLeagueRankView, XTeamLeagueRankBehavior>.singleton.RefreshUI(specificDocument2.LastWeekLeagueTeamRankList);
+ break;
+ }
+ }
+ return true;
+ }
+
+ private bool OnClickSupportBtn(IXUIButton button)
+ {
+ XHallFameDocument.Doc.SendArenaStarRoleReq(ArenaStarReqType.ASRT_DIANZAN, this._curSelectedType, 0UL);
+ return true;
+ }
+
+ private bool OnClickShareBtn(IXUIButton button)
+ {
+ DlgBase<HallFameShareDlg, HallFameShareBehavior>.singleton.SetVisibleWithAnimation(true, null);
+ return true;
+ }
+
+ private void RefreshRoleRaceDetail(ulong roleID)
+ {
+ HallFameRoleInfo roleInfoByRoleID = XHallFameDocument.Doc.GetRoleInfoByRoleID(roleID);
+ bool flag = roleInfoByRoleID == null;
+ if (!flag)
+ {
+ ArenaStarHistData hisData = roleInfoByRoleID.hisData;
+ this._curRoleID = roleID;
+ IXUISprite ixuisprite = base.uiBehaviour.RoleDetail.Find("Avatar").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.SetSprite(XSingleton<XProfessionSkillMgr>.singleton.GetProfHeadIcon2((int)roleInfoByRoleID.OutLook.profession));
+ IXUILabel ixuilabel = base.uiBehaviour.RoleDetail.Find("Name").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel.SetText(roleInfoByRoleID.OutLook.name);
+ bool flag2 = hisData != null;
+ if (flag2)
+ {
+ IXUILabel ixuilabel2 = base.uiBehaviour.RoleDetail.Find("History/ChampionNum").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel2.SetText(hisData.rankOneNum.ToString());
+ IXUILabel ixuilabel3 = base.uiBehaviour.RoleDetail.Find("History/TopTenNum").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel3.SetText(hisData.rankTenNum.ToString());
+ IXUILabel ixuilabel4 = base.uiBehaviour.RoleDetail.Find("HistoryRecord/HistoryRecordValue").GetComponent("XUILabel") as IXUILabel;
+ string text = "";
+ for (int i = 0; i < hisData.rankRecent.Count - 1; i++)
+ {
+ uint num = hisData.rankRecent[i].rank;
+ num = ((num == uint.MaxValue) ? 0u : num);
+ text += ((num == 0u) ? XSingleton<XStringTable>.singleton.GetString("NoRank") : string.Format(XSingleton<XStringTable>.singleton.GetString("RANK"), num));
+ text += "\n";
+ }
+ bool flag3 = hisData.rankRecent.Count > 0;
+ if (flag3)
+ {
+ uint num2 = hisData.rankRecent[hisData.rankRecent.Count - 1].rank;
+ num2 = ((num2 == uint.MaxValue) ? 0u : num2);
+ text += ((num2 == 0u) ? XSingleton<XStringTable>.singleton.GetString("NoRank") : string.Format(XSingleton<XStringTable>.singleton.GetString("RANK"), num2));
+ }
+ ixuilabel4.SetText(text);
+ base.uiBehaviour.RecentEmpty.gameObject.SetActive(string.IsNullOrEmpty(text));
+ }
+ bool flag4 = XHallFameDocument.Doc.Season_time <= 1u;
+ if (flag4)
+ {
+ base.uiBehaviour.RoleDetail.Find("NOW").gameObject.SetActive(false);
+ base.uiBehaviour.CurrentEmpty.gameObject.SetActive(true);
+ }
+ else
+ {
+ base.uiBehaviour.RoleDetail.Find("NOW").gameObject.SetActive(true);
+ base.uiBehaviour.CurrentEmpty.gameObject.SetActive(false);
+ List<int> lastData = roleInfoByRoleID.LastData;
+ bool flag5 = lastData != null;
+ if (flag5)
+ {
+ for (int j = 0; j < 4; j++)
+ {
+ IXUILabel ixuilabel5 = base.uiBehaviour.RoleDetail.Find("NOW/ShowValue_" + (j + 1)).GetComponent("XUILabel") as IXUILabel;
+ string text2 = (j < lastData.Count) ? lastData[j].ToString() : "";
+ bool flag6 = j < lastData.Count && j == 0 && this.CurSelectedType == ArenaStarType.AST_WEEKNEST;
+ if (flag6)
+ {
+ text2 += XSingleton<XStringTable>.singleton.GetString("SECOND_DUARATION");
+ }
+ bool flag7 = j < lastData.Count && j == 2 && this.CurSelectedType == ArenaStarType.AST_HEROBATTLE;
+ if (flag7)
+ {
+ text2 += "%";
+ }
+ bool flag8 = j < lastData.Count && j == 2 && this.CurSelectedType == ArenaStarType.AST_LEAGUE;
+ if (flag8)
+ {
+ text2 += "%";
+ }
+ ixuilabel5.SetText(text2);
+ IXUILabel ixuilabel6 = ixuilabel5.gameObject.transform.Find("Content").GetComponent("XUILabel") as IXUILabel;
+ text2 = ((j < lastData.Count) ? XSingleton<XStringTable>.singleton.GetString(string.Concat(new object[]
+ {
+ "Fame_Hall_",
+ this._curSelectedType,
+ "_",
+ j + 1
+ })) : "");
+ ixuilabel6.SetText(text2);
+ }
+ }
+ }
+ }
+ }
+
+ public void RefreshRedPoint()
+ {
+ foreach (IXUICheckBox ixuicheckBox in this._tabs)
+ {
+ Transform transform = ixuicheckBox.gameObject.transform;
+ Transform transform2 = transform.Find("RedPoint");
+ transform2.gameObject.SetActive(XHallFameDocument.Doc.CanSupportType.Contains((ArenaStarType)ixuicheckBox.ID));
+ }
+ this.RefreshSupportBtn();
+ }
+
+ private bool OnCheckTabItem(IXUICheckBox iXUICheckBox)
+ {
+ bool bChecked = iXUICheckBox.bChecked;
+ if (bChecked)
+ {
+ XRankDocument specificDocument = XDocuments.GetSpecificDocument<XRankDocument>(XRankDocument.uuID);
+ ArenaStarType arenaStarType = (ArenaStarType)iXUICheckBox.ID;
+ this._curSelectedType = arenaStarType;
+ switch (arenaStarType)
+ {
+ case ArenaStarType.AST_PK:
+ specificDocument.ReqRankList(XRankType.LastWeek_PKRank);
+ break;
+ case ArenaStarType.AST_HEROBATTLE:
+ {
+ XHeroBattleDocument specificDocument2 = XDocuments.GetSpecificDocument<XHeroBattleDocument>(XHeroBattleDocument.uuID);
+ specificDocument2.QueryLastSeasonRankInfo();
+ break;
+ }
+ case ArenaStarType.AST_WEEKNEST:
+ XWeekNestDocument.Doc.ReqLastSeasonRankList();
+ break;
+ case ArenaStarType.AST_LEAGUE:
+ specificDocument.ReqRankList(XRankType.LastWeek_LeagueTeamRank);
+ break;
+ default:
+ return false;
+ }
+ XHallFameDocument.Doc.SendArenaStarRoleReq(ArenaStarReqType.ASRT_ROLEDATA, arenaStarType, 0UL);
+ }
+ return true;
+ }
+
+ private bool OnClickCloseBtn(IXUIButton button)
+ {
+ this.SetVisible(false, true);
+ return true;
+ }
+
+ private void UpdateTabs()
+ {
+ this.SetTabsState();
+ }
+
+ private void RefreshSupportBtn()
+ {
+ base.uiBehaviour.SupportBtn.SetEnable(XHallFameDocument.Doc.CanSupportType.Contains(this._curSelectedType), false);
+ Transform transform = base.uiBehaviour.SupportBtn.gameObject.transform.Find("RedPoint");
+ transform.gameObject.SetActive(XHallFameDocument.Doc.CanSupportType.Contains(this._curSelectedType));
+ }
+
+ private void SetTabsState()
+ {
+ ArenaStarType[] array = (ArenaStarType[])Enum.GetValues(typeof(ArenaStarType));
+ int num = Mathf.Min(array.Length, this._tabs.Count);
+ int i;
+ for (i = 0; i < num; i++)
+ {
+ this._tabs[i].ID = (ulong)((long)array[i]);
+ }
+ while (i < this._tabs.Count)
+ {
+ this._tabs[i++].SetEnable(false);
+ }
+ bool bChecked = this._tabs[0].bChecked;
+ if (bChecked)
+ {
+ this.OnCheckTabItem(this._tabs[0]);
+ }
+ else
+ {
+ this._tabs[0].bChecked = true;
+ }
+ }
+
+ private void SetRankRoleInfoShow(Transform role, HallFameRoleInfo roleInfo, int index)
+ {
+ string sprite = "mrt_mh" + (this._curSelectedType - ArenaStarType.AST_PK);
+ Transform transform = role.Find("TitleFrame/KingRoot");
+ int childCount = transform.childCount;
+ IXUISprite ixuisprite = role.GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnRoleSelected));
+ ixuisprite.ID = roleInfo.OutLook.roleid;
+ role.gameObject.SetActive(true);
+ IXUILabel ixuilabel = role.Find("TitleFrame/Name").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel.SetText(roleInfo.OutLook.name);
+ IXUILabel ixuilabel2 = role.Find("TitleFrame/Rank").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel2.SetText("NO." + roleInfo.Rank);
+ IXUISprite ixuisprite2 = role.Find("TitleFrame/ProfIcon").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite2.SetSprite(XSingleton<XProfessionSkillMgr>.singleton.GetProfIcon((int)roleInfo.OutLook.profession));
+ IXUILabel ixuilabel3 = role.Find("TitleFrame/Guild").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel3.SetText(roleInfo.TeamName);
+ Transform transform2 = role.Find("Snapshot");
+ IUIDummy iuidummy = transform2.GetComponent("UIDummy") as IUIDummy;
+ bool flag = roleInfo.OutLook.roleid == XSingleton<XAttributeMgr>.singleton.XPlayerData.RoleID;
+ if (flag)
+ {
+ XSingleton<X3DAvatarMgr>.singleton.EnableMainDummy(true, iuidummy);
+ XSingleton<X3DAvatarMgr>.singleton.ResetMainAnimation();
+ this._mainPlayerDummy = iuidummy;
+ }
+ else
+ {
+ XDummy xdummy = XSingleton<X3DAvatarMgr>.singleton.FindCreateCommonRoleDummy(this.m_dummPool, roleInfo.OutLook.roleid, (uint)XFastEnumIntEqualityComparer<RoleType>.ToInt(roleInfo.OutLook.profession), roleInfo.OutLook.outlook, iuidummy, index);
+ this._avatars[index] = xdummy;
+ }
+ ArenaStarHistData hisData = roleInfo.hisData;
+ bool flag2 = hisData != null;
+ if (flag2)
+ {
+ Transform child = transform.GetChild(0);
+ int num = Mathf.Min((int)hisData.rankOneNum, 5);
+ IXUISprite ixuisprite3 = child.GetComponent("XUISprite") as IXUISprite;
+ int i = 0;
+ float num2 = (hisData.rankOneNum > 0u) ? ((float)(num - 1) / 2f * (float)ixuisprite3.spriteWidth) : 0f;
+ while (i < childCount)
+ {
+ Transform child2 = transform.GetChild(i);
+ bool flag3 = (long)i < (long)((ulong)hisData.rankOneNum);
+ if (flag3)
+ {
+ child2.localPosition = new Vector3(-num2 + (float)(i * ixuisprite3.spriteWidth), child2.localPosition.y, child2.localPosition.z);
+ child2.gameObject.SetActive(true);
+ IXUISprite ixuisprite4 = child2.GetChild(0).GetComponent("XUISprite") as IXUISprite;
+ ixuisprite4.SetSprite(sprite);
+ }
+ else
+ {
+ child2.gameObject.SetActive(false);
+ }
+ i++;
+ }
+ }
+ }
+
+ private void OnRoleSelected(IXUISprite uiSprite)
+ {
+ this.RefreshRoleRaceDetail(uiSprite.ID);
+ bool flag = this._selectedRoleEffect != null;
+ if (flag)
+ {
+ this._selectedRoleEffect.SetUIWidget(uiSprite.gameObject.transform.Find("p").gameObject);
+ this._selectedRoleEffect.SetActive(true);
+ this._selectedRoleEffect.Play(uiSprite.gameObject.transform, Vector3.zero, Vector3.one, 1f, true, false);
+ }
+ }
+
+ private void ClearAvatarStates()
+ {
+ for (int i = 0; i < 4; i++)
+ {
+ bool flag = this._avatars[i] == null;
+ if (!flag)
+ {
+ this._avatars[i] = null;
+ }
+ }
+ }
+
+ private void UpdateSeasonDate()
+ {
+ DateTime dateTime = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc).AddSeconds(XHallFameDocument.Doc.SeasonBeginTime).ToLocalTime();
+ DateTime dateTime2 = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc).AddSeconds(XHallFameDocument.Doc.SeasonEndTime).ToLocalTime();
+ base.uiBehaviour.DateSeasonLabel.SetText(((XHallFameDocument.Doc.SeasonBeginTime == 0UL) ? "--.--" : dateTime.ToString("MM.dd")) + "_" + ((XHallFameDocument.Doc.SeasonEndTime == 0UL) ? "--.--" : dateTime2.ToString("MM.dd")));
+ }
+
+ public bool OnHelpClicked(IXUIButton button)
+ {
+ DlgBase<XCommonHelpTipView, XCommonHelpTipBehaviour>.singleton.ShowHelp(XSysDefine.XSys_HallFame);
+ return true;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/HallFameDlg.cs.meta b/Client/Assets/Scripts/XMainClient/UI/HallFameDlg.cs.meta
new file mode 100644
index 00000000..e1a97d29
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/HallFameDlg.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: d2fb518e5d4252e46b4777e00360f97a
+timeCreated: 1611404597
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/HallFameShareBehavior.cs b/Client/Assets/Scripts/XMainClient/UI/HallFameShareBehavior.cs
new file mode 100644
index 00000000..5e586bdc
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/HallFameShareBehavior.cs
@@ -0,0 +1,42 @@
+using System;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+
+namespace XMainClient.UI
+{
+ internal class HallFameShareBehavior : DlgBehaviourBase
+ {
+ public IXUIButton ShareBtn;
+
+ public IXUIButton CloseBtn;
+
+ public IUIDummy uiDummy;
+
+ public Transform ParticleHanging;
+
+ public IXUILabel RecentSeason;
+
+ public IXUILabel RoleName;
+
+ public IXUILabel ChampionTimes;
+
+ public IXUILabel SeasonSpan;
+
+ public IXUILabel TopTenTimes;
+
+ private void Awake()
+ {
+ this.ShareBtn = (base.transform.Find("Bg/Board/ShareBtn").GetComponent("XUIButton") as IXUIButton);
+ this.CloseBtn = (base.transform.Find("Bg/Close").GetComponent("XUIButton") as IXUIButton);
+ Transform transform = base.transform.Find("Bg/Snapshot");
+ this.uiDummy = (transform.GetComponent("UIDummy") as IUIDummy);
+ this.ParticleHanging = base.transform.Find("Bg/pHanging");
+ this.RecentSeason = (base.transform.Find("Bg/Board/RecentSeason").GetComponent("XUILabel") as IXUILabel);
+ this.RoleName = (base.transform.Find("Bg/Board/RoleName").GetComponent("XUILabel") as IXUILabel);
+ this.ChampionTimes = (base.transform.Find("Bg/Board/ChampionTimes").GetComponent("XUILabel") as IXUILabel);
+ this.SeasonSpan = (base.transform.Find("Bg/Board/SeasonSpan").GetComponent("XUILabel") as IXUILabel);
+ this.TopTenTimes = (base.transform.Find("Bg/Board/TopTenTimes").GetComponent("XUILabel") as IXUILabel);
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/HallFameShareBehavior.cs.meta b/Client/Assets/Scripts/XMainClient/UI/HallFameShareBehavior.cs.meta
new file mode 100644
index 00000000..6077b7f7
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/HallFameShareBehavior.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 582d7a9d87be40a48b40613b126a5f1f
+timeCreated: 1611403754
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/HallFameShareDlg.cs b/Client/Assets/Scripts/XMainClient/UI/HallFameShareDlg.cs
new file mode 100644
index 00000000..6531e8f8
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/HallFameShareDlg.cs
@@ -0,0 +1,192 @@
+using System;
+using KKSG;
+using UILib;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class HallFameShareDlg : DlgBase<HallFameShareDlg, HallFameShareBehavior>
+ {
+ public override string fileName
+ {
+ get
+ {
+ return "GameSystem/HallFameShareDlg";
+ }
+ }
+
+ public override int layer
+ {
+ get
+ {
+ return 1;
+ }
+ }
+
+ public override bool autoload
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override bool pushstack
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ private XFx _roleEffect;
+
+ private uint m_show_time_token = 0u;
+
+ protected override void Init()
+ {
+ base.Init();
+ this.InitProperties();
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ base.uiBehaviour.ShareBtn.SetAlpha(1f);
+ this.ShowMainRoleAvatar();
+ this.UpdateRoleDetail();
+ this.PlayVictoryAction();
+ }
+
+ private void PlayVictoryAction()
+ {
+ float interval = XSingleton<X3DAvatarMgr>.singleton.SetMainAnimationGetLength(XSingleton<XEntityMgr>.singleton.Player.Present.PresentLib.Disappear);
+ this.m_show_time_token = XSingleton<XTimerMgr>.singleton.SetTimer(interval, new XTimerMgr.ElapsedEventHandler(this.KillDummyTimer), null);
+ }
+
+ private void UpdateRoleDetail()
+ {
+ ulong roleID = XSingleton<XAttributeMgr>.singleton.XPlayerData.RoleID;
+ HallFameRoleInfo roleInfoByRoleID = XHallFameDocument.Doc.GetRoleInfoByRoleID(roleID);
+ bool flag = roleInfoByRoleID != null;
+ if (flag)
+ {
+ ArenaStarType curSelectedType = DlgBase<HallFameDlg, HallFameBehavior>.singleton.CurSelectedType;
+ string @string = XSingleton<XStringTable>.singleton.GetString(curSelectedType.ToString() + "_Hall_Fame");
+ IXUILabel ixuilabel = base.uiBehaviour.RoleName.gameObject.transform.Find("Title").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel.SetText(@string + XSingleton<XStringTable>.singleton.GetString("SeasonFame"));
+ base.uiBehaviour.RoleName.SetText(roleInfoByRoleID.OutLook.name);
+ ixuilabel = (base.uiBehaviour.TopTenTimes.gameObject.transform.Find("Title").GetComponent("XUILabel") as IXUILabel);
+ ixuilabel.SetText(@string + XSingleton<XStringTable>.singleton.GetString("TotalTopTen"));
+ base.uiBehaviour.TopTenTimes.SetText(roleInfoByRoleID.hisData.rankTenNum.ToString());
+ ixuilabel = (base.uiBehaviour.SeasonSpan.gameObject.transform.Find("Title").GetComponent("XUILabel") as IXUILabel);
+ ixuilabel.SetText(@string + XSingleton<XStringTable>.singleton.GetString("SeasonTime"));
+ DateTime dateTime = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc).AddSeconds(XHallFameDocument.Doc.SeasonBeginTime).ToLocalTime();
+ DateTime dateTime2 = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc).AddSeconds(XHallFameDocument.Doc.SeasonEndTime).ToLocalTime();
+ base.uiBehaviour.SeasonSpan.SetText(((XHallFameDocument.Doc.SeasonBeginTime == 0UL) ? "--:--" : dateTime.ToString("MM.dd")) + "_" + ((XHallFameDocument.Doc.SeasonEndTime == 0UL) ? "--:--" : dateTime2.ToString("MM.dd")));
+ ixuilabel = (base.uiBehaviour.ChampionTimes.gameObject.transform.Find("Title").GetComponent("XUILabel") as IXUILabel);
+ ixuilabel.SetText(@string + XSingleton<XStringTable>.singleton.GetString("TotalTopOne"));
+ base.uiBehaviour.ChampionTimes.SetText(roleInfoByRoleID.hisData.rankOneNum.ToString());
+ string text = (roleInfoByRoleID.hisData.rankRecent.Count == 0) ? "" : roleInfoByRoleID.hisData.rankRecent[0].rank.ToString();
+ for (int i = 1; i < roleInfoByRoleID.hisData.rankRecent.Count; i++)
+ {
+ uint num = roleInfoByRoleID.hisData.rankRecent[i].rank;
+ num = ((num == uint.MaxValue) ? 0u : num);
+ text = text + "/" + num;
+ }
+ base.uiBehaviour.RecentSeason.SetText(text);
+ }
+ }
+
+ private void ShowMainRoleAvatar()
+ {
+ XSingleton<X3DAvatarMgr>.singleton.EnableMainDummy(true, base.uiBehaviour.uiDummy);
+ bool flag = this._roleEffect != null;
+ if (flag)
+ {
+ this._roleEffect.SetActive(true);
+ }
+ }
+
+ protected override void OnHide()
+ {
+ XSingleton<X3DAvatarMgr>.singleton.EnableMainDummy(false, null);
+ bool flag = this._roleEffect != null;
+ if (flag)
+ {
+ this._roleEffect.SetActive(false);
+ }
+ this.KillTimer();
+ XSingleton<X3DAvatarMgr>.singleton.ResetMainAnimation();
+ base.OnHide();
+ }
+
+ protected override void OnUnload()
+ {
+ bool flag = this._roleEffect != null;
+ if (flag)
+ {
+ XSingleton<XFxMgr>.singleton.DestroyFx(this._roleEffect, true);
+ this._roleEffect = null;
+ }
+ this.KillTimer();
+ XSingleton<X3DAvatarMgr>.singleton.ResetMainAnimation();
+ base.OnUnload();
+ }
+
+ private void InitProperties()
+ {
+ base.uiBehaviour.ShareBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.ClickToShare));
+ base.uiBehaviour.CloseBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.ClickToClose));
+ this._roleEffect = XSingleton<XFxMgr>.singleton.CreateFx("Effects/FX_Particle/UIfx/UI_HallFameDlg_fx02", null, true);
+ this._roleEffect.SetActive(false);
+ this._roleEffect.SetParent(base.uiBehaviour.ParticleHanging);
+ }
+
+ private bool ClickToClose(IXUIButton button)
+ {
+ this.SetVisibleWithAnimation(false, null);
+ return true;
+ }
+
+ private bool ClickToShare(IXUIButton button)
+ {
+ bool flag = XSingleton<UiUtility>.singleton.CheckPlatfomStatus();
+ if (flag)
+ {
+ base.uiBehaviour.ShareBtn.SetAlpha(0f);
+ XSingleton<XScreenShotMgr>.singleton.SendStatisticToServer(ShareOpType.Share, DragonShareType.ShowGlory);
+ XSingleton<XScreenShotMgr>.singleton.StartExternalScreenShotView(new ScreenShotCallback(this.ShareSuccess));
+ }
+ return true;
+ }
+
+ private void ShareSuccess(bool succ)
+ {
+ XSingleton<XDebug>.singleton.AddGreenLog("ShareSuccess", null, null, null, null, null);
+ bool flag = base.IsVisible();
+ if (flag)
+ {
+ base.uiBehaviour.ShareBtn.SetAlpha(1f);
+ this.SetVisible(false, true);
+ }
+ }
+
+ private void KillDummyTimer(object sender)
+ {
+ this.KillTimer();
+ bool flag = XSingleton<XEntityMgr>.singleton.Player != null && XSingleton<XEntityMgr>.singleton.Player.Present != null;
+ if (flag)
+ {
+ XSingleton<X3DAvatarMgr>.singleton.SetMainAnimation(XSingleton<XEntityMgr>.singleton.Player.Present.PresentLib.AttackIdle);
+ }
+ }
+
+ private void KillTimer()
+ {
+ XSingleton<XTimerMgr>.singleton.KillTimer(this.m_show_time_token);
+ this.m_show_time_token = 0u;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/HallFameShareDlg.cs.meta b/Client/Assets/Scripts/XMainClient/UI/HallFameShareDlg.cs.meta
new file mode 100644
index 00000000..f3b3e01f
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/HallFameShareDlg.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 950ec5faf2536d6429b81134f10d4d64
+timeCreated: 1611404179
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/HeroAttrBehaviour.cs b/Client/Assets/Scripts/XMainClient/UI/HeroAttrBehaviour.cs
new file mode 100644
index 00000000..28f9e5bf
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/HeroAttrBehaviour.cs
@@ -0,0 +1,62 @@
+using System;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class HeroAttrBehaviour : DlgBehaviourBase
+ {
+ public IXUIButton m_Close;
+
+ public GameObject m_HeroFrame;
+
+ public GameObject m_SkillFrame;
+
+ public GameObject m_GamePlayFrame;
+
+ public IXUICheckBox[] m_Tab = new IXUICheckBox[3];
+
+ public IXUISprite m_HeroIcon;
+
+ public IXUILabel m_HeroName;
+
+ public IXUILabel m_HeroSmallTips;
+
+ public IXUIScrollView m_DescScrollView;
+
+ public XUIPool m_AttrPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ public XUIPool m_SkillPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ public IXUIScrollView m_ScrollView;
+
+ public IXUILabel m_GamePlayTips;
+
+ public IXUIScrollView m_GamePlayScrollView;
+
+ private void Awake()
+ {
+ this.m_Close = (base.transform.Find("Close").GetComponent("XUIButton") as IXUIButton);
+ this.m_HeroFrame = base.transform.Find("HeroFrame").gameObject;
+ this.m_SkillFrame = base.transform.Find("SkillFrame").gameObject;
+ this.m_GamePlayFrame = base.transform.Find("GamePlayFrame").gameObject;
+ for (int i = 0; i < 3; i++)
+ {
+ this.m_Tab[i] = (base.transform.Find(string.Format("Tabs/Tab{0}", i)).GetComponent("XUICheckBox") as IXUICheckBox);
+ }
+ this.m_HeroIcon = (this.m_HeroFrame.transform.Find("Left/Hero").GetComponent("XUISprite") as IXUISprite);
+ this.m_HeroName = (this.m_HeroFrame.transform.Find("Left/Name").GetComponent("XUILabel") as IXUILabel);
+ this.m_HeroSmallTips = (this.m_HeroFrame.transform.Find("Left/ScrollView/Desc").GetComponent("XUILabel") as IXUILabel);
+ this.m_DescScrollView = (this.m_HeroFrame.transform.Find("Left/ScrollView").GetComponent("XUIScrollView") as IXUIScrollView);
+ Transform transform = this.m_HeroFrame.transform.Find("Panel/Tpl");
+ this.m_AttrPool.SetupPool(transform.parent.gameObject, transform.gameObject, 15u, false);
+ transform = this.m_SkillFrame.transform.Find("Panel/Tpl");
+ this.m_SkillPool.SetupPool(transform.parent.gameObject, transform.gameObject, 15u, false);
+ this.m_ScrollView = (this.m_SkillFrame.transform.Find("Panel").GetComponent("XUIScrollView") as IXUIScrollView);
+ this.m_GamePlayTips = (this.m_GamePlayFrame.transform.Find("ScrollView/Desc").GetComponent("XUILabel") as IXUILabel);
+ this.m_GamePlayScrollView = (this.m_GamePlayFrame.transform.Find("ScrollView").GetComponent("XUIScrollView") as IXUIScrollView);
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/HeroAttrBehaviour.cs.meta b/Client/Assets/Scripts/XMainClient/UI/HeroAttrBehaviour.cs.meta
new file mode 100644
index 00000000..516c2a3e
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/HeroAttrBehaviour.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 9ae529425c455b349947082277e3d1f4
+timeCreated: 1611404202
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/HeroAttrDlg.cs b/Client/Assets/Scripts/XMainClient/UI/HeroAttrDlg.cs
new file mode 100644
index 00000000..ca112370
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/HeroAttrDlg.cs
@@ -0,0 +1,270 @@
+using System;
+using System.Collections.Generic;
+using KKSG;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class HeroAttrDlg : DlgBase<HeroAttrDlg, HeroAttrBehaviour>
+ {
+ public override bool autoload
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override string fileName
+ {
+ get
+ {
+ return "Battle/HeroAttrDlg";
+ }
+ }
+
+ private XHeroBattleDocument _doc;
+
+ private SceneType _type;
+
+ protected override void Init()
+ {
+ base.Init();
+ this._doc = XDocuments.GetSpecificDocument<XHeroBattleDocument>(XHeroBattleDocument.uuID);
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ base.uiBehaviour.m_Close.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnCloseBtnClick));
+ for (int i = 0; i < 3; i++)
+ {
+ base.uiBehaviour.m_Tab[i].ID = (ulong)((long)i);
+ base.uiBehaviour.m_Tab[i].RegisterOnCheckEventHandler(new CheckBoxOnCheckEventHandler(this.OnTabClick));
+ }
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ }
+
+ public void ShowByType(SceneType type, uint heroID)
+ {
+ bool flag = XSingleton<XAttributeMgr>.singleton.XPlayerData == null;
+ if (!flag)
+ {
+ bool flag2 = heroID == 0u;
+ if (!flag2)
+ {
+ this._type = type;
+ this.SetVisible(true, true);
+ base.uiBehaviour.m_Tab[0].ForceSetFlag(true);
+ base.uiBehaviour.m_Tab[1].ForceSetFlag(false);
+ base.uiBehaviour.m_Tab[2].ForceSetFlag(false);
+ this.SetHeroFrameState(true);
+ }
+ }
+ }
+
+ protected override void OnHide()
+ {
+ base.OnHide();
+ }
+
+ protected override void OnUnload()
+ {
+ base.OnUnload();
+ }
+
+ private bool OnCloseBtnClick(IXUIButton btn)
+ {
+ this.SetVisible(false, true);
+ return true;
+ }
+
+ public uint GetHeroID()
+ {
+ bool flag = XSingleton<XEntityMgr>.singleton.Player == null;
+ uint result;
+ if (flag)
+ {
+ result = 0u;
+ }
+ else
+ {
+ bool flag2 = !XEntity.ValideEntity(XSingleton<XEntityMgr>.singleton.Player.Transformer);
+ if (flag2)
+ {
+ result = 0u;
+ }
+ else
+ {
+ uint typeID = XSingleton<XEntityMgr>.singleton.Player.Transformer.TypeID;
+ int num = (this._type == SceneType.SCENE_HEROBATTLE) ? 0 : 2;
+ for (int i = 0; i < this._doc.OverWatchReader.Table.Length; i++)
+ {
+ bool flag3 = this._doc.OverWatchReader.Table[i].StatisticsID[num] == typeID;
+ if (flag3)
+ {
+ return this._doc.OverWatchReader.Table[i].HeroID;
+ }
+ }
+ result = 0u;
+ }
+ }
+ return result;
+ }
+
+ private bool OnTabClick(IXUICheckBox icb)
+ {
+ bool flag = !icb.bChecked;
+ bool result;
+ if (flag)
+ {
+ result = false;
+ }
+ else
+ {
+ this.SetHeroFrameState(icb.ID == 0UL);
+ this.SetSkillFrameState(icb.ID == 1UL);
+ this.SetGamePlayState(icb.ID == 2UL);
+ result = true;
+ }
+ return result;
+ }
+
+ private void SetHeroFrameState(bool state)
+ {
+ bool flag = XSingleton<XAttributeMgr>.singleton.XPlayerData == null;
+ if (!flag)
+ {
+ base.uiBehaviour.m_HeroFrame.SetActive(state);
+ if (state)
+ {
+ uint heroID = this.GetHeroID();
+ bool flag2 = heroID == 0u;
+ if (flag2)
+ {
+ this.SetVisible(false, true);
+ XSingleton<XDebug>.singleton.AddLog("Show HeroAttrDlg by HeroID = 0 Error.", null, null, null, null, null, XDebugColor.XDebug_None);
+ }
+ else
+ {
+ OverWatchTable.RowData byHeroID = this._doc.OverWatchReader.GetByHeroID(heroID);
+ base.uiBehaviour.m_HeroIcon.SetSprite(byHeroID.Icon, byHeroID.IconAtlas, false);
+ base.uiBehaviour.m_HeroName.SetText(byHeroID.Name);
+ base.uiBehaviour.m_HeroSmallTips.SetText(XSingleton<UiUtility>.singleton.ReplaceReturn((this._type == SceneType.SCENE_HEROBATTLE) ? byHeroID.HeroUseTips : byHeroID.MobaUseTips));
+ base.uiBehaviour.m_DescScrollView.SetPosition(0f);
+ base.uiBehaviour.m_AttrPool.ReturnAll(false);
+ List<int> intList = XSingleton<XGlobalConfig>.singleton.GetIntList("HeroAttrShow");
+ for (int i = 0; i < intList.Count; i++)
+ {
+ GameObject gameObject = base.uiBehaviour.m_AttrPool.FetchGameObject(false);
+ gameObject.transform.localPosition = new Vector3(base.uiBehaviour.m_AttrPool.TplPos.x + (float)(base.uiBehaviour.m_AttrPool.TplWidth * (i % 2)), base.uiBehaviour.m_AttrPool.TplPos.y - (float)(base.uiBehaviour.m_AttrPool.TplHeight * (i / 2)));
+ IXUILabel ixuilabel = gameObject.transform.Find("Attr").GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel2 = gameObject.transform.Find("T").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel2.SetText(string.Format("{0}:", XStringDefineProxy.GetString(string.Format("HeroAttr_{0}", intList[i]))));
+ ixuilabel.SetText(((int)XSingleton<XAttributeMgr>.singleton.XPlayerData.GetAttr((XAttributeDefine)intList[i])).ToString());
+ }
+ }
+ }
+ }
+ }
+
+ private void SetSkillFrameState(bool state)
+ {
+ base.uiBehaviour.m_SkillFrame.SetActive(state);
+ if (state)
+ {
+ uint heroID = this.GetHeroID();
+ bool flag = heroID == 0u;
+ if (flag)
+ {
+ this.SetVisible(false, true);
+ XSingleton<XDebug>.singleton.AddLog("Show HeroAttrDlg by HeroID = 0 Error.", null, null, null, null, null, XDebugColor.XDebug_None);
+ }
+ else
+ {
+ OverWatchTable.RowData byHeroID = this._doc.OverWatchReader.GetByHeroID(heroID);
+ uint num = byHeroID.StatisticsID[(this._type == SceneType.SCENE_HEROBATTLE) ? 0 : 2];
+ uint presentID = XSingleton<XEntityMgr>.singleton.EntityStatistics.GetByID(num).PresentID;
+ XEntityPresentation.RowData byPresentID = XSingleton<XEntityMgr>.singleton.EntityInfo.GetByPresentID(presentID);
+ int num2 = (this._type == SceneType.SCENE_HEROBATTLE) ? 5 : 4;
+ List<uint> list = new List<uint>();
+ int num3 = 0;
+ while (list.Count < num2 && num3 < byPresentID.OtherSkills.Length)
+ {
+ bool flag2 = string.IsNullOrEmpty(byPresentID.OtherSkills[num3]) || byPresentID.OtherSkills[num3] == "E";
+ if (!flag2)
+ {
+ list.Add(XSingleton<XSkillEffectMgr>.singleton.GetSkillID(byPresentID.OtherSkills[num3], num));
+ }
+ num3++;
+ }
+ base.uiBehaviour.m_SkillPool.ReturnAll(false);
+ for (int i = 0; i < list.Count; i++)
+ {
+ uint num4 = 0u;
+ bool flag3 = this._type == SceneType.SCENE_MOBA;
+ if (flag3)
+ {
+ XBattleSkillDocument.SkillLevelDict.TryGetValue(list[i], out num4);
+ }
+ SkillList.RowData skillConfig = XSingleton<XSkillEffectMgr>.singleton.GetSkillConfig(list[i], num4, XSingleton<XEntityMgr>.singleton.Player.SkillCasterTypeID);
+ GameObject gameObject = base.uiBehaviour.m_SkillPool.FetchGameObject(false);
+ gameObject.transform.localPosition = new Vector3(base.uiBehaviour.m_SkillPool.TplPos.x + (float)(i * base.uiBehaviour.m_SkillPool.TplWidth), base.uiBehaviour.m_SkillPool.TplPos.y);
+ IXUISprite ixuisprite = gameObject.transform.Find("Icon").GetComponent("XUISprite") as IXUISprite;
+ IXUILabel ixuilabel = gameObject.transform.Find("Name").GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel2 = gameObject.transform.Find("CD").GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel3 = gameObject.transform.Find("MP").GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel4 = gameObject.transform.Find("Desc").GetComponent("XUILabel") as IXUILabel;
+ ixuisprite.SetSprite(skillConfig.Icon, skillConfig.Atlas, false);
+ ixuilabel.SetText(skillConfig.ScriptName);
+ bool flag4 = this._type == SceneType.SCENE_MOBA && num4 == 0u;
+ if (flag4)
+ {
+ ixuilabel3.SetText(XStringDefineProxy.GetString("NOT_LEARN"));
+ ixuilabel2.SetText(XStringDefineProxy.GetString("NOT_LEARN"));
+ }
+ else
+ {
+ ixuilabel3.SetText((skillConfig.CostMP[0] + skillConfig.CostMP[1] * num4).ToString());
+ bool flag5 = XSingleton<XEntityMgr>.singleton.Player != null && XEntity.ValideEntity(XSingleton<XEntityMgr>.singleton.Player.Transformer);
+ string text;
+ if (flag5)
+ {
+ text = string.Format("{0}s", Math.Round((double)XSkillMgr.GetCD(XSingleton<XEntityMgr>.singleton.Player.Transformer, skillConfig.SkillScript, num4) + 0.01, 1));
+ }
+ else
+ {
+ text = "0s";
+ }
+ ixuilabel2.SetText(text);
+ }
+ ixuilabel4.SetText(skillConfig.CurrentLevelDescription);
+ bool flag6 = i == list.Count - 1;
+ if (flag6)
+ {
+ gameObject.transform.Find("line").gameObject.SetActive(false);
+ }
+ }
+ base.uiBehaviour.m_ScrollView.SetPosition(0f);
+ }
+ }
+ }
+
+ private void SetGamePlayState(bool state)
+ {
+ base.uiBehaviour.m_GamePlayFrame.SetActive(state);
+ if (state)
+ {
+ base.uiBehaviour.m_GamePlayTips.SetText(XSingleton<UiUtility>.singleton.ReplaceReturn(XStringDefineProxy.GetString(string.Format("HeroGamePlay_{0}", XFastEnumIntEqualityComparer<SceneType>.ToInt(this._type)))));
+ base.uiBehaviour.m_GamePlayScrollView.SetPosition(0f);
+ }
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/HeroAttrDlg.cs.meta b/Client/Assets/Scripts/XMainClient/UI/HeroAttrDlg.cs.meta
new file mode 100644
index 00000000..0d909dc5
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/HeroAttrDlg.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 35a4ca8043ac90c42968ec1f38c7a6a6
+timeCreated: 1611403559
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/HeroBattleDlg.cs b/Client/Assets/Scripts/XMainClient/UI/HeroBattleDlg.cs
new file mode 100644
index 00000000..9e0169f3
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/HeroBattleDlg.cs
@@ -0,0 +1,613 @@
+using System;
+using System.Collections.Generic;
+using KKSG;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class HeroBattleDlg : DlgBase<HeroBattleDlg, HeroBattleBehaviour>
+ {
+ public override bool autoload
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override bool pushstack
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override bool hideMainMenu
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override bool fullscreenui
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override string fileName
+ {
+ get
+ {
+ return "GameSystem/HeroBattleDlg";
+ }
+ }
+
+ public override int sysid
+ {
+ get
+ {
+ return XFastEnumIntEqualityComparer<XSysDefine>.ToInt(XSysDefine.XSys_HeroBattle);
+ }
+ }
+
+ private XHeroBattleDocument _doc = null;
+
+ private XHeroBattleSkillDocument _skillDoc = null;
+
+ public HeroBattleSkillHandler m_HeroBattleSkillHandler;
+
+ public BattleRecordHandler m_HeroBattleRecordHandler;
+
+ private XDummy m_Dummy;
+
+ private bool _InitUI;
+
+ private uint _selectAnimToken;
+
+ protected override void Init()
+ {
+ base.Init();
+ this._doc = XDocuments.GetSpecificDocument<XHeroBattleDocument>(XHeroBattleDocument.uuID);
+ this._skillDoc = XDocuments.GetSpecificDocument<XHeroBattleSkillDocument>(XHeroBattleSkillDocument.uuID);
+ this.m_HeroBattleSkillHandler = DlgHandlerBase.EnsureCreate<HeroBattleSkillHandler>(ref this.m_HeroBattleSkillHandler, base.uiBehaviour.m_SkillPreViewTs, false, null);
+ this.m_HeroBattleSkillHandler.HandlerType = 0;
+ this.m_HeroBattleSkillHandler.OtherViewBuyBtn = base.uiBehaviour.m_BuyBtn;
+ DlgHandlerBase.EnsureCreate<BattleRecordHandler>(ref this.m_HeroBattleRecordHandler, base.uiBehaviour.m_BattleRecordFrame, null, false);
+ base.uiBehaviour.m_RewardPreViewFrame.SetActive(false);
+ base.uiBehaviour.m_RankFrame.SetActive(false);
+ this._InitUI = true;
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ base.uiBehaviour.m_Close.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnCloseBtnClick));
+ base.uiBehaviour.m_SkillPreViewBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnSkillPreViewBtnClick));
+ base.uiBehaviour.m_BuyBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnBuyBtnClick));
+ base.uiBehaviour.m_ClickGet.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnGetRewardClick));
+ base.uiBehaviour.m_BattleRecordBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnBattleRecordBtnClick));
+ base.uiBehaviour.m_RewardPreViewBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnRewardPreViewBtnClick));
+ base.uiBehaviour.m_RewardPreViewCloseBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnRewardPreViewCloseBtnClick));
+ base.uiBehaviour.m_ShopBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnShopBtnClick));
+ base.uiBehaviour.m_SingleMatch.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnSingleMatchBtnClick));
+ base.uiBehaviour.m_TeamMatch.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnTeamMatchBtnClick));
+ base.uiBehaviour.m_SnapDrag.RegisterSpriteDragEventHandler(new SpriteDragEventHandler(this.OnMonsterDrag));
+ IXUIButton ixuibutton = base.uiBehaviour.transform.Find("Bg/Help").GetComponent("XUIButton") as IXUIButton;
+ ixuibutton.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnHelpBtnClicked));
+ base.uiBehaviour.m_RankBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnRankBtnClick));
+ base.uiBehaviour.m_RankCloseBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnRankCloseBtnClick));
+ base.uiBehaviour.m_RankWrapContent.RegisterItemUpdateEventHandler(new WrapItemUpdateEventHandler(this.WrapListUpdated));
+ base.uiBehaviour.m_Privilege.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnPrivilegeClick));
+ base.uiBehaviour.m_ResearchBtn.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnResearchBtnClick));
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ base.uiBehaviour.m_BgTex.SetTexturePath("atlas/UI/GameSystem/HeroBattle/l_herozcbj_h2Split");
+ base.Alloc3DAvatarPool("HeroBattleDlg");
+ bool initUI = this._InitUI;
+ if (initUI)
+ {
+ this._InitUI = false;
+ }
+ else
+ {
+ this.RefreshSelectMsg();
+ }
+ this._doc.QueryHeroBattleUIInfo();
+ this.m_HeroBattleSkillHandler.SetVisible(true);
+ this._skillDoc.m_HeroBattleSkillHandler = this.m_HeroBattleSkillHandler;
+ this.Refresh();
+ DlgBase<RandomGiftView, RandomGiftBehaviour>.singleton.TryOpenUI();
+ this.RefreshPrivilegeInfo();
+ }
+
+ protected override void OnHide()
+ {
+ XSingleton<XTimerMgr>.singleton.KillTimer(this._selectAnimToken);
+ this.m_HeroBattleRecordHandler.SetVisible(false);
+ base.uiBehaviour.m_BgTex.SetTexturePath("");
+ bool flag = this.m_HeroBattleSkillHandler != null;
+ if (flag)
+ {
+ this.m_HeroBattleSkillHandler.SetVisible(false);
+ this._skillDoc.m_HeroBattleSkillHandler = null;
+ }
+ base.Return3DAvatarPool();
+ this.m_Dummy = null;
+ base.OnHide();
+ }
+
+ public override void StackRefresh()
+ {
+ base.StackRefresh();
+ bool flag = this.m_HeroBattleSkillHandler != null;
+ if (flag)
+ {
+ this.m_HeroBattleSkillHandler.SetVisible(true);
+ }
+ base.Alloc3DAvatarPool("HeroBattleDlg");
+ this.RefreshSelectMsg();
+ }
+
+ public override void LeaveStackTop()
+ {
+ base.LeaveStackTop();
+ bool flag = this.m_HeroBattleSkillHandler != null;
+ if (flag)
+ {
+ this.m_HeroBattleSkillHandler.SetSkillPreViewState(false, 0);
+ this.m_HeroBattleSkillHandler.SetVisible(false);
+ }
+ XSingleton<X3DAvatarMgr>.singleton.DestroyDummy(this.m_dummPool, this.m_Dummy);
+ this.m_Dummy = null;
+ }
+
+ protected override void OnUnload()
+ {
+ XSingleton<XTimerMgr>.singleton.KillTimer(this._selectAnimToken);
+ DlgHandlerBase.EnsureUnload<HeroBattleSkillHandler>(ref this.m_HeroBattleSkillHandler);
+ DlgHandlerBase.EnsureUnload<BattleRecordHandler>(ref this.m_HeroBattleRecordHandler);
+ base.Return3DAvatarPool();
+ this.m_Dummy = null;
+ base.OnUnload();
+ }
+
+ public void Refresh()
+ {
+ XTeamDocument specificDocument = XDocuments.GetSpecificDocument<XTeamDocument>(XTeamDocument.uuID);
+ base.uiBehaviour.m_SingleMatchLabel.SetText((specificDocument.SoloMatchType == KMatchType.KMT_HERO) ? string.Format("{0}...", XStringDefineProxy.GetString("MATCHING")) : XStringDefineProxy.GetString("CAPTAINPVP_SINGLE"));
+ base.uiBehaviour.m_TeamMatch.SetEnable(specificDocument.SoloMatchType != KMatchType.KMT_HERO, false);
+ }
+
+ public void RefreshInfo()
+ {
+ base.uiBehaviour.m_BattleTotal.SetText(this._doc.BattleTotal.ToString());
+ base.uiBehaviour.m_BattleWin.SetText(this._doc.BattleWin.ToString());
+ base.uiBehaviour.m_BattleLose.SetText(this._doc.BattleLose.ToString());
+ bool flag = this._doc.BattleTotal == 0u;
+ if (flag)
+ {
+ base.uiBehaviour.m_BattleRate.SetText("0%");
+ }
+ else
+ {
+ base.uiBehaviour.m_BattleRate.SetText(string.Format("{0}%", (int)(this._doc.BattleWin * 100f / this._doc.BattleTotal)));
+ }
+ int @int = XSingleton<XGlobalConfig>.singleton.GetInt("HeroBattleSpecialNum");
+ base.uiBehaviour.m_WeekCurrentWin.SetText(this._doc.WinThisWeek.ToString());
+ base.uiBehaviour.m_ClickGet.SetVisible(this._doc.RewardState == HeroBattleRewardState.CanGet);
+ base.uiBehaviour.m_HadGet.SetActive(this._doc.RewardState == HeroBattleRewardState.GetEnd);
+ int num = Math.Max(@int - (int)this._doc.JoinToday, 0);
+ string arg = (num == 0) ? "[ff3e3e]" : "[00ff37]";
+ string arg2 = string.Format("{0}{1}[-]", arg, num);
+ HeroBattleWeekReward.RowData byid = this._doc.HeroBattleWeekRewardReader.GetByid(this._doc.GetRewardStage + 1u);
+ base.uiBehaviour.m_WeekBattleTips.SetText(string.Format(XStringDefineProxy.GetString("HeroBattleWeekRewardTips"), byid.winnum));
+ base.uiBehaviour.m_BattleTips.SetText(string.Format(XStringDefineProxy.GetString("HeroBattleRewardTips"), @int.ToString(), arg2, @int.ToString()));
+ base.uiBehaviour.m_RewardPool.ReturnAll(false);
+ Vector3 tplPos = base.uiBehaviour.m_RewardPool.TplPos;
+ List<ItemBrief> list = new List<ItemBrief>();
+ for (int i = 0; i < byid.reward.Length; i++)
+ {
+ ItemBrief itemBrief = new ItemBrief();
+ int num2;
+ int num3;
+ CVSReader.GetRowDataListByField<DropList.RowData, int>(XBagDocument.DropTable.Table, (int)byid.reward[i], out num2, out num3, XBagDocument.comp);
+ bool flag2 = num2 < 0;
+ if (!flag2)
+ {
+ itemBrief.itemID = (uint)XBagDocument.DropTable.Table[num2].ItemID;
+ itemBrief.itemCount = (uint)XBagDocument.DropTable.Table[num2].ItemCount;
+ itemBrief.isbind = XBagDocument.DropTable.Table[num2].ItemBind;
+ list.Add(itemBrief);
+ }
+ }
+ float num4 = tplPos.x - ((float)list.Count - 1f) / 2f * (float)base.uiBehaviour.m_RewardPool.TplWidth;
+ for (int j = 0; j < list.Count; j++)
+ {
+ GameObject gameObject = base.uiBehaviour.m_RewardPool.FetchGameObject(false);
+ gameObject.transform.parent = base.uiBehaviour.m_WeekRewardTs;
+ gameObject.transform.localPosition = new Vector3(num4 + (float)(j * base.uiBehaviour.m_RewardPool.TplWidth), tplPos.y);
+ ItemList.RowData itemConf = XBagDocument.GetItemConf((int)list[j].itemID);
+ XSingleton<XItemDrawerMgr>.singleton.normalItemDrawer.DrawItem(gameObject, itemConf, (int)list[j].itemCount, false);
+ XSingleton<XItemDrawerMgr>.singleton.normalItemDrawer.OpenClickShowTooltipEvent(gameObject, (int)list[j].itemID);
+ GameObject gameObject2 = gameObject.transform.Find("Other/RedPoint").gameObject;
+ gameObject2.SetActive(j == list.Count - 1 && this._doc.RewardState == HeroBattleRewardState.CanGet);
+ GameObject gameObject3 = gameObject.transform.Find("Other/OutterLight").gameObject;
+ gameObject3.SetActive(this._doc.RewardState == HeroBattleRewardState.CanGet);
+ }
+ List<int> intList = XSingleton<XGlobalConfig>.singleton.GetIntList("HeroBattleSpecialReward");
+ list.Clear();
+ for (int k = 0; k < intList.Count; k++)
+ {
+ ItemBrief itemBrief2 = new ItemBrief();
+ int num2;
+ int num3;
+ CVSReader.GetRowDataListByField<DropList.RowData, int>(XBagDocument.DropTable.Table, intList[k], out num2, out num3, XBagDocument.comp);
+ bool flag3 = num2 < 0;
+ if (!flag3)
+ {
+ itemBrief2.itemID = (uint)XBagDocument.DropTable.Table[num2].ItemID;
+ itemBrief2.itemCount = (uint)XBagDocument.DropTable.Table[num2].ItemCount;
+ itemBrief2.isbind = XBagDocument.DropTable.Table[num2].ItemBind;
+ list.Add(itemBrief2);
+ }
+ }
+ num4 = tplPos.x - ((float)list.Count - 1f) / 2f * (float)base.uiBehaviour.m_RewardPool.TplWidth;
+ for (int l = 0; l < list.Count; l++)
+ {
+ GameObject gameObject4 = base.uiBehaviour.m_RewardPool.FetchGameObject(false);
+ gameObject4.transform.parent = base.uiBehaviour.m_DayRewardTs;
+ gameObject4.transform.localPosition = new Vector3(num4 + (float)(l * base.uiBehaviour.m_RewardPool.TplWidth), tplPos.y);
+ ItemList.RowData itemConf2 = XBagDocument.GetItemConf((int)list[l].itemID);
+ XSingleton<XItemDrawerMgr>.singleton.normalItemDrawer.DrawItem(gameObject4, itemConf2, (int)list[l].itemCount, false);
+ XSingleton<XItemDrawerMgr>.singleton.normalItemDrawer.OpenClickShowTooltipEvent(gameObject4, (int)list[l].itemID);
+ GameObject gameObject5 = gameObject4.transform.Find("Other/RedPoint").gameObject;
+ gameObject5.SetActive(false);
+ GameObject gameObject6 = gameObject4.transform.Find("Other/OutterLight").gameObject;
+ gameObject6.SetActive(false);
+ }
+ }
+
+ private void SetupRewardPreView()
+ {
+ base.uiBehaviour.m_PreViewItemPool.ReturnAll(true);
+ base.uiBehaviour.m_PreViewBgPool.ReturnAll(false);
+ base.uiBehaviour.m_CurrentWinThisWeek.SetText(this._doc.WinThisWeek.ToString());
+ List<ItemBrief> list = new List<ItemBrief>();
+ Vector3 tplPos = base.uiBehaviour.m_PreViewItemPool.TplPos;
+ for (int i = 0; i < this._doc.HeroBattleWeekRewardReader.Table.Length; i++)
+ {
+ HeroBattleWeekReward.RowData rowData = this._doc.HeroBattleWeekRewardReader.Table[i];
+ GameObject gameObject = base.uiBehaviour.m_PreViewBgPool.FetchGameObject(false);
+ gameObject.transform.localPosition = new Vector3(base.uiBehaviour.m_PreViewBgPool.TplPos.x, base.uiBehaviour.m_PreViewBgPool.TplPos.y - (float)(i * base.uiBehaviour.m_PreViewBgPool.TplHeight));
+ IXUILabel ixuilabel = gameObject.transform.Find("Bg/Point/Num").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel.SetText(rowData.winnum.ToString());
+ list.Clear();
+ for (int j = 0; j < rowData.reward.Length; j++)
+ {
+ ItemBrief itemBrief = new ItemBrief();
+ int num;
+ int num2;
+ CVSReader.GetRowDataListByField<DropList.RowData, int>(XBagDocument.DropTable.Table, (int)rowData.reward[j], out num, out num2, XBagDocument.comp);
+ bool flag = num < 0;
+ if (!flag)
+ {
+ itemBrief.itemID = (uint)XBagDocument.DropTable.Table[num].ItemID;
+ itemBrief.itemCount = (uint)XBagDocument.DropTable.Table[num].ItemCount;
+ itemBrief.isbind = XBagDocument.DropTable.Table[num].ItemBind;
+ list.Add(itemBrief);
+ }
+ }
+ for (int k = 0; k < list.Count; k++)
+ {
+ GameObject gameObject2 = base.uiBehaviour.m_PreViewItemPool.FetchGameObject(false);
+ gameObject2.transform.localPosition = new Vector3(tplPos.x + (float)(k * base.uiBehaviour.m_PreViewItemPool.TplWidth), tplPos.y);
+ ItemList.RowData itemConf = XBagDocument.GetItemConf((int)list[k].itemID);
+ XSingleton<XItemDrawerMgr>.singleton.normalItemDrawer.DrawItem(gameObject2, itemConf, (int)list[k].itemCount, false);
+ XSingleton<XItemDrawerMgr>.singleton.normalItemDrawer.OpenClickShowTooltipEvent(gameObject2, (int)list[k].itemID);
+ }
+ tplPos.y -= (float)base.uiBehaviour.m_PreViewBgPool.TplHeight;
+ }
+ }
+
+ public void RefreshSelectMsg()
+ {
+ bool flag = !this._skillDoc.IsPreViewShow && !this._skillDoc.AlreadyGetList.Contains(this._skillDoc.CurrentSelect);
+ base.uiBehaviour.m_BuyBtn.SetVisible(flag);
+ bool flag2 = flag;
+ if (flag2)
+ {
+ OverWatchTable.RowData byHeroID = this._doc.OverWatchReader.GetByHeroID(this._skillDoc.CurrentSelect);
+ ItemList.RowData itemConf = XBagDocument.GetItemConf((int)byHeroID.Price[0]);
+ IXUISprite ixuisprite = base.uiBehaviour.m_BuyBtn.gameObject.transform.Find("Icon").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.spriteName = itemConf.ItemIcon1[0];
+ IXUILabel ixuilabel = base.uiBehaviour.m_BuyBtn.gameObject.transform.Find("Cost").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel.SetText(byHeroID.Price[1].ToString());
+ }
+ OverWatchTable.RowData byHeroID2 = this._doc.OverWatchReader.GetByHeroID(this._skillDoc.CurrentSelect);
+ bool flag3 = byHeroID2 == null;
+ if (flag3)
+ {
+ XSingleton<XDebug>.singleton.AddErrorLog("get hero data error! id = ", this._skillDoc.CurrentSelect.ToString(), null, null, null, null);
+ }
+ else
+ {
+ base.uiBehaviour.m_HeroDescription.SetText(XSingleton<UiUtility>.singleton.ReplaceReturn(byHeroID2.Description));
+ base.uiBehaviour.m_HeroName.SetText(byHeroID2.Name);
+ bool flag4 = !this._skillDoc.AlreadyGetList.Contains(this._skillDoc.CurrentSelect) && this._skillDoc.ExperienceList.Contains(this._skillDoc.CurrentSelect);
+ if (flag4)
+ {
+ base.uiBehaviour.m_ExperienceTime.SetVisible(true);
+ int totalSecond = (int)this._skillDoc.ExperienceTimeDict[this._skillDoc.CurrentSelect];
+ string text = string.Format(XStringDefineProxy.GetString("HeroBattleExperienceTime", new object[]
+ {
+ XSingleton<UiUtility>.singleton.TimeAccFormatString(totalSecond, 3, 0)
+ }), new object[0]);
+ base.uiBehaviour.m_ExperienceTime.SetText(text);
+ }
+ else
+ {
+ base.uiBehaviour.m_ExperienceTime.SetVisible(false);
+ }
+ XEntityStatistics.RowData byID = XSingleton<XEntityMgr>.singleton.EntityStatistics.GetByID(byHeroID2.StatisticsID[0]);
+ XEntityPresentation.RowData byPresentID = XSingleton<XEntityMgr>.singleton.EntityInfo.GetByPresentID(byID.PresentID);
+ bool flag5 = byID != null;
+ if (flag5)
+ {
+ this.m_Dummy = XSingleton<X3DAvatarMgr>.singleton.CreateCommonEntityDummy(this.m_dummPool, byID.PresentID, this.m_uiBehaviour.m_Snapshot, this.m_Dummy, 1f);
+ bool flag6 = this.m_Dummy != null;
+ if (flag6)
+ {
+ float interval = this.m_Dummy.SetAnimationGetLength(byHeroID2.SelectAnim);
+ XSingleton<XTimerMgr>.singleton.KillTimer(this._selectAnimToken);
+ this._selectAnimToken = XSingleton<XTimerMgr>.singleton.SetTimer(interval, new XTimerMgr.ElapsedEventHandler(this.SetIdleAnimation), byPresentID.AvatarPos[0]);
+ }
+ }
+ else
+ {
+ XSingleton<XDebug>.singleton.AddErrorLog("set model error. id = ", this._skillDoc.CurrentSelect.ToString(), null, null, null, null);
+ }
+ }
+ }
+
+ public void SetIdleAnimation(object o)
+ {
+ string animationGetLength = o as string;
+ bool flag = this.m_Dummy != null;
+ if (flag)
+ {
+ this.m_Dummy.SetAnimationGetLength(animationGetLength);
+ }
+ }
+
+ private bool OnCloseBtnClick(IXUIButton btn)
+ {
+ this.SetVisibleWithAnimation(false, null);
+ return true;
+ }
+
+ private bool OnHelpBtnClicked(IXUIButton btn)
+ {
+ DlgBase<XCommonHelpTipView, XCommonHelpTipBehaviour>.singleton.ShowHelp(XSysDefine.XSys_HeroBattle);
+ return true;
+ }
+
+ private void OnGetRewardClick(IXUISprite iSp)
+ {
+ this._doc.QueryGetReward();
+ }
+
+ private bool OnMonsterDrag(Vector2 delta)
+ {
+ bool flag = this.m_Dummy != null;
+ if (flag)
+ {
+ this.m_Dummy.EngineObject.Rotate(Vector3.up, -delta.x / 2f);
+ }
+ return true;
+ }
+
+ private bool OnBattleRecordBtnClick(IXUIButton btn)
+ {
+ this._doc.QueryBattleRecord();
+ this.m_HeroBattleRecordHandler.SetupRecord(this._doc.RecordList);
+ return true;
+ }
+
+ private bool OnRewardPreViewBtnClick(IXUIButton btn)
+ {
+ base.uiBehaviour.m_RewardPreViewFrame.SetActive(true);
+ this.SetupRewardPreView();
+ return true;
+ }
+
+ private bool OnRewardPreViewCloseBtnClick(IXUIButton btn)
+ {
+ base.uiBehaviour.m_RewardPreViewFrame.SetActive(false);
+ return true;
+ }
+
+ private bool OnShopBtnClick(IXUIButton btn)
+ {
+ DlgBase<MallSystemDlg, MallSystemBehaviour>.singleton.ShowShopSystem(XSysDefine.XSys_Mall_Honer, 0UL);
+ return true;
+ }
+
+ private bool OnSkillPreViewBtnClick(IXUIButton btn)
+ {
+ this.m_HeroBattleSkillHandler.SetSkillPreViewState(true, 0);
+ return true;
+ }
+
+ private bool OnBuyBtnClick(IXUIButton btn)
+ {
+ this._skillDoc.QueryBuyHero(this._skillDoc.CurrentSelect);
+ return true;
+ }
+
+ private bool OnSingleMatchBtnClick(IXUIButton btn)
+ {
+ XTeamDocument specificDocument = XDocuments.GetSpecificDocument<XTeamDocument>(XTeamDocument.uuID);
+ bool bInTeam = specificDocument.bInTeam;
+ bool result;
+ if (bInTeam)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString("CAPTAIN_SINGLE_MATCH_TIP"), "fece00");
+ result = false;
+ }
+ else
+ {
+ KMatchOp op = (specificDocument.SoloMatchType != KMatchType.KMT_HERO) ? KMatchOp.KMATCH_OP_START : KMatchOp.KMATCH_OP_STOP;
+ specificDocument.ReqMatchStateChange(KMatchType.KMT_HERO, op, false);
+ result = true;
+ }
+ return result;
+ }
+
+ private bool OnTeamMatchBtnClick(IXUIButton btn)
+ {
+ this.SetVisible(false, true);
+ XExpeditionDocument specificDocument = XDocuments.GetSpecificDocument<XExpeditionDocument>(XExpeditionDocument.uuID);
+ List<ExpeditionTable.RowData> expeditionList = specificDocument.GetExpeditionList(TeamLevelType.TeamLevelHeroBattle);
+ XTeamDocument specificDocument2 = XDocuments.GetSpecificDocument<XTeamDocument>(XTeamDocument.uuID);
+ bool flag = expeditionList.Count > 0;
+ if (flag)
+ {
+ specificDocument2.SetAndMatch(expeditionList[0].DNExpeditionID);
+ }
+ return true;
+ }
+
+ private bool OnRankBtnClick(IXUIButton btn)
+ {
+ base.uiBehaviour.m_RankFrame.SetActive(true);
+ this._doc.QueryRankInfo();
+ this.SetupRankFrame();
+ return true;
+ }
+
+ private bool OnRankCloseBtnClick(IXUIButton btn)
+ {
+ base.uiBehaviour.m_RankFrame.SetActive(false);
+ return true;
+ }
+
+ public void SetupRankFrame()
+ {
+ bool flag = !base.uiBehaviour.m_RankFrame.activeInHierarchy;
+ if (!flag)
+ {
+ this.SetRankTpl(base.uiBehaviour.m_MyRankTs, 0, true);
+ base.uiBehaviour.m_RankWrapContent.SetContentCount(this._doc.MainRankList.Count, false);
+ base.uiBehaviour.m_RankScrollView.ResetPosition();
+ }
+ }
+
+ public void WrapListUpdated(Transform t, int index)
+ {
+ bool flag = index < 0 || index >= this._doc.MainRankList.Count;
+ if (!flag)
+ {
+ this.SetRankTpl(t, index, false);
+ }
+ }
+
+ public void SetRankTpl(Transform t, int index, bool isMy)
+ {
+ HeroBattleRankData heroBattleRankData = isMy ? this._doc.MyRankData : this._doc.MainRankList[index];
+ IXUILabel ixuilabel = t.Find("Rank").GetComponent("XUILabel") as IXUILabel;
+ IXUISprite ixuisprite = t.Find("RankImage").GetComponent("XUISprite") as IXUISprite;
+ IXUILabel ixuilabel2 = t.Find("Name").GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel3 = t.Find("Value1").GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel4 = t.Find("Value2").GetComponent("XUILabel") as IXUILabel;
+ bool flag = heroBattleRankData.rank < 3u;
+ if (flag)
+ {
+ ixuisprite.SetVisible(true);
+ ixuilabel.SetVisible(false);
+ ixuisprite.spriteName = string.Format("N{0}", heroBattleRankData.rank + 1u);
+ }
+ else
+ {
+ ixuisprite.SetVisible(false);
+ ixuilabel.SetVisible(true);
+ ixuilabel.SetText(string.Format("No.{0}", heroBattleRankData.rank + 1u));
+ }
+ if (isMy)
+ {
+ bool flag2 = heroBattleRankData.rank == uint.MaxValue;
+ if (flag2)
+ {
+ base.uiBehaviour.m_OutOfRank.SetActive(true);
+ ixuisprite.SetVisible(false);
+ ixuilabel.SetVisible(false);
+ }
+ else
+ {
+ base.uiBehaviour.m_OutOfRank.SetActive(false);
+ }
+ }
+ bool flag3 = heroBattleRankData.fightTotal == 0u;
+ int num;
+ if (flag3)
+ {
+ num = 0;
+ }
+ else
+ {
+ num = (int)Mathf.Floor(heroBattleRankData.winTotal * 100u / heroBattleRankData.fightTotal);
+ }
+ ixuilabel2.SetText(heroBattleRankData.name);
+ ixuilabel3.SetText(string.Format("{0}%", num));
+ ixuilabel4.SetText(heroBattleRankData.fightTotal.ToString());
+ ixuilabel2.ID = heroBattleRankData.roleID;
+ ixuilabel2.RegisterLabelClickEventHandler(new LabelClickEventHandler(this.OnPlayerInfoClick));
+ }
+
+ private void OnPlayerInfoClick(IXUILabel label)
+ {
+ bool flag = label.ID == 0UL;
+ if (!flag)
+ {
+ XCharacterCommonMenuDocument.ReqCharacterMenuInfo(label.ID, false);
+ }
+ }
+
+ private void OnPrivilegeClick(IXUISprite btn)
+ {
+ DlgBase<XWelfareView, XWelfareBehaviour>.singleton.CheckActiveMemberPrivilege(MemberPrivilege.KingdomPrivilege_Adventurer);
+ }
+
+ private void OnResearchBtnClick(IXUISprite iSp)
+ {
+ XSingleton<UiUtility>.singleton.OpenHtmlUrl("HeroBattlePlayUrl");
+ }
+
+ private void RefreshPrivilegeInfo()
+ {
+ XWelfareDocument specificDocument = XDocuments.GetSpecificDocument<XWelfareDocument>(XWelfareDocument.uuID);
+ base.uiBehaviour.m_PrivilegeIcon.SetGrey(specificDocument.IsOwnMemberPrivilege(MemberPrivilege.KingdomPrivilege_Adventurer));
+ base.uiBehaviour.m_PrivilegeIcon.SetSprite(specificDocument.GetMemberPrivilegeIcon(MemberPrivilege.KingdomPrivilege_Adventurer));
+ base.uiBehaviour.m_PrivilegeName.SetEnabled(specificDocument.IsOwnMemberPrivilege(MemberPrivilege.KingdomPrivilege_Adventurer));
+ PayMemberTable.RowData memberPrivilegeConfig = specificDocument.GetMemberPrivilegeConfig(MemberPrivilege.KingdomPrivilege_Adventurer);
+ bool flag = memberPrivilegeConfig != null;
+ if (flag)
+ {
+ base.uiBehaviour.m_PrivilegeName.SetText(XStringDefineProxy.GetString("HeroBattlePrevilege", new object[]
+ {
+ memberPrivilegeConfig.HeroBattleFree
+ }));
+ }
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/HeroBattleDlg.cs.meta b/Client/Assets/Scripts/XMainClient/UI/HeroBattleDlg.cs.meta
new file mode 100644
index 00000000..69709320
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/HeroBattleDlg.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 9c5e748c72fc80b46a95add89190591c
+timeCreated: 1611404232
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/HeroBattleHandler.cs b/Client/Assets/Scripts/XMainClient/UI/HeroBattleHandler.cs
new file mode 100644
index 00000000..8c394044
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/HeroBattleHandler.cs
@@ -0,0 +1,655 @@
+using System;
+using System.Collections.Generic;
+using KKSG;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class HeroBattleHandler : DlgHandlerBase
+ {
+ protected override string FileName
+ {
+ get
+ {
+ return "Battle/HeroBattleHandler";
+ }
+ }
+
+ private XHeroBattleDocument _doc = null;
+
+ private XHeroBattleSkillDocument _skillDoc = null;
+
+ private List<HeroBattleTeam> m_Team = new List<HeroBattleTeam>();
+
+ private GameObject m_Death;
+
+ private IXUILabel m_ReviveLeftTime;
+
+ private Transform m_ProgressTs;
+
+ private IXUILabel m_ProgressTips;
+
+ private Transform m_ProgressTipsTs;
+
+ private IXUIProgress m_Progress;
+
+ private Transform m_AddTimeTs;
+
+ private IXUIProgress m_AddTimeProgress;
+
+ private IXUIButton m_ChangeHeroBtn;
+
+ private IXUILabel m_KillText;
+
+ private IXUILabel m_DeadText;
+
+ private IXUILabel m_AssitText;
+
+ private Transform m_AncientParent;
+
+ private IXUILabel m_AncientPercent;
+
+ private IXUIProgress m_AncientSlider;
+
+ private IXUISprite[] m_AncientSkill = new IXUISprite[3];
+
+ private bool _isAncientFull;
+
+ private IXUISprite m_AttrShowBtn;
+
+ private IXUISprite m_AncientTipsBtn;
+
+ private IXUISprite m_AncientTipsCloseBtn;
+
+ private IXUILabel m_AncientTips;
+
+ private uint m_AncientTipsCloseToken;
+
+ private Color blueColor;
+
+ private Color redColor;
+
+ private XFx _Fx;
+
+ private XFx _OccupantFx;
+
+ private XFx _EndFx;
+
+ private uint _MiniMapFxToken;
+
+ private uint _CurrentOccupant;
+
+ private bool _InCircleMyself;
+
+ private bool _IsInFight;
+
+ private uint _ProgressTeam;
+
+ private bool _InAddTime;
+
+ private float _AddTimePerTurn;
+
+ private float _SignTime;
+
+ private bool _OnDeath;
+
+ private float _ReviveTime;
+
+ private float _ReviveSignTime;
+
+ private float _LootProgress;
+
+ private bool _HaveEnd;
+
+ private XFx[] _skillFx = new XFx[3];
+
+ private XFx _barFx;
+
+ public MapSignalHandler m_MapSignalHandler;
+
+ protected override void Init()
+ {
+ base.Init();
+ this._doc = XDocuments.GetSpecificDocument<XHeroBattleDocument>(XHeroBattleDocument.uuID);
+ this._skillDoc = XDocuments.GetSpecificDocument<XHeroBattleSkillDocument>(XHeroBattleSkillDocument.uuID);
+ this._doc._HeroBattleHandler = this;
+ this.m_Death = base.transform.Find("Death").gameObject;
+ this.m_Death.transform.localPosition = XGameUI.Far_Far_Away;
+ this.m_ReviveLeftTime = (this.m_Death.transform.Find("LeftTime").GetComponent("XUILabel") as IXUILabel);
+ this.m_ChangeHeroBtn = (this.m_Death.gameObject.transform.Find("ChangeHeroBtn").GetComponent("XUIButton") as IXUIButton);
+ this.m_ProgressTs = base.transform.Find("Progress");
+ this.m_ProgressTipsTs = base.transform.Find("TextTs");
+ this.m_ProgressTs.localPosition = XGameUI.Far_Far_Away;
+ this.m_ProgressTipsTs.localPosition = XGameUI.Far_Far_Away;
+ this.m_Progress = (this.m_ProgressTs.Find("ProgressBar").GetComponent("XUIProgress") as IXUIProgress);
+ this.m_AddTimeTs = base.transform.Find("AddTime");
+ this.m_AddTimeTs.localPosition = XGameUI.Far_Far_Away;
+ this.m_AddTimeProgress = (this.m_AddTimeTs.Find("AddtimeBar").GetComponent("XUIProgress") as IXUIProgress);
+ this.m_ProgressTips = (base.transform.Find("TextTs/Text").GetComponent("XUILabel") as IXUILabel);
+ this.m_ProgressTips.SetText(XStringDefineProxy.GetString("HeroBattleLoot"));
+ GameObject gameObject = base.transform.Find("Score").gameObject;
+ gameObject.SetActive(!XSingleton<XScene>.singleton.bSpectator);
+ this.m_KillText = (base.transform.Find("Score/kill").GetComponent("XUILabel") as IXUILabel);
+ this.m_DeadText = (base.transform.Find("Score/dead").GetComponent("XUILabel") as IXUILabel);
+ this.m_AssitText = (base.transform.Find("Score/help").GetComponent("XUILabel") as IXUILabel);
+ this.m_AttrShowBtn = (base.transform.Find("AttrShowBtn").GetComponent("XUISprite") as IXUISprite);
+ this.m_AncientParent = base.transform.Find("AncientBarParent");
+ this.m_AncientPercent = (base.transform.Find("AncientBarParent/AncientSkillBar/Num").GetComponent("XUILabel") as IXUILabel);
+ this.m_AncientSlider = (base.transform.Find("AncientBarParent/AncientSkillBar").GetComponent("XUIProgress") as IXUIProgress);
+ for (int i = 0; i < 3; i++)
+ {
+ this.m_AncientSkill[i] = (base.transform.Find(string.Format("AncientSkill/Skill{0}", i)).GetComponent("XUISprite") as IXUISprite);
+ this.m_AncientSkill[i].ID = (ulong)((long)i + 1L);
+ this.m_AncientSkill[i].RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnAncientSkillClick));
+ this.m_AncientSkill[i].SetVisible(false);
+ }
+ this._isAncientFull = false;
+ this.SetAncientPercent(0f);
+ this.m_AncientTipsBtn = (base.transform.Find("AncientBarParent/AncientSkillBar/Foreground").GetComponent("XUISprite") as IXUISprite);
+ this.m_AncientTips = (base.transform.Find("AncientTips/Desc").GetComponent("XUILabel") as IXUILabel);
+ this.m_AncientTipsCloseBtn = (base.transform.Find("AncientTips/Close").GetComponent("XUISprite") as IXUISprite);
+ this.m_AncientTips.gameObject.transform.parent.gameObject.SetActive(false);
+ this.m_Team.Clear();
+ HeroBattleTeam item = new HeroBattleTeam(base.transform.Find("Scoreboard/BlueTeam"));
+ HeroBattleTeam item2 = new HeroBattleTeam(base.transform.Find("Scoreboard/RedTeam"));
+ this.m_Team.Add(item);
+ this.m_Team.Add(item2);
+ List<int> intList = XSingleton<XGlobalConfig>.singleton.GetIntList("HeroBattleBlueColor");
+ this.blueColor = new Color((float)intList[0] / 255f, (float)intList[1] / 255f, (float)intList[2] / 255f);
+ intList = XSingleton<XGlobalConfig>.singleton.GetIntList("HeroBattleRedColor");
+ this.redColor = new Color((float)intList[0] / 255f, (float)intList[1] / 255f, (float)intList[2] / 255f);
+ this._AddTimePerTurn = float.Parse(XSingleton<XGlobalConfig>.singleton.GetValue("HeroBattleOverTime"));
+ this._ReviveTime = float.Parse(XSingleton<XGlobalConfig>.singleton.GetValue("HeroBattleReviveTime"));
+ this._CurrentOccupant = 0u;
+ this._InCircleMyself = false;
+ this._IsInFight = false;
+ this._ProgressTeam = 0u;
+ this._LootProgress = 0f;
+ this._MiniMapFxToken = 0u;
+ this._InAddTime = false;
+ this._OnDeath = false;
+ this._HaveEnd = false;
+ this.SetFx(0u);
+ bool bSpectator = XSingleton<XScene>.singleton.bSpectator;
+ if (bSpectator)
+ {
+ this.m_AncientSlider.SetVisible(false);
+ base.transform.Find("MapSignalHandler").gameObject.SetActive(false);
+ this.m_AttrShowBtn.SetVisible(false);
+ }
+ else
+ {
+ DlgHandlerBase.EnsureCreate<MapSignalHandler>(ref this.m_MapSignalHandler, base.transform.Find("MapSignalHandler").gameObject, this, true);
+ }
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ this.m_ChangeHeroBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnChangeHeroBtnClick));
+ this.m_AttrShowBtn.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnAttrShowBtnClick));
+ this.m_AncientTipsBtn.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnAncientTipsBtnClick));
+ this.m_AncientTipsCloseBtn.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnAncientCloseBtnClick));
+ }
+
+ public void OnAttrShowBtnClick(IXUISprite isp)
+ {
+ bool flag = XSingleton<XAttributeMgr>.singleton.XPlayerData == null;
+ if (!flag)
+ {
+ uint num = 0u;
+ this._doc.heroIDIndex.TryGetValue(XSingleton<XAttributeMgr>.singleton.XPlayerData.RoleID, out num);
+ bool flag2 = num > 0u;
+ if (flag2)
+ {
+ DlgBase<HeroAttrDlg, HeroAttrBehaviour>.singleton.ShowByType(SceneType.SCENE_HEROBATTLE, num);
+ }
+ }
+ }
+
+ public override void OnUnload()
+ {
+ this._doc._HeroBattleHandler = null;
+ XSingleton<XTimerMgr>.singleton.KillTimer(this.m_AncientTipsCloseToken);
+ bool flag = this._Fx != null;
+ if (flag)
+ {
+ XSingleton<XFxMgr>.singleton.DestroyFx(this._Fx, true);
+ this._Fx = null;
+ }
+ bool flag2 = this._OccupantFx != null;
+ if (flag2)
+ {
+ XSingleton<XFxMgr>.singleton.DestroyFx(this._OccupantFx, true);
+ this._OccupantFx = null;
+ }
+ bool flag3 = this._EndFx != null;
+ if (flag3)
+ {
+ XSingleton<XFxMgr>.singleton.DestroyFx(this._EndFx, true);
+ this._EndFx = null;
+ }
+ bool flag4 = this._barFx != null;
+ if (flag4)
+ {
+ XSingleton<XFxMgr>.singleton.DestroyFx(this._barFx, true);
+ this._barFx = null;
+ }
+ for (int i = 0; i < this._skillFx.Length; i++)
+ {
+ bool flag5 = this._skillFx[i] != null;
+ if (flag5)
+ {
+ XSingleton<XFxMgr>.singleton.DestroyFx(this._skillFx[i], true);
+ this._skillFx[i] = null;
+ }
+ }
+ bool bSpectator = XSingleton<XScene>.singleton.bSpectator;
+ if (bSpectator)
+ {
+ XSpectateSceneDocument.DelMiniMapFx(this._MiniMapFxToken);
+ }
+ else
+ {
+ XBattleDocument.DelMiniMapFx(this._MiniMapFxToken);
+ }
+ bool flag6 = this.m_MapSignalHandler != null;
+ if (flag6)
+ {
+ DlgHandlerBase.EnsureUnload<MapSignalHandler>(ref this.m_MapSignalHandler);
+ }
+ base.OnUnload();
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ }
+
+ public void SetTeamData(HeroBattleTeamMsg data)
+ {
+ int num = (this._doc.MyTeam == data.teamdata[0].teamid) ? 0 : 1;
+ this.m_Team[0].Score = data.teamdata[num].point;
+ this.m_Team[1].Score = data.teamdata[1 - num].point;
+ bool flag = !this._HaveEnd;
+ if (flag)
+ {
+ bool flag2 = data.teamdata[0].point == 100u || data.teamdata[1].point == 100u;
+ if (flag2)
+ {
+ this._HaveEnd = true;
+ bool flag3 = data.teamdata[0].point == 100u;
+ if (flag3)
+ {
+ this.SetResultFx(data.teamdata[0].teamid == this._doc.MyTeam);
+ }
+ else
+ {
+ this.SetResultFx(data.teamdata[1].teamid == this._doc.MyTeam);
+ }
+ }
+ }
+ }
+
+ public void SetResultFx(bool isWinMySelf)
+ {
+ HeroBattleMapCenter.RowData bySceneID = this._doc.HeroBattleMapReader.GetBySceneID(XSingleton<XScene>.singleton.SceneID);
+ bool flag = bySceneID == null;
+ if (flag)
+ {
+ XSingleton<XDebug>.singleton.AddErrorLog("Can't find hero battle map data by sceneID = ", XSingleton<XScene>.singleton.SceneID.ToString(), null, null, null, null);
+ }
+ else
+ {
+ Vector3 position;
+ position= new Vector3(bySceneID.Center[0], bySceneID.Center[1], bySceneID.Center[2]);
+ bool flag2 = this._EndFx != null;
+ if (flag2)
+ {
+ XSingleton<XFxMgr>.singleton.DestroyFx(this._EndFx, true);
+ }
+ if (isWinMySelf)
+ {
+ this._EndFx = XSingleton<XFxMgr>.singleton.CreateFx(bySceneID.OccWinFx[0], null, true);
+ }
+ else
+ {
+ this._EndFx = XSingleton<XFxMgr>.singleton.CreateFx(bySceneID.OccWinFx[1], null, true);
+ }
+ this._EndFx.Play(position, Quaternion.identity, Vector3.one, 1f);
+ }
+ }
+
+ public void SetProgressData(HeroBattleSyncData data)
+ {
+ bool flag = this._IsInFight != data.isInFight;
+ if (flag)
+ {
+ this.m_ProgressTips.SetText(XStringDefineProxy.GetString(data.isInFight ? "HeroBattleInFight" : "HeroBattleLoot"));
+ this._IsInFight = data.isInFight;
+ }
+ bool flag2 = this._CurrentOccupant != data.occupant;
+ int num;
+ if (flag2)
+ {
+ num = ((this._doc.MyTeam == data.occupant) ? 0 : 1);
+ this.m_Team[num].SetOccupantState(true);
+ this.m_Team[1 - num].SetOccupantState(false);
+ this._CurrentOccupant = data.occupant;
+ this.SetFx(this._CurrentOccupant);
+ }
+ num = ((this._doc.MyTeam == data.lootTeam) ? 0 : 1);
+ bool flag3 = this._ProgressTeam != data.lootTeam;
+ if (flag3)
+ {
+ bool flag4 = data.lootTeam > 0u;
+ if (flag4)
+ {
+ this.m_Progress.SetForegroundColor((num == 0) ? this.blueColor : this.redColor);
+ this.m_Team[(this._ProgressTeam == this._doc.MyTeam) ? 0 : 1].SetOccupyValue(0f);
+ }
+ else
+ {
+ this.m_Team[(this._ProgressTeam == this._doc.MyTeam) ? 0 : 1].SetOccupyValue(0f);
+ this.m_ProgressTs.localPosition = XGameUI.Far_Far_Away;
+ this.m_ProgressTipsTs.localPosition = XGameUI.Far_Far_Away;
+ }
+ this._ProgressTeam = data.lootTeam;
+ }
+ bool flag5 = this._ProgressTeam > 0u;
+ if (flag5)
+ {
+ this.m_Team[num].SetOccupyValue(data.lootProgress / 100f);
+ this.m_Progress.value = data.lootProgress / 100f;
+ this._LootProgress = data.lootProgress;
+ }
+ this.m_ProgressTs.localPosition = ((this._InCircleMyself && this._ProgressTeam != 0u && this._LootProgress > 0.5f) ? Vector3.zero : XGameUI.Far_Far_Away);
+ this.m_ProgressTipsTs.localPosition = ((this._IsInFight || (this._InCircleMyself && this._ProgressTeam != 0u)) ? Vector3.zero : XGameUI.Far_Far_Away);
+ }
+
+ public void SetInCircleData(HeroBattleInCircle data)
+ {
+ bool flag = false;
+ bool bSpectator = XSingleton<XScene>.singleton.bSpectator;
+ if (bSpectator)
+ {
+ flag = true;
+ }
+ else
+ {
+ for (int i = 0; i < data.roleInCircle.Count; i++)
+ {
+ bool flag2 = data.roleInCircle[i] == XSingleton<XAttributeMgr>.singleton.XPlayerData.RoleID;
+ if (flag2)
+ {
+ flag = true;
+ }
+ }
+ }
+ bool flag3 = this._InCircleMyself != flag;
+ if (flag3)
+ {
+ this._InCircleMyself = flag;
+ this.m_ProgressTs.localPosition = ((this._InCircleMyself && this._ProgressTeam != 0u && this._LootProgress > 0.5f) ? Vector3.zero : XGameUI.Far_Far_Away);
+ }
+ this.m_ProgressTipsTs.localPosition = ((this._IsInFight || (this._InCircleMyself && this._ProgressTeam != 0u)) ? Vector3.zero : XGameUI.Far_Far_Away);
+ }
+
+ public void StartAddTime(int time)
+ {
+ this._InAddTime = (time != 0);
+ this._AddTimePerTurn = (float)time / 1000f;
+ this.m_AddTimeTs.localPosition = (this._InAddTime ? Vector3.zero : XGameUI.Far_Far_Away);
+ this._SignTime = Time.realtimeSinceStartup;
+ }
+
+ public void RefreshScoreBoard(uint kill, uint dead, uint assit)
+ {
+ this.m_KillText.SetText(kill.ToString());
+ this.m_DeadText.SetText(dead.ToString());
+ this.m_AssitText.SetText(assit.ToString());
+ }
+
+ public void SetFx(uint occupant)
+ {
+ HeroBattleMapCenter.RowData bySceneID = this._doc.HeroBattleMapReader.GetBySceneID(XSingleton<XScene>.singleton.SceneID);
+ bool flag = bySceneID == null;
+ if (flag)
+ {
+ XSingleton<XDebug>.singleton.AddErrorLog("Can't find hero battle map data by sceneID = ", XSingleton<XScene>.singleton.SceneID.ToString(), null, null, null, null);
+ }
+ else
+ {
+ Vector3 vector;
+ vector= new Vector3(bySceneID.Center[0], bySceneID.Center[1], bySceneID.Center[2]);
+ float num = bySceneID.Param[0] * bySceneID.ClientFxScalse;
+ float num2 = ((bySceneID.CenterType == 1u) ? bySceneID.Param[0] : bySceneID.Param[1]) * bySceneID.ClientFxScalse;
+ Vector3 scale;
+ scale= new Vector3(num, 1f, num2);
+ bool flag2 = this._Fx != null;
+ if (flag2)
+ {
+ XSingleton<XFxMgr>.singleton.DestroyFx(this._Fx, true);
+ this._Fx = null;
+ }
+ bool bSpectator = XSingleton<XScene>.singleton.bSpectator;
+ if (bSpectator)
+ {
+ XSpectateSceneDocument.DelMiniMapFx(this._MiniMapFxToken);
+ }
+ else
+ {
+ XBattleDocument.DelMiniMapFx(this._MiniMapFxToken);
+ }
+ bool flag3 = occupant == 0u;
+ if (flag3)
+ {
+ this._Fx = XSingleton<XFxMgr>.singleton.CreateFx(bySceneID.OccupantFx[0], null, true);
+ bool bSpectator2 = XSingleton<XScene>.singleton.bSpectator;
+ if (bSpectator2)
+ {
+ this._MiniMapFxToken = XSpectateSceneDocument.AddMiniMapFx(vector, bySceneID.MiniMapFx[0]);
+ }
+ else
+ {
+ this._MiniMapFxToken = XBattleDocument.AddMiniMapFx(vector, bySceneID.MiniMapFx[0]);
+ }
+ }
+ else
+ {
+ bool flag4 = occupant == this._doc.MyTeam;
+ if (flag4)
+ {
+ this._Fx = XSingleton<XFxMgr>.singleton.CreateFx(bySceneID.OccupantFx[1], null, true);
+ bool bSpectator3 = XSingleton<XScene>.singleton.bSpectator;
+ if (bSpectator3)
+ {
+ this._MiniMapFxToken = XSpectateSceneDocument.AddMiniMapFx(vector, bySceneID.MiniMapFx[1]);
+ }
+ else
+ {
+ this._MiniMapFxToken = XBattleDocument.AddMiniMapFx(vector, bySceneID.MiniMapFx[1]);
+ }
+ }
+ else
+ {
+ this._Fx = XSingleton<XFxMgr>.singleton.CreateFx(bySceneID.OccupantFx[2], null, true);
+ bool bSpectator4 = XSingleton<XScene>.singleton.bSpectator;
+ if (bSpectator4)
+ {
+ this._MiniMapFxToken = XSpectateSceneDocument.AddMiniMapFx(vector, bySceneID.MiniMapFx[2]);
+ }
+ else
+ {
+ this._MiniMapFxToken = XBattleDocument.AddMiniMapFx(vector, bySceneID.MiniMapFx[2]);
+ }
+ }
+ }
+ this._Fx.Play(vector, Quaternion.identity, scale, 1f);
+ bool flag5 = occupant > 0u;
+ if (flag5)
+ {
+ bool flag6 = this._OccupantFx != null;
+ if (flag6)
+ {
+ XSingleton<XFxMgr>.singleton.DestroyFx(this._OccupantFx, true);
+ }
+ bool flag7 = occupant == this._doc.MyTeam;
+ if (flag7)
+ {
+ this._OccupantFx = XSingleton<XFxMgr>.singleton.CreateFx(bySceneID.OccSuccessFx[0], null, true);
+ }
+ else
+ {
+ this._OccupantFx = XSingleton<XFxMgr>.singleton.CreateFx(bySceneID.OccSuccessFx[1], null, true);
+ }
+ this._OccupantFx.Play(vector, Quaternion.identity, scale, 1f);
+ }
+ }
+ }
+
+ private bool OnChangeHeroBtnClick(IXUIButton btn)
+ {
+ bool flag = this._skillDoc.m_HeroBattleSkillHandler != null;
+ if (flag)
+ {
+ this._skillDoc.m_HeroBattleSkillHandler.SetVisible(true);
+ this._skillDoc.m_HeroBattleSkillHandler.RefreshTab();
+ }
+ return true;
+ }
+
+ public void SetDeathGoState(bool state)
+ {
+ this.m_Death.gameObject.transform.localPosition = (state ? Vector3.zero : XGameUI.Far_Far_Away);
+ }
+
+ public void SetReviveLeftTime()
+ {
+ this._OnDeath = true;
+ this._ReviveSignTime = Time.realtimeSinceStartup;
+ }
+
+ public override void OnUpdate()
+ {
+ bool inAddTime = this._InAddTime;
+ if (inAddTime)
+ {
+ float num = Time.realtimeSinceStartup - this._SignTime;
+ this.m_AddTimeProgress.value = 1f - num / this._AddTimePerTurn;
+ bool flag = num > this._AddTimePerTurn;
+ if (flag)
+ {
+ this._InAddTime = false;
+ this.m_AddTimeTs.localPosition = XGameUI.Far_Far_Away;
+ }
+ }
+ bool onDeath = this._OnDeath;
+ if (onDeath)
+ {
+ float num = Time.realtimeSinceStartup - this._ReviveSignTime;
+ int num2 = (int)(this._ReviveTime - num);
+ this.m_ReviveLeftTime.SetText(num2.ToString());
+ bool flag2 = this._ReviveTime - num < 0f;
+ if (flag2)
+ {
+ this._OnDeath = false;
+ }
+ }
+ }
+
+ private void PlayShowSkillFx()
+ {
+ bool flag = this._barFx != null;
+ if (flag)
+ {
+ XSingleton<XFxMgr>.singleton.DestroyFx(this._barFx, true);
+ }
+ this._barFx = XSingleton<XFxMgr>.singleton.CreateUIFx("Effects/FX_Particle/UIfx/UI_yxxg_jindutiao", this.m_AncientParent, false);
+ for (int i = 0; i < 3; i++)
+ {
+ bool flag2 = this._skillFx[i] != null;
+ if (flag2)
+ {
+ XSingleton<XFxMgr>.singleton.DestroyFx(this._skillFx[i], true);
+ }
+ switch (i)
+ {
+ case 0:
+ this._skillFx[i] = XSingleton<XFxMgr>.singleton.CreateUIFx("Effects/FX_Particle/UIfx/UI_yxxg_tubiao_hong", this.m_AncientSkill[i].transform, false);
+ break;
+ case 1:
+ this._skillFx[i] = XSingleton<XFxMgr>.singleton.CreateUIFx("Effects/FX_Particle/UIfx/UI_yxxg_tubiao_lan", this.m_AncientSkill[i].transform, false);
+ break;
+ case 2:
+ this._skillFx[i] = XSingleton<XFxMgr>.singleton.CreateUIFx("Effects/FX_Particle/UIfx/UI_yxxg_tubiao_lu", this.m_AncientSkill[i].transform, false);
+ break;
+ }
+ }
+ }
+
+ protected void DestroyShowSkillFx(object o)
+ {
+ GameObject o2 = o as GameObject;
+ XSingleton<XResourceLoaderMgr>.singleton.UnSafeDestroy(o2, true, false);
+ }
+
+ private void OnAncientSkillClick(IXUISprite iSp)
+ {
+ this._doc.QueryUseAncientSkill((int)iSp.ID);
+ }
+
+ public void SetAncientPercent(float percent)
+ {
+ bool flag = percent > 99.99f;
+ if (flag)
+ {
+ percent = 100f;
+ }
+ bool flag2 = percent == 100f;
+ bool flag3 = flag2 != this._isAncientFull;
+ if (flag3)
+ {
+ for (int i = 0; i < 3; i++)
+ {
+ this.m_AncientSkill[i].SetVisible(flag2);
+ }
+ this.m_AncientSlider.SetVisible(!flag2);
+ bool flag4 = flag2;
+ if (flag4)
+ {
+ this.PlayShowSkillFx();
+ }
+ this._isAncientFull = flag2;
+ bool flag5 = flag2;
+ if (flag5)
+ {
+ this.OnAncientCloseBtnClick(null);
+ }
+ }
+ this.m_AncientSlider.value = percent / 100f;
+ this.m_AncientPercent.SetText(string.Format("{0}%", (int)(percent + 0.49f)));
+ }
+
+ public void OnAncientTipsBtnClick(IXUISprite iSp)
+ {
+ this.m_AncientTips.gameObject.transform.parent.gameObject.SetActive(true);
+ this.m_AncientTips.SetText(XSingleton<UiUtility>.singleton.ReplaceReturn(XStringDefineProxy.GetString("HeroBattleAncientTips")));
+ this.m_AncientTipsCloseToken = XSingleton<XTimerMgr>.singleton.SetTimer(5f, new XTimerMgr.ElapsedEventHandler(this.AutoClose), null);
+ }
+
+ public void AutoClose(object o = null)
+ {
+ this.OnAncientCloseBtnClick(null);
+ }
+
+ public void OnAncientCloseBtnClick(IXUISprite iSp)
+ {
+ this.m_AncientTips.gameObject.transform.parent.gameObject.SetActive(false);
+ XSingleton<XTimerMgr>.singleton.KillTimer(this.m_AncientTipsCloseToken);
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/HeroBattleHandler.cs.meta b/Client/Assets/Scripts/XMainClient/UI/HeroBattleHandler.cs.meta
new file mode 100644
index 00000000..1530f396
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/HeroBattleHandler.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 078e63b8dcbc7f54eb08f2aaed1ec40d
+timeCreated: 1611402968
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/HeroBattleMVPDlg.cs b/Client/Assets/Scripts/XMainClient/UI/HeroBattleMVPDlg.cs
new file mode 100644
index 00000000..e7e553dd
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/HeroBattleMVPDlg.cs
@@ -0,0 +1,130 @@
+using System;
+using KKSG;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class HeroBattleMVPDlg : DlgBase<HeroBattleMVPDlg, HeroBattleMVPBehaviour>
+ {
+ public override bool autoload
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override string fileName
+ {
+ get
+ {
+ return "GameSystem/HeroBattleMVPDlg";
+ }
+ }
+
+ private XLevelRewardDocument _doc = null;
+
+ private uint _timerToken;
+
+ private float _signTime;
+
+ private float _miniCloseTime;
+
+ protected override void Init()
+ {
+ base.Init();
+ this._doc = XDocuments.GetSpecificDocument<XLevelRewardDocument>(XLevelRewardDocument.uuID);
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ base.uiBehaviour.m_Close.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnCloseBtnClick));
+ base.uiBehaviour.m_ShareBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnShareBtnClick));
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ this.Refresh();
+ float interval = float.Parse(XSingleton<XGlobalConfig>.singleton.GetValue("HeroBattleMvpAutoEnd"));
+ this._miniCloseTime = float.Parse(XSingleton<XGlobalConfig>.singleton.GetValue("HeroBattleMvpEnd"));
+ this._signTime = Time.time;
+ this._timerToken = XSingleton<XTimerMgr>.singleton.SetTimer(interval, new XTimerMgr.ElapsedEventHandler(this.AutoClose), null);
+ }
+
+ public void Refresh()
+ {
+ base.uiBehaviour.LogoDN.SetActive(false);
+ base.uiBehaviour.LogoTX.SetActive(false);
+ base.uiBehaviour.LogoWC.SetActive(false);
+ base.uiBehaviour.LogoQQ.SetActive(false);
+ XLevelRewardDocument.HeroBattleData heroBattleData = (XSingleton<XScene>.singleton.SceneType == SceneType.SCENE_HEROBATTLE) ? this._doc.HeroData : this._doc.MobaData;
+ base.uiBehaviour.m_ShareBtn.SetVisible(heroBattleData.MvpData.uID == XSingleton<XAttributeMgr>.singleton.XPlayerData.RoleID);
+ base.uiBehaviour.m_Name.SetText(heroBattleData.MvpData.Name);
+ base.uiBehaviour.m_Kill.SetText(heroBattleData.MvpData.KillCount.ToString());
+ base.uiBehaviour.m_Death.SetText(heroBattleData.MvpData.DeathCount.ToString());
+ base.uiBehaviour.m_Assit.SetText(heroBattleData.MvpData.AssitCount.ToString());
+ XHeroBattleDocument specificDocument = XDocuments.GetSpecificDocument<XHeroBattleDocument>(XHeroBattleDocument.uuID);
+ OverWatchTable.RowData byHeroID = specificDocument.OverWatchReader.GetByHeroID(heroBattleData.MvpHeroID);
+ bool flag = byHeroID == null;
+ if (flag)
+ {
+ XSingleton<XDebug>.singleton.AddErrorLog("Can't find overwatch data in HeroMvpDlg by heroID = ", heroBattleData.MvpHeroID.ToString(), null, null, null, null);
+ }
+ else
+ {
+ base.uiBehaviour.m_HeroName.SetText(byHeroID.Name);
+ base.uiBehaviour.m_HeroDesc.SetText(byHeroID.Description);
+ base.uiBehaviour.m_HeroSay.SetText(byHeroID.Motto);
+ }
+ }
+
+ protected override void OnHide()
+ {
+ base.OnHide();
+ XSingleton<XTimerMgr>.singleton.KillTimer(this._timerToken);
+ }
+
+ protected override void OnUnload()
+ {
+ base.OnUnload();
+ }
+
+ private void AutoClose(object o = null)
+ {
+ bool flag = base.IsVisible();
+ if (flag)
+ {
+ this.OnCloseBtnClick(null);
+ }
+ }
+
+ private void OnCloseBtnClick(IXUISprite iSp)
+ {
+ bool flag = Time.time - this._signTime < this._miniCloseTime;
+ if (!flag)
+ {
+ this._signTime = Time.time;
+ XSingleton<XCutScene>.singleton.Stop(true);
+ DlgBase<XLevelRewardView, XLevelRewardBehaviour>.singleton.CutSceneShowEnd();
+ }
+ }
+
+ private bool OnShareBtnClick(IXUIButton btn)
+ {
+ base.uiBehaviour.m_ShareBtn.SetAlpha(0f);
+ base.uiBehaviour.LogoDN.SetActive(true);
+ base.uiBehaviour.LogoTX.SetActive(true);
+ base.uiBehaviour.LogoWC.SetActive(XSingleton<XLoginDocument>.singleton.Channel == XAuthorizationChannel.XAuthorization_WeChat);
+ base.uiBehaviour.LogoQQ.SetActive(XSingleton<XLoginDocument>.singleton.Channel == XAuthorizationChannel.XAuthorization_QQ);
+ XSingleton<PDatabase>.singleton.shareCallbackType = ShareCallBackType.WeekShare;
+ XSingleton<XScreenShotMgr>.singleton.SendStatisticToServer(ShareOpType.Share, DragonShareType.ShowGlory);
+ XSingleton<XScreenShotMgr>.singleton.StartExternalScreenShotView(null);
+ return true;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/HeroBattleMVPDlg.cs.meta b/Client/Assets/Scripts/XMainClient/UI/HeroBattleMVPDlg.cs.meta
new file mode 100644
index 00000000..56dd90c9
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/HeroBattleMVPDlg.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 630f391f0e666e74e9199f1f8c9e3dee
+timeCreated: 1611403843
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/HeroBattleSkillHandler.cs b/Client/Assets/Scripts/XMainClient/UI/HeroBattleSkillHandler.cs
new file mode 100644
index 00000000..bfc113cd
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/HeroBattleSkillHandler.cs
@@ -0,0 +1,718 @@
+using System;
+using System.Collections.Generic;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class HeroBattleSkillHandler : DlgHandlerBase
+ {
+ protected override string FileName
+ {
+ get
+ {
+ return "GameSystem/HeroBattleSkill";
+ }
+ }
+
+ private XHeroBattleSkillDocument _doc = null;
+
+ private XHeroBattleDocument _heroDoc = null;
+
+ public GameObject m_ShowFrame;
+
+ public IXUIButton m_BuyBtn;
+
+ private IXUIButton m_OKBtn;
+
+ private IXUISprite m_PlayBtn;
+
+ private IXUIButton m_CloseBtn;
+
+ public IXUILabel m_HeroName;
+
+ private IXUILabel m_SkillName;
+
+ private IXUILabel m_SkillDesc;
+
+ private GameObject m_Back;
+
+ private XUIPool m_TabPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ private XUIPool m_SkillPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ private IXUIPanel m_Panel;
+
+ private bool _isBattleScene;
+
+ public RenderTexture skillPreView;
+
+ public IXUITexture m_Snapshot;
+
+ public IXUISprite LastSelectSprite;
+
+ private uint _currSkill;
+
+ private bool _OnCountDown;
+
+ private float _CountDownTime;
+
+ private IXUILabel m_CountDown;
+
+ private IXUILabel m_CountDownTips;
+
+ private bool _showRefresh;
+
+ private bool _battleFirstClick;
+
+ private IXUISprite m_BoxC;
+
+ private Transform _FxTs;
+
+ private XFx _Fx;
+
+ public IXUIButton OtherViewBuyBtn = null;
+
+ public int HandlerType;
+
+ public HeroBattleTeamHandler m_HeroBattleTeamHandler;
+
+ protected override void Init()
+ {
+ base.Init();
+ this._doc = XDocuments.GetSpecificDocument<XHeroBattleSkillDocument>(XHeroBattleSkillDocument.uuID);
+ this._heroDoc = XDocuments.GetSpecificDocument<XHeroBattleDocument>(XHeroBattleDocument.uuID);
+ this._doc.m_HeroBattleSkillHandler = this;
+ this._doc.CreateSkillBlackHouse();
+ this._isBattleScene = (XSingleton<XGame>.singleton.CurrentStage.Stage != EXStage.Hall);
+ this.m_CountDown = (base.PanelObject.transform.Find("LeftTime").GetComponent("XUILabel") as IXUILabel);
+ this.m_CountDownTips = (this.m_CountDown.gameObject.transform.Find("T").GetComponent("XUILabel") as IXUILabel);
+ this.m_Back = base.PanelObject.transform.Find("Back").gameObject;
+ Transform transform = base.PanelObject.transform.Find("ShowFrame");
+ this.m_ShowFrame = transform.gameObject;
+ this.m_BuyBtn = (transform.Find("BuyBtn").GetComponent("XUIButton") as IXUIButton);
+ this.m_OKBtn = (transform.Find("OKBtn").GetComponent("XUIButton") as IXUIButton);
+ this.m_PlayBtn = (transform.Find("PlayTs/Play").GetComponent("XUISprite") as IXUISprite);
+ this.m_CloseBtn = (transform.Find("Close").GetComponent("XUIButton") as IXUIButton);
+ this.m_Snapshot = (transform.Find("Snapshot").GetComponent("XUITexture") as IXUITexture);
+ transform = base.PanelObject.transform.Find("ShowFrame");
+ this.m_HeroName = (transform.Find("Name").GetComponent("XUILabel") as IXUILabel);
+ this.m_SkillName = (transform.Find("SkillDesc/SkillName").GetComponent("XUILabel") as IXUILabel);
+ this.m_SkillDesc = (transform.Find("SkillDesc/SkillDesc").GetComponent("XUILabel") as IXUILabel);
+ this.m_Panel = (base.PanelObject.transform.Find("ScrollView").GetComponent("XUIPanel") as IXUIPanel);
+ this._FxTs = base.PanelObject.transform.Find("FxTs");
+ transform = base.PanelObject.transform.Find("ScrollView/Tpl");
+ IXUISprite ixuisprite = transform.GetComponent("XUISprite") as IXUISprite;
+ bool flag = this._isBattleScene && ixuisprite.spriteHeight * ((this._heroDoc.OverWatchReader.Table.Length + 1) / 2) > 640;
+ if (flag)
+ {
+ transform.gameObject.transform.localPosition = new Vector3(transform.gameObject.transform.localPosition.x, transform.gameObject.transform.localPosition.y + 64f);
+ }
+ this.m_TabPool.SetupPool(transform.parent.gameObject, transform.gameObject, 10u, false);
+ transform = base.PanelObject.transform.Find("ShowFrame/ShowSkill/Tpl");
+ this.m_SkillPool.SetupPool(transform.parent.gameObject, transform.gameObject, 5u, false);
+ this.SetupTabs();
+ this._showRefresh = false;
+ this._battleFirstClick = true;
+ this.m_BoxC = (base.PanelObject.transform.Find("Box").GetComponent("XUISprite") as IXUISprite);
+ bool isBattleScene = this._isBattleScene;
+ if (isBattleScene)
+ {
+ this.m_Panel.ClipRange = new Vector4(0f, 0f, 300f, 640f);
+ this.m_CountDown.SetVisible(true);
+ this._doc.IsPreViewShow = true;
+ this.m_ShowFrame.SetActive(false);
+ this.m_Back.SetActive(true);
+ this.m_BoxC.SetVisible(true);
+ this.m_HeroBattleTeamHandler = DlgHandlerBase.EnsureCreate<HeroBattleTeamHandler>(ref this.m_HeroBattleTeamHandler, base.PanelObject.transform.Find("TeamTs"), false, null);
+ }
+ else
+ {
+ this.SetSkillPreViewState(false, 0);
+ this.m_BuyBtn.SetVisible(false);
+ this.m_OKBtn.SetVisible(false);
+ this.m_CountDown.SetVisible(false);
+ this.m_Panel.ClipRange = new Vector4(0f, -32f, 300f, 586f);
+ this.m_Back.SetActive(false);
+ this.m_BoxC.SetVisible(false);
+ }
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ this.m_CloseBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnCloseBtnClick));
+ this.m_PlayBtn.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnPlayBtnClick));
+ this.m_OKBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnOKBtnClick));
+ this.m_BuyBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnBuyBtnClick));
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ bool flag = this.skillPreView == null;
+ if (flag)
+ {
+ this.skillPreView = new RenderTexture(600, 338, 1, 0, 0);
+ this.skillPreView.name = "SkillPreview";
+ this.skillPreView.autoGenerateMips = false;
+ this.skillPreView.Create();
+ }
+ this.m_Snapshot.SetRuntimeTex(this.skillPreView, true);
+ this._doc.SetSkillPreviewTexture(this.skillPreView);
+ this.SetUVRectangle();
+ bool flag2 = this._showRefresh && this.LastSelectSprite != null;
+ if (flag2)
+ {
+ this._showRefresh = false;
+ this.OnTabClick(this.LastSelectSprite);
+ }
+ bool flag3 = this.m_HeroBattleTeamHandler != null;
+ if (flag3)
+ {
+ this.m_HeroBattleTeamHandler.SetVisible(true);
+ }
+ }
+
+ protected override void OnHide()
+ {
+ base.OnHide();
+ this._doc.DelDummy();
+ bool flag = this._doc.BlackHouseCamera != null;
+ if (flag)
+ {
+ this._doc.BlackHouseCamera.enabled = false;
+ }
+ this._doc.SetSkillPreviewTexture(null);
+ bool flag2 = this._Fx != null;
+ if (flag2)
+ {
+ XSingleton<XFxMgr>.singleton.DestroyFx(this._Fx, true);
+ }
+ bool flag3 = this.skillPreView != null;
+ if (flag3)
+ {
+ this.m_Snapshot.SetRuntimeTex(null, true);
+ this.skillPreView.Release();
+ this.skillPreView = null;
+ }
+ bool isBattleScene = this._isBattleScene;
+ if (isBattleScene)
+ {
+ this._showRefresh = true;
+ }
+ bool flag4 = this.m_HeroBattleTeamHandler != null;
+ if (flag4)
+ {
+ this.m_HeroBattleTeamHandler.SetVisible(false);
+ }
+ }
+
+ public override void OnUnload()
+ {
+ this.LastSelectSprite = null;
+ this._doc.m_HeroBattleSkillHandler = null;
+ DlgHandlerBase.EnsureUnload<HeroBattleTeamHandler>(ref this.m_HeroBattleTeamHandler);
+ this._doc.DelDummy();
+ bool flag = this._doc.BlackHouseCamera != null;
+ if (flag)
+ {
+ this._doc.BlackHouseCamera.enabled = false;
+ }
+ this._doc.SetSkillPreviewTexture(null);
+ bool flag2 = this.skillPreView != null;
+ if (flag2)
+ {
+ this.skillPreView.Release();
+ this.skillPreView = null;
+ }
+ bool flag3 = this._Fx != null;
+ if (flag3)
+ {
+ XSingleton<XFxMgr>.singleton.DestroyFx(this._Fx, true);
+ this._Fx = null;
+ }
+ base.OnUnload();
+ }
+
+ public void SetFx()
+ {
+ bool isBattleScene = this._isBattleScene;
+ if (!isBattleScene)
+ {
+ bool flag = this._Fx != null;
+ if (flag)
+ {
+ XSingleton<XFxMgr>.singleton.DestroyFx(this._Fx, true);
+ }
+ this._Fx = XSingleton<XFxMgr>.singleton.CreateFx("Effects/FX_Particle/UIfx/UI_yh", null, true);
+ this._Fx.Play(this._FxTs, Vector3.zero, Vector3.one, 1f, true, false);
+ }
+ }
+
+ private bool OnCloseBtnClick(IXUIButton btn)
+ {
+ bool isBattleScene = this._isBattleScene;
+ if (isBattleScene)
+ {
+ bool flag = !this._doc.AlSelectHero;
+ if (flag)
+ {
+ return false;
+ }
+ base.SetVisible(false);
+ }
+ else
+ {
+ this.SetSkillPreViewState(false, 0);
+ }
+ return true;
+ }
+
+ private void OnPlayBtnClick(IXUISprite iSp)
+ {
+ this.SetPlayBtnState(false);
+ XSingleton<XSkillPreViewMgr>.singleton.ShowSkill(this._doc.Dummy, this._currSkill, this._doc.CurrentEntityStatisticsID[this.HandlerType]);
+ }
+
+ private bool OnOKBtnClick(IXUIButton btn)
+ {
+ this._doc.QuerySelectBattleHero();
+ return true;
+ }
+
+ public bool OnSureUseExperienceTicket(IXUIButton btn)
+ {
+ DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.SetVisible(false, true);
+ this._doc.QueryUseExperienceTicket();
+ return true;
+ }
+
+ public void OnExperienceClick(IXUISprite iSp)
+ {
+ bool flag = !this._doc.CSSH && this._doc.TAS.Contains((uint)iSp.ID);
+ if (flag)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString("HeroBattleSameHeroTips"), "fece00");
+ }
+ bool flag2 = this._doc.AlreadyGetList.Contains((uint)iSp.ID) || this._doc.WeekFreeList.Contains((uint)iSp.ID) || this._doc.ExperienceList.Contains((uint)iSp.ID);
+ if (!flag2)
+ {
+ uint experienceTicketID = this._heroDoc.GetExperienceTicketID((uint)iSp.ID);
+ bool flag3 = experienceTicketID > 0u;
+ if (flag3)
+ {
+ HeroBattleExperienceHero.RowData byItemID = this._heroDoc.HeroExperienceReader.GetByItemID(experienceTicketID);
+ OverWatchTable.RowData byHeroID = this._heroDoc.OverWatchReader.GetByHeroID((uint)iSp.ID);
+ bool flag4 = byItemID == null || byHeroID == null;
+ if (flag4)
+ {
+ XSingleton<XDebug>.singleton.AddErrorLog("UseExperienceTicket error. itemid = ", experienceTicketID.ToString(), null, null, null, null);
+ }
+ else
+ {
+ this._doc.CurrentSelectExperienceTicketID = experienceTicketID;
+ string text = XSingleton<UiUtility>.singleton.ReplaceReturn(XStringDefineProxy.GetString("HeroBattleExperienceQues"));
+ text = string.Format(text, byHeroID.Name, byItemID.ShowTime);
+ string @string = XStringDefineProxy.GetString("COMMON_OK");
+ string string2 = XStringDefineProxy.GetString("COMMON_CANCEL");
+ XSingleton<UiUtility>.singleton.ShowModalDialog(text, @string, string2, new ButtonClickEventHandler(this.OnSureUseExperienceTicket));
+ }
+ }
+ }
+ }
+
+ public void OnTabClick(IXUISprite iSp)
+ {
+ bool flag = this._isBattleScene && this._battleFirstClick;
+ if (flag)
+ {
+ this._battleFirstClick = false;
+ this.m_ShowFrame.SetActive(true);
+ }
+ bool flag2 = this.LastSelectSprite != null;
+ GameObject gameObject;
+ if (flag2)
+ {
+ gameObject = this.LastSelectSprite.gameObject.transform.Find("select").gameObject;
+ gameObject.SetActive(false);
+ }
+ this.LastSelectSprite = iSp;
+ this._doc.CurrentSelect = (uint)iSp.ID;
+ gameObject = iSp.gameObject.transform.Find("select").gameObject;
+ gameObject.SetActive(true);
+ bool isBattleScene = this._isBattleScene;
+ if (isBattleScene)
+ {
+ bool flag3 = this._doc.AlreadyGetList.Contains(this._doc.CurrentSelect) || this._doc.WeekFreeList.Contains(this._doc.CurrentSelect) || this._doc.ExperienceList.Contains(this._doc.CurrentSelect);
+ if (flag3)
+ {
+ this.m_OKBtn.SetVisible(true);
+ bool flag4 = !this._doc.CSSH && this._doc.TAS.Contains(this._doc.CurrentSelect);
+ this.m_OKBtn.SetGrey(!flag4);
+ this.m_BuyBtn.SetVisible(false);
+ }
+ else
+ {
+ this.m_OKBtn.SetVisible(false);
+ this.m_BuyBtn.SetVisible(true);
+ this.SetBuyBtnPrice(this.m_BuyBtn);
+ }
+ }
+ else
+ {
+ bool flag5 = this._doc.IsPreViewShow && !this._doc.AlreadyGetList.Contains(this._doc.CurrentSelect);
+ this.m_BuyBtn.SetVisible(flag5);
+ bool flag6 = flag5;
+ if (flag6)
+ {
+ this.SetBuyBtnPrice(this.m_BuyBtn);
+ }
+ }
+ bool flag7 = !this._isBattleScene && DlgBase<HeroBattleDlg, HeroBattleBehaviour>.singleton.IsVisible();
+ if (flag7)
+ {
+ DlgBase<HeroBattleDlg, HeroBattleBehaviour>.singleton.RefreshSelectMsg();
+ }
+ bool flag8 = !this._isBattleScene && DlgBase<MobaEntranceView, MobaEntranceBehaviour>.singleton.IsVisible();
+ if (flag8)
+ {
+ DlgBase<MobaEntranceView, MobaEntranceBehaviour>.singleton.RefreshSelectMsg();
+ }
+ bool activeInHierarchy = this.m_ShowFrame.activeInHierarchy;
+ if (activeInHierarchy)
+ {
+ this.SetupPreViewInfo(0);
+ XSingleton<XSkillPreViewMgr>.singleton.SkillShowEnd(this._doc.Dummy);
+ XSingleton<XSkillPreViewMgr>.singleton.SkillShowBegin(this._doc.Dummy, this._doc.BlackHouseCamera);
+ }
+ }
+
+ private int Compare(uint x, uint y)
+ {
+ bool flag = x == y;
+ int result;
+ if (flag)
+ {
+ result = 0;
+ }
+ else
+ {
+ bool flag2 = this._doc.ExperienceList.Contains(x) != this._doc.ExperienceList.Contains(y);
+ if (flag2)
+ {
+ result = (this._doc.ExperienceList.Contains(x) ? -1 : 1);
+ }
+ else
+ {
+ bool flag3 = this._doc.WeekFreeList.Contains(x) != this._doc.WeekFreeList.Contains(y);
+ if (flag3)
+ {
+ bool flag4 = this._doc.ExperienceList.Contains(x) && this._doc.ExperienceList.Contains(y);
+ if (flag4)
+ {
+ result = (this._doc.WeekFreeList.Contains(x) ? 1 : -1);
+ }
+ else
+ {
+ result = (this._doc.WeekFreeList.Contains(x) ? -1 : 1);
+ }
+ }
+ else
+ {
+ bool flag5 = this._doc.AlreadyGetList.Contains(x) != this._doc.AlreadyGetList.Contains(y);
+ if (flag5)
+ {
+ bool flag6 = this._doc.ExperienceList.Contains(x) && this._doc.ExperienceList.Contains(y);
+ if (flag6)
+ {
+ result = (this._doc.AlreadyGetList.Contains(x) ? 1 : -1);
+ }
+ else
+ {
+ result = (this._doc.AlreadyGetList.Contains(x) ? -1 : 1);
+ }
+ }
+ else
+ {
+ result = this._heroDoc.OverWatchReader.GetByHeroID(x).SortID - this._heroDoc.OverWatchReader.GetByHeroID(y).SortID;
+ }
+ }
+ }
+ }
+ return result;
+ }
+
+ public void SetupTabs()
+ {
+ this.LastSelectSprite = null;
+ this._doc.SetUnSelect();
+ this.m_TabPool.ReturnAll(false);
+ List<uint> list = new List<uint>();
+ for (int i = 0; i < this._heroDoc.OverWatchReader.Table.Length; i++)
+ {
+ list.Add(this._heroDoc.OverWatchReader.Table[i].HeroID);
+ }
+ list.Sort(new Comparison<uint>(this.Compare));
+ SpriteClickEventHandler spriteClickEventHandler = new SpriteClickEventHandler(this.OnTabClick);
+ spriteClickEventHandler = (SpriteClickEventHandler)Delegate.Combine(spriteClickEventHandler, new SpriteClickEventHandler(this.OnExperienceClick));
+ Vector3 tplPos = this.m_TabPool.TplPos;
+ for (int j = 0; j < list.Count; j++)
+ {
+ OverWatchTable.RowData byHeroID = this._heroDoc.OverWatchReader.GetByHeroID(list[j]);
+ GameObject gameObject = this.m_TabPool.FetchGameObject(false);
+ gameObject.transform.localPosition = new Vector3(tplPos.x + (float)((j & 1) * this.m_TabPool.TplWidth), tplPos.y - (float)(j / 2 * this.m_TabPool.TplHeight));
+ IXUISprite ixuisprite = gameObject.GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.ID = (ulong)byHeroID.HeroID;
+ ixuisprite.RegisterSpriteClickEventHandler(spriteClickEventHandler);
+ IXUISprite ixuisprite2 = gameObject.transform.Find("Bg/Icon").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite2.SetSprite(byHeroID.Icon, byHeroID.IconAtlas, false);
+ GameObject gameObject2 = gameObject.transform.Find("select").gameObject;
+ gameObject2.SetActive(false);
+ this.RefreshSingleTab(byHeroID, gameObject);
+ bool flag = !this._isBattleScene && this._doc.CurrentSelect == this._doc.UNSELECT;
+ if (flag)
+ {
+ this.OnTabClick(ixuisprite);
+ }
+ }
+ }
+
+ public void RefreshTab()
+ {
+ List<GameObject> list = ListPool<GameObject>.Get();
+ this.m_TabPool.GetActiveList(list);
+ for (int i = 0; i < list.Count; i++)
+ {
+ GameObject gameObject = list[i];
+ IXUISprite ixuisprite = gameObject.GetComponent("XUISprite") as IXUISprite;
+ OverWatchTable.RowData byHeroID = this._heroDoc.OverWatchReader.GetByHeroID((uint)ixuisprite.ID);
+ this.RefreshSingleTab(byHeroID, gameObject);
+ }
+ ListPool<GameObject>.Release(list);
+ bool flag = this.LastSelectSprite != null;
+ if (flag)
+ {
+ this.OnTabClick(this.LastSelectSprite);
+ }
+ }
+
+ private void RefreshSingleTab(OverWatchTable.RowData data, GameObject go)
+ {
+ GameObject gameObject = go.transform.Find("Bg/Have").gameObject;
+ gameObject.SetActive(this._doc.AlreadyGetList.Contains(data.HeroID));
+ GameObject gameObject2 = go.transform.Find("Bg/xm").gameObject;
+ gameObject2.SetActive(this._doc.WeekFreeList.Contains(data.HeroID));
+ IXUISprite ixuisprite = go.transform.Find("Bg/Icon").GetComponent("XUISprite") as IXUISprite;
+ bool flag = this._doc.WeekFreeList.Contains(data.HeroID) || this._doc.AlreadyGetList.Contains(data.HeroID) || this._doc.ExperienceList.Contains(data.HeroID);
+ bool flag2 = !this._doc.CSSH;
+ if (flag2)
+ {
+ flag = (flag && !this._doc.TAS.Contains(data.HeroID));
+ }
+ ixuisprite.SetGrey(flag);
+ bool flag3 = !flag;
+ if (flag3)
+ {
+ ixuisprite.SetAlpha(1f);
+ }
+ GameObject gameObject3 = go.transform.Find("Bg/Experience").gameObject;
+ gameObject3.SetActive(!this._doc.AlreadyGetList.Contains(data.HeroID) && !this._doc.WeekFreeList.Contains(data.HeroID) && this._doc.ExperienceList.Contains(data.HeroID));
+ GameObject gameObject4 = go.transform.Find("Bg/UseExperience").gameObject;
+ gameObject4.SetActive(!this._doc.WeekFreeList.Contains(data.HeroID) && !this._doc.AlreadyGetList.Contains(data.HeroID) && !this._doc.ExperienceList.Contains(data.HeroID) && this._heroDoc.GetExperienceTicketID(data.HeroID) > 0u);
+ GameObject gameObject5 = go.transform.Find("Bg/TeammateChoose").gameObject;
+ gameObject5.SetActive(this._isBattleScene && !this._doc.CSSH && this._doc.TAS.Contains(data.HeroID));
+ }
+
+ private void SetupPreViewInfo(int index = 0)
+ {
+ this._doc.ReplaceDummy(this.HandlerType);
+ OverWatchTable.RowData byHeroID = this._heroDoc.OverWatchReader.GetByHeroID(this._doc.CurrentSelect);
+ this.m_HeroName.SetText(byHeroID.Name);
+ List<uint> list = new List<uint>();
+ uint presentID = XSingleton<XEntityMgr>.singleton.EntityStatistics.GetByID(this._doc.CurrentEntityStatisticsID[this.HandlerType]).PresentID;
+ XEntityPresentation.RowData byPresentID = XSingleton<XEntityMgr>.singleton.EntityInfo.GetByPresentID(presentID);
+ int num = (this.HandlerType == 2) ? 4 : 5;
+ int num2 = 0;
+ while (list.Count < num && num2 < byPresentID.OtherSkills.Length)
+ {
+ bool flag = string.IsNullOrEmpty(byPresentID.OtherSkills[num2]) || byPresentID.OtherSkills[num2] == "E";
+ if (!flag)
+ {
+ list.Add(XSingleton<XSkillEffectMgr>.singleton.GetSkillID(byPresentID.OtherSkills[num2], this._doc.CurrentEntityStatisticsID[this.HandlerType]));
+ }
+ num2++;
+ }
+ this.m_SkillPool.ReturnAll(false);
+ Vector3 tplPos = this.m_SkillPool.TplPos;
+ IXUICheckBox ixuicheckBox = null;
+ for (int i = 0; i < list.Count; i++)
+ {
+ SkillList.RowData skillConfig = XSingleton<XSkillEffectMgr>.singleton.GetSkillConfig(list[i], 0u, this._doc.CurrentEntityStatisticsID[this.HandlerType]);
+ GameObject gameObject = this.m_SkillPool.FetchGameObject(false);
+ gameObject.name = list[i].ToString();
+ gameObject.transform.localPosition = new Vector3(tplPos.x, tplPos.y - (float)(i * this.m_SkillPool.TplHeight));
+ IXUISprite ixuisprite = gameObject.transform.Find("Bg").GetComponent("XUISprite") as IXUISprite;
+ bool flag2 = skillConfig.SkillType == 2;
+ if (flag2)
+ {
+ ixuisprite.SetSprite("JN_dk_0");
+ }
+ else
+ {
+ ixuisprite.SetSprite("JN_dk");
+ }
+ IXUISprite ixuisprite2 = gameObject.transform.Find("Icon").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite2.SetSprite(skillConfig.Icon, skillConfig.Atlas, false);
+ IXUICheckBox ixuicheckBox2 = gameObject.GetComponent("XUICheckBox") as IXUICheckBox;
+ ixuicheckBox2.ID = (ulong)list[i];
+ ixuicheckBox2.RegisterOnCheckEventHandler(new CheckBoxOnCheckEventHandler(this.OnSkillPreViewClick));
+ ixuicheckBox2.bChecked = false;
+ bool flag3 = i == index;
+ if (flag3)
+ {
+ this._currSkill = list[i];
+ ixuicheckBox = ixuicheckBox2;
+ this.SetupSkillInfo();
+ }
+ }
+ ixuicheckBox.bChecked = true;
+ }
+
+ public List<uint> SkillInfo()
+ {
+ List<uint> list = new List<uint>();
+ uint presentID = XSingleton<XEntityMgr>.singleton.EntityStatistics.GetByID(this._doc.CurrentEntityStatisticsID[this.HandlerType]).PresentID;
+ XEntityPresentation.RowData byPresentID = XSingleton<XEntityMgr>.singleton.EntityInfo.GetByPresentID(presentID);
+ for (int i = 0; i < byPresentID.OtherSkills.Length; i++)
+ {
+ bool flag = string.IsNullOrEmpty(byPresentID.OtherSkills[i]) || byPresentID.OtherSkills[i] == "E";
+ if (!flag)
+ {
+ list.Add(XSingleton<XSkillEffectMgr>.singleton.GetSkillID(byPresentID.OtherSkills[i], this._doc.CurrentEntityStatisticsID[this.HandlerType]));
+ }
+ }
+ return list;
+ }
+
+ private bool OnSkillPreViewClick(IXUICheckBox icb)
+ {
+ bool flag = !icb.bChecked;
+ bool result;
+ if (flag)
+ {
+ result = true;
+ }
+ else
+ {
+ this._currSkill = (uint)icb.ID;
+ this.SetupSkillInfo();
+ result = true;
+ }
+ return result;
+ }
+
+ private bool OnBuyBtnClick(IXUIButton btn)
+ {
+ this._doc.QueryBuyHero(this._doc.CurrentSelect);
+ return true;
+ }
+
+ private void SetupSkillInfo()
+ {
+ SkillList.RowData skillConfig = XSingleton<XSkillEffectMgr>.singleton.GetSkillConfig(this._currSkill, 0u, this._doc.CurrentEntityStatisticsID[this.HandlerType]);
+ this.m_SkillName.SetText(skillConfig.ScriptName);
+ this.m_SkillDesc.SetText(skillConfig.CurrentLevelDescription);
+ this.SetPlayBtnState(true);
+ XSingleton<XSkillPreViewMgr>.singleton.SkillShowEnd(this._doc.Dummy);
+ XSingleton<XSkillPreViewMgr>.singleton.SkillShowBegin(this._doc.Dummy, this._doc.BlackHouseCamera);
+ }
+
+ public void SetSkillPreViewState(bool state, int index = 0)
+ {
+ this._doc.IsPreViewShow = state;
+ this.m_ShowFrame.SetActive(state);
+ bool flag = !this._isBattleScene;
+ if (flag)
+ {
+ this.m_Back.SetActive(state);
+ }
+ if (state)
+ {
+ this.SetupPreViewInfo(index);
+ if (state)
+ {
+ bool flag2 = this._doc.IsPreViewShow && !this._doc.AlreadyGetList.Contains(this._doc.CurrentSelect);
+ this.m_BuyBtn.SetVisible(flag2);
+ bool flag3 = flag2;
+ if (flag3)
+ {
+ this.SetBuyBtnPrice(this.m_BuyBtn);
+ }
+ }
+ }
+ bool flag4 = !this._isBattleScene && this.OtherViewBuyBtn != null;
+ if (flag4)
+ {
+ bool flag5 = !this._doc.IsPreViewShow && !this._doc.AlreadyGetList.Contains(this._doc.CurrentSelect);
+ this.OtherViewBuyBtn.SetVisible(flag5);
+ bool flag6 = flag5;
+ if (flag6)
+ {
+ this.SetBuyBtnPrice(this.OtherViewBuyBtn);
+ }
+ }
+ }
+
+ private void SetBuyBtnPrice(IXUIButton btn)
+ {
+ OverWatchTable.RowData byHeroID = this._heroDoc.OverWatchReader.GetByHeroID(this._doc.CurrentSelect);
+ ItemList.RowData itemConf = XBagDocument.GetItemConf((int)byHeroID.Price[0]);
+ IXUISprite ixuisprite = btn.gameObject.transform.Find("Icon").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.spriteName = itemConf.ItemIcon1[0];
+ IXUILabel ixuilabel = btn.gameObject.transform.Find("Cost").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel.SetText(byHeroID.Price[1].ToString());
+ }
+
+ public void SetUVRectangle()
+ {
+ Rect rect = this._doc.BlackHouseCamera.rect;
+ rect.y = (rect.y * 338f + 1f) / 338f;
+ rect.height = (rect.height * 338f - 2f) / 338f;
+ this.m_Snapshot.SetUVRect(rect);
+ }
+
+ public void SetPlayBtnState(bool state)
+ {
+ this.m_PlayBtn.transform.localPosition = (state ? Vector3.zero : XGameUI.Far_Far_Away);
+ }
+
+ public void SetCountDown(float time, bool isChooseHero)
+ {
+ this.m_CountDownTips.SetText(XStringDefineProxy.GetString(isChooseHero ? "HeroBattleSelectHeroTips" : "HeroBattleChangeHeroTips"));
+ this._OnCountDown = true;
+ this._CountDownTime = Time.realtimeSinceStartup + time;
+ }
+
+ public override void OnUpdate()
+ {
+ bool onCountDown = this._OnCountDown;
+ if (onCountDown)
+ {
+ int num = 0;
+ bool flag = this._CountDownTime < Time.realtimeSinceStartup;
+ if (flag)
+ {
+ this._OnCountDown = false;
+ }
+ else
+ {
+ num = (int)(this._CountDownTime - Time.realtimeSinceStartup);
+ }
+ this.m_CountDown.SetText(num.ToString());
+ }
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/HeroBattleSkillHandler.cs.meta b/Client/Assets/Scripts/XMainClient/UI/HeroBattleSkillHandler.cs.meta
new file mode 100644
index 00000000..8c597e16
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/HeroBattleSkillHandler.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: cd8c6d88c0b31744a88713fbe6830b91
+timeCreated: 1611404556
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/HeroBattleTeam.cs b/Client/Assets/Scripts/XMainClient/UI/HeroBattleTeam.cs
new file mode 100644
index 00000000..e4f9b5df
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/HeroBattleTeam.cs
@@ -0,0 +1,54 @@
+using System;
+using UILib;
+using UnityEngine;
+
+namespace XMainClient.UI
+{
+ internal class HeroBattleTeam
+ {
+ public uint Score
+ {
+ set
+ {
+ bool flag = this._score != value;
+ if (flag)
+ {
+ this._score = value;
+ this.m_Score.SetText(string.Format("{0}%", this._score));
+ }
+ }
+ }
+
+ public GameObject m_OccupantCircle;
+
+ public IXUIProgress m_Ring;
+
+ public IXUILabel m_Score;
+
+ private uint _score = 0u;
+
+ public HeroBattleTeam(Transform ts)
+ {
+ this.m_Ring = (ts.Find("Ring").GetComponent("XUIProgress") as IXUIProgress);
+ this.m_Ring.value = 0f;
+ this.m_Score = (ts.Find("Score").GetComponent("XUILabel") as IXUILabel);
+ this.m_Score.SetText("0%");
+ this.m_OccupantCircle = ts.Find("Circle").gameObject;
+ this.m_OccupantCircle.transform.localPosition = XGameUI.Far_Far_Away;
+ }
+
+ public void SetOccupyValue(float value)
+ {
+ this.m_Ring.value = value;
+ }
+
+ public void SetOccupantState(bool state)
+ {
+ this.m_OccupantCircle.transform.localPosition = (state ? Vector3.zero : XGameUI.Far_Far_Away);
+ if (state)
+ {
+ this.SetOccupyValue(0f);
+ }
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/HeroBattleTeam.cs.meta b/Client/Assets/Scripts/XMainClient/UI/HeroBattleTeam.cs.meta
new file mode 100644
index 00000000..b99ec1e2
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/HeroBattleTeam.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: e7b4d52460aeb534b8632a104317d730
+timeCreated: 1611404749
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/HeroBattleTeamHandler.cs b/Client/Assets/Scripts/XMainClient/UI/HeroBattleTeamHandler.cs
new file mode 100644
index 00000000..10921583
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/HeroBattleTeamHandler.cs
@@ -0,0 +1,144 @@
+using System;
+using System.Collections.Generic;
+using KKSG;
+using UILib;
+using UnityEngine;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class HeroBattleTeamHandler : DlgHandlerBase
+ {
+ protected override string FileName
+ {
+ get
+ {
+ return "Battle/HeroBattleTeam";
+ }
+ }
+
+ private XHeroBattleDocument _heroDoc = null;
+
+ private XHeroBattleSkillDocument _skillDoc = null;
+
+ private XMobaBattleDocument _mobaDoc = null;
+
+ private XUIPool m_MemberPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ private List<GameObject> _teamList = new List<GameObject>();
+
+ private int _playerNum;
+
+ protected override void Init()
+ {
+ base.Init();
+ this._heroDoc = XDocuments.GetSpecificDocument<XHeroBattleDocument>(XHeroBattleDocument.uuID);
+ this._skillDoc = XDocuments.GetSpecificDocument<XHeroBattleSkillDocument>(XHeroBattleSkillDocument.uuID);
+ this._mobaDoc = XDocuments.GetSpecificDocument<XMobaBattleDocument>(XMobaBattleDocument.uuID);
+ this._skillDoc._HeroBattleTeamHandler = this;
+ Transform transform = base.PanelObject.transform.Find("ScrollView/Tpl");
+ this.m_MemberPool.SetupPool(transform.parent.gameObject, transform.gameObject, 4u, false);
+ XExpeditionDocument specificDocument = XDocuments.GetSpecificDocument<XExpeditionDocument>(XExpeditionDocument.uuID);
+ ExpeditionTable.RowData expeditionDataByID = specificDocument.GetExpeditionDataByID(18);
+ this._playerNum = expeditionDataByID.PlayerNumber;
+ Vector3 tplPos = this.m_MemberPool.TplPos;
+ for (int i = 0; i < this._playerNum; i++)
+ {
+ GameObject gameObject = this.m_MemberPool.FetchGameObject(false);
+ gameObject.transform.localPosition = new Vector3(tplPos.x, tplPos.y - (float)(i * this.m_MemberPool.TplHeight));
+ this._teamList.Add(gameObject);
+ }
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ this.Refresh();
+ }
+
+ public void Refresh()
+ {
+ bool flag = !base.IsVisible();
+ if (!flag)
+ {
+ bool flag2 = XSingleton<XScene>.singleton.SceneType == SceneType.SCENE_MOBA;
+ if (flag2)
+ {
+ bool flag3 = this._mobaDoc.MyData == null;
+ if (!flag3)
+ {
+ int num = 0;
+ for (int i = 0; i < this._mobaDoc.MobaData.BufferValues.Count; i++)
+ {
+ bool flag4 = !this._mobaDoc.MobaData.BufferValues[i].isMy && this._mobaDoc.MobaData.BufferValues[i].teamID == this._mobaDoc.MyData.teamID;
+ if (flag4)
+ {
+ this._teamList[num].SetActive(true);
+ this.SetMemberSelect(this._teamList[num++], this._mobaDoc.MobaData.BufferValues[i].heroID, this._mobaDoc.MobaData.BufferValues[i].name);
+ }
+ }
+ for (int j = num; j < this._playerNum; j++)
+ {
+ this._teamList[j].SetActive(false);
+ }
+ }
+ }
+ else
+ {
+ for (int k = 0; k < this._playerNum; k++)
+ {
+ bool flag5 = k >= this._heroDoc.TeamBlood.Count;
+ if (flag5)
+ {
+ this._teamList[k].SetActive(false);
+ }
+ else
+ {
+ this._teamList[k].SetActive(true);
+ uint heroID = 0u;
+ this._heroDoc.heroIDIndex.TryGetValue(this._heroDoc.TeamBlood[k].uid, out heroID);
+ this.SetMemberSelect(this._teamList[k], heroID, this._heroDoc.TeamBlood[k].name);
+ }
+ }
+ }
+ }
+ }
+
+ public void SetMemberSelect(GameObject go, uint heroID, string name)
+ {
+ GameObject gameObject = go.transform.Find("Bg/UnSelect").gameObject;
+ IXUISprite ixuisprite = go.transform.Find("Bg/Icon").GetComponent("XUISprite") as IXUISprite;
+ IXUILabel ixuilabel = go.transform.Find("Bg/Name").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel.SetText(name);
+ bool flag = heroID == 0u;
+ if (flag)
+ {
+ gameObject.SetActive(true);
+ ixuisprite.SetVisible(false);
+ }
+ else
+ {
+ gameObject.SetActive(false);
+ ixuisprite.SetVisible(true);
+ OverWatchTable.RowData byHeroID = this._heroDoc.OverWatchReader.GetByHeroID(heroID);
+ ixuisprite.SetSprite(byHeroID.Icon, byHeroID.IconAtlas, false);
+ }
+ }
+
+ protected override void OnHide()
+ {
+ base.OnHide();
+ }
+
+ public override void OnUnload()
+ {
+ this._skillDoc._HeroBattleTeamHandler = null;
+ base.OnUnload();
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/HeroBattleTeamHandler.cs.meta b/Client/Assets/Scripts/XMainClient/UI/HeroBattleTeamHandler.cs.meta
new file mode 100644
index 00000000..52ef25eb
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/HeroBattleTeamHandler.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 517a54ca71681c14198c17f823e57c93
+timeCreated: 1611403706
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/HeroSkillType.cs b/Client/Assets/Scripts/XMainClient/UI/HeroSkillType.cs
new file mode 100644
index 00000000..e8b02106
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/HeroSkillType.cs
@@ -0,0 +1,11 @@
+using System;
+
+namespace XMainClient.UI
+{
+ public enum HeroSkillType
+ {
+ HeroBattle,
+ WeekNest,
+ MobaBattle
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/HeroSkillType.cs.meta b/Client/Assets/Scripts/XMainClient/UI/HeroSkillType.cs.meta
new file mode 100644
index 00000000..dbe6fa7b
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/HeroSkillType.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: dc3c6e971d873fe49be9eacb00bdabce
+timeCreated: 1611404677
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/HolidayHandler.cs b/Client/Assets/Scripts/XMainClient/UI/HolidayHandler.cs
new file mode 100644
index 00000000..4fc8f2ce
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/HolidayHandler.cs
@@ -0,0 +1,134 @@
+using System;
+using UILib;
+using UnityEngine;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class HolidayHandler : DlgHandlerBase
+ {
+ protected override string FileName
+ {
+ get
+ {
+ return "OperatingActivity/HolidayFrame";
+ }
+ }
+
+ private XOperatingActivityDocument doc;
+
+ private IXUILabel m_Tip1;
+
+ private IXUILabel m_Tip2;
+
+ private IXUIButton m_Enter;
+
+ private IXUITexture m_Bg;
+
+ private Transform m_AwardRoot;
+
+ private XUIPool m_ItemPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ private XLeftTimeCounter m_LeftTime;
+
+ protected override void Init()
+ {
+ base.Init();
+ this.doc = XDocuments.GetSpecificDocument<XOperatingActivityDocument>(XOperatingActivityDocument.uuID);
+ this.m_Tip1 = (base.PanelObject.transform.Find("Main/Tip1").GetComponent("XUILabel") as IXUILabel);
+ this.m_LeftTime = new XLeftTimeCounter(this.m_Tip1, true);
+ this.m_LeftTime.SetTimeFormat(0, 3, 4, false);
+ this.m_Tip2 = (base.PanelObject.transform.Find("Main/Tip2").GetComponent("XUILabel") as IXUILabel);
+ this.m_Enter = (base.PanelObject.transform.Find("Main/Btns/EnterBtn").GetComponent("XUIButton") as IXUIButton);
+ this.m_Bg = (base.PanelObject.transform.Find("Main/Bg").GetComponent("XUITexture") as IXUITexture);
+ this.m_AwardRoot = base.PanelObject.transform.Find("Main/Items");
+ GameObject gameObject = base.PanelObject.transform.Find("Main/Items/Item").gameObject;
+ this.m_ItemPool.SetupPool(this.m_AwardRoot.gameObject, gameObject, 7u, false);
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ this.doc.SendQueryHolidayData();
+ this.Refresh();
+ }
+
+ protected override void OnHide()
+ {
+ base.OnHide();
+ this.m_Bg.SetTexturePath("");
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ this.m_Enter.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnEnterClicked));
+ }
+
+ public void Refresh()
+ {
+ bool flag = !base.IsVisible();
+ if (!flag)
+ {
+ bool flag2 = this.doc.GetFestivalLeftTime() == 0u;
+ if (flag2)
+ {
+ this.m_LeftTime.SetLeftTime(1E+07f, -1);
+ this.m_LeftTime.SetFormatString(XSingleton<XStringTable>.singleton.GetString("HOLIDAY_TIP3"));
+ }
+ else
+ {
+ this.m_LeftTime.SetLeftTime(this.doc.GetFestivalLeftTime(), -1);
+ this.m_LeftTime.SetFormatString(XSingleton<XStringTable>.singleton.GetString("HOLIDAY_TIP1"));
+ }
+ this.m_Tip2.SetText(string.Format(XSingleton<XStringTable>.singleton.GetString("HOLIDAY_TIP2"), this.doc.GetFestivalLeftCount()));
+ this.SetAwardsInfo();
+ this.SetBG();
+ }
+ }
+
+ private bool OnEnterClicked(IXUIButton btn)
+ {
+ this.doc.EnterHolidayLevel();
+ return true;
+ }
+
+ private void SetBG()
+ {
+ string festivalPicPath = this.doc.GetFestivalPicPath();
+ bool flag = string.IsNullOrEmpty(festivalPicPath);
+ if (!flag)
+ {
+ this.m_Bg.SetTexturePath(festivalPicPath);
+ }
+ }
+
+ private void SetAwardsInfo()
+ {
+ this.m_ItemPool.ReturnAll(false);
+ uint[] festivalRewardList = this.doc.GetFestivalRewardList();
+ bool flag = festivalRewardList == null;
+ if (!flag)
+ {
+ for (int i = 0; i < festivalRewardList.Length; i++)
+ {
+ GameObject gameObject = this.m_ItemPool.FetchGameObject(false);
+ gameObject.transform.parent = this.m_AwardRoot;
+ gameObject.name = i.ToString();
+ gameObject.transform.localScale = Vector3.one;
+ gameObject.transform.localPosition = new Vector3((float)(this.m_ItemPool.TplWidth * i), 0f, 0f);
+ IXUISprite ixuisprite = gameObject.transform.Find("Icon").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.ID = (ulong)festivalRewardList[i];
+ XSingleton<XItemDrawerMgr>.singleton.normalItemDrawer.DrawItem(gameObject, (int)festivalRewardList[i], 0, false);
+ ixuisprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(XSingleton<UiUtility>.singleton.OnItemClick));
+ }
+ }
+ }
+
+ public override void OnUpdate()
+ {
+ base.OnUpdate();
+ this.m_LeftTime.Update();
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/HolidayHandler.cs.meta b/Client/Assets/Scripts/XMainClient/UI/HolidayHandler.cs.meta
new file mode 100644
index 00000000..46541d83
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/HolidayHandler.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 7eb94380509162640b23be441a76fe98
+timeCreated: 1611404005
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/HomeCropInfoHandler.cs b/Client/Assets/Scripts/XMainClient/UI/HomeCropInfoHandler.cs
new file mode 100644
index 00000000..a32af69f
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/HomeCropInfoHandler.cs
@@ -0,0 +1,767 @@
+using System;
+using System.Collections.Generic;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class HomeCropInfoHandler : DlgHandlerBase
+ {
+ private bool m_bIsPlayingAction
+ {
+ get
+ {
+ return DlgBase<HomePlantDlg, HomePlantBehaviour>.singleton.IsPlayingAction;
+ }
+ set
+ {
+ DlgBase<HomePlantDlg, HomePlantBehaviour>.singleton.IsPlayingAction = value;
+ }
+ }
+
+ protected override string FileName
+ {
+ get
+ {
+ return "Home/SeedInfo";
+ }
+ }
+
+ private GameObject m_itemGo;
+
+ private GameObject m_operateBtnGo;
+
+ private IXUILabel m_tittleLab;
+
+ private IXUILabel m_cdLab;
+
+ private IXUILabel m_harvestNeedTimeLab;
+
+ private IXUILabel m_statueLab;
+
+ private IXUILabel m_harvestLab;
+
+ private IXUILabel m_growUpLab;
+
+ private IXUILabel m_growUpStateLab;
+
+ private IXUISlider m_growthSlider;
+
+ private List<IXUILabel> m_homeLogs = new List<IXUILabel>();
+
+ private IXUIButton m_harvestBtn;
+
+ private IXUIButton m_stealBtn;
+
+ private IXUIButton m_fertilizerBtn;
+
+ private IXUIButton m_disinsectionBtn;
+
+ private IXUIButton m_wateringBtn;
+
+ private IXUIButton m_cancleBtn;
+
+ private HomePlantDocument m_doc;
+
+ private Farmland m_farmLand;
+
+ private uint m_token;
+
+ private uint m_token1;
+
+ private float m_fCoolTime = 3.5f;
+
+ private float m_fLastClickBtnTime = 0f;
+
+ private float m_harvestActionTime = 2.5f;
+
+ private float m_waterActionTime = 2.5f;
+
+ private readonly string m_waterFxPath = "Effects/FX_Particle/UIfx/UI_jy_ss";
+
+ private readonly string m_harvestFxPath = "Effects/FX_Particle/UIfx/UI_jy_sh";
+
+ protected override void Init()
+ {
+ this.m_tittleLab = (base.PanelObject.transform.Find("Title").GetComponent("XUILabel") as IXUILabel);
+ this.m_cdLab = (base.PanelObject.transform.Find("CD").GetComponent("XUILabel") as IXUILabel);
+ this.m_cancleBtn = (base.PanelObject.transform.Find("BtnCancelPlant").GetComponent("XUIButton") as IXUIButton);
+ this.m_cancleBtn.gameObject.SetActive(true);
+ Transform transform = base.PanelObject.transform.Find("Info");
+ this.m_harvestNeedTimeLab = (transform.Find("Time").GetComponent("XUILabel") as IXUILabel);
+ this.m_statueLab = (transform.Find("status").GetComponent("XUILabel") as IXUILabel);
+ this.m_harvestLab = (transform.Find("harvest").GetComponent("XUILabel") as IXUILabel);
+ this.m_growUpLab = (transform.Find("GrowUp").GetComponent("XUILabel") as IXUILabel);
+ this.m_growUpStateLab = (transform.Find("GrowUp/T").GetComponent("XUILabel") as IXUILabel);
+ this.m_growthSlider = (transform.Find("Bar").GetComponent("XUISlider") as IXUISlider);
+ transform = transform.Find("Log");
+ IXUILabel item = transform.Find("0").GetComponent("XUILabel") as IXUILabel;
+ this.m_homeLogs.Add(item);
+ item = (transform.Find("1").GetComponent("XUILabel") as IXUILabel);
+ this.m_homeLogs.Add(item);
+ item = (transform.Find("2").GetComponent("XUILabel") as IXUILabel);
+ this.m_homeLogs.Add(item);
+ this.m_itemGo = base.PanelObject.transform.Find("Item").gameObject;
+ this.m_operateBtnGo = base.PanelObject.transform.Find("OperateBtn").gameObject;
+ this.m_fertilizerBtn = (this.m_operateBtnGo.transform.Find("FertilizerBtn").GetComponent("XUIButton") as IXUIButton);
+ this.m_disinsectionBtn = (this.m_operateBtnGo.transform.Find("DisinsectionBtn").GetComponent("XUIButton") as IXUIButton);
+ this.m_wateringBtn = (this.m_operateBtnGo.transform.Find("WateringBtn").GetComponent("XUIButton") as IXUIButton);
+ this.m_harvestBtn = (base.PanelObject.transform.Find("BtnHarvest").GetComponent("XUIButton") as IXUIButton);
+ this.m_stealBtn = (base.PanelObject.transform.Find("BtnSteal").GetComponent("XUIButton") as IXUIButton);
+ this.m_doc = HomePlantDocument.Doc;
+ base.Init();
+ }
+
+ public override void RegisterEvent()
+ {
+ this.m_harvestBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnClickHarvestBtn));
+ this.m_stealBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnClickStealBtn));
+ this.m_fertilizerBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnClickFertilizerBtn));
+ this.m_disinsectionBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnClickDisinsectionBtn));
+ this.m_wateringBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnClickWateringBtn));
+ this.m_cancleBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnClickCancleBtn));
+ base.RegisterEvent();
+ }
+
+ protected override void OnShow()
+ {
+ this.m_bIsPlayingAction = false;
+ this.Fillcontent();
+ base.OnShow();
+ }
+
+ protected override void OnHide()
+ {
+ XSingleton<XTimerMgr>.singleton.KillTimer(this.m_token);
+ XSingleton<XTimerMgr>.singleton.KillTimer(this.m_token1);
+ bool flag = XSingleton<XEntityMgr>.singleton.Player != null;
+ if (flag)
+ {
+ XSingleton<XEntityMgr>.singleton.Player.PlayStateBack();
+ }
+ base.OnHide();
+ }
+
+ public override void StackRefresh()
+ {
+ base.StackRefresh();
+ }
+
+ public override void OnUnload()
+ {
+ base.OnUnload();
+ }
+
+ public void RefreshUI()
+ {
+ this.Fillcontent();
+ }
+
+ private void Fillcontent()
+ {
+ this.m_cancleBtn.gameObject.SetActive(false);
+ this.m_farmLand = this.m_doc.GetFarmland(this.m_doc.CurFarmlandId);
+ bool flag = this.m_farmLand == null || this.m_farmLand.IsFree;
+ if (flag)
+ {
+ XSingleton<XDebug>.singleton.AddErrorLog("data error,the farm is null or Free!", null, null, null, null, null);
+ }
+ else
+ {
+ switch (this.m_doc.HomeType)
+ {
+ case HomeTypeEnum.MyHome:
+ this.m_cancleBtn.gameObject.SetActive(this.m_farmLand.Stage != GrowStage.Ripe);
+ break;
+ case HomeTypeEnum.OtherHome:
+ this.m_cancleBtn.gameObject.SetActive(false);
+ break;
+ case HomeTypeEnum.GuildHome:
+ {
+ bool flag2 = XSingleton<XAttributeMgr>.singleton.XPlayerData != null && this.m_farmLand.OwnerRoleId == XSingleton<XAttributeMgr>.singleton.XPlayerData.RoleID;
+ if (flag2)
+ {
+ this.m_cancleBtn.gameObject.SetActive(true);
+ }
+ else
+ {
+ this.m_cancleBtn.gameObject.SetActive(false);
+ }
+ break;
+ }
+ default:
+ this.m_cancleBtn.gameObject.SetActive(false);
+ break;
+ }
+ XSingleton<XItemDrawerMgr>.singleton.normalItemDrawer.DrawItem(this.m_itemGo, this.m_farmLand.Row.PlantID[0], 0, false);
+ IXUISprite ixuisprite = this.m_itemGo.transform.Find("Icon").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.ID = (ulong)((long)this.m_farmLand.Row.PlantID[0]);
+ ixuisprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(XSingleton<UiUtility>.singleton.OnItemClick));
+ this.m_tittleLab.SetText(this.m_farmLand.Row.PlantName);
+ this.m_growUpLab.SetText(string.Format("{0}%", Math.Round((double)(this.m_farmLand.GrowSpeed * 100f))));
+ bool flag3 = this.m_farmLand.State > CropState.None;
+ if (flag3)
+ {
+ this.m_growUpStateLab.SetVisible(true);
+ }
+ else
+ {
+ this.m_growUpStateLab.SetVisible(false);
+ }
+ this.m_growthSlider.Value = this.m_farmLand.GrowPercent;
+ this.m_harvestLab.SetText(this.m_farmLand.Row.PlantID[1].ToString());
+ bool flag4 = this.m_farmLand.Stage != GrowStage.Ripe;
+ if (flag4)
+ {
+ this.m_harvestNeedTimeLab.SetVisible(true);
+ string timeString = this.GetTimeString((ulong)this.m_farmLand.GrowLeftTime(), XStringDefineProxy.GetString("HomeCropRipeNeedTime"));
+ this.m_harvestNeedTimeLab.SetText(timeString);
+ }
+ else
+ {
+ this.m_harvestNeedTimeLab.SetVisible(false);
+ }
+ this.SetLogInfos(this.m_farmLand);
+ bool flag5 = this.m_farmLand.State > CropState.None;
+ if (flag5)
+ {
+ this.m_operateBtnGo.SetActive(true);
+ this.m_harvestBtn.SetVisible(false);
+ this.m_stealBtn.SetVisible(false);
+ this.m_cdLab.SetVisible(false);
+ this.m_statueLab.SetText(XStringDefineProxy.GetString("NeedHelp"));
+ }
+ else
+ {
+ this.m_operateBtnGo.SetActive(false);
+ this.m_harvestBtn.SetVisible(false);
+ this.m_stealBtn.SetVisible(false);
+ this.m_cdLab.SetVisible(false);
+ bool flag6 = this.m_farmLand.Stage == GrowStage.Ripe;
+ if (flag6)
+ {
+ bool flag7 = XSingleton<XAttributeMgr>.singleton.XPlayerData != null && this.m_farmLand.OwnerRoleId == XSingleton<XAttributeMgr>.singleton.XPlayerData.RoleID;
+ if (flag7)
+ {
+ this.m_harvestBtn.SetVisible(true);
+ }
+ else
+ {
+ this.m_stealBtn.SetVisible(true);
+ }
+ this.m_statueLab.SetText(XStringDefineProxy.GetString("HadRipe"));
+ }
+ else
+ {
+ this.m_cdLab.SetVisible(true);
+ string timeString2 = this.GetTimeString(this.m_farmLand.StateLeftTime, XStringDefineProxy.GetString("HomeSeedCoolTime"));
+ this.m_cdLab.SetText(timeString2);
+ this.m_statueLab.SetText(XStringDefineProxy.GetString("Plant_Growing"));
+ }
+ }
+ XSingleton<XTimerMgr>.singleton.KillTimer(this.m_token);
+ this.m_token = XSingleton<XTimerMgr>.singleton.SetTimer(5f, new XTimerMgr.ElapsedEventHandler(this.QequestInfo), null);
+ }
+ }
+
+ private void SetLogInfos(Farmland farm)
+ {
+ float num = 0f;
+ for (int i = 0; i < this.m_homeLogs.Count; i++)
+ {
+ bool flag = i >= this.m_farmLand.FarmLogList.Count;
+ if (flag)
+ {
+ this.m_homeLogs[i].SetVisible(false);
+ }
+ else
+ {
+ this.m_homeLogs[i].SetVisible(true);
+ this.m_homeLogs[i].SetText(this.m_farmLand.FarmLogList[i].Txt);
+ this.m_homeLogs[i].gameObject.transform.localPosition = new Vector3(0f, num, 0f);
+ num -= (float)this.m_homeLogs[i].spriteHeight;
+ num -= 5f;
+ }
+ }
+ }
+
+ public void QequestInfo(object o = null)
+ {
+ XSingleton<XTimerMgr>.singleton.KillTimer(this.m_token);
+ HomePlantDocument doc = HomePlantDocument.Doc;
+ doc.FetchPlantInfo(doc.CurFarmlandId);
+ this.m_token = XSingleton<XTimerMgr>.singleton.SetTimer(5f, new XTimerMgr.ElapsedEventHandler(this.QequestInfo), null);
+ }
+
+ public override void OnUpdate()
+ {
+ base.OnUpdate();
+ bool flag = this.m_farmLand == null || this.m_farmLand.IsFree;
+ if (!flag)
+ {
+ bool flag2 = this.m_farmLand.Stage != GrowStage.Ripe;
+ if (flag2)
+ {
+ this.m_harvestNeedTimeLab.SetVisible(true);
+ string timeString = this.GetTimeString((ulong)this.m_farmLand.GrowLeftTime(), XStringDefineProxy.GetString("HomeCropRipeNeedTime"));
+ this.m_harvestNeedTimeLab.SetText(timeString);
+ this.m_growthSlider.Value = this.m_farmLand.GrowPercent;
+ bool flag3 = this.m_farmLand.State == CropState.None;
+ if (flag3)
+ {
+ this.m_cdLab.SetVisible(true);
+ timeString = this.GetTimeString(this.m_farmLand.StateLeftTime, XStringDefineProxy.GetString("HomeSeedCoolTime"));
+ this.m_cdLab.SetText(timeString);
+ }
+ }
+ else
+ {
+ this.m_harvestNeedTimeLab.SetVisible(false);
+ this.m_cdLab.SetVisible(false);
+ }
+ }
+ }
+
+ private string GetTimeString(ulong ti, string str)
+ {
+ bool flag = ti < 60UL;
+ string result;
+ if (flag)
+ {
+ string arg = string.Format("{0}{1}", ti, XStringDefineProxy.GetString("MINUTE_DUARATION"));
+ result = string.Format(str, arg);
+ }
+ else
+ {
+ ulong num = ti / 60UL;
+ ulong num2 = ti % 60UL;
+ bool flag2 = num2 > 0UL;
+ string arg;
+ if (flag2)
+ {
+ arg = string.Format("{0}{1}{2}{3}", new object[]
+ {
+ num,
+ XStringDefineProxy.GetString("HOUR_DUARATION"),
+ num2,
+ XStringDefineProxy.GetString("MINUTE_DUARATION")
+ });
+ }
+ else
+ {
+ arg = string.Format("{0}{1}", num, XStringDefineProxy.GetString("HOUR_DUARATION"));
+ }
+ result = string.Format(str, arg);
+ }
+ return result;
+ }
+
+ private bool OnClickHarvestBtn(IXUIButton btn)
+ {
+ bool flag = this.SetButtonCool(this.m_fCoolTime);
+ bool result;
+ if (flag)
+ {
+ result = true;
+ }
+ else
+ {
+ bool flag2 = XSingleton<XAttributeMgr>.singleton.XPlayerData == null || this.m_farmLand.OwnerRoleId != XSingleton<XAttributeMgr>.singleton.XPlayerData.RoleID;
+ if (flag2)
+ {
+ result = true;
+ }
+ else
+ {
+ bool flag3 = this.m_farmLand.Stage != GrowStage.Ripe;
+ if (flag3)
+ {
+ result = true;
+ }
+ else
+ {
+ bool bIsPlayingAction = this.m_bIsPlayingAction;
+ if (bIsPlayingAction)
+ {
+ result = true;
+ }
+ else
+ {
+ bool flag4 = !XOutlookHelper.CanPlaySpecifiedAnimation(XSingleton<XEntityMgr>.singleton.Player);
+ if (flag4)
+ {
+ result = true;
+ }
+ else
+ {
+ bool flag5 = this.m_doc.HomeType == HomeTypeEnum.GuildHome;
+ if (flag5)
+ {
+ XSingleton<UiUtility>.singleton.ShowModalDialog(XStringDefineProxy.GetString("GuildHomeHarvestTips"), XStringDefineProxy.GetString("COMMON_OK"), XStringDefineProxy.GetString("COMMON_CANCEL"), new ButtonClickEventHandler(this.PlayHarvestAction));
+ }
+ else
+ {
+ this.PlayHarvestAction();
+ }
+ result = true;
+ }
+ }
+ }
+ }
+ }
+ return result;
+ }
+
+ private bool PlayHarvestAction(IXUIButton btn)
+ {
+ this.PlayHarvestAction();
+ XSingleton<UiUtility>.singleton.CloseModalDlg();
+ return true;
+ }
+
+ private void PlayHarvestAction()
+ {
+ bool flag = XSingleton<XEntityMgr>.singleton.Player == null;
+ if (flag)
+ {
+ this.m_bIsPlayingAction = false;
+ }
+ else
+ {
+ XSingleton<XEntityMgr>.singleton.Player.PlaySpecifiedAnimation(this.m_doc.GetHomePlantAction(ActionType.Harvest));
+ XSingleton<XTimerMgr>.singleton.KillTimer(this.m_token1);
+ this.m_token1 = XSingleton<XTimerMgr>.singleton.SetTimer(this.m_harvestActionTime, new XTimerMgr.ElapsedEventHandler(this.QequestHarvest), null);
+ XSingleton<XFxMgr>.singleton.CreateAndPlay(this.m_harvestFxPath, XSingleton<XEntityMgr>.singleton.Player.EngineObject, Vector3.zero, Vector3.one, 1f, false, this.m_harvestActionTime, true);
+ XSingleton<XAudioMgr>.singleton.PlayUISound("Audio/UI/Farm_PlantLV1", true, AudioChannel.Action);
+ this.m_bIsPlayingAction = true;
+ }
+ }
+
+ private bool OnClickStealBtn(IXUIButton btn)
+ {
+ bool flag = this.SetButtonCool(this.m_fCoolTime);
+ bool result;
+ if (flag)
+ {
+ result = true;
+ }
+ else
+ {
+ bool flag2 = this.m_farmLand.OwnerRoleId == 0UL || (XSingleton<XAttributeMgr>.singleton.XPlayerData != null && this.m_farmLand.OwnerRoleId == XSingleton<XAttributeMgr>.singleton.XPlayerData.RoleID);
+ if (flag2)
+ {
+ result = true;
+ }
+ else
+ {
+ bool flag3 = this.m_farmLand.Stage != GrowStage.Ripe;
+ if (flag3)
+ {
+ result = true;
+ }
+ else
+ {
+ bool flag4 = XSingleton<XEntityMgr>.singleton.Player == null;
+ if (flag4)
+ {
+ result = true;
+ }
+ else
+ {
+ int num = this.m_farmLand.CanSteal();
+ bool flag5 = num == 1;
+ if (flag5)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString("CannotStealed1"), "fece00");
+ result = true;
+ }
+ else
+ {
+ bool flag6 = num == 2;
+ if (flag6)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString("CannotStealed2"), "fece00");
+ result = true;
+ }
+ else
+ {
+ bool flag7 = XSingleton<XEntityMgr>.singleton.Player == null;
+ if (flag7)
+ {
+ result = true;
+ }
+ else
+ {
+ bool flag8 = !XOutlookHelper.CanPlaySpecifiedAnimation(XSingleton<XEntityMgr>.singleton.Player);
+ if (flag8)
+ {
+ result = true;
+ }
+ else
+ {
+ bool bIsPlayingAction = this.m_bIsPlayingAction;
+ if (bIsPlayingAction)
+ {
+ result = true;
+ }
+ else
+ {
+ this.m_bIsPlayingAction = true;
+ XSingleton<XEntityMgr>.singleton.Player.PlaySpecifiedAnimation(this.m_doc.GetHomePlantAction(ActionType.Harvest));
+ XSingleton<XTimerMgr>.singleton.KillTimer(this.m_token1);
+ this.m_token1 = XSingleton<XTimerMgr>.singleton.SetTimer(this.m_harvestActionTime, new XTimerMgr.ElapsedEventHandler(this.QequestSteal), null);
+ XSingleton<XFxMgr>.singleton.CreateAndPlay(this.m_harvestFxPath, XSingleton<XEntityMgr>.singleton.Player.EngineObject, Vector3.zero, Vector3.one, 1f, false, this.m_harvestActionTime, true);
+ XSingleton<XAudioMgr>.singleton.PlayUISound("Audio/UI/Farm_PlantLV1", true, AudioChannel.Action);
+ result = true;
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ return result;
+ }
+
+ private bool OnClickFertilizerBtn(IXUIButton btn)
+ {
+ bool flag = this.SetButtonCool(this.m_fCoolTime);
+ bool result;
+ if (flag)
+ {
+ result = true;
+ }
+ else
+ {
+ bool flag2 = this.m_farmLand.State == CropState.None;
+ if (flag2)
+ {
+ result = true;
+ }
+ else
+ {
+ bool flag3 = XSingleton<XEntityMgr>.singleton.Player == null;
+ if (flag3)
+ {
+ result = true;
+ }
+ else
+ {
+ bool flag4 = !XOutlookHelper.CanPlaySpecifiedAnimation(XSingleton<XEntityMgr>.singleton.Player);
+ if (flag4)
+ {
+ result = true;
+ }
+ else
+ {
+ bool bIsPlayingAction = this.m_bIsPlayingAction;
+ if (bIsPlayingAction)
+ {
+ result = true;
+ }
+ else
+ {
+ this.m_bIsPlayingAction = true;
+ XSingleton<XTimerMgr>.singleton.KillTimer(this.m_token1);
+ this.m_token1 = XSingleton<XTimerMgr>.singleton.SetTimer(this.m_waterActionTime, new XTimerMgr.ElapsedEventHandler(this.QequestPlantCultivation), CropState.Fertilizer);
+ XSingleton<XEntityMgr>.singleton.Player.PlaySpecifiedAnimation(this.m_doc.GetHomePlantAction(ActionType.Fertilizer));
+ XSingleton<XFxMgr>.singleton.CreateAndPlay(HomePlantDocument.PlantEffectPath, XSingleton<XEntityMgr>.singleton.Player.EngineObject, Vector3.zero, Vector3.one, 1f, false, this.m_waterActionTime, true);
+ XSingleton<XAudioMgr>.singleton.PlayUISound("Audio/UI/Farm_Planting", true, AudioChannel.Action);
+ result = true;
+ }
+ }
+ }
+ }
+ }
+ return result;
+ }
+
+ private bool OnClickDisinsectionBtn(IXUIButton btn)
+ {
+ bool flag = this.SetButtonCool(this.m_fCoolTime);
+ bool result;
+ if (flag)
+ {
+ result = true;
+ }
+ else
+ {
+ bool flag2 = this.m_farmLand.State == CropState.None;
+ if (flag2)
+ {
+ result = true;
+ }
+ else
+ {
+ bool flag3 = XSingleton<XEntityMgr>.singleton.Player == null;
+ if (flag3)
+ {
+ result = true;
+ }
+ else
+ {
+ bool flag4 = !XOutlookHelper.CanPlaySpecifiedAnimation(XSingleton<XEntityMgr>.singleton.Player);
+ if (flag4)
+ {
+ result = true;
+ }
+ else
+ {
+ bool bIsPlayingAction = this.m_bIsPlayingAction;
+ if (bIsPlayingAction)
+ {
+ result = true;
+ }
+ else
+ {
+ this.m_bIsPlayingAction = true;
+ XSingleton<XTimerMgr>.singleton.KillTimer(this.m_token1);
+ this.m_token1 = XSingleton<XTimerMgr>.singleton.SetTimer(this.m_waterActionTime, new XTimerMgr.ElapsedEventHandler(this.QequestPlantCultivation), CropState.Disinsection);
+ XSingleton<XEntityMgr>.singleton.Player.PlaySpecifiedAnimation(this.m_doc.GetHomePlantAction(ActionType.Disinsection));
+ XSingleton<XFxMgr>.singleton.CreateAndPlay(HomePlantDocument.PlantEffectPath, XSingleton<XEntityMgr>.singleton.Player.EngineObject, Vector3.zero, Vector3.one, 1f, false, this.m_waterActionTime, true);
+ XSingleton<XAudioMgr>.singleton.PlayUISound("Audio/UI/Farm_Planting", true, AudioChannel.Action);
+ result = true;
+ }
+ }
+ }
+ }
+ }
+ return result;
+ }
+
+ private bool OnClickWateringBtn(IXUIButton btn)
+ {
+ bool flag = this.SetButtonCool(this.m_fCoolTime);
+ bool result;
+ if (flag)
+ {
+ result = true;
+ }
+ else
+ {
+ bool flag2 = this.m_farmLand.State == CropState.None;
+ if (flag2)
+ {
+ result = true;
+ }
+ else
+ {
+ bool flag3 = XSingleton<XEntityMgr>.singleton.Player == null;
+ if (flag3)
+ {
+ result = true;
+ }
+ else
+ {
+ bool flag4 = !XOutlookHelper.CanPlaySpecifiedAnimation(XSingleton<XEntityMgr>.singleton.Player);
+ if (flag4)
+ {
+ result = true;
+ }
+ else
+ {
+ bool bIsPlayingAction = this.m_bIsPlayingAction;
+ if (bIsPlayingAction)
+ {
+ result = true;
+ }
+ else
+ {
+ this.m_bIsPlayingAction = true;
+ XSingleton<XTimerMgr>.singleton.KillTimer(this.m_token1);
+ this.m_token1 = XSingleton<XTimerMgr>.singleton.SetTimer(this.m_waterActionTime, new XTimerMgr.ElapsedEventHandler(this.QequestPlantCultivation), CropState.Watering);
+ XSingleton<XEntityMgr>.singleton.Player.PlaySpecifiedAnimation(this.m_doc.GetHomePlantAction(ActionType.Watering));
+ XSingleton<XFxMgr>.singleton.CreateAndPlay(this.m_waterFxPath, XSingleton<XEntityMgr>.singleton.Player.EngineObject, Vector3.zero, Vector3.one, 1f, false, this.m_waterActionTime, true);
+ XSingleton<XAudioMgr>.singleton.PlayUISound("Audio/UI/Farm_Sprayingwater", true, AudioChannel.Action);
+ result = true;
+ }
+ }
+ }
+ }
+ }
+ return result;
+ }
+
+ private bool OnClickCancleBtn(IXUIButton btn)
+ {
+ bool flag = this.SetButtonCool(this.m_fCoolTime);
+ bool result;
+ if (flag)
+ {
+ result = true;
+ }
+ else
+ {
+ bool flag2 = this.m_farmLand == null;
+ if (flag2)
+ {
+ result = true;
+ }
+ else
+ {
+ this.m_doc.StartPlant(this.m_farmLand.FarmlandID, this.m_farmLand.SeedId, true);
+ result = true;
+ }
+ }
+ return result;
+ }
+
+ private bool SetButtonCool(float time)
+ {
+ float num = Time.realtimeSinceStartup - this.m_fLastClickBtnTime;
+ bool flag = num < time;
+ bool result;
+ if (flag)
+ {
+ result = true;
+ }
+ else
+ {
+ this.m_fLastClickBtnTime = Time.realtimeSinceStartup;
+ result = false;
+ }
+ return result;
+ }
+
+ public void QequestHarvest(object o = null)
+ {
+ bool flag = XSingleton<XEntityMgr>.singleton.Player != null;
+ if (flag)
+ {
+ XSingleton<XEntityMgr>.singleton.Player.PlayStateBack();
+ }
+ this.m_doc.PlantHarvest(this.m_farmLand.FarmlandID);
+ this.m_bIsPlayingAction = false;
+ }
+
+ public void QequestSteal(object o = null)
+ {
+ bool flag = XSingleton<XEntityMgr>.singleton.Player != null;
+ if (flag)
+ {
+ XSingleton<XEntityMgr>.singleton.Player.PlayStateBack();
+ }
+ this.m_doc.HomeSteal(this.m_farmLand.FarmlandID);
+ this.m_bIsPlayingAction = false;
+ }
+
+ public void QequestPlantCultivation(object o = null)
+ {
+ bool flag = XSingleton<XEntityMgr>.singleton.Player != null;
+ if (flag)
+ {
+ XSingleton<XEntityMgr>.singleton.Player.PlayStateBack();
+ }
+ bool flag2 = o != null;
+ if (flag2)
+ {
+ this.m_doc.PlantCultivation(this.m_farmLand.FarmlandID, this.m_doc.GrowStateTrans((CropState)o));
+ }
+ this.m_bIsPlayingAction = false;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/HomeCropInfoHandler.cs.meta b/Client/Assets/Scripts/XMainClient/UI/HomeCropInfoHandler.cs.meta
new file mode 100644
index 00000000..e3c3feb2
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/HomeCropInfoHandler.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 1b899c6ba2a482244a0712e59491f37c
+timeCreated: 1611403316
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/HomeFishingBehaviour.cs b/Client/Assets/Scripts/XMainClient/UI/HomeFishingBehaviour.cs
new file mode 100644
index 00000000..1cfa1151
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/HomeFishingBehaviour.cs
@@ -0,0 +1,99 @@
+using System;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class HomeFishingBehaviour : DlgBehaviourBase
+ {
+ public IXUIButton m_Close;
+
+ public GameObject m_InFishingFrame;
+
+ public GameObject m_NotFishingFrame;
+
+ public IXUIButton m_StartFishingBtn;
+
+ public IXUIButton m_SweepBtn;
+
+ public IXUIButton m_FishLevelBtn;
+
+ public IXUILabel m_FishLevelNum;
+
+ public IXUIProgress m_FishExpValue;
+
+ public IXUILabel m_StoshNum;
+
+ public IXUIButton m_HomeMainBtn;
+
+ public IXUIButton m_HomeShopBtn;
+
+ public IXUIButton m_HomeCookingBtn;
+
+ public GameObject m_FishingTips;
+
+ public GameObject m_NoFishTips;
+
+ public GameObject m_NoStosh;
+
+ public GameObject m_HighQualityFx;
+
+ public GameObject m_LowQualityFx;
+
+ public IXUIScrollView m_ItemScrollView;
+
+ public XUIPool m_FishPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ public GameObject m_FishLevelFrame;
+
+ public IXUILabel m_LevelFrameLevel;
+
+ public IXUILabel m_LevelFrameExp;
+
+ public IXUIProgress m_LevelFrameExpBar;
+
+ public IXUIScrollView m_FishLevelScrollView;
+
+ public IXUIButton m_LevelFrameCloseBtn;
+
+ public XUIPool m_FishLevelPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ public XUIPool m_LevelItemPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ private void Awake()
+ {
+ this.m_Close = (base.transform.Find("Bg/InFishingFrame/Close").GetComponent("XUIButton") as IXUIButton);
+ this.m_InFishingFrame = base.transform.Find("Bg/InFishingFrame").gameObject;
+ this.m_NotFishingFrame = base.transform.Find("Bg/NotFishingFrame").gameObject;
+ this.m_StartFishingBtn = (this.m_NotFishingFrame.transform.Find("StartFishingBtn").GetComponent("XUIButton") as IXUIButton);
+ this.m_SweepBtn = (this.m_NotFishingFrame.transform.Find("SweepBtn").GetComponent("XUIButton") as IXUIButton);
+ this.m_FishLevelBtn = (this.m_InFishingFrame.transform.Find("Level").GetComponent("XUIButton") as IXUIButton);
+ this.m_FishLevelNum = (this.m_FishLevelBtn.gameObject.transform.Find("Num").GetComponent("XUILabel") as IXUILabel);
+ this.m_FishExpValue = (this.m_InFishingFrame.transform.Find("Exp").GetComponent("XUIProgress") as IXUIProgress);
+ this.m_StoshNum = (this.m_InFishingFrame.transform.Find("Stosh/Num").GetComponent("XUILabel") as IXUILabel);
+ this.m_HomeMainBtn = (this.m_InFishingFrame.transform.Find("HomeMainBtn").GetComponent("XUIButton") as IXUIButton);
+ this.m_HomeShopBtn = (this.m_InFishingFrame.transform.Find("HomeShopBtn").GetComponent("XUIButton") as IXUIButton);
+ this.m_HomeCookingBtn = (this.m_InFishingFrame.transform.Find("HomeCookingBtn").GetComponent("XUIButton") as IXUIButton);
+ this.m_FishingTips = this.m_InFishingFrame.transform.Find("Auto").gameObject;
+ this.m_NoFishTips = this.m_InFishingFrame.transform.Find("Items/Tips").gameObject;
+ this.m_NoStosh = this.m_InFishingFrame.transform.Find("Stosh/red").gameObject;
+ this.m_HighQualityFx = this.m_InFishingFrame.transform.Find("Items/UI_jy_dy_pzkL").gameObject;
+ this.m_LowQualityFx = this.m_InFishingFrame.transform.Find("Items/UI_jy_dy_pzk").gameObject;
+ this.m_ItemScrollView = (this.m_InFishingFrame.transform.Find("Items/ScrollView").GetComponent("XUIScrollView") as IXUIScrollView);
+ Transform transform = this.m_InFishingFrame.transform.Find("Items/ScrollView/Tpl");
+ this.m_FishPool.SetupPool(transform.parent.gameObject, transform.gameObject, 10u, false);
+ this.m_FishLevelFrame = base.transform.Find("Bg/InFishingFrame/FishingLevelFrame").gameObject;
+ this.m_LevelFrameCloseBtn = (this.m_FishLevelFrame.transform.Find("Close").GetComponent("XUIButton") as IXUIButton);
+ this.m_LevelFrameLevel = (this.m_FishLevelFrame.transform.Find("Info/Level").GetComponent("XUILabel") as IXUILabel);
+ this.m_LevelFrameExp = (this.m_FishLevelFrame.transform.Find("Info/Exp").GetComponent("XUILabel") as IXUILabel);
+ this.m_LevelFrameExpBar = (this.m_FishLevelFrame.transform.Find("Info/Bar").GetComponent("XUIProgress") as IXUIProgress);
+ this.m_FishLevelScrollView = (this.m_FishLevelFrame.transform.Find("ScrollView").GetComponent("XUIScrollView") as IXUIScrollView);
+ transform = this.m_FishLevelFrame.transform.Find("ScrollView/Tpl");
+ this.m_FishLevelPool.SetupPool(transform.parent.gameObject, transform.gameObject, 10u, false);
+ transform = this.m_FishLevelFrame.transform.Find("ScrollView/Item");
+ this.m_LevelItemPool.SetupPool(transform.parent.gameObject, transform.gameObject, 10u, false);
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/HomeFishingBehaviour.cs.meta b/Client/Assets/Scripts/XMainClient/UI/HomeFishingBehaviour.cs.meta
new file mode 100644
index 00000000..47a829d3
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/HomeFishingBehaviour.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: ecb0ef76fded6164ea9cc4def51c2415
+timeCreated: 1611404788
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/HomeFishingDlg.cs b/Client/Assets/Scripts/XMainClient/UI/HomeFishingDlg.cs
new file mode 100644
index 00000000..40642b5b
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/HomeFishingDlg.cs
@@ -0,0 +1,445 @@
+using System;
+using System.Collections.Generic;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class HomeFishingDlg : DlgBase<HomeFishingDlg, HomeFishingBehaviour>
+ {
+ public override string fileName
+ {
+ get
+ {
+ return "Home/FishingDlg";
+ }
+ }
+
+ public override int layer
+ {
+ get
+ {
+ return 1;
+ }
+ }
+
+ public override bool autoload
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ private XHomeFishingDocument _doc = null;
+
+ private XCharacterItemDocument _itemDoc = null;
+
+ private XSweepDocument _sweepDoc = null;
+
+ private XWelfareDocument _welfareDoc = null;
+
+ public XYuyinView _yuyinHandler;
+
+ private uint _timeToken;
+
+ protected override void Init()
+ {
+ base.Init();
+ this._doc = XDocuments.GetSpecificDocument<XHomeFishingDocument>(XHomeFishingDocument.uuID);
+ this._itemDoc = XDocuments.GetSpecificDocument<XCharacterItemDocument>(XCharacterItemDocument.uuID);
+ this._sweepDoc = XDocuments.GetSpecificDocument<XSweepDocument>(XSweepDocument.uuID);
+ this._welfareDoc = XDocuments.GetSpecificDocument<XWelfareDocument>(XWelfareDocument.uuID);
+ base.uiBehaviour.m_FishLevelFrame.SetActive(false);
+ base.uiBehaviour.m_HighQualityFx.SetActive(false);
+ base.uiBehaviour.m_LowQualityFx.SetActive(false);
+ }
+
+ protected override void OnLoad()
+ {
+ DlgHandlerBase.EnsureCreate<XYuyinView>(ref this._yuyinHandler, base.uiBehaviour.transform, true, this);
+ this._yuyinHandler.SetVisible(false);
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ base.uiBehaviour.m_Close.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnCloseBtnClick));
+ base.uiBehaviour.m_StartFishingBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnStartFishingBtnClick));
+ base.uiBehaviour.m_SweepBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnSweepButtonClicked));
+ base.uiBehaviour.m_HomeMainBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnHomeMainBtnClick));
+ base.uiBehaviour.m_HomeShopBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnHomeShopBtnClick));
+ base.uiBehaviour.m_HomeCookingBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnHomeCookingBtnClick));
+ base.uiBehaviour.m_FishLevelBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnFishLevelBtnClick));
+ base.uiBehaviour.m_LevelFrameCloseBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnFishLevelFrameCloseBtnClick));
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ base.uiBehaviour.m_FishingTips.SetActive(false);
+ bool flag = this._yuyinHandler != null;
+ if (flag)
+ {
+ this._yuyinHandler.Show(YuyinIconType.HOME, 2);
+ this._yuyinHandler.Refresh(YuyinIconType.HOME);
+ }
+ }
+
+ protected override void OnHide()
+ {
+ bool isFishing = this._doc.IsFishing;
+ if (isFishing)
+ {
+ this._doc.LeaveFishing();
+ XSingleton<XInput>.singleton.Freezed = false;
+ }
+ this._itemDoc.ToggleBlock(false);
+ bool flag = DlgBase<XMainInterface, XMainInterfaceBehaviour>.singleton.IsLoaded();
+ if (flag)
+ {
+ DlgBase<XMainInterface, XMainInterfaceBehaviour>.singleton.SetVisible(true, true);
+ }
+ XSingleton<XTimerMgr>.singleton.KillTimer(this._timeToken);
+ base.uiBehaviour.m_HighQualityFx.SetActive(false);
+ base.uiBehaviour.m_LowQualityFx.SetActive(false);
+ base.OnHide();
+ }
+
+ protected override void OnUnload()
+ {
+ bool isFishing = this._doc.IsFishing;
+ if (isFishing)
+ {
+ this._doc.LeaveFishing();
+ }
+ XSingleton<XInput>.singleton.Freezed = false;
+ this._itemDoc.ToggleBlock(false);
+ XSingleton<XTimerMgr>.singleton.KillTimer(this._timeToken);
+ DlgHandlerBase.EnsureUnload<XYuyinView>(ref this._yuyinHandler);
+ base.OnUnload();
+ }
+
+ public void Refresh(bool showFishResult = false)
+ {
+ this._itemDoc.ToggleBlock(false);
+ bool flag = showFishResult && !this._doc.LastFishingHasFish;
+ if (flag)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString("HomeFishingFail"), "fece00");
+ }
+ bool lastLevelUp = this._doc.LastLevelUp;
+ if (lastLevelUp)
+ {
+ XSingleton<XFxMgr>.singleton.CreateAndPlay(XHomeFishingDocument.LEVELUPFX, XSingleton<XEntityMgr>.singleton.Player.EngineObject, Vector3.zero, Vector3.one, 1f, false, 2f, true);
+ this._doc.LastLevelUp = false;
+ }
+ base.uiBehaviour.m_FishLevelNum.SetText(this._doc.FishingLevel.ToString());
+ GardenFishConfig.RowData byFishLeve = this._doc._HomeFishTable.GetByFishLeve(this._doc.FishingLevel);
+ base.uiBehaviour.m_FishExpValue.value = ((byFishLeve.Experience == 0u) ? 1f : (this._doc.CurrentExp * 1f / byFishLeve.Experience));
+ ulong itemCount = XBagDocument.BagDoc.GetItemCount(XHomeFishingDocument.stoshID);
+ base.uiBehaviour.m_StoshNum.SetText(itemCount.ToString());
+ base.uiBehaviour.m_NoStosh.SetActive(itemCount == 0UL);
+ base.uiBehaviour.m_NoFishTips.SetActive(this._doc.FishList.Count == 0);
+ base.uiBehaviour.m_ItemScrollView.SetPosition(0f);
+ base.uiBehaviour.m_FishPool.ReturnAll(false);
+ Vector3 tplPos = base.uiBehaviour.m_FishPool.TplPos;
+ for (int i = this._doc.FishList.Count - 1; i >= 0; i--)
+ {
+ GameObject gameObject = base.uiBehaviour.m_FishPool.FetchGameObject(false);
+ gameObject.transform.localPosition = new Vector3(tplPos.x + (float)((this._doc.FishList.Count - 1 - i) * base.uiBehaviour.m_FishPool.TplWidth), tplPos.y);
+ ItemList.RowData itemConf = XBagDocument.GetItemConf((int)this._doc.FishList[i].itemID);
+ XSingleton<XItemDrawerMgr>.singleton.normalItemDrawer.DrawItem(gameObject, itemConf, (int)this._doc.FishList[i].itemCount, true);
+ IXUISprite ixuisprite = gameObject.transform.Find("Icon").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.ID = (ulong)this._doc.FishList[i].itemID;
+ bool flag2 = !itemConf.CanTrade;
+ if (flag2)
+ {
+ ixuisprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(XSingleton<UiUtility>.singleton.OnBindItemClick));
+ }
+ else
+ {
+ ixuisprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(XSingleton<UiUtility>.singleton.OnItemClick));
+ }
+ }
+ bool activeInHierarchy = base.uiBehaviour.m_FishLevelFrame.activeInHierarchy;
+ if (activeInHierarchy)
+ {
+ base.uiBehaviour.m_LevelFrameLevel.SetText(this._doc.FishingLevel.ToString());
+ bool flag3 = byFishLeve.Experience == 0u;
+ if (flag3)
+ {
+ base.uiBehaviour.m_LevelFrameExp.SetText(XStringDefineProxy.GetString("FishingLevelMax"));
+ base.uiBehaviour.m_LevelFrameExpBar.value = 1f;
+ }
+ else
+ {
+ base.uiBehaviour.m_LevelFrameExp.SetText(string.Format("{0}/{1}", this._doc.CurrentExp, byFishLeve.Experience));
+ base.uiBehaviour.m_LevelFrameExpBar.value = this._doc.CurrentExp * 1f / byFishLeve.Experience;
+ }
+ }
+ }
+
+ private void ShowFishLevelFrame()
+ {
+ uint fishingLevel = this._doc.FishingLevel;
+ int num = this._doc._HomeFishTable.Table.Length;
+ uint num2 = 0u;
+ base.uiBehaviour.m_FishLevelFrame.SetActive(true);
+ base.uiBehaviour.m_LevelFrameLevel.SetText(this._doc.FishingLevel.ToString());
+ base.uiBehaviour.m_FishLevelPool.ReturnAll(false);
+ base.uiBehaviour.m_LevelItemPool.ReturnAll(false);
+ List<GameObject> list = new List<GameObject>();
+ HashSet<int> hashSet = new HashSet<int>();
+ for (int i = 0; i < this._doc.FishInfoTable.Table.Length; i++)
+ {
+ bool flag = !this._doc.FishInfoTable.Table[i].ShowInLevel;
+ if (flag)
+ {
+ hashSet.Add((int)this._doc.FishInfoTable.Table[i].FishID);
+ }
+ }
+ IXUIPanel ixuipanel = base.uiBehaviour.m_FishLevelPool._tpl.transform.parent.GetComponent("XUIPanel") as IXUIPanel;
+ int num3 = (int)(fishingLevel - 1u);
+ int num4 = num3;
+ bool flag2 = false;
+ bool flag3 = (float)(base.uiBehaviour.m_FishLevelPool.TplHeight * (num - num3)) < ixuipanel.ClipRange.w;
+ if (flag3)
+ {
+ num4 = 0;
+ flag2 = true;
+ }
+ Vector3 tplPos = base.uiBehaviour.m_FishLevelPool.TplPos;
+ Vector3 tplPos2 = base.uiBehaviour.m_LevelItemPool.TplPos;
+ for (int j = 0; j < num; j++)
+ {
+ GardenFishConfig.RowData rowData = this._doc._HomeFishTable.Table[j];
+ GameObject gameObject = base.uiBehaviour.m_FishLevelPool.FetchGameObject(false);
+ IXUILabel ixuilabel = gameObject.transform.Find("Level").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel.SetText(string.Format("{0}{1}", rowData.FishLeve, XStringDefineProxy.GetString("LevelName")));
+ IXUILabel ixuilabel2 = gameObject.transform.Find("Rate").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel2.SetText(string.Format("{0}%", rowData.SuccessRate));
+ IXUILabel ixuilabel3 = gameObject.transform.Find("Exp").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel3.SetText(num2.ToString());
+ num2 = rowData.Experience;
+ bool flag4 = j == num3;
+ if (flag4)
+ {
+ base.uiBehaviour.m_LevelFrameExp.SetText(string.Format("{0}/{1}", this._doc.CurrentExp, num2));
+ base.uiBehaviour.m_LevelFrameExpBar.value = this._doc.CurrentExp * 1f / num2;
+ }
+ int num5 = 0;
+ for (int k = 0; k < rowData.FishWeight.Count; k++)
+ {
+ bool flag5 = !hashSet.Contains(rowData.FishWeight[k, 0]);
+ if (flag5)
+ {
+ hashSet.Add(rowData.FishWeight[k, 0]);
+ GameObject gameObject2 = base.uiBehaviour.m_LevelItemPool.FetchGameObject(false);
+ gameObject2.transform.parent = gameObject.transform;
+ gameObject2.transform.localPosition = new Vector3(tplPos2.x + (float)(num5 * base.uiBehaviour.m_LevelItemPool.TplWidth), 0f);
+ ItemList.RowData itemConf = XBagDocument.GetItemConf(rowData.FishWeight[k, 0]);
+ XSingleton<XItemDrawerMgr>.singleton.normalItemDrawer.DrawItem(gameObject2, itemConf, 0, false);
+ XSingleton<XItemDrawerMgr>.singleton.normalItemDrawer.OpenClickShowTooltipEvent(gameObject2, rowData.FishWeight[k, 0]);
+ num5++;
+ }
+ }
+ gameObject.transform.localPosition = new Vector3(tplPos.x, tplPos.y - (float)(base.uiBehaviour.m_FishLevelPool.TplHeight * (j - num4)), 0f);
+ bool flag6 = !flag2 && j < num3;
+ if (flag6)
+ {
+ gameObject.SetActive(false);
+ list.Add(gameObject);
+ }
+ }
+ base.uiBehaviour.m_FishLevelScrollView.ResetPosition();
+ bool flag7 = flag2;
+ if (flag7)
+ {
+ base.uiBehaviour.m_FishLevelScrollView.SetPosition(1f);
+ }
+ else
+ {
+ for (int l = 0; l < list.Count; l++)
+ {
+ list[l].SetActive(true);
+ }
+ }
+ }
+
+ private bool OnFishLevelBtnClick(IXUIButton btn)
+ {
+ this.ShowFishLevelFrame();
+ return true;
+ }
+
+ private bool OnFishLevelFrameCloseBtnClick(IXUIButton btn)
+ {
+ base.uiBehaviour.m_FishLevelFrame.SetActive(false);
+ return true;
+ }
+
+ private bool OnSweepButtonClicked(IXUIButton button)
+ {
+ bool flag = DlgBase<XWelfareView, XWelfareBehaviour>.singleton.CheckActiveMemberPrivilege(MemberPrivilege.KingdomPrivilege_Adventurer);
+ if (flag)
+ {
+ bool flag2 = XBagDocument.BagDoc.GetItemCount(XHomeFishingDocument.stoshID) == 0UL;
+ if (flag2)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString("FishingStoshLess"), "fece00");
+ return true;
+ }
+ bool flag3 = !XOutlookHelper.CanPlaySpecifiedAnimation(XSingleton<XEntityMgr>.singleton.Player);
+ if (flag3)
+ {
+ return true;
+ }
+ bool flag4 = DlgBase<ScreenShotShareView, ScreenShotShareBehaviour>.singleton.IsLoaded() && DlgBase<ScreenShotShareView, ScreenShotShareBehaviour>.singleton.IsVisible();
+ if (flag4)
+ {
+ DlgBase<ScreenShotShareView, ScreenShotShareBehaviour>.singleton.SetVisible(false, true);
+ }
+ this._doc.isSweep = true;
+ this._yuyinHandler.SetVisible(true);
+ this._doc.SendLevelExpQuery();
+ this._doc.FishList.Clear();
+ base.uiBehaviour.m_NoFishTips.SetActive(true);
+ this.Refresh(false);
+ base.uiBehaviour.m_InFishingFrame.SetActive(true);
+ base.uiBehaviour.m_NotFishingFrame.SetActive(false);
+ DlgBase<XMainInterface, XMainInterfaceBehaviour>.singleton.SetVisible(false, true);
+ DlgBase<XChatSmallView, XChatSmallBehaviour>.singleton.SetForceShow(true);
+ XSingleton<XInput>.singleton.Freezed = true;
+ this._doc.StartFishing();
+ }
+ return true;
+ }
+
+ private bool OnStartFishingBtnClick(IXUIButton btn)
+ {
+ bool flag = XBagDocument.BagDoc.GetItemCount(XHomeFishingDocument.stoshID) == 0UL;
+ bool result;
+ if (flag)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString("FishingStoshLess"), "fece00");
+ result = true;
+ }
+ else
+ {
+ bool flag2 = !XOutlookHelper.CanPlaySpecifiedAnimation(XSingleton<XEntityMgr>.singleton.Player);
+ if (flag2)
+ {
+ result = true;
+ }
+ else
+ {
+ bool flag3 = DlgBase<ScreenShotShareView, ScreenShotShareBehaviour>.singleton.IsLoaded() && DlgBase<ScreenShotShareView, ScreenShotShareBehaviour>.singleton.IsVisible();
+ if (flag3)
+ {
+ DlgBase<ScreenShotShareView, ScreenShotShareBehaviour>.singleton.SetVisible(false, true);
+ }
+ this._doc.isSweep = false;
+ this._yuyinHandler.SetVisible(true);
+ this._doc.SendLevelExpQuery();
+ this._doc.FishList.Clear();
+ base.uiBehaviour.m_NoFishTips.SetActive(true);
+ this.Refresh(false);
+ base.uiBehaviour.m_InFishingFrame.SetActive(true);
+ base.uiBehaviour.m_NotFishingFrame.SetActive(false);
+ DlgBase<XMainInterface, XMainInterfaceBehaviour>.singleton.SetVisible(false, true);
+ DlgBase<XChatSmallView, XChatSmallBehaviour>.singleton.SetForceShow(true);
+ XSingleton<XInput>.singleton.Freezed = true;
+ this._doc.StartFishing();
+ result = true;
+ }
+ }
+ return result;
+ }
+
+ private bool OnHomeMainBtnClick(IXUIButton btn)
+ {
+ DlgBase<HomeMainDlg, TabDlgBehaviour>.singleton.ShowWorkGameSystem(XSysDefine.XSys_Home);
+ return true;
+ }
+
+ private bool OnHomeCookingBtnClick(IXUIButton btn)
+ {
+ DlgBase<HomeMainDlg, TabDlgBehaviour>.singleton.ShowWorkGameSystem(XSysDefine.XSys_Home_Cooking);
+ return true;
+ }
+
+ public bool OnCloseBtnClick(IXUIButton btn)
+ {
+ this._yuyinHandler.SetVisible(false);
+ this._doc.LeaveFishing();
+ DlgBase<XChatSmallView, XChatSmallBehaviour>.singleton.SetForceShow(false);
+ DlgBase<XChatSmallView, XChatSmallBehaviour>.singleton.SetFakeHide(false);
+ XSingleton<XTimerMgr>.singleton.KillTimer(this._timeToken);
+ base.uiBehaviour.m_InFishingFrame.SetActive(false);
+ base.uiBehaviour.m_HighQualityFx.SetActive(false);
+ base.uiBehaviour.m_LowQualityFx.SetActive(false);
+ base.uiBehaviour.m_NotFishingFrame.SetActive(true);
+ DlgBase<XMainInterface, XMainInterfaceBehaviour>.singleton.SetVisible(true, true);
+ XSingleton<XInput>.singleton.Freezed = false;
+ this._itemDoc.ToggleBlock(false);
+ bool flag = this._doc.FishList.Count != 0;
+ if (flag)
+ {
+ DlgBase<RewdAnimDlg, RewdAnimBehaviour>.singleton.ShowByTitle(this._doc.FishList, XStringDefineProxy.GetString("FishRewardTitle"), null);
+ }
+ return true;
+ }
+
+ public void SetFishingTipsState(bool state)
+ {
+ base.uiBehaviour.m_FishingTips.SetActive(state);
+ }
+
+ private bool OnHomeShopBtnClick(IXUIButton btn)
+ {
+ DlgBase<MallSystemDlg, MallSystemBehaviour>.singleton.ShowShopSystem(XSysDefine.XSys_Mall_Home, 0UL);
+ return true;
+ }
+
+ public void SetUIState(bool state)
+ {
+ if (state)
+ {
+ this.SetVisibleWithAnimation(true, null);
+ base.uiBehaviour.m_InFishingFrame.SetActive(false);
+ base.uiBehaviour.m_NotFishingFrame.SetActive(true);
+ }
+ else
+ {
+ this.SetVisible(false, true);
+ }
+ }
+
+ public void PlayGetFishFx(bool high)
+ {
+ base.uiBehaviour.m_HighQualityFx.SetActive(false);
+ base.uiBehaviour.m_LowQualityFx.SetActive(false);
+ if (high)
+ {
+ base.uiBehaviour.m_HighQualityFx.SetActive(true);
+ }
+ else
+ {
+ base.uiBehaviour.m_LowQualityFx.SetActive(true);
+ }
+ }
+
+ public void DelayShowFish()
+ {
+ this._timeToken = XSingleton<XTimerMgr>.singleton.SetTimer(2f, new XTimerMgr.ElapsedEventHandler(this.ShowGetFish), null);
+ }
+
+ private void ShowGetFish(object o = null)
+ {
+ this.Refresh(true);
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/HomeFishingDlg.cs.meta b/Client/Assets/Scripts/XMainClient/UI/HomeFishingDlg.cs.meta
new file mode 100644
index 00000000..f2f6a5e9
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/HomeFishingDlg.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 98fa3519d58df6540919ffd421fffd1f
+timeCreated: 1611404193
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/HomeFriendHandler.cs b/Client/Assets/Scripts/XMainClient/UI/HomeFriendHandler.cs
new file mode 100644
index 00000000..42ec5cac
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/HomeFriendHandler.cs
@@ -0,0 +1,245 @@
+using System;
+using KKSG;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class HomeFriendHandler : DlgHandlerBase
+ {
+ protected override string FileName
+ {
+ get
+ {
+ return "Home/HomeFriendHandler";
+ }
+ }
+
+ private XUIPool m_ItemPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ private IXUIWrapContent m_wrapContent;
+
+ private GameObject m_noFriendsGo;
+
+ private IXUIButton m_AddFriendsBtn;
+
+ private GameObject m_hadFriendsGo;
+
+ private HomeMainDocument m_doc;
+
+ private IXUIScrollView m_scrollView;
+
+ protected override void Init()
+ {
+ this.m_wrapContent = (base.PanelObject.transform.Find("Panel/ItemsWrap").GetComponent("XUIWrapContent") as IXUIWrapContent);
+ this.m_wrapContent.RegisterItemUpdateEventHandler(new WrapItemUpdateEventHandler(this.WrapContentItemUpdated));
+ this.m_noFriendsGo = base.PanelObject.transform.Find("NoFriends").gameObject;
+ this.m_AddFriendsBtn = (this.m_noFriendsGo.transform.Find("Add").GetComponent("XUIButton") as IXUIButton);
+ this.m_hadFriendsGo = base.PanelObject.transform.Find("Panel").gameObject;
+ this.m_scrollView = (this.m_hadFriendsGo.transform.GetComponent("XUIScrollView") as IXUIScrollView);
+ Transform transform = base.PanelObject.transform.Find("Item");
+ this.m_ItemPool.SetupPool(transform.parent.gameObject, transform.gameObject, 1u, false);
+ this.m_doc = HomeMainDocument.Doc;
+ this.m_doc.HomeFriend = this;
+ base.Init();
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ this.m_AddFriendsBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnAddFriendsBtnClick));
+ }
+
+ protected override void OnShow()
+ {
+ this.m_doc.ReqPlantFriendList();
+ base.OnShow();
+ }
+
+ protected override void OnHide()
+ {
+ this.m_ItemPool.ReturnAll(false);
+ base.OnHide();
+ }
+
+ public override void OnUnload()
+ {
+ base.OnUnload();
+ }
+
+ public void RefreshUi()
+ {
+ this.FillContent();
+ }
+
+ private void FillContent()
+ {
+ bool flag = this.m_doc.PlantFriendList == null || this.m_doc.PlantFriendList.Count == 0;
+ if (flag)
+ {
+ this.m_noFriendsGo.SetActive(true);
+ this.m_hadFriendsGo.SetActive(false);
+ }
+ else
+ {
+ this.m_ItemPool.ReturnAll(false);
+ this.m_noFriendsGo.SetActive(false);
+ this.m_hadFriendsGo.SetActive(true);
+ this.m_wrapContent.SetContentCount(this.m_doc.PlantFriendList.Count, false);
+ }
+ bool flag2 = this.m_scrollView != null;
+ if (flag2)
+ {
+ this.m_scrollView.ResetPosition();
+ }
+ }
+
+ private void WrapContentItemUpdated(Transform t, int index)
+ {
+ bool flag = this.m_doc.PlantFriendList == null;
+ if (flag)
+ {
+ XSingleton<XDebug>.singleton.AddErrorLog("no data", null, null, null, null, null);
+ }
+ else
+ {
+ bool flag2 = index >= this.m_doc.PlantFriendList.Count;
+ if (flag2)
+ {
+ XSingleton<XDebug>.singleton.AddErrorLog("index >= m_doc.PlantFriendList.Count", null, null, null, null, null);
+ }
+ else
+ {
+ FriendPlantLog friendPlantLog = this.m_doc.PlantFriendList[index];
+ Transform transform = t.Find("Info");
+ IXUISprite ixuisprite = transform.Find("Icon").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.SetSprite(XSingleton<XProfessionSkillMgr>.singleton.GetProfHeadIcon2((int)friendPlantLog.profession_id));
+ IXUILabel ixuilabel = transform.Find("Name").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel.SetText(friendPlantLog.role_name);
+ IXUIButton ixuibutton = t.Find("VisitBtn").GetComponent("XUIButton") as IXUIButton;
+ ixuibutton.ID = (ulong)((long)index);
+ ixuibutton.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnVisitClicked));
+ transform = t.Find("Status");
+ for (int i = 0; i < transform.childCount; i++)
+ {
+ GameObject gameObject = transform.GetChild(i).gameObject;
+ this.m_ItemPool.ReturnInstance(gameObject, false);
+ }
+ int num = 0;
+ bool mature = friendPlantLog.mature;
+ if (mature)
+ {
+ GameObject gameObject = this.m_ItemPool.FetchGameObject(false);
+ gameObject.transform.parent = transform;
+ gameObject.transform.localPosition = new Vector3((float)(num * this.m_ItemPool.TplWidth), 0f, 0f);
+ ixuisprite = (gameObject.transform.Find("Icon").GetComponent("XUISprite") as IXUISprite);
+ ixuisprite.SetSprite("HomeView_2");
+ ixuisprite.ID = 0UL;
+ ixuisprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.ClickStateIcon));
+ num++;
+ }
+ bool abnormal_state = friendPlantLog.abnormal_state;
+ if (abnormal_state)
+ {
+ GameObject gameObject = this.m_ItemPool.FetchGameObject(false);
+ gameObject.transform.parent = transform;
+ gameObject.transform.localPosition = new Vector3((float)(-(float)num * this.m_ItemPool.TplWidth), 0f, 0f);
+ ixuisprite = (gameObject.transform.Find("Icon").GetComponent("XUISprite") as IXUISprite);
+ ixuisprite.SetSprite("HomeView_0");
+ ixuisprite.ID = 1UL;
+ ixuisprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.ClickStateIcon));
+ num++;
+ }
+ bool exist_sprite = friendPlantLog.exist_sprite;
+ if (exist_sprite)
+ {
+ GameObject gameObject = this.m_ItemPool.FetchGameObject(false);
+ gameObject.transform.parent = transform;
+ gameObject.transform.localPosition = new Vector3((float)(-(float)num * this.m_ItemPool.TplWidth), 0f, 0f);
+ ixuisprite = (gameObject.transform.Find("Icon").GetComponent("XUISprite") as IXUISprite);
+ ixuisprite.SetSprite("HomeView_1");
+ ixuisprite.ID = 2UL;
+ ixuisprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.ClickStateIcon));
+ num++;
+ }
+ bool flag3 = num == 0;
+ if (flag3)
+ {
+ t.Find("No").gameObject.SetActive(true);
+ }
+ else
+ {
+ t.Find("No").gameObject.SetActive(false);
+ }
+ }
+ }
+ }
+
+ private bool OnVisitClicked(IXUIButton sp)
+ {
+ bool flag = (int)sp.ID >= this.m_doc.PlantFriendList.Count;
+ bool result;
+ if (flag)
+ {
+ result = false;
+ }
+ else
+ {
+ FriendPlantLog friendPlantLog = this.m_doc.PlantFriendList[(int)sp.ID];
+ bool flag2 = friendPlantLog == null;
+ if (flag2)
+ {
+ XSingleton<XDebug>.singleton.AddErrorLog("not find data", null, null, null, null, null);
+ result = true;
+ }
+ else
+ {
+ SceneType sceneType = XSingleton<XScene>.singleton.SceneType;
+ bool flag3 = sceneType == SceneType.SCENE_FAMILYGARDEN;
+ if (flag3)
+ {
+ ulong gardenId = HomePlantDocument.Doc.GardenId;
+ bool flag4 = gardenId == friendPlantLog.role_id;
+ if (flag4)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(string.Format(XStringDefineProxy.GetString("EnterOtherHomeAgainTips"), friendPlantLog.role_name), "fece00");
+ return true;
+ }
+ }
+ this.m_doc.ReqEnterHomeScene(friendPlantLog.role_id, friendPlantLog.role_name);
+ result = true;
+ }
+ }
+ return result;
+ }
+
+ private void ClickStateIcon(IXUISprite spr)
+ {
+ ulong id = spr.ID;
+ ulong num = id;
+ if (num <= 2UL)
+ {
+ switch ((uint)num)
+ {
+ case 0u:
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString("CanStealTips"), "fece00");
+ break;
+ case 1u:
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString("CanHelpFriend"), "fece00");
+ break;
+ case 2u:
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString("DriveTroubleMaker"), "fece00");
+ break;
+ }
+ }
+ }
+
+ private bool OnAddFriendsBtnClick(IXUIButton btn)
+ {
+ DlgBase<XFriendsView, XFriendsBehaviour>.singleton.RandomFriend();
+ return true;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/HomeFriendHandler.cs.meta b/Client/Assets/Scripts/XMainClient/UI/HomeFriendHandler.cs.meta
new file mode 100644
index 00000000..0a036458
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/HomeFriendHandler.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 35b4c2a71ef5ef04c900fa39f83ff4a5
+timeCreated: 1611403559
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/HomeHandler.cs b/Client/Assets/Scripts/XMainClient/UI/HomeHandler.cs
new file mode 100644
index 00000000..1b3ebcf8
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/HomeHandler.cs
@@ -0,0 +1,171 @@
+using System;
+using System.Collections.Generic;
+using KKSG;
+using UILib;
+using UnityEngine;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class HomeHandler : DlgHandlerBase
+ {
+ protected override string FileName
+ {
+ get
+ {
+ return "Home/HomeHandler";
+ }
+ }
+
+ private GameObject m_redDotGo;
+
+ private IXUIButton m_exitHomeBtn;
+
+ private IXUIButton m_plantingBtn;
+
+ private IXUIButton m_fishingBtn;
+
+ private IXUIButton m_3dBtn;
+
+ private IXUIButton m_25dBtn;
+
+ private IXUILabel m_nameLab;
+
+ private Vector3 m_plantPos = Vector3.zero;
+
+ private Vector3 m_fishingPos = Vector3.zero;
+
+ private XSwitchSight m_SwitchSight;
+
+ protected override void Init()
+ {
+ this.m_exitHomeBtn = (base.PanelObject.transform.Find("ExitHome").GetComponent("XUIButton") as IXUIButton);
+ this.m_plantingBtn = (base.PanelObject.transform.Find("Planting").GetComponent("XUIButton") as IXUIButton);
+ this.m_fishingBtn = (base.PanelObject.transform.Find("Fishing").GetComponent("XUIButton") as IXUIButton);
+ this.m_3dBtn = (base.PanelObject.transform.Find("3d2.5d/3d").GetComponent("XUIButton") as IXUIButton);
+ this.m_25dBtn = (base.PanelObject.transform.Find("3d2.5d/2.5d").GetComponent("XUIButton") as IXUIButton);
+ this.m_nameLab = (base.PanelObject.transform.Find("Name").GetComponent("XUILabel") as IXUILabel);
+ this.m_redDotGo = base.PanelObject.transform.Find("Planting/RedPoint").gameObject;
+ List<float> floatList = XSingleton<XGlobalConfig>.singleton.GetFloatList("PlantPosition");
+ bool flag = floatList.Count >= 3;
+ if (flag)
+ {
+ this.m_plantPos = new Vector3(floatList[0], floatList[1], floatList[2]);
+ }
+ floatList = XSingleton<XGlobalConfig>.singleton.GetFloatList("FishingPosition");
+ bool flag2 = floatList.Count >= 3;
+ if (flag2)
+ {
+ this.m_fishingPos = new Vector3(floatList[0], floatList[1], floatList[2]);
+ }
+ base.Init();
+ }
+
+ public override void RegisterEvent()
+ {
+ this.m_exitHomeBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnClickExitHome));
+ this.m_plantingBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnClickPlanting));
+ this.m_fishingBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnClickFishing));
+ this.m_SwitchSight = new XSwitchSight(new ButtonClickEventHandler(this.OnViewClick), this.m_25dBtn, this.m_3dBtn, null);
+ base.RegisterEvent();
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ this.RefreshPlantRedDot();
+ this.m_nameLab.SetText(string.Format(XStringDefineProxy.GetString("HomeName"), HomePlantDocument.Doc.HomeOwnerName));
+ bool flag = XSingleton<XOperationData>.singleton.OperationMode == XOperationMode.X3D_Free;
+ if (flag)
+ {
+ XSingleton<XOperationData>.singleton.OperationMode = XOperationMode.X3D;
+ }
+ this.SetView(XSingleton<XOperationData>.singleton.OperationMode);
+ }
+
+ protected override void OnHide()
+ {
+ base.OnHide();
+ }
+
+ public override void OnUnload()
+ {
+ base.OnUnload();
+ }
+
+ private bool OnClickExitHome(IXUIButton btn)
+ {
+ SceneType sceneType = XSingleton<XScene>.singleton.SceneType;
+ bool flag = sceneType != SceneType.SCENE_FAMILYGARDEN;
+ bool result;
+ if (flag)
+ {
+ result = true;
+ }
+ else
+ {
+ HomeMainDocument.Doc.ReqLeaveHome();
+ result = true;
+ }
+ return result;
+ }
+
+ private bool OnClickPlanting(IXUIButton btn)
+ {
+ this.GoTargetPoint(this.m_plantPos);
+ return true;
+ }
+
+ private bool OnClickFishing(IXUIButton btn)
+ {
+ this.GoTargetPoint(this.m_fishingPos);
+ return true;
+ }
+
+ private void GoTargetPoint(Vector3 v3)
+ {
+ XSingleton<XInput>.singleton.LastNpc = null;
+ XNavigationEventArgs @event = XEventPool<XNavigationEventArgs>.GetEvent();
+ @event.Firer = XSingleton<XEntityMgr>.singleton.Player;
+ @event.Dest = v3;
+ XSingleton<XEventMgr>.singleton.FireEvent(@event);
+ }
+
+ private bool OnViewClick(IXUIButton btn)
+ {
+ this.SetView((XOperationMode)btn.ID);
+ return true;
+ }
+
+ public void SetView(XOperationMode mode)
+ {
+ if (mode != XOperationMode.X25D)
+ {
+ if (mode == XOperationMode.X3D)
+ {
+ this.m_3dBtn.gameObject.SetActive(true);
+ this.m_25dBtn.gameObject.SetActive(false);
+ }
+ }
+ else
+ {
+ this.m_3dBtn.gameObject.SetActive(false);
+ this.m_25dBtn.gameObject.SetActive(true);
+ }
+ }
+
+ public void EnableBackToMainCity(bool allow)
+ {
+ base.transform.gameObject.SetActive(allow);
+ }
+
+ public void RefreshPlantRedDot()
+ {
+ bool flag = this.m_redDotGo != null;
+ if (flag)
+ {
+ this.m_redDotGo.SetActive(HomePlantDocument.Doc.HadRedDot);
+ }
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/HomeHandler.cs.meta b/Client/Assets/Scripts/XMainClient/UI/HomeHandler.cs.meta
new file mode 100644
index 00000000..6824cbe8
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/HomeHandler.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 7e491c43d56ab8b46bee4b0ec3db807f
+timeCreated: 1611404004
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/HomeMainDlg.cs b/Client/Assets/Scripts/XMainClient/UI/HomeMainDlg.cs
new file mode 100644
index 00000000..f07e89a0
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/HomeMainDlg.cs
@@ -0,0 +1,129 @@
+using System;
+using UnityEngine;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class HomeMainDlg : TabDlgBase<HomeMainDlg>
+ {
+ public override string fileName
+ {
+ get
+ {
+ return "Home/HomeMainView";
+ }
+ }
+
+ protected override bool bHorizontal
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override int sysid
+ {
+ get
+ {
+ return 150;
+ }
+ }
+
+ public override bool fullscreenui
+ {
+ get
+ {
+ return false;
+ }
+ }
+
+ public CookingHandler HomeCookingHandler
+ {
+ get
+ {
+ return this.m_cookingHandler;
+ }
+ }
+
+ public FeastHandler HomeFeastHandler
+ {
+ get
+ {
+ return this.m_feastHandler;
+ }
+ }
+
+ private MyHomeHandler m_myHomeHandler;
+
+ private HomeFriendHandler m_homeFriendHandler;
+
+ private CookingHandler m_cookingHandler;
+
+ private FeastHandler m_feastHandler;
+
+ private XSysDefine m_curSelectedTab;
+
+ private Transform m_handlersTra;
+
+ protected override void Init()
+ {
+ this.m_handlersTra = base.uiBehaviour.transform.Find("Bg/Handlers");
+ base.Init();
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ HomeMainDocument.Doc.ReqGardenOverview();
+ }
+
+ protected override void OnHide()
+ {
+ base.OnHide();
+ }
+
+ public override void StackRefresh()
+ {
+ base.StackRefresh();
+ }
+
+ protected override void OnLoad()
+ {
+ }
+
+ protected override void OnUnload()
+ {
+ DlgHandlerBase.EnsureUnload<MyHomeHandler>(ref this.m_myHomeHandler);
+ DlgHandlerBase.EnsureUnload<HomeFriendHandler>(ref this.m_homeFriendHandler);
+ DlgHandlerBase.EnsureUnload<CookingHandler>(ref this.m_cookingHandler);
+ DlgHandlerBase.EnsureUnload<FeastHandler>(ref this.m_feastHandler);
+ base.OnUnload();
+ }
+
+ public void Show(XSysDefine sys = XSysDefine.XSys_Home_MyHome)
+ {
+ this.m_curSelectedTab = sys;
+ }
+
+ public override void SetupHandlers(XSysDefine sys)
+ {
+ switch (sys)
+ {
+ case XSysDefine.XSys_Home_Cooking:
+ base._AddActiveHandler(DlgHandlerBase.EnsureCreate<CookingHandler>(ref this.m_cookingHandler, this.m_handlersTra, true, this));
+ return;
+ case XSysDefine.XSys_Home_Feast:
+ base._AddActiveHandler(DlgHandlerBase.EnsureCreate<FeastHandler>(ref this.m_feastHandler, this.m_handlersTra, true, this));
+ return;
+ case XSysDefine.XSys_Home_MyHome:
+ base._AddActiveHandler(DlgHandlerBase.EnsureCreate<MyHomeHandler>(ref this.m_myHomeHandler, this.m_handlersTra, true, this));
+ return;
+ case XSysDefine.XSys_Home_HomeFriends:
+ base._AddActiveHandler(DlgHandlerBase.EnsureCreate<HomeFriendHandler>(ref this.m_homeFriendHandler, this.m_handlersTra, true, this));
+ return;
+ }
+ XSingleton<XDebug>.singleton.AddErrorLog("System has not finished:", sys.ToString(), null, null, null, null);
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/HomeMainDlg.cs.meta b/Client/Assets/Scripts/XMainClient/UI/HomeMainDlg.cs.meta
new file mode 100644
index 00000000..e768f68f
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/HomeMainDlg.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 9bee8e8a1027bb446ab9c812eb9cd12c
+timeCreated: 1611404207
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/HomePlantBehaviour.cs b/Client/Assets/Scripts/XMainClient/UI/HomePlantBehaviour.cs
new file mode 100644
index 00000000..c071fad3
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/HomePlantBehaviour.cs
@@ -0,0 +1,20 @@
+using System;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+
+namespace XMainClient.UI
+{
+ internal class HomePlantBehaviour : DlgBehaviourBase
+ {
+ public IXUISprite m_closedSpr;
+
+ public Transform m_handlerTra;
+
+ private void Awake()
+ {
+ this.m_closedSpr = (base.transform.Find("Bg/Close").GetComponent("XUISprite") as IXUISprite);
+ this.m_handlerTra = base.transform.Find("Bg/SeedHandler");
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/HomePlantBehaviour.cs.meta b/Client/Assets/Scripts/XMainClient/UI/HomePlantBehaviour.cs.meta
new file mode 100644
index 00000000..a4a9410e
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/HomePlantBehaviour.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: f76f70c7e85532b4aa60ab1a75536612
+timeCreated: 1611404888
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/HomePlantDlg.cs b/Client/Assets/Scripts/XMainClient/UI/HomePlantDlg.cs
new file mode 100644
index 00000000..16661f64
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/HomePlantDlg.cs
@@ -0,0 +1,271 @@
+using System;
+using UILib;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class HomePlantDlg : DlgBase<HomePlantDlg, HomePlantBehaviour>
+ {
+ public override string fileName
+ {
+ get
+ {
+ return "Home/PlantDlg";
+ }
+ }
+
+ public override int layer
+ {
+ get
+ {
+ return 1;
+ }
+ }
+
+ public override bool exclusive
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override bool autoload
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ private DlgHandlerBase m_CurrHandler;
+
+ private HomeSeedBagHandler m_homeSeedBagHandler;
+
+ private HomeCropInfoHandler m_homeCropInfoHandler;
+
+ private HomePlantDocument m_doc;
+
+ public bool IsPlayingAction = false;
+
+ private XEntity m_lastNpc = null;
+
+ protected override void Init()
+ {
+ DlgHandlerBase.EnsureCreate<HomeSeedBagHandler>(ref this.m_homeSeedBagHandler, base.uiBehaviour.m_handlerTra, false, this);
+ DlgHandlerBase.EnsureCreate<HomeCropInfoHandler>(ref this.m_homeCropInfoHandler, base.uiBehaviour.m_handlerTra, false, this);
+ this.m_doc = HomePlantDocument.Doc;
+ this.m_doc.View = this;
+ base.Init();
+ }
+
+ public override void RegisterEvent()
+ {
+ base.uiBehaviour.m_closedSpr.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnClickClosed));
+ base.RegisterEvent();
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ XCameraCloseUpEventArgs @event = XEventPool<XCameraCloseUpEventArgs>.GetEvent();
+ @event.Target = XSingleton<XInput>.singleton.LastNpc;
+ @event.Firer = XSingleton<XScene>.singleton.GameCamera;
+ XSingleton<XEventMgr>.singleton.FireEvent(@event);
+ Farmland farmland = this.m_doc.GetFarmland(this.m_doc.CurFarmlandId);
+ bool flag = farmland == null;
+ if (flag)
+ {
+ XSingleton<XDebug>.singleton.AddErrorLog("farm is null!", null, null, null, null, null);
+ }
+ else
+ {
+ bool isFree = farmland.IsFree;
+ if (isFree)
+ {
+ this.m_homeCropInfoHandler.SetVisible(false);
+ this.m_CurrHandler = this.m_homeSeedBagHandler;
+ this.m_CurrHandler.SetVisible(true);
+ }
+ else
+ {
+ this.m_homeSeedBagHandler.SetVisible(false);
+ this.m_CurrHandler = this.m_homeCropInfoHandler;
+ this.m_CurrHandler.SetVisible(true);
+ }
+ }
+ }
+
+ public void Show(XEntity npc)
+ {
+ this.m_lastNpc = npc;
+ HomePlantDocument doc = HomePlantDocument.Doc;
+ Farmland farmland = doc.GetFarmland(doc.CurFarmlandId);
+ HomeTypeEnum homeType = doc.HomeType;
+ bool flag = farmland != null;
+ if (flag)
+ {
+ bool isLock = farmland.IsLock;
+ if (isLock)
+ {
+ HomeTypeEnum homeTypeEnum = homeType;
+ if (homeTypeEnum != HomeTypeEnum.MyHome)
+ {
+ if (homeTypeEnum != HomeTypeEnum.GuildHome)
+ {
+ doc.FetchPlantInfo(doc.CurFarmlandId);
+ }
+ else
+ {
+ XGuildDocument specificDocument = XDocuments.GetSpecificDocument<XGuildDocument>(XGuildDocument.uuID);
+ bool flag2 = specificDocument.bInGuild && (ulong)specificDocument.Level < (ulong)((long)farmland.BreakLevel);
+ if (flag2)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(string.Format(XStringDefineProxy.GetString("BreakNewFarmlandLevelNotEnough_Guild"), farmland.BreakLevel), "fece00");
+ }
+ }
+ }
+ else
+ {
+ bool flag3 = (ulong)XSingleton<XAttributeMgr>.singleton.XPlayerData.Level < (ulong)((long)farmland.BreakLevel);
+ if (flag3)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(string.Format(XStringDefineProxy.GetString("BreakNewFarmlandLevelNotEnough"), farmland.BreakLevel), "fece00");
+ }
+ else
+ {
+ int cost = 0;
+ int num = 0;
+ doc.GetBreakHomeFarmlandData(out num, out cost);
+ bool flag4 = num == 0;
+ if (flag4)
+ {
+ XSingleton<XDebug>.singleton.AddGreenLog("itemid cannont zero", null, null, null, null, null);
+ }
+ else
+ {
+ XSingleton<UiUtility>.singleton.ShowModalDialog(string.Format(XStringDefineProxy.GetString("BreakNewFarmlandTips"), XLabelSymbolHelper.FormatCostWithIcon(cost, (ItemEnum)num)), XStringDefineProxy.GetString("COMMON_OK"), XStringDefineProxy.GetString("COMMON_CANCEL"), new ButtonClickEventHandler(this.ReqBreakNewFarmland));
+ }
+ }
+ }
+ }
+ else
+ {
+ doc.FetchPlantInfo(doc.CurFarmlandId);
+ }
+ }
+ }
+
+ protected override void OnHide()
+ {
+ XCameraCloseUpEndEventArgs @event = XEventPool<XCameraCloseUpEndEventArgs>.GetEvent();
+ @event.Firer = XSingleton<XScene>.singleton.GameCamera;
+ XSingleton<XEventMgr>.singleton.FireEvent(@event);
+ bool flag = this.m_CurrHandler != null;
+ if (flag)
+ {
+ this.m_CurrHandler.SetVisible(false);
+ }
+ base.OnHide();
+ }
+
+ public override void StackRefresh()
+ {
+ base.StackRefresh();
+ }
+
+ protected override void OnUnload()
+ {
+ DlgHandlerBase.EnsureUnload<HomeSeedBagHandler>(ref this.m_homeSeedBagHandler);
+ DlgHandlerBase.EnsureUnload<HomeCropInfoHandler>(ref this.m_homeCropInfoHandler);
+ base.OnUnload();
+ }
+
+ public void RefreshUI()
+ {
+ this.ShowSubHandler();
+ }
+
+ private void ShowSubHandler()
+ {
+ Farmland farmland = this.m_doc.GetFarmland(this.m_doc.CurFarmlandId);
+ bool flag = farmland == null;
+ if (flag)
+ {
+ XSingleton<XDebug>.singleton.AddErrorLog("farm is null!", null, null, null, null, null);
+ }
+ else
+ {
+ bool isFree = farmland.IsFree;
+ if (isFree)
+ {
+ bool flag2 = this.m_CurrHandler != this.m_homeSeedBagHandler;
+ if (flag2)
+ {
+ this.m_CurrHandler.SetVisible(false);
+ this.m_CurrHandler = this.m_homeSeedBagHandler;
+ }
+ bool flag3 = this.m_CurrHandler.IsVisible();
+ if (flag3)
+ {
+ this.m_homeSeedBagHandler.RefreshUI();
+ }
+ else
+ {
+ this.m_CurrHandler.SetVisible(true);
+ }
+ }
+ else
+ {
+ bool flag4 = this.m_CurrHandler != this.m_homeCropInfoHandler;
+ if (flag4)
+ {
+ this.m_CurrHandler.SetVisible(false);
+ this.m_CurrHandler = this.m_homeCropInfoHandler;
+ }
+ bool flag5 = this.m_CurrHandler.IsVisible();
+ if (flag5)
+ {
+ this.m_homeCropInfoHandler.RefreshUI();
+ }
+ else
+ {
+ this.m_CurrHandler.SetVisible(true);
+ }
+ }
+ }
+ }
+
+ private bool ReqBreakNewFarmland(IXUIButton btn)
+ {
+ HomePlantDocument doc = HomePlantDocument.Doc;
+ int itemid = 0;
+ int num = 0;
+ doc.GetBreakHomeFarmlandData(out itemid, out num);
+ bool flag = XBagDocument.BagDoc.GetItemCount(itemid) < (ulong)((long)num);
+ bool result;
+ if (flag)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString("ERR_AUCT_DRAGONCOINLESS"), "fece00");
+ result = true;
+ }
+ else
+ {
+ doc.ReqBreakNewFarmland(doc.CurFarmlandId);
+ XSingleton<UiUtility>.singleton.CloseModalDlg();
+ result = true;
+ }
+ return result;
+ }
+
+ private void OnClickClosed(IXUISprite spr)
+ {
+ bool isPlayingAction = this.IsPlayingAction;
+ if (!isPlayingAction)
+ {
+ this.SetVisible(false, true);
+ }
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/HomePlantDlg.cs.meta b/Client/Assets/Scripts/XMainClient/UI/HomePlantDlg.cs.meta
new file mode 100644
index 00000000..a2637fb0
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/HomePlantDlg.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 080ddd5d742c53e40bb8b8ee6b1b2792
+timeCreated: 1611402969
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/HomeSeedBagHandler.cs b/Client/Assets/Scripts/XMainClient/UI/HomeSeedBagHandler.cs
new file mode 100644
index 00000000..6a5486c8
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/HomeSeedBagHandler.cs
@@ -0,0 +1,385 @@
+using System;
+using System.Collections.Generic;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class HomeSeedBagHandler : DlgHandlerBase
+ {
+ private HomePlantDocument m_doc
+ {
+ get
+ {
+ return HomePlantDocument.Doc;
+ }
+ }
+
+ private bool m_bIsPlayingAction
+ {
+ get
+ {
+ return DlgBase<HomePlantDlg, HomePlantBehaviour>.singleton.IsPlayingAction;
+ }
+ set
+ {
+ DlgBase<HomePlantDlg, HomePlantBehaviour>.singleton.IsPlayingAction = value;
+ }
+ }
+
+ protected override string FileName
+ {
+ get
+ {
+ return "Home/SeedBag";
+ }
+ }
+
+ private IXUIWrapContent m_wrapContent;
+
+ private GameObject m_hadSeedGo;
+
+ private GameObject m_noSeddGo;
+
+ private GameObject m_ItemGo;
+
+ private GameObject m_tplGo;
+
+ private GameObject m_noSeedTipsGo;
+
+ private IXUILabel m_describeLab;
+
+ private IXUILabel m_timeLab;
+
+ private IXUILabel m_harvestLab;
+
+ private IXUIButton m_plantBtn;
+
+ private IXUIButton m_gotoShopBtn;
+
+ private IXUILabel m_sprNameLab;
+
+ private XBagWindow m_bagWindow;
+
+ private XItemSelector _ItemSelector = new XItemSelector(0u);
+
+ private uint m_token;
+
+ private float m_plantActionTime = 2.5f;
+
+ private float m_fCoolTime = 3f;
+
+ private float m_fLastClickBtnTime = 0f;
+
+ protected override void Init()
+ {
+ this.m_hadSeedGo = base.PanelObject.transform.Find("HadSeed").gameObject;
+ this.m_noSeddGo = base.PanelObject.transform.Find("NoSeed").gameObject;
+ this.m_noSeedTipsGo = this.m_noSeddGo.transform.Find("tip").gameObject;
+ Transform transform = this.m_hadSeedGo.transform.Find("ItemView");
+ this.m_ItemGo = transform.Find("Item").gameObject;
+ this.m_describeLab = (transform.Find("Panel/Describe").GetComponent("XUILabel") as IXUILabel);
+ this.m_timeLab = (transform.Find("time").GetComponent("XUILabel") as IXUILabel);
+ this.m_harvestLab = (transform.Find("harvest").GetComponent("XUILabel") as IXUILabel);
+ this.m_sprNameLab = (transform.Find("Name").GetComponent("XUILabel") as IXUILabel);
+ transform = this.m_hadSeedGo.transform.Find("Items/Panel/WrapContent");
+ this.m_wrapContent = (transform.GetComponent("XUIWrapContent") as IXUIWrapContent);
+ this.m_wrapContent.RegisterItemUpdateEventHandler(new WrapItemUpdateEventHandler(this.WrapContentItemUpdated));
+ this.m_tplGo = this.m_hadSeedGo.transform.Find("Items").gameObject;
+ this.m_plantBtn = (this.m_hadSeedGo.transform.Find("BtnPlant").GetComponent("XUIButton") as IXUIButton);
+ this.m_gotoShopBtn = (this.m_noSeddGo.transform.Find("BtnShop").GetComponent("XUIButton") as IXUIButton);
+ this.m_bagWindow = new XBagWindow(this.m_tplGo, null, null);
+ this.m_bagWindow.Init();
+ base.Init();
+ }
+
+ public override void RegisterEvent()
+ {
+ this.m_gotoShopBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnClickGoToShopBtn));
+ base.RegisterEvent();
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ this.m_bIsPlayingAction = false;
+ this.FillContent();
+ }
+
+ protected override void OnHide()
+ {
+ this.m_bagWindow.OnHide();
+ this._ItemSelector.Hide();
+ this.m_bIsPlayingAction = false;
+ base.OnHide();
+ }
+
+ public override void StackRefresh()
+ {
+ base.StackRefresh();
+ this.FillContent();
+ }
+
+ public override void OnUnload()
+ {
+ this._ItemSelector.Unload();
+ base.OnUnload();
+ }
+
+ public void RefreshUI()
+ {
+ this.FillContent();
+ }
+
+ private void FillContent()
+ {
+ this.m_doc.GetHadSeedList();
+ bool flag = this.m_doc.HadSeedList == null || this.m_doc.HadSeedList.Count == 0;
+ if (flag)
+ {
+ this.m_noSeddGo.SetActive(true);
+ this.m_hadSeedGo.SetActive(false);
+ this.m_gotoShopBtn.gameObject.SetActive(this.m_doc.HomeType != HomeTypeEnum.GuildHome);
+ this.m_noSeedTipsGo.SetActive(this.m_doc.HomeType != HomeTypeEnum.GuildHome);
+ }
+ else
+ {
+ this.m_noSeddGo.SetActive(false);
+ this.m_hadSeedGo.SetActive(true);
+ this.m_bagWindow.ChangeData(new ItemUpdateHandler(this.WrapContentItemUpdated), new GetItemHandler(this.m_doc.GetHadSeedsList));
+ this.m_bagWindow.OnShow();
+ }
+ }
+
+ private void WrapContentItemUpdated(Transform t, int index)
+ {
+ bool flag = this.m_doc.HadSeedList == null;
+ if (flag)
+ {
+ XSingleton<XDebug>.singleton.AddErrorLog("no data", null, null, null, null, null);
+ }
+ else
+ {
+ bool flag2 = index >= this.m_doc.HadSeedList.Count;
+ if (flag2)
+ {
+ XSingleton<XItemDrawerMgr>.singleton.DrawItem(t.gameObject, null);
+ }
+ else
+ {
+ IXUISprite ixuisprite = t.Find("Icon").GetComponent("XUISprite") as IXUISprite;
+ XItem xitem = this.m_doc.HadSeedList[index];
+ XSingleton<XItemDrawerMgr>.singleton.DrawItem(t.gameObject, xitem);
+ ixuisprite.ID = xitem.uid;
+ ixuisprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnItemClicked));
+ bool flag3 = index == 0;
+ if (flag3)
+ {
+ this.OnItemClicked(ixuisprite);
+ }
+ }
+ }
+ }
+
+ private void FillSeedInfo(XItem item)
+ {
+ ItemList.RowData itemConf = XBagDocument.GetItemConf(item.itemID);
+ bool flag = itemConf != null;
+ if (flag)
+ {
+ this.m_describeLab.SetText(XSingleton<UiUtility>.singleton.ReplaceReturn(itemConf.ItemDescription));
+ }
+ else
+ {
+ this.m_describeLab.SetText(string.Empty);
+ }
+ PlantSeed.RowData bySeedID = HomePlantDocument.PlantSeedTable.GetBySeedID((uint)item.itemID);
+ bool flag2 = bySeedID != null;
+ if (flag2)
+ {
+ this.m_sprNameLab.SetText(bySeedID.SeedName);
+ this.m_timeLab.SetText(this.GetTimeString((ulong)bySeedID.PredictGrowUpTime));
+ this.m_harvestLab.SetText(bySeedID.PlantID[1].ToString());
+ XSingleton<XItemDrawerMgr>.singleton.normalItemDrawer.DrawItem(this.m_ItemGo, bySeedID.PlantID[0], 0, false);
+ IXUISprite ixuisprite = this.m_ItemGo.transform.Find("Icon").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.ID = (ulong)((long)bySeedID.PlantID[0]);
+ ixuisprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(XSingleton<UiUtility>.singleton.OnItemClick));
+ }
+ else
+ {
+ this.m_sprNameLab.SetText("");
+ this.m_timeLab.SetText("");
+ this.m_harvestLab.SetText("");
+ }
+ this.m_plantBtn.ID = (ulong)((long)item.itemID);
+ this.m_plantBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnClickPlantBtn));
+ }
+
+ private string GetTimeString(ulong ti)
+ {
+ bool flag = ti < 60UL;
+ string result;
+ if (flag)
+ {
+ string text = string.Format("{0}{1}", ti, XStringDefineProxy.GetString("MINUTE_DUARATION"));
+ result = text;
+ }
+ else
+ {
+ ulong num = ti / 60UL;
+ ulong num2 = ti % 60UL;
+ bool flag2 = num2 > 0UL;
+ string text;
+ if (flag2)
+ {
+ text = string.Format("{0}{1}{2}{3}", new object[]
+ {
+ num,
+ XStringDefineProxy.GetString("HOUR_DUARATION"),
+ num2,
+ XStringDefineProxy.GetString("MINUTE_DUARATION")
+ });
+ }
+ else
+ {
+ text = string.Format("{0}{1}", num, XStringDefineProxy.GetString("HOUR_DUARATION"));
+ }
+ result = text;
+ }
+ return result;
+ }
+
+ private bool OnClickPlantBtn(IXUIButton btn)
+ {
+ bool flag = this.SetButtonCool(this.m_fCoolTime);
+ bool result;
+ if (flag)
+ {
+ result = true;
+ }
+ else
+ {
+ Farmland farmland = this.m_doc.GetFarmland(this.m_doc.CurFarmlandId);
+ bool flag2 = farmland == null || !farmland.IsFree;
+ if (flag2)
+ {
+ result = true;
+ }
+ else
+ {
+ bool bIsPlayingAction = this.m_bIsPlayingAction;
+ if (bIsPlayingAction)
+ {
+ result = true;
+ }
+ else
+ {
+ List<XItem> hadSeedsList = this.m_doc.GetHadSeedsList();
+ bool flag3 = hadSeedsList == null || hadSeedsList.Count == 0;
+ if (flag3)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString("ERR_GARDEN_NOSEED"), "fece00");
+ result = true;
+ }
+ else
+ {
+ bool flag4 = XSingleton<XEntityMgr>.singleton.Player == null;
+ if (flag4)
+ {
+ result = true;
+ }
+ else
+ {
+ bool flag5 = !XOutlookHelper.CanPlaySpecifiedAnimation(XSingleton<XEntityMgr>.singleton.Player);
+ if (flag5)
+ {
+ result = true;
+ }
+ else
+ {
+ this.m_bIsPlayingAction = true;
+ XSingleton<XEntityMgr>.singleton.Player.PlaySpecifiedAnimation(this.m_doc.GetHomePlantAction(ActionType.Plant));
+ XSingleton<XTimerMgr>.singleton.KillTimer(this.m_token);
+ this.m_token = XSingleton<XTimerMgr>.singleton.SetTimer(this.m_plantActionTime, new XTimerMgr.ElapsedEventHandler(this.QequestPlant), (uint)btn.ID);
+ XSingleton<XFxMgr>.singleton.CreateAndPlay(HomePlantDocument.PlantEffectPath, XSingleton<XEntityMgr>.singleton.Player.EngineObject, Vector3.zero, Vector3.one, 1f, false, this.m_plantActionTime, true);
+ XSingleton<XAudioMgr>.singleton.PlayUISound("Audio/UI/Farm_Planting", true, AudioChannel.Action);
+ result = true;
+ }
+ }
+ }
+ }
+ }
+ }
+ return result;
+ }
+
+ private bool SetButtonCool(float time)
+ {
+ float num = Time.realtimeSinceStartup - this.m_fLastClickBtnTime;
+ bool flag = num < time;
+ bool result;
+ if (flag)
+ {
+ result = true;
+ }
+ else
+ {
+ this.m_fLastClickBtnTime = Time.realtimeSinceStartup;
+ result = false;
+ }
+ return result;
+ }
+
+ public void QequestPlant(object o = null)
+ {
+ XSingleton<XEntityMgr>.singleton.Player.PlayStateBack();
+ bool flag = o != null;
+ if (flag)
+ {
+ this.m_doc.StartPlant(this.m_doc.CurFarmlandId, (uint)o, false);
+ }
+ this.m_bIsPlayingAction = false;
+ }
+
+ private bool OnClickGoToShopBtn(IXUIButton btn)
+ {
+ HomeTypeEnum homeType = this.m_doc.HomeType;
+ bool flag = homeType == HomeTypeEnum.GuildHome;
+ if (flag)
+ {
+ XGuildDocument specificDocument = XDocuments.GetSpecificDocument<XGuildDocument>(XGuildDocument.uuID);
+ bool flag2 = !specificDocument.CheckInGuild();
+ if (flag2)
+ {
+ return true;
+ }
+ bool flag3 = !specificDocument.CheckUnlockLevel(XSysDefine.XSys_GuildBoon_Shop);
+ if (flag3)
+ {
+ return true;
+ }
+ DlgBase<HomePlantDlg, HomePlantBehaviour>.singleton.SetVisible(false, true);
+ DlgBase<MallSystemDlg, MallSystemBehaviour>.singleton.ShowShopSystem(XSysDefine.XSys_Mall_Guild, 0UL);
+ }
+ else
+ {
+ DlgBase<HomePlantDlg, HomePlantBehaviour>.singleton.SetVisible(false, true);
+ DlgBase<MallSystemDlg, MallSystemBehaviour>.singleton.ShowShopSystem(XSysDefine.XSys_Mall_Home, 0UL);
+ }
+ return true;
+ }
+
+ private void OnItemClicked(IXUISprite iSp)
+ {
+ XItem itemByUID = XSingleton<XGame>.singleton.Doc.XBagDoc.GetItemByUID(iSp.ID);
+ bool flag = itemByUID == null;
+ if (!flag)
+ {
+ this.FillSeedInfo(itemByUID);
+ this._ItemSelector.Select(iSp);
+ }
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/HomeSeedBagHandler.cs.meta b/Client/Assets/Scripts/XMainClient/UI/HomeSeedBagHandler.cs.meta
new file mode 100644
index 00000000..df3780bb
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/HomeSeedBagHandler.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: fa8d9d2940603e94a858b0fbbba902e7
+timeCreated: 1611404904
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/IAttrTooltipDlgHandler.cs b/Client/Assets/Scripts/XMainClient/UI/IAttrTooltipDlgHandler.cs
new file mode 100644
index 00000000..d52df86c
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/IAttrTooltipDlgHandler.cs
@@ -0,0 +1,34 @@
+using System;
+using UILib;
+using UnityEngine;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal interface IAttrTooltipDlgHandler
+ {
+ AttrTooltipDlg tooltipDlg { get; set; }
+
+ string _PPTTitle { get; }
+
+ void Init(AttrTooltipDlg parent);
+
+ void SetupTopFrame(GameObject goToolTip, ItemList.RowData data, XItem instanceData = null, XItem compareData = null);
+
+ void SetupOtherFrame(GameObject goToolTip, XItem mainItem, XItem compareItem, bool bMain);
+
+ void SetupToolTipButtons(GameObject goToolTip, XItem item, bool bMain);
+
+ bool OnButton2Clicked(IXUIButton button);
+
+ bool OnButton3Clicked(IXUIButton button);
+
+ bool OnButton1Clicked(IXUIButton button);
+
+ void SetAllAttrFrames(GameObject goToolTip, XAttrItem item, XAttrItem compareItem, bool bMain);
+
+ bool HideToolTip(bool forceHide = false);
+
+ int _GetPPT(XItem item, bool bMain, ref string valueText);
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/IAttrTooltipDlgHandler.cs.meta b/Client/Assets/Scripts/XMainClient/UI/IAttrTooltipDlgHandler.cs.meta
new file mode 100644
index 00000000..c666e96f
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/IAttrTooltipDlgHandler.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 9a188ced7db477c48948720df8d45e02
+timeCreated: 1611404199
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/IGVGBattleMember.cs b/Client/Assets/Scripts/XMainClient/UI/IGVGBattleMember.cs
new file mode 100644
index 00000000..6e75f438
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/IGVGBattleMember.cs
@@ -0,0 +1,20 @@
+using System;
+using UnityEngine;
+
+namespace XMainClient.UI
+{
+ internal interface IGVGBattleMember
+ {
+ void Setup(GameObject sv, int index);
+
+ void ReFreshData(GVGBattleInfo battleInfo);
+
+ void SetActive(bool active);
+
+ bool IsActive();
+
+ void OnUpdate();
+
+ void Recycle();
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/IGVGBattleMember.cs.meta b/Client/Assets/Scripts/XMainClient/UI/IGVGBattleMember.cs.meta
new file mode 100644
index 00000000..bbbeef10
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/IGVGBattleMember.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 4b5b2785d86bad7479cb0fc235915aef
+timeCreated: 1611403686
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/IGVGBattlePrepare.cs b/Client/Assets/Scripts/XMainClient/UI/IGVGBattlePrepare.cs
new file mode 100644
index 00000000..ff8f0756
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/IGVGBattlePrepare.cs
@@ -0,0 +1,24 @@
+using System;
+using UILib;
+
+namespace XMainClient.UI
+{
+ internal interface IGVGBattlePrepare : IXUIDlg
+ {
+ bool IsLoaded();
+
+ void OnEnterSceneFinally();
+
+ void RefreshSection();
+
+ void ReFreshGroup();
+
+ void RefreshInspire();
+
+ void RefreahCountTime(float time);
+
+ void SetResurgence(int leftTime);
+
+ void UpdateDownUp();
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/IGVGBattlePrepare.cs.meta b/Client/Assets/Scripts/XMainClient/UI/IGVGBattlePrepare.cs.meta
new file mode 100644
index 00000000..b76c9dc2
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/IGVGBattlePrepare.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 37f8a8876ae42d8468b3543d1a307f79
+timeCreated: 1611403568
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/IRankSource.cs b/Client/Assets/Scripts/XMainClient/UI/IRankSource.cs
new file mode 100644
index 00000000..a5b1f3e3
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/IRankSource.cs
@@ -0,0 +1,12 @@
+using System;
+using KKSG;
+
+namespace XMainClient.UI
+{
+ internal interface IRankSource
+ {
+ void ReqRankData(RankeType type, bool inFight);
+
+ XBaseRankList GetRankList(RankeType type);
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/IRankSource.cs.meta b/Client/Assets/Scripts/XMainClient/UI/IRankSource.cs.meta
new file mode 100644
index 00000000..24c3e0f9
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/IRankSource.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: ae5a821e89470a84d871f6e10aea637a
+timeCreated: 1611404339
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/IRankView.cs b/Client/Assets/Scripts/XMainClient/UI/IRankView.cs
new file mode 100644
index 00000000..e887170d
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/IRankView.cs
@@ -0,0 +1,15 @@
+using System;
+
+namespace XMainClient.UI
+{
+ internal interface IRankView
+ {
+ void RefreshPage();
+
+ bool IsVisible();
+
+ void RefreshVoice(ulong[] roleids, int[] states);
+
+ void HideVoice();
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/IRankView.cs.meta b/Client/Assets/Scripts/XMainClient/UI/IRankView.cs.meta
new file mode 100644
index 00000000..dab1848c
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/IRankView.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 571a47437c3c02c4abb8fe1566a41ef4
+timeCreated: 1611403748
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/ITooltipDlg.cs b/Client/Assets/Scripts/XMainClient/UI/ITooltipDlg.cs
new file mode 100644
index 00000000..e3d9aa29
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/ITooltipDlg.cs
@@ -0,0 +1,14 @@
+using System;
+using UILib;
+
+namespace XMainClient.UI
+{
+ internal interface ITooltipDlg
+ {
+ XItemSelector ItemSelector { get; }
+
+ IXUISprite ShowToolTip(XItem mainItem, XItem compareItem, bool _bShowButtons, uint prof);
+
+ void SetPosition(IXUISprite clickIcon);
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/ITooltipDlg.cs.meta b/Client/Assets/Scripts/XMainClient/UI/ITooltipDlg.cs.meta
new file mode 100644
index 00000000..cb632703
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/ITooltipDlg.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 352962559b43c3842b3e53d29fece507
+timeCreated: 1611403558
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/IWorldBossBattleSource.cs b/Client/Assets/Scripts/XMainClient/UI/IWorldBossBattleSource.cs
new file mode 100644
index 00000000..ff1b48e5
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/IWorldBossBattleSource.cs
@@ -0,0 +1,17 @@
+using System;
+
+namespace XMainClient.UI
+{
+ public interface IWorldBossBattleSource
+ {
+ uint EncourageCount { get; }
+
+ void ReqEncourage();
+
+ void ReqEncourageTwo();
+
+ void ReqBattleInfo();
+
+ uint GetEncourageCount(int index);
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/IWorldBossBattleSource.cs.meta b/Client/Assets/Scripts/XMainClient/UI/IWorldBossBattleSource.cs.meta
new file mode 100644
index 00000000..c601e6bb
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/IWorldBossBattleSource.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: dae3dc8441db7c14b8c2211cf4b9c09b
+timeCreated: 1611404650
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/IWorldBossBattleView.cs b/Client/Assets/Scripts/XMainClient/UI/IWorldBossBattleView.cs
new file mode 100644
index 00000000..73b737dc
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/IWorldBossBattleView.cs
@@ -0,0 +1,13 @@
+using System;
+
+namespace XMainClient.UI
+{
+ internal interface IWorldBossBattleView
+ {
+ void SetLeftTime(uint time);
+
+ void RefreshEncourage();
+
+ bool IsVisible();
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/IWorldBossBattleView.cs.meta b/Client/Assets/Scripts/XMainClient/UI/IWorldBossBattleView.cs.meta
new file mode 100644
index 00000000..0d5c14a2
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/IWorldBossBattleView.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 20938f7d555f8fa42b1ab4485c2479e4
+timeCreated: 1611403407
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/InnerGVGBattleMember.cs b/Client/Assets/Scripts/XMainClient/UI/InnerGVGBattleMember.cs
new file mode 100644
index 00000000..6820d412
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/InnerGVGBattleMember.cs
@@ -0,0 +1,16 @@
+using System;
+using KKSG;
+using UILib;
+using UnityEngine;
+
+namespace XMainClient.UI
+{
+ internal class InnerGVGBattleMember : GVGBattleMemberBase
+ {
+ protected override void SetupOtherMemberInfo(Transform t, GmfRole role)
+ {
+ IXUILabel ixuilabel = t.Find("Fight").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel.SetText(role.pkpoint.ToString());
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/InnerGVGBattleMember.cs.meta b/Client/Assets/Scripts/XMainClient/UI/InnerGVGBattleMember.cs.meta
new file mode 100644
index 00000000..854354cd
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/InnerGVGBattleMember.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: bfa7012439c55df4e8f92b6b23b82797
+timeCreated: 1611404484
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/InnerGVGBattlePrepareBehaviour.cs b/Client/Assets/Scripts/XMainClient/UI/InnerGVGBattlePrepareBehaviour.cs
new file mode 100644
index 00000000..a4ec92ef
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/InnerGVGBattlePrepareBehaviour.cs
@@ -0,0 +1,12 @@
+using System;
+
+namespace XMainClient.UI
+{
+ internal class InnerGVGBattlePrepareBehaviour : GVGBattlePrepareBehaviour
+ {
+ protected override void Awake()
+ {
+ base.Awake();
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/InnerGVGBattlePrepareBehaviour.cs.meta b/Client/Assets/Scripts/XMainClient/UI/InnerGVGBattlePrepareBehaviour.cs.meta
new file mode 100644
index 00000000..fc4be9d3
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/InnerGVGBattlePrepareBehaviour.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 7b94d1d942e315b4dbd5e3ad43b9fa10
+timeCreated: 1611403994
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/InnerGVGBattlePrepareView.cs b/Client/Assets/Scripts/XMainClient/UI/InnerGVGBattlePrepareView.cs
new file mode 100644
index 00000000..c85e3f7e
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/InnerGVGBattlePrepareView.cs
@@ -0,0 +1,29 @@
+using System;
+
+namespace XMainClient.UI
+{
+ internal class InnerGVGBattlePrepareView : GVGBattlePrepareBase<InnerGVGBattlePrepareView, InnerGVGBattlePrepareBehaviour>
+ {
+ public override string fileName
+ {
+ get
+ {
+ return "Battle/GuildArenaPrepareDlg";
+ }
+ }
+
+ protected override void OnLoad()
+ {
+ base.OnLoad();
+ base.uiBehaviour.mBluePanel = new InnerGVGBattleMember();
+ base.uiBehaviour.mBluePanel.Setup(base.uiBehaviour.mBlueView, 1);
+ }
+
+ protected override void SelectionPattern()
+ {
+ base.SelectionPattern();
+ base.uiBehaviour.mCombatScore.SetActive(this._Doc.IsGMF());
+ base.uiBehaviour.mBattleDuelInfo.SetVisible(this._Doc.IsGPR());
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/InnerGVGBattlePrepareView.cs.meta b/Client/Assets/Scripts/XMainClient/UI/InnerGVGBattlePrepareView.cs.meta
new file mode 100644
index 00000000..ac6dfd02
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/InnerGVGBattlePrepareView.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: ea1a0d745334d944492a0df9e810b5e3
+timeCreated: 1611404777
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/ItemAccessDlg.cs b/Client/Assets/Scripts/XMainClient/UI/ItemAccessDlg.cs
new file mode 100644
index 00000000..4d6dbf60
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/ItemAccessDlg.cs
@@ -0,0 +1,410 @@
+using System;
+using System.Collections.Generic;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class ItemAccessDlg : DlgBase<ItemAccessDlg, ItemAccessDlgBehaviour>
+ {
+ public override string fileName
+ {
+ get
+ {
+ return "Common/ItemAccessDlg";
+ }
+ }
+
+ public override int layer
+ {
+ get
+ {
+ return 100;
+ }
+ }
+
+ public override bool autoload
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ private XFPStrengthenDocument _bqDocument;
+
+ private AccessCallback _callback;
+
+ private int _access_item = 0;
+
+ private Dictionary<int, int> _idParam = new Dictionary<int, int>();
+
+ protected override void Init()
+ {
+ this._bqDocument = XDocuments.GetSpecificDocument<XFPStrengthenDocument>(XFPStrengthenDocument.uuID);
+ }
+
+ public override void RegisterEvent()
+ {
+ base.uiBehaviour.m_Close.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnCloseClicked));
+ }
+
+ protected bool OnCloseClicked(IXUIButton go)
+ {
+ this.SetVisible(false, true);
+ return true;
+ }
+
+ public void ShowAccess(int itemid, List<int> ids, List<int> param, AccessCallback callback = null)
+ {
+ this.SetVisible(true, true);
+ this._idParam.Clear();
+ this._callback = callback;
+ this._access_item = itemid;
+ base.uiBehaviour.m_Item.SetActive(true);
+ base.uiBehaviour.m_BossItem.SetActive(false);
+ XSingleton<XItemDrawerMgr>.singleton.normalItemDrawer.DrawItem(base.uiBehaviour.m_Item, itemid, 0, false);
+ this.SetScrollViewItems(ids, param);
+ }
+
+ public void ShowMonsterAccess(uint monsterID, List<int> BQList, List<int> param, AccessCallback callback = null)
+ {
+ this.SetVisible(true, true);
+ base.uiBehaviour.m_Item.SetActive(false);
+ base.uiBehaviour.m_BossItem.SetActive(true);
+ XEntityStatistics.RowData byID = XSingleton<XEntityMgr>.singleton.EntityStatistics.GetByID(monsterID);
+ XEntityPresentation.RowData byPresentID = XSingleton<XEntityMgr>.singleton.EntityInfo.GetByPresentID(byID.PresentID);
+ bool flag = byPresentID == null;
+ if (!flag)
+ {
+ IXUISprite ixuisprite = base.uiBehaviour.m_BossItem.GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.SetSprite(byPresentID.Avatar, byPresentID.Atlas, false);
+ bool flag2 = param != null && param.Count > 0;
+ if (flag2)
+ {
+ SceneTable.RowData sceneData = XSingleton<XSceneMgr>.singleton.GetSceneData((uint)param[0]);
+ bool flag3 = sceneData != null;
+ if (flag3)
+ {
+ base.uiBehaviour.m_bossDec.SetText(sceneData.Comment);
+ }
+ }
+ else
+ {
+ bool flag4 = byID != null;
+ if (flag4)
+ {
+ base.uiBehaviour.m_bossDec.SetText(byID.Name);
+ }
+ }
+ this._idParam.Clear();
+ this._callback = callback;
+ this._access_item = (int)monsterID;
+ this.SetScrollViewItems(BQList, param);
+ }
+ }
+
+ private void SetScrollViewItems(List<int> BQList, List<int> param)
+ {
+ bool flag = BQList == null || param == null;
+ if (!flag)
+ {
+ List<AccessData> list = new List<AccessData>();
+ for (int i = 0; i < BQList.Count; i++)
+ {
+ FpStrengthenTable.RowData strengthData = this._bqDocument.GetStrengthData(BQList[i]);
+ bool flag2 = strengthData == null;
+ if (!flag2)
+ {
+ bool flag3 = this._idParam.ContainsKey(BQList[i]);
+ if (!flag3)
+ {
+ this._idParam.Add(BQList[i], param[i]);
+ AccessData accessData = new AccessData();
+ accessData.Row = strengthData;
+ accessData.BQid = BQList[i];
+ FpStrengthenTable.RowData strengthData2 = this._bqDocument.GetStrengthData(BQList[i]);
+ XSysDefine bqsystem = (XSysDefine)strengthData2.BQSystem;
+ accessData.SysType = bqsystem;
+ bool flag4 = XSingleton<XGameSysMgr>.singleton.IsSystemOpened(bqsystem);
+ accessData.OpenLevel = XSingleton<XGameSysMgr>.singleton.GetSysOpenLevel(XFastEnumIntEqualityComparer<XSysDefine>.ToInt(bqsystem));
+ bool flag5 = flag4;
+ if (flag5)
+ {
+ bool flag6 = XSysDefine.XSys_Level_Normal == bqsystem;
+ if (flag6)
+ {
+ XLevelDocument xlevelDocument = XSingleton<XGame>.singleton.Doc.GetXComponent(XLevelDocument.uuID) as XLevelDocument;
+ bool flag7 = param[i] > 0;
+ if (flag7)
+ {
+ flag4 = (SceneRefuseReason.Admit == xlevelDocument.CanLevelOpen((uint)param[i]));
+ }
+ SceneTable.RowData sceneData = XSingleton<XSceneMgr>.singleton.GetSceneData((uint)param[i]);
+ bool flag8 = sceneData != null;
+ if (flag8)
+ {
+ accessData.OpenLevel = (int)sceneData.RequiredLevel;
+ }
+ }
+ else
+ {
+ bool flag9 = XSysDefine.XSys_Level_Elite == bqsystem;
+ if (flag9)
+ {
+ bool flag10 = 0 < param[i];
+ if (flag10)
+ {
+ XLevelDocument xlevelDocument2 = XSingleton<XGame>.singleton.Doc.GetXComponent(XLevelDocument.uuID) as XLevelDocument;
+ bool flag11 = param[i] < 10;
+ if (!flag11)
+ {
+ flag4 = (SceneRefuseReason.Admit == xlevelDocument2.CanLevelOpen((uint)param[i]));
+ }
+ }
+ SceneTable.RowData sceneData2 = XSingleton<XSceneMgr>.singleton.GetSceneData((uint)param[i]);
+ bool flag12 = sceneData2 != null;
+ if (flag12)
+ {
+ accessData.OpenLevel = (int)sceneData2.RequiredLevel;
+ }
+ }
+ else
+ {
+ bool flag13 = XSysDefine.XSys_Activity_Nest == bqsystem;
+ if (flag13)
+ {
+ XExpeditionDocument xexpeditionDocument = XSingleton<XGame>.singleton.Doc.GetXComponent(XExpeditionDocument.uuID) as XExpeditionDocument;
+ int expIDBySceneID = xexpeditionDocument.GetExpIDBySceneID((uint)param[i]);
+ ExpeditionTable.RowData expeditionDataByID = xexpeditionDocument.GetExpeditionDataByID(expIDBySceneID);
+ bool flag14 = expeditionDataByID != null;
+ if (flag14)
+ {
+ flag4 = xexpeditionDocument.TeamCategoryMgr.IsExpOpened(expeditionDataByID);
+ accessData.OpenLevel = expeditionDataByID.RequiredLevel;
+ }
+ else
+ {
+ flag4 = false;
+ }
+ }
+ }
+ }
+ }
+ accessData.IsOpen = flag4;
+ accessData.DescStr = strengthData.BQTips;
+ bool flag15 = param[i] > 0;
+ if (flag15)
+ {
+ SceneTable.RowData sceneData3 = XSingleton<XSceneMgr>.singleton.GetSceneData((uint)param[i]);
+ bool flag16 = sceneData3 != null;
+ if (flag16)
+ {
+ accessData.DescStr = string.Format(strengthData.BQTips, sceneData3.Comment);
+ accessData.SceStr = sceneData3.Comment;
+ }
+ else
+ {
+ XSingleton<XDebug>.singleton.AddErrorLog(string.Concat(new object[]
+ {
+ "SceneId not exist ",
+ i,
+ " ",
+ param[i]
+ }), null, null, null, null, null);
+ }
+ }
+ list.Add(accessData);
+ }
+ }
+ }
+ list.Sort(new Comparison<AccessData>(this.Compare));
+ base.uiBehaviour.m_RecordPool.ReturnAll(false);
+ for (int j = 0; j < list.Count; j++)
+ {
+ AccessData accessData2 = list[j];
+ bool flag17 = accessData2 == null;
+ if (!flag17)
+ {
+ GameObject gameObject = base.uiBehaviour.m_RecordPool.FetchGameObject(false);
+ gameObject.name = XSingleton<XCommon>.singleton.StringCombine("access", accessData2.BQid.ToString());
+ gameObject.transform.localPosition = base.uiBehaviour.m_RecordPool.TplPos + new Vector3(0f, (float)(-(float)base.uiBehaviour.m_RecordPool.TplHeight * j), 0f);
+ IXUISprite ixuisprite = gameObject.transform.Find("icon").GetComponent("XUISprite") as IXUISprite;
+ IXUILabel ixuilabel = gameObject.transform.Find("name").GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel2 = gameObject.transform.Find("desc").GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel3 = gameObject.transform.Find("scene").GetComponent("XUILabel") as IXUILabel;
+ IXUIButton ixuibutton = gameObject.transform.Find("goto").GetComponent("XUIButton") as IXUIButton;
+ IXUILabel ixuilabel4 = gameObject.transform.Find("notopen").GetComponent("XUILabel") as IXUILabel;
+ ixuisprite.SetSprite(accessData2.Row.BQImageID);
+ ixuilabel.SetText(accessData2.Row.BQName);
+ ixuilabel2.SetText(accessData2.DescStr);
+ ixuilabel3.SetText(accessData2.SceStr);
+ bool isOpen = accessData2.IsOpen;
+ if (isOpen)
+ {
+ ixuibutton.gameObject.SetActive(true);
+ ixuilabel4.gameObject.SetActive(false);
+ ixuibutton.ID = (ulong)((long)accessData2.BQid);
+ ixuibutton.RegisterClickEventHandler(new ButtonClickEventHandler(this.GoToAccessSys));
+ }
+ else
+ {
+ ixuibutton.gameObject.SetActive(false);
+ ixuilabel4.gameObject.SetActive(true);
+ bool flag18 = XSysDefine.XSys_Level_Elite == accessData2.SysType || XSysDefine.XSys_Level_Normal == accessData2.SysType;
+ if (flag18)
+ {
+ bool flag19 = (long)accessData2.OpenLevel > (long)((ulong)XSingleton<XAttributeMgr>.singleton.XPlayerData.Level);
+ if (flag19)
+ {
+ ixuilabel4.SetText(string.Format(XSingleton<XStringTable>.singleton.GetString("SKILL_LEARN"), accessData2.OpenLevel));
+ }
+ else
+ {
+ ixuilabel4.SetText(XSingleton<XStringTable>.singleton.GetString("ShouldFinishMainTask"));
+ }
+ }
+ else
+ {
+ ixuilabel4.SetText(string.Format(XSingleton<XStringTable>.singleton.GetString("SKILL_LEARN"), accessData2.OpenLevel));
+ }
+ }
+ bool flag20 = XSingleton<XGame>.singleton.CurrentStage.Stage != EXStage.Hall;
+ if (flag20)
+ {
+ ixuibutton.SetVisible(false);
+ }
+ }
+ }
+ base.uiBehaviour.m_RecordScrollView.ResetPosition();
+ }
+ }
+
+ private int Compare(AccessData left, AccessData right)
+ {
+ bool isOpen = left.IsOpen;
+ int result;
+ if (isOpen)
+ {
+ result = -1;
+ }
+ else
+ {
+ result = 1;
+ }
+ return result;
+ }
+
+ public bool GoToAccessSys(IXUIButton sp)
+ {
+ int num = (int)sp.ID;
+ FpStrengthenTable.RowData strengthData = this._bqDocument.GetStrengthData(num);
+ bool flag = strengthData == null;
+ bool result;
+ if (flag)
+ {
+ result = false;
+ }
+ else
+ {
+ XSysDefine bqsystem = (XSysDefine)strengthData.BQSystem;
+ XSysDefine xsysDefine = bqsystem;
+ if (xsysDefine <= XSysDefine.XSys_Mall_Mall)
+ {
+ if (xsysDefine == XSysDefine.XSys_Level_Normal)
+ {
+ XLevelDocument specificDocument = XDocuments.GetSpecificDocument<XLevelDocument>(XLevelDocument.uuID);
+ specificDocument.AutoGoBattle(this._idParam[num], 0, 0u);
+ goto IL_284;
+ }
+ if (xsysDefine == XSysDefine.XSys_Level_Elite)
+ {
+ XLevelDocument specificDocument2 = XDocuments.GetSpecificDocument<XLevelDocument>(XLevelDocument.uuID);
+ bool flag2 = this._idParam[num] < 10;
+ if (flag2)
+ {
+ specificDocument2.AutoGoBattle(0, this._idParam[num], 1u);
+ }
+ else
+ {
+ specificDocument2.AutoGoBattle(this._idParam[num], 0, 1u);
+ }
+ goto IL_284;
+ }
+ if (xsysDefine != XSysDefine.XSys_Mall_Mall)
+ {
+ goto IL_261;
+ }
+ }
+ else
+ {
+ if (xsysDefine == XSysDefine.XSys_Mall_Guild)
+ {
+ XGuildDocument specificDocument3 = XDocuments.GetSpecificDocument<XGuildDocument>(XGuildDocument.uuID);
+ this.SetVisible(false, true);
+ bool flag3 = !specificDocument3.bInGuild;
+ if (flag3)
+ {
+ XSingleton<XGameSysMgr>.singleton.OpenSystem(XSysDefine.XSys_Guild, 0UL);
+ }
+ else
+ {
+ XSingleton<XGameSysMgr>.singleton.OpenSystem((XSysDefine)strengthData.BQSystem, (ulong)((long)this._access_item));
+ }
+ goto IL_284;
+ }
+ if (xsysDefine == XSysDefine.XSys_Activity_Nest)
+ {
+ this.SetVisible(false, true);
+ bool flag4 = 0 <= this._idParam[num];
+ if (flag4)
+ {
+ XExpeditionDocument xexpeditionDocument = XSingleton<XGame>.singleton.Doc.GetXComponent(XExpeditionDocument.uuID) as XExpeditionDocument;
+ int expIDBySceneID = xexpeditionDocument.GetExpIDBySceneID((uint)this._idParam[num]);
+ ExpeditionTable.RowData expeditionDataByID = xexpeditionDocument.GetExpeditionDataByID(expIDBySceneID);
+ bool flag5 = expeditionDataByID != null;
+ if (flag5)
+ {
+ ExpeditionTable.RowData expeditionDataByID2 = xexpeditionDocument.GetExpeditionDataByID(this._idParam[num]);
+ bool flag6 = expeditionDataByID2 != null;
+ if (flag6)
+ {
+ DlgBase<TheExpView, TheExpBehaviour>.singleton.ShowView(expeditionDataByID2.DNExpeditionID);
+ }
+ else
+ {
+ DlgBase<TheExpView, TheExpBehaviour>.singleton.ShowView(-1);
+ }
+ }
+ }
+ else
+ {
+ DlgBase<TheExpView, TheExpBehaviour>.singleton.ShowViewByExpID(this._idParam[num]);
+ }
+ goto IL_284;
+ }
+ if (xsysDefine != XSysDefine.XSys_Activity_TeamTower)
+ {
+ goto IL_261;
+ }
+ }
+ this.SetVisible(false, true);
+ bool flag7 = this._callback != null;
+ if (flag7)
+ {
+ this._callback();
+ }
+ XSingleton<XGameSysMgr>.singleton.OpenSystem(bqsystem, 0UL);
+ goto IL_284;
+ IL_261:
+ this.SetVisible(false, true);
+ XSingleton<XGameSysMgr>.singleton.OpenSystem((XSysDefine)strengthData.BQSystem, (ulong)((long)this._access_item));
+ IL_284:
+ result = true;
+ }
+ return result;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/ItemAccessDlg.cs.meta b/Client/Assets/Scripts/XMainClient/UI/ItemAccessDlg.cs.meta
new file mode 100644
index 00000000..57b936c5
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/ItemAccessDlg.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: f02355a82812f4f41bba2fdf8036d1f8
+timeCreated: 1611404829
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/ItemAccessDlgBehaviour.cs b/Client/Assets/Scripts/XMainClient/UI/ItemAccessDlgBehaviour.cs
new file mode 100644
index 00000000..2284534f
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/ItemAccessDlgBehaviour.cs
@@ -0,0 +1,34 @@
+using System;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class ItemAccessDlgBehaviour : DlgBehaviourBase
+ {
+ public GameObject m_Item;
+
+ public XUIPool m_RecordPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ public IXUIScrollView m_RecordScrollView;
+
+ public IXUIButton m_Close;
+
+ public GameObject m_BossItem;
+
+ public IXUILabel m_bossDec;
+
+ private void Awake()
+ {
+ this.m_Close = (base.transform.Find("Bg/Close").GetComponent("XUIButton") as IXUIButton);
+ this.m_Item = base.transform.Find("Bg/Item").gameObject;
+ this.m_BossItem = base.transform.Find("Bg/Boss").gameObject;
+ this.m_bossDec = (this.m_BossItem.transform.Find("Des").GetComponent("XUILabel") as IXUILabel);
+ Transform transform = base.transform.Find("Bg/ListPanel/ItemTpl");
+ this.m_RecordPool.SetupPool(transform.parent.gameObject, transform.gameObject, 4u, false);
+ this.m_RecordScrollView = (base.transform.Find("Bg/ListPanel").GetComponent("XUIScrollView") as IXUIScrollView);
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/ItemAccessDlgBehaviour.cs.meta b/Client/Assets/Scripts/XMainClient/UI/ItemAccessDlgBehaviour.cs.meta
new file mode 100644
index 00000000..5ab17168
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/ItemAccessDlgBehaviour.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: efb71303c2365324586471b9221bd68a
+timeCreated: 1611404805
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/ItemIconListDlg.cs b/Client/Assets/Scripts/XMainClient/UI/ItemIconListDlg.cs
new file mode 100644
index 00000000..39082bb5
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/ItemIconListDlg.cs
@@ -0,0 +1,148 @@
+using System;
+using System.Collections.Generic;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class ItemIconListDlg : DlgBase<ItemIconListDlg, ItemIconListDlgBehaviour>
+ {
+ public override string fileName
+ {
+ get
+ {
+ return "Common/ItemIconListDlg";
+ }
+ }
+
+ public override int layer
+ {
+ get
+ {
+ return 100;
+ }
+ }
+
+ public override bool autoload
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ protected override void Init()
+ {
+ }
+
+ public override void RegisterEvent()
+ {
+ base.uiBehaviour.m_Close.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnCloseClicked));
+ }
+
+ public void SetTitle(string text)
+ {
+ base.uiBehaviour.m_Title.SetText(text);
+ }
+
+ private Rect _GetValidRect()
+ {
+ Rect result = default(Rect);
+ result.Set((float)(-(float)(XSingleton<XGameUI>.singleton.Base_UI_Width - base.uiBehaviour.m_Bg.spriteWidth) / 2), (float)(-(float)(XSingleton<XGameUI>.singleton.Base_UI_Height - base.uiBehaviour.m_Bg.spriteHeight) / 2), (float)(XSingleton<XGameUI>.singleton.Base_UI_Width - base.uiBehaviour.m_Bg.spriteWidth), (float)(XSingleton<XGameUI>.singleton.Base_UI_Height - base.uiBehaviour.m_Bg.spriteHeight));
+ return result;
+ }
+
+ public void SetGlobalPosition(Vector3 position)
+ {
+ base.uiBehaviour.m_Bg.gameObject.transform.position = position;
+ Vector3 localPosition = base.uiBehaviour.m_Bg.gameObject.transform.localPosition;
+ localPosition.y -= (float)(base.uiBehaviour.m_Bg.spriteHeight / 2 + 50);
+ Rect rect = this._GetValidRect();
+ base.uiBehaviour.m_Arrow.gameObject.SetActive(false);
+ base.uiBehaviour.m_ArrowDown.gameObject.SetActive(false);
+ Transform transform = base.uiBehaviour.m_Arrow;
+ bool flag = localPosition.y < rect.yMin;
+ if (flag)
+ {
+ localPosition.y = base.uiBehaviour.m_Bg.gameObject.transform.localPosition.y + (float)(base.uiBehaviour.m_Bg.spriteHeight / 2 + 50);
+ transform = base.uiBehaviour.m_ArrowDown;
+ }
+ localPosition.x = Mathf.Max(rect.xMin, localPosition.x);
+ localPosition.x = Mathf.Min(rect.xMax, localPosition.x);
+ localPosition.y = Mathf.Max(rect.yMin, localPosition.y);
+ localPosition.y = Mathf.Min(rect.yMax, localPosition.y);
+ base.uiBehaviour.m_Bg.gameObject.transform.localPosition = localPosition;
+ transform.position = new Vector3(position.x, transform.position.y, transform.position.z);
+ float num = Mathf.Clamp(transform.localPosition.x, (float)(-(float)base.uiBehaviour.m_Bg.spriteWidth / 2 + 5), (float)(base.uiBehaviour.m_Bg.spriteWidth / 2 - 5));
+ transform.localPosition = new Vector3(num, transform.localPosition.y, transform.localPosition.z);
+ transform.gameObject.SetActive(true);
+ this.SetVisible(true, true);
+ }
+
+ public void Show(List<uint> itemid, List<uint> itemCount, bool isCamp = false)
+ {
+ this.SetVisible(true, true);
+ bool flag = itemid.Count != itemCount.Count;
+ if (flag)
+ {
+ XSingleton<XDebug>.singleton.AddErrorLog("itemid.Count != itemCount.Count", null, null, null, null, null);
+ }
+ else
+ {
+ bool flag2 = isCamp && itemid.Count < 2;
+ if (flag2)
+ {
+ XSingleton<XDebug>.singleton.AddErrorLog("itemid.Count <2", null, null, null, null, null);
+ }
+ else
+ {
+ float num = 0f;
+ if (isCamp)
+ {
+ num = (float)(-(float)base.uiBehaviour.m_Split.spriteWidth) * 0.5f;
+ base.uiBehaviour.m_Split.SetVisible(true);
+ }
+ else
+ {
+ base.uiBehaviour.m_Split.SetVisible(false);
+ }
+ base.uiBehaviour.m_ItemPool.FakeReturnAll();
+ float num2 = (float)itemid.Count * 0.5f - 0.5f;
+ Vector3 tplPos = base.uiBehaviour.m_ItemPool.TplPos;
+ for (int i = 0; i < itemid.Count; i++)
+ {
+ GameObject gameObject = base.uiBehaviour.m_ItemPool.FetchGameObject(false);
+ XSingleton<XItemDrawerMgr>.singleton.normalItemDrawer.DrawItem(gameObject, (int)itemid[i], (int)itemCount[i], false);
+ gameObject.transform.localPosition = new Vector3(((float)i - num2) * (float)base.uiBehaviour.m_ItemPool.TplWidth + num, tplPos.y);
+ bool flag3 = isCamp && i == itemid.Count - 1;
+ if (flag3)
+ {
+ gameObject.transform.localPosition += new Vector3((float)base.uiBehaviour.m_Split.spriteWidth, 0f, 0f);
+ base.uiBehaviour.m_SplitPos.transform.localPosition = gameObject.transform.localPosition;
+ }
+ IXUISprite ixuisprite = gameObject.transform.Find("Icon").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.ID = (ulong)itemid[i];
+ ixuisprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(XSingleton<UiUtility>.singleton.OnItemClick));
+ }
+ base.uiBehaviour.m_ItemPool.ActualReturnAll(false);
+ int num3 = base.uiBehaviour.m_ItemPool.ActiveCount * base.uiBehaviour.m_ItemPool.TplWidth;
+ if (isCamp)
+ {
+ num3 += base.uiBehaviour.m_Split.spriteWidth;
+ }
+ num3 -= base.uiBehaviour.m_BorderWidth;
+ num3 = Mathf.Max(num3, base.uiBehaviour.m_MinFrame.spriteWidth);
+ base.uiBehaviour.m_Bg.spriteWidth = num3;
+ base.uiBehaviour.m_Title.gameObject.transform.localPosition = new Vector3((float)(-(float)base.uiBehaviour.m_ItemPool.TplWidth) * 0.5f + num, base.uiBehaviour.m_Title.gameObject.transform.localPosition.y);
+ }
+ }
+ }
+
+ private void OnCloseClicked(IXUISprite iSp)
+ {
+ this.SetVisible(false, true);
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/ItemIconListDlg.cs.meta b/Client/Assets/Scripts/XMainClient/UI/ItemIconListDlg.cs.meta
new file mode 100644
index 00000000..dde2dd04
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/ItemIconListDlg.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 6e37f4b6f6a94384d816f02986fddb5c
+timeCreated: 1611403904
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/ItemIconListDlgBehaviour.cs b/Client/Assets/Scripts/XMainClient/UI/ItemIconListDlgBehaviour.cs
new file mode 100644
index 00000000..336f74ec
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/ItemIconListDlgBehaviour.cs
@@ -0,0 +1,49 @@
+using System;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class ItemIconListDlgBehaviour : DlgBehaviourBase
+ {
+ public IXUILabel m_Title = null;
+
+ public IXUISprite m_Bg = null;
+
+ public IXUISprite m_Close = null;
+
+ public IXUISprite m_MinFrame = null;
+
+ public Transform m_Arrow = null;
+
+ public Transform m_ArrowDown = null;
+
+ public IXUISprite m_Split = null;
+
+ public Transform m_SplitPos = null;
+
+ public XUIPool m_ItemPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ public int m_BorderWidth;
+
+ private void Awake()
+ {
+ Transform transform = base.transform.Find("Bg/Title");
+ this.m_Title = (transform.GetComponent("XUILabel") as IXUILabel);
+ transform = base.transform.Find("Close");
+ this.m_Close = (transform.GetComponent("XUISprite") as IXUISprite);
+ transform = base.transform.Find("Bg");
+ this.m_Bg = (transform.GetComponent("XUISprite") as IXUISprite);
+ transform = base.transform.Find("Bg/MinFrame");
+ this.m_MinFrame = (transform.GetComponent("XUISprite") as IXUISprite);
+ this.m_ItemPool.SetupPool(base.transform.Find("Bg/ListPanel").gameObject, base.transform.Find("Bg/ListPanel/ItemTpl").gameObject, 3u, false);
+ this.m_BorderWidth = this.m_Bg.spriteWidth - this.m_MinFrame.spriteWidth;
+ this.m_Arrow = base.transform.Find("Bg/Arrow");
+ this.m_ArrowDown = base.transform.Find("Bg/ArrowDown");
+ this.m_Split = (base.transform.Find("Bg/Split").GetComponent("XUISprite") as IXUISprite);
+ this.m_SplitPos = base.transform.Find("Bg/Split/Sprite");
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/ItemIconListDlgBehaviour.cs.meta b/Client/Assets/Scripts/XMainClient/UI/ItemIconListDlgBehaviour.cs.meta
new file mode 100644
index 00000000..d3392bc4
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/ItemIconListDlgBehaviour.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: a663fcdf3b7f9e9489315dca1ac2865d
+timeCreated: 1611404288
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/ItemSystemDlg.cs b/Client/Assets/Scripts/XMainClient/UI/ItemSystemDlg.cs
new file mode 100644
index 00000000..b6bfa3ef
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/ItemSystemDlg.cs
@@ -0,0 +1,356 @@
+using System;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class ItemSystemDlg : TabDlgBase<ItemSystemDlg>
+ {
+ public override string fileName
+ {
+ get
+ {
+ return "ItemNew/ItemNewDlg";
+ }
+ }
+
+ protected override bool bHorizontal
+ {
+ get
+ {
+ return false;
+ }
+ }
+
+ public CharacterEquipHandler _equipHandler;
+
+ public XCharacterInfoView _InfoView;
+
+ public JadeEquipHandler _JadeEquipHandler;
+
+ public EmblemEquipView _EmblemEquipHandler;
+
+ public ArtifactFrameHandler _ArtifactFrameHandler;
+
+ public CharacterEquipBagHandler _EquipBagHandler;
+
+ public JadeBagHandler _JadeBagHandler;
+
+ public JadeComposeHandler _JadeComposeHandler;
+
+ public JadeComposeFrameHandler _JadeComposeFrameHandler;
+
+ public CharacterItemBagHandler _ItemBagHandler;
+
+ public EmblemBagView _EmblemBagHandler;
+
+ public XDesignationView _DesignationHandler;
+
+ public FashionBagHandler _FashionBagHandler;
+
+ public EquipSetWearingHandler _WearingHandler;
+
+ public XCharacterAttrView<XAttrPlayerFile> _CharacterAttrHandler;
+
+ public EnhanceView _EnhanceHandler;
+
+ public SmeltMainHandler _SmeltMainHandler;
+
+ public EnchantOperateHandler _EnchantHandler;
+
+ public ForgeMainHandler _ForgeMainHandler;
+
+ public ArtifactBagHandler _ArtifactBagHandler;
+
+ public EquipUpgradeHandler _equipUpgradeHandler;
+
+ public EquipFusionHandler _equipFusionHandler;
+
+ private DlgHandlerBase _RightPopHandler;
+
+ private Transform m_leftPanelTra;
+
+ private Transform m_rightPanelTra;
+
+ private Transform m_jadeFrameTra;
+
+ private GameObject m_items;
+
+ private IXUIButton m_Photo;
+
+ private Transform m_useItemEffect;
+
+ public XBagWindow BagWindow;
+
+ public XItemMorePowerfulTipMgr NewItemMgr = new XItemMorePowerfulTipMgr();
+
+ public XItemMorePowerfulTipMgr RedPointMgr = new XItemMorePowerfulTipMgr();
+
+ protected override void Init()
+ {
+ base.Init();
+ this.m_leftPanelTra = base.uiBehaviour.transform.Find("Bg/LeftPanel");
+ this.m_rightPanelTra = base.uiBehaviour.transform.Find("Bg/RightPanel");
+ this.m_jadeFrameTra = this.m_leftPanelTra.Find("JadeFrame");
+ this.m_useItemEffect = base.uiBehaviour.transform.Find("Bg/UseItemEffect");
+ base.RegisterSubSysRedPointMgr(XSysDefine.XSys_Item);
+ this.NewItemMgr.Load("New");
+ this.NewItemMgr.SetupPool(this.m_rightPanelTra.gameObject);
+ this.RedPointMgr.Load("ItemMorePowerfulTip2");
+ this.RedPointMgr.SetupPool(this.m_rightPanelTra.gameObject);
+ this.m_items = this.m_rightPanelTra.Find("Items").gameObject;
+ this.m_Photo = (base.uiBehaviour.transform.Find("Bg/SysAPhoto").GetComponent("XUIButton") as IXUIButton);
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ bool flag = null != this.m_useItemEffect;
+ if (flag)
+ {
+ this.m_useItemEffect.gameObject.SetActive(false);
+ }
+ this._RightPopHandler = null;
+ this.m_Photo.SetVisible(true);
+ }
+
+ protected override void OnHide()
+ {
+ bool flag = this.m_useItemEffect != null;
+ if (flag)
+ {
+ this.m_useItemEffect.gameObject.SetActive(false);
+ }
+ base.OnHide();
+ }
+
+ public override void RegisterEvent()
+ {
+ this.m_Photo.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnShowScreenShotShare));
+ base.RegisterEvent();
+ }
+
+ public override void StackRefresh()
+ {
+ bool flag = this._InfoView != null;
+ if (flag)
+ {
+ this._InfoView.StackRefresh();
+ }
+ base.StackRefresh();
+ }
+
+ public override void LeaveStackTop()
+ {
+ bool flag = this.m_useItemEffect != null;
+ if (flag)
+ {
+ this.m_useItemEffect.gameObject.SetActive(false);
+ }
+ }
+
+ protected override void OnLoad()
+ {
+ this.InitItems();
+ }
+
+ protected override void OnUnload()
+ {
+ DlgHandlerBase.EnsureUnload<CharacterEquipBagHandler>(ref this._EquipBagHandler);
+ DlgHandlerBase.EnsureUnload<XCharacterInfoView>(ref this._InfoView);
+ DlgHandlerBase.EnsureUnload<CharacterEquipHandler>(ref this._equipHandler);
+ DlgHandlerBase.EnsureUnload<JadeBagHandler>(ref this._JadeBagHandler);
+ DlgHandlerBase.EnsureUnload<JadeEquipHandler>(ref this._JadeEquipHandler);
+ DlgHandlerBase.EnsureUnload<JadeComposeHandler>(ref this._JadeComposeHandler);
+ DlgHandlerBase.EnsureUnload<JadeComposeFrameHandler>(ref this._JadeComposeFrameHandler);
+ DlgHandlerBase.EnsureUnload<CharacterItemBagHandler>(ref this._ItemBagHandler);
+ DlgHandlerBase.EnsureUnload<EmblemBagView>(ref this._EmblemBagHandler);
+ DlgHandlerBase.EnsureUnload<EmblemEquipView>(ref this._EmblemEquipHandler);
+ DlgHandlerBase.EnsureUnload<XDesignationView>(ref this._DesignationHandler);
+ DlgHandlerBase.EnsureUnload<FashionBagHandler>(ref this._FashionBagHandler);
+ DlgHandlerBase.EnsureUnload<EquipSetWearingHandler>(ref this._WearingHandler);
+ DlgHandlerBase.EnsureUnload<XCharacterAttrView<XAttrPlayerFile>>(ref this._CharacterAttrHandler);
+ DlgHandlerBase.EnsureUnload<SmeltMainHandler>(ref this._SmeltMainHandler);
+ DlgHandlerBase.EnsureUnload<EnhanceView>(ref this._EnhanceHandler);
+ DlgHandlerBase.EnsureUnload<EnchantOperateHandler>(ref this._EnchantHandler);
+ DlgHandlerBase.EnsureUnload<ForgeMainHandler>(ref this._ForgeMainHandler);
+ DlgHandlerBase.EnsureUnload<ArtifactFrameHandler>(ref this._ArtifactFrameHandler);
+ DlgHandlerBase.EnsureUnload<ArtifactBagHandler>(ref this._ArtifactBagHandler);
+ DlgHandlerBase.EnsureUnload<EquipUpgradeHandler>(ref this._equipUpgradeHandler);
+ DlgHandlerBase.EnsureUnload<EquipFusionHandler>(ref this._equipFusionHandler);
+ this.BagWindow = null;
+ this.NewItemMgr.Unload();
+ this.RedPointMgr.Unload();
+ base.OnUnload();
+ }
+
+ public override void SetupHandlers(XSysDefine sys)
+ {
+ XSysDefine xsysDefine = sys;
+ if (xsysDefine <= XSysDefine.XSys_Item_Jade)
+ {
+ if (xsysDefine == XSysDefine.XSys_Fashion)
+ {
+ this.m_items.SetActive(false);
+ base._AddActiveHandler(DlgHandlerBase.EnsureCreate<FashionBagHandler>(ref this._FashionBagHandler, this.m_rightPanelTra, true, this));
+ base._AddActiveHandler(DlgHandlerBase.EnsureCreate<XCharacterInfoView>(ref this._InfoView, this.m_leftPanelTra, true, this));
+ goto IL_3B1;
+ }
+ if (xsysDefine == XSysDefine.XSys_Item_Equip)
+ {
+ this.m_items.SetActive(true);
+ base._AddActiveHandler(DlgHandlerBase.EnsureCreate<CharacterEquipHandler>(ref this._equipHandler, this.m_leftPanelTra, true, this));
+ base._AddActiveHandler(DlgHandlerBase.EnsureCreate<CharacterEquipBagHandler>(ref this._EquipBagHandler, this.m_rightPanelTra, true, this));
+ base._AddActiveHandler(DlgHandlerBase.EnsureCreate<XCharacterInfoView>(ref this._InfoView, this.m_leftPanelTra, true, this));
+ base._AddActiveHandler(DlgHandlerBase.EnsureCreate<EquipSetWearingHandler>(ref this._WearingHandler, this.m_rightPanelTra, false, this));
+ base._AddActiveHandler(DlgHandlerBase.EnsureCreate<XCharacterAttrView<XAttrPlayerFile>>(ref this._CharacterAttrHandler, this.m_leftPanelTra, false, this));
+ base._AddActiveHandler(DlgHandlerBase.EnsureCreate<EnhanceView>(ref this._EnhanceHandler, this.m_rightPanelTra, false, this));
+ base._AddActiveHandler(DlgHandlerBase.EnsureCreate<SmeltMainHandler>(ref this._SmeltMainHandler, this.m_rightPanelTra, false, this));
+ base._AddActiveHandler(DlgHandlerBase.EnsureCreate<EnchantOperateHandler>(ref this._EnchantHandler, this.m_rightPanelTra, false, this));
+ base._AddActiveHandler(DlgHandlerBase.EnsureCreate<ForgeMainHandler>(ref this._ForgeMainHandler, this.m_rightPanelTra, false, this));
+ base._AddActiveHandler(DlgHandlerBase.EnsureCreate<EquipUpgradeHandler>(ref this._equipUpgradeHandler, this.m_rightPanelTra, false, this));
+ base._AddActiveHandler(DlgHandlerBase.EnsureCreate<EquipFusionHandler>(ref this._equipFusionHandler, this.m_rightPanelTra, false, this));
+ this._CharacterAttrHandler.SetAttributes(XSingleton<XAttributeMgr>.singleton.XPlayerData);
+ goto IL_3B1;
+ }
+ if (xsysDefine == XSysDefine.XSys_Item_Jade)
+ {
+ this.m_items.SetActive(false);
+ base._AddActiveHandler(DlgHandlerBase.EnsureCreate<JadeBagHandler>(ref this._JadeBagHandler, this.m_rightPanelTra, false, this));
+ base._AddActiveHandler(DlgHandlerBase.EnsureCreate<JadeEquipHandler>(ref this._JadeEquipHandler, this.m_jadeFrameTra, true, this));
+ base._AddActiveHandler(DlgHandlerBase.EnsureCreate<JadeComposeFrameHandler>(ref this._JadeComposeFrameHandler, this.m_rightPanelTra, false, this));
+ goto IL_3B1;
+ }
+ }
+ else if (xsysDefine <= XSysDefine.XSys_Bag_Item)
+ {
+ if (xsysDefine == XSysDefine.XSys_Char_Emblem)
+ {
+ this.m_items.SetActive(true);
+ base._AddActiveHandler(DlgHandlerBase.EnsureCreate<EmblemBagView>(ref this._EmblemBagHandler, this.m_rightPanelTra, true, this));
+ base._AddActiveHandler(DlgHandlerBase.EnsureCreate<EmblemEquipView>(ref this._EmblemEquipHandler, this.m_leftPanelTra, true, this));
+ base._AddActiveHandler(DlgHandlerBase.EnsureCreate<SmeltMainHandler>(ref this._SmeltMainHandler, this.m_rightPanelTra, false, this));
+ goto IL_3B1;
+ }
+ if (xsysDefine == XSysDefine.XSys_Bag_Item)
+ {
+ this.m_items.SetActive(false);
+ base._AddActiveHandler(DlgHandlerBase.EnsureCreate<CharacterItemBagHandler>(ref this._ItemBagHandler, this.m_rightPanelTra, true, this));
+ base._AddActiveHandler(DlgHandlerBase.EnsureCreate<XCharacterInfoView>(ref this._InfoView, this.m_leftPanelTra, true, this));
+ base._AddActiveHandler(DlgHandlerBase.EnsureCreate<JadeComposeFrameHandler>(ref this._JadeComposeFrameHandler, this.m_rightPanelTra, false, this));
+ goto IL_3B1;
+ }
+ }
+ else
+ {
+ if (xsysDefine == XSysDefine.XSys_Design_Designation)
+ {
+ this.m_items.SetActive(false);
+ base._AddActiveHandler(DlgHandlerBase.EnsureCreate<XDesignationView>(ref this._DesignationHandler, this.m_rightPanelTra, true, this));
+ goto IL_3B1;
+ }
+ if (xsysDefine == XSysDefine.XSys_Artifact)
+ {
+ this.m_items.SetActive(false);
+ base._AddActiveHandler(DlgHandlerBase.EnsureCreate<ArtifactBagHandler>(ref this._ArtifactBagHandler, this.m_rightPanelTra, true, this));
+ base._AddActiveHandler(DlgHandlerBase.EnsureCreate<ArtifactFrameHandler>(ref this._ArtifactFrameHandler, this.m_leftPanelTra, true, this));
+ goto IL_3B1;
+ }
+ }
+ XSingleton<XDebug>.singleton.AddErrorLog("System has not finished:", sys.ToString(), null, null, null, null);
+ return;
+ IL_3B1:
+ bool flag = sys == XSysDefine.XSys_Fashion_Fashion;
+ if (flag)
+ {
+ XFashionDocument specificDocument = XDocuments.GetSpecificDocument<XFashionDocument>(XFashionDocument.uuID);
+ bool flag2 = specificDocument.HasOneFashionSuit() && XSingleton<XLoginDocument>.singleton.Channel != XAuthorizationChannel.XAuthorization_Guest && XSingleton<XGameSysMgr>.singleton.IsSystemOpened(XSysDefine.XSys_Photo);
+ if (flag2)
+ {
+ this.m_Photo.SetVisible(true);
+ }
+ else
+ {
+ this.m_Photo.SetVisible(false);
+ }
+ }
+ else
+ {
+ this.m_Photo.SetVisible(false);
+ }
+ }
+
+ public void PlayUseItemEffect(bool enable)
+ {
+ bool flag = null != this.m_useItemEffect;
+ if (flag)
+ {
+ this.m_useItemEffect.gameObject.SetActive(enable);
+ }
+ }
+
+ public void OnLevelChange()
+ {
+ bool flag = this._equipHandler != null && this._equipHandler.active;
+ if (flag)
+ {
+ this._equipHandler.ShowEquipments();
+ }
+ bool flag2 = this._ArtifactFrameHandler != null && this._ArtifactFrameHandler.IsVisible();
+ if (flag2)
+ {
+ this._ArtifactFrameHandler.ShowArtifacts();
+ }
+ }
+
+ public void ShowRightPopView(DlgHandlerBase toOpenHandler)
+ {
+ bool flag = toOpenHandler == null;
+ if (!flag)
+ {
+ this.OnPopHandlerSetVisible(true, toOpenHandler);
+ bool flag2 = !toOpenHandler.IsVisible();
+ if (flag2)
+ {
+ toOpenHandler.SetVisible(true);
+ }
+ else
+ {
+ toOpenHandler.RefreshData();
+ }
+ }
+ }
+
+ public void OnPopHandlerSetVisible(bool bVisible, DlgHandlerBase toOpenHandler = null)
+ {
+ if (bVisible)
+ {
+ bool flag = this._RightPopHandler != toOpenHandler && this._RightPopHandler != null;
+ if (flag)
+ {
+ this._RightPopHandler.SetVisible(false);
+ }
+ this._RightPopHandler = toOpenHandler;
+ }
+ else
+ {
+ this._RightPopHandler = null;
+ }
+ }
+
+ private void InitItems()
+ {
+ this.BagWindow = new XBagWindow(this.m_items, null, null);
+ this.BagWindow.Init();
+ }
+
+ private bool OnShowScreenShotShare(IXUIButton btn)
+ {
+ DlgBase<ScreenShotShareView, ScreenShotShareBehaviour>.singleton.SetVisible(true, true);
+ DlgBase<ScreenShotShareView, ScreenShotShareBehaviour>.singleton.ShowCharView();
+ return true;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/ItemSystemDlg.cs.meta b/Client/Assets/Scripts/XMainClient/UI/ItemSystemDlg.cs.meta
new file mode 100644
index 00000000..6fe76a61
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/ItemSystemDlg.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: b61267f2346a3a340bcc8f01eb0855f1
+timeCreated: 1611404396
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/ItemTooltipDlg.cs b/Client/Assets/Scripts/XMainClient/UI/ItemTooltipDlg.cs
new file mode 100644
index 00000000..610332d0
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/ItemTooltipDlg.cs
@@ -0,0 +1,159 @@
+using System;
+using UILib;
+using UnityEngine;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class ItemTooltipDlg : TooltipDlg<ItemTooltipDlg, ItemTooltipDlgBehaviour>
+ {
+ public override string fileName
+ {
+ get
+ {
+ return "GameSystem/ItemToolTipDlg";
+ }
+ }
+
+ private bool m_bIsNeedTimeUpdate = false;
+
+ private IXUILabel m_timeLab;
+
+ private string m_tempStr = string.Empty;
+
+ private float m_nextTime = 0f;
+
+ protected override void Init()
+ {
+ base.Init();
+ this.m_OperateList[0, 0] = new TooltipButtonOperateItemUse();
+ this.m_OperateList[0, 1] = new TooltipButtonOperateItemAny();
+ this.m_OperateList[0, 2] = new TooltipButtonOperateRecycle(XSysDefine.XSys_Bag_Item);
+ this.m_OperateList[0, 3] = new TooltipButtonOperateSell();
+ this.m_OperateList[0, 4] = new TooltipButtonOperateCompose();
+ }
+
+ public void ShowToolTip(ulong MainUID, ulong CompareUID, bool bShowButtons = true)
+ {
+ XItem itemByUID = XSingleton<XGame>.singleton.Doc.XBagDoc.GetItemByUID(MainUID);
+ XItem xitem = XSingleton<XGame>.singleton.Doc.XBagDoc.GetItemByUID(CompareUID);
+ bool flag = xitem.uid == 0UL;
+ if (flag)
+ {
+ xitem = null;
+ }
+ this.ShowToolTip(itemByUID, xitem, bShowButtons, 0u);
+ }
+
+ protected override void SetupTopFrame(GameObject goToolTip, ItemList.RowData data, bool bMain, XItem instanceData = null, XItem compareData = null)
+ {
+ base.SetupTopFrame(goToolTip, data, bMain, instanceData, compareData);
+ ItemType itemType = (ItemType)data.ItemType;
+ if (itemType != ItemType.ENCHANT)
+ {
+ base._SetupLevel(goToolTip, data, 0);
+ base._SetupProf(goToolTip, data, bMain, instanceData, 1);
+ base._SetupType(goToolTip, data, 2);
+ }
+ else
+ {
+ XEnchantDocument specificDocument = XDocuments.GetSpecificDocument<XEnchantDocument>(XEnchantDocument.uuID);
+ EnchantEquip.RowData enchantEquipData = specificDocument.GetEnchantEquipData(data.ItemID);
+ base._SetTopFrameLabel(goToolTip, 0, XStringDefineProxy.GetString("ToolTipText_Level"), XStringDefineProxy.GetString("ToolTipText_UnderLevel", new object[]
+ {
+ data.ReqLevel.ToString()
+ }));
+ base._SetTopFrameLabel(goToolTip, 1, XStringDefineProxy.GetString("ToolTipText_Part"), (enchantEquipData != null) ? XStringDefineProxy.GetString("ToolTipText_EnchantType" + enchantEquipData.VisiblePos.ToString()) : string.Empty);
+ base._SetupType(goToolTip, data, 2);
+ }
+ this.m_timeLab = goToolTip.transform.Find("TopFrame/countdown").GetComponent<IXUILabel>();
+ this.m_bIsNeedTimeUpdate = true;
+ this.m_timeLab.gameObject.SetActive(true);
+ this.SetTimeLab();
+ }
+
+ private void SetTimeLab()
+ {
+ XItem itemByUID = XBagDocument.BagDoc.GetItemByUID(this.mainItemUID);
+ bool flag = itemByUID == null || this.m_timeLab.gameObject == null;
+ if (flag)
+ {
+ this.m_timeLab.gameObject.SetActive(false);
+ this.m_bIsNeedTimeUpdate = false;
+ }
+ else
+ {
+ uint serverTimeSince = XActivityDocument.Doc.ServerTimeSince1970;
+ bool flag2 = serverTimeSince >= itemByUID.bexpirationTime;
+ if (flag2)
+ {
+ this.m_bIsNeedTimeUpdate = false;
+ this.m_timeLab.gameObject.SetActive(false);
+ }
+ else
+ {
+ this.m_tempStr = XSingleton<UiUtility>.singleton.TimeDuarationFormatString((int)(itemByUID.bexpirationTime - serverTimeSince), 4);
+ this.m_tempStr = XSingleton<UiUtility>.singleton.ReplaceReturn(string.Format("{0}{1}", XSingleton<XStringTable>.singleton.GetString("TipsEndTime"), this.m_tempStr));
+ this.m_timeLab.SetText(this.m_tempStr);
+ }
+ }
+ }
+
+ protected override void SetAllAttrFrames(GameObject goToolTip, XAttrItem item, XAttrItem compareItem, bool bMain)
+ {
+ }
+
+ protected override void SetupOtherFrame(GameObject goToolTip, XItem item, XItem compareItem, bool bMain)
+ {
+ ItemList.RowData itemConf = XBagDocument.GetItemConf(item.itemID);
+ this._SetupDescription(goToolTip, itemConf);
+ }
+
+ protected override void SetupOtherFrame(GameObject goToolTip, ItemList.RowData data)
+ {
+ this._SetupDescription(goToolTip, data);
+ }
+
+ protected void _SetupDescription(GameObject goToolTip, ItemList.RowData data)
+ {
+ Transform transform = goToolTip.transform;
+ IXUISprite ixuisprite = transform.Find("ScrollPanel/Description").GetComponent("XUISprite") as IXUISprite;
+ IXUILabel ixuilabel = ixuisprite.gameObject.transform.Find("Text").GetComponent("XUILabel") as IXUILabel;
+ bool flag = data == null;
+ if (flag)
+ {
+ ixuilabel.SetText("");
+ }
+ else
+ {
+ ixuilabel.SetText(XSingleton<UiUtility>.singleton.ReplaceReturn(data.ItemDescription));
+ }
+ ixuisprite.spriteHeight = ixuilabel.spriteHeight + -(int)ixuilabel.gameObject.transform.localPosition.y;
+ this.totalFrameHeight += (float)ixuisprite.spriteHeight;
+ }
+
+ public override void OnUpdate()
+ {
+ base.OnUpdate();
+ bool flag = this.m_bIsNeedTimeUpdate && Time.realtimeSinceStartup >= this.m_nextTime;
+ if (flag)
+ {
+ this.m_nextTime = Time.realtimeSinceStartup + 60f;
+ this.SetTimeLab();
+ }
+ }
+
+ protected override void SetupToolTipButtons(GameObject goToolTip, XItem item, bool bMain)
+ {
+ base.SetupToolTipButtons(goToolTip, item, bMain);
+ bool flag = !this.bShowButtons;
+ if (!flag)
+ {
+ if (bMain)
+ {
+ base._SetupButtonVisiability(goToolTip, 0, item);
+ }
+ }
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/ItemTooltipDlg.cs.meta b/Client/Assets/Scripts/XMainClient/UI/ItemTooltipDlg.cs.meta
new file mode 100644
index 00000000..9c8dd004
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/ItemTooltipDlg.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 68de21bf1d3a5fb498cd6465b1b84bac
+timeCreated: 1611403884
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/ItemTooltipDlgBehaviour.cs b/Client/Assets/Scripts/XMainClient/UI/ItemTooltipDlgBehaviour.cs
new file mode 100644
index 00000000..6473233e
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/ItemTooltipDlgBehaviour.cs
@@ -0,0 +1,12 @@
+using System;
+
+namespace XMainClient.UI
+{
+ internal class ItemTooltipDlgBehaviour : TooltipDlgBehaviour
+ {
+ protected override void Awake()
+ {
+ base.Awake();
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/ItemTooltipDlgBehaviour.cs.meta b/Client/Assets/Scripts/XMainClient/UI/ItemTooltipDlgBehaviour.cs.meta
new file mode 100644
index 00000000..e94d793b
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/ItemTooltipDlgBehaviour.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: ea9d4fd3dc44ba34d8949617e7f9e8df
+timeCreated: 1611404780
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/ItemUseListDlg.cs b/Client/Assets/Scripts/XMainClient/UI/ItemUseListDlg.cs
new file mode 100644
index 00000000..2724279f
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/ItemUseListDlg.cs
@@ -0,0 +1,107 @@
+using System;
+using System.Collections.Generic;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class ItemUseListDlg : DlgBase<ItemUseListDlg, ItemUseListDlgBehaviour>
+ {
+ public override string fileName
+ {
+ get
+ {
+ return "Hall/ShapeshiftDlg";
+ }
+ }
+
+ public override int layer
+ {
+ get
+ {
+ return 100;
+ }
+ }
+
+ public override bool autoload
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ private List<XItem> m_ItemList = null;
+
+ private ButtonClickEventHandler m_ClickHandler = null;
+
+ protected override void Init()
+ {
+ }
+
+ public override void RegisterEvent()
+ {
+ base.uiBehaviour.m_Close.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnCloseClicked));
+ base.uiBehaviour.m_WrapContent.RegisterItemUpdateEventHandler(new WrapItemUpdateEventHandler(this.OnWrapContentUpdated));
+ }
+
+ public void SetTitle(string text)
+ {
+ base.uiBehaviour.m_Title.SetText(text);
+ }
+
+ public void Set(ButtonClickEventHandler clickHandler, List<XItem> itemList)
+ {
+ bool flag = itemList == null;
+ if (!flag)
+ {
+ this.m_ItemList = itemList;
+ this.m_ClickHandler = clickHandler;
+ this.SetVisible(true, true);
+ }
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ bool flag = this.m_ItemList != null;
+ if (flag)
+ {
+ base.uiBehaviour.m_WrapContent.SetContentCount(this.m_ItemList.Count, false);
+ }
+ base.uiBehaviour.m_ScrollView.ResetPosition();
+ }
+
+ private void OnWrapContentUpdated(Transform t, int index)
+ {
+ bool flag = index < 0 || this.m_ItemList == null || index >= this.m_ItemList.Count;
+ if (!flag)
+ {
+ XItem item = this.m_ItemList[index];
+ Transform transform = t.Find("Item");
+ IXUIButton ixuibutton = t.Find("BtnUse").GetComponent("XUIButton") as IXUIButton;
+ XSingleton<XItemDrawerMgr>.singleton.DrawItem(transform.gameObject, item);
+ ixuibutton.ID = (ulong)((long)index);
+ ixuibutton.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnUseClicked));
+ }
+ }
+
+ private bool OnUseClicked(IXUIButton btn)
+ {
+ bool flag = this.m_ClickHandler != null;
+ if (flag)
+ {
+ this.m_ClickHandler(btn);
+ }
+ this.SetVisible(false, true);
+ return true;
+ }
+
+ private void OnCloseClicked(IXUISprite iSp)
+ {
+ this.SetVisible(false, true);
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/ItemUseListDlg.cs.meta b/Client/Assets/Scripts/XMainClient/UI/ItemUseListDlg.cs.meta
new file mode 100644
index 00000000..0d3714f0
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/ItemUseListDlg.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: c6e31f03d8186f340b9cb149ff4e93fa
+timeCreated: 1611404528
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/ItemUseListDlgBehaviour.cs b/Client/Assets/Scripts/XMainClient/UI/ItemUseListDlgBehaviour.cs
new file mode 100644
index 00000000..bdb166db
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/ItemUseListDlgBehaviour.cs
@@ -0,0 +1,34 @@
+using System;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+
+namespace XMainClient.UI
+{
+ internal class ItemUseListDlgBehaviour : DlgBehaviourBase
+ {
+ public IXUILabel m_Title = null;
+
+ public IXUISprite m_Bg = null;
+
+ public IXUISprite m_Close = null;
+
+ public IXUIWrapContent m_WrapContent;
+
+ public IXUIScrollView m_ScrollView;
+
+ private void Awake()
+ {
+ Transform transform = base.transform.Find("Bg/Title/Label");
+ this.m_Title = (transform.GetComponent("XUILabel") as IXUILabel);
+ transform = base.transform.Find("Bg/Close");
+ this.m_Close = (transform.GetComponent("XUISprite") as IXUISprite);
+ transform = base.transform.Find("Bg");
+ this.m_Bg = (transform.GetComponent("XUISprite") as IXUISprite);
+ transform = base.transform.Find("Bg/ScrollView");
+ this.m_ScrollView = (transform.GetComponent("XUIScrollView") as IXUIScrollView);
+ transform = base.transform.Find("Bg/ScrollView/WrapContent");
+ this.m_WrapContent = (transform.GetComponent("XUIWrapContent") as IXUIWrapContent);
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/ItemUseListDlgBehaviour.cs.meta b/Client/Assets/Scripts/XMainClient/UI/ItemUseListDlgBehaviour.cs.meta
new file mode 100644
index 00000000..9c529da4
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/ItemUseListDlgBehaviour.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: c2c158d423cdcea438d7e7a3366575f1
+timeCreated: 1611404495
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/JadeBagHandler.cs b/Client/Assets/Scripts/XMainClient/UI/JadeBagHandler.cs
new file mode 100644
index 00000000..7d127e15
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/JadeBagHandler.cs
@@ -0,0 +1,172 @@
+using System;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class JadeBagHandler : DlgHandlerBase
+ {
+ private XItemMorePowerfulTipMgr powerfullMgr
+ {
+ get
+ {
+ return DlgBase<ItemSystemDlg, TabDlgBehaviour>.singleton.RedPointMgr;
+ }
+ }
+
+ protected override string FileName
+ {
+ get
+ {
+ return "ItemNew/JadeListPanel";
+ }
+ }
+
+ private XJadeDocument _doc = null;
+
+ private IXUIWrapContent m_WrapContent;
+
+ private IXUIScrollView m_ScrollView;
+
+ private IXUISprite m_Close;
+
+ private IXUILabel m_Limit;
+
+ private ulong m_TargetJadeUID = 0UL;
+
+ protected override void Init()
+ {
+ base.Init();
+ this._doc = XDocuments.GetSpecificDocument<XJadeDocument>(XJadeDocument.uuID);
+ this.m_WrapContent = (base.PanelObject.transform.Find("BagPanel/WrapContent").GetComponent("XUIWrapContent") as IXUIWrapContent);
+ this.m_ScrollView = (base.PanelObject.transform.Find("BagPanel").GetComponent("XUIScrollView") as IXUIScrollView);
+ this.m_Close = (base.PanelObject.transform.Find("Close").GetComponent("XUISprite") as IXUISprite);
+ this.m_Limit = (base.PanelObject.transform.Find("Limit").GetComponent("XUILabel") as IXUILabel);
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ this.m_WrapContent.RegisterItemUpdateEventHandler(new WrapItemUpdateEventHandler(this._OnBagWrapContentUpdated));
+ this.m_Close.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this._OnCloseClicked));
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ this.RefreshData();
+ this._doc.NewItems.bCanClear = true;
+ }
+
+ protected override void OnHide()
+ {
+ this.powerfullMgr.ReturnAll();
+ this._doc.NewItems.TryClear();
+ base.OnHide();
+ }
+
+ public override void OnUnload()
+ {
+ this.powerfullMgr.Unload();
+ base.OnUnload();
+ }
+
+ public override void StackRefresh()
+ {
+ base.StackRefresh();
+ this.RefreshData();
+ }
+
+ public override void RefreshData()
+ {
+ base.RefreshData();
+ this.m_WrapContent.SetContentCount(this._doc.SelectedSlotItemList.Count, false);
+ this.m_ScrollView.ResetPosition();
+ bool flag = XSingleton<XAttributeMgr>.singleton.XPlayerData != null;
+ if (flag)
+ {
+ int level = (int)XSingleton<XAttributeMgr>.singleton.XPlayerData.Level;
+ int num = this._doc.EquipLevel2JadeLevel(level);
+ this.m_Limit.SetText(XStringDefineProxy.GetString("JADE_LEVEL_REQUIREMENT", new object[]
+ {
+ level.ToString(),
+ num.ToString()
+ }));
+ }
+ else
+ {
+ this.m_Limit.SetText(string.Empty);
+ }
+ }
+
+ private void _OnBagWrapContentUpdated(Transform t, int index)
+ {
+ bool flag = index < 0 || index >= this._doc.SelectedSlotItemList.Count;
+ if (!flag)
+ {
+ XEquipItem xequipItem = XSingleton<XGame>.singleton.Doc.XBagDoc.GetItemByUID(this._doc.selectedEquip) as XEquipItem;
+ bool flag2 = xequipItem == null;
+ if (!flag2)
+ {
+ EquipList.RowData equipConf = XBagDocument.GetEquipConf(xequipItem.itemID);
+ bool flag3 = equipConf == null;
+ if (!flag3)
+ {
+ XJadeItem xjadeItem = this._doc.SelectedSlotItemList[index] as XJadeItem;
+ JadeEquipHandler.DrawJadeWithAttr(t.gameObject, this._doc.GetSlot(equipConf.EquipPos, this._doc.selectedSlotIndex), xjadeItem, 0u);
+ IXUISprite ixuisprite = t.GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.ID = (ulong)((long)index);
+ ixuisprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this._OnBagJadeClicked));
+ IXUISprite ixuisprite2 = t.Find("JadeTpl/Icon").GetComponent("XUISprite") as IXUISprite;
+ bool flag4 = this._doc.CanBeMorePowerful(xequipItem, this._doc.selectedSlotIndex, xjadeItem);
+ if (flag4)
+ {
+ this.powerfullMgr.SetTip(ixuisprite2);
+ }
+ else
+ {
+ this.powerfullMgr.ReturnInstance(ixuisprite2);
+ }
+ t.name = XSingleton<XCommon>.singleton.StringCombine("jade", xjadeItem.itemID.ToString());
+ }
+ }
+ }
+ }
+
+ private void _OnBagJadeClicked(IXUISprite iSp)
+ {
+ int num = (int)iSp.ID;
+ bool flag = num < 0 || num >= this._doc.SelectedSlotItemList.Count;
+ if (!flag)
+ {
+ XItem xitem = this._doc.SelectedSlotItemList[num];
+ this.m_TargetJadeUID = xitem.uid;
+ bool bBinding = xitem.bBinding;
+ if (bBinding)
+ {
+ this._doc.ReqPutOnJade(this.m_TargetJadeUID);
+ base.SetVisible(false);
+ }
+ else
+ {
+ XSingleton<UiUtility>.singleton.ShowModalDialog(XStringDefineProxy.GetString("BINDING_CONFIRM"), XStringDefineProxy.GetString("COMMON_OK"), XStringDefineProxy.GetString("COMMON_CANCEL"), new ButtonClickEventHandler(this._Equip));
+ }
+ }
+ }
+
+ private bool _Equip(IXUIButton btn)
+ {
+ this._doc.ReqPutOnJade(this.m_TargetJadeUID);
+ XSingleton<UiUtility>.singleton.CloseModalDlg();
+ base.SetVisible(false);
+ return true;
+ }
+
+ private void _OnCloseClicked(IXUISprite iSp)
+ {
+ base.SetVisible(false);
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/JadeBagHandler.cs.meta b/Client/Assets/Scripts/XMainClient/UI/JadeBagHandler.cs.meta
new file mode 100644
index 00000000..0751c584
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/JadeBagHandler.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: b4f93ff375f0fe145998935bee98c68c
+timeCreated: 1611404394
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/JadeComposeFrameHandler.cs b/Client/Assets/Scripts/XMainClient/UI/JadeComposeFrameHandler.cs
new file mode 100644
index 00000000..8f1fd396
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/JadeComposeFrameHandler.cs
@@ -0,0 +1,481 @@
+using System;
+using System.Collections.Generic;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class JadeComposeFrameHandler : DlgHandlerBase
+ {
+ protected override string FileName
+ {
+ get
+ {
+ return "ItemNew/JadeComposeFrame";
+ }
+ }
+
+ private XJadeDocument m_doc = null;
+
+ private IXUIButton m_closedBtn;
+
+ private IXUIButton m_composeBtn;
+
+ private IXUIButton m_reduceBtn;
+
+ private IXUIButton m_addBtn;
+
+ private IXUILabel m_costLab;
+
+ private IXUILabel m_costMallLab;
+
+ private IXUILabel m_lackJadTipsLab;
+
+ private GameObject m_sourceJade;
+
+ private GameObject m_targetJade;
+
+ private GameObject m_hadShopPos;
+
+ private GameObject m_noShopPos;
+
+ private GameObject m_shopPos;
+
+ private Transform m_effectParentTra;
+
+ private XUIPool m_jadeTplPool1 = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ private XUIPool m_jadeTplPool2 = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ private XFx m_fx = null;
+
+ private int m_type = 0;
+
+ private ulong m_jadeUid = 0UL;
+
+ private uint m_itemId = 0u;
+
+ private uint m_curLevel = 0u;
+
+ private uint m_addLevel = 0u;
+
+ private ulong m_needGold = 0UL;
+
+ private uint m_needMall = 0u;
+
+ private float m_delayTime = 0.3f;
+
+ private uint m_token = 0u;
+
+ private bool m_isNeedPlayEffect = false;
+
+ private bool m_effectIsEnd = true;
+
+ private float m_coolTime = 0.5f;
+
+ private float m_fLastClickBtnTime = 0f;
+
+ protected override void Init()
+ {
+ base.Init();
+ this.m_doc = XDocuments.GetSpecificDocument<XJadeDocument>(XJadeDocument.uuID);
+ this.m_closedBtn = (base.PanelObject.transform.Find("ComposeMenu/Close").GetComponent("XUIButton") as IXUIButton);
+ this.m_composeBtn = (base.PanelObject.transform.Find("ComposeMenu/BtnCompose").GetComponent("XUIButton") as IXUIButton);
+ this.m_reduceBtn = (base.PanelObject.transform.Find("ComposeMenu/minus1").GetComponent("XUIButton") as IXUIButton);
+ this.m_addBtn = (base.PanelObject.transform.Find("ComposeMenu/add1").GetComponent("XUIButton") as IXUIButton);
+ this.m_costLab = (base.PanelObject.transform.Find("ComposeMenu/Cost").GetComponent("XUILabel") as IXUILabel);
+ this.m_costMallLab = (base.PanelObject.transform.Find("ComposeMenu/CostMall").GetComponent("XUILabel") as IXUILabel);
+ this.m_lackJadTipsLab = (base.PanelObject.transform.Find("ComposeMenu/CostJade/Tip").GetComponent("XUILabel") as IXUILabel);
+ this.m_sourceJade = base.PanelObject.transform.Find("ComposeMenu/SourceJade/JadeTpl").gameObject;
+ this.m_targetJade = base.PanelObject.transform.Find("ComposeMenu/TargetJade/JadeTpl").gameObject;
+ this.m_effectParentTra = base.PanelObject.transform.Find("ComposeMenu/Effect");
+ Transform transform = base.PanelObject.transform.Find("ComposeMenu/CostJade");
+ this.m_hadShopPos = transform.Find("Pos1/Panel").gameObject;
+ this.m_noShopPos = transform.Find("Pos2/Panel").gameObject;
+ this.m_shopPos = transform.Find("Shop").gameObject;
+ this.m_jadeTplPool1.SetupPool(transform.gameObject, transform.Find("Pos1/Panel/JadeTpl1").gameObject, 1u, false);
+ this.m_jadeTplPool2.SetupPool(transform.gameObject, transform.Find("Pos2/Panel/JadeTpl2").gameObject, 1u, false);
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ this.m_closedBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnClickClosed));
+ this.m_composeBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnClickComposed));
+ this.m_reduceBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnClickReduceBtn));
+ this.m_addBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnClickAddBtn));
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ this.m_effectIsEnd = true;
+ this.m_isNeedPlayEffect = false;
+ this.FillContent();
+ }
+
+ protected override void OnHide()
+ {
+ this.m_jadeTplPool1.ReturnAll(true);
+ this.m_jadeTplPool2.ReturnAll(true);
+ XSingleton<XTimerMgr>.singleton.KillTimer(this.m_token);
+ bool flag = this.m_fx != null;
+ if (flag)
+ {
+ XSingleton<XFxMgr>.singleton.DestroyFx(this.m_fx, true);
+ this.m_fx = null;
+ }
+ this.m_effectIsEnd = true;
+ base.OnHide();
+ }
+
+ public override void OnUnload()
+ {
+ base.OnUnload();
+ this.m_effectIsEnd = true;
+ bool flag = this.m_fx != null;
+ if (flag)
+ {
+ XSingleton<XFxMgr>.singleton.DestroyFx(this.m_fx, true);
+ this.m_fx = null;
+ }
+ }
+
+ public override void RefreshData()
+ {
+ base.RefreshData();
+ }
+
+ public override void StackRefresh()
+ {
+ base.StackRefresh();
+ }
+
+ public void ShowUi(int type, uint sourceItemId, uint curJadeLevel, ulong uid = 0UL)
+ {
+ this.m_type = type;
+ this.m_itemId = sourceItemId;
+ this.m_curLevel = curJadeLevel;
+ this.m_jadeUid = uid;
+ this.m_addLevel = 1u;
+ this.m_isNeedPlayEffect = true;
+ bool flag = base.IsVisible();
+ if (flag)
+ {
+ this.FillContent();
+ }
+ else
+ {
+ base.SetVisible(true);
+ }
+ }
+
+ private void FillContent()
+ {
+ bool isNeedPlayEffect = this.m_isNeedPlayEffect;
+ if (isNeedPlayEffect)
+ {
+ this.PlayEffect();
+ this.m_isNeedPlayEffect = false;
+ }
+ else
+ {
+ XSingleton<XItemDrawerMgr>.singleton.jadeItemDrawer.DrawItem(this.m_sourceJade, (int)this.m_itemId, 1, false);
+ IXUISprite ixuisprite = this.m_sourceJade.transform.Find("Icon/Icon").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.ID = (ulong)this.m_itemId;
+ ixuisprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnSelectedItemClicked));
+ this.FillChangedItem();
+ }
+ }
+
+ private void FillChangedItem()
+ {
+ bool flag = XSingleton<XAttributeMgr>.singleton.XPlayerData == null;
+ if (!flag)
+ {
+ int num = this.m_doc.JadeLevelToMosaicLevel(this.m_curLevel + this.m_addLevel);
+ bool flag2 = num == -1 || (long)num > (long)((ulong)XSingleton<XAttributeMgr>.singleton.XPlayerData.Level);
+ if (flag2)
+ {
+ this.m_addLevel = 0u;
+ }
+ uint targetItemId = this.m_doc.GetTargetItemId(this.m_itemId, this.m_addLevel);
+ this.m_doc.TargetItemId = targetItemId;
+ bool flag3 = targetItemId == 0u;
+ if (!flag3)
+ {
+ XSingleton<XItemDrawerMgr>.singleton.jadeItemDrawer.DrawItem(this.m_targetJade, (int)targetItemId, 1, false);
+ IXUISprite ixuisprite = this.m_targetJade.transform.Find("Icon/Icon").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.ID = (ulong)targetItemId;
+ ixuisprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnSelectedItemClicked));
+ List<XTuple<uint, uint>> list;
+ XTuple<uint, uint> xtuple;
+ bool needItems = this.m_doc.GetNeedItems(targetItemId, this.m_itemId, this.m_type, out list, out xtuple, out this.m_needGold, out this.m_needMall);
+ ulong virtualItemCount = XBagDocument.BagDoc.GetVirtualItemCount(ItemEnum.GOLD);
+ bool flag4 = this.m_needGold > virtualItemCount;
+ if (flag4)
+ {
+ this.m_costLab.SetText(string.Format("[ff0000]{0}[-]", this.m_needGold));
+ }
+ else
+ {
+ this.m_costLab.SetText(this.m_needGold.ToString());
+ }
+ this.m_jadeTplPool1.ReturnAll(true);
+ this.m_jadeTplPool2.ReturnAll(true);
+ bool flag5 = needItems;
+ GameObject gameObject2;
+ if (flag5)
+ {
+ this.m_costMallLab.gameObject.SetActive(true);
+ this.m_lackJadTipsLab.gameObject.SetActive(true);
+ virtualItemCount = XBagDocument.BagDoc.GetVirtualItemCount(ItemEnum.DRAGON_COIN);
+ bool flag6 = (ulong)this.m_needMall > virtualItemCount;
+ if (flag6)
+ {
+ this.m_costMallLab.SetText(string.Format("[ff0000]{0}[-]", this.m_needMall));
+ }
+ else
+ {
+ this.m_costMallLab.SetText(this.m_needMall.ToString());
+ }
+ this.m_lackJadTipsLab.SetText(string.Format(XSingleton<XStringTable>.singleton.GetString("NeedBuyOtherJade"), xtuple.Item2));
+ this.m_shopPos.SetActive(true);
+ GameObject gameObject = this.m_shopPos.transform.Find("JadeTpl").gameObject;
+ XSingleton<XItemDrawerMgr>.singleton.jadeItemDrawer.DrawItem(gameObject, (int)xtuple.Item1, (int)xtuple.Item2, false);
+ ixuisprite = (gameObject.transform.Find("Icon/Icon").GetComponent("XUISprite") as IXUISprite);
+ ixuisprite.ID = (ulong)xtuple.Item1;
+ ixuisprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnSelectedItemClicked));
+ this.m_noShopPos.transform.parent.gameObject.SetActive(false);
+ this.m_hadShopPos.transform.parent.gameObject.SetActive(true);
+ gameObject2 = this.m_hadShopPos;
+ for (int i = 0; i < list.Count; i++)
+ {
+ gameObject = this.m_jadeTplPool1.FetchGameObject(false);
+ gameObject.transform.parent = gameObject2.transform;
+ gameObject.transform.localScale = Vector3.one;
+ gameObject.transform.localPosition = new Vector3((float)(i * this.m_jadeTplPool1.TplWidth), 0f, 0f);
+ XSingleton<XItemDrawerMgr>.singleton.jadeItemDrawer.DrawItem(gameObject, (int)list[i].Item1, (int)list[i].Item2, false);
+ ixuisprite = (gameObject.transform.Find("Icon/Icon").GetComponent("XUISprite") as IXUISprite);
+ ixuisprite.ID = (ulong)list[i].Item1;
+ ixuisprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnSelectedItemClicked));
+ }
+ }
+ else
+ {
+ this.m_shopPos.SetActive(false);
+ this.m_costMallLab.gameObject.SetActive(false);
+ this.m_lackJadTipsLab.gameObject.SetActive(false);
+ this.m_hadShopPos.transform.parent.gameObject.SetActive(false);
+ this.m_noShopPos.transform.parent.gameObject.SetActive(true);
+ gameObject2 = this.m_noShopPos;
+ for (int j = 0; j < list.Count; j++)
+ {
+ GameObject gameObject = this.m_jadeTplPool2.FetchGameObject(false);
+ gameObject.transform.parent = gameObject2.transform;
+ gameObject.transform.localScale = Vector3.one;
+ gameObject.transform.localPosition = new Vector3((float)(j * this.m_jadeTplPool2.TplWidth), 0f, 0f);
+ XSingleton<XItemDrawerMgr>.singleton.jadeItemDrawer.DrawItem(gameObject, (int)list[j].Item1, (int)list[j].Item2, false);
+ ixuisprite = (gameObject.transform.Find("Icon/Icon").GetComponent("XUISprite") as IXUISprite);
+ ixuisprite.ID = (ulong)list[j].Item1;
+ ixuisprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnSelectedItemClicked));
+ }
+ }
+ gameObject2.SetActive(false);
+ gameObject2.SetActive(true);
+ }
+ }
+ }
+
+ private void PlayEffect()
+ {
+ this.m_effectIsEnd = false;
+ bool flag = this.m_fx == null;
+ if (flag)
+ {
+ this.m_fx = XSingleton<XFxMgr>.singleton.CreateUIFx("Effects/FX_Particle/UIfx/UI_lyqh_02", this.m_effectParentTra, false);
+ }
+ else
+ {
+ this.m_fx.Play();
+ }
+ XSingleton<XTimerMgr>.singleton.KillTimer(this.m_token);
+ this.m_token = XSingleton<XTimerMgr>.singleton.SetTimer(this.m_delayTime, new XTimerMgr.ElapsedEventHandler(this.DelayFill), null);
+ }
+
+ private void DelayFill(object o = null)
+ {
+ XSingleton<XItemDrawerMgr>.singleton.jadeItemDrawer.DrawItem(this.m_sourceJade, (int)this.m_itemId, 1, false);
+ this.FillChangedItem();
+ this.m_effectIsEnd = true;
+ }
+
+ private bool OnClickClosed(IXUIButton btn)
+ {
+ base.SetVisible(false);
+ return true;
+ }
+
+ private bool OnClickComposed(IXUIButton btn)
+ {
+ bool flag = !this.m_effectIsEnd;
+ bool result;
+ if (flag)
+ {
+ result = false;
+ }
+ else
+ {
+ bool flag2 = this.SetButtonCool(this.m_coolTime);
+ if (flag2)
+ {
+ result = false;
+ }
+ else
+ {
+ bool flag3 = this.m_addLevel == 0u;
+ if (flag3)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XSingleton<XStringTable>.singleton.GetString("JadeHadCurMax"), "fece00");
+ result = false;
+ }
+ else
+ {
+ ulong virtualItemCount = XBagDocument.BagDoc.GetVirtualItemCount(ItemEnum.GOLD);
+ bool flag4 = virtualItemCount < this.m_needGold;
+ if (flag4)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XSingleton<XStringTable>.singleton.GetString("ERR_LACKCOIN"), "fece00");
+ result = false;
+ }
+ else
+ {
+ virtualItemCount = XBagDocument.BagDoc.GetVirtualItemCount(ItemEnum.DRAGON_COIN);
+ bool flag5 = virtualItemCount < (ulong)this.m_needMall;
+ if (flag5)
+ {
+ DlgBase<XPurchaseView, XPurchaseBehaviour>.singleton.ReqQuickCommonPurchase(ItemEnum.DRAGON_COIN);
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XSingleton<XStringTable>.singleton.GetString("ERR_AUCT_DRAGONCOINLESS"), "fece00");
+ result = false;
+ }
+ else
+ {
+ bool flag6 = this.m_needMall > 0u;
+ if (flag6)
+ {
+ string message = string.Format(XSingleton<UiUtility>.singleton.ReplaceReturn(XSingleton<XStringTable>.singleton.GetString("JadeComposeTips")), this.m_needMall);
+ XSingleton<UiUtility>.singleton.ShowModalDialog(message, new ButtonClickEventHandler(this.DoOK));
+ }
+ else
+ {
+ bool flag7 = this.m_type == -1;
+ if (flag7)
+ {
+ this.m_doc.ReqComposeJade(this.m_jadeUid, this.m_addLevel);
+ }
+ else
+ {
+ this.m_doc.ReqUpdateJade((uint)this.m_type, this.m_addLevel);
+ }
+ }
+ result = true;
+ }
+ }
+ }
+ }
+ }
+ return result;
+ }
+
+ private bool DoOK(IXUIButton btn)
+ {
+ XSingleton<UiUtility>.singleton.CloseModalDlg();
+ bool flag = this.m_type == -1;
+ if (flag)
+ {
+ this.m_doc.ReqComposeJade(this.m_jadeUid, this.m_addLevel);
+ }
+ else
+ {
+ this.m_doc.ReqUpdateJade((uint)this.m_type, this.m_addLevel);
+ }
+ return true;
+ }
+
+ private bool OnClickReduceBtn(IXUIButton btn)
+ {
+ bool flag = this.m_addLevel <= 1u;
+ bool result;
+ if (flag)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XSingleton<XStringTable>.singleton.GetString("JadeHadLeast"), "fece00");
+ result = false;
+ }
+ else
+ {
+ this.m_addLevel -= 1u;
+ this.FillChangedItem();
+ result = true;
+ }
+ return result;
+ }
+
+ private bool OnClickAddBtn(IXUIButton btn)
+ {
+ bool flag = XSingleton<XAttributeMgr>.singleton.XPlayerData == null;
+ bool result;
+ if (flag)
+ {
+ result = false;
+ }
+ else
+ {
+ int num = this.m_doc.JadeLevelToMosaicLevel(this.m_curLevel + this.m_addLevel + 1u);
+ bool flag2 = num == -1 || (long)num > (long)((ulong)XSingleton<XAttributeMgr>.singleton.XPlayerData.Level);
+ if (flag2)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XSingleton<XStringTable>.singleton.GetString("JadeHadCurMax"), "fece00");
+ result = false;
+ }
+ else
+ {
+ this.m_addLevel += 1u;
+ this.FillChangedItem();
+ result = true;
+ }
+ }
+ return result;
+ }
+
+ private void OnSelectedItemClicked(IXUISprite iSp)
+ {
+ ulong id = iSp.ID;
+ XItem xitem = XSingleton<XGame>.singleton.Doc.XBagDoc.GetItemByUID(id);
+ bool flag = xitem == null;
+ if (flag)
+ {
+ xitem = XBagDocument.MakeXItem((int)id, false);
+ }
+ XSingleton<UiUtility>.singleton.ShowTooltipDialog(xitem, null, iSp, false, 0u);
+ }
+
+ private bool SetButtonCool(float time)
+ {
+ float num = Time.realtimeSinceStartup - this.m_fLastClickBtnTime;
+ bool flag = num < time;
+ bool result;
+ if (flag)
+ {
+ result = true;
+ }
+ else
+ {
+ this.m_fLastClickBtnTime = Time.realtimeSinceStartup;
+ result = false;
+ }
+ return result;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/JadeComposeFrameHandler.cs.meta b/Client/Assets/Scripts/XMainClient/UI/JadeComposeFrameHandler.cs.meta
new file mode 100644
index 00000000..3017e986
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/JadeComposeFrameHandler.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 0949722b15e1c8144bc00ce70e853204
+timeCreated: 1611403153
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/JadeComposeHandler.cs b/Client/Assets/Scripts/XMainClient/UI/JadeComposeHandler.cs
new file mode 100644
index 00000000..1adb2fab
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/JadeComposeHandler.cs
@@ -0,0 +1,329 @@
+using System;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class JadeComposeHandler : DlgHandlerBase
+ {
+ protected override string FileName
+ {
+ get
+ {
+ return "ItemNew/JadeComposePanel";
+ }
+ }
+
+ private XJadeDocument _doc = null;
+
+ public GameObject m_ComposeMenu;
+
+ public IXUIButton m_BtnComposeOne;
+
+ public IXUILabel m_ComposeMenuTitle;
+
+ public IXUILabel m_ComposeCost;
+
+ public uint BtnComposeID;
+
+ public IXUIButton m_BtnCompose;
+
+ public IXUICheckBox m_ComposeMax;
+
+ public IXUICheckBox m_ComposeOne;
+
+ public GameObject m_IconComposeSource;
+
+ public GameObject m_IconComposeTarget;
+
+ private int _sourceID;
+
+ private int _sourceCount;
+
+ private int _requiredCount;
+
+ private int _targetID;
+
+ private int _sourceBindCount;
+
+ private int _useCount;
+
+ protected override void Init()
+ {
+ base.Init();
+ this._doc = XDocuments.GetSpecificDocument<XJadeDocument>(XJadeDocument.uuID);
+ this.m_ComposeMenu = base.PanelObject.transform.Find("ComposeMenu").gameObject;
+ this.m_IconComposeSource = this.m_ComposeMenu.transform.Find("SourceJade/JadeTpl").gameObject;
+ this.m_IconComposeTarget = this.m_ComposeMenu.transform.Find("TargetJade/JadeTpl").gameObject;
+ this.m_ComposeCost = (this.m_ComposeMenu.transform.Find("Cost").GetComponent("XUILabel") as IXUILabel);
+ this.m_BtnComposeOne = (this.m_ComposeMenu.transform.Find("BtnComposeOne").GetComponent("XUIButton") as IXUIButton);
+ this.m_BtnCompose = (this.m_ComposeMenu.transform.Find("BtnCompose").GetComponent("XUIButton") as IXUIButton);
+ this.m_ComposeMax = (this.m_ComposeMenu.transform.Find("ComposeMax").GetComponent("XUICheckBox") as IXUICheckBox);
+ this.m_ComposeOne = (this.m_ComposeMenu.transform.Find("ComposeOne").GetComponent("XUICheckBox") as IXUICheckBox);
+ this.m_ComposeMenuTitle = (this.m_ComposeMenu.transform.Find("Title").GetComponent("XUILabel") as IXUILabel);
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ this.m_BtnComposeOne.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnComposeJadeEquipClicked));
+ this.m_BtnCompose.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnOnComposeJadeBagClicked));
+ this.m_ComposeMax.RegisterOnCheckEventHandler(new CheckBoxOnCheckEventHandler(this.OnComposeMaxCheckBoxClicked));
+ this.m_ComposeOne.RegisterOnCheckEventHandler(new CheckBoxOnCheckEventHandler(this.OnComposeOneCheckBoxClicked));
+ IXUIButton ixuibutton = this.m_ComposeMenu.transform.Find("Close").GetComponent("XUIButton") as IXUIButton;
+ ixuibutton.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnComposeCloseClicked));
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ this.RefreshData();
+ }
+
+ public override void RefreshData()
+ {
+ base.RefreshData();
+ }
+
+ private void _OnCloseClicked(IXUISprite iSp)
+ {
+ base.SetVisible(false);
+ }
+
+ public void ToggleComposeMenu(bool open, int type = 0, int sourceID = 0, int sourceCount = 0, int requiredCount = 0, int targetID = 0, int sourceBindCount = -1)
+ {
+ base.SetVisible(open);
+ if (open)
+ {
+ this._sourceID = sourceID;
+ this._sourceCount = sourceCount;
+ this._requiredCount = requiredCount;
+ this._targetID = targetID;
+ this._sourceBindCount = sourceBindCount;
+ bool flag = type == -1;
+ if (flag)
+ {
+ this.m_ComposeMax.gameObject.SetActive(true);
+ this.m_ComposeOne.gameObject.SetActive(true);
+ this.m_BtnCompose.gameObject.SetActive(true);
+ this.m_BtnComposeOne.gameObject.SetActive(false);
+ this.DrawComposeItem(true);
+ this.m_ComposeMax.bChecked = true;
+ this.m_BtnCompose.ID = 1UL;
+ }
+ else
+ {
+ bool flag2 = type >= 0;
+ if (flag2)
+ {
+ this.m_ComposeMax.gameObject.SetActive(false);
+ this.m_ComposeOne.gameObject.SetActive(false);
+ this.m_BtnCompose.gameObject.SetActive(false);
+ this.m_BtnComposeOne.gameObject.SetActive(true);
+ this.DrawComposeItem(false);
+ this.m_BtnComposeOne.ID = (ulong)((long)type);
+ }
+ }
+ }
+ }
+
+ protected bool OnComposeCloseClicked(IXUIButton btn)
+ {
+ this.ToggleComposeMenu(false, 0, 0, 0, 0, 0, -1);
+ return true;
+ }
+
+ protected bool OnComposeJadeEquipClicked(IXUIButton btn)
+ {
+ this.ToggleComposeMenu(false, 0, 0, 0, 0, 0, -1);
+ return true;
+ }
+
+ private bool _Compose(IXUIButton btn)
+ {
+ bool flag = this.BtnComposeID == 1u;
+ if (flag)
+ {
+ this.ToggleComposeMenu(false, 0, 0, 0, 0, 0, -1);
+ }
+ XSingleton<UiUtility>.singleton.CloseModalDlg();
+ return true;
+ }
+
+ private bool _NoCompose(IXUIButton btn)
+ {
+ return true;
+ }
+
+ protected bool OnOnComposeJadeBagClicked(IXUIButton btn)
+ {
+ this.BtnComposeID = (uint)btn.ID;
+ bool flag = false;
+ bool flag2 = false;
+ XJadeDocument specificDocument = XDocuments.GetSpecificDocument<XJadeDocument>(XJadeDocument.uuID);
+ JadeTable.RowData byJadeID = specificDocument.jadeTable.GetByJadeID((uint)this._sourceID);
+ bool flag3 = XSingleton<XAttributeMgr>.singleton.XPlayerData == null;
+ bool result;
+ if (flag3)
+ {
+ result = false;
+ }
+ else
+ {
+ uint level = XSingleton<XAttributeMgr>.singleton.XPlayerData.Level;
+ int num = specificDocument.JadeLevelToMosaicLevel(byJadeID.JadeLevel + 1u);
+ bool flag4 = (long)num > (long)((ulong)level) && !DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.GetTempTip(XTempTipDefine.OD_JADE_UPGRADE_NO_EQUIP);
+ if (flag4)
+ {
+ flag2 = true;
+ }
+ bool flag5 = this._sourceBindCount < this._useCount && this._sourceBindCount < this._sourceCount && this._useCount <= this._sourceCount && !DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.GetTempTip(XTempTipDefine.OD_JADE_UPGRADE_NO_BIND);
+ if (flag5)
+ {
+ flag = true;
+ }
+ bool flag6 = flag2 && !flag;
+ if (flag6)
+ {
+ XSingleton<UiUtility>.singleton.ShowModalDialog(string.Format(XStringDefineProxy.GetString("JADE_COMPOSE_TIP_EQUIP"), num), XStringDefineProxy.GetString("COMMON_OK"), XStringDefineProxy.GetString("COMMON_CANCEL"), new ButtonClickEventHandler(this._Compose), null, false, XTempTipDefine.OD_JADE_UPGRADE_NO_EQUIP, 50);
+ result = false;
+ }
+ else
+ {
+ bool flag7 = !flag2 && flag;
+ if (flag7)
+ {
+ XSingleton<UiUtility>.singleton.ShowModalDialog(string.Format(XStringDefineProxy.GetString("JADE_COMPOSE_TIP_BIND"), new object[0]), XStringDefineProxy.GetString("COMMON_OK"), XStringDefineProxy.GetString("COMMON_CANCEL"), new ButtonClickEventHandler(this._Compose), null, false, XTempTipDefine.OD_JADE_UPGRADE_NO_BIND, 50);
+ result = false;
+ }
+ else
+ {
+ bool flag8 = flag2 && flag;
+ if (flag8)
+ {
+ XSingleton<UiUtility>.singleton.ShowModalDialog(string.Format(XStringDefineProxy.GetString("JADE_COMPOSE_TIP_BIND_EQUIP"), num), XStringDefineProxy.GetString("COMMON_OK"), XStringDefineProxy.GetString("COMMON_CANCEL"), new ButtonClickEventHandler(this._Compose));
+ result = false;
+ }
+ else
+ {
+ bool flag9 = this.BtnComposeID == 1u;
+ if (flag9)
+ {
+ this.ToggleComposeMenu(false, 0, 0, 0, 0, 0, -1);
+ }
+ result = true;
+ }
+ }
+ }
+ }
+ return result;
+ }
+
+ protected bool OnComposeAllClicked(IXUIButton btn)
+ {
+ XSingleton<UiUtility>.singleton.ShowModalDialog(XStringDefineProxy.GetString("JADE_DIALOG_COMPOSE_ALL"), XStringDefineProxy.GetString("COMMON_OK"), XStringDefineProxy.GetString("COMMON_CANCEL"), new ButtonClickEventHandler(this._DoComposeAll));
+ return true;
+ }
+
+ private bool _DoComposeAll(IXUIButton btn)
+ {
+ DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.SetVisible(false, true);
+ return true;
+ }
+
+ private bool OnComposeOneCheckBoxClicked(IXUICheckBox box)
+ {
+ bool flag = !box.bChecked;
+ bool result;
+ if (flag)
+ {
+ result = false;
+ }
+ else
+ {
+ this.m_BtnCompose.ID = 0UL;
+ this.DrawComposeItem(false);
+ result = true;
+ }
+ return result;
+ }
+
+ private bool OnComposeMaxCheckBoxClicked(IXUICheckBox box)
+ {
+ bool flag = !box.bChecked;
+ bool result;
+ if (flag)
+ {
+ result = false;
+ }
+ else
+ {
+ this.m_BtnCompose.ID = 1UL;
+ this.DrawComposeItem(true);
+ result = true;
+ }
+ return result;
+ }
+
+ private bool DrawComposeItem(bool isAll)
+ {
+ int num2;
+ int num3;
+ if (isAll)
+ {
+ bool flag = this._requiredCount == 0;
+ if (flag)
+ {
+ XSingleton<XDebug>.singleton.AddErrorLog("Jade RequiredCount Is 0", null, null, null, null, null);
+ }
+ int num = this._sourceCount / this._requiredCount;
+ bool flag2 = num == 0;
+ if (flag2)
+ {
+ num = 1;
+ }
+ num2 = num * this._requiredCount;
+ num3 = num;
+ this._useCount = num2;
+ }
+ else
+ {
+ num2 = this._requiredCount;
+ num3 = 1;
+ this._useCount = num2;
+ }
+ JadeTable.RowData byJadeID = this._doc.jadeTable.GetByJadeID((uint)this._sourceID);
+ bool flag3 = (ulong)byJadeID.JadeLevel < (ulong)((long)this._doc.JadeLevelUpCost.Length);
+ if (flag3)
+ {
+ int num4 = this._doc.JadeLevelUpCost[(int)byJadeID.JadeLevel] * num3;
+ this.m_ComposeCost.SetText(num4.ToString());
+ }
+ else
+ {
+ this.m_ComposeCost.SetText("");
+ XSingleton<XDebug>.singleton.AddErrorLog("Jade Level Up Cost No Find!\nJade Level:" + byJadeID.JadeLevel + 1, null, null, null, null, null);
+ }
+ XSingleton<XItemDrawerMgr>.singleton.jadeItemDrawer.DrawItem(this.m_IconComposeSource, this._sourceID, num2, true, this._sourceCount);
+ XSingleton<XItemDrawerMgr>.singleton.jadeItemDrawer.DrawItem(this.m_IconComposeTarget, this._targetID, num3, true);
+ XJadeItem jade = XBagDocument.MakeXItem(this._sourceID, false) as XJadeItem;
+ XJadeItem jade2 = XBagDocument.MakeXItem(this._targetID, false) as XJadeItem;
+ JadeEquipHandler.DrawAttr(this.m_IconComposeSource.gameObject.transform.parent.gameObject, jade);
+ JadeEquipHandler.DrawAttr(this.m_IconComposeTarget.gameObject.transform.parent.gameObject, jade2);
+ return true;
+ }
+
+ public void RefreshComposeItem()
+ {
+ bool activeSelf = this.m_ComposeMenu.activeSelf;
+ if (activeSelf)
+ {
+ this._sourceCount = (int)XBagDocument.BagDoc.GetItemCount(this._sourceID);
+ this._sourceBindCount = (int)XBagDocument.BagDoc.GetItemCount(this._sourceID, true);
+ this.DrawComposeItem(false);
+ }
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/JadeComposeHandler.cs.meta b/Client/Assets/Scripts/XMainClient/UI/JadeComposeHandler.cs.meta
new file mode 100644
index 00000000..4d38331f
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/JadeComposeHandler.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 6413844b5b121794dadf2fbafc669fb8
+timeCreated: 1611403846
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/JadeEquipHandler.cs b/Client/Assets/Scripts/XMainClient/UI/JadeEquipHandler.cs
new file mode 100644
index 00000000..c828dd38
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/JadeEquipHandler.cs
@@ -0,0 +1,651 @@
+using System;
+using System.Collections.Generic;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class JadeEquipHandler : DlgHandlerBase
+ {
+ public CharacterEquipHandler EquipHandler
+ {
+ get
+ {
+ return this.m_EquipHandler;
+ }
+ }
+
+ protected override string FileName
+ {
+ get
+ {
+ return "ItemNew/JadeEquipFrame";
+ }
+ }
+
+ private XJadeDocument _doc = null;
+
+ private static uint SLOT_COUNT = 4u;
+
+ private XUIPool m_JadeInfoPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ private List<GameObject> m_JadeSlots = new List<GameObject>();
+
+ private CharacterEquipHandler m_EquipHandler;
+
+ private GameObject m_SelectedEquip;
+
+ private GameObject m_EmptyEquiped;
+
+ private GameObject m_EquipedPanel;
+
+ private GameObject m_SelectMenu;
+
+ private GameObject m_OperateMenu;
+
+ private IXUITweenTool m_SelectMenuTween;
+
+ private GameObject m_CanReplaceRedpoint;
+
+ private GameObject m_CanUpdateRedpoint;
+
+ private XUIPool m_JadeSlotSmallPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ private GameObject m_EquipFrame;
+
+ private GameObject[] m_JadeEquip = new GameObject[10];
+
+ private GameObject[,] m_JadeEquipItem;
+
+ private XItemMorePowerfulTipMgr powerfullMgr = new XItemMorePowerfulTipMgr();
+
+ private IXUIButton m_JadeShop;
+
+ private IXUIButton m_JadeUnload;
+
+ private IXUIButton m_Help;
+
+ private int m_SelectedSlotIndex;
+
+ private string[][] m_SlotLevelLimit;
+
+ protected override void Init()
+ {
+ base.Init();
+ this.m_SlotLevelLimit = new string[XSingleton<XGlobalConfig>.singleton.MaxEquipPosType + 1][];
+ JadeEquipHandler.SLOT_COUNT = 0u;
+ for (int i = 1; i <= XSingleton<XGlobalConfig>.singleton.MaxEquipPosType; i++)
+ {
+ this.m_SlotLevelLimit[i] = XSingleton<XGlobalConfig>.singleton.GetValue("JadeOpenLevel" + i).Split(XGlobalConfig.ListSeparator);
+ bool flag = JadeEquipHandler.SLOT_COUNT == 0u;
+ if (flag)
+ {
+ JadeEquipHandler.SLOT_COUNT = (uint)this.m_SlotLevelLimit[i].Length;
+ }
+ else
+ {
+ bool flag2 = JadeEquipHandler.SLOT_COUNT != (uint)this.m_SlotLevelLimit[i].Length;
+ if (flag2)
+ {
+ XSingleton<XDebug>.singleton.AddErrorLog("JadeOpenLevels are not the same.", null, null, null, null, null);
+ }
+ }
+ }
+ this.m_JadeEquipItem = new GameObject[XBagDocument.EquipMax, (int)JadeEquipHandler.SLOT_COUNT];
+ this._doc = XDocuments.GetSpecificDocument<XJadeDocument>(XJadeDocument.uuID);
+ this._doc.equipHandler = this;
+ this.m_Help = (base.transform.Find("Help").GetComponent("XUIButton") as IXUIButton);
+ this.m_EquipedPanel = base.PanelObject.transform.Find("EquipedPanel").gameObject;
+ this.m_SelectMenu = this.m_EquipedPanel.transform.Find("SelectMenu").gameObject;
+ this.m_OperateMenu = this.m_EquipedPanel.transform.Find("OperateMenu").gameObject;
+ this.m_EmptyEquiped = base.PanelObject.transform.Find("Empty").gameObject;
+ this.m_SelectMenuTween = (this.m_SelectMenu.GetComponent("XUIPlayTween") as IXUITweenTool);
+ this.m_CanReplaceRedpoint = this.m_OperateMenu.transform.Find("BtnChange/RedPoint").gameObject;
+ this.m_CanUpdateRedpoint = this.m_OperateMenu.transform.Find("BtnUpgrade/RedPoint").gameObject;
+ this.m_SelectedEquip = base.PanelObject.transform.Find("SelectedEquip").gameObject;
+ Transform transform = this.m_EquipedPanel.transform.Find("JadeInfoTpl");
+ this.powerfullMgr.LoadFromUI(transform.Find("RedPoint").gameObject);
+ this.powerfullMgr.SetupPool(base.PanelObject);
+ this.m_JadeInfoPool.SetupPool(transform.parent.gameObject, transform.gameObject, JadeEquipHandler.SLOT_COUNT, false);
+ int num = 0;
+ while ((long)num < (long)((ulong)JadeEquipHandler.SLOT_COUNT))
+ {
+ GameObject gameObject = this.m_JadeInfoPool.FetchGameObject(false);
+ gameObject.transform.localPosition = this.m_EquipedPanel.transform.Find("Pos" + num).localPosition;
+ this.m_JadeSlots.Add(gameObject);
+ num++;
+ }
+ this.m_EquipFrame = base.PanelObject.transform.Find("EquipFrame").gameObject;
+ this.m_JadeSlotSmallPool.SetupPool(this.m_EquipFrame, this.m_EquipFrame.transform.Find("JadeTpl").gameObject, 10u, false);
+ for (int j = 0; j < 10; j++)
+ {
+ GameObject gameObject2 = this.m_EquipFrame.transform.Find("Part" + j).gameObject;
+ GameObject gameObject3 = this.m_JadeSlotSmallPool.FetchGameObject(false);
+ this.m_JadeEquip[j] = gameObject3;
+ XSingleton<UiUtility>.singleton.AddChild(this.m_EquipFrame, gameObject3);
+ gameObject3.transform.localPosition = gameObject2.transform.localPosition;
+ int num2 = 0;
+ while ((long)num2 < (long)((ulong)JadeEquipHandler.SLOT_COUNT))
+ {
+ transform = gameObject3.transform.Find("Jade" + num2);
+ bool flag3 = transform != null;
+ if (flag3)
+ {
+ this.m_JadeEquipItem[j, num2] = transform.gameObject;
+ }
+ else
+ {
+ this.m_JadeEquipItem[j, num2] = null;
+ }
+ num2++;
+ }
+ }
+ this.m_JadeShop = (base.PanelObject.transform.Find("JadeShop").GetComponent("XUIButton") as IXUIButton);
+ this.m_JadeUnload = (base.PanelObject.transform.Find("JadeUnload").GetComponent("XUIButton") as IXUIButton);
+ DlgHandlerBase.EnsureCreate<CharacterEquipHandler>(ref this.m_EquipHandler, this.m_EquipFrame, this, true);
+ this.m_EquipHandler.ShowNormalEquip(true);
+ this.m_EquipHandler.RegisterItemClickEvents(new SpriteClickEventHandler(this.OnEquipClick));
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ this.m_JadeShop.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnJadeShopClick));
+ this.m_JadeUnload.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnJadeUnloadClick));
+ IXUIButton ixuibutton = this.m_OperateMenu.transform.Find("BtnUpgrade").GetComponent("XUIButton") as IXUIButton;
+ IXUIButton ixuibutton2 = this.m_SelectMenu.transform.Find("BtnTakeoff").GetComponent("XUIButton") as IXUIButton;
+ IXUIButton ixuibutton3 = this.m_OperateMenu.transform.Find("BtnChange").GetComponent("XUIButton") as IXUIButton;
+ ixuibutton.RegisterClickEventHandler(new ButtonClickEventHandler(this._OnSelectedJadeUpgradeClicked));
+ ixuibutton2.RegisterClickEventHandler(new ButtonClickEventHandler(this._OnSelectedJadeTakeoffClicked));
+ ixuibutton3.RegisterClickEventHandler(new ButtonClickEventHandler(this._OnSelectedJadeChangeClicked));
+ IXUISprite ixuisprite = this.m_SelectedEquip.gameObject.transform.Find("Icon").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnSelectedEquipClick));
+ this.m_Help.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnHelpClicked));
+ }
+
+ public bool OnHelpClicked(IXUIButton button)
+ {
+ DlgBase<XCommonHelpTipView, XCommonHelpTipBehaviour>.singleton.ShowHelp(XSysDefine.XSys_Item_Jade);
+ return true;
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ this.m_EquipHandler.SetVisible(true);
+ List<int> powerfulEquips = this._doc.UpdateRedPoints();
+ for (int i = 0; i < XBagDocument.BagDoc.EquipBag.Length; i++)
+ {
+ XItem xitem = XBagDocument.BagDoc.EquipBag[i];
+ bool flag = xitem == null || xitem.itemID == 0;
+ if (flag)
+ {
+ this.m_JadeEquip[i].SetActive(false);
+ }
+ else
+ {
+ this.m_JadeEquip[i].SetActive(true);
+ this.RefreshSmallJade(i);
+ }
+ }
+ this._DefaultSelect(powerfulEquips);
+ }
+
+ private void _DefaultSelect(List<int> powerfulEquips)
+ {
+ int[] array = new int[]
+ {
+ 4,
+ 3,
+ 2,
+ 1,
+ 0,
+ 9,
+ 8,
+ 7,
+ 6,
+ 5
+ };
+ int num = -1;
+ int num2 = -1;
+ XBodyBag equipBag = XSingleton<XGame>.singleton.Doc.XBagDoc.EquipBag;
+ for (int i = XBagDocument.BodyPosition<EquipPosition>(EquipPosition.EQUIP_START); i < XBagDocument.BodyPosition<EquipPosition>(EquipPosition.EQUIP_END); i++)
+ {
+ int num3 = int.MinValue;
+ XItem xitem = equipBag[i];
+ bool flag = xitem != null && xitem.itemID != 0;
+ if (flag)
+ {
+ num3 = array[i];
+ for (int j = 0; j < powerfulEquips.Count; j++)
+ {
+ bool flag2 = powerfulEquips[j] == i;
+ if (flag2)
+ {
+ num3 += 10;
+ break;
+ }
+ }
+ }
+ bool flag3 = num < num3;
+ if (flag3)
+ {
+ num = num3;
+ num2 = i;
+ }
+ }
+ bool flag4 = num2 >= 0;
+ if (flag4)
+ {
+ XItem xitem2 = equipBag[num2];
+ this._doc.SelectEquip(xitem2.uid);
+ }
+ else
+ {
+ this._doc.SelectEquip(0UL);
+ }
+ }
+
+ public override void StackRefresh()
+ {
+ base.StackRefresh();
+ XEquipItem equipNew = XSingleton<XGame>.singleton.Doc.XBagDoc.GetItemByUID(this._doc.selectedEquip) as XEquipItem;
+ this.SetEquipNew(equipNew);
+ }
+
+ private void RefreshSmallJade(int pos)
+ {
+ XItem xitem = XBagDocument.BagDoc.EquipBag[pos];
+ XEquipItem xequipItem = XSingleton<XGame>.singleton.Doc.XBagDoc.GetItemByUID(xitem.uid) as XEquipItem;
+ int i = 0;
+ bool flag = xequipItem != null;
+ if (flag)
+ {
+ SeqListRef<uint> slotInfoByPos = this._doc.GetSlotInfoByPos((byte)pos);
+ while (i < (int)slotInfoByPos.count)
+ {
+ bool flag2 = (long)i >= (long)((ulong)JadeEquipHandler.SLOT_COUNT);
+ if (flag2)
+ {
+ break;
+ }
+ GameObject gameObject = this.m_JadeEquipItem[pos, i];
+ bool flag3 = gameObject != null;
+ if (flag3)
+ {
+ XJadeItem xjadeItem = xequipItem.jadeInfo.jades[i];
+ bool flag4 = this._doc.SlotLevelIsOpen((byte)pos, i);
+ if (flag4)
+ {
+ gameObject.SetActive(true);
+ GameObject gameObject2 = gameObject.transform.Find("Icon").gameObject;
+ gameObject2.SetActive(xjadeItem != null);
+ }
+ else
+ {
+ gameObject.SetActive(false);
+ }
+ }
+ i++;
+ }
+ while ((long)i < (long)((ulong)JadeEquipHandler.SLOT_COUNT))
+ {
+ GameObject gameObject3 = this.m_JadeEquipItem[pos, i];
+ bool flag5 = gameObject3 != null;
+ if (flag5)
+ {
+ gameObject3.SetActive(false);
+ }
+ i++;
+ }
+ }
+ }
+
+ protected override void OnHide()
+ {
+ this.m_EquipHandler.SetVisible(false);
+ base.OnHide();
+ }
+
+ public override void OnUnload()
+ {
+ this.powerfullMgr.Unload();
+ this._doc.equipHandler = null;
+ DlgHandlerBase.EnsureUnload<CharacterEquipHandler>(ref this.m_EquipHandler);
+ base.OnUnload();
+ }
+
+ public void OnEquipClick(IXUISprite iSp)
+ {
+ this._doc.SelectEquip(iSp.ID);
+ }
+
+ public void OnSelectedEquipClick(IXUISprite iSp)
+ {
+ XEquipItem xequipItem = XSingleton<XGame>.singleton.Doc.XBagDoc.GetItemByUID(this._doc.selectedEquip) as XEquipItem;
+ bool flag = xequipItem == null;
+ if (!flag)
+ {
+ XSingleton<UiUtility>.singleton.ShowTooltipDialog(xequipItem, null, iSp, false, 0u);
+ }
+ }
+
+ private bool OnJadeShopClick(IXUIButton sp)
+ {
+ XSingleton<UiUtility>.singleton.ShowItemAccess(198, null);
+ return true;
+ }
+
+ private bool OnJadeUnloadClick(IXUIButton sp)
+ {
+ XJadeDocument specificDocument = XDocuments.GetSpecificDocument<XJadeDocument>(XJadeDocument.uuID);
+ bool flag = specificDocument.selectedEquip == 0UL;
+ bool result;
+ if (flag)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString("JADE_DIALOG_NOEQUIP"), "fece00");
+ result = false;
+ }
+ else
+ {
+ RpcC2G_TakeOffAllJade rpcC2G_TakeOffAllJade = new RpcC2G_TakeOffAllJade();
+ rpcC2G_TakeOffAllJade.oArg.uid = specificDocument.selectedEquip;
+ XSingleton<XClientNetwork>.singleton.Send(rpcC2G_TakeOffAllJade);
+ result = true;
+ }
+ return result;
+ }
+
+ public void SetEquipNew(XEquipItem equip)
+ {
+ this.m_EquipHandler.ShowEquipments();
+ this._ToggleOperateMenu(false, 0);
+ this.m_JadeSlots.Clear();
+ this.m_JadeInfoPool.FakeReturnAll();
+ XItemDrawerMgr.Param.bHideBinding = true;
+ XSingleton<XItemDrawerMgr>.singleton.DrawItem(this.m_SelectedEquip, equip);
+ this.m_EmptyEquiped.SetActive(equip == null);
+ this.m_EquipedPanel.SetActive(equip != null);
+ bool flag = equip != null;
+ if (flag)
+ {
+ EquipList.RowData equipConf = XBagDocument.GetEquipConf(equip.itemID);
+ bool flag2 = equipConf == null;
+ if (flag2)
+ {
+ XSingleton<XDebug>.singleton.AddErrorLog("equipListRowData == null while id = ", equip.itemID.ToString(), null, null, null, null);
+ return;
+ }
+ bool flag3 = XSingleton<XAttributeMgr>.singleton.XPlayerData == null;
+ if (flag3)
+ {
+ return;
+ }
+ uint level = XSingleton<XAttributeMgr>.singleton.XPlayerData.Level;
+ SeqListRef<uint> slotInfoByPos = this._doc.GetSlotInfoByPos(equipConf.EquipPos);
+ for (int i = 0; i < (int)slotInfoByPos.count; i++)
+ {
+ bool flag4 = (long)i >= (long)((ulong)JadeEquipHandler.SLOT_COUNT);
+ if (flag4)
+ {
+ break;
+ }
+ GameObject gameObject = this.m_JadeInfoPool.FetchGameObject(false);
+ gameObject.transform.localPosition = this.m_EquipedPanel.transform.Find("Pos" + i.ToString()).localPosition;
+ this.m_JadeSlots.Add(gameObject);
+ IXUISprite ixuisprite = gameObject.GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.ID = (ulong)((long)i);
+ ixuisprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this._OnSlotClicked));
+ GameObject gameObject2 = gameObject.transform.Find("HasJade").gameObject;
+ GameObject gameObject3 = gameObject.transform.Find("Empty").gameObject;
+ GameObject gameObject4 = gameObject.transform.Find("Lock").gameObject;
+ bool flag5 = level >= slotInfoByPos[i, 1];
+ if (flag5)
+ {
+ XJadeItem xjadeItem = equip.jadeInfo.jades[i];
+ gameObject2.SetActive(xjadeItem != null);
+ gameObject3.SetActive(xjadeItem == null);
+ gameObject4.SetActive(false);
+ bool flag6 = xjadeItem != null;
+ if (flag6)
+ {
+ xjadeItem.bBinding = false;
+ JadeEquipHandler.DrawJadeWithAttr(gameObject2, slotInfoByPos[i, 0], xjadeItem, 1u);
+ }
+ else
+ {
+ JadeEquipHandler.DrawJadeWithAttr(gameObject3, slotInfoByPos[i, 0], xjadeItem, 1u);
+ }
+ }
+ else
+ {
+ gameObject2.SetActive(false);
+ gameObject3.SetActive(false);
+ gameObject4.SetActive(true);
+ IXUILabel ixuilabel = gameObject4.transform.Find("Level").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel.SetText(slotInfoByPos[i, 1].ToString());
+ }
+ }
+ int pos;
+ bool flag7 = !XSingleton<XGame>.singleton.Doc.XBagDoc.EquipBag.GetItemPos(equip.uid, out pos);
+ if (flag7)
+ {
+ XSingleton<XDebug>.singleton.AddErrorLog("No Find Equip uid=" + equip.uid, null, null, null, null, null);
+ return;
+ }
+ this.RefreshSmallJade(pos);
+ }
+ this.m_JadeInfoPool.ActualReturnAll(false);
+ int num = this.RecalcMorePowerfulTip();
+ bool flag8 = num >= 0;
+ if (flag8)
+ {
+ this._ToggleOperateMenu(true, num);
+ }
+ }
+
+ public static void DrawJadeWithAttr(GameObject go, uint slot, XJadeItem jade, uint iconType = 1u)
+ {
+ XItemDrawerMgr.Param.IconType = iconType;
+ XSingleton<XItemDrawerMgr>.singleton.jadeSlotDrawer.DrawItem(go.transform.Find("JadeTpl").gameObject, slot, false, jade);
+ JadeEquipHandler.DrawAttr(go, jade);
+ }
+
+ public static void DrawAttr(GameObject go, XJadeItem jade)
+ {
+ bool flag = jade != null;
+ if (flag)
+ {
+ IXUILabel ixuilabel = go.transform.Find("AttrName").GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel2 = go.transform.Find("AttrValue").GetComponent("XUILabel") as IXUILabel;
+ ItemList.RowData itemConf = XBagDocument.GetItemConf(jade.itemID);
+ bool flag2 = itemConf != null && jade.changeAttr.Count > 0;
+ if (flag2)
+ {
+ ixuilabel.SetText(XAttributeCommon.GetAttrStr((int)jade.changeAttr[0].AttrID));
+ ixuilabel2.SetText(XAttributeCommon.GetAttrValueStr(jade.changeAttr[0].AttrID, jade.changeAttr[0].AttrValue, true));
+ Color itemQualityColor = XSingleton<UiUtility>.singleton.GetItemQualityColor((int)itemConf.ItemQuality);
+ ixuilabel.SetColor(itemQualityColor);
+ ixuilabel2.SetColor(itemQualityColor);
+ }
+ else
+ {
+ ixuilabel.SetText(string.Empty);
+ ixuilabel2.SetText(string.Empty);
+ }
+ }
+ }
+
+ private void _OnSlotClicked(IXUISprite iSp)
+ {
+ XEquipItem xequipItem = XSingleton<XGame>.singleton.Doc.XBagDoc.GetItemByUID(this._doc.selectedEquip) as XEquipItem;
+ bool flag = xequipItem == null;
+ if (!flag)
+ {
+ EquipList.RowData equipConf = XBagDocument.GetEquipConf(xequipItem.itemID);
+ bool flag2 = equipConf == null;
+ if (!flag2)
+ {
+ int num = (int)iSp.ID;
+ XJadeItem xjadeItem = xequipItem.jadeInfo.jades[num];
+ bool flag3 = !this._doc.SlotLevelIsOpen(equipConf.EquipPos, num);
+ if (!flag3)
+ {
+ bool flag4 = xjadeItem != null;
+ if (flag4)
+ {
+ this._ToggleOperateMenu(true, num);
+ }
+ else
+ {
+ uint slot = this._doc.GetSlot(equipConf.EquipPos, num);
+ bool flag5 = slot != XJadeInfo.SLOT_NOTOPEN && slot != XJadeInfo.SLOT_NOTEXIST;
+ if (flag5)
+ {
+ this._doc.SelectSlot(num);
+ }
+ }
+ }
+ }
+ }
+ }
+
+ private void _ToggleOperateMenu(bool bShow, int slotIndex = 0)
+ {
+ if (bShow)
+ {
+ this.m_SelectedSlotIndex = slotIndex;
+ this.m_SelectMenu.SetActive(true);
+ this.m_OperateMenu.SetActive(true);
+ this.m_SelectMenuTween.PlayTween(true, -1f);
+ XEquipItem xequipItem = XSingleton<XGame>.singleton.Doc.XBagDoc.GetItemByUID(this._doc.selectedEquip) as XEquipItem;
+ bool flag = xequipItem == null;
+ if (flag)
+ {
+ this.m_CanReplaceRedpoint.SetActive(false);
+ }
+ this.m_CanReplaceRedpoint.SetActive(this._doc.CanReplace(xequipItem, slotIndex));
+ this.m_CanUpdateRedpoint.SetActive(this._doc.CanUpdate(xequipItem, slotIndex));
+ this.m_SelectMenu.transform.localPosition = this.m_JadeSlots[this.m_SelectedSlotIndex].transform.localPosition;
+ }
+ else
+ {
+ this.m_SelectMenu.SetActive(false);
+ this.m_OperateMenu.SetActive(false);
+ }
+ }
+
+ private bool _OnSelectedJadeUpgradeClicked(IXUIButton btn)
+ {
+ this._doc.TryToCompose((uint)this.m_SelectedSlotIndex);
+ return true;
+ }
+
+ private bool _OnSelectedJadeTakeoffClicked(IXUIButton btn)
+ {
+ this._doc.ReqTakeOffJade((uint)this.m_SelectedSlotIndex);
+ return true;
+ }
+
+ private bool _OnSelectedJadeChangeClicked(IXUIButton btn)
+ {
+ this._doc.SelectSlot(this.m_SelectedSlotIndex);
+ return true;
+ }
+
+ public int RecalcMorePowerfulTip()
+ {
+ int num = -1;
+ bool flag = false;
+ this.powerfullMgr.ReturnAll();
+ bool flag2 = this._doc.selectedEquip == 0UL;
+ int result;
+ if (flag2)
+ {
+ result = num;
+ }
+ else
+ {
+ XEquipItem xequipItem = XSingleton<XGame>.singleton.Doc.XBagDoc.GetItemByUID(this._doc.selectedEquip) as XEquipItem;
+ bool flag3 = xequipItem == null;
+ if (flag3)
+ {
+ result = num;
+ }
+ else
+ {
+ EquipList.RowData equipConf = XBagDocument.GetEquipConf(xequipItem.itemID);
+ bool flag4 = equipConf == null;
+ if (flag4)
+ {
+ XSingleton<XDebug>.singleton.AddErrorLog("equipListRowData == null while id = ", xequipItem.itemID.ToString(), null, null, null, null);
+ result = num;
+ }
+ else
+ {
+ SeqListRef<uint> slotInfoByPos = this._doc.GetSlotInfoByPos(equipConf.EquipPos);
+ int num2 = 0;
+ while ((long)num2 < (long)((ulong)JadeEquipHandler.SLOT_COUNT) && num2 < (int)slotInfoByPos.count)
+ {
+ bool flag5 = XSingleton<XAttributeMgr>.singleton.XPlayerData == null || slotInfoByPos[num2, 1] > XSingleton<XAttributeMgr>.singleton.XPlayerData.Level;
+ if (!flag5)
+ {
+ bool flag6 = false;
+ bool flag7 = false;
+ bool flag8 = this._doc.CanUpdate(xequipItem, num2);
+ if (flag8)
+ {
+ flag6 = true;
+ }
+ else
+ {
+ bool flag9 = this._doc.CanReplace(xequipItem, num2);
+ if (flag9)
+ {
+ XJadeItem xjadeItem = xequipItem.jadeInfo.jades[num2];
+ bool flag10 = xjadeItem != null;
+ if (!flag10)
+ {
+ flag7 = true;
+ }
+ flag6 = true;
+ }
+ }
+ bool flag11 = flag6;
+ if (flag11)
+ {
+ GameObject gameObject = this.m_JadeSlots[num2];
+ IXUISprite tip = gameObject.GetComponent("XUISprite") as IXUISprite;
+ this.powerfullMgr.SetTip(tip);
+ bool flag12 = !flag && !flag7;
+ if (flag12)
+ {
+ num = num2;
+ flag = true;
+ }
+ }
+ else
+ {
+ bool flag13 = num < 0;
+ if (flag13)
+ {
+ bool flag14 = XJadeInfo.SlotHasJade(num2, xequipItem.jadeInfo);
+ if (flag14)
+ {
+ num = num2;
+ }
+ }
+ }
+ }
+ num2++;
+ }
+ result = num;
+ }
+ }
+ }
+ return result;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/JadeEquipHandler.cs.meta b/Client/Assets/Scripts/XMainClient/UI/JadeEquipHandler.cs.meta
new file mode 100644
index 00000000..5573c672
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/JadeEquipHandler.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: bc23eb302c84adb4da555cf656858581
+timeCreated: 1611404444
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/JadeTooltipDlg.cs b/Client/Assets/Scripts/XMainClient/UI/JadeTooltipDlg.cs
new file mode 100644
index 00000000..876e3381
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/JadeTooltipDlg.cs
@@ -0,0 +1,96 @@
+using System;
+using UILib;
+using UnityEngine;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class JadeTooltipDlg : TooltipDlg<JadeTooltipDlg, TooltipDlgBehaviour>
+ {
+ public override string fileName
+ {
+ get
+ {
+ return "GameSystem/JadeToolTipDlg";
+ }
+ }
+
+ private uint _slot = 0u;
+
+ public void ShowToolTip(XItem mainItem, XItem compareItem, uint slot, bool bShowButtons = true)
+ {
+ this._slot = slot;
+ this.ShowToolTip(mainItem, compareItem, bShowButtons, 0u);
+ }
+
+ protected override void Init()
+ {
+ base.Init();
+ this.m_OperateList[0, 0] = new TooltipButtonOperateJadeUpgrade();
+ this.m_OperateList[0, 1] = new TooltipButtonOperateRecycle(XSysDefine.XSys_Item_Jade);
+ this.m_OperateList[0, 2] = new TooltipButtonOperateSell();
+ }
+
+ protected override void SetupOtherFrame(GameObject goToolTip, XItem mainItem, XItem compareItem, bool bMain)
+ {
+ Transform transform = goToolTip.transform.Find("ScrollPanel");
+ IXUISprite ixuisprite = transform.Find("Place").GetComponent("XUISprite") as IXUISprite;
+ IXUISprite ixuisprite2 = transform.Find("Description").GetComponent("XUISprite") as IXUISprite;
+ IXUILabel ixuilabel = transform.Find("Place/T").GetComponent("XUILabel") as IXUILabel;
+ XJadeDocument specificDocument = XDocuments.GetSpecificDocument<XJadeDocument>(XJadeDocument.uuID);
+ ixuilabel.SetText(XSingleton<UiUtility>.singleton.ReplaceReturn(specificDocument.jadeTable.GetByJadeID((uint)mainItem.itemID).MosaicPlace));
+ ixuisprite.spriteHeight = -(int)ixuilabel.gameObject.transform.localPosition.y + ixuilabel.spriteHeight;
+ base.AppendFrame(ixuisprite.gameObject, (float)ixuisprite.spriteHeight, null);
+ base.AppendFrame(ixuisprite2.gameObject, (float)ixuisprite2.spriteHeight, null);
+ base.SetupOtherFrame(goToolTip, mainItem, compareItem, bMain);
+ }
+
+ protected override void SetupTopFrame(GameObject goToolTip, ItemList.RowData data, bool bMain, XItem instanceData = null, XItem compareData = null)
+ {
+ base.SetupTopFrame(goToolTip, data, bMain, instanceData, compareData);
+ base._SetupType(goToolTip, data, 0);
+ base._SetupProf(goToolTip, data, bMain, instanceData, 2);
+ XJadeDocument specificDocument = XDocuments.GetSpecificDocument<XJadeDocument>(XJadeDocument.uuID);
+ uint jadeLevel = specificDocument.jadeTable.GetByJadeID((uint)data.ItemID).JadeLevel;
+ base._SetTopFrameLabel(goToolTip, 1, XStringDefineProxy.GetString("ToolTipText_Level"), string.Format(XStringDefineProxy.GetString("JADE_LEVEL_LIMIT"), specificDocument.JadeMosaicLevel[(int)(jadeLevel - 1u)].ToString()));
+ }
+
+ protected override int _GetPPT(XItem item, bool bMain, ref string valueText)
+ {
+ bool flag = item == null;
+ int result;
+ if (flag)
+ {
+ result = -1;
+ }
+ else
+ {
+ uint ppt = item.GetPPT(bMain ? XSingleton<TooltipParam>.singleton.mainAttributes : XSingleton<TooltipParam>.singleton.compareAttributes);
+ valueText = ppt.ToString();
+ result = (int)ppt;
+ }
+ return result;
+ }
+
+ protected override void SetupToolTipButtons(GameObject goToolTip, XItem item, bool bMain)
+ {
+ base.SetupToolTipButtons(goToolTip, item, bMain);
+ bool flag = !this.bShowButtons;
+ if (!flag)
+ {
+ if (bMain)
+ {
+ bool flag2 = item.uid == 0UL;
+ if (flag2)
+ {
+ base._SetupButtonVisiability(goToolTip, 1, item);
+ }
+ else
+ {
+ base._SetupButtonVisiability(goToolTip, 0, item);
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/JadeTooltipDlg.cs.meta b/Client/Assets/Scripts/XMainClient/UI/JadeTooltipDlg.cs.meta
new file mode 100644
index 00000000..4bacbba0
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/JadeTooltipDlg.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 1db310b613d0885489c306bda2f9022e
+timeCreated: 1611403357
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/JokerKingMainBehavior.cs b/Client/Assets/Scripts/XMainClient/UI/JokerKingMainBehavior.cs
new file mode 100644
index 00000000..326e6f97
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/JokerKingMainBehavior.cs
@@ -0,0 +1,58 @@
+using System;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class JokerKingMainBehavior : DlgBehaviourBase
+ {
+ public IXUIButton m_Close;
+
+ public IXUIButton m_BtnRankReward;
+
+ public IXUIButton m_BtnGo;
+
+ public IXUIButton m_BtnDisable;
+
+ public IXUILabelSymbol m_LabelSymbol;
+
+ public IXUILabel m_info;
+
+ public Transform m_Matching;
+
+ public IXUISprite m_BtnRankSprite;
+
+ public Transform m_RankList;
+
+ public IXUIScrollView m_ScrollView;
+
+ public IXUIWrapContent m_WrapContent;
+
+ public IXUILabel m_IntroText;
+
+ public Transform m_Reward;
+
+ public XUIPool m_RewardPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ private void Awake()
+ {
+ this.m_Close = (base.transform.Find("Bg/Close").GetComponent("XUIButton") as IXUIButton);
+ this.m_BtnGo = (base.transform.Find("Bg/Btn_Go").GetComponent("XUIButton") as IXUIButton);
+ this.m_BtnRankReward = (base.transform.Find("Bg/BtnRankReward").GetComponent("XUIButton") as IXUIButton);
+ this.m_BtnDisable = (base.transform.Find("Bg/Btn_Disable").GetComponent("XUIButton") as IXUIButton);
+ this.m_info = (base.transform.Find("Bg/Info").GetComponent("XUILabel") as IXUILabel);
+ this.m_RankList = base.transform.Find("Bg/RankList");
+ this.m_ScrollView = (base.transform.Find("Bg/RankList/ScrollView").GetComponent("XUIScrollView") as IXUIScrollView);
+ this.m_WrapContent = (base.transform.Find("Bg/RankList/ScrollView/WrapContent").GetComponent("XUIWrapContent") as IXUIWrapContent);
+ this.m_IntroText = (base.transform.Find("Bg/help/Intro/Text").GetComponent("XUILabel") as IXUILabel);
+ this.m_Reward = base.transform.Find("Bg/help/Intro/Reward");
+ Transform transform = base.transform.Find("Bg/help/Intro/Reward/item");
+ this.m_RewardPool.SetupPool(this.m_Reward.gameObject, transform.gameObject, 5u, true);
+ this.m_Matching = base.transform.Find("Bg/Matching");
+ this.m_BtnRankSprite = (base.transform.Find("Bg/RankList/Mask").GetComponent("XUISprite") as IXUISprite);
+ this.m_LabelSymbol = (base.transform.Find("Bg/Btn_Go/Go").GetComponent("XUILabelSymbol") as IXUILabelSymbol);
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/JokerKingMainBehavior.cs.meta b/Client/Assets/Scripts/XMainClient/UI/JokerKingMainBehavior.cs.meta
new file mode 100644
index 00000000..4093a9f5
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/JokerKingMainBehavior.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: a8ab8eeb6413b684c8d693ecd91a6380
+timeCreated: 1611404296
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/KillInfoMode.cs b/Client/Assets/Scripts/XMainClient/UI/KillInfoMode.cs
new file mode 100644
index 00000000..9cf67123
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/KillInfoMode.cs
@@ -0,0 +1,10 @@
+using System;
+
+namespace XMainClient.UI
+{
+ public enum KillInfoMode
+ {
+ Single,
+ Multiple
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/KillInfoMode.cs.meta b/Client/Assets/Scripts/XMainClient/UI/KillInfoMode.cs.meta
new file mode 100644
index 00000000..2237db59
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/KillInfoMode.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 55f01f93b466557408827f5e549578eb
+timeCreated: 1611403740
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/LoadingDlg.cs b/Client/Assets/Scripts/XMainClient/UI/LoadingDlg.cs
new file mode 100644
index 00000000..c24822f0
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/LoadingDlg.cs
@@ -0,0 +1,161 @@
+using System;
+using System.Collections.Generic;
+using UILib;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class LoadingDlg : DlgBase<LoadingDlg, LoadingDlgBehaviour>
+ {
+ public override string fileName
+ {
+ get
+ {
+ return "Common/LoadingDlg";
+ }
+ }
+
+ public override int layer
+ {
+ get
+ {
+ return 1;
+ }
+ }
+
+ public override bool autoload
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override bool needOnTop
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ private string _pic = null;
+
+ protected override void Init()
+ {
+ this.SetWaitForOthersTip("");
+ }
+
+ public void SetLoadingProgress(float f)
+ {
+ bool flag = !base.IsLoaded();
+ if (!flag)
+ {
+ bool flag2 = this.m_uiBehaviour.m_LoadingProgress.IsVisible();
+ if (flag2)
+ {
+ this.m_uiBehaviour.m_LoadingProgress.value = f;
+ bool flag3 = XSingleton<XGame>.singleton.CurrentStage.Stage == EXStage.World && !XSingleton<XScene>.singleton.IsPVPScene && XSingleton<XGame>.singleton.SyncMode;
+ if (flag3)
+ {
+ this.SetWaitForOthersTip((f == 1f) ? XStringDefineProxy.GetString("WAIT_FOR_OTHERS") : "");
+ }
+ }
+ }
+ }
+
+ public void SetLoadingPrompt(List<string> otherPalyerName)
+ {
+ bool flag = !base.IsLoaded() || XSingleton<XGame>.singleton.CurrentStage.Stage != EXStage.World || !XSingleton<XGame>.singleton.SyncMode;
+ if (!flag)
+ {
+ bool flag2 = otherPalyerName == null || otherPalyerName.Count == 0;
+ if (flag2)
+ {
+ this.SetWaitForOthersTip(XStringDefineProxy.GetString("WAIT_FOR_OTHERS"));
+ }
+ else
+ {
+ string waitForOthersTip = string.Format(XSingleton<XStringTable>.singleton.GetString("WAIT_OTHER_PLAYER_PVE"), otherPalyerName.Count, otherPalyerName[0]);
+ this.SetWaitForOthersTip(waitForOthersTip);
+ }
+ }
+ }
+
+ private void SetWaitForOthersTip(string tips)
+ {
+ base.uiBehaviour.m_WaitForOthersTip.SetText(tips);
+ base.uiBehaviour.m_WaitForOthersTip.SetVisible(!string.IsNullOrEmpty(tips));
+ }
+
+ public void SetLoadingTip(string tip)
+ {
+ base.uiBehaviour.m_LoadingTips.SetText(tip);
+ }
+
+ public void SetLoadingPic(string pic)
+ {
+ this._pic = pic;
+ bool flag = string.IsNullOrEmpty(pic);
+ if (flag)
+ {
+ XSingleton<XDebug>.singleton.AddErrorLog("null laoding pic", null, null, null, null, null);
+ }
+ else
+ {
+ base.uiBehaviour.m_LoadingPic.SetTexturePath("atlas/UI/common/Pic/" + this._pic);
+ }
+ bool flag2 = base.uiBehaviour.m_Dog != null;
+ if (flag2)
+ {
+ base.uiBehaviour.m_Dog.SetSprite("Animation");
+ }
+ }
+
+ public void HideSelf(bool bFadeIn)
+ {
+ if (bFadeIn)
+ {
+ base.uiBehaviour.m_LoadingBg.gameObject.SetActive(false);
+ base.uiBehaviour.m_Canvas.gameObject.SetActive(true);
+ IXUITweenTool ixuitweenTool = base.uiBehaviour.m_Canvas.GetComponent("XUIPlayTween") as IXUITweenTool;
+ ixuitweenTool.SetTweenEnabledWhenFinish(false);
+ ixuitweenTool.SetTargetGameObject(base.uiBehaviour.m_Canvas.gameObject);
+ ixuitweenTool.RegisterOnFinishEventHandler(new OnTweenFinishEventHandler(this.OnFinish));
+ ixuitweenTool.PlayTween(true, -1f);
+ }
+ else
+ {
+ this.ReleaseTexture();
+ this.SetVisible(false, true);
+ }
+ }
+
+ protected void OnFinish(IXUITweenTool tween)
+ {
+ base.uiBehaviour.m_LoadingBg.gameObject.SetActive(true);
+ base.uiBehaviour.m_Canvas.gameObject.SetActive(false);
+ this.ReleaseTexture();
+ this.SetVisible(false, true);
+ }
+
+ private void ReleaseTexture()
+ {
+ bool flag = base.uiBehaviour != null;
+ if (flag)
+ {
+ bool flag2 = base.uiBehaviour.m_LoadingPic != null;
+ if (flag2)
+ {
+ base.uiBehaviour.m_LoadingPic.SetTexturePath("");
+ }
+ bool flag3 = base.uiBehaviour.m_Dog != null;
+ if (flag3)
+ {
+ base.uiBehaviour.m_Dog.SetSprite("", "", false);
+ }
+ }
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/LoadingDlg.cs.meta b/Client/Assets/Scripts/XMainClient/UI/LoadingDlg.cs.meta
new file mode 100644
index 00000000..0afa60b9
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/LoadingDlg.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: c4749352e8a22874cb581fa56c67b9a8
+timeCreated: 1611404501
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/LoadingDlgBehaviour.cs b/Client/Assets/Scripts/XMainClient/UI/LoadingDlgBehaviour.cs
new file mode 100644
index 00000000..5021137f
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/LoadingDlgBehaviour.cs
@@ -0,0 +1,37 @@
+using System;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+
+namespace XMainClient.UI
+{
+ internal class LoadingDlgBehaviour : DlgBehaviourBase
+ {
+ public IXUIProgress m_LoadingProgress = null;
+
+ public Transform m_LoadingBg = null;
+
+ public Transform m_Canvas = null;
+
+ public IXUILabel m_LoadingTips = null;
+
+ public IXUITexture m_LoadingPic = null;
+
+ public IXUILabel m_WaitForOthersTip = null;
+
+ public IXUISprite m_Dog = null;
+
+ private void Awake()
+ {
+ Transform transform = base.transform.Find("Dynamics/LoadingProgress");
+ this.m_LoadingProgress = (transform.GetComponent("XUIProgress") as IXUIProgress);
+ this.m_Dog = (transform.Find("Dog/").GetComponent("XUISprite") as IXUISprite);
+ this.m_Canvas = base.transform.Find("fade_canvas");
+ this.m_LoadingTips = (base.transform.Find("Bg/Label").GetComponent("XUILabel") as IXUILabel);
+ this.m_LoadingBg = base.transform.Find("Bg");
+ this.m_LoadingPic = (base.transform.Find("Bg").GetComponent("XUITexture") as IXUITexture);
+ this.m_WaitForOthersTip = (base.transform.Find("Bg/WaitOthers").GetComponent("XUILabel") as IXUILabel);
+ this.m_Canvas.gameObject.SetActive(false);
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/LoadingDlgBehaviour.cs.meta b/Client/Assets/Scripts/XMainClient/UI/LoadingDlgBehaviour.cs.meta
new file mode 100644
index 00000000..c69c1d15
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/LoadingDlgBehaviour.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 258db1abd23094b4a8351b99a22aeb66
+timeCreated: 1611403465
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/LoginWindowBehaviour.cs b/Client/Assets/Scripts/XMainClient/UI/LoginWindowBehaviour.cs
new file mode 100644
index 00000000..b09a695b
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/LoginWindowBehaviour.cs
@@ -0,0 +1,117 @@
+using System;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class LoginWindowBehaviour : DlgBehaviourBase
+ {
+ public GameObject m_normalFrame;
+
+ public GameObject m_ServerListFrame;
+
+ public GameObject m_QueueFrame;
+
+ public IXUIInput m_Account;
+
+ public IXUIInput m_Password;
+
+ public IXUIButton m_Login;
+
+ public IXUIButton m_GuestLogin;
+
+ public IXUIButton m_QQLogin;
+
+ public IXUIButton m_WXLogin;
+
+ public IXUITweenTool m_Tween;
+
+ public IXUITweenTool m_SelectPlatformTween;
+
+ public Transform m_BlockWindow;
+
+ public IXUILabel m_Version;
+
+ public IXUIButton m_Notice;
+
+ public IXUIButton m_CG;
+
+ public IXUIButton m_CustomerService;
+
+ public IXUIButton m_EnterToSelectChar;
+
+ public IXUIButton m_ReturnToLogin;
+
+ public IXUISprite m_ServerListButton;
+
+ public IXUILabel m_CurrentServer;
+
+ public Transform m_ServerList;
+
+ public IXUISprite m_CloseServerList;
+
+ public XUIPool m_AreaPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ public IXUIScrollView m_AreaScrollView;
+
+ public XUIPool m_ServerPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ public IXUIScrollView m_ServerScrollView;
+
+ public IXUIWrapContent m_FriendWrapContent;
+
+ public IXUIScrollView m_FriendScrollView;
+
+ public Transform m_ServerFrame;
+
+ public Transform m_FriendFrame;
+
+ public IXUILabel m_QueueTip;
+
+ public IXUIButton m_LeaveQueue;
+
+ private void Awake()
+ {
+ this.m_normalFrame = base.transform.Find("Bg/NormalFrame").gameObject;
+ this.m_ServerListFrame = base.transform.Find("Bg/SelectServerFrame").gameObject;
+ this.m_QueueFrame = base.transform.Find("Bg/Queue").gameObject;
+ this.m_Tween = (this.m_normalFrame.GetComponent("XUIPlayTween") as IXUITweenTool);
+ this.m_Account = (this.m_normalFrame.transform.Find("iptAccount").GetComponent("XUIInput") as IXUIInput);
+ this.m_Password = (this.m_normalFrame.transform.Find("iptPassword").GetComponent("XUIInput") as IXUIInput);
+ this.m_Login = (this.m_normalFrame.transform.Find("SelectPlatform/btnLogin").GetComponent("XUIButton") as IXUIButton);
+ this.m_GuestLogin = (this.m_normalFrame.transform.Find("SelectPlatform/btnGuest").GetComponent("XUIButton") as IXUIButton);
+ this.m_QQLogin = (this.m_normalFrame.transform.Find("SelectPlatform/btnQQ").GetComponent("XUIButton") as IXUIButton);
+ this.m_WXLogin = (this.m_normalFrame.transform.Find("SelectPlatform/btnWX").GetComponent("XUIButton") as IXUIButton);
+ this.m_SelectPlatformTween = (this.m_normalFrame.transform.Find("SelectPlatform").GetComponent("XUIPlayTween") as IXUITweenTool);
+ this.m_BlockWindow = base.transform.Find("Bg/Block");
+ this.m_Version = (base.transform.Find("Bg/Version").GetComponent("XUILabel") as IXUILabel);
+ this.m_Notice = (this.m_ServerListFrame.transform.Find("Notice").GetComponent("XUIButton") as IXUIButton);
+ this.m_CG = (this.m_ServerListFrame.transform.Find("CG").GetComponent("XUIButton") as IXUIButton);
+ this.m_CustomerService = (this.m_ServerListFrame.transform.Find("CustomerService").GetComponent("XUIButton") as IXUIButton);
+ this.m_EnterToSelectChar = (this.m_ServerListFrame.transform.Find("Enter").GetComponent("XUIButton") as IXUIButton);
+ this.m_ReturnToLogin = (this.m_ServerListFrame.transform.Find("Back").GetComponent("XUIButton") as IXUIButton);
+ this.m_ServerListButton = (this.m_ServerListFrame.transform.Find("CurrentServer").GetComponent("XUISprite") as IXUISprite);
+ this.m_CurrentServer = (this.m_ServerListFrame.transform.Find("CurrentServer/Label").GetComponent("XUILabel") as IXUILabel);
+ this.m_ServerList = this.m_ServerListFrame.transform.Find("SelectServer");
+ this.m_CloseServerList = (this.m_ServerListFrame.transform.Find("SelectServer/Close").GetComponent("XUISprite") as IXUISprite);
+ this.m_AreaScrollView = (this.m_ServerListFrame.transform.Find("SelectServer/AreaList").GetComponent("XUIScrollView") as IXUIScrollView);
+ this.m_ServerScrollView = (this.m_ServerListFrame.transform.Find("SelectServer/ServerList").GetComponent("XUIScrollView") as IXUIScrollView);
+ Transform transform = this.m_ServerListFrame.transform.Find("SelectServer/AreaList/AreaTpl");
+ this.m_AreaPool.SetupPool(transform.parent.gameObject, transform.gameObject, 5u, false);
+ transform = this.m_ServerListFrame.transform.Find("SelectServer/ServerList/ServerTpl");
+ this.m_ServerPool.SetupPool(transform.parent.gameObject, transform.gameObject, 10u, false);
+ this.m_FriendScrollView = (this.m_ServerListFrame.transform.Find("SelectServer/FriendList").GetComponent("XUIScrollView") as IXUIScrollView);
+ this.m_FriendWrapContent = (this.m_ServerListFrame.transform.Find("SelectServer/FriendList/List").GetComponent("XUIWrapContent") as IXUIWrapContent);
+ this.m_ServerFrame = this.m_ServerListFrame.transform.Find("SelectServer/ServerList");
+ this.m_FriendFrame = this.m_ServerListFrame.transform.Find("SelectServer/FriendList");
+ this.m_QueueTip = (this.m_QueueFrame.transform.Find("Tip").GetComponent("XUILabel") as IXUILabel);
+ this.m_LeaveQueue = (this.m_QueueFrame.transform.Find("Leave").GetComponent("XUIButton") as IXUIButton);
+ this.m_normalFrame.SetActive(false);
+ this.m_ServerListFrame.SetActive(false);
+ this.m_QueueFrame.SetActive(false);
+ this.m_BlockWindow.gameObject.SetActive(false);
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/LoginWindowBehaviour.cs.meta b/Client/Assets/Scripts/XMainClient/UI/LoginWindowBehaviour.cs.meta
new file mode 100644
index 00000000..f7fef686
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/LoginWindowBehaviour.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: e2d067cf315045a4c86e8b45914af6b1
+timeCreated: 1611404729
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/LoverLivenessRecordItem.cs b/Client/Assets/Scripts/XMainClient/UI/LoverLivenessRecordItem.cs
new file mode 100644
index 00000000..80418324
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/LoverLivenessRecordItem.cs
@@ -0,0 +1,41 @@
+using System;
+using UILib;
+using UnityEngine;
+
+namespace XMainClient.UI
+{
+ public class LoverLivenessRecordItem : MonoBehaviour
+ {
+ public IXUILabel m_nameLab;
+
+ public IXUILabel m_timeLab;
+
+ public IXUILabel m_contentLab;
+
+ private IXUISprite m_sprRoot;
+
+ private IXUISprite m_bgSpr;
+
+ private void Awake()
+ {
+ this.m_sprRoot = (base.GetComponent("XUISprite") as IXUISprite);
+ this.m_bgSpr = (base.transform.Find("Bg").GetComponent("XUISprite") as IXUISprite);
+ this.m_nameLab = (base.transform.Find("Bg/Name").GetComponent("XUILabel") as IXUILabel);
+ this.m_timeLab = (base.transform.Find("Bg/Time").GetComponent("XUILabel") as IXUILabel);
+ this.m_contentLab = (base.transform.Find("Bg/Description").GetComponent("XUILabel") as IXUILabel);
+ }
+
+ public void Refresh(LoverLivenessRecord record)
+ {
+ bool flag = record == null;
+ if (!flag)
+ {
+ this.m_nameLab.SetText(record.Name);
+ this.m_timeLab.SetText(record.ShowTimeStr);
+ this.m_contentLab.SetText(record.ShowString);
+ this.m_sprRoot.spriteHeight = 46 + this.m_contentLab.spriteHeight;
+ this.m_bgSpr.spriteHeight = this.m_sprRoot.spriteHeight;
+ }
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/LoverLivenessRecordItem.cs.meta b/Client/Assets/Scripts/XMainClient/UI/LoverLivenessRecordItem.cs.meta
new file mode 100644
index 00000000..5ecc6993
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/LoverLivenessRecordItem.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 0fe07bbd370edf94ba24d6416db3fafa
+timeCreated: 1611403214
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/LoversLivenessBehaviour.cs b/Client/Assets/Scripts/XMainClient/UI/LoversLivenessBehaviour.cs
new file mode 100644
index 00000000..a80bbe8f
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/LoversLivenessBehaviour.cs
@@ -0,0 +1,53 @@
+using System;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class LoversLivenessBehaviour : DlgBehaviourBase
+ {
+ public ILoopScrollView m_loopScrool;
+
+ public XUIPool m_ActivityItemPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ public XUIPool m_ChestPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ public XUIPool m_RewardItemPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ public IXUISprite m_closedSpr;
+
+ public XChestProgress m_Progress;
+
+ public IXUILabel m_totalExp;
+
+ public XNumberTween m_TotalExpTween;
+
+ public IXUILabel m_chestTips;
+
+ public IXUILabel m_Name;
+
+ public IXUILabel m_Tip;
+
+ private void Awake()
+ {
+ Transform transform = base.transform.Find("Bg/RightView/ActivityTpl");
+ this.m_ActivityItemPool.SetupPool(transform.parent.gameObject, transform.gameObject, 10u, false);
+ this.m_closedSpr = (base.transform.Find("Bg/Close").GetComponent("XUISprite") as IXUISprite);
+ this.m_Progress = new XChestProgress(base.transform.Find("Bg/UpView/Progress").GetComponent("XUIProgress") as IXUIProgress);
+ transform = base.transform.Find("Bg/UpView/Progress/Chests/Chest");
+ this.m_ChestPool.SetupPool(transform.parent.gameObject, transform.gameObject, 5u, false);
+ transform = base.transform.Find("Bg/LeftView/Item");
+ this.m_RewardItemPool.SetupPool(transform.parent.gameObject, transform.gameObject, 3u, false);
+ this.m_totalExp = (base.transform.Find("Bg/UpView/CurrentExp").GetComponent("XUILabel") as IXUILabel);
+ this.m_TotalExpTween = XNumberTween.Create(this.m_totalExp);
+ this.m_TotalExpTween.SetNumberWithTween(0UL, "", false, true);
+ this.m_chestTips = (base.transform.Find("Bg/LeftView/BigChest/Tips/Exp").GetComponent("XUILabel") as IXUILabel);
+ this.m_loopScrool = (base.transform.Find("Bg/RightView").GetComponent("LoopScrollView") as ILoopScrollView);
+ this.m_ChestPool.ReturnAll(false);
+ this.m_Name = (base.transform.Find("Bg/UpView/CurrentExp/T").GetComponent("XUILabel") as IXUILabel);
+ this.m_Tip = (base.transform.Find("Bg/Bg/Label").GetComponent("XUILabel") as IXUILabel);
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/LoversLivenessBehaviour.cs.meta b/Client/Assets/Scripts/XMainClient/UI/LoversLivenessBehaviour.cs.meta
new file mode 100644
index 00000000..b54ce03c
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/LoversLivenessBehaviour.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: f5968575c04631845b4af86f6edce48f
+timeCreated: 1611404877
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/LoversLivenessDlg.cs b/Client/Assets/Scripts/XMainClient/UI/LoversLivenessDlg.cs
new file mode 100644
index 00000000..f4e603b4
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/LoversLivenessDlg.cs
@@ -0,0 +1,254 @@
+using System;
+using System.Collections.Generic;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class LoversLivenessDlg : DlgBase<LoversLivenessDlg, LoversLivenessBehaviour>
+ {
+ public override string fileName
+ {
+ get
+ {
+ return "GameSystem/Wedding/WeddingLoverLiveness";
+ }
+ }
+
+ public override int layer
+ {
+ get
+ {
+ return 1;
+ }
+ }
+
+ public override bool autoload
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override bool fullscreenui
+ {
+ get
+ {
+ return false;
+ }
+ }
+
+ private static readonly uint m_expIncreaseSpeed = 800u;
+
+ private int m_CurSelectIndex = 0;
+
+ private float m_fCoolTime = 0.5f;
+
+ private float m_fLastClickBtnTime = 0f;
+
+ protected override void Init()
+ {
+ GameObject tpl = base.uiBehaviour.m_loopScrool.GetTpl();
+ bool flag = tpl != null && tpl.GetComponent<LoverLivenessRecordItem>() == null;
+ if (flag)
+ {
+ tpl.AddComponent<LoverLivenessRecordItem>();
+ }
+ base.uiBehaviour.m_Progress.IncreaseSpeed = LoversLivenessDlg.m_expIncreaseSpeed;
+ for (int i = 0; i < XWeddingDocument.LoverLivenessTable.Table.Length; i++)
+ {
+ WeddingLoverLiveness.RowData rowData = XWeddingDocument.LoverLivenessTable.Table[i];
+ GameObject chest = base.uiBehaviour.m_ChestPool.FetchGameObject(false);
+ XChest chest2 = new XChest(chest, rowData.boxPic);
+ base.uiBehaviour.m_Progress.AddChest(chest2);
+ }
+ this.ChangeChestProgressState(true);
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ base.uiBehaviour.m_closedSpr.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnClosed));
+ for (int i = 0; i < XWeddingDocument.LoverLivenessTable.Table.Length; i++)
+ {
+ base.uiBehaviour.m_Progress.ChestList[i].m_Chest.ID = (ulong)((long)i);
+ base.uiBehaviour.m_Progress.ChestList[i].m_Chest.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnChestClicked));
+ }
+ }
+
+ protected override void OnShow()
+ {
+ base.uiBehaviour.m_Name.SetText(XStringDefineProxy.GetString("WeddingLoverLivenessName"));
+ base.uiBehaviour.m_Tip.SetText(XStringDefineProxy.GetString("WeddingLoverLivenessTip"));
+ XWeddingDocument.Doc.ReqPartnerLivenessInfo();
+ }
+
+ protected override void OnHide()
+ {
+ base.OnHide();
+ }
+
+ public override void StackRefresh()
+ {
+ base.StackRefresh();
+ }
+
+ protected override void OnUnload()
+ {
+ base.OnUnload();
+ base.uiBehaviour.m_Progress.Unload();
+ }
+
+ public override void OnUpdate()
+ {
+ base.OnUpdate();
+ base.uiBehaviour.m_Progress.Update(Time.deltaTime);
+ }
+
+ public void FillContent()
+ {
+ this.RefreshBox();
+ List<LoopItemData> list = new List<LoopItemData>();
+ string empty = string.Empty;
+ for (int i = 0; i < XWeddingDocument.Doc.RecordList.Count; i++)
+ {
+ LoverLivenessRecord loverLivenessRecord = XWeddingDocument.Doc.RecordList[i];
+ loverLivenessRecord.LoopID = XSingleton<XCommon>.singleton.XHash(XWeddingDocument.Doc.RecordList[i].ToString() + i);
+ list.Add(loverLivenessRecord);
+ }
+ base.uiBehaviour.m_loopScrool.Init(list, new DelegateHandler(this.RefreshRecordItem), null, 0, true);
+ }
+
+ public void RefreshBox()
+ {
+ this.ChangeChestProgressState(false);
+ this.SetCurrentExpAmi();
+ this.ShowReward(XWeddingDocument.Doc.FindNeedShowReward());
+ }
+
+ private void RefreshRecordItem(ILoopItemObject item, LoopItemData data)
+ {
+ LoverLivenessRecord loverLivenessRecord = data as LoverLivenessRecord;
+ bool flag = loverLivenessRecord != null;
+ if (flag)
+ {
+ GameObject obj = item.GetObj();
+ bool flag2 = obj != null;
+ if (flag2)
+ {
+ LoverLivenessRecordItem component = obj.GetComponent<LoverLivenessRecordItem>();
+ bool flag3 = component != null;
+ if (flag3)
+ {
+ component.Refresh(loverLivenessRecord);
+ }
+ }
+ }
+ else
+ {
+ XSingleton<XDebug>.singleton.AddErrorLog("GuildMiniReportItem info is null", null, null, null, null, null);
+ }
+ }
+
+ public void SetCurrentExpAmi()
+ {
+ base.uiBehaviour.m_Progress.TargetExp = XWeddingDocument.Doc.CurrExp;
+ base.uiBehaviour.m_TotalExpTween.SetNumberWithTween((ulong)XWeddingDocument.Doc.CurrExp, "", false, true);
+ }
+
+ public void ChangeChestProgressState(bool init = false)
+ {
+ for (int i = 0; i < XWeddingDocument.LoverLivenessTable.Table.Length; i++)
+ {
+ XChest xchest = base.uiBehaviour.m_Progress.ChestList[i];
+ if (init)
+ {
+ xchest.SetExp(XWeddingDocument.LoverLivenessTable.Table[i].liveness);
+ }
+ xchest.Opened = XWeddingDocument.Doc.IsChestOpened(i + 1);
+ }
+ if (init)
+ {
+ base.uiBehaviour.m_Progress.SetExp(0u, XWeddingDocument.MaxExp);
+ }
+ }
+
+ public void ResetBoxRedDot(int index)
+ {
+ bool flag = index < 0 || index >= base.uiBehaviour.m_Progress.ChestList.Count;
+ if (!flag)
+ {
+ base.uiBehaviour.m_Progress.ChestList[index].Open();
+ }
+ }
+
+ private void OnChestClicked(IXUISprite iSp)
+ {
+ bool flag = this.SetButtonCool(this.m_fCoolTime);
+ if (!flag)
+ {
+ int num = (int)iSp.ID;
+ this.ShowReward(num);
+ bool flag2 = base.uiBehaviour.m_Progress.IsExpEnough(num);
+ if (flag2)
+ {
+ WeddingLoverLiveness.RowData rowData = XWeddingDocument.LoverLivenessTable.Table[num];
+ bool flag3 = rowData != null;
+ if (flag3)
+ {
+ XWeddingDocument.Doc.ReqTakePartnerChest(rowData.index);
+ }
+ }
+ }
+ }
+
+ public void ShowReward(int index)
+ {
+ this.m_CurSelectIndex = index;
+ base.uiBehaviour.m_RewardItemPool.ReturnAll(false);
+ WeddingLoverLiveness.RowData rowData = XWeddingDocument.LoverLivenessTable.Table[index];
+ for (int i = 0; i < rowData.viewabledrop.Count; i++)
+ {
+ GameObject gameObject = base.uiBehaviour.m_RewardItemPool.FetchGameObject(false);
+ bool flag = rowData.viewabledrop[i, 0] == 4u;
+ if (flag)
+ {
+ XSingleton<XItemDrawerMgr>.singleton.normalItemDrawer.DrawItem(gameObject, (int)rowData.viewabledrop[i, 0], 0, false);
+ }
+ else
+ {
+ XSingleton<XItemDrawerMgr>.singleton.normalItemDrawer.DrawItem(gameObject, (int)rowData.viewabledrop[i, 0], (int)rowData.viewabledrop[i, 1], true);
+ }
+ XSingleton<XItemDrawerMgr>.singleton.normalItemDrawer.OpenClickShowTooltipEvent(gameObject, (int)rowData.viewabledrop[i, 0]);
+ Vector3 tplPos = base.uiBehaviour.m_RewardItemPool.TplPos;
+ gameObject.transform.localPosition = new Vector3(tplPos.x + (float)base.uiBehaviour.m_RewardItemPool.TplWidth * ((float)(-(float)rowData.viewabledrop.Count) / 2f + 0.5f + (float)i), tplPos.y, tplPos.z);
+ }
+ base.uiBehaviour.m_chestTips.SetText(rowData.liveness.ToString());
+ }
+
+ private void OnClosed(IXUISprite spr)
+ {
+ this.SetVisible(false, true);
+ }
+
+ private bool SetButtonCool(float time)
+ {
+ float num = Time.realtimeSinceStartup - this.m_fLastClickBtnTime;
+ bool flag = num < time;
+ bool result;
+ if (flag)
+ {
+ result = true;
+ }
+ else
+ {
+ this.m_fLastClickBtnTime = Time.realtimeSinceStartup;
+ result = false;
+ }
+ return result;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/LoversLivenessDlg.cs.meta b/Client/Assets/Scripts/XMainClient/UI/LoversLivenessDlg.cs.meta
new file mode 100644
index 00000000..adb47ed3
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/LoversLivenessDlg.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: a0df793c081370848b2566afbd987fac
+timeCreated: 1611404251
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/LuckyTurntableFrameHandler.cs b/Client/Assets/Scripts/XMainClient/UI/LuckyTurntableFrameHandler.cs
new file mode 100644
index 00000000..501bd1d5
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/LuckyTurntableFrameHandler.cs
@@ -0,0 +1,493 @@
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using KKSG;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class LuckyTurntableFrameHandler : DlgHandlerBase
+ {
+ protected override string FileName
+ {
+ get
+ {
+ return "OperatingActivity/LuckyTurntableFrame";
+ }
+ }
+
+ private XOperatingActivityDocument doc;
+
+ private XCharacterItemDocument doc_item;
+
+ private IXUIButton m_btnBuy;
+
+ private IXUIButton m_btnUse;
+
+ private IXUITweenTool m_btnUseFxControl;
+
+ private IXUIButton m_btnInvalid;
+
+ private IXUIButton m_btnRecord;
+
+ private IXUIButton m_btnHelp;
+
+ private Transform m_AwardRoot;
+
+ private XUIPool m_ItemPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ private Transform m_CostRoot;
+
+ private IXUISprite m_CostImg;
+
+ private IXUILabel m_CostLabel;
+
+ private IXUILabel m_TipTime;
+
+ private IXUILabel m_TipDesc;
+
+ private Vector3[] m_positions = new Vector3[8];
+
+ private IXUITweenTool[] m_tail_fxes = new IXUITweenTool[8];
+
+ private IXUILabel m_LabelDataRange1;
+
+ private IXUILabel m_LabelDataNum2;
+
+ private IXUILabel m_LabelDataRange3;
+
+ private double[] m_DataRange1;
+
+ private double m_DateRange2;
+
+ private int m_DataNum2;
+
+ private double[] m_DataRange3;
+
+ private Transform m_SelectFxRoot;
+
+ private IXUITweenTool m_SelectFxControl;
+
+ private IEnumerator _fx_coroutine;
+
+ private List<XFx> m_ItemEffectList = new List<XFx>();
+
+ protected override void Init()
+ {
+ base.Init();
+ this.doc = XDocuments.GetSpecificDocument<XOperatingActivityDocument>(XOperatingActivityDocument.uuID);
+ this.doc_item = XDocuments.GetSpecificDocument<XCharacterItemDocument>(XCharacterItemDocument.uuID);
+ this.m_btnRecord = (base.PanelObject.transform.Find("Main/EnterBtn").GetComponent("XUIButton") as IXUIButton);
+ this.m_btnBuy = (base.PanelObject.transform.Find("Main/BuyBtn").GetComponent("XUIButton") as IXUIButton);
+ this.m_btnUse = (base.PanelObject.transform.Find("Main/BeginBtn").GetComponent("XUIButton") as IXUIButton);
+ this.m_btnUseFxControl = (this.m_btnUse.gameObject.transform.Find("FxUse").GetComponent("XUIPlayTween") as IXUITweenTool);
+ this.m_btnInvalid = (base.PanelObject.transform.Find("Main/EndBtn").GetComponent("XUIButton") as IXUIButton);
+ this.m_btnHelp = (base.PanelObject.transform.Find("Main/Help").GetComponent("XUIButton") as IXUIButton);
+ this.m_CostRoot = base.PanelObject.transform.Find("Main/Tip2");
+ this.m_CostImg = (this.m_CostRoot.Find("p").GetComponent("XUISprite") as IXUISprite);
+ this.m_CostLabel = (this.m_CostRoot.Find("Tip2").GetComponent("XUILabel") as IXUILabel);
+ this.m_TipTime = (base.PanelObject.transform.Find("Main/TipTime").GetComponent("XUILabel") as IXUILabel);
+ this.m_TipDesc = (base.PanelObject.transform.Find("Main/TipDesc").GetComponent("XUILabel") as IXUILabel);
+ this.m_LabelDataRange1 = (base.PanelObject.transform.Find("Main/DataRange1").GetComponent("XUILabel") as IXUILabel);
+ this.m_LabelDataNum2 = (base.PanelObject.transform.Find("Main/DataNum2").GetComponent("XUILabel") as IXUILabel);
+ this.m_LabelDataRange3 = (base.PanelObject.transform.Find("Main/DataRange3").GetComponent("XUILabel") as IXUILabel);
+ this.m_LabelDataRange1.gameObject.SetActive(false);
+ this.m_LabelDataNum2.gameObject.SetActive(false);
+ this.m_LabelDataRange3.gameObject.SetActive(false);
+ this.m_TipTime.SetText(XStringDefineProxy.GetString("LuckyTurnTable_Tip_Time"));
+ this.m_TipDesc.SetText(XStringDefineProxy.GetString("LuckyTurnTable_Tip_Desc"));
+ this.m_AwardRoot = base.PanelObject.transform.Find("Main/Items");
+ GameObject gameObject = base.PanelObject.transform.Find("Main/Items/ItemTpl").gameObject;
+ this.m_ItemPool.SetupPool(this.m_AwardRoot.gameObject, gameObject, 8u, false);
+ for (int i = 0; i < 8; i++)
+ {
+ Transform transform = this.m_AwardRoot.Find("Item" + i);
+ this.m_positions[i] = transform.localPosition;
+ }
+ this.m_SelectFxRoot = base.PanelObject.transform.Find("Main/Items/Selected");
+ this.m_SelectFxControl = (this.m_SelectFxRoot.GetComponent("XUIPlayTween") as IXUITweenTool);
+ this.m_SelectFxRoot.gameObject.SetActive(false);
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ this.m_btnRecord.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnClickRecordBtn));
+ this.m_btnBuy.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnClickBuyBtn));
+ this.m_btnUse.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnClickUseBtn));
+ this.m_btnInvalid.RegisterClickEventHandler((IXUIButton btn) => true);
+ this.m_btnHelp.RegisterClickEventHandler(delegate(IXUIButton btn)
+ {
+ DlgBase<XCommonHelpTipView, XCommonHelpTipBehaviour>.singleton.ShowHelp(XStringDefineProxy.GetString("LuckyTurnTable_HelpTitle"), XStringDefineProxy.GetString("LuckyTurnTable_HelpMessage"));
+ return true;
+ });
+ }
+
+ private bool OnClickRecordBtn(IXUIButton btn)
+ {
+ XOperatingActivityDocument.LuckyTurntableInfo luckyTurntableData = this.doc.m_LuckyTurntableData;
+ List<KeyValuePair<int, int>> list = new List<KeyValuePair<int, int>>();
+ foreach (XOperatingActivityDocument.LuckyTurntableItem luckyTurntableItem in luckyTurntableData.Items)
+ {
+ bool hasReceived = luckyTurntableItem.HasReceived;
+ if (hasReceived)
+ {
+ list.Add(new KeyValuePair<int, int>(luckyTurntableItem.ItemID, luckyTurntableItem.ItemCount));
+ }
+ }
+ DlgBase<LuckyTurntableRecordView, LuckyTurntableRecordBehaviour>.singleton.ShowList(list);
+ return true;
+ }
+
+ private bool OnClickBuyBtn(IXUIButton btn)
+ {
+ bool flag = this._fx_coroutine != null;
+ bool result;
+ if (flag)
+ {
+ result = true;
+ }
+ else
+ {
+ XOperatingActivityDocument.LuckyTurntableInfo luckyTurntableData = this.doc.m_LuckyTurntableData;
+ bool flag2 = !luckyTurntableData.IsPay && luckyTurntableData.CanBuy;
+ if (flag2)
+ {
+ int currencyType = luckyTurntableData.CurrencyType;
+ int price = (int)luckyTurntableData.Price;
+ ulong itemCount = XBagDocument.BagDoc.GetItemCount(currencyType);
+ bool flag3 = itemCount < (ulong)((long)price);
+ if (flag3)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(ErrorCode.ERR_ITEM_NOT_ENOUGH, "fece00");
+ return true;
+ }
+ this.doc.RequestBuyLuckyTurntable();
+ }
+ else
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemNoticeTip("Can not buy");
+ }
+ result = true;
+ }
+ return result;
+ }
+
+ private bool OnClickUseBtn(IXUIButton btn)
+ {
+ bool flag = this._fx_coroutine != null;
+ bool result;
+ if (flag)
+ {
+ result = true;
+ }
+ else
+ {
+ XOperatingActivityDocument.LuckyTurntableInfo luckyTurntableData = this.doc.m_LuckyTurntableData;
+ bool isPay = luckyTurntableData.IsPay;
+ if (isPay)
+ {
+ this.doc_item.ToggleBlock(true);
+ this.doc.RequestUseLuckyTurntable();
+ }
+ else
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemNoticeTip("Can not use");
+ }
+ result = true;
+ }
+ return result;
+ }
+
+ private void PlayFxAt(int index, bool first = false)
+ {
+ this.m_SelectFxRoot.localPosition = this.m_positions[index];
+ bool flag = !first;
+ if (flag)
+ {
+ int num = (8 + index - 1) % 8;
+ IXUITweenTool ixuitweenTool = this.m_tail_fxes[num];
+ bool flag2 = ixuitweenTool != null;
+ if (flag2)
+ {
+ ixuitweenTool.gameObject.SetActive(true);
+ ixuitweenTool.ResetTween(true);
+ ixuitweenTool.PlayTween(true, -1f);
+ }
+ }
+ }
+
+ private void MoveFxTo(int index, double left_time, double total_time)
+ {
+ }
+
+ private void GetDataFromLabel()
+ {
+ string[] array = this.m_LabelDataRange1.GetText().Split(new char[]
+ {
+ ','
+ });
+ this.m_DataRange1 = new double[array.Length];
+ for (int i = 0; i < array.Length; i++)
+ {
+ this.m_DataRange1[i] = double.Parse(array[i].Trim());
+ }
+ this.m_DateRange2 = this.m_DataRange1[this.m_DataRange1.Length - 1];
+ string text = this.m_LabelDataNum2.GetText();
+ this.m_DataNum2 = int.Parse(text.Trim());
+ string[] array2 = this.m_LabelDataRange3.GetText().Split(new char[]
+ {
+ ','
+ });
+ this.m_DataRange3 = new double[array2.Length];
+ for (int j = 0; j < array2.Length; j++)
+ {
+ this.m_DataRange3[j] = double.Parse(array2[j].Trim());
+ }
+ }
+
+ private IEnumerator PlayFx(int index)
+ {
+ this.m_SelectFxRoot.gameObject.SetActive(true);
+ this.m_SelectFxControl.SetTweenGroup(0);
+ this.m_SelectFxControl.PlayTween(true, -1f);
+ this.m_btnUseFxControl.gameObject.SetActive(true);
+ this.m_btnUseFxControl.StopTween();
+ this.m_btnUseFxControl.SetTweenGroup(0);
+ this.m_btnUseFxControl.PlayTween(true, -1f);
+ try
+ {
+ this.GetDataFromLabel();
+ }
+ catch
+ {
+ this.doc_item.ToggleBlock(false);
+ this.RefeshInfo();
+ yield break;
+ }
+ double wait_time = 0.0;
+ int idx = new System.Random(Time.frameCount).Next(0, 7);
+ int num2 = 32;
+ double[] ts = this.m_DataRange1;
+ double ts2 = this.m_DateRange2;
+ num2 = this.m_DataNum2 * 8;
+ double[] ts3 = this.m_DataRange3;
+ bool first = true;
+ int num3;
+ for (int i = 0; i < ts.Length; i = num3 + 1)
+ {
+ idx = (idx + 1) % 8;
+ this.PlayFxAt(idx, first);
+ first = false;
+ for (wait_time = ts[i]; wait_time > 0.0; wait_time -= (double)Time.deltaTime)
+ {
+ this.MoveFxTo(idx, wait_time, ts[i]);
+ yield return null;
+ }
+ num3 = i;
+ }
+ int mid_num = (index - ts3.Length - idx + 160) % 8 + num2;
+ for (int j = 0; j < mid_num; j = num3 + 1)
+ {
+ idx = (idx + 1) % 8;
+ this.PlayFxAt(idx, false);
+ for (wait_time = ts2; wait_time > 0.0; wait_time -= (double)Time.deltaTime)
+ {
+ this.MoveFxTo(idx, wait_time, ts2);
+ yield return null;
+ }
+ num3 = j;
+ }
+ for (int k = 0; k < ts3.Length; k = num3 + 1)
+ {
+ idx = (idx + 1) % 8;
+ this.PlayFxAt(idx, false);
+ for (wait_time = ts3[k]; wait_time > 0.0; wait_time -= (double)Time.deltaTime)
+ {
+ this.MoveFxTo(idx, wait_time, ts3[k]);
+ yield return null;
+ }
+ num3 = k;
+ }
+ this.doc_item.ToggleBlock(false);
+ this.m_btnUseFxControl.SetTweenGroup(1);
+ this.m_btnUseFxControl.PlayTween(true, -1f);
+ this.m_SelectFxControl.StopTween();
+ this.m_SelectFxControl.SetTweenGroup(1);
+ this.m_SelectFxControl.PlayTween(true, -1f);
+ for (wait_time = 1.0; wait_time > 0.0; wait_time -= (double)Time.deltaTime)
+ {
+ yield return null;
+ }
+ this.RefeshInfo();
+ yield break;
+ }
+
+ protected override void OnHide()
+ {
+ base.OnHide();
+ this._fx_coroutine = null;
+ this.doc_item.ToggleBlock(false);
+ }
+
+ public override void OnUnload()
+ {
+ this.ClearEffectList(false);
+ base.OnUnload();
+ this._fx_coroutine = null;
+ this.doc_item.ToggleBlock(false);
+ }
+
+ public override void OnUpdate()
+ {
+ bool flag = this._fx_coroutine != null;
+ if (flag)
+ {
+ bool flag2 = !this._fx_coroutine.MoveNext();
+ if (flag2)
+ {
+ this._fx_coroutine = null;
+ }
+ }
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ XSingleton<XGameSysMgr>.singleton.SetSysRedState(XSysDefine.XSys_LuckyTurntable, false);
+ this.doc.RefreshRedPoints();
+ this.doc.RequestGetLuckyTurntableData();
+ this._fx_coroutine = null;
+ }
+
+ public void RefeshInfo()
+ {
+ XOperatingActivityDocument.LuckyTurntableInfo luckyTurntableData = this.doc.m_LuckyTurntableData;
+ this.m_btnBuy.gameObject.SetActive(false);
+ this.m_btnInvalid.gameObject.SetActive(false);
+ this.m_btnUse.gameObject.SetActive(false);
+ this.m_CostRoot.gameObject.SetActive(false);
+ bool isPay = luckyTurntableData.IsPay;
+ if (isPay)
+ {
+ this.m_btnUse.gameObject.SetActive(true);
+ this.m_btnUseFxControl.gameObject.SetActive(false);
+ }
+ else
+ {
+ bool canBuy = luckyTurntableData.CanBuy;
+ if (canBuy)
+ {
+ this.m_btnBuy.gameObject.SetActive(true);
+ Transform transform = this.m_btnBuy.gameObject.transform.Find("Label");
+ bool flag = luckyTurntableData.Price > 0u;
+ if (flag)
+ {
+ this.m_CostRoot.gameObject.SetActive(true);
+ this.m_CostLabel.SetText(luckyTurntableData.Price.ToString());
+ string strSprite;
+ string strAtlas;
+ XBagDocument.GetItemSmallIconAndAtlas(luckyTurntableData.CurrencyType, out strSprite, out strAtlas, 0u);
+ this.m_CostImg.SetSprite(strSprite, strAtlas, false);
+ bool flag2 = transform != null;
+ if (flag2)
+ {
+ transform.gameObject.SetActive(false);
+ }
+ }
+ else
+ {
+ bool flag3 = transform != null;
+ if (flag3)
+ {
+ transform.gameObject.SetActive(true);
+ }
+ }
+ }
+ else
+ {
+ this.m_btnInvalid.gameObject.SetActive(true);
+ }
+ }
+ this.RefreashList();
+ }
+
+ public void OnGetIndex(int index)
+ {
+ this._fx_coroutine = this.PlayFx(index);
+ }
+
+ public void OnBuy()
+ {
+ this.RefeshInfo();
+ this.OnClickUseBtn(null);
+ }
+
+ private void RefreashList()
+ {
+ this._fx_coroutine = null;
+ this.m_SelectFxRoot.gameObject.SetActive(false);
+ this.ClearEffectList(true);
+ XOperatingActivityDocument.LuckyTurntableInfo luckyTurntableData = this.doc.m_LuckyTurntableData;
+ this.m_ItemPool.ReturnAll(false);
+ int num = Math.Min(8, luckyTurntableData.Items.Count);
+ for (int i = 0; i < num; i++)
+ {
+ XOperatingActivityDocument.LuckyTurntableItem luckyTurntableItem = luckyTurntableData.Items[i];
+ GameObject gameObject = this.m_ItemPool.FetchGameObject(false);
+ gameObject.name = i.ToString() + "-" + luckyTurntableItem.ItemID.ToString();
+ gameObject.transform.localScale = Vector3.one;
+ gameObject.transform.localPosition = this.m_positions[i];
+ IXUISprite ixuisprite = gameObject.transform.Find("Icon").GetComponent("XUISprite") as IXUISprite;
+ IXUISprite ixuisprite2 = gameObject.transform.Find("Quality").GetComponent("XUISprite") as IXUISprite;
+ IXUITweenTool ixuitweenTool = gameObject.transform.Find("tail_fx").GetComponent("XUIPlayTween") as IXUITweenTool;
+ ixuitweenTool.gameObject.SetActive(false);
+ this.m_tail_fxes[i] = ixuitweenTool;
+ ixuisprite.ID = (ulong)((long)luckyTurntableItem.ItemID);
+ bool flag = !luckyTurntableItem.HasReceived;
+ if (flag)
+ {
+ ItemList.RowData itemConf = XBagDocument.GetItemConf(luckyTurntableItem.ItemID);
+ this.SetItemEffect(ixuisprite2.gameObject, itemConf.ItemEffect);
+ }
+ XSingleton<XItemDrawerMgr>.singleton.normalItemDrawer.DrawItem(gameObject, luckyTurntableItem.ItemID, luckyTurntableItem.ItemCount, false);
+ ixuisprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(XSingleton<UiUtility>.singleton.OnItemClick));
+ ixuisprite.SetGrey(!luckyTurntableItem.HasReceived);
+ ixuisprite2.SetGrey(!luckyTurntableItem.HasReceived);
+ }
+ }
+
+ private void ClearEffectList(bool immediate)
+ {
+ bool flag = this.m_ItemEffectList != null;
+ if (flag)
+ {
+ int i = 0;
+ int count = this.m_ItemEffectList.Count;
+ while (i < count)
+ {
+ XSingleton<XFxMgr>.singleton.DestroyFx(this.m_ItemEffectList[i], immediate);
+ i++;
+ }
+ this.m_ItemEffectList.Clear();
+ }
+ }
+
+ private void SetItemEffect(GameObject parent, string effectName)
+ {
+ bool flag = string.IsNullOrEmpty(effectName);
+ if (!flag)
+ {
+ XFx xfx = XSingleton<XFxMgr>.singleton.CreateUIFx(effectName, parent.transform, false);
+ bool flag2 = xfx != null;
+ if (flag2)
+ {
+ this.m_ItemEffectList.Add(xfx);
+ }
+ }
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/LuckyTurntableFrameHandler.cs.meta b/Client/Assets/Scripts/XMainClient/UI/LuckyTurntableFrameHandler.cs.meta
new file mode 100644
index 00000000..44256ac0
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/LuckyTurntableFrameHandler.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 69686fc8b4b1bc74395f40a90732e476
+timeCreated: 1611403886
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/LuckyTurntableRecordBehaviour.cs b/Client/Assets/Scripts/XMainClient/UI/LuckyTurntableRecordBehaviour.cs
new file mode 100644
index 00000000..e6a128b1
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/LuckyTurntableRecordBehaviour.cs
@@ -0,0 +1,9 @@
+using System;
+using XMainClient.UI.UICommon;
+
+namespace XMainClient.UI
+{
+ internal class LuckyTurntableRecordBehaviour : DlgBehaviourBase
+ {
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/LuckyTurntableRecordBehaviour.cs.meta b/Client/Assets/Scripts/XMainClient/UI/LuckyTurntableRecordBehaviour.cs.meta
new file mode 100644
index 00000000..3c23d3c4
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/LuckyTurntableRecordBehaviour.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 8c004d6ec9d29c043914bf03b8478cb0
+timeCreated: 1611404097
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/LuckyTurntableRecordView.cs b/Client/Assets/Scripts/XMainClient/UI/LuckyTurntableRecordView.cs
new file mode 100644
index 00000000..9fa9f3a0
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/LuckyTurntableRecordView.cs
@@ -0,0 +1,126 @@
+using System;
+using System.Collections.Generic;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class LuckyTurntableRecordView : DlgBase<LuckyTurntableRecordView, LuckyTurntableRecordBehaviour>
+ {
+ public override string fileName
+ {
+ get
+ {
+ return "OperatingActivity/LuckyRecordDlg";
+ }
+ }
+
+ private IXUIButton m_btnBack;
+
+ private IXUIButton m_btnClose;
+
+ private XUIPool m_ItemPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ private Transform m_root;
+
+ private Dictionary<int, int> m_map = new Dictionary<int, int>();
+
+ protected override void Init()
+ {
+ this.m_btnBack = (base.uiBehaviour.transform.Find("backclick").GetComponent("XUIButton") as IXUIButton);
+ this.m_btnClose = (base.uiBehaviour.transform.Find("Bg/Close").GetComponent("XUIButton") as IXUIButton);
+ this.m_root = base.uiBehaviour.transform.Find("Bg/ScrollView");
+ GameObject gameObject = base.uiBehaviour.transform.Find("Bg/ScrollView/Item").gameObject;
+ this.m_ItemPool.SetupPool(this.m_root.gameObject, gameObject, 8u, false);
+ }
+
+ public void ShowList(List<KeyValuePair<int, int>> list)
+ {
+ this.m_map.Clear();
+ foreach (KeyValuePair<int, int> keyValuePair in list)
+ {
+ bool flag = !this.m_map.ContainsKey(keyValuePair.Key);
+ if (flag)
+ {
+ this.m_map[keyValuePair.Key] = 0;
+ }
+ Dictionary<int, int> map = this.m_map;
+ int key = keyValuePair.Key;
+ map[key] += keyValuePair.Value;
+ }
+ this.SetVisibleWithAnimation(true, null);
+ this.RefreshList();
+ }
+
+ public void RefreshList()
+ {
+ this.m_ItemPool.ReturnAll(false);
+ List<KeyValuePair<int, int>> list = new List<KeyValuePair<int, int>>(this.m_map);
+ list.Sort(delegate(KeyValuePair<int, int> a, KeyValuePair<int, int> b)
+ {
+ ItemList.RowData itemConf = XBagDocument.GetItemConf(a.Key);
+ ItemList.RowData itemConf2 = XBagDocument.GetItemConf(b.Key);
+ bool flag = itemConf == null;
+ int result;
+ if (flag)
+ {
+ result = 1;
+ }
+ else
+ {
+ bool flag2 = itemConf2 == null;
+ if (flag2)
+ {
+ result = -1;
+ }
+ else
+ {
+ bool flag3 = itemConf.ItemQuality > itemConf2.ItemQuality;
+ if (flag3)
+ {
+ result = -1;
+ }
+ else
+ {
+ bool flag4 = itemConf.ItemQuality < itemConf2.ItemQuality;
+ if (flag4)
+ {
+ result = 1;
+ }
+ else
+ {
+ result = itemConf.SortID.CompareTo(itemConf2.SortID);
+ }
+ }
+ }
+ }
+ return result;
+ });
+ for (int i = 0; i < list.Count; i++)
+ {
+ KeyValuePair<int, int> keyValuePair = list[i];
+ GameObject gameObject = this.m_ItemPool.FetchGameObject(false);
+ gameObject.name = keyValuePair.Key.ToString();
+ gameObject.transform.localPosition = new Vector3((float)(i * this.m_ItemPool.TplWidth), 0f, 0f) + this.m_ItemPool.TplPos;
+ IXUISprite ixuisprite = gameObject.transform.Find("Icon").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.ID = (ulong)((long)keyValuePair.Key);
+ XSingleton<XItemDrawerMgr>.singleton.normalItemDrawer.DrawItem(gameObject, keyValuePair.Key, keyValuePair.Value, false);
+ ixuisprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(XSingleton<UiUtility>.singleton.OnItemClick));
+ }
+ }
+
+ public override void RegisterEvent()
+ {
+ this.m_btnClose.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnCloseClicked));
+ this.m_btnBack.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnCloseClicked));
+ }
+
+ private bool OnCloseClicked(IXUIButton sp)
+ {
+ this.SetVisibleWithAnimation(false, null);
+ return true;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/LuckyTurntableRecordView.cs.meta b/Client/Assets/Scripts/XMainClient/UI/LuckyTurntableRecordView.cs.meta
new file mode 100644
index 00000000..b6befe46
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/LuckyTurntableRecordView.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 5aa4ec89fbaad3b4093873e0c7e4877e
+timeCreated: 1611403791
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/MailSystemDlg.cs b/Client/Assets/Scripts/XMainClient/UI/MailSystemDlg.cs
new file mode 100644
index 00000000..9b807db7
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/MailSystemDlg.cs
@@ -0,0 +1,94 @@
+using System;
+using UnityEngine;
+using XMainClient.Utility;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class MailSystemDlg : TabDlgBase<MailSystemDlg>
+ {
+ public override string fileName
+ {
+ get
+ {
+ return "GameSystem/MailDlg";
+ }
+ }
+
+ public override int group
+ {
+ get
+ {
+ return 1;
+ }
+ }
+
+ public XSystemMailView _systemFrameView;
+
+ public XPlayerMailView _playerFrameView;
+
+ public XContentMailView _contMailView;
+
+ private XMailDocument _doc = null;
+
+ public GameObject m_systemFramePanel;
+
+ public GameObject m_playerFramePanel;
+
+ public GameObject m_contentFramePanel;
+
+ public Transform tabTpl;
+
+ public XUITabControl m_tabcontrol = new XUITabControl();
+
+ protected override void Init()
+ {
+ base.Init();
+ base.RegisterSubSysRedPointMgr(XSysDefine.XSys_Mail);
+ this._doc = (XSingleton<XGame>.singleton.Doc.GetXComponent(XMailDocument.uuID) as XMailDocument);
+ }
+
+ protected override void OnLoad()
+ {
+ base.OnLoad();
+ this.tabTpl = base.uiBehaviour.transform.Find("Bg/Tabs/TabTpl");
+ this.m_tabcontrol.SetTabTpl(this.tabTpl);
+ this.m_systemFramePanel = base.uiBehaviour.transform.Find("Bg/SystemFrame").gameObject;
+ this.m_systemFramePanel.SetActive(true);
+ this.m_playerFramePanel = base.uiBehaviour.transform.Find("Bg/PlayerFrame").gameObject;
+ this.m_playerFramePanel.SetActive(false);
+ this.m_contentFramePanel = base.uiBehaviour.transform.Find("Bg/ContentFrame").gameObject;
+ this.m_contentFramePanel.SetActive(true);
+ }
+
+ protected override void OnUnload()
+ {
+ DlgHandlerBase.EnsureUnload<XSystemMailView>(ref this._systemFrameView);
+ DlgHandlerBase.EnsureUnload<XPlayerMailView>(ref this._playerFrameView);
+ DlgHandlerBase.EnsureUnload<XContentMailView>(ref this._contMailView);
+ base.OnUnload();
+ }
+
+ public override void SetupHandlers(XSysDefine sys)
+ {
+ this._doc = (XSingleton<XGame>.singleton.Doc.GetXComponent(XMailDocument.uuID) as XMailDocument);
+ base._AddActiveHandler(DlgHandlerBase.EnsureCreate<XContentMailView>(ref this._contMailView, this.m_contentFramePanel, null, true));
+ XSysDefine xsysDefine = sys;
+ if (xsysDefine != XSysDefine.XSys_Mail_System)
+ {
+ if (xsysDefine != XSysDefine.XSys_Mail_Player)
+ {
+ XSingleton<XDebug>.singleton.AddErrorLog("System has not finished:", sys.ToString(), null, null, null, null);
+ }
+ else
+ {
+ base._AddActiveHandler(DlgHandlerBase.EnsureCreate<XPlayerMailView>(ref this._playerFrameView, this.m_playerFramePanel, this, true));
+ }
+ }
+ else
+ {
+ base._AddActiveHandler(DlgHandlerBase.EnsureCreate<XSystemMailView>(ref this._systemFrameView, this.m_systemFramePanel, this, true));
+ }
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/MailSystemDlg.cs.meta b/Client/Assets/Scripts/XMainClient/UI/MailSystemDlg.cs.meta
new file mode 100644
index 00000000..95149d20
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/MailSystemDlg.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: a7ce35a759146784887f8f4f5e89d5ca
+timeCreated: 1611404292
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/MallSystemDlg.cs b/Client/Assets/Scripts/XMainClient/UI/MallSystemDlg.cs
new file mode 100644
index 00000000..21dea622
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/MallSystemDlg.cs
@@ -0,0 +1,262 @@
+using System;
+using System.Collections.Generic;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class MallSystemDlg : DlgBase<MallSystemDlg, MallSystemBehaviour>
+ {
+ public XShopPurchaseView PurchaseView
+ {
+ get
+ {
+ return this._PurchaseView;
+ }
+ }
+
+ public override string fileName
+ {
+ get
+ {
+ return "GameSystem/MallDlg";
+ }
+ }
+
+ public override bool pushstack
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override bool hideMainMenu
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override int sysid
+ {
+ get
+ {
+ return XFastEnumIntEqualityComparer<XSysDefine>.ToInt(this._sys);
+ }
+ }
+
+ public XSysDefine SetSys
+ {
+ set
+ {
+ this._sys = value;
+ }
+ }
+
+ public override bool autoload
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public XMystShopView _MystShopView;
+
+ public XNormalShopView _NormalShopView;
+
+ public XShopPurchaseView _PurchaseView;
+
+ public XShopTabCategoryHandler _TabCategoryHandler;
+
+ public GameObject m_MystShopPanel;
+
+ public GameObject m_NormalShopPanel;
+
+ private GameObject m_TabShopPanel;
+
+ public bool m_OpenFromGeneral = false;
+
+ private XSysDefine _sys = XSysDefine.XSys_Mall_Mall;
+
+ public List<int> m_MoneyTypeList = new List<int>();
+
+ protected XSysDefine m_Sys = XSysDefine.XSys_Invalid;
+
+ protected override void Init()
+ {
+ base.Init();
+ this.m_MystShopPanel = base.uiBehaviour.transform.Find("Bg/MystShopFrame").gameObject;
+ this.m_MystShopPanel.SetActive(false);
+ this.m_NormalShopPanel = base.uiBehaviour.transform.Find("Bg/NormalShopFrame").gameObject;
+ this.m_NormalShopPanel.SetActive(false);
+ this.m_TabShopPanel = base.uiBehaviour.transform.Find("Bg/TabShopFrame").gameObject;
+ this.m_TabShopPanel.SetActive(false);
+ DlgHandlerBase.EnsureCreate<XMystShopView>(ref this._MystShopView, this.m_MystShopPanel, null, false);
+ DlgHandlerBase.EnsureCreate<XNormalShopView>(ref this._NormalShopView, this.m_NormalShopPanel, this, false);
+ DlgHandlerBase.EnsureCreate<XShopTabCategoryHandler>(ref this._TabCategoryHandler, this.m_TabShopPanel, null, false);
+ Transform parent = base.uiBehaviour.transform.Find("Bg");
+ DlgHandlerBase.EnsureCreate<XShopPurchaseView>(ref this._PurchaseView, parent, false, this);
+ }
+
+ protected override void OnLoad()
+ {
+ base.OnLoad();
+ }
+
+ protected override void OnUnload()
+ {
+ DlgHandlerBase.EnsureUnload<XMystShopView>(ref this._MystShopView);
+ DlgHandlerBase.EnsureUnload<XNormalShopView>(ref this._NormalShopView);
+ DlgHandlerBase.EnsureUnload<XShopPurchaseView>(ref this._PurchaseView);
+ DlgHandlerBase.EnsureUnload<XShopTabCategoryHandler>(ref this._TabCategoryHandler);
+ base.OnUnload();
+ }
+
+ public override void RegisterEvent()
+ {
+ base.uiBehaviour.m_Close.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnCloseShop));
+ }
+
+ public bool OnCloseShop(IXUIButton sp)
+ {
+ this.SetVisible(false, true);
+ this._PurchaseView.SetVisible(false);
+ this._NormalShopView.SetVisible(false);
+ this._MystShopView.SetVisible(false);
+ this._TabCategoryHandler.SetVisible(false);
+ this.m_OpenFromGeneral = false;
+ return true;
+ }
+
+ public void HideShopSystem()
+ {
+ bool flag = this._NormalShopView != null;
+ if (flag)
+ {
+ this._NormalShopView.SetVisible(false);
+ }
+ }
+
+ public void ShowShopSystem(XSysDefine sys, ulong itemID = 0UL)
+ {
+ XNormalShopDocument specificDocument = XDocuments.GetSpecificDocument<XNormalShopDocument>(XNormalShopDocument.uuID);
+ specificDocument.ToSelectShopItemID = itemID;
+ ShopTypeTable.RowData shopTypeData = specificDocument.GetShopTypeData(sys);
+ bool flag = shopTypeData == null;
+ if (!flag)
+ {
+ this.m_Sys = sys;
+ this.SetVisibleWithAnimation(true, null);
+ base.uiBehaviour.m_ShopName.SetText(shopTypeData.ShopName);
+ bool flag2 = sys == XSysDefine.XSys_Mall_MystShop;
+ if (flag2)
+ {
+ this.m_NormalShopPanel.SetActive(false);
+ this.m_MystShopPanel.SetActive(true);
+ this._MystShopView.SetVisible(true);
+ }
+ else
+ {
+ bool flag3 = specificDocument.IsTabShop(sys);
+ if (flag3)
+ {
+ this.m_NormalShopPanel.SetActive(false);
+ this.m_MystShopPanel.SetActive(false);
+ this._TabCategoryHandler.SetShopType(sys);
+ bool flag4 = this._TabCategoryHandler.IsVisible();
+ if (flag4)
+ {
+ this._TabCategoryHandler.OnRefreshData();
+ }
+ else
+ {
+ this._TabCategoryHandler.SetVisible(true);
+ }
+ }
+ else
+ {
+ bool flag5 = specificDocument.IsShop(sys);
+ if (flag5)
+ {
+ this.m_TabShopPanel.SetActive(false);
+ this.m_NormalShopPanel.SetActive(true);
+ this.m_MystShopPanel.SetActive(false);
+ this._NormalShopView.SetShopType(sys);
+ bool flag6 = this._NormalShopView.IsVisible();
+ if (flag6)
+ {
+ this._NormalShopView.OnRefreshData();
+ }
+ else
+ {
+ this._NormalShopView.SetVisible(true);
+ }
+ }
+ else
+ {
+ XSingleton<XDebug>.singleton.AddErrorLog("System has not finished:", sys.ToString(), null, null, null, null);
+ }
+ }
+ }
+ }
+ }
+
+ public void RefreshMoneyBoard(List<XNormalShopGoods> goodsList)
+ {
+ Dictionary<int, int> dictionary = new Dictionary<int, int>();
+ this.m_MoneyTypeList.Clear();
+ for (int i = 0; i < goodsList.Count; i++)
+ {
+ int priceType = goodsList[i].priceType;
+ dictionary[priceType] = 0;
+ }
+ foreach (int item in dictionary.Keys)
+ {
+ this.m_MoneyTypeList.Add(item);
+ }
+ for (int j = 0; j < MallSystemBehaviour.MAX_MONEY_NUM; j++)
+ {
+ bool flag = this.m_MoneyTypeList.Count > j;
+ if (flag)
+ {
+ base.uiBehaviour.m_MoneyBoard[j].SetVisible(true);
+ string itemSmallIcon = XBagDocument.GetItemSmallIcon(this.m_MoneyTypeList[j], 0u);
+ base.uiBehaviour.m_MoneyIcon[j].SetSprite(itemSmallIcon);
+ base.uiBehaviour.m_MoneyBack[j].ID = (ulong)((long)this.m_MoneyTypeList[j]);
+ base.uiBehaviour.m_MoneyBack[j].RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnMoneyAddClick));
+ XSingleton<UiUtility>.singleton.SetVirtualItem(base.uiBehaviour.m_MoneyTween[j], XSingleton<XGame>.singleton.Doc.XBagDoc.GetItemCount(this.m_MoneyTypeList[j]), false, "");
+ }
+ else
+ {
+ base.uiBehaviour.m_MoneyBoard[j].SetVisible(false);
+ }
+ }
+ }
+
+ public bool OnVirtualItemChanged(ItemEnum e, ulong newValue)
+ {
+ return true;
+ }
+
+ public bool OnItemCountChanged(int itemID, int itemCount)
+ {
+ return true;
+ }
+
+ protected void OnMoneyAddClick(IXUISprite sp)
+ {
+ int num = (int)sp.ID;
+ FashionList.RowData fashionConf = XBagDocument.GetFashionConf(num);
+ bool flag = fashionConf == null;
+ if (flag)
+ {
+ XSingleton<UiUtility>.singleton.ShowItemAccess(num, null);
+ }
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/MallSystemDlg.cs.meta b/Client/Assets/Scripts/XMainClient/UI/MallSystemDlg.cs.meta
new file mode 100644
index 00000000..02b375bc
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/MallSystemDlg.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 938660f360f650f4ab28fd5503d1580f
+timeCreated: 1611404151
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/MilitaryRankDlg.cs b/Client/Assets/Scripts/XMainClient/UI/MilitaryRankDlg.cs
new file mode 100644
index 00000000..9daf4b36
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/MilitaryRankDlg.cs
@@ -0,0 +1,350 @@
+using System;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class MilitaryRankDlg : DlgBase<MilitaryRankDlg, MilitaryRankBehaviour>
+ {
+ public override bool autoload
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override bool pushstack
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override bool hideMainMenu
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override bool fullscreenui
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override string fileName
+ {
+ get
+ {
+ return "GameSystem/MilitaryRankDlg";
+ }
+ }
+
+ public override int sysid
+ {
+ get
+ {
+ return XFastEnumIntEqualityComparer<XSysDefine>.ToInt(XSysDefine.XSys_MilitaryRank);
+ }
+ }
+
+ private XMilitaryRankDocument _doc = null;
+
+ public BattleRecordHandler m_BattleRecordHandler;
+
+ protected override void Init()
+ {
+ base.Init();
+ this._doc = XDocuments.GetSpecificDocument<XMilitaryRankDocument>(XMilitaryRankDocument.uuID);
+ this.SetRewardInfo();
+ base.uiBehaviour.m_RewardFrame.SetActive(false);
+ DlgHandlerBase.EnsureCreate<BattleRecordHandler>(ref this.m_BattleRecordHandler, base.uiBehaviour.m_BattleRecordFrame, null, false);
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ base.uiBehaviour.m_RewardBtn.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnRewardBtnClick));
+ base.uiBehaviour.m_RecordBtn.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnRecordBtnClick));
+ base.uiBehaviour.m_RewardCloseBtn.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnRewardCloseBtnClick));
+ base.uiBehaviour.m_WrapContent.RegisterItemUpdateEventHandler(new WrapItemUpdateEventHandler(this.WrapListUpdated));
+ base.uiBehaviour.m_Close.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnCloseBtnClick));
+ base.uiBehaviour.m_RewardSeasonIcb.ID = 1UL;
+ base.uiBehaviour.m_RewardResultIcb.ID = 2UL;
+ base.uiBehaviour.m_RewardSeasonIcb.RegisterOnCheckEventHandler(new CheckBoxOnCheckEventHandler(this.OnRewardCheckBoxClick));
+ base.uiBehaviour.m_RewardResultIcb.RegisterOnCheckEventHandler(new CheckBoxOnCheckEventHandler(this.OnRewardCheckBoxClick));
+ base.uiBehaviour.m_RecordHBtab.ID = 1UL;
+ base.uiBehaviour.m_RecordCPtab.ID = 0UL;
+ base.uiBehaviour.m_RecordHBtab.RegisterOnCheckEventHandler(new CheckBoxOnCheckEventHandler(this.OnRecordTabClick));
+ base.uiBehaviour.m_RecordCPtab.RegisterOnCheckEventHandler(new CheckBoxOnCheckEventHandler(this.OnRecordTabClick));
+ IXUIButton ixuibutton = base.uiBehaviour.transform.Find("Bg/Help").GetComponent("XUIButton") as IXUIButton;
+ ixuibutton.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnHelpBtnClicked));
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ XSingleton<X3DAvatarMgr>.singleton.EnableMainDummy(true, base.uiBehaviour.m_snapshotTransfrom);
+ this._doc.QueryRankInfo();
+ }
+
+ protected override void OnHide()
+ {
+ this.m_BattleRecordHandler.SetVisible(false);
+ XSingleton<X3DAvatarMgr>.singleton.EnableMainDummy(false, null);
+ base.OnHide();
+ }
+
+ public override void StackRefresh()
+ {
+ base.StackRefresh();
+ }
+
+ public override void LeaveStackTop()
+ {
+ base.LeaveStackTop();
+ }
+
+ protected override void OnUnload()
+ {
+ DlgHandlerBase.EnsureUnload<BattleRecordHandler>(ref this.m_BattleRecordHandler);
+ base.OnUnload();
+ }
+
+ public void Refresh()
+ {
+ this.SetBaseInfo();
+ base.uiBehaviour.m_WrapContent.SetContentCount(this._doc.RankList.Count, false);
+ base.uiBehaviour.m_ScrollView.ResetPosition();
+ this.SetRankData(base.uiBehaviour.m_MyRank, true, 0);
+ }
+
+ private void SetBaseInfo()
+ {
+ XActivityDocument specificDocument = XDocuments.GetSpecificDocument<XActivityDocument>(XActivityDocument.uuID);
+ DateTime dateTime = new DateTime(1970, 1, 1, 0, 0, 0);
+ int hours = TimeZone.CurrentTimeZone.GetUtcOffset(DateTime.Now).Hours;
+ dateTime = dateTime.AddSeconds((double)((ulong)specificDocument.ServerTimeSince1970 + (ulong)((long)(hours * 3600))));
+ int num = DateTime.DaysInMonth(dateTime.Year, dateTime.Month);
+ string arg = string.Format("{0}.{1}.1-{2}.{3}.{4}", new object[]
+ {
+ dateTime.Year,
+ dateTime.Month,
+ dateTime.Year,
+ dateTime.Month,
+ num
+ });
+ base.uiBehaviour.m_DateTime.SetText(string.Format(XStringDefineProxy.GetString("MilitaryDateTime"), arg));
+ MilitaryRankByExploit.RowData byMilitaryRank = this._doc.MilitaryReader.GetByMilitaryRank(this._doc.MyData.MilitaryLevel);
+ bool flag = byMilitaryRank == null;
+ if (!flag)
+ {
+ MilitaryRankByExploit.RowData byMilitaryRank2 = this._doc.MilitaryReader.GetByMilitaryRank(this._doc.MyData.MilitaryLevel + 1u);
+ base.uiBehaviour.m_MilitaryValue.SetText(this._doc.MyData.MilitaryPoint.ToString());
+ base.uiBehaviour.m_MilitaryRange.SetText(byMilitaryRank.ShowRange);
+ base.uiBehaviour.m_NextMilitary.SetText((byMilitaryRank2 == null) ? XStringDefineProxy.GetString("MilitaryLevelMax") : byMilitaryRank2.Name);
+ base.uiBehaviour.m_NextMilitaryIcon.spriteName = ((byMilitaryRank2 == null) ? "" : byMilitaryRank2.Icon);
+ base.uiBehaviour.m_MilitaryName.SetText(byMilitaryRank.Name);
+ base.uiBehaviour.m_MilitaryIcon.spriteName = byMilitaryRank.Icon;
+ }
+ }
+
+ private void WrapListUpdated(Transform t, int i)
+ {
+ bool flag = i < 0 || i >= this._doc.RankList.Count;
+ if (!flag)
+ {
+ base.uiBehaviour.m_EmptyRank.SetActive(this._doc.RankList.Count == 0);
+ this.SetRankData(t, false, i);
+ }
+ }
+
+ private void SetRankData(Transform t, bool isMy, int index)
+ {
+ MilitaryRankData militaryRankData = isMy ? this._doc.MyData : this._doc.RankList[index];
+ MilitaryRankByExploit.RowData byMilitaryRank = this._doc.MilitaryReader.GetByMilitaryRank(militaryRankData.MilitaryLevel);
+ IXUILabel ixuilabel = t.Find("Rank").GetComponent("XUILabel") as IXUILabel;
+ IXUISprite ixuisprite = t.Find("RankImage").GetComponent("XUISprite") as IXUISprite;
+ IXUILabel ixuilabel2 = t.Find("MilitaryName").GetComponent("XUILabel") as IXUILabel;
+ IXUISprite ixuisprite2 = t.Find("MilitaryIcon").GetComponent("XUISprite") as IXUISprite;
+ IXUILabel ixuilabel3 = t.Find("Name").GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel4 = t.Find("Value").GetComponent("XUILabel") as IXUILabel;
+ if (isMy)
+ {
+ GameObject gameObject = t.Find("OutOfRange").gameObject;
+ ixuilabel.SetVisible(militaryRankData.rank != uint.MaxValue);
+ gameObject.SetActive(militaryRankData.rank == uint.MaxValue);
+ }
+ bool flag = militaryRankData.rank < 3u;
+ if (flag)
+ {
+ ixuisprite.SetVisible(true);
+ ixuisprite.spriteName = string.Format("N{0}", militaryRankData.rank + 1u);
+ }
+ else
+ {
+ ixuisprite.SetVisible(false);
+ ixuilabel.SetText((militaryRankData.rank + 1u).ToString());
+ }
+ ixuisprite2.spriteName = ((byMilitaryRank == null) ? "" : byMilitaryRank.Icon);
+ ixuilabel2.SetText((byMilitaryRank == null) ? XStringDefineProxy.GetString("NONE") : byMilitaryRank.Name);
+ ixuilabel3.SetText(militaryRankData.name);
+ ixuilabel4.SetText(militaryRankData.MilitaryPoint.ToString());
+ }
+
+ private void SetRewardInfo()
+ {
+ base.uiBehaviour.m_RewardItemPool.ReturnAll(true);
+ base.uiBehaviour.m_RewardSeasonPool.ReturnAll(false);
+ Vector3 tplPos = base.uiBehaviour.m_RewardSeasonPool.TplPos;
+ for (int i = 0; i < this._doc.MilitarySeasonReader.Table.Length; i++)
+ {
+ MilitaryRankReward.RowData rowData = this._doc.MilitarySeasonReader.Table[i];
+ GameObject gameObject = base.uiBehaviour.m_RewardSeasonPool.FetchGameObject(false);
+ gameObject.transform.localPosition = new Vector3(tplPos.x, tplPos.y - (float)(i * base.uiBehaviour.m_RewardSeasonPool.TplHeight));
+ IXUILabel ixuilabel = gameObject.transform.Find("Rank").GetComponent("XUILabel") as IXUILabel;
+ Transform parent = gameObject.transform.Find("Reward");
+ bool flag = rowData.Rank[0] == rowData.Rank[1];
+ if (flag)
+ {
+ ixuilabel.SetText(string.Format("No.{0}", rowData.Rank[0]));
+ }
+ else
+ {
+ ixuilabel.SetText(string.Format("No.{0}-{1}", rowData.Rank[0], rowData.Rank[1]));
+ }
+ for (int j = 0; j < (int)rowData.Reward.count; j++)
+ {
+ GameObject gameObject2 = base.uiBehaviour.m_RewardItemPool.FetchGameObject(false);
+ gameObject2.transform.parent = parent;
+ gameObject2.transform.localScale = Vector3.one;
+ gameObject2.transform.localPosition = new Vector3((float)(j * base.uiBehaviour.m_RewardItemPool.TplWidth), 0f);
+ ItemList.RowData itemConf = XBagDocument.GetItemConf((int)rowData.Reward[j, 0]);
+ XSingleton<XItemDrawerMgr>.singleton.normalItemDrawer.DrawItem(gameObject2, itemConf, (int)rowData.Reward[j, 1], false);
+ XSingleton<XItemDrawerMgr>.singleton.normalItemDrawer.OpenClickShowTooltipEvent(gameObject2, (int)rowData.Reward[j, 0]);
+ }
+ }
+ base.uiBehaviour.m_RewardResultPool.ReturnAll(false);
+ tplPos = base.uiBehaviour.m_RewardResultPool.TplPos;
+ for (int k = 0; k < this._doc.MilitaryReader.Table.Length; k++)
+ {
+ MilitaryRankByExploit.RowData rowData2 = this._doc.MilitaryReader.Table[k];
+ bool flag2 = rowData2.MilitaryExploit[0] == 0u && rowData2.MilitaryExploit[1] == 0u;
+ GameObject gameObject3 = base.uiBehaviour.m_RewardResultPool.FetchGameObject(false);
+ gameObject3.transform.localPosition = new Vector3(tplPos.x, tplPos.y - (float)(k * base.uiBehaviour.m_RewardResultPool.TplHeight));
+ IXUISprite ixuisprite = gameObject3.transform.Find("MilitaryIcon").GetComponent("XUISprite") as IXUISprite;
+ IXUILabel ixuilabel2 = gameObject3.transform.Find("MilitaryName").GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel3 = gameObject3.transform.Find("Value").GetComponent("XUILabel") as IXUILabel;
+ ixuisprite.spriteName = rowData2.Icon;
+ ixuilabel2.SetText(rowData2.Name);
+ bool flag3 = flag2;
+ if (flag3)
+ {
+ ixuilabel3.SetText(XSingleton<UiUtility>.singleton.ReplaceReturn(rowData2.RewardTips));
+ }
+ else
+ {
+ ixuilabel3.SetText(string.Format("{0}-{1}", rowData2.MilitaryExploit[0], rowData2.MilitaryExploit[1]));
+ }
+ Transform parent2 = gameObject3.transform.Find("Reward");
+ for (int l = 0; l < (int)rowData2.Reward.count; l++)
+ {
+ GameObject gameObject4 = base.uiBehaviour.m_RewardItemPool.FetchGameObject(false);
+ gameObject4.transform.parent = parent2;
+ gameObject4.transform.localScale = Vector3.one;
+ gameObject4.transform.localPosition = new Vector3((float)(l * base.uiBehaviour.m_RewardItemPool.TplWidth), 0f);
+ ItemList.RowData itemConf2 = XBagDocument.GetItemConf((int)rowData2.Reward[l, 0]);
+ XSingleton<XItemDrawerMgr>.singleton.normalItemDrawer.DrawItem(gameObject4, itemConf2, (int)rowData2.Reward[l, 1], false);
+ XSingleton<XItemDrawerMgr>.singleton.normalItemDrawer.OpenClickShowTooltipEvent(gameObject4, (int)rowData2.Reward[l, 0]);
+ }
+ }
+ }
+
+ private bool OnCloseBtnClick(IXUIButton btn)
+ {
+ this.SetVisibleWithAnimation(false, null);
+ return true;
+ }
+
+ private void OnRewardBtnClick(IXUISprite iSp)
+ {
+ base.uiBehaviour.m_RewardFrame.SetActive(true);
+ }
+
+ private void OnRecordBtnClick(IXUISprite iSp)
+ {
+ this.m_BattleRecordHandler.SetVisible(true);
+ bool bChecked = base.uiBehaviour.m_RecordHBtab.bChecked;
+ if (bChecked)
+ {
+ this.OnRecordTabClick(base.uiBehaviour.m_RecordHBtab);
+ }
+ else
+ {
+ this.OnRecordTabClick(base.uiBehaviour.m_RecordCPtab);
+ }
+ }
+
+ private bool OnRecordTabClick(IXUICheckBox icb)
+ {
+ bool flag = !icb.bChecked;
+ bool result;
+ if (flag)
+ {
+ result = false;
+ }
+ else
+ {
+ bool flag2 = icb.ID == 1UL;
+ if (flag2)
+ {
+ XHeroBattleDocument specificDocument = XDocuments.GetSpecificDocument<XHeroBattleDocument>(XHeroBattleDocument.uuID);
+ specificDocument.QueryBattleRecord();
+ }
+ else
+ {
+ XCaptainPVPDocument specificDocument2 = XDocuments.GetSpecificDocument<XCaptainPVPDocument>(XCaptainPVPDocument.uuID);
+ specificDocument2.ReqGetHistory();
+ }
+ result = true;
+ }
+ return result;
+ }
+
+ private void OnRewardCloseBtnClick(IXUISprite iSp)
+ {
+ base.uiBehaviour.m_RewardFrame.SetActive(false);
+ }
+
+ private bool OnRewardCheckBoxClick(IXUICheckBox icb)
+ {
+ bool flag = !icb.bChecked;
+ bool result;
+ if (flag)
+ {
+ result = false;
+ }
+ else
+ {
+ base.uiBehaviour.m_RewardSeasonFrame.SetActive(icb.ID == 1UL);
+ base.uiBehaviour.m_RewardResultFrame.SetActive(icb.ID != 1UL);
+ result = true;
+ }
+ return result;
+ }
+
+ private bool OnHelpBtnClicked(IXUIButton btn)
+ {
+ DlgBase<XCommonHelpTipView, XCommonHelpTipBehaviour>.singleton.ShowHelp(XSysDefine.XSys_MilitaryRank);
+ return true;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/MilitaryRankDlg.cs.meta b/Client/Assets/Scripts/XMainClient/UI/MilitaryRankDlg.cs.meta
new file mode 100644
index 00000000..4272527b
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/MilitaryRankDlg.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 6ebb26d875f855a4c923eee3ca6b337c
+timeCreated: 1611403906
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/MiniMapElement.cs b/Client/Assets/Scripts/XMainClient/UI/MiniMapElement.cs
new file mode 100644
index 00000000..3db528f0
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/MiniMapElement.cs
@@ -0,0 +1,20 @@
+using System;
+using UILib;
+using UnityEngine;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class MiniMapElement
+ {
+ public IXUISprite sp;
+
+ public Transform transform;
+
+ public Vector3 pos;
+
+ public XFx notice;
+
+ public uint heroID = 0u;
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/MiniMapElement.cs.meta b/Client/Assets/Scripts/XMainClient/UI/MiniMapElement.cs.meta
new file mode 100644
index 00000000..69306ee1
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/MiniMapElement.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: d5084ea5a9cd3a14094f7431e2782624
+timeCreated: 1611404605
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/MobaActivityDlg.cs b/Client/Assets/Scripts/XMainClient/UI/MobaActivityDlg.cs
new file mode 100644
index 00000000..b5ed22b0
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/MobaActivityDlg.cs
@@ -0,0 +1,78 @@
+using System;
+using UnityEngine;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class MobaActivityDlg : TabDlgBase<MobaActivityDlg>
+ {
+ public override string fileName
+ {
+ get
+ {
+ return "GameSystem/DailyActivity/MobaActivityDlg";
+ }
+ }
+
+ public override int group
+ {
+ get
+ {
+ return 1;
+ }
+ }
+
+ protected override bool bHorizontal
+ {
+ get
+ {
+ return false;
+ }
+ }
+
+ public PVPActivityDlg _PVPActivityView;
+
+ private Transform parent;
+
+ protected override void Init()
+ {
+ base.Init();
+ base.RegisterSubSysRedPointMgr(XSysDefine.XSys_MobaAcitivity);
+ }
+
+ protected override void OnLoad()
+ {
+ base.OnLoad();
+ this.parent = base.uiBehaviour.transform.Find("Bg");
+ }
+
+ protected override void OnUnload()
+ {
+ base.OnUnload();
+ DlgHandlerBase.EnsureUnload<PVPActivityDlg>(ref this._PVPActivityView);
+ }
+
+ public override void SetupHandlers(XSysDefine sys)
+ {
+ XSysDefine xsysDefine = sys;
+ if (xsysDefine != XSysDefine.XSys_PVPAcitivity)
+ {
+ XSingleton<XDebug>.singleton.AddErrorLog("System has not finished:", sys.ToString(), null, null, null, null);
+ }
+ else
+ {
+ base._AddActiveHandler(DlgHandlerBase.EnsureCreate<PVPActivityDlg>(ref this._PVPActivityView, this.parent, true, this));
+ }
+ }
+
+ public void ShowSubSystem(XSysDefine sys)
+ {
+ bool flag = !base.IsLoaded();
+ if (flag)
+ {
+ base.Load();
+ }
+ base.ShowSubGamsSystem(sys);
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/MobaActivityDlg.cs.meta b/Client/Assets/Scripts/XMainClient/UI/MobaActivityDlg.cs.meta
new file mode 100644
index 00000000..6951c03e
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/MobaActivityDlg.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: b7b634117915619418cf21a38a719fb3
+timeCreated: 1611404403
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/MobaBattleHandler.cs b/Client/Assets/Scripts/XMainClient/UI/MobaBattleHandler.cs
new file mode 100644
index 00000000..18cfcc7d
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/MobaBattleHandler.cs
@@ -0,0 +1,534 @@
+using System;
+using System.Collections.Generic;
+using KKSG;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class MobaBattleHandler : DlgHandlerBase
+ {
+ protected override string FileName
+ {
+ get
+ {
+ return "Battle/MobaBattleHandler";
+ }
+ }
+
+ private XMobaBattleDocument _doc = null;
+
+ private IXUISprite m_SkillTips;
+
+ private IXUILabel m_SkillName;
+
+ private IXUILabel m_SkillAttr;
+
+ private IXUILabel m_SkillMP;
+
+ private IXUILabel m_SkillCD;
+
+ private IXUILabel m_SkillDesc;
+
+ private IXUILabel m_BlueKill;
+
+ private IXUILabel m_RedKill;
+
+ private IXUILabel m_BlueLevel;
+
+ private IXUILabel m_RedLevel;
+
+ private IXUILabel m_MyKill;
+
+ private IXUILabel m_MyDead;
+
+ private IXUILabel m_MyAssist;
+
+ private GameObject m_AdditionFrame;
+
+ private IXUISprite[] m_AdditionBtn = new IXUISprite[3];
+
+ private IXUISprite m_DetailBtn;
+
+ private GameObject m_DetailFrame;
+
+ private IXUIButton m_DetailCloseBtn;
+
+ private XUIPool m_RedPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ private XUIPool m_BluePool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ private List<IXUILabel> _labelList = new List<IXUILabel>();
+
+ private List<ulong> _uidList = new List<ulong>();
+
+ private float _refreshSignTime;
+
+ private IXUILabel m_ReviveLeftTime;
+
+ private bool _OnDeath;
+
+ private uint _additionCloseDelayToken;
+
+ private XFx _addFx;
+
+ private XFx _boardFx;
+
+ private XFx _moveFx;
+
+ private int _curExpInd = 0;
+
+ private static readonly int EXPMAXCOUT = 8;
+
+ private XUIPool m_ExpPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ private MobaBattleHandler.MobaExp[] m_ExpList = new MobaBattleHandler.MobaExp[MobaBattleHandler.EXPMAXCOUT];
+
+ private IXUISprite m_AttrShowBtn;
+
+ public MapSignalHandler m_MapSignalHandler;
+
+ private MobaHeadCondition m_headCondition;
+
+ private class MobaExp
+ {
+ public GameObject m_Go;
+
+ public IXUILabel m_Label;
+
+ public IXUITweenTool m_PlayTween;
+
+ public IUI3DFollow m_3DFollow;
+
+ public bool state = false;
+
+ public float vaildTime;
+
+ public MobaExp(GameObject go)
+ {
+ this.m_Go = go;
+ this.m_3DFollow = (go.GetComponent("UI3DFollow") as IUI3DFollow);
+ this.m_Label = (go.transform.GetChild(0).GetComponent("XUILabel") as IXUILabel);
+ this.m_PlayTween = (this.m_Label.gameObject.GetComponent("XUIPlayTween") as IXUITweenTool);
+ go.SetActive(false);
+ }
+
+ public void SetExp(Vector3 pos, int exp)
+ {
+ this.m_Go.SetActive(true);
+ this.state = true;
+ this.m_3DFollow.SetPos(pos);
+ this.m_Label.SetText(string.Format("jy+{0}", exp));
+ this.m_PlayTween.PlayTween(true, -1f);
+ this.vaildTime = Time.realtimeSinceStartup + 1f;
+ }
+ }
+
+ protected override void Init()
+ {
+ base.Init();
+ this._doc = XDocuments.GetSpecificDocument<XMobaBattleDocument>(XMobaBattleDocument.uuID);
+ this.m_SkillTips = (base.transform.Find("SkillTips").GetComponent("XUISprite") as IXUISprite);
+ this.m_SkillName = (this.m_SkillTips.transform.Find("Name").GetComponent("XUILabel") as IXUILabel);
+ this.m_SkillAttr = (this.m_SkillTips.transform.Find("Attr").GetComponent("XUILabel") as IXUILabel);
+ this.m_SkillMP = (this.m_SkillTips.transform.Find("MP").GetComponent("XUILabel") as IXUILabel);
+ this.m_SkillCD = (this.m_SkillTips.transform.Find("CD").GetComponent("XUILabel") as IXUILabel);
+ this.m_SkillDesc = (this.m_SkillTips.transform.Find("Desc").GetComponent("XUILabel") as IXUILabel);
+ this.m_SkillTips.SetVisible(false);
+ this.m_BlueKill = (base.transform.Find("ScoreBoard/BlueKill").GetComponent("XUILabel") as IXUILabel);
+ this.m_RedKill = (base.transform.Find("ScoreBoard/RedKill").GetComponent("XUILabel") as IXUILabel);
+ this.m_BlueLevel = (base.transform.Find("ScoreBoard/BlueLevel/Num").GetComponent("XUILabel") as IXUILabel);
+ this.m_RedLevel = (base.transform.Find("ScoreBoard/RedLevel/Num").GetComponent("XUILabel") as IXUILabel);
+ this.m_MyKill = (base.transform.Find("ScoreBoard/MyScore/Kill").GetComponent("XUILabel") as IXUILabel);
+ this.m_MyDead = (base.transform.Find("ScoreBoard/MyScore/Dead").GetComponent("XUILabel") as IXUILabel);
+ this.m_MyAssist = (base.transform.Find("ScoreBoard/MyScore/Assist").GetComponent("XUILabel") as IXUILabel);
+ this.m_AdditionFrame = base.transform.Find("Addition").gameObject;
+ for (int i = 0; i < 3; i++)
+ {
+ this.m_AdditionBtn[i] = (this.m_AdditionFrame.transform.Find("ADD" + i.ToString()).GetComponent("XUISprite") as IXUISprite);
+ this.m_AdditionBtn[i].ID = (ulong)((long)i);
+ }
+ this.m_DetailBtn = (base.transform.Find("ScoreBoard/DetailBtn").GetComponent("XUISprite") as IXUISprite);
+ this.m_DetailFrame = base.transform.Find("DetailFrame").gameObject;
+ this.m_DetailCloseBtn = (this.m_DetailFrame.transform.Find("Close").GetComponent("XUIButton") as IXUIButton);
+ Transform transform = this.m_DetailFrame.transform.Find("BlueTeam/BlueTpl");
+ this.m_BluePool.SetupPool(transform.parent.gameObject, transform.gameObject, 4u, false);
+ transform = this.m_DetailFrame.transform.Find("RedTeam/RedTpl");
+ this.m_RedPool.SetupPool(transform.parent.gameObject, transform.gameObject, 4u, false);
+ this.m_DetailFrame.SetActive(false);
+ this.m_ReviveLeftTime = (base.transform.Find("ReviveLeftTime").GetComponent("XUILabel") as IXUILabel);
+ this.m_ReviveLeftTime.SetVisible(false);
+ this._OnDeath = false;
+ this._curExpInd = 0;
+ transform = base.transform.Find("ExpMgr/Tpl");
+ this.m_ExpPool.SetupPool(transform.parent.gameObject, transform.gameObject, (uint)MobaBattleHandler.EXPMAXCOUT, false);
+ for (int j = 0; j < MobaBattleHandler.EXPMAXCOUT; j++)
+ {
+ GameObject go = this.m_ExpPool.FetchGameObject(false);
+ this.m_ExpList[j] = new MobaBattleHandler.MobaExp(go);
+ }
+ this.m_AttrShowBtn = (base.transform.Find("AttrShowBtn").GetComponent("XUISprite") as IXUISprite);
+ DlgHandlerBase.EnsureCreate<MobaHeadCondition>(ref this.m_headCondition, base.transform.Find("condition").gameObject, this, true);
+ DlgHandlerBase.EnsureCreate<MapSignalHandler>(ref this.m_MapSignalHandler, base.transform.Find("MapSignalHandler").gameObject, this, true);
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ for (int i = 0; i < 3; i++)
+ {
+ this.m_AdditionBtn[i].RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnAdditionBtnClick));
+ }
+ this.m_DetailBtn.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnShowDetailBtnClick));
+ this.m_DetailCloseBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnCloseDetailBtnClick));
+ this.m_SkillTips.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnSkillTipsCloseClick));
+ this.m_AttrShowBtn.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnAttrShowBtnClick));
+ }
+
+ public override void OnUnload()
+ {
+ bool flag = this._addFx != null;
+ if (flag)
+ {
+ XSingleton<XFxMgr>.singleton.DestroyFx(this._addFx, true);
+ }
+ bool flag2 = this._boardFx != null;
+ if (flag2)
+ {
+ XSingleton<XFxMgr>.singleton.DestroyFx(this._boardFx, true);
+ }
+ bool flag3 = this._moveFx != null;
+ if (flag3)
+ {
+ XSingleton<XFxMgr>.singleton.DestroyFx(this._moveFx, true);
+ }
+ XSingleton<XTimerMgr>.singleton.KillTimer(this._additionCloseDelayToken);
+ DlgHandlerBase.EnsureUnload<MobaHeadCondition>(ref this.m_headCondition);
+ DlgHandlerBase.EnsureUnload<MapSignalHandler>(ref this.m_MapSignalHandler);
+ base.OnUnload();
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ }
+
+ public void RefreshMyScore()
+ {
+ bool flag = this._doc.MyData != null;
+ if (flag)
+ {
+ this.m_MyKill.SetText(this._doc.MyData.kill.ToString());
+ this.m_MyDead.SetText(this._doc.MyData.dead.ToString());
+ this.m_MyAssist.SetText(this._doc.MyData.assist.ToString());
+ }
+ }
+
+ public void RefreshBattleMsg()
+ {
+ this.m_BlueKill.SetText(this._doc.MyTeamkill.ToString());
+ this.m_BlueLevel.SetText(this._doc.MyTeamLevel.ToString());
+ this.m_RedKill.SetText(this._doc.OtherTeamKill.ToString());
+ this.m_RedLevel.SetText(this._doc.OtherTeamLevel.ToString());
+ }
+
+ public void OnAdditionBtnClick(IXUISprite iSp)
+ {
+ this._doc.QueryAdditionLevelUp((int)iSp.ID);
+ }
+
+ public void OnShowDetailBtnClick(IXUISprite iSp)
+ {
+ this.m_DetailFrame.SetActive(true);
+ this.SetupDetailMsg();
+ }
+
+ public bool OnCloseDetailBtnClick(IXUIButton btn)
+ {
+ this.m_DetailFrame.SetActive(false);
+ return true;
+ }
+
+ public void SetGetExpAnimation(uint exp, uint posxz)
+ {
+ Vector3 pos;
+ pos= new Vector3((posxz >> 16) / 100f, 0f, (posxz & 65535u) / 100f);
+ int curExpInd = this._curExpInd;
+ this._curExpInd = (this._curExpInd + 1) % MobaBattleHandler.EXPMAXCOUT;
+ this.m_ExpList[this._curExpInd].SetExp(pos, (int)exp);
+ }
+
+ public void SetupDetailMsg()
+ {
+ bool flag = !this.m_DetailFrame.activeInHierarchy;
+ if (!flag)
+ {
+ this.m_BluePool.FakeReturnAll();
+ this.m_RedPool.FakeReturnAll();
+ this._labelList.Clear();
+ this._uidList.Clear();
+ int num = 0;
+ int num2 = 0;
+ bool flag2 = this._doc.MyData == null;
+ if (flag2)
+ {
+ XSingleton<XDebug>.singleton.AddErrorLog("show detail msg error. mydata is null.", null, null, null, null, null);
+ }
+ else
+ {
+ this.SetupSingleDetail(this._doc.MyData, true, num++);
+ int i = 0;
+ int count = this._doc.MobaData.BufferValues.Count;
+ while (i < count)
+ {
+ bool flag3 = this._doc.MobaData.BufferValues[i].uid == this._doc.MyData.uid;
+ if (!flag3)
+ {
+ bool flag4 = this._doc.MobaData.BufferValues[i].teamID == this._doc.MyData.teamID;
+ if (flag4)
+ {
+ this.SetupSingleDetail(this._doc.MobaData.BufferValues[i], true, num++);
+ }
+ else
+ {
+ this.SetupSingleDetail(this._doc.MobaData.BufferValues[i], false, num2++);
+ }
+ }
+ i++;
+ }
+ this.m_BluePool.ActualReturnAll(false);
+ this.m_RedPool.ActualReturnAll(false);
+ }
+ }
+ }
+
+ public void SetupSingleDetail(MobaMemberData data, bool isBlue, int index)
+ {
+ GameObject gameObject = isBlue ? this.m_BluePool.FetchGameObject(false) : this.m_RedPool.FetchGameObject(false);
+ OverWatchTable.RowData dataByHeroID = XHeroBattleDocument.GetDataByHeroID(data.heroID);
+ gameObject.transform.localPosition = new Vector3(this.m_BluePool.TplPos.x, this.m_BluePool.TplPos.y - (float)(this.m_BluePool.TplHeight * index));
+ this._uidList.Add(data.uid);
+ this._labelList.Add(gameObject.transform.Find("TIME").GetComponent("XUILabel") as IXUILabel);
+ IXUISprite ixuisprite = gameObject.transform.Find("HeroIcon").GetComponent("XUISprite") as IXUISprite;
+ GameObject gameObject2 = gameObject.transform.Find("UnSelect").gameObject;
+ bool flag = dataByHeroID == null;
+ if (flag)
+ {
+ ixuisprite.SetVisible(false);
+ gameObject2.SetActive(true);
+ }
+ else
+ {
+ ixuisprite.SetVisible(true);
+ gameObject2.SetActive(false);
+ ixuisprite.SetSprite(dataByHeroID.Icon, dataByHeroID.IconAtlas, false);
+ }
+ IXUILabel ixuilabel = gameObject.transform.Find("Name").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel.SetText(data.name);
+ IXUILabel ixuilabel2 = gameObject.transform.Find("HeroName").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel2.SetText((dataByHeroID == null) ? "" : dataByHeroID.Name);
+ IXUILabel ixuilabel3 = gameObject.transform.Find("AttackLevel").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel3.SetText(string.Format(XStringDefineProxy.GetString("LEVEL"), data.attackLevel));
+ IXUILabel ixuilabel4 = gameObject.transform.Find("DefenseLevel").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel4.SetText(string.Format(XStringDefineProxy.GetString("LEVEL"), data.defenseLevel));
+ IXUILabel ixuilabel5 = gameObject.transform.Find("Kill").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel5.SetText(data.kill.ToString());
+ IXUILabel ixuilabel6 = gameObject.transform.Find("Dead").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel6.SetText(data.dead.ToString());
+ IXUILabel ixuilabel7 = gameObject.transform.Find("Assist").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel7.SetText(data.assist.ToString());
+ GameObject gameObject3 = gameObject.transform.Find("Me").gameObject;
+ gameObject3.SetActive(data.isMy);
+ }
+
+ public void SetAdditionFrameState(bool state)
+ {
+ bool flag = state == this.m_AdditionFrame.activeSelf;
+ if (!flag)
+ {
+ if (state)
+ {
+ this.m_AdditionFrame.SetActive(state);
+ }
+ else
+ {
+ XSingleton<XTimerMgr>.singleton.KillTimer(this._additionCloseDelayToken);
+ this._additionCloseDelayToken = XSingleton<XTimerMgr>.singleton.SetTimer(0.15f, new XTimerMgr.ElapsedEventHandler(this.DelayCloseAdditionFrame), null);
+ }
+ }
+ }
+
+ public void DelayCloseAdditionFrame(object o = null)
+ {
+ this.m_AdditionFrame.SetActive(false);
+ }
+
+ public void ShowAdditionFx(int index)
+ {
+ bool flag = this._addFx != null;
+ if (flag)
+ {
+ XSingleton<XFxMgr>.singleton.DestroyFx(this._addFx, true);
+ }
+ bool flag2 = this._boardFx != null;
+ if (flag2)
+ {
+ XSingleton<XFxMgr>.singleton.DestroyFx(this._boardFx, true);
+ }
+ bool flag3 = this._moveFx != null;
+ if (flag3)
+ {
+ XSingleton<XFxMgr>.singleton.DestroyFx(this._moveFx, true);
+ }
+ Transform transform = base.transform.Find(string.Format("AddFx{0}", index));
+ Transform transform2 = this.m_BlueLevel.gameObject.transform;
+ this._addFx = XSingleton<XFxMgr>.singleton.CreateUIFx("Effects/FX_Particle/UIfx/UI_yxxg_xishou", transform, false);
+ this._boardFx = XSingleton<XFxMgr>.singleton.CreateUIFx("Effects/FX_Particle/UIfx/UI_yxxg_fangkai", transform2, false);
+ this._moveFx = XSingleton<XFxMgr>.singleton.CreateUIFx("Effects/FX_Particle/UIfx/UI_yxxg_guocheng", transform, false);
+ this._addFx.Play();
+ this._boardFx.Play();
+ Vector3 vector = transform2.position - transform.position;
+ float num = Vector3.Angle(Vector3.right, vector);
+ bool flag4 = vector.y < 0f;
+ if (flag4)
+ {
+ num = -num;
+ }
+ this._moveFx.Play(transform.transform.position, Quaternion.Euler(0f, 0f, num), Vector3.one, 1f);
+ }
+
+ public void OnSkillTipsCloseClick(IXUISprite iSp)
+ {
+ this.m_SkillTips.SetVisible(false);
+ }
+
+ public void ShowSkillTips(bool state, uint skillID, int skillLevel)
+ {
+ bool flag = XSingleton<XEntityMgr>.singleton.Player == null;
+ if (!flag)
+ {
+ this.m_SkillTips.SetVisible(state);
+ if (state)
+ {
+ SkillList.RowData skillConfig = XSingleton<XSkillEffectMgr>.singleton.GetSkillConfig(skillID, (uint)skillLevel, XSingleton<XEntityMgr>.singleton.Player.SkillCasterTypeID);
+ bool flag2 = skillConfig == null;
+ if (flag2)
+ {
+ XSingleton<XDebug>.singleton.AddLog("moba skill tips can't find skillconfig, skillID = ", skillID.ToString(), null, null, null, null, XDebugColor.XDebug_None);
+ this.m_SkillTips.SetVisible(false);
+ }
+ else
+ {
+ this.m_SkillName.SetText(skillConfig.ScriptName);
+ this.m_SkillAttr.SetText(XSkillTreeDocument.GetSkillAttrStr((int)skillConfig.Element));
+ this.m_SkillMP.SetText((skillConfig.CostMP[0] + skillConfig.CostMP[1] * (float)skillLevel).ToString());
+ bool flag3 = XSingleton<XEntityMgr>.singleton.Player != null && XEntity.ValideEntity(XSingleton<XEntityMgr>.singleton.Player.Transformer);
+ string text;
+ if (flag3)
+ {
+ text = string.Format("{0}s", Math.Round((double)XSkillMgr.GetCD(XSingleton<XEntityMgr>.singleton.Player.Transformer, skillConfig.SkillScript, (uint)skillLevel) + 0.01, 1));
+ }
+ else
+ {
+ text = "0s";
+ }
+ this.m_SkillCD.SetText(text);
+ this.m_SkillDesc.SetText(skillConfig.CurrentLevelDescription);
+ }
+ }
+ }
+ }
+
+ public void SetOnDeath()
+ {
+ this._OnDeath = true;
+ this.m_ReviveLeftTime.SetVisible(true);
+ }
+
+ public void OnAttrShowBtnClick(IXUISprite isp)
+ {
+ bool flag = DlgBase<DemoUI, DemoUIBehaviour>.singleton.IsVisible();
+ DlgBase<DemoUI, DemoUIBehaviour>.singleton.SetVisible(!flag, true);
+ bool flag2 = this._doc.MyData == null;
+ if (!flag2)
+ {
+ DlgBase<HeroAttrDlg, HeroAttrBehaviour>.singleton.ShowByType(SceneType.SCENE_MOBA, this._doc.MyData.heroID);
+ }
+ }
+
+ public override void OnUpdate()
+ {
+ base.OnUpdate();
+ bool flag = Camera.main != null;
+ if (flag)
+ {
+ int i = 0;
+ while (i < MobaBattleHandler.EXPMAXCOUT)
+ {
+ bool state = this.m_ExpList[i].state;
+ if (state)
+ {
+ bool flag2 = Time.realtimeSinceStartup > this.m_ExpList[i].vaildTime;
+ if (flag2)
+ {
+ this.m_ExpList[i].state = false;
+ this.m_ExpList[i].m_Go.SetActive(false);
+ }
+ }
+ IL_6E:
+ i++;
+ continue;
+ goto IL_6E;
+ }
+ }
+ bool flag3 = Time.realtimeSinceStartup - this._refreshSignTime < 1f;
+ if (!flag3)
+ {
+ bool activeInHierarchy = this.m_DetailFrame.activeInHierarchy;
+ if (activeInHierarchy)
+ {
+ this._refreshSignTime = Time.realtimeSinceStartup;
+ for (int j = 0; j < this._uidList.Count; j++)
+ {
+ MobaMemberData mobaMemberData;
+ bool flag4 = !this._doc.MobaData.TryGetValue(this._uidList[j], out mobaMemberData);
+ if (flag4)
+ {
+ XSingleton<XDebug>.singleton.AddErrorLog("can't update label because not find data by uid = ", this._uidList[j].ToString(), null, null, null, null);
+ }
+ else
+ {
+ bool flag5 = mobaMemberData.reviveTime <= 0f;
+ if (flag5)
+ {
+ this._labelList[j].SetVisible(false);
+ }
+ else
+ {
+ this._labelList[j].SetVisible(true);
+ this._labelList[j].SetText(mobaMemberData.reviveTime.ToString());
+ }
+ }
+ }
+ }
+ bool flag6 = this._OnDeath && this._doc.MyData != null;
+ if (flag6)
+ {
+ this._refreshSignTime = Time.realtimeSinceStartup;
+ bool flag7 = this._doc.MyData.reviveTime <= 0f;
+ if (flag7)
+ {
+ this._OnDeath = false;
+ this.m_ReviveLeftTime.SetVisible(false);
+ }
+ else
+ {
+ this.m_ReviveLeftTime.SetText(this._doc.MyData.reviveTime.ToString());
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/MobaBattleHandler.cs.meta b/Client/Assets/Scripts/XMainClient/UI/MobaBattleHandler.cs.meta
new file mode 100644
index 00000000..d5fdd8ab
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/MobaBattleHandler.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 28035d19015a75844acfec68ff0b7b3f
+timeCreated: 1611403473
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/MobaBehaviour.cs b/Client/Assets/Scripts/XMainClient/UI/MobaBehaviour.cs
new file mode 100644
index 00000000..3e37d276
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/MobaBehaviour.cs
@@ -0,0 +1,16 @@
+using System;
+using UILib;
+using XMainClient.UI.UICommon;
+
+namespace XMainClient.UI
+{
+ internal class MobaBehaviour : DlgBehaviourBase
+ {
+ public IXUITexture m_Texture;
+
+ private void Awake()
+ {
+ this.m_Texture = (base.transform.Find("End/Icon").GetComponent("XUITexture") as IXUITexture);
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/MobaBehaviour.cs.meta b/Client/Assets/Scripts/XMainClient/UI/MobaBehaviour.cs.meta
new file mode 100644
index 00000000..ee5986ad
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/MobaBehaviour.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: d2be63ba31d3dac45b9fa927a3adac24
+timeCreated: 1611404596
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/MobaEndDlg.cs b/Client/Assets/Scripts/XMainClient/UI/MobaEndDlg.cs
new file mode 100644
index 00000000..2cd70f66
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/MobaEndDlg.cs
@@ -0,0 +1,62 @@
+using System;
+using XMainClient.UI.UICommon;
+
+namespace XMainClient.UI
+{
+ internal class MobaEndDlg : DlgBase<MobaEndDlg, MobaBehaviour>
+ {
+ public override bool autoload
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override string fileName
+ {
+ get
+ {
+ return "GameSystem/MobaEndDlg";
+ }
+ }
+
+ protected override void Init()
+ {
+ base.Init();
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ }
+
+ public void SetPic(bool isWin)
+ {
+ if (isWin)
+ {
+ base.uiBehaviour.m_Texture.SetTexturePath("atlas/UI/Battle/victery");
+ }
+ else
+ {
+ base.uiBehaviour.m_Texture.SetTexturePath("atlas/UI/Battle/failure");
+ }
+ }
+
+ protected override void OnHide()
+ {
+ base.uiBehaviour.m_Texture.SetTexturePath("");
+ base.OnHide();
+ }
+
+ protected override void OnUnload()
+ {
+ base.OnUnload();
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/MobaEndDlg.cs.meta b/Client/Assets/Scripts/XMainClient/UI/MobaEndDlg.cs.meta
new file mode 100644
index 00000000..841dd9bc
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/MobaEndDlg.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: fe9afbcda8e696f4aa161e450977d6a8
+timeCreated: 1611404942
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/MobaHeadCondition.cs b/Client/Assets/Scripts/XMainClient/UI/MobaHeadCondition.cs
new file mode 100644
index 00000000..46144beb
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/MobaHeadCondition.cs
@@ -0,0 +1,185 @@
+using System;
+using System.Collections.Generic;
+using UILib;
+using UnityEngine;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class MobaHeadCondition : DlgHandlerBase
+ {
+ public List<MobaMemberData> SelfTeamDatas
+ {
+ get
+ {
+ bool flag = this.m_selfTeamDatas == null;
+ if (flag)
+ {
+ this.m_selfTeamDatas = new List<MobaMemberData>();
+ }
+ return this.m_selfTeamDatas;
+ }
+ }
+
+ public List<MobaMemberData> OtherTeamDatas
+ {
+ get
+ {
+ bool flag = this.m_otherTeamDatas == null;
+ if (flag)
+ {
+ this.m_otherTeamDatas = new List<MobaMemberData>();
+ }
+ return this.m_otherTeamDatas;
+ }
+ }
+
+ private List<Transform> m_selfTeamPlayers;
+
+ private List<Transform> m_otherTeamPlayers;
+
+ private List<MobaMemberData> m_selfTeamDatas;
+
+ private List<MobaMemberData> m_otherTeamDatas;
+
+ private IXUISprite m_selfTemp;
+
+ private IXUISprite m_otherTemp;
+
+ private XMobaBattleDocument m_doc;
+
+ private float _RefreshSignTime = 0f;
+
+ protected override void Init()
+ {
+ base.Init();
+ this.m_doc = XDocuments.GetSpecificDocument<XMobaBattleDocument>(XMobaBattleDocument.uuID);
+ this.m_selfTemp = (base.transform.Find("blue").GetComponent("XUISprite") as IXUISprite);
+ this.m_selfTemp.SetVisible(false);
+ this.m_otherTemp = (base.transform.Find("red").GetComponent("XUISprite") as IXUISprite);
+ this.m_otherTemp.SetVisible(false);
+ }
+
+ public override void OnUnload()
+ {
+ bool flag = this.m_selfTeamPlayers != null;
+ if (flag)
+ {
+ this.m_selfTeamPlayers.Clear();
+ this.m_selfTeamPlayers = null;
+ }
+ bool flag2 = this.m_otherTeamDatas != null;
+ if (flag2)
+ {
+ this.m_otherTeamPlayers.Clear();
+ this.m_otherTeamPlayers = null;
+ }
+ bool flag3 = this.m_selfTeamDatas != null;
+ if (flag3)
+ {
+ this.m_selfTeamDatas.Clear();
+ this.m_selfTeamDatas = null;
+ }
+ bool flag4 = this.m_otherTeamDatas != null;
+ if (flag4)
+ {
+ this.m_otherTeamDatas.Clear();
+ this.m_otherTeamDatas = null;
+ }
+ base.OnUnload();
+ }
+
+ public override void OnUpdate()
+ {
+ base.OnUpdate();
+ bool flag = Time.realtimeSinceStartup - this._RefreshSignTime < 1f;
+ if (!flag)
+ {
+ this._RefreshSignTime = Time.realtimeSinceStartup;
+ this.SelfTeamDatas.Clear();
+ this.OtherTeamDatas.Clear();
+ int i = 0;
+ int count = this.m_doc.MobaData.BufferValues.Count;
+ while (i < count)
+ {
+ bool flag2 = this.FilterSelfTeamPlayer(this.m_doc.MobaData.BufferValues[i]);
+ if (flag2)
+ {
+ this.SelfTeamDatas.Add(this.m_doc.MobaData.BufferValues[i]);
+ }
+ else
+ {
+ bool flag3 = this.FilterOtherTeamPlayer(this.m_doc.MobaData.BufferValues[i]);
+ if (flag3)
+ {
+ this.OtherTeamDatas.Add(this.m_doc.MobaData.BufferValues[i]);
+ }
+ }
+ i++;
+ }
+ this.ShowHeaders(ref this.m_selfTeamPlayers, this.SelfTeamDatas, this.m_selfTemp);
+ this.ShowHeaders(ref this.m_otherTeamPlayers, this.OtherTeamDatas, this.m_otherTemp);
+ }
+ }
+
+ private void ShowHeaders(ref List<Transform> headers, List<MobaMemberData> members, IXUISprite tempSprite)
+ {
+ bool flag = headers == null;
+ if (flag)
+ {
+ headers = new List<Transform>();
+ }
+ int count = members.Count;
+ int i = headers.Count;
+ while (i < count)
+ {
+ GameObject gameObject = XCommon.Instantiate<GameObject>(tempSprite.gameObject);
+ gameObject.transform.parent = tempSprite.transform.parent;
+ gameObject.transform.localScale = Vector3.one;
+ gameObject.transform.localPosition = tempSprite.transform.localPosition + new Vector3((float)(tempSprite.spriteWidth * i), 0f, 0f);
+ gameObject.name = tempSprite.gameObject.name + i.ToString();
+ i++;
+ headers.Add(gameObject.transform);
+ }
+ for (int j = 0; j < i; j++)
+ {
+ bool flag2 = j < count;
+ if (flag2)
+ {
+ headers[j].gameObject.SetActive(true);
+ IXUISprite ixuisprite = headers[j].Find("HeroIcon").GetComponent("XUISprite") as IXUISprite;
+ IXUILabel ixuilabel = headers[j].Find("TIME").GetComponent("XUILabel") as IXUILabel;
+ string strAtlas;
+ string strSprite;
+ XHeroBattleDocument.GetIconByHeroID(members[j].heroID, out strAtlas, out strSprite);
+ ixuisprite.SetSprite(strSprite, strAtlas, false);
+ bool flag3 = members[j].reviveTime > 0f;
+ if (flag3)
+ {
+ ixuisprite.SetGrey(false);
+ ixuilabel.SetText(((int)members[j].reviveTime).ToString());
+ }
+ else
+ {
+ ixuisprite.SetGrey(true);
+ ixuilabel.SetText(string.Empty);
+ }
+ }
+ else
+ {
+ headers[j].gameObject.SetActive(false);
+ }
+ }
+ }
+
+ private bool FilterSelfTeamPlayer(MobaMemberData mobaMember)
+ {
+ return this.m_doc.isAlly((int)mobaMember.teamID) && !mobaMember.isMy;
+ }
+
+ private bool FilterOtherTeamPlayer(MobaMemberData mobaMember)
+ {
+ return !this.m_doc.isAlly((int)mobaMember.teamID) && mobaMember.reviveTime > 0f;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/MobaHeadCondition.cs.meta b/Client/Assets/Scripts/XMainClient/UI/MobaHeadCondition.cs.meta
new file mode 100644
index 00000000..a644735b
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/MobaHeadCondition.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 21ca97beb40add14194b4bce9a7a4444
+timeCreated: 1611403415
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/ModalDlg.cs b/Client/Assets/Scripts/XMainClient/UI/ModalDlg.cs
new file mode 100644
index 00000000..be329e28
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/ModalDlg.cs
@@ -0,0 +1,250 @@
+using System;
+using System.Collections.Generic;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ public class ModalDlg : DlgBase<ModalDlg, ModalDlgBehaviour>, IModalDlg, IXInterface
+ {
+ public bool Deprecated { get; set; }
+
+ public override string fileName
+ {
+ get
+ {
+ return "Common/GreyModalDlg";
+ }
+ }
+
+ public override int layer
+ {
+ get
+ {
+ return 100;
+ }
+ }
+
+ public override bool isHideChat
+ {
+ get
+ {
+ return false;
+ }
+ }
+
+ public override bool autoload
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public bool _bHasGrey = true;
+
+ private ButtonClickEventHandler _bFrButtonDelegate = null;
+
+ private ButtonClickEventHandler _bSecButtonDelegate = null;
+
+ private Dictionary<XTempTipDefine, bool> tempTip = new Dictionary<XTempTipDefine, bool>(default(XFastEnumIntEqualityComparer<XTempTipDefine>));
+
+ private XTempTipDefine _current;
+
+ private string _title = "";
+
+ public XTempTipDefine StartTip = XTempTipDefine.OD_START;
+
+ public ModalDlg()
+ {
+ int num = 0;
+ for (XTempTipDefine xtempTipDefine = (XTempTipDefine)num; xtempTipDefine != XTempTipDefine.OD_END; xtempTipDefine = (XTempTipDefine)num)
+ {
+ this.tempTip.Add(xtempTipDefine, false);
+ num++;
+ }
+ this._current = XTempTipDefine.OD_START;
+ }
+
+ protected override void Init()
+ {
+ this.SetSingleButtonMode(true);
+ base.uiBehaviour.m_CloseButton.SetVisible(false);
+ base.uiBehaviour.m_title.gameObject.SetActive(false);
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ this.ShowNoTip(this.StartTip);
+ }
+
+ protected override void OnHide()
+ {
+ this.StartTip = XTempTipDefine.OD_START;
+ base.uiBehaviour.m_lblTip.SetText(XStringDefineProxy.GetString("MODAL_NOTIP"));
+ base.uiBehaviour.m_CloseButton.gameObject.SetActive(false);
+ base.uiBehaviour.m_title.gameObject.SetActive(false);
+ this._title = "";
+ base.OnHide();
+ }
+
+ public void SetPanelDepth(int depth)
+ {
+ base.uiBehaviour.m_Panel.SetDepth(depth);
+ }
+
+ public void SetSingleButtonMode(bool bFlag)
+ {
+ float y = base.uiBehaviour.m_OKButton.gameObject.transform.localPosition.y;
+ if (bFlag)
+ {
+ base.uiBehaviour.m_CancelButton.SetVisible(false);
+ base.uiBehaviour.m_OKButton.gameObject.transform.localPosition = new Vector3(0f, y);
+ }
+ else
+ {
+ base.uiBehaviour.m_CancelButton.SetVisible(true);
+ base.uiBehaviour.m_OKButton.gameObject.transform.localPosition = base.uiBehaviour.m_TwoButtonPos0.transform.localPosition;
+ base.uiBehaviour.m_CancelButton.gameObject.transform.localPosition = base.uiBehaviour.m_TwoButtonPos1.transform.localPosition;
+ }
+ }
+
+ public void SetCloseButtonVisible(bool visible)
+ {
+ base.uiBehaviour.m_CloseButton.SetVisible(visible);
+ }
+
+ public void SetTitle(string title)
+ {
+ this._title = title;
+ }
+
+ public void LuaShow(string content, ButtonClickEventHandler handler, ButtonClickEventHandler handler2)
+ {
+ this.SetVisible(true, true);
+ this.SetSingleButtonMode(false);
+ this.SetLabelsWithSymbols(content, "OK", "Cancel");
+ base.uiBehaviour.m_OKButton.RegisterClickEventHandler(handler);
+ base.uiBehaviour.m_CancelButton.RegisterClickEventHandler(handler2);
+ }
+
+ public void SetLabels(string mainLabel, string frLabel, string secLabel)
+ {
+ base.uiBehaviour.m_LabelSymbol.InputText = "";
+ base.uiBehaviour.m_Label.SetText(mainLabel);
+ base.uiBehaviour.m_OKButton.SetCaption(frLabel);
+ base.uiBehaviour.m_CancelButton.SetCaption(secLabel);
+ }
+
+ public void SetLabelsWithSymbols(string mainLabel, string frLabel, string secLabel)
+ {
+ base.uiBehaviour.m_LabelSymbol.InputText = mainLabel;
+ base.uiBehaviour.m_OKButton.SetCaption(frLabel);
+ base.uiBehaviour.m_CancelButton.SetCaption(secLabel);
+ base.uiBehaviour.m_title.gameObject.SetActive(!string.IsNullOrEmpty(this._title));
+ base.uiBehaviour.m_title.SetText(this._title);
+ }
+
+ public void SetModalCallback(ButtonClickEventHandler handle, ButtonClickEventHandler handle2 = null)
+ {
+ this._bFrButtonDelegate = new ButtonClickEventHandler(this.SetTempTip);
+ this._bFrButtonDelegate = (ButtonClickEventHandler)Delegate.Combine(this._bFrButtonDelegate, handle);
+ base.uiBehaviour.m_OKButton.RegisterClickEventHandler(this._bFrButtonDelegate);
+ this._bSecButtonDelegate = new ButtonClickEventHandler(this.SetTempTip);
+ bool flag = handle2 != null;
+ if (flag)
+ {
+ this._bSecButtonDelegate = (ButtonClickEventHandler)Delegate.Combine(this._bSecButtonDelegate, handle2);
+ }
+ else
+ {
+ this._bSecButtonDelegate = (ButtonClickEventHandler)Delegate.Combine(this._bSecButtonDelegate, new ButtonClickEventHandler(this.DoCancel));
+ }
+ base.uiBehaviour.m_CancelButton.RegisterClickEventHandler(this._bSecButtonDelegate);
+ }
+
+ public void SetTweenTargetAndPlay(GameObject go)
+ {
+ this.SetVisible(true, true);
+ base.uiBehaviour.m_PlayTween.SetTargetGameObject(go);
+ base.uiBehaviour.m_PlayTween.PlayTween(true, -1f);
+ }
+
+ public override void RegisterEvent()
+ {
+ base.uiBehaviour.m_CancelButton.RegisterClickEventHandler(new ButtonClickEventHandler(this.DoCancel));
+ base.uiBehaviour.m_CloseButton.RegisterClickEventHandler(new ButtonClickEventHandler(this.DoClose));
+ }
+
+ public bool SetTempTip(IXUIButton go)
+ {
+ bool flag = this._current == XTempTipDefine.OD_START;
+ bool result;
+ if (flag)
+ {
+ result = false;
+ }
+ else
+ {
+ this.tempTip[this._current] = base.uiBehaviour.m_NoTip.bChecked;
+ result = true;
+ }
+ return result;
+ }
+
+ public void ForceSetTipsValue(XTempTipDefine type, bool state)
+ {
+ this.tempTip[type] = state;
+ }
+
+ public bool DoCancel(IXUIButton go)
+ {
+ this.SetVisible(false, true);
+ return true;
+ }
+
+ public void DoCancel(IXUISprite sp)
+ {
+ this.SetVisible(false, true);
+ }
+
+ public bool DoClose(IXUIButton go)
+ {
+ this.SetVisible(false, true);
+ return true;
+ }
+
+ public bool GetTempTip(XTempTipDefine tip)
+ {
+ bool flag = tip == XTempTipDefine.OD_START;
+ return !flag && this.tempTip[tip];
+ }
+
+ public void ShowNoTip(XTempTipDefine tip)
+ {
+ bool flag = tip == XTempTipDefine.OD_START;
+ if (flag)
+ {
+ base.uiBehaviour.m_NoTip.gameObject.transform.parent.gameObject.SetActive(false);
+ }
+ else
+ {
+ bool flag2 = tip == XTempTipDefine.OD_CHAT_WORLD;
+ if (flag2)
+ {
+ base.uiBehaviour.m_lblTip.SetText(XStringDefineProxy.GetString("MODAL_CHAT"));
+ }
+ else
+ {
+ base.uiBehaviour.m_lblTip.SetText(XStringDefineProxy.GetString("MODAL_NOTIP"));
+ }
+ base.uiBehaviour.m_NoTip.gameObject.transform.parent.gameObject.SetActive(true);
+ base.uiBehaviour.m_NoTip.bChecked = false;
+ }
+ this._current = tip;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/ModalDlg.cs.meta b/Client/Assets/Scripts/XMainClient/UI/ModalDlg.cs.meta
new file mode 100644
index 00000000..b94d2cd6
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/ModalDlg.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: d28c3921e33a58744850b9b895b80ec9
+timeCreated: 1611404595
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/ModalDlg2.cs b/Client/Assets/Scripts/XMainClient/UI/ModalDlg2.cs
new file mode 100644
index 00000000..0eef6134
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/ModalDlg2.cs
@@ -0,0 +1,91 @@
+using System;
+using UILib;
+using XMainClient.UI.UICommon;
+
+namespace XMainClient.UI
+{
+ public class ModalDlg2 : DlgBase<ModalDlg2, ModalDlg2Behaviour>
+ {
+ public override string fileName
+ {
+ get
+ {
+ return "Common/GreyModalDlg2";
+ }
+ }
+
+ public override int layer
+ {
+ get
+ {
+ return 100;
+ }
+ }
+
+ public override bool isHideChat
+ {
+ get
+ {
+ return false;
+ }
+ }
+
+ public override bool autoload
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ private ButtonClickEventHandler _bFrButtonDelegate = null;
+
+ private ButtonClickEventHandler _bSecButtonDelegate = null;
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ base.uiBehaviour.m_Close.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnCloseBtnClick));
+ base.uiBehaviour.m_Select1.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnSelect1BtnClick));
+ base.uiBehaviour.m_Select2.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnSelect2BtnClick));
+ }
+
+ public bool OnCloseBtnClick(IXUIButton btn)
+ {
+ this.SetVisible(false, true);
+ return true;
+ }
+
+ public bool OnSelect1BtnClick(IXUIButton btn)
+ {
+ this._bFrButtonDelegate(base.uiBehaviour.m_Select1);
+ this.SetVisible(false, true);
+ return true;
+ }
+
+ public bool OnSelect2BtnClick(IXUIButton btn)
+ {
+ this._bSecButtonDelegate(base.uiBehaviour.m_Select2);
+ this.SetVisible(false, true);
+ return true;
+ }
+
+ public void SetBtnMsg(IXUIButton btn, string price, string label)
+ {
+ IXUILabelSymbol ixuilabelSymbol = btn.gameObject.transform.Find("Price").GetComponent("XUILabelSymbol") as IXUILabelSymbol;
+ IXUILabel ixuilabel = btn.gameObject.transform.Find("Label").GetComponent("XUILabel") as IXUILabel;
+ ixuilabelSymbol.InputText = price;
+ ixuilabel.SetText(label);
+ }
+
+ public void InitShow(string text, ButtonClickEventHandler func1, ButtonClickEventHandler func2, string price1, string price2, string btnLabel1, string btnLabel2)
+ {
+ this.SetVisible(true, true);
+ this.SetBtnMsg(base.uiBehaviour.m_Select1, price1, btnLabel1);
+ this.SetBtnMsg(base.uiBehaviour.m_Select2, price2, btnLabel2);
+ base.uiBehaviour.m_Text.InputText = text;
+ this._bFrButtonDelegate = func1;
+ this._bSecButtonDelegate = func2;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/ModalDlg2.cs.meta b/Client/Assets/Scripts/XMainClient/UI/ModalDlg2.cs.meta
new file mode 100644
index 00000000..b87c5394
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/ModalDlg2.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 3271e014731b3e44c9d14c6743d39041
+timeCreated: 1611403549
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/ModalDlg2Behaviour.cs b/Client/Assets/Scripts/XMainClient/UI/ModalDlg2Behaviour.cs
new file mode 100644
index 00000000..4c40c01a
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/ModalDlg2Behaviour.cs
@@ -0,0 +1,25 @@
+using System;
+using UILib;
+using XMainClient.UI.UICommon;
+
+namespace XMainClient.UI
+{
+ public class ModalDlg2Behaviour : DlgBehaviourBase
+ {
+ public IXUIButton m_Close;
+
+ public IXUILabelSymbol m_Text;
+
+ public IXUIButton m_Select1;
+
+ public IXUIButton m_Select2;
+
+ private void Awake()
+ {
+ this.m_Close = (base.transform.Find("Bg/Close").GetComponent("XUIButton") as IXUIButton);
+ this.m_Text = (base.transform.Find("Bg/Label").GetComponent("XUILabelSymbol") as IXUILabelSymbol);
+ this.m_Select1 = (base.transform.Find("Bg/Select1").GetComponent("XUIButton") as IXUIButton);
+ this.m_Select2 = (base.transform.Find("Bg/Select2").GetComponent("XUIButton") as IXUIButton);
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/ModalDlg2Behaviour.cs.meta b/Client/Assets/Scripts/XMainClient/UI/ModalDlg2Behaviour.cs.meta
new file mode 100644
index 00000000..fb2691ff
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/ModalDlg2Behaviour.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 4cbd68b665cb5b54f8fc177e704fae2d
+timeCreated: 1611403693
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/ModalDlgBehaviour.cs b/Client/Assets/Scripts/XMainClient/UI/ModalDlgBehaviour.cs
new file mode 100644
index 00000000..4bf66194
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/ModalDlgBehaviour.cs
@@ -0,0 +1,58 @@
+using System;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+
+namespace XMainClient.UI
+{
+ public class ModalDlgBehaviour : DlgBehaviourBase
+ {
+ public IXUILabel m_Label = null;
+
+ public IXUILabelSymbol m_LabelSymbol = null;
+
+ public IXUIButton m_OKButton = null;
+
+ public IXUIButton m_CancelButton = null;
+
+ public IXUIButton m_CloseButton = null;
+
+ public IXUISprite m_Grey = null;
+
+ public IXUITweenTool m_PlayTween = null;
+
+ public IXUIPanel m_Panel = null;
+
+ public GameObject m_TwoButtonPos0;
+
+ public GameObject m_TwoButtonPos1;
+
+ public IXUICheckBox m_NoTip = null;
+
+ public IXUILabel m_lblTip = null;
+
+ public IXUILabel m_title = null;
+
+ private void Awake()
+ {
+ Transform transform = base.transform.Find("Bg/Label");
+ this.m_Label = (transform.GetComponent("XUILabel") as IXUILabel);
+ this.m_LabelSymbol = (transform.GetComponent("XUILabelSymbol") as IXUILabelSymbol);
+ Transform transform2 = base.transform.Find("Bg/OK");
+ this.m_OKButton = (transform2.GetComponent("XUIButton") as IXUIButton);
+ Transform transform3 = base.transform.Find("Bg/Cancel");
+ this.m_CancelButton = (transform3.GetComponent("XUIButton") as IXUIButton);
+ this.m_CloseButton = (base.transform.Find("Bg/Close").GetComponent("XUIButton") as IXUIButton);
+ this.m_CloseButton.SetVisible(false);
+ this.m_Grey = (base.transform.Find("Grey").GetComponent("XUISprite") as IXUISprite);
+ Transform transform4 = base.transform.Find("Bg");
+ this.m_PlayTween = (transform4.GetComponent("XUIPlayTween") as IXUITweenTool);
+ this.m_Panel = (base.transform.GetComponent("XUIPanel") as IXUIPanel);
+ this.m_TwoButtonPos0 = base.transform.Find("Bg/TwoButtonPos0").gameObject;
+ this.m_TwoButtonPos1 = base.transform.Find("Bg/TwoButtonPos1").gameObject;
+ this.m_NoTip = (transform4.Find("NoTip/NoTip").GetComponent("XUICheckBox") as IXUICheckBox);
+ this.m_lblTip = (transform4.transform.Find("NoTip/T").GetComponent("XUILabel") as IXUILabel);
+ this.m_title = (transform4.transform.Find("Title").GetComponent("XUILabel") as IXUILabel);
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/ModalDlgBehaviour.cs.meta b/Client/Assets/Scripts/XMainClient/UI/ModalDlgBehaviour.cs.meta
new file mode 100644
index 00000000..9c4a888f
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/ModalDlgBehaviour.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: f4361208f1b0f5b4d852533df78e60e8
+timeCreated: 1611404852
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/ModalSettingNumberDlg.cs b/Client/Assets/Scripts/XMainClient/UI/ModalSettingNumberDlg.cs
new file mode 100644
index 00000000..2a404408
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/ModalSettingNumberDlg.cs
@@ -0,0 +1,164 @@
+using System;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ public class ModalSettingNumberDlg : DlgBase<ModalSettingNumberDlg, ModalSettingNumberDlgBehaviour>
+ {
+ public override string fileName
+ {
+ get
+ {
+ return "Common/ModelSettingNumber";
+ }
+ }
+
+ public override int layer
+ {
+ get
+ {
+ return 100;
+ }
+ }
+
+ public override bool isHideChat
+ {
+ get
+ {
+ return false;
+ }
+ }
+
+ public override bool autoload
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public uint MinNumber = 0u;
+
+ public uint MaxNumber = 100u;
+
+ public uint step = 1u;
+
+ public uint ItemID = 0u;
+
+ public string Title;
+
+ public ModalSettingNumberDlg.GetInputNumber callBack;
+
+ public delegate void GetInputNumber(uint number);
+
+ protected override void Init()
+ {
+ base.uiBehaviour.CancelBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.DoCancel));
+ base.uiBehaviour.OkBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.DoClose));
+ base.uiBehaviour.backSprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.DoCancel));
+ base.uiBehaviour.AddBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.DoAdd));
+ base.uiBehaviour.SubBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.DoSub));
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ base.uiBehaviour.numLabel.SetText(this.MinNumber.ToString());
+ base.uiBehaviour.titleLabel.SetText(this.Title);
+ XSingleton<XItemDrawerMgr>.singleton.normalItemDrawer.DrawItem(base.uiBehaviour.itemObject, (int)this.ItemID, 1, false);
+ }
+
+ protected override void OnHide()
+ {
+ base.OnHide();
+ }
+
+ public void SetPanelDepth(int depth)
+ {
+ }
+
+ public void SetSingleButtonMode(bool bFlag)
+ {
+ }
+
+ public void SetCloseButtonVisible(bool visible)
+ {
+ }
+
+ public void SetModalInfo(ModalSettingNumberDlg.GetInputNumber handle)
+ {
+ this.callBack = handle;
+ }
+
+ public void SetTweenTargetAndPlay(GameObject go)
+ {
+ }
+
+ public override void RegisterEvent()
+ {
+ }
+
+ private bool DoSub(IXUIButton button)
+ {
+ int num = 0;
+ bool flag = int.TryParse(base.uiBehaviour.numLabel.GetText(), out num);
+ if (flag)
+ {
+ num = Math.Max((int)this.MinNumber, (int)((long)num - (long)((ulong)this.step)));
+ base.uiBehaviour.numLabel.SetText(num.ToString());
+ }
+ return true;
+ }
+
+ private bool DoAdd(IXUIButton button)
+ {
+ uint num = 0u;
+ bool flag = uint.TryParse(base.uiBehaviour.numLabel.GetText(), out num);
+ if (flag)
+ {
+ num = Math.Min(this.MaxNumber, num + this.step);
+ base.uiBehaviour.numLabel.SetText(num.ToString());
+ }
+ return true;
+ }
+
+ public bool DoCancel(IXUIButton go)
+ {
+ this.SetVisible(false, true);
+ this.callBack = null;
+ return true;
+ }
+
+ public void DoCancel(IXUISprite sp)
+ {
+ this.ResetData();
+ }
+
+ private void ResetData()
+ {
+ this.callBack = null;
+ this.step = 1u;
+ base.uiBehaviour.numLabel.SetText("1");
+ this.SetVisible(false, true);
+ }
+
+ public bool DoClose(IXUIButton go)
+ {
+ bool flag = this.callBack != null;
+ if (flag)
+ {
+ uint number = 0u;
+ bool flag2 = uint.TryParse(base.uiBehaviour.numLabel.GetText(), out number);
+ if (flag2)
+ {
+ this.callBack(number);
+ }
+ }
+ this.ResetData();
+ return true;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/ModalSettingNumberDlg.cs.meta b/Client/Assets/Scripts/XMainClient/UI/ModalSettingNumberDlg.cs.meta
new file mode 100644
index 00000000..c92df503
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/ModalSettingNumberDlg.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: a80571a4406e1a8488f5c630c87c06d2
+timeCreated: 1611404294
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/ModalSettingNumberDlgBehaviour.cs b/Client/Assets/Scripts/XMainClient/UI/ModalSettingNumberDlgBehaviour.cs
new file mode 100644
index 00000000..da2aa8b1
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/ModalSettingNumberDlgBehaviour.cs
@@ -0,0 +1,38 @@
+using System;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+
+namespace XMainClient.UI
+{
+ public class ModalSettingNumberDlgBehaviour : DlgBehaviourBase
+ {
+ public IXUIButton AddBtn;
+
+ public IXUIButton SubBtn;
+
+ public IXUIButton CancelBtn;
+
+ public IXUIButton OkBtn;
+
+ public GameObject itemObject;
+
+ public IXUILabel numLabel;
+
+ public IXUILabel titleLabel;
+
+ public IXUISprite backSprite;
+
+ private void Awake()
+ {
+ this.AddBtn = (base.transform.Find("Count/Add").GetComponent("XUIButton") as IXUIButton);
+ this.SubBtn = (base.transform.Find("Count/Sub").GetComponent("XUIButton") as IXUIButton);
+ this.numLabel = (base.transform.Find("Count/number").GetComponent("XUILabel") as IXUILabel);
+ this.titleLabel = (base.transform.Find("findname").GetComponent("XUILabel") as IXUILabel);
+ this.CancelBtn = (base.transform.Find("BtnNO").GetComponent("XUIButton") as IXUIButton);
+ this.OkBtn = (base.transform.Find("BtnOK").GetComponent("XUIButton") as IXUIButton);
+ this.itemObject = base.transform.Find("ItemTemplate").gameObject;
+ this.backSprite = (base.transform.Find("back").GetComponent("XUISprite") as IXUISprite);
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/ModalSettingNumberDlgBehaviour.cs.meta b/Client/Assets/Scripts/XMainClient/UI/ModalSettingNumberDlgBehaviour.cs.meta
new file mode 100644
index 00000000..5a8d62fe
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/ModalSettingNumberDlgBehaviour.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 0b2ef5ce52c574e4cb0c0631c07d2be7
+timeCreated: 1611403166
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/ModalThreeDlg.cs b/Client/Assets/Scripts/XMainClient/UI/ModalThreeDlg.cs
new file mode 100644
index 00000000..494b48a5
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/ModalThreeDlg.cs
@@ -0,0 +1,148 @@
+using System;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+
+namespace XMainClient.UI
+{
+ public class ModalThreeDlg : DlgBase<ModalThreeDlg, ModalThreeDlgBehaviour>
+ {
+ public bool Deprecated { get; set; }
+
+ public override string fileName
+ {
+ get
+ {
+ return "Common/ThreeChoiceModalDlg";
+ }
+ }
+
+ public override int layer
+ {
+ get
+ {
+ return 90;
+ }
+ }
+
+ public override bool isHideChat
+ {
+ get
+ {
+ return false;
+ }
+ }
+
+ public override bool autoload
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ private ButtonClickEventHandler _bFrButtonDelegate = null;
+
+ private ButtonClickEventHandler _bSecButtonDelegate = null;
+
+ private ButtonClickEventHandler _bTrdButtonDelegate = null;
+
+ protected override void Init()
+ {
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ }
+
+ protected override void OnHide()
+ {
+ base.OnHide();
+ }
+
+ public void SetPanelDepth(int depth)
+ {
+ base.uiBehaviour.m_Panel.SetDepth(depth);
+ }
+
+ public void SetCloseButtonVisible(bool visible)
+ {
+ base.uiBehaviour.m_CloseButton.SetVisible(visible);
+ }
+
+ public void SetLabels(string mainLabel, string frLabel, string secLabel, string thdLabel)
+ {
+ base.uiBehaviour.m_LabelSymbol.InputText = "";
+ base.uiBehaviour.m_Label.SetText(mainLabel);
+ base.uiBehaviour.m_Button1.SetCaption(frLabel);
+ base.uiBehaviour.m_Button2.SetCaption(secLabel);
+ base.uiBehaviour.m_Button3.SetCaption(thdLabel);
+ }
+
+ public void SetLabelsWithSymbols(string mainLabel, string frLabel, string secLabel, string thdLabel)
+ {
+ base.uiBehaviour.m_LabelSymbol.InputText = mainLabel;
+ base.uiBehaviour.m_Button1.SetCaption(frLabel);
+ base.uiBehaviour.m_Button2.SetCaption(secLabel);
+ base.uiBehaviour.m_Button3.SetCaption(thdLabel);
+ }
+
+ public void SetMainLabel(string mainlabel)
+ {
+ base.uiBehaviour.m_LabelSymbol.InputText = mainlabel;
+ }
+
+ public void SetModalCallback(ButtonClickEventHandler handle, ButtonClickEventHandler handle2 = null, ButtonClickEventHandler handle3 = null)
+ {
+ this._bFrButtonDelegate = new ButtonClickEventHandler(this.DoCancel);
+ bool flag = handle != null;
+ if (flag)
+ {
+ this._bFrButtonDelegate = handle;
+ }
+ base.uiBehaviour.m_Button1.RegisterClickEventHandler(this._bFrButtonDelegate);
+ this._bSecButtonDelegate = new ButtonClickEventHandler(this.DoCancel);
+ bool flag2 = handle2 != null;
+ if (flag2)
+ {
+ this._bSecButtonDelegate = handle2;
+ }
+ base.uiBehaviour.m_Button2.RegisterClickEventHandler(this._bSecButtonDelegate);
+ this._bTrdButtonDelegate = new ButtonClickEventHandler(this.DoCancel);
+ bool flag3 = handle3 != null;
+ if (flag3)
+ {
+ this._bTrdButtonDelegate = handle3;
+ }
+ base.uiBehaviour.m_Button3.RegisterClickEventHandler(this._bTrdButtonDelegate);
+ }
+
+ public void SetTweenTargetAndPlay(GameObject go)
+ {
+ this.SetVisible(true, true);
+ }
+
+ public override void RegisterEvent()
+ {
+ base.uiBehaviour.m_CloseButton.RegisterClickEventHandler(new ButtonClickEventHandler(this.DoClose));
+ }
+
+ public bool DoCancel(IXUIButton go)
+ {
+ this.SetVisible(false, true);
+ return true;
+ }
+
+ public void DoCancel(IXUISprite sp)
+ {
+ this.SetVisible(false, true);
+ }
+
+ public bool DoClose(IXUIButton go)
+ {
+ this.SetVisible(false, true);
+ return true;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/ModalThreeDlg.cs.meta b/Client/Assets/Scripts/XMainClient/UI/ModalThreeDlg.cs.meta
new file mode 100644
index 00000000..dbcf7364
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/ModalThreeDlg.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: fb0614b8a1abbd0449d092f5f98e9608
+timeCreated: 1611404929
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/ModalThreeDlgBehaviour.cs b/Client/Assets/Scripts/XMainClient/UI/ModalThreeDlgBehaviour.cs
new file mode 100644
index 00000000..c3180f51
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/ModalThreeDlgBehaviour.cs
@@ -0,0 +1,36 @@
+using System;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+
+namespace XMainClient.UI
+{
+ public class ModalThreeDlgBehaviour : DlgBehaviourBase
+ {
+ public IXUIButton m_Button1;
+
+ public IXUIButton m_Button2;
+
+ public IXUIButton m_Button3;
+
+ public IXUIButton m_CloseButton;
+
+ public IXUIPanel m_Panel;
+
+ public IXUILabel m_Label = null;
+
+ public IXUILabelSymbol m_LabelSymbol = null;
+
+ private void Awake()
+ {
+ this.m_Button1 = (base.transform.Find("Bg/choice1").GetComponent("XUIButton") as IXUIButton);
+ this.m_Button2 = (base.transform.Find("Bg/choice2").GetComponent("XUIButton") as IXUIButton);
+ this.m_Button3 = (base.transform.Find("Bg/choice3").GetComponent("XUIButton") as IXUIButton);
+ this.m_CloseButton = (base.transform.Find("Bg/Close").GetComponent("XUIButton") as IXUIButton);
+ this.m_Panel = (base.transform.GetComponent("XUIPanel") as IXUIPanel);
+ Transform transform = base.transform.Find("Bg/Info");
+ this.m_Label = (transform.GetComponent("XUILabel") as IXUILabel);
+ this.m_LabelSymbol = (transform.GetComponent("XUILabelSymbol") as IXUILabelSymbol);
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/ModalThreeDlgBehaviour.cs.meta b/Client/Assets/Scripts/XMainClient/UI/ModalThreeDlgBehaviour.cs.meta
new file mode 100644
index 00000000..5d155709
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/ModalThreeDlgBehaviour.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 910886703b99a6740a89878f17a55656
+timeCreated: 1611404141
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/MoneyTreeData.cs b/Client/Assets/Scripts/XMainClient/UI/MoneyTreeData.cs
new file mode 100644
index 00000000..471ef9ee
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/MoneyTreeData.cs
@@ -0,0 +1,22 @@
+using System;
+using System.Collections.Generic;
+
+namespace XMainClient.UI
+{
+ internal class MoneyTreeData
+ {
+ public uint free_count = 0u;
+
+ public uint free_all_count = 0u;
+
+ public uint count = 0u;
+
+ public uint all_count = 0u;
+
+ public uint left_time = 0u;
+
+ public float req_time = 0f;
+
+ public List<uint> result = new List<uint>();
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/MoneyTreeData.cs.meta b/Client/Assets/Scripts/XMainClient/UI/MoneyTreeData.cs.meta
new file mode 100644
index 00000000..fb09567a
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/MoneyTreeData.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 6616cfb1a1ed65f46a1967e7ce647010
+timeCreated: 1611403853
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/MyBattleKillInfo.cs b/Client/Assets/Scripts/XMainClient/UI/MyBattleKillInfo.cs
new file mode 100644
index 00000000..827c0d62
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/MyBattleKillInfo.cs
@@ -0,0 +1,17 @@
+using System;
+
+namespace XMainClient.UI
+{
+ public class MyBattleKillInfo
+ {
+ public int contiKillCount;
+
+ public bool isRevenge;
+
+ public void SetInfo(int _contiKillCount, bool _isRevenge = false)
+ {
+ this.contiKillCount = _contiKillCount;
+ this.isRevenge = _isRevenge;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/MyBattleKillInfo.cs.meta b/Client/Assets/Scripts/XMainClient/UI/MyBattleKillInfo.cs.meta
new file mode 100644
index 00000000..bf3018d2
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/MyBattleKillInfo.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 7d0954293983b6e4fb7ceb53b84b0336
+timeCreated: 1611403999
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/MyHomeHandler.cs b/Client/Assets/Scripts/XMainClient/UI/MyHomeHandler.cs
new file mode 100644
index 00000000..44edc819
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/MyHomeHandler.cs
@@ -0,0 +1,380 @@
+using System;
+using KKSG;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class MyHomeHandler : DlgHandlerBase
+ {
+ protected override string FileName
+ {
+ get
+ {
+ return "Home/MyHomeHandler";
+ }
+ }
+
+ private XUIPool m_ItemPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ private XUIPool m_LogItemPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ private IXUIButton m_gotoMyHome;
+
+ private Transform m_visitedTimesTra;
+
+ private Transform m_fishingLevelTra;
+
+ private Transform m_baitNumTra;
+
+ private Transform m_plantNumTra;
+
+ private Transform m_harvestTimeTra;
+
+ private Transform m_homeStatusTra;
+
+ private GameObject m_hadFriendsGo;
+
+ private GameObject m_noFriendsGo;
+
+ private GameObject m_hadInfoGo;
+
+ private GameObject m_noInfoGo;
+
+ private GameObject m_redDotGo;
+
+ private IXUIWrapContent m_friendsRankWrap;
+
+ private HomeMainDocument m_doc;
+
+ protected override void Init()
+ {
+ base.Init();
+ Transform transform = base.PanelObject.transform.Find("HomeInfo");
+ this.m_gotoMyHome = (transform.Find("GoToHome").GetComponent("XUIButton") as IXUIButton);
+ this.m_redDotGo = transform.Find("RedPoint").gameObject;
+ this.m_visitedTimesTra = transform.Find("VisitedTimes");
+ this.m_fishingLevelTra = transform.Find("FishingLevel");
+ this.m_baitNumTra = transform.Find("BaitNum");
+ this.m_plantNumTra = transform.Find("PlantNum");
+ this.m_harvestTimeTra = transform.Find("HarvestTime");
+ this.m_homeStatusTra = transform.Find("HomeStatus");
+ transform = this.m_homeStatusTra.Find("Status");
+ this.m_ItemPool.SetupPool(transform.gameObject, transform.Find("Icon").gameObject, 3u, false);
+ this.m_hadInfoGo = base.PanelObject.transform.Find("HomeLog/Panel").gameObject;
+ this.m_noInfoGo = base.PanelObject.transform.Find("HomeLog/NoInfo").gameObject;
+ transform = base.PanelObject.transform.Find("HomeLog/Panel/LabsWrap");
+ this.m_LogItemPool.SetupPool(transform.gameObject, transform.Find("Tpl").gameObject, 2u, false);
+ this.m_hadFriendsGo = base.PanelObject.transform.Find("FriendsRank/Panel").gameObject;
+ this.m_noFriendsGo = base.PanelObject.transform.Find("FriendsRank/NoFriends").gameObject;
+ transform = base.PanelObject.transform.Find("FriendsRank/Panel");
+ this.m_friendsRankWrap = (transform.Find("ItemsWrap").GetComponent("XUIWrapContent") as IXUIWrapContent);
+ this.m_friendsRankWrap.RegisterItemUpdateEventHandler(new WrapItemUpdateEventHandler(this.FriendsRankWrapItemUpdated));
+ this.m_doc = HomeMainDocument.Doc;
+ this.m_doc.HomeHandler = this;
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ this.m_gotoMyHome.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnGotoHome));
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ this.FillContent();
+ }
+
+ protected override void OnHide()
+ {
+ this.m_LogItemPool.ReturnAll(false);
+ base.OnHide();
+ }
+
+ public override void OnUnload()
+ {
+ base.OnUnload();
+ }
+
+ public void RefreshUi()
+ {
+ this.FillContent();
+ }
+
+ private void FillContent()
+ {
+ this.m_redDotGo.SetActive(this.m_doc.IsHadRedDot);
+ IXUILabel ixuilabel = this.m_visitedTimesTra.Find("Num").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel.SetText(this.m_doc.VisitedTimes.ToString());
+ ixuilabel = (this.m_fishingLevelTra.Find("Num").GetComponent("XUILabel") as IXUILabel);
+ ixuilabel.SetText(string.Format(XStringDefineProxy.GetString("EQUIPCREATE_EQUIPSET_LEVEL_FMT"), this.m_doc.FishLevel));
+ ixuilabel = (this.m_baitNumTra.Find("Num").GetComponent("XUILabel") as IXUILabel);
+ ixuilabel.SetText(this.m_doc.FishBaitNum.ToString());
+ ixuilabel = (this.m_plantNumTra.Find("Num").GetComponent("XUILabel") as IXUILabel);
+ ixuilabel.SetText(string.Format("{0}/{1}", this.m_doc.PlantAmount, this.m_doc.MaxCanPlantAmount));
+ ixuilabel = (this.m_harvestTimeTra.Find("Num").GetComponent("XUILabel") as IXUILabel);
+ bool flag = this.m_doc.ShowFarm == null;
+ if (flag)
+ {
+ ixuilabel.SetText(XStringDefineProxy.GetString("CanPlanting"));
+ }
+ else
+ {
+ bool flag2 = this.m_doc.ShowFarm.Stage == GrowStage.Ripe;
+ if (flag2)
+ {
+ ixuilabel.SetText(XStringDefineProxy.GetString("CanHarvest"));
+ }
+ else
+ {
+ ixuilabel.SetText(this.GetTimeString(this.m_doc.ShowFarm.GrowLeftTime()));
+ }
+ }
+ this.m_ItemPool.ReturnAll(false);
+ int num = 0;
+ bool hadHarvest = this.m_doc.HadHarvest;
+ if (hadHarvest)
+ {
+ GameObject gameObject = this.m_ItemPool.FetchGameObject(false);
+ gameObject.transform.localPosition = new Vector3((float)(-(float)num * this.m_ItemPool.TplWidth), 0f, 0f);
+ IXUISprite ixuisprite = gameObject.transform.GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.SetSprite("HomeView_2");
+ num++;
+ }
+ bool hadSpecificState = this.m_doc.HadSpecificState;
+ if (hadSpecificState)
+ {
+ GameObject gameObject = this.m_ItemPool.FetchGameObject(false);
+ gameObject.transform.localPosition = new Vector3((float)(-(float)num * this.m_ItemPool.TplWidth), 0f, 0f);
+ IXUISprite ixuisprite = gameObject.transform.GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.SetSprite("HomeView_0");
+ num++;
+ }
+ bool hadTroublemaker = this.m_doc.HadTroublemaker;
+ if (hadTroublemaker)
+ {
+ GameObject gameObject = this.m_ItemPool.FetchGameObject(false);
+ gameObject.transform.localPosition = new Vector3((float)(-(float)num * this.m_ItemPool.TplWidth), 0f, 0f);
+ IXUISprite ixuisprite = gameObject.transform.GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.SetSprite("HomeView_1");
+ num++;
+ }
+ bool flag3 = this.m_doc.HomeLogList == null || this.m_doc.HomeLogList.Count == 0;
+ if (flag3)
+ {
+ this.m_hadInfoGo.SetActive(false);
+ this.m_noInfoGo.SetActive(true);
+ }
+ else
+ {
+ this.m_hadInfoGo.SetActive(true);
+ this.m_noInfoGo.SetActive(false);
+ this.SetHomeLog();
+ }
+ bool flag4 = this.m_doc.PlantFriendList == null || this.m_doc.PlantFriendList.Count == 0;
+ if (flag4)
+ {
+ this.m_hadFriendsGo.SetActive(false);
+ this.m_noFriendsGo.SetActive(true);
+ }
+ else
+ {
+ this.m_hadFriendsGo.SetActive(true);
+ this.m_noFriendsGo.SetActive(false);
+ this.m_friendsRankWrap.SetContentCount(this.m_doc.PlantFriendList.Count, false);
+ }
+ }
+
+ private void SetHomeLog()
+ {
+ this.m_LogItemPool.ReturnAll(false);
+ float num = 0f;
+ for (int i = 0; i < this.m_doc.HomeLogList.Count; i++)
+ {
+ GameObject gameObject = this.m_LogItemPool.FetchGameObject(false);
+ gameObject.SetActive(false);
+ gameObject.SetActive(true);
+ gameObject.transform.localPosition = new Vector3(0f, num, 0f);
+ HomeEventLog homeEventLog = this.m_doc.HomeLogList[i];
+ IXUILabel ixuilabel = gameObject.transform.GetComponent("XUILabel") as IXUILabel;
+ ixuilabel.SetText(homeEventLog.Txt);
+ num -= (float)(ixuilabel.spriteHeight + 5);
+ ixuilabel = (gameObject.transform.Find("Time").GetComponent("XUILabel") as IXUILabel);
+ ixuilabel.SetText(homeEventLog.Time);
+ }
+ }
+
+ private void FriendsRankWrapItemUpdated(Transform t, int index)
+ {
+ bool flag = this.m_doc.PlantFriendList == null;
+ if (flag)
+ {
+ XSingleton<XDebug>.singleton.AddErrorLog("no data", null, null, null, null, null);
+ }
+ else
+ {
+ bool flag2 = index >= this.m_doc.PlantFriendList.Count;
+ if (flag2)
+ {
+ XSingleton<XDebug>.singleton.AddErrorLog("index >= m_doc.PlantFriendList.Count", null, null, null, null, null);
+ }
+ else
+ {
+ bool flag3 = index >= 3;
+ if (!flag3)
+ {
+ FriendPlantLog friendPlantLog = this.m_doc.PlantFriendList[index];
+ Transform transform = t.Find("Info");
+ IXUISprite ixuisprite = transform.Find("Icon").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.SetSprite(XSingleton<XProfessionSkillMgr>.singleton.GetProfHeadIcon2((int)friendPlantLog.profession_id));
+ IXUILabel ixuilabel = transform.Find("Name").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel.SetText(friendPlantLog.role_name);
+ ixuilabel = (transform.Find("Times").GetComponent("XUILabel") as IXUILabel);
+ ixuilabel.SetText(string.Format("{0}{1}", XStringDefineProxy.GetString("HelpTimes"), friendPlantLog.help_times));
+ IXUIButton ixuibutton = t.Find("VisitBtn").GetComponent("XUIButton") as IXUIButton;
+ ixuibutton.ID = (ulong)((long)index);
+ ixuibutton.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnGotoOtherHome));
+ this.SetRank(t, index);
+ }
+ }
+ }
+ }
+
+ private void SetRank(Transform tra, int rankIndex)
+ {
+ IXUILabel ixuilabel = tra.Find("Rank").GetComponent("XUILabel") as IXUILabel;
+ IXUISprite ixuisprite = tra.Find("RankImage").GetComponent("XUISprite") as IXUISprite;
+ bool flag = (long)rankIndex == (long)((ulong)XRankDocument.INVALID_RANK);
+ if (flag)
+ {
+ ixuilabel.SetVisible(false);
+ ixuisprite.SetVisible(false);
+ }
+ else
+ {
+ bool flag2 = rankIndex < 3;
+ if (flag2)
+ {
+ ixuisprite.SetSprite("N" + (rankIndex + 1));
+ ixuisprite.SetVisible(true);
+ ixuilabel.SetVisible(false);
+ }
+ else
+ {
+ ixuisprite.SetVisible(false);
+ ixuilabel.SetText((rankIndex + 1).ToString());
+ ixuilabel.SetVisible(true);
+ }
+ }
+ }
+
+ public override void OnUpdate()
+ {
+ base.OnUpdate();
+ bool flag = this.m_doc == null || this.m_doc.ShowFarm == null;
+ if (!flag)
+ {
+ IXUILabel ixuilabel = this.m_harvestTimeTra.Find("Num").GetComponent("XUILabel") as IXUILabel;
+ bool flag2 = this.m_doc.ShowFarm.Stage == GrowStage.Ripe;
+ if (flag2)
+ {
+ ixuilabel.SetText(XStringDefineProxy.GetString("CanHarvest"));
+ }
+ else
+ {
+ bool flag3 = this.m_doc.ShowFarm.Stage > GrowStage.None;
+ if (flag3)
+ {
+ ixuilabel.SetText(this.GetTimeString(this.m_doc.ShowFarm.GrowLeftTime()));
+ }
+ }
+ }
+ }
+
+ private string GetTimeString(long ti)
+ {
+ bool flag = ti < 60L;
+ string result;
+ if (flag)
+ {
+ string text = string.Format("{0}{1}", ti, XStringDefineProxy.GetString("MINUTE_DUARATION"));
+ result = text;
+ }
+ else
+ {
+ long num = ti / 60L;
+ long num2 = ti % 60L;
+ bool flag2 = num2 != 0L;
+ string text;
+ if (flag2)
+ {
+ text = string.Format("{0}{1}{2}{3}", new object[]
+ {
+ num,
+ XStringDefineProxy.GetString("HOUR_DUARATION"),
+ num2,
+ XStringDefineProxy.GetString("MINUTE_DUARATION")
+ });
+ }
+ else
+ {
+ text = string.Format("{0}{1}", num, XStringDefineProxy.GetString("HOUR_DUARATION"));
+ }
+ result = text;
+ }
+ return result;
+ }
+
+ private bool OnGotoHome(IXUIButton btn)
+ {
+ SceneType sceneType = XSingleton<XScene>.singleton.SceneType;
+ bool flag = sceneType == SceneType.SCENE_FAMILYGARDEN;
+ if (flag)
+ {
+ HomeTypeEnum homeType = HomePlantDocument.Doc.HomeType;
+ bool flag2 = homeType == HomeTypeEnum.MyHome;
+ if (flag2)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString("EnterHomeAgainTips"), "fece00");
+ return true;
+ }
+ }
+ DlgBase<HomeMainDlg, TabDlgBehaviour>.singleton.SetVisible(false, true);
+ this.m_doc.ReqEnterHomeScene(XSingleton<XAttributeMgr>.singleton.XPlayerData.RoleID, XSingleton<XAttributeMgr>.singleton.XPlayerData.Name);
+ return true;
+ }
+
+ private bool OnGotoOtherHome(IXUIButton btn)
+ {
+ FriendPlantLog friendPlantLog = this.m_doc.PlantFriendList[(int)btn.ID];
+ bool flag = friendPlantLog == null;
+ bool result;
+ if (flag)
+ {
+ XSingleton<XDebug>.singleton.AddErrorLog("not find data", null, null, null, null, null);
+ result = true;
+ }
+ else
+ {
+ SceneType sceneType = XSingleton<XScene>.singleton.SceneType;
+ bool flag2 = sceneType == SceneType.SCENE_FAMILYGARDEN;
+ if (flag2)
+ {
+ ulong gardenId = HomePlantDocument.Doc.GardenId;
+ bool flag3 = gardenId == friendPlantLog.role_id;
+ if (flag3)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(string.Format(XStringDefineProxy.GetString("EnterOtherHomeAgainTips"), friendPlantLog.role_name), "fece00");
+ return true;
+ }
+ }
+ this.m_doc.ReqEnterHomeScene(friendPlantLog.role_id, friendPlantLog.role_name);
+ result = true;
+ }
+ return result;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/MyHomeHandler.cs.meta b/Client/Assets/Scripts/XMainClient/UI/MyHomeHandler.cs.meta
new file mode 100644
index 00000000..2debb2ad
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/MyHomeHandler.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 78880a3157a814e48b9cee5b9dee4614
+timeCreated: 1611403981
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/NestStarRewardHandler.cs b/Client/Assets/Scripts/XMainClient/UI/NestStarRewardHandler.cs
new file mode 100644
index 00000000..808c8f82
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/NestStarRewardHandler.cs
@@ -0,0 +1,120 @@
+using System;
+using System.Collections.Generic;
+using UILib;
+using UnityEngine;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class NestStarRewardHandler : DlgHandlerBase
+ {
+ protected override string FileName
+ {
+ get
+ {
+ return "OperatingActivity/NestStarReward";
+ }
+ }
+
+ private IXUIButton m_Close;
+
+ private GameObject m_itemParentGo;
+
+ private XUIPool m_ItemPool1 = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ private XUIPool m_ItemPool2 = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ private XNestDocument m_doc;
+
+ protected override void Init()
+ {
+ base.Init();
+ this.m_Close = (base.transform.Find("Close").GetComponent("XUIButton") as IXUIButton);
+ this.m_itemParentGo = base.transform.Find("Panel/List").gameObject;
+ Transform transform = this.m_itemParentGo.transform.Find("Tpl");
+ this.m_ItemPool1.SetupPool(this.m_itemParentGo, transform.gameObject, 5u, false);
+ this.m_ItemPool2.SetupPool(transform.gameObject, this.m_itemParentGo.transform.Find("Item").gameObject, 4u, false);
+ this.m_doc = XDocuments.GetSpecificDocument<XNestDocument>(XNestDocument.uuID);
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ this.m_Close.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnCloseClicked));
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ this.FillContent();
+ }
+
+ protected override void OnHide()
+ {
+ this.m_ItemPool1.ReturnAll(false);
+ this.m_ItemPool2.ReturnAll(false);
+ base.OnHide();
+ }
+
+ public override void StackRefresh()
+ {
+ base.StackRefresh();
+ }
+
+ public override void OnUnload()
+ {
+ this.m_ItemPool1.ReturnAll(false);
+ this.m_ItemPool2.ReturnAll(false);
+ base.OnUnload();
+ }
+
+ private void FillContent()
+ {
+ this.m_ItemPool1.ReturnAll(false);
+ this.m_ItemPool2.ReturnAll(false);
+ List<NestStarReward.RowData> nestStarRewards = this.m_doc.GetNestStarRewards(this.m_doc.NestType);
+ for (int i = 0; i < nestStarRewards.Count; i++)
+ {
+ NestStarReward.RowData rowData = nestStarRewards[i];
+ bool flag = rowData == null;
+ if (!flag)
+ {
+ GameObject gameObject = this.m_ItemPool1.FetchGameObject(false);
+ gameObject.transform.parent = this.m_itemParentGo.transform;
+ gameObject.name = i.ToString();
+ gameObject.transform.localScale = Vector3.one;
+ gameObject.transform.localPosition = new Vector3(0f, (float)(-(float)this.m_ItemPool1.TplHeight * i), 0f);
+ IXUILabel ixuilabel = gameObject.transform.Find("T").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel.SetText(rowData.Tittle);
+ ixuilabel = (gameObject.transform.Find("ch").GetComponent("XUILabel") as IXUILabel);
+ ixuilabel.SetText(XStringDefineProxy.GetString("FirstPassPlayerTittle"));
+ ixuilabel.gameObject.SetActive(rowData.IsHadTittle == 1u);
+ ixuilabel = (gameObject.transform.Find("Image/Rank").GetComponent("XUILabel") as IXUILabel);
+ ixuilabel.SetText(rowData.Stars.ToString());
+ this.FillItem(rowData, gameObject);
+ }
+ }
+ }
+
+ private void FillItem(NestStarReward.RowData data, GameObject parentGo)
+ {
+ for (int i = 0; i < data.Reward.Count; i++)
+ {
+ GameObject gameObject = this.m_ItemPool2.FetchGameObject(false);
+ gameObject.transform.parent = parentGo.transform;
+ gameObject.transform.localScale = Vector3.one;
+ gameObject.transform.localPosition = new Vector3((float)(-170 + this.m_ItemPool2.TplWidth * i), -16f, 0f);
+ IXUISprite ixuisprite = gameObject.transform.Find("Icon").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.ID = (ulong)data.Reward[i, 0];
+ XSingleton<XItemDrawerMgr>.singleton.normalItemDrawer.DrawItem(gameObject, (int)data.Reward[i, 0], (int)data.Reward[i, 1], false);
+ ixuisprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(XSingleton<UiUtility>.singleton.OnItemClick));
+ }
+ }
+
+ public bool OnCloseClicked(IXUIButton sp)
+ {
+ base.SetVisible(false);
+ return true;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/NestStarRewardHandler.cs.meta b/Client/Assets/Scripts/XMainClient/UI/NestStarRewardHandler.cs.meta
new file mode 100644
index 00000000..7cf6c8c9
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/NestStarRewardHandler.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: cfd3ad138da6a78448053ad7858e9fcf
+timeCreated: 1611404582
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/OldFriendsReplayHandler.cs b/Client/Assets/Scripts/XMainClient/UI/OldFriendsReplayHandler.cs
new file mode 100644
index 00000000..e0bed07e
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/OldFriendsReplayHandler.cs
@@ -0,0 +1,80 @@
+using System;
+using System.Collections.Generic;
+using UILib;
+using UnityEngine;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class OldFriendsReplayHandler : DlgHandlerBase
+ {
+ protected override string FileName
+ {
+ get
+ {
+ return "OperatingActivity/OldFriendsBack";
+ }
+ }
+
+ protected XUIPool _itemPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ protected override void Init()
+ {
+ base.Init();
+ Transform transform = base.transform.Find("ThreeRoot/Item");
+ Transform transform2 = base.transform.Find("ThreeRoot");
+ Transform transform3 = base.transform.Find("FiveRoot");
+ IXUILabel ixuilabel = transform2.Find("ThreeLabel").GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel2 = transform3.Find("FiveLabel").GetComponent("XUILabel") as IXUILabel;
+ List<int> intList = XSingleton<XGlobalConfig>.singleton.GetIntList("BackThreeFriendsCount");
+ string @string = XSingleton<XStringTable>.singleton.GetString("BackOldFriendsTip");
+ ixuilabel.SetText(string.Format(@string, intList[0]));
+ ixuilabel2.SetText(string.Format(@string, intList[1]));
+ IXUISprite ixuisprite = base.transform.Find("DetailBtn").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OpenUrl));
+ this._itemPool.SetupPool(transform.parent.gameObject, transform.gameObject, 8u, false);
+ this._itemPool.ReturnAll(false);
+ SeqList<int> sequenceList = XSingleton<XGlobalConfig>.singleton.GetSequenceList("BackThreeFriendsRewards", true);
+ for (int i = 0; i < (int)sequenceList.Count; i++)
+ {
+ GameObject gameObject = this._itemPool.FetchGameObject(false);
+ gameObject.transform.parent = transform2;
+ gameObject.transform.localPosition = new Vector3((float)(this._itemPool.TplWidth * i), 0f, 0f);
+ XSingleton<XItemDrawerMgr>.singleton.normalItemDrawer.DrawItem(gameObject, sequenceList[i, 0], sequenceList[i, 1], false);
+ IXUISprite ixuisprite2 = gameObject.transform.Find("Icon").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite2.ID = (ulong)((long)sequenceList[i, 0]);
+ ixuisprite2.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(XSingleton<UiUtility>.singleton.OnItemClick));
+ }
+ SeqList<int> sequenceList2 = XSingleton<XGlobalConfig>.singleton.GetSequenceList("BackFiveFriendsRewards", true);
+ for (int j = 0; j < (int)sequenceList2.Count; j++)
+ {
+ GameObject gameObject2 = this._itemPool.FetchGameObject(false);
+ gameObject2.transform.parent = transform3;
+ gameObject2.transform.localPosition = new Vector3((float)(this._itemPool.TplWidth * j), 0f, 0f);
+ XSingleton<XItemDrawerMgr>.singleton.normalItemDrawer.DrawItem(gameObject2, sequenceList2[j, 0], sequenceList2[j, 1], false);
+ IXUISprite ixuisprite3 = gameObject2.transform.Find("Icon").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite3.ID = (ulong)((long)sequenceList2[j, 0]);
+ ixuisprite3.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(XSingleton<UiUtility>.singleton.OnItemClick));
+ }
+ }
+
+ private void OpenUrl(IXUISprite uiSprite)
+ {
+ XSingleton<UiUtility>.singleton.OpenHtmlUrl("BackThreeFriendsUrl");
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ }
+
+ protected override void OnHide()
+ {
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/OldFriendsReplayHandler.cs.meta b/Client/Assets/Scripts/XMainClient/UI/OldFriendsReplayHandler.cs.meta
new file mode 100644
index 00000000..fd2e3751
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/OldFriendsReplayHandler.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 208b83d302362ed4f8d2328462696856
+timeCreated: 1611403407
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/PPTBehaviour.cs b/Client/Assets/Scripts/XMainClient/UI/PPTBehaviour.cs
new file mode 100644
index 00000000..dc3f2ea3
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/PPTBehaviour.cs
@@ -0,0 +1,22 @@
+using System;
+using UILib;
+using XMainClient.UI.UICommon;
+
+namespace XMainClient.UI
+{
+ internal class PPTBehaviour : DlgBehaviourBase
+ {
+ public IXUILabel m_PPT;
+
+ public IXUILabel m_IncreasePPT;
+
+ public IXUILabel m_DecreasePPT;
+
+ private void Awake()
+ {
+ this.m_PPT = (base.transform.Find("Bg/PPT").GetComponent("XUILabel") as IXUILabel);
+ this.m_IncreasePPT = (base.transform.Find("Bg/Delta/Inc").GetComponent("XUILabel") as IXUILabel);
+ this.m_DecreasePPT = (base.transform.Find("Bg/Delta/Dec").GetComponent("XUILabel") as IXUILabel);
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/PPTBehaviour.cs.meta b/Client/Assets/Scripts/XMainClient/UI/PPTBehaviour.cs.meta
new file mode 100644
index 00000000..3e9fcf4b
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/PPTBehaviour.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 838a1ddbf661f4941bb9f440b73a7286
+timeCreated: 1611404045
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/PPTCheckMgr.cs b/Client/Assets/Scripts/XMainClient/UI/PPTCheckMgr.cs
new file mode 100644
index 00000000..71822a51
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/PPTCheckMgr.cs
@@ -0,0 +1,62 @@
+using System;
+using UILib;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class PPTCheckMgr : XSingleton<PPTCheckMgr>
+ {
+ private ButtonClickEventHandler mGoStillHandler;
+
+ public bool CheckMyPPT(int needPPT)
+ {
+ XMainInterfaceDocument xmainInterfaceDocument = XSingleton<XGame>.singleton.Doc.GetXComponent(XMainInterfaceDocument.uuID) as XMainInterfaceDocument;
+ int playerPPT = xmainInterfaceDocument.GetPlayerPPT();
+ return playerPPT >= needPPT;
+ }
+
+ public void ShowPPTNotEnoughDlg(ulong btnID, ButtonClickEventHandler goBattleHandle)
+ {
+ this.mGoStillHandler = goBattleHandle;
+ DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.Load();
+ DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.SetSingleButtonMode(false);
+ DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.SetVisible(false, true);
+ DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.SetLabelsWithSymbols(XStringDefineProxy.GetString("LEVEL_POWERLOWER"), XStringDefineProxy.GetString("LEVEL_POWERUP"), XStringDefineProxy.GetString("LEVEL_CONTINUE"));
+ DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.uiBehaviour.m_CancelButton.ID = btnID;
+ DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.SetModalCallback(new ButtonClickEventHandler(this.GoPowerUp), new ButtonClickEventHandler(this.GoStill));
+ DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.SetTweenTargetAndPlay(DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.uiBehaviour.gameObject);
+ }
+
+ private bool GoStill(IXUIButton go)
+ {
+ DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.SetVisible(false, true);
+ bool flag = this.mGoStillHandler != null;
+ if (flag)
+ {
+ this.mGoStillHandler(go);
+ }
+ this.mGoStillHandler = null;
+ return true;
+ }
+
+ private bool GoPowerUp(IXUIButton go)
+ {
+ DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.SetVisible(false, true);
+ bool flag = !XSingleton<XGameSysMgr>.singleton.IsSystemOpened(XSysDefine.XSys_Strong);
+ bool result;
+ if (flag)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString("StrengthNotOpen"), "fece00");
+ result = true;
+ }
+ else
+ {
+ XSingleton<UIManager>.singleton.ClearUIinStack();
+ XSingleton<XGameSysMgr>.singleton.OpenSystem(XFastEnumIntEqualityComparer<XSysDefine>.ToInt(XSysDefine.XSys_Strong));
+ result = true;
+ }
+ return result;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/PPTCheckMgr.cs.meta b/Client/Assets/Scripts/XMainClient/UI/PPTCheckMgr.cs.meta
new file mode 100644
index 00000000..e1fb3f97
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/PPTCheckMgr.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 3e601ad90f1030c449cad8349337a914
+timeCreated: 1611403607
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/PPTDlg.cs b/Client/Assets/Scripts/XMainClient/UI/PPTDlg.cs
new file mode 100644
index 00000000..551f8fe6
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/PPTDlg.cs
@@ -0,0 +1,176 @@
+using System;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class PPTDlg : DlgBase<PPTDlg, PPTBehaviour>
+ {
+ public override string fileName
+ {
+ get
+ {
+ return "Common/PPTDlg";
+ }
+ }
+
+ public override int group
+ {
+ get
+ {
+ return 1;
+ }
+ }
+
+ public override bool autoload
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override bool hideMainMenu
+ {
+ get
+ {
+ return false;
+ }
+ }
+
+ private int _curPPT = 0;
+
+ private int _targetPPT = 0;
+
+ private float _PPTtime = 0f;
+
+ private const float _PPTExistTime = 2.5f;
+
+ private int delta = 0;
+
+ private DateTime _last_power_sound_time = DateTime.Now;
+
+ private bool is_inited = false;
+
+ public void InitDlg()
+ {
+ bool flag = !this.is_inited;
+ if (flag)
+ {
+ XPlayer player = XSingleton<XEntityMgr>.singleton.Player;
+ XPlayerAttributes xplayerAttributes = player.Attributes as XPlayerAttributes;
+ this._curPPT = (int)xplayerAttributes.GetAttr(XAttributeDefine.XAttr_POWER_POINT_Basic);
+ this._targetPPT = this._curPPT;
+ this.is_inited = true;
+ }
+ }
+
+ public void UnInit()
+ {
+ this.is_inited = false;
+ this._targetPPT = (this._curPPT = 0);
+ }
+
+ protected override void Init()
+ {
+ base.Init();
+ }
+
+ public override void OnUpdate()
+ {
+ bool flag = this._curPPT != this._targetPPT;
+ if (flag)
+ {
+ this._curPPT += this.delta;
+ bool flag2 = (this.delta > 0 && this._curPPT >= this._targetPPT) || (this.delta < 0 && this._curPPT <= this._targetPPT);
+ if (flag2)
+ {
+ this._curPPT = this._targetPPT;
+ this._PPTtime = Time.time;
+ }
+ base.uiBehaviour.m_PPT.SetText(this._curPPT.ToString());
+ }
+ else
+ {
+ bool flag3 = this._PPTtime > 0f && Time.time - this._PPTtime > 2.5f;
+ if (flag3)
+ {
+ this._PPTtime = 0f;
+ bool flag4 = base.IsVisible();
+ if (flag4)
+ {
+ this.SetVisible(false, true);
+ }
+ }
+ }
+ }
+
+ public void ShowPPT(int ppt)
+ {
+ this.InitDlg();
+ bool flag = ppt != this._targetPPT;
+ if (flag)
+ {
+ this.SetPowerpoint(ppt);
+ }
+ }
+
+ private void SetPowerpoint(int ppt)
+ {
+ bool flag = ppt > this._curPPT;
+ if (flag)
+ {
+ bool flag2 = (DateTime.Now - this._last_power_sound_time).TotalMilliseconds > 1000.0;
+ if (flag2)
+ {
+ this._last_power_sound_time = DateTime.Now;
+ XSingleton<XAudioMgr>.singleton.PlayUISound("Audio/UI/zhandoulitishen", true, AudioChannel.Action);
+ }
+ }
+ bool flag3 = ppt != this._targetPPT;
+ if (flag3)
+ {
+ this.OnPowerpointChanged(this._targetPPT, ppt);
+ }
+ else
+ {
+ this._targetPPT = ppt;
+ this._curPPT = ppt;
+ }
+ }
+
+ public void OnPowerpointChanged(int oldValue, int newValue)
+ {
+ this._curPPT = oldValue;
+ this._targetPPT = newValue;
+ this._PPTtime = 0f;
+ int num = newValue - oldValue;
+ bool flag = num > 0;
+ if (flag)
+ {
+ this.SetVisible(true, true);
+ base.uiBehaviour.m_IncreasePPT.SetVisible(true);
+ base.uiBehaviour.m_IncreasePPT.SetText(num.ToString());
+ base.uiBehaviour.m_DecreasePPT.SetVisible(false);
+ }
+ else
+ {
+ bool flag2 = num < 0;
+ if (flag2)
+ {
+ this.SetVisible(true, true);
+ base.uiBehaviour.m_IncreasePPT.SetVisible(false);
+ base.uiBehaviour.m_DecreasePPT.SetText((-num).ToString());
+ base.uiBehaviour.m_DecreasePPT.SetVisible(true);
+ }
+ }
+ this.delta = (newValue - oldValue) / 30;
+ bool flag3 = this.delta == 0;
+ if (flag3)
+ {
+ this.delta = 1;
+ }
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/PPTDlg.cs.meta b/Client/Assets/Scripts/XMainClient/UI/PPTDlg.cs.meta
new file mode 100644
index 00000000..ebfdc6c3
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/PPTDlg.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 58e96592e2884294c905ce3cd1e9e1ee
+timeCreated: 1611403760
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/PVPActivityDlg.cs b/Client/Assets/Scripts/XMainClient/UI/PVPActivityDlg.cs
new file mode 100644
index 00000000..14a16b07
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/PVPActivityDlg.cs
@@ -0,0 +1,292 @@
+using System;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class PVPActivityDlg : DlgHandlerBase
+ {
+ protected override string FileName
+ {
+ get
+ {
+ return "GameSystem/DailyActivity/PVPActivityFrame";
+ }
+ }
+
+ private XPVPActivityDocument _doc;
+
+ public XUIPool m_ActivityPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ public IXUIScrollView m_ScrollView;
+
+ private IXUIButton m_FameHallBtn;
+
+ private static readonly string ATLAS_PATH = "atlas/UI/GameSystem/Activity/";
+
+ public IXUIButton m_MilitaryRankBtn;
+
+ protected override void Init()
+ {
+ this._doc = (XSingleton<XGame>.singleton.Doc.GetXComponent(XPVPActivityDocument.uuID) as XPVPActivityDocument);
+ this.m_ScrollView = (base.PanelObject.transform.Find("Panel").GetComponent("XUIScrollView") as IXUIScrollView);
+ Transform transform = base.PanelObject.transform.Find("Panel/Tpl");
+ this.m_ActivityPool.SetupPool(transform.parent.gameObject, transform.gameObject, 2u, false);
+ this.m_FameHallBtn = (base.transform.Find("Down/Btn_MobaFamous").GetComponent("XUIButton") as IXUIButton);
+ this.m_FameHallBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnClickedFameHallBtn));
+ this.m_MilitaryRankBtn = (base.PanelObject.transform.Find("Down/Btn_MobaRank").GetComponent("XUIButton") as IXUIButton);
+ this.m_MilitaryRankBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnMilitaryRankBtnClick));
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ this.m_MilitaryRankBtn.SetVisible(XSingleton<XGameSysMgr>.singleton.IsSystemOpened(XSysDefine.XSys_MilitaryRank));
+ this.Refresh();
+ }
+
+ protected override void OnHide()
+ {
+ base.OnHide();
+ XSingleton<UiUtility>.singleton.DestroyTextureInActivePool(this.m_ActivityPool, "Tex");
+ }
+
+ public override void StackRefresh()
+ {
+ base.StackRefresh();
+ this.Refresh();
+ this.RefreshHallFameBtn();
+ }
+
+ private bool OnMilitaryRankBtnClick(IXUIButton btn)
+ {
+ bool flag = !XSingleton<XGameSysMgr>.singleton.IsSystemOpened(XSysDefine.XSys_MilitaryRank);
+ bool result;
+ if (flag)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString("ERR_SYS_NOTOPEN"), "fece00");
+ result = false;
+ }
+ else
+ {
+ int sysOpenLevel = XSingleton<XGameSysMgr>.singleton.GetSysOpenLevel(XSysDefine.XSys_MilitaryRank);
+ bool flag2 = (ulong)XSingleton<XAttributeMgr>.singleton.XPlayerData.Level < (ulong)((long)sysOpenLevel);
+ if (flag2)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(string.Format(XStringDefineProxy.GetString("LEVEL_REQUIRE_LEVEL"), sysOpenLevel), "fece00");
+ }
+ else
+ {
+ XSingleton<XGameSysMgr>.singleton.OpenSystem(XSysDefine.XSys_MilitaryRank, 0UL);
+ }
+ result = true;
+ }
+ return result;
+ }
+
+ private string GetMissConditionString(PVPActivityList.RowData data)
+ {
+ XActivityDocument specificDocument = XDocuments.GetSpecificDocument<XActivityDocument>(XActivityDocument.uuID);
+ int sysOpenServerDay = XSingleton<XGameSysMgr>.singleton.GetSysOpenServerDay((int)data.SysID);
+ bool flag = specificDocument.ServerOpenDay < sysOpenServerDay;
+ string result;
+ if (flag)
+ {
+ result = string.Format(XStringDefineProxy.GetString("MulActivity_ServerOpenDay"), sysOpenServerDay - specificDocument.ServerOpenDay);
+ }
+ else
+ {
+ bool flag2 = XSingleton<XAttributeMgr>.singleton.XPlayerData != null && (ulong)XSingleton<XAttributeMgr>.singleton.XPlayerData.Level < (ulong)((long)XSingleton<XGameSysMgr>.singleton.GetSysOpenLevel((int)data.SysID));
+ if (flag2)
+ {
+ int sysOpenLevel = XSingleton<XGameSysMgr>.singleton.GetSysOpenLevel((int)data.SysID);
+ result = string.Format(XStringDefineProxy.GetString("MulActivity_ShowTips9"), sysOpenLevel);
+ }
+ else
+ {
+ result = XStringDefineProxy.GetString("PVPActivityUnOpen");
+ }
+ }
+ return result;
+ }
+
+ public void OnPVPActivityClick(IXUISprite iSp)
+ {
+ XSysDefine xsysDefine = (XSysDefine)iSp.ID;
+ PVPActivityList.RowData bySysID = this._doc.PVPActivityTable.GetBySysID((uint)iSp.ID);
+ XActivityDocument specificDocument = XDocuments.GetSpecificDocument<XActivityDocument>(XActivityDocument.uuID);
+ XFreeTeamVersusLeagueDocument specificDocument2 = XDocuments.GetSpecificDocument<XFreeTeamVersusLeagueDocument>(XFreeTeamVersusLeagueDocument.uuID);
+ int sysOpenServerDay = XSingleton<XGameSysMgr>.singleton.GetSysOpenServerDay((int)iSp.ID);
+ bool flag = specificDocument.ServerOpenDay < sysOpenServerDay;
+ if (flag)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(string.Format(XStringDefineProxy.GetString("MulActivity_ServerOpenDay"), sysOpenServerDay - specificDocument.ServerOpenDay), "fece00");
+ }
+ else
+ {
+ bool flag2 = !XSingleton<XGameSysMgr>.singleton.IsSystemOpened(xsysDefine);
+ if (flag2)
+ {
+ bool flag3 = XSingleton<XAttributeMgr>.singleton.XPlayerData != null && (ulong)XSingleton<XAttributeMgr>.singleton.XPlayerData.Level < (ulong)((long)XSingleton<XGameSysMgr>.singleton.GetSysOpenLevel((int)bySysID.SysID));
+ if (flag3)
+ {
+ int sysid = XFastEnumIntEqualityComparer<XSysDefine>.ToInt(xsysDefine);
+ int sysOpenLevel = XSingleton<XGameSysMgr>.singleton.GetSysOpenLevel(sysid);
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString("EXPEDITION_REQUIRED_LEVEL", new object[]
+ {
+ sysOpenLevel
+ }) + XSingleton<XGameSysMgr>.singleton.GetSysName(sysid), "fece00");
+ }
+ else
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString("PVPActivityUnOpen"), "fece00");
+ }
+ }
+ else
+ {
+ bool flag4 = xsysDefine == XSysDefine.XSys_TeamLeague && !specificDocument2.IsOpen;
+ if (flag4)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString("PVPActivityUnOpen"), "fece00");
+ }
+ else
+ {
+ XSingleton<XGameSysMgr>.singleton.OpenSystem(xsysDefine, 0UL);
+ }
+ }
+ }
+ }
+
+ public void Refresh()
+ {
+ this.RefreshHallFameBtn();
+ this.m_ScrollView.SetPosition(0f);
+ this.m_ActivityPool.ReturnAll(false);
+ XFreeTeamVersusLeagueDocument specificDocument = XDocuments.GetSpecificDocument<XFreeTeamVersusLeagueDocument>(XFreeTeamVersusLeagueDocument.uuID);
+ XActivityDocument specificDocument2 = XDocuments.GetSpecificDocument<XActivityDocument>(XActivityDocument.uuID);
+ for (int i = 0; i < this._doc.PVPActivityTable.Table.Length; i++)
+ {
+ PVPActivityList.RowData rowData = this._doc.PVPActivityTable.Table[i];
+ GameObject gameObject = this.m_ActivityPool.FetchGameObject(false);
+ gameObject.transform.localPosition = new Vector3(this.m_ActivityPool.TplPos.x + (float)(i * this.m_ActivityPool.TplWidth), this.m_ActivityPool.TplPos.y, 0f);
+ IXUISprite ixuisprite = gameObject.GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.ID = (ulong)rowData.SysID;
+ ixuisprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnPVPActivityClick));
+ IXUITexture ixuitexture = gameObject.transform.Find("Tex").GetComponent("XUITexture") as IXUITexture;
+ IXUILabel ixuilabel = gameObject.transform.Find("Desc").GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel2 = gameObject.transform.Find("Go").GetComponent("XUILabel") as IXUILabel;
+ GameObject gameObject2 = gameObject.transform.Find("Lock").gameObject;
+ GameObject gameObject3 = gameObject.transform.Find("kf").gameObject;
+ GameObject gameObject4 = gameObject.transform.Find("RedPoint").gameObject;
+ bool flag = XSingleton<XGameSysMgr>.singleton.IsSystemOpened((XSysDefine)rowData.SysID) && specificDocument2.ServerOpenDay >= XSingleton<XGameSysMgr>.singleton.GetSysOpenServerDay((int)rowData.SysID);
+ bool flag2 = true;
+ bool flag3 = rowData.SysID == 960u;
+ if (flag3)
+ {
+ flag2 = specificDocument.IsOpen;
+ }
+ string texturePath = string.Format("{0}{1}", PVPActivityDlg.ATLAS_PATH, rowData.Icon);
+ ixuitexture.SetTexturePath(texturePath);
+ ixuitexture.SetEnabled(flag && flag2);
+ bool flag4 = flag && flag2;
+ if (flag4)
+ {
+ ixuitexture.SetAlpha(1f);
+ }
+ else
+ {
+ ixuitexture.SetAlpha(0.7058824f);
+ }
+ gameObject2.SetActive(!flag);
+ gameObject3.SetActive(rowData.SysID == 960u && specificDocument.IsCross);
+ bool sysRedPointState = XSingleton<XGameSysMgr>.singleton.GetSysRedPointState((int)rowData.SysID);
+ gameObject4.SetActive(sysRedPointState);
+ bool flag5 = sysRedPointState;
+ if (flag5)
+ {
+ IXUILabel ixuilabel3 = gameObject4.gameObject.transform.Find("Num").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel3.SetText(this.GetLeftCount((XSysDefine)rowData.SysID).ToString());
+ }
+ bool flag6 = !flag;
+ if (flag6)
+ {
+ ixuilabel2.SetText(this.GetMissConditionString(rowData));
+ }
+ else
+ {
+ bool flag7 = !flag2;
+ if (flag7)
+ {
+ ixuilabel2.SetText(XStringDefineProxy.GetString("PVPActivityUnOpen"));
+ }
+ else
+ {
+ ixuilabel2.SetText("");
+ }
+ }
+ ixuilabel.SetText(rowData.Description);
+ }
+ }
+
+ private void RefreshHallFameBtn()
+ {
+ bool flag = XSingleton<XGameSysMgr>.singleton.IsSystemOpened(XSysDefine.XSys_HallFame);
+ this.m_FameHallBtn.gameObject.SetActive(flag);
+ bool flag2 = flag;
+ if (flag2)
+ {
+ Transform transform = this.m_FameHallBtn.gameObject.transform.Find("RedPoint");
+ transform.gameObject.SetActive(XHallFameDocument.Doc.CanSupportType.Count > 0);
+ }
+ }
+
+ private int GetLeftCount(XSysDefine sys)
+ {
+ XSysDefine xsysDefine = sys;
+ if (xsysDefine <= XSysDefine.XSys_CustomBattle)
+ {
+ if (xsysDefine == XSysDefine.XSys_Qualifying)
+ {
+ XQualifyingDocument specificDocument = XDocuments.GetSpecificDocument<XQualifyingDocument>(XQualifyingDocument.uuID);
+ int @int = XSingleton<XGlobalConfig>.singleton.GetInt("QualifyingFirstRewardCount");
+ return Mathf.Max(@int - (int)specificDocument.LeftFirstRewardCount, 0);
+ }
+ if (xsysDefine == XSysDefine.XSys_CustomBattle)
+ {
+ XCustomBattleDocument specificDocument2 = XDocuments.GetSpecificDocument<XCustomBattleDocument>(XCustomBattleDocument.uuID);
+ return (specificDocument2.BountyModeRedPoint ? 1 : 0) + (specificDocument2.CustomModeRedPoint ? 1 : 0);
+ }
+ }
+ else
+ {
+ if (xsysDefine == XSysDefine.XSys_WeekNest)
+ {
+ XExpeditionDocument specificDocument3 = XDocuments.GetSpecificDocument<XExpeditionDocument>(XExpeditionDocument.uuID);
+ return specificDocument3.GetDayCount(TeamLevelType.TeamLevelWeekNest, null);
+ }
+ if (xsysDefine == XSysDefine.XSys_HeroBattle)
+ {
+ XHeroBattleDocument specificDocument4 = XDocuments.GetSpecificDocument<XHeroBattleDocument>(XHeroBattleDocument.uuID);
+ int int2 = XSingleton<XGlobalConfig>.singleton.GetInt("HeroBattleSpecialNum");
+ return Math.Max(int2 - (int)specificDocument4.JoinToday, 0);
+ }
+ if (xsysDefine == XSysDefine.XSys_Moba)
+ {
+ int int3 = XSingleton<XGlobalConfig>.singleton.GetInt("MobaStageNum");
+ XMobaEntranceDocument specificDocument5 = XDocuments.GetSpecificDocument<XMobaEntranceDocument>(XMobaEntranceDocument.uuID);
+ return ((ulong)specificDocument5.GetRewardStage < (ulong)((long)int3)) ? 1 : 0;
+ }
+ }
+ XSingleton<XDebug>.singleton.AddErrorLog("needless pvpactivity count but try to get it. sys = ", sys.ToString(), null, null, null, null);
+ return 0;
+ }
+
+ private bool OnClickedFameHallBtn(IXUIButton button)
+ {
+ DlgBase<HallFameDlg, HallFameBehavior>.singleton.SetVisibleWithAnimation(true, null);
+ return true;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/PVPActivityDlg.cs.meta b/Client/Assets/Scripts/XMainClient/UI/PVPActivityDlg.cs.meta
new file mode 100644
index 00000000..650863fa
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/PVPActivityDlg.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 003d8f16026a1b341b29e0d042db6186
+timeCreated: 1611402949
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/PairsPetInviteBehaviour.cs b/Client/Assets/Scripts/XMainClient/UI/PairsPetInviteBehaviour.cs
new file mode 100644
index 00000000..e6f0e3ce
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/PairsPetInviteBehaviour.cs
@@ -0,0 +1,25 @@
+using System;
+using UILib;
+using XMainClient.UI.UICommon;
+
+namespace XMainClient.UI
+{
+ internal class PairsPetInviteBehaviour : DlgBehaviourBase
+ {
+ public IXUIButton m_closeBtn;
+
+ public IXUIButton m_ignoreBtn;
+
+ public IXUIButton m_tempRejectBtn;
+
+ public IXUIWrapContent m_wrapContent;
+
+ private void Awake()
+ {
+ this.m_closeBtn = (base.transform.Find("Bg/Close").GetComponent("XUIButton") as IXUIButton);
+ this.m_ignoreBtn = (base.transform.Find("Bg/BtnNo").GetComponent("XUIButton") as IXUIButton);
+ this.m_tempRejectBtn = (base.transform.Find("Bg/BtnOk").GetComponent("XUIButton") as IXUIButton);
+ this.m_wrapContent = (base.transform.Find("Bg/List/WrapContent").GetComponent("XUIWrapContent") as IXUIWrapContent);
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/PairsPetInviteBehaviour.cs.meta b/Client/Assets/Scripts/XMainClient/UI/PairsPetInviteBehaviour.cs.meta
new file mode 100644
index 00000000..bf790030
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/PairsPetInviteBehaviour.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 37095f3d1baa1d448a93d5baf2ce9fb0
+timeCreated: 1611403564
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/PairsPetInviteView.cs b/Client/Assets/Scripts/XMainClient/UI/PairsPetInviteView.cs
new file mode 100644
index 00000000..694ac524
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/PairsPetInviteView.cs
@@ -0,0 +1,203 @@
+using System;
+using KKSG;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class PairsPetInviteView : DlgBase<PairsPetInviteView, PairsPetInviteBehaviour>
+ {
+ public override string fileName
+ {
+ get
+ {
+ return "GameSystem/DoublepetInvitation";
+ }
+ }
+
+ public override bool autoload
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override bool hideMainMenu
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override bool pushstack
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override bool fullscreenui
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ private XPetDocument m_doc;
+
+ protected override void OnLoad()
+ {
+ base.OnLoad();
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ base.uiBehaviour.m_closeBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnCloseClicked));
+ base.uiBehaviour.m_ignoreBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnClickIgnoreAllBtn));
+ base.uiBehaviour.m_tempRejectBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnClickTempRejectBtn));
+ }
+
+ protected override void OnUnload()
+ {
+ base.OnUnload();
+ }
+
+ protected override void Init()
+ {
+ base.Init();
+ this.m_doc = XDocuments.GetSpecificDocument<XPetDocument>(XPetDocument.uuID);
+ base.uiBehaviour.m_wrapContent.RegisterItemUpdateEventHandler(new WrapItemUpdateEventHandler(this.WrapContentItemUpdated));
+ }
+
+ protected override void OnHide()
+ {
+ base.OnHide();
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ base.uiBehaviour.m_wrapContent.gameObject.SetActive(false);
+ this.m_doc.OnReqInviteList();
+ }
+
+ public override void StackRefresh()
+ {
+ base.StackRefresh();
+ }
+
+ public void RefreshUi()
+ {
+ this.FillContent();
+ }
+
+ private void FillContent()
+ {
+ base.uiBehaviour.m_wrapContent.gameObject.SetActive(true);
+ base.uiBehaviour.m_wrapContent.SetContentCount(this.m_doc.PetInviteInfolist.Count, false);
+ }
+
+ private void WrapContentItemUpdated(Transform t, int index)
+ {
+ bool flag = index >= this.m_doc.PetInviteInfolist.Count;
+ if (flag)
+ {
+ XSingleton<XDebug>.singleton.AddErrorLog("index >= PetInviteInfolist.Count", null, null, null, null, null);
+ }
+ else
+ {
+ PetInviteInfo petInviteInfo = this.m_doc.PetInviteInfolist[index];
+ IXUISprite ixuisprite = t.Find("head").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.spriteName = XSingleton<XProfessionSkillMgr>.singleton.GetSuperRiskAvatar(petInviteInfo.profession % 10u);
+ IXUILabelSymbol ixuilabelSymbol = t.Find("Name").GetComponent("XUILabelSymbol") as IXUILabelSymbol;
+ ixuilabelSymbol.InputText = petInviteInfo.rolename;
+ IXUILabel ixuilabel = t.Find("PPT").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel.SetText(petInviteInfo.ppt.ToString());
+ PetInfoTable.RowData petInfo = XPetDocument.GetPetInfo(petInviteInfo.petconfigid);
+ ixuisprite = (t.Find("Item/Quality").GetComponent("XUISprite") as IXUISprite);
+ bool flag2 = petInfo != null;
+ if (flag2)
+ {
+ ixuisprite.SetSprite(XSingleton<UiUtility>.singleton.GetItemQualityFrame((int)petInfo.quality, 0));
+ }
+ else
+ {
+ ixuisprite.SetSprite("");
+ }
+ ixuisprite = (t.Find("Item/PetIcon").GetComponent("XUISprite") as IXUISprite);
+ bool flag3 = petInfo != null;
+ if (flag3)
+ {
+ ixuisprite.SetSprite(petInfo.icon, petInfo.Atlas, false);
+ }
+ else
+ {
+ ixuisprite.SetSprite("");
+ }
+ ixuilabel = (t.Find("PetName").GetComponent("XUILabel") as IXUILabel);
+ bool flag4 = petInfo != null;
+ if (flag4)
+ {
+ ixuilabel.SetText(petInfo.name);
+ }
+ else
+ {
+ ixuilabel.SetText("");
+ }
+ ixuilabel = (t.Find("PetPPT").GetComponent("XUILabel") as IXUILabel);
+ ixuilabel.SetText(petInviteInfo.petppt.ToString());
+ ixuilabel = (t.Find("SpeedUp").GetComponent("XUILabel") as IXUILabel);
+ bool flag5 = petInfo != null;
+ if (flag5)
+ {
+ BuffTable.RowData buffData = XSingleton<XBuffTemplateManager>.singleton.GetBuffData((int)petInfo.SpeedBuff, 1);
+ bool flag6 = buffData != null;
+ if (flag6)
+ {
+ ixuilabel.SetText(string.Format("{0}%", (buffData.BuffChangeAttribute[0, 1] + 100f).ToString()));
+ }
+ }
+ else
+ {
+ ixuilabel.SetText("");
+ }
+ IXUIButton ixuibutton = t.Find("Mentorship").GetComponent("XUIButton") as IXUIButton;
+ ixuibutton.ID = petInviteInfo.roleid;
+ ixuibutton.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnClickDrive));
+ }
+ }
+
+ private bool OnCloseClicked(IXUIButton btn)
+ {
+ this.SetVisible(false, true);
+ return true;
+ }
+
+ private bool OnClickIgnoreAllBtn(IXUIButton btn)
+ {
+ this.SetVisible(false, true);
+ this.m_doc.OnReqIgnoreAll();
+ return true;
+ }
+
+ private bool OnClickTempRejectBtn(IXUIButton btn)
+ {
+ this.SetVisible(false, true);
+ return true;
+ }
+
+ private bool OnClickDrive(IXUIButton btn)
+ {
+ ulong id = btn.ID;
+ this.m_doc.ReqPetPetOperationOther(PetOtherOp.AgreePetPairRide, id);
+ return true;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/PairsPetInviteView.cs.meta b/Client/Assets/Scripts/XMainClient/UI/PairsPetInviteView.cs.meta
new file mode 100644
index 00000000..a5e92bde
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/PairsPetInviteView.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 47972b798746b6a45bbef51180894e36
+timeCreated: 1611403654
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/PairsPetSetHandler.cs b/Client/Assets/Scripts/XMainClient/UI/PairsPetSetHandler.cs
new file mode 100644
index 00000000..5146f4d9
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/PairsPetSetHandler.cs
@@ -0,0 +1,136 @@
+using System;
+using UILib;
+
+namespace XMainClient.UI
+{
+ internal class PairsPetSetHandler : DlgHandlerBase
+ {
+ protected override string FileName
+ {
+ get
+ {
+ return "GameSystem/DoublepetSet";
+ }
+ }
+
+ private XPetDocument m_doc;
+
+ private IXUICheckBox m_yesToggle;
+
+ private IXUICheckBox m_noToggle;
+
+ private IXUIButton m_closeBtn;
+
+ private bool m_isAllow = true;
+
+ protected override void Init()
+ {
+ this.m_doc = XDocuments.GetSpecificDocument<XPetDocument>(XPetDocument.uuID);
+ this.m_closeBtn = (base.PanelObject.transform.Find("Bg/Close").GetComponent("XUIButton") as IXUIButton);
+ this.m_yesToggle = (base.PanelObject.transform.Find("Bg/Yes/Normal").GetComponent("XUICheckBox") as IXUICheckBox);
+ this.m_noToggle = (base.PanelObject.transform.Find("Bg/No/Normal").GetComponent("XUICheckBox") as IXUICheckBox);
+ base.Init();
+ }
+
+ public override void RegisterEvent()
+ {
+ this.m_yesToggle.RegisterOnCheckEventHandler(new CheckBoxOnCheckEventHandler(this.ClickYesToggle));
+ this.m_noToggle.RegisterOnCheckEventHandler(new CheckBoxOnCheckEventHandler(this.ClickNoToggle));
+ this.m_closeBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.ClickClosed));
+ base.RegisterEvent();
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ this.FillContent();
+ }
+
+ protected override void OnHide()
+ {
+ base.OnHide();
+ }
+
+ public override void OnUnload()
+ {
+ base.OnUnload();
+ }
+
+ public override void RefreshData()
+ {
+ base.RefreshData();
+ }
+
+ public override void StackRefresh()
+ {
+ base.StackRefresh();
+ }
+
+ private void FillContent()
+ {
+ bool flag = this.m_doc.CurSelectedPet == null;
+ if (!flag)
+ {
+ this.m_isAllow = this.m_doc.CurSelectedPet.Canpairride;
+ bool isAllow = this.m_isAllow;
+ if (isAllow)
+ {
+ this.m_yesToggle.ForceSetFlag(true);
+ this.m_noToggle.ForceSetFlag(false);
+ }
+ else
+ {
+ this.m_yesToggle.ForceSetFlag(false);
+ this.m_noToggle.ForceSetFlag(true);
+ }
+ }
+ }
+
+ private bool ClickYesToggle(IXUICheckBox checkBox)
+ {
+ bool flag = !checkBox.bChecked;
+ bool result;
+ if (flag)
+ {
+ result = false;
+ }
+ else
+ {
+ this.m_isAllow = true;
+ result = true;
+ }
+ return result;
+ }
+
+ private bool ClickNoToggle(IXUICheckBox checkBox)
+ {
+ bool flag = !checkBox.bChecked;
+ bool result;
+ if (flag)
+ {
+ result = false;
+ }
+ else
+ {
+ this.m_isAllow = false;
+ result = true;
+ }
+ return result;
+ }
+
+ private bool ClickClosed(IXUIButton btn)
+ {
+ bool flag = this.m_doc.CurSelectedPet != null;
+ if (flag)
+ {
+ bool flag2 = this.m_doc.CurSelectedPet.Canpairride != this.m_isAllow;
+ if (flag2)
+ {
+ this.m_doc.OnReqSetTravelSet(this.m_isAllow);
+ }
+ }
+ base.SetVisible(false);
+ return true;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/PairsPetSetHandler.cs.meta b/Client/Assets/Scripts/XMainClient/UI/PairsPetSetHandler.cs.meta
new file mode 100644
index 00000000..6c6844b7
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/PairsPetSetHandler.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 7dc70a2a29a08c742bf400c17d3ad38c
+timeCreated: 1611404002
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/PandoraBehaviour.cs b/Client/Assets/Scripts/XMainClient/UI/PandoraBehaviour.cs
new file mode 100644
index 00000000..5d32e8fd
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/PandoraBehaviour.cs
@@ -0,0 +1,55 @@
+using System;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class PandoraBehaviour : DlgBehaviourBase
+ {
+ public Transform m_DisplayFrame;
+
+ public Transform m_RewardFrame;
+
+ public Transform m_FxPoint;
+
+ public IXUIButton m_OnceButton;
+
+ public IXUIButton m_TenButton;
+
+ public IXUILabel[] m_DisplayLabel = new IXUILabel[3];
+
+ public IXUISprite[] m_DisplayPoint = new IXUISprite[3];
+
+ public IUIDummy[] m_DisplayAvatar = new IUIDummy[3];
+
+ public IXUISprite m_BackButton;
+
+ public IXUIButton m_ItemListButton;
+
+ public IXUIButton m_OKButton;
+
+ public XUIPool m_ResultPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ private void Awake()
+ {
+ this.m_DisplayFrame = base.transform.Find("Bg/DisplayFrame");
+ this.m_RewardFrame = base.transform.Find("Bg/RewardFrame");
+ this.m_FxPoint = base.transform.Find("Bg/FxPoint");
+ this.m_OnceButton = (this.m_DisplayFrame.Find("Once").GetComponent("XUIButton") as IXUIButton);
+ this.m_TenButton = (this.m_DisplayFrame.Find("Ten").GetComponent("XUIButton") as IXUIButton);
+ for (int i = 0; i < 3; i++)
+ {
+ this.m_DisplayLabel[i] = (this.m_DisplayFrame.Find(string.Format("Display{0}/Label", i)).GetComponent("XUILabel") as IXUILabel);
+ this.m_DisplayPoint[i] = (this.m_DisplayFrame.Find(string.Format("Display{0}/Bg/Point", i)).GetComponent("XUISprite") as IXUISprite);
+ this.m_DisplayAvatar[i] = (this.m_DisplayFrame.Find(string.Format("Display{0}/Bg/avatar", i)).GetComponent("UIDummy") as IUIDummy);
+ }
+ this.m_BackButton = (this.m_DisplayFrame.Find("Back").GetComponent("XUISprite") as IXUISprite);
+ this.m_ItemListButton = (this.m_DisplayFrame.Find("ItemList").GetComponent("XUIButton") as IXUIButton);
+ this.m_OKButton = (this.m_RewardFrame.Find("OK").GetComponent("XUIButton") as IXUIButton);
+ Transform transform = this.m_RewardFrame.Find("ResultTpl");
+ this.m_ResultPool.SetupPool(transform.parent.gameObject, transform.gameObject, 10u, false);
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/PandoraBehaviour.cs.meta b/Client/Assets/Scripts/XMainClient/UI/PandoraBehaviour.cs.meta
new file mode 100644
index 00000000..28a85d44
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/PandoraBehaviour.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 1cbd7f4d5e75ef14caa3ca9ea5fb5ad6
+timeCreated: 1611403348
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/PandoraSDKHandler.cs b/Client/Assets/Scripts/XMainClient/UI/PandoraSDKHandler.cs
new file mode 100644
index 00000000..8771b360
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/PandoraSDKHandler.cs
@@ -0,0 +1,65 @@
+using System;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class PandoraSDKHandler : DlgHandlerBase
+ {
+ protected override string FileName
+ {
+ get
+ {
+ return "OperatingActivity/PandoraFrame";
+ }
+ }
+
+ private XSysDefine currSys = XSysDefine.XSys_None;
+
+ protected override void Init()
+ {
+ base.Init();
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ this.ShowPandoraTab();
+ }
+
+ protected override void OnHide()
+ {
+ base.OnHide();
+ this.HidePandoraTab();
+ }
+
+ private void ShowPandoraTab()
+ {
+ bool flag = this.currSys == XSysDefine.XSys_None;
+ if (!flag)
+ {
+ int sysID = XFastEnumIntEqualityComparer<XSysDefine>.ToInt(this.currSys);
+ XSingleton<XPandoraSDKDocument>.singleton.ShowPandoraTab(sysID, true, base.PanelObject);
+ }
+ }
+
+ private void HidePandoraTab()
+ {
+ bool flag = this.currSys == XSysDefine.XSys_None;
+ if (!flag)
+ {
+ int sysID = XFastEnumIntEqualityComparer<XSysDefine>.ToInt(this.currSys);
+ XSingleton<XPandoraSDKDocument>.singleton.ShowPandoraTab(sysID, false, base.PanelObject);
+ }
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ }
+
+ public void SetCurrSys(XSysDefine sys)
+ {
+ this.currSys = sys;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/PandoraSDKHandler.cs.meta b/Client/Assets/Scripts/XMainClient/UI/PandoraSDKHandler.cs.meta
new file mode 100644
index 00000000..bde4fe78
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/PandoraSDKHandler.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: e45e005ac6e72794889418c6415d30a2
+timeCreated: 1611404737
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/PandoraView.cs b/Client/Assets/Scripts/XMainClient/UI/PandoraView.cs
new file mode 100644
index 00000000..45ac3886
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/PandoraView.cs
@@ -0,0 +1,442 @@
+using System;
+using System.Collections.Generic;
+using KKSG;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class PandoraView : DlgBase<PandoraView, PandoraBehaviour>
+ {
+ private OutLook outLook
+ {
+ get
+ {
+ bool flag = this.m_outLook == null;
+ if (flag)
+ {
+ this.m_outLook = new OutLook();
+ }
+ bool flag2 = this.m_outLook.display_fashion == null;
+ if (flag2)
+ {
+ this.m_outLook.display_fashion = new OutLookDisplayFashion();
+ }
+ return this.m_outLook;
+ }
+ }
+
+ public override string fileName
+ {
+ get
+ {
+ return "GameSystem/PandoraDlg";
+ }
+ }
+
+ public override int layer
+ {
+ get
+ {
+ return 1;
+ }
+ }
+
+ public override bool pushstack
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override bool fullscreenui
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override bool hideMainMenu
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override bool autoload
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override int sysid
+ {
+ get
+ {
+ return XFastEnumIntEqualityComparer<XSysDefine>.ToInt(XSysDefine.XSys_Pandora);
+ }
+ }
+
+ private PandoraDocument _doc;
+
+ private XShowGetItemDocument _showItemDoc;
+
+ private ItemListHandler _itemListHandler;
+
+ private XFx m_OpenFx = null;
+
+ private List<XFx> m_FxList = new List<XFx>();
+
+ private XDummy[] m_Dummy = new XDummy[3];
+
+ private Vector3[] m_DummyAngle = new Vector3[3];
+
+ private Vector3[] m_DummyScale = new Vector3[3];
+
+ private const int _avatarSlot = 8;
+
+ private uint _fxTimeToken = 0u;
+
+ private OutLook m_outLook;
+
+ protected override void Init()
+ {
+ base.Init();
+ this._doc = XDocuments.GetSpecificDocument<PandoraDocument>(PandoraDocument.uuID);
+ this._showItemDoc = XDocuments.GetSpecificDocument<XShowGetItemDocument>(XShowGetItemDocument.uuID);
+ }
+
+ public override int[] GetTitanBarItems()
+ {
+ return new int[]
+ {
+ (int)this._doc.PandoraData.PandoraID,
+ (int)this._doc.PandoraData.FireID
+ };
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ base.Alloc3DAvatarPool("PandoraView");
+ this._showItemDoc.bIgonre = true;
+ this.m_DummyAngle[0] = new Vector3(this._doc.PandoraData.DisplayAngle0[0], this._doc.PandoraData.DisplayAngle0[1], this._doc.PandoraData.DisplayAngle0[2]);
+ this.m_DummyAngle[1] = new Vector3(this._doc.PandoraData.DisplayAngle1[0], this._doc.PandoraData.DisplayAngle1[1], this._doc.PandoraData.DisplayAngle1[2]);
+ this.m_DummyAngle[2] = new Vector3(this._doc.PandoraData.DisplayAngle2[0], this._doc.PandoraData.DisplayAngle2[1], this._doc.PandoraData.DisplayAngle2[2]);
+ this.m_DummyScale[0] = new Vector3(this._doc.PandoraData.DisplayAngle0[3], this._doc.PandoraData.DisplayAngle0[4], this._doc.PandoraData.DisplayAngle0[5]);
+ this.m_DummyScale[1] = new Vector3(this._doc.PandoraData.DisplayAngle1[3], this._doc.PandoraData.DisplayAngle1[4], this._doc.PandoraData.DisplayAngle1[5]);
+ this.m_DummyScale[2] = new Vector3(this._doc.PandoraData.DisplayAngle2[3], this._doc.PandoraData.DisplayAngle2[4], this._doc.PandoraData.DisplayAngle2[5]);
+ base.uiBehaviour.m_DisplayLabel[0].SetText(this._doc.PandoraData.DisplayName0);
+ base.uiBehaviour.m_DisplayLabel[1].SetText(this._doc.PandoraData.DisplayName1);
+ base.uiBehaviour.m_DisplayLabel[2].SetText(this._doc.PandoraData.DisplayName2);
+ this.ShowDisplayFrame();
+ }
+
+ protected override void OnHide()
+ {
+ this._showItemDoc.bIgonre = false;
+ this.ClearAllFx();
+ this._doc.DestroyFx(this.m_OpenFx);
+ this.m_OpenFx = null;
+ base.Return3DAvatarPool();
+ XSingleton<XTimerMgr>.singleton.KillTimer(this._fxTimeToken);
+ base.OnHide();
+ }
+
+ public override void StackRefresh()
+ {
+ base.StackRefresh();
+ base.Alloc3DAvatarPool("PandoraView");
+ this._showItemDoc.bIgonre = true;
+ }
+
+ public override void LeaveStackTop()
+ {
+ base.LeaveStackTop();
+ this._showItemDoc.bIgonre = false;
+ }
+
+ protected override void OnUnload()
+ {
+ this.ClearAllFx();
+ this._doc.DestroyFx(this.m_OpenFx);
+ this.m_OpenFx = null;
+ this.m_outLook = null;
+ base.Return3DAvatarPool();
+ XSingleton<XTimerMgr>.singleton.KillTimer(this._fxTimeToken);
+ DlgHandlerBase.EnsureUnload<ItemListHandler>(ref this._itemListHandler);
+ base.OnUnload();
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ base.uiBehaviour.m_BackButton.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnBackClicked));
+ base.uiBehaviour.m_OnceButton.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnOnceButtonClicked));
+ base.uiBehaviour.m_TenButton.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnTenButtonClicked));
+ base.uiBehaviour.m_OKButton.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnOKButtonClicked));
+ base.uiBehaviour.m_ItemListButton.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnItemListButtonClicked));
+ base.uiBehaviour.m_DisplayPoint[0].RegisterSpriteDragEventHandler(new SpriteDragEventHandler(this.OnAvatarDrag0));
+ base.uiBehaviour.m_DisplayPoint[1].RegisterSpriteDragEventHandler(new SpriteDragEventHandler(this.OnAvatarDrag1));
+ base.uiBehaviour.m_DisplayPoint[2].RegisterSpriteDragEventHandler(new SpriteDragEventHandler(this.OnAvatarDrag2));
+ }
+
+ private void OnBackClicked(IXUISprite sp)
+ {
+ this.SetVisible(false, true);
+ }
+
+ private bool OnOnceButtonClicked(IXUIButton button)
+ {
+ this._doc.SendPandoraLottery(true);
+ return true;
+ }
+
+ private bool OnTenButtonClicked(IXUIButton button)
+ {
+ this._doc.SendPandoraLottery(false);
+ return true;
+ }
+
+ private bool OnOKButtonClicked(IXUIButton button)
+ {
+ this.ShowDisplayFrame();
+ XScreenShotShareDocument specificDocument = XDocuments.GetSpecificDocument<XScreenShotShareDocument>(XScreenShotShareDocument.uuID);
+ bool flag = specificDocument.CurShareBgType == ShareBgType.LuckyPandora && specificDocument.SpriteID > 0u;
+ if (flag)
+ {
+ XSingleton<PDatabase>.singleton.shareCallbackType = ShareCallBackType.GloryPic;
+ DlgBase<DungeonShareView, DungeonShareBehavior>.singleton.SetVisibleWithAnimation(true, null);
+ }
+ return true;
+ }
+
+ private bool OnItemListButtonClicked(IXUIButton button)
+ {
+ DlgHandlerBase.EnsureCreate<ItemListHandler>(ref this._itemListHandler, base.uiBehaviour.transform, false, null);
+ this._itemListHandler.ShowItemList(PandoraDocument.ItemList);
+ return true;
+ }
+
+ private bool OnAvatarDrag0(Vector2 delta)
+ {
+ bool flag = this.m_Dummy[0] != null;
+ if (flag)
+ {
+ this.m_Dummy[0].EngineObject.Rotate(Vector3.up, -delta.x / 2f);
+ this.m_DummyAngle[0] = this.m_Dummy[0].EngineObject.LocalEulerAngles;
+ }
+ return true;
+ }
+
+ private bool OnAvatarDrag1(Vector2 delta)
+ {
+ bool flag = this.m_Dummy[1] != null;
+ if (flag)
+ {
+ this.m_Dummy[1].EngineObject.Rotate(Vector3.up, -delta.x / 2f);
+ this.m_DummyAngle[1] = this.m_Dummy[1].EngineObject.LocalEulerAngles;
+ }
+ return true;
+ }
+
+ private bool OnAvatarDrag2(Vector2 delta)
+ {
+ bool flag = this.m_Dummy[2] != null;
+ if (flag)
+ {
+ this.m_Dummy[2].EngineObject.Rotate(Vector3.up, -delta.x / 2f);
+ this.m_DummyAngle[2] = this.m_Dummy[2].EngineObject.LocalEulerAngles;
+ }
+ return true;
+ }
+
+ public void ShowDisplayFrame()
+ {
+ base.uiBehaviour.m_DisplayFrame.gameObject.SetActive(true);
+ base.uiBehaviour.m_RewardFrame.gameObject.SetActive(false);
+ base.uiBehaviour.m_BackButton.SetVisible(true);
+ base.uiBehaviour.m_OnceButton.SetVisible(true);
+ base.uiBehaviour.m_TenButton.SetVisible(true);
+ this.RefreshDummy();
+ }
+
+ private void RefreshDummy()
+ {
+ for (int i = 0; i < 3; i++)
+ {
+ uint[] array = null;
+ switch (i)
+ {
+ case 0:
+ array = this._doc.PandoraData.DisplaySlot0;
+ break;
+ case 1:
+ array = this._doc.PandoraData.DisplaySlot1;
+ break;
+ case 2:
+ array = this._doc.PandoraData.DisplaySlot2;
+ break;
+ }
+ bool flag = array == null;
+ if (!flag)
+ {
+ base.uiBehaviour.m_DisplayAvatar[i].transform.localScale = this.m_DummyScale[i];
+ uint num = array[0];
+ if (num != 0u)
+ {
+ if (num == 1u)
+ {
+ uint presentID = this.TransItemToPresentID(array[1]);
+ string rideAnim = this.GetRideAnim(array[1]);
+ this.m_Dummy[i] = XSingleton<X3DAvatarMgr>.singleton.CreateCommonEntityDummy(this.m_dummPool, presentID, base.uiBehaviour.m_DisplayAvatar[i], this.m_Dummy[i], 1f);
+ this.m_Dummy[i].SetAnimation(rideAnim);
+ this.m_Dummy[i].EngineObject.LocalEulerAngles = this.m_DummyAngle[i];
+ }
+ }
+ else
+ {
+ List<uint> list = new List<uint>();
+ for (int j = 1; j < array.Length; j++)
+ {
+ list.Add(array[j]);
+ }
+ XPlayerAttributes xplayerData = XSingleton<XAttributeMgr>.singleton.XPlayerData;
+ bool flag2 = xplayerData != null;
+ if (flag2)
+ {
+ this.outLook.display_fashion.display_fashions.Clear();
+ this.outLook.display_fashion.display_fashions.AddRange(list);
+ this.m_Dummy[i] = XSingleton<X3DAvatarMgr>.singleton.CreateCommonRoleDummy(this.m_dummPool, xplayerData.RoleID, (uint)XFastEnumIntEqualityComparer<RoleType>.ToInt(xplayerData.Profession), this.outLook, base.uiBehaviour.m_DisplayAvatar[i], this.m_Dummy[i]);
+ this.m_Dummy[i].EngineObject.LocalEulerAngles = this.m_DummyAngle[i];
+ }
+ }
+ }
+ }
+ }
+
+ private uint TransItemToPresentID(uint itemid)
+ {
+ uint petID = XPetDocument.GetPetID(itemid);
+ return XPetDocument.GetPresentID(petID);
+ }
+
+ private string GetRideAnim(uint itemid)
+ {
+ uint petID = XPetDocument.GetPetID(itemid);
+ XPetDocument specificDocument = XDocuments.GetSpecificDocument<XPetDocument>(XPetDocument.uuID);
+ PetBubble.RowData petBubble = specificDocument.GetPetBubble(XPetActionFile.IDLE, petID);
+ bool flag = petBubble == null;
+ string result;
+ if (flag)
+ {
+ XSingleton<XDebug>.singleton.AddErrorLog(string.Concat(new object[]
+ {
+ "PetBubble No Find\nitemid:",
+ itemid,
+ " petid:",
+ petID
+ }), null, null, null, null, null);
+ result = null;
+ }
+ else
+ {
+ result = petBubble.ActionFile;
+ }
+ return result;
+ }
+
+ public void PlayOpenFx()
+ {
+ base.uiBehaviour.m_BackButton.SetVisible(false);
+ base.uiBehaviour.m_OnceButton.SetVisible(false);
+ base.uiBehaviour.m_TenButton.SetVisible(false);
+ this._doc.DestroyFx(this.m_OpenFx);
+ this.m_OpenFx = null;
+ this.m_OpenFx = this._doc.CreateAndPlayFx("Effects/FX_Particle/UIfx/UI_pdlzx_Clip01", base.uiBehaviour.m_FxPoint);
+ XSingleton<XAudioMgr>.singleton.PlayUISound("Audio/UI/UI_PandoraHeart_Ten", true, AudioChannel.Action);
+ this._fxTimeToken = XSingleton<XTimerMgr>.singleton.SetTimer((float)XSingleton<XGlobalConfig>.singleton.GetInt("PandoraFxTime") / 10f, new XTimerMgr.ElapsedEventHandler(this.ShowRewardFrame), null);
+ }
+
+ public void ShowRewardFrame(object o = null)
+ {
+ base.uiBehaviour.m_DisplayFrame.gameObject.SetActive(false);
+ base.uiBehaviour.m_RewardFrame.gameObject.SetActive(true);
+ this.ClearAllFx();
+ this._doc.DestroyFx(this.m_OpenFx);
+ this.m_OpenFx = null;
+ base.uiBehaviour.m_ResultPool.FakeReturnAll();
+ for (int i = 0; i < this._doc.ItemCache.Count; i++)
+ {
+ this.SetupItem(i);
+ }
+ base.uiBehaviour.m_ResultPool.ActualReturnAll(false);
+ }
+
+ private void SetupItem(int index)
+ {
+ GameObject gameObject = base.uiBehaviour.m_ResultPool.FetchGameObject(false);
+ IXUITweenTool ixuitweenTool = gameObject.GetComponent("XUIPlayTween") as IXUITweenTool;
+ GameObject gameObject2 = gameObject.transform.Find("ItemTpl").gameObject;
+ IXUISprite ixuisprite = gameObject2.transform.Find("Icon").GetComponent("XUISprite") as IXUISprite;
+ XSingleton<XItemDrawerMgr>.singleton.normalItemDrawer.DrawItem(gameObject2, (int)this._doc.ItemCache[index].itemID, (int)this._doc.ItemCache[index].itemCount, false);
+ Transform parent = gameObject.transform.Find("Fx");
+ ixuisprite.ID = (ulong)this._doc.ItemCache[index].itemID;
+ bool isbind = this._doc.ItemCache[index].isbind;
+ if (isbind)
+ {
+ ixuisprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(XSingleton<UiUtility>.singleton.OnBindItemClick));
+ }
+ else
+ {
+ ixuisprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(XSingleton<UiUtility>.singleton.OnItemClick));
+ }
+ ItemList.RowData itemConf = XBagDocument.GetItemConf((int)this._doc.ItemCache[index].itemID);
+ switch (itemConf.ItemQuality)
+ {
+ case 3:
+ this.m_FxList.Add(this._doc.CreateAndPlayFx("Effects/FX_Particle/UIfx/UI_jl_04_orange", parent));
+ break;
+ case 4:
+ this.m_FxList.Add(this._doc.CreateAndPlayFx("Effects/FX_Particle/UIfx/UI_jl_04_purple", parent));
+ break;
+ case 5:
+ this.m_FxList.Add(this._doc.CreateAndPlayFx("Effects/FX_Particle/UIfx/UI_jl_04_red", parent));
+ break;
+ }
+ gameObject.transform.localPosition = this.GetItemPos(index, this._doc.ItemCache.Count, 5, (float)base.uiBehaviour.m_ResultPool.TplWidth, (float)base.uiBehaviour.m_ResultPool.TplHeight, base.uiBehaviour.m_ResultPool.TplPos);
+ ixuitweenTool.ResetTween(true);
+ ixuitweenTool.PlayTween(true, -1f);
+ }
+
+ private Vector3 GetItemPos(int index, int totalCount, int lineCount, float width, float height, Vector3 centerPos)
+ {
+ float num = centerPos.x - (float)(lineCount - 1) * width / 2f;
+ float num2 = centerPos.y + (float)((totalCount + lineCount - 1) / lineCount) * height / 2f;
+ bool flag = totalCount / lineCount == index / lineCount;
+ if (flag)
+ {
+ num += (float)(lineCount - totalCount % lineCount) * width / 2f;
+ }
+ float num3 = num + (float)(index % lineCount) * width;
+ float num4 = num2 - (float)(index / lineCount) * height;
+ return new Vector3(num3, num4);
+ }
+
+ private void ClearAllFx()
+ {
+ for (int i = 0; i < this.m_FxList.Count; i++)
+ {
+ this._doc.DestroyFx(this.m_FxList[i]);
+ }
+ this.m_FxList.Clear();
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/PandoraView.cs.meta b/Client/Assets/Scripts/XMainClient/UI/PandoraView.cs.meta
new file mode 100644
index 00000000..f70295a9
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/PandoraView.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 5319f81452b9db345a09d11f58934bf8
+timeCreated: 1611403710
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/PartnerLivenessBehaviour.cs b/Client/Assets/Scripts/XMainClient/UI/PartnerLivenessBehaviour.cs
new file mode 100644
index 00000000..51798bfb
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/PartnerLivenessBehaviour.cs
@@ -0,0 +1,53 @@
+using System;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class PartnerLivenessBehaviour : DlgBehaviourBase
+ {
+ public ILoopScrollView m_loopScrool;
+
+ public XUIPool m_ActivityItemPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ public XUIPool m_ChestPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ public XUIPool m_RewardItemPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ public IXUISprite m_closedSpr;
+
+ public XChestProgress m_Progress;
+
+ public IXUILabel m_totalExp;
+
+ public XNumberTween m_TotalExpTween;
+
+ public IXUILabel m_chestTips;
+
+ public IXUILabel m_Name;
+
+ public IXUILabel m_Tip;
+
+ private void Awake()
+ {
+ Transform transform = base.transform.Find("Bg/RightView/ActivityTpl");
+ this.m_ActivityItemPool.SetupPool(transform.parent.gameObject, transform.gameObject, 10u, false);
+ this.m_closedSpr = (base.transform.Find("Bg/Close").GetComponent("XUISprite") as IXUISprite);
+ this.m_Progress = new XChestProgress(base.transform.Find("Bg/UpView/Progress").GetComponent("XUIProgress") as IXUIProgress);
+ transform = base.transform.Find("Bg/UpView/Progress/Chests/Chest");
+ this.m_ChestPool.SetupPool(transform.parent.gameObject, transform.gameObject, 5u, false);
+ transform = base.transform.Find("Bg/LeftView/Item");
+ this.m_RewardItemPool.SetupPool(transform.parent.gameObject, transform.gameObject, 3u, false);
+ this.m_totalExp = (base.transform.Find("Bg/UpView/CurrentExp").GetComponent("XUILabel") as IXUILabel);
+ this.m_TotalExpTween = XNumberTween.Create(this.m_totalExp);
+ this.m_TotalExpTween.SetNumberWithTween(0UL, "", false, true);
+ this.m_chestTips = (base.transform.Find("Bg/LeftView/BigChest/Tips/Exp").GetComponent("XUILabel") as IXUILabel);
+ this.m_loopScrool = (base.transform.Find("Bg/RightView").GetComponent("LoopScrollView") as ILoopScrollView);
+ this.m_ChestPool.ReturnAll(false);
+ this.m_Name = (base.transform.Find("Bg/UpView/CurrentExp/T").GetComponent("XUILabel") as IXUILabel);
+ this.m_Tip = (base.transform.Find("Bg/Bg/Label").GetComponent("XUILabel") as IXUILabel);
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/PartnerLivenessBehaviour.cs.meta b/Client/Assets/Scripts/XMainClient/UI/PartnerLivenessBehaviour.cs.meta
new file mode 100644
index 00000000..e69ba86e
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/PartnerLivenessBehaviour.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 9ea22a18e1cc4a84ca45818f8c14a1b0
+timeCreated: 1611404242
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/PartnerLivenessDlg.cs b/Client/Assets/Scripts/XMainClient/UI/PartnerLivenessDlg.cs
new file mode 100644
index 00000000..076904dc
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/PartnerLivenessDlg.cs
@@ -0,0 +1,278 @@
+using System;
+using System.Collections.Generic;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class PartnerLivenessDlg : DlgBase<PartnerLivenessDlg, PartnerLivenessBehaviour>
+ {
+ public override string fileName
+ {
+ get
+ {
+ return "Partner/PartnerLiveness";
+ }
+ }
+
+ public override int layer
+ {
+ get
+ {
+ return 1;
+ }
+ }
+
+ public override bool autoload
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override bool fullscreenui
+ {
+ get
+ {
+ return false;
+ }
+ }
+
+ private static readonly uint m_expIncreaseSpeed = 800u;
+
+ private XPartnerDocument m_doc = XPartnerDocument.Doc;
+
+ private List<PartnerLivenessTable.RowData> m_partnerLivenessRow;
+
+ private int m_CurSelectIndex = 0;
+
+ private float m_fCoolTime = 0.5f;
+
+ private float m_fLastClickBtnTime = 0f;
+
+ protected override void Init()
+ {
+ XPartnerDocument.PartnerLivenessData.View = this;
+ GameObject tpl = base.uiBehaviour.m_loopScrool.GetTpl();
+ bool flag = tpl != null && tpl.GetComponent<PartnerLivenessRecordItem>() == null;
+ if (flag)
+ {
+ tpl.AddComponent<PartnerLivenessRecordItem>();
+ }
+ base.uiBehaviour.m_Progress.IncreaseSpeed = PartnerLivenessDlg.m_expIncreaseSpeed;
+ this.m_partnerLivenessRow = null;
+ XPartnerDocument.PartnerLivenessData.GetPartnerLivenessRowsByLevel(this.m_doc.CurPartnerLevel, out this.m_partnerLivenessRow);
+ for (int i = 0; i < this.m_partnerLivenessRow.Count; i++)
+ {
+ GameObject chest = base.uiBehaviour.m_ChestPool.FetchGameObject(false);
+ XChest chest2 = new XChest(chest, this.m_partnerLivenessRow[i].boxPic);
+ base.uiBehaviour.m_Progress.AddChest(chest2);
+ }
+ this.ChangeChestProgressState(true);
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ base.uiBehaviour.m_closedSpr.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnClosed));
+ this.m_partnerLivenessRow = null;
+ XPartnerDocument.PartnerLivenessData.GetPartnerLivenessRowsByLevel(this.m_doc.CurPartnerLevel, out this.m_partnerLivenessRow);
+ for (int i = 0; i < this.m_partnerLivenessRow.Count; i++)
+ {
+ base.uiBehaviour.m_Progress.ChestList[i].m_Chest.ID = (ulong)((long)i);
+ base.uiBehaviour.m_Progress.ChestList[i].m_Chest.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnChestClicked));
+ }
+ }
+
+ public bool OnHelpClicked(IXUIButton button)
+ {
+ DlgBase<XCommonHelpTipView, XCommonHelpTipBehaviour>.singleton.ShowHelp(XSysDefine.XSys_Activity_GoddessTrial);
+ return true;
+ }
+
+ protected override void OnShow()
+ {
+ base.uiBehaviour.m_Name.SetText(XStringDefineProxy.GetString("PartnerLivenessName"));
+ base.uiBehaviour.m_Tip.SetText(XStringDefineProxy.GetString("PartnerLivenessTip"));
+ XPartnerDocument.PartnerLivenessData.ReqPartnerLivenessInfo();
+ bool flag = DlgBase<MallSystemDlg, MallSystemBehaviour>.singleton.IsVisible();
+ if (flag)
+ {
+ DlgBase<MallSystemDlg, MallSystemBehaviour>.singleton.SetRelatedDlg(this);
+ }
+ }
+
+ protected override void OnHide()
+ {
+ base.OnHide();
+ bool flag = DlgBase<MallSystemDlg, MallSystemBehaviour>.singleton.IsVisible();
+ if (flag)
+ {
+ DlgBase<MallSystemDlg, MallSystemBehaviour>.singleton.SetRelatedDlg(null);
+ }
+ }
+
+ public override void StackRefresh()
+ {
+ base.StackRefresh();
+ }
+
+ protected override void OnUnload()
+ {
+ base.OnUnload();
+ base.uiBehaviour.m_Progress.Unload();
+ }
+
+ public override void OnUpdate()
+ {
+ base.OnUpdate();
+ base.uiBehaviour.m_Progress.Update(Time.deltaTime);
+ }
+
+ public void FillContent()
+ {
+ this.RefreshBox();
+ List<LoopItemData> list = new List<LoopItemData>();
+ string empty = string.Empty;
+ for (int i = 0; i < XPartnerDocument.PartnerLivenessData.RecordList.Count; i++)
+ {
+ PartnerLivenessRecord partnerLivenessRecord = XPartnerDocument.PartnerLivenessData.RecordList[i];
+ partnerLivenessRecord.LoopID = XSingleton<XCommon>.singleton.XHash(XPartnerDocument.PartnerLivenessData.RecordList[i].ToString() + i);
+ list.Add(partnerLivenessRecord);
+ }
+ base.uiBehaviour.m_loopScrool.Init(list, new DelegateHandler(this.RefreshRecordItem), null, 0, true);
+ }
+
+ public void RefreshBox()
+ {
+ this.ChangeChestProgressState(false);
+ this.SetCurrentExpAmi();
+ this.ShowReward(XPartnerDocument.PartnerLivenessData.FindNeedShowReward());
+ }
+
+ private void RefreshRecordItem(ILoopItemObject item, LoopItemData data)
+ {
+ PartnerLivenessRecord partnerLivenessRecord = data as PartnerLivenessRecord;
+ bool flag = partnerLivenessRecord != null;
+ if (flag)
+ {
+ GameObject obj = item.GetObj();
+ bool flag2 = obj != null;
+ if (flag2)
+ {
+ PartnerLivenessRecordItem component = obj.GetComponent<PartnerLivenessRecordItem>();
+ bool flag3 = component != null;
+ if (flag3)
+ {
+ component.Refresh(partnerLivenessRecord);
+ }
+ }
+ }
+ else
+ {
+ XSingleton<XDebug>.singleton.AddErrorLog("GuildMiniReportItem info is null", null, null, null, null, null);
+ }
+ }
+
+ public void SetCurrentExpAmi()
+ {
+ base.uiBehaviour.m_Progress.TargetExp = XPartnerDocument.PartnerLivenessData.CurExp;
+ base.uiBehaviour.m_TotalExpTween.SetNumberWithTween((ulong)XPartnerDocument.PartnerLivenessData.CurExp, "", false, true);
+ }
+
+ public void ChangeChestProgressState(bool init = false)
+ {
+ for (int i = 0; i < this.m_partnerLivenessRow.Count; i++)
+ {
+ XChest xchest = base.uiBehaviour.m_Progress.ChestList[i];
+ if (init)
+ {
+ xchest.SetExp(this.m_partnerLivenessRow[i].liveness);
+ }
+ xchest.Opened = XPartnerDocument.PartnerLivenessData.IsChestOpened(i + 1);
+ }
+ if (init)
+ {
+ base.uiBehaviour.m_Progress.SetExp(0u, XPartnerDocument.PartnerLivenessData.MaxExp);
+ }
+ }
+
+ public void ResetBoxRedDot(int index)
+ {
+ bool flag = index < 0 || index >= base.uiBehaviour.m_Progress.ChestList.Count;
+ if (!flag)
+ {
+ base.uiBehaviour.m_Progress.ChestList[index].Open();
+ }
+ }
+
+ private void OnChestClicked(IXUISprite iSp)
+ {
+ bool flag = this.SetButtonCool(this.m_fCoolTime);
+ if (!flag)
+ {
+ int index = (int)iSp.ID;
+ this.ShowReward(index);
+ bool flag2 = base.uiBehaviour.m_Progress.IsExpEnough(index);
+ if (flag2)
+ {
+ PartnerLivenessTable.RowData rowData = this.m_partnerLivenessRow[index];
+ bool flag3 = rowData != null;
+ if (flag3)
+ {
+ XPartnerDocument.PartnerLivenessData.ReqTakePartnerChest(rowData.index);
+ }
+ }
+ }
+ }
+
+ public void ShowReward(int index)
+ {
+ this.m_CurSelectIndex = index;
+ base.uiBehaviour.m_RewardItemPool.ReturnAll(false);
+ PartnerLivenessTable.RowData rowData = this.m_partnerLivenessRow[this.m_CurSelectIndex];
+ for (int i = 0; i < rowData.viewabledrop.Count; i++)
+ {
+ GameObject gameObject = base.uiBehaviour.m_RewardItemPool.FetchGameObject(false);
+ bool flag = rowData.viewabledrop[i, 0] == 4u;
+ if (flag)
+ {
+ XSingleton<XItemDrawerMgr>.singleton.normalItemDrawer.DrawItem(gameObject, (int)rowData.viewabledrop[i, 0], 0, false);
+ }
+ else
+ {
+ XSingleton<XItemDrawerMgr>.singleton.normalItemDrawer.DrawItem(gameObject, (int)rowData.viewabledrop[i, 0], (int)rowData.viewabledrop[i, 1], true);
+ }
+ XSingleton<XItemDrawerMgr>.singleton.normalItemDrawer.OpenClickShowTooltipEvent(gameObject, (int)rowData.viewabledrop[i, 0]);
+ Vector3 tplPos = base.uiBehaviour.m_RewardItemPool.TplPos;
+ gameObject.transform.localPosition = new Vector3(tplPos.x + (float)base.uiBehaviour.m_RewardItemPool.TplWidth * ((float)(-(float)rowData.viewabledrop.Count) / 2f + 0.5f + (float)i), tplPos.y, tplPos.z);
+ }
+ base.uiBehaviour.m_chestTips.SetText(rowData.liveness.ToString());
+ }
+
+ private void OnClosed(IXUISprite spr)
+ {
+ this.SetVisible(false, true);
+ }
+
+ private bool SetButtonCool(float time)
+ {
+ float num = Time.realtimeSinceStartup - this.m_fLastClickBtnTime;
+ bool flag = num < time;
+ bool result;
+ if (flag)
+ {
+ result = true;
+ }
+ else
+ {
+ this.m_fLastClickBtnTime = Time.realtimeSinceStartup;
+ result = false;
+ }
+ return result;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/PartnerLivenessDlg.cs.meta b/Client/Assets/Scripts/XMainClient/UI/PartnerLivenessDlg.cs.meta
new file mode 100644
index 00000000..06879ab4
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/PartnerLivenessDlg.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 448d0abcf4c8f7048bac5ea6f92d143e
+timeCreated: 1611403645
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/PartnerLivenessRecordItem.cs b/Client/Assets/Scripts/XMainClient/UI/PartnerLivenessRecordItem.cs
new file mode 100644
index 00000000..3f336f3c
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/PartnerLivenessRecordItem.cs
@@ -0,0 +1,41 @@
+using System;
+using UILib;
+using UnityEngine;
+
+namespace XMainClient.UI
+{
+ public class PartnerLivenessRecordItem : MonoBehaviour
+ {
+ public IXUILabel m_nameLab;
+
+ public IXUILabel m_timeLab;
+
+ public IXUILabel m_contentLab;
+
+ private IXUISprite m_sprRoot;
+
+ private IXUISprite m_bgSpr;
+
+ private void Awake()
+ {
+ this.m_sprRoot = (base.GetComponent("XUISprite") as IXUISprite);
+ this.m_bgSpr = (base.transform.Find("Bg").GetComponent("XUISprite") as IXUISprite);
+ this.m_nameLab = (base.transform.Find("Bg/Name").GetComponent("XUILabel") as IXUILabel);
+ this.m_timeLab = (base.transform.Find("Bg/Time").GetComponent("XUILabel") as IXUILabel);
+ this.m_contentLab = (base.transform.Find("Bg/Description").GetComponent("XUILabel") as IXUILabel);
+ }
+
+ public void Refresh(PartnerLivenessRecord record)
+ {
+ bool flag = record == null;
+ if (!flag)
+ {
+ this.m_nameLab.SetText(record.Name);
+ this.m_timeLab.SetText(record.ShowTimeStr);
+ this.m_contentLab.SetText(record.ShowString);
+ this.m_sprRoot.spriteHeight = 46 + this.m_contentLab.spriteHeight;
+ this.m_bgSpr.spriteHeight = this.m_sprRoot.spriteHeight;
+ }
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/PartnerLivenessRecordItem.cs.meta b/Client/Assets/Scripts/XMainClient/UI/PartnerLivenessRecordItem.cs.meta
new file mode 100644
index 00000000..068d5986
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/PartnerLivenessRecordItem.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: f2eb36fb2b437ba429b6a6ad4f618408
+timeCreated: 1611404845
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/PartnerMainHandler.cs b/Client/Assets/Scripts/XMainClient/UI/PartnerMainHandler.cs
new file mode 100644
index 00000000..c6af4a86
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/PartnerMainHandler.cs
@@ -0,0 +1,554 @@
+using System;
+using System.Collections.Generic;
+using KKSG;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class PartnerMainHandler : DlgHandlerBase
+ {
+ protected override string FileName
+ {
+ get
+ {
+ return "Partner/PartnerFrame";
+ }
+ }
+
+ private XPartnerDocument m_doc = XPartnerDocument.Doc;
+
+ private IUIDummy[] m_Snapshots = new IUIDummy[XPartnerDocument.MaxAvata];
+
+ private float m_fCoolTime = 0.5f;
+
+ private float m_fLastClickBtnTime = 0f;
+
+ private uint m_token;
+
+ private GameObject m_emptyGo;
+
+ private GameObject m_obtainedGo;
+
+ private IXUIButton m_shopBtn;
+
+ private IXUIButton m_gotoTeamBtn;
+
+ private IXUIButton m_gotoBtn;
+
+ private IXUILabel m_noPartnerTips;
+
+ private IXUILabel m_ruleLab;
+
+ private XUIPool m_emptyItemPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ private Transform m_livenessTra;
+
+ private IXUIButton m_livenessBtn;
+
+ private IXUIButton m_breakupBtn;
+
+ private IXUIButton m_cancleBreakUpBtn;
+
+ private IXUILabel m_breakUpCutDownLab;
+
+ private XUIPool m_itemPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ private XTeamPartnerBonusHandler m_FriendBonusHandler = null;
+
+ protected override void Init()
+ {
+ base.Init();
+ this.m_doc.View = this;
+ this.m_emptyGo = base.PanelObject.transform.Find("Bg/Empty").gameObject;
+ this.m_obtainedGo = base.PanelObject.transform.Find("Bg/Obtained").gameObject;
+ this.m_shopBtn = (base.PanelObject.transform.Find("Bg/BtnShop").GetComponent("XUIButton") as IXUIButton);
+ Transform transform = this.m_emptyGo.transform.Find("PartnerPrior/Grid");
+ this.m_emptyItemPool.SetupPool(transform.gameObject, transform.Find("Tpl").gameObject, 3u, false);
+ this.m_gotoBtn = (this.m_emptyGo.transform.Find("ButtonR").GetComponent("XUIButton") as IXUIButton);
+ this.m_gotoTeamBtn = (this.m_emptyGo.transform.Find("GoTeam").GetComponent("XUIButton") as IXUIButton);
+ this.m_noPartnerTips = (this.m_emptyGo.transform.Find("T").GetComponent("XUILabel") as IXUILabel);
+ this.m_ruleLab = (this.m_emptyGo.transform.Find("RuleLab").GetComponent("XUILabel") as IXUILabel);
+ this.m_livenessTra = this.m_obtainedGo.transform.Find("Bar");
+ this.m_livenessBtn = (this.m_obtainedGo.transform.Find("LivenessBtn").GetComponent("XUIButton") as IXUIButton);
+ this.m_breakupBtn = (this.m_obtainedGo.transform.Find("BreakupBtn").GetComponent("XUIButton") as IXUIButton);
+ this.m_cancleBreakUpBtn = (this.m_obtainedGo.transform.Find("CancleBreakupBtn").GetComponent("XUIButton") as IXUIButton);
+ this.m_breakUpCutDownLab = (this.m_obtainedGo.transform.Find("BreakUpCutDownLab").GetComponent("XUILabel") as IXUILabel);
+ transform = this.m_obtainedGo.transform.Find("ModleParent");
+ this.m_itemPool.SetupPool(transform.gameObject, transform.Find("Tpl").gameObject, 4u, false);
+ DlgHandlerBase.EnsureCreate<XTeamPartnerBonusHandler>(ref this.m_FriendBonusHandler, this.m_obtainedGo.transform.Find("FriendBonusFrame").gameObject, this, true);
+ this.m_FriendBonusHandler.bConsiderTeam = false;
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ this.m_shopBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnClickShopBtn));
+ this.m_gotoBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnClickGoToBtn));
+ this.m_gotoTeamBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnClickGoToTeamBtn));
+ this.m_livenessBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnClickLivenessBtn));
+ this.m_breakupBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnClickbreakupBtn));
+ this.m_cancleBreakUpBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnClickCancleBreakupBtn));
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ base.Alloc3DAvatarPool("PartnerMainHandler", 1);
+ this.FillContent();
+ }
+
+ protected override void OnHide()
+ {
+ base.Return3DAvatarPool();
+ base.OnHide();
+ XSingleton<XTimerMgr>.singleton.KillTimer(this.m_token);
+ }
+
+ public override void StackRefresh()
+ {
+ base.StackRefresh();
+ base.Alloc3DAvatarPool("PartnerMainHandler", 1);
+ }
+
+ public override void OnUnload()
+ {
+ base.Return3DAvatarPool();
+ this.m_doc.View = null;
+ base.OnUnload();
+ }
+
+ private void FillContent()
+ {
+ this.m_emptyGo.SetActive(false);
+ this.m_obtainedGo.SetActive(false);
+ this.m_shopBtn.gameObject.SetActive(false);
+ bool flag = this.m_doc.PartnerID == 0UL;
+ if (flag)
+ {
+ this.FillNoPartner();
+ }
+ else
+ {
+ this.m_doc.ReqPartnerDetailInfo();
+ }
+ }
+
+ public void RefreshUi()
+ {
+ this.m_emptyGo.SetActive(false);
+ this.m_obtainedGo.SetActive(false);
+ this.m_shopBtn.gameObject.SetActive(false);
+ bool flag = this.m_doc.PartnerID == 0UL;
+ if (flag)
+ {
+ this.FillNoPartner();
+ }
+ else
+ {
+ this.FillHadPartner();
+ }
+ }
+
+ private void FillNoPartner()
+ {
+ this.m_emptyGo.SetActive(true);
+ this.m_emptyItemPool.ReturnAll(false);
+ for (int i = 0; i < XPartnerDocument.PartnerWelfareTab.Table.Length; i++)
+ {
+ PartnerWelfare.RowData rowData = XPartnerDocument.PartnerWelfareTab.Table[i];
+ bool flag = rowData == null;
+ if (!flag)
+ {
+ GameObject gameObject = this.m_emptyItemPool.FetchGameObject(false);
+ gameObject.SetActive(true);
+ gameObject.transform.localPosition = new Vector3(0f, (float)(-(float)i * this.m_emptyItemPool.TplHeight), 0f);
+ IXUILabel ixuilabel = gameObject.transform.Find("Tip").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel.SetText(XSingleton<UiUtility>.singleton.ReplaceReturn(rowData.ContentTxt));
+ }
+ }
+ this.m_ruleLab.SetText(XSingleton<UiUtility>.singleton.ReplaceReturn(XSingleton<XStringTable>.singleton.GetString("PartnerRule")));
+ this.m_noPartnerTips.SetText(XSingleton<XStringTable>.singleton.GetString("NoPartnerTips"));
+ }
+
+ private void FillHadPartner()
+ {
+ this.m_obtainedGo.SetActive(true);
+ this.m_shopBtn.gameObject.SetActive(true);
+ this.RefreshUIRedPoint();
+ Partner myParnerInfo = this.m_doc.GetMyParnerInfo();
+ XSingleton<XTimerMgr>.singleton.KillTimer(this.m_token);
+ bool flag = myParnerInfo != null;
+ if (flag)
+ {
+ bool is_apply_leave = myParnerInfo.Detail.is_apply_leave;
+ if (is_apply_leave)
+ {
+ this.m_breakUpCutDownLab.gameObject.SetActive(true);
+ this.m_breakUpCutDownLab.SetText(this.GetTimeString((ulong)myParnerInfo.Detail.left_leave_time, XSingleton<XStringTable>.singleton.GetString("BreakPartner")));
+ this.m_breakupBtn.gameObject.SetActive(false);
+ this.m_cancleBreakUpBtn.gameObject.SetActive(true);
+ this.m_token = XSingleton<XTimerMgr>.singleton.SetTimer(5f, new XTimerMgr.ElapsedEventHandler(this.SetTime), myParnerInfo.Detail.left_leave_time);
+ }
+ else
+ {
+ this.m_breakUpCutDownLab.gameObject.SetActive(false);
+ this.m_breakupBtn.gameObject.SetActive(true);
+ this.m_cancleBreakUpBtn.gameObject.SetActive(false);
+ }
+ }
+ IXUISlider ixuislider = this.m_livenessTra.Find("slider").GetComponent("XUISlider") as IXUISlider;
+ IXUILabel ixuilabel = this.m_livenessTra.Find("slider/PLabel").GetComponent("XUILabel") as IXUILabel;
+ float num = (this.m_doc.CurLevelMaxExp == 0f) ? 1u : this.m_doc.CurLevelMaxExp;
+ ixuislider.Value = this.m_doc.Degree / num;
+ ixuilabel.SetText(string.Format("{0}/{1}", this.m_doc.Degree, this.m_doc.CurLevelMaxExp));
+ this.m_FriendBonusHandler.RefreshData();
+ this.m_itemPool.ReturnAll(false);
+ int num2 = 0;
+ foreach (KeyValuePair<ulong, Partner> keyValuePair in this.m_doc.PartnerDic)
+ {
+ GameObject gameObject = this.m_itemPool.FetchGameObject(false);
+ gameObject.SetActive(true);
+ gameObject.transform.localPosition = new Vector3((float)(this.m_itemPool.TplWidth * num2), 0f, 0f);
+ this.FillAvataItem(gameObject, keyValuePair.Value, num2);
+ num2++;
+ }
+ base.Return3DAvatarPool();
+ base.Alloc3DAvatarPool("PartnerMainHandler", 1);
+ int i = this.m_doc.PartnerDic.Count;
+ int num3 = this.m_Snapshots.Length;
+ while (i < num3)
+ {
+ this.m_Snapshots[i] = null;
+ i++;
+ }
+ this.RefreshAvataData();
+ }
+
+ private void FillAvataItem(GameObject go, Partner partner, int count)
+ {
+ bool flag = partner == null || go == null || partner.Detail == null;
+ if (!flag)
+ {
+ IXUISprite ixuisprite = go.transform.Find("ProfIcon").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.SetSprite(XSingleton<XProfessionSkillMgr>.singleton.GetProfIcon((int)((int)partner.Detail.profession % 10)));
+ IXUILabel ixuilabel = go.transform.Find("Name").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel.SetText(partner.Detail.name);
+ ixuilabel = (go.transform.Find("Level").GetComponent("XUILabel") as IXUILabel);
+ ixuilabel.SetText(partner.Detail.level.ToString());
+ ixuilabel = (go.transform.Find("Battlepoint").GetComponent("XUILabel") as IXUILabel);
+ ixuilabel.SetText(partner.Detail.ppt.ToString());
+ bool is_apply_leave = partner.Detail.is_apply_leave;
+ if (is_apply_leave)
+ {
+ go.transform.Find("Breakup").gameObject.SetActive(true);
+ }
+ else
+ {
+ go.transform.Find("Breakup").gameObject.SetActive(false);
+ }
+ ixuisprite = (go.transform.Find("Bg/BgSmall").GetComponent("XUISprite") as IXUISprite);
+ ixuisprite.ID = partner.MemberId;
+ ixuisprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnClickavata));
+ this.m_Snapshots[count] = (go.transform.Find("Snapshot").GetComponent("UIDummy") as IUIDummy);
+ }
+ }
+
+ private void RefreshAvataData()
+ {
+ int num = 0;
+ foreach (KeyValuePair<ulong, Partner> keyValuePair in this.m_doc.PartnerDic)
+ {
+ bool flag = num >= XPartnerDocument.MaxAvata;
+ if (flag)
+ {
+ break;
+ }
+ bool flag2 = this.m_Snapshots[num] != null;
+ if (flag2)
+ {
+ XDummy xdummy = XSingleton<X3DAvatarMgr>.singleton.CreateCommonRoleDummy(this.m_dummPool, keyValuePair.Value.Detail.memberid, (uint)XFastEnumIntEqualityComparer<RoleType>.ToInt(keyValuePair.Value.Detail.profession), keyValuePair.Value.Detail.outlook, this.m_Snapshots[num], null);
+ num++;
+ }
+ }
+ }
+
+ private string GetTimeString(ulong ti, string str)
+ {
+ bool flag = ti < 60UL;
+ string result;
+ if (flag)
+ {
+ string arg = string.Format("{0}{1}", ti, XStringDefineProxy.GetString("SECOND_DUARATION"));
+ result = string.Format(str, arg);
+ }
+ else
+ {
+ ulong num = ti / 60UL;
+ ulong num2 = ti % 60UL;
+ bool flag2 = num < 60UL;
+ string arg;
+ if (flag2)
+ {
+ bool flag3 = num2 > 0UL;
+ if (flag3)
+ {
+ arg = string.Format("{0}{1}{2}{3}", new object[]
+ {
+ num,
+ XStringDefineProxy.GetString("MINUTE_DUARATION"),
+ num2,
+ XStringDefineProxy.GetString("SECOND_DUARATION")
+ });
+ }
+ else
+ {
+ arg = string.Format("{0}{1}", num, XStringDefineProxy.GetString("MINUTE_DUARATION"));
+ }
+ }
+ else
+ {
+ bool flag4 = num2 > 0UL;
+ if (flag4)
+ {
+ num += 1UL;
+ }
+ ulong num3 = num / 60UL;
+ num %= 60UL;
+ bool flag5 = num > 0UL;
+ if (flag5)
+ {
+ arg = string.Format("{0}{1}{2}{3}", new object[]
+ {
+ num3,
+ XStringDefineProxy.GetString("HOUR_DUARATION"),
+ num,
+ XStringDefineProxy.GetString("MINUTE_DUARATION")
+ });
+ }
+ else
+ {
+ arg = string.Format("{0}{1}", num3, XStringDefineProxy.GetString("HOUR_DUARATION"));
+ }
+ }
+ result = string.Format(str, arg);
+ }
+ return result;
+ }
+
+ public void RefreshUIRedPoint()
+ {
+ this.m_shopBtn.gameObject.transform.Find("RedPoint").gameObject.SetActive(this.m_doc.IsHadShopRedPoint);
+ this.m_livenessBtn.gameObject.transform.Find("RedPoint").gameObject.SetActive(this.m_doc.IsHadLivenessRedPoint);
+ }
+
+ public void SetTime(object o = null)
+ {
+ uint num = (uint)o;
+ this.m_breakUpCutDownLab.SetText(this.GetTimeString((ulong)num, XSingleton<XStringTable>.singleton.GetString("BreakPartner")));
+ bool flag = num == 0u;
+ if (flag)
+ {
+ XSingleton<XTimerMgr>.singleton.KillTimer(this.m_token);
+ }
+ num -= 1u;
+ this.m_token = XSingleton<XTimerMgr>.singleton.SetTimer(1f, new XTimerMgr.ElapsedEventHandler(this.SetTime), num);
+ }
+
+ private bool OnClickShopBtn(IXUIButton btn)
+ {
+ bool flag = this.SetButtonCool(this.m_fCoolTime);
+ bool result;
+ if (flag)
+ {
+ result = true;
+ }
+ else
+ {
+ this.m_doc.IsHadShopRedPoint = false;
+ DlgBase<MallSystemDlg, MallSystemBehaviour>.singleton.ShowShopSystem(XSysDefine.XSys_Mall_Partner, 0UL);
+ result = true;
+ }
+ return result;
+ }
+
+ private bool OnClickGoToBtn(IXUIButton btn)
+ {
+ bool flag = this.SetButtonCool(this.m_fCoolTime);
+ bool result;
+ if (flag)
+ {
+ result = true;
+ }
+ else
+ {
+ XSingleton<UIManager>.singleton.CloseAllUI();
+ uint num = 0u;
+ XNpcInfo npcInfo = XSingleton<XEntityMgr>.singleton.NpcInfo;
+ for (int i = 0; i < npcInfo.Table.Length; i++)
+ {
+ bool flag2 = npcInfo.Table[i].LinkSystem == 700;
+ if (flag2)
+ {
+ num = npcInfo.Table[i].ID;
+ break;
+ }
+ }
+ bool flag3 = num == 0u;
+ if (flag3)
+ {
+ XSingleton<XDebug>.singleton.AddErrorLog("had not find partner npc", null, null, null, null, null);
+ result = true;
+ }
+ else
+ {
+ XSingleton<XInput>.singleton.LastNpc = XSingleton<XEntityMgr>.singleton.GetNpc(num);
+ result = true;
+ }
+ }
+ return result;
+ }
+
+ private bool OnClickGoToTeamBtn(IXUIButton btn)
+ {
+ bool flag = this.SetButtonCool(this.m_fCoolTime);
+ bool result;
+ if (flag)
+ {
+ result = true;
+ }
+ else
+ {
+ XExpeditionDocument specificDocument = XDocuments.GetSpecificDocument<XExpeditionDocument>(XExpeditionDocument.uuID);
+ List<ExpeditionTable.RowData> expeditionList = specificDocument.GetExpeditionList(TeamLevelType.TeamLevelPartner);
+ bool flag2 = expeditionList != null && expeditionList.Count > 0;
+ if (flag2)
+ {
+ XTeamDocument specificDocument2 = XDocuments.GetSpecificDocument<XTeamDocument>(XTeamDocument.uuID);
+ specificDocument2.SetAndMatch(expeditionList[0].DNExpeditionID);
+ }
+ result = true;
+ }
+ return result;
+ }
+
+ private bool OnClickLivenessBtn(IXUIButton btn)
+ {
+ bool flag = this.SetButtonCool(this.m_fCoolTime);
+ bool result;
+ if (flag)
+ {
+ result = true;
+ }
+ else
+ {
+ DlgBase<PartnerLivenessDlg, PartnerLivenessBehaviour>.singleton.SetVisible(true, true);
+ result = true;
+ }
+ return result;
+ }
+
+ private bool OnClickbreakupBtn(IXUIButton btn)
+ {
+ bool flag = this.SetButtonCool(this.m_fCoolTime);
+ bool result;
+ if (flag)
+ {
+ result = true;
+ }
+ else
+ {
+ Partner myParnerInfo = this.m_doc.GetMyParnerInfo();
+ bool flag2 = myParnerInfo == null;
+ if (flag2)
+ {
+ result = true;
+ }
+ else
+ {
+ bool is_apply_leave = myParnerInfo.Detail.is_apply_leave;
+ if (is_apply_leave)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString("IsLeavingPartner"), "fece00");
+ result = true;
+ }
+ else
+ {
+ XSingleton<UiUtility>.singleton.ShowModalDialog(XStringDefineProxy.GetString("SureBreakUpPartner"), XStringDefineProxy.GetString("COMMON_OK"), XStringDefineProxy.GetString("COMMON_CANCEL"), new ButtonClickEventHandler(this.BreakUp));
+ result = true;
+ }
+ }
+ }
+ return result;
+ }
+
+ private bool BreakUp(IXUIButton btn)
+ {
+ this.m_doc.ReqLeavePartner();
+ XSingleton<UiUtility>.singleton.CloseModalDlg();
+ return true;
+ }
+
+ private bool OnClickCancleBreakupBtn(IXUIButton btn)
+ {
+ bool flag = this.SetButtonCool(this.m_fCoolTime);
+ bool result;
+ if (flag)
+ {
+ result = true;
+ }
+ else
+ {
+ Partner myParnerInfo = this.m_doc.GetMyParnerInfo();
+ bool flag2 = myParnerInfo == null;
+ if (flag2)
+ {
+ result = true;
+ }
+ else
+ {
+ bool flag3 = !myParnerInfo.Detail.is_apply_leave;
+ if (flag3)
+ {
+ result = true;
+ }
+ else
+ {
+ this.m_doc.ReqCancleLeavePartner();
+ result = true;
+ }
+ }
+ }
+ return result;
+ }
+
+ private void OnClickavata(IXUISprite sp)
+ {
+ bool flag = sp == null;
+ if (!flag)
+ {
+ ulong id = sp.ID;
+ XCharacterCommonMenuDocument.ReqCharacterMenuInfo(id, false);
+ }
+ }
+
+ private bool SetButtonCool(float time)
+ {
+ float num = Time.realtimeSinceStartup - this.m_fLastClickBtnTime;
+ bool flag = num < time;
+ bool result;
+ if (flag)
+ {
+ result = true;
+ }
+ else
+ {
+ this.m_fLastClickBtnTime = Time.realtimeSinceStartup;
+ result = false;
+ }
+ return result;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/PartnerMainHandler.cs.meta b/Client/Assets/Scripts/XMainClient/UI/PartnerMainHandler.cs.meta
new file mode 100644
index 00000000..c64e6e96
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/PartnerMainHandler.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 3e5e825e0d03fc34ea8577194f36f18a
+timeCreated: 1611403607
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/PartnerShopRecordsHandler.cs b/Client/Assets/Scripts/XMainClient/UI/PartnerShopRecordsHandler.cs
new file mode 100644
index 00000000..bff5f648
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/PartnerShopRecordsHandler.cs
@@ -0,0 +1,147 @@
+using System;
+using UILib;
+using UnityEngine;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class PartnerShopRecordsHandler : DlgHandlerBase
+ {
+ private XPartnerDocument m_doc
+ {
+ get
+ {
+ return XPartnerDocument.Doc;
+ }
+ }
+
+ protected override string FileName
+ {
+ get
+ {
+ return "Partner/PartnerShopRecords";
+ }
+ }
+
+ private IXUIButton m_closeBtn;
+
+ private IXUIWrapContent m_wrapContent;
+
+ private GameObject m_tipsGo;
+
+ protected override void Init()
+ {
+ base.Init();
+ this.m_doc.ShopRecordsHandler = this;
+ this.m_closeBtn = (base.PanelObject.transform.Find("Close").GetComponent("XUIButton") as IXUIButton);
+ Transform transform = base.PanelObject.transform.Find("Panel");
+ this.m_wrapContent = (transform.Find("Wrap").GetComponent("XUIWrapContent") as IXUIWrapContent);
+ this.m_tipsGo = base.PanelObject.transform.Find("Tips").gameObject;
+ this.m_wrapContent.RegisterItemUpdateEventHandler(new WrapItemUpdateEventHandler(this.WrapContentItemUpdated));
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ this.m_closeBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnClosedClicked));
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ this.FillDefault();
+ this.m_doc.ReqShopRecords();
+ }
+
+ protected override void OnHide()
+ {
+ base.OnHide();
+ }
+
+ public override void StackRefresh()
+ {
+ base.StackRefresh();
+ }
+
+ public override void OnUnload()
+ {
+ this.m_doc.ShopRecordsHandler = null;
+ base.OnUnload();
+ }
+
+ private void FillDefault()
+ {
+ this.m_tipsGo.SetActive(true);
+ this.m_wrapContent.gameObject.SetActive(false);
+ }
+
+ public void FillContent()
+ {
+ bool flag = this.m_doc.ShopRecordList == null;
+ if (flag)
+ {
+ XSingleton<XDebug>.singleton.AddGreenLog("ShopRecordList is null", null, null, null, null, null);
+ }
+ else
+ {
+ bool flag2 = this.m_doc.ShopRecordList.Count == 0;
+ if (flag2)
+ {
+ this.m_tipsGo.SetActive(true);
+ this.m_wrapContent.gameObject.SetActive(false);
+ }
+ else
+ {
+ this.m_tipsGo.SetActive(false);
+ this.m_wrapContent.gameObject.SetActive(true);
+ int count = this.m_doc.ShopRecordList.Count;
+ this.m_wrapContent.SetContentCount(count, false);
+ }
+ }
+ }
+
+ private void WrapContentItemUpdated(Transform t, int index)
+ {
+ bool flag = index >= this.m_doc.ShopRecordList.Count;
+ if (flag)
+ {
+ XSingleton<XDebug>.singleton.AddErrorLog("index >= ShopRecordList.Count", null, null, null, null, null);
+ }
+ else
+ {
+ partnerShopRecord partnerShopRecord = this.m_doc.ShopRecordList[index];
+ IXUILabel ixuilabel = t.Find("Time").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel.SetText(partnerShopRecord.TimeStr.Replace("/n", "\n"));
+ ixuilabel = (t.Find("ItemName").GetComponent("XUILabel") as IXUILabel);
+ ixuilabel.SetText(partnerShopRecord.ItemName);
+ ixuilabel = (t.Find("ItemNum").GetComponent("XUILabel") as IXUILabel);
+ ixuilabel.SetText(partnerShopRecord.BuyCount.ToString());
+ IXUILabelSymbol ixuilabelSymbol = t.Find("PlayerName").GetComponent("XUILabelSymbol") as IXUILabelSymbol;
+ ixuilabelSymbol.InputText = partnerShopRecord.PlayerName;
+ ixuilabelSymbol.ID = (ulong)((long)index);
+ ixuilabelSymbol.RegisterSymbolClickHandler(new LabelSymbolClickEventHandler(this.OnClickName));
+ }
+ }
+
+ private bool OnClosedClicked(IXUIButton sp)
+ {
+ base.SetVisible(false);
+ return true;
+ }
+
+ private void OnClickName(IXUILabelSymbol iSp)
+ {
+ bool flag = this.m_doc.ShopRecordList == null;
+ if (!flag)
+ {
+ int index = (int)iSp.ID / 100;
+ partnerShopRecord partnerShopRecord = this.m_doc.ShopRecordList[index];
+ bool flag2 = partnerShopRecord == null;
+ if (!flag2)
+ {
+ XCharacterCommonMenuDocument.ReqCharacterMenuInfo(partnerShopRecord.RoleId, false);
+ }
+ }
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/PartnerShopRecordsHandler.cs.meta b/Client/Assets/Scripts/XMainClient/UI/PartnerShopRecordsHandler.cs.meta
new file mode 100644
index 00000000..ee3dd8df
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/PartnerShopRecordsHandler.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 65fe1a01f09d2d24582fba5c705a9530
+timeCreated: 1611403852
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/PressTipsBehaviour.cs b/Client/Assets/Scripts/XMainClient/UI/PressTipsBehaviour.cs
new file mode 100644
index 00000000..09326afa
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/PressTipsBehaviour.cs
@@ -0,0 +1,20 @@
+using System;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+
+namespace XMainClient.UI
+{
+ internal class PressTipsBehaviour : DlgBehaviourBase
+ {
+ public IXUILabel _ContentValue;
+
+ public Transform _ContentTransform;
+
+ private void Awake()
+ {
+ this._ContentTransform = base.transform.Find("Info");
+ this._ContentValue = (this._ContentTransform.GetComponent("XUILabel") as IXUILabel);
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/PressTipsBehaviour.cs.meta b/Client/Assets/Scripts/XMainClient/UI/PressTipsBehaviour.cs.meta
new file mode 100644
index 00000000..f9c8bc99
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/PressTipsBehaviour.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 82f56d1ccc2578e4bb26886092cd7b69
+timeCreated: 1611404042
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/PressTipsDlg.cs b/Client/Assets/Scripts/XMainClient/UI/PressTipsDlg.cs
new file mode 100644
index 00000000..af9a5581
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/PressTipsDlg.cs
@@ -0,0 +1,90 @@
+using System;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class PressTipsDlg : DlgBase<PressTipsDlg, PressTipsBehaviour>
+ {
+ public override string fileName
+ {
+ get
+ {
+ return "Common/PressTipDlg";
+ }
+ }
+
+ public override bool isHideChat
+ {
+ get
+ {
+ return false;
+ }
+ }
+
+ private string _contentKey;
+
+ private Vector3 _offset;
+
+ private Vector3 _pos;
+
+ public void Setup(bool show, string key, Vector3 pos, Vector3 offset)
+ {
+ if (show)
+ {
+ this._contentKey = key;
+ this._offset = offset;
+ this._pos = pos;
+ bool flag = !base.IsVisible();
+ if (flag)
+ {
+ this._Show();
+ }
+ else
+ {
+ this.RefreshData();
+ }
+ }
+ else
+ {
+ bool flag2 = base.IsVisible();
+ if (flag2)
+ {
+ this._Close();
+ }
+ }
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ this.RefreshData();
+ }
+
+ private void RefreshData()
+ {
+ bool flag = string.IsNullOrEmpty(this._contentKey);
+ if (flag)
+ {
+ this._Close();
+ }
+ else
+ {
+ base.uiBehaviour.transform.position = this._pos;
+ base.uiBehaviour.transform.localPosition += this._offset;
+ base.uiBehaviour._ContentValue.SetText(XSingleton<UiUtility>.singleton.ReplaceReturn(XStringDefineProxy.GetString(this._contentKey)));
+ }
+ }
+
+ private void _Close()
+ {
+ this.SetVisibleWithAnimation(false, null);
+ }
+
+ private void _Show()
+ {
+ this.SetVisibleWithAnimation(true, null);
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/PressTipsDlg.cs.meta b/Client/Assets/Scripts/XMainClient/UI/PressTipsDlg.cs.meta
new file mode 100644
index 00000000..cc0dcc82
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/PressTipsDlg.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 6b60c11e9f129f8449972ccd3786f88e
+timeCreated: 1611403891
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/ProfessionChangeDlg.cs b/Client/Assets/Scripts/XMainClient/UI/ProfessionChangeDlg.cs
new file mode 100644
index 00000000..1ffc131a
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/ProfessionChangeDlg.cs
@@ -0,0 +1,304 @@
+using System;
+using KKSG;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class ProfessionChangeDlg : DlgBase<ProfessionChangeDlg, ProfessionChangeBehaviour>
+ {
+ public override bool autoload
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override bool pushstack
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override bool hideMainMenu
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override bool fullscreenui
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override int group
+ {
+ get
+ {
+ return 1;
+ }
+ }
+
+ public override string fileName
+ {
+ get
+ {
+ return "GameSystem/ProfessionChangeDlg";
+ }
+ }
+
+ public override int sysid
+ {
+ get
+ {
+ return XFastEnumIntEqualityComparer<XSysDefine>.ToInt(XSysDefine.XSys_ProfessionChange);
+ }
+ }
+
+ private XProfessionChangeDocument _doc = null;
+
+ private readonly string TEXPATH = "atlas/UI/common/ProfPic";
+
+ private string _texPath = "";
+
+ private bool _init;
+
+ protected override void Init()
+ {
+ base.Init();
+ this._doc = XDocuments.GetSpecificDocument<XProfessionChangeDocument>(XProfessionChangeDocument.uuID);
+ base.uiBehaviour.m_TipsWindow.SetActive(false);
+ this.SetupTabs();
+ this._init = true;
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ base.uiBehaviour.m_Close.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnCloseBtnClick));
+ base.uiBehaviour.m_TipsClose.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnTipsWindowCloseBtnClick));
+ base.uiBehaviour.m_ChangeProfBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnChangeProfBtnClick));
+ base.uiBehaviour.m_TryProfBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnExperienceBtnClick));
+ base.uiBehaviour.m_GetPathBtn.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnGetPathBtnClick));
+ base.uiBehaviour.m_OKBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnSureChangeProfBtnClick));
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ bool init = this._init;
+ if (init)
+ {
+ this._init = false;
+ }
+ else
+ {
+ base.uiBehaviour.m_Texture.SetTexturePath(this._texPath);
+ }
+ bool flag = XSingleton<XAttributeMgr>.singleton.XPlayerData != null;
+ if (flag)
+ {
+ int num = this._doc.LastExperienceProfID;
+ int num2 = (int)(XSingleton<XAttributeMgr>.singleton.XPlayerData.TypeID % 10u);
+ bool flag2 = num2 < this._doc.LastExperienceProfID;
+ if (flag2)
+ {
+ num--;
+ }
+ for (int i = XGame.RoleCount - 2; i >= 0; i--)
+ {
+ Transform transform = base.uiBehaviour.transform.Find(string.Format("Bg/Tabs/item{0}", i));
+ bool flag3 = transform != null;
+ if (flag3)
+ {
+ IXUICheckBox ixuicheckBox = transform.GetComponent("XUICheckBox") as IXUICheckBox;
+ bool flag4 = ixuicheckBox != null;
+ if (flag4)
+ {
+ ixuicheckBox.bChecked = (i == num - 1);
+ }
+ }
+ }
+ this._doc.LastExperienceProfID = 1;
+ }
+ }
+
+ protected override void OnHide()
+ {
+ base.uiBehaviour.m_Texture.SetTexturePath("");
+ base.OnHide();
+ }
+
+ public override void StackRefresh()
+ {
+ base.StackRefresh();
+ }
+
+ public override void LeaveStackTop()
+ {
+ base.LeaveStackTop();
+ }
+
+ protected override void OnUnload()
+ {
+ base.OnUnload();
+ }
+
+ private void SetupTabs()
+ {
+ base.uiBehaviour.m_TabPool.ReturnAll(false);
+ int num = (int)(XSingleton<XAttributeMgr>.singleton.XPlayerData.TypeID % 10u);
+ Vector3 tplPos = base.uiBehaviour.m_TabPool.TplPos;
+ IXUICheckBox ixuicheckBox = null;
+ int num2 = 0;
+ for (int i = 0; i < XGame.RoleCount; i++)
+ {
+ bool flag = i + 1 == num;
+ if (!flag)
+ {
+ GameObject gameObject = base.uiBehaviour.m_TabPool.FetchGameObject(false);
+ gameObject.transform.localPosition = new Vector3(tplPos.x, tplPos.y - (float)(num2 * base.uiBehaviour.m_TabPool.TplHeight));
+ num2++;
+ IXUICheckBox ixuicheckBox2 = gameObject.GetComponent("XUICheckBox") as IXUICheckBox;
+ ixuicheckBox2.ID = (ulong)((long)i + 1L);
+ ixuicheckBox2.RegisterOnCheckEventHandler(new CheckBoxOnCheckEventHandler(this.OnTabClick));
+ bool flag2 = ixuicheckBox == null;
+ if (flag2)
+ {
+ ixuicheckBox = ixuicheckBox2;
+ }
+ IXUILabel ixuilabel = gameObject.transform.Find("TextLabel").GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel2 = gameObject.transform.Find("SelectedTextLabel").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel.SetText(XSingleton<XProfessionSkillMgr>.singleton.GetProfName(i + 1));
+ ixuilabel2.SetText(XSingleton<XProfessionSkillMgr>.singleton.GetProfName(i + 1));
+ }
+ }
+ ixuicheckBox.bChecked = true;
+ }
+
+ private bool OnCloseBtnClick(IXUIButton btn)
+ {
+ this.SetVisibleWithAnimation(false, null);
+ return true;
+ }
+
+ private bool OnTipsWindowCloseBtnClick(IXUIButton btn)
+ {
+ base.uiBehaviour.m_TipsWindow.SetActive(false);
+ return true;
+ }
+
+ private bool OnExperienceBtnClick(IXUIButton btn)
+ {
+ string label = string.Format(XSingleton<UiUtility>.singleton.ReplaceReturn(XStringDefineProxy.GetString("ProfessionChangeExperience")), XSingleton<XProfessionSkillMgr>.singleton.GetProfName(this._doc.SelectProfession));
+ string @string = XStringDefineProxy.GetString("COMMON_OK");
+ string string2 = XStringDefineProxy.GetString("COMMON_CANCEL");
+ XSingleton<UiUtility>.singleton.ShowModalDialog(label, @string, string2, new ButtonClickEventHandler(this.OnExperienceSure));
+ return true;
+ }
+
+ private bool OnExperienceSure(IXUIButton btn)
+ {
+ DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.SetVisible(false, true);
+ PtcC2G_EnterSceneReq ptcC2G_EnterSceneReq = new PtcC2G_EnterSceneReq();
+ ptcC2G_EnterSceneReq.Data.sceneID = this._doc.SceneID;
+ XSingleton<XClientNetwork>.singleton.Send(ptcC2G_EnterSceneReq);
+ return true;
+ }
+
+ private bool OnChangeProfBtnClick(IXUIButton btn)
+ {
+ base.uiBehaviour.m_TipsWindow.SetActive(true);
+ string @string = XStringDefineProxy.GetString(string.Format("ProfessionChangeType{0}", this._doc.SelectProfession));
+ base.uiBehaviour.m_TipsType.SetText(string.Format(XStringDefineProxy.GetString("ProfessionChangeTips"), @string));
+ base.uiBehaviour.m_TipsDesc.SetText(XSingleton<UiUtility>.singleton.ReplaceReturn(XStringDefineProxy.GetString("ProfessionChangeDesc")));
+ SeqList<int> sequenceList = XSingleton<XGlobalConfig>.singleton.GetSequenceList("ProfessionChangeUseItem", true);
+ int num = (int)XBagDocument.BagDoc.GetItemCount(sequenceList[0, 0]);
+ base.uiBehaviour.m_TipsUse.SetText(string.Format("{0}{1}[-]/{2}", num, (num < sequenceList[0, 1]) ? "[ff3e3e]" : "[ffffff]", sequenceList[0, 1]));
+ base.uiBehaviour.m_GetPathBtn.ID = (ulong)((long)sequenceList[0, 0]);
+ return true;
+ }
+
+ private void OnGetPathBtnClick(IXUISprite btn)
+ {
+ XSingleton<UiUtility>.singleton.ShowItemAccess((int)btn.ID, null);
+ }
+
+ private bool OnSureChangeProfBtnClick(IXUIButton btn)
+ {
+ base.uiBehaviour.m_TipsWindow.SetActive(false);
+ for (int i = 0; i < XSingleton<XAttributeMgr>.singleton.XPlayerCharacters.PlayerBriefInfo.Count; i++)
+ {
+ RoleBriefInfo roleBriefInfo = XSingleton<XAttributeMgr>.singleton.XPlayerCharacters.PlayerBriefInfo[i];
+ bool flag = roleBriefInfo == null;
+ if (!flag)
+ {
+ bool flag2 = XFastEnumIntEqualityComparer<RoleType>.ToInt(roleBriefInfo.type) % 10 == this._doc.SelectProfession;
+ if (flag2)
+ {
+ string format = XSingleton<UiUtility>.singleton.ReplaceReturn(XStringDefineProxy.GetString("ProfessionChangeCoverTips"));
+ string label = string.Format(format, roleBriefInfo.level, XSingleton<XProfessionSkillMgr>.singleton.GetProfName(XFastEnumIntEqualityComparer<RoleType>.ToInt(roleBriefInfo.type)), roleBriefInfo.name);
+ string @string = XStringDefineProxy.GetString("COMMON_OK");
+ string string2 = XStringDefineProxy.GetString("COMMON_CANCEL");
+ XSingleton<UiUtility>.singleton.ShowModalDialog(label, @string, string2, new ButtonClickEventHandler(this.OnSureCoverBtnClick));
+ return true;
+ }
+ }
+ }
+ this._doc.QueryChangeProfession();
+ return true;
+ }
+
+ private bool OnSureCoverBtnClick(IXUIButton btn)
+ {
+ DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.SetVisible(false, true);
+ this._doc.QueryChangeProfession();
+ return true;
+ }
+
+ private bool OnTabClick(IXUICheckBox icb)
+ {
+ bool flag = !icb.bChecked;
+ bool result;
+ if (flag)
+ {
+ result = false;
+ }
+ else
+ {
+ int profID = (int)icb.ID;
+ this._doc.SelectProfession = (int)icb.ID;
+ XSingleton<XDebug>.singleton.AddGreenLog("current select profession = ", this._doc.SelectProfession.ToString(), null, null, null, null);
+ base.uiBehaviour.m_ProfName.SetText(XSingleton<XProfessionSkillMgr>.singleton.GetProfName(profID));
+ base.uiBehaviour.m_ProfIcon.spriteName = XSingleton<XProfessionSkillMgr>.singleton.GetProfIcon(profID);
+ base.uiBehaviour.m_Desc.SetText(XSingleton<UiUtility>.singleton.ReplaceReturn(XSingleton<XProfessionSkillMgr>.singleton.GetProfDesc(profID)));
+ base.uiBehaviour.m_TextScrollView.SetPosition(0f);
+ base.uiBehaviour.m_StarPool.ReturnAll(false);
+ uint profOperateLevel = XSingleton<XProfessionSkillMgr>.singleton.GetProfOperateLevel(profID);
+ Vector3 tplPos = base.uiBehaviour.m_StarPool.TplPos;
+ int num = 0;
+ while ((long)num < (long)((ulong)profOperateLevel))
+ {
+ GameObject gameObject = base.uiBehaviour.m_StarPool.FetchGameObject(false);
+ gameObject.transform.localPosition = new Vector3(tplPos.x + (float)(num * base.uiBehaviour.m_StarPool.TplWidth), tplPos.y);
+ num++;
+ }
+ string profPic = XSingleton<XProfessionSkillMgr>.singleton.GetProfPic(profID);
+ this._texPath = string.Format("{0}/{1}", this.TEXPATH, profPic);
+ base.uiBehaviour.m_Texture.SetTexturePath(this._texPath);
+ result = true;
+ }
+ return result;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/ProfessionChangeDlg.cs.meta b/Client/Assets/Scripts/XMainClient/UI/ProfessionChangeDlg.cs.meta
new file mode 100644
index 00000000..0cc69750
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/ProfessionChangeDlg.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 0a71fd509549ec147a6e6241070960bb
+timeCreated: 1611403163
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/ProfressionTrialsHandler.cs b/Client/Assets/Scripts/XMainClient/UI/ProfressionTrialsHandler.cs
new file mode 100644
index 00000000..e3043286
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/ProfressionTrialsHandler.cs
@@ -0,0 +1,246 @@
+using System;
+using System.Collections.Generic;
+using UILib;
+using UnityEngine;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class ProfressionTrialsHandler : DlgHandlerBase
+ {
+ protected override string FileName
+ {
+ get
+ {
+ return "Battle/ProfTrialsDlg";
+ }
+ }
+
+ private List<int> _pro = new List<int>();
+
+ private int[] MI = new int[]
+ {
+ 1,
+ 10,
+ 100,
+ 1000,
+ 10000
+ };
+
+ private static readonly bool IsShowAvengerProf = false;
+
+ private List<GameObject> _FxList = new List<GameObject>();
+
+ private List<GameObject> _ClickTips = new List<GameObject>();
+
+ private IXUICheckBox m_GeneralTab;
+
+ protected override void Init()
+ {
+ base.Init();
+ this.GetProfressional();
+ this._FxList.Clear();
+ this._ClickTips.Clear();
+ Transform transform = base.PanelObject.transform.Find("Bg/Tabs/Tab1");
+ bool flag = this._pro.Count > 0;
+ if (flag)
+ {
+ this.SetProSelect(transform, 0);
+ }
+ transform = base.PanelObject.transform.Find("Bg/Tabs/Tab2");
+ bool flag2 = this._pro.Count > 1;
+ if (flag2)
+ {
+ transform.gameObject.SetActive(true);
+ this.SetProSelect(transform, 1);
+ }
+ else
+ {
+ transform.gameObject.SetActive(false);
+ }
+ transform = base.PanelObject.transform.Find("Bg/Tabs/Tab3");
+ bool flag3 = this._pro.Count > 2;
+ if (flag3)
+ {
+ transform.gameObject.SetActive(true);
+ this.SetProSelect(transform, 2);
+ }
+ else
+ {
+ transform.gameObject.SetActive(false);
+ }
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ }
+
+ public override void OnUnload()
+ {
+ base.OnUnload();
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ }
+
+ private void GetProfressional()
+ {
+ XProfessionChangeDocument specificDocument = XDocuments.GetSpecificDocument<XProfessionChangeDocument>(XProfessionChangeDocument.uuID);
+ bool flag = XSingleton<XScene>.singleton.SceneID != specificDocument.SceneID;
+ if (flag)
+ {
+ List<int> intList = XSingleton<XGlobalConfig>.singleton.GetIntList("ChangeProTaskIds");
+ int num = 0;
+ XTaskDocument specificDocument2 = XDocuments.GetSpecificDocument<XTaskDocument>(XTaskDocument.uuID);
+ for (int i = 0; i < intList.Count; i++)
+ {
+ bool flag2 = !specificDocument2.TaskRecord.IsTaskFinished((uint)intList[i]);
+ if (flag2)
+ {
+ num = i + 1;
+ break;
+ }
+ }
+ bool flag3 = num == 0;
+ if (flag3)
+ {
+ XSingleton<XDebug>.singleton.AddErrorLog("Profression trials task error. promote = 0", null, null, null, null, null);
+ }
+ int typeID = (int)XSingleton<XAttributeMgr>.singleton.XPlayerData.TypeID;
+ int num2 = typeID + this.MI[num];
+ int num3 = typeID + this.MI[num] * 2;
+ int num4 = typeID + this.MI[num] * 3;
+ this._pro.Clear();
+ bool flag4 = XSingleton<XProfessionSkillMgr>.singleton.IsExistProf(num2);
+ bool flag5 = XSingleton<XProfessionSkillMgr>.singleton.IsExistProf(num3);
+ bool flag6 = XSingleton<XProfessionSkillMgr>.singleton.IsExistProf(num4) && ProfressionTrialsHandler.IsShowAvengerProf;
+ bool profIsInLeft = XSingleton<XProfessionSkillMgr>.singleton.GetProfIsInLeft(num2);
+ if (profIsInLeft)
+ {
+ bool flag7 = flag4;
+ if (flag7)
+ {
+ this._pro.Add(num2);
+ }
+ bool flag8 = flag5;
+ if (flag8)
+ {
+ this._pro.Add(num3);
+ }
+ }
+ else
+ {
+ bool flag9 = flag5;
+ if (flag9)
+ {
+ this._pro.Add(num3);
+ }
+ bool flag10 = flag4;
+ if (flag10)
+ {
+ this._pro.Add(num2);
+ }
+ }
+ bool flag11 = flag6;
+ if (flag11)
+ {
+ flag6 = XSkillTreeDocument.IsAvengerTaskDone(num4);
+ bool flag12 = flag6;
+ if (flag12)
+ {
+ this._pro.Add(num4);
+ }
+ }
+ }
+ else
+ {
+ int selectProfession = specificDocument.SelectProfession;
+ int num5 = selectProfession + 10;
+ int item = selectProfession + 20;
+ int num6 = selectProfession + 30;
+ this._pro.Clear();
+ bool profIsInLeft2 = XSingleton<XProfessionSkillMgr>.singleton.GetProfIsInLeft(num5);
+ if (profIsInLeft2)
+ {
+ this._pro.Add(num5);
+ this._pro.Add(item);
+ }
+ else
+ {
+ this._pro.Add(item);
+ this._pro.Add(num5);
+ }
+ bool flag13 = XSingleton<XProfessionSkillMgr>.singleton.IsExistProf(num6) && ProfressionTrialsHandler.IsShowAvengerProf;
+ bool flag14 = flag13;
+ if (flag14)
+ {
+ flag13 = XSkillTreeDocument.IsAvengerTaskDone(num6);
+ bool flag15 = flag13;
+ if (flag15)
+ {
+ this._pro.Add(num6);
+ }
+ }
+ }
+ }
+
+ private void SetProSelect(Transform ts, int i)
+ {
+ IXUICheckBox ixuicheckBox = ts.GetComponent("XUICheckBox") as IXUICheckBox;
+ ixuicheckBox.ID = (ulong)((long)i);
+ ixuicheckBox.RegisterOnCheckEventHandler(new CheckBoxOnCheckEventHandler(this.OnCheckBoxClick));
+ bool flag = i == 0;
+ if (flag)
+ {
+ this.m_GeneralTab = ixuicheckBox;
+ }
+ GameObject gameObject = ts.Find("Selected/FX").gameObject;
+ this._FxList.Add(gameObject);
+ GameObject gameObject2 = ts.Find("ClickText").gameObject;
+ this._ClickTips.Add(gameObject2);
+ IXUISprite ixuisprite = ts.Find("Icon").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.spriteName = XSingleton<XProfessionSkillMgr>.singleton.GetProfIcon(this._pro[i]);
+ IXUILabel ixuilabel = ts.Find("ProName").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel.SetText(XSingleton<XProfessionSkillMgr>.singleton.GetProfName(this._pro[i]));
+ }
+
+ private bool OnCheckBoxClick(IXUICheckBox icb)
+ {
+ bool flag = !icb.bChecked;
+ bool result;
+ if (flag)
+ {
+ result = false;
+ }
+ else
+ {
+ int num = (int)icb.ID;
+ for (int i = 0; i < this._FxList.Count; i++)
+ {
+ this._FxList[i].SetActive(i == num);
+ }
+ for (int i = 0; i < this._ClickTips.Count; i++)
+ {
+ this._ClickTips[i].SetActive(i != num);
+ }
+ uint promoteExperienceID = XSingleton<XProfessionSkillMgr>.singleton.GetPromoteExperienceID(this._pro[num]);
+ XSingleton<XDebug>.singleton.AddLog("Change PromoteExperienceID to ", promoteExperienceID.ToString(), null, null, null, null, XDebugColor.XDebug_None);
+ XSingleton<XEntityMgr>.singleton.Player.OnTransform(promoteExperienceID);
+ result = true;
+ }
+ return result;
+ }
+
+ public void SetGeneralTab()
+ {
+ bool flag = this.m_GeneralTab != null;
+ if (flag)
+ {
+ this.m_GeneralTab.bChecked = true;
+ }
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/ProfressionTrialsHandler.cs.meta b/Client/Assets/Scripts/XMainClient/UI/ProfressionTrialsHandler.cs.meta
new file mode 100644
index 00000000..7483b7f0
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/ProfressionTrialsHandler.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: f43849e9af70e75458baa66c2d074a7e
+timeCreated: 1611404852
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/QAAudioPriority.cs b/Client/Assets/Scripts/XMainClient/UI/QAAudioPriority.cs
new file mode 100644
index 00000000..dd16af2a
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/QAAudioPriority.cs
@@ -0,0 +1,11 @@
+using System;
+
+namespace XMainClient.UI
+{
+ public enum QAAudioPriority
+ {
+ BEFORE,
+ URGEN,
+ AFTER
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/QAAudioPriority.cs.meta b/Client/Assets/Scripts/XMainClient/UI/QAAudioPriority.cs.meta
new file mode 100644
index 00000000..93d4ac9a
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/QAAudioPriority.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 3bb544102aa0ae8428256e465f3c8972
+timeCreated: 1611403600
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/QteUIType.cs b/Client/Assets/Scripts/XMainClient/UI/QteUIType.cs
new file mode 100644
index 00000000..3209e54f
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/QteUIType.cs
@@ -0,0 +1,11 @@
+using System;
+
+namespace XMainClient.UI
+{
+ internal enum QteUIType
+ {
+ Bind,
+ Abnormal,
+ Charge
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/QteUIType.cs.meta b/Client/Assets/Scripts/XMainClient/UI/QteUIType.cs.meta
new file mode 100644
index 00000000..a2ca902d
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/QteUIType.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: b45b8875bd5b8604aaa51c7534ad2656
+timeCreated: 1611404392
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/QualityFilterCallback.cs b/Client/Assets/Scripts/XMainClient/UI/QualityFilterCallback.cs
new file mode 100644
index 00000000..2fbec332
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/QualityFilterCallback.cs
@@ -0,0 +1,6 @@
+using System;
+
+namespace XMainClient.UI
+{
+ internal delegate void QualityFilterCallback(int mask);
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/QualityFilterCallback.cs.meta b/Client/Assets/Scripts/XMainClient/UI/QualityFilterCallback.cs.meta
new file mode 100644
index 00000000..790d874b
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/QualityFilterCallback.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 66af005b2d04a384ab44d244f4577e38
+timeCreated: 1611403855
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/QualityFilterHandler.cs b/Client/Assets/Scripts/XMainClient/UI/QualityFilterHandler.cs
new file mode 100644
index 00000000..904a9caa
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/QualityFilterHandler.cs
@@ -0,0 +1,94 @@
+using System;
+using UILib;
+
+namespace XMainClient.UI
+{
+ internal class QualityFilterHandler : DlgHandlerBase
+ {
+ private static readonly int QualityCount = 6;
+
+ private IXUICheckBox[] m_Opt = new IXUICheckBox[QualityFilterHandler.QualityCount];
+
+ private IXUIButton m_OK;
+
+ private IXUIButton m_Cancel;
+
+ private QualityFilterCallback m_Callback;
+
+ private int m_Mask;
+
+ protected override void Init()
+ {
+ base.Init();
+ this.m_OK = (base.PanelObject.transform.Find("Menu/OK").GetComponent("XUIButton") as IXUIButton);
+ this.m_Cancel = (base.PanelObject.transform.Find("Menu/Cancel").GetComponent("XUIButton") as IXUIButton);
+ this.m_Opt[0] = (base.PanelObject.transform.Find("Menu/C").GetComponent("XUICheckBox") as IXUICheckBox);
+ this.m_Opt[1] = (base.PanelObject.transform.Find("Menu/C").GetComponent("XUICheckBox") as IXUICheckBox);
+ this.m_Opt[2] = (base.PanelObject.transform.Find("Menu/B").GetComponent("XUICheckBox") as IXUICheckBox);
+ this.m_Opt[3] = (base.PanelObject.transform.Find("Menu/A").GetComponent("XUICheckBox") as IXUICheckBox);
+ this.m_Opt[4] = (base.PanelObject.transform.Find("Menu/S").GetComponent("XUICheckBox") as IXUICheckBox);
+ this.m_Opt[5] = (base.PanelObject.transform.Find("Menu/L").GetComponent("XUICheckBox") as IXUICheckBox);
+ for (int i = 0; i < 6; i++)
+ {
+ IXUISprite ixuisprite = this.m_Opt[i].gameObject.GetComponent("XUISprite") as IXUISprite;
+ bool flag = ixuisprite != null;
+ if (flag)
+ {
+ ixuisprite.RegisterSpriteClickEventHandler(null);
+ }
+ }
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ this.m_OK.RegisterClickEventHandler(new ButtonClickEventHandler(this._OnOKClick));
+ this.m_Cancel.RegisterClickEventHandler(new ButtonClickEventHandler(this._OnCancelClick));
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ int num = 1;
+ foreach (IXUICheckBox ixuicheckBox in this.m_Opt)
+ {
+ ixuicheckBox.bChecked = ((this.m_Mask & num) != 0);
+ num <<= 1;
+ }
+ }
+
+ public void Set(int mask, QualityFilterCallback callback)
+ {
+ this.m_Mask = mask;
+ this.m_Callback = callback;
+ }
+
+ protected bool _OnOKClick(IXUIButton go)
+ {
+ int num = 1;
+ this.m_Mask = 0;
+ foreach (IXUICheckBox ixuicheckBox in this.m_Opt)
+ {
+ bool bChecked = ixuicheckBox.bChecked;
+ if (bChecked)
+ {
+ this.m_Mask |= num;
+ }
+ num <<= 1;
+ }
+ bool flag = this.m_Callback != null;
+ if (flag)
+ {
+ this.m_Callback(this.m_Mask);
+ }
+ base.SetVisible(false);
+ return true;
+ }
+
+ protected bool _OnCancelClick(IXUIButton go)
+ {
+ base.SetVisible(false);
+ return true;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/QualityFilterHandler.cs.meta b/Client/Assets/Scripts/XMainClient/UI/QualityFilterHandler.cs.meta
new file mode 100644
index 00000000..8a7c0409
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/QualityFilterHandler.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: c4acf314bca8474458723606e9332aaa
+timeCreated: 1611404502
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/QuickReplyDlg.cs b/Client/Assets/Scripts/XMainClient/UI/QuickReplyDlg.cs
new file mode 100644
index 00000000..3613672b
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/QuickReplyDlg.cs
@@ -0,0 +1,188 @@
+using System;
+using System.Collections.Generic;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class QuickReplyDlg : DlgBase<QuickReplyDlg, XQuickReplyBehavior>
+ {
+ public override string fileName
+ {
+ get
+ {
+ return "GameSystem/QuickReplyDlg";
+ }
+ }
+
+ public override int layer
+ {
+ get
+ {
+ return 100;
+ }
+ }
+
+ public override bool autoload
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ private XQuickReplyDocument _Doc;
+
+ private int m_quickReplyType = 1;
+
+ private Vector2 m_DragDistance = Vector2.zero;
+
+ private bool m_CancelRecord = false;
+
+ private Action<bool> m_cancelAction = null;
+
+ public void ShowView(int type, Action<bool> action = null)
+ {
+ this.m_quickReplyType = type;
+ this.m_cancelAction = action;
+ this.SetVisibleWithAnimation(true, null);
+ }
+
+ protected override void Init()
+ {
+ this._Doc = XDocuments.GetSpecificDocument<XQuickReplyDocument>(XQuickReplyDocument.uuID);
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ this.OnUpdateReplyList();
+ this.OnShowTitle();
+ }
+
+ private void OnShowTitle()
+ {
+ string key = string.Format("QUICK_REPLY_{0}", this.m_quickReplyType);
+ this.m_uiBehaviour.m_Title.SetText(XStringDefineProxy.GetString(key));
+ }
+
+ private void OnUpdateReplyList()
+ {
+ List<QuickReplyTable.RowData> quickReplyList = this._Doc.GetQuickReplyList(this.m_quickReplyType);
+ bool flag = quickReplyList == null;
+ if (!flag)
+ {
+ int count = quickReplyList.Count;
+ this.m_uiBehaviour.m_ItemPool.FakeReturnAll();
+ for (int i = 0; i < count; i++)
+ {
+ GameObject gameObject = this.m_uiBehaviour.m_ItemPool.FetchGameObject(false);
+ QuickReplyTable.RowData rowData = quickReplyList[i];
+ gameObject.name = rowData.ID.ToString();
+ gameObject.transform.localPosition = this.m_uiBehaviour.m_ItemPool.TplPos - new Vector3(0f, (float)(this.m_uiBehaviour.m_ItemPool.TplHeight * i));
+ IXUISprite ixuisprite = gameObject.GetComponent("XUISprite") as IXUISprite;
+ IXUILabel ixuilabel = gameObject.transform.Find("Content").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel.SetText(rowData.Content);
+ ixuisprite.ID = (ulong)((long)rowData.ID);
+ ixuisprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnReplyClicked));
+ }
+ this.m_uiBehaviour.m_ItemPool.ActualReturnAll(false);
+ this.m_uiBehaviour.m_WrapScrollView.ResetPosition();
+ }
+ }
+
+ private void OnReplyClicked(IXUISprite button)
+ {
+ QuickReplyTable.RowData rowData = this._Doc.GetRowData((int)button.ID);
+ DlgBase<XChatView, XChatBehaviour>.singleton.AddChat(rowData.Content, ChatChannelType.Guild, null, false);
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString("INVITATION_SENT_NOTIFICATION"), "fece00");
+ bool flag = this.m_cancelAction != null;
+ if (flag)
+ {
+ this.m_cancelAction(true);
+ this.m_cancelAction = null;
+ this.SetVisible(false, true);
+ }
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ base.uiBehaviour.m_Close.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnCloseClicked));
+ base.uiBehaviour.m_Voice.RegisterPressEventHandler(new ButtonPressEventHandler(this.OnVoicePressButton));
+ base.uiBehaviour.m_Voice.RegisterDragEventHandler(new ButtonDragEventHandler(this.OnVoiceDragButton));
+ }
+
+ private void OnCloseClicked(IXUISprite go)
+ {
+ bool flag = this.m_cancelAction != null;
+ if (flag)
+ {
+ this.m_cancelAction(false);
+ this.m_cancelAction = null;
+ }
+ this.SetVisible(false, true);
+ }
+
+ private void OnVoicePressButton(IXUIButton button, bool state)
+ {
+ if (state)
+ {
+ this.m_DragDistance = Vector2.zero;
+ bool useApollo = XChatDocument.UseApollo;
+ if (useApollo)
+ {
+ XSingleton<XChatApolloMgr>.singleton.StartRecord(VoiceUsage.CHAT, null);
+ }
+ else
+ {
+ XSingleton<XChatIFlyMgr>.singleton.StartRecord(VoiceUsage.CHAT, null);
+ }
+ }
+ else
+ {
+ DlgBase<XChatView, XChatBehaviour>.singleton.SetActiveChannel(ChatChannelType.Guild);
+ bool useApollo2 = XChatDocument.UseApollo;
+ if (useApollo2)
+ {
+ XSingleton<XChatApolloMgr>.singleton.StopRecord(this.m_CancelRecord);
+ }
+ else
+ {
+ XSingleton<XChatIFlyMgr>.singleton.StopRecord(this.m_CancelRecord);
+ }
+ bool flag = !this.m_CancelRecord;
+ if (flag)
+ {
+ bool flag2 = this.m_cancelAction != null;
+ if (flag2)
+ {
+ this.m_cancelAction(true);
+ this.m_cancelAction = null;
+ this.SetVisible(false, true);
+ }
+ }
+ }
+ }
+
+ private void OnVoiceDragButton(IXUIButton button, Vector2 delta)
+ {
+ this.m_DragDistance += delta;
+ bool flag = this.m_DragDistance.magnitude >= 100f;
+ if (flag)
+ {
+ this.m_CancelRecord = true;
+ }
+ else
+ {
+ this.m_CancelRecord = false;
+ }
+ }
+
+ private void _WrapContentItemUpdated(Transform t, int index)
+ {
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/QuickReplyDlg.cs.meta b/Client/Assets/Scripts/XMainClient/UI/QuickReplyDlg.cs.meta
new file mode 100644
index 00000000..1dc33a48
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/QuickReplyDlg.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 75b7c041f44771e409f49513a0dc2c8e
+timeCreated: 1611403948
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/ReceiveEnergyDlg.cs b/Client/Assets/Scripts/XMainClient/UI/ReceiveEnergyDlg.cs
new file mode 100644
index 00000000..c37e1c02
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/ReceiveEnergyDlg.cs
@@ -0,0 +1,314 @@
+using System;
+using System.Collections.Generic;
+using KKSG;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class ReceiveEnergyDlg : DlgHandlerBase
+ {
+ protected override string FileName
+ {
+ get
+ {
+ return "GameSystem/Welfare/ReceiveEnergy";
+ }
+ }
+
+ private SystemRewardTable.RowData mSupperRewardInfo;
+
+ private SystemRewardTable.RowData mDinnerRewardInfo;
+
+ private XSystemRewardData mSupperRewardData;
+
+ private XSystemRewardData mDinnerRewardData;
+
+ private XSystemRewardDocument mDoc;
+
+ public IXUIButton m_btnDo;
+
+ public ReceiveEnergyPanelModelView supperPanel = new ReceiveEnergyPanelModelView();
+
+ public ReceiveEnergyPanelModelView dinnerPanel = new ReceiveEnergyPanelModelView();
+
+ private SeqList<int> dinnerData;
+
+ private SeqList<int> supperData;
+
+ public IXUIButton m_BtnSubscribe;
+
+ public IXUIButton m_BtnCancelSubscribe;
+
+ private ulong m_rewardUid = 0UL;
+
+ private float m_fCoolTime = 0.5f;
+
+ private float m_fLastClickBtnTime = 0f;
+
+ private ulong SubscribebuttonID = 0UL;
+
+ protected override void Init()
+ {
+ this.mDoc = (XSingleton<XGame>.singleton.Doc.GetXComponent(XSystemRewardDocument.uuID) as XSystemRewardDocument);
+ this.mSupperRewardInfo = this.mDoc.GetTableDataByType(SystemRewardTypeMrg.GetTypeUInt(SystemRewardType.RewardSupper));
+ this.mDinnerRewardInfo = this.mDoc.GetTableDataByType(SystemRewardTypeMrg.GetTypeUInt(SystemRewardType.RewardDinner));
+ this.m_btnDo = (base.transform.Find("Bg/GetReward").GetComponent("XUIButton") as IXUIButton);
+ this.dinnerPanel.FindFrom(base.transform.Find("Bg/L"));
+ this.supperPanel.FindFrom(base.transform.Find("Bg/R"));
+ this.dinnerData = XSingleton<XGlobalConfig>.singleton.GetSequenceList("DinnerReward", false);
+ this.supperData = XSingleton<XGlobalConfig>.singleton.GetSequenceList("SupperReward", false);
+ this.m_BtnSubscribe = (base.transform.Find("Bg/Subscribe").GetComponent("XUIButton") as IXUIButton);
+ this.m_BtnCancelSubscribe = (base.transform.Find("Bg/UnSubscribe").GetComponent("XUIButton") as IXUIButton);
+ }
+
+ public override void RegisterEvent()
+ {
+ this.m_btnDo.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnClickButtonDo));
+ this.m_BtnSubscribe.ID = 0UL;
+ this.m_BtnSubscribe.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnSubscribeClick));
+ this.m_BtnCancelSubscribe.ID = 1UL;
+ this.m_BtnCancelSubscribe.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnSubscribeClick));
+ }
+
+ public override void RefreshData()
+ {
+ bool flag = !base.IsVisible();
+ if (!flag)
+ {
+ this.mSupperRewardData = null;
+ this.mDinnerRewardData = null;
+ List<XSystemRewardData> dataList = this.mDoc.DataList;
+ for (int i = 0; i < dataList.Count; i++)
+ {
+ bool flag2 = dataList[i].type == SystemRewardTypeMrg.GetTypeUInt(SystemRewardType.RewardSupper);
+ if (flag2)
+ {
+ this.mSupperRewardData = dataList[i];
+ }
+ else
+ {
+ bool flag3 = dataList[i].type == SystemRewardTypeMrg.GetTypeUInt(SystemRewardType.RewardDinner);
+ if (flag3)
+ {
+ this.mDinnerRewardData = dataList[i];
+ }
+ }
+ bool flag4 = this.mSupperRewardData != null && this.mDinnerRewardData != null;
+ if (flag4)
+ {
+ break;
+ }
+ }
+ bool flag5 = this.mSupperRewardData != null;
+ if (flag5)
+ {
+ this.supperPanel.m_sprFinish.SetVisible(this.mSupperRewardData.state == XSystemRewardState.SRS_FETCHED);
+ this.SetItemStatue(this.supperData, this.supperPanel);
+ }
+ else
+ {
+ this.supperPanel.m_sprFinish.SetVisible(false);
+ }
+ bool flag6 = this.mDinnerRewardData != null;
+ if (flag6)
+ {
+ this.dinnerPanel.m_sprFinish.SetVisible(this.mDinnerRewardData.state == XSystemRewardState.SRS_FETCHED);
+ this.SetItemStatue(this.dinnerData, this.dinnerPanel);
+ }
+ else
+ {
+ this.dinnerPanel.m_sprFinish.SetVisible(false);
+ }
+ this.m_btnDo.SetVisible((this.mSupperRewardData == null && this.mDinnerRewardData == null) || (this.mSupperRewardData != null && this.mSupperRewardData.state == XSystemRewardState.SRS_CAN_FETCH) || (this.mDinnerRewardData != null && this.mDinnerRewardData.state == XSystemRewardState.SRS_CAN_FETCH));
+ }
+ }
+
+ private void SetItemStatue(SeqList<int> lst, ReceiveEnergyPanelModelView go)
+ {
+ bool flag = lst.Count > 1;
+ if (flag)
+ {
+ int itemID = lst[0, 0];
+ int num = lst[0, 1];
+ ItemList.RowData itemConf = XBagDocument.GetItemConf(itemID);
+ bool flag2 = itemConf.ItemIcon1 != null && itemConf.ItemIcon1.Length != 0;
+ if (flag2)
+ {
+ go.m_EnerySpr.SetSprite(itemConf.ItemIcon1[0]);
+ go.m_lbNum.SetText(num.ToString());
+ }
+ else
+ {
+ this.dinnerPanel.m_lbNum.SetText("");
+ }
+ itemID = lst[1, 0];
+ num = lst[1, 1];
+ itemConf = XBagDocument.GetItemConf(itemID);
+ bool flag3 = itemConf.ItemIcon1 != null && itemConf.ItemIcon1.Length != 0;
+ if (flag3)
+ {
+ go.m_ItemGo.SetActive(true);
+ go.m_ItemIcon.SetSprite(itemConf.ItemIcon1[0]);
+ go.m_ItemNumLab.SetText(num.ToString());
+ }
+ else
+ {
+ go.m_ItemGo.SetActive(false);
+ }
+ }
+ else
+ {
+ bool flag4 = lst.Count == 1;
+ if (flag4)
+ {
+ int itemID2 = lst[0, 0];
+ int num2 = lst[0, 1];
+ ItemList.RowData itemConf2 = XBagDocument.GetItemConf(itemID2);
+ bool flag5 = itemConf2.ItemIcon1 != null && itemConf2.ItemIcon1.Length != 0;
+ if (flag5)
+ {
+ go.m_EnerySpr.SetSprite(itemConf2.ItemIcon1[0]);
+ go.m_lbNum.SetText(num2.ToString());
+ }
+ else
+ {
+ this.dinnerPanel.m_lbNum.SetText("");
+ }
+ go.m_ItemGo.SetActive(false);
+ }
+ else
+ {
+ go.m_lbNum.SetVisible(false);
+ }
+ }
+ }
+
+ private bool OnClickButtonDo(IXUIButton go)
+ {
+ bool flag = this.SetButtonCool(this.m_fCoolTime);
+ bool result;
+ if (flag)
+ {
+ result = true;
+ }
+ else
+ {
+ int num = (int)XBagDocument.BagDoc.GetVirtualItemCount(ItemEnum.FATIGUE);
+ bool flag2 = this.mSupperRewardData != null && this.mSupperRewardData.state == XSystemRewardState.SRS_CAN_FETCH;
+ if (flag2)
+ {
+ this.m_rewardUid = this.mSupperRewardData.uid;
+ bool flag3 = num + this.supperData[0, 1] > int.Parse(XSingleton<XGlobalConfig>.singleton.GetValue("MaxFatigue"));
+ if (flag3)
+ {
+ XSingleton<UiUtility>.singleton.ShowFatigueSureDlg(new ButtonClickEventHandler(this.GetFatigueSure));
+ return true;
+ }
+ this.mDoc.ReqFetchReward(this.m_rewardUid);
+ }
+ else
+ {
+ bool flag4 = this.mDinnerRewardData != null && this.mDinnerRewardData.state == XSystemRewardState.SRS_CAN_FETCH;
+ if (flag4)
+ {
+ this.m_rewardUid = this.mDinnerRewardData.uid;
+ bool flag5 = num + this.dinnerData[0, 1] > int.Parse(XSingleton<XGlobalConfig>.singleton.GetValue("MaxFatigue"));
+ if (flag5)
+ {
+ XSingleton<UiUtility>.singleton.ShowFatigueSureDlg(new ButtonClickEventHandler(this.GetFatigueSure));
+ return true;
+ }
+ this.mDoc.ReqFetchReward(this.m_rewardUid);
+ }
+ }
+ result = true;
+ }
+ return result;
+ }
+
+ private bool SetButtonCool(float time)
+ {
+ float num = Time.realtimeSinceStartup - this.m_fLastClickBtnTime;
+ bool flag = num < time;
+ bool result;
+ if (flag)
+ {
+ result = true;
+ }
+ else
+ {
+ this.m_fLastClickBtnTime = Time.realtimeSinceStartup;
+ result = false;
+ }
+ return result;
+ }
+
+ private bool GetFatigueSure(IXUIButton btn)
+ {
+ this.mDoc.ReqFetchReward(this.m_rewardUid);
+ DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.SetVisible(false, true);
+ return true;
+ }
+
+ public override void OnUnload()
+ {
+ this.mSupperRewardInfo = null;
+ this.mDinnerRewardInfo = null;
+ this.mDoc = null;
+ base.OnUnload();
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ this.RefreshData();
+ this.RefreshSubscribe();
+ }
+
+ protected override void OnHide()
+ {
+ }
+
+ protected void OnHideTweenFinished(IXUITweenTool tween)
+ {
+ base.SetVisible(false);
+ }
+
+ private bool OnSubscribeClick(IXUIButton button)
+ {
+ this.SubscribebuttonID = button.ID;
+ PushSubscribeTable.RowData pushSubscribe = XPushSubscribeDocument.GetPushSubscribe(PushSubscribeOptions.ReceiveEnergy);
+ XSingleton<UiUtility>.singleton.ShowModalDialog((button.ID == 0UL) ? pushSubscribe.SubscribeDescription : pushSubscribe.CancelDescription, XStringDefineProxy.GetString("COMMON_OK"), XStringDefineProxy.GetString("COMMON_CANCEL"), new ButtonClickEventHandler(this.ReqSubscribeChange));
+ return true;
+ }
+
+ private bool ReqSubscribeChange(IXUIButton button)
+ {
+ XSingleton<UiUtility>.singleton.CloseModalDlg();
+ XPushSubscribeDocument specificDocument = XDocuments.GetSpecificDocument<XPushSubscribeDocument>(XPushSubscribeDocument.uuID);
+ specificDocument.ReqSetSubscribe(PushSubscribeOptions.ReceiveEnergy, this.SubscribebuttonID == 0UL);
+ return true;
+ }
+
+ public void RefreshSubscribe()
+ {
+ PushSubscribeTable.RowData pushSubscribe = XPushSubscribeDocument.GetPushSubscribe(PushSubscribeOptions.ReceiveEnergy);
+ XPushSubscribeDocument specificDocument = XDocuments.GetSpecificDocument<XPushSubscribeDocument>(XPushSubscribeDocument.uuID);
+ bool flag = XSingleton<XClientNetwork>.singleton.AccountType == LoginType.LGOIN_WECHAT_PF && pushSubscribe.IsShow && specificDocument.OptionsDefault != null && specificDocument.OptionsDefault.Count != 0;
+ if (flag)
+ {
+ bool curSubscribeStatus = specificDocument.GetCurSubscribeStatus(PushSubscribeOptions.ReceiveEnergy);
+ this.m_BtnSubscribe.gameObject.SetActive(!curSubscribeStatus);
+ this.m_BtnCancelSubscribe.gameObject.SetActive(curSubscribeStatus);
+ }
+ else
+ {
+ this.m_BtnSubscribe.gameObject.SetActive(false);
+ this.m_BtnCancelSubscribe.gameObject.SetActive(false);
+ }
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/ReceiveEnergyDlg.cs.meta b/Client/Assets/Scripts/XMainClient/UI/ReceiveEnergyDlg.cs.meta
new file mode 100644
index 00000000..cc81d502
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/ReceiveEnergyDlg.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 4965e8875e6ca88449e47fbe3bb57a0d
+timeCreated: 1611403661
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/ReceiveEnergyPanelModelView.cs b/Client/Assets/Scripts/XMainClient/UI/ReceiveEnergyPanelModelView.cs
new file mode 100644
index 00000000..861600a4
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/ReceiveEnergyPanelModelView.cs
@@ -0,0 +1,40 @@
+using System;
+using UILib;
+using UnityEngine;
+
+namespace XMainClient.UI
+{
+ internal class ReceiveEnergyPanelModelView
+ {
+ public IXUILabel m_lbNum;
+
+ public IXUISprite m_sprFinish;
+
+ public IXUISprite m_EnerySpr;
+
+ public GameObject m_ItemGo;
+
+ public IXUISprite m_ItemIcon;
+
+ public IXUILabel m_ItemNumLab;
+
+ public void FindFrom(Transform t)
+ {
+ bool flag = null == t;
+ if (!flag)
+ {
+ this.m_lbNum = (t.GetComponent("XUILabel") as IXUILabel);
+ this.m_sprFinish = (t.Find("F").GetComponent("XUISprite") as IXUISprite);
+ this.m_EnerySpr = (t.Find("Icon").GetComponent("XUISprite") as IXUISprite);
+ Transform transform = t.Find("Item");
+ bool flag2 = transform != null;
+ if (flag2)
+ {
+ this.m_ItemGo = transform.gameObject;
+ this.m_ItemNumLab = (transform.Find("Num").GetComponent("XUILabel") as IXUILabel);
+ this.m_ItemIcon = (transform.Find("Icon1").GetComponent("XUISprite") as IXUISprite);
+ }
+ }
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/ReceiveEnergyPanelModelView.cs.meta b/Client/Assets/Scripts/XMainClient/UI/ReceiveEnergyPanelModelView.cs.meta
new file mode 100644
index 00000000..e172583a
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/ReceiveEnergyPanelModelView.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 66b701998316e944499a71a833892052
+timeCreated: 1611403855
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/RecycleItemBagView.cs b/Client/Assets/Scripts/XMainClient/UI/RecycleItemBagView.cs
new file mode 100644
index 00000000..667d1e31
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/RecycleItemBagView.cs
@@ -0,0 +1,126 @@
+using System;
+using UILib;
+using UnityEngine;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class RecycleItemBagView : DlgHandlerBase
+ {
+ private XRecycleItemDocument _doc = null;
+
+ private QualityFilterHandler qualityFilter;
+
+ private static int QualityMask = 3;
+
+ private IXUIScrollView bagScrollView = null;
+
+ private XBagWindow bagWindow;
+
+ protected override void Init()
+ {
+ base.Init();
+ this._doc = XDocuments.GetSpecificDocument<XRecycleItemDocument>(XRecycleItemDocument.uuID);
+ this._doc.BagView = this;
+ DlgHandlerBase.EnsureCreate<QualityFilterHandler>(ref this.qualityFilter, base.PanelObject.transform.Find("FilterPanel").gameObject, null, true);
+ this.qualityFilter.Set(RecycleItemBagView.QualityMask, new QualityFilterCallback(this._OnFilterOK));
+ this.bagScrollView = (base.PanelObject.transform.Find("Panel").GetComponent("XUIScrollView") as IXUIScrollView);
+ this.bagWindow = new XBagWindow(base.PanelObject, new ItemUpdateHandler(this.WrapContentItemUpdated), new GetItemHandler(this._doc.GetItems));
+ this.bagWindow.Init();
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ IXUIButton ixuibutton = base.PanelObject.transform.Find("FilterBtn").GetComponent("XUIButton") as IXUIButton;
+ ixuibutton.RegisterClickEventHandler(new ButtonClickEventHandler(this._OnFilterClicked));
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ this.bagWindow.OnShow();
+ this.qualityFilter.SetVisible(false);
+ }
+
+ protected override void OnHide()
+ {
+ base.OnHide();
+ this.bagWindow.OnHide();
+ this._doc.ResetSelection(false);
+ }
+
+ public override void OnUnload()
+ {
+ this._doc.BagView = null;
+ this.bagWindow = null;
+ base.OnUnload();
+ }
+
+ public void Refresh()
+ {
+ this.bagWindow.RefreshWindow();
+ }
+
+ public void UpdateView()
+ {
+ this.bagWindow.UpdateBag();
+ }
+
+ protected bool _OnFilterClicked(IXUIButton btn)
+ {
+ this.qualityFilter.SetVisible(true);
+ return true;
+ }
+
+ protected void _OnFilterOK(int mask)
+ {
+ RecycleItemBagView.QualityMask = mask;
+ this._doc.GetQuickSelectItems(mask);
+ }
+
+ private void WrapContentItemUpdated(Transform t, int index)
+ {
+ IXUISprite ixuisprite = t.Find("Icon").GetComponent("XUISprite") as IXUISprite;
+ IXUILongPress ixuilongPress = ixuisprite.gameObject.GetComponent("XUILongPress") as IXUILongPress;
+ bool flag = this.bagWindow.m_XItemList == null || index >= this.bagWindow.m_XItemList.Count || index < 0;
+ if (flag)
+ {
+ XSingleton<XItemDrawerMgr>.singleton.DrawItem(t.gameObject, null);
+ ixuilongPress.RegisterSpriteLongPressEventHandler(null);
+ }
+ else
+ {
+ ixuisprite.ID = this.bagWindow.m_XItemList[index].uid;
+ int num = 0;
+ this._doc.IsSelected(ixuisprite.ID, out num);
+ bool flag2 = num == 0;
+ if (flag2)
+ {
+ XSingleton<XItemDrawerMgr>.singleton.DrawItem(t.gameObject, null);
+ ixuilongPress.RegisterSpriteLongPressEventHandler(null);
+ ixuisprite.RegisterSpriteClickEventHandler(null);
+ }
+ else
+ {
+ XSingleton<XItemDrawerMgr>.singleton.DrawItem(t.gameObject, this.bagWindow.m_XItemList[index]);
+ ixuilongPress.RegisterSpriteLongPressEventHandler(new SpriteClickEventHandler(this.OnItemLongPressed));
+ IXUILabel ixuilabel = t.Find("Num").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel.SetText(num.ToString());
+ ixuisprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnItemClicked));
+ }
+ }
+ }
+
+ public void OnItemClicked(IXUISprite iSp)
+ {
+ this._doc.ToggleItemSelect(iSp.ID);
+ }
+
+ public void OnItemLongPressed(IXUISprite iSp)
+ {
+ XItem bagItemByUID = XBagDocument.BagDoc.GetBagItemByUID(iSp.ID);
+ XSingleton<UiUtility>.singleton.ShowTooltipDialog(bagItemByUID, null, iSp, false, 0u);
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/RecycleItemBagView.cs.meta b/Client/Assets/Scripts/XMainClient/UI/RecycleItemBagView.cs.meta
new file mode 100644
index 00000000..1c07ad05
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/RecycleItemBagView.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: d91e9dfae125a9849bab656c54fccbe3
+timeCreated: 1611404642
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/RecycleItemOperateView.cs b/Client/Assets/Scripts/XMainClient/UI/RecycleItemOperateView.cs
new file mode 100644
index 00000000..3698aa35
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/RecycleItemOperateView.cs
@@ -0,0 +1,262 @@
+using System;
+using System.Collections.Generic;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class RecycleItemOperateView : DlgHandlerBase
+ {
+ private XRecycleItemDocument _doc = null;
+
+ private GameObject[] m_ItemList = new GameObject[XRecycleItemDocument.MAX_RECYCLE_COUNT];
+
+ private IXUISprite[] m_ItemIconList = new IXUISprite[XRecycleItemDocument.MAX_RECYCLE_COUNT];
+
+ private Transform[] m_ItemContainers = new Transform[XRecycleItemDocument.MAX_RECYCLE_COUNT];
+
+ private XFx m_RecyclingFx;
+
+ private IXUITweenTool m_RecyclingEatTween;
+
+ private GameObject m_RecyclingFxParent;
+
+ private XFx criticalEffect;
+
+ private uint _setPosition;
+
+ protected override void Init()
+ {
+ base.Init();
+ XUIPool xuipool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+ xuipool.SetupPool(base.PanelObject.transform.Find("Frame/Items").gameObject, base.PanelObject.transform.Find("Frame/Items/ItemTpl").gameObject, XRecycleItemDocument.MAX_RECYCLE_COUNT, false);
+ for (uint num = 0u; num < XRecycleItemDocument.MAX_RECYCLE_COUNT; num += 1u)
+ {
+ this.m_ItemContainers[(int)num] = base.PanelObject.transform.Find("Frame/Items/Item" + num);
+ GameObject gameObject = xuipool.FetchGameObject(false);
+ this.m_ItemList[(int)num] = gameObject;
+ this.m_ItemIconList[(int)num] = (gameObject.transform.Find("Icon").GetComponent("XUISprite") as IXUISprite);
+ gameObject.transform.parent = this.m_ItemContainers[(int)num];
+ gameObject.transform.localPosition = Vector3.zero;
+ gameObject.transform.localScale = Vector3.one;
+ }
+ this.m_RecyclingEatTween = (base.PanelObject.transform.Find("Frame/Items").GetComponent("XUIPlayTween") as IXUITweenTool);
+ this.m_RecyclingFxParent = base.PanelObject.transform.Find("Frame/P/Fire").gameObject;
+ this.criticalEffect = XSingleton<XFxMgr>.singleton.CreateFx("Effects/FX_Particle/UIfx/UI_gorgeous", null, true);
+ this._doc = XDocuments.GetSpecificDocument<XRecycleItemDocument>(XRecycleItemDocument.uuID);
+ this._doc.OperateView = this;
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ IXUIButton ixuibutton = base.PanelObject.transform.Find("Frame/DoBtn").GetComponent("XUIButton") as IXUIButton;
+ ixuibutton.RegisterClickEventHandler(new ButtonClickEventHandler(this._OnDoClicked));
+ int num = 0;
+ while ((long)num < (long)((ulong)XRecycleItemDocument.MAX_RECYCLE_COUNT))
+ {
+ this.m_ItemIconList[num].RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this._OnItemClicked));
+ IXUILongPress ixuilongPress = this.m_ItemIconList[num].gameObject.GetComponent("XUILongPress") as IXUILongPress;
+ ixuilongPress.RegisterSpriteLongPressEventHandler(new SpriteClickEventHandler(this._OnItemLongPressed));
+ num++;
+ }
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ this.Refresh();
+ this._ResetItemStates();
+ }
+
+ public override void OnUnload()
+ {
+ this._doc.OperateView = null;
+ bool flag = this.m_RecyclingFx != null;
+ if (flag)
+ {
+ XSingleton<XFxMgr>.singleton.DestroyFx(this.m_RecyclingFx, true);
+ this.m_RecyclingFx = null;
+ }
+ base.OnUnload();
+ }
+
+ private bool _OnShopBtnClicked(IXUIButton btn)
+ {
+ DlgBase<MallSystemDlg, MallSystemBehaviour>.singleton.ShowShopSystem(XSysDefine.XSys_Mall_Fasion, 0UL);
+ return true;
+ }
+
+ private bool _OnDoClicked(IXUIButton btn)
+ {
+ bool flag = this._doc.SelectedItems.Count == 0;
+ bool result;
+ if (flag)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString("RECYCLE_SELECTION_EMPTY"), "fece00");
+ result = true;
+ }
+ else
+ {
+ foreach (KeyValuePair<ulong, ulong> keyValuePair in this._doc.SelectedItems)
+ {
+ XItem itemByUID = XSingleton<XGame>.singleton.Doc.XBagDoc.GetItemByUID(keyValuePair.Key);
+ bool flag2 = itemByUID != null && itemByUID.type == 1u;
+ if (flag2)
+ {
+ XEquipItem xequipItem = itemByUID as XEquipItem;
+ int @int = XSingleton<XGlobalConfig>.singleton.GetInt("RecycleFirstTipsLevel");
+ int int2 = XSingleton<XGlobalConfig>.singleton.GetInt("RecycleSecondTipsLevel");
+ bool flag3 = @int >= int2;
+ if (flag3)
+ {
+ XSingleton<XDebug>.singleton.AddGreenLog("firstLevel should >= secondLevel", null, null, null, null, null);
+ }
+ bool flag4 = (ulong)xequipItem.enhanceInfo.EnhanceLevel >= (ulong)((long)@int) && (ulong)xequipItem.enhanceInfo.EnhanceLevel < (ulong)((long)int2);
+ if (flag4)
+ {
+ this.OnAddLeftTimeClicked(btn);
+ return true;
+ }
+ bool flag5 = (ulong)xequipItem.enhanceInfo.EnhanceLevel >= (ulong)((long)int2);
+ if (flag5)
+ {
+ btn.ID = (ulong)((long)int2);
+ this.SurecClick(btn);
+ return true;
+ }
+ }
+ }
+ result = this._DoClicked(btn);
+ }
+ return result;
+ }
+
+ private void OnAddLeftTimeClicked(IXUIButton btn)
+ {
+ XSingleton<UiUtility>.singleton.ShowModalDialog(XStringDefineProxy.GetString("Recycle_EnhancedEquip"), XStringDefineProxy.GetString("COMMON_OK"), XStringDefineProxy.GetString("COMMON_CANCEL"), new ButtonClickEventHandler(this._DoClicked));
+ }
+
+ private void SurecClick(IXUIButton btn)
+ {
+ XSingleton<UiUtility>.singleton.ShowModalDialog(string.Format(XStringDefineProxy.GetString("Cannot_recycl"), btn.ID), XStringDefineProxy.GetString("COMMON_OK"));
+ }
+
+ private bool _DoClicked(IXUIButton btn)
+ {
+ DlgBase<RecycleSystemDlg, TabDlgBehaviour>.singleton.ToggleInputBlocker(true);
+ this.m_RecyclingEatTween.RegisterOnFinishEventHandler(new OnTweenFinishEventHandler(this._OnFinishEatItems));
+ this.m_RecyclingEatTween.PlayTween(true, -1f);
+ XSingleton<XAudioMgr>.singleton.PlayUISound("Audio/UI/UI_ItemMelt", true, AudioChannel.Action);
+ DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.SetVisible(false, true);
+ return true;
+ }
+
+ private void _OnFinishEatItems(IXUITweenTool it)
+ {
+ bool flag = this.m_RecyclingFx == null;
+ if (flag)
+ {
+ this.m_RecyclingFx = XSingleton<XFxMgr>.singleton.CreateFx("Effects/FX_Particle/UIfx/UI_zbhs", null, true);
+ }
+ this.m_RecyclingFx.SetActive(true);
+ this.m_RecyclingFx.Play(this.m_RecyclingFxParent.transform, Vector3.zero, Vector3.one, 1f, false, false);
+ this._doc.Recycle();
+ this._ResetItemStates();
+ DlgBase<RecycleSystemDlg, TabDlgBehaviour>.singleton.ToggleInputBlocker(false);
+ XSingleton<XTimerMgr>.singleton.KillTimer(this._setPosition);
+ this._setPosition = XSingleton<XTimerMgr>.singleton.SetTimer(1f, new XTimerMgr.ElapsedEventHandler(this.SetPos), null);
+ }
+
+ public void SetPos(object o = null)
+ {
+ bool flag = this.m_RecyclingFx != null;
+ if (flag)
+ {
+ this.m_RecyclingFx.SetActive(false);
+ }
+ }
+
+ private void _ResetItemStates()
+ {
+ this.m_RecyclingEatTween.ResetTween(true);
+ }
+
+ private void _OnItemClicked(IXUISprite iSp)
+ {
+ this._doc.ToggleItemUnSelect(iSp.ID);
+ }
+
+ private void _OnItemLongPressed(IXUISprite iSp)
+ {
+ XItem bagItemByUID = XBagDocument.BagDoc.GetBagItemByUID(iSp.ID);
+ XSingleton<UiUtility>.singleton.ShowTooltipDialog(bagItemByUID, null, iSp, false, 0u);
+ }
+
+ public void Refresh()
+ {
+ int num = 0;
+ foreach (KeyValuePair<ulong, ulong> keyValuePair in this._doc.SelectedItems)
+ {
+ ulong key = keyValuePair.Key;
+ XItem bagItemByUID = XBagDocument.BagDoc.GetBagItemByUID(key);
+ XSingleton<XItemDrawerMgr>.singleton.DrawItem(this.m_ItemList[num], bagItemByUID);
+ IXUILabel ixuilabel = this.m_ItemList[num].transform.Find("Num").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel.SetText(keyValuePair.Value.ToString());
+ this.m_ItemIconList[num].ID = key;
+ num++;
+ }
+ while ((long)num < (long)((ulong)XRecycleItemDocument.MAX_RECYCLE_COUNT))
+ {
+ XSingleton<XItemDrawerMgr>.singleton.DrawItem(this.m_ItemList[num], null);
+ this.m_ItemIconList[num].ID = 0UL;
+ num++;
+ }
+ }
+
+ public void ToggleItem(ulong uid, ulong count, bool bSelect)
+ {
+ int num = -1;
+ int num2 = 0;
+ while ((long)num2 < (long)((ulong)XRecycleItemDocument.MAX_RECYCLE_COUNT))
+ {
+ bool flag = this.m_ItemIconList[num2].ID == uid;
+ if (flag)
+ {
+ num = num2;
+ break;
+ }
+ bool flag2 = this.m_ItemIconList[num2].ID == 0UL && num < 0;
+ if (flag2)
+ {
+ num = num2;
+ }
+ num2++;
+ }
+ if (bSelect)
+ {
+ XItem bagItemByUID = XBagDocument.BagDoc.GetBagItemByUID(uid);
+ XSingleton<XItemDrawerMgr>.singleton.DrawItem(this.m_ItemList[num], bagItemByUID);
+ IXUILabel ixuilabel = this.m_ItemList[num].transform.Find("Num").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel.SetText(count.ToString());
+ this.m_ItemIconList[num].ID = uid;
+ }
+ else
+ {
+ bool flag3 = this.m_ItemIconList[num].ID == uid;
+ if (flag3)
+ {
+ XSingleton<XItemDrawerMgr>.singleton.DrawItem(this.m_ItemList[num], null);
+ this.m_ItemIconList[num].ID = 0UL;
+ }
+ }
+ }
+
+ public void PlayCritical()
+ {
+ this.criticalEffect.Play(Vector3.zero, Quaternion.identity, Vector3.one, 1f);
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/RecycleItemOperateView.cs.meta b/Client/Assets/Scripts/XMainClient/UI/RecycleItemOperateView.cs.meta
new file mode 100644
index 00000000..f9302c5b
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/RecycleItemOperateView.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 9a38086157e8ad94f830b23713a7d9f6
+timeCreated: 1611404199
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/RecycleSystemDlg.cs b/Client/Assets/Scripts/XMainClient/UI/RecycleSystemDlg.cs
new file mode 100644
index 00000000..daacdabd
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/RecycleSystemDlg.cs
@@ -0,0 +1,128 @@
+using System;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class RecycleSystemDlg : TabDlgBase<RecycleSystemDlg>
+ {
+ public string EffectPath
+ {
+ get
+ {
+ bool flag = string.IsNullOrEmpty(this.m_effectPath);
+ if (flag)
+ {
+ this.m_effectPath = XSingleton<XGlobalConfig>.singleton.GetValue("RecycleEffectPath");
+ }
+ return this.m_effectPath;
+ }
+ }
+
+ public override string fileName
+ {
+ get
+ {
+ return "GameSystem/RecycleDlg";
+ }
+ }
+
+ public RecycleItemBagView _RecycleItemBagView;
+
+ public RecycleItemOperateView _RecycleItemOperateView;
+
+ public GameObject m_RecycleItemBagPanel;
+
+ public GameObject m_RecycleItemOperatePanel;
+
+ public GameObject m_InputBlocker;
+
+ public IXUIButton m_helpBtn;
+
+ private XFx m_fx;
+
+ private string m_effectPath = string.Empty;
+
+ protected override void Init()
+ {
+ base.Init();
+ this.m_RecycleItemBagPanel = base.uiBehaviour.transform.Find("Bg/ItemListPanel").gameObject;
+ this.m_RecycleItemBagPanel.SetActive(false);
+ this.m_RecycleItemOperatePanel = base.uiBehaviour.transform.Find("Bg/LeftPanel/ItemOperateFrame").gameObject;
+ this.m_RecycleItemOperatePanel.SetActive(false);
+ this.m_InputBlocker = base.uiBehaviour.transform.Find("Bg/BlockerPanel/InputBlocker").gameObject;
+ this.m_helpBtn = (base.uiBehaviour.transform.Find("Bg/LeftPanel/T/Help").GetComponent("XUIButton") as IXUIButton);
+ this.m_helpBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.ShowHelp));
+ bool flag = this.m_fx == null;
+ if (flag)
+ {
+ this.m_fx = XSingleton<XFxMgr>.singleton.CreateFx(this.EffectPath, null, true);
+ }
+ else
+ {
+ this.m_fx.SetActive(true);
+ }
+ this.m_fx.Play(base.uiBehaviour.transform.Find("Bg/p"), Vector3.zero, Vector3.one, 1f, true, false);
+ }
+
+ protected override void OnLoad()
+ {
+ base.OnLoad();
+ }
+
+ protected override void OnUnload()
+ {
+ bool flag = this.m_fx != null;
+ if (flag)
+ {
+ XSingleton<XFxMgr>.singleton.DestroyFx(this.m_fx, true);
+ this.m_fx = null;
+ }
+ DlgHandlerBase.EnsureUnload<RecycleItemBagView>(ref this._RecycleItemBagView);
+ DlgHandlerBase.EnsureUnload<RecycleItemOperateView>(ref this._RecycleItemOperateView);
+ base.OnUnload();
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ DlgBase<CapacityDownDlg, CapacityBehaviour>.singleton.ShowRecycleTips();
+ }
+
+ private bool ShowHelp(IXUIButton button)
+ {
+ DlgBase<XCommonHelpTipView, XCommonHelpTipBehaviour>.singleton.ShowHelp(XSysDefine.XSys_Recycle_Equip);
+ return false;
+ }
+
+ public override void SetupHandlers(XSysDefine sys)
+ {
+ XRecycleItemDocument specificDocument = XDocuments.GetSpecificDocument<XRecycleItemDocument>(XRecycleItemDocument.uuID);
+ specificDocument.CurrentSys = sys;
+ XSysDefine xsysDefine = sys;
+ if (xsysDefine != XSysDefine.XSys_Recycle_Equip)
+ {
+ if (xsysDefine != XSysDefine.XSys_Recycle_Jade)
+ {
+ XSingleton<XDebug>.singleton.AddErrorLog("System has not finished:", sys.ToString(), null, null, null, null);
+ return;
+ }
+ base._AddActiveHandler(DlgHandlerBase.EnsureCreate<RecycleItemBagView>(ref this._RecycleItemBagView, this.m_RecycleItemBagPanel, this, true));
+ base._AddActiveHandler(DlgHandlerBase.EnsureCreate<RecycleItemOperateView>(ref this._RecycleItemOperateView, this.m_RecycleItemOperatePanel, this, true));
+ }
+ else
+ {
+ base._AddActiveHandler(DlgHandlerBase.EnsureCreate<RecycleItemBagView>(ref this._RecycleItemBagView, this.m_RecycleItemBagPanel, this, true));
+ base._AddActiveHandler(DlgHandlerBase.EnsureCreate<RecycleItemOperateView>(ref this._RecycleItemOperateView, this.m_RecycleItemOperatePanel, this, true));
+ }
+ this.ToggleInputBlocker(false);
+ }
+
+ public void ToggleInputBlocker(bool bBlock)
+ {
+ this.m_InputBlocker.SetActive(bBlock);
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/RecycleSystemDlg.cs.meta b/Client/Assets/Scripts/XMainClient/UI/RecycleSystemDlg.cs.meta
new file mode 100644
index 00000000..c6350650
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/RecycleSystemDlg.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: c62c7ca0d41f0ba469b7f6f3811e20e4
+timeCreated: 1611404508
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/RefinedReplaceHandler.cs b/Client/Assets/Scripts/XMainClient/UI/RefinedReplaceHandler.cs
new file mode 100644
index 00000000..71b519c6
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/RefinedReplaceHandler.cs
@@ -0,0 +1,246 @@
+using System;
+using System.Collections.Generic;
+using KKSG;
+using UILib;
+using UnityEngine;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class RefinedReplaceHandler : DlgHandlerBase
+ {
+ private ArtifactRefinedDocument m_doc;
+
+ private IXUIButton m_cancleBtn;
+
+ private IXUIButton m_sureBtn;
+
+ private Transform m_parentTra;
+
+ private readonly int m_gap = 42;
+
+ private XUIPool m_itemPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ protected override void Init()
+ {
+ base.Init();
+ this.m_doc = ArtifactRefinedDocument.Doc;
+ this.m_cancleBtn = (base.PanelObject.transform.Find("Bg/Cancel").GetComponent("XUIButton") as IXUIButton);
+ this.m_sureBtn = (base.PanelObject.transform.Find("Bg/OK").GetComponent("XUIButton") as IXUIButton);
+ this.m_parentTra = base.PanelObject.transform.Find("Bg/AttrGos");
+ this.m_itemPool.SetupPool(this.m_parentTra.gameObject, this.m_parentTra.Find("AttrItem").gameObject, 2u, true);
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ this.m_cancleBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnCancleClicked));
+ this.m_sureBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnSureClicked));
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ this.FillContent();
+ }
+
+ protected override void OnHide()
+ {
+ base.OnHide();
+ }
+
+ public override void OnUnload()
+ {
+ base.OnUnload();
+ }
+
+ private void FillContent()
+ {
+ XItem itemByUID = XBagDocument.BagDoc.GetItemByUID(this.m_doc.SelectUid);
+ bool flag = itemByUID == null;
+ if (!flag)
+ {
+ XArtifactItem xartifactItem = itemByUID as XArtifactItem;
+ bool flag2 = xartifactItem.RandAttrInfo.RandAttr.Count == 0;
+ if (!flag2)
+ {
+ List<XItemChangeAttr> list = new List<XItemChangeAttr>();
+ List<XItemChangeAttr> list2 = new List<XItemChangeAttr>();
+ for (int i = 0; i < xartifactItem.RandAttrInfo.RandAttr.Count; i++)
+ {
+ bool flag3 = xartifactItem.RandAttrInfo.RandAttr[i].AttrID > 0u;
+ if (flag3)
+ {
+ list.Add(xartifactItem.RandAttrInfo.RandAttr[i]);
+ }
+ }
+ for (int j = 0; j < xartifactItem.UnSavedAttr.Count; j++)
+ {
+ bool flag4 = xartifactItem.UnSavedAttr[j].AttrID > 0u;
+ if (flag4)
+ {
+ list2.Add(xartifactItem.UnSavedAttr[j]);
+ }
+ }
+ string text = string.Empty;
+ bool flag5 = XSingleton<XAttributeMgr>.singleton.XPlayerData != null;
+ if (flag5)
+ {
+ ProfessionTable.RowData byProfID = XSingleton<XEntityMgr>.singleton.RoleInfo.GetByProfID(XSingleton<XAttributeMgr>.singleton.XPlayerData.TypeID);
+ bool flag6 = byProfID != null;
+ if (flag6)
+ {
+ text = XStringDefineProxy.GetString("ZizhiType" + byProfID.AttackType);
+ }
+ }
+ this.m_itemPool.ReturnAll(false);
+ int num = (list.Count < list2.Count) ? list.Count : list2.Count;
+ float num2 = (float)(num * this.m_gap / 2);
+ for (int k = 0; k <= num; k++)
+ {
+ GameObject gameObject = this.m_itemPool.FetchGameObject(false);
+ gameObject.transform.parent = this.m_parentTra;
+ gameObject.transform.localScale = Vector3.one;
+ gameObject.transform.localPosition = new Vector3(0f, num2 - (float)(this.m_gap * k), 0f);
+ bool flag7 = k == 0;
+ if (flag7)
+ {
+ int ppt = this.GetPPT(itemByUID, false);
+ int ppt2 = this.GetPPT(itemByUID, true);
+ IXUILabel ixuilabel = gameObject.transform.Find("BeforeName").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel.SetText(text);
+ ixuilabel = (gameObject.transform.Find("BeforeValue").GetComponent("XUILabel") as IXUILabel);
+ ixuilabel.SetText(this.GetPPT(itemByUID, false).ToString());
+ ixuilabel = (gameObject.transform.Find("Name").GetComponent("XUILabel") as IXUILabel);
+ ixuilabel.SetText(text);
+ ixuilabel = (gameObject.transform.Find("NowValue").GetComponent("XUILabel") as IXUILabel);
+ bool flag8 = ppt >= ppt2;
+ if (flag8)
+ {
+ ixuilabel.SetText(string.Format("[ff0000]{0}[-]", this.GetPPT(itemByUID, true)));
+ }
+ else
+ {
+ ixuilabel.SetText(string.Format("[00ff00]{0}[-]", this.GetPPT(itemByUID, true)));
+ }
+ }
+ else
+ {
+ int num3 = k - 1;
+ XItemChangeAttr xitemChangeAttr = list[num3];
+ ArtifactAttrRange artifactAttrRange = ArtifactDocument.GetArtifactAttrRange((uint)xartifactItem.itemID, num3, xitemChangeAttr.AttrID, xitemChangeAttr.AttrValue);
+ string color = this.GetColor(xitemChangeAttr.AttrValue, artifactAttrRange.Min, artifactAttrRange.Max);
+ IXUILabel ixuilabel = gameObject.transform.Find("BeforeName").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel.SetText(string.Format("[{0}]{1}[-]", color, XAttributeCommon.GetAttrStr((int)xitemChangeAttr.AttrID)));
+ ixuilabel = (gameObject.transform.Find("BeforeValue").GetComponent("XUILabel") as IXUILabel);
+ ixuilabel.SetText(string.Format("[{0}]{1}[-]", color, xitemChangeAttr.AttrValue));
+ xitemChangeAttr = list2[num3];
+ artifactAttrRange = ArtifactDocument.GetArtifactAttrRange((uint)xartifactItem.itemID, num3, xitemChangeAttr.AttrID, xitemChangeAttr.AttrValue);
+ color = this.GetColor(xitemChangeAttr.AttrValue, artifactAttrRange.Min, artifactAttrRange.Max);
+ ixuilabel = (gameObject.transform.Find("Name").GetComponent("XUILabel") as IXUILabel);
+ ixuilabel.SetText(string.Format("[{0}]{1}[-]", color, XAttributeCommon.GetAttrStr((int)xitemChangeAttr.AttrID)));
+ ixuilabel = (gameObject.transform.Find("NowValue").GetComponent("XUILabel") as IXUILabel);
+ ixuilabel.SetText(string.Format("[{0}]{1}[-]", color, xitemChangeAttr.AttrValue));
+ }
+ }
+ }
+ }
+ }
+
+ private string GetColor(uint attrValue, uint min, uint max)
+ {
+ bool flag = min >= max;
+ float num;
+ if (flag)
+ {
+ num = 100f;
+ }
+ else
+ {
+ bool flag2 = attrValue < max;
+ if (flag2)
+ {
+ num = (attrValue - min) * 100u / (max - min);
+ }
+ else
+ {
+ num = 100f;
+ }
+ }
+ int quality = EquipAttrDataMgr.MarkList.Count - 1;
+ for (int i = 0; i < EquipAttrDataMgr.MarkList.Count; i++)
+ {
+ bool flag3 = num < (float)EquipAttrDataMgr.MarkList[i];
+ if (flag3)
+ {
+ quality = i;
+ break;
+ }
+ }
+ return XSingleton<UiUtility>.singleton.GetItemQualityRGB(quality);
+ }
+
+ private int GetPPT(XItem item, bool isTemp)
+ {
+ XArtifactItem xartifactItem = item as XArtifactItem;
+ bool flag = xartifactItem == null;
+ int result;
+ if (flag)
+ {
+ result = -1;
+ }
+ else
+ {
+ XAttributes xplayerData = XSingleton<XAttributeMgr>.singleton.XPlayerData;
+ bool flag2 = xplayerData == null;
+ if (flag2)
+ {
+ result = -1;
+ }
+ else
+ {
+ double num = xartifactItem.GetPPT(xplayerData);
+ bool flag3 = !isTemp;
+ if (flag3)
+ {
+ for (int i = 0; i < xartifactItem.RandAttrInfo.RandAttr.Count; i++)
+ {
+ bool flag4 = xartifactItem.RandAttrInfo.RandAttr[i].AttrID == 0u;
+ if (!flag4)
+ {
+ num += XSingleton<XPowerPointCalculator>.singleton.GetPPT(xartifactItem.RandAttrInfo.RandAttr[i], xplayerData, -1);
+ }
+ }
+ }
+ else
+ {
+ for (int j = 0; j < xartifactItem.UnSavedAttr.Count; j++)
+ {
+ bool flag5 = xartifactItem.UnSavedAttr[j].AttrID == 0u;
+ if (!flag5)
+ {
+ num += XSingleton<XPowerPointCalculator>.singleton.GetPPT(xartifactItem.UnSavedAttr[j], xplayerData, -1);
+ }
+ }
+ }
+ result = (int)num;
+ }
+ }
+ return result;
+ }
+
+ private bool OnCancleClicked(IXUIButton btn)
+ {
+ base.SetVisible(false);
+ this.m_doc.ReqRefined(ArtifactDeityStoveOpType.ArtifactDeityStove_RefineRetain);
+ return true;
+ }
+
+ private bool OnSureClicked(IXUIButton btn)
+ {
+ base.SetVisible(false);
+ this.m_doc.ReqRefined(ArtifactDeityStoveOpType.ArtifactDeityStove_RefineReplace);
+ return true;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/RefinedReplaceHandler.cs.meta b/Client/Assets/Scripts/XMainClient/UI/RefinedReplaceHandler.cs.meta
new file mode 100644
index 00000000..0096070a
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/RefinedReplaceHandler.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: a872e8ba7cccdb642907a94445e3fcc0
+timeCreated: 1611404295
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/RenameBehaviour.cs b/Client/Assets/Scripts/XMainClient/UI/RenameBehaviour.cs
new file mode 100644
index 00000000..eab328f0
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/RenameBehaviour.cs
@@ -0,0 +1,35 @@
+using System;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class RenameBehaviour : DlgBehaviourBase
+ {
+ public IXUISprite mClose;
+
+ public IXUILabel mMessage;
+
+ public IXUILabel mTitle;
+
+ public IXUIInput mInput;
+
+ public IXUILabel mInputText;
+
+ public IXUIButton mOk;
+
+ private void Awake()
+ {
+ this.mClose = (base.transform.Find("Bg/Close").GetComponent("XUISprite") as IXUISprite);
+ this.mMessage = (base.transform.Find("Bg/T").GetComponent("XUILabel") as IXUILabel);
+ this.mTitle = (base.transform.Find("Bg/pp/T").GetComponent("XUILabel") as IXUILabel);
+ Transform transform = base.transform.Find("Bg/p");
+ XSingleton<XDebug>.singleton.AddGreenLog("T = NULL?" + (transform == null).ToString(), null, null, null, null, null);
+ this.mInput = (base.transform.Find("Bg/p").GetComponent("XUIInput") as IXUIInput);
+ this.mInputText = (base.transform.Find("Bg/p/T").GetComponent("XUILabel") as IXUILabel);
+ this.mOk = (base.transform.Find("Bg/ok").GetComponent("XUIButton") as IXUIButton);
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/RenameBehaviour.cs.meta b/Client/Assets/Scripts/XMainClient/UI/RenameBehaviour.cs.meta
new file mode 100644
index 00000000..0ea804d1
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/RenameBehaviour.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 0cfc3e50fa6635e41beaf99da16d4309
+timeCreated: 1611403176
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/RenameDlg.cs b/Client/Assets/Scripts/XMainClient/UI/RenameDlg.cs
new file mode 100644
index 00000000..3a708078
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/RenameDlg.cs
@@ -0,0 +1,266 @@
+using System;
+using UILib;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class RenameDlg : DlgBase<RenameDlg, RenameBehaviour>
+ {
+ public override string fileName
+ {
+ get
+ {
+ return "GameSystem/ReNameDlg";
+ }
+ }
+
+ public override int layer
+ {
+ get
+ {
+ return 100;
+ }
+ }
+
+ public override bool isHideChat
+ {
+ get
+ {
+ return false;
+ }
+ }
+
+ public override bool autoload
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ private XRenameDocument _Doc;
+
+ private string mTargetName = string.Empty;
+
+ private XRenameDocument.RenameType curType = XRenameDocument.RenameType.PLAYER_NAME_COST;
+
+ public void ShowRenameSystem(XRenameDocument.RenameType type)
+ {
+ this.curType = type;
+ this.SetVisibleWithAnimation(true, null);
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ this._Doc = XDocuments.GetSpecificDocument<XRenameDocument>(XRenameDocument.uuID);
+ this.SwitchRenameShow();
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ base.uiBehaviour.mClose.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.ClickClose));
+ base.uiBehaviour.mOk.RegisterClickEventHandler(new ButtonClickEventHandler(this.ClickSure));
+ }
+
+ private void ClickClose(IXUISprite sprite)
+ {
+ this.SetVisibleWithAnimation(false, null);
+ }
+
+ private bool ClickSure(IXUIButton btn)
+ {
+ this.mTargetName = base.uiBehaviour.mInputText.GetText();
+ bool flag = string.IsNullOrEmpty(this.mTargetName) || this.mTargetName.Contains(" ");
+ bool result;
+ if (flag)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString("RenameInputNullString"), "fece00");
+ result = false;
+ }
+ else
+ {
+ string @string = XStringDefineProxy.GetString("RenameInputDefault");
+ bool flag2 = this.mTargetName.Equals(@string);
+ if (flag2)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString("RenameInputInputName"), "fece00");
+ result = false;
+ }
+ else
+ {
+ bool flag3 = this.mTargetName.Length > 8;
+ if (flag3)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString("RenamePlayerSizeErr"), "fece00");
+ result = false;
+ }
+ else
+ {
+ switch (this.curType)
+ {
+ case XRenameDocument.RenameType.GUILD_NAME_VOLUME:
+ this.SureGuildRenameVolume();
+ break;
+ case XRenameDocument.RenameType.PLAYER_NAME_VOLUME:
+ this.SurePlayerRenameVolume();
+ break;
+ case XRenameDocument.RenameType.PLAYER_NAME_COST:
+ this.SurePlayerRenameCost();
+ break;
+ case XRenameDocument.RenameType.DRAGON_GUILD_NAME_VOLUME:
+ this.SureDragonGuildRenameVolume();
+ break;
+ }
+ result = true;
+ }
+ }
+ }
+ return result;
+ }
+
+ private void SureDragonGuildRenameVolume()
+ {
+ XDragonGuildDocument doc = XDragonGuildDocument.Doc;
+ bool flag = doc.IsInDragonGuild();
+ if (flag)
+ {
+ bool flag2 = doc.Position > DragonGuildPosition.DGPOS_LEADER;
+ if (flag2)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString("ERR_DG_NO_PERMISSION"), "fece00");
+ }
+ else
+ {
+ this._Doc.SendDragonGuildRenameVolume(this.mTargetName);
+ }
+ }
+ else
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString("ERR_DG_NOT_IN_GUILD"), "fece00");
+ }
+ }
+
+ private void SureGuildRenameVolume()
+ {
+ XGuildDocument specificDocument = XDocuments.GetSpecificDocument<XGuildDocument>(XGuildDocument.uuID);
+ bool bInGuild = specificDocument.bInGuild;
+ if (bInGuild)
+ {
+ bool flag = specificDocument.Position > GuildPosition.GPOS_LEADER;
+ if (flag)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString("ERR_GUILD_NO_PERMISSION"), "fece00");
+ }
+ else
+ {
+ this._Doc.SendGuildRenameVolume(this.mTargetName);
+ }
+ }
+ else
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString("WORLDBOSS_NO_GUILD"), "fece00");
+ }
+ }
+
+ private void SurePlayerRenameVolume()
+ {
+ this._Doc.SendPlayerConstRename(this.mTargetName, true);
+ }
+
+ private void SurePlayerRenameCost()
+ {
+ uint level = XSingleton<XAttributeMgr>.singleton.XPlayerData.Level;
+ bool flag = (ulong)level < (ulong)((long)XSingleton<XGlobalConfig>.singleton.GetInt("RenamePlayerFreeCost"));
+ if (flag)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString("RenamePlayerLevelLow"), "fece00");
+ }
+ else
+ {
+ string label = (this._Doc.renameTimes < 1u) ? XStringDefineProxy.GetString("RenamePlayerSureChange", new object[]
+ {
+ this.mTargetName
+ }) : XStringDefineProxy.GetString("RenamePlayerSureCost", new object[]
+ {
+ this._Doc.GetRenameCost(this._Doc.renameTimes)
+ });
+ XSingleton<UiUtility>.singleton.ShowModalDialog(label, XStringDefineProxy.GetString("COMMON_OK"), XStringDefineProxy.GetString("COMMON_CANCEL"), new ButtonClickEventHandler(this.OnSurePlayerRename));
+ }
+ }
+
+ private bool OnSurePlayerRename(IXUIButton btn)
+ {
+ XSingleton<UiUtility>.singleton.CloseModalDlg();
+ this._Doc.SendPlayerConstRename(this.mTargetName, false);
+ return true;
+ }
+
+ private void SwitchRenameShow()
+ {
+ switch (this.curType)
+ {
+ case XRenameDocument.RenameType.GUILD_NAME_VOLUME:
+ this.ShowGuildRenameVolume();
+ break;
+ case XRenameDocument.RenameType.PLAYER_NAME_VOLUME:
+ this.ShowPlayerRenameVolume();
+ break;
+ case XRenameDocument.RenameType.PLAYER_NAME_COST:
+ this.ShowPlayerRenameCost();
+ break;
+ case XRenameDocument.RenameType.DRAGON_GUILD_NAME_VOLUME:
+ this.ShowDragonGuildRenameVolume();
+ break;
+ }
+ }
+
+ private void ShowPlayerRenameCost()
+ {
+ base.uiBehaviour.mInput.SetText(string.Empty);
+ base.uiBehaviour.mInputText.SetText(XStringDefineProxy.GetString("RenameInputDefault"));
+ base.uiBehaviour.mTitle.SetText(XStringDefineProxy.GetString("RenamePlayerTitle"));
+ bool flag = this._Doc.renameTimes < 1u;
+ if (flag)
+ {
+ base.uiBehaviour.mMessage.SetText(XStringDefineProxy.GetString("RenamePlayerFreeCost", new object[]
+ {
+ XSingleton<XGlobalConfig>.singleton.GetValue("RenamePlayerFreeCost")
+ }));
+ }
+ else
+ {
+ base.uiBehaviour.mMessage.SetText(XStringDefineProxy.GetString("RenamePlayerCost", new object[]
+ {
+ this._Doc.GetRenameCost(this._Doc.renameTimes)
+ }));
+ }
+ }
+
+ private void ShowPlayerRenameVolume()
+ {
+ base.uiBehaviour.mInput.SetText(string.Empty);
+ base.uiBehaviour.mInputText.SetText(XStringDefineProxy.GetString("RenameInputDefault"));
+ base.uiBehaviour.mTitle.SetText(XStringDefineProxy.GetString("RenamePlayerTitle"));
+ base.uiBehaviour.mMessage.SetText(string.Empty);
+ }
+
+ private void ShowGuildRenameVolume()
+ {
+ base.uiBehaviour.mInput.SetText(string.Empty);
+ base.uiBehaviour.mInputText.SetText(XStringDefineProxy.GetString("RenameInputDefault"));
+ base.uiBehaviour.mTitle.SetText(XStringDefineProxy.GetString("RenameGuildTitle"));
+ base.uiBehaviour.mMessage.SetText(string.Empty);
+ }
+
+ private void ShowDragonGuildRenameVolume()
+ {
+ base.uiBehaviour.mInput.SetText(string.Empty);
+ base.uiBehaviour.mInputText.SetText(XStringDefineProxy.GetString("RenameInputDefault"));
+ base.uiBehaviour.mTitle.SetText(XStringDefineProxy.GetString("RenameDragonGuildTitle"));
+ base.uiBehaviour.mMessage.SetText(string.Empty);
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/RenameDlg.cs.meta b/Client/Assets/Scripts/XMainClient/UI/RenameDlg.cs.meta
new file mode 100644
index 00000000..ddaea421
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/RenameDlg.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 9357bd29914fbb94cbacd6f1ab0469ca
+timeCreated: 1611404150
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/ReportMsg.cs b/Client/Assets/Scripts/XMainClient/UI/ReportMsg.cs
new file mode 100644
index 00000000..06d5b54e
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/ReportMsg.cs
@@ -0,0 +1,10 @@
+using System;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ public class ReportMsg : LoopItemData
+ {
+ public string content;
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/ReportMsg.cs.meta b/Client/Assets/Scripts/XMainClient/UI/ReportMsg.cs.meta
new file mode 100644
index 00000000..0f9502c4
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/ReportMsg.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 538063ee410954c44bd95d927dd58cce
+timeCreated: 1611403711
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/ReportNode.cs b/Client/Assets/Scripts/XMainClient/UI/ReportNode.cs
new file mode 100644
index 00000000..441dfac9
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/ReportNode.cs
@@ -0,0 +1,19 @@
+using System;
+using KKSG;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ public class ReportNode
+ {
+ public GuildTransfer.RowData row = new GuildTransfer.RowData();
+
+ public string up;
+
+ public string mid;
+
+ public string btm;
+
+ public GCFZhanChBriefInfo info;
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/ReportNode.cs.meta b/Client/Assets/Scripts/XMainClient/UI/ReportNode.cs.meta
new file mode 100644
index 00000000..32c88f83
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/ReportNode.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 798a414bb0b2f094e878e48d20204996
+timeCreated: 1611403986
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/RequestBehaviour.cs b/Client/Assets/Scripts/XMainClient/UI/RequestBehaviour.cs
new file mode 100644
index 00000000..268cbb0f
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/RequestBehaviour.cs
@@ -0,0 +1,25 @@
+using System;
+using UILib;
+using XMainClient.UI.UICommon;
+
+namespace XMainClient.UI
+{
+ internal class RequestBehaviour : DlgBehaviourBase
+ {
+ public IXUIButton m_Close;
+
+ public IXUIScrollView m_ScrollView;
+
+ public IXUIWrapContent m_WrapContent;
+
+ public IXUIButton m_ClearBtn;
+
+ private void Awake()
+ {
+ this.m_Close = (base.transform.Find("Bg/Close").GetComponent("XUIButton") as IXUIButton);
+ this.m_ScrollView = (base.transform.Find("Bg/List").GetComponent("XUIScrollView") as IXUIScrollView);
+ this.m_WrapContent = (base.transform.Find("Bg/List/WrapContent").GetComponent("XUIWrapContent") as IXUIWrapContent);
+ this.m_ClearBtn = (base.transform.Find("Bg/ClearBtn").GetComponent("XUIButton") as IXUIButton);
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/RequestBehaviour.cs.meta b/Client/Assets/Scripts/XMainClient/UI/RequestBehaviour.cs.meta
new file mode 100644
index 00000000..c45d6ba8
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/RequestBehaviour.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 1727e52b9b1efa74baca7279b279366f
+timeCreated: 1611403292
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/RequestDlg.cs b/Client/Assets/Scripts/XMainClient/UI/RequestDlg.cs
new file mode 100644
index 00000000..9f507bb3
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/RequestDlg.cs
@@ -0,0 +1,114 @@
+using System;
+using KKSG;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class RequestDlg : DlgBase<RequestDlg, RequestBehaviour>
+ {
+ public override bool autoload
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override string fileName
+ {
+ get
+ {
+ return "Guild/GuildCollect/RequestDlg";
+ }
+ }
+
+ private XRequestDocument _doc;
+
+ protected override void Init()
+ {
+ base.Init();
+ this._doc = XDocuments.GetSpecificDocument<XRequestDocument>(XRequestDocument.uuID);
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ base.uiBehaviour.m_Close.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnCloseBtnClick));
+ base.uiBehaviour.m_WrapContent.RegisterItemUpdateEventHandler(new WrapItemUpdateEventHandler(this.DesWrapListUpdated));
+ base.uiBehaviour.m_ClearBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnClearBtnClick));
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ this._doc.QueryRequestList();
+ }
+
+ protected override void OnHide()
+ {
+ base.OnHide();
+ }
+
+ protected override void OnUnload()
+ {
+ base.OnUnload();
+ }
+
+ public void Refresh(bool resetScrollPos = true)
+ {
+ base.uiBehaviour.m_WrapContent.SetContentCount(this._doc.List.Count, false);
+ if (resetScrollPos)
+ {
+ base.uiBehaviour.m_ScrollView.ResetPosition();
+ }
+ }
+
+ private void DesWrapListUpdated(Transform t, int index)
+ {
+ PartyExchangeItemInfo partyExchangeItemInfo = this._doc.List[index];
+ IXUISprite ixuisprite = t.Find("Head").GetComponent("XUISprite") as IXUISprite;
+ IXUILabel ixuilabel = t.Find("Name").GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel2 = t.Find("Level").GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel3 = t.Find("Prof").GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel4 = t.Find("Time").GetComponent("XUILabel") as IXUILabel;
+ IXUIButton ixuibutton = t.Find("YesBtn").GetComponent("XUIButton") as IXUIButton;
+ IXUIButton ixuibutton2 = t.Find("NoBtn").GetComponent("XUIButton") as IXUIButton;
+ ixuisprite.spriteName = XSingleton<XProfessionSkillMgr>.singleton.GetProfHeadIcon((int)partyExchangeItemInfo.profession_id);
+ ixuilabel.SetText(partyExchangeItemInfo.name);
+ ixuilabel2.SetText(partyExchangeItemInfo.level.ToString());
+ ixuilabel3.SetText(XSingleton<XProfessionSkillMgr>.singleton.GetProfName((int)partyExchangeItemInfo.profession_id));
+ ixuilabel4.SetText(XSingleton<UiUtility>.singleton.TimeAccFormatString((int)partyExchangeItemInfo.time, 3, 0) + XStringDefineProxy.GetString("AGO"));
+ ixuibutton.ID = partyExchangeItemInfo.role_id;
+ ixuibutton.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnYesBtnClick));
+ ixuibutton2.ID = partyExchangeItemInfo.role_id;
+ ixuibutton2.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnNoBtnClick));
+ }
+
+ private bool OnCloseBtnClick(IXUIButton btn)
+ {
+ this.SetVisibleWithAnimation(false, null);
+ return true;
+ }
+
+ private bool OnClearBtnClick(IXUIButton btn)
+ {
+ this._doc.ClearList();
+ return true;
+ }
+
+ private bool OnYesBtnClick(IXUIButton btn)
+ {
+ this._doc.QueryAcceptExchange(btn.ID);
+ return true;
+ }
+
+ private bool OnNoBtnClick(IXUIButton btn)
+ {
+ this._doc.QueryRefuseExchange(btn.ID);
+ return true;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/RequestDlg.cs.meta b/Client/Assets/Scripts/XMainClient/UI/RequestDlg.cs.meta
new file mode 100644
index 00000000..1a69e336
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/RequestDlg.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: a314f20ac555f404da6a26d47981b916
+timeCreated: 1611404259
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/ReviveDlg.cs b/Client/Assets/Scripts/XMainClient/UI/ReviveDlg.cs
new file mode 100644
index 00000000..1ce5bea6
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/ReviveDlg.cs
@@ -0,0 +1,127 @@
+using System;
+using KKSG;
+using UILib;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class ReviveDlg : DlgBase<ReviveDlg, ReviveDlgBehaviour>
+ {
+ public override string fileName
+ {
+ get
+ {
+ return "Battle/ReviveDlg";
+ }
+ }
+
+ public override int layer
+ {
+ get
+ {
+ return 1;
+ }
+ }
+
+ public override bool isMainUI
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ private XReviveDocument _doc = null;
+
+ private XWelfareDocument _welfareDoc = null;
+
+ protected override void Init()
+ {
+ base.Init();
+ this._doc = XDocuments.GetSpecificDocument<XReviveDocument>(XReviveDocument.uuID);
+ this._welfareDoc = XDocuments.GetSpecificDocument<XWelfareDocument>(XWelfareDocument.uuID);
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ base.uiBehaviour.m_CancelButton.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnCancelButtonClicked));
+ }
+
+ private bool OnReviveButtonClicked(IXUIButton button)
+ {
+ this._doc.SendReviveRpc(ReviveType.ReviveItem);
+ return true;
+ }
+
+ public void ShowSpecialReviveFrame()
+ {
+ string sprite = "";
+ string atlas = "";
+ XBagDocument.GetItemSmallIconAndAtlas((int)this._doc.SpecialCostID, out sprite, out atlas, 0u);
+ string label = string.Format(XSingleton<XStringTable>.singleton.GetString("REVIVE_COST_NOT_ENOUGH"), string.Format("{0}{1}", XLabelSymbolHelper.FormatImage(atlas, sprite), this._doc.SpecialCostCount));
+ XSingleton<UiUtility>.singleton.ShowModalDialog(label, XStringDefineProxy.GetString("COMMON_OK"), XStringDefineProxy.GetString("COMMON_CANCEL"), new ButtonClickEventHandler(this.OnSpecialReviveClicked));
+ }
+
+ private bool OnSpecialReviveClicked(IXUIButton button)
+ {
+ XSingleton<UiUtility>.singleton.CloseModalDlg();
+ this._doc.SendReviveRpc(ReviveType.ReviveMoney);
+ return true;
+ }
+
+ private bool OnVipReviveClicked(IXUIButton button)
+ {
+ this._doc.SendReviveRpc(ReviveType.ReviveVIP);
+ return true;
+ }
+
+ private bool OnCancelButtonClicked(IXUIButton button)
+ {
+ this.ShowReturnFrame();
+ return true;
+ }
+
+ private void ShowReturnFrame()
+ {
+ XSingleton<UiUtility>.singleton.ShowModalDialog(this._doc.LeaveSceneTip, XStringDefineProxy.GetString("COMMON_OK"), XStringDefineProxy.GetString("COMMON_CANCEL"), new ButtonClickEventHandler(this.OnReturnButtonClicked));
+ }
+
+ private bool OnReturnButtonClicked(IXUIButton button)
+ {
+ XSingleton<UiUtility>.singleton.CloseModalDlg();
+ this._doc.SendLeaveScene();
+ return true;
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ base.uiBehaviour.m_ReviveBuff.SetText(this._doc.BuffStringTip);
+ string strSprite = "";
+ string strAtlas = "";
+ int payMemberReviveLeftCount = this._welfareDoc.GetPayMemberReviveLeftCount();
+ bool flag = payMemberReviveLeftCount > 0 && this._doc.CanVipRevive && this._doc.VipReviveCount > 0u;
+ if (flag)
+ {
+ base.uiBehaviour.m_ReviveCostIcon.SetSprite(this._welfareDoc.GetMemberPrivilegeIcon(MemberPrivilege.KingdomPrivilege_Adventurer), XWelfareDocument.MEMBER_PRIVILEGE_ATLAS, false);
+ base.uiBehaviour.m_ReviveCost.SetText(this._doc.VipReviveCount.ToString());
+ base.uiBehaviour.m_ReviveButton.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnVipReviveClicked));
+ }
+ else
+ {
+ XBagDocument.GetItemSmallIconAndAtlas((int)this._doc.NormalCostID, out strSprite, out strAtlas, 0u);
+ base.uiBehaviour.m_ReviveCostIcon.SetSprite(strSprite, strAtlas, false);
+ base.uiBehaviour.m_ReviveCost.SetText(this._doc.NormalCostCount.ToString());
+ base.uiBehaviour.m_ReviveButton.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnReviveButtonClicked));
+ }
+ base.uiBehaviour.m_ReviveLeftTime.SetText(XStringDefineProxy.GetString("LEFT_REVIVE_COUNT", new object[]
+ {
+ this._doc.ReviveMaxTime - this._doc.ReviveUsedTime,
+ this._doc.ReviveMaxTime
+ }));
+ base.uiBehaviour.m_ReviveFrameTween.PlayTween(true, -1f);
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/ReviveDlg.cs.meta b/Client/Assets/Scripts/XMainClient/UI/ReviveDlg.cs.meta
new file mode 100644
index 00000000..f681ae43
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/ReviveDlg.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 80f60810c8177d6428784fa6df1be9d2
+timeCreated: 1611404035
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/ReviveDlgBehaviour.cs b/Client/Assets/Scripts/XMainClient/UI/ReviveDlgBehaviour.cs
new file mode 100644
index 00000000..e3c8f0c8
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/ReviveDlgBehaviour.cs
@@ -0,0 +1,39 @@
+using System;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+
+namespace XMainClient.UI
+{
+ internal class ReviveDlgBehaviour : DlgBehaviourBase
+ {
+ public Transform m_ReviveFrame;
+
+ public IXUITweenTool m_ReviveFrameTween;
+
+ public IXUIButton m_ReviveButton;
+
+ public IXUIButton m_CancelButton;
+
+ public IXUILabel m_ReviveCost;
+
+ public IXUISprite m_ReviveCostIcon;
+
+ public IXUILabel m_ReviveBuff;
+
+ public IXUILabel m_ReviveLeftTime;
+
+ private void Awake()
+ {
+ this.m_ReviveFrame = base.transform.Find("Frame/ReviveFrame");
+ this.m_ReviveFrameTween = (this.m_ReviveFrame.GetComponent("XUIPlayTween") as IXUITweenTool);
+ this.m_ReviveButton = (this.m_ReviveFrame.Find("Revive").GetComponent("XUIButton") as IXUIButton);
+ this.m_CancelButton = (this.m_ReviveFrame.Find("Cancel").GetComponent("XUIButton") as IXUIButton);
+ this.m_ReviveCost = (this.m_ReviveFrame.Find("Revive/Cost").GetComponent("XUILabel") as IXUILabel);
+ this.m_ReviveCostIcon = (this.m_ReviveFrame.Find("Revive/Cost/Icon").GetComponent("XUISprite") as IXUISprite);
+ this.m_ReviveBuff = (this.m_ReviveFrame.Find("Buff").GetComponent("XUILabel") as IXUILabel);
+ this.m_ReviveLeftTime = (this.m_ReviveFrame.Find("Revive/LeftTime").GetComponent("XUILabel") as IXUILabel);
+ this.m_ReviveFrame.gameObject.SetActive(false);
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/ReviveDlgBehaviour.cs.meta b/Client/Assets/Scripts/XMainClient/UI/ReviveDlgBehaviour.cs.meta
new file mode 100644
index 00000000..b30072ef
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/ReviveDlgBehaviour.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 8d11dee2567c4f44998fbd0a726831e6
+timeCreated: 1611404103
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/RewardSystemDlg.cs b/Client/Assets/Scripts/XMainClient/UI/RewardSystemDlg.cs
new file mode 100644
index 00000000..0d7f8c6e
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/RewardSystemDlg.cs
@@ -0,0 +1,136 @@
+using System;
+using UnityEngine;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class RewardSystemDlg : TabDlgBase<RewardSystemDlg>
+ {
+ public override string fileName
+ {
+ get
+ {
+ return "GameSystem/RewardDlg";
+ }
+ }
+
+ public override int group
+ {
+ get
+ {
+ return 1;
+ }
+ }
+
+ protected override bool bHorizontal
+ {
+ get
+ {
+ return false;
+ }
+ }
+
+ public XAchieveView _AchieveView;
+
+ public XTargetRewardView _TargetRewardView;
+
+ public XRewardLevelView _LevelRewardView;
+
+ public XServerActivityView _ServerActivityView;
+
+ public XDragonRwdHandler _DragonView;
+
+ private Transform _bg;
+
+ public GameObject m_AchievementPanel;
+
+ public GameObject m_TargetRewardPanel;
+
+ public GameObject m_LevelRewardPanel;
+
+ public GameObject m_ServerActivePanel;
+
+ public GameObject m_dragonPanel;
+
+ private GameObject _sharePanel;
+
+ private WeekShareRewardHandler _shareHandler;
+
+ protected override void Init()
+ {
+ base.Init();
+ base.RegisterSubSysRedPointMgr(XSysDefine.XSys_Reward);
+ }
+
+ protected override void OnLoad()
+ {
+ base.OnLoad();
+ this._bg = base.uiBehaviour.transform.Find("Bg");
+ this.m_AchievementPanel = base.uiBehaviour.transform.Find("Bg/AchievementFrame").gameObject;
+ this.m_AchievementPanel.SetActive(false);
+ this.m_TargetRewardPanel = base.uiBehaviour.transform.Find("Bg/TargetReward").gameObject;
+ this.m_TargetRewardPanel.SetActive(false);
+ this.m_LevelRewardPanel = base.uiBehaviour.transform.Find("Bg/LevelFrame").gameObject;
+ this.m_LevelRewardPanel.SetActive(false);
+ this.m_ServerActivePanel = base.uiBehaviour.transform.Find("Bg/ServerActivityFrame").gameObject;
+ this.m_ServerActivePanel.SetActive(false);
+ this._sharePanel = base.uiBehaviour.transform.Find("Bg/ShareFrame").gameObject;
+ this._sharePanel.SetActive(false);
+ this.m_dragonPanel = base.uiBehaviour.transform.Find("Bg/DragonFrame").gameObject;
+ this.m_dragonPanel.SetActive(false);
+ }
+
+ protected override void OnUnload()
+ {
+ DlgHandlerBase.EnsureUnload<XAchieveView>(ref this._AchieveView);
+ DlgHandlerBase.EnsureUnload<XTargetRewardView>(ref this._TargetRewardView);
+ DlgHandlerBase.EnsureUnload<XServerActivityView>(ref this._ServerActivityView);
+ DlgHandlerBase.EnsureUnload<XRewardLevelView>(ref this._LevelRewardView);
+ DlgHandlerBase.EnsureUnload<WeekShareRewardHandler>(ref this._shareHandler);
+ DlgHandlerBase.EnsureUnload<XDragonRwdHandler>(ref this._DragonView);
+ base.OnUnload();
+ }
+
+ public override void SetupHandlers(XSysDefine sys)
+ {
+ XSysDefine xsysDefine = sys;
+ if (xsysDefine <= XSysDefine.XSys_WeekShareReward)
+ {
+ if (xsysDefine == XSysDefine.XSys_ServerActivity)
+ {
+ base._AddActiveHandler(DlgHandlerBase.EnsureCreate<XServerActivityView>(ref this._ServerActivityView, this.m_ServerActivePanel, this, true));
+ return;
+ }
+ if (xsysDefine == XSysDefine.XSys_LevelReward)
+ {
+ base._AddActiveHandler(DlgHandlerBase.EnsureCreate<XRewardLevelView>(ref this._LevelRewardView, this.m_LevelRewardPanel, this, true));
+ return;
+ }
+ if (xsysDefine == XSysDefine.XSys_WeekShareReward)
+ {
+ base._AddActiveHandler(DlgHandlerBase.EnsureCreate<WeekShareRewardHandler>(ref this._shareHandler, this._sharePanel, this, true));
+ return;
+ }
+ }
+ else
+ {
+ if (xsysDefine == XSysDefine.XSys_Design_Achieve)
+ {
+ base._AddActiveHandler(DlgHandlerBase.EnsureCreate<XAchieveView>(ref this._AchieveView, this.m_AchievementPanel, this, true));
+ return;
+ }
+ if (xsysDefine == XSysDefine.XSys_Reward_Dragon)
+ {
+ base._AddActiveHandler(DlgHandlerBase.EnsureCreate<XDragonRwdHandler>(ref this._DragonView, this.m_dragonPanel, this, true));
+ return;
+ }
+ if (xsysDefine == XSysDefine.XSys_Reward_Target)
+ {
+ base._AddActiveHandler(DlgHandlerBase.EnsureCreate<XTargetRewardView>(ref this._TargetRewardView, this.m_TargetRewardPanel, this, true));
+ return;
+ }
+ }
+ XSingleton<XDebug>.singleton.AddErrorLog("System has not finished:", sys.ToString(), null, null, null, null);
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/RewardSystemDlg.cs.meta b/Client/Assets/Scripts/XMainClient/UI/RewardSystemDlg.cs.meta
new file mode 100644
index 00000000..1b353a0b
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/RewardSystemDlg.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 834fc5cb37d85ea4fb2a89f6be320a36
+timeCreated: 1611404044
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/RewdAnimBehaviour.cs b/Client/Assets/Scripts/XMainClient/UI/RewdAnimBehaviour.cs
new file mode 100644
index 00000000..211149f2
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/RewdAnimBehaviour.cs
@@ -0,0 +1,30 @@
+using System;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+
+namespace XMainClient.UI
+{
+ internal class RewdAnimBehaviour : DlgBehaviourBase
+ {
+ public GameObject m_objTmp;
+
+ public IXUIButton m_btnok;
+
+ public IXUITweenTool m_tweenbg;
+
+ public IXUITweenTool m_tweentitle;
+
+ public IXUILabel m_TitleLabel;
+
+ private void Awake()
+ {
+ Transform transform = base.transform.Find("Bg/ItemTpl");
+ this.m_btnok = (base.transform.Find("OK").GetComponent("XUIButton") as IXUIButton);
+ this.m_tweenbg = (base.transform.Find("CriticalConfirm/P").GetComponent("XUIPlayTween") as IXUITweenTool);
+ this.m_tweentitle = (base.transform.Find("CriticalConfirm/P/titleLabel").GetComponent("XUIPlayTween") as IXUITweenTool);
+ this.m_TitleLabel = (base.transform.Find("CriticalConfirm/P/titleLabel").GetComponent("XUILabel") as IXUILabel);
+ this.m_objTmp = base.transform.Find("items/tmp").gameObject;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/RewdAnimBehaviour.cs.meta b/Client/Assets/Scripts/XMainClient/UI/RewdAnimBehaviour.cs.meta
new file mode 100644
index 00000000..01ed04ff
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/RewdAnimBehaviour.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: c0215980f62b06c4389559c51084da81
+timeCreated: 1611404485
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/RewdAnimDlg.cs b/Client/Assets/Scripts/XMainClient/UI/RewdAnimDlg.cs
new file mode 100644
index 00000000..a5276b22
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/RewdAnimDlg.cs
@@ -0,0 +1,261 @@
+using System;
+using System.Collections.Generic;
+using KKSG;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class RewdAnimDlg : DlgBase<RewdAnimDlg, RewdAnimBehaviour>
+ {
+ public override string fileName
+ {
+ get
+ {
+ return "GameSystem/RewdAnimDlg";
+ }
+ }
+
+ public override bool autoload
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override bool isHideChat
+ {
+ get
+ {
+ return false;
+ }
+ }
+
+ public override bool isHideTutorial
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override bool isPopup
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ private int[] m_to_x = new int[10];
+
+ private int[] m_from_x = new int[10];
+
+ private bool ani_start = false;
+
+ private float ani_duration = 1f;
+
+ private float ani_time = 0f;
+
+ private int items_cnt = 1;
+
+ private int ani_sped = 1;
+
+ private Vector3 items_pos;
+
+ private List<ItemBrief> m_items;
+
+ private List<Item> m_xitems;
+
+ private List<GameObject> m_objlist = new List<GameObject>();
+
+ private Action m_delClose;
+
+ private XUIPool m_pool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ base.uiBehaviour.m_btnok.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnOKClick));
+ }
+
+ protected override void Init()
+ {
+ base.Init();
+ this.m_pool.SetupPool(this.m_uiBehaviour.m_objTmp.transform.parent.gameObject, this.m_uiBehaviour.m_objTmp, 3u, true);
+ }
+
+ public void Show(List<Item> items, Action onclose)
+ {
+ List<ItemBrief> list = new List<ItemBrief>();
+ for (int i = 0; i < items.Count; i++)
+ {
+ list.Add(new ItemBrief
+ {
+ itemID = items[i].ItemID,
+ itemCount = items[i].ItemCount
+ });
+ }
+ this.Show(list, onclose);
+ this.m_xitems = items;
+ }
+
+ public void Show(List<ItemBrief> items, List<Item> xitems, Action onClose)
+ {
+ List<ItemBrief> list = new List<ItemBrief>();
+ for (int i = 0; i < items.Count; i++)
+ {
+ list.Add(new ItemBrief
+ {
+ itemID = items[i].itemID,
+ itemCount = items[i].itemCount
+ });
+ }
+ for (int j = 0; j < xitems.Count; j++)
+ {
+ list.Add(new ItemBrief
+ {
+ itemID = xitems[j].ItemID,
+ itemCount = xitems[j].ItemCount
+ });
+ }
+ this.Show(list, onClose);
+ this.m_xitems = xitems;
+ }
+
+ public void Show(List<ItemBrief> items, Action onClose)
+ {
+ int num = 10;
+ bool flag = items.Count > num;
+ if (flag)
+ {
+ items.RemoveRange(num, items.Count - num);
+ }
+ this.m_delClose = onClose;
+ bool flag2 = this.m_xitems != null;
+ if (flag2)
+ {
+ this.m_xitems.Clear();
+ }
+ this.m_items = items;
+ this.SetVisibleWithAnimation(true, null);
+ }
+
+ public void ShowByTitle(List<ItemBrief> items, string title, Action onClose)
+ {
+ this.Show(items, onClose);
+ base.uiBehaviour.m_TitleLabel.SetText(title);
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ base.uiBehaviour.m_tweenbg.ResetTween(true);
+ base.uiBehaviour.m_tweentitle.ResetTween(true);
+ base.uiBehaviour.m_tweenbg.PlayTween(true, -1f);
+ base.uiBehaviour.m_tweentitle.PlayTween(true, -1f);
+ this.m_pool.ReturnAll(false);
+ this.m_objlist.Clear();
+ this.OnTweenEnd(null);
+ this.items_cnt = this.m_items.Count;
+ for (int i = 0; i < this.items_cnt; i++)
+ {
+ GameObject gameObject = this.m_pool.FetchGameObject(false);
+ this.m_objlist.Add(gameObject);
+ ItemList.RowData itemConf = XBagDocument.GetItemConf((int)this.m_items[i].itemID);
+ XSingleton<XItemDrawerMgr>.singleton.normalItemDrawer.DrawItem(gameObject, (int)this.m_items[i].itemID, (int)this.m_items[i].itemCount, false);
+ IXUISprite ixuisprite = gameObject.transform.Find("Icon").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.ID = (ulong)this.m_items[i].itemID;
+ ixuisprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.ShowTips));
+ int num = (this.items_cnt % 2 == 0) ? ((int)((float)i - (float)this.items_cnt / 2f) * 100 + 50) : ((int)((float)i - (float)(this.items_cnt - 1) / 2f) * 100);
+ this.m_to_x[i] = num;
+ int num2 = (this.items_cnt % 2 == 0) ? ((int)(-(int)((float)this.items_cnt / 2f)) * 100 + 50) : ((int)((float)(-(float)(this.items_cnt - 1)) / 2f) * 100);
+ this.m_from_x[i] = 0;
+ this.items_pos = new Vector3(0f, 14f, 0f);
+ gameObject.transform.localPosition = this.items_pos;
+ }
+ }
+
+ private void ShowTips(IXUISprite spr)
+ {
+ bool flag = this.m_xitems != null;
+ if (flag)
+ {
+ for (int i = 0; i < this.m_xitems.Count; i++)
+ {
+ bool flag2 = (ulong)this.m_xitems[i].ItemID == spr.ID;
+ if (flag2)
+ {
+ XItem mainItem = XBagDocument.MakeXItem(this.m_xitems[i]);
+ XSingleton<UiUtility>.singleton.ShowTooltipDialogWithSearchingCompare(mainItem, spr, false, 0u);
+ return;
+ }
+ }
+ }
+ bool flag3 = this.m_items != null;
+ if (flag3)
+ {
+ for (int j = 0; j < this.m_items.Count; j++)
+ {
+ bool flag4 = (ulong)this.m_items[j].itemID == spr.ID;
+ if (flag4)
+ {
+ XItem mainItem2 = XBagDocument.MakeXItem((int)this.m_items[j].itemID, this.m_items[j].isbind);
+ XSingleton<UiUtility>.singleton.ShowTooltipDialogWithSearchingCompare(mainItem2, spr, false, 0u);
+ return;
+ }
+ }
+ }
+ XItem mainItem3 = XBagDocument.MakeXItem((int)spr.ID, false);
+ XSingleton<UiUtility>.singleton.ShowTooltipDialogWithSearchingCompare(mainItem3, spr, false, 0u);
+ }
+
+ public override void OnUpdate()
+ {
+ bool flag = this.ani_start;
+ if (flag)
+ {
+ bool flag2 = Time.realtimeSinceStartup - this.ani_time >= this.ani_duration;
+ if (flag2)
+ {
+ this.ani_start = false;
+ }
+ else
+ {
+ for (int i = 0; i < this.items_cnt; i++)
+ {
+ this.items_pos.x = Mathf.Lerp((float)this.m_from_x[i], (float)this.m_to_x[i], (float)this.ani_sped * (Time.realtimeSinceStartup - this.ani_time / this.ani_duration));
+ bool flag3 = this.m_objlist.Count > i && this.m_objlist[i] != null;
+ if (flag3)
+ {
+ this.m_objlist[i].transform.localPosition = this.items_pos;
+ }
+ }
+ }
+ }
+ base.OnUpdate();
+ }
+
+ private void OnTweenEnd(IXUITweenTool tween)
+ {
+ this.ani_time = Time.realtimeSinceStartup;
+ this.ani_duration = 1f;
+ this.ani_start = true;
+ this.ani_sped = 6;
+ }
+
+ private bool OnOKClick(IXUIButton btn)
+ {
+ this.SetVisible(false, true);
+ bool flag = this.m_delClose != null;
+ if (flag)
+ {
+ this.m_delClose();
+ }
+ return true;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/RewdAnimDlg.cs.meta b/Client/Assets/Scripts/XMainClient/UI/RewdAnimDlg.cs.meta
new file mode 100644
index 00000000..7ce95521
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/RewdAnimDlg.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 62bf5131901edcf46948d59564e2beaa
+timeCreated: 1611403841
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/RoundFlag.cs b/Client/Assets/Scripts/XMainClient/UI/RoundFlag.cs
new file mode 100644
index 00000000..20ab5848
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/RoundFlag.cs
@@ -0,0 +1,11 @@
+using System;
+
+namespace XMainClient.UI
+{
+ public enum RoundFlag
+ {
+ EightToFour = 1,
+ FourToTwo,
+ TwoToOne
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/RoundFlag.cs.meta b/Client/Assets/Scripts/XMainClient/UI/RoundFlag.cs.meta
new file mode 100644
index 00000000..f25fa442
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/RoundFlag.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 5c2b53649d33e6d47b8af6758e037987
+timeCreated: 1611403801
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/ScreenShotShareBehaviour.cs b/Client/Assets/Scripts/XMainClient/UI/ScreenShotShareBehaviour.cs
new file mode 100644
index 00000000..a9ccadf6
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/ScreenShotShareBehaviour.cs
@@ -0,0 +1,198 @@
+using System;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class ScreenShotShareBehaviour : DlgBehaviourBase
+ {
+ public GameObject mCharFrame;
+
+ public IXUITweenTool mQQPlayTween;
+
+ public IXUITweenTool mWCPlayTween;
+
+ public IXUISprite mQQFrame;
+
+ public IXUISprite mWeChatFrame;
+
+ public IXUIButton mQQBtn1;
+
+ public IXUIButton mQQBtn2;
+
+ public IXUIButton mWeChatBtn1;
+
+ public IXUIButton mWeChatBtn2;
+
+ public IXUIButton mDoScreenShot;
+
+ public IUIDummy mSnapShot;
+
+ public IXUIButton mClose;
+
+ public GameObject mShareFrame;
+
+ public IXUISprite mKacha;
+
+ public IXUISprite mKachaFrame;
+
+ public IXUIButton mReqShareBtn;
+
+ public IXUIButton mSnapShotAgain;
+
+ public IXUITweenTool mPlayTween;
+
+ public IXUITweenTool mPicFramePlayTween;
+
+ public IXUITexture mCaptureTexture;
+
+ public GameObject mScaleDoing;
+
+ public IXUISprite mSnapRoot;
+
+ public IXUISprite mQQBackClick;
+
+ public IXUISprite mWeChatBackClick;
+
+ public IXUIButton mReqSave;
+
+ public IXUISprite mModeSp;
+
+ public IXUISprite mModeSelect;
+
+ public IXUISprite mModeBack;
+
+ public IXUISprite mDanceSp;
+
+ public IXUISprite mDanceSelect;
+
+ public IXUISprite mDanceBack;
+
+ public IXUIPanel mDanceBackSV;
+
+ public IXUIList mDanceBackList;
+
+ public IXUISprite mEffectsSp;
+
+ public IXUISprite mEffectsSelect;
+
+ public IXUISprite mEffectsBack;
+
+ public IXUISprite mEffectsMore;
+
+ public IXUISprite mEffectsRedpoint;
+
+ public IXUISprite mUnlockFrame;
+
+ public IXUISprite mUnlockCondition;
+
+ public IXUISprite mUnlockOption;
+
+ public IXUISprite mUnlockBack;
+
+ public IXUISprite mUnlockEffectWindow;
+
+ public Transform mEffectParent;
+
+ public IXUISlider mZoomSlider;
+
+ public GameObject mZoom;
+
+ public IXUISprite mThumb;
+
+ public GameObject mLogo;
+
+ public GameObject mLogoQQ;
+
+ public GameObject mLogoWC;
+
+ public IXUILabel mPlayerName;
+
+ public IXUILabel mServerName;
+
+ public IXUISprite mModeBg;
+
+ public IXUISprite mDanceBg;
+
+ public IXUISprite mEffectBg;
+
+ public XUIPool mModePool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ public XUIPool mDancePool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ public XUIPool mEffectPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ public XUIPool mEffectListPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ public XUIPool mConditionPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ private void Awake()
+ {
+ this.mCharFrame = base.transform.Find("CharacterFrame").gameObject;
+ this.mShareFrame = base.transform.Find("Bg/sharebutton").gameObject;
+ this.mQQFrame = (base.transform.Find("Bg/sharebutton/QQ").GetComponent("XUISprite") as IXUISprite);
+ this.mQQPlayTween = (base.transform.Find("Bg/sharebutton/QQ").GetComponent("XUIPlayTween") as IXUITweenTool);
+ this.mWCPlayTween = (base.transform.Find("Bg/sharebutton/Wc").GetComponent("XUIPlayTween") as IXUITweenTool);
+ this.mWeChatFrame = (base.transform.Find("Bg/sharebutton/Wc").GetComponent("XUISprite") as IXUISprite);
+ this.mQQBtn1 = (base.transform.Find("Bg/sharebutton/QQ/QQ1").GetComponent("XUIButton") as IXUIButton);
+ this.mQQBtn2 = (base.transform.Find("Bg/sharebutton/QQ/QQ2").GetComponent("XUIButton") as IXUIButton);
+ this.mWeChatBtn1 = (base.transform.Find("Bg/sharebutton/Wc/Wc1").GetComponent("XUIButton") as IXUIButton);
+ this.mWeChatBtn2 = (base.transform.Find("Bg/sharebutton/Wc/Wc2").GetComponent("XUIButton") as IXUIButton);
+ this.mDoScreenShot = (base.transform.Find("Bg/kacha/Ok").GetComponent("XUIButton") as IXUIButton);
+ this.mSnapShot = (base.transform.Find("CharacterFrame/SnapRoot/Snapshot").GetComponent("UIDummy") as IUIDummy);
+ this.mKachaFrame = (base.transform.Find("Bg/kacha").GetComponent("XUISprite") as IXUISprite);
+ this.mClose = (base.transform.Find("Bg/kacha/Close").GetComponent("XUIButton") as IXUIButton);
+ this.mKacha = (base.transform.Find("Bg/kacha/kacha").GetComponent("XUISprite") as IXUISprite);
+ this.mReqShareBtn = (base.transform.Find("Bg/sharebutton/SwitchAccount").GetComponent("XUIButton") as IXUIButton);
+ this.mSnapShotAgain = (base.transform.Find("Bg/sharebutton/Again").GetComponent("XUIButton") as IXUIButton);
+ this.mPlayTween = (base.transform.Find("Bg/kacha/kacha").GetComponent("XUIPlayTween") as IXUITweenTool);
+ this.mPicFramePlayTween = (base.transform.Find("Bg/sharebutton").GetComponent("XUIPlayTween") as IXUITweenTool);
+ this.mCaptureTexture = (base.transform.Find("Bg/sharebutton").GetComponent("XUITexture") as IXUITexture);
+ this.mScaleDoing = base.transform.Find("Bg/kacha/Ok/doing").gameObject;
+ this.mSnapRoot = (base.transform.Find("CharacterFrame/SnapRoot").GetComponent("XUISprite") as IXUISprite);
+ this.mQQBackClick = (base.transform.Find("Bg/sharebutton/QQ/back").GetComponent("XUISprite") as IXUISprite);
+ this.mWeChatBackClick = (base.transform.Find("Bg/sharebutton/Wc/back").GetComponent("XUISprite") as IXUISprite);
+ this.mReqSave = (base.transform.Find("Bg/sharebutton/Save").GetComponent("XUIButton") as IXUIButton);
+ this.mEffectParent = base.transform.Find("CharacterFrame/effect");
+ this.mModeSp = (base.transform.Find("Bg/kacha/Mode").GetComponent("XUISprite") as IXUISprite);
+ this.mModeSelect = (base.transform.Find("Bg/kacha/Mode/Select").GetComponent("XUISprite") as IXUISprite);
+ this.mModeBack = (base.transform.Find("Bg/kacha/Mode/Select/bar").GetComponent("XUISprite") as IXUISprite);
+ this.mDanceSp = (base.transform.Find("Bg/kacha/Dance").GetComponent("XUISprite") as IXUISprite);
+ this.mDanceSelect = (base.transform.Find("Bg/kacha/Dance/Select").GetComponent("XUISprite") as IXUISprite);
+ this.mDanceBack = (base.transform.Find("Bg/kacha/Dance/Select/bar").GetComponent("XUISprite") as IXUISprite);
+ this.mDanceBackSV = (base.transform.Find("Bg/kacha/Dance/Select/option").GetComponent("XUIPanel") as IXUIPanel);
+ this.mDanceBackList = (base.transform.Find("Bg/kacha/Dance/Select/option/grid").GetComponent("XUIList") as IXUIList);
+ this.mEffectsSp = (base.transform.Find("Bg/kacha/Effects").GetComponent("XUISprite") as IXUISprite);
+ this.mEffectsSelect = (base.transform.Find("Bg/kacha/Effects/Select").GetComponent("XUISprite") as IXUISprite);
+ this.mEffectsBack = (base.transform.Find("Bg/kacha/Effects/Select/bar").GetComponent("XUISprite") as IXUISprite);
+ this.mEffectsMore = (base.transform.Find("Bg/kacha/Effects/Select/option/more").GetComponent("XUISprite") as IXUISprite);
+ this.mEffectsRedpoint = (base.transform.Find("Bg/kacha/Effects/Select/option/more/redpoint").GetComponent("XUISprite") as IXUISprite);
+ this.mUnlockFrame = (base.transform.Find("Bg/kacha/unlock").GetComponent("XUISprite") as IXUISprite);
+ this.mUnlockOption = (base.transform.Find("Bg/kacha/unlock/unlock/option1").GetComponent("XUISprite") as IXUISprite);
+ this.mUnlockCondition = (base.transform.Find("Bg/kacha/unlock/condition/condition1").GetComponent("XUISprite") as IXUISprite);
+ this.mUnlockBack = (base.transform.Find("Bg/kacha/unlock/back").GetComponent("XUISprite") as IXUISprite);
+ this.mUnlockEffectWindow = (base.transform.Find("Bg/kacha/unlock/window").GetComponent("XUISprite") as IXUISprite);
+ this.mZoomSlider = (base.transform.Find("Bg/kacha/bar/bar").GetComponent("XUISlider") as IXUISlider);
+ this.mThumb = (base.transform.Find("Bg/kacha/Mode").GetComponent("XUISprite") as IXUISprite);
+ this.mZoom = base.transform.Find("Bg/kacha/bar").gameObject;
+ this.mLogo = base.transform.Find("Bg/kacha/Logo").gameObject;
+ this.mLogoQQ = base.transform.Find("Bg/kacha/Logo/LogoQQ").gameObject;
+ this.mLogoWC = base.transform.Find("Bg/kacha/Logo/LogoWC").gameObject;
+ this.mPlayerName = (base.transform.Find("Bg/kacha/Logo/label/name").GetComponent("XUILabel") as IXUILabel);
+ this.mServerName = (base.transform.Find("Bg/kacha/Logo/label/fuwuqi").GetComponent("XUILabel") as IXUILabel);
+ this.mModeBg = (base.transform.Find("Bg/kacha/Mode/Select/bg").GetComponent("XUISprite") as IXUISprite);
+ this.mModeBg.ID = 1UL;
+ this.mDanceBg = (base.transform.Find("Bg/kacha/Dance/Select/bg").GetComponent("XUISprite") as IXUISprite);
+ this.mDanceBg.ID = 2UL;
+ this.mEffectBg = (base.transform.Find("Bg/kacha/Effects/Select/bg").GetComponent("XUISprite") as IXUISprite);
+ this.mEffectBg.ID = 3UL;
+ this.mModePool.SetupPool(this.mModeSelect.gameObject, this.mModeSelect.transform.Find("option").gameObject, 5u, false);
+ this.mDancePool.SetupPool(this.mDanceBackList.gameObject, this.mDanceBackList.gameObject.transform.Find("option1").gameObject, 5u, false);
+ this.mEffectPool.SetupPool(this.mEffectsSelect.transform.Find("option").gameObject, this.mEffectsSelect.transform.Find("option/option1").gameObject, 5u, false);
+ this.mEffectListPool.SetupPool(this.mUnlockOption.parent.gameObject, this.mUnlockOption.gameObject, 5u, false);
+ this.mConditionPool.SetupPool(this.mUnlockCondition.parent.gameObject, this.mUnlockCondition.gameObject, 5u, false);
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/ScreenShotShareBehaviour.cs.meta b/Client/Assets/Scripts/XMainClient/UI/ScreenShotShareBehaviour.cs.meta
new file mode 100644
index 00000000..ed604dfc
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/ScreenShotShareBehaviour.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: a1806ea9d97939749bdf70afe47a381a
+timeCreated: 1611404253
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/ScreenShotShareView.cs b/Client/Assets/Scripts/XMainClient/UI/ScreenShotShareView.cs
new file mode 100644
index 00000000..2d284520
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/ScreenShotShareView.cs
@@ -0,0 +1,1116 @@
+using System;
+using System.Collections.Generic;
+using System.IO;
+using KKSG;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUpdater;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class ScreenShotShareView : DlgBase<ScreenShotShareView, ScreenShotShareBehaviour>
+ {
+ public override string fileName
+ {
+ get
+ {
+ return "Common/Share";
+ }
+ }
+
+ public override int layer
+ {
+ get
+ {
+ return 1;
+ }
+ }
+
+ public override bool autoload
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override bool hideMainMenu
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override int group
+ {
+ get
+ {
+ return 1;
+ }
+ }
+
+ private XScreenShotShareDocument _doc = null;
+
+ private int _share_count = 0;
+
+ private uint _dance_timer_token = 0u;
+
+ private uint _check_pic_token = 0u;
+
+ private XFx _playing_fx = null;
+
+ private float _max_dist = 9f;
+
+ private float _min_dist = 3f;
+
+ private HashSet<uint> _check_index = new HashSet<uint>();
+
+ private List<GameObject> _mode_go = new List<GameObject>();
+
+ private List<GameObject> _mode_effectgo = new List<GameObject>();
+
+ private string _saved_file_path = "";
+
+ private int _dance_num = 0;
+
+ private XFx fx;
+
+ protected override void Init()
+ {
+ this._doc = XDocuments.GetSpecificDocument<XScreenShotShareDocument>(XScreenShotShareDocument.uuID);
+ this._doc.ScreenShotView = this;
+ string value = XSingleton<XGlobalConfig>.singleton.GetValue("CameraValue");
+ string[] array = value.Split(new char[]
+ {
+ '|'
+ });
+ this._min_dist = float.Parse(array[0]);
+ this._max_dist = float.Parse(array[1]);
+ this.fx = XSingleton<XFxMgr>.singleton.CreateUIFx("Effects/FX_Particle/UIfx/UI_Share", base.uiBehaviour.mEffectParent, false);
+ this.InitLeftMenu();
+ }
+
+ public override void RegisterEvent()
+ {
+ base.uiBehaviour.mQQBtn1.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnQQShareSession));
+ base.uiBehaviour.mQQBtn2.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnQQShareQZone));
+ base.uiBehaviour.mWeChatBtn1.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnWeChatShareSession));
+ base.uiBehaviour.mWeChatBtn2.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnWeChatShareTimeLine));
+ base.uiBehaviour.mClose.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnClose));
+ base.uiBehaviour.mDoScreenShot.RegisterClickEventHandler(new ButtonClickEventHandler(this.CaptureScreenShot));
+ base.uiBehaviour.mReqShareBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.ReqShare));
+ base.uiBehaviour.mSnapShotAgain.RegisterClickEventHandler(new ButtonClickEventHandler(this.ReScreenShot));
+ base.uiBehaviour.mQQBackClick.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnCloseShare));
+ base.uiBehaviour.mWeChatBackClick.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnCloseShare));
+ base.uiBehaviour.mSnapRoot.RegisterSpriteDragEventHandler(new SpriteDragEventHandler(this.OnCharacterWindowDrag));
+ base.uiBehaviour.mReqSave.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnSavePic));
+ base.uiBehaviour.mModeSp.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnShowMode));
+ base.uiBehaviour.mDanceSp.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnShowAnim));
+ base.uiBehaviour.mEffectsSp.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnShowFx));
+ base.uiBehaviour.mEffectsMore.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnShowMoreFx));
+ base.uiBehaviour.mUnlockBack.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnHideUnlock));
+ base.uiBehaviour.mZoomSlider.RegisterValueChangeEventHandler(new SliderValueChangeEventHandler(this.OnZoomSliderChanged));
+ base.uiBehaviour.mModeBg.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnClickBg));
+ base.uiBehaviour.mDanceBg.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnClickBg));
+ base.uiBehaviour.mEffectBg.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnClickBg));
+ base.RegisterEvent();
+ }
+
+ protected override void OnShow()
+ {
+ this.ShowCaptureFrame();
+ SceneType sceneType = XSingleton<XScene>.singleton.SceneType;
+ if (sceneType != SceneType.SCENE_FAMILYGARDEN)
+ {
+ if (sceneType != SceneType.SCENE_WEDDING)
+ {
+ if (sceneType == SceneType.SCENE_LEISURE)
+ {
+ bool flag = DlgBase<XMainInterface, XMainInterfaceBehaviour>.singleton._yorozuyaHandler != null;
+ if (flag)
+ {
+ DlgBase<XMainInterface, XMainInterfaceBehaviour>.singleton._yorozuyaHandler.SetVisible(false);
+ }
+ }
+ }
+ else
+ {
+ bool flag2 = DlgBase<XMainInterface, XMainInterfaceBehaviour>.singleton._WeddingHandler != null;
+ if (flag2)
+ {
+ DlgBase<XMainInterface, XMainInterfaceBehaviour>.singleton._WeddingHandler.SetVisible(false);
+ }
+ }
+ }
+ else
+ {
+ bool flag3 = DlgBase<XMainInterface, XMainInterfaceBehaviour>.singleton._HomeHandler != null;
+ if (flag3)
+ {
+ DlgBase<XMainInterface, XMainInterfaceBehaviour>.singleton._HomeHandler.SetVisible(false);
+ }
+ }
+ this.OnReqEffect();
+ base.uiBehaviour.mDoScreenShot.SetAudioClip("Audio/UI/Cam_photo");
+ base.uiBehaviour.mZoomSlider.Value = (XSingleton<XScene>.singleton.GameCamera.TargetOffset - this._min_dist) / (this._max_dist - this._min_dist);
+ this.InitDance();
+ XSingleton<PDatabase>.singleton.shareCallbackType = ShareCallBackType.WeekShare;
+ }
+
+ protected override void OnHide()
+ {
+ bool flag = DlgBase<ItemSystemDlg, TabDlgBehaviour>.singleton.IsLoaded() && DlgBase<ItemSystemDlg, TabDlgBehaviour>.singleton.IsVisible();
+ if (flag)
+ {
+ DlgBase<ItemSystemDlg, TabDlgBehaviour>.singleton.StackRefresh();
+ }
+ SceneType sceneType = XSingleton<XScene>.singleton.SceneType;
+ if (sceneType != SceneType.SCENE_FAMILYGARDEN)
+ {
+ if (sceneType != SceneType.SCENE_WEDDING)
+ {
+ if (sceneType == SceneType.SCENE_LEISURE)
+ {
+ bool flag2 = DlgBase<XMainInterface, XMainInterfaceBehaviour>.singleton._yorozuyaHandler != null;
+ if (flag2)
+ {
+ DlgBase<XMainInterface, XMainInterfaceBehaviour>.singleton._yorozuyaHandler.SetVisible(true);
+ }
+ }
+ }
+ else
+ {
+ bool flag3 = DlgBase<XMainInterface, XMainInterfaceBehaviour>.singleton._WeddingHandler != null;
+ if (flag3)
+ {
+ DlgBase<XMainInterface, XMainInterfaceBehaviour>.singleton._WeddingHandler.SetVisible(true);
+ }
+ }
+ }
+ else
+ {
+ bool flag4 = DlgBase<XMainInterface, XMainInterfaceBehaviour>.singleton._HomeHandler != null;
+ if (flag4)
+ {
+ DlgBase<XMainInterface, XMainInterfaceBehaviour>.singleton._HomeHandler.SetVisible(true);
+ }
+ }
+ XSingleton<XTimerMgr>.singleton.KillTimer(this._dance_timer_token);
+ this._dance_timer_token = 0u;
+ XSingleton<XTimerMgr>.singleton.KillTimer(this._check_pic_token);
+ this._check_pic_token = 0u;
+ this.OnResetEntityRender();
+ this.OnStopPlayingFX();
+ for (int i = 0; i < this._mode_go.Count; i++)
+ {
+ GameObject gameObject = this._mode_go[i];
+ IXUICheckBox ixuicheckBox = gameObject.transform.Find("option1/Normal").GetComponent("XUICheckBox") as IXUICheckBox;
+ ixuicheckBox.bChecked = true;
+ }
+ for (int j = 0; j < this._mode_effectgo.Count; j++)
+ {
+ GameObject gameObject2 = this._mode_effectgo[j];
+ IXUICheckBox ixuicheckBox2 = gameObject2.transform.Find("Normal").GetComponent("XUICheckBox") as IXUICheckBox;
+ ixuicheckBox2.bChecked = false;
+ }
+ XSingleton<XScene>.singleton.GameCamera.TargetOffset = XSingleton<XScene>.singleton.GameCamera.DefaultOffset;
+ XSingleton<XPostEffectMgr>.singleton.MakeEffectEnable(XPostEffect.GausBlur, false);
+ base.uiBehaviour.mCaptureTexture.SetRuntimeTex(null, true);
+ }
+
+ protected override void OnUnload()
+ {
+ bool flag = this.fx != null;
+ if (flag)
+ {
+ XSingleton<XFxMgr>.singleton.DestroyFx(this.fx, true);
+ this.fx = null;
+ }
+ }
+
+ public override void StackRefresh()
+ {
+ base.StackRefresh();
+ XSingleton<X3DAvatarMgr>.singleton.EnableMainDummy(true, base.uiBehaviour.mSnapShot);
+ }
+
+ public void ShowMainView()
+ {
+ base.uiBehaviour.mCharFrame.SetActive(false);
+ base.uiBehaviour.mUnlockFrame.SetVisible(false);
+ base.uiBehaviour.mModeSelect.SetVisible(false);
+ base.uiBehaviour.mDanceSelect.SetVisible(false);
+ base.uiBehaviour.mEffectsSelect.SetVisible(false);
+ }
+
+ public void ShowCharView()
+ {
+ base.uiBehaviour.mCharFrame.SetActive(true);
+ base.uiBehaviour.mUnlockFrame.SetVisible(false);
+ base.uiBehaviour.mModeSelect.SetVisible(false);
+ base.uiBehaviour.mDanceSelect.SetVisible(false);
+ base.uiBehaviour.mEffectsSelect.SetVisible(false);
+ XSingleton<X3DAvatarMgr>.singleton.EnableMainDummy(true, base.uiBehaviour.mSnapShot);
+ }
+
+ private void ShowCaptureFrame()
+ {
+ base.uiBehaviour.mCaptureTexture.SetRuntimeTex(null, true);
+ base.uiBehaviour.mDoScreenShot.SetVisible(true);
+ base.uiBehaviour.mKacha.SetVisible(false);
+ base.uiBehaviour.mShareFrame.SetActive(false);
+ base.uiBehaviour.mClose.SetVisible(true);
+ base.uiBehaviour.mScaleDoing.SetActive(true);
+ base.uiBehaviour.mLogo.SetActive(false);
+ XSingleton<XPostEffectMgr>.singleton.MakeEffectEnable(XPostEffect.GausBlur, false);
+ base.uiBehaviour.mSnapRoot.transform.localPosition = new Vector3(base.uiBehaviour.mSnapRoot.transform.localPosition.x, base.uiBehaviour.mSnapRoot.transform.localPosition.y, 0f);
+ }
+
+ public void IOS3DTouchScreenShot()
+ {
+ base.uiBehaviour.mDoScreenShot.SetVisible(false);
+ base.uiBehaviour.mClose.SetVisible(false);
+ base.uiBehaviour.mScaleDoing.SetActive(false);
+ base.uiBehaviour.mModeSp.SetVisible(false);
+ base.uiBehaviour.mDanceSp.SetVisible(false);
+ base.uiBehaviour.mEffectsSp.SetVisible(false);
+ base.uiBehaviour.mZoom.SetActive(false);
+ base.uiBehaviour.mZoom.SetActive(true);
+ base.uiBehaviour.mLogo.SetActive(true);
+ bool flag = XSingleton<XLoginDocument>.singleton.Channel == XAuthorizationChannel.XAuthorization_QQ;
+ if (flag)
+ {
+ base.uiBehaviour.mLogoQQ.SetActive(true);
+ base.uiBehaviour.mLogoWC.SetActive(false);
+ }
+ else
+ {
+ base.uiBehaviour.mLogoQQ.SetActive(false);
+ base.uiBehaviour.mLogoWC.SetActive(true);
+ }
+ base.uiBehaviour.mPlayerName.SetText(XSingleton<XAttributeMgr>.singleton.XPlayerData.Name);
+ base.uiBehaviour.mServerName.SetText(XSingleton<XClientNetwork>.singleton.Server);
+ DlgBase<XChatMaqueeView, XChatMaqueeBehaviour>.singleton.SetMaqueeSwitch(false);
+ XSingleton<XTimerMgr>.singleton.SetTimer(0.1f, new XTimerMgr.ElapsedEventHandler(XSingleton<XScreenShotMgr>.singleton.CaptureScreenshot), null);
+ XSingleton<XTimerMgr>.singleton.SetTimer(0.2f, new XTimerMgr.ElapsedEventHandler(this.PlayScreenFx), null);
+ }
+
+ public bool CaptureScreenShot(IXUIButton btn)
+ {
+ base.uiBehaviour.mDoScreenShot.SetVisible(false);
+ base.uiBehaviour.mClose.SetVisible(false);
+ base.uiBehaviour.mScaleDoing.SetActive(false);
+ base.uiBehaviour.mModeSp.SetVisible(false);
+ base.uiBehaviour.mDanceSp.SetVisible(false);
+ base.uiBehaviour.mEffectsSp.SetVisible(false);
+ base.uiBehaviour.mZoom.SetActive(false);
+ base.uiBehaviour.mLogo.SetActive(true);
+ bool flag = XSingleton<XLoginDocument>.singleton.Channel == XAuthorizationChannel.XAuthorization_QQ;
+ if (flag)
+ {
+ base.uiBehaviour.mLogoQQ.SetActive(true);
+ base.uiBehaviour.mLogoWC.SetActive(false);
+ }
+ else
+ {
+ base.uiBehaviour.mLogoQQ.SetActive(false);
+ base.uiBehaviour.mLogoWC.SetActive(true);
+ }
+ base.uiBehaviour.mPlayerName.SetText(XSingleton<XAttributeMgr>.singleton.XPlayerData.Name);
+ base.uiBehaviour.mServerName.SetText(XSingleton<XClientNetwork>.singleton.Server);
+ DlgBase<XChatMaqueeView, XChatMaqueeBehaviour>.singleton.SetMaqueeSwitch(false);
+ XSingleton<XScreenShotMgr>.singleton.CaptureScreenshot(null);
+ XSingleton<XTimerMgr>.singleton.SetTimer(0.2f, new XTimerMgr.ElapsedEventHandler(this.PlayScreenFx), null);
+ return true;
+ }
+
+ public bool ReqShare(IXUIButton btn)
+ {
+ bool flag = XSingleton<XLoginDocument>.singleton.Channel == XAuthorizationChannel.XAuthorization_QQ;
+ if (flag)
+ {
+ bool flag2 = XSingleton<XUpdater.XUpdater>.singleton.XPlatform.CheckStatus("QQ_Installed", "");
+ bool flag3 = !flag2;
+ if (flag3)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XSingleton<XStringTable>.singleton.GetString("ERR_QQ_NOT_INSTALLED"), "fece00");
+ return false;
+ }
+ base.uiBehaviour.mQQFrame.SetVisible(true);
+ base.uiBehaviour.mWeChatFrame.SetVisible(false);
+ base.uiBehaviour.mQQPlayTween.SetTweenGroup(0);
+ base.uiBehaviour.mQQPlayTween.ResetTweenByGroup(true, 0);
+ base.uiBehaviour.mQQPlayTween.PlayTween(true, -1f);
+ }
+ else
+ {
+ bool flag4 = XSingleton<XLoginDocument>.singleton.Channel == XAuthorizationChannel.XAuthorization_WeChat;
+ if (flag4)
+ {
+ bool flag5 = XSingleton<XUpdater.XUpdater>.singleton.XPlatform.CheckStatus("Weixin_Installed", "");
+ bool flag6 = !flag5;
+ if (flag6)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XSingleton<XStringTable>.singleton.GetString("ERR_WECHAT_NOT_INSTALLED"), "fece00");
+ return false;
+ }
+ base.uiBehaviour.mQQFrame.SetVisible(false);
+ base.uiBehaviour.mWeChatFrame.SetVisible(true);
+ base.uiBehaviour.mWCPlayTween.SetTweenGroup(0);
+ base.uiBehaviour.mWCPlayTween.ResetTweenByGroup(true, 0);
+ base.uiBehaviour.mWCPlayTween.PlayTween(true, -1f);
+ }
+ }
+ return true;
+ }
+
+ public bool ReScreenShot(IXUIButton btn)
+ {
+ this.ShowCaptureFrame();
+ return true;
+ }
+
+ private void PlayScreenFx(object obj)
+ {
+ base.uiBehaviour.mKacha.SetVisible(true);
+ base.uiBehaviour.mPlayTween.SetTweenGroup(0);
+ base.uiBehaviour.mPlayTween.ResetTweenByGroup(true, 0);
+ base.uiBehaviour.mPlayTween.PlayTween(true, -1f);
+ XSingleton<XTimerMgr>.singleton.SetTimer(0.4f, new XTimerMgr.ElapsedEventHandler(this.ShowShare), null);
+ base.uiBehaviour.mSnapRoot.transform.localPosition = new Vector3(base.uiBehaviour.mSnapRoot.transform.localPosition.x, base.uiBehaviour.mSnapRoot.transform.localPosition.y, 1000f);
+ this._share_count = 0;
+ }
+
+ private void ShowShare(object obj)
+ {
+ bool flag = !base.IsVisible();
+ if (!flag)
+ {
+ bool flag2 = !File.Exists(XSingleton<XScreenShotMgr>.singleton.FilePath);
+ if (flag2)
+ {
+ base.uiBehaviour.mSnapRoot.transform.localPosition = new Vector3(base.uiBehaviour.mSnapRoot.transform.localPosition.x, base.uiBehaviour.mSnapRoot.transform.localPosition.y, 0f);
+ this._share_count++;
+ bool flag3 = this._share_count > 30;
+ if (flag3)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip("Failed", "fece00");
+ }
+ else
+ {
+ XSingleton<XTimerMgr>.singleton.SetTimer(0.1f, new XTimerMgr.ElapsedEventHandler(this.ShowShare), null);
+ }
+ }
+ else
+ {
+ base.uiBehaviour.mSnapRoot.transform.localPosition = new Vector3(base.uiBehaviour.mSnapRoot.transform.localPosition.x, base.uiBehaviour.mSnapRoot.transform.localPosition.y, 1000f);
+ base.uiBehaviour.mShareFrame.SetActive(true);
+ base.uiBehaviour.mDoScreenShot.SetVisible(false);
+ base.uiBehaviour.mQQFrame.SetVisible(false);
+ base.uiBehaviour.mWeChatFrame.SetVisible(false);
+ base.uiBehaviour.mModeSp.SetVisible(true);
+ base.uiBehaviour.mDanceSp.SetVisible(true);
+ base.uiBehaviour.mEffectsSp.SetVisible(true);
+ base.uiBehaviour.mZoom.SetActive(true);
+ base.uiBehaviour.mLogo.SetActive(false);
+ bool visible = XSingleton<XGameSysMgr>.singleton.IsSystemOpened(XSysDefine.XSys_Photo_Share);
+ base.uiBehaviour.mReqShareBtn.SetVisible(visible);
+ DlgBase<XChatMaqueeView, XChatMaqueeBehaviour>.singleton.SetMaqueeSwitch(true);
+ this.OnStopPlayingFX();
+ XSingleton<XPostEffectMgr>.singleton.MakeEffectEnable(XPostEffect.GausBlur, true);
+ base.uiBehaviour.mPicFramePlayTween.SetTweenGroup(0);
+ base.uiBehaviour.mPicFramePlayTween.ResetTweenByGroup(true, 0);
+ base.uiBehaviour.mPicFramePlayTween.PlayTween(true, -1f);
+ XSingleton<XDebug>.singleton.AddLog("The screen file path: ", XSingleton<XScreenShotMgr>.singleton.FilePath, null, null, null, null, XDebugColor.XDebug_None);
+ XSingleton<XDebug>.singleton.AddLog("File exist: ", File.Exists(XSingleton<XScreenShotMgr>.singleton.FilePath).ToString(), null, null, null, null, XDebugColor.XDebug_None);
+ RuntimePlatform platform = Application.platform;
+ if ((int)platform != 8 && (int)platform != 11)
+ {
+ byte[] array = File.ReadAllBytes(XSingleton<XScreenShotMgr>.singleton.FilePath);
+ bool flag4 = array != null;
+ if (flag4)
+ {
+ Texture2D texture2D = new Texture2D(2, 2);
+ texture2D.LoadImage(array);
+ base.uiBehaviour.mCaptureTexture.SetRuntimeTex(texture2D, true);
+ }
+ }
+ else
+ {
+ byte[] array2 = File.ReadAllBytes(XSingleton<XScreenShotMgr>.singleton.FilePath);
+ Texture2D texture2D2 = new Texture2D(2, 2);
+ bool flag5 = texture2D2.LoadImage(array2);
+ bool flag6 = flag5;
+ if (flag6)
+ {
+ base.uiBehaviour.mCaptureTexture.SetRuntimeTex(texture2D2, true);
+ int width = texture2D2.width;
+ int height = texture2D2.height;
+ bool flag7 = width <= 600;
+ if (flag7)
+ {
+ this.ShowCaptureFrame();
+ }
+ }
+ else
+ {
+ bool flag8 = !flag5;
+ if (flag8)
+ {
+ this.ShowCaptureFrame();
+ }
+ }
+ }
+ }
+ }
+ }
+
+ public bool OnQQShareSession(IXUIButton btn)
+ {
+ XSingleton<XScreenShotMgr>.singleton.SendStatisticToServer(ShareOpType.Share, DragonShareType.MainCityShare);
+ XSingleton<XScreenShotMgr>.singleton.ShareScreen(true);
+ return true;
+ }
+
+ public bool OnQQShareQZone(IXUIButton btn)
+ {
+ XSingleton<XScreenShotMgr>.singleton.SendStatisticToServer(ShareOpType.Share, DragonShareType.MainCityShare);
+ XSingleton<XScreenShotMgr>.singleton.ShareScreen(false);
+ return true;
+ }
+
+ public bool OnWeChatShareSession(IXUIButton btn)
+ {
+ XSingleton<XScreenShotMgr>.singleton.SendStatisticToServer(ShareOpType.Share, DragonShareType.MainCityShare);
+ XSingleton<XScreenShotMgr>.singleton.ShareScreen(true);
+ return true;
+ }
+
+ public bool OnWeChatShareTimeLine(IXUIButton btn)
+ {
+ XSingleton<XScreenShotMgr>.singleton.SendStatisticToServer(ShareOpType.Share, DragonShareType.MainCityShare);
+ XSingleton<XScreenShotMgr>.singleton.ShareScreen(false);
+ return true;
+ }
+
+ public bool OnClose(IXUIButton btn)
+ {
+ this.SetVisible(false, true);
+ return true;
+ }
+
+ public void OnCloseShare(IXUISprite sp)
+ {
+ base.uiBehaviour.mQQFrame.SetVisible(false);
+ base.uiBehaviour.mWeChatFrame.SetVisible(false);
+ }
+
+ private bool OnDance(IXUIButton btn)
+ {
+ float num = XSingleton<X3DAvatarMgr>.singleton.SetMainAnimationGetLength(XSingleton<XEntityMgr>.singleton.Player.Present.PresentLib.Dance);
+ XSingleton<XTimerMgr>.singleton.KillTimer(this._dance_timer_token);
+ int @int = XSingleton<XGlobalConfig>.singleton.GetInt("DanceLoopCount");
+ this._dance_timer_token = XSingleton<XTimerMgr>.singleton.SetTimer(num * (float)@int, new XTimerMgr.ElapsedEventHandler(this.OnFinishDance), null);
+ return true;
+ }
+
+ private void OnFinishDance(object obj)
+ {
+ XSingleton<X3DAvatarMgr>.singleton.SetMainAnimation(XSingleton<XEntityMgr>.singleton.Player.Present.PresentLib.Idle);
+ }
+
+ protected bool OnCharacterWindowDrag(Vector2 delta)
+ {
+ XSingleton<X3DAvatarMgr>.singleton.RotateMain(-delta.x / 2f);
+ return true;
+ }
+
+ private void OnShowMode(IXUISprite sp)
+ {
+ bool flag = base.uiBehaviour.mModeSelect.IsVisible();
+ if (flag)
+ {
+ base.uiBehaviour.mModeSelect.SetVisible(false);
+ }
+ else
+ {
+ base.uiBehaviour.mModeSelect.SetVisible(true);
+ }
+ base.uiBehaviour.mDanceSelect.SetVisible(false);
+ base.uiBehaviour.mEffectsSelect.SetVisible(false);
+ }
+
+ private void OnShowAnim(IXUISprite sp)
+ {
+ bool flag = this._dance_num == 0;
+ if (flag)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XSingleton<XStringTable>.singleton.GetString("ERR_NO_DANCE_ANIM"), "fece00");
+ }
+ else
+ {
+ base.uiBehaviour.mModeSelect.SetVisible(false);
+ bool flag2 = base.uiBehaviour.mDanceSelect.IsVisible();
+ if (flag2)
+ {
+ base.uiBehaviour.mDanceSelect.SetVisible(false);
+ }
+ else
+ {
+ base.uiBehaviour.mDanceSelect.SetVisible(true);
+ }
+ base.uiBehaviour.mEffectsSelect.SetVisible(false);
+ }
+ }
+
+ private void OnShowFx(IXUISprite sp)
+ {
+ base.uiBehaviour.mModeSelect.SetVisible(false);
+ base.uiBehaviour.mDanceSelect.SetVisible(false);
+ bool flag = base.uiBehaviour.mEffectsSelect.IsVisible();
+ if (flag)
+ {
+ base.uiBehaviour.mEffectsSelect.SetVisible(false);
+ }
+ else
+ {
+ base.uiBehaviour.mEffectsSelect.SetVisible(true);
+ }
+ }
+
+ private void OnShowMoreFx(IXUISprite sp)
+ {
+ base.uiBehaviour.mEffectsSelect.SetVisible(false);
+ bool flag = base.uiBehaviour.mUnlockFrame.IsVisible();
+ if (!flag)
+ {
+ int num = this.OnShowMoreFxFrame();
+ bool flag2 = num > 0;
+ if (flag2)
+ {
+ base.uiBehaviour.mUnlockFrame.SetVisible(true);
+ }
+ else
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XSingleton<XStringTable>.singleton.GetString("ERR_NO_MORE_EFFECTS"), "fece00");
+ }
+ }
+ }
+
+ private int OnShowMoreFxFrame()
+ {
+ this.OnStopPlayingFX();
+ base.uiBehaviour.mEffectListPool.ReturnAll(false);
+ uint num = 0u;
+ int num2 = 0;
+ for (int i = 0; i < this._doc.EffectAllListId.Count; i++)
+ {
+ bool flag = this._doc.EffectListId.Contains(this._doc.EffectAllListId[i]);
+ if (!flag)
+ {
+ bool flag2 = num == 0u;
+ if (flag2)
+ {
+ num = this._doc.EffectAllListId[i];
+ }
+ List<PhotographEffectCfg.RowData> rowDataById = this._doc.GetRowDataById(this._doc.EffectAllListId[i]);
+ GameObject gameObject = base.uiBehaviour.mEffectListPool.FetchGameObject(false);
+ gameObject.transform.localPosition = new Vector3(base.uiBehaviour.mEffectListPool.TplPos.x, base.uiBehaviour.mEffectListPool.TplPos.y - (float)(num2 * base.uiBehaviour.mEffectListPool.TplHeight), base.uiBehaviour.mEffectListPool.TplPos.z);
+ IXUILabel ixuilabel = gameObject.transform.Find("t").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel.SetText(rowDataById[0].EffectName);
+ IXUILabel ixuilabel2 = gameObject.transform.Find("t2").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel2.SetText(rowDataById[0].EffectName);
+ IXUICheckBox ixuicheckBox = gameObject.transform.GetComponent("XUICheckBox") as IXUICheckBox;
+ ixuicheckBox.RegisterOnCheckEventHandler(new CheckBoxOnCheckEventHandler(this.OnSelectEffect));
+ ixuicheckBox.ID = (ulong)this._doc.EffectAllListId[i];
+ bool flag3 = num2 == 0;
+ if (flag3)
+ {
+ ixuicheckBox.bChecked = true;
+ this.OnSetEffect((int)this._doc.EffectAllListId[i]);
+ }
+ else
+ {
+ ixuicheckBox.bChecked = false;
+ }
+ num2++;
+ }
+ }
+ this.OnInitUnlockInfo(num);
+ return num2;
+ }
+
+ private void OnInitUnlockInfo(uint index)
+ {
+ List<PhotographEffectCfg.RowData> rowDataById = this._doc.GetRowDataById(index);
+ base.uiBehaviour.mConditionPool.ReturnAll(false);
+ for (int i = 0; i < rowDataById.Count; i++)
+ {
+ bool flag = false;
+ GameObject gameObject = base.uiBehaviour.mConditionPool.FetchGameObject(false);
+ gameObject.transform.localPosition = new Vector3(base.uiBehaviour.mConditionPool.TplPos.x, base.uiBehaviour.mConditionPool.TplPos.y - (float)(i * base.uiBehaviour.mConditionPool.TplHeight), base.uiBehaviour.mConditionPool.TplPos.z);
+ IXUILabel ixuilabel = gameObject.transform.Find("condition1").GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel2 = gameObject.transform.Find("Label").GetComponent("XUILabel") as IXUILabel;
+ IXUISprite ixuisprite = gameObject.transform.Find("ok").GetComponent("XUISprite") as IXUISprite;
+ uint num = rowDataById[i].Condition[0, 0];
+ uint num2 = rowDataById[i].Condition[0, 1];
+ switch (num)
+ {
+ case 1u:
+ {
+ bool flag2 = this._doc.CharmVal >= num2;
+ if (flag2)
+ {
+ flag = true;
+ }
+ break;
+ }
+ case 2u:
+ {
+ uint level = XSingleton<XEntityMgr>.singleton.Player.PlayerAttributes.Level;
+ bool flag3 = level >= num2;
+ if (flag3)
+ {
+ flag = true;
+ }
+ break;
+ }
+ case 3u:
+ {
+ XRechargeDocument specificDocument = XDocuments.GetSpecificDocument<XRechargeDocument>(XRechargeDocument.uuID);
+ bool flag4 = specificDocument.TotalPay >= num2;
+ if (flag4)
+ {
+ flag = true;
+ }
+ break;
+ }
+ case 4u:
+ {
+ XWelfareDocument specificDocument2 = XDocuments.GetSpecificDocument<XWelfareDocument>(XWelfareDocument.uuID);
+ bool flag5 = specificDocument2.IsOwnMemberPrivilege((MemberPrivilege)num2);
+ if (flag5)
+ {
+ flag = true;
+ }
+ break;
+ }
+ }
+ ixuilabel.SetText(rowDataById[i].ConditionDesc);
+ ixuilabel2.SetText(rowDataById[i].desc);
+ ixuilabel2.ID = (ulong)rowDataById[i].SystemID;
+ ixuilabel2.RegisterLabelClickEventHandler(new LabelClickEventHandler(this.OnEnterSystemUnlock));
+ bool flag6 = flag;
+ if (flag6)
+ {
+ ixuisprite.SetVisible(true);
+ ixuilabel2.SetVisible(false);
+ }
+ else
+ {
+ ixuisprite.SetVisible(false);
+ ixuilabel2.SetVisible(true);
+ }
+ }
+ }
+
+ private void OnStopPlayingFX()
+ {
+ bool flag = this._playing_fx != null;
+ if (flag)
+ {
+ XSingleton<XFxMgr>.singleton.DestroyFx(this._playing_fx, true);
+ }
+ this._playing_fx = null;
+ }
+
+ private void OnEnterSystemUnlock(IXUILabel lb)
+ {
+ this.SetVisible(false, true);
+ XSingleton<XGameSysMgr>.singleton.OpenSystem((XSysDefine)lb.ID, 0UL);
+ }
+
+ private void OnHideUnlock(IXUISprite sp)
+ {
+ base.uiBehaviour.mUnlockFrame.SetVisible(false);
+ this.OnStopPlayingFX();
+ }
+
+ public bool OnModeChanged(IXUICheckBox box)
+ {
+ bool flag = !box.bChecked;
+ if (flag)
+ {
+ bool flag2 = this._check_index.Contains((uint)box.ID);
+ if (flag2)
+ {
+ this._check_index.Remove((uint)box.ID);
+ }
+ }
+ else
+ {
+ bool flag3 = !this._check_index.Contains((uint)box.ID);
+ if (flag3)
+ {
+ this._check_index.Add((uint)box.ID);
+ }
+ }
+ this.OnRefreshPlayerRender();
+ return true;
+ }
+
+ public bool OnAnimChanged(IXUICheckBox box)
+ {
+ bool flag = !box.bChecked;
+ bool result;
+ if (flag)
+ {
+ result = false;
+ }
+ else
+ {
+ XDanceDocument.Doc.ReqStartJustDance((uint)box.ID);
+ result = true;
+ }
+ return result;
+ }
+
+ public bool OnEffectChanged(IXUICheckBox box)
+ {
+ this.OnStopPlayingFX();
+ bool flag = !box.bChecked;
+ bool result;
+ if (flag)
+ {
+ result = false;
+ }
+ else
+ {
+ Transform transform = XSingleton<UIManager>.singleton.UIRoot.Find("Camera").transform;
+ List<PhotographEffectCfg.RowData> rowDataById = this._doc.GetRowDataById((uint)box.ID);
+ this._playing_fx = XSingleton<XFxMgr>.singleton.CreateAndPlay(rowDataById[0].EffectRoute, transform, Vector3.zero, Vector3.one, 1f, true, 3600f, true);
+ result = true;
+ }
+ return result;
+ }
+
+ private void OnSetEffect(int index)
+ {
+ this.OnInitUnlockInfo((uint)index);
+ this.OnStopPlayingFX();
+ List<PhotographEffectCfg.RowData> rowDataById = this._doc.GetRowDataById((uint)index);
+ this._playing_fx = XSingleton<XFxMgr>.singleton.CreateUIFx(rowDataById[0].EffectRoute, base.uiBehaviour.mUnlockEffectWindow.transform, new Vector3(0.25f, 0.25f, 0.25f), false);
+ }
+
+ public bool OnSelectEffect(IXUICheckBox box)
+ {
+ bool flag = !box.bChecked;
+ bool result;
+ if (flag)
+ {
+ result = false;
+ }
+ else
+ {
+ this.OnSetEffect((int)box.ID);
+ result = true;
+ }
+ return result;
+ }
+
+ public bool OnSavePic(IXUIButton btn)
+ {
+ bool flag = this._saved_file_path == XSingleton<XScreenShotMgr>.singleton.FilePath;
+ bool result;
+ if (flag)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XSingleton<XStringTable>.singleton.GetString("CAMERA_SAVED_ERR"), "fece00");
+ result = false;
+ }
+ else
+ {
+ RuntimePlatform platform = Application.platform;
+ if ((int)platform != 8)
+ {
+ if ((int)platform == 11)
+ {
+ string text = "/../../../../DCIM/Camera";
+ text = Application.persistentDataPath + text;
+ bool flag2 = !Directory.Exists(text);
+ if (flag2)
+ {
+ Directory.CreateDirectory(text);
+ }
+ string destFileName = text + "/" + XSingleton<XScreenShotMgr>.singleton.FileName;
+ File.Copy(XSingleton<XScreenShotMgr>.singleton.FilePath, destFileName);
+ XSingleton<XScreenShotMgr>.singleton.RefreshPhotoView(text);
+ }
+ }
+ else
+ {
+ this._saved_file_path = XSingleton<XScreenShotMgr>.singleton.FilePath;
+ XSingleton<XScreenShotMgr>.singleton.SaveScreenshotPic(this._saved_file_path);
+ }
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XSingleton<XStringTable>.singleton.GetString("CAMERA_SAVED"), "fece00");
+ this._saved_file_path = XSingleton<XScreenShotMgr>.singleton.FilePath;
+ result = true;
+ }
+ return result;
+ }
+
+ public void OnAnimStart(IXUISprite sp)
+ {
+ }
+
+ public void OnClickBg(IXUISprite sp)
+ {
+ bool flag = sp.ID == 1UL;
+ if (flag)
+ {
+ base.uiBehaviour.mModeSelect.SetVisible(false);
+ }
+ else
+ {
+ bool flag2 = sp.ID == 2UL;
+ if (flag2)
+ {
+ base.uiBehaviour.mDanceSelect.SetVisible(false);
+ }
+ else
+ {
+ bool flag3 = sp.ID == 3UL;
+ if (flag3)
+ {
+ base.uiBehaviour.mEffectsSelect.SetVisible(false);
+ }
+ }
+ }
+ }
+
+ public bool OnZoomSliderChanged(float val)
+ {
+ XSingleton<XScene>.singleton.GameCamera.TargetOffset = this._min_dist + (this._max_dist - this._min_dist) * val;
+ return true;
+ }
+
+ public bool CanRenderOtherPalyers()
+ {
+ bool flag = !base.IsLoaded() || !base.IsVisible();
+ return flag || this._check_index.Contains(1u);
+ }
+
+ private void OnRefreshPlayerRender()
+ {
+ bool flag = this._check_index.Contains(0u);
+ bool flag2 = XSingleton<XEntityMgr>.singleton.Player != null;
+ if (flag2)
+ {
+ XSingleton<XScene>.singleton.GameCamera.SetCameraLayer(XPlayer.PlayerLayer, flag);
+ XSingleton<XCustomShadowMgr>.singleton.SetCullLayer(flag);
+ XBillboardShowCtrlEventArgs @event = XEventPool<XBillboardShowCtrlEventArgs>.GetEvent();
+ @event.show = flag;
+ @event.Firer = XSingleton<XEntityMgr>.singleton.Player;
+ @event.type = BillBoardHideType.Photo;
+ XSingleton<XEventMgr>.singleton.FireEvent(@event);
+ }
+ bool flag3 = this._check_index.Contains(2u);
+ XSingleton<XScene>.singleton.GameCamera.SetCameraLayer(XNpc.NpcLayer, flag3);
+ List<uint> npcs = XSingleton<XEntityMgr>.singleton.GetNpcs(XSingleton<XScene>.singleton.SceneID);
+ bool flag4 = npcs != null;
+ if (flag4)
+ {
+ for (int i = 0; i < npcs.Count; i++)
+ {
+ XNpc npc = XSingleton<XEntityMgr>.singleton.GetNpc(npcs[i]);
+ bool flag5 = npc != null;
+ if (flag5)
+ {
+ XBillboardShowCtrlEventArgs event2 = XEventPool<XBillboardShowCtrlEventArgs>.GetEvent();
+ event2.show = flag3;
+ event2.Firer = npc;
+ event2.type = BillBoardHideType.Photo;
+ XSingleton<XEventMgr>.singleton.FireEvent(event2);
+ }
+ }
+ }
+ bool flag6 = this._check_index.Contains(1u);
+ XSingleton<XScene>.singleton.GameCamera.SetCameraLayer(XRole.RoleLayer, flag6);
+ List<XEntity> ally = XSingleton<XEntityMgr>.singleton.GetAlly(XSingleton<XEntityMgr>.singleton.Player);
+ bool flag7 = ally != null;
+ if (flag7)
+ {
+ for (int j = 0; j < ally.Count; j++)
+ {
+ bool flag8 = ally[j] != null;
+ if (flag8)
+ {
+ bool flag9 = ally[j].IsRole && !ally[j].IsPlayer;
+ if (flag9)
+ {
+ XBillboardShowCtrlEventArgs event3 = XEventPool<XBillboardShowCtrlEventArgs>.GetEvent();
+ event3.show = flag6;
+ event3.Firer = ally[j];
+ event3.type = BillBoardHideType.Photo;
+ XSingleton<XEventMgr>.singleton.FireEvent(event3);
+ }
+ }
+ }
+ }
+ }
+
+ private void OnResetEntityRender()
+ {
+ XSingleton<XScene>.singleton.GameCamera.SetCameraLayer(XPlayer.PlayerLayer, true);
+ XBillboardShowCtrlEventArgs @event = XEventPool<XBillboardShowCtrlEventArgs>.GetEvent();
+ @event.show = true;
+ @event.type = BillBoardHideType.Photo;
+ @event.Firer = XSingleton<XEntityMgr>.singleton.Player;
+ XSingleton<XEventMgr>.singleton.FireEvent(@event);
+ XSingleton<XScene>.singleton.GameCamera.SetCameraLayer(XNpc.NpcLayer, true);
+ List<uint> npcs = XSingleton<XEntityMgr>.singleton.GetNpcs(XSingleton<XScene>.singleton.SceneID);
+ bool flag = npcs != null;
+ if (flag)
+ {
+ for (int i = 0; i < npcs.Count; i++)
+ {
+ XNpc npc = XSingleton<XEntityMgr>.singleton.GetNpc(npcs[i]);
+ bool flag2 = npc != null;
+ if (flag2)
+ {
+ XBillboardShowCtrlEventArgs event2 = XEventPool<XBillboardShowCtrlEventArgs>.GetEvent();
+ event2.show = true;
+ event2.Firer = npc;
+ event2.type = BillBoardHideType.Photo;
+ XSingleton<XEventMgr>.singleton.FireEvent(event2);
+ }
+ }
+ }
+ XSingleton<XScene>.singleton.GameCamera.SetCameraLayer(XRole.RoleLayer, true);
+ List<XEntity> ally = XSingleton<XEntityMgr>.singleton.GetAlly(XSingleton<XEntityMgr>.singleton.Player);
+ for (int j = 0; j < ally.Count; j++)
+ {
+ bool flag3 = ally[j].IsRole && !ally[j].IsPlayer;
+ if (flag3)
+ {
+ XBillboardShowCtrlEventArgs event3 = XEventPool<XBillboardShowCtrlEventArgs>.GetEvent();
+ event3.show = true;
+ event3.Firer = ally[j];
+ event3.type = BillBoardHideType.Photo;
+ XSingleton<XEventMgr>.singleton.FireEvent(event3);
+ }
+ }
+ }
+
+ private void OnReqEffect()
+ {
+ RpcC2G_PhotographEffect rpc = new RpcC2G_PhotographEffect();
+ XSingleton<XClientNetwork>.singleton.Send(rpc);
+ }
+
+ public void OnRefreshEffects()
+ {
+ base.uiBehaviour.mEffectPool.ReturnAll(false);
+ this._mode_effectgo.Clear();
+ base.uiBehaviour.mEffectsBack.spriteHeight = base.uiBehaviour.mEffectPool.TplHeight * this._doc.EffectListId.Count + 60;
+ int num = (this._doc.EffectListId.Count % 2 == 0) ? (base.uiBehaviour.mEffectPool.TplHeight / 2) : 0;
+ for (int i = 0; i < this._doc.EffectListId.Count; i++)
+ {
+ List<PhotographEffectCfg.RowData> rowDataById = this._doc.GetRowDataById(this._doc.EffectListId[i]);
+ int num2 = (i % 2 == 0) ? 1 : -1;
+ GameObject gameObject = base.uiBehaviour.mEffectPool.FetchGameObject(false);
+ this._mode_effectgo.Add(gameObject);
+ gameObject.transform.localPosition = new Vector3(base.uiBehaviour.mEffectPool.TplPos.x, base.uiBehaviour.mEffectPool.TplPos.y + (float)(num2 * ((i + 1) / 2) * base.uiBehaviour.mEffectPool.TplHeight) + (float)num, base.uiBehaviour.mEffectPool.TplPos.z);
+ IXUILabel ixuilabel = gameObject.transform.Find("Name").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel.SetText(rowDataById[0].EffectName);
+ IXUICheckBox ixuicheckBox = gameObject.transform.Find("Normal").GetComponent("XUICheckBox") as IXUICheckBox;
+ ixuicheckBox.RegisterOnCheckEventHandler(new CheckBoxOnCheckEventHandler(this.OnEffectChanged));
+ ixuicheckBox.ID = (ulong)this._doc.EffectListId[i];
+ ixuicheckBox.bChecked = false;
+ }
+ base.uiBehaviour.mEffectsMore.transform.localPosition = new Vector3(base.uiBehaviour.mEffectsMore.transform.localPosition.x, base.uiBehaviour.mEffectPool.TplPos.y - (float)((this._doc.EffectListId.Count + 1) * base.uiBehaviour.mEffectPool.TplHeight / 2), base.uiBehaviour.mEffectsMore.transform.localPosition.z);
+ bool flag = this._doc.EffectAllListId.Count == this._doc.EffectListId.Count;
+ if (flag)
+ {
+ base.uiBehaviour.mEffectsRedpoint.SetVisible(false);
+ }
+ else
+ {
+ base.uiBehaviour.mEffectsRedpoint.SetVisible(true);
+ }
+ }
+
+ private void InitLeftMenu()
+ {
+ base.uiBehaviour.mModePool.ReturnAll(false);
+ string value = XSingleton<XGlobalConfig>.singleton.GetValue("PhotoShowName");
+ string[] array = value.Split(new char[]
+ {
+ '|'
+ });
+ this._mode_go.Clear();
+ base.uiBehaviour.mModeBack.spriteHeight = base.uiBehaviour.mModePool.TplHeight * array.Length;
+ for (int i = 0; i < array.Length; i++)
+ {
+ GameObject gameObject = base.uiBehaviour.mModePool.FetchGameObject(false);
+ int num = (i % 2 == 0) ? 1 : -1;
+ int num2 = base.uiBehaviour.mModePool.TplHeight / 2;
+ gameObject.transform.localPosition = new Vector3(base.uiBehaviour.mModePool.TplPos.x, base.uiBehaviour.mModePool.TplPos.y + (float)(num * ((i + 1) / 2) * base.uiBehaviour.mModePool.TplHeight), base.uiBehaviour.mModePool.TplPos.z);
+ IXUILabel ixuilabel = gameObject.transform.Find("option1/Name").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel.SetText(array[i]);
+ IXUICheckBox ixuicheckBox = gameObject.transform.Find("option1/Normal").GetComponent("XUICheckBox") as IXUICheckBox;
+ ixuicheckBox.RegisterOnCheckEventHandler(new CheckBoxOnCheckEventHandler(this.OnModeChanged));
+ ixuicheckBox.ID = (ulong)((long)i);
+ ixuicheckBox.bChecked = true;
+ this._check_index.Add((uint)i);
+ this._mode_go.Add(gameObject);
+ }
+ this.OnRefreshEffects();
+ }
+
+ private void InitDance()
+ {
+ base.uiBehaviour.mDancePool.FakeReturnAll();
+ this._dance_num = 0;
+ int num = 0;
+ for (int i = 0; i < XDanceDocument.Doc.SelfConfigData.Count; i++)
+ {
+ DanceConfig.RowData danceConfig = XDanceDocument.GetDanceConfig(XDanceDocument.Doc.SelfConfigData[i].motionID);
+ bool flag = danceConfig != null && XDanceDocument.Doc.IsUnlock(XDanceDocument.Doc.SelfConfigData[i].valid, danceConfig.Condition);
+ if (flag)
+ {
+ this._dance_num++;
+ }
+ }
+ float num2 = (this._dance_num > 8) ? 8.5f : ((float)this._dance_num);
+ base.uiBehaviour.mDanceBack.spriteHeight = (int)((float)base.uiBehaviour.mModePool.TplHeight * num2) + 30;
+ base.uiBehaviour.mDanceBackSV.SetSize((float)base.uiBehaviour.mDanceBack.spriteWidth, (float)base.uiBehaviour.mModePool.TplHeight * num2);
+ for (int j = 0; j < XDanceDocument.Doc.SelfConfigData.Count; j++)
+ {
+ DanceConfig.RowData danceConfig2 = XDanceDocument.GetDanceConfig(XDanceDocument.Doc.SelfConfigData[j].motionID);
+ bool flag2 = danceConfig2 != null && XDanceDocument.Doc.IsUnlock(XDanceDocument.Doc.SelfConfigData[j].valid, danceConfig2.Condition);
+ if (flag2)
+ {
+ GameObject gameObject = base.uiBehaviour.mDancePool.FetchGameObject(false);
+ gameObject.transform.parent = base.uiBehaviour.mDanceBackList.gameObject.transform;
+ IXUILabel ixuilabel = gameObject.transform.Find("Name").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel.SetText(danceConfig2.MotionName);
+ IXUICheckBox ixuicheckBox = gameObject.transform.Find("Normal").GetComponent("XUICheckBox") as IXUICheckBox;
+ ixuicheckBox.RegisterOnCheckEventHandler(new CheckBoxOnCheckEventHandler(this.OnAnimChanged));
+ ixuicheckBox.ID = (ulong)danceConfig2.MotionID;
+ num++;
+ }
+ }
+ base.uiBehaviour.mDancePool.ActualReturnAll(false);
+ base.uiBehaviour.mDanceBackList.Refresh();
+ }
+
+ public bool IsInReadyScreenShowView()
+ {
+ bool flag = !base.IsLoaded() || !base.IsVisible();
+ return !flag && base.uiBehaviour.mDoScreenShot.IsVisible();
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/ScreenShotShareView.cs.meta b/Client/Assets/Scripts/XMainClient/UI/ScreenShotShareView.cs.meta
new file mode 100644
index 00000000..7c9b6447
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/ScreenShotShareView.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 370f19d7c47fd394883cc554277f7df6
+timeCreated: 1611403564
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/SelectCharWindowBehaviour.cs b/Client/Assets/Scripts/XMainClient/UI/SelectCharWindowBehaviour.cs
new file mode 100644
index 00000000..4ac8db60
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/SelectCharWindowBehaviour.cs
@@ -0,0 +1,130 @@
+using System;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class SelectCharWindowBehaviour : DlgBehaviourBase
+ {
+ public IXUIButton m_enterworld;
+
+ public IXUILabel m_enterWorldLabel;
+
+ public IXUIButton m_return;
+
+ public Transform m_selectFrame = null;
+
+ public IXUITweenTool m_SelectTween;
+
+ public IXUISprite m_profIntro;
+
+ public IXUILabel m_profDetail;
+
+ public IXUILabel m_profType;
+
+ public XUIPool m_AttrPoint = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ public IXUISprite m_profName;
+
+ public IXUITweenTool m_profTween;
+
+ public IXUIInput m_createName;
+
+ public GameObject m_createNameFrame;
+
+ public IXUITweenTool m_createNameTween;
+
+ public IXUISprite m_createRandom;
+
+ public IXUISprite[] m_create_profp = new IXUISprite[XGame.RoleCount];
+
+ public Transform m_playerNameFrame = null;
+
+ public IXUILabel m_playerNameLabel;
+
+ public IXUILabel m_playerLevelLabel;
+
+ public Transform m_block;
+
+ public IXUILabel m_Version;
+
+ public IXUILabel m_preLevel;
+
+ private void Awake()
+ {
+ Transform transform = base.transform.Find("Bg/SelectFrame/EnterGame");
+ this.m_enterworld = (transform.GetComponent("XUIButton") as IXUIButton);
+ this.m_enterWorldLabel = (base.transform.Find("Bg/SelectFrame/EnterGame/Label").GetComponent("XUILabel") as IXUILabel);
+ transform = base.transform.Find("Bg/Return");
+ this.m_return = (transform.GetComponent("XUIButton") as IXUIButton);
+ this.m_selectFrame = base.transform.Find("Bg/SelectFrame");
+ this.m_SelectTween = (base.transform.Find("Bg/SelectFrame").GetComponent("XUIPlayTween") as IXUITweenTool);
+ this.m_profName = (base.transform.Find("Bg/SelectFrame/ProfName").GetComponent("XUISprite") as IXUISprite);
+ this.m_profIntro = (base.transform.Find("Bg/SelectFrame/ProfName/ProfIntro").GetComponent("XUISprite") as IXUISprite);
+ this.m_profDetail = (base.transform.Find("Bg/SelectFrame/ProfName/ProfIntro/Detail").GetComponent("XUILabel") as IXUILabel);
+ this.m_profType = (base.transform.Find("Bg/SelectFrame/ProfName/ProfIntro/Attr").GetComponent("XUILabel") as IXUILabel);
+ this.m_profTween = (base.transform.Find("Bg/SelectFrame/ProfName").GetComponent("XUIPlayTween") as IXUITweenTool);
+ this.m_profTween.SetTargetGameObject(this.m_profTween.gameObject);
+ transform = base.transform.Find("Bg/SelectFrame/ProfName/ProfIntro/Point");
+ this.m_AttrPoint.SetupPool(transform.parent.gameObject, transform.gameObject, 40u, false);
+ this.m_createName = (base.transform.Find("Bg/SelectFrame/NameFrame/PlayerName").GetComponent("XUIInput") as IXUIInput);
+ this.m_preLevel = (base.transform.Find("Bg/SelectFrame/NameFrame/PlayerName/PreLevel").GetComponent("XUILabel") as IXUILabel);
+ this.m_createNameFrame = base.transform.Find("Bg/SelectFrame/NameFrame").gameObject;
+ this.m_createNameTween = (base.transform.Find("Bg/SelectFrame/NameFrame").GetComponent("XUIPlayTween") as IXUITweenTool);
+ this.m_createRandom = (base.transform.Find("Bg/SelectFrame/NameFrame/Random").GetComponent("XUISprite") as IXUISprite);
+ this.m_playerNameFrame = base.transform.Find("Bg/SelectFrame/PlayerName");
+ this.m_playerNameLabel = (base.transform.Find("Bg/SelectFrame/PlayerName/Text").GetComponent("XUILabel") as IXUILabel);
+ this.m_playerLevelLabel = (base.transform.Find("Bg/SelectFrame/PlayerName/Level").GetComponent("XUILabel") as IXUILabel);
+ string[] array = XSingleton<XGlobalConfig>.singleton.GetValue("OpenProfession").Split(XGlobalConfig.ListSeparator);
+ for (int i = 0; i < XGame.RoleCount; i++)
+ {
+ this.m_create_profp[i] = (base.transform.Find("Bg/SelectFrame/ProfFrame/Prof" + (i + 1)).GetComponent("XUISprite") as IXUISprite);
+ this.m_create_profp[i].ID = (ulong)((long)(i + 1));
+ bool active = true;
+ for (int j = 0; j < array.Length; j++)
+ {
+ bool flag = int.Parse(array[j]) == i + 1;
+ if (flag)
+ {
+ active = false;
+ break;
+ }
+ }
+ this.m_create_profp[i].gameObject.transform.Find("Disable").gameObject.SetActive(active);
+ }
+ this.m_block = base.transform.Find("Bg/Block");
+ this.m_Version = (base.transform.Find("Bg/LabelVersion").GetComponent("XUILabel") as IXUILabel);
+ this.m_selectFrame.gameObject.SetActive(false);
+ this.m_return.SetVisible(false);
+ this.m_block.gameObject.SetActive(false);
+ }
+
+ private void OnDestroy()
+ {
+ this.m_enterworld = null;
+ this.m_enterWorldLabel = null;
+ this.m_return = null;
+ this.m_selectFrame = null;
+ this.m_SelectTween = null;
+ this.m_profIntro = null;
+ this.m_profName = null;
+ this.m_profTween = null;
+ this.m_createName = null;
+ this.m_createNameFrame = null;
+ this.m_createNameTween = null;
+ this.m_createRandom = null;
+ this.m_create_profp = new IXUISprite[XGame.RoleCount];
+ for (int i = 0; i < this.m_create_profp.Length; i++)
+ {
+ this.m_create_profp[i] = null;
+ }
+ this.m_playerNameFrame = null;
+ this.m_playerNameLabel = null;
+ this.m_playerLevelLabel = null;
+ this.m_block = null;
+ this.m_Version = null;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/SelectCharWindowBehaviour.cs.meta b/Client/Assets/Scripts/XMainClient/UI/SelectCharWindowBehaviour.cs.meta
new file mode 100644
index 00000000..0f192ae0
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/SelectCharWindowBehaviour.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 7b9e77505a0332c439d961d303af0dd1
+timeCreated: 1611403994
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/SevenLoginBehaviour.cs b/Client/Assets/Scripts/XMainClient/UI/SevenLoginBehaviour.cs
new file mode 100644
index 00000000..9c831bba
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/SevenLoginBehaviour.cs
@@ -0,0 +1,51 @@
+using System;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class SevenLoginBehaviour : DlgBehaviourBase
+ {
+ public IXUIButton m_Close;
+
+ public IXUILabel m_LoginDayLabel;
+
+ public IXUIScrollView m_WrapContentScrollView;
+
+ public Transform m_WrapContentTemp;
+
+ public Transform m_WrapContentRewardTemp;
+
+ public XUIPool m_RewardPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ public IXUILabel m_MessageLabel;
+
+ public IXUITexture m_shardTexture;
+
+ public IXUITexture m_dialogTexture;
+
+ public Transform m_dialogTransform;
+
+ public IXUIButton m_dialogClose;
+
+ private void Awake()
+ {
+ this.m_Close = (base.transform.Find("Bg/Close").GetComponent("XUIButton") as IXUIButton);
+ this.m_LoginDayLabel = (base.transform.Find("Bg/LoginDay").GetComponent("XUILabel") as IXUILabel);
+ this.m_WrapContentScrollView = (base.transform.Find("Bg/ScrollView").GetComponent("XUIScrollView") as IXUIScrollView);
+ this.m_WrapContentTemp = base.transform.Find("Bg/ScrollView/ItemTpl");
+ this.m_WrapContentTemp.gameObject.SetActive(false);
+ this.m_WrapContentRewardTemp = base.transform.Find("Bg/RewardTemp");
+ this.m_RewardPool.SetupPool(this.m_WrapContentRewardTemp.parent.gameObject, this.m_WrapContentRewardTemp.gameObject, 30u, false);
+ this.m_WrapContentRewardTemp.gameObject.SetActive(false);
+ this.m_MessageLabel = (base.transform.Find("Bg/Message").GetComponent("XUILabel") as IXUILabel);
+ Transform transform = base.transform.Find("Bg/Show");
+ this.m_shardTexture = (base.transform.Find("Bg/Show/Texture").GetComponent("XUITexture") as IXUITexture);
+ this.m_dialogClose = (base.transform.Find("Bg/Dialog/Close").GetComponent("XUIButton") as IXUIButton);
+ this.m_dialogTexture = (base.transform.Find("Bg/Dialog/Texture").GetComponent("XUITexture") as IXUITexture);
+ this.m_dialogTransform = base.transform.Find("Bg/Dialog");
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/SevenLoginBehaviour.cs.meta b/Client/Assets/Scripts/XMainClient/UI/SevenLoginBehaviour.cs.meta
new file mode 100644
index 00000000..c8a0d8c1
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/SevenLoginBehaviour.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 5c27dbf8bb9357a419904384565ee945
+timeCreated: 1611403801
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/SevenLoginDlg.cs b/Client/Assets/Scripts/XMainClient/UI/SevenLoginDlg.cs
new file mode 100644
index 00000000..954d1f00
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/SevenLoginDlg.cs
@@ -0,0 +1,411 @@
+using System;
+using System.Collections.Generic;
+using KKSG;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class SevenLoginDlg : DlgBase<SevenLoginDlg, SevenLoginBehaviour>
+ {
+ public override string fileName
+ {
+ get
+ {
+ return "GameSystem/SevenAwardDlg";
+ }
+ }
+
+ public override int sysid
+ {
+ get
+ {
+ return XFastEnumIntEqualityComparer<XSysDefine>.ToInt(XSysDefine.XSys_SevenActivity);
+ }
+ }
+
+ public override int layer
+ {
+ get
+ {
+ return 1;
+ }
+ }
+
+ public override bool pushstack
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override bool autoload
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ private XSevenLoginDocument _Doc;
+
+ private List<SevenLoginWrapItem> m_WrapContentItems;
+
+ private int m_wrapContentHeight = 104;
+
+ private Vector3 m_RewardStartPos = Vector3.zero;
+
+ private uint m_TimeRecord = 0u;
+
+ private List<XFx> m_ItemEffectList;
+
+ private Vector3 m_ItemScale;
+
+ private string m_dialogSharedLocation = string.Empty;
+
+ private int mCurDayID = 0;
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ base.uiBehaviour.m_Close.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnClickCloseHandle));
+ base.uiBehaviour.m_dialogClose.RegisterClickEventHandler(new ButtonClickEventHandler(this.ClickDialogClose));
+ }
+
+ protected override void Init()
+ {
+ base.Init();
+ this._Doc = XDocuments.GetSpecificDocument<XSevenLoginDocument>(XSevenLoginDocument.uuID);
+ this._Doc.SevenLoginView = this;
+ base.uiBehaviour.m_dialogTransform.gameObject.SetActive(false);
+ }
+
+ protected override void OnLoad()
+ {
+ base.OnLoad();
+ this.m_WrapContentItems = new List<SevenLoginWrapItem>();
+ this.m_ItemEffectList = new List<XFx>();
+ this.m_ItemScale = new Vector3(0.8f, 0.8f, 0.8f);
+ }
+
+ protected override void OnUnload()
+ {
+ bool flag = this.m_WrapContentItems != null;
+ if (flag)
+ {
+ int i = 0;
+ int count = this.m_WrapContentItems.Count;
+ while (i < count)
+ {
+ this.m_WrapContentItems[i] = null;
+ i++;
+ }
+ this.m_WrapContentItems.Clear();
+ this.m_WrapContentItems = null;
+ }
+ bool flag2 = this.m_ItemEffectList != null;
+ if (flag2)
+ {
+ int j = 0;
+ int count2 = this.m_ItemEffectList.Count;
+ while (j < count2)
+ {
+ XSingleton<XFxMgr>.singleton.DestroyFx(this.m_ItemEffectList[j], true);
+ j++;
+ }
+ this.m_ItemEffectList.Clear();
+ this.m_ItemEffectList = null;
+ }
+ this.ClearShardTexture();
+ this.ClearDialogSharedTexture();
+ this._Doc.SevenLoginView = null;
+ base.OnUnload();
+ }
+
+ private void ClearEffectList()
+ {
+ bool flag = this.m_ItemEffectList != null;
+ if (flag)
+ {
+ int i = 0;
+ int count = this.m_ItemEffectList.Count;
+ while (i < count)
+ {
+ XSingleton<XFxMgr>.singleton.DestroyFx(this.m_ItemEffectList[i], true);
+ i++;
+ }
+ this.m_ItemEffectList.Clear();
+ }
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ this.Refresh();
+ }
+
+ protected override void OnHide()
+ {
+ int i = 0;
+ int count = this.m_ItemEffectList.Count;
+ while (i < count)
+ {
+ XSingleton<XFxMgr>.singleton.DestroyFx(this.m_ItemEffectList[i], true);
+ i++;
+ }
+ XSingleton<XTimerMgr>.singleton.KillTimer(this.m_TimeRecord);
+ base.OnHide();
+ }
+
+ public void Refresh()
+ {
+ this.ConfigSevenItemList();
+ this.ConfigSevenMessage();
+ this.ConfigImportTime(null);
+ }
+
+ public void ShowDialogSheredTexture()
+ {
+ bool flag = this._Doc.NextImportItem == 0;
+ if (!flag)
+ {
+ this.ClearDialogSharedTexture();
+ string dialogSharedString = this._Doc.GetDialogSharedString();
+ bool flag2 = string.IsNullOrEmpty(dialogSharedString) || dialogSharedString.Equals(this.m_dialogSharedLocation);
+ if (!flag2)
+ {
+ base.uiBehaviour.m_dialogTexture.SetTexturePath(dialogSharedString);
+ this.m_dialogSharedLocation = dialogSharedString;
+ base.uiBehaviour.m_dialogTransform.gameObject.SetActive(true);
+ base.uiBehaviour.m_dialogTexture.MakePixelPerfect();
+ }
+ }
+ }
+
+ private bool ClickDialogClose(IXUIButton btn)
+ {
+ base.uiBehaviour.m_dialogTransform.gameObject.SetActive(false);
+ return true;
+ }
+
+ private bool OnClickCloseHandle(IXUIButton btn)
+ {
+ this.SetVisibleWithAnimation(false, null);
+ return true;
+ }
+
+ private void ConfigImportTime(object o)
+ {
+ XSingleton<XTimerMgr>.singleton.KillTimer(this.m_TimeRecord);
+ int lastSecond = this._Doc.GetLastSecond();
+ bool flag = lastSecond > 0;
+ if (flag)
+ {
+ ItemList.RowData itemConf = XBagDocument.GetItemConf(this._Doc.NextImportItem);
+ base.uiBehaviour.m_LoginDayLabel.SetText(XStringDefineProxy.GetString("SEVEN_LOGIN_TIMERECORD", new object[]
+ {
+ (itemConf == null) ? string.Empty : itemConf.ItemName[0],
+ XSingleton<UiUtility>.singleton.TimeDuarationFormatString(lastSecond, 3)
+ }));
+ this.m_TimeRecord = XSingleton<XTimerMgr>.singleton.SetTimer(1f, new XTimerMgr.ElapsedEventHandler(this.ConfigImportTime), null);
+ }
+ else
+ {
+ base.uiBehaviour.m_LoginDayLabel.SetText(string.Empty);
+ }
+ }
+
+ private void ConfigSevenMessage()
+ {
+ bool flag = this._Doc.NextImportDay > 0;
+ if (flag)
+ {
+ base.uiBehaviour.m_MessageLabel.SetVisible(true);
+ string key = XSingleton<XCommon>.singleton.StringCombine("SEVEN_LOGIN_MESSAGE", this._Doc.NextImportDay.ToString());
+ ItemList.RowData itemConf = XBagDocument.GetItemConf(this._Doc.NextImportItem);
+ base.uiBehaviour.m_MessageLabel.SetText(XStringDefineProxy.GetString(key, new object[]
+ {
+ this._Doc.NextImportDay,
+ (itemConf == null) ? string.Empty : itemConf.ItemName[0]
+ }));
+ string sharedString = this._Doc.GetSharedString();
+ base.uiBehaviour.m_shardTexture.SetTexturePath(sharedString);
+ }
+ else
+ {
+ this.ResetShow();
+ base.uiBehaviour.m_MessageLabel.SetVisible(false);
+ }
+ }
+
+ private void ClearShardTexture()
+ {
+ base.uiBehaviour.m_shardTexture.SetTexturePath("");
+ }
+
+ private void ClearDialogSharedTexture()
+ {
+ this.m_uiBehaviour.m_dialogTexture.SetTexturePath("");
+ this.m_dialogSharedLocation = string.Empty;
+ }
+
+ private void ResetShow()
+ {
+ int i = 0;
+ int count = this.m_ItemEffectList.Count;
+ while (i < count)
+ {
+ XSingleton<XFxMgr>.singleton.DestroyFx(this.m_ItemEffectList[i], true);
+ i++;
+ }
+ }
+
+ private void ConfigSevenItemList()
+ {
+ this.ClearEffectList();
+ int i = this.m_WrapContentItems.Count;
+ List<LoginReward> loginRewards = this._Doc.LoginRewards;
+ loginRewards.Sort(new Comparison<LoginReward>(this.CompareWrapItem));
+ int count = loginRewards.Count;
+ Vector3 localPosition = base.uiBehaviour.m_WrapContentTemp.localPosition;
+ while (i < count)
+ {
+ GameObject gameObject = XCommon.Instantiate<GameObject>(base.uiBehaviour.m_WrapContentTemp.gameObject);
+ gameObject.SetActive(true);
+ gameObject.name = XSingleton<XCommon>.singleton.StringCombine("WrapItem_", i.ToString());
+ gameObject.transform.parent = base.uiBehaviour.m_WrapContentScrollView.gameObject.transform;
+ gameObject.transform.localScale = Vector3.one;
+ gameObject.transform.localPosition = localPosition;
+ localPosition.y += (float)this.m_wrapContentHeight;
+ SevenLoginWrapItem sevenLoginWrapItem = new SevenLoginWrapItem();
+ sevenLoginWrapItem.Init(gameObject.transform);
+ this.m_WrapContentItems.Add(sevenLoginWrapItem);
+ sevenLoginWrapItem.m_GetButton.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnGetRewardClick));
+ i++;
+ }
+ base.uiBehaviour.m_RewardPool.FakeReturnAll();
+ for (int j = 0; j < i; j++)
+ {
+ bool flag = j < count;
+ if (flag)
+ {
+ this.WrapContentItemUpdated(this.m_WrapContentItems[j], loginRewards[j]);
+ }
+ else
+ {
+ this.WrapContentItemUpdated(this.m_WrapContentItems[j], null);
+ }
+ XSingleton<XGameUI>.singleton.m_uiTool.MarkParentAsChanged(this.m_WrapContentItems[j].transform.gameObject);
+ }
+ base.uiBehaviour.m_RewardPool.ActualReturnAll(false);
+ base.uiBehaviour.m_WrapContentScrollView.ResetPosition();
+ }
+
+ private bool OnGetRewardClick(IXUIButton btn)
+ {
+ this.mCurDayID = (int)btn.ID;
+ int num = (int)XBagDocument.BagDoc.GetVirtualItemCount(ItemEnum.FATIGUE);
+ uint redayFatigue = this._Doc.GetRedayFatigue(this.mCurDayID);
+ int @int = XSingleton<XGlobalConfig>.singleton.GetInt("MaxFatigue");
+ bool flag = redayFatigue > 0u && (long)num + (long)((ulong)redayFatigue) > (long)@int;
+ if (flag)
+ {
+ XSingleton<UiUtility>.singleton.ShowFatigueSureDlg(new ButtonClickEventHandler(this.GetSureLogReward));
+ }
+ else
+ {
+ btn.SetEnable(false, false);
+ this.GetSureLogReward(null);
+ }
+ return true;
+ }
+
+ private bool GetSureLogReward(IXUIButton btn)
+ {
+ XSingleton<UiUtility>.singleton.CloseModalDlg();
+ this._Doc.GetLoginReward(this.mCurDayID);
+ return true;
+ }
+
+ private void SetItemEffect(GameObject parent, string effectName)
+ {
+ bool flag = string.IsNullOrEmpty(effectName);
+ if (!flag)
+ {
+ XFx xfx = XSingleton<XFxMgr>.singleton.CreateUIFx(effectName, parent.transform, false);
+ bool flag2 = xfx != null;
+ if (flag2)
+ {
+ this.m_ItemEffectList.Add(xfx);
+ }
+ }
+ }
+
+ private void WrapContentItemUpdated(SevenLoginWrapItem slwi, LoginReward reward)
+ {
+ bool flag = reward == null;
+ if (flag)
+ {
+ slwi.Set(null);
+ }
+ else
+ {
+ List<ItemBrief> items = reward.items;
+ slwi.Set(reward);
+ int i = 0;
+ int count = items.Count;
+ while (i < count)
+ {
+ GameObject gameObject = base.uiBehaviour.m_RewardPool.FetchGameObject(false);
+ gameObject.transform.parent = slwi.RewardParent;
+ gameObject.transform.localPosition = new Vector3(this.m_RewardStartPos.x + (float)(i * 75), this.m_RewardStartPos.y, this.m_RewardStartPos.z);
+ gameObject.transform.localScale = this.m_ItemScale;
+ IXUISprite ixuisprite = gameObject.transform.Find("Icon").GetComponent("XUISprite") as IXUISprite;
+ IXUISprite ixuisprite2 = gameObject.transform.Find("Quality").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.ID = (ulong)items[i].itemID;
+ ItemList.RowData itemConf = XBagDocument.GetItemConf((int)items[i].itemID);
+ this.SetItemEffect(ixuisprite2.gameObject, itemConf.ItemEffect);
+ XSingleton<XItemDrawerMgr>.singleton.normalItemDrawer.DrawItem(gameObject, itemConf, (int)items[i].itemCount, false);
+ ixuisprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(XSingleton<UiUtility>.singleton.OnItemClick));
+ i++;
+ }
+ }
+ }
+
+ private int CompareWrapItem(LoginReward reward1, LoginReward reward2)
+ {
+ bool flag = reward1.state == reward2.state;
+ int result;
+ if (flag)
+ {
+ result = reward2.day - reward1.day;
+ }
+ else
+ {
+ result = this.GetSortIndexByState(reward1.state) - this.GetSortIndexByState(reward2.state);
+ }
+ return result;
+ }
+
+ private int GetSortIndexByState(LoginRewardState state)
+ {
+ int result = 0;
+ switch (state)
+ {
+ case LoginRewardState.LOGINRS_CANNOT:
+ result = 2;
+ break;
+ case LoginRewardState.LOGINRS_HAVEHOT:
+ result = 3;
+ break;
+ case LoginRewardState.LOGINRS_HAVE:
+ result = 1;
+ break;
+ }
+ return result;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/SevenLoginDlg.cs.meta b/Client/Assets/Scripts/XMainClient/UI/SevenLoginDlg.cs.meta
new file mode 100644
index 00000000..94b17077
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/SevenLoginDlg.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 22d6718445c7c024998e0286128e0fce
+timeCreated: 1611403425
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/SevenLoginWrapItem.cs b/Client/Assets/Scripts/XMainClient/UI/SevenLoginWrapItem.cs
new file mode 100644
index 00000000..1d889564
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/SevenLoginWrapItem.cs
@@ -0,0 +1,62 @@
+using System;
+using KKSG;
+using UILib;
+using UnityEngine;
+
+namespace XMainClient.UI
+{
+ internal class SevenLoginWrapItem
+ {
+ public Transform transform
+ {
+ get
+ {
+ return this.m_transform;
+ }
+ }
+
+ public Transform m_transform;
+
+ public Transform RewardParent;
+
+ public IXUILabel m_DayLabel;
+
+ public Transform m_UnGetLabel;
+
+ public Transform m_HadGetSprite;
+
+ public IXUIButton m_GetButton;
+
+ private LoginReward m_LoginReward;
+
+ public void Init(Transform tf)
+ {
+ this.m_transform = tf;
+ this.RewardParent = tf.Find("AwardList");
+ this.m_DayLabel = (tf.Find("DayLabel").GetComponent("XUILabel") as IXUILabel);
+ this.m_GetButton = (tf.Find("Response/GetButton").GetComponent("XUIButton") as IXUIButton);
+ this.m_HadGetSprite = tf.Find("Response/HadGet");
+ this.m_UnGetLabel = tf.Find("Response/UnGet");
+ }
+
+ public void Set(LoginReward reward)
+ {
+ bool flag = reward == null;
+ if (flag)
+ {
+ this.m_transform.gameObject.SetActive(false);
+ }
+ else
+ {
+ this.m_transform.gameObject.SetActive(true);
+ this.m_LoginReward = reward;
+ this.m_DayLabel.SetText(this.m_LoginReward.day.ToString());
+ this.m_GetButton.ID = (ulong)((long)reward.day);
+ this.m_GetButton.gameObject.SetActive(reward.state == LoginRewardState.LOGINRS_HAVEHOT);
+ this.m_GetButton.SetEnable(true, false);
+ this.m_HadGetSprite.gameObject.SetActive(reward.state == LoginRewardState.LOGINRS_HAVE);
+ this.m_UnGetLabel.gameObject.SetActive(reward.state == LoginRewardState.LOGINRS_CANNOT);
+ }
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/SevenLoginWrapItem.cs.meta b/Client/Assets/Scripts/XMainClient/UI/SevenLoginWrapItem.cs.meta
new file mode 100644
index 00000000..a65ba40b
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/SevenLoginWrapItem.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: ce28a4e672d9fef47bf6145a6f1545cd
+timeCreated: 1611404578
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/SmeltMainHandler.cs b/Client/Assets/Scripts/XMainClient/UI/SmeltMainHandler.cs
new file mode 100644
index 00000000..5af239b0
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/SmeltMainHandler.cs
@@ -0,0 +1,747 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class SmeltMainHandler : DlgHandlerBase
+ {
+ private XSmeltDocument m_doc
+ {
+ get
+ {
+ return XSmeltDocument.Doc;
+ }
+ }
+
+ public string EffectPath
+ {
+ get
+ {
+ bool flag = string.IsNullOrEmpty(this.m_effectPath);
+ if (flag)
+ {
+ this.m_effectPath = XSingleton<XGlobalConfig>.singleton.GetValue("SmeltEffectPath");
+ }
+ return this.m_effectPath;
+ }
+ }
+
+ protected override string FileName
+ {
+ get
+ {
+ return "ItemNew/SmeltMainHandler";
+ }
+ }
+
+ private XUIPool m_AttrTplPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ private IXUIButton m_ClosedBtn;
+
+ private IXUIButton m_SmeltBtn;
+
+ private IXUIButton m_Help;
+
+ private IXUILabel m_TittleLab;
+
+ private IXUILabel m_NeedGoldLab;
+
+ private IXUILabel m_tips1Lab;
+
+ private IXUILabel m_tips2Lab;
+
+ public GameObject m_btnRedDot;
+
+ public GameObject m_resultGo;
+
+ private GameObject m_SmeltItemGo;
+
+ private GameObject m_AttrParentGo;
+
+ private List<GameObject> m_itemGoList;
+
+ private Transform m_curTra = null;
+
+ private bool m_needItemIsEnough = true;
+
+ private bool m_bIsInit = true;
+
+ private bool m_bIsNeedRandTips = true;
+
+ private List<XTuple<int, int>> m_NeedSmeltStoneLst = new List<XTuple<int, int>>();
+
+ private int m_smeltItemId = 0;
+
+ private XFx m_fx;
+
+ private string m_effectPath = string.Empty;
+
+ private bool m_bStatus = false;
+
+ private float m_cdTime = 0.2f;
+
+ private float m_lastClickTime = 0f;
+
+ protected override void Init()
+ {
+ base.Init();
+ this.m_AttrParentGo = base.PanelObject.transform.Find("AttrParentGo").gameObject;
+ Transform transform = base.PanelObject.transform.Find("AttrTpl");
+ this.m_AttrTplPool.SetupPool(this.m_AttrParentGo, transform.gameObject, 3u, false);
+ transform = base.PanelObject.transform.Find("Top");
+ this.m_SmeltItemGo = transform.Find("SmeltItem").gameObject;
+ this.m_tips1Lab = (transform.Find("Tips1").GetComponent("XUILabel") as IXUILabel);
+ this.m_tips2Lab = (transform.Find("Tips2").GetComponent("XUILabel") as IXUILabel);
+ this.m_Help = (base.transform.Find("Help").GetComponent("XUIButton") as IXUIButton);
+ this.m_ClosedBtn = (base.PanelObject.transform.Find("Close").GetComponent("XUIButton") as IXUIButton);
+ this.m_TittleLab = (base.PanelObject.transform.Find("TittleLab").GetComponent("XUILabel") as IXUILabel);
+ transform = base.PanelObject.transform.Find("Bottom");
+ this.m_SmeltBtn = (transform.Find("SmeltBtn").GetComponent("XUIButton") as IXUIButton);
+ this.m_NeedGoldLab = (transform.Find("NeedGoldLab").GetComponent("XUILabel") as IXUILabel);
+ this.m_btnRedDot = this.m_SmeltBtn.gameObject.transform.Find("RedPoint").gameObject;
+ this.m_resultGo = base.PanelObject.transform.Find("Result").gameObject;
+ bool flag = this.m_itemGoList == null;
+ if (flag)
+ {
+ transform = transform.Find("Items");
+ this.m_itemGoList = new List<GameObject>();
+ for (int i = 0; i < transform.childCount; i++)
+ {
+ this.m_itemGoList.Add(transform.GetChild(i).gameObject);
+ }
+ }
+ this.m_doc.View = this;
+ this.m_tips1Lab.SetText(XSingleton<XStringTable>.singleton.GetString("SmeltNewTips1"));
+ this.m_tips2Lab.SetText(XSingleton<XStringTable>.singleton.GetString("SmeltNewTips2"));
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ this.m_ClosedBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnCloseClicked));
+ this.m_SmeltBtn.RegisterPressEventHandler(new ButtonPressEventHandler(this.OnIconPress));
+ this.m_Help.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnHelpClicked));
+ }
+
+ public bool OnHelpClicked(IXUIButton button)
+ {
+ DlgBase<XCommonHelpTipView, XCommonHelpTipBehaviour>.singleton.ShowHelp(XSysDefine.XSys_Item_Smelting);
+ return true;
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ this.RefreshData();
+ }
+
+ protected override void OnHide()
+ {
+ this.m_doc.Clear();
+ bool flag = DlgBase<ItemSystemDlg, TabDlgBehaviour>.singleton._EmblemEquipHandler != null;
+ if (flag)
+ {
+ DlgBase<ItemSystemDlg, TabDlgBehaviour>.singleton._EmblemEquipHandler.RegisterItemClickEvents(null);
+ }
+ DlgBase<ItemSystemDlg, TabDlgBehaviour>.singleton.OnPopHandlerSetVisible(false, null);
+ DlgBase<ItemSystemDlg, TabDlgBehaviour>.singleton.StackRefresh();
+ bool flag2 = DlgBase<ItemSystemDlg, TabDlgBehaviour>.singleton._equipHandler != null;
+ if (flag2)
+ {
+ DlgBase<ItemSystemDlg, TabDlgBehaviour>.singleton._equipHandler.SelectEquip(0UL);
+ DlgBase<ItemSystemDlg, TabDlgBehaviour>.singleton._equipHandler.RegisterItemClickEvents(null);
+ }
+ bool flag3 = this.m_fx != null;
+ if (flag3)
+ {
+ this.m_fx.Stop();
+ this.m_fx.SetActive(false);
+ }
+ this.m_bStatus = false;
+ base.OnHide();
+ }
+
+ public override void OnUnload()
+ {
+ this.m_doc.View = null;
+ this.m_doc.MesIsBack = true;
+ bool flag = this.m_fx != null;
+ if (flag)
+ {
+ XSingleton<XFxMgr>.singleton.DestroyFx(this.m_fx, true);
+ this.m_fx = null;
+ }
+ base.OnUnload();
+ }
+
+ public override void RefreshData()
+ {
+ base.RefreshData();
+ XItem itemByUID = XBagDocument.BagDoc.GetItemByUID(this.m_doc.CurUid);
+ bool flag = itemByUID != null;
+ if (flag)
+ {
+ bool flag2 = DlgBase<ItemSystemDlg, TabDlgBehaviour>.singleton._equipHandler != null && DlgBase<ItemSystemDlg, TabDlgBehaviour>.singleton._equipHandler.IsVisible() && itemByUID.Type == ItemType.EQUIP;
+ if (flag2)
+ {
+ DlgBase<ItemSystemDlg, TabDlgBehaviour>.singleton._equipHandler.RegisterItemClickEvents(new SpriteClickEventHandler(this.OnEquipClicked));
+ }
+ else
+ {
+ bool flag3 = itemByUID.Type == ItemType.EMBLEM && DlgBase<ItemSystemDlg, TabDlgBehaviour>.singleton._EmblemEquipHandler != null && DlgBase<ItemSystemDlg, TabDlgBehaviour>.singleton._EmblemEquipHandler.IsVisible();
+ if (flag3)
+ {
+ DlgBase<ItemSystemDlg, TabDlgBehaviour>.singleton._EmblemEquipHandler.RegisterItemClickEvents(new SpriteClickEventHandler(this.OnEquipClicked));
+ }
+ }
+ }
+ this.ShowUi();
+ }
+
+ public override void StackRefresh()
+ {
+ this.RefreshData();
+ base.StackRefresh();
+ }
+
+ public void RefreshUi(bool randTips)
+ {
+ this.m_bIsInit = false;
+ this.m_bIsNeedRandTips = randTips;
+ this.FillContent();
+ }
+
+ public void ShowUi()
+ {
+ this.m_bIsInit = true;
+ this.GetShowIndex();
+ this.FillContent();
+ }
+
+ public void UpdateUi(bool randTips)
+ {
+ this.m_bIsInit = true;
+ this.m_bIsNeedRandTips = randTips;
+ this.FillContent();
+ }
+
+ private void FillContent()
+ {
+ this.FillTop();
+ this.FillAttrList();
+ this.FillResultPanel();
+ this.FillBottom();
+ }
+
+ private void FillTop()
+ {
+ XItem itemByUID = XBagDocument.BagDoc.GetItemByUID(this.m_doc.CurUid);
+ bool flag = itemByUID == null;
+ if (flag)
+ {
+ XSingleton<XDebug>.singleton.AddErrorLog("not find uid : ", this.m_doc.CurUid.ToString(), null, null, null, null);
+ }
+ else
+ {
+ bool flag2 = itemByUID.Type == ItemType.EQUIP;
+ if (flag2)
+ {
+ XSingleton<XItemDrawerMgr>.singleton.DrawItem(this.m_SmeltItemGo, itemByUID as XEquipItem);
+ }
+ else
+ {
+ bool flag3 = itemByUID.Type == ItemType.EMBLEM;
+ if (flag3)
+ {
+ XSingleton<XItemDrawerMgr>.singleton.DrawItem(this.m_SmeltItemGo, itemByUID as XEmblemItem);
+ }
+ else
+ {
+ XSingleton<XItemDrawerMgr>.singleton.DrawItem(this.m_SmeltItemGo, itemByUID);
+ }
+ }
+ IXUISprite ixuisprite = this.m_SmeltItemGo.transform.Find("Icon").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.ID = this.m_doc.CurUid;
+ ixuisprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnSelectedItemClicked));
+ bool flag4 = itemByUID.Type == ItemType.EQUIP;
+ if (flag4)
+ {
+ this.m_TittleLab.SetText(XStringDefineProxy.GetString("EquipSmelt"));
+ }
+ else
+ {
+ this.m_TittleLab.SetText(XStringDefineProxy.GetString("EmbleSmelt"));
+ }
+ }
+ }
+
+ private void FillAttrList()
+ {
+ this.m_AttrTplPool.ReturnAll(false);
+ bool flag = this.m_fx != null;
+ if (flag)
+ {
+ this.m_fx.Stop();
+ this.m_fx.SetActive(false);
+ }
+ bool flag2 = this.m_doc.SmeltAttrList == null || this.m_doc.SmeltAttrList.Count == 0;
+ if (!flag2)
+ {
+ for (int i = 0; i < this.m_doc.SmeltAttrList.Count; i++)
+ {
+ GameObject gameObject = this.m_AttrTplPool.FetchGameObject(false);
+ gameObject.transform.localPosition = new Vector3(0f, (float)(-57 * i), 0f);
+ this.FillAttrItem(gameObject, this.m_doc.GetSmeltAttr(i), i);
+ }
+ }
+ }
+
+ private void FillAttrItem(GameObject go, SmeltAttr attr, int index)
+ {
+ bool flag = attr == null;
+ if (!flag)
+ {
+ IXUILabel ixuilabel = go.transform.Find("Name").GetComponent("XUILabel") as IXUILabel;
+ string text = string.Format("[{0}]{1}[-]", attr.ColorStr, XAttributeCommon.GetAttrStr((int)attr.AttrID));
+ ixuilabel.SetText(text);
+ text = string.Format("[{0}]{1}[-]", attr.ColorStr, attr.RealValue);
+ ixuilabel = (go.transform.Find("Name/Value").GetComponent("XUILabel") as IXUILabel);
+ ixuilabel.SetText(text);
+ text = string.Format("[{0}]{1}[{2}-{3}][-]", new object[]
+ {
+ attr.ColorStr,
+ XStringDefineProxy.GetString("SmeltRange"),
+ attr.Min,
+ attr.Max
+ });
+ ixuilabel = (go.transform.Find("RangeVlue").GetComponent("XUILabel") as IXUILabel);
+ ixuilabel.SetText(text);
+ go.transform.Find("Select").gameObject.SetActive(false);
+ go.transform.Find("Select1").gameObject.SetActive(false);
+ IXUISprite ixuisprite = go.transform.Find("Bg").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.ID = (ulong)((long)index);
+ ixuisprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnClickCheckBox));
+ go.transform.Find("RedPoint").gameObject.SetActive(false);
+ bool flag2 = index == this.m_doc.SelectIndex;
+ if (flag2)
+ {
+ this.m_curTra = go.transform;
+ this.m_curTra.Find("Select").gameObject.SetActive(true);
+ this.m_curTra.Find("Select1").gameObject.SetActive(true);
+ bool flag3 = !this.m_bIsInit;
+ if (flag3)
+ {
+ bool flag4 = this.m_fx == null;
+ if (flag4)
+ {
+ this.m_fx = XSingleton<XFxMgr>.singleton.CreateFx(this.EffectPath, null, true);
+ }
+ else
+ {
+ this.m_fx.SetActive(true);
+ }
+ this.m_fx.Play(go.transform.Find("effect"), Vector3.zero, Vector3.one, 1f, true, false);
+ }
+ this.FillResultPanel();
+ }
+ }
+ }
+
+ private void FillResultPanel()
+ {
+ SmeltAttr smeltAttr = this.m_doc.GetSmeltAttr(this.m_doc.SelectIndex);
+ bool flag = smeltAttr == null;
+ if (flag)
+ {
+ this.m_resultGo.SetActive(false);
+ }
+ else
+ {
+ this.m_resultGo.SetActive(true);
+ IXUILabel ixuilabel = this.m_resultGo.transform.Find("Tips").GetComponent("XUILabel") as IXUILabel;
+ bool bIsNeedRandTips = this.m_bIsNeedRandTips;
+ if (bIsNeedRandTips)
+ {
+ ixuilabel.SetText(this.GetTips());
+ }
+ else
+ {
+ this.m_bIsNeedRandTips = true;
+ }
+ this.m_btnRedDot.SetActive(false);
+ ixuilabel = (this.m_resultGo.transform.Find("Name").GetComponent("XUILabel") as IXUILabel);
+ string text = string.Format("[{0}]{1}[-]", smeltAttr.ColorStr, XAttributeCommon.GetAttrStr((int)smeltAttr.AttrID));
+ ixuilabel.SetText(text);
+ bool flag2 = smeltAttr.LastValue == -1;
+ if (flag2)
+ {
+ ixuilabel = (this.m_resultGo.transform.Find("NowValue").GetComponent("XUILabel") as IXUILabel);
+ ixuilabel.SetText(string.Format("[{0}]{1}[-]", smeltAttr.ColorStr, this.GetAttrValue()));
+ ixuilabel = (this.m_resultGo.transform.Find("AfterValue").GetComponent("XUILabel") as IXUILabel);
+ ixuilabel.SetText(string.Format("[{0}]{1}[-]", smeltAttr.ColorStr, "???"));
+ ixuilabel.gameObject.transform.Find("Up").gameObject.SetActive(false);
+ ixuilabel.gameObject.transform.Find("Down").gameObject.SetActive(false);
+ }
+ else
+ {
+ ixuilabel = (this.m_resultGo.transform.Find("NowValue").GetComponent("XUILabel") as IXUILabel);
+ ixuilabel.SetText(string.Format("[{0}]{1}[-]", smeltAttr.ColorStr, smeltAttr.LastValue));
+ ixuilabel = (this.m_resultGo.transform.Find("AfterValue").GetComponent("XUILabel") as IXUILabel);
+ bool isReplace = smeltAttr.IsReplace;
+ if (isReplace)
+ {
+ ixuilabel.SetText(string.Format("[63ff85]{0}[-]", smeltAttr.SmeltResult));
+ ixuilabel.gameObject.transform.Find("Down").gameObject.SetActive(false);
+ ixuilabel = (ixuilabel.gameObject.transform.Find("Up").GetComponent("XUILabel") as IXUILabel);
+ ixuilabel.SetText(string.Format("[63ff85]{0}[-]", (long)((ulong)smeltAttr.SmeltResult - (ulong)((long)smeltAttr.LastValue))));
+ ixuilabel.gameObject.SetActive(true);
+ }
+ else
+ {
+ ixuilabel.SetText(string.Format("[ff3e3e]{0}[-]", smeltAttr.SmeltResult));
+ ixuilabel.gameObject.transform.Find("Up").gameObject.SetActive(false);
+ ixuilabel = (ixuilabel.gameObject.transform.Find("Down").GetComponent("XUILabel") as IXUILabel);
+ ixuilabel.SetText(string.Format("[ff3e3e]{0}[-]", (long)smeltAttr.LastValue - (long)((ulong)smeltAttr.SmeltResult)));
+ ixuilabel.gameObject.SetActive(true);
+ }
+ }
+ }
+ }
+
+ private string GetTips()
+ {
+ SmeltAttr smeltAttr = this.m_doc.GetSmeltAttr(this.m_doc.SelectIndex);
+ bool flag = smeltAttr == null || smeltAttr.LastValue == -1;
+ string @string;
+ if (flag)
+ {
+ @string = XStringDefineProxy.GetString("SmeltBadNotReplace");
+ }
+ else
+ {
+ int num = UnityEngine.Random.Range(0, 10);
+ bool isReplace = smeltAttr.IsReplace;
+ if (isReplace)
+ {
+ @string = XStringDefineProxy.GetString(XSingleton<XCommon>.singleton.StringCombine("SmeltSucceed", num.ToString()));
+ }
+ else
+ {
+ @string = XStringDefineProxy.GetString(XSingleton<XCommon>.singleton.StringCombine("SmeltLost", num.ToString()));
+ }
+ }
+ return @string;
+ }
+
+ private uint GetAttrValue()
+ {
+ SmeltAttr smeltAttr = this.m_doc.GetSmeltAttr(this.m_doc.SelectIndex);
+ bool flag = smeltAttr == null;
+ uint result;
+ if (flag)
+ {
+ result = 0u;
+ }
+ else
+ {
+ result = smeltAttr.RealValue;
+ }
+ return result;
+ }
+
+ public void UpdateNeedItem()
+ {
+ this.FillBottom();
+ }
+
+ private void FillBottom()
+ {
+ this.m_NeedGoldLab.SetText(this.m_doc.GetNeedGold().ToString());
+ SeqListRef<uint> needItem = this.m_doc.GetNeedItem();
+ this.m_needItemIsEnough = true;
+ for (int i = 0; i < this.m_itemGoList.Count; i++)
+ {
+ GameObject gameObject = this.m_itemGoList[i];
+ bool flag = gameObject == null;
+ if (!flag)
+ {
+ bool flag2 = i >= needItem.Count;
+ if (flag2)
+ {
+ XSingleton<XItemDrawerMgr>.singleton.normalItemDrawer.DrawItem(gameObject, null, 0, false);
+ }
+ else
+ {
+ XSingleton<XItemDrawerMgr>.singleton.normalItemDrawer.DrawItem(gameObject, (int)needItem[i, 0], (int)needItem[i, 1], false);
+ ulong itemCount = XBagDocument.BagDoc.GetItemCount((int)needItem[i, 0]);
+ bool flag3 = itemCount >= (ulong)needItem[i, 1];
+ bool flag4 = i == 0;
+ if (flag4)
+ {
+ int num = 0;
+ this.m_NeedSmeltStoneLst = this.m_doc.GetShouldShowItems((int)needItem[i, 0], (int)needItem[i, 1], ref num);
+ flag3 = ((long)num >= (long)((ulong)needItem[i, 1]));
+ this.m_smeltItemId = (int)needItem[i, 0];
+ }
+ bool flag5 = !flag3;
+ if (flag5)
+ {
+ this.m_needItemIsEnough = false;
+ }
+ IXUILabel ixuilabel = gameObject.transform.Find("Num").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel.gameObject.SetActive(true);
+ bool flag6 = flag3;
+ if (flag6)
+ {
+ ixuilabel.SetText(string.Format(XStringDefineProxy.GetString("COMMON_COUNT_TOTAL_ENOUGH_FMT"), itemCount, needItem[i, 1]));
+ }
+ else
+ {
+ ixuilabel.SetText(string.Format(XStringDefineProxy.GetString("COMMON_COUNT_TOTAL_NOTENOUGH_FMT"), itemCount, needItem[i, 1]));
+ }
+ IXUISprite ixuisprite = gameObject.transform.Find("Icon").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.ID = (ulong)needItem[i, 0];
+ bool flag7 = flag3;
+ if (flag7)
+ {
+ ixuisprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(XSingleton<UiUtility>.singleton.OnItemClick));
+ }
+ else
+ {
+ ixuisprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnGetItemAccess));
+ }
+ }
+ }
+ }
+ }
+
+ private void GetShowIndex()
+ {
+ this.m_doc.SelectIndex = 0;
+ bool flag = this.m_doc.SmeltAttrList == null || this.m_doc.SmeltAttrList.Count == 0;
+ if (!flag)
+ {
+ for (int i = 0; i < this.m_doc.SmeltAttrList.Count; i++)
+ {
+ bool flag2 = !this.m_doc.SmeltAttrList[i].IsFull;
+ if (flag2)
+ {
+ this.m_doc.SelectIndex = i;
+ break;
+ }
+ }
+ }
+ }
+
+ private string GetTipsStr()
+ {
+ StringBuilder stringBuilder = new StringBuilder();
+ ItemList.RowData itemConf;
+ for (int i = 0; i < this.m_NeedSmeltStoneLst.Count; i++)
+ {
+ itemConf = XBagDocument.GetItemConf(this.m_NeedSmeltStoneLst[i].Item1);
+ bool flag = itemConf != null;
+ if (flag)
+ {
+ stringBuilder.Append(this.m_NeedSmeltStoneLst[i].Item2).Append(XSingleton<XStringTable>.singleton.GetString("Ge")).Append("[00ff00]").Append(itemConf.ItemName[0]).Append("[-]");
+ bool flag2 = i != this.m_NeedSmeltStoneLst.Count;
+ if (flag2)
+ {
+ stringBuilder.Append(",");
+ }
+ }
+ }
+ itemConf = XBagDocument.GetItemConf(this.m_smeltItemId);
+ bool flag3 = itemConf != null;
+ string result;
+ if (flag3)
+ {
+ result = string.Format(XSingleton<XStringTable>.singleton.GetString("SmeltStoneExchangedTips"), itemConf.ItemName[0], stringBuilder);
+ }
+ else
+ {
+ result = "";
+ }
+ return result;
+ }
+
+ private bool OnCloseClicked(IXUIButton btn)
+ {
+ base.SetVisible(false);
+ return true;
+ }
+
+ private bool Smelt()
+ {
+ uint needGold = this.m_doc.GetNeedGold();
+ bool flag = (ulong)needGold >= XBagDocument.BagDoc.GetItemCount(1);
+ bool result;
+ if (flag)
+ {
+ int level = (int)XSingleton<XAttributeMgr>.singleton.XPlayerData.Level;
+ XRechargeDocument specificDocument = XDocuments.GetSpecificDocument<XRechargeDocument>(XRechargeDocument.uuID);
+ int vipLevel = (int)specificDocument.VipLevel;
+ XPurchaseDocument xpurchaseDocument = XSingleton<XGame>.singleton.Doc.GetXComponent(XPurchaseDocument.uuID) as XPurchaseDocument;
+ XPurchaseInfo purchaseInfo = xpurchaseDocument.GetPurchaseInfo(level, vipLevel, ItemEnum.GOLD);
+ bool flag2 = purchaseInfo.totalBuyNum > purchaseInfo.curBuyNum;
+ if (flag2)
+ {
+ DlgBase<XPurchaseView, XPurchaseBehaviour>.singleton.ReqQuickCommonPurchase(ItemEnum.GOLD);
+ }
+ else
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString("ERR_LACKCOIN"), "fece00");
+ }
+ this.m_bStatus = false;
+ result = true;
+ }
+ else
+ {
+ bool flag3 = !this.m_needItemIsEnough;
+ if (flag3)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString("ERR_SMELTING_LACKMONEY"), "fece00");
+ this.m_bStatus = false;
+ result = true;
+ }
+ else
+ {
+ SmeltAttr smeltAttr = this.m_doc.GetSmeltAttr(this.m_doc.SelectIndex);
+ bool flag4 = smeltAttr == null;
+ if (flag4)
+ {
+ this.m_bStatus = false;
+ result = true;
+ }
+ else
+ {
+ bool isFull = smeltAttr.IsFull;
+ if (isFull)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString("SmeltAttrFull"), "fece00");
+ this.m_bStatus = false;
+ result = true;
+ }
+ else
+ {
+ bool flag5 = !smeltAttr.IsCanSmelt;
+ if (flag5)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString("ThisAttrCannotSmelt"), "fece00");
+ this.m_bStatus = false;
+ result = true;
+ }
+ else
+ {
+ XOptionsDocument specificDocument2 = XDocuments.GetSpecificDocument<XOptionsDocument>(XOptionsDocument.uuID);
+ bool flag6 = (this.m_NeedSmeltStoneLst.Count == 1 && this.m_NeedSmeltStoneLst[0].Item1 == this.m_smeltItemId) || specificDocument2.GetValue(XOptionsDefine.OD_NO_SMELTSTONE_EXCHANGED_CONFIRM) == 1;
+ if (flag6)
+ {
+ this.m_doc.ReqSmelt();
+ }
+ else
+ {
+ XSingleton<UiUtility>.singleton.ShowModalDialog(this.GetTipsStr(), XStringDefineProxy.GetString(XStringDefine.COMMON_OK), XStringDefineProxy.GetString(XStringDefine.COMMON_CANCEL), new ButtonClickEventHandler(this.DoOK), new ButtonClickEventHandler(this.DoCancel), false, XTempTipDefine.OD_SMELTSTONE_EXCHANGED, 50);
+ this.m_bStatus = false;
+ }
+ result = true;
+ }
+ }
+ }
+ }
+ }
+ return result;
+ }
+
+ private bool DoCancel(IXUIButton btn)
+ {
+ XOptionsDocument specificDocument = XDocuments.GetSpecificDocument<XOptionsDocument>(XOptionsDocument.uuID);
+ specificDocument.SetValue(XOptionsDefine.OD_NO_SMELTSTONE_EXCHANGED_CONFIRM, DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.GetTempTip(XTempTipDefine.OD_SMELTSTONE_EXCHANGED) ? 1 : 0, false);
+ XSingleton<UiUtility>.singleton.CloseModalDlg();
+ return true;
+ }
+
+ private bool DoOK(IXUIButton btn)
+ {
+ this.m_doc.ReqSmelt();
+ bool flag = DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.IsVisible();
+ if (flag)
+ {
+ XOptionsDocument specificDocument = XDocuments.GetSpecificDocument<XOptionsDocument>(XOptionsDocument.uuID);
+ specificDocument.SetValue(XOptionsDefine.OD_NO_SMELTSTONE_EXCHANGED_CONFIRM, DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.GetTempTip(XTempTipDefine.OD_SMELTSTONE_EXCHANGED) ? 1 : 0, false);
+ }
+ XSingleton<UiUtility>.singleton.CloseModalDlg();
+ return true;
+ }
+
+ private void OnSelectedItemClicked(IXUISprite iSp)
+ {
+ this.m_bStatus = false;
+ ulong id = iSp.ID;
+ XSingleton<UiUtility>.singleton.ShowTooltipDialog(XSingleton<XGame>.singleton.Doc.XBagDoc.GetItemByUID(id), null, iSp, false, 0u);
+ }
+
+ private void OnGetItemAccess(IXUISprite iSp)
+ {
+ this.m_bStatus = false;
+ int itemid = (int)iSp.ID;
+ XSingleton<UiUtility>.singleton.ShowItemAccess(itemid, null);
+ }
+
+ public void OnEquipClicked(IXUISprite iSp)
+ {
+ bool flag = !this.m_doc.MesIsBack;
+ if (!flag)
+ {
+ this.m_bStatus = false;
+ this.m_doc.SelectEquip(iSp.ID);
+ }
+ }
+
+ private void OnClickCheckBox(IXUISprite iSp)
+ {
+ bool flag = !this.m_doc.MesIsBack;
+ if (!flag)
+ {
+ this.m_bStatus = false;
+ this.m_doc.SelectIndex = (int)iSp.ID;
+ bool flag2 = this.m_curTra != null;
+ if (flag2)
+ {
+ this.m_curTra.Find("Select").gameObject.SetActive(false);
+ this.m_curTra.Find("Select1").gameObject.SetActive(false);
+ }
+ this.m_curTra = iSp.gameObject.transform.parent;
+ this.m_curTra.Find("Select").gameObject.SetActive(true);
+ this.m_curTra.Find("Select1").gameObject.SetActive(true);
+ this.FillResultPanel();
+ }
+ }
+
+ private void OnIconPress(IXUIButton btn, bool state)
+ {
+ XSingleton<XDebug>.singleton.AddGreenLog("icon press", null, null, null, null, null);
+ this.m_bStatus = state;
+ }
+
+ public override void OnUpdate()
+ {
+ base.OnUpdate();
+ bool flag = this.m_bStatus && this.m_doc.MesIsBack;
+ if (flag)
+ {
+ bool flag2 = Time.realtimeSinceStartup - this.m_lastClickTime >= this.m_cdTime;
+ if (flag2)
+ {
+ this.m_lastClickTime = Time.realtimeSinceStartup;
+ this.Smelt();
+ }
+ }
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/SmeltMainHandler.cs.meta b/Client/Assets/Scripts/XMainClient/UI/SmeltMainHandler.cs.meta
new file mode 100644
index 00000000..62570ea0
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/SmeltMainHandler.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: b8cc3234f40bff443ac2823db9004902
+timeCreated: 1611404407
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/SpectateLevelRewardView.cs b/Client/Assets/Scripts/XMainClient/UI/SpectateLevelRewardView.cs
new file mode 100644
index 00000000..323b21e9
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/SpectateLevelRewardView.cs
@@ -0,0 +1,300 @@
+using System;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class SpectateLevelRewardView : DlgBase<SpectateLevelRewardView, SpectateLevelRewardBehaviour>
+ {
+ public override bool autoload
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override string fileName
+ {
+ get
+ {
+ return "Battle/SpectateLevelReward";
+ }
+ }
+
+ private XSpectateLevelRewardDocument _doc;
+
+ public int MemberAndSplitHeight;
+
+ protected override void Init()
+ {
+ this._doc = XDocuments.GetSpecificDocument<XSpectateLevelRewardDocument>(XSpectateLevelRewardDocument.uuID);
+ base.uiBehaviour.m_GoOnBtnText.SetText(XStringDefineProxy.GetString("Spectate_Goon"));
+ }
+
+ public override void RegisterEvent()
+ {
+ base.uiBehaviour.m_BackToMainCityBtn.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.BackToMainCityBtnClick));
+ base.uiBehaviour.m_GoOnBtn.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnGoOnBtnClick));
+ }
+
+ public void BackToMainCityBtnClick(IXUISprite btn)
+ {
+ this._doc.LevelScene();
+ }
+
+ public void OnGoOnBtnClick(IXUISprite iSp)
+ {
+ this.SetVisible(false, true);
+ DlgBase<SpectateView, SpectateBehaviour>.singleton.SetVisible(true, true);
+ }
+
+ private void OnAddFriendClick(IXUISprite sp)
+ {
+ DlgBase<XFriendsView, XFriendsBehaviour>.singleton.AddFriendById(sp.ID);
+ }
+
+ protected override void OnShow()
+ {
+ bool flag = DlgBase<SpectateSceneView, SpectateSceneBehaviour>.singleton.IsVisible();
+ if (flag)
+ {
+ DlgBase<SpectateSceneView, SpectateSceneBehaviour>.singleton.SetVisible(false, true);
+ }
+ }
+
+ public void ShowData()
+ {
+ bool flag = DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.IsVisible();
+ if (!flag)
+ {
+ bool flag2 = DlgBase<SpectateSceneView, SpectateSceneBehaviour>.singleton.IsLoaded() && DlgBase<SpectateSceneView, SpectateSceneBehaviour>.singleton.m_XOptionBattleHandler != null && DlgBase<SpectateSceneView, SpectateSceneBehaviour>.singleton.m_XOptionBattleHandler.IsVisible();
+ if (flag2)
+ {
+ DlgBase<SpectateSceneView, SpectateSceneBehaviour>.singleton.m_XOptionBattleHandler.OnCloseClicked(null);
+ }
+ this.SetVisibleWithAnimation(true, null);
+ base.uiBehaviour.m_MVP.SetActive(false);
+ this.MemberAndSplitHeight = base.uiBehaviour.MemberHeight;
+ base.uiBehaviour.m_WatchNum.SetText(this._doc.WatchNum.ToString());
+ base.uiBehaviour.m_CommendNum.SetText(this._doc.CommendNum.ToString());
+ this.InitPool();
+ this.SetTitle();
+ this.SetMember();
+ }
+ }
+
+ public void InitPool()
+ {
+ base.uiBehaviour.m_TitlePool.ReturnAll(true);
+ base.uiBehaviour.m_MemberPool.ReturnAll(true);
+ base.uiBehaviour.m_DetailPool.ReturnAll(true);
+ base.uiBehaviour.m_SplitPool.ReturnAll(true);
+ base.uiBehaviour.m_LabelPool.ReturnAll(true);
+ base.uiBehaviour.m_StarPool.ReturnAll(true);
+ base.uiBehaviour.m_WinLosePool.ReturnAll(true);
+ }
+
+ public void SetTitle()
+ {
+ int num = -this._doc.WidthTotal / 2;
+ bool flag = this._doc.DataType != null;
+ if (flag)
+ {
+ for (int i = 0; i < this._doc.DataType.Length; i++)
+ {
+ bool flag2 = this._doc.WidthList[i] == 0;
+ if (!flag2)
+ {
+ GameObject gameObject = base.uiBehaviour.m_TitlePool.FetchGameObject(false);
+ gameObject.transform.parent = base.uiBehaviour.m_TitleParent;
+ Vector3 localPosition = gameObject.transform.localPosition;
+ localPosition.x = (float)(num + this._doc.WidthList[i] / 2);
+ gameObject.transform.localPosition = localPosition;
+ IXUILabel ixuilabel = gameObject.GetComponent("XUILabel") as IXUILabel;
+ ixuilabel.SetText(XSingleton<XStringTable>.singleton.GetString(string.Format("SpectateLevelRewardTitle{0}", this._doc.DataType[i])));
+ IXUISprite ixuisprite = gameObject.transform.Find("Button").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.spriteWidth = this._doc.WidthList[i] - 4;
+ num += this._doc.WidthList[i];
+ }
+ }
+ }
+ }
+
+ public void SetMember()
+ {
+ int num = -this._doc.WidthTotal / 2;
+ int num2 = base.uiBehaviour.MemberStartY;
+ for (int i = 0; i < this._doc.DataList.Count; i++)
+ {
+ GameObject gameObject = base.uiBehaviour.m_MemberPool.FetchGameObject(true);
+ gameObject.transform.parent = base.uiBehaviour.m_MemberParent;
+ gameObject.transform.localPosition = new Vector3(0f, (float)num2, 0f);
+ IXUISprite ixuisprite = gameObject.GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.spriteWidth = this._doc.WidthTotal;
+ bool flag = this._doc.DataType != null;
+ if (flag)
+ {
+ for (int j = 0; j < this._doc.DataType.Length; j++)
+ {
+ switch (this._doc.DataType[j])
+ {
+ case 3:
+ this.SetHeadIcon(num, i, this._doc.WidthList[j], gameObject);
+ break;
+ case 5:
+ case 6:
+ case 7:
+ case 8:
+ case 9:
+ case 10:
+ this.SetJustText(num, i, this._doc.DataType[j], this._doc.WidthList[j], gameObject);
+ break;
+ case 11:
+ this.SetStar(num, i, this._doc.WidthList[j], gameObject);
+ break;
+ case 12:
+ this.SetWinLose(num, i, this._doc.WidthList[j], gameObject);
+ break;
+ case 13:
+ this.SetMvp(num, i, this._doc.WidthList[j], gameObject);
+ break;
+ }
+ num += this._doc.WidthList[j];
+ bool flag2 = j != this._doc.DataType.Length - 1;
+ if (flag2)
+ {
+ GameObject gameObject2 = base.uiBehaviour.m_SplitPool.FetchGameObject(false);
+ gameObject2.transform.parent = gameObject.transform;
+ gameObject2.transform.localPosition = new Vector3((float)(num - 1), 0f, 0f);
+ }
+ }
+ }
+ num = -this._doc.WidthTotal / 2;
+ num2 -= this.MemberAndSplitHeight;
+ XSingleton<XGameUI>.singleton.m_uiTool.MarkParentAsChanged(gameObject);
+ }
+ }
+
+ public void SetHeadIcon(int x, int index, int width, GameObject parentGo)
+ {
+ GameObject gameObject = base.uiBehaviour.m_DetailPool.FetchGameObject(false);
+ gameObject.transform.parent = parentGo.transform;
+ gameObject.transform.localPosition = new Vector3((float)(x + width / 2), 0f, 0f);
+ XSpectateSceneDocument specificDocument = XDocuments.GetSpecificDocument<XSpectateSceneDocument>(XSpectateSceneDocument.uuID);
+ bool flag = true;
+ bool flag2 = !specificDocument.IsBlueTeamDict.TryGetValue(this._doc.DataList[index].roleid, out flag);
+ if (flag2)
+ {
+ XSingleton<XDebug>.singleton.AddErrorLog("spectate level reward can't find this player's team, player name = ", this._doc.DataList[index].name, null, null, null, null);
+ }
+ string text = string.Format("{0}{1}", flag ? "[00bdff]" : "[ff0000]", this._doc.DataList[index].name);
+ IXUILabel ixuilabel = gameObject.transform.Find("Name").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel.SetText(text);
+ IXUISprite ixuisprite = gameObject.transform.Find("Avatar").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.spriteName = XSingleton<XProfessionSkillMgr>.singleton.GetProfHeadIcon((int)this._doc.DataList[index].profession);
+ GameObject gameObject2 = gameObject.transform.Find("Avatar/Leader").gameObject;
+ gameObject2.SetActive(this._doc.DataList[index].type == 1u);
+ IXUISprite ixuisprite2 = gameObject.transform.Find("AddFriend/Add").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite2.ID = this._doc.DataList[index].roleid;
+ ixuisprite2.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnAddFriendClick));
+ }
+
+ private void SetJustText(int x, int index, int type, int width, GameObject parentGo)
+ {
+ GameObject gameObject = base.uiBehaviour.m_LabelPool.FetchGameObject(false);
+ gameObject.transform.parent = parentGo.transform;
+ gameObject.transform.localPosition = new Vector3((float)(x + width / 2), 0f, 0f);
+ IXUILabel ixuilabel = gameObject.GetComponent("XUILabel") as IXUILabel;
+ switch (type)
+ {
+ case 5:
+ ixuilabel.SetText(this._doc.DataList[index].killcount.ToString());
+ break;
+ case 6:
+ ixuilabel.SetText(this._doc.DataList[index].damageall.ToString("0.0"));
+ break;
+ case 7:
+ ixuilabel.SetText(string.Format("{0}%", ((this._doc.DamageSum < 1.0) ? 0.0 : (this._doc.DataList[index].damageall * 100.0 / this._doc.DamageSum)).ToString("0.0")));
+ break;
+ case 8:
+ ixuilabel.SetText(this._doc.DataList[index].treatcount.ToString());
+ break;
+ case 9:
+ ixuilabel.SetText(this._doc.DataList[index].deadcount.ToString());
+ break;
+ case 10:
+ ixuilabel.SetText(this._doc.DataList[index].combomax.ToString());
+ break;
+ }
+ }
+
+ private void SetStar(int x, int index, int width, GameObject parentGo)
+ {
+ uint num = 0u;
+ bool flag = !this._doc.StarDict.TryGetValue(this._doc.DataList[index].roleid, out num);
+ if (flag)
+ {
+ XSingleton<XDebug>.singleton.AddLog("spectate level reward can't find this player' star, player name = ", this._doc.DataList[index].name, " maybe nest fail.", null, null, null, XDebugColor.XDebug_None);
+ }
+ int num2 = this.CalStarNum((int)num);
+ int num3 = x + width / 2 - base.uiBehaviour.m_StarPool.TplWidth;
+ for (int i = 0; i < 3; i++)
+ {
+ GameObject gameObject = base.uiBehaviour.m_StarPool.FetchGameObject(false);
+ gameObject.transform.parent = parentGo.transform;
+ gameObject.transform.localPosition = new Vector3((float)(num3 + i * base.uiBehaviour.m_StarPool.TplWidth), 0f, 0f);
+ GameObject gameObject2 = gameObject.transform.Find("Fg").gameObject;
+ gameObject2.SetActive(i < num2);
+ }
+ }
+
+ private void SetWinLose(int x, int index, int width, GameObject parentGo)
+ {
+ GameObject gameObject = base.uiBehaviour.m_WinLosePool.FetchGameObject(false);
+ gameObject.transform.parent = parentGo.transform;
+ gameObject.transform.localPosition = new Vector3((float)(x + width / 2), 0f, 0f);
+ IXUISprite ixuisprite = gameObject.GetComponent("XUISprite") as IXUISprite;
+ bool flag = this._doc.WinTag == 0;
+ if (flag)
+ {
+ ixuisprite.spriteName = "bhdz_p";
+ }
+ else
+ {
+ XSpectateSceneDocument specificDocument = XDocuments.GetSpecificDocument<XSpectateSceneDocument>(XSpectateSceneDocument.uuID);
+ bool flag2 = true;
+ bool flag3 = !specificDocument.IsBlueTeamDict.TryGetValue(this._doc.DataList[index].roleid, out flag2);
+ if (flag3)
+ {
+ XSingleton<XDebug>.singleton.AddErrorLog("spectate level reward can't find this player's team, player name = ", this._doc.DataList[index].name, null, null, null, null);
+ }
+ ixuisprite.spriteName = (((flag2 && this._doc.WinTag == 1) || (!flag2 && this._doc.WinTag == -1)) ? "bhdz_win" : "bhdz_lose");
+ }
+ }
+
+ private void SetMvp(int x, int index, int width, GameObject parentGo)
+ {
+ bool flag = this._doc.DataList[index].roleid == this._doc.MvpUid;
+ if (flag)
+ {
+ base.uiBehaviour.m_MVP.SetActive(true);
+ base.uiBehaviour.m_MVP.transform.parent = parentGo.transform;
+ base.uiBehaviour.m_MVP.transform.localPosition = new Vector3((float)(x + width / 2), 0f, 0f);
+ }
+ }
+
+ private int CalStarNum(int num)
+ {
+ int num2 = 0;
+ while (num != 0)
+ {
+ num2++;
+ num -= (num & -num);
+ }
+ return num2;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/SpectateLevelRewardView.cs.meta b/Client/Assets/Scripts/XMainClient/UI/SpectateLevelRewardView.cs.meta
new file mode 100644
index 00000000..361e3547
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/SpectateLevelRewardView.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 5a07f7bce4d867543813f513c1f994ec
+timeCreated: 1611403790
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/SpectateSceneBehaviour.cs b/Client/Assets/Scripts/XMainClient/UI/SpectateSceneBehaviour.cs
new file mode 100644
index 00000000..cfa3beac
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/SpectateSceneBehaviour.cs
@@ -0,0 +1,123 @@
+using System;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+
+namespace XMainClient.UI
+{
+ internal class SpectateSceneBehaviour : DlgBehaviourBase
+ {
+ public Transform m_canvas;
+
+ public GameObject m_avatarGO = null;
+
+ public IXUILabel m_fps = null;
+
+ public IXUIButton m_pause = null;
+
+ public IXUISprite m_sprwifi;
+
+ public IXUISlider m_sliderBattery;
+
+ public IXUILabel m_lblTime;
+
+ public IXUILabel m_lblFree;
+
+ public BattleTargetHandler m_BattleTargetHandler;
+
+ public GameObject m_NoticeFrame = null;
+
+ public IXUILabel m_Notice = null;
+
+ public Vector3 m_NoticePos;
+
+ public IXUILabel m_LeftTime = null;
+
+ public XSpectateTeamMonitorHandler m_SpectateTeamMonitor;
+
+ public SpectateHandler m_SpectateHandler;
+
+ public XBattleEnemyInfoHandler m_EnemyInfoHandler;
+
+ public BattleIndicateHandler m_IndicateHandler;
+
+ public IXUILabel m_WarTime;
+
+ public IXUILabel m_SceneName;
+
+ public Transform m_CountDownFrame;
+
+ public Transform m_CountDownBeginFrame;
+
+ public Transform m_CountDownTimeFrame;
+
+ public IXUIProgress m_StrengthPresevedBar;
+
+ public Transform m_SightSelect;
+
+ public IXUISprite m_SightPic;
+
+ public IXUISprite m_SelectPic;
+
+ public IXUIButton m_Sight;
+
+ public IXUIButton m_3DFree;
+
+ public IXUIButton m_3D;
+
+ public IXUIButton m_25D;
+
+ public IXUIButton m_barrageOpen;
+
+ public IXUIButton m_barrageClose;
+
+ public IXUIButton m_btnShare;
+
+ private void Awake()
+ {
+ this.m_canvas = base.transform.Find("_canvas");
+ Transform transform = base.transform.Find("_canvas/fps");
+ bool flag = null != transform;
+ if (flag)
+ {
+ this.m_fps = (transform.GetComponent("XUILabel") as IXUILabel);
+ }
+ Transform transform2 = base.transform.Find("_canvas/Spectate/Quit");
+ this.m_pause = (transform2.GetComponent("XUIButton") as IXUIButton);
+ this.m_sprwifi = (base.transform.Find("_canvas/PING/SysWifi").GetComponent("XUISprite") as IXUISprite);
+ this.m_lblTime = (base.transform.Find("_canvas/PING/TIME").GetComponent("XUILabel") as IXUILabel);
+ this.m_sliderBattery = (base.transform.Find("_canvas/PING/Battery").GetComponent("XUISlider") as IXUISlider);
+ this.m_lblFree = (base.transform.Find("_canvas/PING/T2").GetComponent("XUILabel") as IXUILabel);
+ this.m_NoticeFrame = base.transform.Find("_canvas/NoticeFrame").gameObject;
+ Transform transform3 = base.transform.Find("_canvas/NoticeFrame/Notice");
+ this.m_NoticePos = this.m_NoticeFrame.transform.localPosition;
+ this.m_Notice = (transform3.GetComponent("XUILabel") as IXUILabel);
+ this.m_NoticeFrame.transform.localPosition = XGameUI.Far_Far_Away;
+ this.m_LeftTime = (base.transform.Find("_canvas/LeftTime").GetComponent("XUILabel") as IXUILabel);
+ this.m_LeftTime.SetVisible(false);
+ this.m_WarTime = (base.transform.Find("_canvas/WarTime").GetComponent("XUILabel") as IXUILabel);
+ this.m_WarTime.SetVisible(false);
+ this.m_SceneName = (base.transform.Find("_canvas/Indicate/Bg/Name").GetComponent("XUILabel") as IXUILabel);
+ DlgHandlerBase.EnsureCreate<XSpectateTeamMonitorHandler>(ref this.m_SpectateTeamMonitor, base.transform.Find("_canvas/TeamFrame").gameObject, null, true);
+ DlgHandlerBase.EnsureCreate<BattleIndicateHandler>(ref this.m_IndicateHandler, base.transform.Find("_canvas/Indicate").gameObject, null, false);
+ DlgHandlerBase.EnsureCreate<SpectateHandler>(ref this.m_SpectateHandler, base.transform.Find("_canvas/Spectate").gameObject, null, true);
+ DlgHandlerBase.EnsureCreate<XBattleEnemyInfoHandler>(ref this.m_EnemyInfoHandler, base.transform.Find("_canvas/EnemyInfoFrame").gameObject, null, true);
+ DlgHandlerBase.EnsureCreate<BattleTargetHandler>(ref this.m_BattleTargetHandler, base.transform.Find("_canvas/BattleTaget").gameObject, null, true);
+ this.m_CountDownFrame = base.transform.Find("_canvas/CountDownFrame");
+ this.m_CountDownBeginFrame = this.m_CountDownFrame.Find("Begin");
+ this.m_CountDownTimeFrame = this.m_CountDownFrame.Find("Time");
+ this.m_CountDownFrame.gameObject.SetActive(false);
+ this.m_StrengthPresevedBar = (base.transform.Find("_canvas/ChargeBar").GetComponent("XUIProgress") as IXUIProgress);
+ this.m_SightSelect = base.transform.Find("_canvas/Spectate/3D25D/Select");
+ this.m_3DFree = (base.transform.Find("_canvas/Spectate/3D25D/Select/3DFree").GetComponent("XUIButton") as IXUIButton);
+ this.m_3D = (base.transform.Find("_canvas/Spectate/3D25D/Select/3D").GetComponent("XUIButton") as IXUIButton);
+ this.m_25D = (base.transform.Find("_canvas/Spectate/3D25D/Select/25D").GetComponent("XUIButton") as IXUIButton);
+ this.m_Sight = (base.transform.Find("_canvas/Spectate/3D25D/Sight").GetComponent("XUIButton") as IXUIButton);
+ this.m_SightPic = (base.transform.Find("_canvas/Spectate/3D25D/Sight/Content").GetComponent("XUISprite") as IXUISprite);
+ this.m_SelectPic = (base.transform.Find("_canvas/Spectate/3D25D/Select/Content").GetComponent("XUISprite") as IXUISprite);
+ this.m_barrageOpen = (base.transform.Find("_canvas/Spectate/Barrage/open").GetComponent("XUIButton") as IXUIButton);
+ this.m_barrageClose = (base.transform.Find("_canvas/Spectate/Barrage/close").GetComponent("XUIButton") as IXUIButton);
+ this.m_btnShare = (base.transform.Find("_canvas/Spectate/Share").GetComponent("XUIButton") as IXUIButton);
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/SpectateSceneBehaviour.cs.meta b/Client/Assets/Scripts/XMainClient/UI/SpectateSceneBehaviour.cs.meta
new file mode 100644
index 00000000..3f3cd983
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/SpectateSceneBehaviour.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: ff09ce5236b9f154d93836ac36f0d94a
+timeCreated: 1611404944
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/SpectateSceneView.cs b/Client/Assets/Scripts/XMainClient/UI/SpectateSceneView.cs
new file mode 100644
index 00000000..f9bde1bb
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/SpectateSceneView.cs
@@ -0,0 +1,1277 @@
+using System;
+using System.Collections.Generic;
+using KKSG;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUpdater;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class SpectateSceneView : DlgBase<SpectateSceneView, SpectateSceneBehaviour>
+ {
+ public XSpectateTeamMonitorHandler SpectateTeamMonitor
+ {
+ get
+ {
+ return (base.uiBehaviour == null) ? null : base.uiBehaviour.m_SpectateTeamMonitor;
+ }
+ }
+
+ public BattleIndicateHandler IndicateHandler
+ {
+ get
+ {
+ return (base.uiBehaviour == null) ? null : base.uiBehaviour.m_IndicateHandler;
+ }
+ }
+
+ public XBattleEnemyInfoHandler EnemyInfoHandler
+ {
+ get
+ {
+ return (base.uiBehaviour == null) ? null : base.uiBehaviour.m_EnemyInfoHandler;
+ }
+ }
+
+ public BattleTargetHandler BattleTargetHandler
+ {
+ get
+ {
+ return (base.uiBehaviour == null) ? null : base.uiBehaviour.m_BattleTargetHandler;
+ }
+ }
+
+ public SpectateHandler SpectateHandler
+ {
+ get
+ {
+ return (base.uiBehaviour == null) ? null : base.uiBehaviour.m_SpectateHandler;
+ }
+ }
+
+ public IXUILabel LeftTime
+ {
+ get
+ {
+ return (base.uiBehaviour == null) ? null : base.uiBehaviour.m_LeftTime;
+ }
+ }
+
+ private float _strength_preseved_precent
+ {
+ get
+ {
+ bool flag = this._current_strength_preseved > this._total_strength_preseved;
+ if (flag)
+ {
+ this._total_strength_preseved = this._current_strength_preseved;
+ }
+ return this._current_strength_preseved / this._total_strength_preseved;
+ }
+ }
+
+ public override string fileName
+ {
+ get
+ {
+ return "Battle/BattleViewDlg";
+ }
+ }
+
+ public override int layer
+ {
+ get
+ {
+ return 1;
+ }
+ }
+
+ public override bool isMainUI
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public static uint _pool_size = 5u;
+
+ private XPlayerAttributes _attrComp = null;
+
+ private float NoticeTime = 0f;
+
+ private Color32 _hp_green = new Color32(46, 203, 0, byte.MaxValue);
+
+ private Color32 _hp_yellow = new Color32(byte.MaxValue, 249, 32, byte.MaxValue);
+
+ private Color32 _hp_red = new Color32(byte.MaxValue, 39, 39, byte.MaxValue);
+
+ private Vector2 m_DragDistance = Vector2.zero;
+
+ private bool m_CancelRecord = false;
+
+ private bool m_IsRecording = false;
+
+ private uint m_ChatLabelCd = 0u;
+
+ public XOptionsBattleHandler m_XOptionBattleHandler = null;
+
+ private BattleCaptainPVPHandler m_BattleCaptainPVPHandler = null;
+
+ public HeroBattleHandler _HeroBattleHandler = null;
+
+ private SceneType sceneType;
+
+ private XLeftTimeCounter leftTimeCounter;
+
+ private XLeftTimeCounter timeConnter;
+
+ private float _last_check_time = 0f;
+
+ private IPlatform _platform = null;
+
+ private List<string> _notice_collection = new List<string>();
+
+ private float _notice_duration = 0f;
+
+ private float _notice_pertime = 1f;
+
+ private List<ComboBuff> _combo_buff_list = new List<ComboBuff>();
+
+ private Vector2 _yuyin_init_pos = Vector2.zero;
+
+ private Vector2 _yuyin_offset = new Vector2(65f, 0f);
+
+ private XSpectateSceneDocument _doc;
+
+ private uint time_token = 0u;
+
+ private XEntity _strength_preseved_entity = null;
+
+ private float _total_strength_preseved = 1f;
+
+ private float _current_strength_preseved = 0f;
+
+ private XTimerMgr.ElapsedEventHandler _showSingleNoticeCb = null;
+
+ private XTimerMgr.ElapsedEventHandler _endBigNoticeCb = null;
+
+ private XTimerMgr.ElapsedEventHandler _onSwitchToTeamChatCb = null;
+
+ private XTimerMgr.ElapsedEventHandler _hideBattleChatUICb = null;
+
+ private float _fYellow = 0f;
+
+ private float _fRed = 0f;
+
+ private XSwitchSight m_SwitchSight;
+
+ public XYuyinView _yuyinHandler;
+
+ private float lastPingTime = -60f;
+
+ private GameObject _big_notice = null;
+
+ public SpectateSceneView()
+ {
+ this._showSingleNoticeCb = new XTimerMgr.ElapsedEventHandler(this.ShowSingleNotice);
+ this._endBigNoticeCb = new XTimerMgr.ElapsedEventHandler(this.EndBigNotice);
+ this._onSwitchToTeamChatCb = new XTimerMgr.ElapsedEventHandler(this.OnSwitchToTeamChat);
+ this._hideBattleChatUICb = new XTimerMgr.ElapsedEventHandler(this.HideBattleChatUI);
+ this._fYellow = float.Parse(XSingleton<XGlobalConfig>.singleton.GetValue("HP_Yellow"));
+ this._fRed = float.Parse(XSingleton<XGlobalConfig>.singleton.GetValue("HP_Red"));
+ }
+
+ protected override void Init()
+ {
+ this._platform = XSingleton<XUpdater.XUpdater>.singleton.XPlatform;
+ this._doc = XDocuments.GetSpecificDocument<XSpectateSceneDocument>(XSpectateSceneDocument.uuID);
+ this._doc._SpectateSceneView = this;
+ this._doc.LeftTeamMonitorData.Clear();
+ this._doc.RightTeamMonitorData.Clear();
+ this._attrComp = (XSingleton<XEntityMgr>.singleton.Player.Attributes as XPlayerAttributes);
+ this.leftTimeCounter = new XLeftTimeCounter(base.uiBehaviour.m_LeftTime, true);
+ this.timeConnter = new XLeftTimeCounter(base.uiBehaviour.m_WarTime, false);
+ string value = XSingleton<XGlobalConfig>.singleton.GetValue("ComboBuff");
+ string[] array = value.Split(XGlobalConfig.AllSeparators);
+ for (int i = 0; i < array.Length; i += 3)
+ {
+ ComboBuff comboBuff = new ComboBuff();
+ comboBuff.combo = int.Parse(array[i]);
+ comboBuff.buffID = int.Parse(array[i + 1]);
+ comboBuff.buffLevel = int.Parse(array[i + 2]);
+ BuffTable.RowData buffData = XSingleton<XBuffTemplateManager>.singleton.GetBuffData(comboBuff.buffID, comboBuff.buffLevel);
+ bool flag = buffData != null;
+ if (flag)
+ {
+ comboBuff.buffName = buffData.BuffName;
+ }
+ else
+ {
+ XSingleton<XDebug>.singleton.AddErrorLog(string.Format("ComboBuff: Buff data not found: [{0} {1}]", comboBuff.buffID, comboBuff.buffLevel), null, null, null, null, null);
+ }
+ this._combo_buff_list.Add(comboBuff);
+ }
+ this.SetupHandler();
+ }
+
+ private void SetupHandler()
+ {
+ SceneType sceneType = XSingleton<XScene>.singleton.SceneType;
+ if (sceneType != SceneType.SCENE_PVP)
+ {
+ if (sceneType == SceneType.SCENE_HEROBATTLE)
+ {
+ DlgHandlerBase.EnsureCreate<HeroBattleHandler>(ref this._HeroBattleHandler, base.uiBehaviour.m_canvas, true, this);
+ }
+ }
+ else
+ {
+ DlgHandlerBase.EnsureCreate<BattleCaptainPVPHandler>(ref this.m_BattleCaptainPVPHandler, base.uiBehaviour.m_canvas, true, this);
+ }
+ }
+
+ public override void RegisterEvent()
+ {
+ base.uiBehaviour.m_pause.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnPauseClick));
+ this.m_SwitchSight = new XSwitchSight(new ButtonClickEventHandler(this.OnViewClick), base.uiBehaviour.m_25D, base.uiBehaviour.m_3D, base.uiBehaviour.m_3DFree);
+ base.uiBehaviour.m_Sight.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnSightClick));
+ base.uiBehaviour.m_barrageOpen.ID = 1UL;
+ base.uiBehaviour.m_barrageOpen.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnBarrageClick));
+ base.uiBehaviour.m_barrageClose.ID = 0UL;
+ base.uiBehaviour.m_barrageClose.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnBarrageClick));
+ base.uiBehaviour.m_btnShare.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnShareClick));
+ }
+
+ protected override void OnLoad()
+ {
+ base.OnLoad();
+ DlgHandlerBase.EnsureCreate<XYuyinView>(ref this._yuyinHandler, base.uiBehaviour.transform, true, this);
+ }
+
+ protected override void OnShow()
+ {
+ this.lastPingTime = -60f;
+ XPlayerAttributes xplayerAttributes = XSingleton<XEntityMgr>.singleton.Player.Attributes as XPlayerAttributes;
+ DlgBase<BroadMiniDlg, BroadcastMiniBehaviour>.singleton.Show(true);
+ DlgBase<RadioDlg, RadioBehaviour>.singleton.Show(true);
+ base.uiBehaviour.m_SightSelect.gameObject.SetActive(false);
+ int num = XFastEnumIntEqualityComparer<RoleType>.ToInt(XSingleton<XEntityMgr>.singleton.Player.PlayerAttributes.Profession);
+ base.uiBehaviour.m_IndicateHandler.SetVisible(true);
+ base.uiBehaviour.m_SceneName.SetText(XSingleton<XScene>.singleton.SceneData.Comment);
+ this.SetTimeRecord();
+ SceneTable.RowData sceneData = XSingleton<XSceneMgr>.singleton.GetSceneData(XSingleton<XScene>.singleton.SceneID);
+ this.sceneType = (SceneType)sceneData.type;
+ SceneType sceneType = this.sceneType;
+ if (sceneType <= SceneType.SCENE_ABYSSS)
+ {
+ if (sceneType != SceneType.SCENE_BATTLE)
+ {
+ switch (sceneType)
+ {
+ case SceneType.SCENE_PK:
+ {
+ XQualifyingDocument specificDocument = XDocuments.GetSpecificDocument<XQualifyingDocument>(XQualifyingDocument.uuID);
+ bool flag = specificDocument.PkInfoList.Count > 0;
+ if (flag)
+ {
+ this.SetEnemyRoleInfo(specificDocument.PkInfoList[0].brief.roleName, specificDocument.PkInfoList[0].brief.roleLevel);
+ }
+ break;
+ }
+ }
+ }
+ }
+ else if (sceneType != SceneType.SCENE_TOWER)
+ {
+ if (sceneType != SceneType.SCENE_LEAGUE_BATTLE)
+ {
+ }
+ }
+ SceneType sceneType2 = this.sceneType;
+ if (sceneType2 != SceneType.SCENE_ARENA && sceneType2 != SceneType.SCENE_PK)
+ {
+ this.EnemyInfoHandler.InitBoss();
+ }
+ else
+ {
+ this.EnemyInfoHandler.InitRole();
+ }
+ this.SpectateTeamMonitor.InitWhenShowMainUI();
+ bool flag2 = XSingleton<XScene>.singleton.SceneID != 100u && XSingleton<XAttributeMgr>.singleton.XPlayerData.Level >= 10u;
+ if (flag2)
+ {
+ ShowSettingArgs showSettingArgs = new ShowSettingArgs();
+ showSettingArgs.position = 3;
+ showSettingArgs.showsettings = false;
+ showSettingArgs.enablebackclick = true;
+ DlgBase<XChatSmallView, XChatSmallBehaviour>.singleton.ShowChatMiniUI(showSettingArgs);
+ }
+ base.uiBehaviour.m_StrengthPresevedBar.SetVisible(this._doc.ShowStrengthPresevedBar);
+ this.LoadYuyin();
+ this.InitView();
+ this.ShowBarrge();
+ }
+
+ private void ShowBarrge()
+ {
+ bool openBarrage = DlgBase<BarrageDlg, BarrageBehaviour>.singleton.openBarrage;
+ DlgBase<BarrageDlg, BarrageBehaviour>.singleton.SetVisible(openBarrage, true);
+ base.uiBehaviour.m_barrageClose.SetVisible(openBarrage);
+ base.uiBehaviour.m_barrageOpen.SetVisible(!openBarrage);
+ }
+
+ private void InitView()
+ {
+ this.SetView(XSingleton<XOperationData>.singleton.OperationMode);
+ }
+
+ public void SetView(XOperationMode mode)
+ {
+ switch (mode)
+ {
+ case XOperationMode.X25D:
+ base.uiBehaviour.m_SightPic.SetSprite("l_zdicon_1_1");
+ base.uiBehaviour.m_SelectPic.SetSprite("l_zdicon_1_1");
+ break;
+ case XOperationMode.X3D:
+ base.uiBehaviour.m_SightPic.SetSprite("l_zdicon_1_0");
+ base.uiBehaviour.m_SelectPic.SetSprite("l_zdicon_1_0");
+ break;
+ case XOperationMode.X3D_Free:
+ base.uiBehaviour.m_SightPic.SetSprite("l_zdicon_1_2");
+ base.uiBehaviour.m_SelectPic.SetSprite("l_zdicon_1_2");
+ break;
+ }
+ base.uiBehaviour.m_SightPic.MakePixelPerfect();
+ base.uiBehaviour.m_SelectPic.MakePixelPerfect();
+ base.uiBehaviour.m_SightSelect.gameObject.SetActive(false);
+ }
+
+ public bool OnSightClick(IXUIButton sp)
+ {
+ bool activeSelf = base.uiBehaviour.m_SightSelect.gameObject.activeSelf;
+ if (activeSelf)
+ {
+ base.uiBehaviour.m_SightSelect.gameObject.SetActive(false);
+ }
+ else
+ {
+ base.uiBehaviour.m_SightSelect.gameObject.SetActive(true);
+ }
+ return true;
+ }
+
+ protected override void OnHide()
+ {
+ DlgBase<BroadMiniDlg, BroadcastMiniBehaviour>.singleton.Show(false);
+ DlgBase<RadioDlg, RadioBehaviour>.singleton.Show(false);
+ DlgBase<XChatSmallView, XChatSmallBehaviour>.singleton.SetVisible(false, true);
+ }
+
+ protected override void OnUnload()
+ {
+ DlgHandlerBase.EnsureUnload<XOptionsBattleHandler>(ref this.m_XOptionBattleHandler);
+ DlgHandlerBase.EnsureUnload<BattleCaptainPVPHandler>(ref this.m_BattleCaptainPVPHandler);
+ DlgHandlerBase.EnsureUnload<HeroBattleHandler>(ref this._HeroBattleHandler);
+ base.uiBehaviour.m_IndicateHandler.OnUnload();
+ base.uiBehaviour.m_SpectateTeamMonitor.OnUnload();
+ base.uiBehaviour.m_SpectateHandler.OnUnload();
+ base.uiBehaviour.m_EnemyInfoHandler.OnUnload();
+ DlgHandlerBase.EnsureUnload<XYuyinView>(ref this._yuyinHandler);
+ this._doc._SpectateSceneView = null;
+ base.OnUnload();
+ }
+
+ private void LoadYuyin()
+ {
+ YuyinIconType type = YuyinIconType.SPECTATE;
+ bool flag = this._yuyinHandler != null;
+ if (flag)
+ {
+ this._yuyinHandler.Refresh(type);
+ }
+ }
+
+ private void SetEnemyRoleInfo(string name, uint level)
+ {
+ }
+
+ public void RefreshYuyin(ulong uid)
+ {
+ bool flag = this._yuyinHandler != null;
+ if (flag)
+ {
+ this._yuyinHandler.Refresh(YuyinIconType.SPECTATE);
+ }
+ }
+
+ private bool OnPauseClick(IXUIButton go)
+ {
+ bool flag = !base.IsLoaded();
+ bool result;
+ if (flag)
+ {
+ result = true;
+ }
+ else
+ {
+ SceneTable.RowData sceneData = XSingleton<XSceneMgr>.singleton.GetSceneData(XSingleton<XScene>.singleton.SceneID);
+ bool flag2 = sceneData != null;
+ if (flag2)
+ {
+ bool canPause = sceneData.CanPause;
+ if (canPause)
+ {
+ XSingleton<XShell>.singleton.Pause = true;
+ }
+ }
+ bool flag3 = this.m_XOptionBattleHandler == null;
+ if (flag3)
+ {
+ bool flag4 = base.uiBehaviour != null;
+ if (flag4)
+ {
+ DlgHandlerBase.EnsureCreate<XOptionsBattleHandler>(ref this.m_XOptionBattleHandler, base.uiBehaviour.m_canvas, true, DlgBase<BattleMain, BattleMainBehaviour>.singleton);
+ }
+ }
+ bool flag5 = this.m_XOptionBattleHandler != null && !this.m_XOptionBattleHandler.IsVisible();
+ if (flag5)
+ {
+ this.m_XOptionBattleHandler.ShowUI();
+ }
+ this.sceneType = XSingleton<XScene>.singleton.SceneType;
+ result = true;
+ }
+ return result;
+ }
+
+ public override void OnUpdate()
+ {
+ bool flag = !XSingleton<XTimerMgr>.singleton.NeedFixedUpdate;
+ if (!flag)
+ {
+ base.OnUpdate();
+ this.UpdateFPS();
+ this.UpdateWifi();
+ base.uiBehaviour.m_IndicateHandler.OnUpdate();
+ bool flag2 = Time.time - this._last_check_time > 5f;
+ if (flag2)
+ {
+ this._last_check_time = Time.time;
+ this._doc.SendCheckTime();
+ }
+ this.UpdateTime();
+ this.UpdateLeftTime();
+ bool flag3 = Time.unscaledTime - this.lastPingTime > 60f || this.lastPingTime < 0f;
+ if (flag3)
+ {
+ this.RefreshPing();
+ this.lastPingTime = Time.unscaledTime;
+ }
+ bool flag4 = this.NoticeTime > 0f;
+ if (flag4)
+ {
+ bool flag5 = Time.time - this.NoticeTime > this._notice_duration;
+ if (flag5)
+ {
+ base.uiBehaviour.m_NoticeFrame.transform.localPosition = XGameUI.Far_Far_Away;
+ this.NoticeTime = 0f;
+ }
+ }
+ this.SpectateTeamMonitor.OnUpdate();
+ this.EnemyInfoHandler.OnUpdate();
+ bool flag6 = base.uiBehaviour.m_StrengthPresevedBar.IsVisible();
+ if (flag6)
+ {
+ this.RefreshStrengthPresevedBar();
+ }
+ }
+ }
+
+ private void UpdateWifi()
+ {
+ XSingleton<UiUtility>.singleton.UpdateWifi(null, this.m_uiBehaviour.m_sprwifi);
+ }
+
+ private void RefreshPing()
+ {
+ XSingleton<UiUtility>.singleton.RefreshPing(base.uiBehaviour.m_lblTime, base.uiBehaviour.m_sliderBattery, base.uiBehaviour.m_lblFree);
+ }
+
+ public void UpdateFPS()
+ {
+ bool flag = !this._platform.IsPublish();
+ if (flag)
+ {
+ bool showBuildLog = XSingleton<XGame>.singleton.ShowBuildLog;
+ if (showBuildLog)
+ {
+ string syncModeString = XSingleton<XGame>.singleton.GetSyncModeString();
+ base.uiBehaviour.m_fps.SetText(string.Concat(new object[]
+ {
+ "Build:",
+ XLinkTimeStamp.BuildDateTime.ToString(),
+ "\n",
+ XSingleton<XGame>.singleton.Fps.ToString("F1"),
+ syncModeString,
+ XSingleton<XClientNetwork>.singleton.ServerIP,
+ "\nSend:",
+ XSingleton<XClientNetwork>.singleton.SendBytes,
+ " Recv:",
+ XSingleton<XClientNetwork>.singleton.RecvBytes,
+ " delay:",
+ XSingleton<XServerTimeMgr>.singleton.GetDelay()
+ }));
+ }
+ else
+ {
+ base.uiBehaviour.m_fps.SetText("");
+ }
+ }
+ }
+
+ public void ShowNotice(string text, float duration, float pertime = 1f)
+ {
+ this._notice_collection.Clear();
+ bool flag = string.IsNullOrEmpty(text);
+ if (!flag)
+ {
+ string[] array = text.Split(XGlobalConfig.ListSeparator);
+ for (int i = 0; i < array.Length; i++)
+ {
+ this._notice_collection.Add(array[i]);
+ }
+ this._notice_duration = duration;
+ this._notice_pertime = pertime;
+ bool flag2 = this.time_token > 0u;
+ if (flag2)
+ {
+ XSingleton<XTimerMgr>.singleton.KillTimer(this.time_token);
+ this.time_token = 0u;
+ }
+ bool flag3 = this._notice_collection.Count > 0;
+ if (flag3)
+ {
+ this.ShowSingleNotice(0);
+ }
+ }
+ }
+
+ protected void ShowSingleNotice(object o)
+ {
+ int num = (int)o;
+ bool flag = num < this._notice_collection.Count;
+ if (flag)
+ {
+ string text = this._notice_collection[num];
+ base.uiBehaviour.m_Notice.SetText(text);
+ base.uiBehaviour.m_NoticeFrame.transform.localPosition = base.uiBehaviour.m_NoticePos;
+ this.NoticeTime = Time.time;
+ this.time_token = XSingleton<XTimerMgr>.singleton.SetTimer(this._notice_pertime, this._showSingleNoticeCb, num + 1);
+ bool flag2 = num == this._notice_collection.Count - 1;
+ if (flag2)
+ {
+ XSingleton<XLevelScriptMgr>.singleton.ExecuteNextCmd();
+ this._notice_collection.Clear();
+ }
+ }
+ }
+
+ public void StopNotice()
+ {
+ bool flag = this.time_token > 0u;
+ if (flag)
+ {
+ XSingleton<XTimerMgr>.singleton.KillTimer(this.time_token);
+ this.time_token = 0u;
+ }
+ base.uiBehaviour.m_NoticeFrame.transform.localPosition = XGameUI.Far_Far_Away;
+ }
+
+ public void ShowBigNotice(string text)
+ {
+ this._big_notice = (XSingleton<XResourceLoaderMgr>.singleton.CreateFromPrefab("UI/Common/TutorialButtomText", true, false) as GameObject);
+ this._big_notice.transform.parent = XSingleton<XGameUI>.singleton.UIRoot;
+ this._big_notice.transform.localPosition = Vector3.zero;
+ this._big_notice.transform.localScale = Vector3.one;
+ IXUILabel ixuilabel = this._big_notice.transform.Find("TutorialText").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel.SetText(text);
+ IXUITweenTool ixuitweenTool = this._big_notice.GetComponent("XUIPlayTween") as IXUITweenTool;
+ ixuitweenTool.PlayTween(true, -1f);
+ XSingleton<XTimerMgr>.singleton.SetTimer(5f, this._endBigNoticeCb, null);
+ }
+
+ protected void EndBigNotice(object o)
+ {
+ bool flag = this._big_notice != null;
+ if (flag)
+ {
+ XResourceLoaderMgr.SafeDestroy(ref this._big_notice, true);
+ XSingleton<XLevelScriptMgr>.singleton.ExecuteNextCmd();
+ }
+ }
+
+ public void SetLeftTime(uint seconds)
+ {
+ base.uiBehaviour.m_LeftTime.SetVisible(true);
+ this.leftTimeCounter.SetLeftTime(seconds, -1);
+ base.uiBehaviour.m_WarTime.SetVisible(false);
+ }
+
+ public void SetTimeRecord()
+ {
+ base.uiBehaviour.m_WarTime.SetVisible(true);
+ this.timeConnter.SetForward(1);
+ this.timeConnter.SetLeftTime(0.01f, -1);
+ }
+
+ public void ResetLeftTime(int seconds)
+ {
+ SceneTable.RowData sceneData = XSingleton<XSceneMgr>.singleton.GetSceneData(XSingleton<XScene>.singleton.SceneID);
+ bool flag = sceneData.TimeCounter == null || sceneData.TimeCounter.Length < 1;
+ if (flag)
+ {
+ this.timeConnter.SetLeftTime((float)seconds, -1);
+ }
+ else
+ {
+ bool flag2 = sceneData.TimeCounter[0] == 1;
+ if (flag2)
+ {
+ this.leftTimeCounter.SetLeftTime((float)((int)sceneData.TimeCounter[1] - seconds), -1);
+ }
+ }
+ }
+
+ private void UpdateLeftTime()
+ {
+ this.leftTimeCounter.Update();
+ }
+
+ private void UpdateTime()
+ {
+ this.timeConnter.Update();
+ }
+
+ public bool OnShowChatDlg(IXUIButton sp)
+ {
+ DlgBase<XChatView, XChatBehaviour>.singleton.SetVisibleWithAnimation(true, null);
+ XSingleton<XTimerMgr>.singleton.SetTimer(0.5f, this._onSwitchToTeamChatCb, null);
+ return true;
+ }
+
+ public void OnSwitchToTeamChat(object obj)
+ {
+ DlgBase<XChatView, XChatBehaviour>.singleton.SelectChatTeam();
+ }
+
+ public void OnVoiceButtonDrag(IXUIButton sp, Vector2 delta)
+ {
+ this.m_DragDistance += delta;
+ bool flag = this.m_DragDistance.magnitude >= 100f;
+ if (flag)
+ {
+ this.m_CancelRecord = true;
+ }
+ else
+ {
+ this.m_CancelRecord = false;
+ }
+ }
+
+ public void OnVoiceButton(IXUIButton sp, bool state)
+ {
+ if (state)
+ {
+ XSingleton<XDebug>.singleton.AddLog("Press down", null, null, null, null, null, XDebugColor.XDebug_None);
+ this.m_DragDistance = Vector2.zero;
+ this.m_IsRecording = true;
+ bool useApollo = XChatDocument.UseApollo;
+ if (useApollo)
+ {
+ XSingleton<XChatApolloMgr>.singleton.StartRecord(VoiceUsage.CHAT, null);
+ }
+ else
+ {
+ XSingleton<XChatIFlyMgr>.singleton.StartRecord(VoiceUsage.CHAT, null);
+ }
+ }
+ else
+ {
+ XSingleton<XDebug>.singleton.AddLog("Press up", null, null, null, null, null, XDebugColor.XDebug_None);
+ this.m_IsRecording = false;
+ DlgBase<XChatView, XChatBehaviour>.singleton.SetActiveChannel(ChatChannelType.Team);
+ bool useApollo2 = XChatDocument.UseApollo;
+ if (useApollo2)
+ {
+ XSingleton<XChatApolloMgr>.singleton.StopRecord(this.m_CancelRecord);
+ }
+ else
+ {
+ XSingleton<XChatIFlyMgr>.singleton.StopRecord(this.m_CancelRecord);
+ }
+ }
+ }
+
+ public void OnStopVoiceRecord()
+ {
+ bool isRecording = this.m_IsRecording;
+ if (isRecording)
+ {
+ DlgBase<XChatView, XChatBehaviour>.singleton.SetActiveChannel(ChatChannelType.Team);
+ bool useApollo = XChatDocument.UseApollo;
+ if (useApollo)
+ {
+ XSingleton<XChatApolloMgr>.singleton.StopRecord(this.m_CancelRecord);
+ }
+ else
+ {
+ XSingleton<XChatIFlyMgr>.singleton.StopRecord(this.m_CancelRecord);
+ }
+ this.m_IsRecording = false;
+ }
+ }
+
+ public bool OnCommandBtnClick(IXUIButton btn)
+ {
+ return true;
+ }
+
+ private void OnAutoPlayTip(IXUISprite go)
+ {
+ bool flag = XSingleton<XScene>.singleton.SceneType == SceneType.SCENE_ARENA;
+ if (flag)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemNoticeTip(XStringDefineProxy.GetString("ArenaAutoFight"));
+ }
+ else
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemNoticeTip(string.Format(XStringDefineProxy.GetString("AutoFightOpenLevel"), XSingleton<XGlobalConfig>.singleton.GetValue("AutoPlayUnlockLevel")));
+ }
+ }
+
+ public void ShowBattleVoice(ChatVoiceInfo info)
+ {
+ bool flag = !base.IsVisible();
+ if (!flag)
+ {
+ this.m_ChatLabelCd = XSingleton<XTimerMgr>.singleton.SetTimer((float)info.voiceTime + 2f, this._hideBattleChatUICb, info);
+ }
+ }
+
+ public void HideBattleChatUI(object info)
+ {
+ this.m_ChatLabelCd = 0u;
+ }
+
+ public void ShowCountDownFrame(bool status)
+ {
+ bool flag = !base.IsVisible();
+ if (!flag)
+ {
+ base.uiBehaviour.m_CountDownFrame.gameObject.SetActive(true);
+ base.uiBehaviour.m_CountDownTimeFrame.gameObject.SetActive(status);
+ base.uiBehaviour.m_CountDownBeginFrame.gameObject.SetActive(!status);
+ (base.uiBehaviour.m_CountDownTimeFrame.gameObject.GetComponent("XUIPlayTween") as IXUITweenTool).PlayTween(status, -1f);
+ (base.uiBehaviour.m_CountDownBeginFrame.gameObject.GetComponent("XUIPlayTween") as IXUITweenTool).PlayTween(!status, -1f);
+ }
+ }
+
+ public void OnPlaySuperarmorFx(XEntity enemy, bool bBroken)
+ {
+ for (int i = 0; i < this.EnemyInfoHandler.EnemyList.Count; i++)
+ {
+ bool flag = this.EnemyInfoHandler.EnemyList[i].Entity == enemy;
+ if (flag)
+ {
+ this.EnemyInfoHandler.EnemyList[i].SetSuperArmorState(bBroken);
+ break;
+ }
+ }
+ }
+
+ public void OnStopSuperarmorFx(XEntity enemy)
+ {
+ for (int i = 0; i < this.EnemyInfoHandler.EnemyList.Count; i++)
+ {
+ bool flag = this.EnemyInfoHandler.EnemyList[i].Entity == enemy;
+ if (flag)
+ {
+ this.EnemyInfoHandler.EnemyList[i].StopSuperArmorFx();
+ break;
+ }
+ }
+ }
+
+ public void OnProjectDamage(ProjectDamageResult damage, XEntity entity)
+ {
+ for (int i = 0; i < this.EnemyInfoHandler.EnemyList.Count; i++)
+ {
+ bool flag = this.EnemyInfoHandler.EnemyList[i].Entity == entity;
+ if (flag)
+ {
+ bool flag2 = XSingleton<XEntityMgr>.singleton.Player != null && XSingleton<XEntityMgr>.singleton.Player.WatchTo != null && damage.Caster == XSingleton<XEntityMgr>.singleton.Player.WatchTo.ID;
+ if (flag2)
+ {
+ this.EnemyInfoHandler.EnemyList[i].OnBeHit(damage);
+ }
+ break;
+ }
+ }
+ }
+
+ public void SetupSpeedFx(XEntity enemy, bool enable, Color c)
+ {
+ for (int i = 0; i < this.EnemyInfoHandler.EnemyList.Count; i++)
+ {
+ bool flag = this.EnemyInfoHandler.EnemyList[i].Entity == enemy;
+ if (flag)
+ {
+ IXUISprite uiSuperArmorSpeedFx = this.EnemyInfoHandler.EnemyList[i].m_uiSuperArmorSpeedFx;
+ uiSuperArmorSpeedFx.gameObject.SetActive(enable);
+ uiSuperArmorSpeedFx.SetColor(c);
+ break;
+ }
+ }
+ }
+
+ public void ShowStrengthPresevedBar(XEntity entity)
+ {
+ base.uiBehaviour.m_StrengthPresevedBar.SetVisible(true);
+ this._strength_preseved_entity = entity;
+ this._total_strength_preseved = (float)this._strength_preseved_entity.Attributes.GetAttr(XAttributeDefine.XAttr_CurrentXULI_Basic);
+ this._current_strength_preseved = this._total_strength_preseved;
+ this.RefreshStrengthPresevedBar();
+ }
+
+ public void HideStrengthPresevedBar()
+ {
+ base.uiBehaviour.m_StrengthPresevedBar.SetVisible(false);
+ this._strength_preseved_entity = null;
+ this._total_strength_preseved = 1f;
+ this._current_strength_preseved = 0f;
+ }
+
+ public void RefreshStrengthPresevedBar()
+ {
+ this._current_strength_preseved = (float)this._strength_preseved_entity.Attributes.GetAttr(XAttributeDefine.XAttr_CurrentXULI_Basic);
+ base.uiBehaviour.m_StrengthPresevedBar.value = this._strength_preseved_precent;
+ }
+
+ public bool OnViewClick(IXUIButton sp)
+ {
+ this.SetView((XOperationMode)sp.ID);
+ return true;
+ }
+
+ public bool OnBarrageClick(IXUIButton btn)
+ {
+ int num = (int)btn.ID;
+ bool flag = num == 1;
+ base.uiBehaviour.m_barrageOpen.SetVisible(!flag);
+ base.uiBehaviour.m_barrageClose.SetVisible(flag);
+ DlgBase<BarrageDlg, BarrageBehaviour>.singleton.openBarrage = flag;
+ bool flag2 = !flag;
+ if (flag2)
+ {
+ DlgBase<BarrageDlg, BarrageBehaviour>.singleton.ClearAll();
+ }
+ DlgBase<BarrageDlg, BarrageBehaviour>.singleton.SetVisible(flag, true);
+ return true;
+ }
+
+ public bool OnShareClick(IXUIButton btn)
+ {
+ XSpectateDocument specificDocument = XDocuments.GetSpecificDocument<XSpectateDocument>(XSpectateDocument.uuID);
+ LiveType liveTypeBySceneType = XSpectateDocument.GetLiveTypeBySceneType(XSingleton<XScene>.singleton.SceneType);
+ XSingleton<XDebug>.singleton.AddLog("Share btn click, live type is: " + liveTypeBySceneType, null, null, null, null, null, XDebugColor.XDebug_None);
+ uint num = (uint)XFastEnumIntEqualityComparer<ChatChannelType>.ToInt(ChatChannelType.World);
+ XInvitationDocument specificDocument2 = XDocuments.GetSpecificDocument<XInvitationDocument>(XInvitationDocument.uuID);
+ XSpectateSceneDocument specificDocument3 = XDocuments.GetSpecificDocument<XSpectateSceneDocument>(XSpectateSceneDocument.uuID);
+ uint liveID = specificDocument3.liveRecordInfo.liveID;
+ DlgBase<XChatSmallView, XChatSmallBehaviour>.singleton.DoOpenChatWindow(null);
+ bool flag = liveTypeBySceneType == LiveType.LIVE_PVP;
+ if (flag)
+ {
+ int tianTiLevel = specificDocument3.liveRecordInfo.tianTiLevel;
+ string name = specificDocument3.liveRecordInfo.nameInfos[0].roleInfo.name;
+ string name2 = specificDocument3.liveRecordInfo.nameInfos[1].roleInfo.name;
+ DlgBase<XChatView, XChatBehaviour>.singleton.RegistLinkSend(specificDocument2.GetSpectateLinkString(100002u, new object[]
+ {
+ tianTiLevel,
+ name,
+ name2
+ }), new Action(this.OnChatSend));
+ }
+ else
+ {
+ bool flag2 = liveTypeBySceneType == LiveType.LIVE_NEST;
+ if (flag2)
+ {
+ string title = specificDocument.GetTitle(specificDocument3.liveRecordInfo);
+ DlgBase<XChatView, XChatBehaviour>.singleton.RegistLinkSend(specificDocument2.GetSpectateLinkString(100003u, new object[]
+ {
+ title
+ }), new Action(this.OnChatSend));
+ }
+ else
+ {
+ bool flag3 = liveTypeBySceneType == LiveType.LIVE_PROTECTCAPTAIN;
+ if (flag3)
+ {
+ List<LiveNameInfo> nameInfos = specificDocument3.liveRecordInfo.nameInfos;
+ string teamLeaderName = nameInfos[0].teamLeaderName;
+ string teamLeaderName2 = nameInfos[1].teamLeaderName;
+ for (int i = 0; i < nameInfos.Count; i++)
+ {
+ bool isLeft = nameInfos[i].isLeft;
+ if (isLeft)
+ {
+ bool flag4 = nameInfos[i].teamLeaderName != "";
+ if (flag4)
+ {
+ teamLeaderName = nameInfos[i].teamLeaderName;
+ }
+ }
+ else
+ {
+ bool flag5 = nameInfos[i].teamLeaderName != "";
+ if (flag5)
+ {
+ teamLeaderName2 = nameInfos[i].teamLeaderName;
+ }
+ }
+ }
+ DlgBase<XChatView, XChatBehaviour>.singleton.RegistLinkSend(specificDocument2.GetSpectateLinkString(100004u, new object[]
+ {
+ teamLeaderName,
+ teamLeaderName2
+ }), new Action(this.OnChatSend));
+ }
+ else
+ {
+ bool flag6 = liveTypeBySceneType == LiveType.LIVE_GUILDBATTLE;
+ if (flag6)
+ {
+ string guildName = specificDocument3.liveRecordInfo.nameInfos[0].guildName;
+ string guildName2 = specificDocument3.liveRecordInfo.nameInfos[1].guildName;
+ DlgBase<XChatView, XChatBehaviour>.singleton.RegistLinkSend(specificDocument2.GetSpectateLinkString(100005u, new object[]
+ {
+ guildName,
+ guildName2
+ }), new Action(this.OnChatSend));
+ }
+ else
+ {
+ bool flag7 = liveTypeBySceneType == LiveType.LIVE_DRAGON;
+ if (flag7)
+ {
+ string title2 = specificDocument.GetTitle(specificDocument3.liveRecordInfo);
+ DlgBase<XChatView, XChatBehaviour>.singleton.RegistLinkSend(specificDocument2.GetSpectateLinkString(100006u, new object[]
+ {
+ title2
+ }), new Action(this.OnChatSend));
+ }
+ else
+ {
+ bool flag8 = liveTypeBySceneType == LiveType.LIVE_HEROBATTLE;
+ if (flag8)
+ {
+ string title3 = specificDocument.GetTitle(specificDocument3.liveRecordInfo);
+ DlgBase<XChatView, XChatBehaviour>.singleton.RegistLinkSend(specificDocument2.GetSpectateLinkString(100008u, new object[]
+ {
+ title3
+ }), new Action(this.OnChatSend));
+ }
+ else
+ {
+ bool flag9 = liveTypeBySceneType == LiveType.LIVE_LEAGUEBATTLE;
+ if (flag9)
+ {
+ string teamName = specificDocument3.liveRecordInfo.nameInfos[0].teamName;
+ string teamName2 = specificDocument3.liveRecordInfo.nameInfos[1].teamName;
+ DlgBase<XChatView, XChatBehaviour>.singleton.RegistLinkSend(specificDocument2.GetSpectateLinkString(100009u, new object[]
+ {
+ teamName,
+ teamName2
+ }), new Action(this.OnChatSend));
+ }
+ else
+ {
+ bool flag10 = liveTypeBySceneType == LiveType.LIVE_PVP2;
+ if (flag10)
+ {
+ string text = "";
+ string text2 = "";
+ for (int j = 0; j < specificDocument3.liveRecordInfo.nameInfos.Count; j++)
+ {
+ bool flag11 = specificDocument3.liveRecordInfo.nameInfos[j].teamLeaderName != "";
+ if (flag11)
+ {
+ bool isLeft2 = specificDocument3.liveRecordInfo.nameInfos[j].isLeft;
+ if (isLeft2)
+ {
+ text = specificDocument3.liveRecordInfo.nameInfos[j].teamLeaderName;
+ }
+ else
+ {
+ text2 = specificDocument3.liveRecordInfo.nameInfos[j].teamLeaderName;
+ }
+ }
+ }
+ DlgBase<XChatView, XChatBehaviour>.singleton.RegistLinkSend(specificDocument2.GetSpectateLinkString(100010u, new object[]
+ {
+ text,
+ text2
+ }), new Action(this.OnChatSend));
+ }
+ else
+ {
+ bool flag12 = liveTypeBySceneType == LiveType.LIVE_CUSTOMPK;
+ if (flag12)
+ {
+ string name3 = specificDocument3.liveRecordInfo.nameInfos[0].roleInfo.name;
+ string name4 = specificDocument3.liveRecordInfo.nameInfos[1].roleInfo.name;
+ DlgBase<XChatView, XChatBehaviour>.singleton.RegistLinkSend(specificDocument2.GetSpectateLinkString(100011u, new object[]
+ {
+ name3,
+ name4
+ }), new Action(this.OnChatSend));
+ }
+ else
+ {
+ bool flag13 = liveTypeBySceneType == LiveType.LIVE_CROSSGVG;
+ if (flag13)
+ {
+ string guildName3 = specificDocument3.liveRecordInfo.nameInfos[0].guildName;
+ string guildName4 = specificDocument3.liveRecordInfo.nameInfos[1].guildName;
+ DlgBase<XChatView, XChatBehaviour>.singleton.RegistLinkSend(specificDocument2.GetSpectateLinkString(100013u, new object[]
+ {
+ guildName3,
+ guildName4
+ }), new Action(this.OnChatSend));
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ return true;
+ }
+
+ private void OnChatSend()
+ {
+ XSpectateDocument specificDocument = XDocuments.GetSpecificDocument<XSpectateDocument>(XSpectateDocument.uuID);
+ LiveType liveTypeBySceneType = XSpectateDocument.GetLiveTypeBySceneType(XSingleton<XScene>.singleton.SceneType);
+ XSingleton<XDebug>.singleton.AddLog("Share btn click, live type is:" + liveTypeBySceneType, null, null, null, null, null, XDebugColor.XDebug_None);
+ uint num = (uint)XFastEnumIntEqualityComparer<ChatChannelType>.ToInt(ChatChannelType.World);
+ XInvitationDocument specificDocument2 = XDocuments.GetSpecificDocument<XInvitationDocument>(XInvitationDocument.uuID);
+ XSpectateSceneDocument specificDocument3 = XDocuments.GetSpecificDocument<XSpectateSceneDocument>(XSpectateSceneDocument.uuID);
+ uint liveID = specificDocument3.liveRecordInfo.liveID;
+ bool flag = liveTypeBySceneType == LiveType.LIVE_PVP;
+ if (flag)
+ {
+ int tianTiLevel = specificDocument3.liveRecordInfo.tianTiLevel;
+ string name = specificDocument3.liveRecordInfo.nameInfos[0].roleInfo.name;
+ string name2 = specificDocument3.liveRecordInfo.nameInfos[1].roleInfo.name;
+ specificDocument2.SendSpectateInvitation(100002u, liveID, liveTypeBySceneType, new object[]
+ {
+ tianTiLevel,
+ name,
+ name2
+ });
+ }
+ else
+ {
+ bool flag2 = liveTypeBySceneType == LiveType.LIVE_NEST;
+ if (flag2)
+ {
+ string title = specificDocument.GetTitle(specificDocument3.liveRecordInfo);
+ specificDocument2.SendSpectateInvitation(100003u, liveID, liveTypeBySceneType, new object[]
+ {
+ title
+ });
+ }
+ else
+ {
+ bool flag3 = liveTypeBySceneType == LiveType.LIVE_PROTECTCAPTAIN;
+ if (flag3)
+ {
+ List<LiveNameInfo> nameInfos = specificDocument3.liveRecordInfo.nameInfos;
+ string teamLeaderName = nameInfos[0].teamLeaderName;
+ string teamLeaderName2 = nameInfos[1].teamLeaderName;
+ for (int i = 0; i < nameInfos.Count; i++)
+ {
+ bool isLeft = nameInfos[i].isLeft;
+ if (isLeft)
+ {
+ bool flag4 = nameInfos[i].teamLeaderName != "";
+ if (flag4)
+ {
+ teamLeaderName = nameInfos[i].teamLeaderName;
+ }
+ }
+ else
+ {
+ bool flag5 = nameInfos[i].teamLeaderName != "";
+ if (flag5)
+ {
+ teamLeaderName2 = nameInfos[i].teamLeaderName;
+ }
+ }
+ }
+ specificDocument2.SendSpectateInvitation(100004u, liveID, liveTypeBySceneType, new object[]
+ {
+ teamLeaderName,
+ teamLeaderName2
+ });
+ }
+ else
+ {
+ bool flag6 = liveTypeBySceneType == LiveType.LIVE_GUILDBATTLE;
+ if (flag6)
+ {
+ string guildName = specificDocument3.liveRecordInfo.nameInfos[0].guildName;
+ string guildName2 = specificDocument3.liveRecordInfo.nameInfos[1].guildName;
+ specificDocument2.SendSpectateInvitation(100005u, liveID, liveTypeBySceneType, new object[]
+ {
+ guildName,
+ guildName2
+ });
+ }
+ else
+ {
+ bool flag7 = liveTypeBySceneType == LiveType.LIVE_DRAGON;
+ if (flag7)
+ {
+ string title2 = specificDocument.GetTitle(specificDocument3.liveRecordInfo);
+ specificDocument2.SendSpectateInvitation(100006u, liveID, liveTypeBySceneType, new object[]
+ {
+ title2
+ });
+ }
+ else
+ {
+ bool flag8 = liveTypeBySceneType == LiveType.LIVE_HEROBATTLE;
+ if (flag8)
+ {
+ string title3 = specificDocument.GetTitle(specificDocument3.liveRecordInfo);
+ specificDocument2.SendSpectateInvitation(100008u, liveID, liveTypeBySceneType, new object[]
+ {
+ title3
+ });
+ }
+ else
+ {
+ bool flag9 = liveTypeBySceneType == LiveType.LIVE_LEAGUEBATTLE;
+ if (flag9)
+ {
+ string teamName = specificDocument3.liveRecordInfo.nameInfos[0].teamName;
+ string teamName2 = specificDocument3.liveRecordInfo.nameInfos[1].teamName;
+ specificDocument2.SendSpectateInvitation(100009u, liveID, liveTypeBySceneType, new object[]
+ {
+ teamName,
+ teamName2
+ });
+ }
+ else
+ {
+ bool flag10 = liveTypeBySceneType == LiveType.LIVE_PVP2;
+ if (flag10)
+ {
+ string text = "";
+ string text2 = "";
+ for (int j = 0; j < specificDocument3.liveRecordInfo.nameInfos.Count; j++)
+ {
+ bool flag11 = specificDocument3.liveRecordInfo.nameInfos[j].teamLeaderName != "";
+ if (flag11)
+ {
+ bool isLeft2 = specificDocument3.liveRecordInfo.nameInfos[j].isLeft;
+ if (isLeft2)
+ {
+ text = specificDocument3.liveRecordInfo.nameInfos[j].teamLeaderName;
+ }
+ else
+ {
+ text2 = specificDocument3.liveRecordInfo.nameInfos[j].teamLeaderName;
+ }
+ }
+ }
+ specificDocument2.SendSpectateInvitation(100010u, liveID, liveTypeBySceneType, new object[]
+ {
+ text,
+ text2
+ });
+ }
+ else
+ {
+ bool flag12 = liveTypeBySceneType == LiveType.LIVE_CUSTOMPK;
+ if (flag12)
+ {
+ string name3 = specificDocument3.liveRecordInfo.nameInfos[0].roleInfo.name;
+ string name4 = specificDocument3.liveRecordInfo.nameInfos[1].roleInfo.name;
+ specificDocument2.SendSpectateInvitation(100011u, liveID, liveTypeBySceneType, new object[]
+ {
+ name3,
+ name4
+ });
+ }
+ else
+ {
+ bool flag13 = liveTypeBySceneType == LiveType.LIVE_CROSSGVG;
+ if (flag13)
+ {
+ string guildName3 = specificDocument3.liveRecordInfo.nameInfos[0].guildName;
+ string guildName4 = specificDocument3.liveRecordInfo.nameInfos[1].guildName;
+ specificDocument2.SendSpectateInvitation(100013u, liveID, liveTypeBySceneType, new object[]
+ {
+ guildName3,
+ guildName4
+ });
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+
+ public void ShowBackToMainCityTips()
+ {
+ string @string = XStringDefineProxy.GetString("ERR_WATCH_LIVEISOVER");
+ string string2 = XStringDefineProxy.GetString("Spectate_Goon");
+ string string3 = XStringDefineProxy.GetString("LEVEL_REWARD_RETURN");
+ XSingleton<UiUtility>.singleton.ShowModalDialog(@string, string2, string3, new ButtonClickEventHandler(this.OnGoOnBtnClick), new ButtonClickEventHandler(this.OnBackToMainCityBtnClick), false, XTempTipDefine.OD_START, 251);
+ }
+
+ private bool OnBackToMainCityBtnClick(IXUIButton btn)
+ {
+ DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.SetVisible(false, true);
+ this._doc.LevelScene();
+ return true;
+ }
+
+ private bool OnGoOnBtnClick(IXUIButton btn)
+ {
+ DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.SetVisible(false, true);
+ DlgBase<SpectateView, SpectateBehaviour>.singleton.SetVisible(true, true);
+ return true;
+ }
+
+ public float GetLeftTime()
+ {
+ return this.leftTimeCounter.GetFloatLeftTime();
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/SpectateSceneView.cs.meta b/Client/Assets/Scripts/XMainClient/UI/SpectateSceneView.cs.meta
new file mode 100644
index 00000000..2068df55
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/SpectateSceneView.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: fa6388301570c2045bdb149fa1226938
+timeCreated: 1611404903
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/SpectateView.cs b/Client/Assets/Scripts/XMainClient/UI/SpectateView.cs
new file mode 100644
index 00000000..ff0bcd9a
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/SpectateView.cs
@@ -0,0 +1,666 @@
+using System;
+using System.Collections.Generic;
+using KKSG;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XMainClient.Utility;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class SpectateView : DlgBase<SpectateView, SpectateBehaviour>
+ {
+ public override string fileName
+ {
+ get
+ {
+ return "GameSystem/SpectateDlg";
+ }
+ }
+
+ public override int layer
+ {
+ get
+ {
+ return 1;
+ }
+ }
+
+ public override bool autoload
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override int group
+ {
+ get
+ {
+ return 1;
+ }
+ }
+
+ public override bool hideMainMenu
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override bool pushstack
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override bool fullscreenui
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override int sysid
+ {
+ get
+ {
+ return XFastEnumIntEqualityComparer<XSysDefine>.ToInt(XSysDefine.XSys_Spectate);
+ }
+ }
+
+ private XSpectateDocument _doc;
+
+ private string PROFRESSION_ICON_ATLAS = "SkillIcon/SkillTree";
+
+ private static readonly string GUILD_ICON_ATLAS = "common/Billboard";
+
+ private static readonly string TAG_ICON_ATLAS = "common/Universal";
+
+ private string _guildTagStr;
+
+ private string _friendTagStr;
+
+ private string _crossTagStr;
+
+ private string _leagueTagStr;
+
+ private string _splitSpace = " ";
+
+ private string _splitBigSpace = " ";
+
+ private float LastLevelSceneTime = 0f;
+
+ private IXUICheckBox _recommendCheckBox;
+
+ private IXUICheckBox _spectateTabCheckBox;
+
+ private IXUIButton _currClickBtn;
+
+ private int _tabCount;
+
+ protected override void Init()
+ {
+ base.Init();
+ this._doc = XDocuments.GetSpecificDocument<XSpectateDocument>(XSpectateDocument.uuID);
+ this._guildTagStr = XLabelSymbolHelper.FormatImage(SpectateView.TAG_ICON_ATLAS, "chat_tag_2");
+ this._friendTagStr = XLabelSymbolHelper.FormatImage(SpectateView.TAG_ICON_ATLAS, "chat_tag_8");
+ this._crossTagStr = XLabelSymbolHelper.FormatImage(SpectateView.TAG_ICON_ATLAS, "chat_tag_11");
+ this._leagueTagStr = XLabelSymbolHelper.FormatImage(SpectateView.TAG_ICON_ATLAS, "chat_tag_9");
+ this.SetupTabs();
+ List<int> list = new List<int>();
+ list.Add(0);
+ list.Add(1);
+ List<string> list2 = new List<string>();
+ for (int i = 0; i < 2; i++)
+ {
+ list2.Add(string.Format("SpectateTags_{0}", i.ToString()));
+ }
+ base.uiBehaviour.m_tabControl.SetupTabs(list, list2, new XUITabControl.UITabControlCallback(this.OnTagCheckBoxClick), false, 1f, -1, true);
+ this._spectateTabCheckBox = base.uiBehaviour.m_tabControl.GetByCheckBoxId(0UL);
+ this.PROFRESSION_ICON_ATLAS = XSingleton<XGlobalConfig>.singleton.GetValue("PROFRESSION_ICON_ATLAS");
+ base.uiBehaviour.m_SettingBtn.SetVisible(XSingleton<XGame>.singleton.CurrentStage.Stage == EXStage.Hall);
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ this._spectateTabCheckBox.bChecked = true;
+ this.OnTagCheckBoxClick(0UL);
+ base.uiBehaviour.m_PKTips.SetVisible(false);
+ base.uiBehaviour.m_SettingFrame.SetActive(false);
+ base.uiBehaviour.m_BroadcastCamera.SetVisible(false);
+ this.MyRecordInit();
+ }
+
+ public override void RegisterEvent()
+ {
+ base.uiBehaviour.m_Close.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnCloseClicked));
+ base.uiBehaviour.m_RefreshBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnRefreshBtnClick));
+ base.uiBehaviour.m_PreviousBtn.ID = 0UL;
+ base.uiBehaviour.m_PreviousBtn.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.TurnPageBtnClick));
+ base.uiBehaviour.m_NextBtn.ID = 1UL;
+ base.uiBehaviour.m_NextBtn.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.TurnPageBtnClick));
+ base.uiBehaviour.m_BroadcastCamera.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnBroadcastCamera));
+ base.uiBehaviour.m_SettingBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnSettingBtnClick));
+ base.uiBehaviour.m_SettingCloseBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnSettingCloseBtnClick));
+ base.uiBehaviour.m_SettingSureBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnSettingOkBtnClick));
+ base.uiBehaviour.m_SettingAllow.ID = 0UL;
+ base.uiBehaviour.m_SettingDeny.ID = 1UL;
+ base.uiBehaviour.m_SettingAllow.RegisterOnCheckEventHandler(new CheckBoxOnCheckEventHandler(this.OnSettingCheckBoxClick));
+ base.uiBehaviour.m_SettingDeny.RegisterOnCheckEventHandler(new CheckBoxOnCheckEventHandler(this.OnSettingCheckBoxClick));
+ }
+
+ private void SetupTabs()
+ {
+ base.uiBehaviour.m_SpectateTabs.ReturnAll(false);
+ Vector3 tplPos = base.uiBehaviour.m_SpectateTabs.TplPos;
+ this._tabCount = XSingleton<XGlobalConfig>.singleton.GetInt("Spectate_PVP_TabCount");
+ for (int i = 0; i < this._tabCount; i++)
+ {
+ GameObject gameObject = base.uiBehaviour.m_SpectateTabs.FetchGameObject(false);
+ IXUICheckBox ixuicheckBox = gameObject.transform.Find("Bg").GetComponent("XUICheckBox") as IXUICheckBox;
+ ixuicheckBox.ID = (ulong)((long)i + 1L);
+ ixuicheckBox.RegisterOnCheckEventHandler(new CheckBoxOnCheckEventHandler(this.OnSpectateTabsClick));
+ IXUILabel ixuilabel = gameObject.transform.Find("Bg/TextLabel").GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel2 = gameObject.transform.Find("Bg/Selected/TextLabel").GetComponent("XUILabel") as IXUILabel;
+ string @string = XStringDefineProxy.GetString("Spectate_Type_" + (i + 1).ToString());
+ ixuilabel.SetText(@string);
+ ixuilabel2.SetText(@string);
+ gameObject.transform.localPosition = new Vector3(tplPos.x, tplPos.y - (float)(base.uiBehaviour.m_SpectateTabs.TplHeight * i), 0f);
+ bool flag = i == 0;
+ if (flag)
+ {
+ this._recommendCheckBox = ixuicheckBox;
+ }
+ }
+ }
+
+ private void SpectateInit()
+ {
+ this._recommendCheckBox.bChecked = true;
+ this.OnSpectateTabsClick(this._recommendCheckBox);
+ }
+
+ private void MyRecordInit()
+ {
+ this._doc.SendQueryMyLiveInfo();
+ }
+
+ protected bool OnCloseClicked(IXUIButton go)
+ {
+ bool flag = XSingleton<XGame>.singleton.CurrentStage.Stage == EXStage.Hall;
+ if (flag)
+ {
+ this.SetVisibleWithAnimation(false, null);
+ }
+ else
+ {
+ bool flag2 = Time.time - this.LastLevelSceneTime < 5f;
+ if (flag2)
+ {
+ return false;
+ }
+ this.LastLevelSceneTime = Time.time;
+ XSingleton<XScene>.singleton.ReqLeaveScene();
+ }
+ return true;
+ }
+
+ private bool OnSpectateTabsClick(IXUICheckBox icheckBox)
+ {
+ bool flag = !icheckBox.bChecked;
+ bool result;
+ if (flag)
+ {
+ result = true;
+ }
+ else
+ {
+ bool flag2 = icheckBox.ID == 2UL;
+ if (flag2)
+ {
+ base.uiBehaviour.m_PKTips.SetVisible(true);
+ base.uiBehaviour.m_PKTips.SetText(XStringDefineProxy.GetString("Spectate_PK_Tips"));
+ }
+ else
+ {
+ base.uiBehaviour.m_PKTips.SetVisible(false);
+ }
+ this._doc.SendQuerySpectateInfo((int)icheckBox.ID);
+ result = true;
+ }
+ return result;
+ }
+
+ private void OnTagCheckBoxClick(ulong id)
+ {
+ bool flag = id == 0UL;
+ if (flag)
+ {
+ base.uiBehaviour.m_SpectateFrame.SetActive(true);
+ this.SpectateInit();
+ base.uiBehaviour.m_MyLiveRecordFrame.SetActive(false);
+ }
+ else
+ {
+ base.uiBehaviour.m_SpectateFrame.SetActive(false);
+ base.uiBehaviour.m_MyLiveRecordFrame.SetActive(true);
+ this.RefreshMyRecord();
+ }
+ }
+
+ private void TurnPageBtnClick(IXUISprite btn)
+ {
+ bool flag = btn.ID == 0UL;
+ int num;
+ if (flag)
+ {
+ num = this._doc.CurrPage - 1;
+ }
+ else
+ {
+ num = this._doc.CurrPage + 1;
+ }
+ bool flag2 = num < 0 || num >= this._doc.MaxPage;
+ if (!flag2)
+ {
+ this.RefreshSpectate(num);
+ }
+ }
+
+ private bool OnBroadcastCamera(IXUIButton btn)
+ {
+ XSingleton<XChatIFlyMgr>.singleton.OnOpenWebView();
+ return true;
+ }
+
+ private bool OnRefreshBtnClick(IXUIButton btn)
+ {
+ this._doc.SendQuerySpectateInfo(this._doc.CurrTabs);
+ return true;
+ }
+
+ private bool OnWatchLiveBtnClick(IXUIButton btn)
+ {
+ this._currClickBtn = btn;
+ XSpectateSceneDocument specificDocument = XDocuments.GetSpecificDocument<XSpectateSceneDocument>(XSpectateSceneDocument.uuID);
+ specificDocument.WatchNum = this._doc.SpectateRecord[(int)btn.ID].watchNum;
+ specificDocument.CommendNum = this._doc.SpectateRecord[(int)btn.ID].commendNum;
+ this._doc.EnterSpectateBattle(this._doc.SpectateRecord[(int)btn.ID].liveID, this._doc.SpectateRecord[(int)btn.ID].liveType);
+ return true;
+ }
+
+ public void SetWatchBtnGrey(bool isOver)
+ {
+ if (isOver)
+ {
+ this._doc.SpectateRecord[(int)this._currClickBtn.ID].canEnter = false;
+ }
+ this._currClickBtn.SetGrey(false);
+ }
+
+ public void RefreshSpectate(int page)
+ {
+ base.uiBehaviour.m_EmptyTips.SetActive(this._doc.MaxPage == 0);
+ base.uiBehaviour.m_PageNum.gameObject.SetActive(this._doc.MaxPage != 0);
+ base.uiBehaviour.m_SpectateLivePool.ReturnAll(false);
+ bool flag = this._doc.MaxPage == 0;
+ if (flag)
+ {
+ this._doc.CurrPage = 0;
+ base.uiBehaviour.m_PreviousBtn.gameObject.SetActive(false);
+ base.uiBehaviour.m_NextBtn.gameObject.SetActive(false);
+ }
+ else
+ {
+ this._doc.CurrPage = page;
+ base.uiBehaviour.m_PreviousBtn.gameObject.SetActive(page > 0);
+ base.uiBehaviour.m_NextBtn.gameObject.SetActive(page < this._doc.MaxPage - 1);
+ base.uiBehaviour.m_PageNum.SetText((page + 1).ToString() + "/" + this._doc.MaxPage.ToString());
+ for (int i = 0; i < this._doc.ITEMPERPAGE; i++)
+ {
+ int num = page * this._doc.ITEMPERPAGE + i;
+ bool flag2 = num < 0 || num >= this._doc.SpectateRecord.Count;
+ GameObject gameObject;
+ if (flag2)
+ {
+ for (int j = i; j < this._doc.ITEMPERPAGE; j++)
+ {
+ gameObject = base.uiBehaviour.m_SpectateLivePool.FetchGameObject(false);
+ gameObject.SetActive(false);
+ }
+ break;
+ }
+ OneLiveRecordInfo info = this._doc.SpectateRecord[num];
+ gameObject = base.uiBehaviour.m_SpectateLivePool.FetchGameObject(false);
+ Vector3 tplPos = base.uiBehaviour.m_SpectateLivePool.TplPos;
+ gameObject.transform.localPosition = new Vector3(tplPos.x, tplPos.y - (float)(i * base.uiBehaviour.m_SpectateLivePool.TplHeight), 0f);
+ this.SetMessageInTpl(gameObject, info, true, num);
+ }
+ }
+ }
+
+ public void RefreshMyRecord()
+ {
+ this.SetVisibleSettingTextState();
+ IXUILabel ixuilabel = base.uiBehaviour.m_MyLiveRecordFrame.transform.Find("Watch").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel.SetText(string.Format(XStringDefineProxy.GetString("Spectate_MyRecord_TotalWatchText"), this._doc.TotalWatch));
+ IXUILabel ixuilabel2 = base.uiBehaviour.m_MyLiveRecordFrame.transform.Find("Commend").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel2.SetText(string.Format(XStringDefineProxy.GetString("Spectate_MyRecord_TotalCommendText"), this._doc.TotalCommend));
+ GameObject gameObject = base.uiBehaviour.m_MyLiveRecordFrame.transform.Find("NA").gameObject;
+ gameObject.SetActive(this._doc.WatchMostRecord == null);
+ GameObject gameObject2 = base.uiBehaviour.m_MyLiveRecordFrame.transform.Find("UpView/Watch/itemTpl").gameObject;
+ gameObject2.SetActive(this._doc.WatchMostRecord != null);
+ bool flag = this._doc.WatchMostRecord != null;
+ if (flag)
+ {
+ this.SetMessageInTpl(gameObject2, this._doc.WatchMostRecord, false, 0);
+ }
+ GameObject gameObject3 = base.uiBehaviour.m_MyLiveRecordFrame.transform.Find("UpView/Commend/itemTpl").gameObject;
+ gameObject3.SetActive(this._doc.CommendMostRecord != null);
+ bool flag2 = this._doc.CommendMostRecord != null;
+ if (flag2)
+ {
+ this.SetMessageInTpl(gameObject3, this._doc.CommendMostRecord, false, 0);
+ }
+ base.uiBehaviour.m_MyLiveUpView.SetActive(this._doc.WatchMostRecord != null);
+ base.uiBehaviour.m_MyLiveDownView.SetActive(this._doc.WatchMostRecord != null);
+ base.uiBehaviour.m_MyLivePool.ReturnAll(false);
+ for (int i = 0; i < this._doc.MyRecentRecord.Count; i++)
+ {
+ GameObject gameObject4 = base.uiBehaviour.m_MyLivePool.FetchGameObject(false);
+ Vector3 tplPos = base.uiBehaviour.m_MyLivePool.TplPos;
+ gameObject4.transform.localPosition = new Vector3(tplPos.x, tplPos.y - (float)(i * base.uiBehaviour.m_MyLivePool.TplHeight), 0f);
+ this.SetMessageInTpl(gameObject4, this._doc.MyRecentRecord[i], false, 0);
+ }
+ }
+
+ private void SetMessageInTpl(GameObject go, OneLiveRecordInfo info, bool showWatchBtn, int index = 0)
+ {
+ if (showWatchBtn)
+ {
+ IXUIButton ixuibutton = go.transform.Find("Bg/Message/WatchBtn").GetComponent("XUIButton") as IXUIButton;
+ ixuibutton.ID = (ulong)((long)index);
+ ixuibutton.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnWatchLiveBtnClick));
+ ixuibutton.SetGrey(info.canEnter);
+ int num = this._doc.CurrTime - info.beginTime;
+ bool flag = num < 0;
+ if (flag)
+ {
+ num = 0;
+ }
+ IXUILabel ixuilabel = go.transform.Find("Bg/Desc/Time").GetComponent("XUILabel") as IXUILabel;
+ bool flag2 = num < 3600;
+ if (flag2)
+ {
+ ixuilabel.SetText(XSingleton<UiUtility>.singleton.TimeAccFormatString(num, 3, 0) + XStringDefineProxy.GetString("AGO"));
+ }
+ else
+ {
+ ixuilabel.SetText(XSingleton<UiUtility>.singleton.TimeAccFormatString(num, 2, 0) + XStringDefineProxy.GetString("AGO"));
+ }
+ }
+ IXUILabel ixuilabel2 = go.transform.Find("Bg/Desc/Commend/Text").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel2.SetText(info.commendNum.ToString() + XStringDefineProxy.GetString("Spectate_times"));
+ IXUILabel ixuilabel3 = go.transform.Find("Bg/Desc/Watch/Text").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel3.SetText(info.watchNum.ToString() + XStringDefineProxy.GetString("Spectate_times"));
+ IXUILabelSymbol ixuilabelSymbol = go.transform.Find("Bg/Desc/Title").GetComponent("XUILabelSymbol") as IXUILabelSymbol;
+ string text = this._doc.GetTitle(info);
+ bool hasGuild = info.hasGuild;
+ if (hasGuild)
+ {
+ text += this._guildTagStr;
+ }
+ bool hasFriend = info.hasFriend;
+ if (hasFriend)
+ {
+ text += this._friendTagStr;
+ }
+ bool isCross = info.isCross;
+ if (isCross)
+ {
+ text += this._crossTagStr;
+ }
+ ixuilabelSymbol.InputText = text;
+ GameObject gameObject = go.transform.Find("Bg/Message/1V1").gameObject;
+ GameObject gameObject2 = go.transform.Find("Bg/Message/NVN").gameObject;
+ GameObject gameObject3 = go.transform.Find("Bg/Message/Center").gameObject;
+ GameObject gameObject4 = go.transform.Find("Bg/Message/VS").gameObject;
+ bool flag3 = info.liveType != LiveType.LIVE_DRAGON && info.liveType != LiveType.LIVE_NEST;
+ bool flag4 = info.liveType == LiveType.LIVE_PVP2 || ((info.liveType == LiveType.LIVE_PROTECTCAPTAIN || info.liveType == LiveType.LIVE_HEROBATTLE) && showWatchBtn);
+ gameObject.SetActive(flag3 && !flag4);
+ gameObject2.SetActive(flag3 && flag4);
+ gameObject3.SetActive(!flag3);
+ gameObject4.SetActive(flag3);
+ IXUILabelSymbol ixuilabelSymbol2 = gameObject.transform.Find("L").GetComponent("XUILabelSymbol") as IXUILabelSymbol;
+ IXUILabelSymbol ixuilabelSymbol3 = gameObject.transform.Find("R").GetComponent("XUILabelSymbol") as IXUILabelSymbol;
+ IXUILabelSymbol ixuilabelSymbol4 = gameObject2.transform.Find("DL").GetComponent("XUILabelSymbol") as IXUILabelSymbol;
+ IXUILabelSymbol ixuilabelSymbol5 = gameObject2.transform.Find("DR").GetComponent("XUILabelSymbol") as IXUILabelSymbol;
+ IXUILabelSymbol ixuilabelSymbol6 = gameObject2.transform.Find("UL").GetComponent("XUILabelSymbol") as IXUILabelSymbol;
+ IXUILabelSymbol ixuilabelSymbol7 = gameObject2.transform.Find("UR").GetComponent("XUILabelSymbol") as IXUILabelSymbol;
+ IXUILabelSymbol ixuilabelSymbol8 = gameObject3.transform.Find("Min").GetComponent("XUILabelSymbol") as IXUILabelSymbol;
+ string text2 = "";
+ string text3 = "";
+ switch (info.liveType)
+ {
+ case LiveType.LIVE_PVP:
+ case LiveType.LIVE_CUSTOMPK:
+ ixuilabelSymbol2.InputText = this.GetProIconString(info.nameInfos[0].roleInfo.type) + this._splitSpace + info.nameInfos[0].roleInfo.name;
+ ixuilabelSymbol3.InputText = this.GetProIconString(info.nameInfos[1].roleInfo.type) + this._splitSpace + info.nameInfos[1].roleInfo.name;
+ return;
+ case LiveType.LIVE_NEST:
+ case LiveType.LIVE_DRAGON:
+ for (int i = 0; i < info.nameInfos.Count; i++)
+ {
+ bool flag5 = info.nameInfos[i].teamLeaderName != "";
+ if (flag5)
+ {
+ text2 = string.Format(XStringDefineProxy.GetString("TEAM_NAME"), info.nameInfos[i].teamLeaderName);
+ }
+ }
+ text2 += this._splitBigSpace;
+ for (int j = 0; j < info.nameInfos.Count; j++)
+ {
+ text2 += this.GetProIconString(info.nameInfos[j].roleInfo.type);
+ }
+ ixuilabelSymbol8.InputText = text2;
+ return;
+ case LiveType.LIVE_PROTECTCAPTAIN:
+ case LiveType.LIVE_HEROBATTLE:
+ if (showWatchBtn)
+ {
+ for (int k = 0; k < info.nameInfos.Count; k++)
+ {
+ bool isLeft = info.nameInfos[k].isLeft;
+ if (isLeft)
+ {
+ bool flag6 = info.nameInfos[k].teamLeaderName != "";
+ if (flag6)
+ {
+ ixuilabelSymbol6.InputText = string.Format(XStringDefineProxy.GetString("TEAM_NAME"), info.nameInfos[k].teamLeaderName);
+ }
+ text2 += this.GetProIconString(info.nameInfos[k].roleInfo.type);
+ }
+ else
+ {
+ bool flag7 = info.nameInfos[k].teamLeaderName != "";
+ if (flag7)
+ {
+ ixuilabelSymbol7.InputText = string.Format(XStringDefineProxy.GetString("TEAM_NAME"), info.nameInfos[k].teamLeaderName);
+ }
+ text3 += this.GetProIconString(info.nameInfos[k].roleInfo.type);
+ }
+ }
+ ixuilabelSymbol4.InputText = text2;
+ ixuilabelSymbol5.InputText = text3;
+ }
+ else
+ {
+ for (int l = 0; l < info.nameInfos.Count; l++)
+ {
+ bool isLeft2 = info.nameInfos[l].isLeft;
+ if (isLeft2)
+ {
+ bool flag8 = info.nameInfos[l].teamLeaderName != "";
+ if (flag8)
+ {
+ text2 = string.Format(XStringDefineProxy.GetString("TEAM_NAME"), info.nameInfos[l].teamLeaderName);
+ }
+ }
+ else
+ {
+ bool flag9 = info.nameInfos[l].teamLeaderName != "";
+ if (flag9)
+ {
+ text3 = string.Format(XStringDefineProxy.GetString("TEAM_NAME"), info.nameInfos[l].teamLeaderName);
+ }
+ }
+ }
+ text2 += this._splitSpace;
+ text3 += this._splitSpace;
+ for (int m = 0; m < info.nameInfos.Count; m++)
+ {
+ bool isLeft3 = info.nameInfos[m].isLeft;
+ if (isLeft3)
+ {
+ text2 += this.GetProIconString(info.nameInfos[m].roleInfo.type);
+ }
+ else
+ {
+ text3 += this.GetProIconString(info.nameInfos[m].roleInfo.type);
+ }
+ }
+ ixuilabelSymbol2.InputText = text2;
+ ixuilabelSymbol3.InputText = text3;
+ }
+ return;
+ case LiveType.LIVE_GUILDBATTLE:
+ ixuilabelSymbol2.InputText = this.GetGuildIconString(info.nameInfos[0].guildIcon) + info.nameInfos[0].guildName;
+ ixuilabelSymbol3.InputText = this.GetGuildIconString(info.nameInfos[1].guildIcon) + info.nameInfos[1].guildName;
+ return;
+ case LiveType.LIVE_LEAGUEBATTLE:
+ ixuilabelSymbol2.InputText = string.Format("{0}{1}", this._leagueTagStr, info.nameInfos[0].teamName);
+ ixuilabelSymbol3.InputText = string.Format("{0}{1}", this._leagueTagStr, info.nameInfos[1].teamName);
+ return;
+ case LiveType.LIVE_PVP2:
+ {
+ bool flag10 = true;
+ bool flag11 = true;
+ ixuilabelSymbol6.SetVisible(false);
+ ixuilabelSymbol4.SetVisible(false);
+ ixuilabelSymbol7.SetVisible(false);
+ ixuilabelSymbol5.SetVisible(false);
+ for (int n = 0; n < info.nameInfos.Count; n++)
+ {
+ bool isLeft4 = info.nameInfos[n].isLeft;
+ if (isLeft4)
+ {
+ bool flag12 = flag10;
+ if (flag12)
+ {
+ flag10 = false;
+ ixuilabelSymbol6.SetVisible(true);
+ ixuilabelSymbol6.InputText = this.GetProIconString(info.nameInfos[n].roleInfo.type) + this._splitSpace + info.nameInfos[n].roleInfo.name;
+ }
+ else
+ {
+ ixuilabelSymbol4.SetVisible(true);
+ ixuilabelSymbol4.InputText = this.GetProIconString(info.nameInfos[n].roleInfo.type) + this._splitSpace + info.nameInfos[n].roleInfo.name;
+ }
+ }
+ else
+ {
+ bool flag13 = flag11;
+ if (flag13)
+ {
+ flag11 = false;
+ ixuilabelSymbol7.SetVisible(true);
+ ixuilabelSymbol7.InputText = this.GetProIconString(info.nameInfos[n].roleInfo.type) + this._splitSpace + info.nameInfos[n].roleInfo.name;
+ }
+ else
+ {
+ ixuilabelSymbol5.SetVisible(true);
+ ixuilabelSymbol5.InputText = this.GetProIconString(info.nameInfos[n].roleInfo.type) + this._splitSpace + info.nameInfos[n].roleInfo.name;
+ }
+ }
+ }
+ return;
+ }
+ case LiveType.LIVE_CROSSGVG:
+ {
+ string arg = this.GetGuildIconString(info.nameInfos[0].guildIcon) + info.nameInfos[0].guildName;
+ ixuilabelSymbol2.InputText = string.Format(XStringDefineProxy.GetString("CROSS_GVG_GUILDNAME"), info.nameInfos[0].serverid, arg);
+ arg = this.GetGuildIconString(info.nameInfos[1].guildIcon) + info.nameInfos[1].guildName;
+ ixuilabelSymbol3.InputText = string.Format(XStringDefineProxy.GetString("CROSS_GVG_GUILDNAME"), info.nameInfos[1].serverid, arg);
+ return;
+ }
+ }
+ XSingleton<XDebug>.singleton.AddErrorLog("UnDefine LiveType.", null, null, null, null, null);
+ }
+
+ private string GetProIconString(RoleType type)
+ {
+ int profID = XFastEnumIntEqualityComparer<RoleType>.ToInt(type);
+ return XLabelSymbolHelper.FormatImage(this.PROFRESSION_ICON_ATLAS, XSingleton<XProfessionSkillMgr>.singleton.GetProfIcon(profID));
+ }
+
+ private string GetGuildIconString(int guildIconID)
+ {
+ return XLabelSymbolHelper.FormatImage(SpectateView.GUILD_ICON_ATLAS, "ghicon_" + guildIconID.ToString());
+ }
+
+ private bool OnSettingBtnClick(IXUIButton btn)
+ {
+ base.uiBehaviour.m_SettingFrame.SetActive(true);
+ base.uiBehaviour.m_SettingDesc.SetText(XSingleton<UiUtility>.singleton.ReplaceReturn(XStringDefineProxy.GetString("SpectateSettingStr")));
+ this._doc.TempSetting = this._doc.VisibleSetting;
+ base.uiBehaviour.m_SettingAllow.bChecked = this._doc.TempSetting;
+ base.uiBehaviour.m_SettingDeny.bChecked = !this._doc.TempSetting;
+ return true;
+ }
+
+ private bool OnSettingCloseBtnClick(IXUIButton btn)
+ {
+ base.uiBehaviour.m_SettingFrame.SetActive(false);
+ return true;
+ }
+
+ private bool OnSettingCheckBoxClick(IXUICheckBox icb)
+ {
+ bool flag = !icb.bChecked;
+ bool result;
+ if (flag)
+ {
+ result = true;
+ }
+ else
+ {
+ this._doc.TempSetting = (icb.ID == 0UL);
+ result = true;
+ }
+ return result;
+ }
+
+ private bool OnSettingOkBtnClick(IXUIButton btn)
+ {
+ RpcC2G_ChangeLiveVisible rpcC2G_ChangeLiveVisible = new RpcC2G_ChangeLiveVisible();
+ rpcC2G_ChangeLiveVisible.oArg.visible = this._doc.TempSetting;
+ XSingleton<XClientNetwork>.singleton.Send(rpcC2G_ChangeLiveVisible);
+ this.OnSettingCloseBtnClick(null);
+ return true;
+ }
+
+ public void SetVisibleSettingTextState()
+ {
+ base.uiBehaviour.m_VisText.SetActive(this._doc.VisibleSetting);
+ base.uiBehaviour.m_UnVisText.SetActive(!this._doc.VisibleSetting);
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/SpectateView.cs.meta b/Client/Assets/Scripts/XMainClient/UI/SpectateView.cs.meta
new file mode 100644
index 00000000..af64df85
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/SpectateView.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 64324c1b997cb5f44a15352612d88017
+timeCreated: 1611403847
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/SpriteEggLotteryType.cs b/Client/Assets/Scripts/XMainClient/UI/SpriteEggLotteryType.cs
new file mode 100644
index 00000000..9b0c73bb
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/SpriteEggLotteryType.cs
@@ -0,0 +1,12 @@
+using System;
+
+namespace XMainClient.UI
+{
+ public enum SpriteEggLotteryType
+ {
+ None,
+ Normal,
+ Special,
+ Max
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/SpriteEggLotteryType.cs.meta b/Client/Assets/Scripts/XMainClient/UI/SpriteEggLotteryType.cs.meta
new file mode 100644
index 00000000..c8a82b6c
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/SpriteEggLotteryType.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 20ba8b28e3af30b4fb80186d455b1b59
+timeCreated: 1611403408
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/SpriteFightFrame.cs b/Client/Assets/Scripts/XMainClient/UI/SpriteFightFrame.cs
new file mode 100644
index 00000000..529b38db
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/SpriteFightFrame.cs
@@ -0,0 +1,218 @@
+using System;
+using System.Collections.Generic;
+using UILib;
+using UnityEngine;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class SpriteFightFrame : DlgHandlerBase
+ {
+ protected override string FileName
+ {
+ get
+ {
+ return "GameSystem/SpriteSystem/SpriteFightFrame";
+ }
+ }
+
+ private XSpriteSystemDocument _doc;
+
+ public SpriteSelectHandler _SpriteSelectHandler;
+
+ public XSpriteAvatarHandler[] _SpriteAvatarHandler = new XSpriteAvatarHandler[4];
+
+ private IXUISprite[] _IXUISpriteList = new IXUISprite[4];
+
+ private IXUILabel m_Tips;
+
+ private List<IXUISprite> m_SetLeaderBtnList = new List<IXUISprite>();
+
+ protected override void Init()
+ {
+ base.Init();
+ this._doc = XDocuments.GetSpecificDocument<XSpriteSystemDocument>(XSpriteSystemDocument.uuID);
+ this.RefreshPosition();
+ this.m_Tips = (base.PanelObject.transform.Find("Tips").GetComponent("XUILabel") as IXUILabel);
+ for (int i = 0; i < 3; i++)
+ {
+ IXUISprite ixuisprite = base.PanelObject.transform.Find(string.Format("Avatar{0}/Open/CBtn", i + 1)).GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.ID = (ulong)((long)(i + 1));
+ ixuisprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnSwapTeamLeaderClick));
+ this.m_SetLeaderBtnList.Add(ixuisprite);
+ }
+ DlgHandlerBase.EnsureCreate<SpriteSelectHandler>(ref this._SpriteSelectHandler, base.PanelObject.transform.Find("SelectHandlerParent"), false, this);
+ }
+
+ public void RefreshPosition()
+ {
+ for (int i = 0; i < 4; i++)
+ {
+ bool flag = (long)i < (long)((ulong)this._doc.MaxFightNum);
+ GameObject gameObject = base.PanelObject.transform.Find(string.Format("Avatar{0}/Open", i)).gameObject;
+ GameObject gameObject2 = base.PanelObject.transform.Find(string.Format("Avatar{0}/UnOpen", i)).gameObject;
+ gameObject.SetActive(flag);
+ gameObject2.SetActive(!flag);
+ bool flag2 = flag;
+ if (flag2)
+ {
+ DlgHandlerBase.EnsureCreate<XSpriteAvatarHandler>(ref this._SpriteAvatarHandler[i], gameObject.transform.Find("AvatarHandlerParent"), true, this);
+ this._IXUISpriteList[i] = (gameObject.GetComponent("XUISprite") as IXUISprite);
+ }
+ else
+ {
+ IXUILabel ixuilabel = gameObject2.transform.Find("Text").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel.SetText(string.Format(XStringDefineProxy.GetString("LEVEL_REQUIRE_LEVEL"), this._doc.PositionLevelCondition[i]));
+ }
+ }
+ }
+
+ public override void OnUnload()
+ {
+ DlgHandlerBase.EnsureUnload<SpriteSelectHandler>(ref this._SpriteSelectHandler);
+ base.OnUnload();
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ this._SpriteSelectHandler.SetVisible(true);
+ this.SetSpriteAvatarHandlerVisible(true);
+ this.RefreshFightList();
+ }
+
+ protected override void OnHide()
+ {
+ this._SpriteSelectHandler.SetVisible(false);
+ this.SetSpriteAvatarHandlerVisible(false);
+ base.OnHide();
+ }
+
+ private void SetSpriteAvatarHandlerVisible(bool visible)
+ {
+ for (int i = 0; i < this._SpriteAvatarHandler.Length; i++)
+ {
+ bool flag = this._SpriteAvatarHandler[i] != null;
+ if (flag)
+ {
+ this._SpriteAvatarHandler[i].SetVisible(visible);
+ }
+ }
+ }
+
+ public void RefreshFightList()
+ {
+ bool flag = this._doc.FightingList[0] == 0UL;
+ if (flag)
+ {
+ this.m_Tips.SetText(XStringDefineProxy.GetString("SpriteSkill_NoneCaptainTips"));
+ }
+ else
+ {
+ int indexByUid = this._doc.GetIndexByUid(this._doc.FightingList[0]);
+ bool flag2 = indexByUid == -1;
+ if (flag2)
+ {
+ this._doc.FightingList[0] = 0UL;
+ this.m_Tips.SetText(XStringDefineProxy.GetString("SpriteSkill_NoneCaptainTips"));
+ }
+ else
+ {
+ SpriteTable.RowData bySpriteID = this._doc._SpriteTable.GetBySpriteID(this._doc.SpriteList[indexByUid].SpriteID);
+ SpriteSkill.RowData spriteSkillData = this._doc.GetSpriteSkillData((short)bySpriteID.SpriteSkillID, true, this._doc.SpriteList[indexByUid].EvolutionLevel);
+ this.m_Tips.SetText(spriteSkillData.Tips);
+ }
+ }
+ int num = 0;
+ while ((long)num < (long)((ulong)this._doc.MaxFightNum))
+ {
+ bool flag3 = num != 0;
+ if (flag3)
+ {
+ this.m_SetLeaderBtnList[num - 1].SetVisible(this._doc.FightingList[num] > 0UL);
+ }
+ bool flag4 = this._doc.FightingList[num] == 0UL;
+ if (flag4)
+ {
+ this._IXUISpriteList[num].RegisterSpriteClickEventHandler(null);
+ this._SpriteAvatarHandler[num].HideAvatar();
+ }
+ else
+ {
+ this._IXUISpriteList[num].ID = (ulong)((long)num);
+ this._IXUISpriteList[num].RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnRightListClick));
+ int indexByUid2 = this._doc.GetIndexByUid(this._doc.FightingList[num]);
+ bool flag5 = indexByUid2 == -1;
+ if (flag5)
+ {
+ this._doc.FightingList[num] = 0UL;
+ this._IXUISpriteList[num].RegisterSpriteClickEventHandler(null);
+ this._SpriteAvatarHandler[num].HideAvatar();
+ }
+ else
+ {
+ this._SpriteAvatarHandler[num].SetSpriteInfoByIndex(indexByUid2, num, false, true);
+ }
+ }
+ num++;
+ }
+ }
+
+ public void SetAvatar()
+ {
+ bool flag = this._doc.MaxFightNum == 0u;
+ if (!flag)
+ {
+ bool flag2 = this._doc.FightingList[0] == 0UL;
+ if (!flag2)
+ {
+ int indexByUid = this._doc.GetIndexByUid(this._doc.FightingList[0]);
+ bool flag3 = indexByUid == -1;
+ if (!flag3)
+ {
+ this._SpriteAvatarHandler[0].SetSpriteInfoByIndex(indexByUid, 0, false, true);
+ }
+ }
+ }
+ }
+
+ public override void StackRefresh()
+ {
+ base.StackRefresh();
+ bool flag = base.IsVisible();
+ if (flag)
+ {
+ this.SetAvatar();
+ }
+ }
+
+ public void OnRightListClick(IXUISprite iSp)
+ {
+ this._doc.QueryFightOut(this._doc.FightingList[(int)iSp.ID]);
+ }
+
+ public void OnLeftListClick(IXUISprite iSp)
+ {
+ ulong uid = this._doc.SpriteList[(int)iSp.ID].uid;
+ bool flag = this._doc.isSpriteFight(uid);
+ if (flag)
+ {
+ this._doc.QueryFightOut(uid);
+ }
+ else
+ {
+ this._doc.QueryFightIn(uid);
+ }
+ }
+
+ private void OnSwapTeamLeaderClick(IXUISprite iSp)
+ {
+ int index = (int)iSp.ID;
+ bool flag = this._doc.FightingList[index] > 0UL;
+ if (flag)
+ {
+ this._doc.QuerySwapTeamLeader(this._doc.FightingList[index]);
+ }
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/SpriteFightFrame.cs.meta b/Client/Assets/Scripts/XMainClient/UI/SpriteFightFrame.cs.meta
new file mode 100644
index 00000000..a556c2fa
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/SpriteFightFrame.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: b0cdcbe9596394241b39450b8c4dc41b
+timeCreated: 1611404353
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/SpriteLotteryHandler.cs b/Client/Assets/Scripts/XMainClient/UI/SpriteLotteryHandler.cs
new file mode 100644
index 00000000..16e145d6
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/SpriteLotteryHandler.cs
@@ -0,0 +1,374 @@
+using System;
+using System.Collections.Generic;
+using KKSG;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class SpriteLotteryHandler : DlgHandlerBase
+ {
+ protected override string FileName
+ {
+ get
+ {
+ return "GameSystem/SpriteSystem/SpriteLotteryHandler";
+ }
+ }
+
+ private XSpriteSystemDocument _doc = null;
+
+ private IXUIButton m_NormalLotteryOnce;
+
+ private IXUIButton m_NormalLotteryTen;
+
+ private IXUILabelSymbol m_NormalLotteryOncePrice;
+
+ private IXUILabelSymbol m_NormalLotteryTenPrice;
+
+ private IXUIButton m_NormalLotteryDrop;
+
+ private IXUIButton m_SpecialLotteryOnce;
+
+ private IXUIButton m_SpecialLotteryTen;
+
+ private IXUILabelSymbol m_SpecialLotteryOncePrice;
+
+ private IXUILabelSymbol m_SpecialLotteryTenPrice;
+
+ private IXUIButton m_SpecialLotteryDrop;
+
+ private Transform m_NormalLottery;
+
+ private Transform m_SpecialLottery;
+
+ private Transform m_ResultFrame;
+
+ private IXUILabelSymbol m_SafeCountTip;
+
+ private Vector3 m_LotteryOnePos;
+
+ private Vector3 m_LotteryTenPos;
+
+ private XUIPool m_ResultPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ private IXUIButton m_OkButton;
+
+ private GameObject m_Block;
+
+ private IXUITweenTool m_OkButtonTween;
+
+ private int _maxColdDrawCount;
+
+ private List<XFx> m_FxList = new List<XFx>();
+
+ private List<GameObject> m_ResultList = new List<GameObject>();
+
+ protected override void Init()
+ {
+ base.Init();
+ this._doc = XDocuments.GetSpecificDocument<XSpriteSystemDocument>(XSpriteSystemDocument.uuID);
+ this._maxColdDrawCount = XSingleton<XGlobalConfig>.singleton.GetInt("GoldDrawFreeDayCount");
+ this.InitUI();
+ }
+
+ private void InitUI()
+ {
+ this.m_NormalLotteryOnce = (base.PanelObject.transform.Find("Bg/NormalLottery/Button/Once").GetComponent("XUIButton") as IXUIButton);
+ this.m_NormalLotteryTen = (base.PanelObject.transform.Find("Bg/NormalLottery/Button/Ten").GetComponent("XUIButton") as IXUIButton);
+ this.m_NormalLotteryOncePrice = (base.PanelObject.transform.Find("Bg/NormalLottery/Button/Once/Price").GetComponent("XUILabelSymbol") as IXUILabelSymbol);
+ this.m_NormalLotteryTenPrice = (base.PanelObject.transform.Find("Bg/NormalLottery/Button/Ten/Price").GetComponent("XUILabelSymbol") as IXUILabelSymbol);
+ this.m_NormalLotteryDrop = (base.PanelObject.transform.Find("Bg/NormalLottery/Detail/Drop").GetComponent("XUIButton") as IXUIButton);
+ this.m_SpecialLotteryOnce = (base.PanelObject.transform.Find("Bg/SpecialLottery/Button/Once").GetComponent("XUIButton") as IXUIButton);
+ this.m_SpecialLotteryTen = (base.PanelObject.transform.Find("Bg/SpecialLottery/Button/Ten").GetComponent("XUIButton") as IXUIButton);
+ this.m_SpecialLotteryOncePrice = (base.PanelObject.transform.Find("Bg/SpecialLottery/Button/Once/Price").GetComponent("XUILabelSymbol") as IXUILabelSymbol);
+ this.m_SpecialLotteryTenPrice = (base.PanelObject.transform.Find("Bg/SpecialLottery/Button/Ten/Price").GetComponent("XUILabelSymbol") as IXUILabelSymbol);
+ this.m_SpecialLotteryDrop = (base.PanelObject.transform.Find("Bg/SpecialLottery/Detail/Drop").GetComponent("XUIButton") as IXUIButton);
+ this.m_NormalLotteryOnce.ID = (ulong)((long)XFastEnumIntEqualityComparer<LotteryType>.ToInt(LotteryType.Sprite_GoldDraw_One));
+ this.m_NormalLotteryTen.ID = (ulong)((long)XFastEnumIntEqualityComparer<LotteryType>.ToInt(LotteryType.Sprite_GoldDraw_Ten));
+ this.m_SpecialLotteryOnce.ID = (ulong)((long)XFastEnumIntEqualityComparer<LotteryType>.ToInt(LotteryType.Sprite_Draw_One));
+ this.m_SpecialLotteryTen.ID = (ulong)((long)XFastEnumIntEqualityComparer<LotteryType>.ToInt(LotteryType.Sprite_Draw_Ten));
+ this.m_SafeCountTip = (base.PanelObject.transform.Find("Bg/SpecialLottery/Tip").GetComponent("XUILabelSymbol") as IXUILabelSymbol);
+ string[] array = XSingleton<XGlobalConfig>.singleton.GetValue("SpriteGoldDrawCost").Split(XGlobalConfig.SequenceSeparator);
+ string[] array2 = XSingleton<XGlobalConfig>.singleton.GetValue("SpriteGoldTenDrawCost").Split(XGlobalConfig.SequenceSeparator);
+ string[] array3 = XSingleton<XGlobalConfig>.singleton.GetValue("SpriteDrawCost").Split(XGlobalConfig.SequenceSeparator);
+ string[] array4 = XSingleton<XGlobalConfig>.singleton.GetValue("SpriteTenDrawCost").Split(XGlobalConfig.SequenceSeparator);
+ bool flag = array.Length == 2 && array2.Length == 2;
+ if (flag)
+ {
+ this.m_NormalLotteryOncePrice.InputText = XLabelSymbolHelper.FormatCostWithIcon(int.Parse(array[1]), (ItemEnum)int.Parse(array[0]));
+ this.m_NormalLotteryTenPrice.InputText = XLabelSymbolHelper.FormatCostWithIcon(int.Parse(array2[1]), (ItemEnum)int.Parse(array2[0]));
+ }
+ bool flag2 = array3.Length == 2 && array4.Length == 2;
+ if (flag2)
+ {
+ this.m_SpecialLotteryOncePrice.InputText = XLabelSymbolHelper.FormatCostWithIcon(int.Parse(array3[1]), (ItemEnum)int.Parse(array3[0]));
+ this.m_SpecialLotteryTenPrice.InputText = XLabelSymbolHelper.FormatCostWithIcon(int.Parse(array4[1]), (ItemEnum)int.Parse(array4[0]));
+ }
+ this.m_NormalLottery = base.PanelObject.transform.Find("Bg/NormalLottery");
+ this.m_SpecialLottery = base.PanelObject.transform.Find("Bg/SpecialLottery");
+ this.m_ResultFrame = base.PanelObject.transform.Find("Bg/ResultFrame");
+ this.m_LotteryOnePos = base.PanelObject.transform.Find("Bg/ResultFrame/OnePos").localPosition;
+ this.m_LotteryTenPos = base.PanelObject.transform.Find("Bg/ResultFrame/TenPos").localPosition;
+ Transform transform = base.PanelObject.transform.Find("Bg/ResultFrame/ResultTpl");
+ this.m_ResultPool.SetupPool(transform.parent.gameObject, transform.gameObject, 10u, false);
+ this.m_OkButton = (base.PanelObject.transform.Find("Bg/ResultFrame/OkButton").GetComponent("XUIButton") as IXUIButton);
+ this.m_Block = base.PanelObject.transform.Find("Bg/ResultFrame/Block").gameObject;
+ this.m_OkButtonTween = (base.PanelObject.transform.Find("Bg/ResultFrame/OkButton").GetComponent("XUIPlayTween") as IXUITweenTool);
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ this.m_NormalLotteryOnce.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnLotteryClicked));
+ this.m_NormalLotteryTen.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnLotteryClicked));
+ this.m_NormalLotteryDrop.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnNormalLotteryDropClicked));
+ this.m_SpecialLotteryOnce.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnLotteryClicked));
+ this.m_SpecialLotteryTen.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnLotteryClicked));
+ this.m_SpecialLotteryDrop.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnSpecialLotteryDropClicked));
+ this.m_OkButton.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnOkButtonClicked));
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ this._doc.QueryBuyEggCD();
+ this.ShowLotteryFrame();
+ }
+
+ protected override void OnHide()
+ {
+ this.ClearAllFx();
+ this.m_ResultList.Clear();
+ base.OnHide();
+ }
+
+ public override void OnUnload()
+ {
+ this.ClearAllFx();
+ base.OnUnload();
+ }
+
+ public override void StackRefresh()
+ {
+ base.StackRefresh();
+ this.RefreshSpriteFx();
+ }
+
+ private bool OnLotteryClicked(IXUIButton button)
+ {
+ this._doc.SendLotteryRpc((uint)button.ID);
+ return true;
+ }
+
+ private bool OnNormalLotteryDropClicked(IXUIButton button)
+ {
+ DlgBase<SpriteSystemDlg, TabDlgBehaviour>.singleton.OpenWindows(SpriteWindow.Illustration);
+ DlgBase<SpriteSystemDlg, TabDlgBehaviour>.singleton._IllustrationHandler.ShowSpriteEggIllustration(SpriteEggLotteryType.Normal);
+ return true;
+ }
+
+ private bool OnSpecialLotteryDropClicked(IXUIButton button)
+ {
+ DlgBase<SpriteSystemDlg, TabDlgBehaviour>.singleton.OpenWindows(SpriteWindow.Illustration);
+ DlgBase<SpriteSystemDlg, TabDlgBehaviour>.singleton._IllustrationHandler.ShowSpriteEggIllustration(SpriteEggLotteryType.Special);
+ return true;
+ }
+
+ public void RefreshSafeCountUI()
+ {
+ this.m_SafeCountTip.InputText = XStringDefineProxy.GetString("SpriteLotterySafeTip", new object[]
+ {
+ this._doc.SpecialSafeCount
+ });
+ }
+
+ public bool OnOkButtonClicked(IXUIButton button)
+ {
+ bool flag = false;
+ for (int i = 0; i < this._doc.ResultShowList.Count; i++)
+ {
+ flag |= this._doc.ResultShowList[i];
+ }
+ bool flag2 = !flag;
+ if (flag2)
+ {
+ bool flag3 = button != null;
+ if (flag3)
+ {
+ this.ShowLotteryFrame();
+ }
+ else
+ {
+ DlgBase<XSpriteShowView, XSpriteShowBehaviour>.singleton.SetVisible(false, true);
+ }
+ }
+ else
+ {
+ this._doc.AutoShowEpicSprite = true;
+ for (int j = 0; j < this.m_ResultList.Count; j++)
+ {
+ IXUISprite ixuisprite = this.m_ResultList[j].transform.Find("SpecialResult").GetComponent("XUISprite") as IXUISprite;
+ bool flag4 = this._doc.ResultShowList[(int)ixuisprite.ID];
+ if (flag4)
+ {
+ this.OnEpicItemClicked(ixuisprite);
+ break;
+ }
+ }
+ }
+ return true;
+ }
+
+ private void ShowLotteryFrame()
+ {
+ this.m_NormalLottery.gameObject.SetActive(true);
+ this.m_SpecialLottery.gameObject.SetActive(true);
+ this.m_ResultFrame.gameObject.SetActive(false);
+ this.ClearAllFx();
+ }
+
+ public void ShowResultFrame()
+ {
+ this.m_NormalLottery.gameObject.SetActive(false);
+ this.m_SpecialLottery.gameObject.SetActive(false);
+ this.m_ResultFrame.gameObject.SetActive(true);
+ this.RefreshResultFrame();
+ }
+
+ private void RefreshResultFrame()
+ {
+ this._doc.AutoShowEpicSprite = false;
+ this.m_Block.SetActive(true);
+ this.m_ResultPool.ReturnAll(false);
+ this.m_ResultList.Clear();
+ for (int i = 0; i < this._doc.CachedLotteryResult.Count; i++)
+ {
+ XSingleton<XTimerMgr>.singleton.SetTimer((float)i * 0.3f, new XTimerMgr.ElapsedEventHandler(this.SetupItem), i);
+ }
+ this.m_OkButton.SetAlpha(0f);
+ XSingleton<XTimerMgr>.singleton.SetTimer((float)this._doc.CachedLotteryResult.Count * 0.3f + 0.3f, new XTimerMgr.ElapsedEventHandler(this.ShowOkButton), null);
+ }
+
+ private void ShowOkButton(object o)
+ {
+ bool flag = !base.IsVisible();
+ if (!flag)
+ {
+ this.m_Block.SetActive(false);
+ this.m_OkButtonTween.ResetTween(true);
+ this.m_OkButtonTween.PlayTween(true, -1f);
+ }
+ }
+
+ private void ClearAllFx()
+ {
+ for (int i = 0; i < this.m_FxList.Count; i++)
+ {
+ this._doc.DestroyFx(this.m_FxList[i]);
+ }
+ this.m_FxList.Clear();
+ }
+
+ private void SetupItem(object o)
+ {
+ bool flag = !base.IsVisible();
+ if (!flag)
+ {
+ int num = (int)o;
+ Vector3 vector = (this._doc.CachedLotteryResult.Count == 1) ? this.m_LotteryOnePos : this.m_LotteryTenPos;
+ GameObject gameObject = this.m_ResultPool.FetchGameObject(false);
+ this.m_ResultList.Add(gameObject);
+ IXUITweenTool ixuitweenTool = gameObject.GetComponent("XUIPlayTween") as IXUITweenTool;
+ GameObject gameObject2 = gameObject.transform.Find("ItemTpl").gameObject;
+ IXUISprite ixuisprite = gameObject2.transform.Find("Icon").GetComponent("XUISprite") as IXUISprite;
+ IXUISprite ixuisprite2 = gameObject.transform.Find("SpecialResult").GetComponent("XUISprite") as IXUISprite;
+ XSingleton<XItemDrawerMgr>.singleton.normalItemDrawer.DrawItem(gameObject2, (int)this._doc.CachedLotteryResult[num].itemID, (int)this._doc.CachedLotteryResult[num].itemCount, false);
+ Transform parent = gameObject.transform.Find("Fx");
+ LotteryType currentLotteryType = (LotteryType)this._doc.CurrentLotteryType;
+ if (currentLotteryType - LotteryType.Sprite_Draw_One > 2)
+ {
+ if (currentLotteryType - LotteryType.Sprite_GoldDraw_One <= 2)
+ {
+ ixuisprite2.SetSprite("Fairy_EggNormal");
+ }
+ }
+ else
+ {
+ ixuisprite2.SetSprite("Fairy_EggGold");
+ }
+ ixuisprite.ID = (ulong)this._doc.CachedLotteryResult[num].itemID;
+ bool isbind = this._doc.CachedLotteryResult[num].isbind;
+ if (isbind)
+ {
+ ixuisprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(XSingleton<UiUtility>.singleton.OnBindItemClick));
+ }
+ else
+ {
+ ixuisprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(XSingleton<UiUtility>.singleton.OnItemClick));
+ }
+ ixuisprite2.ID = (ulong)num;
+ ixuisprite2.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnEpicItemClicked));
+ ItemList.RowData itemConf = XBagDocument.GetItemConf((int)this._doc.CachedLotteryResult[num].itemID);
+ ixuisprite2.SetVisible(this._doc.ResultShowList[num]);
+ gameObject2.SetActive(!this._doc.ResultShowList[num]);
+ bool flag2 = this._doc.ResultShowList[num];
+ if (flag2)
+ {
+ switch (itemConf.ItemQuality)
+ {
+ case 3:
+ this.m_FxList.Add(this._doc.CreateAndPlayFx("Effects/FX_Particle/UIfx/UI_jl_04_orange", parent));
+ break;
+ case 4:
+ this.m_FxList.Add(this._doc.CreateAndPlayFx("Effects/FX_Particle/UIfx/UI_jl_04_purple", parent));
+ break;
+ case 5:
+ this.m_FxList.Add(this._doc.CreateAndPlayFx("Effects/FX_Particle/UIfx/UI_jl_04_red", parent));
+ break;
+ }
+ }
+ gameObject.transform.localPosition = new Vector3(vector.x + (float)(num % 5 * this.m_ResultPool.TplWidth), vector.y - (float)(num / 5 * this.m_ResultPool.TplHeight));
+ ixuitweenTool.ResetTween(true);
+ ixuitweenTool.PlayTween(true, -1f);
+ XSingleton<XAudioMgr>.singleton.PlayUISound("Audio/UI/UI_Appear_NormalLoot", true, AudioChannel.Action);
+ }
+ }
+
+ public void RefreshSpriteFx()
+ {
+ for (int i = 0; i < this.m_FxList.Count; i++)
+ {
+ bool flag = this.m_FxList[i] != null;
+ if (flag)
+ {
+ this.m_FxList[i].Play();
+ }
+ }
+ }
+
+ private void OnEpicItemClicked(IXUISprite sp)
+ {
+ bool flag = (int)sp.ID >= this._doc.CachedLotteryResult.Count;
+ if (!flag)
+ {
+ XSingleton<XTimerMgr>.singleton.SetTimer(0.1f, new XTimerMgr.ElapsedEventHandler(this.ShowEpicItem), sp);
+ this._doc.EpicSpriteShow((int)sp.ID);
+ }
+ }
+
+ private void ShowEpicItem(object o)
+ {
+ IXUISprite ixuisprite = o as IXUISprite;
+ bool flag = ixuisprite != null;
+ if (flag)
+ {
+ GameObject gameObject = ixuisprite.parent.gameObject.transform.Find("ItemTpl").gameObject;
+ gameObject.SetActive(true);
+ ixuisprite.SetVisible(false);
+ }
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/SpriteLotteryHandler.cs.meta b/Client/Assets/Scripts/XMainClient/UI/SpriteLotteryHandler.cs.meta
new file mode 100644
index 00000000..8dabcdbf
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/SpriteLotteryHandler.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: dd6136b73bc03bb4e99510f6fc607a45
+timeCreated: 1611404682
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/SpriteMainFrame.cs b/Client/Assets/Scripts/XMainClient/UI/SpriteMainFrame.cs
new file mode 100644
index 00000000..2e67d90d
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/SpriteMainFrame.cs
@@ -0,0 +1,455 @@
+using System;
+using System.Collections.Generic;
+using KKSG;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class SpriteMainFrame : DlgHandlerBase
+ {
+ protected override string FileName
+ {
+ get
+ {
+ return "GameSystem/SpriteSystem/SpriteMainFrame";
+ }
+ }
+
+ private XSpriteSystemDocument _doc;
+
+ public IXUISprite m_StarUpBtn;
+
+ private IXUISprite m_AwakeBtn;
+
+ private GameObject m_FeedGo;
+
+ private GameObject m_FoodList;
+
+ private IXUIProgress m_Exp;
+
+ private IXUILabel m_ExpNum;
+
+ private IXUILabel m_Level;
+
+ private Transform m_EffectParent;
+
+ private GameObject m_FeedBtnRedPoint;
+
+ private XUIPool m_FoodPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ public SpriteSelectHandler _SpriteSelectHandler;
+
+ public XSpriteAvatarHandler _SpriteAvatarHandler;
+
+ public XSpriteAttributeHandler _SpritePropertyHandler;
+
+ public int CurrentClick = 10000;
+
+ public IXUISprite m_CurrentClickSprite;
+
+ private float _lastEffectTime = 0f;
+
+ private float[] _lastFeedTime = new float[3];
+
+ private float[] _lastClickTime = new float[3];
+
+ private bool[] _feedState = new bool[3];
+
+ private IXUILabel[] m_FoodNum;
+
+ private float _feedInterval;
+
+ private float _feedStart;
+
+ public bool AnimEnd = true;
+
+ private int _animLevelTarget;
+
+ private int _animCurrLevel;
+
+ private float _AnimExpTarget;
+
+ private float _animSpeed = 0.1f;
+
+ private XFx _fxFirework;
+
+ protected override void Init()
+ {
+ base.Init();
+ this._doc = XDocuments.GetSpecificDocument<XSpriteSystemDocument>(XSpriteSystemDocument.uuID);
+ this._feedInterval = float.Parse(XSingleton<XGlobalConfig>.singleton.GetValue("SpriteFeedIntervalTime"));
+ this._feedStart = float.Parse(XSingleton<XGlobalConfig>.singleton.GetValue("SpriteFeedStartTime"));
+ this.m_AwakeBtn = (base.PanelObject.transform.Find("Other/AwakeBtn").GetComponent("XUISprite") as IXUISprite);
+ this.m_StarUpBtn = (base.PanelObject.transform.Find("Other/StarUpBtn").GetComponent("XUISprite") as IXUISprite);
+ this.m_FeedGo = base.PanelObject.transform.Find("Other/FeedBtn").gameObject;
+ this.m_FeedBtnRedPoint = this.m_FeedGo.transform.Find("RedPoint").gameObject;
+ this.m_FoodList = base.PanelObject.transform.Find("Other/FoodList").gameObject;
+ this.m_Exp = (base.PanelObject.transform.Find("Other/Exp/ProgressBar").GetComponent("XUIProgress") as IXUIProgress);
+ this.m_ExpNum = (base.PanelObject.transform.Find("Other/Exp/Progress").GetComponent("XUILabel") as IXUILabel);
+ this.m_Level = (base.PanelObject.transform.Find("Other/Level").GetComponent("XUILabel") as IXUILabel);
+ this.m_EffectParent = base.PanelObject.transform.Find("Other/FeedEffect");
+ Transform transform = base.PanelObject.transform.Find("Other/FoodList/ItemTpl");
+ this.m_FoodPool.SetupPool(transform.parent.gameObject, transform.gameObject, 3u, false);
+ IXUICheckBox ixuicheckBox = this.m_FeedGo.GetComponent("XUICheckBox") as IXUICheckBox;
+ ixuicheckBox.RegisterOnCheckEventHandler(new CheckBoxOnCheckEventHandler(this.OnFeedBtnClick));
+ Vector3 tplPos = this.m_FoodPool.TplPos;
+ this.m_FoodNum = new IXUILabel[(int)this._doc.FoodList.Count];
+ for (int i = 0; i < (int)this._doc.FoodList.Count; i++)
+ {
+ GameObject gameObject = this.m_FoodPool.FetchGameObject(false);
+ gameObject.transform.localPosition = new Vector3(tplPos.x, tplPos.y + (float)(((int)this._doc.FoodList.Count - i - 1) * this.m_FoodPool.TplHeight));
+ IXUISprite ixuisprite = gameObject.GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.ID = (ulong)((long)i);
+ ixuisprite.RegisterSpritePressEventHandler(new SpritePressEventHandler(this.OnFoodBtnPress));
+ XSingleton<XItemDrawerMgr>.singleton.normalItemDrawer.DrawItem(gameObject, this._doc.FoodList[i, 0], 2, false);
+ this.m_FoodNum[i] = (ixuisprite.gameObject.transform.Find("Num").GetComponent("XUILabel") as IXUILabel);
+ }
+ DlgHandlerBase.EnsureCreate<XSpriteAttributeHandler>(ref this._SpritePropertyHandler, base.PanelObject.transform.Find("PropertyHandlerParent"), true, this);
+ DlgHandlerBase.EnsureCreate<XSpriteAvatarHandler>(ref this._SpriteAvatarHandler, base.PanelObject.transform.Find("AvatarHandlerParent"), true, this);
+ DlgHandlerBase.EnsureCreate<SpriteSelectHandler>(ref this._SpriteSelectHandler, base.PanelObject.transform.Find("SelectHandlerParent"), false, this);
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ this._SpriteAvatarHandler.SetVisible(true);
+ this._SpriteAvatarHandler.HideAvatar();
+ this.m_Exp.value = 0f;
+ this.m_ExpNum.SetText("0/0");
+ this.m_Level.SetText("Lv.0");
+ this.CurrentClick = 10000;
+ this._SpriteSelectHandler.SetVisible(true);
+ this._SpritePropertyHandler.SetSpriteAttributeInfo((this.CurrentClick < this._doc.SpriteList.Count) ? this._doc.SpriteList[this.CurrentClick] : null, XSingleton<XAttributeMgr>.singleton.XPlayerData, null);
+ XWelfareDocument specificDocument = XDocuments.GetSpecificDocument<XWelfareDocument>(XWelfareDocument.uuID);
+ this.RefreshFoodNum();
+ this.RefreshAwakeBtn();
+ }
+
+ private void CheckLastAwakeFinished()
+ {
+ bool flag = this._doc._AwakeSpriteData != null;
+ if (flag)
+ {
+ for (int i = 0; i < this._doc.SpriteList.Count; i++)
+ {
+ bool flag2 = this._doc.SpriteList[i].uid == this._doc._AwakeSpriteData.uid;
+ if (flag2)
+ {
+ DlgBase<SpriteSystemDlg, TabDlgBehaviour>.singleton.OpenWindows(SpriteWindow.Awake);
+ DlgBase<SpriteSystemDlg, TabDlgBehaviour>.singleton._AwakeWindow.SetSpritesInfo(this._doc.SpriteList[i], this._doc._AwakeSpriteData);
+ this._doc._AwakeSpriteData = null;
+ break;
+ }
+ }
+ }
+ }
+
+ protected override void OnHide()
+ {
+ base.OnHide();
+ this._SpriteSelectHandler.SetVisible(false);
+ this._SpriteAvatarHandler.SetVisible(false);
+ this.CurrentClick = 10000;
+ for (int i = 0; i < 3; i++)
+ {
+ this._feedState[i] = false;
+ }
+ bool flag = this._fxFirework != null;
+ if (flag)
+ {
+ XSingleton<XFxMgr>.singleton.DestroyFx(this._fxFirework, true);
+ this._fxFirework = null;
+ }
+ this.AnimEnd = true;
+ }
+
+ public override void OnUnload()
+ {
+ DlgHandlerBase.EnsureUnload<SpriteSelectHandler>(ref this._SpriteSelectHandler);
+ DlgHandlerBase.EnsureUnload<XSpriteAttributeHandler>(ref this._SpritePropertyHandler);
+ DlgHandlerBase.EnsureUnload<XSpriteAvatarHandler>(ref this._SpriteAvatarHandler);
+ bool flag = this._fxFirework != null;
+ if (flag)
+ {
+ XSingleton<XFxMgr>.singleton.DestroyFx(this._fxFirework, true);
+ this._fxFirework = null;
+ }
+ base.OnUnload();
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ this.m_StarUpBtn.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnStarUpBtnClick));
+ this.m_AwakeBtn.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnAwakeBtnClick));
+ }
+
+ private void LevelUp()
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString("SpriteLevelUpTips"), "fece00");
+ }
+
+ private void RefreshFoodNum()
+ {
+ for (int i = 0; i < (int)this._doc.FoodList.Count; i++)
+ {
+ this.m_FoodNum[i].SetText(XBagDocument.BagDoc.GetItemCount(this._doc.FoodList[i, 0]).ToString());
+ }
+ this.RefreshFeedBtnRedPoint();
+ }
+
+ private void RefreshFeedBtnRedPoint()
+ {
+ this.m_FeedBtnRedPoint.SetActive(!this._doc.isSpriteFoodEmpty() && this.CurrentClick != 10000 && this._doc.isSpriteFight(this._doc.SpriteList[this.CurrentClick].uid) && this._doc.isSpriteNeed2Feed(this._doc.SpriteList[this.CurrentClick].uid, false));
+ }
+
+ public void OnStarUpBtnClick(IXUISprite btn)
+ {
+ bool flag = this.CurrentClick == 10000;
+ if (!flag)
+ {
+ DlgBase<SpriteSystemDlg, TabDlgBehaviour>.singleton.OpenWindows(SpriteWindow.StarUp);
+ }
+ }
+
+ public bool OnFeedBtnClick(IXUICheckBox icb)
+ {
+ this.m_FoodList.SetActive(icb.bChecked);
+ return true;
+ }
+
+ public void RefreshAwakeBtn()
+ {
+ }
+
+ private bool AwakeItemEnough(ref uint consumeCount)
+ {
+ bool flag = this.CurrentClick > this._doc.SpriteList.Count;
+ bool result;
+ if (flag)
+ {
+ result = false;
+ }
+ else
+ {
+ ulong itemCount = XSingleton<XGame>.singleton.Doc.XBagDoc.GetItemCount(XSingleton<XGlobalConfig>.singleton.GetInt("SpriteAwakeItemID"));
+ uint spriteQuality = this._doc._SpriteTable.GetBySpriteID(this._doc.SpriteList[this.CurrentClick].SpriteID).SpriteQuality;
+ List<string> stringList = XSingleton<XGlobalConfig>.singleton.GetStringList("SpriteAwakeConsume");
+ bool flag2 = (ulong)spriteQuality >= (ulong)((long)stringList.Count);
+ if (flag2)
+ {
+ XSingleton<XDebug>.singleton.AddErrorLog("Sprite Quality Error", null, null, null, null, null);
+ result = false;
+ }
+ else
+ {
+ consumeCount = uint.Parse(stringList[(int)spriteQuality]);
+ bool flag3 = itemCount < (ulong)consumeCount;
+ result = !flag3;
+ }
+ }
+ return result;
+ }
+
+ public void OnAwakeBtnClick(IXUISprite btn)
+ {
+ bool flag = this.CurrentClick >= this._doc.SpriteList.Count;
+ if (!flag)
+ {
+ int @int = XSingleton<XGlobalConfig>.singleton.GetInt("SpriteAwakeMinLevel");
+ bool flag2 = (ulong)XSingleton<XAttributeMgr>.singleton.XPlayerData.Level < (ulong)((long)@int);
+ if (flag2)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(string.Format(XStringDefineProxy.GetString("SpriteAwakeLevelLimit"), @int), "fece00");
+ }
+ else
+ {
+ uint num = 0u;
+ bool flag3 = !this.AwakeItemEnough(ref num);
+ if (flag3)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString("SpriteAwake_Error", new object[]
+ {
+ num
+ }), "fece00");
+ XSingleton<UiUtility>.singleton.ShowItemAccess(XSingleton<XGlobalConfig>.singleton.GetInt("SpriteAwakeItemID"), null);
+ }
+ else
+ {
+ bool tempTip = DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.GetTempTip(XTempTipDefine.OD_SPRITE_AWAKE);
+ if (tempTip)
+ {
+ this._doc.ReqSpriteOperation(SpriteType.Sprite_Awake);
+ }
+ else
+ {
+ string mainLabel = string.Format("{0}\n{1}\n{2}", XStringDefineProxy.GetString("SpriteAwake_Title"), XStringDefineProxy.GetString("SpriteAwake_Tip"), XStringDefineProxy.GetString("SpriteAwake_Consume", new object[]
+ {
+ XLabelSymbolHelper.FormatSmallIcon(XSingleton<XGlobalConfig>.singleton.GetInt("SpriteAwakeItemID")),
+ num
+ }));
+ string @string = XStringDefineProxy.GetString("COMMON_OK");
+ string string2 = XStringDefineProxy.GetString("COMMON_CANCEL");
+ DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.SetVisible(true, true);
+ DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.SetSingleButtonMode(false);
+ DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.ShowNoTip(XTempTipDefine.OD_SPRITE_AWAKE);
+ DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.SetLabelsWithSymbols(mainLabel, @string, string2);
+ DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.SetModalCallback(new ButtonClickEventHandler(this.OnEnsureAwakeClick), null);
+ }
+ }
+ }
+ }
+ }
+
+ private bool OnEnsureAwakeClick(IXUIButton btn)
+ {
+ DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.SetVisible(false, true);
+ this._doc.ReqSpriteOperation(SpriteType.Sprite_Awake);
+ return true;
+ }
+
+ public void OnServerReturn(ulong uid)
+ {
+ bool flag = !base.IsVisible();
+ if (!flag)
+ {
+ SpriteInfo spriteInfo = this._doc.SpriteList[this.CurrentClick];
+ bool flag2 = uid != spriteInfo.uid;
+ if (!flag2)
+ {
+ this.AnimEnd = false;
+ this._animLevelTarget = (int)spriteInfo.Level;
+ uint spriteLevelUpExp = this._doc.GetSpriteLevelUpExp(this.CurrentClick);
+ this._AnimExpTarget = spriteInfo.Exp * 1f / spriteLevelUpExp;
+ this.RefreshFoodNum();
+ bool flag3 = this._doc.isSpriteFoodEmpty();
+ if (flag3)
+ {
+ this._SpriteSelectHandler.SetSpriteList(this._doc.SpriteList, false);
+ }
+ bool flag4 = Time.time - this._lastEffectTime > 3f;
+ if (flag4)
+ {
+ this._lastEffectTime = Time.time;
+ bool flag5 = this._fxFirework != null;
+ if (flag5)
+ {
+ XSingleton<XFxMgr>.singleton.DestroyFx(this._fxFirework, true);
+ }
+ this._fxFirework = XSingleton<XFxMgr>.singleton.CreateAndPlay("Effects/FX_Particle/UIfx/UI_jl_weiyang", this.m_EffectParent, Vector3.zero, Vector3.one, 1f, true, 2f, true);
+ }
+ }
+ }
+ }
+
+ public void SetAvatar()
+ {
+ this._SpriteAvatarHandler.SetSpriteInfoByIndex(this.CurrentClick, 0, false, false);
+ }
+
+ private void SetExp()
+ {
+ SpriteInfo spriteInfo = this._doc.SpriteList[this.CurrentClick];
+ uint spriteLevelUpExpByLevel = this._doc.GetSpriteLevelUpExpByLevel(this.CurrentClick, this._animCurrLevel);
+ float num = this.m_Exp.value + this._animSpeed;
+ bool flag = (this._animCurrLevel == this._animLevelTarget && num > this._AnimExpTarget) || this._animCurrLevel > this._animLevelTarget;
+ if (flag)
+ {
+ this.AnimEnd = true;
+ this._animCurrLevel = this._animLevelTarget;
+ num = this._AnimExpTarget;
+ this._SpriteSelectHandler.SetSpriteList(this._doc.SpriteList, false);
+ }
+ bool flag2 = num > 1f;
+ if (flag2)
+ {
+ num = 0f;
+ this._animCurrLevel++;
+ XSingleton<XDebug>.singleton.AddLog(string.Format("Sprite level up to {0}", this._animCurrLevel), null, null, null, null, null, XDebugColor.XDebug_None);
+ this.LevelUp();
+ }
+ this.m_Exp.value = num;
+ this.m_ExpNum.SetText(string.Format("{0}/{1}", spriteInfo.Exp, spriteLevelUpExpByLevel));
+ this.m_Level.SetText(string.Format("Lv.{0}", this._animCurrLevel));
+ }
+
+ public void OnSpriteListClick(IXUISprite iSp)
+ {
+ bool flag = this.m_CurrentClickSprite != null;
+ if (flag)
+ {
+ this.m_CurrentClickSprite.gameObject.transform.Find("Select").gameObject.SetActive(false);
+ }
+ bool flag2 = this.CurrentClick != (int)iSp.ID;
+ if (flag2)
+ {
+ this.AnimEnd = true;
+ }
+ this.CurrentClick = (int)iSp.ID;
+ this.m_CurrentClickSprite = iSp;
+ this.m_CurrentClickSprite.gameObject.transform.Find("Select").gameObject.SetActive(true);
+ SpriteInfo spriteInfo = this._doc.SpriteList[this.CurrentClick];
+ this.SetAvatar();
+ this.RefreshFeedBtnRedPoint();
+ this._SpritePropertyHandler.SetSpriteAttributeInfo(this._doc.SpriteList[this.CurrentClick], XSingleton<XAttributeMgr>.singleton.XPlayerData, null);
+ uint spriteLevelUpExp = this._doc.GetSpriteLevelUpExp(this.CurrentClick);
+ this.m_Exp.value = spriteInfo.Exp * 1f / spriteLevelUpExp;
+ this.m_ExpNum.SetText(string.Format("{0}/{1}", spriteInfo.Exp, spriteLevelUpExp));
+ this.m_Level.SetText(string.Format("Lv.{0}", spriteInfo.Level));
+ this._animCurrLevel = (int)spriteInfo.Level;
+ this.RefreshAwakeBtn();
+ }
+
+ private bool OnFoodBtnPress(IXUISprite iSp, bool state)
+ {
+ this._feedState[(int)iSp.ID] = state;
+ if (state)
+ {
+ this._lastClickTime[(int)iSp.ID] = Time.time;
+ bool flag = !this._doc.QueryFeedSprite(this.CurrentClick, (uint)this._doc.FoodList[(int)iSp.ID, 0]);
+ if (flag)
+ {
+ this._feedState[(int)iSp.ID] = false;
+ }
+ }
+ return true;
+ }
+
+ public override void StackRefresh()
+ {
+ base.StackRefresh();
+ this.RefreshFoodNum();
+ this.SetAvatar();
+ }
+
+ public override void OnUpdate()
+ {
+ base.OnUpdate();
+ for (int i = 0; i < 3; i++)
+ {
+ bool flag = this._feedState[i];
+ if (flag)
+ {
+ bool flag2 = Time.time - this._lastClickTime[i] > this._feedStart && Time.time - this._lastFeedTime[i] > this._feedInterval;
+ if (flag2)
+ {
+ this._lastFeedTime[i] = Time.time;
+ bool flag3 = !this._doc.QueryFeedSprite(this.CurrentClick, (uint)this._doc.FoodList[i, 0]);
+ if (flag3)
+ {
+ this._feedState[i] = false;
+ }
+ }
+ }
+ }
+ bool flag4 = !this.AnimEnd;
+ if (flag4)
+ {
+ this.SetExp();
+ }
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/SpriteMainFrame.cs.meta b/Client/Assets/Scripts/XMainClient/UI/SpriteMainFrame.cs.meta
new file mode 100644
index 00000000..43ddf2b1
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/SpriteMainFrame.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 92090fe87f42f164b942a43bc2f82685
+timeCreated: 1611404144
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/SpriteResolveFrame.cs b/Client/Assets/Scripts/XMainClient/UI/SpriteResolveFrame.cs
new file mode 100644
index 00000000..ae2b97a4
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/SpriteResolveFrame.cs
@@ -0,0 +1,297 @@
+using System;
+using System.Collections.Generic;
+using KKSG;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class SpriteResolveFrame : DlgHandlerBase
+ {
+ protected override string FileName
+ {
+ get
+ {
+ return "GameSystem/SpriteSystem/SpriteResolveFrame";
+ }
+ }
+
+ private XSpriteSystemDocument _doc;
+
+ public SpriteSelectHandler _SpriteSelectHandler;
+
+ public XUIPool m_SpritePool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ public IXUIScrollView m_ScrollView;
+
+ public IXUISprite m_ResolveBtn;
+
+ public GameObject m_ResolveTips;
+
+ public IXUILabel m_JustTips;
+
+ private HashSet<ulong> _resolveHash = new HashSet<ulong>();
+
+ public List<SpriteInfo> SelectList = new List<SpriteInfo>();
+
+ private uint _resolveMaxNum;
+
+ protected override void Init()
+ {
+ base.Init();
+ this._doc = XDocuments.GetSpecificDocument<XSpriteSystemDocument>(XSpriteSystemDocument.uuID);
+ this._resolveMaxNum = uint.Parse(XSingleton<XGlobalConfig>.singleton.GetValue("SpriteResolveMaxNum"));
+ Transform transform = base.PanelObject.transform.Find("ScrollView/Tpl");
+ this.m_ScrollView = (base.PanelObject.transform.Find("ScrollView").GetComponent("XUIScrollView") as IXUIScrollView);
+ this.m_SpritePool.SetupPool(transform.parent.gameObject, transform.gameObject, 12u, false);
+ this.m_ResolveBtn = (base.PanelObject.transform.Find("ResolveBtn").GetComponent("XUISprite") as IXUISprite);
+ this.m_ResolveTips = base.PanelObject.transform.Find("ResolveTips").gameObject;
+ this.m_JustTips = (base.PanelObject.transform.Find("info").GetComponent("XUILabel") as IXUILabel);
+ this.m_JustTips.SetText(XSingleton<UiUtility>.singleton.ReplaceReturn(XStringDefineProxy.GetString("SpriteResolveTips")));
+ DlgHandlerBase.EnsureCreate<SpriteSelectHandler>(ref this._SpriteSelectHandler, base.PanelObject.transform.Find("SelectHandlerParent"), false, this);
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ this._SpriteSelectHandler.SetVisible(true);
+ this.CheckSelectList();
+ }
+
+ protected override void OnHide()
+ {
+ base.OnHide();
+ this._SpriteSelectHandler.SetVisible(false);
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ this.m_ResolveBtn.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnResolveBtnClick));
+ }
+
+ public override void OnUnload()
+ {
+ DlgHandlerBase.EnsureUnload<SpriteSelectHandler>(ref this._SpriteSelectHandler);
+ base.OnUnload();
+ }
+
+ public void CheckSelectList()
+ {
+ this.SelectList.Clear();
+ for (int i = 0; i < this._doc.ResolveList.Count; i++)
+ {
+ bool flag = this._resolveHash.Contains(this._doc.ResolveList[i].uid);
+ if (flag)
+ {
+ bool flag2 = this._doc.isSpriteFight(this._doc.ResolveList[i].uid);
+ if (flag2)
+ {
+ this._resolveHash.Remove(this._doc.ResolveList[i].uid);
+ }
+ else
+ {
+ this.SelectList.Add(this._doc.ResolveList[i]);
+ }
+ }
+ }
+ for (int j = 0; j < this._doc.FightingList.Count; j++)
+ {
+ bool flag3 = this._resolveHash.Contains(this._doc.FightingList[j]);
+ if (flag3)
+ {
+ this._resolveHash.Remove(this._doc.FightingList[j]);
+ }
+ }
+ this.SetSpriteList(true);
+ }
+
+ public void SetSpriteList(bool resetScrollPos = true)
+ {
+ bool flag = !base.IsVisible();
+ if (!flag)
+ {
+ this.m_ResolveBtn.SetGrey(this.SelectList.Count != 0);
+ this.m_ResolveTips.SetActive(this.SelectList.Count == 0);
+ this.m_SpritePool.ReturnAll(false);
+ Vector3 tplPos = this.m_SpritePool.TplPos;
+ for (int i = 0; i < this.SelectList.Count; i++)
+ {
+ GameObject gameObject = this.m_SpritePool.FetchGameObject(false);
+ gameObject.transform.localPosition = new Vector3(tplPos.x + (float)(i % 3 * this.m_SpritePool.TplWidth), tplPos.y - (float)(i / 3 * this.m_SpritePool.TplHeight));
+ SpriteTable.RowData bySpriteID = this._doc._SpriteTable.GetBySpriteID(this.SelectList[i].SpriteID);
+ Transform ts = gameObject.transform.Find("Star");
+ this.SetStar(ts, this.SelectList[i].EvolutionLevel);
+ IXUILabel ixuilabel = gameObject.transform.Find("Name").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel.SetText(string.Format("[{0}]{1}", this._doc.NAMECOLOR[(int)bySpriteID.SpriteQuality], bySpriteID.SpriteName));
+ IXUILabel ixuilabel2 = gameObject.transform.Find("PPT").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel2.SetText(string.Format(XStringDefineProxy.GetString("BOSSRUSH_POWER"), this.SelectList[i].PowerPoint));
+ IXUILabel ixuilabel3 = gameObject.transform.Find("Level").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel3.SetText(string.Format("Lv.{0}", this.SelectList[i].Level));
+ IXUISprite ixuisprite = gameObject.transform.Find("Frame").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.spriteName = string.Format("kuang_dj_{0}", bySpriteID.SpriteQuality);
+ IXUISprite ixuisprite2 = gameObject.transform.Find("Icon").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite2.spriteName = bySpriteID.SpriteIcon;
+ IXUISprite ixuisprite3 = gameObject.transform.GetComponent("XUISprite") as IXUISprite;
+ ixuisprite3.ID = (ulong)((long)i);
+ ixuisprite3.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnSpriteScorllViewListClick));
+ }
+ if (resetScrollPos)
+ {
+ this.m_ScrollView.SetPosition(0f);
+ }
+ }
+ }
+
+ private void SetStar(Transform ts, uint num)
+ {
+ uint num2 = num / XSpriteSystemDocument.MOONWORTH;
+ uint num3 = num % XSpriteSystemDocument.MOONWORTH;
+ for (int i = 0; i < 7; i++)
+ {
+ IXUISprite ixuisprite = ts.Find(string.Format("star{0}", i)).GetComponent("XUISprite") as IXUISprite;
+ bool flag = (long)i < (long)((ulong)(num2 + num3));
+ if (flag)
+ {
+ ixuisprite.SetVisible(true);
+ ixuisprite.spriteName = (((long)i < (long)((ulong)num2)) ? "l_stars_02" : "l_stars_01");
+ }
+ else
+ {
+ ixuisprite.SetVisible(false);
+ }
+ }
+ }
+
+ public bool ScrollViewHasSprite(ulong id)
+ {
+ return this._resolveHash.Contains(id);
+ }
+
+ public void OnSpriteListClick(IXUISprite iSp)
+ {
+ bool flag = (int)iSp.ID >= this._doc.ResolveList.Count;
+ if (!flag)
+ {
+ SpriteInfo spriteInfo = this._doc.ResolveList[(int)iSp.ID];
+ bool flag2 = this._resolveHash.Contains(spriteInfo.uid);
+ if (flag2)
+ {
+ this.SelectList.Remove(spriteInfo);
+ this._resolveHash.Remove(spriteInfo.uid);
+ iSp.gameObject.transform.Find("Select").gameObject.SetActive(false);
+ this.SetSpriteList(false);
+ }
+ else
+ {
+ bool flag3 = this.SelectList.Count >= this._doc.SpriteList.Count - 1;
+ if (flag3)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString("SpriteResolveAllTips"), "fece00");
+ }
+ else
+ {
+ bool flag4 = (long)this.SelectList.Count >= (long)((ulong)this._resolveMaxNum);
+ if (flag4)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString("SpriteResolveMaxTips"), "fece00");
+ }
+ else
+ {
+ this.SelectList.Add(spriteInfo);
+ this._resolveHash.Add(spriteInfo.uid);
+ iSp.gameObject.transform.Find("Select").gameObject.SetActive(true);
+ this.SetSpriteList(false);
+ }
+ }
+ }
+ }
+ }
+
+ public void OnSpriteScorllViewListClick(IXUISprite iSp)
+ {
+ this._resolveHash.Remove(this.SelectList[(int)iSp.ID].uid);
+ this.SelectList.RemoveAt((int)iSp.ID);
+ this.SetSpriteList(false);
+ this._SpriteSelectHandler.SetSpriteList(this._doc.ResolveList, false);
+ }
+
+ public void OnResolveBtnClick(IXUISprite iSp)
+ {
+ bool flag = this.SelectList.Count == 0;
+ if (!flag)
+ {
+ bool flag2 = this.SelectList.Count == this._doc.SpriteList.Count;
+ if (flag2)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString("SpriteResolveAllTips"), "fece00");
+ }
+ else
+ {
+ bool flag3 = this.CheckWhetherNeedToTips();
+ if (flag3)
+ {
+ string label = XSingleton<UiUtility>.singleton.ReplaceReturn(XStringDefineProxy.GetString("SpriteResolveSureTips"));
+ string @string = XStringDefineProxy.GetString("COMMON_OK");
+ string string2 = XStringDefineProxy.GetString("COMMON_CANCEL");
+ XSingleton<UiUtility>.singleton.ShowModalDialog(label, @string, string2, new ButtonClickEventHandler(this.OnResolveSure));
+ }
+ else
+ {
+ this.SendResolveList();
+ }
+ }
+ }
+ }
+
+ private bool CheckWhetherNeedToTips()
+ {
+ int i = 0;
+ while (i < this.SelectList.Count)
+ {
+ bool flag = this.SelectList[i].Level > 1u;
+ bool result;
+ if (flag)
+ {
+ result = true;
+ }
+ else
+ {
+ SpriteTable.RowData bySpriteID = this._doc._SpriteTable.GetBySpriteID(this.SelectList[i].SpriteID);
+ bool flag2 = bySpriteID.SpriteQuality > 2u;
+ if (!flag2)
+ {
+ i++;
+ continue;
+ }
+ result = true;
+ }
+ return result;
+ }
+ return false;
+ }
+
+ private bool OnResolveSure(IXUIButton btn)
+ {
+ this.SendResolveList();
+ DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.SetVisible(false, true);
+ return true;
+ }
+
+ private void SendResolveList()
+ {
+ XSingleton<XDebug>.singleton.AddLog("Resolve", null, null, null, null, null, XDebugColor.XDebug_None);
+ this._doc.QueryResolveSprite(this.SelectList);
+ }
+
+ public void Clean()
+ {
+ this.SelectList.Clear();
+ this._resolveHash.Clear();
+ this.SetSpriteList(true);
+ this._SpriteSelectHandler.SetSpriteList(this._doc.ResolveList, true);
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/SpriteResolveFrame.cs.meta b/Client/Assets/Scripts/XMainClient/UI/SpriteResolveFrame.cs.meta
new file mode 100644
index 00000000..4724d9e0
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/SpriteResolveFrame.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 5413a85dfa9c83c4e87074dcbc951a5a
+timeCreated: 1611403713
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/SpriteSelectHandler.cs b/Client/Assets/Scripts/XMainClient/UI/SpriteSelectHandler.cs
new file mode 100644
index 00000000..034fc5b9
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/SpriteSelectHandler.cs
@@ -0,0 +1,154 @@
+using System;
+using System.Collections.Generic;
+using KKSG;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class SpriteSelectHandler : DlgHandlerBase
+ {
+ protected override string FileName
+ {
+ get
+ {
+ return "GameSystem/SpriteSystem/SpriteSelectHandler";
+ }
+ }
+
+ private XSpriteSystemDocument _doc;
+
+ public IXUIScrollView m_ScrollView;
+
+ public IXUIWrapContent m_WrapContent;
+
+ private List<SpriteInfo> _list;
+
+ protected override void Init()
+ {
+ base.Init();
+ this._doc = XDocuments.GetSpecificDocument<XSpriteSystemDocument>(XSpriteSystemDocument.uuID);
+ Transform transform = base.PanelObject.transform.Find("ScrollView/WrapContent/Tpl");
+ this.m_ScrollView = (base.PanelObject.transform.Find("ScrollView").GetComponent("XUIScrollView") as IXUIScrollView);
+ this.m_WrapContent = (this.m_ScrollView.gameObject.transform.Find("WrapContent").GetComponent("XUIWrapContent") as IXUIWrapContent);
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ this.m_WrapContent.RegisterItemUpdateEventHandler(new WrapItemUpdateEventHandler(this.DesWrapListUpdated));
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ bool flag = DlgBase<SpriteSystemDlg, TabDlgBehaviour>.singleton._SpriteMainFrame != null && DlgBase<SpriteSystemDlg, TabDlgBehaviour>.singleton._SpriteMainFrame.IsVisible();
+ if (flag)
+ {
+ this.SetSpriteList(this._doc.SpriteList, true);
+ }
+ bool flag2 = DlgBase<SpriteSystemDlg, TabDlgBehaviour>.singleton._SpriteResolveFrame != null && DlgBase<SpriteSystemDlg, TabDlgBehaviour>.singleton._SpriteResolveFrame.IsVisible();
+ if (flag2)
+ {
+ this._doc.DealWithResolveList();
+ this.SetSpriteList(this._doc.ResolveList, true);
+ }
+ bool flag3 = DlgBase<SpriteSystemDlg, TabDlgBehaviour>.singleton._SpriteFightFrame != null && DlgBase<SpriteSystemDlg, TabDlgBehaviour>.singleton._SpriteFightFrame.IsVisible();
+ if (flag3)
+ {
+ this.SetSpriteList(this._doc.SpriteList, true);
+ }
+ }
+
+ public void SetSpriteList(List<SpriteInfo> list, bool resetScrollPos = true)
+ {
+ bool flag = !base.IsVisible();
+ if (!flag)
+ {
+ this._list = list;
+ this.m_WrapContent.SetContentCount(list.Count, false);
+ if (resetScrollPos)
+ {
+ this.m_ScrollView.SetPosition(0f);
+ }
+ }
+ }
+
+ private void DesWrapListUpdated(Transform t, int i)
+ {
+ bool flag = i < 0 || i >= this._list.Count;
+ if (flag)
+ {
+ XSingleton<XDebug>.singleton.AddErrorLog("leftScrollView_index is out of range of sprite list. index = ", i.ToString(), " cout = ", this._list.Count.ToString(), null, null);
+ }
+ else
+ {
+ SpriteTable.RowData bySpriteID = this._doc._SpriteTable.GetBySpriteID(this._list[i].SpriteID);
+ GameObject gameObject = t.Find("Fight").gameObject;
+ gameObject.SetActive(this._doc.CurrentTag == SpriteHandlerTag.Main && this._doc.isSpriteFight(this._list[i].uid));
+ GameObject gameObject2 = t.Find("Fight2").gameObject;
+ gameObject2.SetActive(this._doc.CurrentTag != SpriteHandlerTag.Main && this._doc.isSpriteFight(this._list[i].uid));
+ IXUISprite ixuisprite = t.Find("Frame").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.spriteName = string.Format("kuang_dj_{0}", bySpriteID.SpriteQuality);
+ IXUISprite ixuisprite2 = t.Find("Icon").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite2.spriteName = bySpriteID.SpriteIcon;
+ Transform ts = t.Find("Star");
+ this.SetStar(ts, this._list[i].EvolutionLevel);
+ GameObject gameObject3 = t.Find("Up").gameObject;
+ bool active = (this._doc.CurrentTag == SpriteHandlerTag.Fight && this.isUpIconShow(i)) || (this._doc.CurrentTag == SpriteHandlerTag.Main && this._doc.isSpriteFight(this._list[i].uid) && !this._doc.isSpriteFoodEmpty() && this._doc.isSpriteNeed2Feed(this._list[i].uid, false));
+ gameObject3.SetActive(active);
+ IXUISprite ixuisprite3 = t.GetComponent("XUISprite") as IXUISprite;
+ ixuisprite3.ID = (ulong)((long)i);
+ switch (this._doc.CurrentTag)
+ {
+ case SpriteHandlerTag.Main:
+ {
+ ixuisprite3.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(DlgBase<SpriteSystemDlg, TabDlgBehaviour>.singleton._SpriteMainFrame.OnSpriteListClick));
+ bool flag2 = DlgBase<SpriteSystemDlg, TabDlgBehaviour>.singleton._SpriteMainFrame.CurrentClick == 10000 && i == 0;
+ if (flag2)
+ {
+ DlgBase<SpriteSystemDlg, TabDlgBehaviour>.singleton._SpriteMainFrame.OnSpriteListClick(ixuisprite3);
+ }
+ t.transform.Find("Select").gameObject.SetActive(i == DlgBase<SpriteSystemDlg, TabDlgBehaviour>.singleton._SpriteMainFrame.CurrentClick);
+ break;
+ }
+ case SpriteHandlerTag.Fight:
+ ixuisprite3.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(DlgBase<SpriteSystemDlg, TabDlgBehaviour>.singleton._SpriteFightFrame.OnLeftListClick));
+ t.transform.Find("Select").gameObject.SetActive(false);
+ break;
+ case SpriteHandlerTag.Resolve:
+ ixuisprite3.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(DlgBase<SpriteSystemDlg, TabDlgBehaviour>.singleton._SpriteResolveFrame.OnSpriteListClick));
+ t.Find("Select").gameObject.SetActive(DlgBase<SpriteSystemDlg, TabDlgBehaviour>.singleton._SpriteResolveFrame.ScrollViewHasSprite(this._list[i].uid));
+ break;
+ }
+ }
+ }
+
+ private bool isUpIconShow(int i)
+ {
+ return this._doc.isSpriteNeed2Fight(i);
+ }
+
+ private void SetStar(Transform ts, uint num)
+ {
+ uint num2 = num / XSpriteSystemDocument.MOONWORTH;
+ uint num3 = num % XSpriteSystemDocument.MOONWORTH;
+ for (int i = 0; i < 7; i++)
+ {
+ IXUISprite ixuisprite = ts.Find(string.Format("star{0}", i)).GetComponent("XUISprite") as IXUISprite;
+ bool flag = (long)i < (long)((ulong)(num2 + num3));
+ if (flag)
+ {
+ ixuisprite.SetVisible(true);
+ ixuisprite.spriteName = (((long)i < (long)((ulong)num2)) ? "l_stars_02" : "l_stars_01");
+ }
+ else
+ {
+ ixuisprite.SetVisible(false);
+ }
+ }
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/SpriteSelectHandler.cs.meta b/Client/Assets/Scripts/XMainClient/UI/SpriteSelectHandler.cs.meta
new file mode 100644
index 00000000..6cf64973
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/SpriteSelectHandler.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: c52d4dd0588954045a84f71843c03beb
+timeCreated: 1611404505
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/SpriteShopHandler.cs b/Client/Assets/Scripts/XMainClient/UI/SpriteShopHandler.cs
new file mode 100644
index 00000000..e8628afa
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/SpriteShopHandler.cs
@@ -0,0 +1,217 @@
+using System;
+using System.Collections.Generic;
+using KKSG;
+using UILib;
+using UnityEngine;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class SpriteShopHandler : DlgHandlerBase
+ {
+ protected override string FileName
+ {
+ get
+ {
+ return "GameSystem/SpriteSystem/SpriteShopHandler";
+ }
+ }
+
+ private XSpriteSystemDocument _doc = null;
+
+ private IXUIButton m_NormalLotteryOnce;
+
+ private IXUIButton m_NormalLotteryTen;
+
+ private IXUIButton m_NormalLotteryFree;
+
+ private IXUILabelSymbol m_NormalLotteryOncePrice;
+
+ private IXUILabelSymbol m_NormalLotteryTenPrice;
+
+ private IXUILabel m_NormalLotteryTip;
+
+ private IXUIButton m_SpecialLotteryOnce;
+
+ private IXUIButton m_SpecialLotteryTen;
+
+ private IXUIButton m_SpecialLotteryFree;
+
+ private IXUILabelSymbol m_SpecialLotteryOncePrice;
+
+ private IXUILabelSymbol m_SpecialLotteryTenPrice;
+
+ private IXUILabel m_SpecialLotteryTip;
+
+ private Transform m_NormalLottery;
+
+ private Transform m_SpecialLottery;
+
+ private Transform m_ResultFrame;
+
+ private IXUITweenTool m_ResultTween;
+
+ private XUIPool m_ResultPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ private IXUIList m_ResultList;
+
+ private int _maxColdDrawCount;
+
+ private XLeftTimeCounter _normalCD;
+
+ private XLeftTimeCounter _specialCD;
+
+ protected override void Init()
+ {
+ base.Init();
+ this._doc = XDocuments.GetSpecificDocument<XSpriteSystemDocument>(XSpriteSystemDocument.uuID);
+ this._maxColdDrawCount = XSingleton<XGlobalConfig>.singleton.GetInt("GoldDrawFreeDayCount");
+ this.InitUI();
+ }
+
+ private void InitUI()
+ {
+ this.m_NormalLotteryOnce = (base.PanelObject.transform.Find("Bg/NormalLottery/Button/Once").GetComponent("XUIButton") as IXUIButton);
+ this.m_NormalLotteryTen = (base.PanelObject.transform.Find("Bg/NormalLottery/Button/Ten").GetComponent("XUIButton") as IXUIButton);
+ this.m_NormalLotteryFree = (base.PanelObject.transform.Find("Bg/NormalLottery/Button/Free").GetComponent("XUIButton") as IXUIButton);
+ this.m_NormalLotteryOncePrice = (base.PanelObject.transform.Find("Bg/NormalLottery/Button/Once/Price").GetComponent("XUILabelSymbol") as IXUILabelSymbol);
+ this.m_NormalLotteryTenPrice = (base.PanelObject.transform.Find("Bg/NormalLottery/Button/Ten/Price").GetComponent("XUILabelSymbol") as IXUILabelSymbol);
+ this.m_NormalLotteryTip = (base.PanelObject.transform.Find("Bg/NormalLottery/Button/Tip").GetComponent("XUILabel") as IXUILabel);
+ this.m_SpecialLotteryOnce = (base.PanelObject.transform.Find("Bg/SpecialLottery/Button/Once").GetComponent("XUIButton") as IXUIButton);
+ this.m_SpecialLotteryTen = (base.PanelObject.transform.Find("Bg/SpecialLottery/Button/Ten").GetComponent("XUIButton") as IXUIButton);
+ this.m_SpecialLotteryFree = (base.PanelObject.transform.Find("Bg/SpecialLottery/Button/Free").GetComponent("XUIButton") as IXUIButton);
+ this.m_SpecialLotteryOncePrice = (base.PanelObject.transform.Find("Bg/SpecialLottery/Button/Once/Price").GetComponent("XUILabelSymbol") as IXUILabelSymbol);
+ this.m_SpecialLotteryTenPrice = (base.PanelObject.transform.Find("Bg/SpecialLottery/Button/Ten/Price").GetComponent("XUILabelSymbol") as IXUILabelSymbol);
+ this.m_SpecialLotteryTip = (base.PanelObject.transform.Find("Bg/SpecialLottery/Button/Tip").GetComponent("XUILabel") as IXUILabel);
+ this.m_NormalLotteryFree.ID = (ulong)((long)XFastEnumIntEqualityComparer<LotteryType>.ToInt(LotteryType.Sprite_GoldDraw_One_Free));
+ this.m_NormalLotteryOnce.ID = (ulong)((long)XFastEnumIntEqualityComparer<LotteryType>.ToInt(LotteryType.Sprite_GoldDraw_One));
+ this.m_NormalLotteryTen.ID = (ulong)((long)XFastEnumIntEqualityComparer<LotteryType>.ToInt(LotteryType.Sprite_GoldDraw_Ten));
+ this.m_SpecialLotteryFree.ID = (ulong)((long)XFastEnumIntEqualityComparer<LotteryType>.ToInt(LotteryType.Sprite_Draw_One_Free));
+ this.m_SpecialLotteryOnce.ID = (ulong)((long)XFastEnumIntEqualityComparer<LotteryType>.ToInt(LotteryType.Sprite_Draw_One));
+ this.m_SpecialLotteryTen.ID = (ulong)((long)XFastEnumIntEqualityComparer<LotteryType>.ToInt(LotteryType.Sprite_Draw_Ten));
+ string[] array = XSingleton<XGlobalConfig>.singleton.GetValue("SpriteShopGoldOneCost").Split(XGlobalConfig.SequenceSeparator);
+ string[] array2 = XSingleton<XGlobalConfig>.singleton.GetValue("SpriteShopGoldTenCost").Split(XGlobalConfig.SequenceSeparator);
+ string[] array3 = XSingleton<XGlobalConfig>.singleton.GetValue("SpriteShopOneCost").Split(XGlobalConfig.SequenceSeparator);
+ string[] array4 = XSingleton<XGlobalConfig>.singleton.GetValue("SpriteShopTenCost").Split(XGlobalConfig.SequenceSeparator);
+ bool flag = array.Length == 2 && array2.Length == 2;
+ if (flag)
+ {
+ this.m_NormalLotteryOncePrice.InputText = XLabelSymbolHelper.FormatCostWithIcon(int.Parse(array[1]), (ItemEnum)int.Parse(array[0]));
+ this.m_NormalLotteryTenPrice.InputText = XLabelSymbolHelper.FormatCostWithIcon(int.Parse(array2[1]), (ItemEnum)int.Parse(array2[0]));
+ }
+ bool flag2 = array3.Length == 2 && array4.Length == 2;
+ if (flag2)
+ {
+ this.m_SpecialLotteryOncePrice.InputText = XLabelSymbolHelper.FormatCostWithIcon(int.Parse(array3[1]), (ItemEnum)int.Parse(array3[0]));
+ this.m_SpecialLotteryTenPrice.InputText = XLabelSymbolHelper.FormatCostWithIcon(int.Parse(array4[1]), (ItemEnum)int.Parse(array4[0]));
+ }
+ this._normalCD = new XLeftTimeCounter(this.m_NormalLotteryTip, true);
+ this._specialCD = new XLeftTimeCounter(this.m_SpecialLotteryTip, true);
+ this.m_NormalLottery = base.PanelObject.transform.Find("Bg/NormalLottery");
+ this.m_SpecialLottery = base.PanelObject.transform.Find("Bg/SpecialLottery");
+ this.m_ResultFrame = base.PanelObject.transform.Find("Bg/ResultFrame");
+ this.m_ResultFrame.gameObject.SetActive(false);
+ this.m_ResultTween = (base.PanelObject.transform.Find("Bg/ResultFrame/Result").GetComponent("XUIPlayTween") as IXUITweenTool);
+ this.m_ResultList = (base.PanelObject.transform.Find("Bg/ResultFrame/Result/Grid").GetComponent("XUIList") as IXUIList);
+ Transform transform = base.PanelObject.transform.Find("Bg/ResultFrame/Result/Grid/ResultTpl");
+ this.m_ResultPool.SetupPool(transform.parent.gameObject, transform.gameObject, 1u, false);
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ this.m_NormalLotteryOnce.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnLotteryClicked));
+ this.m_NormalLotteryTen.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnLotteryClicked));
+ this.m_NormalLotteryFree.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnLotteryClicked));
+ this.m_SpecialLotteryOnce.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnLotteryClicked));
+ this.m_SpecialLotteryTen.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnLotteryClicked));
+ this.m_SpecialLotteryFree.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnLotteryClicked));
+ this.m_ResultTween.RegisterOnFinishEventHandler(new OnTweenFinishEventHandler(this.OnShowFinished));
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ this._doc.QueryBuyEggCD();
+ this.RefreshLotteryFrame();
+ }
+
+ private bool OnLotteryClicked(IXUIButton button)
+ {
+ this._doc.SendBuySpriteEggRpc((uint)button.ID);
+ return true;
+ }
+
+ private void OnShowFinished(IXUITweenTool tween)
+ {
+ this.m_ResultFrame.gameObject.SetActive(false);
+ }
+
+ public void ShowResultFrame(List<ItemBrief> item)
+ {
+ this.m_ResultFrame.gameObject.SetActive(true);
+ this.m_ResultTween.ResetTween(true);
+ this.m_ResultTween.PlayTween(true, -1f);
+ this.RefreshResultFrame(item);
+ }
+
+ public void RefreshLotteryFrame()
+ {
+ this.ShowNormalButton(this._doc.NormalCoolDown == 0u);
+ this.ShowSpecialButton(this._doc.SpecialCoolDown == 0u);
+ }
+
+ private void RefreshResultFrame(List<ItemBrief> gift)
+ {
+ this.m_ResultPool.ReturnAll(false);
+ for (int i = 0; i < gift.Count; i++)
+ {
+ GameObject gameObject = this.m_ResultPool.FetchGameObject(false);
+ gameObject.transform.parent = this.m_ResultList.gameObject.transform;
+ GameObject gameObject2 = gameObject.transform.Find("ItemTpl").gameObject;
+ IXUILabel ixuilabel = gameObject.transform.Find("ItemTpl/Name").GetComponent("XUILabel") as IXUILabel;
+ ItemList.RowData itemConf = XBagDocument.GetItemConf((int)gift[i].itemID);
+ bool flag = itemConf != null;
+ if (flag)
+ {
+ ixuilabel.SetText(XSingleton<UiUtility>.singleton.ChooseProfString(itemConf.ItemName, 0u));
+ }
+ XSingleton<XItemDrawerMgr>.singleton.normalItemDrawer.DrawItem(gameObject2, (int)gift[i].itemID, (int)gift[i].itemCount, false);
+ }
+ this.m_ResultList.Refresh();
+ }
+
+ private void ShowNormalButton(bool free)
+ {
+ this.m_NormalLotteryFree.SetVisible(free);
+ this.m_NormalLotteryOnce.SetVisible(!free);
+ this.m_NormalLotteryTen.SetVisible(!free);
+ this._normalCD.SetLeftTime(this._doc.NormalCoolDown, -1);
+ bool flag = this._doc.NormalFreeCount == this._doc.NormalMaxCount;
+ if (flag)
+ {
+ this._normalCD.SetFormatString(string.Format("{0}({1}/{2})", XStringDefineProxy.GetString("FREE_COUNT_RUNOUT"), this._doc.NormalMaxCount - this._doc.NormalFreeCount, this._doc.NormalMaxCount));
+ }
+ else
+ {
+ this._normalCD.SetFormatString(string.Format("{0}({1}/{2})", XStringDefineProxy.GetString("SpriteLotteryNextFreeTime"), this._doc.NormalMaxCount - this._doc.NormalFreeCount, this._doc.NormalMaxCount));
+ }
+ }
+
+ private void ShowSpecialButton(bool free)
+ {
+ this.m_SpecialLotteryFree.SetVisible(free);
+ this.m_SpecialLotteryOnce.SetVisible(!free);
+ this.m_SpecialLotteryTen.SetVisible(!free);
+ this._specialCD.SetLeftTime(this._doc.SpecialCoolDown, -1);
+ this._specialCD.SetFormatString(XStringDefineProxy.GetString("SpriteLotteryNextFreeTime"));
+ }
+
+ public override void OnUpdate()
+ {
+ base.OnUpdate();
+ this._normalCD.Update();
+ this._specialCD.Update();
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/SpriteShopHandler.cs.meta b/Client/Assets/Scripts/XMainClient/UI/SpriteShopHandler.cs.meta
new file mode 100644
index 00000000..05d33cb9
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/SpriteShopHandler.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: e4253b4759640dd4faeb44b403fb0a18
+timeCreated: 1611404736
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/SpriteStarUpWindow.cs b/Client/Assets/Scripts/XMainClient/UI/SpriteStarUpWindow.cs
new file mode 100644
index 00000000..af27d31d
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/SpriteStarUpWindow.cs
@@ -0,0 +1,596 @@
+using System;
+using System.Collections.Generic;
+using KKSG;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class SpriteStarUpWindow : DlgHandlerBase
+ {
+ protected override string FileName
+ {
+ get
+ {
+ return "GameSystem/SpriteSystem/SpriteStarUpWindow";
+ }
+ }
+
+ private XSpriteSystemDocument _doc;
+
+ public XUIPool m_CurrAttrPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ public XUIPool m_LastAttrPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ public XSpriteAvatarHandler _SpriteAvatarHandler;
+
+ public IXUISprite m_StarUpBtn;
+
+ public IXUILabel m_StarUpText;
+
+ public IXUILabelSymbol m_Cost;
+
+ public IXUIButton m_Close;
+
+ public GameObject m_CurrSkill;
+
+ private Transform m_EffectParent;
+
+ private XFx _fxFirework;
+
+ public int CurrentClick;
+
+ public List<int> LastAttrList = new List<int>();
+
+ public List<int> LastValueList = new List<int>();
+
+ private List<bool> _lockList = new List<bool>();
+
+ private SeqList<int> _lockCost;
+
+ private int _lockMaxNum;
+
+ private GameObject m_LastEmpty;
+
+ private IXUIProgress m_Progress;
+
+ private IXUILabel m_ProgressValue;
+
+ private IXUIButton m_HelpBtn;
+
+ private GameObject m_HelpTips;
+
+ public IXUISprite m_RebornBtn;
+
+ private GameObject m_TrainFx;
+
+ private GameObject m_MaxFx;
+
+ private uint _currProcess;
+
+ private uint _needProcess;
+
+ protected override void Init()
+ {
+ base.Init();
+ this._doc = XDocuments.GetSpecificDocument<XSpriteSystemDocument>(XSpriteSystemDocument.uuID);
+ DlgHandlerBase.EnsureCreate<XSpriteAvatarHandler>(ref this._SpriteAvatarHandler, base.PanelObject.transform.Find("AvatarHandlerParent"), true, this);
+ Transform transform = base.PanelObject.transform.Find("Property/Label/TplCurrent");
+ this.m_CurrAttrPool.SetupPool(transform.parent.gameObject, transform.gameObject, 4u, false);
+ transform = base.PanelObject.transform.Find("Property/Label/TplLast");
+ this.m_LastAttrPool.SetupPool(transform.parent.gameObject, transform.gameObject, 4u, false);
+ this.m_StarUpBtn = (base.PanelObject.transform.Find("StarUpBtn").GetComponent("XUISprite") as IXUISprite);
+ this.m_StarUpText = (this.m_StarUpBtn.gameObject.transform.Find("Text").GetComponent("XUILabel") as IXUILabel);
+ this.m_Cost = (base.PanelObject.transform.Find("Cost").GetComponent("XUILabelSymbol") as IXUILabelSymbol);
+ this.m_Close = (base.PanelObject.transform.Find("Close").GetComponent("XUIButton") as IXUIButton);
+ this.m_CurrSkill = base.PanelObject.transform.Find("Skill/SkillIconPos1/SkillTpl").gameObject;
+ this.m_EffectParent = base.PanelObject.transform.Find("EffectParent");
+ for (int i = 0; i < 4; i++)
+ {
+ this._lockList.Add(true);
+ }
+ this.m_LastEmpty = base.PanelObject.transform.Find("Property/Label/LastEmpty").gameObject;
+ this.m_Progress = (base.PanelObject.transform.Find("Process/Slider").GetComponent("XUIProgress") as IXUIProgress);
+ this.m_ProgressValue = (base.PanelObject.transform.Find("Process/ProcessValue").GetComponent("XUILabel") as IXUILabel);
+ this.m_HelpBtn = (base.PanelObject.transform.Find("Process/Help").GetComponent("XUIButton") as IXUIButton);
+ this.m_HelpTips = base.PanelObject.transform.Find("Process/Content").gameObject;
+ this.m_HelpTips.SetActive(false);
+ this.m_RebornBtn = (base.PanelObject.transform.Find("RebornBtn").GetComponent("XUISprite") as IXUISprite);
+ this.m_TrainFx = base.PanelObject.transform.Find("Bg/Bg/P/Fx").gameObject;
+ this.m_TrainFx.SetActive(false);
+ this.m_MaxFx = base.PanelObject.transform.Find("Process/Slider/Overlay/UI_SpriteStarUpWindow_Clip03").gameObject;
+ this._lockCost = XSingleton<XGlobalConfig>.singleton.GetSequence4List("SpriteTrainCost", false);
+ this._lockMaxNum = XSingleton<XGlobalConfig>.singleton.GetInt("SpriteTrainNoToChooseMaxNum");
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ this.LastAttrList.Clear();
+ this.LastValueList.Clear();
+ for (int i = 0; i < this._lockList.Count; i++)
+ {
+ this._lockList[i] = true;
+ }
+ this._SpriteAvatarHandler.SetVisible(true);
+ this._SpriteAvatarHandler.SetSpriteInfoByIndex(DlgBase<SpriteSystemDlg, TabDlgBehaviour>.singleton._SpriteMainFrame.CurrentClick, 0, false, true);
+ this.SetInfo(DlgBase<SpriteSystemDlg, TabDlgBehaviour>.singleton._SpriteMainFrame.CurrentClick);
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ this.m_StarUpBtn.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnStarUpBtnClick));
+ this.m_RebornBtn.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnRebornBtnClick));
+ this.m_HelpBtn.RegisterPressEventHandler(new ButtonPressEventHandler(this.OnHelpBtnPress));
+ this.m_Close.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnCloseClicked));
+ }
+
+ protected override void OnHide()
+ {
+ base.OnHide();
+ this.m_TrainFx.SetActive(false);
+ DlgBase<SpriteSystemDlg, TabDlgBehaviour>.singleton._SpriteMainFrame.SetAvatar();
+ bool flag = this._fxFirework != null;
+ if (flag)
+ {
+ XSingleton<XFxMgr>.singleton.DestroyFx(this._fxFirework, true);
+ this._fxFirework = null;
+ }
+ this._SpriteAvatarHandler.SetVisible(false);
+ }
+
+ public override void OnUnload()
+ {
+ DlgHandlerBase.EnsureUnload<XSpriteAvatarHandler>(ref this._SpriteAvatarHandler);
+ bool flag = this._fxFirework != null;
+ if (flag)
+ {
+ XSingleton<XFxMgr>.singleton.DestroyFx(this._fxFirework, true);
+ this._fxFirework = null;
+ }
+ base.OnUnload();
+ }
+
+ public void OnServerReturn(SpriteType type)
+ {
+ this.SetInfo(this.CurrentClick);
+ this.SetAvatar();
+ bool flag = type == SpriteType.Sprite_Evolution;
+ if (flag)
+ {
+ this.ShowStarUpSuccessEffect();
+ }
+ bool flag2 = type == SpriteType.Sprite_Train;
+ if (flag2)
+ {
+ this.m_TrainFx.SetActive(false);
+ this.m_TrainFx.SetActive(true);
+ }
+ }
+
+ public void SetAvatar()
+ {
+ this._SpriteAvatarHandler.SetSpriteInfoByIndex(this.CurrentClick, 0, false, true);
+ }
+
+ private void SetInfo(int index)
+ {
+ this.CurrentClick = index;
+ SpriteTable.RowData bySpriteID = this._doc._SpriteTable.GetBySpriteID(this._doc.SpriteList[index].SpriteID);
+ SpriteInfo spriteInfo = this._doc.SpriteList[index];
+ SpriteEvolution.RowData rowData = null;
+ bool flag = spriteInfo.EvolutionLevel >= XSpriteSystemDocument.MAXSTARLEVEL[(int)this._doc.GetSpriteQuality(index)];
+ bool flag2 = !flag;
+ if (flag2)
+ {
+ rowData = this._doc.GetStarUpData(bySpriteID.SpriteQuality, spriteInfo.EvolutionLevel);
+ }
+ bool flag3 = rowData != null;
+ if (flag3)
+ {
+ this._currProcess = spriteInfo.TrainExp;
+ this._needProcess = rowData.TrainExp[1];
+ }
+ else
+ {
+ this._currProcess = 1u;
+ this._needProcess = 1u;
+ }
+ this.m_MaxFx.SetActive(this._currProcess >= this._needProcess);
+ this.m_Cost.SetVisible(this._currProcess < this._needProcess);
+ this.m_StarUpBtn.SetGrey(!flag && ((this._currProcess < this._needProcess && this.CostEnough(rowData, bySpriteID)) || (this._currProcess >= this._needProcess && this.CanStarUp(rowData))));
+ this.m_RebornBtn.SetEnabled(this._currProcess != 0u || spriteInfo.EvolutionLevel > 0u);
+ this.m_StarUpText.SetText(XStringDefineProxy.GetString((this._currProcess < this._needProcess) ? "SpriteTrainText" : "SpriteStarUpText"));
+ bool flag4 = !flag;
+ if (flag4)
+ {
+ string arg = string.Format("{0}X{1}", XLabelSymbolHelper.FormatSmallIcon((int)rowData.EvolutionCost[0]), rowData.EvolutionCost[1]);
+ bool flag5 = this._lockCost[(int)(bySpriteID.SpriteQuality - 1u), this.GetUnLockNum() + 1] != 0;
+ if (flag5)
+ {
+ arg = string.Format("{0} {1}X{2}", arg, XLabelSymbolHelper.FormatSmallIcon(this._lockCost[(int)(bySpriteID.SpriteQuality - 1u), 0]), this._lockCost[(int)(bySpriteID.SpriteQuality - 1u), this.GetUnLockNum() + 1]);
+ }
+ this.m_Cost.InputText = string.Format(XStringDefineProxy.GetString("SpriteCostText"), arg);
+ }
+ else
+ {
+ this.m_Cost.InputText = XStringDefineProxy.GetString("SpriteStarMaxTips");
+ }
+ this.SetSkillIcon(this.m_CurrSkill, spriteInfo.SkillID, true, spriteInfo.EvolutionLevel);
+ bool flag6 = flag;
+ if (flag6)
+ {
+ this.m_ProgressValue.SetText(XStringDefineProxy.GetString("SpriteStarMaxTips"));
+ this.m_Progress.value = 1f;
+ }
+ else
+ {
+ this.m_ProgressValue.SetText(string.Format("{0}/{1}", this._currProcess, this._needProcess));
+ this.m_Progress.value = this._currProcess * 1f / this._needProcess;
+ }
+ this.m_LastAttrPool.ReturnAll(false);
+ bool flag7 = this.LastAttrList.Count == 0;
+ Vector3 tplPos;
+ float num;
+ if (flag7)
+ {
+ this.m_LastEmpty.SetActive(true);
+ }
+ else
+ {
+ this.m_LastEmpty.SetActive(false);
+ tplPos = this.m_LastAttrPool.TplPos;
+ num = tplPos.y + ((float)this.LastAttrList.Count - 1f) / 2f * (float)this.m_LastAttrPool.TplHeight;
+ for (int i = 0; i < this.LastAttrList.Count; i++)
+ {
+ GameObject gameObject = this.m_LastAttrPool.FetchGameObject(false);
+ gameObject.transform.localPosition = new Vector3(tplPos.x, num - (float)(i * this.m_LastAttrPool.TplHeight));
+ IXUILabel ixuilabel = gameObject.transform.Find("Attr").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel.SetText(this.GetAttrName((uint)this.LastAttrList[i]));
+ IXUILabel ixuilabel2 = gameObject.transform.Find("Value").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel2.SetText(this.LastValueList[i].ToString());
+ }
+ }
+ this.m_CurrAttrPool.ReturnAll(false);
+ tplPos = this.m_CurrAttrPool.TplPos;
+ num = tplPos.y + ((float)spriteInfo.AttrID.Count - 2f) / 2f * (float)this.m_CurrAttrPool.TplHeight;
+ Dictionary<uint, uint> dictionary = new Dictionary<uint, uint>();
+ for (int j = 0; j < spriteInfo.ThisLevelEvoAttrID.Count; j++)
+ {
+ dictionary[spriteInfo.ThisLevelEvoAttrID[j]] = (uint)spriteInfo.ThisLevelEvoAttrValue[j];
+ }
+ int num2 = 0;
+ for (int k = 0; k < spriteInfo.AttrID.Count; k++)
+ {
+ bool flag8 = k == 1;
+ if (!flag8)
+ {
+ GameObject gameObject2 = this.m_CurrAttrPool.FetchGameObject(false);
+ gameObject2.transform.localPosition = new Vector3(tplPos.x, num - (float)(num2 * this.m_CurrAttrPool.TplHeight));
+ IXUISprite ixuisprite = gameObject2.transform.Find("Locker").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.ID = (ulong)((long)num2);
+ ixuisprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnLockClick));
+ GameObject gameObject3 = gameObject2.transform.Find("Locker/Locked").gameObject;
+ gameObject3.SetActive(this._lockList[num2]);
+ IXUILabel ixuilabel3 = gameObject2.transform.Find("Attr").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel3.SetText(this.GetAttrName(spriteInfo.AttrID[k]));
+ IXUILabel ixuilabel4 = gameObject2.transform.Find("Value").GetComponent("XUILabel") as IXUILabel;
+ uint num3 = 0u;
+ dictionary.TryGetValue(spriteInfo.AttrID[k], out num3);
+ ixuilabel4.SetText(num3.ToString());
+ num2++;
+ }
+ }
+ }
+
+ private void OnLockClick(IXUISprite iSp)
+ {
+ bool flag = this._lockList[(int)iSp.ID] && this.GetUnLockNum() >= this._lockMaxNum;
+ if (flag)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString("SpriteStarUpLockMaxTips"), "fece00");
+ }
+ else
+ {
+ this._lockList[(int)iSp.ID] = !this._lockList[(int)iSp.ID];
+ GameObject gameObject = iSp.gameObject.transform.Find("Locked").gameObject;
+ gameObject.SetActive(this._lockList[(int)iSp.ID]);
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString(this._lockList[(int)iSp.ID] ? "SpriteStarUpLock" : "SpriteStarUpUnLock"), "fece00");
+ SpriteInfo spriteInfo = this._doc.SpriteList[this.CurrentClick];
+ bool flag2 = spriteInfo.EvolutionLevel < XSpriteSystemDocument.MAXSTARLEVEL[(int)this._doc.GetSpriteQuality(this.CurrentClick)];
+ if (flag2)
+ {
+ SpriteTable.RowData bySpriteID = this._doc._SpriteTable.GetBySpriteID(this._doc.SpriteList[this.CurrentClick].SpriteID);
+ SpriteEvolution.RowData starUpData = this._doc.GetStarUpData(bySpriteID.SpriteQuality, this._doc.SpriteList[this.CurrentClick].EvolutionLevel);
+ string arg = string.Format("{0}X{1}", XLabelSymbolHelper.FormatSmallIcon((int)starUpData.EvolutionCost[0]), starUpData.EvolutionCost[1]);
+ bool flag3 = this._lockCost[(int)(bySpriteID.SpriteQuality - 1u), this.GetUnLockNum() + 1] != 0;
+ if (flag3)
+ {
+ arg = string.Format("{0} {1}X{2}", arg, XLabelSymbolHelper.FormatSmallIcon(this._lockCost[(int)(bySpriteID.SpriteQuality - 1u), 0]), this._lockCost[(int)(bySpriteID.SpriteQuality - 1u), this.GetUnLockNum() + 1]);
+ }
+ this.m_Cost.InputText = string.Format(XStringDefineProxy.GetString("SpriteCostText"), arg);
+ }
+ }
+ }
+
+ private bool CanStarUp(SpriteEvolution.RowData cost)
+ {
+ bool flag = cost == null;
+ if (flag)
+ {
+ XSingleton<XDebug>.singleton.AddErrorLog("Get SpriteEvolution cost data error.", null, null, null, null, null);
+ }
+ bool flag2 = this._doc.SpriteList[this.CurrentClick].Level < (uint)cost.LevelLimit;
+ return !flag2;
+ }
+
+ private bool CostEnough(SpriteEvolution.RowData cost, SpriteTable.RowData data)
+ {
+ bool flag = cost == null;
+ if (flag)
+ {
+ XSingleton<XDebug>.singleton.AddErrorLog("Get SpriteEvolution cost data error.", null, null, null, null, null);
+ }
+ bool flag2 = XBagDocument.BagDoc.GetItemCount((int)cost.EvolutionCost[0]) < (ulong)cost.EvolutionCost[1];
+ bool result;
+ if (flag2)
+ {
+ result = false;
+ }
+ else
+ {
+ bool flag3 = XBagDocument.BagDoc.GetItemCount(this._lockCost[(int)(data.SpriteQuality - 1u), 0]) < (ulong)this._lockCost[(int)(data.SpriteQuality - 1u), this.GetUnLockNum() + 1];
+ result = !flag3;
+ }
+ return result;
+ }
+
+ private void SetSkillIcon(GameObject go, uint skillID, bool mainSkill = false, uint evolutionLevel = 0u)
+ {
+ IXUISprite ixuisprite = go.transform.Find("Icon").GetComponent("XUISprite") as IXUISprite;
+ IXUILabel ixuilabel = go.transform.Find("Zhu").GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel2 = go.transform.Find("Level").GetComponent("XUILabel") as IXUILabel;
+ IXUISprite ixuisprite2 = go.transform.Find("Frame").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.ID = (ulong)evolutionLevel;
+ ixuisprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnSkillIconClicked));
+ XSpriteSystemDocument specificDocument = XDocuments.GetSpecificDocument<XSpriteSystemDocument>(XSpriteSystemDocument.uuID);
+ SpriteSkill.RowData spriteSkillData = specificDocument.GetSpriteSkillData((short)skillID, mainSkill, evolutionLevel);
+ bool flag = spriteSkillData != null;
+ if (flag)
+ {
+ ixuisprite.SetSprite(spriteSkillData.Icon);
+ }
+ ixuilabel.SetVisible(mainSkill);
+ ixuisprite2.SetVisible(!mainSkill);
+ bool flag2 = !mainSkill;
+ if (flag2)
+ {
+ ixuisprite2.SetSprite(string.Format("kuang_zq0{0}", spriteSkillData.SkillQuality));
+ }
+ ixuilabel2.SetText(string.Format("[b]Lv.{0}[-]", evolutionLevel + 1u));
+ ixuilabel2.SetVisible(mainSkill);
+ }
+
+ private void OnSkillIconClicked(IXUISprite obj)
+ {
+ SpriteInfo spriteInfo = this._doc.SpriteList[this.CurrentClick];
+ uint level = (uint)obj.ID;
+ DlgBase<XSpriteSkillTipDlg, XSpriteSkillTipBehaviour>.singleton.ItemSelector.Select(obj);
+ DlgBase<XSpriteSkillTipDlg, XSpriteSkillTipBehaviour>.singleton.ShowSpriteSkill(spriteInfo.SkillID, true, level);
+ }
+
+ private int GetUnLockNum()
+ {
+ int num = 0;
+ for (int i = 0; i < this._lockList.Count; i++)
+ {
+ bool flag = !this._lockList[i];
+ if (flag)
+ {
+ num++;
+ }
+ }
+ return num;
+ }
+
+ public void OnStarUpBtnClick(IXUISprite btn)
+ {
+ bool flag = this._doc.SpriteList[this.CurrentClick].EvolutionLevel >= XSpriteSystemDocument.MAXSTARLEVEL[(int)this._doc.GetSpriteQuality(this.CurrentClick)];
+ if (flag)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString("SpriteStarMaxTips"), "fece00");
+ }
+ else
+ {
+ SpriteTable.RowData bySpriteID = this._doc._SpriteTable.GetBySpriteID(this._doc.SpriteList[this.CurrentClick].SpriteID);
+ SpriteEvolution.RowData starUpData = this._doc.GetStarUpData(bySpriteID.SpriteQuality, this._doc.SpriteList[this.CurrentClick].EvolutionLevel);
+ SpriteInfo spriteInfo = this._doc.SpriteList[this.CurrentClick];
+ bool flag2 = this._currProcess < this._needProcess;
+ if (flag2)
+ {
+ bool flag3 = !this.CostEnough(starUpData, bySpriteID);
+ if (flag3)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString("ERR_CHANGEPRO_ITEMLIMIT"), "fece00");
+ }
+ else
+ {
+ int num = 0;
+ List<uint> list = new List<uint>();
+ string text = "";
+ for (int i = 0; i < spriteInfo.AttrID.Count; i++)
+ {
+ bool flag4 = i == 1;
+ if (!flag4)
+ {
+ bool flag5 = !this._lockList[num];
+ if (flag5)
+ {
+ list.Add(spriteInfo.AttrID[i]);
+ text = string.Format("{0} {1}", text, this.GetAttrName(spriteInfo.AttrID[i]));
+ }
+ num++;
+ }
+ }
+ bool flag6 = list.Count == 0 || DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.GetTempTip(XTempTipDefine.OD_SPRITE_TRAIN);
+ if (flag6)
+ {
+ XSingleton<XDebug>.singleton.AddLog("Train!", null, null, null, null, null, XDebugColor.XDebug_None);
+ this._doc.QueryTrain(this.CurrentClick, list);
+ }
+ else
+ {
+ string format = XSingleton<UiUtility>.singleton.ReplaceReturn(XStringDefineProxy.GetString("SpriteTrainCostTipe"));
+ ItemList.RowData itemConf = XBagDocument.GetItemConf(this._lockCost[(int)(bySpriteID.SpriteQuality - 1u), 0]);
+ string label = string.Format(format, this._lockCost[(int)(bySpriteID.SpriteQuality - 1u), this.GetUnLockNum() + 1], itemConf.ItemName[0], text);
+ string @string = XStringDefineProxy.GetString("COMMON_OK");
+ string string2 = XStringDefineProxy.GetString("COMMON_CANCEL");
+ XSingleton<UiUtility>.singleton.ShowModalDialog(label, @string, string2, new ButtonClickEventHandler(this.OnTrainSure), null, false, XTempTipDefine.OD_SPRITE_TRAIN, 50);
+ }
+ }
+ }
+ else
+ {
+ bool flag7 = this._doc.SpriteList[this.CurrentClick].Level < (uint)starUpData.LevelLimit;
+ if (flag7)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(string.Format(XStringDefineProxy.GetString("SpriteStarUpLevelTips", new object[]
+ {
+ starUpData.LevelLimit
+ }), new object[0]), "fece00");
+ }
+ else
+ {
+ string label2 = XSingleton<UiUtility>.singleton.ReplaceReturn(XStringDefineProxy.GetString("SpriteStarUpSure"));
+ string string3 = XStringDefineProxy.GetString("COMMON_OK");
+ string string4 = XStringDefineProxy.GetString("COMMON_CANCEL");
+ XSingleton<UiUtility>.singleton.ShowModalDialog(label2, string3, string4, new ButtonClickEventHandler(this.OnStarUpSure));
+ }
+ }
+ }
+ }
+
+ private bool OnStarUpSure(IXUIButton btn)
+ {
+ DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.SetVisible(false, true);
+ XSingleton<XDebug>.singleton.AddLog("StarUp!", null, null, null, null, null, XDebugColor.XDebug_None);
+ this._doc.QueryStarUp(this.CurrentClick);
+ return true;
+ }
+
+ private bool OnTrainSure(IXUIButton btn)
+ {
+ DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.SetVisible(false, true);
+ SpriteInfo spriteInfo = this._doc.SpriteList[this.CurrentClick];
+ int num = 0;
+ List<uint> list = new List<uint>();
+ for (int i = 0; i < spriteInfo.AttrID.Count; i++)
+ {
+ bool flag = i == 1;
+ if (!flag)
+ {
+ bool flag2 = !this._lockList[num];
+ if (flag2)
+ {
+ list.Add(spriteInfo.AttrID[i]);
+ }
+ num++;
+ }
+ }
+ XSingleton<XDebug>.singleton.AddLog("Train!", null, null, null, null, null, XDebugColor.XDebug_None);
+ this._doc.QueryTrain(this.CurrentClick, list);
+ return true;
+ }
+
+ private void OnRebornBtnClick(IXUISprite iSp)
+ {
+ bool flag = this.CurrentClick >= this._doc.SpriteList.Count;
+ if (!flag)
+ {
+ bool flag2 = this._doc.SpriteList[this.CurrentClick].TrainExp == 0u;
+ if (flag2)
+ {
+ string message = XSingleton<UiUtility>.singleton.ReplaceReturn(XStringDefineProxy.GetString("SpriteRebornToZeroTips"));
+ XSingleton<UiUtility>.singleton.ShowModalDialog(message, new ButtonClickEventHandler(this.OnRebornToZeroSure));
+ }
+ else
+ {
+ SpriteTable.RowData bySpriteID = this._doc._SpriteTable.GetBySpriteID(this._doc.SpriteList[this.CurrentClick].SpriteID);
+ SpriteEvolution.RowData starUpData = this._doc.GetStarUpData(bySpriteID.SpriteQuality, this._doc.SpriteList[this.CurrentClick].EvolutionLevel);
+ string format = XSingleton<UiUtility>.singleton.ReplaceReturn(XStringDefineProxy.GetString("SpriteRebornTips"));
+ string text = string.Format("{0}{1}", XLabelSymbolHelper.FormatSmallIcon((int)starUpData.ResetTrainCost[0, 0]), starUpData.ResetTrainCost[0, 1]);
+ string text2 = string.Format("{0}{1}", XLabelSymbolHelper.FormatSmallIcon((int)starUpData.ResetTrainCost[1, 0]), starUpData.ResetTrainCost[1, 1]);
+ string text3 = string.Format(format, text, text2);
+ string @string = XStringDefineProxy.GetString("SpriteRebornText");
+ DlgBase<ModalDlg2, ModalDlg2Behaviour>.singleton.InitShow(text3, new ButtonClickEventHandler(this.OnRebornSure1), new ButtonClickEventHandler(this.OnRebornSure2), text, text2, @string, @string);
+ }
+ }
+ }
+
+ private bool OnRebornSure1(IXUIButton btn)
+ {
+ XSingleton<XDebug>.singleton.AddLog("ResetTrain1!", null, null, null, null, null, XDebugColor.XDebug_None);
+ this._doc.QueryResetTrain(this.CurrentClick, SpriteType.Sprite_ResetTrain, 0u);
+ return true;
+ }
+
+ private bool OnRebornSure2(IXUIButton btn)
+ {
+ XSingleton<XDebug>.singleton.AddLog("ResetTrain2!", null, null, null, null, null, XDebugColor.XDebug_None);
+ this._doc.QueryResetTrain(this.CurrentClick, SpriteType.Sprite_ResetTrain, 1u);
+ return true;
+ }
+
+ private bool OnRebornToZeroSure(IXUIButton btn)
+ {
+ DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.SetVisible(false, true);
+ XSingleton<XDebug>.singleton.AddLog("Rebirth!", null, null, null, null, null, XDebugColor.XDebug_None);
+ this._doc.QueryResetTrain(this.CurrentClick, SpriteType.Sprite_Rebirth, 0u);
+ return true;
+ }
+
+ private void OnHelpBtnPress(IXUIButton btn, bool state)
+ {
+ bool flag = this.m_HelpTips.activeInHierarchy != state;
+ if (flag)
+ {
+ this.m_HelpTips.SetActive(state);
+ }
+ }
+
+ public bool OnCloseClicked(IXUIButton btn)
+ {
+ base.SetVisible(false);
+ return true;
+ }
+
+ public void ShowStarUpSuccessEffect()
+ {
+ bool flag = this._fxFirework != null;
+ if (flag)
+ {
+ XSingleton<XFxMgr>.singleton.DestroyFx(this._fxFirework, true);
+ }
+ this._fxFirework = XSingleton<XFxMgr>.singleton.CreateAndPlay("Effects/FX_Particle/UIfx/UI_jl_level", this.m_EffectParent, Vector3.zero, Vector3.one, 1f, false, 3f, true);
+ }
+
+ private string GetAttrName(uint AttrID)
+ {
+ bool flag = AttrID == 11u;
+ string @string;
+ if (flag)
+ {
+ @string = XStringDefineProxy.GetString("SpriteStarUpAttr");
+ }
+ else
+ {
+ string key = string.Format("Sprite_{0}", (XAttributeDefine)AttrID);
+ @string = XStringDefineProxy.GetString(key);
+ }
+ return @string;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/SpriteStarUpWindow.cs.meta b/Client/Assets/Scripts/XMainClient/UI/SpriteStarUpWindow.cs.meta
new file mode 100644
index 00000000..3a20b47f
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/SpriteStarUpWindow.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: cbcc4c0405d262d4286db6874d66f2ab
+timeCreated: 1611404547
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/SpriteSystemDlg.cs b/Client/Assets/Scripts/XMainClient/UI/SpriteSystemDlg.cs
new file mode 100644
index 00000000..ba374c42
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/SpriteSystemDlg.cs
@@ -0,0 +1,211 @@
+using System;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class SpriteSystemDlg : TabDlgBase<SpriteSystemDlg>
+ {
+ public override string fileName
+ {
+ get
+ {
+ return "GameSystem/SpriteSystem/SpriteSystemDlg";
+ }
+ }
+
+ public override int group
+ {
+ get
+ {
+ return 1;
+ }
+ }
+
+ protected override bool bHorizontal
+ {
+ get
+ {
+ return false;
+ }
+ }
+
+ public override int sysid
+ {
+ get
+ {
+ return XFastEnumIntEqualityComparer<XSysDefine>.ToInt(XSysDefine.XSys_SpriteSystem);
+ }
+ }
+
+ private IXUIButton m_illustration;
+
+ private Transform parent;
+
+ public SpriteMainFrame _SpriteMainFrame;
+
+ public SpriteLotteryHandler _SpriteLotteryHandler;
+
+ public SpriteFightFrame _SpriteFightFrame;
+
+ public SpriteResolveFrame _SpriteResolveFrame;
+
+ public SpriteShopHandler _SpriteShopHandler;
+
+ private Transform windowParent;
+
+ public SpriteStarUpWindow _StarUpWindow;
+
+ public XSpriteIllustrationHandler _IllustrationHandler;
+
+ public XSpriteAwakeHandler _AwakeWindow;
+
+ private XSpriteSystemDocument _doc;
+
+ private XSysDefine _CurrSys;
+
+ protected override void Init()
+ {
+ this._doc = XDocuments.GetSpecificDocument<XSpriteSystemDocument>(XSpriteSystemDocument.uuID);
+ this.parent = base.uiBehaviour.transform.Find("Bg");
+ this.windowParent = base.uiBehaviour.transform.Find("Bg/Windows");
+ base.RegisterSubSysRedPointMgr(XSysDefine.XSys_SpriteSystem);
+ base.Init();
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ this.m_illustration = (base.uiBehaviour.transform.Find("Bg/Illustration").GetComponent("XUIButton") as IXUIButton);
+ this.m_illustration.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnIllustrationClicked));
+ IXUIButton ixuibutton = base.uiBehaviour.transform.Find("Bg/Help").GetComponent("XUIButton") as IXUIButton;
+ ixuibutton.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnHelpBtnClicked));
+ }
+
+ protected override void OnLoad()
+ {
+ base.OnLoad();
+ }
+
+ protected override void OnUnload()
+ {
+ DlgHandlerBase.EnsureUnload<SpriteMainFrame>(ref this._SpriteMainFrame);
+ DlgHandlerBase.EnsureUnload<SpriteLotteryHandler>(ref this._SpriteLotteryHandler);
+ DlgHandlerBase.EnsureUnload<SpriteFightFrame>(ref this._SpriteFightFrame);
+ DlgHandlerBase.EnsureUnload<SpriteResolveFrame>(ref this._SpriteResolveFrame);
+ DlgHandlerBase.EnsureUnload<SpriteStarUpWindow>(ref this._StarUpWindow);
+ DlgHandlerBase.EnsureUnload<XSpriteIllustrationHandler>(ref this._IllustrationHandler);
+ DlgHandlerBase.EnsureUnload<XSpriteAwakeHandler>(ref this._AwakeWindow);
+ DlgHandlerBase.EnsureUnload<SpriteShopHandler>(ref this._SpriteShopHandler);
+ base.OnUnload();
+ }
+
+ public override void SetupHandlers(XSysDefine sys)
+ {
+ this._CurrSys = sys;
+ this._doc.SortList();
+ switch (sys)
+ {
+ case XSysDefine.XSys_SpriteSystem_Main:
+ this._doc.CurrentTag = SpriteHandlerTag.Main;
+ base._AddActiveHandler(DlgHandlerBase.EnsureCreate<SpriteMainFrame>(ref this._SpriteMainFrame, this.parent, true, this));
+ return;
+ case XSysDefine.XSys_SpriteSystem_Lottery:
+ this._doc.CurrentTag = SpriteHandlerTag.Lottery;
+ base._AddActiveHandler(DlgHandlerBase.EnsureCreate<SpriteLotteryHandler>(ref this._SpriteLotteryHandler, this.parent, true, this));
+ return;
+ case XSysDefine.XSys_SpriteSystem_Fight:
+ this._doc.CurrentTag = SpriteHandlerTag.Fight;
+ base._AddActiveHandler(DlgHandlerBase.EnsureCreate<SpriteFightFrame>(ref this._SpriteFightFrame, this.parent, true, this));
+ return;
+ case XSysDefine.XSys_SpriteSystem_Resolve:
+ this._doc.CurrentTag = SpriteHandlerTag.Resolve;
+ base._AddActiveHandler(DlgHandlerBase.EnsureCreate<SpriteResolveFrame>(ref this._SpriteResolveFrame, this.parent, true, this));
+ return;
+ case XSysDefine.XSys_SpriteSystem_Shop:
+ this._doc.CurrentTag = SpriteHandlerTag.Shop;
+ base._AddActiveHandler(DlgHandlerBase.EnsureCreate<SpriteShopHandler>(ref this._SpriteShopHandler, this.parent, true, this));
+ return;
+ }
+ XSingleton<XDebug>.singleton.AddErrorLog("System has not finished:", sys.ToString(), null, null, null, null);
+ }
+
+ public void RefreshTopUI()
+ {
+ bool flag = !base.IsVisible();
+ if (!flag)
+ {
+ XMainInterfaceDocument specificDocument = XDocuments.GetSpecificDocument<XMainInterfaceDocument>(XMainInterfaceDocument.uuID);
+ specificDocument.OnTopUIRefreshed(this);
+ }
+ }
+
+ public override int[] GetTitanBarItems()
+ {
+ OpenSystemTable.RowData sysData = XSingleton<XGameSysMgr>.singleton.GetSysData(XFastEnumIntEqualityComparer<XSysDefine>.ToInt(this._CurrSys));
+ bool flag = sysData == null;
+ int[] result;
+ if (flag)
+ {
+ result = null;
+ }
+ else
+ {
+ result = sysData.TitanItems;
+ }
+ return result;
+ }
+
+ public void OpenWindows(SpriteWindow type)
+ {
+ switch (type)
+ {
+ case SpriteWindow.StarUp:
+ base._AddActiveHandler(DlgHandlerBase.EnsureCreate<SpriteStarUpWindow>(ref this._StarUpWindow, this.windowParent, true, this));
+ break;
+ case SpriteWindow.Awake:
+ base._AddActiveHandler(DlgHandlerBase.EnsureCreate<XSpriteAwakeHandler>(ref this._AwakeWindow, this.windowParent, true, this));
+ break;
+ case SpriteWindow.Illustration:
+ base._AddActiveHandler(DlgHandlerBase.EnsureCreate<XSpriteIllustrationHandler>(ref this._IllustrationHandler, this.windowParent, true, this));
+ break;
+ }
+ }
+
+ private bool OnIllustrationClicked(IXUIButton btn)
+ {
+ this.OpenWindows(SpriteWindow.Illustration);
+ this._IllustrationHandler.ShowSpriteAllIllustration();
+ return true;
+ }
+
+ private bool OnHelpBtnClicked(IXUIButton btn)
+ {
+ DlgBase<XCommonHelpTipView, XCommonHelpTipBehaviour>.singleton.ShowHelp(XSysDefine.XSys_SpriteSystem);
+ return true;
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ this.m_illustration.SetVisible(XSingleton<XGameSysMgr>.singleton.IsSystemOpened(XSysDefine.XSys_SpriteSystem_Lottery));
+ this.CheckSpriteSummonRedpoint();
+ }
+
+ public void CheckSpriteSummonRedpoint()
+ {
+ string[] array = XSingleton<XGlobalConfig>.singleton.GetValue("SpriteDrawCost").Split(XGlobalConfig.SequenceSeparator);
+ string[] array2 = XSingleton<XGlobalConfig>.singleton.GetValue("SpriteGoldDrawCost").Split(XGlobalConfig.SequenceSeparator);
+ bool flag = array.Length != 2 || array2.Length != 2;
+ if (!flag)
+ {
+ XBagDocument specificDocument = XDocuments.GetSpecificDocument<XBagDocument>(XBagDocument.uuID);
+ bool bState = specificDocument.GetItemCount(int.Parse(array[0])) > 0UL || specificDocument.GetItemCount(int.Parse(array2[0])) > 0UL;
+ XSingleton<XGameSysMgr>.singleton.SetSysRedPointState(XSysDefine.XSys_SpriteSystem_Lottery, bState);
+ XSingleton<XGameSysMgr>.singleton.RecalculateRedPointState(XSysDefine.XSys_SpriteSystem_Lottery, true);
+ }
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/SpriteSystemDlg.cs.meta b/Client/Assets/Scripts/XMainClient/UI/SpriteSystemDlg.cs.meta
new file mode 100644
index 00000000..733bc328
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/SpriteSystemDlg.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 15ee616fb3f830d40b8943f5c6df8267
+timeCreated: 1611403266
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/SpriteWindow.cs b/Client/Assets/Scripts/XMainClient/UI/SpriteWindow.cs
new file mode 100644
index 00000000..6682417a
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/SpriteWindow.cs
@@ -0,0 +1,11 @@
+using System;
+
+namespace XMainClient.UI
+{
+ public enum SpriteWindow
+ {
+ StarUp,
+ Awake,
+ Illustration
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/SpriteWindow.cs.meta b/Client/Assets/Scripts/XMainClient/UI/SpriteWindow.cs.meta
new file mode 100644
index 00000000..46640d77
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/SpriteWindow.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: b45648f1cfa52804ab9d55ea81c73a54
+timeCreated: 1611404392
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/SuperRiskDlg.cs b/Client/Assets/Scripts/XMainClient/UI/SuperRiskDlg.cs
new file mode 100644
index 00000000..962d67ad
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/SuperRiskDlg.cs
@@ -0,0 +1,156 @@
+using System;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class SuperRiskDlg : DlgBase<SuperRiskDlg, SuperRiskDlgBehaviour>
+ {
+ private XSuperRiskDocument _doc
+ {
+ get
+ {
+ return XSuperRiskDocument.Doc;
+ }
+ }
+
+ public override string fileName
+ {
+ get
+ {
+ return "GameSystem/SuperRisk/SuperRiskDlg";
+ }
+ }
+
+ public override bool pushstack
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override bool hideMainMenu
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override bool fullscreenui
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override bool autoload
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ private SuperRiskSelectMapHandler _SelectMapHandler;
+
+ private SuperRiskGameHandler _GameHandler;
+
+ protected override void Init()
+ {
+ DlgHandlerBase.EnsureCreate<SuperRiskGameHandler>(ref this._GameHandler, base.uiBehaviour.m_RiskMapPanel.transform, false, null);
+ DlgHandlerBase.EnsureCreate<SuperRiskSelectMapHandler>(ref this._SelectMapHandler, base.uiBehaviour.m_SelectMapPanel.transform, false, null);
+ }
+
+ protected override void OnLoad()
+ {
+ base.OnLoad();
+ }
+
+ protected override void OnUnload()
+ {
+ DlgHandlerBase.EnsureUnload<SuperRiskSelectMapHandler>(ref this._SelectMapHandler);
+ DlgHandlerBase.EnsureUnload<SuperRiskGameHandler>(ref this._GameHandler);
+ base.OnUnload();
+ }
+
+ public override void LeaveStackTop()
+ {
+ bool flag = this._GameHandler != null && this._GameHandler.IsVisible();
+ if (flag)
+ {
+ this._GameHandler.LeaveStackTop();
+ }
+ base.LeaveStackTop();
+ }
+
+ public override void RegisterEvent()
+ {
+ }
+
+ protected override void OnHide()
+ {
+ XSingleton<XGameSysMgr>.singleton.RecalculateRedPointState(XSysDefine.XSys_SuperRisk, true);
+ base.OnHide();
+ }
+
+ protected override void OnShow()
+ {
+ bool isNeedEnterMainGame = this._doc.IsNeedEnterMainGame;
+ if (isNeedEnterMainGame)
+ {
+ this.ShowGameMap();
+ XSuperRiskDocument.Doc.IsNeedEnterMainGame = false;
+ }
+ else
+ {
+ this.ShowSelectMap();
+ }
+ }
+
+ public override void OnUpdate()
+ {
+ base.OnUpdate();
+ bool flag = this._GameHandler != null && this._GameHandler.IsVisible();
+ if (flag)
+ {
+ this._GameHandler.OnUpdate();
+ }
+ }
+
+ public override void StackRefresh()
+ {
+ base.StackRefresh();
+ bool flag = this._GameHandler != null && this._GameHandler.IsVisible();
+ if (flag)
+ {
+ this._GameHandler.StackRefresh();
+ }
+ }
+
+ public void Show(bool isNeedEnterMainGame, int mapId = 0)
+ {
+ this._doc.CurrentMapID = mapId;
+ bool flag = !this._doc.IsNeedEnterMainGame;
+ if (flag)
+ {
+ this._doc.IsNeedEnterMainGame = isNeedEnterMainGame;
+ }
+ this.SetVisibleWithAnimation(true, null);
+ }
+
+ public void ShowGameMap()
+ {
+ this._SelectMapHandler.SetVisible(false);
+ this._GameHandler.SetVisible(true);
+ }
+
+ public void ShowSelectMap()
+ {
+ this._GameHandler.SetVisible(false);
+ this._SelectMapHandler.SetVisible(true);
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/SuperRiskDlg.cs.meta b/Client/Assets/Scripts/XMainClient/UI/SuperRiskDlg.cs.meta
new file mode 100644
index 00000000..7a12fa44
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/SuperRiskDlg.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 3528394bd55e42541b024bdf5dead193
+timeCreated: 1611403558
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/SuperRiskDlgBehaviour.cs b/Client/Assets/Scripts/XMainClient/UI/SuperRiskDlgBehaviour.cs
new file mode 100644
index 00000000..264720db
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/SuperRiskDlgBehaviour.cs
@@ -0,0 +1,19 @@
+using System;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+
+namespace XMainClient.UI
+{
+ internal class SuperRiskDlgBehaviour : DlgBehaviourBase
+ {
+ public GameObject m_SelectMapPanel;
+
+ public GameObject m_RiskMapPanel;
+
+ private void Awake()
+ {
+ this.m_SelectMapPanel = base.transform.Find("Bg/SelectMap").gameObject;
+ this.m_RiskMapPanel = base.transform.Find("Bg/RiskMap").gameObject;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/SuperRiskDlgBehaviour.cs.meta b/Client/Assets/Scripts/XMainClient/UI/SuperRiskDlgBehaviour.cs.meta
new file mode 100644
index 00000000..a2749d93
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/SuperRiskDlgBehaviour.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 6c5c66d2eab6ee04fbdbd41c3e8bd7d8
+timeCreated: 1611403895
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/SuperRiskGameHandler.cs b/Client/Assets/Scripts/XMainClient/UI/SuperRiskGameHandler.cs
new file mode 100644
index 00000000..52b6ac0d
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/SuperRiskGameHandler.cs
@@ -0,0 +1,1400 @@
+using System;
+using System.Collections.Generic;
+using KKSG;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class SuperRiskGameHandler : DlgHandlerBase
+ {
+ public string ScrollEffectPath
+ {
+ get
+ {
+ bool flag = string.IsNullOrEmpty(this.m_scrollEffectPath);
+ if (flag)
+ {
+ this.m_scrollEffectPath = XSingleton<XGlobalConfig>.singleton.GetValue("RiskScrollEffectPath");
+ }
+ return this.m_scrollEffectPath;
+ }
+ }
+
+ public string DungeonEffectPath
+ {
+ get
+ {
+ bool flag = string.IsNullOrEmpty(this.m_dungeonEffectPath);
+ if (flag)
+ {
+ this.m_dungeonEffectPath = XSingleton<XGlobalConfig>.singleton.GetValue("RiskDungeonEffectPath");
+ }
+ return this.m_dungeonEffectPath;
+ }
+ }
+
+ public string BoxEffectPath
+ {
+ get
+ {
+ bool flag = string.IsNullOrEmpty(this.m_boxEffectPath);
+ if (flag)
+ {
+ this.m_boxEffectPath = XSingleton<XGlobalConfig>.singleton.GetValue("RiskBoxEffectPath");
+ }
+ return this.m_boxEffectPath;
+ }
+ }
+
+ protected override string FileName
+ {
+ get
+ {
+ return "GameSystem/SuperRisk/GameHandler";
+ }
+ }
+
+ private readonly Color GreyColor = new Color(0.3019608f, 0.3019608f, 0.3019608f, 1f);
+
+ private readonly Color NormalColor = new Color(1f, 1f, 1f, 1f);
+
+ private XSuperRiskDocument _doc;
+
+ private XWelfareDocument _welfareDoc;
+
+ private IXUISprite PlayerAvatar = null;
+
+ private IXUITweenTool PlayerTween = null;
+
+ private IXUITweenTool ResetTween = null;
+
+ public static uint total_slot_box = 3u;
+
+ private IXUIButton m_Close;
+
+ private IXUIButton m_Help;
+
+ private XUIPool m_ItemPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ private IXUISprite m_rollBtn;
+
+ private IXUITweenTool m_rollTween;
+
+ private Transform m_rollFx;
+
+ private GameObject m_rollBarGo;
+
+ private Dictionary<RiskGridInfo, GameObject> m_MapItems = new Dictionary<RiskGridInfo, GameObject>();
+
+ private Transform m_DiceDummyPoint;
+
+ private XDummy m_DiceDummy;
+
+ private Transform m_controller;
+
+ private int m_DiceAnimValue = 0;
+
+ private static float DiceAnimationTime = 2f;
+
+ private uint m_DiceTimer;
+
+ private IXUILabel m_LeftTime;
+
+ private IXUILabel m_RecoverTime;
+
+ private IXUILabel m_mapTittleLab;
+
+ private IXUILabel m_RecoverFullLab;
+
+ private IXUISprite m_PrerogativeSpr;
+
+ private IXUILabel m_PrerogativeLab;
+
+ private IXUISprite m_PrerogativeBg;
+
+ private XUIPool SlotBoxPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ private IXUILabel[] m_CachedBoxSlotTimeLabel = new IXUILabel[3];
+
+ private IXUILabelSymbol[] m_CachedBoxCostLabel = new IXUILabelSymbol[3];
+
+ private IXUITweenTool m_BoxSlotTween;
+
+ private GameObject m_GetBoxFrame;
+
+ private IXUITweenTool m_GetBoxTween;
+
+ private uint m_CacheItemID;
+
+ private int m_CacheSlot;
+
+ private Transform m_theEndTra;
+
+ private IXUITexture m_mapTexture;
+
+ public GameObject m_OpenBoxFrame;
+
+ private GameObject m_OnlineBoxFrame;
+
+ private SuperRiskOpenboxHandler m_OpenBoxHandler;
+
+ private SuperRiskOnlineBoxHandler m_OnlineBoxHandler;
+
+ private bool m_bIsPlayingResetAnimation = false;
+
+ public GameObject m_NoticeFrame;
+
+ public IXUIButton m_NoticeYes;
+
+ private float m_fCoolTime = 0.7f;
+
+ private float m_fLastClickBtnTime = 0f;
+
+ private static CommandCallback _playDiceCb = new CommandCallback(SuperRiskGameHandler._PlayDice);
+
+ private XFx m_scrollFx;
+
+ private List<XFx> m_dungeonFxs = new List<XFx>();
+
+ private XFx[] m_boxFxs = new XFx[3];
+
+ private string m_scrollEffectPath = string.Empty;
+
+ private string m_dungeonEffectPath = string.Empty;
+
+ private string m_boxEffectPath = string.Empty;
+
+ private int m_discardBoxId = 0;
+
+ protected override void Init()
+ {
+ base.Init();
+ this._doc = (XSingleton<XGame>.singleton.Doc.GetXComponent(XSuperRiskDocument.uuID) as XSuperRiskDocument);
+ this._doc.GameViewHandler = this;
+ this._welfareDoc = XDocuments.GetSpecificDocument<XWelfareDocument>(XWelfareDocument.uuID);
+ this.PlayerAvatar = (base.PanelObject.transform.Find("PlayerAvatar/Me").GetComponent("XUISprite") as IXUISprite);
+ this.PlayerTween = (base.PanelObject.transform.Find("PlayerAvatar").GetComponent("XUIPlayTween") as IXUITweenTool);
+ this.PlayerAvatar.spriteName = XSingleton<XProfessionSkillMgr>.singleton.GetSuperRiskAvatar(XSingleton<XEntityMgr>.singleton.Player.BasicTypeID);
+ this.ResetTween = (base.PanelObject.transform.Find("again/again").GetComponent("XUIPlayTween") as IXUITweenTool);
+ this.ResetTween.SetTweenGroup(0);
+ this.ResetTween.gameObject.SetActive(false);
+ this.m_Close = (base.PanelObject.transform.Find("Close").GetComponent("XUIButton") as IXUIButton);
+ this.m_Help = (base.transform.Find("Help").GetComponent("XUIButton") as IXUIButton);
+ Transform transform = base.PanelObject.transform.Find("Dynamic/Item");
+ this.m_ItemPool.SetupPool(transform.parent.gameObject, transform.gameObject, 20u, false);
+ this.m_LeftTime = (base.PanelObject.transform.Find("Panel/Time").GetComponent("XUILabel") as IXUILabel);
+ this.m_RecoverTime = (base.PanelObject.transform.Find("Panel/Time/Recover").GetComponent("XUILabel") as IXUILabel);
+ this.m_RecoverFullLab = (base.PanelObject.transform.Find("Panel/Time/Tips").GetComponent("XUILabel") as IXUILabel);
+ this.m_PrerogativeSpr = (base.PanelObject.transform.Find("Panel/Time/tq").GetComponent("XUISprite") as IXUISprite);
+ this.m_PrerogativeLab = (base.PanelObject.transform.Find("Panel/Time/tq/t").GetComponent("XUILabel") as IXUILabel);
+ this.m_PrerogativeBg = (base.PanelObject.transform.Find("Panel/Time/tq/p").GetComponent("XUISprite") as IXUISprite);
+ this.m_rollBtn = (base.PanelObject.transform.Find("Roll/Rollbutton").GetComponent("XUISprite") as IXUISprite);
+ this.m_rollTween = (base.PanelObject.transform.Find("Roll/Rollbutton").GetComponent("XUIPlayTween") as IXUITweenTool);
+ this.m_rollFx = base.PanelObject.transform.Find("Roll/Rollbutton/FX");
+ this.m_rollBarGo = base.PanelObject.transform.Find("Roll/k").gameObject;
+ this.m_rollBarGo.SetActive(false);
+ this.m_DiceDummyPoint = base.PanelObject.transform.Find("Roll/DicePoint");
+ transform = base.PanelObject.transform.Find("BoxSlot/BoxTpl");
+ this.SlotBoxPool.SetupPool(transform.parent.gameObject, transform.gameObject, SuperRiskGameHandler.total_slot_box, false);
+ this.m_BoxSlotTween = (base.PanelObject.transform.Find("BoxSlot").GetComponent("XUIPlayTween") as IXUITweenTool);
+ this.m_GetBoxFrame = base.PanelObject.transform.Find("Getbox").gameObject;
+ this.m_GetBoxTween = (this.m_GetBoxFrame.GetComponent("XUIPlayTween") as IXUITweenTool);
+ this.m_GetBoxFrame.SetActive(false);
+ this.m_mapTexture = (base.PanelObject.transform.Find("GameMap").GetComponent("XUITexture") as IXUITexture);
+ this.m_mapTittleLab = (base.PanelObject.transform.Find("GameMap/T").GetComponent("XUILabel") as IXUILabel);
+ this.m_OpenBoxFrame = base.PanelObject.transform.Find("Openbox").gameObject;
+ DlgHandlerBase.EnsureCreate<SuperRiskOpenboxHandler>(ref this.m_OpenBoxHandler, this.m_OpenBoxFrame, null, false);
+ this.m_OnlineBoxFrame = base.PanelObject.transform.Find("Openlihe").gameObject;
+ DlgHandlerBase.EnsureCreate<SuperRiskOnlineBoxHandler>(ref this.m_OnlineBoxHandler, this.m_OnlineBoxFrame, null, false);
+ this.m_theEndTra = base.PanelObject.transform.Find("Dynamic/TheEnd");
+ this.m_NoticeFrame = base.PanelObject.transform.Find("Notice").gameObject;
+ this.m_NoticeYes = (base.PanelObject.transform.Find("Notice/Buy").GetComponent("XUIButton") as IXUIButton);
+ this.m_NoticeFrame.SetActive(false);
+ }
+
+ public override void OnUnload()
+ {
+ this._doc.GameViewHandler = null;
+ bool flag = this.m_scrollFx != null;
+ if (flag)
+ {
+ XSingleton<XFxMgr>.singleton.DestroyFx(this.m_scrollFx, true);
+ this.m_scrollFx = null;
+ }
+ for (int i = 0; i < this.m_dungeonFxs.Count; i++)
+ {
+ bool flag2 = this.m_dungeonFxs[i] != null;
+ if (flag2)
+ {
+ XSingleton<XFxMgr>.singleton.DestroyFx(this.m_dungeonFxs[i], true);
+ this.m_dungeonFxs[i] = null;
+ }
+ }
+ for (int j = 0; j < this.m_boxFxs.Length; j++)
+ {
+ bool flag3 = this.m_boxFxs[j] != null;
+ if (flag3)
+ {
+ XSingleton<XFxMgr>.singleton.DestroyFx(this.m_boxFxs[j], true);
+ this.m_boxFxs[j] = null;
+ }
+ }
+ DlgHandlerBase.EnsureUnload<SuperRiskOpenboxHandler>(ref this.m_OpenBoxHandler);
+ DlgHandlerBase.EnsureUnload<SuperRiskOnlineBoxHandler>(ref this.m_OnlineBoxHandler);
+ bool flag4 = this._doc.GameState == SuperRiskState.SuperRiskMoving;
+ if (flag4)
+ {
+ this._doc.NoticeMoveOver();
+ }
+ base.OnUnload();
+ }
+
+ public override void RegisterEvent()
+ {
+ this.m_NoticeYes.RegisterClickEventHandler(new ButtonClickEventHandler(this._NoticeYesClick));
+ this.m_Close.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnCloseClick));
+ this.m_Help.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnHelpClicked));
+ this.m_PrerogativeBg.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnMemberPrivilegeClicked));
+ }
+
+ public bool OnHelpClicked(IXUIButton button)
+ {
+ DlgBase<XCommonHelpTipView, XCommonHelpTipBehaviour>.singleton.ShowHelp(XSysDefine.XSys_SuperRisk);
+ return true;
+ }
+
+ protected override void OnShow()
+ {
+ this.InitMapBaseInfo();
+ this._doc.ReqMapDynamicInfo(this._doc.CurrentMapID, false, false);
+ }
+
+ public override void LeaveStackTop()
+ {
+ XSingleton<XDebug>.singleton.AddGreenLog("LeaveStackTop!", null, null, null, null, null);
+ this.Clear();
+ base.LeaveStackTop();
+ }
+
+ public void RefreshUi()
+ {
+ this.RefreshMap();
+ this.SetDiceLeftTime();
+ this.SetupSlotBoxes();
+ this.ShowCatchedOnlineBox();
+ }
+
+ protected override void OnHide()
+ {
+ this.Clear();
+ base.OnHide();
+ }
+
+ private void Clear()
+ {
+ bool flag = this.m_DiceTimer > 0u;
+ if (flag)
+ {
+ XSingleton<XTimerMgr>.singleton.KillTimer(this.m_DiceTimer);
+ this.m_DiceTimer = 0u;
+ }
+ bool flag2 = this.m_DiceDummy != null;
+ if (flag2)
+ {
+ XSingleton<XEntityMgr>.singleton.DestroyEntity(this.m_DiceDummy);
+ this.m_DiceDummy = null;
+ }
+ this.m_controller = null;
+ this.m_bIsPlayingResetAnimation = false;
+ bool flag3 = this.m_GetBoxTween != null && this.m_GetBoxTween.gameObject.activeSelf;
+ if (flag3)
+ {
+ this.m_GetBoxTween.StopTweenByGroup(0);
+ this.m_GetBoxTween.ResetTween(true);
+ this.m_GetBoxFrame.SetActive(false);
+ }
+ bool flag4 = this.m_rollTween != null && this.m_rollTween.gameObject.activeSelf;
+ if (flag4)
+ {
+ this.m_rollTween.StopTweenByGroup(0);
+ this.m_rollTween.ResetTweenByGroup(true, 0);
+ }
+ bool flag5 = this.ResetTween != null && this.ResetTween.gameObject.activeSelf;
+ if (flag5)
+ {
+ this.ResetTween.StopTweenByGroup(0);
+ this.ResetTween.ResetTweenByGroup(true, 0);
+ this.ResetTween.gameObject.SetActive(false);
+ }
+ bool flag6 = this.PlayerTween != null && this.PlayerTween.gameObject.activeSelf;
+ if (flag6)
+ {
+ this.PlayerTween.StopTweenByGroup(0);
+ this.PlayerTween.ResetTweenByGroup(true, 0);
+ }
+ bool flag7 = this.m_OpenBoxHandler != null && this.m_OpenBoxHandler.IsVisible();
+ if (flag7)
+ {
+ this.m_OpenBoxHandler.SetVisible(false);
+ }
+ bool flag8 = this.m_OnlineBoxHandler != null && this.m_OnlineBoxHandler.IsVisible();
+ if (flag8)
+ {
+ this.m_OnlineBoxHandler.SetVisible(false);
+ }
+ this.DestoryTex();
+ bool flag9 = this.m_OpenBoxFrame != null;
+ if (flag9)
+ {
+ this.m_OpenBoxHandler.ClearCatchTex();
+ }
+ bool flag10 = this._doc != null;
+ if (flag10)
+ {
+ bool flag11 = this._doc.GameState == SuperRiskState.SuperRiskDicing || this._doc.GameState == SuperRiskState.SuperRiskMoving;
+ if (flag11)
+ {
+ this._doc.NoticeMoveOver();
+ }
+ this._doc.StopStep();
+ }
+ bool flag12 = this.m_scrollFx != null;
+ if (flag12)
+ {
+ this.m_scrollFx.Stop();
+ this.m_scrollFx.SetActive(false);
+ }
+ for (int i = 0; i < this.m_dungeonFxs.Count; i++)
+ {
+ bool flag13 = this.m_dungeonFxs[i] != null;
+ if (flag13)
+ {
+ this.m_dungeonFxs[i].Stop();
+ this.m_dungeonFxs[i].SetActive(false);
+ }
+ }
+ for (int j = 0; j < this.m_boxFxs.Length; j++)
+ {
+ bool flag14 = this.m_boxFxs[j] != null;
+ if (flag14)
+ {
+ this.m_boxFxs[j].Stop();
+ this.m_boxFxs[j].SetActive(false);
+ }
+ }
+ }
+
+ private void DestoryTex()
+ {
+ this.m_mapTexture.SetTexturePath("");
+ }
+
+ public override void StackRefresh()
+ {
+ this.InitMapBaseInfo();
+ this._doc.ReqMapDynamicInfo(this._doc.CurrentMapID, false, false);
+ }
+
+ public void RefreshMap()
+ {
+ this.PlayerAvatar.gameObject.SetActive(true);
+ this.PlayerAvatar.gameObject.transform.parent.localPosition = this._doc.GetPlayerAvatarPos();
+ this.m_ItemPool.FakeReturnAll();
+ this.m_MapItems.Clear();
+ RiskMapFile.RowData currentMapData = this._doc.GetCurrentMapData();
+ int num = 0;
+ for (int i = 0; i < this._doc.CurrentDynamicInfo.Count; i++)
+ {
+ RiskGridInfo riskGridInfo = this._doc.CurrentDynamicInfo[i];
+ bool flag = riskGridInfo == null;
+ if (!flag)
+ {
+ Vector2 gridPos = this._doc.GetGridPos(riskGridInfo.x, riskGridInfo.y);
+ char c;
+ XSingleton<XSuperRiskMapMgr>.singleton.CurrentMap.GetNodeGroup(new Coordinate(riskGridInfo.x, riskGridInfo.y), out c);
+ bool flag2 = c == 'T';
+ if (flag2)
+ {
+ this.m_theEndTra.gameObject.SetActive(true);
+ this.m_theEndTra.localPosition = gridPos;
+ }
+ GameObject gameObject = this.m_ItemPool.FetchGameObject(false);
+ IXUISprite ixuisprite = gameObject.transform.Find("Di").GetComponent("XUISprite") as IXUISprite;
+ bool flag3 = currentMapData != null;
+ if (flag3)
+ {
+ ixuisprite.SetSprite(currentMapData.MapGridBg);
+ }
+ ixuisprite.spriteDepth = 15 + riskGridInfo.y * 2;
+ ixuisprite = (gameObject.transform.Find("Card").GetComponent("XUISprite") as IXUISprite);
+ ixuisprite.spriteDepth = 16 + riskGridInfo.y * 2;
+ switch (riskGridInfo.gridType)
+ {
+ case RiskGridType.RISK_GRID_EMPTY:
+ ixuisprite.SetVisible(false);
+ break;
+ case RiskGridType.RISK_GRID_NORMALREWARD:
+ {
+ ixuisprite.SetVisible(true);
+ bool flag4 = riskGridInfo.boxState != RiskBoxState.RISK_BOX_UNLOCKED;
+ ixuisprite.SetEnabled(flag4);
+ bool flag5 = !flag4;
+ if (flag5)
+ {
+ ixuisprite.SetColor(this.GreyColor);
+ }
+ else
+ {
+ ixuisprite.SetColor(this.NormalColor);
+ }
+ ixuisprite.SetSprite("dmxkuang_0");
+ break;
+ }
+ case RiskGridType.RISK_GRID_REWARDBOX:
+ {
+ ixuisprite.SetVisible(true);
+ bool flag4 = riskGridInfo.boxState != RiskBoxState.RISK_BOX_UNLOCKED;
+ ixuisprite.SetEnabled(flag4);
+ bool flag6 = !flag4;
+ if (flag6)
+ {
+ ixuisprite.SetColor(this.GreyColor);
+ }
+ else
+ {
+ ixuisprite.SetColor(this.NormalColor);
+ }
+ ixuisprite.SetSprite(this.GetBoxSprNameByState(riskGridInfo.rewardItem.itemID));
+ break;
+ }
+ case RiskGridType.RISK_GRID_ADVENTURE:
+ {
+ ixuisprite.SetVisible(true);
+ bool flag4 = riskGridInfo.boxState != RiskBoxState.RISK_BOX_UNLOCKED;
+ ixuisprite.SetEnabled(flag4);
+ bool flag7 = !flag4;
+ if (flag7)
+ {
+ ixuisprite.SetColor(this.GreyColor);
+ }
+ else
+ {
+ ixuisprite.SetColor(this.NormalColor);
+ }
+ ixuisprite.SetSprite("dmxkuang_4");
+ bool flag8 = this.m_dungeonFxs.Count <= num;
+ if (flag8)
+ {
+ XFx item = XSingleton<XFxMgr>.singleton.CreateFx(this.DungeonEffectPath, null, true);
+ this.m_dungeonFxs.Add(item);
+ }
+ else
+ {
+ this.m_dungeonFxs[num].SetActive(true);
+ }
+ bool flag9 = flag4;
+ if (flag9)
+ {
+ this.m_dungeonFxs[num].Play(ixuisprite.gameObject.transform, Vector3.zero, Vector3.one, 1f, true, false);
+ }
+ else
+ {
+ this.m_dungeonFxs[num].SetActive(false);
+ this.m_dungeonFxs[num].Stop();
+ }
+ num++;
+ break;
+ }
+ case RiskGridType.RISK_GRID_DICE:
+ {
+ ixuisprite.SetVisible(true);
+ bool flag4 = riskGridInfo.boxState != RiskBoxState.RISK_BOX_UNLOCKED;
+ ixuisprite.SetEnabled(flag4);
+ bool flag10 = !flag4;
+ if (flag10)
+ {
+ ixuisprite.SetColor(this.GreyColor);
+ }
+ else
+ {
+ ixuisprite.SetColor(this.NormalColor);
+ }
+ ixuisprite.SetSprite("dmxkuang_5");
+ break;
+ }
+ }
+ IXUISprite ixuisprite2 = gameObject.transform.Find("Di").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite2.ID = (ulong)((long)XFastEnumIntEqualityComparer<RiskGridType>.ToInt(riskGridInfo.gridType));
+ bool flag11 = i != 0;
+ if (flag11)
+ {
+ ixuisprite2.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnShowItemTips));
+ }
+ else
+ {
+ ixuisprite2.RegisterSpriteClickEventHandler(null);
+ ixuisprite.SetSprite("SuperBegin");
+ ixuisprite.SetEnabled(true);
+ ixuisprite.SetVisible(true);
+ }
+ gameObject.transform.localPosition = gridPos;
+ this.m_MapItems.Add(riskGridInfo, gameObject);
+ }
+ }
+ bool flag12 = this.m_dungeonFxs.Count > num;
+ if (flag12)
+ {
+ for (int j = num; j < this.m_dungeonFxs.Count; j++)
+ {
+ bool flag13 = this.m_dungeonFxs[j] != null;
+ if (flag13)
+ {
+ this.m_dungeonFxs[j].SetActive(false);
+ this.m_dungeonFxs[j].Stop();
+ }
+ }
+ }
+ this.m_ItemPool.ActualReturnAll(false);
+ }
+
+ private void OnShowItemTips(IXUISprite spr)
+ {
+ switch ((int)spr.ID)
+ {
+ case 1:
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString("SuperRiskEmpty"), "fece00");
+ break;
+ case 2:
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString("SuperRiskHandBook"), "fece00");
+ break;
+ case 3:
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString("SuperRiskBox"), "fece00");
+ break;
+ case 4:
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString("SuperRiskAdvance"), "fece00");
+ break;
+ case 5:
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString("SuperRiskDice"), "fece00");
+ break;
+ }
+ }
+
+ private void InitMapBaseInfo()
+ {
+ RiskMapFile.RowData currentMapData = this._doc.GetCurrentMapData();
+ bool flag = currentMapData != null;
+ if (flag)
+ {
+ this.m_mapTexture.SetTexturePath("atlas/UI/GameSystem/SuperRisk/" + currentMapData.MapBgName);
+ this.m_mapTittleLab.SetText(string.Format("[b]{0}[-]", currentMapData.MapTittleName));
+ }
+ this.PlayerAvatar.gameObject.SetActive(false);
+ this.m_theEndTra.gameObject.SetActive(false);
+ this.HideDice();
+ this.m_PrerogativeSpr.SetGrey(this._welfareDoc.IsOwnMemberPrivilege(MemberPrivilege.KingdomPrivilege_Commerce));
+ this.m_PrerogativeSpr.SetSprite(this._welfareDoc.GetMemberPrivilegeIcon(MemberPrivilege.KingdomPrivilege_Commerce));
+ this.m_PrerogativeLab.SetEnabled(this._welfareDoc.IsOwnMemberPrivilege(MemberPrivilege.KingdomPrivilege_Commerce));
+ }
+
+ private void OnMemberPrivilegeClicked(IXUISprite btn)
+ {
+ bool flag = this._doc.GameState == SuperRiskState.SuperRiskSendingRollMes || this._doc.GameState == SuperRiskState.SuperRiskRolling || this._doc.GameState == SuperRiskState.SuperRiskDicing || this._doc.GameState == SuperRiskState.SuperRiskMoving || this._doc.GameState == SuperRiskState.SuperRiskEvent || this._doc.GameState == SuperRiskState.SuperRiskRefreshMap;
+ if (!flag)
+ {
+ DlgBase<XWelfareView, XWelfareBehaviour>.singleton.CheckActiveMemberPrivilege(MemberPrivilege.KingdomPrivilege_Commerce);
+ }
+ }
+
+ public void HideDice()
+ {
+ bool flag = this.m_DiceDummy != null;
+ if (flag)
+ {
+ this.m_DiceDummy.EngineObject.SetActive(false, "");
+ }
+ }
+
+ public void OnMapItemFetched(Coordinate c)
+ {
+ RiskGridInfo gridDynamicInfo = this._doc.GetGridDynamicInfo(c);
+ bool flag = gridDynamicInfo == null;
+ if (!flag)
+ {
+ bool flag2 = !this.m_MapItems.ContainsKey(gridDynamicInfo);
+ if (!flag2)
+ {
+ IXUISprite ixuisprite = this.m_MapItems[gridDynamicInfo].transform.Find("Card").GetComponent("XUISprite") as IXUISprite;
+ switch (gridDynamicInfo.gridType)
+ {
+ case RiskGridType.RISK_GRID_NORMALREWARD:
+ {
+ ixuisprite.SetEnabled(false);
+ ixuisprite.SetColor(this.GreyColor);
+ bool flag3 = gridDynamicInfo.rewardItem.itemID > 0u;
+ if (flag3)
+ {
+ this.HideDice();
+ DlgBase<RewdAnimDlg, RewdAnimBehaviour>.singleton.Show(new List<ItemBrief>
+ {
+ gridDynamicInfo.rewardItem
+ }, new Action(this._doc.RewdAnimCallBack));
+ }
+ else
+ {
+ bool isHadOnlineBoxCache = this._doc.IsHadOnlineBoxCache;
+ if (isHadOnlineBoxCache)
+ {
+ this._doc.IsHadOnlineBoxCache = false;
+ this.HideDice();
+ this.ShowOnlineBox();
+ }
+ }
+ break;
+ }
+ case RiskGridType.RISK_GRID_REWARDBOX:
+ ixuisprite.SetEnabled(false);
+ ixuisprite.SetColor(this.GreyColor);
+ break;
+ case RiskGridType.RISK_GRID_ADVENTURE:
+ {
+ ixuisprite.SetEnabled(false);
+ ixuisprite.SetColor(this.GreyColor);
+ bool flag4 = ixuisprite.gameObject.transform.childCount > 0;
+ if (flag4)
+ {
+ ixuisprite.gameObject.transform.GetChild(0).gameObject.SetActive(false);
+ }
+ break;
+ }
+ case RiskGridType.RISK_GRID_DICE:
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString("AddDiceTips"), "fece00");
+ ixuisprite.SetEnabled(false);
+ ixuisprite.SetColor(this.GreyColor);
+ break;
+ }
+ }
+ }
+ }
+
+ public string GetBoxSprNameByState(uint itemID)
+ {
+ ItemList.RowData itemConf = XBagDocument.GetItemConf((int)itemID);
+ bool flag = itemConf == null;
+ string result;
+ if (flag)
+ {
+ result = string.Empty;
+ }
+ else
+ {
+ result = XSingleton<XCommon>.singleton.StringCombine("Boxicon_", ((int)(itemConf.ItemQuality - 1)).ToString());
+ }
+ return result;
+ }
+
+ public string GetHandbookSprName(int itemId)
+ {
+ ItemList.RowData itemConf = XBagDocument.GetItemConf(itemId);
+ bool flag = itemConf == null;
+ string result;
+ if (flag)
+ {
+ result = string.Empty;
+ }
+ else
+ {
+ switch (itemConf.ItemQuality)
+ {
+ case 1:
+ result = "tujicon_0";
+ break;
+ case 2:
+ result = "tujicon_3";
+ break;
+ case 3:
+ result = "tujicon_2";
+ break;
+ case 4:
+ result = "tujicon_1";
+ break;
+ case 5:
+ result = "tujicon_4";
+ break;
+ default:
+ result = "tujicon_0";
+ break;
+ }
+ }
+ return result;
+ }
+
+ public string GetBoxPicByState(uint itemID, RiskBoxState state)
+ {
+ ItemList.RowData itemConf = XBagDocument.GetItemConf((int)itemID);
+ bool flag = itemConf != null;
+ string result;
+ if (flag)
+ {
+ string text = string.Format("atlas/UI/GameSystem/SuperRisk/bx{0}", (int)(itemConf.ItemQuality - 1));
+ bool flag2 = state == RiskBoxState.RISK_BOX_UNLOCKED;
+ if (flag2)
+ {
+ text += "_1";
+ }
+ result = text;
+ }
+ else
+ {
+ result = "";
+ }
+ return result;
+ }
+
+ public void SetDiceLeftTime()
+ {
+ bool flag = this._doc.LeftDiceTime <= 0;
+ string arg;
+ if (flag)
+ {
+ arg = "[ff0000]" + this._doc.LeftDiceTime + "[-]";
+ this.m_rollBtn.SetGrey(false);
+ this.m_rollBtn.RegisterSpritePressEventHandler(null);
+ this.m_rollBtn.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this._OnRollClick));
+ }
+ else
+ {
+ arg = this._doc.LeftDiceTime.ToString();
+ this.m_rollBtn.SetGrey(true);
+ this.m_rollBtn.RegisterSpritePressEventHandler(new SpritePressEventHandler(this._OnRollPress));
+ this.m_rollBtn.RegisterSpriteClickEventHandler(null);
+ }
+ int num = 0;
+ PayMemberTable.RowData memberPrivilegeConfig = this._welfareDoc.GetMemberPrivilegeConfig(MemberPrivilege.KingdomPrivilege_Commerce);
+ bool flag2 = memberPrivilegeConfig != null;
+ if (flag2)
+ {
+ num = memberPrivilegeConfig.SuperRiskCount;
+ }
+ bool flag3 = this._welfareDoc.IsOwnMemberPrivilege(MemberPrivilege.KingdomPrivilege_Commerce);
+ if (flag3)
+ {
+ int num2 = 0;
+ bool flag4 = this._welfareDoc.PayMemberPrivilege != null;
+ if (flag4)
+ {
+ num2 = this._welfareDoc.PayMemberPrivilege.usedSuperRiskCount;
+ }
+ int num3 = (num > num2) ? (num - num2) : 0;
+ this.m_PrerogativeLab.SetText(string.Format("{0}{1}/{2}", XStringDefineProxy.GetString("Prerogative_Superrisk"), num3, num));
+ this.m_LeftTime.SetText(string.Format("[b]{0}/{1}[/b]", this._doc.LeftDiceTime - num3, XSingleton<XGlobalConfig>.singleton.GetValue("RiskDiceMaxNum")));
+ }
+ else
+ {
+ this.m_PrerogativeLab.SetText(string.Format("{0}{1}/{2}", XStringDefineProxy.GetString("Prerogative_Superrisk"), num, num));
+ this.m_LeftTime.SetText(string.Format("[b]{0}/{1}[/b]", arg, XSingleton<XGlobalConfig>.singleton.GetValue("RiskDiceMaxNum")));
+ }
+ bool flag5 = this._doc.RefreshDiceTime == -1f;
+ if (flag5)
+ {
+ this.m_RecoverFullLab.gameObject.SetActive(true);
+ this.m_RecoverFullLab.SetText(XStringDefineProxy.GetString("ReplyDiceFullTips"));
+ this.m_RecoverTime.gameObject.SetActive(false);
+ }
+ else
+ {
+ this.m_RecoverTime.gameObject.SetActive(true);
+ this.m_RecoverTime.SetText(XSingleton<UiUtility>.singleton.TimeFormatString((int)this._doc.RefreshDiceTime, 2, 3, 4, false, true));
+ this.m_RecoverFullLab.gameObject.SetActive(false);
+ }
+ }
+
+ public void SetupSlotBoxes()
+ {
+ this.SlotBoxPool.FakeReturnAll();
+ for (int i = 0; i < 3; i++)
+ {
+ GameObject gameObject = this.SlotBoxPool.FetchGameObject(false);
+ gameObject.name = XSingleton<XCommon>.singleton.StringCombine("slot", i.ToString());
+ gameObject.transform.localPosition = this.SlotBoxPool.TplPos + new Vector3((float)(i * this.SlotBoxPool.TplWidth), 0f);
+ this.m_CachedBoxSlotTimeLabel[i] = (gameObject.transform.Find("State/Time").GetComponent("XUILabel") as IXUILabel);
+ this.m_CachedBoxCostLabel[i] = (gameObject.transform.Find("State/Time/SpeedBtn/Cost").GetComponent("XUILabelSymbol") as IXUILabelSymbol);
+ bool flag = this._doc.SlotBoxInfo.ContainsKey(i);
+ if (flag)
+ {
+ this.SetupSlotBox(gameObject, this._doc.SlotBoxInfo[i], i);
+ }
+ else
+ {
+ this.SetupSlotBox(gameObject, null, i);
+ }
+ }
+ this.SlotBoxPool.ActualReturnAll(false);
+ }
+
+ private void ShowCatchedOnlineBox()
+ {
+ RiskGridInfo gridDynamicInfo = this._doc.GetGridDynamicInfo(XSingleton<XSuperRiskMapMgr>.singleton.CurrentMap.PlayerCoord);
+ bool flag = gridDynamicInfo == null;
+ if (!flag)
+ {
+ bool flag2 = gridDynamicInfo.gridType != RiskGridType.RISK_GRID_ADVENTURE;
+ if (!flag2)
+ {
+ bool isHadOnlineBoxCache = this._doc.IsHadOnlineBoxCache;
+ if (isHadOnlineBoxCache)
+ {
+ this._doc.IsHadOnlineBoxCache = false;
+ this.HideDice();
+ this.ShowOnlineBox();
+ }
+ }
+ }
+ }
+
+ protected void SetupSlotBox(GameObject go, ClientBoxInfo info, int slot)
+ {
+ IXUISprite ixuisprite = go.GetComponent("XUISprite") as IXUISprite;
+ IXUITexture ixuitexture = go.transform.Find("Box").GetComponent("XUITexture") as IXUITexture;
+ IXUISprite ixuisprite2 = ixuitexture.gameObject.transform.Find("Closed").GetComponent("XUISprite") as IXUISprite;
+ GameObject gameObject = go.transform.Find("State").gameObject;
+ bool flag = info == null;
+ if (flag)
+ {
+ ixuitexture.gameObject.SetActive(false);
+ gameObject.SetActive(false);
+ }
+ else
+ {
+ ixuisprite2.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnClickDiscardBox));
+ ixuisprite2.ID = (ulong)slot;
+ bool flag2 = info.state == RiskBoxState.RISK_BOX_CANGETREWARD;
+ if (flag2)
+ {
+ ixuisprite2.SetVisible(false);
+ }
+ else
+ {
+ ixuisprite2.SetVisible(true);
+ }
+ ixuitexture.gameObject.SetActive(true);
+ gameObject.SetActive(true);
+ ixuitexture.SetTexturePath(this.GetBoxPicByState(info.itemID, RiskBoxState.RISK_BOX_LOCKED));
+ Transform transform = go.transform.Find("State/Time");
+ Transform transform2 = go.transform.Find("State/unlock");
+ Transform transform3 = go.transform.Find("State/open");
+ transform.gameObject.SetActive(false);
+ transform2.gameObject.SetActive(false);
+ transform3.gameObject.SetActive(false);
+ switch (info.state)
+ {
+ case RiskBoxState.RISK_BOX_LOCKED:
+ transform2.gameObject.SetActive(true);
+ this.m_BoxSlotTween.SetTargetGameObject(ixuitexture.gameObject);
+ this.m_BoxSlotTween.ResetTween(true);
+ break;
+ case RiskBoxState.RISK_BOX_UNLOCKED:
+ transform.gameObject.SetActive(true);
+ this.m_BoxSlotTween.SetTargetGameObject(ixuitexture.gameObject);
+ this.m_BoxSlotTween.ResetTween(true);
+ break;
+ case RiskBoxState.RISK_BOX_CANGETREWARD:
+ {
+ transform3.gameObject.SetActive(true);
+ bool flag3 = this.m_boxFxs[slot] == null;
+ if (flag3)
+ {
+ this.m_boxFxs[slot] = XSingleton<XFxMgr>.singleton.CreateFx(this.BoxEffectPath, null, true);
+ }
+ else
+ {
+ this.m_boxFxs[slot].SetActive(true);
+ }
+ this.m_boxFxs[slot].Play(transform3, Vector3.zero, Vector3.one, 1f, true, false);
+ this.m_BoxSlotTween.SetTargetGameObject(ixuitexture.gameObject);
+ this.m_BoxSlotTween.PlayTween(true, -1f);
+ break;
+ }
+ }
+ ixuisprite.ID = (ulong)((long)slot);
+ ixuisprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnBoxSlotClicked));
+ }
+ }
+
+ protected void OnBoxSlotClicked(IXUISprite sp)
+ {
+ bool flag = this.SetButtonCool(this.m_fCoolTime);
+ if (!flag)
+ {
+ int num = (int)sp.ID;
+ bool flag2 = this._doc.SlotBoxInfo.ContainsKey(num);
+ if (flag2)
+ {
+ ClientBoxInfo clientBoxInfo = this._doc.SlotBoxInfo[num];
+ bool flag3 = clientBoxInfo != null;
+ if (flag3)
+ {
+ bool flag4 = clientBoxInfo.state == RiskBoxState.RISK_BOX_LOCKED || clientBoxInfo.state == RiskBoxState.RISK_BOX_UNLOCKED;
+ if (flag4)
+ {
+ this.HideDice();
+ this.m_OpenBoxHandler.ShowBox(num);
+ }
+ else
+ {
+ this._doc.ChangeBoxState(num, RiskBoxState.RISK_BOX_GETREWARD);
+ }
+ }
+ }
+ }
+ }
+
+ private bool SetButtonCool(float time)
+ {
+ float num = Time.realtimeSinceStartup - this.m_fLastClickBtnTime;
+ bool flag = num < time;
+ bool result;
+ if (flag)
+ {
+ result = true;
+ }
+ else
+ {
+ this.m_fLastClickBtnTime = Time.realtimeSinceStartup;
+ result = false;
+ }
+ return result;
+ }
+
+ public void MoveStep(Vector2 targetPos)
+ {
+ XSingleton<XAudioMgr>.singleton.PlayUISound("Audio/UI/UI_Anim_DiceGame_CharacterMove", true, AudioChannel.Action);
+ this.PlayerTween.SetPositionTweenPos(0, this.PlayerAvatar.gameObject.transform.parent.localPosition, targetPos);
+ this.PlayerTween.RegisterOnFinishEventHandler(new OnTweenFinishEventHandler(this.OnMoveStepOver));
+ this.PlayerTween.PlayTween(true, -1f);
+ }
+
+ protected void OnMoveStepOver(IXUITweenTool tween)
+ {
+ XSingleton<XAudioMgr>.singleton.StopUISound();
+ this._doc.OnGoStepOver();
+ }
+
+ public void ResetMapAni()
+ {
+ this.m_bIsPlayingResetAnimation = true;
+ this.ResetTween.gameObject.SetActive(true);
+ this.ResetTween.SetTweenGroup(0);
+ this.ResetTween.ResetTweenByGroup(true, 0);
+ this.ResetTween.RegisterOnFinishEventHandler(new OnTweenFinishEventHandler(this.OnResetMapOver));
+ this.ResetTween.PlayTween(true, -1f);
+ }
+
+ protected void OnResetMapOver(IXUITweenTool tween)
+ {
+ this.m_bIsPlayingResetAnimation = false;
+ }
+
+ private void _OnRollClick(IXUISprite uiSprite)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString("NoDice"), "fece00");
+ }
+
+ private bool _OnRollPress(IXUISprite uiSprite, bool isPressed)
+ {
+ if (isPressed)
+ {
+ bool flag = this._doc.StartRoll() && !this.m_bIsPlayingResetAnimation;
+ if (flag)
+ {
+ this.m_rollBarGo.SetActive(true);
+ bool flag2 = this.m_scrollFx == null;
+ if (flag2)
+ {
+ this.m_scrollFx = XSingleton<XFxMgr>.singleton.CreateFx(this.ScrollEffectPath, null, true);
+ }
+ else
+ {
+ this.m_scrollFx.SetActive(true);
+ }
+ this.m_scrollFx.Play(this.m_rollFx.Find("FX"), Vector3.one, Vector3.one, 1f, true, false);
+ this.HideDice();
+ this.m_rollTween.SetTweenGroup(10);
+ this.m_rollTween.PlayTween(true, -1f);
+ this.m_rollTween.SetTweenGroup(4);
+ this.m_rollTween.PlayTween(true, -1f);
+ XSingleton<XAudioMgr>.singleton.PlayUISound("Audio/UI/UI_Button_Dice", true, AudioChannel.Behit);
+ XSingleton<XAudioMgr>.singleton.PlayUISound("Audio/UI/UI_Loop_Dice", true, AudioChannel.Action);
+ }
+ }
+ else
+ {
+ bool flag3 = this._doc.GameState == SuperRiskState.SuperRiskRolling;
+ if (flag3)
+ {
+ this.m_rollBarGo.SetActive(false);
+ bool flag4 = this.m_scrollFx != null;
+ if (flag4)
+ {
+ this.m_scrollFx.SetActive(false);
+ this.m_scrollFx.Stop();
+ }
+ this.m_rollTween.ResetTweenByGroup(true, 10);
+ this.m_rollTween.StopTweenByGroup(4);
+ float z = this.m_rollFx.localRotation.eulerAngles.z;
+ int rollResult = this.GetRollResult(z);
+ XSingleton<XAudioMgr>.singleton.StopUISound();
+ this._doc.GameState = SuperRiskState.SuperRiskSendingRollMes;
+ this._doc.RequestDicing(rollResult);
+ }
+ }
+ return true;
+ }
+
+ protected int GetRollResult(float pos)
+ {
+ float num = 75f;
+ float num2 = 0f;
+ float num3 = (num - pos) / (num - num2);
+ bool flag = (double)num3 <= 0.333;
+ int result;
+ if (flag)
+ {
+ result = 2;
+ }
+ else
+ {
+ bool flag2 = num3 <= 0.667f;
+ if (flag2)
+ {
+ result = 4;
+ }
+ else
+ {
+ result = 6;
+ }
+ }
+ return result;
+ }
+
+ private static void _PlayDice(XGameObject gameObject, object o, int commandID)
+ {
+ SuperRiskGameHandler superRiskGameHandler = o as SuperRiskGameHandler;
+ bool flag = superRiskGameHandler != null;
+ if (flag)
+ {
+ bool flag2 = superRiskGameHandler.m_controller == null;
+ if (flag2)
+ {
+ Transform transform = gameObject.Find("");
+ bool flag3 = transform != null;
+ if (flag3)
+ {
+ superRiskGameHandler.m_controller = transform.GetChild(1).GetChild(0).GetChild(0).GetChild(0).GetChild(0);
+ }
+ }
+ bool flag4 = superRiskGameHandler.m_controller != null;
+ if (flag4)
+ {
+ superRiskGameHandler.m_controller.localRotation = superRiskGameHandler.ValueToQuaternion(superRiskGameHandler.m_DiceAnimValue);
+ }
+ int num = XSingleton<XCommon>.singleton.RandomInt(0, 5);
+ string animationGetLength = (num > 0) ? (superRiskGameHandler.m_DiceDummy.Present.PresentLib.Idle + "_0" + num.ToString()) : superRiskGameHandler.m_DiceDummy.Present.PresentLib.Idle;
+ SuperRiskGameHandler.DiceAnimationTime = superRiskGameHandler.m_DiceDummy.SetAnimationGetLength(animationGetLength);
+ bool flag5 = superRiskGameHandler.m_DiceDummy.Ator != null;
+ if (flag5)
+ {
+ superRiskGameHandler.m_DiceDummy.Ator.RealPlay();
+ }
+ superRiskGameHandler.m_DiceTimer = XSingleton<XTimerMgr>.singleton.SetTimer(SuperRiskGameHandler.DiceAnimationTime, new XTimerMgr.ElapsedEventHandler(superRiskGameHandler.OnDiceAnimationOver), superRiskGameHandler.m_DiceAnimValue);
+ }
+ }
+
+ public void PlayDiceAnimation(int value)
+ {
+ bool flag = this.m_DiceDummy == null;
+ if (flag)
+ {
+ this.m_DiceDummy = XSingleton<XEntityMgr>.singleton.CreateDummy(5102u, 0u, null, false, false, true);
+ }
+ XSingleton<XAudioMgr>.singleton.PlayUISound("Audio/UI/UI_Anim_Dice", true, AudioChannel.Action);
+ this.m_DiceDummy.EngineObject.SetActive(true, "");
+ this.m_DiceDummy.EngineObject.SetParentTrans(this.m_DiceDummyPoint);
+ this.m_DiceDummy.EngineObject.SetLocalPRS(Vector3.zero, true, Quaternion.identity, false, new Vector3(320f, 320f, 320f), true);
+ this.m_DiceAnimValue = value;
+ this.m_DiceDummy.EngineObject.CallCommand(SuperRiskGameHandler._playDiceCb, this, -1, false);
+ }
+
+ protected Quaternion ValueToQuaternion(int value)
+ {
+ Quaternion result;
+ switch (value)
+ {
+ case 1:
+ result = Quaternion.Euler(180f, 0f, 0f);
+ break;
+ case 2:
+ result = Quaternion.Euler(0f, 90f, 0f);
+ break;
+ case 3:
+ result = Quaternion.Euler(90f, 0f, 0f);
+ break;
+ case 4:
+ result = Quaternion.Euler(0f, 270f, 0f);
+ break;
+ case 5:
+ result = Quaternion.Euler(270f, 0f, 0f);
+ break;
+ case 6:
+ result = Quaternion.Euler(0f, 0f, 0f);
+ break;
+ default:
+ result = Quaternion.identity;
+ break;
+ }
+ return result;
+ }
+
+ protected void OnDiceAnimationOver(object o)
+ {
+ XSingleton<XAudioMgr>.singleton.StopUISound();
+ int num = (int)o;
+ XSingleton<XDebug>.singleton.AddLog("go" + num, null, null, null, null, null, XDebugColor.XDebug_None);
+ this._doc.Go(num);
+ }
+
+ public void PlayGetBoxAnimation(uint itemID, int slot)
+ {
+ this.HideDice();
+ XSingleton<XAudioMgr>.singleton.PlayUISound("Audio/UI/UI_Anim_DiceGame_ChestDrop", true, AudioChannel.Action);
+ this.m_GetBoxFrame.SetActive(true);
+ this.m_CacheItemID = itemID;
+ this.m_CacheSlot = slot;
+ IXUITexture ixuitexture = this.m_GetBoxFrame.transform.Find("Box").GetComponent("XUITexture") as IXUITexture;
+ ixuitexture.SetTexturePath(this.GetBoxPicByState(itemID, RiskBoxState.RISK_BOX_LOCKED));
+ GameObject gameObject = this.m_GetBoxFrame.transform.Find("FX").gameObject;
+ this.m_GetBoxTween.SetTargetGameObject(gameObject);
+ this.m_GetBoxTween.SetTweenGroup(0);
+ this.m_GetBoxTween.PlayTween(true, -1f);
+ this.m_GetBoxTween.SetTargetGameObject(ixuitexture.gameObject);
+ this.m_GetBoxTween.SetTweenGroup(0);
+ this.m_GetBoxTween.RegisterOnFinishEventHandler(new OnTweenFinishEventHandler(this.BoxFlyInOver));
+ this.m_GetBoxTween.PlayTween(true, -1f);
+ }
+
+ protected void BoxFlyInOver(IXUITweenTool tween)
+ {
+ GameObject gameObject = this.m_GetBoxFrame.transform.Find("Box").gameObject;
+ List<GameObject> list = ListPool<GameObject>.Get();
+ this.SlotBoxPool.GetActiveList(list);
+ Transform transform = list[this.m_CacheSlot].transform;
+ ListPool<GameObject>.Release(list);
+ Vector3 vector = gameObject.transform.parent.InverseTransformPoint(transform.position);
+ this.m_GetBoxTween.SetTargetGameObject(gameObject);
+ XSingleton<XAudioMgr>.singleton.PlayUISound("Audio/UI/UI_Anim_DiceGame_ChestDrop", true, AudioChannel.Action);
+ this.m_GetBoxTween.SetPositionTweenPos(2, new Vector3(0f, -128f), vector + new Vector3(0f, -34f));
+ this.m_GetBoxTween.SetTweenGroup(2);
+ this.m_GetBoxTween.RegisterOnFinishEventHandler(new OnTweenFinishEventHandler(this.ShowBoxOver));
+ this.m_GetBoxTween.PlayTween(true, -1f);
+ }
+
+ protected void ShowBoxOver(IXUITweenTool tween)
+ {
+ this.m_GetBoxFrame.SetActive(false);
+ IXUITexture ixuitexture = this.m_GetBoxFrame.transform.Find("Box").GetComponent("XUITexture") as IXUITexture;
+ ixuitexture.SetTexturePath("");
+ this.UpdateSlotBox(this.m_CacheSlot);
+ XSingleton<XAudioMgr>.singleton.StopUISound();
+ this._doc.OnGetBoxAnimationOver();
+ }
+
+ public void UpdateSlotBox(int slot)
+ {
+ Transform transform = base.PanelObject.transform.Find("BoxSlot/slot" + slot);
+ bool flag = transform == null;
+ if (!flag)
+ {
+ GameObject gameObject = transform.gameObject;
+ bool flag2 = this._doc.SlotBoxInfo.ContainsKey(slot);
+ if (flag2)
+ {
+ ClientBoxInfo info = this._doc.SlotBoxInfo[slot];
+ this.SetupSlotBox(gameObject, info, slot);
+ }
+ else
+ {
+ this.SetupSlotBox(gameObject, null, slot);
+ }
+ bool flag3 = this.m_OpenBoxHandler != null && this.m_OpenBoxHandler.IsVisible();
+ if (flag3)
+ {
+ this.m_OpenBoxHandler.BoxStateChange(slot);
+ }
+ }
+ }
+
+ public void ShowOnlineBox()
+ {
+ bool flag = !this.m_OnlineBoxHandler.IsVisible();
+ if (flag)
+ {
+ this.m_OnlineBoxHandler.SetVisible(true);
+ }
+ }
+
+ public void CloseOnlineBox()
+ {
+ bool flag = this.m_OnlineBoxHandler.IsVisible();
+ if (flag)
+ {
+ this.m_OnlineBoxHandler.SetVisible(false);
+ }
+ }
+
+ public override void OnUpdate()
+ {
+ base.OnUpdate();
+ bool flag = this._doc == null;
+ if (!flag)
+ {
+ bool flag2 = this._doc.RefreshDiceTime < 0f;
+ if (flag2)
+ {
+ this.m_RecoverFullLab.gameObject.SetActive(true);
+ this.m_RecoverFullLab.SetText(XStringDefineProxy.GetString("ReplyDiceFullTips"));
+ this.m_RecoverTime.gameObject.SetActive(false);
+ }
+ else
+ {
+ this.m_RecoverTime.gameObject.SetActive(true);
+ this.m_RecoverTime.SetText(XSingleton<UiUtility>.singleton.TimeFormatString((int)this._doc.RefreshDiceTime, 2, 3, 4, false, true));
+ this.m_RecoverFullLab.gameObject.SetActive(false);
+ }
+ int num = 0;
+ while ((long)num < (long)((ulong)SuperRiskGameHandler.total_slot_box))
+ {
+ bool flag3 = this._doc.SlotBoxInfo.ContainsKey(num);
+ if (flag3)
+ {
+ bool flag4 = this._doc.SlotBoxInfo[num] != null && this._doc.SlotBoxInfo[num].state == RiskBoxState.RISK_BOX_UNLOCKED;
+ if (flag4)
+ {
+ float leftTime = this._doc.SlotBoxInfo[num].leftTime;
+ bool flag5 = this.m_CachedBoxSlotTimeLabel[num] != null;
+ if (flag5)
+ {
+ this.m_CachedBoxSlotTimeLabel[num].SetText(XSingleton<UiUtility>.singleton.TimeFormatString((int)leftTime, 2, 3, 4, false, true));
+ this.SetCost(this._doc.SlotBoxInfo[num], this.m_CachedBoxCostLabel[num]);
+ }
+ }
+ }
+ num++;
+ }
+ bool flag6 = this.m_OpenBoxHandler != null;
+ if (flag6)
+ {
+ this.m_OpenBoxHandler.OnUpdate();
+ }
+ }
+ }
+
+ private void SetCost(ClientBoxInfo data, IXUILabelSymbol lab)
+ {
+ bool flag = data == null;
+ if (flag)
+ {
+ lab.InputText = XLabelSymbolHelper.FormatCostWithIcon(0, (ItemEnum)0);
+ }
+ else
+ {
+ ItemList.RowData itemConf = XBagDocument.GetItemConf((int)data.itemID);
+ bool flag2 = itemConf == null;
+ if (flag2)
+ {
+ lab.InputText = XLabelSymbolHelper.FormatCostWithIcon(0, (ItemEnum)0);
+ }
+ else
+ {
+ int itemQuality = (int)itemConf.ItemQuality;
+ SuperRiskSpeedCost speedCost = this._doc.GetSpeedCost(itemQuality);
+ bool flag3 = (int)data.leftTime % speedCost.time == 0;
+ int cost;
+ if (flag3)
+ {
+ cost = (int)data.leftTime / speedCost.time * speedCost.itemCount;
+ }
+ else
+ {
+ cost = ((int)data.leftTime / speedCost.time + 1) * speedCost.itemCount;
+ }
+ lab.InputText = XLabelSymbolHelper.FormatCostWithIcon(cost, (ItemEnum)speedCost.itemID);
+ }
+ }
+ }
+
+ public void ShowNoticeFrame()
+ {
+ this.HideDice();
+ this.m_NoticeFrame.SetActive(true);
+ }
+
+ protected bool _NoticeYesClick(IXUIButton sp)
+ {
+ this.m_NoticeFrame.SetActive(false);
+ return true;
+ }
+
+ protected bool _NoticeNoClick(IXUIButton sp)
+ {
+ this.m_NoticeFrame.SetActive(false);
+ this._doc.NoticeMoveOver();
+ return true;
+ }
+
+ private void OnClickDiscardBox(IXUISprite sp)
+ {
+ this.m_discardBoxId = (int)sp.ID;
+ ClientBoxInfo clientBoxInfo = this._doc.SlotBoxInfo[this.m_discardBoxId];
+ bool flag = clientBoxInfo == null;
+ if (!flag)
+ {
+ bool flag2 = clientBoxInfo.state == RiskBoxState.RISK_BOX_CANGETREWARD;
+ if (!flag2)
+ {
+ string @string = XStringDefineProxy.GetString("DiscardSuperriskBox");
+ XSingleton<UiUtility>.singleton.ShowModalDialog(@string, XStringDefineProxy.GetString("COMMON_OK"), XStringDefineProxy.GetString("COMMON_CANCEL"), new ButtonClickEventHandler(this.SendDiscardBoxMes));
+ }
+ }
+ }
+
+ private bool SendDiscardBoxMes(IXUIButton btn)
+ {
+ this._doc.ChangeBoxState(this.m_discardBoxId, RiskBoxState.RISK_BOX_DELETE);
+ XSingleton<UiUtility>.singleton.CloseModalDlg();
+ return true;
+ }
+
+ private bool OnCloseClick(IXUIButton go)
+ {
+ bool flag = this._doc.GameState == SuperRiskState.SuperRiskSendingRollMes || this._doc.GameState == SuperRiskState.SuperRiskRolling || this._doc.GameState == SuperRiskState.SuperRiskDicing || this._doc.GameState == SuperRiskState.SuperRiskMoving || this._doc.GameState == SuperRiskState.SuperRiskEvent || this._doc.GameState == SuperRiskState.SuperRiskRefreshMap;
+ bool result;
+ if (flag)
+ {
+ result = true;
+ }
+ else
+ {
+ this._doc.GameState = SuperRiskState.SuperRiskReadyToMove;
+ bool flag2 = DlgBase<SuperRiskDlg, SuperRiskDlgBehaviour>.singleton.IsVisible();
+ if (flag2)
+ {
+ DlgBase<SuperRiskDlg, SuperRiskDlgBehaviour>.singleton.ShowSelectMap();
+ }
+ result = true;
+ }
+ return result;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/SuperRiskGameHandler.cs.meta b/Client/Assets/Scripts/XMainClient/UI/SuperRiskGameHandler.cs.meta
new file mode 100644
index 00000000..4ad79619
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/SuperRiskGameHandler.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: a8e632df4b7ed344d82487db01579ca7
+timeCreated: 1611404296
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/SuperRiskOnlineBoxHandler.cs b/Client/Assets/Scripts/XMainClient/UI/SuperRiskOnlineBoxHandler.cs
new file mode 100644
index 00000000..ad829bea
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/SuperRiskOnlineBoxHandler.cs
@@ -0,0 +1,96 @@
+using System;
+using UILib;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class SuperRiskOnlineBoxHandler : DlgHandlerBase
+ {
+ private XSuperRiskDocument _doc;
+
+ private IXUITweenTool m_BoxTween;
+
+ private IXUIButton m_BuyBtn;
+
+ private IXUIButton m_CancleBtn;
+
+ private IXUILabel m_CostLab;
+
+ private IXUISprite m_CostIcon;
+
+ protected override void Init()
+ {
+ this._doc = XSuperRiskDocument.Doc;
+ this.m_CancleBtn = (base.PanelObject.transform.Find("no").GetComponent("XUIButton") as IXUIButton);
+ this.m_BuyBtn = (base.PanelObject.transform.Find("Buy").GetComponent("XUIButton") as IXUIButton);
+ this.m_CostLab = (base.PanelObject.transform.Find("Buy/Cost").GetComponent("XUILabel") as IXUILabel);
+ this.m_CostIcon = (base.PanelObject.transform.Find("Buy/Cost/b").GetComponent("XUISprite") as IXUISprite);
+ this.m_BoxTween = (base.PanelObject.transform.Find("Box").GetComponent("XUIPlayTween") as IXUITweenTool);
+ }
+
+ public override void RegisterEvent()
+ {
+ this.m_CancleBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnCancleClick));
+ this.m_BuyBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnBuyClick));
+ base.RegisterEvent();
+ }
+
+ protected override void OnHide()
+ {
+ base.OnHide();
+ }
+
+ protected override void OnShow()
+ {
+ this.FillContent();
+ base.OnShow();
+ }
+
+ private void FillContent()
+ {
+ bool flag = this._doc.OnlineBoxCost != null;
+ if (flag)
+ {
+ this.m_CostLab.SetText(this._doc.OnlineBoxCost.itemCount.ToString());
+ ItemList.RowData itemConf = XBagDocument.GetItemConf((int)this._doc.OnlineBoxCost.itemID);
+ this.m_CostIcon.SetSprite(itemConf.ItemIcon1[0]);
+ }
+ XSingleton<XAudioMgr>.singleton.PlayUISound("Audio/UI/UI_Anim_DiceGame_OpenChest", true, AudioChannel.Action);
+ this.m_BoxTween.SetTweenGroup(0);
+ this.m_BoxTween.ResetTweenByGroup(true, 0);
+ this.m_BoxTween.PlayTween(true, -1f);
+ }
+
+ private bool OnCancleClick(IXUIButton btn)
+ {
+ base.SetVisible(false);
+ return true;
+ }
+
+ private bool OnBuyClick(IXUIButton btn)
+ {
+ bool flag = this._doc.OnlineBoxCost == null;
+ bool result;
+ if (flag)
+ {
+ result = true;
+ }
+ else
+ {
+ ulong itemCount = XBagDocument.BagDoc.GetItemCount((int)this._doc.OnlineBoxCost.itemID);
+ bool flag2 = (ulong)this._doc.OnlineBoxCost.itemCount > itemCount;
+ if (flag2)
+ {
+ XSingleton<UiUtility>.singleton.ShowItemAccess((int)this._doc.OnlineBoxCost.itemID, null);
+ result = true;
+ }
+ else
+ {
+ this._doc.ReqBuyOnlineBox();
+ result = true;
+ }
+ }
+ return result;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/SuperRiskOnlineBoxHandler.cs.meta b/Client/Assets/Scripts/XMainClient/UI/SuperRiskOnlineBoxHandler.cs.meta
new file mode 100644
index 00000000..7cd36261
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/SuperRiskOnlineBoxHandler.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 7fc727f1ebc123d479b4b48259d60702
+timeCreated: 1611404031
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/SuperRiskOpenboxHandler.cs b/Client/Assets/Scripts/XMainClient/UI/SuperRiskOpenboxHandler.cs
new file mode 100644
index 00000000..d04822e3
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/SuperRiskOpenboxHandler.cs
@@ -0,0 +1,359 @@
+using System;
+using System.Collections.Generic;
+using KKSG;
+using UILib;
+using UnityEngine;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class SuperRiskOpenboxHandler : DlgHandlerBase
+ {
+ private IXUITexture m_TopBox;
+
+ private XUIPool BoxPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ private GameObject m_SpeedFrame;
+
+ private IXUILabel m_SpeedTime;
+
+ private IXUIButton m_SpeedButton;
+
+ private IXUILabelSymbol m_SpeedCost;
+
+ private IXUIButton m_StartButton;
+
+ private IXUILabel m_StartTime;
+
+ private IXUISprite m_CloseBg;
+
+ private XSuperRiskDocument _doc;
+
+ private int m_CurrentSlot = -1;
+
+ private float m_fCoolTime = 1f;
+
+ private float m_fLastClickBtnTime = 0f;
+
+ private float m_fLastClickBtnTime1 = 0f;
+
+ protected override void Init()
+ {
+ this._doc = (XSingleton<XGame>.singleton.Doc.GetXComponent(XSuperRiskDocument.uuID) as XSuperRiskDocument);
+ this.m_CloseBg = (base.PanelObject.transform.Find("Close").GetComponent("XUISprite") as IXUISprite);
+ this.m_TopBox = (base.PanelObject.transform.Find("Box").GetComponent("XUITexture") as IXUITexture);
+ Transform transform = base.PanelObject.transform.Find("List/Item");
+ this.BoxPool.SetupPool(transform.parent.gameObject, transform.gameObject, 3u, false);
+ this.m_SpeedFrame = base.PanelObject.transform.Find("SpeedFrame").gameObject;
+ this.m_SpeedTime = (base.PanelObject.transform.Find("SpeedFrame/Time").GetComponent("XUILabel") as IXUILabel);
+ this.m_SpeedButton = (base.PanelObject.transform.Find("SpeedFrame/SpeedBtn").GetComponent("XUIButton") as IXUIButton);
+ this.m_SpeedCost = (base.PanelObject.transform.Find("SpeedFrame/SpeedBtn/Cost").GetComponent("XUILabelSymbol") as IXUILabelSymbol);
+ this.m_StartButton = (base.PanelObject.transform.Find("OpenBtn").GetComponent("XUIButton") as IXUIButton);
+ this.m_StartTime = (base.PanelObject.transform.Find("OpenBtn/Time").GetComponent("XUILabel") as IXUILabel);
+ }
+
+ public override void RegisterEvent()
+ {
+ this.m_CloseBg.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnCloseClick));
+ this.m_SpeedButton.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnSpeedClick));
+ this.m_StartButton.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnStartClick));
+ base.RegisterEvent();
+ }
+
+ protected void OnCloseClick(IXUISprite sp)
+ {
+ base.SetVisible(false);
+ }
+
+ protected override void OnHide()
+ {
+ this.m_CurrentSlot = -1;
+ base.OnHide();
+ }
+
+ public void ClearCatchTex()
+ {
+ this.m_TopBox.SetTexturePath("");
+ }
+
+ public void ShowBox(int slot)
+ {
+ base.SetVisible(true);
+ ClientBoxInfo clientBoxInfo = this._doc.SlotBoxInfo[slot];
+ bool flag = clientBoxInfo != null;
+ if (flag)
+ {
+ this.m_CurrentSlot = slot;
+ int num = -1;
+ ItemList.RowData itemConf = XBagDocument.GetItemConf((int)clientBoxInfo.itemID);
+ bool flag2 = itemConf != null;
+ if (flag2)
+ {
+ num = (int)itemConf.ItemQuality;
+ }
+ this.m_TopBox.SetTexturePath(this.GetBoxPicByState(clientBoxInfo.itemID, RiskBoxState.RISK_BOX_LOCKED));
+ this.BoxPool.ReturnAll(false);
+ int num2 = 0;
+ RiskMapFile.RowData currentMapData = this._doc.GetCurrentMapData();
+ for (int i = 0; i < currentMapData.BoxPreview.Count; i++)
+ {
+ bool flag3 = currentMapData.BoxPreview[i, 0] == num;
+ if (flag3)
+ {
+ num2++;
+ }
+ }
+ int num3 = -(num2 - 1) * this.BoxPool.TplWidth / 2;
+ int num4 = 0;
+ for (int j = 0; j < currentMapData.BoxPreview.Count; j++)
+ {
+ bool flag4 = currentMapData.BoxPreview[j, 0] == num;
+ if (flag4)
+ {
+ GameObject gameObject = this.BoxPool.FetchGameObject(false);
+ gameObject.transform.localPosition = new Vector3((float)(num3 + num4 * this.BoxPool.TplWidth), 0f, 0f);
+ XSingleton<XItemDrawerMgr>.singleton.normalItemDrawer.DrawItem(gameObject, currentMapData.BoxPreview[j, 1], currentMapData.BoxPreview[j, 2], false);
+ IXUISprite ixuisprite = gameObject.transform.Find("Icon").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.ID = (ulong)((long)currentMapData.BoxPreview[j, 1]);
+ ixuisprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(XSingleton<UiUtility>.singleton.OnItemClick));
+ num4++;
+ }
+ }
+ bool flag5 = clientBoxInfo.state == RiskBoxState.RISK_BOX_LOCKED;
+ if (flag5)
+ {
+ this.m_StartButton.gameObject.SetActive(true);
+ this.m_SpeedFrame.SetActive(false);
+ this.m_StartTime.SetText(XSingleton<UiUtility>.singleton.TimeFormatString((int)clientBoxInfo.leftTime, 2, 3, 4, false, true));
+ }
+ bool flag6 = clientBoxInfo.state == RiskBoxState.RISK_BOX_UNLOCKED;
+ if (flag6)
+ {
+ this.m_StartButton.gameObject.SetActive(false);
+ this.m_SpeedFrame.SetActive(true);
+ SuperRiskSpeedCost speedCost = this._doc.GetSpeedCost(num);
+ bool flag7 = (int)clientBoxInfo.leftTime % speedCost.time == 0;
+ int cost;
+ if (flag7)
+ {
+ cost = (int)clientBoxInfo.leftTime / speedCost.time * speedCost.itemCount;
+ }
+ else
+ {
+ cost = ((int)clientBoxInfo.leftTime / speedCost.time + 1) * speedCost.itemCount;
+ }
+ this.m_SpeedCost.InputText = XLabelSymbolHelper.FormatCostWithIcon(cost, (ItemEnum)speedCost.itemID);
+ }
+ bool flag8 = clientBoxInfo.state == RiskBoxState.RISK_BOX_CANGETREWARD || clientBoxInfo.state == RiskBoxState.RISK_BOX_GETREWARD;
+ if (flag8)
+ {
+ XSingleton<XDebug>.singleton.AddErrorLog("Wrong super risk state!", null, null, null, null, null);
+ }
+ }
+ }
+
+ public void BoxStateChange(int slot)
+ {
+ bool flag = slot != this.m_CurrentSlot;
+ if (!flag)
+ {
+ bool flag2 = this._doc.SlotBoxInfo.ContainsKey(slot);
+ if (flag2)
+ {
+ ClientBoxInfo clientBoxInfo = this._doc.SlotBoxInfo[slot];
+ bool flag3 = clientBoxInfo != null && clientBoxInfo.state == RiskBoxState.RISK_BOX_UNLOCKED;
+ if (flag3)
+ {
+ this.m_StartButton.gameObject.SetActive(false);
+ this.m_SpeedFrame.SetActive(true);
+ this.m_SpeedTime.SetText(XSingleton<UiUtility>.singleton.TimeFormatString((int)clientBoxInfo.leftTime, 0, 3, 4, false, true));
+ int quality = 1;
+ ItemList.RowData itemConf = XBagDocument.GetItemConf((int)clientBoxInfo.itemID);
+ bool flag4 = itemConf != null;
+ if (flag4)
+ {
+ quality = (int)itemConf.ItemQuality;
+ }
+ SuperRiskSpeedCost speedCost = this._doc.GetSpeedCost(quality);
+ bool flag5 = (int)clientBoxInfo.leftTime % speedCost.time == 0;
+ int cost;
+ if (flag5)
+ {
+ cost = (int)clientBoxInfo.leftTime / speedCost.time * speedCost.itemCount;
+ }
+ else
+ {
+ cost = ((int)clientBoxInfo.leftTime / speedCost.time + 1) * speedCost.itemCount;
+ }
+ this.m_SpeedCost.InputText = XLabelSymbolHelper.FormatCostWithIcon(cost, (ItemEnum)speedCost.itemID);
+ }
+ bool flag6 = clientBoxInfo.state == RiskBoxState.RISK_BOX_CANGETREWARD;
+ if (flag6)
+ {
+ base.SetVisible(false);
+ }
+ }
+ else
+ {
+ base.SetVisible(false);
+ }
+ }
+ }
+
+ private string GetBoxPicByState(uint itemID, RiskBoxState state)
+ {
+ ItemList.RowData itemConf = XBagDocument.GetItemConf((int)itemID);
+ bool flag = itemConf != null;
+ string result;
+ if (flag)
+ {
+ string text = XSingleton<XCommon>.singleton.StringCombine("atlas/UI/GameSystem/SuperRisk/bx", ((int)(itemConf.ItemQuality - 1)).ToString());
+ bool flag2 = state == RiskBoxState.RISK_BOX_UNLOCKED;
+ if (flag2)
+ {
+ text = XSingleton<XCommon>.singleton.StringCombine(text, "_1");
+ }
+ result = text;
+ }
+ else
+ {
+ result = "";
+ }
+ return result;
+ }
+
+ public bool OnSpeedClick(IXUIButton button)
+ {
+ bool flag = this.SetButtonCool(this.m_fCoolTime);
+ bool result;
+ if (flag)
+ {
+ result = true;
+ }
+ else
+ {
+ ClientBoxInfo clientBoxInfo = this._doc.SlotBoxInfo[this.m_CurrentSlot];
+ bool flag2 = clientBoxInfo == null;
+ if (flag2)
+ {
+ result = true;
+ }
+ else
+ {
+ ItemList.RowData itemConf = XBagDocument.GetItemConf((int)clientBoxInfo.itemID);
+ bool flag3 = itemConf == null;
+ if (flag3)
+ {
+ result = true;
+ }
+ else
+ {
+ int itemQuality = (int)itemConf.ItemQuality;
+ SuperRiskSpeedCost speedCost = this._doc.GetSpeedCost(itemQuality);
+ ulong itemCount = XBagDocument.BagDoc.GetItemCount(speedCost.itemID);
+ bool flag4 = (int)clientBoxInfo.leftTime % speedCost.time == 0;
+ int num;
+ if (flag4)
+ {
+ num = (int)clientBoxInfo.leftTime / speedCost.time * speedCost.itemCount;
+ }
+ else
+ {
+ num = ((int)clientBoxInfo.leftTime / speedCost.time + 1) * speedCost.itemCount;
+ }
+ bool flag5 = (long)num > (long)itemCount;
+ if (flag5)
+ {
+ XSingleton<UiUtility>.singleton.ShowItemAccess(speedCost.itemID, null);
+ result = true;
+ }
+ else
+ {
+ this._doc.ChangeBoxState(this.m_CurrentSlot, RiskBoxState.RISK_BOX_CANGETREWARD);
+ result = true;
+ }
+ }
+ }
+ }
+ return result;
+ }
+
+ public bool OnStartClick(IXUIButton button)
+ {
+ bool flag = this.SetButtonCool1(this.m_fCoolTime);
+ bool result;
+ if (flag)
+ {
+ result = true;
+ }
+ else
+ {
+ foreach (KeyValuePair<int, ClientBoxInfo> keyValuePair in this._doc.SlotBoxInfo)
+ {
+ bool flag2 = keyValuePair.Value.state == RiskBoxState.RISK_BOX_UNLOCKED;
+ if (flag2)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString("CannotUnLockAnyBox"), "fece00");
+ return true;
+ }
+ }
+ this._doc.ChangeBoxState(this.m_CurrentSlot, RiskBoxState.RISK_BOX_UNLOCKED);
+ result = true;
+ }
+ return result;
+ }
+
+ public override void OnUpdate()
+ {
+ base.OnUpdate();
+ bool flag = this.m_CurrentSlot == -1;
+ if (!flag)
+ {
+ bool flag2 = this._doc.SlotBoxInfo.ContainsKey(this.m_CurrentSlot);
+ if (flag2)
+ {
+ ClientBoxInfo clientBoxInfo = this._doc.SlotBoxInfo[this.m_CurrentSlot];
+ bool flag3 = clientBoxInfo.state == RiskBoxState.RISK_BOX_UNLOCKED;
+ if (flag3)
+ {
+ this.m_SpeedTime.SetText(XSingleton<UiUtility>.singleton.TimeFormatString((int)clientBoxInfo.leftTime, 2, 3, 4, false, true));
+ }
+ }
+ }
+ }
+
+ private bool SetButtonCool(float time)
+ {
+ float num = Time.realtimeSinceStartup - this.m_fLastClickBtnTime;
+ bool flag = num < time;
+ bool result;
+ if (flag)
+ {
+ result = true;
+ }
+ else
+ {
+ this.m_fLastClickBtnTime = Time.realtimeSinceStartup;
+ result = false;
+ }
+ return result;
+ }
+
+ private bool SetButtonCool1(float time)
+ {
+ float num = Time.realtimeSinceStartup - this.m_fLastClickBtnTime1;
+ bool flag = num < time;
+ bool result;
+ if (flag)
+ {
+ result = true;
+ }
+ else
+ {
+ this.m_fLastClickBtnTime1 = Time.realtimeSinceStartup;
+ result = false;
+ }
+ return result;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/SuperRiskOpenboxHandler.cs.meta b/Client/Assets/Scripts/XMainClient/UI/SuperRiskOpenboxHandler.cs.meta
new file mode 100644
index 00000000..d7956005
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/SuperRiskOpenboxHandler.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 9f348663f6853934da13c58db3df7686
+timeCreated: 1611404244
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/SuperRiskSelectMapHandler.cs b/Client/Assets/Scripts/XMainClient/UI/SuperRiskSelectMapHandler.cs
new file mode 100644
index 00000000..5139f4b7
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/SuperRiskSelectMapHandler.cs
@@ -0,0 +1,206 @@
+using System;
+using System.Collections.Generic;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class SuperRiskSelectMapHandler : DlgHandlerBase
+ {
+ protected override string FileName
+ {
+ get
+ {
+ return "GameSystem/SuperRisk/SelectMapHandler";
+ }
+ }
+
+ private XSuperRiskDocument _doc;
+
+ private IXUIButton m_Close;
+
+ private IXUIButton m_Help;
+
+ private List<Transform> m_btnTras = new List<Transform>();
+
+ private float m_fCoolTime = 1f;
+
+ private float m_fLastClickBtnTime = 0f;
+
+ protected override void Init()
+ {
+ base.Init();
+ this._doc = (XSingleton<XGame>.singleton.Doc.GetXComponent(XSuperRiskDocument.uuID) as XSuperRiskDocument);
+ this.m_btnTras.Clear();
+ Transform transform = base.PanelObject.transform.Find("Bg/RiskMap/SelectMap");
+ for (int i = 0; i < transform.childCount; i++)
+ {
+ Transform item = transform.Find(XSingleton<XCommon>.singleton.StringCombine("Map", i.ToString()));
+ this.m_btnTras.Add(item);
+ }
+ this.m_Close = (base.PanelObject.transform.Find("Bg/panel/Close").GetComponent("XUIButton") as IXUIButton);
+ this.m_Help = (base.transform.Find("Bg/panel/Help").GetComponent("XUIButton") as IXUIButton);
+ }
+
+ public override void RegisterEvent()
+ {
+ this.m_Close.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnCloseClick));
+ this.m_Help.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnHelpClicked));
+ }
+
+ public bool OnHelpClicked(IXUIButton button)
+ {
+ DlgBase<XCommonHelpTipView, XCommonHelpTipBehaviour>.singleton.ShowHelp(XSysDefine.XSys_SuperRisk);
+ return true;
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ this.FillContent();
+ }
+
+ private void FillContent()
+ {
+ bool flag = false;
+ for (int i = 0; i < this.m_btnTras.Count; i++)
+ {
+ RiskMapFile.RowData mapIdByIndex = this._doc.GetMapIdByIndex(i);
+ bool flag2 = mapIdByIndex == null;
+ if (flag2)
+ {
+ this.m_btnTras[i].Find("Map").gameObject.SetActive(false);
+ this.m_btnTras[i].Find("Cloud/T").gameObject.SetActive(false);
+ this.m_btnTras[i].Find("Cloud").gameObject.SetActive(true);
+ }
+ else
+ {
+ uint num = 0u;
+ bool flag3 = XSingleton<XAttributeMgr>.singleton.XPlayerData != null;
+ if (flag3)
+ {
+ num = XSingleton<XAttributeMgr>.singleton.XPlayerData.Level;
+ }
+ this.m_btnTras[i].Find("Map").gameObject.SetActive(false);
+ bool flag4 = (ulong)num > (ulong)((long)mapIdByIndex.NeedLevel);
+ if (flag4)
+ {
+ this.m_btnTras[i].Find("Cloud").gameObject.SetActive(false);
+ IXUISprite ixuisprite = this.m_btnTras[i].GetComponent("XUISprite") as IXUISprite;
+ bool flag5 = mapIdByIndex == null;
+ if (flag5)
+ {
+ ixuisprite.ID = 0UL;
+ }
+ else
+ {
+ ixuisprite.ID = (ulong)((long)mapIdByIndex.MapID);
+ }
+ ixuisprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnMapClick));
+ ixuisprite.RegisterSpritePressEventHandler(new SpritePressEventHandler(this.OnMapPress));
+ }
+ else
+ {
+ bool flag6 = (ulong)num < (ulong)((long)mapIdByIndex.NeedLevel);
+ if (flag6)
+ {
+ bool flag7 = flag;
+ if (flag7)
+ {
+ this.m_btnTras[i].Find("Cloud").gameObject.SetActive(true);
+ this.m_btnTras[i].Find("Cloud/T").gameObject.SetActive(false);
+ }
+ else
+ {
+ this.m_btnTras[i].Find("Cloud").gameObject.SetActive(true);
+ IXUILabel ixuilabel = this.m_btnTras[i].Find("Cloud/T").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel.gameObject.SetActive(true);
+ ixuilabel.SetText(string.Format(XStringDefineProxy.GetString("OPEN_AT_LEVEL"), mapIdByIndex.NeedLevel));
+ flag = true;
+ }
+ }
+ else
+ {
+ bool flag8 = num > this._doc.HisMaxLevel.PreLevel;
+ if (flag8)
+ {
+ this._doc.HisMaxLevel.PreLevel = num;
+ this.m_btnTras[i].Find("Cloud/T").gameObject.SetActive(false);
+ IXUITweenTool ixuitweenTool = this.m_btnTras[i].Find("Cloud").GetComponent("XUIPlayTween") as IXUITweenTool;
+ ixuitweenTool.gameObject.SetActive(true);
+ ixuitweenTool.SetTweenGroup(0);
+ ixuitweenTool.ResetTweenByGroup(true, 0);
+ ixuitweenTool.PlayTween(true, -1f);
+ }
+ else
+ {
+ this.m_btnTras[i].Find("Cloud").gameObject.SetActive(false);
+ }
+ IXUISprite ixuisprite = this.m_btnTras[i].GetComponent("XUISprite") as IXUISprite;
+ bool flag9 = mapIdByIndex == null;
+ if (flag9)
+ {
+ ixuisprite.ID = 0UL;
+ }
+ else
+ {
+ ixuisprite.ID = (ulong)((long)mapIdByIndex.MapID);
+ }
+ ixuisprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnMapClick));
+ ixuisprite.RegisterSpritePressEventHandler(new SpritePressEventHandler(this.OnMapPress));
+ }
+ }
+ }
+ }
+ }
+
+ private bool OnCloseClick(IXUIButton go)
+ {
+ XSuperRiskDocument specificDocument = XDocuments.GetSpecificDocument<XSuperRiskDocument>(XSuperRiskDocument.uuID);
+ specificDocument.NeedUpdate = false;
+ base.SetVisible(false);
+ DlgBase<SuperRiskDlg, SuperRiskDlgBehaviour>.singleton.SetVisible(false, true);
+ return true;
+ }
+
+ private void OnMapClick(IXUISprite button)
+ {
+ bool flag = this.SetButtonCool(this.m_fCoolTime);
+ if (!flag)
+ {
+ bool flag2 = button.ID == 0UL;
+ if (!flag2)
+ {
+ this._doc.CurrentMapID = (int)button.ID;
+ DlgBase<SuperRiskDlg, SuperRiskDlgBehaviour>.singleton.ShowGameMap();
+ }
+ }
+ }
+
+ private bool OnMapPress(IXUISprite uiSprite, bool isPressed)
+ {
+ GameObject gameObject = uiSprite.gameObject.transform.Find("Map").gameObject;
+ gameObject.SetActive(isPressed);
+ return true;
+ }
+
+ private bool SetButtonCool(float time)
+ {
+ float num = Time.realtimeSinceStartup - this.m_fLastClickBtnTime;
+ bool flag = num < time;
+ bool result;
+ if (flag)
+ {
+ result = true;
+ }
+ else
+ {
+ this.m_fLastClickBtnTime = Time.realtimeSinceStartup;
+ result = false;
+ }
+ return result;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/SuperRiskSelectMapHandler.cs.meta b/Client/Assets/Scripts/XMainClient/UI/SuperRiskSelectMapHandler.cs.meta
new file mode 100644
index 00000000..dbc83d9c
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/SuperRiskSelectMapHandler.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: f34c1654bba2aa44c820da5ad77e9724
+timeCreated: 1611404847
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/SystemHelpBehaviour.cs b/Client/Assets/Scripts/XMainClient/UI/SystemHelpBehaviour.cs
new file mode 100644
index 00000000..c6273a6f
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/SystemHelpBehaviour.cs
@@ -0,0 +1,42 @@
+using System;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+
+namespace XMainClient.UI
+{
+ public class SystemHelpBehaviour : DlgBehaviourBase
+ {
+ public IXUILabel m_Label = null;
+
+ public IXUILabelSymbol m_LabelSymbol = null;
+
+ public IXUILabel m_Title = null;
+
+ public IXUILabelSymbol m_TitleSymbol = null;
+
+ public IXUIButton m_OKButton = null;
+
+ public IXUISprite m_Grey = null;
+
+ public IXUITweenTool m_PlayTween = null;
+
+ public IXUIPanel m_Panel = null;
+
+ private void Awake()
+ {
+ Transform transform = base.transform.Find("Bg/Label");
+ this.m_Label = (transform.GetComponent("XUILabel") as IXUILabel);
+ this.m_LabelSymbol = (transform.GetComponent("XUILabelSymbol") as IXUILabelSymbol);
+ Transform transform2 = base.transform.Find("Bg/Title");
+ this.m_Title = (transform2.GetComponent("XUILabel") as IXUILabel);
+ this.m_TitleSymbol = (transform2.GetComponent("XUILabelSymbol") as IXUILabelSymbol);
+ Transform transform3 = base.transform.Find("Bg/OK");
+ this.m_OKButton = (transform3.GetComponent("XUIButton") as IXUIButton);
+ this.m_Grey = (base.transform.Find("Grey").GetComponent("XUISprite") as IXUISprite);
+ Transform transform4 = base.transform.Find("Bg");
+ this.m_PlayTween = (transform4.GetComponent("XUIPlayTween") as IXUITweenTool);
+ this.m_Panel = (base.transform.GetComponent("XUIPanel") as IXUIPanel);
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/SystemHelpBehaviour.cs.meta b/Client/Assets/Scripts/XMainClient/UI/SystemHelpBehaviour.cs.meta
new file mode 100644
index 00000000..d456a9c4
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/SystemHelpBehaviour.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 1dc3fd85dd267214d9ed24812b5db31e
+timeCreated: 1611403359
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/SystemHelpDlg.cs b/Client/Assets/Scripts/XMainClient/UI/SystemHelpDlg.cs
new file mode 100644
index 00000000..97d38a0c
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/SystemHelpDlg.cs
@@ -0,0 +1,95 @@
+using System;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ public class SystemHelpDlg : DlgBase<SystemHelpDlg, SystemHelpBehaviour>, IModalDlg, IXInterface
+ {
+ public override string fileName
+ {
+ get
+ {
+ return "Common/SystemHelpDlg";
+ }
+ }
+
+ public override int layer
+ {
+ get
+ {
+ return 100;
+ }
+ }
+
+ public override bool autoload
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public bool Deprecated { get; set; }
+
+ public bool _bHasGrey = true;
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ }
+
+ public void SetPanelDepth(int depth)
+ {
+ base.uiBehaviour.m_Panel.SetDepth(depth);
+ }
+
+ public void LuaShow(string content, ButtonClickEventHandler handler, ButtonClickEventHandler handler2)
+ {
+ this.SetVisible(true, true);
+ this.SetLabelsWithSymbols(content, "OK", "Cancel");
+ base.uiBehaviour.m_OKButton.RegisterClickEventHandler(handler);
+ }
+
+ public void SetLabels(string mainLabel, string titleLabel, string frLabel)
+ {
+ base.uiBehaviour.m_LabelSymbol.InputText = "";
+ base.uiBehaviour.m_TitleSymbol.InputText = "";
+ base.uiBehaviour.m_Label.SetText(mainLabel);
+ base.uiBehaviour.m_Title.SetText(titleLabel);
+ base.uiBehaviour.m_OKButton.SetCaption(frLabel);
+ }
+
+ public void SetLabelsWithSymbols(string mainLabel, string titleLabel, string frLabel)
+ {
+ base.uiBehaviour.m_LabelSymbol.InputText = mainLabel;
+ base.uiBehaviour.m_TitleSymbol.InputText = titleLabel;
+ base.uiBehaviour.m_OKButton.SetCaption(frLabel);
+ }
+
+ public void SetTweenTargetAndPlay(GameObject go)
+ {
+ this.SetVisible(true, true);
+ base.uiBehaviour.m_PlayTween.SetTargetGameObject(go);
+ base.uiBehaviour.m_PlayTween.PlayTween(true, -1f);
+ }
+
+ public override void RegisterEvent()
+ {
+ base.uiBehaviour.m_OKButton.RegisterClickEventHandler(new ButtonClickEventHandler(this.DoCancel));
+ }
+
+ public bool DoCancel(IXUIButton go)
+ {
+ this.SetVisible(false, true);
+ return true;
+ }
+
+ public void DoCancel(IXUISprite sp)
+ {
+ this.SetVisible(false, true);
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/SystemHelpDlg.cs.meta b/Client/Assets/Scripts/XMainClient/UI/SystemHelpDlg.cs.meta
new file mode 100644
index 00000000..587de08a
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/SystemHelpDlg.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 9e405a51fa04b3842a0ade2a17573c1f
+timeCreated: 1611404240
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/SystemRewardTypeMrg.cs b/Client/Assets/Scripts/XMainClient/UI/SystemRewardTypeMrg.cs
new file mode 100644
index 00000000..5b8aad4e
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/SystemRewardTypeMrg.cs
@@ -0,0 +1,14 @@
+using System;
+using KKSG;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class SystemRewardTypeMrg
+ {
+ public static uint GetTypeUInt(SystemRewardType _type)
+ {
+ return (uint)XFastEnumIntEqualityComparer<SystemRewardType>.ToInt(_type);
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/SystemRewardTypeMrg.cs.meta b/Client/Assets/Scripts/XMainClient/UI/SystemRewardTypeMrg.cs.meta
new file mode 100644
index 00000000..90b2e21f
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/SystemRewardTypeMrg.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 6a79407af4e99bd41b60bdedb6b44fa7
+timeCreated: 1611403888
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/TaJieHelpDlg.cs b/Client/Assets/Scripts/XMainClient/UI/TaJieHelpDlg.cs
new file mode 100644
index 00000000..0d46f9d7
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/TaJieHelpDlg.cs
@@ -0,0 +1,193 @@
+using System;
+using System.Collections.Generic;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class TaJieHelpDlg : DlgBase<TaJieHelpDlg, TaJieHelpBehaviour>
+ {
+ public override string fileName
+ {
+ get
+ {
+ return "GameSystem/TajiebbDlg";
+ }
+ }
+
+ public override bool autoload
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override bool hideMainMenu
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override bool pushstack
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override bool fullscreenui
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ private TaJieHelpDocument m_doc;
+
+ private List<TaJieHelpTab.RowData> m_tempData;
+
+ protected override void OnLoad()
+ {
+ base.OnLoad();
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ base.uiBehaviour.m_closedBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnCloseClicked));
+ }
+
+ protected override void OnUnload()
+ {
+ base.OnUnload();
+ }
+
+ protected override void Init()
+ {
+ base.Init();
+ this.m_doc = TaJieHelpDocument.Doc;
+ base.uiBehaviour.m_wrapContent.RegisterItemUpdateEventHandler(new WrapItemUpdateEventHandler(this.WrapContentItemUpdated));
+ }
+
+ protected override void OnHide()
+ {
+ base.OnHide();
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ this.FillContent();
+ }
+
+ public override void StackRefresh()
+ {
+ base.StackRefresh();
+ this.FillContent();
+ }
+
+ private void FillContent()
+ {
+ this.m_tempData = this.m_doc.GetTaJieHelpData();
+ base.uiBehaviour.m_wrapContent.SetContentCount(this.m_tempData.Count, false);
+ }
+
+ private void WrapContentItemUpdated(Transform t, int index)
+ {
+ TaJieHelpTab.RowData rowData = this.m_tempData[index];
+ bool flag = rowData == null;
+ if (!flag)
+ {
+ IXUISprite ixuisprite = t.Find("BQ").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.spriteName = rowData.IconName;
+ IXUILabel ixuilabel = t.Find("Label1").GetComponent("XUILabel") as IXUILabel;
+ string text = rowData.Name;
+ bool flag2 = rowData.SysID == 0u;
+ if (flag2)
+ {
+ text = this.m_doc.GetSceneName();
+ }
+ ixuilabel.SetText(text);
+ ixuilabel = (t.Find("Label2").GetComponent("XUILabel") as IXUILabel);
+ IXUILabel ixuilabel2 = t.Find("Label3").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel2.gameObject.SetActive(false);
+ int curType = this.m_doc.CurType;
+ bool flag3 = rowData.SysID == 0u && curType == 18;
+ if (flag3)
+ {
+ ixuilabel.SetText(this.m_doc.GetdDragonTips());
+ }
+ else
+ {
+ ixuilabel.SetText(rowData.Des);
+ }
+ IXUIButton ixuibutton = t.Find("GO").GetComponent("XUIButton") as IXUIButton;
+ ixuibutton.ID = (ulong)rowData.SysID;
+ ixuibutton.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnGoClick));
+ ixuilabel = (t.Find("GO/MoneyCost").GetComponent("XUILabel") as IXUILabel);
+ bool flag4 = rowData.SysID == 0u;
+ if (flag4)
+ {
+ ixuilabel.SetText(XSingleton<XStringTable>.singleton.GetString("CheckTheStrategy"));
+ }
+ else
+ {
+ ixuilabel.SetText(XSingleton<XStringTable>.singleton.GetString("PVPActivity_Go"));
+ }
+ }
+ }
+
+ private bool OnCloseClicked(IXUIButton btn)
+ {
+ string label = XSingleton<UiUtility>.singleton.ReplaceReturn(XSingleton<XStringTable>.singleton.GetString("TaJieHelpTips4"));
+ XSingleton<UiUtility>.singleton.ShowModalDialog(label, XSingleton<XStringTable>.singleton.GetString("CloseUp"), XSingleton<XStringTable>.singleton.GetString("PackUp"), new ButtonClickEventHandler(this.DoOK), new ButtonClickEventHandler(this.DoCancle), false, XTempTipDefine.OD_START, 50);
+ return true;
+ }
+
+ private bool DoOK(IXUIButton btn)
+ {
+ XSingleton<UiUtility>.singleton.CloseModalDlg();
+ this.SetVisible(false, true);
+ this.m_doc.ShowHallBtn = false;
+ return true;
+ }
+
+ private bool DoCancle(IXUIButton btn)
+ {
+ XSingleton<UiUtility>.singleton.CloseModalDlg();
+ this.SetVisible(false, true);
+ return true;
+ }
+
+ private bool OnGoClick(IXUIButton btn)
+ {
+ ulong id = btn.ID;
+ bool flag = id == 0UL;
+ if (flag)
+ {
+ string url = this.m_doc.GetUrl();
+ bool flag2 = url != string.Empty;
+ if (flag2)
+ {
+ XSingleton<UiUtility>.singleton.OpenUrl(url, false);
+ }
+ else
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XSingleton<XStringTable>.singleton.GetString("NoStrategy"), "fece00");
+ }
+ }
+ else
+ {
+ XSingleton<XGameSysMgr>.singleton.OpenSystem((int)id);
+ }
+ return true;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/TaJieHelpDlg.cs.meta b/Client/Assets/Scripts/XMainClient/UI/TaJieHelpDlg.cs.meta
new file mode 100644
index 00000000..fa318709
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/TaJieHelpDlg.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 488c9722e0ac4ce4eaddb6429508770e
+timeCreated: 1611403658
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/TabDlgBase.cs b/Client/Assets/Scripts/XMainClient/UI/TabDlgBase.cs
new file mode 100644
index 00000000..0513ec0b
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/TabDlgBase.cs
@@ -0,0 +1,240 @@
+using System;
+using System.Collections.Generic;
+using UILib;
+using XMainClient.UI.UICommon;
+using XMainClient.Utility;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal abstract class TabDlgBase<T> : DlgBase<T, TabDlgBehaviour> where T : IXUIDlg, new()
+ {
+ protected virtual bool bHorizontal
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override string fileName
+ {
+ get
+ {
+ return "GameSystem/CharacterDlg";
+ }
+ }
+
+ public override int layer
+ {
+ get
+ {
+ return 1;
+ }
+ }
+
+ public override int group
+ {
+ get
+ {
+ return 1;
+ }
+ }
+
+ public override bool autoload
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override bool hideMainMenu
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override bool pushstack
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override bool fullscreenui
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override int sysid
+ {
+ get
+ {
+ return XFastEnumIntEqualityComparer<XSysDefine>.ToInt(this.mCurrentSys);
+ }
+ }
+
+ protected List<DlgHandlerBase> m_ActiveHandlers = new List<DlgHandlerBase>();
+
+ protected XSubSysRedPointMgr redpointMgr = new XSubSysRedPointMgr();
+
+ protected XSysDefine mainSys = XSysDefine.XSys_Invalid;
+
+ protected XSysDefine mCurrentSys;
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ }
+
+ protected override void OnUnload()
+ {
+ this.m_ActiveHandlers.Clear();
+ XSingleton<XGameSysMgr>.singleton.RegisterSubSysRedPointMgr(this.mainSys, null);
+ this.mainSys = XSysDefine.XSys_Invalid;
+ base.OnUnload();
+ }
+
+ protected override void Init()
+ {
+ this.mCurrentSys = XSysDefine.XSys_Invalid;
+ }
+
+ public override void RegisterEvent()
+ {
+ base.uiBehaviour.m_Close.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnCloseClick));
+ }
+
+ protected void RegisterSubSysRedPointMgr(XSysDefine sys)
+ {
+ this.mainSys = sys;
+ XSingleton<XGameSysMgr>.singleton.RegisterSubSysRedPointMgr(this.mainSys, this.redpointMgr);
+ }
+
+ public void UpdateSubSysRedPoints()
+ {
+ this.redpointMgr.UpdateRedPointUI();
+ }
+
+ public void OnTabChanged(ulong id)
+ {
+ this.ShowSubGamsSystem((XSysDefine)id);
+ }
+
+ public virtual void SetupHandlers(XSysDefine sys)
+ {
+ }
+
+ protected void _AddActiveHandler(DlgHandlerBase handler)
+ {
+ this.m_ActiveHandlers.Add(handler);
+ }
+
+ public void ShowSubGamsSystem(XSysDefine sys)
+ {
+ bool flag = this.mCurrentSys == sys;
+ if (!flag)
+ {
+ this.mCurrentSys = sys;
+ for (int i = 0; i < this.m_ActiveHandlers.Count; i++)
+ {
+ this.m_ActiveHandlers[i].SetVisible(false);
+ }
+ this.m_ActiveHandlers.Clear();
+ this.SetupHandlers(sys);
+ XMainInterfaceDocument specificDocument = XDocuments.GetSpecificDocument<XMainInterfaceDocument>(XMainInterfaceDocument.uuID);
+ specificDocument.OnTopUIRefreshed(this);
+ }
+ }
+
+ public void ShowWorkGameSystem(XSysDefine sys)
+ {
+ bool flag = !base.IsVisible();
+ if (flag)
+ {
+ this.SetVisibleWithAnimation(true, null);
+ }
+ bool flag2 = sys != XSysDefine.XSys_Invalid;
+ if (flag2)
+ {
+ this.mCurrentSys = XSysDefine.XSys_Invalid;
+ List<XSysDefine> list;
+ XSysDefine targetSys = XUITabControl.GetTargetSys(sys, out list);
+ this.ShowSubGamsSystem(targetSys);
+ XSubSysRedPointMgr xsubSysRedPointMgr = this.redpointMgr;
+ IXUIObject[] btns = base.uiBehaviour.m_tabcontrol.SetupTabs(sys, new XUITabControl.UITabControlCallback(this.OnTabChanged), this.bHorizontal, 1f);
+ xsubSysRedPointMgr.SetupRedPoints(btns);
+ }
+ this.SetupRedpointEx();
+ }
+
+ public virtual void SetupRedpointEx()
+ {
+ }
+
+ public virtual void Close(bool bWithAnim = true)
+ {
+ if (bWithAnim)
+ {
+ this.SetVisibleWithAnimation(false, null);
+ }
+ else
+ {
+ this.SetVisible(false, true);
+ }
+ }
+
+ protected bool OnCloseClick(IXUIButton go)
+ {
+ this.Close(true);
+ return true;
+ }
+
+ protected override void OnHide()
+ {
+ base.OnHide();
+ for (int i = 0; i < this.m_ActiveHandlers.Count; i++)
+ {
+ this.m_ActiveHandlers[i].SetVisible(false);
+ }
+ this.m_ActiveHandlers.Clear();
+ this.redpointMgr.SetupRedPoints(null);
+ this.mCurrentSys = XSysDefine.XSys_Invalid;
+ }
+
+ protected void OnCloseAnimationOver()
+ {
+ for (int i = 0; i < this.m_ActiveHandlers.Count; i++)
+ {
+ this.m_ActiveHandlers[i].SetVisible(false);
+ }
+ this.m_ActiveHandlers.Clear();
+ }
+
+ public override void StackRefresh()
+ {
+ bool flag = this.mCurrentSys != XSysDefine.XSys_Invalid;
+ if (flag)
+ {
+ XSubSysRedPointMgr xsubSysRedPointMgr = this.redpointMgr;
+ IXUIObject[] btns = base.uiBehaviour.m_tabcontrol.SetupTabs(this.mCurrentSys, new XUITabControl.UITabControlCallback(this.OnTabChanged), this.bHorizontal, 1f);
+ xsubSysRedPointMgr.SetupRedPoints(btns);
+ }
+ this.SetupRedpointEx();
+ base.StackRefresh();
+ }
+
+ public bool CurrentSysIs(XSysDefine sys)
+ {
+ bool flag = !base.IsLoaded();
+ return !flag && sys == this.mCurrentSys;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/TabDlgBase.cs.meta b/Client/Assets/Scripts/XMainClient/UI/TabDlgBase.cs.meta
new file mode 100644
index 00000000..293da75d
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/TabDlgBase.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: c2b9b01fb7e8fd046b708f2f8723b612
+timeCreated: 1611404495
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/TabDlgBehaviour.cs b/Client/Assets/Scripts/XMainClient/UI/TabDlgBehaviour.cs
new file mode 100644
index 00000000..86f57d70
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/TabDlgBehaviour.cs
@@ -0,0 +1,25 @@
+using System;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XMainClient.Utility;
+
+namespace XMainClient.UI
+{
+ internal class TabDlgBehaviour : DlgBehaviourBase
+ {
+ public IXUIButton m_Close;
+
+ public Transform m_root;
+
+ public XUITabControl m_tabcontrol = new XUITabControl();
+
+ private void Awake()
+ {
+ this.m_Close = (base.transform.Find("Bg/Close").GetComponent("XUIButton") as IXUIButton);
+ this.m_root = base.transform.Find("Bg");
+ Transform tabTpl = base.transform.Find("Bg/Tabs/TabTpl");
+ this.m_tabcontrol.SetTabTpl(tabTpl);
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/TabDlgBehaviour.cs.meta b/Client/Assets/Scripts/XMainClient/UI/TabDlgBehaviour.cs.meta
new file mode 100644
index 00000000..a87d7676
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/TabDlgBehaviour.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 273b245b65b679e4caddf1114f33ee5f
+timeCreated: 1611403470
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/TheExpBehaviour.cs b/Client/Assets/Scripts/XMainClient/UI/TheExpBehaviour.cs
new file mode 100644
index 00000000..b614fa4a
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/TheExpBehaviour.cs
@@ -0,0 +1,125 @@
+using System;
+using System.Collections.Generic;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XMainClient.Utility;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class TheExpBehaviour : DlgBehaviourBase
+ {
+ public IXUIButton m_Close;
+
+ public IXUIButton m_Help;
+
+ public IXUILabel m_MyPPT;
+
+ public IXUILabel m_LeftCount;
+
+ public IXUIButton m_AddCount;
+
+ public GameObject m_Free;
+
+ public Transform m_parent;
+
+ public IXUITexture m_NestBg;
+
+ public IXUILabel m_NestName;
+
+ public IXUILabel m_NestEquipText;
+
+ public IXUILabel m_NestPPT;
+
+ public IXUILabel m_NestLevel;
+
+ public IXUILabel m_NestMember;
+
+ public IXUIButton m_GoBattle;
+
+ public IXUIButton m_SweepButton;
+
+ public GameObject m_SweepCostItem;
+
+ public IXUILabel m_SweepCostItemNum;
+
+ public IXUILabel m_starLab;
+
+ public IXUIButton m_rewardBtn;
+
+ public IXUIButton m_rankBtn;
+
+ public GameObject m_starImageGo;
+
+ public IXUISprite m_quanMinSpr;
+
+ public XUIPool m_RewardPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ public XUITabControl m_tabcontrol = new XUITabControl();
+
+ public XUIPool m_ExpPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ public List<GameObject> m_DiffList = new List<GameObject>();
+
+ public List<GameObject> m_DiffSelectList = new List<GameObject>();
+
+ public IXUILabel m_Fatigue;
+
+ public GameObject m_LeftCountGo;
+
+ public GameObject m_FirstPassDropGo;
+
+ public GameObject m_NormalDropGo;
+
+ private void Awake()
+ {
+ this.m_parent = base.transform;
+ this.m_Close = (base.transform.Find("Bg/Close").GetComponent("XUIButton") as IXUIButton);
+ this.m_Help = (base.transform.Find("Bg/Help").GetComponent("XUIButton") as IXUIButton);
+ Transform tabTpl = base.transform.Find("Bg/Tabs/Panel/TabTpl");
+ this.m_tabcontrol.SetTabTpl(tabTpl);
+ this.m_MyPPT = (base.transform.Find("Bg/DetailFrame/NestName/MyPPT").GetComponent("XUILabel") as IXUILabel);
+ this.m_LeftCountGo = base.transform.Find("Bg/DetailFrame/NestName/Fatigue").gameObject;
+ this.m_LeftCount = (base.transform.Find("Bg/DetailFrame/NestName/Fatigue/Label").GetComponent("XUILabel") as IXUILabel);
+ this.m_LeftCount.SetText("");
+ this.m_AddCount = (base.transform.Find("Bg/DetailFrame/NestName/Fatigue").GetComponent("XUIButton") as IXUIButton);
+ this.m_NestBg = (base.transform.Find("Bg/DetailFrame/BgPanel/Bg").GetComponent("XUITexture") as IXUITexture);
+ this.m_NestName = (base.transform.Find("Bg/DetailFrame/NestName").GetComponent("XUILabel") as IXUILabel);
+ this.m_NestEquipText = (base.transform.Find("Bg/DetailFrame/NestName/Tj").GetComponent("XUILabel") as IXUILabel);
+ this.m_NestMember = (base.transform.Find("Bg/DetailFrame/NestName/Member").GetComponent("XUILabel") as IXUILabel);
+ this.m_NestPPT = (base.transform.Find("Bg/DetailFrame/NestName/PPT").GetComponent("XUILabel") as IXUILabel);
+ this.m_NestLevel = (base.transform.Find("Bg/DetailFrame/NestName/Level").GetComponent("XUILabel") as IXUILabel);
+ this.m_GoBattle = (base.transform.Find("Bg/DetailFrame/Do").GetComponent("XUIButton") as IXUIButton);
+ this.m_starImageGo = base.transform.Find("Bg/DetailFrame/Image").gameObject;
+ this.m_starLab = (base.transform.Find("Bg/DetailFrame/Image/Rank").GetComponent("XUILabel") as IXUILabel);
+ this.m_SweepButton = (base.transform.Find("Bg/DetailFrame/SweepButton").GetComponent("XUIButton") as IXUIButton);
+ this.m_SweepCostItem = base.transform.Find("Bg/DetailFrame/SweepButton/Item").gameObject;
+ this.m_SweepCostItemNum = (base.transform.Find("Bg/DetailFrame/SweepButton/Item/Cost").GetComponent("XUILabel") as IXUILabel);
+ this.m_rewardBtn = (base.transform.Find("Bg/DetailFrame/Btn1").GetComponent("XUIButton") as IXUIButton);
+ this.m_rankBtn = (base.transform.Find("Bg/DetailFrame/Btn2").GetComponent("XUIButton") as IXUIButton);
+ this.m_Free = base.transform.Find("Bg/DetailFrame/Free").gameObject;
+ this.m_Fatigue = (base.transform.Find("Bg/DetailFrame/Do/Cost").GetComponent("XUILabel") as IXUILabel);
+ this.m_quanMinSpr = (base.transform.Find("Bg/DetailFrame/qmms").GetComponent("XUISprite") as IXUISprite);
+ Transform transform = base.transform.Find("Bg/DetailFrame/ItemList/ItemTpl");
+ this.m_RewardPool.SetupPool(transform.parent.gameObject, transform.gameObject, 5u, false);
+ this.m_DiffList.Add(null);
+ this.m_DiffSelectList.Add(null);
+ int num = 1;
+ for (;;)
+ {
+ transform = base.transform.Find("Bg/DetailFrame/DiffList/Diff" + num.ToString());
+ bool flag = transform == null;
+ if (flag)
+ {
+ break;
+ }
+ this.m_DiffList.Add(transform.gameObject);
+ this.m_DiffSelectList.Add(transform.Find("Select").gameObject);
+ num++;
+ }
+ this.m_FirstPassDropGo = base.transform.Find("Bg/DetailFrame/ItemList/FirstPassDrop").gameObject;
+ this.m_NormalDropGo = base.transform.Find("Bg/DetailFrame/ItemList/NormalDrop").gameObject;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/TheExpBehaviour.cs.meta b/Client/Assets/Scripts/XMainClient/UI/TheExpBehaviour.cs.meta
new file mode 100644
index 00000000..35284dbe
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/TheExpBehaviour.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: f00ec7690377cdd4584f26ddc791a937
+timeCreated: 1611404828
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/TheExpView.cs b/Client/Assets/Scripts/XMainClient/UI/TheExpView.cs
new file mode 100644
index 00000000..5c872b5b
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/TheExpView.cs
@@ -0,0 +1,704 @@
+using System;
+using System.Collections.Generic;
+using KKSG;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XMainClient.Utility;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class TheExpView : DlgBase<TheExpView, TheExpBehaviour>
+ {
+ public override string fileName
+ {
+ get
+ {
+ return "GameSystem/TheExpDlg";
+ }
+ }
+
+ public override int layer
+ {
+ get
+ {
+ return 1;
+ }
+ }
+
+ public override bool autoload
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override bool hideMainMenu
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override bool pushstack
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override bool fullscreenui
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override int group
+ {
+ get
+ {
+ return 1;
+ }
+ }
+
+ private XExpeditionDocument _doc;
+
+ private XTeamDocument _teamDoc;
+
+ private XLevelDocument _LevelDoc;
+
+ private XNestDocument _NestDoc;
+
+ private XSweepDocument _sweepDoc = null;
+
+ private NestStarRewardHandler _nestStarRewardHandler;
+
+ private int m_Catergory;
+
+ private int m_Difficulty;
+
+ private int m_SpecialExpID = -1;
+
+ private IXUICheckBox[] m_TabCheckboxs;
+
+ private Dictionary<int, ExpeditionTable.RowData> m_FirstOpenExpCache = new Dictionary<int, ExpeditionTable.RowData>();
+
+ private List<int> m_IDCache = new List<int>();
+
+ private List<string> m_NameCache = new List<string>();
+
+ private string m_PPTEnoughColor;
+
+ private string m_PPTNotEnoughColor;
+
+ protected override void Init()
+ {
+ this._doc = (XSingleton<XGame>.singleton.Doc.GetXComponent(XExpeditionDocument.uuID) as XExpeditionDocument);
+ this._teamDoc = XDocuments.GetSpecificDocument<XTeamDocument>(XTeamDocument.uuID);
+ this._LevelDoc = XDocuments.GetSpecificDocument<XLevelDocument>(XLevelDocument.uuID);
+ this._NestDoc = XDocuments.GetSpecificDocument<XNestDocument>(XNestDocument.uuID);
+ this._sweepDoc = XDocuments.GetSpecificDocument<XSweepDocument>(XSweepDocument.uuID);
+ this.m_Catergory = -1;
+ this.m_SpecialExpID = -1;
+ this.m_TabCheckboxs = null;
+ this.m_PPTEnoughColor = XSingleton<XGlobalConfig>.singleton.GetValue("PPTEnoughColor");
+ this.m_PPTNotEnoughColor = XSingleton<XGlobalConfig>.singleton.GetValue("PPTNotEnoughColor");
+ base.uiBehaviour.m_rewardBtn.gameObject.SetActive(false);
+ base.uiBehaviour.m_rankBtn.gameObject.SetActive(false);
+ DlgHandlerBase.EnsureCreate<NestStarRewardHandler>(ref this._nestStarRewardHandler, base.uiBehaviour.m_parent, false, this);
+ }
+
+ public override void RegisterEvent()
+ {
+ base.uiBehaviour.m_Close.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnCloseClicked));
+ base.uiBehaviour.m_AddCount.RegisterClickEventHandler(new ButtonClickEventHandler(this._OnAddFatigueClick));
+ base.uiBehaviour.m_Help.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnHelpClicked));
+ base.uiBehaviour.m_rewardBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this._OnClickPreviewRewardBtn));
+ base.uiBehaviour.m_rankBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this._OnClickRankBtn));
+ base.uiBehaviour.m_quanMinSpr.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this._onClickQuanMinSpr));
+ }
+
+ public bool OnHelpClicked(IXUIButton button)
+ {
+ DlgBase<XCommonHelpTipView, XCommonHelpTipBehaviour>.singleton.ShowHelp(XSysDefine.XSys_Activity_Nest);
+ return true;
+ }
+
+ protected override void OnUnload()
+ {
+ this._doc = null;
+ this._teamDoc = null;
+ this.m_TabCheckboxs = null;
+ bool flag = this._nestStarRewardHandler != null;
+ if (flag)
+ {
+ DlgHandlerBase.EnsureUnload<NestStarRewardHandler>(ref this._nestStarRewardHandler);
+ this._nestStarRewardHandler = null;
+ }
+ base.OnUnload();
+ }
+
+ public void ShowView(int expid = -1)
+ {
+ base.Load();
+ this.m_SpecialExpID = expid;
+ bool flag = !base.IsVisible();
+ if (flag)
+ {
+ this.SetVisibleWithAnimation(true, null);
+ }
+ this._RefreshTabs();
+ }
+
+ public void ShowViewByExpID(int expID)
+ {
+ base.Load();
+ bool flag = !base.IsVisible();
+ if (flag)
+ {
+ this.SetVisibleWithAnimation(true, null);
+ }
+ this.m_SpecialExpID = expID;
+ this._RefreshTabs();
+ }
+
+ private string _GetSubCategoryName(int SubCategory)
+ {
+ return string.Format("TeamSubCategory{0}{1}", XFastEnumIntEqualityComparer<TeamLevelType>.ToInt(TeamLevelType.TeamLevelNest), SubCategory);
+ }
+
+ private void _RefreshTabs()
+ {
+ HashSet<int> hashSet = new HashSet<int>();
+ int num = -1;
+ NestListTable.RowData byNestID = XNestDocument.NestListData.GetByNestID(this.m_SpecialExpID);
+ bool flag = byNestID != null;
+ if (flag)
+ {
+ num = byNestID.Type;
+ }
+ this.m_FirstOpenExpCache.Clear();
+ for (int i = 0; i < XNestDocument.NestListData.Table.Length; i++)
+ {
+ NestListTable.RowData rowData = XNestDocument.NestListData.Table[i];
+ bool flag2 = hashSet.Contains(rowData.Type);
+ if (!flag2)
+ {
+ ExpeditionTable.RowData expeditionDataByID = this._doc.GetExpeditionDataByID(rowData.NestID);
+ bool flag3 = expeditionDataByID == null;
+ if (!flag3)
+ {
+ bool flag4 = this._doc.TeamCategoryMgr.IsExpOpened(expeditionDataByID);
+ if (flag4)
+ {
+ hashSet.Add(rowData.Type);
+ }
+ else
+ {
+ ExpeditionTable.RowData rowData2;
+ bool flag5 = this.m_FirstOpenExpCache.TryGetValue(rowData.Type, out rowData2);
+ if (flag5)
+ {
+ bool flag6 = rowData2.RequiredLevel > expeditionDataByID.RequiredLevel;
+ if (flag6)
+ {
+ this.m_FirstOpenExpCache[rowData.Type] = expeditionDataByID;
+ }
+ }
+ else
+ {
+ this.m_FirstOpenExpCache.Add(rowData.Type, expeditionDataByID);
+ }
+ }
+ }
+ }
+ }
+ this.m_IDCache.Clear();
+ this.m_NameCache.Clear();
+ int num2 = 0;
+ bool flag7 = false;
+ for (int j = 0; j < XNestDocument.NestTypeData.Table.Length; j++)
+ {
+ NestTypeTable.RowData rowData3 = XNestDocument.NestTypeData.Table[j];
+ bool flag8 = !flag7 && hashSet.Contains(rowData3.TypeID);
+ if (flag8)
+ {
+ bool flag9 = rowData3.TypeID == num;
+ if (flag9)
+ {
+ num2 = j;
+ flag7 = true;
+ }
+ num2 = Mathf.Max(j, num2);
+ }
+ this.m_IDCache.Add(rowData3.TypeID);
+ this.m_NameCache.Add(rowData3.TypeName);
+ }
+ int select = -1;
+ bool flag10 = num2 < this.m_IDCache.Count;
+ if (flag10)
+ {
+ select = this.m_IDCache[num2];
+ }
+ this.m_TabCheckboxs = base.uiBehaviour.m_tabcontrol.SetupTabs(this.m_IDCache, this.m_NameCache, new XUITabControl.UITabControlCallback(this._UITabControlCallback), false, 1f, select, false);
+ for (int k = 0; k < this.m_TabCheckboxs.Length; k++)
+ {
+ IXUICheckBox ixuicheckBox = this.m_TabCheckboxs[k];
+ IXUISprite ixuisprite = ixuicheckBox.gameObject.transform.parent.Find("Lock").GetComponent("XUISprite") as IXUISprite;
+ IXUISprite ixuisprite2 = ixuicheckBox.gameObject.transform.Find("Icon").GetComponent("XUISprite") as IXUISprite;
+ NestTypeTable.RowData byTypeID = XNestDocument.NestTypeData.GetByTypeID((int)ixuicheckBox.ID);
+ bool flag11 = byTypeID == null;
+ if (!flag11)
+ {
+ ixuisprite2.SetSprite(byTypeID.TypeIcon);
+ bool flag12 = !hashSet.Contains((int)ixuicheckBox.ID);
+ if (flag12)
+ {
+ ixuisprite.SetVisible(true);
+ int key = (int)ixuicheckBox.ID;
+ ExpeditionTable.RowData rowData4;
+ this.m_FirstOpenExpCache.TryGetValue(key, out rowData4);
+ bool flag13 = rowData4 != null;
+ if (flag13)
+ {
+ ixuisprite.ID = (ulong)((long)rowData4.DNExpeditionID);
+ }
+ ixuisprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this._OnLockClicked));
+ ixuicheckBox.SetEnable(false);
+ }
+ else
+ {
+ ixuisprite.SetVisible(false);
+ ixuicheckBox.SetEnable(true);
+ }
+ }
+ }
+ }
+
+ private void _OnLockClicked(IXUISprite iSp)
+ {
+ ExpeditionTable.RowData expeditionDataByID = this._doc.GetExpeditionDataByID((int)iSp.ID);
+ NestListTable.RowData byNestID = XNestDocument.NestListData.GetByNestID((int)iSp.ID);
+ bool flag = expeditionDataByID == null;
+ if (!flag)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString("EXPEDITION_REQUIRED_LEVEL", new object[]
+ {
+ expeditionDataByID.RequiredLevel
+ }) + XStringDefineProxy.GetString(this._GetSubCategoryName(byNestID.Type)), "fece00");
+ }
+ }
+
+ private void _UITabControlCallback(ulong id)
+ {
+ int num = (int)id;
+ NestTypeTable.RowData byTypeID = XNestDocument.NestTypeData.GetByTypeID(num);
+ bool flag = byTypeID == null;
+ if (!flag)
+ {
+ this.m_Catergory = num;
+ base.uiBehaviour.m_NestBg.SetTexturePath(byTypeID.TypeBg);
+ bool flag2 = byTypeID.TypeBgTransform == null || byTypeID.TypeBgTransform.Length != 3;
+ if (flag2)
+ {
+ base.uiBehaviour.m_NestBg.gameObject.transform.localPosition = Vector3.zero;
+ }
+ else
+ {
+ base.uiBehaviour.m_NestBg.gameObject.transform.localPosition = new Vector3(byTypeID.TypeBgTransform[0], byTypeID.TypeBgTransform[1], byTypeID.TypeBgTransform[2]);
+ }
+ this._RefreshDiffs();
+ }
+ }
+
+ private void _RefreshDiffs()
+ {
+ for (int i = 1; i < base.uiBehaviour.m_DiffList.Count; i++)
+ {
+ base.uiBehaviour.m_DiffList[i].SetActive(false);
+ }
+ NestListTable.RowData rowData = null;
+ ExpeditionTable.RowData rowData2 = null;
+ int starNestId = this._NestDoc.GetStarNestId(this.m_Catergory);
+ int j = 0;
+ while (j < XNestDocument.NestListData.Table.Length)
+ {
+ NestListTable.RowData rowData3 = XNestDocument.NestListData.Table[j];
+ bool flag = rowData3.Type == this.m_Catergory;
+ if (flag)
+ {
+ bool flag2 = rowData3.Difficulty >= base.uiBehaviour.m_DiffList.Count || rowData3.Difficulty <= 0;
+ if (!flag2)
+ {
+ ExpeditionTable.RowData expeditionDataByID = this._doc.GetExpeditionDataByID(rowData3.NestID);
+ bool flag3 = expeditionDataByID != null && expeditionDataByID.CostCountType == 0;
+ if (flag3)
+ {
+ bool flag4 = starNestId != 0 && rowData3.NestID != starNestId;
+ if (flag4)
+ {
+ bool flag5 = expeditionDataByID.Stars[0] != 1u;
+ if (flag5)
+ {
+ goto IL_1DB;
+ }
+ }
+ }
+ GameObject gameObject = base.uiBehaviour.m_DiffList[rowData3.Difficulty];
+ gameObject.SetActive(true);
+ bool flag6 = this._SetDiff(gameObject, rowData3.Difficulty, rowData3);
+ bool flag7 = flag6;
+ if (flag7)
+ {
+ bool flag8 = rowData3.NestID == this.m_SpecialExpID;
+ if (flag8)
+ {
+ rowData = rowData3;
+ rowData2 = expeditionDataByID;
+ }
+ else
+ {
+ bool flag9 = rowData == null || (rowData.NestID != this.m_SpecialExpID && (rowData.Difficulty < rowData3.Difficulty || (rowData.Difficulty == rowData3.Difficulty && rowData2.Stars[0] < expeditionDataByID.Stars[0])));
+ if (flag9)
+ {
+ rowData2 = expeditionDataByID;
+ rowData = rowData3;
+ }
+ }
+ }
+ }
+ }
+ IL_1DB:
+ j++;
+ continue;
+ goto IL_1DB;
+ }
+ bool flag10 = rowData == null;
+ if (flag10)
+ {
+ XSingleton<XDebug>.singleton.AddErrorLog("This category has no diffs that can be selected, " + this.m_Catergory.ToString(), null, null, null, null, null);
+ }
+ else
+ {
+ this._TrySelectDiff(rowData);
+ }
+ }
+
+ private bool _SetDiff(GameObject go, int index, NestListTable.RowData rowData)
+ {
+ IXUISprite ixuisprite = go.GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.ID = (ulong)((long)rowData.NestID);
+ ixuisprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this._OnDiffClicked));
+ GameObject gameObject = go.transform.Find("Lock").gameObject;
+ SceneRefuseReason sceneRefuseReason = this._LevelDoc.CanLevelOpen(this._doc.GetSceneIDByExpID(rowData.NestID));
+ gameObject.SetActive(sceneRefuseReason != SceneRefuseReason.Admit);
+ return sceneRefuseReason == SceneRefuseReason.Admit;
+ }
+
+ private void _OnDiffClicked(IXUISprite iSp)
+ {
+ NestListTable.RowData byNestID = XNestDocument.NestListData.GetByNestID((int)iSp.ID);
+ this._TrySelectDiff(byNestID);
+ }
+
+ private void _TrySelectDiff(NestListTable.RowData rowData)
+ {
+ bool flag = rowData == null;
+ if (!flag)
+ {
+ uint sceneIDByExpID = this._doc.GetSceneIDByExpID(rowData.NestID);
+ SceneRefuseReason sceneRefuseReason = this._LevelDoc.CanLevelOpen(sceneIDByExpID);
+ bool flag2 = sceneRefuseReason == SceneRefuseReason.Admit;
+ if (flag2)
+ {
+ this.m_SpecialExpID = -1;
+ this._SelectDiff(rowData.Difficulty);
+ this.OnComboBoxChange(rowData);
+ }
+ else
+ {
+ SceneRefuseReason sceneRefuseReason2 = sceneRefuseReason;
+ if (sceneRefuseReason2 != SceneRefuseReason.PreScene_Notfinish)
+ {
+ if (sceneRefuseReason2 == SceneRefuseReason.Level_NotEnough)
+ {
+ SceneTable.RowData sceneData = XSingleton<XSceneMgr>.singleton.GetSceneData(sceneIDByExpID);
+ bool flag3 = sceneData != null;
+ if (flag3)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString("LEVEL_REQUIRE_LEVEL", new object[]
+ {
+ sceneData.RequiredLevel
+ }), "fece00");
+ }
+ }
+ }
+ else
+ {
+ SceneTable.RowData sceneData2 = XSingleton<XSceneMgr>.singleton.GetSceneData(sceneIDByExpID);
+ bool flag4 = sceneData2 != null;
+ if (flag4)
+ {
+ int unFinishedPreSceneID = this._LevelDoc.GetUnFinishedPreSceneID(sceneData2);
+ int expIDBySceneID = this._doc.GetExpIDBySceneID((uint)unFinishedPreSceneID);
+ ExpeditionTable.RowData expeditionDataByID = this._doc.GetExpeditionDataByID(expIDBySceneID);
+ bool flag5 = expeditionDataByID != null;
+ if (flag5)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString("LEVEL_REQUIRE_PRELEVEL", new object[]
+ {
+ XExpeditionDocument.GetFullName(expeditionDataByID)
+ }), "fece00");
+ }
+ }
+ }
+ }
+ }
+ }
+
+ private void _SelectDiff(int index)
+ {
+ for (int i = 1; i < base.uiBehaviour.m_DiffSelectList.Count; i++)
+ {
+ base.uiBehaviour.m_DiffSelectList[i].SetActive(i == index);
+ }
+ }
+
+ private void OnComboBoxChange(NestListTable.RowData nestListData)
+ {
+ this.m_Difficulty = nestListData.Difficulty;
+ ExpeditionTable.RowData expeditionDataByID = this._doc.GetExpeditionDataByID(nestListData.NestID);
+ bool flag = expeditionDataByID == null;
+ if (!flag)
+ {
+ base.uiBehaviour.m_rewardBtn.ID = (ulong)((long)nestListData.Type);
+ base.uiBehaviour.m_rankBtn.ID = (ulong)((long)nestListData.Type);
+ base.uiBehaviour.m_rewardBtn.gameObject.SetActive(expeditionDataByID.CostCountType == 0);
+ base.uiBehaviour.m_rankBtn.gameObject.SetActive(expeditionDataByID.CostCountType == 0);
+ bool flag2 = expeditionDataByID.Stars[0] == 0u;
+ if (flag2)
+ {
+ base.uiBehaviour.m_starImageGo.SetActive(false);
+ }
+ else
+ {
+ base.uiBehaviour.m_starImageGo.SetActive(true);
+ base.uiBehaviour.m_starLab.SetText(expeditionDataByID.Stars[0].ToString());
+ }
+ base.uiBehaviour.m_NestName.SetText(expeditionDataByID.DNExpeditionName);
+ base.uiBehaviour.m_NestMember.SetText(expeditionDataByID.PlayerNumber.ToString());
+ base.uiBehaviour.m_NestPPT.SetText(string.Format("[{0}]{1}[-]", (expeditionDataByID.DisplayPPT <= XSingleton<XAttributeMgr>.singleton.XPlayerData.GetAttr(XAttributeDefine.XAttr_POWER_POINT_Basic)) ? this.m_PPTEnoughColor : this.m_PPTNotEnoughColor, expeditionDataByID.DisplayPPT.ToString()));
+ base.uiBehaviour.m_NestLevel.SetText(expeditionDataByID.RequiredLevel.ToString());
+ base.uiBehaviour.m_NestEquipText.SetText(XStringDefineProxy.GetString(XSingleton<XCommon>.singleton.StringCombine("NEST_DIFFICULTY_EQUIP_TEXT_", (this.m_Catergory * 10 + this.m_Difficulty).ToString())));
+ base.uiBehaviour.m_RewardPool.ReturnAll(false);
+ base.uiBehaviour.m_quanMinSpr.gameObject.SetActive(this.m_Difficulty != 4);
+ base.uiBehaviour.m_LeftCountGo.SetActive(this.m_Difficulty != 4);
+ base.uiBehaviour.m_MyPPT.gameObject.SetActive(this.m_Difficulty == 4);
+ base.uiBehaviour.m_NestPPT.gameObject.SetActive(this.m_Difficulty == 4);
+ Vector3 tplPos = base.uiBehaviour.m_RewardPool.TplPos;
+ bool flag3 = expeditionDataByID.ViewableDropList != null;
+ if (flag3)
+ {
+ for (int i = 0; i < expeditionDataByID.ViewableDropList.Length; i++)
+ {
+ GameObject gameObject = base.uiBehaviour.m_RewardPool.FetchGameObject(false);
+ gameObject.transform.parent = base.uiBehaviour.m_RewardPool._tpl.transform.parent;
+ XSingleton<XItemDrawerMgr>.singleton.normalItemDrawer.DrawItem(gameObject, (int)expeditionDataByID.ViewableDropList[i], 0, false);
+ gameObject.transform.localPosition = new Vector3(tplPos.x + (float)(base.uiBehaviour.m_RewardPool.TplWidth * i), tplPos.y);
+ IXUISprite ixuisprite = gameObject.transform.Find("Icon").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.ID = (ulong)expeditionDataByID.ViewableDropList[i];
+ ixuisprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this._OnItemClicked));
+ }
+ }
+ bool bEnable = this._doc.TeamCategoryMgr.IsExpOpened(expeditionDataByID);
+ base.uiBehaviour.m_GoBattle.SetEnable(bEnable, false);
+ base.uiBehaviour.m_GoBattle.ID = (ulong)((long)expeditionDataByID.DNExpeditionID);
+ base.uiBehaviour.m_GoBattle.RegisterClickEventHandler(new ButtonClickEventHandler(this._OnEnterClicked));
+ base.uiBehaviour.m_SweepButton.ID = (ulong)((long)expeditionDataByID.DNExpeditionID);
+ base.uiBehaviour.m_SweepButton.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnSweepButtonClicked));
+ this.SetupSweepCost(expeditionDataByID);
+ base.uiBehaviour.m_Fatigue.SetVisible(false);
+ uint sceneIDByExpID = this._doc.GetSceneIDByExpID(expeditionDataByID.DNExpeditionID);
+ SceneTable.RowData sceneData = XSingleton<XSceneMgr>.singleton.GetSceneData(sceneIDByExpID);
+ bool flag4 = sceneData != null;
+ if (flag4)
+ {
+ bool flag5 = sceneData.FatigueCost.Count > 0;
+ if (flag5)
+ {
+ for (int j = 0; j < sceneData.FatigueCost.Count; j++)
+ {
+ int num = sceneData.FatigueCost[j, 0];
+ bool flag6 = num == 6;
+ if (flag6)
+ {
+ base.uiBehaviour.m_Fatigue.SetVisible(true);
+ base.uiBehaviour.m_Fatigue.SetText(sceneData.FatigueCost[j, 1].ToString());
+ break;
+ }
+ }
+ }
+ }
+ base.uiBehaviour.m_LeftCountGo.SetActive(expeditionDataByID.CostCountType != 0);
+ base.uiBehaviour.m_Free.SetActive(expeditionDataByID.CostCountType == 0);
+ base.uiBehaviour.m_FirstPassDropGo.SetActive(expeditionDataByID.CostCountType == 0);
+ base.uiBehaviour.m_NormalDropGo.SetActive(expeditionDataByID.CostCountType != 0);
+ }
+ }
+
+ private void SetupSweepCost(ExpeditionTable.RowData expData)
+ {
+ uint sceneIDByExpID = this._doc.GetSceneIDByExpID(expData.DNExpeditionID);
+ SceneTable.RowData sceneData = XSingleton<XSceneMgr>.singleton.GetSceneData(sceneIDByExpID);
+ bool flag = sceneData.SweepTicket != null && sceneData.SweepTicket.Length != 0;
+ if (flag)
+ {
+ base.uiBehaviour.m_SweepButton.SetVisible(true);
+ XSingleton<XItemDrawerMgr>.singleton.normalItemDrawer.DrawItem(base.uiBehaviour.m_SweepCostItem, (int)sceneData.SweepTicket[0], 0, false);
+ base.uiBehaviour.m_SweepCostItemNum.SetText("x1");
+ IXUISprite ixuisprite = base.uiBehaviour.m_SweepCostItem.transform.Find("Icon").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.ID = (ulong)sceneData.SweepTicket[0];
+ ixuisprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(XSingleton<UiUtility>.singleton.OnItemClick));
+ }
+ else
+ {
+ base.uiBehaviour.m_SweepButton.SetVisible(false);
+ }
+ }
+
+ public override void StackRefresh()
+ {
+ base.StackRefresh();
+ this.RefreshLeftCount();
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ XTeamDocument specificDocument = XDocuments.GetSpecificDocument<XTeamDocument>(XTeamDocument.uuID);
+ specificDocument.ReqTeamOp(TeamOperate.TEAM_QUERYCOUNT, 0UL, null, TeamMemberType.TMT_NORMAL, null);
+ base.uiBehaviour.m_MyPPT.SetText(((int)XSingleton<XAttributeMgr>.singleton.XPlayerData.GetAttr(XAttributeDefine.XAttr_POWER_POINT_Basic)).ToString());
+ this.RefreshLeftCount();
+ }
+
+ protected override void OnHide()
+ {
+ bool flag = this._nestStarRewardHandler != null;
+ if (flag)
+ {
+ this._nestStarRewardHandler.SetVisible(false);
+ }
+ base.uiBehaviour.m_NestBg.SetTexturePath("");
+ this.m_SpecialExpID = -1;
+ base.OnHide();
+ }
+
+ private void OnClickLockedDificulty(IXUISprite spr)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString("NEST_DIFFICULTY_LOCK_MSG"), "fece00");
+ }
+
+ public void RefreshLeftCount()
+ {
+ int dayCount = this._doc.GetDayCount(TeamLevelType.TeamLevelNest, null);
+ int dayMaxCount = this._doc.GetDayMaxCount(TeamLevelType.TeamLevelNest, null);
+ this._SetSpirit(dayCount, dayMaxCount);
+ }
+
+ private void _SetSpirit(int cur, int total)
+ {
+ base.uiBehaviour.m_LeftCount.SetText(string.Format("{0}/{1}", cur, total));
+ }
+
+ private bool _OnAddFatigueClick(IXUIButton sp)
+ {
+ DlgBase<XBuyCountView, XBuyCountBehaviour>.singleton.ActiveShow(TeamLevelType.TeamLevelNest);
+ return true;
+ }
+
+ protected bool OnCloseClicked(IXUIButton go)
+ {
+ this.SetVisibleWithAnimation(false, null);
+ return true;
+ }
+
+ private bool OnSweepButtonClicked(IXUIButton button)
+ {
+ this._sweepDoc.TrySweepQuery(0u, (uint)button.ID, 1u);
+ return true;
+ }
+
+ private bool _OnEnterClicked(IXUIButton go)
+ {
+ ExpeditionTable.RowData expeditionDataByID = this._doc.GetExpeditionDataByID((int)go.ID);
+ float num = float.Parse(XSingleton<XGlobalConfig>.singleton.GetValue("SceneGotoPower"));
+ bool flag = XSingleton<PPTCheckMgr>.singleton.CheckMyPPT(Mathf.FloorToInt(expeditionDataByID.DisplayPPT * num));
+ if (flag)
+ {
+ this._OnRealEnter((int)go.ID);
+ }
+ else
+ {
+ XSingleton<PPTCheckMgr>.singleton.ShowPPTNotEnoughDlg(go.ID, new ButtonClickEventHandler(this._OnRealEnterClicked));
+ }
+ return true;
+ }
+
+ private bool _OnRealEnterClicked(IXUIButton go)
+ {
+ this._OnRealEnter((int)go.ID);
+ return true;
+ }
+
+ private bool _OnClickPreviewRewardBtn(IXUIButton go)
+ {
+ bool flag = go == null;
+ bool result;
+ if (flag)
+ {
+ result = false;
+ }
+ else
+ {
+ this._NestDoc.NestType = (uint)go.ID;
+ bool flag2 = this._nestStarRewardHandler != null;
+ if (flag2)
+ {
+ this._nestStarRewardHandler.SetVisible(true);
+ }
+ result = true;
+ }
+ return result;
+ }
+
+ private bool _OnClickRankBtn(IXUIButton go)
+ {
+ FirstPassDocument.Doc.SetCurDataByNestType((int)go.ID);
+ DlgBase<FirstPassRankView, FitstpassRankBehaviour>.singleton.SetVisible(true, true);
+ return true;
+ }
+
+ private void _onClickQuanMinSpr(IXUISprite spr)
+ {
+ DlgBase<XCommonHelpTipView, XCommonHelpTipBehaviour>.singleton.ShowHelp(XSysDefine.XSys_Nest_QuanMin);
+ }
+
+ private void _OnRealEnter(int id)
+ {
+ XTeamDocument specificDocument = XDocuments.GetSpecificDocument<XTeamDocument>(XTeamDocument.uuID);
+ specificDocument.SetAndMatch(id);
+ }
+
+ private void _OnItemClicked(IXUISprite iSp)
+ {
+ XItem mainItem = XBagDocument.MakeXItem((int)iSp.ID, false);
+ XSingleton<UiUtility>.singleton.ShowTooltipDialogWithSearchingCompare(mainItem, iSp, false, 0u);
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/TheExpView.cs.meta b/Client/Assets/Scripts/XMainClient/UI/TheExpView.cs.meta
new file mode 100644
index 00000000..7874e0ff
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/TheExpView.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: b73d0d516258bad4b82ed0a6e01061ee
+timeCreated: 1611404401
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/TitanBarBehaviour.cs b/Client/Assets/Scripts/XMainClient/UI/TitanBarBehaviour.cs
new file mode 100644
index 00000000..be905db9
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/TitanBarBehaviour.cs
@@ -0,0 +1,23 @@
+using System;
+using System.Collections.Generic;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class TitanBarBehaviour : DlgBehaviourBase
+ {
+ public List<XTitanItem> m_ItemList = new List<XTitanItem>();
+
+ public List<GameObject> m_ItemGoList = new List<GameObject>();
+
+ public XUIPool m_ItemPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ private void Awake()
+ {
+ Transform transform = base.transform.Find("TitanFrame/ItemTpl");
+ this.m_ItemPool.SetupPool(transform.parent.gameObject, transform.gameObject, 2u, false);
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/TitanBarBehaviour.cs.meta b/Client/Assets/Scripts/XMainClient/UI/TitanBarBehaviour.cs.meta
new file mode 100644
index 00000000..48e32fd0
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/TitanBarBehaviour.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: f32493dca4bb11f4cb344b6a569f6025
+timeCreated: 1611404846
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/TitanbarView.cs b/Client/Assets/Scripts/XMainClient/UI/TitanbarView.cs
new file mode 100644
index 00000000..76074963
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/TitanbarView.cs
@@ -0,0 +1,123 @@
+using System;
+using System.Collections.Generic;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class TitanbarView : DlgBase<TitanbarView, TitanBarBehaviour>
+ {
+ public override string fileName
+ {
+ get
+ {
+ return "Hall/TitanBar";
+ }
+ }
+
+ public override int layer
+ {
+ get
+ {
+ return 1;
+ }
+ }
+
+ public override bool autoload
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ private int[] m_DefaultItemID;
+
+ protected override void Init()
+ {
+ base.Init();
+ string[] array = XSingleton<XGlobalConfig>.singleton.GetValue("DefaultTitanItems").Split(XGlobalConfig.ListSeparator);
+ this.m_DefaultItemID = new int[array.Length];
+ for (int i = 0; i < array.Length; i++)
+ {
+ this.m_DefaultItemID[i] = int.Parse(array[i]);
+ }
+ }
+
+ public void SetTitanItems(XSysDefine sys)
+ {
+ int[] titanItems = this._GetItemIDs(sys);
+ this.SetTitanItems(titanItems);
+ }
+
+ public void SetTitanItems(int[] itemids)
+ {
+ base.uiBehaviour.m_ItemPool.FakeReturnAll();
+ for (int i = 0; i < base.uiBehaviour.m_ItemList.Count; i++)
+ {
+ base.uiBehaviour.m_ItemList[i].Recycle();
+ }
+ base.uiBehaviour.m_ItemList.Clear();
+ bool flag = itemids != null;
+ if (flag)
+ {
+ Vector3 tplPos = base.uiBehaviour.m_ItemPool.TplPos;
+ for (int j = 0; j < itemids.Length; j++)
+ {
+ XTitanItem data = XDataPool<XTitanItem>.GetData();
+ base.uiBehaviour.m_ItemList.Add(data);
+ GameObject gameObject = base.uiBehaviour.m_ItemPool.FetchGameObject(false);
+ gameObject.transform.localPosition = new Vector3(tplPos.x - (float)(base.uiBehaviour.m_ItemPool.TplWidth * (itemids.Length - 1 - j)), tplPos.y, tplPos.z);
+ data.Set(itemids[j], gameObject);
+ }
+ }
+ base.uiBehaviour.m_ItemPool.ActualReturnAll(false);
+ }
+
+ public void TryRefresh(List<int> itemids)
+ {
+ bool flag = !base.IsVisible();
+ if (!flag)
+ {
+ for (int i = 0; i < itemids.Count; i++)
+ {
+ this.TryRefresh(itemids[i]);
+ }
+ }
+ }
+
+ public void TryRefresh(int itemid)
+ {
+ bool flag = !base.IsVisible();
+ if (!flag)
+ {
+ for (int i = 0; i < base.uiBehaviour.m_ItemList.Count; i++)
+ {
+ bool flag2 = base.uiBehaviour.m_ItemList[i].ItemID == itemid;
+ if (flag2)
+ {
+ base.uiBehaviour.m_ItemList[i].RefreshValue(true);
+ break;
+ }
+ }
+ }
+ }
+
+ private int[] _GetItemIDs(XSysDefine sys)
+ {
+ OpenSystemTable.RowData sysData = XSingleton<XGameSysMgr>.singleton.GetSysData(XFastEnumIntEqualityComparer<XSysDefine>.ToInt(sys));
+ bool flag = sysData == null;
+ int[] result;
+ if (flag)
+ {
+ result = this.m_DefaultItemID;
+ }
+ else
+ {
+ result = sysData.TitanItems;
+ }
+ return result;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/TitanbarView.cs.meta b/Client/Assets/Scripts/XMainClient/UI/TitanbarView.cs.meta
new file mode 100644
index 00000000..2162b500
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/TitanbarView.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: eb885974178137e4c9be3015deda6ff3
+timeCreated: 1611404783
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/TitleDlg.cs b/Client/Assets/Scripts/XMainClient/UI/TitleDlg.cs
new file mode 100644
index 00000000..15794af0
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/TitleDlg.cs
@@ -0,0 +1,219 @@
+using System;
+using System.Collections.Generic;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ public class TitleDlg : DlgBase<TitleDlg, TitleDlgBehaviour>
+ {
+ public override string fileName
+ {
+ get
+ {
+ return "GameSystem/TitleDlg";
+ }
+ }
+
+ public override int sysid
+ {
+ get
+ {
+ return XFastEnumIntEqualityComparer<XSysDefine>.ToInt(XSysDefine.XSys_Title);
+ }
+ }
+
+ public override int layer
+ {
+ get
+ {
+ return 1;
+ }
+ }
+
+ public override bool pushstack
+ {
+ get
+ {
+ return false;
+ }
+ }
+
+ public override bool autoload
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ private XTitleDocument _Doc;
+
+ private List<TitleItemDisplay> m_titleDisplay;
+
+ private Vector3 m_leftPos;
+
+ private Vector3 m_rightPos;
+
+ private Vector3 m_middlePos;
+
+ protected override void OnLoad()
+ {
+ base.OnLoad();
+ this.m_titleDisplay = new List<TitleItemDisplay>();
+ }
+
+ protected override void OnUnload()
+ {
+ this._Doc.TitleView = null;
+ bool flag = this.m_titleDisplay != null;
+ if (flag)
+ {
+ this.m_titleDisplay.Clear();
+ this.m_titleDisplay = null;
+ }
+ bool flag2 = base.uiBehaviour != null;
+ if (flag2)
+ {
+ base.uiBehaviour.m_CurrentTitle.Reset();
+ base.uiBehaviour.m_NextTitle.Reset();
+ }
+ base.OnUnload();
+ }
+
+ protected override void Init()
+ {
+ base.Init();
+ this._Doc = XDocuments.GetSpecificDocument<XTitleDocument>(XTitleDocument.uuID);
+ this._Doc.TitleView = this;
+ this.m_leftPos = base.uiBehaviour.m_CurrentTitle.transform.localPosition;
+ this.m_rightPos = base.uiBehaviour.m_NextTitle.transform.localPosition;
+ this.m_middlePos = new Vector3(0f, this.m_leftPos.y, this.m_leftPos.z);
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ base.uiBehaviour.m_Close.RegisterClickEventHandler(new ButtonClickEventHandler(this.ClickClose));
+ base.uiBehaviour.m_Promote.RegisterClickEventHandler(new ButtonClickEventHandler(this.ClickPromote));
+ base.uiBehaviour.m_Help.RegisterClickEventHandler(new ButtonClickEventHandler(this.ClickHelp));
+ }
+
+ private bool ClickHelp(IXUIButton btn)
+ {
+ DlgBase<XCommonHelpTipView, XCommonHelpTipBehaviour>.singleton.ShowHelp(XSysDefine.XSys_Title);
+ return true;
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ this.RefreshTitleDisplay();
+ }
+
+ public void Refresh()
+ {
+ this.RefreshTitleDisplay();
+ }
+
+ public override void StackRefresh()
+ {
+ base.StackRefresh();
+ this.Refresh();
+ }
+
+ private bool ClickClose(IXUIButton btn)
+ {
+ this.SetVisibleWithAnimation(false, null);
+ return false;
+ }
+
+ private void RefreshTitleDisplay()
+ {
+ base.uiBehaviour.m_CurrentTitle.Set(this._Doc.CurrentTitle);
+ base.uiBehaviour.m_NextTitle.Set(this._Doc.NextTitle);
+ this.SetNextInfo(this._Doc.NextTitle);
+ base.uiBehaviour.m_CurrentTitle.transform.localPosition = (this._Doc.IsMax ? this.m_middlePos : this.m_leftPos);
+ base.uiBehaviour.m_point.SetActive(!this._Doc.IsMax);
+ base.uiBehaviour.m_Promote.SetEnable(this._Doc.bEnableTitleLevelUp, false);
+ base.uiBehaviour.m_redPoint.SetAlpha((float)(this._Doc.bEnableTitleLevelUp ? 1 : 0));
+ }
+
+ private void SetNextInfo(TitleTable.RowData rowData)
+ {
+ bool flag = rowData == null;
+ if (flag)
+ {
+ this.ResetActive();
+ base.uiBehaviour.m_MaxTitle.SetActive(true);
+ }
+ else
+ {
+ int i = this.m_titleDisplay.Count;
+ int num = 1 + rowData.NeedItem.Count;
+ bool flag2 = i != num;
+ while (i < num)
+ {
+ GameObject gameObject = XCommon.Instantiate<GameObject>(base.uiBehaviour.m_ItemTpl);
+ gameObject.name = XSingleton<XCommon>.singleton.StringCombine("item_", i.ToString());
+ gameObject.transform.parent = base.uiBehaviour.m_ScrollView.gameObject.transform;
+ gameObject.transform.localPosition = new Vector3(0f, (float)(-35 * i), 0f);
+ gameObject.transform.localScale = Vector3.one;
+ TitleItemDisplay titleItemDisplay = new TitleItemDisplay();
+ titleItemDisplay.Init(gameObject.transform);
+ this.m_titleDisplay.Add(titleItemDisplay);
+ i++;
+ }
+ for (int j = 0; j < i; j++)
+ {
+ bool flag3 = j == 0;
+ if (flag3)
+ {
+ this.m_titleDisplay[j].SetVisible(true);
+ this.m_titleDisplay[j].Set(0u, rowData.NeedPowerPoint, rowData.desc);
+ }
+ else
+ {
+ bool flag4 = j < num;
+ if (flag4)
+ {
+ this.m_titleDisplay[j].SetVisible(true);
+ this.m_titleDisplay[j].Set(rowData.NeedItem[j - 1, 0], rowData.NeedItem[j - 1, 1], rowData.desc);
+ }
+ else
+ {
+ this.m_titleDisplay[j].SetVisible(false);
+ }
+ }
+ }
+ bool flag5 = flag2;
+ if (flag5)
+ {
+ base.uiBehaviour.m_ScrollView.ResetPosition();
+ }
+ base.uiBehaviour.m_MaxTitle.SetActive(false);
+ }
+ }
+
+ private void ResetActive()
+ {
+ bool flag = this.m_titleDisplay != null && this.m_titleDisplay.Count > 0;
+ if (flag)
+ {
+ int count = this.m_titleDisplay.Count;
+ for (int i = 0; i < count; i++)
+ {
+ this.m_titleDisplay[i].SetVisible(false);
+ }
+ }
+ }
+
+ private bool ClickPromote(IXUIButton btn)
+ {
+ this._Doc.GetTitleLevelUp();
+ return false;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/TitleDlg.cs.meta b/Client/Assets/Scripts/XMainClient/UI/TitleDlg.cs.meta
new file mode 100644
index 00000000..31ff377e
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/TitleDlg.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 5a616a658907f4c4ca1ccee865a0fd70
+timeCreated: 1611403790
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/TitleDlgBehaviour.cs b/Client/Assets/Scripts/XMainClient/UI/TitleDlgBehaviour.cs
new file mode 100644
index 00000000..35b888ef
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/TitleDlgBehaviour.cs
@@ -0,0 +1,45 @@
+using System;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+
+namespace XMainClient.UI
+{
+ public class TitleDlgBehaviour : DlgBehaviourBase
+ {
+ public IXUIButton m_Close;
+
+ public IXUIButton m_Help;
+
+ public IXUIButton m_Promote;
+
+ public IXUIScrollView m_ScrollView;
+
+ public GameObject m_ItemTpl;
+
+ public GameObject m_point;
+
+ public GameObject m_MaxTitle;
+
+ public IXUISprite m_redPoint;
+
+ public TitleDisplay m_CurrentTitle = new TitleDisplay();
+
+ public TitleDisplay m_NextTitle = new TitleDisplay();
+
+ private void Awake()
+ {
+ this.m_Help = (base.transform.Find("Bg/Help").GetComponent("XUIButton") as IXUIButton);
+ this.m_Close = (base.transform.Find("Bg/Close").GetComponent("XUIButton") as IXUIButton);
+ this.m_Promote = (base.transform.Find("Bg/Promote").GetComponent("XUIButton") as IXUIButton);
+ this.m_redPoint = (base.transform.Find("Bg/Promote/RedPoint").GetComponent("XUISprite") as IXUISprite);
+ this.m_ScrollView = (base.transform.Find("Bg/ScrollView").GetComponent("XUIScrollView") as IXUIScrollView);
+ this.m_ItemTpl = base.transform.Find("Bg/ScrollView/ItemTpl").gameObject;
+ this.m_point = base.transform.Find("Bg/Point").gameObject;
+ this.m_ItemTpl.gameObject.SetActive(false);
+ this.m_MaxTitle = base.transform.Find("Bg/MaxTitle").gameObject;
+ this.m_CurrentTitle.Init(base.transform.Find("Bg/Current"));
+ this.m_NextTitle.Init(base.transform.Find("Bg/Next"));
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/TitleDlgBehaviour.cs.meta b/Client/Assets/Scripts/XMainClient/UI/TitleDlgBehaviour.cs.meta
new file mode 100644
index 00000000..53eb2647
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/TitleDlgBehaviour.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 3aa1477f83818e7499f073dc662d9d66
+timeCreated: 1611403597
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/TitleShareBehaviour.cs b/Client/Assets/Scripts/XMainClient/UI/TitleShareBehaviour.cs
new file mode 100644
index 00000000..7ba89422
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/TitleShareBehaviour.cs
@@ -0,0 +1,32 @@
+using System;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+
+namespace XMainClient.UI
+{
+ internal class TitleShareBehaviour : DlgBehaviourBase
+ {
+ public TitleDisplay m_currentTitle = new TitleDisplay();
+
+ public IXUITexture m_maskTexture;
+
+ public IUIDummy m_snapshotTransfrom;
+
+ public Transform m_closeTips;
+
+ public IXUILabel m_message;
+
+ public IXUISprite m_Close;
+
+ private void Awake()
+ {
+ this.m_snapshotTransfrom = (base.transform.Find("Bg/Snapshot").GetComponent("UIDummy") as IUIDummy);
+ this.m_maskTexture = (base.transform.Find("Bg/Texture").GetComponent("XUITexture") as IXUITexture);
+ this.m_currentTitle.Init(base.transform.Find("Bg/Current"));
+ this.m_closeTips = base.transform.Find("Bg/KeepOn");
+ this.m_message = (base.transform.Find("Bg/Message").GetComponent("XUILabel") as IXUILabel);
+ this.m_Close = (base.transform.Find("Bg/P").GetComponent("XUISprite") as IXUISprite);
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/TitleShareBehaviour.cs.meta b/Client/Assets/Scripts/XMainClient/UI/TitleShareBehaviour.cs.meta
new file mode 100644
index 00000000..87c19781
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/TitleShareBehaviour.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 8358ca3fef185ee4096cbd58f832ff42
+timeCreated: 1611404044
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/TitleShareDlg.cs b/Client/Assets/Scripts/XMainClient/UI/TitleShareDlg.cs
new file mode 100644
index 00000000..741e8c3b
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/TitleShareDlg.cs
@@ -0,0 +1,134 @@
+using System;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class TitleShareDlg : DlgBase<TitleShareDlg, TitleShareBehaviour>
+ {
+ public override int layer
+ {
+ get
+ {
+ return 1;
+ }
+ }
+
+ public override int sysid
+ {
+ get
+ {
+ return XFastEnumIntEqualityComparer<XSysDefine>.ToInt(XSysDefine.XSys_Title_Share);
+ }
+ }
+
+ public override string fileName
+ {
+ get
+ {
+ return "GameSystem/TitleShareDlg";
+ }
+ }
+
+ public override bool pushstack
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override bool hideMainMenu
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override bool autoload
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ private XTitleDocument _Doc;
+
+ private uint m_showTime;
+
+ private bool m_canClose;
+
+ protected override void Init()
+ {
+ base.Init();
+ this._Doc = XDocuments.GetSpecificDocument<XTitleDocument>(XTitleDocument.uuID);
+ base.uiBehaviour.m_Close.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.ClickTitleShared));
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ this.m_canClose = false;
+ TitleTable.RowData currentTitle = this._Doc.CurrentTitle;
+ base.uiBehaviour.m_closeTips.gameObject.SetActive(this.m_canClose);
+ base.uiBehaviour.m_currentTitle.Set(currentTitle);
+ bool flag = !string.IsNullOrEmpty(currentTitle.AffectRoute);
+ if (flag)
+ {
+ XSingleton<XFxMgr>.singleton.CreateAndPlay(currentTitle.AffectRoute + "_Clip01", base.uiBehaviour.transform, Vector3.zero, Vector3.one, 1f, false, 1f, true);
+ }
+ XSingleton<X3DAvatarMgr>.singleton.EnableMainDummy(true, base.uiBehaviour.m_snapshotTransfrom);
+ float interval = XSingleton<X3DAvatarMgr>.singleton.SetMainAnimationGetLength(XSingleton<XEntityMgr>.singleton.Player.Present.PresentLib.Disappear);
+ this.m_showTime = XSingleton<XTimerMgr>.singleton.SetTimer(interval, new XTimerMgr.ElapsedEventHandler(this.KillTimer), null);
+ base.uiBehaviour.m_message.SetText(XStringDefineProxy.GetString("TITLE_NEW_GET", new object[]
+ {
+ currentTitle.RankName
+ }));
+ }
+
+ private void KillTimer(object sender)
+ {
+ this.m_canClose = true;
+ base.uiBehaviour.m_closeTips.gameObject.SetActive(this.m_canClose);
+ XSingleton<XTimerMgr>.singleton.KillTimer(this.m_showTime);
+ XSingleton<X3DAvatarMgr>.singleton.SetMainAnimation(XSingleton<XEntityMgr>.singleton.Player.Present.PresentLib.AttackIdle);
+ }
+
+ protected override void OnHide()
+ {
+ XSingleton<X3DAvatarMgr>.singleton.EnableMainDummy(false, base.uiBehaviour.m_snapshotTransfrom);
+ base.OnHide();
+ this.m_showTime = 0u;
+ XSingleton<X3DAvatarMgr>.singleton.EnableMainDummy(false, null);
+ }
+
+ protected override void OnUnload()
+ {
+ XSingleton<XTimerMgr>.singleton.KillTimer(this.m_showTime);
+ XSingleton<X3DAvatarMgr>.singleton.OnUIUnloadMainDummy(base.uiBehaviour.m_snapshotTransfrom);
+ bool flag = base.uiBehaviour != null;
+ if (flag)
+ {
+ base.uiBehaviour.m_currentTitle.Reset();
+ }
+ base.OnUnload();
+ }
+
+ private void ClickTitleShared(IXUISprite texture)
+ {
+ bool flag = !this.m_canClose;
+ if (flag)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString("TITILE_QUIKE"), "fece00");
+ }
+ else
+ {
+ this.SetVisibleWithAnimation(false, null);
+ }
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/TitleShareDlg.cs.meta b/Client/Assets/Scripts/XMainClient/UI/TitleShareDlg.cs.meta
new file mode 100644
index 00000000..ee6a57a0
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/TitleShareDlg.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: de563c2fea737d54abef263c41f971f9
+timeCreated: 1611404686
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/TooltipDlg.cs b/Client/Assets/Scripts/XMainClient/UI/TooltipDlg.cs
new file mode 100644
index 00000000..77eeea39
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/TooltipDlg.cs
@@ -0,0 +1,946 @@
+using System;
+using System.Collections.Generic;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal abstract class TooltipDlg<TDlgClass, TUIBehaviour> : DlgBase<TDlgClass, TUIBehaviour>, ITooltipDlg where TDlgClass : IXUIDlg, new() where TUIBehaviour : TooltipDlgBehaviour
+ {
+ public XItemSelector ItemSelector
+ {
+ get
+ {
+ return this._ItemSelector;
+ }
+ }
+
+ public uint profession
+ {
+ get
+ {
+ return this._profession;
+ }
+ set
+ {
+ this._profession = value;
+ bool flag = this._profession == 0u;
+ if (flag)
+ {
+ this._profession = XItemDrawerParam.DefaultProfession;
+ }
+ }
+ }
+
+ public override int layer
+ {
+ get
+ {
+ return 1;
+ }
+ }
+
+ public override bool autoload
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ protected virtual int compareWindowDistance
+ {
+ get
+ {
+ return 0;
+ }
+ }
+
+ protected virtual int funcFrameWidth
+ {
+ get
+ {
+ return 150;
+ }
+ }
+
+ public ulong MainItemUID
+ {
+ get
+ {
+ return this.mainItemUID;
+ }
+ }
+
+ protected virtual string _PPTTitle
+ {
+ get
+ {
+ return null;
+ }
+ }
+
+ public ulong mainItemUID = 0UL;
+
+ public ulong compareItemUID = 0UL;
+
+ protected bool _bShowedThisFrame = false;
+
+ protected bool _bButtonClickedThisFrame = false;
+
+ protected float _bgTopOffset;
+
+ protected bool _bNeedReposition;
+
+ public float totalFrameHeight;
+
+ public bool bShowButtons = true;
+
+ protected bool bHadJade = false;
+
+ protected TooltipButtonOperateBase[,] m_OperateList = new TooltipButtonOperateBase[TooltipDlgBehaviour.MAX_GROUP_COUNT, TooltipDlgBehaviour.MAX_BUTTON_COUNT];
+
+ private IXUILabel blockTime = null;
+
+ private IXUILabel compareBlockTime = null;
+
+ private XItemSelector _ItemSelector = new XItemSelector(XSingleton<XGlobalConfig>.singleton.DefaultIconWidth);
+
+ private int _ActiveButtonCount = 0;
+
+ protected uint _profession = 0u;
+
+ private List<int> m_TempList = new List<int>();
+
+ protected override void Init()
+ {
+ base.Init();
+ this._bgTopOffset = (float)((XSingleton<XGameUI>.singleton.Base_UI_Height - base.uiBehaviour.m_PanelPool.TplHeight) / 2);
+ }
+
+ protected override void OnUnload()
+ {
+ this._ItemSelector.Unload();
+ base.OnUnload();
+ }
+
+ public virtual bool HideToolTip(bool forceHide = false)
+ {
+ bool flag = !forceHide;
+ if (flag)
+ {
+ bool bShowedThisFrame = this._bShowedThisFrame;
+ if (bShowedThisFrame)
+ {
+ return false;
+ }
+ bool bButtonClickedThisFrame = this._bButtonClickedThisFrame;
+ if (bButtonClickedThisFrame)
+ {
+ return false;
+ }
+ }
+ this.SetVisible(false, true);
+ this._ItemSelector.Hide();
+ this.profession = 0u;
+ this.mainItemUID = 0UL;
+ this.compareItemUID = 0UL;
+ base.uiBehaviour.m_AttrPool.ReturnAll(false);
+ base.uiBehaviour.m_PanelPool.ReturnAll(false);
+ base.uiBehaviour.m_AttrFramePool.ReturnAll(false);
+ return true;
+ }
+
+ public override void OnUpdate()
+ {
+ bool flag = this.blockTime == null;
+ if (!flag)
+ {
+ int num = -1;
+ bool flag2 = this.mainItemUID > 0UL && XSingleton<XGame>.singleton.Doc.XBagDoc.ItemBag.FindItem(this.mainItemUID, out num) && num > -1;
+ if (flag2)
+ {
+ XItem xitem = XSingleton<XGame>.singleton.Doc.XBagDoc.ItemBag[num];
+ bool flag3 = xitem != null && !xitem.bBinding && xitem.blocking > 0.0;
+ if (flag3)
+ {
+ bool flag4 = this.blockTime != null;
+ if (flag4)
+ {
+ this.blockTime.SetText(XStringDefineProxy.GetString("AUCTION_BLOCKING", new object[]
+ {
+ XSingleton<UiUtility>.singleton.TimeDuarationFormatSizeString((int)xitem.blocking, 2, 1)
+ }));
+ }
+ }
+ }
+ bool flag5 = this.compareItemUID > 0UL && XSingleton<XGame>.singleton.Doc.XBagDoc.ItemBag.FindItem(this.compareItemUID, out num) && num > -1;
+ if (flag5)
+ {
+ XItem xitem2 = XSingleton<XGame>.singleton.Doc.XBagDoc.ItemBag[num];
+ bool flag6 = xitem2 != null && !xitem2.bBinding && xitem2.blocking > 0.0;
+ if (flag6)
+ {
+ bool flag7 = this.compareBlockTime != null;
+ if (flag7)
+ {
+ this.compareBlockTime.SetText(XStringDefineProxy.GetString("AUCTION_BLOCKING", new object[]
+ {
+ XSingleton<UiUtility>.singleton.TimeDuarationFormatSizeString((int)xitem2.blocking, 2, 1)
+ }));
+ }
+ }
+ }
+ }
+ }
+
+ public override void OnPostUpdate()
+ {
+ this._bShowedThisFrame = false;
+ this._bButtonClickedThisFrame = false;
+ }
+
+ public void SetPosition(IXUISprite clickIcon)
+ {
+ int num = base.uiBehaviour.m_TotalFrame.spriteHeight / 2;
+ Vector3 localPosition = base.uiBehaviour.m_TotalFrame.gameObject.transform.localPosition;
+ base.uiBehaviour.m_TotalFrame.gameObject.transform.localPosition = new Vector3(localPosition.x, (float)num, localPosition.z);
+ base.uiBehaviour.DelayShow(this);
+ }
+
+ public virtual IXUISprite ShowToolTip(XItem mainItem, XItem compareItem, bool _bShowButtons, uint prof = 0u)
+ {
+ this.bShowButtons = _bShowButtons;
+ this.HideToolTip(true);
+ this.mainItemUID = ((mainItem == null || mainItem.itemID == 0) ? 0UL : mainItem.uid);
+ this.compareItemUID = ((compareItem == null || compareItem.itemID == 0) ? 0UL : compareItem.uid);
+ this.SetVisible(true, true);
+ GameObject gameObject = base.uiBehaviour.m_PanelPool.FetchGameObject(false);
+ gameObject.name = "main";
+ this.profession = prof % 10u;
+ this.SetupToolTip(gameObject, mainItem, compareItem, true);
+ GameObject gameObject2 = null;
+ bool flag = compareItem != null && compareItem.itemID != 0;
+ if (flag)
+ {
+ gameObject2 = base.uiBehaviour.m_PanelPool.FetchGameObject(false);
+ gameObject2.name = "compare";
+ this.profession = prof % 10u;
+ this.SetupToolTip(gameObject2, compareItem, mainItem, false);
+ }
+ IXUISprite ixuisprite = null;
+ bool flag2 = compareItem == null || compareItem.itemID == 0;
+ IXUISprite ixuisprite2;
+ if (flag2)
+ {
+ ixuisprite2 = (gameObject.GetComponent("XUISprite") as IXUISprite);
+ base.uiBehaviour.m_TotalFrame.spriteWidth = ixuisprite2.spriteWidth;
+ base.uiBehaviour.m_TotalFrame.spriteHeight = ixuisprite2.spriteHeight;
+ }
+ else
+ {
+ int num = 0;
+ int num2 = 0;
+ ixuisprite2 = (gameObject.GetComponent("XUISprite") as IXUISprite);
+ num += ixuisprite2.spriteWidth;
+ bool flag3 = ixuisprite2.spriteHeight > num2;
+ if (flag3)
+ {
+ num2 = ixuisprite2.spriteHeight;
+ }
+ ixuisprite = (gameObject2.GetComponent("XUISprite") as IXUISprite);
+ num += ixuisprite.spriteWidth;
+ bool flag4 = ixuisprite.spriteHeight > num2;
+ if (flag4)
+ {
+ num2 = ixuisprite.spriteHeight;
+ }
+ base.uiBehaviour.m_TotalFrame.spriteWidth = num + this.compareWindowDistance;
+ base.uiBehaviour.m_TotalFrame.spriteHeight = num2;
+ }
+ if (_bShowButtons)
+ {
+ base.uiBehaviour.m_TotalFrame.spriteWidth += this.funcFrameWidth * 2;
+ }
+ bool flag5 = compareItem == null || compareItem.itemID == 0;
+ if (flag5)
+ {
+ gameObject.transform.localPosition = Vector3.zero;
+ }
+ else
+ {
+ gameObject.transform.localPosition = new Vector3((float)(ixuisprite2.spriteWidth / 2 + this.compareWindowDistance / 2), 0f);
+ gameObject2.transform.localPosition = new Vector3((float)(-(float)ixuisprite.spriteWidth / 2 - this.compareWindowDistance / 2), 0f);
+ }
+ this._bShowedThisFrame = true;
+ this._bNeedReposition = true;
+ return base.uiBehaviour.m_TotalFrame;
+ }
+
+ public IXUISprite ShowToolTip(int itemid, uint prof = 0u)
+ {
+ this.HideToolTip(true);
+ this.SetVisible(true, true);
+ this.profession = prof % 10u;
+ this.mainItemUID = 0UL;
+ this.compareItemUID = 0UL;
+ GameObject gameObject = base.uiBehaviour.m_PanelPool.FetchGameObject(false);
+ gameObject.name = "main";
+ gameObject.transform.localPosition = base.uiBehaviour.m_PanelPool._tpl.transform.localPosition;
+ this.SetupToolTip(gameObject, itemid);
+ this._bShowedThisFrame = true;
+ this._bNeedReposition = true;
+ gameObject.transform.localPosition = Vector3.zero;
+ IXUISprite ixuisprite = gameObject.GetComponent("XUISprite") as IXUISprite;
+ base.uiBehaviour.m_TotalFrame.spriteWidth = ixuisprite.spriteWidth;
+ base.uiBehaviour.m_TotalFrame.spriteHeight = ixuisprite.spriteHeight;
+ return base.uiBehaviour.m_TotalFrame;
+ }
+
+ protected void SetupToolTip(GameObject goToolTip, int itemid)
+ {
+ ItemList.RowData itemConf = XBagDocument.GetItemConf(itemid);
+ this.totalFrameHeight = base.uiBehaviour.m_TooltipBorder;
+ bool flag = itemConf != null;
+ if (flag)
+ {
+ this.SetupTopFrame(goToolTip, itemConf, true, null, null);
+ }
+ this.bHadJade = false;
+ this.SetupOtherFrame(goToolTip, itemConf);
+ IXUISprite ixuisprite = goToolTip.GetComponent("XUISprite") as IXUISprite;
+ bool flag2 = !this.bHadJade;
+ if (flag2)
+ {
+ ixuisprite.spriteHeight = (int)(Math.Min(this.totalFrameHeight, base.uiBehaviour.m_MaxTooltipHeight) + base.uiBehaviour.m_TooltipBorder);
+ }
+ else
+ {
+ ixuisprite.spriteHeight = (int)(Math.Min(this.totalFrameHeight, base.uiBehaviour.m_MaxTooltipHeightWithJade) + base.uiBehaviour.m_TooltipBorder);
+ }
+ Transform transform = goToolTip.transform.Find("FuncFrame");
+ transform.gameObject.SetActive(false);
+ }
+
+ protected void SetupToolTip(GameObject goToolTip, XItem item, XItem compareItem, bool bMain)
+ {
+ bool flag = item == null;
+ if (!flag)
+ {
+ this.totalFrameHeight = base.uiBehaviour.m_TooltipBorder;
+ ItemList.RowData itemConf = XBagDocument.GetItemConf(item.itemID);
+ bool flag2 = itemConf != null;
+ if (flag2)
+ {
+ this.SetupTopFrame(goToolTip, itemConf, bMain, item, compareItem);
+ }
+ this.SetAllAttrFrames(goToolTip, item as XAttrItem, compareItem as XAttrItem, bMain);
+ this.bHadJade = false;
+ this.SetupOtherFrame(goToolTip, item, compareItem, bMain);
+ this.SetupToolTipButtons(goToolTip, item, bMain);
+ IXUIScrollView ixuiscrollView = goToolTip.transform.Find("ScrollPanel").GetComponent("XUIScrollView") as IXUIScrollView;
+ ixuiscrollView.ResetPosition();
+ IXUISprite ixuisprite = goToolTip.GetComponent("XUISprite") as IXUISprite;
+ bool flag3 = bMain && !XSingleton<TooltipParam>.singleton.bEquiped;
+ if (flag3)
+ {
+ ixuisprite.SetSprite("kuang_09");
+ }
+ else
+ {
+ ixuisprite.SetSprite("kuang_02");
+ }
+ bool flag4 = !this.bHadJade;
+ if (flag4)
+ {
+ ixuisprite.spriteHeight = (int)(Math.Min(this.totalFrameHeight, base.uiBehaviour.m_MaxTooltipHeight) + base.uiBehaviour.m_TooltipBorder);
+ }
+ else
+ {
+ ixuisprite.spriteHeight = (int)(Math.Min(this.totalFrameHeight, base.uiBehaviour.m_MaxTooltipHeightWithJade) + base.uiBehaviour.m_TooltipBorder);
+ }
+ Transform transform = goToolTip.transform.Find("FuncFrame");
+ Vector3 localPosition = transform.localPosition;
+ transform.localPosition = new Vector3(localPosition.x, (float)(-(float)ixuisprite.spriteHeight), localPosition.z);
+ float x = goToolTip.transform.localPosition.x;
+ }
+ }
+
+ protected virtual void SetupTopFrame(GameObject goToolTip, ItemList.RowData data, bool bMain, XItem instanceData = null, XItem compareData = null)
+ {
+ bool flag = data == null;
+ if (!flag)
+ {
+ bool flag2 = data.Profession > 0;
+ if (flag2)
+ {
+ this.profession = (uint)data.Profession;
+ }
+ this._SetupName(goToolTip, data, instanceData);
+ this._SetupQuality(goToolTip, data, bMain);
+ this._SetupBinding(goToolTip, data, bMain, instanceData);
+ this._SetupIcon(goToolTip, data, instanceData);
+ this.totalFrameHeight += (float)base.uiBehaviour.m_TopFrameHeight;
+ this.totalFrameHeight += base.uiBehaviour.m_ScrollPanelSoftnessOffset;
+ this._SetupPPTFrame(goToolTip, data, bMain, instanceData, compareData);
+ }
+ }
+
+ protected virtual void _SetupPPTFrame(GameObject goToolTip, ItemList.RowData data, bool bMain, XItem instanceData = null, XItem compareData = null)
+ {
+ Transform transform = goToolTip.transform.Find("TopFrame/PPTFrame");
+ bool flag = transform == null;
+ if (!flag)
+ {
+ bool flag2 = instanceData == null;
+ if (flag2)
+ {
+ transform.gameObject.SetActive(false);
+ }
+ else
+ {
+ transform.gameObject.SetActive(true);
+ Transform transform2 = transform.Find("Good");
+ Transform transform3 = transform.Find("Bad");
+ Transform transform4 = transform.Find("Normal");
+ transform2.gameObject.SetActive(false);
+ transform3.gameObject.SetActive(false);
+ transform4.gameObject.SetActive(false);
+ string empty = string.Empty;
+ string empty2 = string.Empty;
+ int num = this._GetPPT(instanceData, true, ref empty);
+ int num2 = this._GetPPT(compareData, false, ref empty2);
+ bool flag3 = num < 0 || num2 < 0 || num == num2;
+ Transform transform5;
+ if (flag3)
+ {
+ transform5 = transform4;
+ }
+ else
+ {
+ bool flag4 = num > num2;
+ if (flag4)
+ {
+ transform5 = transform2;
+ }
+ else
+ {
+ transform5 = transform3;
+ }
+ }
+ transform5.gameObject.SetActive(true);
+ IXUILabel ixuilabel = transform5.Find("Value").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel.SetText(empty);
+ IXUILabel ixuilabel2 = transform5.Find("Title").GetComponent("XUILabel") as IXUILabel;
+ XAttributes xattributes = bMain ? XSingleton<TooltipParam>.singleton.mainAttributes : XSingleton<TooltipParam>.singleton.compareAttributes;
+ bool flag5 = xattributes == null;
+ if (flag5)
+ {
+ xattributes = XSingleton<XAttributeMgr>.singleton.XPlayerData;
+ }
+ ProfessionTable.RowData byProfID = XSingleton<XEntityMgr>.singleton.RoleInfo.GetByProfID(xattributes.TypeID);
+ string text = (byProfID == null) ? string.Empty : XStringDefineProxy.GetString("ZizhiType" + byProfID.AttackType);
+ bool flag6 = text != null;
+ if (flag6)
+ {
+ ixuilabel2.SetText(text);
+ }
+ }
+ }
+ }
+
+ protected virtual int _GetPPT(XItem item, bool bMain, ref string valueText)
+ {
+ return -1;
+ }
+
+ protected XItemChangeAttr FindCorrespondingAttr(IEnumerable<XItemChangeAttr> attrs, uint attrID)
+ {
+ foreach (XItemChangeAttr xitemChangeAttr in attrs)
+ {
+ bool flag = xitemChangeAttr.AttrID == attrID;
+ if (flag)
+ {
+ return xitemChangeAttr;
+ }
+ }
+ return default(XItemChangeAttr);
+ }
+
+ protected virtual void SetAllAttrFrames(GameObject goToolTip, XAttrItem item, XAttrItem compareItem, bool bMain)
+ {
+ bool flag = item == null || item.changeAttr.Count == 0;
+ if (!flag)
+ {
+ GameObject gameObject = goToolTip.transform.Find("ScrollPanel").gameObject;
+ this.SetBasicAttrFrame(gameObject, item, compareItem, bMain);
+ }
+ }
+
+ protected void SetBasicAttrFrame(GameObject scrollPanel, XAttrItem item, XAttrItem compareItem, bool bMain)
+ {
+ GameObject gameObject = base.uiBehaviour.m_AttrFramePool.FetchGameObject(false);
+ gameObject.transform.parent = scrollPanel.transform;
+ AttrFrameParam attrFrameParam = new AttrFrameParam();
+ attrFrameParam.Title = XStringDefineProxy.GetString("TOOLTIP_BASIC_ATTR");
+ for (int i = 0; i < item.changeAttr.Count; i++)
+ {
+ AttrParam item2 = default(AttrParam);
+ AttrParam.ResetSb();
+ AttrParam.Append(item.changeAttr[i], "", "");
+ item2.SetTextFromSb();
+ item2.SetValueFromSb();
+ attrFrameParam.AttrList.Add(item2);
+ }
+ this.AppendFrame(gameObject, (float)this.SetupAttrFrame(gameObject, attrFrameParam, bMain), new Vector3?(base.uiBehaviour.m_AttrFramePool.TplPos));
+ this.SetAttrOther(scrollPanel.transform, attrFrameParam);
+ XSingleton<XGameUI>.singleton.m_uiTool.MarkParentAsChanged(gameObject);
+ }
+
+ public void AppendFrame(GameObject go, float frameHeight, Vector3? tplPos = null)
+ {
+ Vector3 vector = tplPos ?? go.transform.localPosition;
+ go.transform.localPosition = new Vector3(vector.x, -this.totalFrameHeight, vector.z);
+ this.totalFrameHeight += frameHeight;
+ }
+
+ protected virtual int SetupAttrFrame(GameObject attrFrame, AttrFrameParam param, bool bMain)
+ {
+ int num = 0;
+ IXUILabel ixuilabel = attrFrame.transform.Find("Title").GetComponent("XUILabel") as IXUILabel;
+ bool flag = !string.IsNullOrEmpty(param.Title);
+ int num2;
+ if (flag)
+ {
+ ixuilabel.SetText(param.Title);
+ ixuilabel.SetVisible(true);
+ num2 = (int)ixuilabel.gameObject.transform.localPosition.y - ixuilabel.spriteHeight;
+ }
+ else
+ {
+ ixuilabel.SetVisible(false);
+ num2 = (int)ixuilabel.gameObject.transform.localPosition.y;
+ }
+ Transform transform = attrFrame.transform.Find("EquipRz");
+ bool flag2 = transform != null;
+ if (flag2)
+ {
+ transform.gameObject.SetActive(false);
+ }
+ transform = attrFrame.transform.Find("RzLabel");
+ bool flag3 = transform != null;
+ if (flag3)
+ {
+ transform.gameObject.SetActive(false);
+ }
+ for (int i = 0; i < param.AttrList.Count; i++)
+ {
+ GameObject gameObject = base.uiBehaviour.m_AttrPool.FetchGameObject(false);
+ gameObject.transform.parent = attrFrame.transform;
+ XSingleton<XGameUI>.singleton.m_uiTool.MarkParentAsChanged(gameObject);
+ gameObject.transform.localPosition = new Vector3(base.uiBehaviour.m_AttrPool.TplPos.x, (float)(num2 + num), base.uiBehaviour.m_AttrPool.TplPos.z);
+ gameObject.transform.localScale = Vector3.one;
+ Transform transform2 = gameObject.transform.Find("Icon");
+ bool flag4 = transform2 != null;
+ if (flag4)
+ {
+ bool isShowTipsIcon = param.AttrList[i].IsShowTipsIcon;
+ if (isShowTipsIcon)
+ {
+ transform2.gameObject.SetActive(true);
+ IXUISprite ixuisprite = transform2.GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.SetSprite(param.AttrList[i].IconName);
+ }
+ else
+ {
+ transform2.gameObject.SetActive(false);
+ }
+ }
+ IXUILabel ixuilabel2 = gameObject.transform.Find("Text").GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel3 = gameObject.transform.Find("Value").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel2.SetText(param.AttrList[i].strText);
+ ixuilabel3.SetText(param.AttrList[i].strValue);
+ ixuilabel3.SetVisible(false);
+ ixuilabel3.SetVisible(true);
+ num -= base.uiBehaviour.m_AttrPool.TplHeight;
+ }
+ IXUISprite ixuisprite2 = attrFrame.GetComponent("XUISprite") as IXUISprite;
+ ixuisprite2.spriteHeight = -num - num2;
+ return ixuisprite2.spriteHeight;
+ }
+
+ protected virtual void SetAttrOther(Transform ParentTra, AttrFrameParam param)
+ {
+ }
+
+ protected virtual void SetupOtherFrame(GameObject goToolTip, XItem item, XItem compareItem, bool bMain)
+ {
+ }
+
+ protected virtual void SetupOtherFrame(GameObject goToolTip, ItemList.RowData data)
+ {
+ }
+
+ protected virtual void SetupToolTipButtons(GameObject goToolTip, XItem item, bool bMain)
+ {
+ for (int i = 0; i < base.uiBehaviour.m_ButtonsVisible.Length; i++)
+ {
+ base.uiBehaviour.m_ButtonsVisible[i] = false;
+ }
+ bool flag = this.bShowButtons && bMain;
+ if (flag)
+ {
+ goToolTip.transform.Find("FuncFrame").gameObject.SetActive(true);
+ Transform transform = goToolTip.transform.Find("FuncFrame/Button1");
+ bool flag2 = transform != null;
+ if (flag2)
+ {
+ IXUIButton ixuibutton = transform.GetComponent("XUIButton") as IXUIButton;
+ ixuibutton.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnButton1Clicked));
+ }
+ transform = goToolTip.transform.Find("FuncFrame/Button2");
+ bool flag3 = transform != null;
+ if (flag3)
+ {
+ IXUIButton ixuibutton2 = transform.GetComponent("XUIButton") as IXUIButton;
+ ixuibutton2.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnButton2Clicked));
+ }
+ transform = goToolTip.transform.Find("FuncFrame/Button3");
+ bool flag4 = transform != null;
+ if (flag4)
+ {
+ IXUIButton ixuibutton3 = transform.GetComponent("XUIButton") as IXUIButton;
+ ixuibutton3.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnButton3Clicked));
+ }
+ transform = goToolTip.transform.Find("FuncFrame/Button4");
+ bool flag5 = transform != null;
+ if (flag5)
+ {
+ IXUIButton ixuibutton4 = transform.GetComponent("XUIButton") as IXUIButton;
+ ixuibutton4.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnButton4Clicked));
+ }
+ transform = goToolTip.transform.Find("FuncFrame/Button5");
+ bool flag6 = transform != null;
+ if (flag6)
+ {
+ IXUIButton ixuibutton5 = transform.GetComponent("XUIButton") as IXUIButton;
+ ixuibutton5.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnButton5Clicked));
+ }
+ transform = goToolTip.transform.Find("FuncFrame/Button6");
+ bool flag7 = transform != null;
+ if (flag7)
+ {
+ IXUIButton ixuibutton6 = transform.GetComponent("XUIButton") as IXUIButton;
+ ixuibutton6.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnButton6Clicked));
+ }
+ transform = goToolTip.transform.Find("FuncFrame/Button7");
+ bool flag8 = transform != null;
+ if (flag8)
+ {
+ IXUIButton ixuibutton7 = transform.GetComponent("XUIButton") as IXUIButton;
+ ixuibutton7.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnButton7Clicked));
+ }
+ }
+ else
+ {
+ goToolTip.transform.Find("FuncFrame").gameObject.SetActive(false);
+ }
+ }
+
+ protected Vector3 _GetNextButtonPos()
+ {
+ Vector3[] buttonsOriginPos = base.uiBehaviour.m_ButtonsOriginPos;
+ int activeButtonCount = this._ActiveButtonCount;
+ this._ActiveButtonCount = activeButtonCount + 1;
+ return buttonsOriginPos[activeButtonCount];
+ }
+
+ public void SetupButtons(GameObject goToolTip, int group, bool bMain, int selectedIndex = -1, List<int> redPointIndex = null)
+ {
+ this._ActiveButtonCount = 0;
+ bool flag = group >= TooltipDlgBehaviour.MAX_GROUP_COUNT;
+ if (flag)
+ {
+ XSingleton<XDebug>.singleton.AddErrorLog("Group id out of range: ", group.ToString(), null, null, null, null);
+ }
+ else
+ {
+ int num = bMain ? 1 : -1;
+ for (int i = 0; i < TooltipDlgBehaviour.MAX_BUTTON_COUNT; i++)
+ {
+ Transform transform = goToolTip.transform.Find("FuncFrame/Button" + (i + 1));
+ bool flag2 = transform != null;
+ if (flag2)
+ {
+ bool flag3 = base.uiBehaviour.m_ButtonsVisible[i];
+ if (flag3)
+ {
+ transform.gameObject.SetActive(true);
+ IXUILabel ixuilabel = transform.Find("Label").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel.SetText(base.uiBehaviour.m_ButtonsText[group, i]);
+ IXUIButton ixuibutton = transform.GetComponent("XUIButton") as IXUIButton;
+ ixuibutton.ID = (ulong)((long)group);
+ Vector3 vector = this._GetNextButtonPos();
+ transform.localPosition = new Vector3(Mathf.Abs(vector.x) * (float)num, vector.y, vector.z);
+ IXUISprite ixuisprite = transform.GetComponent("XUISprite") as IXUISprite;
+ bool flag4 = ixuisprite != null;
+ if (flag4)
+ {
+ bool flag5 = redPointIndex != null && redPointIndex.Count != 0 && redPointIndex.Contains(i);
+ if (flag5)
+ {
+ ixuisprite.gameObject.transform.Find("RedPoint").gameObject.SetActive(true);
+ }
+ else
+ {
+ ixuisprite.gameObject.transform.Find("RedPoint").gameObject.SetActive(false);
+ }
+ }
+ }
+ else
+ {
+ transform.gameObject.SetActive(false);
+ }
+ }
+ }
+ }
+ }
+
+ protected void _SetupButtonVisiability(GameObject goToolTip, int group, XItem item)
+ {
+ this.m_TempList.Clear();
+ for (int i = 0; i < TooltipDlgBehaviour.MAX_BUTTON_COUNT; i++)
+ {
+ TooltipButtonOperateBase tooltipButtonOperateBase = this.m_OperateList[group, i];
+ bool flag = tooltipButtonOperateBase != null;
+ if (flag)
+ {
+ this.m_uiBehaviour.m_ButtonsVisible[i] = tooltipButtonOperateBase.IsButtonVisible(item);
+ this.m_uiBehaviour.m_ButtonsText[group, i] = tooltipButtonOperateBase.GetButtonText();
+ bool flag2 = tooltipButtonOperateBase.HasRedPoint(item);
+ if (flag2)
+ {
+ this.m_TempList.Add(i);
+ }
+ }
+ }
+ this.SetupButtons(goToolTip, group, true, -1, this.m_TempList);
+ }
+
+ protected virtual bool OnButton7Clicked(IXUIButton button)
+ {
+ this._bButtonClickedThisFrame = true;
+ bool flag = this.m_OperateList[(int)button.ID, 6] != null;
+ if (flag)
+ {
+ this.m_OperateList[(int)button.ID, 6].OnButtonClick(this.mainItemUID, this.compareItemUID);
+ }
+ this.HideToolTip(true);
+ return true;
+ }
+
+ protected virtual bool OnButton6Clicked(IXUIButton button)
+ {
+ this._bButtonClickedThisFrame = true;
+ bool flag = this.m_OperateList[(int)button.ID, 5] != null;
+ if (flag)
+ {
+ this.m_OperateList[(int)button.ID, 5].OnButtonClick(this.mainItemUID, this.compareItemUID);
+ }
+ this.HideToolTip(true);
+ return true;
+ }
+
+ protected virtual bool OnButton5Clicked(IXUIButton button)
+ {
+ this._bButtonClickedThisFrame = true;
+ bool flag = this.m_OperateList[(int)button.ID, 4] != null;
+ if (flag)
+ {
+ this.m_OperateList[(int)button.ID, 4].OnButtonClick(this.mainItemUID, this.compareItemUID);
+ }
+ this.HideToolTip(true);
+ return true;
+ }
+
+ protected virtual bool OnButton4Clicked(IXUIButton button)
+ {
+ this._bButtonClickedThisFrame = true;
+ bool flag = this.m_OperateList[(int)button.ID, 3] != null;
+ if (flag)
+ {
+ this.m_OperateList[(int)button.ID, 3].OnButtonClick(this.mainItemUID, this.compareItemUID);
+ }
+ this.HideToolTip(true);
+ return true;
+ }
+
+ protected virtual bool OnButton3Clicked(IXUIButton button)
+ {
+ this._bButtonClickedThisFrame = true;
+ bool flag = this.m_OperateList[(int)button.ID, 2] != null;
+ if (flag)
+ {
+ this.m_OperateList[(int)button.ID, 2].OnButtonClick(this.mainItemUID, this.compareItemUID);
+ }
+ this.HideToolTip(true);
+ return true;
+ }
+
+ protected virtual bool OnButton2Clicked(IXUIButton button)
+ {
+ this._bButtonClickedThisFrame = true;
+ bool flag = this.m_OperateList[(int)button.ID, 1] != null;
+ if (flag)
+ {
+ this.m_OperateList[(int)button.ID, 1].OnButtonClick(this.mainItemUID, this.compareItemUID);
+ }
+ this.HideToolTip(true);
+ return true;
+ }
+
+ protected virtual bool OnButton1Clicked(IXUIButton button)
+ {
+ this._bButtonClickedThisFrame = true;
+ bool flag = this.m_OperateList[(int)button.ID, 0] != null;
+ if (flag)
+ {
+ this.m_OperateList[(int)button.ID, 0].OnButtonClick(this.mainItemUID, this.compareItemUID);
+ }
+ this.HideToolTip(true);
+ return true;
+ }
+
+ protected void _SetTopFrameLabel(GameObject goToolTip, int index, string key, string value)
+ {
+ IXUILabel ixuilabel = goToolTip.transform.Find("TopFrame/Text" + index.ToString()).GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel2 = ixuilabel.gameObject.transform.Find("T").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel.SetText(value);
+ ixuilabel2.SetText(key);
+ }
+
+ protected void _SetupQuality(GameObject goToolTip, ItemList.RowData data, bool bMain)
+ {
+ GameObject gameObject = goToolTip.transform.Find("TopFrame/Quality/MainFrame").gameObject;
+ GameObject gameObject2 = goToolTip.transform.Find("TopFrame/Quality/CompareFrame").gameObject;
+ bool flag = bMain && !XSingleton<TooltipParam>.singleton.bEquiped;
+ gameObject.SetActive(flag);
+ gameObject2.SetActive(!flag);
+ IXUISprite ixuisprite = goToolTip.transform.Find("TopFrame/Quality").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.spriteName = XSingleton<UiUtility>.singleton.GetItemQualityIcon((int)data.ItemQuality);
+ }
+
+ protected void _SetupBinding(GameObject goToolTip, ItemList.RowData data, bool bMain, XItem instanceData = null)
+ {
+ Transform transform = goToolTip.transform.Find("TopFrame/Binding/Yes");
+ Transform transform2 = goToolTip.transform.Find("TopFrame/Binding/No");
+ Transform transform3 = goToolTip.transform.Find("TopFrame/Binding/Blocking");
+ bool flag = transform3 != null;
+ if (flag)
+ {
+ if (bMain)
+ {
+ this.blockTime = (transform3.GetComponent("XUILabel") as IXUILabel);
+ }
+ else
+ {
+ this.compareBlockTime = (transform3.GetComponent("XUILabel") as IXUILabel);
+ }
+ }
+ bool flag2 = XSingleton<TooltipParam>.singleton.bBinded;
+ double num = 0.0;
+ bool flag3 = instanceData != null;
+ if (flag3)
+ {
+ num = instanceData.blocking;
+ flag2 = instanceData.bBinding;
+ }
+ bool flag4 = this.blockTime != null && bMain;
+ if (flag4)
+ {
+ this.blockTime.SetText((!flag2 && num > 0.0) ? XStringDefineProxy.GetString("AUCTION_BLOCKING", new object[]
+ {
+ XSingleton<UiUtility>.singleton.TimeDuarationFormatString((int)instanceData.blocking, 4)
+ }) : string.Empty);
+ }
+ bool flag5 = this.compareBlockTime != null && !bMain;
+ if (flag5)
+ {
+ this.compareBlockTime.SetText((!flag2 && num > 0.0) ? XStringDefineProxy.GetString("AUCTION_BLOCKING", new object[]
+ {
+ XSingleton<UiUtility>.singleton.TimeDuarationFormatString((int)instanceData.blocking, 4)
+ }) : string.Empty);
+ }
+ bool flag6 = transform != null;
+ if (flag6)
+ {
+ transform.gameObject.SetActive(flag2);
+ }
+ bool flag7 = transform2 != null;
+ if (flag7)
+ {
+ transform2.gameObject.SetActive(!flag2);
+ }
+ }
+
+ protected void _SetupIcon(GameObject goToolTip, ItemList.RowData data, XItem instanceData)
+ {
+ XItemDrawerMgr.Param.Profession = this.profession;
+ bool flag = instanceData == null;
+ if (flag)
+ {
+ XSingleton<XItemDrawerMgr>.singleton.normalItemDrawer.DrawItem(goToolTip.transform.Find("TopFrame/ItemTpl").gameObject, data, 0, false);
+ }
+ else
+ {
+ XSingleton<XItemDrawerMgr>.singleton.DrawItem(goToolTip.transform.Find("TopFrame/ItemTpl").gameObject, instanceData);
+ }
+ }
+
+ protected void _SetupLevel(GameObject goToolTip, ItemList.RowData data, int index)
+ {
+ this._SetTopFrameLabel(goToolTip, index, XStringDefineProxy.GetString("ToolTipText_Level"), ((long)data.ReqLevel > (long)((ulong)XSingleton<XAttributeMgr>.singleton.XPlayerData.Level)) ? ("[ff0000]" + data.ReqLevel.ToString()) : data.ReqLevel.ToString());
+ }
+
+ protected void _SetupProf(GameObject goToolTip, ItemList.RowData data, bool bMain, XItem instanceData, int index)
+ {
+ this._SetTopFrameLabel(goToolTip, index, XStringDefineProxy.GetString("ToolTipText_Prof"), this._GetProf(data, bMain, instanceData));
+ }
+
+ protected void _SetupType(GameObject goToolTip, ItemList.RowData data, int index)
+ {
+ this._SetTopFrameLabel(goToolTip, index, XStringDefineProxy.GetString("ToolTipText_Type"), XSingleton<UiUtility>.singleton.GetItemTypeStr((int)data.ItemType));
+ }
+
+ protected void _SetupName(GameObject goToolTip, ItemList.RowData data, XItem instanceData = null)
+ {
+ IXUILabel ixuilabel = goToolTip.transform.Find("TopFrame/Name").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel.SetText(XSingleton<UiUtility>.singleton.GetEquipName(data, instanceData, this.profession));
+ ixuilabel.SetColor(XSingleton<UiUtility>.singleton.GetItemQualityColor((int)data.ItemQuality));
+ }
+
+ protected string _GetProf(ItemList.RowData data, bool bMain, XItem instanceData)
+ {
+ bool flag = XBagDocument.IsProfMatched((uint)data.Profession);
+ string result;
+ if (flag)
+ {
+ result = XSingleton<XProfessionSkillMgr>.singleton.GetProfName((int)data.Profession);
+ }
+ else
+ {
+ result = "[ff0000]" + XSingleton<XProfessionSkillMgr>.singleton.GetProfName((int)data.Profession);
+ }
+ return result;
+ }
+
+ public static Rect GetValidPos(int width, int height)
+ {
+ Rect result = default(Rect);
+ result.Set((float)(-(float)(XSingleton<XGameUI>.singleton.Base_UI_Width - width) / 2), (float)(-(float)XSingleton<XGameUI>.singleton.Base_UI_Height / 2 + height), (float)(XSingleton<XGameUI>.singleton.Base_UI_Width - width), (float)(XSingleton<XGameUI>.singleton.Base_UI_Height - height));
+ return result;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/TooltipDlg.cs.meta b/Client/Assets/Scripts/XMainClient/UI/TooltipDlg.cs.meta
new file mode 100644
index 00000000..e00c15ba
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/TooltipDlg.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 94ba52b1d45763440820e9785776261a
+timeCreated: 1611404156
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/TooltipDlgBehaviour.cs b/Client/Assets/Scripts/XMainClient/UI/TooltipDlgBehaviour.cs
new file mode 100644
index 00000000..7d2270c8
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/TooltipDlgBehaviour.cs
@@ -0,0 +1,128 @@
+using System;
+using System.Collections;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class TooltipDlgBehaviour : DlgBehaviourBase
+ {
+ public XUIPool m_PanelPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ public XUIPool m_AttrPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ public XUIPool m_AttrFramePool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ public Vector3 m_OriginPos;
+
+ public Color m_OriginAttrNameColor;
+
+ public Color m_OriginAttrValueColor;
+
+ public GameObject m_Black;
+
+ public IXUISprite m_TotalFrame;
+
+ public IXUISprite m_ToolTipMain;
+
+ public int m_TopFrameHeight;
+
+ public float m_ScrollPanelSoftnessOffset;
+
+ public float m_TooltipBorder;
+
+ public float m_MaxTooltipHeight;
+
+ public float m_MaxTooltipHeightWithJade;
+
+ public Vector3[] m_ButtonsOriginPos = new Vector3[TooltipDlgBehaviour.MAX_BUTTON_COUNT];
+
+ public string[,] m_ButtonsText = new string[TooltipDlgBehaviour.MAX_GROUP_COUNT, TooltipDlgBehaviour.MAX_BUTTON_COUNT];
+
+ public bool[] m_ButtonsVisible = new bool[TooltipDlgBehaviour.MAX_BUTTON_COUNT];
+
+ public static readonly int MAX_BUTTON_COUNT = 7;
+
+ public static readonly int MAX_GROUP_COUNT = 4;
+
+ protected virtual void Awake()
+ {
+ Transform transform = base.transform.Find("Black");
+ bool flag = transform != null;
+ if (flag)
+ {
+ this.m_Black = transform.gameObject;
+ }
+ GameObject gameObject = base.transform.Find("Bg/Bg").gameObject;
+ this.m_TotalFrame = (gameObject.GetComponent("XUISprite") as IXUISprite);
+ this.m_OriginPos = this.m_TotalFrame.gameObject.transform.localPosition;
+ transform = base.transform.Find("Bg/Bg/ToolTip/TopFrame");
+ this.m_TooltipBorder = -transform.localPosition.y;
+ this.m_TopFrameHeight = (transform.GetComponent("XUISprite") as IXUISprite).spriteHeight;
+ transform = base.transform.Find("Bg/Bg/ToolTip/ScrollPanel/BasicAttr/Attr1");
+ bool flag2 = transform != null;
+ if (flag2)
+ {
+ this.m_AttrPool.SetupPool(gameObject, transform.gameObject, 2u, false);
+ }
+ transform = base.transform.Find("Bg/Bg/ToolTip/ScrollPanel/BasicAttr");
+ bool flag3 = transform != null;
+ if (flag3)
+ {
+ this.m_AttrFramePool.SetupPool(gameObject, transform.gameObject, 2u, false);
+ }
+ transform = base.transform.Find("Bg/Bg/ToolTip/ScrollPanel");
+ IXUIPanel ixuipanel = transform.GetComponent("XUIPanel") as IXUIPanel;
+ IXUISprite ixuisprite = base.transform.Find("Bg/Bg/ToolTip").GetComponent("XUISprite") as IXUISprite;
+ this.m_ScrollPanelSoftnessOffset = ixuipanel.softness.y;
+ this.m_MaxTooltipHeightWithJade = (float)ixuisprite.spriteHeight - this.m_TooltipBorder;
+ this.m_MaxTooltipHeight = (float)(this.m_TopFrameHeight + (int)ixuipanel.GetBaseRect().w) + this.m_ScrollPanelSoftnessOffset + this.m_TooltipBorder;
+ transform = base.transform.Find("Bg/Bg/ToolTip/ScrollPanel/PlaceHolder");
+ bool flag4 = transform != null;
+ if (flag4)
+ {
+ transform.transform.localPosition = new Vector3(0f, (float)(-(float)this.m_TopFrameHeight) - this.m_ScrollPanelSoftnessOffset - this.m_TooltipBorder);
+ }
+ transform = base.transform.Find("Bg/Bg/ToolTip/FuncFrame/ButtonTpl");
+ XUIPool xuipool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+ xuipool.SetupPool(transform.parent.gameObject, transform.gameObject, (uint)TooltipDlgBehaviour.MAX_BUTTON_COUNT, false);
+ for (int i = 0; i < TooltipDlgBehaviour.MAX_BUTTON_COUNT; i++)
+ {
+ transform = xuipool.FetchGameObject(false).transform;
+ transform.name = "Button" + (i + 1);
+ transform.localPosition = new Vector3(xuipool.TplPos.x, xuipool.TplPos.y + (float)(xuipool.TplHeight * i));
+ bool flag5 = transform != null;
+ if (flag5)
+ {
+ this.m_ButtonsOriginPos[i] = transform.localPosition;
+ }
+ this.m_ButtonsVisible[i] = false;
+ }
+ transform = base.transform.Find("Bg/Bg/ToolTip");
+ this.m_ToolTipMain = (transform.gameObject.GetComponent("XUISprite") as IXUISprite);
+ this.m_PanelPool.SetupPool(transform.parent.gameObject, transform.gameObject, 2u, false);
+ bool flag6 = this.m_AttrPool._tpl != null;
+ if (flag6)
+ {
+ this.m_OriginAttrNameColor = (this.m_AttrPool._tpl.transform.Find("Text").GetComponent("XUILabel") as IXUILabel).GetColor();
+ this.m_OriginAttrValueColor = (this.m_AttrPool._tpl.transform.Find("Value").GetComponent("XUILabel") as IXUILabel).GetColor();
+ }
+ }
+
+ public void DelayShow(IXUIDlg dlg)
+ {
+ base.StartCoroutine(this.InnerShow(dlg));
+ }
+
+ private IEnumerator InnerShow(IXUIDlg dlg)
+ {
+ IXUIPanel panel = base.gameObject.transform.Find("Bg").gameObject.GetComponent("XUIPanel") as IXUIPanel;
+ panel.SetAlpha(0f);
+ yield return null;
+ panel.SetAlpha(1f);
+ yield break;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/TooltipDlgBehaviour.cs.meta b/Client/Assets/Scripts/XMainClient/UI/TooltipDlgBehaviour.cs.meta
new file mode 100644
index 00000000..2d8fb272
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/TooltipDlgBehaviour.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: fc4bcb341579e2347933f4f69157670b
+timeCreated: 1611404934
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/TooltipParam.cs b/Client/Assets/Scripts/XMainClient/UI/TooltipParam.cs
new file mode 100644
index 00000000..4c694f17
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/TooltipParam.cs
@@ -0,0 +1,37 @@
+using System;
+using System.Collections.Generic;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class TooltipParam : XSingleton<TooltipParam>
+ {
+ public XBodyBag BodyBag = null;
+
+ public List<uint> FashionOnBody;
+
+ public bool bEquiped = false;
+
+ public bool bBinded = false;
+
+ public bool bShowPutInBtn = false;
+
+ public bool bShowTakeOutBtn = false;
+
+ public XAttributes mainAttributes = null;
+
+ public XAttributes compareAttributes = null;
+
+ public void Reset()
+ {
+ this.BodyBag = null;
+ this.bEquiped = false;
+ this.bBinded = false;
+ this.bShowPutInBtn = false;
+ this.bShowTakeOutBtn = false;
+ this.mainAttributes = null;
+ this.compareAttributes = null;
+ this.FashionOnBody = null;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/TooltipParam.cs.meta b/Client/Assets/Scripts/XMainClient/UI/TooltipParam.cs.meta
new file mode 100644
index 00000000..5ccfbd73
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/TooltipParam.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: a87f1f4569b501541a9bc58ed4fb7e7c
+timeCreated: 1611404296
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/UICommon.meta b/Client/Assets/Scripts/XMainClient/UI/UICommon.meta
new file mode 100644
index 00000000..da4e5ced
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/UICommon.meta
@@ -0,0 +1,9 @@
+fileFormatVersion: 2
+guid: f26ddce421d634246b8ab19a778db02e
+folderAsset: yes
+timeCreated: 1611402943
+licenseType: Free
+DefaultImporter:
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/UICommon/DlgBase.cs b/Client/Assets/Scripts/XMainClient/UI/UICommon/DlgBase.cs
new file mode 100644
index 00000000..234b0f2c
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/UICommon/DlgBase.cs
@@ -0,0 +1,750 @@
+using System;
+using UILib;
+using UnityEngine;
+using XUpdater;
+using XUtliPoolLib;
+
+namespace XMainClient.UI.UICommon
+{
+ public abstract class DlgBase<TDlgClass, TUIBehaviour> : IXUIDlg, IDlgHandlerMgr where TDlgClass : IXUIDlg, new() where TUIBehaviour : DlgBehaviourBase
+ {
+ public static TDlgClass singleton
+ {
+ get
+ {
+ bool flag = DlgBase<TDlgClass, TUIBehaviour>.s_instance == null;
+ if (flag)
+ {
+ object obj = DlgBase<TDlgClass, TUIBehaviour>.s_objLock;
+ lock (obj)
+ {
+ bool flag2 = DlgBase<TDlgClass, TUIBehaviour>.s_instance == null;
+ if (flag2)
+ {
+ DlgBase<TDlgClass, TUIBehaviour>.s_instance = Activator.CreateInstance<TDlgClass>();
+ }
+ }
+ }
+ return DlgBase<TDlgClass, TUIBehaviour>.s_instance;
+ }
+ }
+
+ public IXUIBehaviour uiBehaviourInterface
+ {
+ get
+ {
+ return this.m_uiBehaviour;
+ }
+ }
+
+ public TUIBehaviour uiBehaviour
+ {
+ get
+ {
+ return this.m_uiBehaviour;
+ }
+ }
+
+ public virtual string fileName
+ {
+ get
+ {
+ return "";
+ }
+ }
+
+ public string luaFileName
+ {
+ get
+ {
+ bool flag = this.fileName.Length > 1 && this.fileName.Contains("/");
+ string result;
+ if (flag)
+ {
+ result = this.fileName.Substring(this.fileName.LastIndexOf('/') + 1);
+ }
+ else
+ {
+ result = this.fileName;
+ }
+ return result;
+ }
+ }
+
+ public virtual int layer
+ {
+ get
+ {
+ return 2;
+ }
+ }
+
+ public virtual int group
+ {
+ get
+ {
+ return 0;
+ }
+ }
+
+ public virtual bool exclusive
+ {
+ get
+ {
+ return false;
+ }
+ }
+
+ public virtual bool autoload
+ {
+ get
+ {
+ return false;
+ }
+ }
+
+ public virtual bool isHideChat
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public virtual bool hideMainMenu
+ {
+ get
+ {
+ return false;
+ }
+ }
+
+ public virtual bool pushstack
+ {
+ get
+ {
+ return false;
+ }
+ }
+
+ public virtual bool isMainUI
+ {
+ get
+ {
+ return false;
+ }
+ }
+
+ public virtual bool isHideTutorial
+ {
+ get
+ {
+ return false;
+ }
+ }
+
+ public virtual int sysid
+ {
+ get
+ {
+ return 0;
+ }
+ }
+
+ public virtual bool fullscreenui
+ {
+ get
+ {
+ return false;
+ }
+ }
+
+ public bool Prepared
+ {
+ get
+ {
+ return null != this.m_uiBehaviour;
+ }
+ }
+
+ public virtual bool isPopup
+ {
+ get
+ {
+ return false;
+ }
+ }
+
+ public virtual bool needOnTop
+ {
+ get
+ {
+ return false;
+ }
+ }
+
+ public DlgHandlerMgr HandlerMgr
+ {
+ get
+ {
+ return this.m_DlgHandlerMgr;
+ }
+ }
+
+ private LoadUIFinishedEventHandler _loadUICb = null;
+
+ protected int m_dummPool = -1;
+
+ private IXNGUICallback panelCB = null;
+
+ protected TUIBehaviour m_uiBehaviour = default(TUIBehaviour);
+
+ private static TDlgClass s_instance = default(TDlgClass);
+
+ private static object s_objLock = new object();
+
+ private bool m_bVisible = false;
+
+ protected bool m_bLoaded = false;
+
+ private float m_fDepthZ = 0f;
+
+ private bool m_bBindedReverse = false;
+
+ private Transform m_DlgController = null;
+
+ private bool m_bCacheVisible = false;
+
+ private DlgBase<TDlgClass, TUIBehaviour>.OnAnimationOver m_animationOver;
+
+ private IXUIDlg m_RelatedDlg;
+
+ private DlgHandlerMgr m_DlgHandlerMgr = new DlgHandlerMgr();
+
+ public delegate void OnAnimationOver();
+
+ public DlgBase()
+ {
+ this._loadUICb = new LoadUIFinishedEventHandler(this.OnLoadUIFinishedEventHandler);
+ }
+
+ public virtual void OnUpdate()
+ {
+ this.HandlerMgr.OnUpdate();
+ }
+
+ public virtual void OnPostUpdate()
+ {
+ }
+
+ public void SetVisiblePure(bool bVisible)
+ {
+ bool flag = !this.m_bLoaded && this.autoload;
+ if (flag)
+ {
+ this.Load();
+ }
+ else
+ {
+ bool flag2 = !this.m_bLoaded && !this.autoload;
+ if (flag2)
+ {
+ return;
+ }
+ }
+ this.uiBehaviour.SetVisible(bVisible);
+ this.m_bVisible = bVisible;
+ this.OnSetVisiblePure(bVisible);
+ bool flag3 = this.m_RelatedDlg != null;
+ if (flag3)
+ {
+ this.m_RelatedDlg.SetRelatedVisible(this.m_bVisible);
+ }
+ }
+
+ public virtual void SetVisible(bool bIsVisible, bool bEnableAuto = true)
+ {
+ bool bLoaded = this.m_bLoaded;
+ if (!bLoaded)
+ {
+ bool flag = this.autoload && bEnableAuto;
+ if (!flag)
+ {
+ return;
+ }
+ this.Load();
+ }
+ bool flag2 = bIsVisible && !this._CanShow();
+ if (!flag2)
+ {
+ bool prepared = this.Prepared;
+ if (prepared)
+ {
+ bool flag3 = this.m_bVisible != bIsVisible;
+ if (flag3)
+ {
+ this.uiBehaviour.SetVisible(bIsVisible);
+ this.m_bVisible = bIsVisible;
+ if (bIsVisible)
+ {
+ XSingleton<UIManager>.singleton.OnDlgShow(DlgBase<TDlgClass, TUIBehaviour>.s_instance);
+ ILuaEngine xluaEngine = XSingleton<XUpdater.XUpdater>.singleton.XLuaEngine;
+ bool flag4 = !xluaEngine.hotfixMgr.TryFixRefresh(HotfixMode.BEFORE, this.luaFileName, this.uiBehaviour.gameObject);
+ if (flag4)
+ {
+ this.OnShow();
+ xluaEngine.hotfixMgr.TryFixRefresh(HotfixMode.AFTER, this.luaFileName, this.uiBehaviour.gameObject);
+ }
+ bool flag5 = this.fullscreenui && XSingleton<XScene>.singleton.GameCamera != null && XSingleton<XScene>.singleton.GameCamera.UnityCamera != null;
+ if (flag5)
+ {
+ XSingleton<XScene>.singleton.GameCamera.UnityCamera.enabled = false;
+ }
+ }
+ else
+ {
+ this.OnHide();
+ XSingleton<UIManager>.singleton.OnDlgHide(DlgBase<TDlgClass, TUIBehaviour>.s_instance);
+ ILuaEngine xluaEngine2 = XSingleton<XUpdater.XUpdater>.singleton.XLuaEngine;
+ xluaEngine2.hotfixMgr.TryFixRefresh(HotfixMode.HIDE, this.luaFileName, this.uiBehaviour.gameObject);
+ bool flag6 = XSingleton<UIManager>.singleton.GetFullScreenUICount() == 0 && XSingleton<XScene>.singleton.GameCamera != null && XSingleton<XScene>.singleton.GameCamera.UnityCamera != null;
+ if (flag6)
+ {
+ XSingleton<XScene>.singleton.GameCamera.UnityCamera.enabled = true;
+ }
+ }
+ bool flag7 = this.m_RelatedDlg != null;
+ if (flag7)
+ {
+ this.m_RelatedDlg.SetVisible(this.m_bVisible, true);
+ }
+ }
+ }
+ }
+ }
+
+ public virtual void SetVisibleWithAnimation(bool bVisible, DlgBase<TDlgClass, TUIBehaviour>.OnAnimationOver AnimationOverDelegate)
+ {
+ bool flag = !this.m_bLoaded;
+ if (flag)
+ {
+ this.Load();
+ }
+ bool flag2 = bVisible && !this._CanShow();
+ if (!flag2)
+ {
+ int fullScreenUICount = XSingleton<UIManager>.singleton.GetFullScreenUICount();
+ bool flag3 = (bVisible && fullScreenUICount > 0) || (!bVisible && ((this.fullscreenui && fullScreenUICount > 1) || (!this.fullscreenui && fullScreenUICount > 0)));
+ if (flag3)
+ {
+ this.SetVisible(bVisible, true);
+ bool flag4 = AnimationOverDelegate != null;
+ if (flag4)
+ {
+ AnimationOverDelegate();
+ }
+ }
+ else
+ {
+ this.SetVisible(bVisible, true);
+ this.m_bCacheVisible = bVisible;
+ this.m_animationOver = AnimationOverDelegate;
+ bool flag5 = AnimationOverDelegate != null;
+ if (flag5)
+ {
+ AnimationOverDelegate();
+ }
+ }
+ }
+ }
+
+ protected void OnShowAnimationFinish(IXUITweenTool tween)
+ {
+ bool fullscreenui = this.fullscreenui;
+ if (fullscreenui)
+ {
+ XSingleton<XScene>.singleton.GameCamera.UnityCamera.enabled = false;
+ }
+ }
+
+ protected void OnCloseAnimationFinish(IXUITweenTool tween)
+ {
+ this.SetVisible(false, true);
+ bool flag = this.m_animationOver != null;
+ if (flag)
+ {
+ this.m_animationOver();
+ }
+ }
+
+ protected virtual void OnShow()
+ {
+ }
+
+ protected virtual void OnHide()
+ {
+ }
+
+ protected virtual void OnLoad()
+ {
+ }
+
+ protected virtual void OnUnload()
+ {
+ this.UnRegisterEvent();
+ }
+
+ public bool IsVisible()
+ {
+ bool bLoaded = this.m_bLoaded;
+ return bLoaded && this.uiBehaviour.IsVisible();
+ }
+
+ public void SetDepthZ(int nDepthZ)
+ {
+ this.m_fDepthZ = (float)(nDepthZ * 10);
+ bool prepared = this.Prepared;
+ if (prepared)
+ {
+ Vector3 localPosition = this.uiBehaviour.transform.localPosition;
+ localPosition.z = this.m_fDepthZ;
+ this.uiBehaviour.transform.localPosition = localPosition;
+ }
+ }
+
+ public virtual void Reset()
+ {
+ }
+
+ public virtual void StackRefresh()
+ {
+ bool flag = this.HandlerMgr != null;
+ if (flag)
+ {
+ this.HandlerMgr.StackRefresh();
+ }
+ }
+
+ public virtual void LeaveStackTop()
+ {
+ bool flag = this.HandlerMgr != null;
+ if (flag)
+ {
+ this.HandlerMgr.LeaveStackTop();
+ }
+ }
+
+ protected virtual void OnSetVisiblePure(bool bShow)
+ {
+ }
+
+ protected virtual void Init()
+ {
+ }
+
+ private void InnerInit()
+ {
+ this.m_uiBehaviour.Init();
+ Vector3 localPosition = this.uiBehaviour.transform.localPosition;
+ localPosition.z = this.m_fDepthZ;
+ this.uiBehaviour.transform.localPosition = localPosition;
+ this.m_DlgController = this.uiBehaviour.transform.Find("DlgController");
+ }
+
+ public void Load()
+ {
+ bool flag = !this.m_bLoaded;
+ if (flag)
+ {
+ this.m_bLoaded = true;
+ XSingleton<UIManager>.singleton.LoadUI(this.fileName, this._loadUICb);
+ XSingleton<UIManager>.singleton.AddDlg(DlgBase<TDlgClass, TUIBehaviour>.s_instance);
+ this.OnLoad();
+ }
+ }
+
+ public bool IsLoaded()
+ {
+ return this.m_bLoaded;
+ }
+
+ public void UnLoad(bool bTransfer = false)
+ {
+ bool bLoaded = this.m_bLoaded;
+ if (bLoaded)
+ {
+ if (bTransfer)
+ {
+ this.SetVisible(false, false);
+ }
+ else
+ {
+ ILuaEngine xluaEngine = XSingleton<XUpdater.XUpdater>.singleton.XLuaEngine;
+ xluaEngine.hotfixMgr.TryFixRefresh(HotfixMode.UNLOAD, this.luaFileName, this.uiBehaviour.gameObject);
+ this.OnUnload();
+ this.HandlerMgr.Unload();
+ XSingleton<UIManager>.singleton.RemoveDlg(DlgBase<TDlgClass, TUIBehaviour>.s_instance);
+ XSingleton<XResourceLoaderMgr>.singleton.UnSafeDestroy(this.uiBehaviour.gameObject, false, true);
+ this.m_uiBehaviour = default(TUIBehaviour);
+ this.m_uiBehaviour = default(TUIBehaviour);
+ this.m_bLoaded = false;
+ bool flag = !XSingleton<XGame>.singleton.switchScene;
+ if (flag)
+ {
+ bool flag2 = XSingleton<UIManager>.singleton.unloadUICount >= 10;
+ if (flag2)
+ {
+ Resources.UnloadUnusedAssets();
+ XSingleton<UIManager>.singleton.unloadUICount = 0;
+ }
+ else
+ {
+ XSingleton<UIManager>.singleton.unloadUICount++;
+ }
+ }
+ }
+ }
+ }
+
+ public void SetAlpha(float a)
+ {
+ IXUIPanel ixuipanel = this.uiBehaviour.gameObject.GetComponent("XUIPanel") as IXUIPanel;
+ bool flag = ixuipanel != null;
+ if (flag)
+ {
+ ixuipanel.SetAlpha(a);
+ }
+ }
+
+ public float GetAlpha()
+ {
+ IXUIPanel ixuipanel = this.uiBehaviour.gameObject.GetComponent("XUIPanel") as IXUIPanel;
+ bool flag = ixuipanel != null;
+ float result;
+ if (flag)
+ {
+ result = ixuipanel.GetAlpha();
+ }
+ else
+ {
+ result = 1f;
+ }
+ return result;
+ }
+
+ public void RegCallBack()
+ {
+ this.panelCB = (this.uiBehaviour.gameObject.GetComponent("NGUIAssetCallBack") as IXNGUICallback);
+ bool flag = this.panelCB != null;
+ if (flag)
+ {
+ this.panelCB.RegisterClickEventHandler(new IXNGUIClickEventHandler(this.OnXNGUIClick));
+ }
+ }
+
+ public virtual void OnXNGUIClick(GameObject obj, string path)
+ {
+ XSingleton<XDebug>.singleton.AddLog(obj.name, " ", path, null, null, null, XDebugColor.XDebug_None);
+ }
+
+ protected GameObject SetXUILable(string name, string content)
+ {
+ bool flag = this.uiBehaviour.transform == null;
+ GameObject result;
+ if (flag)
+ {
+ result = null;
+ }
+ else
+ {
+ bool flag2 = string.IsNullOrEmpty(content);
+ if (flag2)
+ {
+ content = string.Empty;
+ }
+ IXUILabel ixuilabel = this.uiBehaviour.transform.Find(name).GetComponent("XUILabel") as IXUILabel;
+ bool flag3 = ixuilabel == null;
+ if (flag3)
+ {
+ XSingleton<XDebug>.singleton.AddErrorLog("SetXUILable ", name, " ", content, null, null);
+ result = null;
+ }
+ else
+ {
+ ixuilabel.SetText(content);
+ result = ixuilabel.gameObject;
+ }
+ }
+ return result;
+ }
+
+ private void OnLoadUIFinishedEventHandler(string location)
+ {
+ GameObject gameObject = XSingleton<XResourceLoaderMgr>.singleton.CreateFromPrefab("UI/" + location, true, false) as GameObject;
+ bool flag = null != gameObject;
+ if (flag)
+ {
+ gameObject.transform.parent = XSingleton<UIManager>.singleton.UIRoot;
+ gameObject.transform.localPosition = new Vector3(0f, 0f, 0f);
+ gameObject.transform.localScale = new Vector3(1f, 1f, 1f);
+ this.m_uiBehaviour = gameObject.AddComponent<TUIBehaviour>();
+ this.m_uiBehaviour.uiDlgInterface = this;
+ bool flag2 = !this.m_bBindedReverse;
+ if (flag2)
+ {
+ this.Init();
+ this.InnerInit();
+ this.RegisterEvent();
+ this.RegCallBack();
+ this.uiBehaviour.SetVisible(false);
+ this.m_bVisible = false;
+ }
+ }
+ }
+
+ public bool BindReverse(IXUIBehaviour iXUIBehaviour)
+ {
+ TUIBehaviour tuibehaviour = iXUIBehaviour as TUIBehaviour;
+ bool flag = null == tuibehaviour;
+ bool result;
+ if (flag)
+ {
+ result = false;
+ }
+ else
+ {
+ this.m_bLoaded = true;
+ this.m_uiBehaviour = tuibehaviour;
+ this.m_uiBehaviour.uiDlgInterface = this;
+ this.RegisterEvent();
+ this.InnerInit();
+ this.Init();
+ this.m_bBindedReverse = true;
+ result = true;
+ }
+ return result;
+ }
+
+ public virtual void RegisterEvent()
+ {
+ }
+
+ protected virtual void UnRegisterEvent()
+ {
+ }
+
+ public virtual void SetRelatedDlg(IXUIDlg dlg)
+ {
+ this.m_RelatedDlg = dlg;
+ }
+
+ protected virtual void OnRelatedShow()
+ {
+ }
+
+ protected virtual void OnRelatedHide()
+ {
+ }
+
+ public void SetRelatedVisible(bool bVisible)
+ {
+ bool bLoaded = this.m_bLoaded;
+ if (bLoaded)
+ {
+ this.SetVisiblePure(bVisible);
+ if (bVisible)
+ {
+ this.OnRelatedShow();
+ }
+ else
+ {
+ this.OnRelatedHide();
+ }
+ }
+ }
+
+ private bool _CanShow()
+ {
+ bool flag = this.isPopup && XSingleton<XTutorialMgr>.singleton.InTutorial;
+ bool result;
+ if (flag)
+ {
+ this.OnPopupBlocked();
+ result = false;
+ }
+ else
+ {
+ result = true;
+ }
+ return result;
+ }
+
+ protected virtual void OnPopupBlocked()
+ {
+ }
+
+ public virtual int[] GetTitanBarItems()
+ {
+ return null;
+ }
+
+ protected void Alloc3DAvatarPool(string user)
+ {
+ bool flag = this.m_dummPool < 0;
+ if (flag)
+ {
+ this.m_dummPool = XSingleton<X3DAvatarMgr>.singleton.AllocDummyPool(user, 1);
+ }
+ }
+
+ protected void Return3DAvatarPool()
+ {
+ XSingleton<X3DAvatarMgr>.singleton.ReturnDummyPool(this.m_dummPool);
+ this.m_dummPool = -1;
+ }
+
+ public static Transform FindChildRecursively(string childName)
+ {
+ TDlgClass singleton = DlgBase<TDlgClass, TUIBehaviour>.singleton;
+ TUIBehaviour tuibehaviour = singleton.uiBehaviourInterface as TUIBehaviour;
+ bool flag = !tuibehaviour.IsVisible();
+ Transform result;
+ if (flag)
+ {
+ result = null;
+ }
+ else
+ {
+ Transform transform = XSingleton<XCommon>.singleton.FindChildRecursively(tuibehaviour.transform, childName);
+ result = transform;
+ }
+ return result;
+ }
+
+ public static Vector3 GetChildWorldPos(string childName)
+ {
+ TDlgClass singleton = DlgBase<TDlgClass, TUIBehaviour>.singleton;
+ TUIBehaviour tuibehaviour = singleton.uiBehaviourInterface as TUIBehaviour;
+ bool flag = !tuibehaviour.IsVisible();
+ Vector3 result;
+ if (flag)
+ {
+ result = Vector3.zero;
+ }
+ else
+ {
+ Transform transform = XSingleton<XCommon>.singleton.FindChildRecursively(tuibehaviour.transform, childName);
+ bool flag2 = transform != null;
+ if (flag2)
+ {
+ result = transform.position;
+ }
+ else
+ {
+ result = Vector3.zero;
+ }
+ }
+ return result;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/UICommon/DlgBase.cs.meta b/Client/Assets/Scripts/XMainClient/UI/UICommon/DlgBase.cs.meta
new file mode 100644
index 00000000..a0c60016
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/UICommon/DlgBase.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: b88aeb92feab8b24eaca74836f7b7ce3
+timeCreated: 1611404405
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/UICommon/DlgBehaviourBase.cs b/Client/Assets/Scripts/XMainClient/UI/UICommon/DlgBehaviourBase.cs
new file mode 100644
index 00000000..82af93d4
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/UICommon/DlgBehaviourBase.cs
@@ -0,0 +1,130 @@
+using System;
+using UILib;
+using UnityEngine;
+
+namespace XMainClient.UI.UICommon
+{
+ public class DlgBehaviourBase : MonoBehaviour, IXUIBehaviour, IXUIObject
+ {
+ public IXUIObject parent
+ {
+ get
+ {
+ return null;
+ }
+ set
+ {
+ }
+ }
+
+ public ulong ID
+ {
+ get
+ {
+ return this.m_id;
+ }
+ set
+ {
+ this.m_id = value;
+ }
+ }
+
+ public bool Exculsive
+ {
+ get
+ {
+ return this.m_bExculsive;
+ }
+ set
+ {
+ this.m_bExculsive = value;
+ }
+ }
+
+ public IXUIDlg uiDlgInterface
+ {
+ get
+ {
+ return this.m_uiDlgInterface;
+ }
+ set
+ {
+ this.m_uiDlgInterface = value;
+ }
+ }
+
+ public IXUIObject[] uiChilds
+ {
+ get
+ {
+ return this.m_uiChilds;
+ }
+ }
+
+ private IXUIDlg m_uiDlgInterface = null;
+
+ private IXUIObject[] m_uiChilds = null;
+
+ private ulong m_id;
+
+ private bool m_bExculsive = false;
+
+ public bool IsVisible()
+ {
+ return base.gameObject.activeInHierarchy;
+ }
+
+ public void SetVisible(bool bVisible)
+ {
+ base.gameObject.SetActive(bVisible);
+ }
+
+ public IXUIObject GetUIObject(string strName)
+ {
+ Transform transform = base.transform.Find(strName);
+ bool flag = null != transform;
+ IXUIObject result;
+ if (flag)
+ {
+ result = transform.GetComponent<XUIObjectBase>();
+ }
+ else
+ {
+ result = null;
+ }
+ return result;
+ }
+
+ public void OnPress()
+ {
+ this.OnFocus();
+ }
+
+ public void OnFocus()
+ {
+ }
+
+ public virtual void Init()
+ {
+ IXUIObject[] componentsInChildren = base.GetComponentsInChildren<XUIObjectBase>();
+ this.m_uiChilds = componentsInChildren;
+ for (int i = 0; i < this.m_uiChilds.Length; i++)
+ {
+ XUIObjectBase xuiobjectBase = this.m_uiChilds[i] as XUIObjectBase;
+ xuiobjectBase.Init();
+ }
+ }
+
+ public virtual void Highlight(bool bTrue)
+ {
+ }
+
+ GameObject IXUIObject.gameObject
+ {
+ get
+ {
+ return base.gameObject;
+ }
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/UICommon/DlgBehaviourBase.cs.meta b/Client/Assets/Scripts/XMainClient/UI/UICommon/DlgBehaviourBase.cs.meta
new file mode 100644
index 00000000..e0064525
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/UICommon/DlgBehaviourBase.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 093a7d627ed1d7245be463c2fa874487
+timeCreated: 1611403150
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/UICommon/TabHandleBase.cs b/Client/Assets/Scripts/XMainClient/UI/UICommon/TabHandleBase.cs
new file mode 100644
index 00000000..9877b620
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/UICommon/TabHandleBase.cs
@@ -0,0 +1,60 @@
+using System;
+using System.Collections.Generic;
+using UILib;
+using UnityEngine;
+
+namespace XMainClient.UI.UICommon
+{
+ internal class TabHandleBase<T, V> : DlgBase<T, V>, IDlgHandlerMgr where T : IXUIDlg, new() where V : DlgBehaviourBase
+ {
+ private Dictionary<XSysDefine, DlgHandlerBase> m_handles = new Dictionary<XSysDefine, DlgHandlerBase>();
+
+ protected XSysDefine m_select;
+
+ public virtual void RefreshData()
+ {
+ DlgHandlerBase dlgHandlerBase;
+ bool flag = this.m_handles.TryGetValue(this.m_select, out dlgHandlerBase) && dlgHandlerBase.IsVisible();
+ if (flag)
+ {
+ dlgHandlerBase.RefreshData();
+ }
+ }
+
+ protected void SetHandleVisible(XSysDefine define, bool isVisible)
+ {
+ DlgHandlerBase dlgHandlerBase;
+ bool flag = this.m_handles.TryGetValue(define, out dlgHandlerBase);
+ if (flag)
+ {
+ dlgHandlerBase.SetVisible(isVisible);
+ if (isVisible)
+ {
+ this.m_select = define;
+ }
+ }
+ }
+
+ protected void RegisterHandler<C>(XSysDefine define, GameObject g, bool show = false) where C : DlgHandlerBase, new()
+ {
+ bool flag = !this.m_handles.ContainsKey(define);
+ if (flag)
+ {
+ C c = default(C);
+ c = DlgHandlerBase.EnsureCreate<C>(ref c, g, this, false);
+ this.m_handles.Add(define, c);
+ }
+ }
+
+ protected void RemoveHandler(XSysDefine define)
+ {
+ DlgHandlerBase dlgHandlerBase;
+ bool flag = this.m_handles.TryGetValue(define, out dlgHandlerBase);
+ if (flag)
+ {
+ DlgHandlerBase.EnsureUnload<DlgHandlerBase>(ref dlgHandlerBase);
+ this.m_handles.Remove(define);
+ }
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/UICommon/TabHandleBase.cs.meta b/Client/Assets/Scripts/XMainClient/UI/UICommon/TabHandleBase.cs.meta
new file mode 100644
index 00000000..fc6bb5f0
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/UICommon/TabHandleBase.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: e4570d8459fc126439209e57f1539a48
+timeCreated: 1611404737
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/UICommon/UIManager.cs b/Client/Assets/Scripts/XMainClient/UI/UICommon/UIManager.cs
new file mode 100644
index 00000000..0daba0f9
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/UICommon/UIManager.cs
@@ -0,0 +1,586 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+using UILib;
+using UnityEngine;
+using XUpdater;
+using XUtliPoolLib;
+
+namespace XMainClient.UI.UICommon
+{
+ internal class UIManager : XSingleton<UIManager>
+ {
+ public Transform UIRoot
+ {
+ get
+ {
+ return this.m_uiRoot;
+ }
+ set
+ {
+ this.m_uiRoot = value;
+ }
+ }
+
+ private Dictionary<string, IXUIDlg> m_dicDlgs = new Dictionary<string, IXUIDlg>();
+
+ private Dictionary<int, List<IXUIDlg>> m_dicUILayer = new Dictionary<int, List<IXUIDlg>>();
+
+ private List<IXUIDlg> m_iterDlgs = new List<IXUIDlg>();
+
+ private Transform m_uiRoot = null;
+
+ private Dictionary<int, IXUIDlg> m_GroupDlg = new Dictionary<int, IXUIDlg>();
+
+ private List<IXUIDlg> m_ShowedDlg = new List<IXUIDlg>();
+
+ private int m_TutorialClashUICount = 0;
+
+ private List<IXUIDlg> m_ToBeUnloadDlg = new List<IXUIDlg>();
+
+ private XLFU<IXUIDlg> m_LFU = new XLFU<IXUIDlg>(5);
+
+ private List<IXUIDlg> m_CachedExculsiveUI = new List<IXUIDlg>();
+
+ private Stack<IXUIDlg> m_ShowUIStack = new Stack<IXUIDlg>();
+
+ private List<IXUIDlg> m_StoreUIList = new List<IXUIDlg>();
+
+ private List<IXUIDlg> m_AvatarStack = new List<IXUIDlg>();
+
+ public int unloadUICount = 0;
+
+ public void OnEnterScene()
+ {
+ this.m_LFU.Clear();
+ this.m_ShowedDlg.Clear();
+ this.m_TutorialClashUICount = 0;
+ this.m_CachedExculsiveUI.Clear();
+ this.m_ShowUIStack.Clear();
+ this.m_ToBeUnloadDlg.Clear();
+ this.m_StoreUIList.Clear();
+ this.unloadUICount = 0;
+ }
+
+ public void OnLeaveScene(bool transfer)
+ {
+ for (int i = this.m_iterDlgs.Count - 1; i >= 0; i--)
+ {
+ bool flag = i < this.m_iterDlgs.Count && this.m_iterDlgs[i] != null;
+ if (flag)
+ {
+ this.m_iterDlgs[i].UnLoad(transfer);
+ }
+ }
+ this.m_AvatarStack.Clear();
+ this.unloadUICount = 0;
+ }
+
+ public override bool Init()
+ {
+ RuntimePlatform platform = Application.platform;
+ int @int;
+ if ((int)platform != 8)
+ {
+ if ((int)platform != 11)
+ {
+ @int = XSingleton<XGlobalConfig>.singleton.GetInt("UIUnloadLFUSizeDefault");
+ }
+ else
+ {
+ @int = XSingleton<XGlobalConfig>.singleton.GetInt("UIUnloadLFUSizeAndroid");
+ }
+ }
+ else
+ {
+ @int = XSingleton<XGlobalConfig>.singleton.GetInt("UIUnloadLFUSizeIPhone");
+ }
+ this.m_LFU = new XLFU<IXUIDlg>(@int);
+ return true;
+ }
+
+ public override void Uninit()
+ {
+ }
+
+ public void LoadUI(string strUIFile, LoadUIFinishedEventHandler eventHandler)
+ {
+ bool flag = eventHandler != null;
+ if (flag)
+ {
+ eventHandler(strUIFile);
+ }
+ }
+
+ public void Update(float fDeltaT)
+ {
+ int i = 0;
+ while (i < this.m_iterDlgs.Count)
+ {
+ IXUIDlg ixuidlg = this.m_iterDlgs[i];
+ bool flag = ixuidlg != null;
+ if (flag)
+ {
+ bool flag2 = ixuidlg.uiBehaviourInterface == null || ixuidlg.uiBehaviourInterface.gameObject == null;
+ if (flag2)
+ {
+ XSingleton<XDebug>.singleton.AddErrorLog("UI missing: ", ixuidlg.fileName, null, null, null, null);
+ }
+ else
+ {
+ bool activeInHierarchy = ixuidlg.uiBehaviourInterface.gameObject.activeInHierarchy;
+ if (activeInHierarchy)
+ {
+ ixuidlg.OnUpdate();
+ }
+ }
+ }
+ IL_78:
+ i++;
+ continue;
+ goto IL_78;
+ }
+ }
+
+ public void PostUpdate(float fDeltaT)
+ {
+ for (int i = 0; i < this.m_iterDlgs.Count; i++)
+ {
+ bool flag = this.m_iterDlgs[i] != null;
+ if (flag)
+ {
+ this.m_iterDlgs[i].OnPostUpdate();
+ }
+ }
+ bool flag2 = this.m_ToBeUnloadDlg.Count > 0;
+ if (flag2)
+ {
+ for (int j = 0; j < this.m_ToBeUnloadDlg.Count; j++)
+ {
+ this.m_ToBeUnloadDlg[j].UnLoad(false);
+ }
+ this.m_ToBeUnloadDlg.Clear();
+ }
+ }
+
+ public bool IsUIShowed()
+ {
+ bool flag = this.m_ShowUIStack.Count > 0;
+ bool result;
+ if (flag)
+ {
+ result = true;
+ }
+ else
+ {
+ bool flag2 = DlgBase<ScreenShotShareView, ScreenShotShareBehaviour>.singleton.IsLoaded() && DlgBase<ScreenShotShareView, ScreenShotShareBehaviour>.singleton.IsVisible();
+ if (flag2)
+ {
+ result = true;
+ }
+ else
+ {
+ bool flag3 = DlgBase<XOtherPlayerInfoView, XOtherPlayerInfoBehaviour>.singleton.IsVisible();
+ if (flag3)
+ {
+ result = true;
+ }
+ else
+ {
+ bool flag4 = XSingleton<XUpdater.XUpdater>.singleton.XLuaEngine.luaUIManager.IsUIShowed();
+ result = flag4;
+ }
+ }
+ }
+ return result;
+ }
+
+ public bool IsHideTutorial()
+ {
+ return this.m_TutorialClashUICount != 0;
+ }
+
+ public int GetUIStackCount()
+ {
+ return this.m_ShowUIStack.Count;
+ }
+
+ public int GetFullScreenUICount()
+ {
+ int num = 0;
+ foreach (IXUIDlg ixuidlg in this.m_ShowUIStack)
+ {
+ bool fullscreenui = ixuidlg.fullscreenui;
+ if (fullscreenui)
+ {
+ num++;
+ }
+ }
+ return num;
+ }
+
+ public void RemoveDlg(IXUIDlg dlg)
+ {
+ List<IXUIDlg> list = null;
+ bool flag = this.m_dicUILayer.TryGetValue(dlg.layer, out list);
+ if (flag)
+ {
+ list.Remove(dlg);
+ }
+ bool flag2 = this.m_dicDlgs.ContainsKey(dlg.fileName);
+ if (flag2)
+ {
+ this.m_dicDlgs.Remove(dlg.fileName);
+ this.m_iterDlgs.Remove(dlg);
+ }
+ bool flag3 = this.m_GroupDlg.ContainsKey(dlg.group);
+ if (flag3)
+ {
+ this.m_GroupDlg.Remove(dlg.group);
+ }
+ bool flag4 = this.m_ShowedDlg.Contains(dlg);
+ if (flag4)
+ {
+ bool isHideTutorial = dlg.isHideTutorial;
+ if (isHideTutorial)
+ {
+ this.ChangeTutorialClashUI(false);
+ }
+ this.m_ShowedDlg.Remove(dlg);
+ }
+ this.m_LFU.Remove(dlg);
+ this.m_AvatarStack.Remove(dlg);
+ }
+
+ public bool AddDlg(IXUIDlg dlg)
+ {
+ bool flag = this.m_dicDlgs.ContainsKey(dlg.fileName);
+ bool result;
+ if (flag)
+ {
+ XSingleton<XDebug>.singleton.AddLog("true == m_dicDlgs.ContainsKey(dlg.fileName): ", dlg.fileName, null, null, null, null, XDebugColor.XDebug_None);
+ result = false;
+ }
+ else
+ {
+ this.m_dicDlgs.Add(dlg.fileName, dlg);
+ this.m_iterDlgs.Add(dlg);
+ List<IXUIDlg> list = null;
+ bool flag2 = this.m_dicUILayer.TryGetValue(dlg.layer, out list);
+ if (flag2)
+ {
+ list.Add(dlg);
+ }
+ else
+ {
+ list = new List<IXUIDlg>();
+ list.Add(dlg);
+ this.m_dicUILayer.Add(dlg.layer, list);
+ }
+ result = true;
+ }
+ return result;
+ }
+
+ protected void CacheExclusiveUI()
+ {
+ this.m_CachedExculsiveUI.Clear();
+ for (int i = 0; i < this.m_ShowedDlg.Count; i++)
+ {
+ this.m_CachedExculsiveUI.Add(this.m_ShowedDlg[i]);
+ }
+ }
+
+ public void CloseAllUI()
+ {
+ this.ClearUIinStack();
+ List<IXUIDlg> list = new List<IXUIDlg>();
+ for (int i = 0; i < this.m_ShowedDlg.Count; i++)
+ {
+ bool flag = !this.m_ShowedDlg[i].isMainUI;
+ if (flag)
+ {
+ list.Add(this.m_ShowedDlg[i]);
+ }
+ }
+ for (int j = 0; j < list.Count; j++)
+ {
+ list[j].SetVisible(false, true);
+ }
+ }
+
+ public void OnDlgShow(IXUIDlg dlg)
+ {
+ bool exclusive = dlg.exclusive;
+ if (exclusive)
+ {
+ this.CloseAllUI();
+ this.CacheExclusiveUI();
+ for (int i = 0; i < this.m_CachedExculsiveUI.Count; i++)
+ {
+ this.m_CachedExculsiveUI[i].uiBehaviourInterface.uiDlgInterface.SetVisiblePure(false);
+ }
+ this.ChangeTutorialClashUI(true);
+ }
+ else
+ {
+ bool flag = !this.m_ShowedDlg.Contains(dlg);
+ if (flag)
+ {
+ this.m_ShowedDlg.Add(dlg);
+ bool isHideTutorial = dlg.isHideTutorial;
+ if (isHideTutorial)
+ {
+ this.ChangeTutorialClashUI(true);
+ }
+ }
+ bool flag2 = !dlg.needOnTop;
+ if (flag2)
+ {
+ this.m_AvatarStack.Remove(dlg);
+ this.m_AvatarStack.Add(dlg);
+ }
+ else
+ {
+ Vector3 localPosition = dlg.uiBehaviourInterface.gameObject.transform.localPosition;
+ localPosition.z = 0f;
+ dlg.uiBehaviourInterface.gameObject.transform.localPosition = localPosition;
+ }
+ float num = 0f;
+ for (int j = this.m_AvatarStack.Count - 1; j >= 0; j--)
+ {
+ IXUIDlg ixuidlg = this.m_AvatarStack[j];
+ Vector3 localPosition2 = ixuidlg.uiBehaviourInterface.gameObject.transform.localPosition;
+ localPosition2.z = num;
+ ixuidlg.uiBehaviourInterface.gameObject.transform.localPosition = localPosition2;
+ num += 800f;
+ }
+ }
+ bool pushstack = dlg.pushstack;
+ if (pushstack)
+ {
+ IXUIDlg ixuidlg2 = this.m_LFU.Add(dlg);
+ bool flag3 = ixuidlg2 != null;
+ if (flag3)
+ {
+ this.m_ToBeUnloadDlg.Add(ixuidlg2);
+ XSingleton<XDebug>.singleton.AddGreenLog("Auto Unload UI: ", ixuidlg2.fileName, " while opening ", dlg.fileName, null, null);
+ }
+ XSingleton<XVirtualTab>.singleton.Cancel();
+ }
+ bool hideMainMenu = dlg.hideMainMenu;
+ if (hideMainMenu)
+ {
+ this.UIBlurEffect(true);
+ }
+ bool pushstack2 = dlg.pushstack;
+ if (pushstack2)
+ {
+ XMainInterfaceDocument specificDocument = XDocuments.GetSpecificDocument<XMainInterfaceDocument>(XMainInterfaceDocument.uuID);
+ bool flag4 = this.m_ShowUIStack.Count > 0;
+ if (flag4)
+ {
+ IXUIDlg ixuidlg3 = this.m_ShowUIStack.Peek();
+ ixuidlg3.LeaveStackTop();
+ ixuidlg3.uiBehaviourInterface.uiDlgInterface.SetVisiblePure(false);
+ Stack<IXUIDlg> stack = new Stack<IXUIDlg>();
+ IXUIDlg ixuidlg4 = this.m_ShowUIStack.Pop();
+ while (ixuidlg4 != dlg && this.m_ShowUIStack.Count > 0)
+ {
+ stack.Push(ixuidlg4);
+ ixuidlg4 = this.m_ShowUIStack.Pop();
+ }
+ bool flag5 = ixuidlg4 != dlg;
+ if (flag5)
+ {
+ this.m_ShowUIStack.Push(ixuidlg4);
+ }
+ while (stack.Count > 0)
+ {
+ this.m_ShowUIStack.Push(stack.Pop());
+ }
+ }
+ this.m_ShowUIStack.Push(dlg);
+ specificDocument.OnTopUIRefreshed(dlg);
+ }
+ DlgBase<XChatView, XChatBehaviour>.singleton.TryCloseChat(dlg);
+ }
+
+ public void UIBlurEffect(bool bOn)
+ {
+ bool flag = DlgBase<XMainInterface, XMainInterfaceBehaviour>.singleton.IsLoaded();
+ if (flag)
+ {
+ DlgBase<XMainInterface, XMainInterfaceBehaviour>.singleton.FakeShowSelf(!bOn);
+ }
+ }
+
+ public void OnDlgHide(IXUIDlg dlg)
+ {
+ bool exclusive = dlg.exclusive;
+ if (exclusive)
+ {
+ for (int i = 0; i < this.m_CachedExculsiveUI.Count; i++)
+ {
+ this.m_CachedExculsiveUI[i].uiBehaviourInterface.uiDlgInterface.SetVisiblePure(true);
+ }
+ this.ChangeTutorialClashUI(false);
+ }
+ else
+ {
+ this.m_ShowedDlg.Remove(dlg);
+ bool isHideTutorial = dlg.isHideTutorial;
+ if (isHideTutorial)
+ {
+ this.ChangeTutorialClashUI(false);
+ }
+ this.m_AvatarStack.Remove(dlg);
+ }
+ bool pushstack = dlg.pushstack;
+ if (pushstack)
+ {
+ this.m_LFU.MarkCanPop(dlg, true);
+ }
+ bool hideMainMenu = dlg.hideMainMenu;
+ if (hideMainMenu)
+ {
+ this.UIBlurEffect(false);
+ }
+ bool flag = dlg.pushstack && this.m_ShowUIStack.Count > 0;
+ if (flag)
+ {
+ IXUIDlg ixuidlg = this.m_ShowUIStack.Peek();
+ bool flag2 = ixuidlg != dlg;
+ if (flag2)
+ {
+ XSingleton<XDebug>.singleton.AddLog("Not hide top of ui stack!:", dlg.fileName, null, null, null, null, XDebugColor.XDebug_None);
+ Stack<IXUIDlg> stack = new Stack<IXUIDlg>();
+ for (IXUIDlg ixuidlg2 = this.m_ShowUIStack.Pop(); ixuidlg2 != dlg; ixuidlg2 = this.m_ShowUIStack.Pop())
+ {
+ stack.Push(ixuidlg2);
+ bool flag3 = this.m_ShowUIStack.Count == 0;
+ if (flag3)
+ {
+ StringBuilder sharedStringBuilder = XSingleton<XCommon>.singleton.GetSharedStringBuilder();
+ sharedStringBuilder.Length = 0;
+ sharedStringBuilder.Append("Hide UI not in stack!!!! : ").Append(dlg.fileName);
+ sharedStringBuilder.Append("; UIs in stack: ");
+ foreach (IXUIDlg ixuidlg3 in stack)
+ {
+ sharedStringBuilder.Append(ixuidlg3.fileName).Append(" ");
+ }
+ XSingleton<XDebug>.singleton.AddErrorLog(sharedStringBuilder.ToString(), null, null, null, null, null);
+ break;
+ }
+ }
+ while (stack.Count > 0)
+ {
+ this.m_ShowUIStack.Push(stack.Pop());
+ }
+ bool flag4 = this.m_ShowUIStack.Count > 0;
+ if (flag4)
+ {
+ IXUIDlg ixuidlg4 = this.m_ShowUIStack.Peek();
+ bool hideMainMenu2 = ixuidlg4.hideMainMenu;
+ if (hideMainMenu2)
+ {
+ this.UIBlurEffect(true);
+ }
+ }
+ }
+ else
+ {
+ this.m_ShowUIStack.Pop();
+ XMainInterfaceDocument specificDocument = XDocuments.GetSpecificDocument<XMainInterfaceDocument>(XMainInterfaceDocument.uuID);
+ bool flag5 = this.m_ShowUIStack.Count > 0;
+ if (flag5)
+ {
+ IXUIDlg ixuidlg5 = this.m_ShowUIStack.Peek();
+ ixuidlg5.uiBehaviourInterface.uiDlgInterface.SetVisiblePure(true);
+ ixuidlg5.StackRefresh();
+ specificDocument.OnTopUIRefreshed(ixuidlg5);
+ bool hideMainMenu3 = ixuidlg5.hideMainMenu;
+ if (hideMainMenu3)
+ {
+ this.UIBlurEffect(true);
+ }
+ }
+ else
+ {
+ specificDocument.OnTopUIRefreshed(null);
+ }
+ }
+ }
+ }
+
+ public List<IXUIDlg> GetShowedUI()
+ {
+ return this.m_ShowedDlg;
+ }
+
+ public void ClearUIinStack()
+ {
+ while (this.m_ShowUIStack.Count > 0)
+ {
+ IXUIDlg ixuidlg = this.m_ShowUIStack.Peek();
+ bool flag = ixuidlg != null;
+ if (flag)
+ {
+ ixuidlg.SetVisiblePure(true);
+ ixuidlg.SetVisible(false, true);
+ }
+ }
+ this.UIBlurEffect(false);
+ }
+
+ public void HideAllUIWithOutCall()
+ {
+ for (int i = 0; i < this.m_ShowedDlg.Count; i++)
+ {
+ bool flag = this.m_ShowedDlg[i] == DlgBase<XShowGetItemView, XShowGetItemBehaviour>.singleton || this.m_ShowedDlg[i] == DlgBase<XChatMaqueeView, XChatMaqueeBehaviour>.singleton || this.m_ShowedDlg[i] == DlgBase<XSystemTipView, XSystemTipBehaviour>.singleton;
+ if (!flag)
+ {
+ bool flag2 = this.m_ShowedDlg[i].IsVisible();
+ if (flag2)
+ {
+ this.m_StoreUIList.Add(this.m_ShowedDlg[i]);
+ this.m_ShowedDlg[i].SetVisiblePure(false);
+ }
+ }
+ }
+ }
+
+ public void RestoreAllUIWithOutCall()
+ {
+ for (int i = 0; i < this.m_StoreUIList.Count; i++)
+ {
+ bool flag = this.m_StoreUIList[i] != null;
+ if (flag)
+ {
+ this.m_StoreUIList[i].SetVisiblePure(true);
+ }
+ }
+ this.m_StoreUIList.Clear();
+ }
+
+ private void ChangeTutorialClashUI(bool isAdd)
+ {
+ if (isAdd)
+ {
+ this.m_TutorialClashUICount++;
+ XSingleton<XDebug>.singleton.AddGreenLog("TutorialClashUICount++:" + this.m_TutorialClashUICount, null, null, null, null, null);
+ }
+ else
+ {
+ this.m_TutorialClashUICount--;
+ XSingleton<XDebug>.singleton.AddGreenLog("TutorialClashUICount--:" + this.m_TutorialClashUICount, null, null, null, null, null);
+ bool flag = this.m_TutorialClashUICount < 0;
+ if (flag)
+ {
+ this.m_TutorialClashUICount = 0;
+ XSingleton<XDebug>.singleton.AddErrorLog("TutorialClashUICount Error", null, null, null, null, null);
+ }
+ }
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/UICommon/UIManager.cs.meta b/Client/Assets/Scripts/XMainClient/UI/UICommon/UIManager.cs.meta
new file mode 100644
index 00000000..479bd1c0
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/UICommon/UIManager.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 0fd49ef83c692c14989b481f9d306410
+timeCreated: 1611403214
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/UICommon/VirtualJoystick.cs b/Client/Assets/Scripts/XMainClient/UI/UICommon/VirtualJoystick.cs
new file mode 100644
index 00000000..679b3431
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/UICommon/VirtualJoystick.cs
@@ -0,0 +1,139 @@
+using System;
+using UILib;
+using UnityEngine;
+using XUtliPoolLib;
+
+namespace XMainClient.UI.UICommon
+{
+ internal class VirtualJoystick : DlgBase<VirtualJoystick, VirtualJoystickBehaviour>
+ {
+ public override string fileName
+ {
+ get
+ {
+ return "Common/VirtualJoyStick";
+ }
+ }
+
+ public override int layer
+ {
+ get
+ {
+ return 1;
+ }
+ }
+
+ public override bool autoload
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ private bool _bLogicalVisible;
+
+ protected override void Init()
+ {
+ this.Hide();
+ }
+
+ protected void Hide()
+ {
+ bool flag = !base.IsLoaded();
+ if (!flag)
+ {
+ base.uiBehaviour.m_Panel.gameObject.transform.localPosition = new Vector3((float)XGameUI._far_far_away, (float)XGameUI._far_far_away, 0f);
+ this._bLogicalVisible = false;
+ }
+ }
+
+ public void ShowPanel(bool bShow, Vector2 screenPos = default(Vector2))
+ {
+ Debug.Log("screenPos=" + screenPos);
+ if (bShow)
+ {
+ bool flag = !base.IsVisible();
+ if (flag)
+ {
+ this.SetVisible(true, true);
+ }
+ Vector3 vector = XSingleton<XGameUI>.singleton.UICamera.ScreenToWorldPoint(screenPos);
+ Vector3 vec = this.m_uiBehaviour.transform.InverseTransformPoint(vector);
+ Vector3 finalPos = /*this.LimitPosition(*/vec/*)*/;
+ Debug.Log("Virtual Joystick Pos = " + finalPos);
+ base.uiBehaviour.m_Panel.gameObject.transform.localPosition = finalPos;
+ bool flag2 = !this._bLogicalVisible;
+ if (flag2)
+ {
+ IXUITweenTool ixuitweenTool = base.uiBehaviour.m_Direction.GetComponent("XUIPlayTween") as IXUITweenTool;
+ ixuitweenTool.PlayTween(true, -1f);
+ }
+ this._bLogicalVisible = true;
+ }
+ else
+ {
+ this.Hide();
+ }
+ }
+
+ public void SetJoystickPos(float radius, float angle)
+ {
+ float num = this.GetPanelRadius() + this.GetJoystickRadius();
+ float num2 = (radius > num) ? num : radius;
+ float num3 = angle / 180f * 3.14159274f;
+ float num4 = Mathf.Cos(num3) * num2;
+ float num5 = -Mathf.Sin(num3) * num2;
+ base.uiBehaviour.m_Direction.gameObject.transform.localPosition = new Vector3(num4, num5, 0f);
+ }
+
+ public float GetPanelRadius()
+ {
+ bool flag = !this.m_bLoaded && this.autoload;
+ if (flag)
+ {
+ base.Load();
+ }
+ return (float)(base.uiBehaviour.m_Panel.spriteWidth / 2);
+ }
+
+ public float GetJoystickRadius()
+ {
+ bool flag = !this.m_bLoaded && this.autoload;
+ if (flag)
+ {
+ base.Load();
+ }
+ return (float)(base.uiBehaviour.m_Joystick.spriteWidth / 2 - 15);
+ }
+
+ protected Vector3 LimitPosition(Vector3 vec)
+ {
+ Vector3 result = vec;
+ int base_UI_Width = XSingleton<XGameUI>.singleton.Base_UI_Width;
+ int base_UI_Height = XSingleton<XGameUI>.singleton.Base_UI_Height;
+ float num = this.GetPanelRadius() + this.GetJoystickRadius() * 2f;
+ bool flag = vec.x - num < (float)(-(float)base_UI_Width / 2);
+ if (flag)
+ {
+ result.x = (float)(-(float)base_UI_Width / 2) + num;
+ }
+ bool flag2 = vec.x + num > (float)(base_UI_Width / 2);
+ if (flag2)
+ {
+ result.x = (float)(base_UI_Width / 2) - num;
+ }
+ bool flag3 = vec.y + num > (float)(base_UI_Height / 2);
+ if (flag3)
+ {
+ result.y = (float)(base_UI_Height / 2) - num;
+ }
+ bool flag4 = vec.y - num < (float)(-(float)base_UI_Height / 2);
+ if (flag4)
+ {
+ result.y = (float)(-(float)base_UI_Height / 2) + num;
+ }
+ return result;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/UICommon/VirtualJoystick.cs.meta b/Client/Assets/Scripts/XMainClient/UI/UICommon/VirtualJoystick.cs.meta
new file mode 100644
index 00000000..66e596b5
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/UICommon/VirtualJoystick.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 0731ce81c4a25cd40b1d3e2bca49bf54
+timeCreated: 1611402967
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/UiUtility.cs b/Client/Assets/Scripts/XMainClient/UI/UiUtility.cs
new file mode 100644
index 00000000..0cf27e63
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/UiUtility.cs
@@ -0,0 +1,2850 @@
+using System;
+using System.Collections.Generic;
+using System.Globalization;
+using System.Text;
+using KKSG;
+using MiniJSON;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUpdater;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ public class UiUtility : XSingleton<UiUtility>, IUiUtility, IXInterface
+ {
+ public bool Deprecated { get; set; }
+
+ private StringBuilder _Timebuilder = new StringBuilder();
+
+ private int[] TimeDuaration = new int[]
+ {
+ 2592000,
+ 86400,
+ 3600,
+ 60,
+ 1
+ };
+
+ private string[] TimeDuarationName = new string[]
+ {
+ "MONTH_DUARATION",
+ "DAY_DUARATION",
+ "HOUR_DUARATION",
+ "MINUTE_DUARATION",
+ "SECOND_DUARATION"
+ };
+
+ private string[] TimeName = new string[]
+ {
+ "MONTH_DUARATION",
+ "DAY_DUARATION",
+ "HOUR_DUARATION",
+ "MINUTE_TIME",
+ "SECOND_DUARATION"
+ };
+
+ private string[] NumberSeparatorNames = null;
+
+ private string wifiBtn;
+
+ private uint wifi_green = 0u;
+
+ private uint wifi_yellow = 0u;
+
+ private bool wifi_forward = true;
+
+ private float wifi_duration = 1f;
+
+ private float wifi_cur = 0f;
+
+ public List<string> ComSpriteStr = new List<string>();
+
+ private bool FatalErrorButtonCallback(IXUIButton go)
+ {
+ DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.SetVisible(false, true);
+ XSingleton<XShell>.singleton.Pause = false;
+ XSingleton<XClientNetwork>.singleton.OnFatalErrorCallback();
+ return true;
+ }
+
+ public void OnFatalErrorClosed(ErrorCode code)
+ {
+ XSingleton<XTutorialMgr>.singleton.StopTutorial();
+ XSingleton<XShell>.singleton.Pause = true;
+ string @string = XStringDefineProxy.GetString(code);
+ DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.Load();
+ DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.SetSingleButtonMode(true);
+ this._ShowModalDialog(@string, XStringDefineProxy.GetString(XStringDefine.COMMON_OK), "-", new ButtonClickEventHandler(this.FatalErrorButtonCallback), 300, "");
+ }
+
+ public void OnFatalErrorClosed(string text)
+ {
+ XSingleton<XTutorialMgr>.singleton.StopTutorial();
+ XSingleton<XShell>.singleton.Pause = true;
+ DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.Load();
+ DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.SetSingleButtonMode(true);
+ this._ShowModalDialog(text, XStringDefineProxy.GetString(XStringDefine.COMMON_OK), "-", new ButtonClickEventHandler(this.FatalErrorButtonCallback), 300, "");
+ }
+
+ public void ShowErrorCode(ErrorCode code)
+ {
+ string @string = XStringDefineProxy.GetString(code);
+ this.ShowModalDialog(@string, XStringDefineProxy.GetString(XStringDefine.COMMON_OK));
+ }
+
+ internal string GetEquipName(ItemList.RowData data, XItem instanceData = null, uint profession = 0u)
+ {
+ bool flag = instanceData != null && instanceData.Type == ItemType.EQUIP;
+ if (flag)
+ {
+ XEquipItem xequipItem = instanceData as XEquipItem;
+ bool flag2 = xequipItem.enhanceInfo.EnhanceLevel > 0u;
+ if (flag2)
+ {
+ return string.Format("{0}+{1}", XSingleton<UiUtility>.singleton.ChooseProfString(data.ItemName, profession), xequipItem.enhanceInfo.EnhanceLevel.ToString());
+ }
+ }
+ return XSingleton<UiUtility>.singleton.ChooseProfString(data.ItemName, profession);
+ }
+
+ internal void ShowTooltipDialogWithSearchingCompare(XItem mainItem, IXUISprite icon = null, bool bShowButtons = true, uint profession = 0u)
+ {
+ bool flag = mainItem == null;
+ if (!flag)
+ {
+ XItem compareItem = null;
+ bool flag2 = mainItem.type == 1u;
+ if (flag2)
+ {
+ EquipList.RowData equipConf = XBagDocument.GetEquipConf(mainItem.itemID);
+ bool flag3 = equipConf == null;
+ if (flag3)
+ {
+ XSingleton<XDebug>.singleton.AddErrorLog("Cannot find equip config for id: ", mainItem.itemID.ToString(), null, null, null, null);
+ return;
+ }
+ compareItem = XSingleton<XGame>.singleton.Doc.XBagDoc.EquipBag[(int)equipConf.EquipPos];
+ }
+ else
+ {
+ bool flag4 = mainItem.type == 6u;
+ if (flag4)
+ {
+ compareItem = XEmblemDocument.CheckEquipedEmblemsAttrs(XSingleton<XGame>.singleton.Doc.XBagDoc.EmblemBag, mainItem);
+ }
+ else
+ {
+ bool flag5 = mainItem.type == 31u;
+ if (flag5)
+ {
+ ArtifactListTable.RowData artifactListRowData = ArtifactDocument.GetArtifactListRowData((uint)mainItem.itemID);
+ bool flag6 = artifactListRowData == null;
+ if (flag6)
+ {
+ XSingleton<XDebug>.singleton.AddErrorLog("Cannot find artifact config for id: ", mainItem.itemID.ToString(), null, null, null, null);
+ return;
+ }
+ compareItem = XSingleton<XGame>.singleton.Doc.XBagDoc.ArtifactBag[(int)artifactListRowData.ArtifactPos];
+ }
+ }
+ }
+ this.ShowTooltipDialog(mainItem, compareItem, icon, bShowButtons, profession);
+ }
+ }
+
+ internal void ShowTooltipDialog(XItem mainItem, XItem compareItem, IXUISprite icon = null, bool bShowButtons = true, uint profession = 0u)
+ {
+ bool flag = mainItem == null;
+ if (!flag)
+ {
+ bool flag2 = compareItem != null && compareItem.itemID != 0 && mainItem.Type != compareItem.Type;
+ if (flag2)
+ {
+ XSingleton<XDebug>.singleton.AddErrorLog("mainItem.Type != compareItem.Type", null, null, null, null, null);
+ }
+ else
+ {
+ XFashionDocument specificDocument = XDocuments.GetSpecificDocument<XFashionDocument>(XFashionDocument.uuID);
+ bool flag3 = DlgBase<EquipTooltipDlg, EquipTooltipDlgBehaviour>.singleton.IsLoaded();
+ if (flag3)
+ {
+ DlgBase<EquipTooltipDlg, EquipTooltipDlgBehaviour>.singleton.HideToolTip(true);
+ }
+ bool flag4 = DlgBase<ItemTooltipDlg, ItemTooltipDlgBehaviour>.singleton.IsLoaded();
+ if (flag4)
+ {
+ DlgBase<ItemTooltipDlg, ItemTooltipDlgBehaviour>.singleton.HideToolTip(true);
+ }
+ bool flag5 = DlgBase<EmblemTooltipDlg, EmblemTooltipDlgBehaviour>.singleton.IsLoaded();
+ if (flag5)
+ {
+ DlgBase<EmblemTooltipDlg, EmblemTooltipDlgBehaviour>.singleton.HideToolTip(true);
+ }
+ bool flag6 = DlgBase<JadeTooltipDlg, TooltipDlgBehaviour>.singleton.IsLoaded();
+ if (flag6)
+ {
+ DlgBase<JadeTooltipDlg, TooltipDlgBehaviour>.singleton.HideToolTip(true);
+ }
+ bool flag7 = DlgBase<FashionTooltipDlg, FashionTooltipDlgBehaviour>.singleton.IsLoaded();
+ if (flag7)
+ {
+ DlgBase<FashionTooltipDlg, FashionTooltipDlgBehaviour>.singleton.HideToolTip(true);
+ }
+ bool flag8 = DlgBase<ArtifactToolTipDlg, ArtifactTooltipDlgBehaviour>.singleton.IsLoaded();
+ if (flag8)
+ {
+ DlgBase<ArtifactToolTipDlg, ArtifactTooltipDlgBehaviour>.singleton.HideToolTip(true);
+ }
+ bool flag9 = DlgBase<FashionHairToolTipDlg, FashionHairToolTipBehaviour>.singleton.IsLoaded();
+ if (flag9)
+ {
+ DlgBase<FashionHairToolTipDlg, FashionHairToolTipBehaviour>.singleton.HideToolTip(true);
+ }
+ ITooltipDlg tooltipDlg = mainItem.Description.TooltipDlg;
+ tooltipDlg.ShowToolTip(mainItem, compareItem, bShowButtons, profession);
+ tooltipDlg.ItemSelector.Select(icon);
+ tooltipDlg.SetPosition(icon);
+ XSingleton<TooltipParam>.singleton.Reset();
+ }
+ }
+ }
+
+ public void PushBarrage(string nick, string content)
+ {
+ DlgBase<BroadcastDlg, BroadcastBehaviour>.singleton.Push(nick, content);
+ }
+
+ public void StartBroadcast(bool start)
+ {
+ if (start)
+ {
+ DlgBase<BroadMiniDlg, BroadcastMiniBehaviour>.singleton.isBroadcast = true;
+ DlgBase<BroadMiniDlg, BroadcastMiniBehaviour>.singleton.Show(true);
+ }
+ else
+ {
+ DlgBase<BroadMiniDlg, BroadcastMiniBehaviour>.singleton.isBroadcast = false;
+ DlgBase<BroadMiniDlg, BroadcastMiniBehaviour>.singleton.Show(false);
+ }
+ }
+
+ public void ShowDetailTooltip(int itemID, GameObject icon = null)
+ {
+ XItem mainItem = XBagDocument.MakeXItem(itemID, false);
+ this.ShowTooltipDialog(mainItem, null, icon.GetComponent("XUISprite") as IXUISprite, false, 0u);
+ }
+
+ public void ParseHeadIcon(List<uint> setid, IXUISprite spr)
+ {
+ bool flag = setid == null;
+ if (flag)
+ {
+ spr.SetVisible(false);
+ }
+ else
+ {
+ string text = XPrerogativeDocument.ConvertTypeToPreContent(PrerogativeType.PreHeadPortrait, setid);
+ string text2 = string.Empty;
+ bool flag2 = !string.IsNullOrEmpty(text);
+ if (flag2)
+ {
+ string[] array = text.Split(new char[]
+ {
+ '='
+ });
+ bool flag3 = array.Length >= 2;
+ if (flag3)
+ {
+ text2 = array[1];
+ }
+ }
+ bool flag4 = !string.IsNullOrEmpty(text2);
+ if (flag4)
+ {
+ spr.SetVisible(true);
+ spr.SetSprite(text2);
+ }
+ else
+ {
+ spr.SetVisible(false);
+ }
+ }
+ }
+
+ public void ShowTooltipDialog(int itemID, GameObject icon = null)
+ {
+ ItemList.RowData itemConf = XBagDocument.GetItemConf(itemID);
+ bool flag = itemConf == null;
+ if (flag)
+ {
+ XSingleton<XDebug>.singleton.AddErrorLog("rowData == null: ", itemID.ToString(), null, null, null, null);
+ }
+ else
+ {
+ IXUISprite ixuisprite = null;
+ bool flag2 = null != icon;
+ if (flag2)
+ {
+ ixuisprite = (icon.GetComponent("XUISprite") as IXUISprite);
+ }
+ bool flag3 = itemConf.ItemType == 5;
+ if (flag3)
+ {
+ XItem mainItem = XBagDocument.MakeXItem(itemID, false);
+ XSingleton<UiUtility>.singleton.ShowTooltipDialog(mainItem, null, ixuisprite, false, 0u);
+ }
+ else
+ {
+ itemID = XBagDocument.ConvertTemplate(itemConf);
+ DlgBase<ItemTooltipDlg, ItemTooltipDlgBehaviour>.singleton.ShowToolTip(itemID, 0u);
+ DlgBase<ItemTooltipDlg, ItemTooltipDlgBehaviour>.singleton.ItemSelector.Select(icon);
+ DlgBase<ItemTooltipDlg, ItemTooltipDlgBehaviour>.singleton.SetPosition(ixuisprite);
+ XSingleton<TooltipParam>.singleton.Reset();
+ }
+ }
+ }
+
+ internal void ShowOutLookDialog(XItem item, IXUISprite icon = null, uint proferssion = 0u)
+ {
+ bool flag = item == null;
+ if (!flag)
+ {
+ bool flag2 = item.Type == ItemType.FASHION;
+ if (flag2)
+ {
+ FashionList.RowData fashionConf = XBagDocument.GetFashionConf(item.itemID);
+ bool flag3 = fashionConf != null && (int)fashionConf.EquipPos == XFastEnumIntEqualityComparer<FashionPosition>.ToInt(FashionPosition.Hair);
+ if (flag3)
+ {
+ DlgBase<FashionStorageFashionHairToolTipDlg, FashionHairToolTipBehaviour>.singleton.ShowToolTip(item, null, true, proferssion);
+ DlgBase<FashionStorageFashionHairToolTipDlg, FashionHairToolTipBehaviour>.singleton.ItemSelector.Select(icon);
+ DlgBase<FashionStorageFashionHairToolTipDlg, FashionHairToolTipBehaviour>.singleton.SetPosition(icon);
+ }
+ else
+ {
+ DlgBase<FashionStorageFashionToolTipDlg, FashionTooltipDlgBehaviour>.singleton.ShowToolTip(item, null, true, proferssion);
+ DlgBase<FashionStorageFashionToolTipDlg, FashionTooltipDlgBehaviour>.singleton.ItemSelector.Select(icon);
+ DlgBase<FashionStorageFashionToolTipDlg, FashionTooltipDlgBehaviour>.singleton.SetPosition(icon);
+ }
+ XSingleton<TooltipParam>.singleton.Reset();
+ }
+ else
+ {
+ bool flag4 = item.Type == ItemType.EQUIP;
+ if (flag4)
+ {
+ DlgBase<FashionStorageEquipToolTipDlg, ItemTooltipDlgBehaviour>.singleton.ShowToolTip(item, null, true, proferssion);
+ DlgBase<FashionStorageEquipToolTipDlg, ItemTooltipDlgBehaviour>.singleton.ItemSelector.Select(icon);
+ DlgBase<FashionStorageEquipToolTipDlg, ItemTooltipDlgBehaviour>.singleton.SetPosition(icon);
+ XSingleton<TooltipParam>.singleton.Reset();
+ }
+ }
+ }
+ }
+
+ public void ShowTooltipDialog(int itemID, IXUISprite icon = null, uint profession = 0u)
+ {
+ ItemList.RowData itemConf = XBagDocument.GetItemConf(itemID);
+ bool flag = itemConf == null;
+ if (flag)
+ {
+ XSingleton<XDebug>.singleton.AddErrorLog("rowData == null: ", itemID.ToString(), null, null, null, null);
+ }
+ else
+ {
+ bool flag2 = itemConf.ItemType == 5;
+ if (flag2)
+ {
+ XItem mainItem = XBagDocument.MakeXItem(itemID, false);
+ XSingleton<UiUtility>.singleton.ShowTooltipDialog(mainItem, null, icon, false, 0u);
+ }
+ else
+ {
+ itemID = XBagDocument.ConvertTemplate(itemConf);
+ DlgBase<ItemTooltipDlg, ItemTooltipDlgBehaviour>.singleton.ShowToolTip(itemID, profession);
+ DlgBase<ItemTooltipDlg, ItemTooltipDlgBehaviour>.singleton.ItemSelector.Select(icon);
+ DlgBase<ItemTooltipDlg, ItemTooltipDlgBehaviour>.singleton.SetPosition(icon);
+ XSingleton<TooltipParam>.singleton.Reset();
+ }
+ }
+ }
+
+ public void ShowTooltipDialogByUID(string strUID, GameObject icon = null)
+ {
+ ulong uid = 0UL;
+ bool flag = ulong.TryParse(strUID, out uid);
+ if (flag)
+ {
+ XItem xitem = XSingleton<XGame>.singleton.Doc.XBagDoc.GetItemByUID(uid);
+ bool flag2 = xitem == null;
+ if (flag2)
+ {
+ XFashionDocument xfashionDocument = XSingleton<XGame>.singleton.Doc.GetXComponent(XFashionDocument.uuID) as XFashionDocument;
+ ClientFashionData clientFashionData = xfashionDocument.FindFashion(uid);
+ bool flag3 = clientFashionData != null;
+ if (flag3)
+ {
+ xitem = xfashionDocument.MakeXItem(clientFashionData);
+ }
+ }
+ bool flag4 = xitem != null;
+ if (flag4)
+ {
+ IXUISprite icon2 = null;
+ bool flag5 = null != icon;
+ if (flag5)
+ {
+ icon2 = (icon.GetComponent("XUISprite") as IXUISprite);
+ }
+ this.ShowTooltipDialog(xitem, null, icon2, false, 0u);
+ }
+ }
+ }
+
+ public void ShowSystemHelp(string main, string title, string label)
+ {
+ DlgBase<SystemHelpDlg, SystemHelpBehaviour>.singleton.Load();
+ this._ShowSystemHelp(main, title, label, 50);
+ }
+
+ public void ShowModalDialogWithTitle(string title, string label, string firstBtn, ButtonClickEventHandler handler = null, int depth = 50)
+ {
+ DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.Load();
+ DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.SetSingleButtonMode(true);
+ DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.SetCloseButtonVisible(false);
+ this._ShowModalDialog(label, firstBtn, "-", handler, depth, title);
+ }
+
+ public void ShowModalDialog(string label, string firstBtn)
+ {
+ DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.Load();
+ DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.SetSingleButtonMode(true);
+ this._ShowModalDialog(label, firstBtn, "-", null, 50, "");
+ }
+
+ public void ShowModalDialog(string label, string firstBtn, ButtonClickEventHandler handler = null, int depth = 50)
+ {
+ DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.Load();
+ DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.SetSingleButtonMode(true);
+ this._ShowModalDialog(label, firstBtn, "-", handler, depth, "");
+ }
+
+ public void ShowModalDialog(string label, string firstBtn, string secondBtn, ButtonClickEventHandler handler = null)
+ {
+ DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.Load();
+ DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.SetSingleButtonMode(false);
+ this._ShowModalDialog(label, firstBtn, secondBtn, handler, 50, "");
+ }
+
+ public void ShowModalDialog(string label, string firstBtn, string secondBtn, ButtonClickEventHandler handler = null, int depth = 50)
+ {
+ DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.Load();
+ DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.SetSingleButtonMode(false);
+ this._ShowModalDialog(label, firstBtn, secondBtn, handler, depth, "");
+ }
+
+ public void ShowModalDialog(string label, string firstBtn, string secondBtn, ButtonClickEventHandler handler, ButtonClickEventHandler handler2, bool showCloseBtn = false, XTempTipDefine showNoTip = XTempTipDefine.OD_START, int depth = 50)
+ {
+ DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.StartTip = showNoTip;
+ DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.Load();
+ DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.SetSingleButtonMode(false);
+ DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.SetCloseButtonVisible(showCloseBtn);
+ this._ShowModalDialog(label, firstBtn, secondBtn, handler, handler2, depth);
+ }
+
+ public void ShowModalDialog(string title, string label, string firstBtn, string secondBtn, ButtonClickEventHandler handler, ButtonClickEventHandler handler2, bool showCloseBtn = false, XTempTipDefine showNoTip = XTempTipDefine.OD_START, int depth = 50)
+ {
+ DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.StartTip = showNoTip;
+ DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.Load();
+ DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.SetSingleButtonMode(false);
+ DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.SetCloseButtonVisible(showCloseBtn);
+ DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.SetTitle(title);
+ this._ShowModalDialog(label, firstBtn, secondBtn, handler, handler2, depth);
+ }
+
+ public void ShowModalDialog(string message, ButtonClickEventHandler handler)
+ {
+ string @string = XStringDefineProxy.GetString("COMMON_OK");
+ string string2 = XStringDefineProxy.GetString("COMMON_CANCEL");
+ this.ShowModalDialog(message, @string, string2, handler);
+ }
+
+ protected void _ShowModalDialog(string label, string firstBtn, string secondBtn, ButtonClickEventHandler handler, ButtonClickEventHandler handler2, int depth = 50)
+ {
+ DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.SetPanelDepth(depth);
+ DlgBase<ModalDlg, ModalDlgBehaviour>.singleton._bHasGrey = false;
+ DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.SetVisible(false, true);
+ DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.SetLabelsWithSymbols(label, firstBtn, secondBtn);
+ DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.SetModalCallback(handler, handler2);
+ DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.SetTweenTargetAndPlay(DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.uiBehaviour.gameObject);
+ }
+
+ protected void _ShowModalDialog(string label, string firstBtn, string secondBtn, ButtonClickEventHandler handler = null, int depth = 50, string title = "")
+ {
+ DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.SetPanelDepth(depth);
+ DlgBase<ModalDlg, ModalDlgBehaviour>.singleton._bHasGrey = false;
+ DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.SetVisible(false, true);
+ DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.SetTitle(title);
+ DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.SetLabelsWithSymbols(label, firstBtn, secondBtn);
+ bool flag = handler == null;
+ if (flag)
+ {
+ DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.SetModalCallback(new ButtonClickEventHandler(this.FrButtonCallback), null);
+ }
+ else
+ {
+ DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.SetModalCallback(handler, null);
+ }
+ DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.SetTweenTargetAndPlay(DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.uiBehaviour.gameObject);
+ }
+
+ protected void _ShowSystemHelp(string main, string title, string label, int depth = 50)
+ {
+ DlgBase<SystemHelpDlg, SystemHelpBehaviour>.singleton.SetPanelDepth(depth);
+ DlgBase<SystemHelpDlg, SystemHelpBehaviour>.singleton._bHasGrey = false;
+ DlgBase<SystemHelpDlg, SystemHelpBehaviour>.singleton.SetVisible(false, true);
+ DlgBase<SystemHelpDlg, SystemHelpBehaviour>.singleton.SetLabels(main, title, label);
+ DlgBase<SystemHelpDlg, SystemHelpBehaviour>.singleton.SetTweenTargetAndPlay(DlgBase<SystemHelpDlg, SystemHelpBehaviour>.singleton.uiBehaviour.gameObject);
+ }
+
+ public void ShowLeaveTeamModalDialog(ButtonClickEventHandler handler, string tips = "")
+ {
+ bool flag = tips == "";
+ string label;
+ if (flag)
+ {
+ label = XStringDefineProxy.GetString("TEAM_SHOULD_LEAVE_TEAM_CONFIRM");
+ }
+ else
+ {
+ label = tips;
+ }
+ string @string = XStringDefineProxy.GetString("COMMON_OK");
+ string string2 = XStringDefineProxy.GetString("COMMON_CANCEL");
+ XSingleton<UiUtility>.singleton.ShowModalDialog(label, @string, string2, handler);
+ }
+
+ public void CloseHelp()
+ {
+ bool flag = DlgBase<SystemHelpDlg, SystemHelpBehaviour>.singleton.IsVisible();
+ if (flag)
+ {
+ DlgBase<SystemHelpDlg, SystemHelpBehaviour>.singleton.SetVisible(false, true);
+ }
+ }
+
+ public void CloseModalDlg()
+ {
+ bool flag = DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.IsVisible();
+ if (flag)
+ {
+ DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.SetVisible(false, true);
+ }
+ }
+
+ private bool FrButtonCallback(IXUIButton go)
+ {
+ DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.SetVisible(false, true);
+ XSingleton<XShell>.singleton.Pause = false;
+ return true;
+ }
+
+ public string RoleTypeToString(RoleType type)
+ {
+ return "UnknownProf";
+ }
+
+ private Vector3 GetScreenPointMin()
+ {
+ Vector2 vector;
+ vector= new Vector3((float)(-(float)XSingleton<XGameUI>.singleton.Base_UI_Width / 2), (float)(XSingleton<XGameUI>.singleton.Base_UI_Height / 2));
+ Vector3 vector2 = XSingleton<XGameUI>.singleton.UIRoot.TransformPoint(vector);
+ return XSingleton<XGameUI>.singleton.UICamera.WorldToScreenPoint(vector2);
+ }
+
+ private Vector3 GetScreenPointMax()
+ {
+ Vector2 vector;
+ vector= new Vector3((float)(XSingleton<XGameUI>.singleton.Base_UI_Width / 2), (float)(-(float)XSingleton<XGameUI>.singleton.Base_UI_Height / 2));
+ Vector3 vector2 = XSingleton<XGameUI>.singleton.UIRoot.TransformPoint(vector);
+ return XSingleton<XGameUI>.singleton.UICamera.WorldToScreenPoint(vector2);
+ }
+
+ public string GetColorStr(Color color)
+ {
+ return string.Format("{0:X2}{1:X2}{2:X2}", (uint)(color.r * 255f), (uint)(color.g * 255f), (uint)(color.b * 255f));
+ }
+
+ public Color GetColor(float[] rgb)
+ {
+ bool flag = rgb == null;
+ Color result;
+ if (flag)
+ {
+ result = Color.white;
+ }
+ else
+ {
+ bool flag2 = rgb.Length > 3;
+ if (flag2)
+ {
+ result = new Color(rgb[0] / 255f, rgb[1] / 255f, rgb[2] / 255f, rgb[3] / 100f);
+ }
+ else
+ {
+ bool flag3 = rgb.Length > 2;
+ if (flag3)
+ {
+ result = new Color(rgb[0] / 255f, rgb[1] / 255f, rgb[2] / 255f);
+ }
+ else
+ {
+ bool flag4 = rgb.Length > 1;
+ if (flag4)
+ {
+ result = new Color(rgb[0] / 255f, rgb[1] / 255f, 1f);
+ }
+ else
+ {
+ bool flag5 = rgb.Length != 0;
+ if (flag5)
+ {
+ result = new Color(rgb[0] / 255f, 1f, 1f);
+ }
+ else
+ {
+ result = Color.white;
+ }
+ }
+ }
+ }
+ }
+ return result;
+ }
+
+ public string GetItemQualityFrame(int quality, int type)
+ {
+ string result;
+ switch (quality)
+ {
+ case 0:
+ result = "kuang_dj_0";
+ break;
+ case 1:
+ result = "kuang_dj_1";
+ break;
+ case 2:
+ result = "kuang_dj_2";
+ break;
+ case 3:
+ result = "kuang_dj_3";
+ break;
+ case 4:
+ result = "kuang_dj_4";
+ break;
+ case 5:
+ result = "kuang_dj_5";
+ break;
+ default:
+ result = "kuang_dj_0";
+ break;
+ }
+ return result;
+ }
+
+ public string GetItemQualityRGB(int quality)
+ {
+ string value;
+ switch (quality)
+ {
+ case 0:
+ value = XSingleton<XGlobalConfig>.singleton.GetValue("Quality0Color");
+ break;
+ case 1:
+ value = XSingleton<XGlobalConfig>.singleton.GetValue("Quality1Color");
+ break;
+ case 2:
+ value = XSingleton<XGlobalConfig>.singleton.GetValue("Quality2Color");
+ break;
+ case 3:
+ value = XSingleton<XGlobalConfig>.singleton.GetValue("Quality3Color");
+ break;
+ case 4:
+ value = XSingleton<XGlobalConfig>.singleton.GetValue("Quality4Color");
+ break;
+ case 5:
+ value = XSingleton<XGlobalConfig>.singleton.GetValue("Quality5Color");
+ break;
+ default:
+ value = XSingleton<XGlobalConfig>.singleton.GetValue("Quality0Color");
+ break;
+ }
+ return value;
+ }
+
+ public Color GetItemQualityColor(int quality)
+ {
+ string itemQualityColorStr = this.GetItemQualityColorStr(quality);
+ bool flag = string.IsNullOrEmpty(itemQualityColorStr);
+ Color result;
+ if (flag)
+ {
+ result = Color.white;
+ }
+ else
+ {
+ result = new Color32(Convert.ToByte(itemQualityColorStr.Substring(0, 2), 16), Convert.ToByte(itemQualityColorStr.Substring(2, 2), 16), Convert.ToByte(itemQualityColorStr.Substring(4, 2), 16), byte.MaxValue);
+ }
+ return result;
+ }
+
+ public Color ConvertRGBStringToColor(string c)
+ {
+ return new Color32(Convert.ToByte(c.Substring(0, 2), 16), Convert.ToByte(c.Substring(2, 2), 16), Convert.ToByte(c.Substring(4, 2), 16), byte.MaxValue);
+ }
+
+ public string GetItemQualityColorStr(int quality)
+ {
+ string result = "";
+ switch (quality)
+ {
+ case 0:
+ result = XSingleton<XGlobalConfig>.singleton.GetValue("Quality0Color");
+ break;
+ case 1:
+ result = XSingleton<XGlobalConfig>.singleton.GetValue("Quality1Color");
+ break;
+ case 2:
+ result = XSingleton<XGlobalConfig>.singleton.GetValue("Quality2Color");
+ break;
+ case 3:
+ result = XSingleton<XGlobalConfig>.singleton.GetValue("Quality3Color");
+ break;
+ case 4:
+ result = XSingleton<XGlobalConfig>.singleton.GetValue("Quality4Color");
+ break;
+ case 5:
+ result = XSingleton<XGlobalConfig>.singleton.GetValue("Quality5Color");
+ break;
+ }
+ return result;
+ }
+
+ public string GetItemQualityIcon(int quality)
+ {
+ string result;
+ switch (quality)
+ {
+ case 0:
+ result = "icondjdj_0";
+ break;
+ case 1:
+ result = "icondjdj_1";
+ break;
+ case 2:
+ result = "icondjdj_2";
+ break;
+ case 3:
+ result = "icondjdj_3";
+ break;
+ case 4:
+ result = "icondjdj_4";
+ break;
+ case 5:
+ result = "icondjdj_5";
+ break;
+ default:
+ result = "null";
+ break;
+ }
+ return result;
+ }
+
+ public string GetItemQualityName(int quality)
+ {
+ string result;
+ switch (quality)
+ {
+ case 0:
+ result = "D";
+ break;
+ case 1:
+ result = "C";
+ break;
+ case 2:
+ result = "B";
+ break;
+ case 3:
+ result = "A";
+ break;
+ case 4:
+ result = "S";
+ break;
+ case 5:
+ result = "L";
+ break;
+ default:
+ result = string.Empty;
+ break;
+ }
+ return result;
+ }
+
+ public string GetScorePic(int score)
+ {
+ string result;
+ switch (score)
+ {
+ case 1:
+ result = "F-S";
+ break;
+ case 2:
+ result = "F-SS";
+ break;
+ case 3:
+ result = "F-SSS";
+ break;
+ default:
+ result = "";
+ break;
+ }
+ return result;
+ }
+
+ public string GetEquipFusionIconName(int fusionLevel)
+ {
+ string result = string.Empty;
+ switch (fusionLevel)
+ {
+ case 1:
+ result = "equip_0_00000";
+ break;
+ case 2:
+ result = "equip_1_00000";
+ break;
+ case 3:
+ result = "equip_2_00000";
+ break;
+ case 4:
+ result = "equip_3_00000";
+ break;
+ case 5:
+ result = "equip_4_00000";
+ break;
+ default:
+ result = "equip_0_00000";
+ break;
+ }
+ return result;
+ }
+
+ internal string GetEquipPartName(EquipPosition part, bool bPrefix = true)
+ {
+ string result;
+ switch (part)
+ {
+ case EquipPosition.EQUIP_START:
+ result = XStringDefineProxy.GetString(XStringDefine.ITEM_PART_HEAD);
+ break;
+ case EquipPosition.Upperbody:
+ result = XStringDefineProxy.GetString(XStringDefine.ITEM_PART_UPPERBODY);
+ break;
+ case EquipPosition.Lowerbody:
+ result = XStringDefineProxy.GetString(XStringDefine.ITEM_PART_LOWERBODY);
+ break;
+ case EquipPosition.Gloves:
+ result = XStringDefineProxy.GetString(XStringDefine.ITEM_PART_GLOVES);
+ break;
+ case EquipPosition.Boots:
+ result = XStringDefineProxy.GetString(XStringDefine.ITEM_PART_BOOTS);
+ break;
+ case EquipPosition.Mainweapon:
+ result = XStringDefineProxy.GetString(XStringDefine.ITEM_PART_MAINWEAPON);
+ break;
+ case EquipPosition.Secondaryweapon:
+ result = XStringDefineProxy.GetString(XStringDefine.ITEM_PART_SECWEAPON);
+ break;
+ case EquipPosition.Necklace:
+ result = XStringDefineProxy.GetString(XStringDefine.ITEM_PART_NECKLACE);
+ break;
+ case EquipPosition.Earrings:
+ result = XStringDefineProxy.GetString(XStringDefine.ITEM_PART_EARRING);
+ break;
+ case EquipPosition.Rings:
+ result = XStringDefineProxy.GetString(XStringDefine.ITEM_PART_RING1);
+ break;
+ default:
+ result = "";
+ break;
+ }
+ return result;
+ }
+
+ internal string GetFashionPartName(FashionPosition part, bool bPrefix = true)
+ {
+ switch (part)
+ {
+ case FashionPosition.FASHION_START:
+ return (bPrefix ? XStringDefineProxy.GetString(XStringDefine.FASHION_PREFIX) : "") + XStringDefineProxy.GetString(XStringDefine.FASHION_HEAD);
+ case FashionPosition.FashionUpperBody:
+ return (bPrefix ? XStringDefineProxy.GetString(XStringDefine.FASHION_PREFIX) : "") + XStringDefineProxy.GetString(XStringDefine.FASHION_UPPERBODY);
+ case FashionPosition.FashionLowerBody:
+ return (bPrefix ? XStringDefineProxy.GetString(XStringDefine.FASHION_PREFIX) : "") + XStringDefineProxy.GetString(XStringDefine.FASHION_LOWERBODY);
+ case FashionPosition.FashionGloves:
+ return (bPrefix ? XStringDefineProxy.GetString(XStringDefine.FASHION_PREFIX) : "") + XStringDefineProxy.GetString(XStringDefine.FASHION_GLOVES);
+ case FashionPosition.FashionBoots:
+ return (bPrefix ? XStringDefineProxy.GetString(XStringDefine.FASHION_PREFIX) : "") + XStringDefineProxy.GetString(XStringDefine.FASHION_BOOTS);
+ case FashionPosition.FashionMainWeapon:
+ return (bPrefix ? XStringDefineProxy.GetString(XStringDefine.FASHION_PREFIX) : "") + XStringDefineProxy.GetString(XStringDefine.FASHION_MAINWEAPON);
+ case FashionPosition.FashionSecondaryWeapon:
+ return (bPrefix ? XStringDefineProxy.GetString(XStringDefine.FASHION_PREFIX) : "") + XStringDefineProxy.GetString(XStringDefine.FASHION_SECWEAPON);
+ case FashionPosition.FashionWings:
+ return (bPrefix ? XStringDefineProxy.GetString(XStringDefine.FASHION_PREFIX) : "") + XStringDefineProxy.GetString(XStringDefine.FASHION_WINGS);
+ case FashionPosition.FashionTail:
+ return (bPrefix ? XStringDefineProxy.GetString(XStringDefine.FASHION_PREFIX) : "") + XStringDefineProxy.GetString(XStringDefine.FASHION_TAIL);
+ case FashionPosition.FashionDecal:
+ return (bPrefix ? XStringDefineProxy.GetString(XStringDefine.FASHION_PREFIX) : "") + XStringDefineProxy.GetString(XStringDefine.FASHION_DECAL);
+ case FashionPosition.Hair:
+ return (bPrefix ? XStringDefineProxy.GetString(XStringDefine.FASHION_PREFIX) : "") + XStringDefineProxy.GetString(XStringDefine.FASHION_HAIR);
+ }
+ return "";
+ }
+
+ internal string GetArtifactPartName(ArtifactPosition part, bool bPrefix = true)
+ {
+ string result;
+ switch (part)
+ {
+ case ArtifactPosition.ARTIFACT_START:
+ result = XStringDefineProxy.GetString(XStringDefine.ARTIFACT_ANSAB);
+ break;
+ case ArtifactPosition.Grail:
+ result = XStringDefineProxy.GetString(XStringDefine.ARTIFACT_GRAIL);
+ break;
+ case ArtifactPosition.Battleheart:
+ result = XStringDefineProxy.GetString(XStringDefine.ARTIFACT_BATTLEHEART);
+ break;
+ case ArtifactPosition.DragonHorn:
+ result = XStringDefineProxy.GetString(XStringDefine.ARTIFACT_DRAGONHORN);
+ break;
+ default:
+ result = "";
+ break;
+ }
+ return result;
+ }
+
+ public string ChooseProfString(List<string> ProfStringList, uint basicTypeId = 0u)
+ {
+ bool flag = ProfStringList.Count == 1;
+ string result;
+ if (flag)
+ {
+ result = ProfStringList[0];
+ }
+ else
+ {
+ bool flag2 = ProfStringList.Count == 0;
+ if (flag2)
+ {
+ result = "";
+ }
+ else
+ {
+ bool flag3 = basicTypeId <= 0u;
+ if (flag3)
+ {
+ basicTypeId = XItemDrawerParam.DefaultProfession;
+ }
+ int index = (int)(basicTypeId - 1u);
+ result = ProfStringList[index];
+ }
+ }
+ return result;
+ }
+
+ public string ChooseProfString(string[] ProfStringList, uint basicTypeId = 0u)
+ {
+ bool flag = ProfStringList == null || ProfStringList.Length == 0;
+ string result;
+ if (flag)
+ {
+ result = "";
+ }
+ else
+ {
+ bool flag2 = ProfStringList.Length == 1;
+ if (flag2)
+ {
+ result = ProfStringList[0];
+ }
+ else
+ {
+ bool flag3 = basicTypeId <= 0u;
+ if (flag3)
+ {
+ basicTypeId = XItemDrawerParam.DefaultProfession;
+ }
+ int num = (int)(basicTypeId - 1u);
+ bool flag4 = num < 0 || num >= ProfStringList.Length;
+ if (flag4)
+ {
+ XSingleton<XDebug>.singleton.AddErrorLog("There's no data for prof ", basicTypeId.ToString(), ", data: {", string.Join(", ", ProfStringList), "}", null);
+ result = string.Empty;
+ }
+ else
+ {
+ result = ProfStringList[num];
+ }
+ }
+ }
+ return result;
+ }
+
+ internal T ChooseProfData<T>(List<T> ProfDataList, uint basicTypeId = 0u)
+ {
+ bool flag = ProfDataList == null || ProfDataList.Count == 0;
+ T result;
+ if (flag)
+ {
+ result = default(T);
+ }
+ else
+ {
+ bool flag2 = ProfDataList.Count == 1;
+ if (flag2)
+ {
+ result = ProfDataList[0];
+ }
+ else
+ {
+ bool flag3 = basicTypeId <= 0u;
+ if (flag3)
+ {
+ basicTypeId = XItemDrawerParam.DefaultProfession;
+ }
+ int num = (int)(basicTypeId - 1u);
+ bool flag4 = num < 0 || num >= ProfDataList.Count;
+ if (flag4)
+ {
+ XSingleton<XCommon>.singleton.shareSB.Length = 0;
+ for (int i = 0; i < ProfDataList.Count; i++)
+ {
+ bool flag5 = i != 0;
+ if (flag5)
+ {
+ XSingleton<XCommon>.singleton.shareSB.Append(", ");
+ }
+ StringBuilder shareSB = XSingleton<XCommon>.singleton.shareSB;
+ T t = ProfDataList[i];
+ shareSB.Append(t.ToString());
+ }
+ XSingleton<XDebug>.singleton.AddErrorLog("There's no data for prof ", basicTypeId.ToString(), ", data: {", XSingleton<XCommon>.singleton.shareSB.ToString(), "}", null);
+ result = default(T);
+ }
+ else
+ {
+ result = ProfDataList[num];
+ }
+ }
+ }
+ return result;
+ }
+
+ internal T ChooseProfData<T>(T[] ProfDataList, uint basicTypeId = 0u)
+ {
+ bool flag = ProfDataList == null || ProfDataList.Length == 0;
+ T result;
+ if (flag)
+ {
+ result = default(T);
+ }
+ else
+ {
+ bool flag2 = ProfDataList.Length == 1;
+ if (flag2)
+ {
+ result = ProfDataList[0];
+ }
+ else
+ {
+ bool flag3 = basicTypeId == 0u;
+ if (flag3)
+ {
+ basicTypeId = XItemDrawerParam.DefaultProfession;
+ }
+ int num = (int)(basicTypeId - 1u);
+ bool flag4 = num < 0 || num >= ProfDataList.Length;
+ if (flag4)
+ {
+ XSingleton<XCommon>.singleton.shareSB.Length = 0;
+ for (int i = 0; i < ProfDataList.Length; i++)
+ {
+ bool flag5 = i != 0;
+ if (flag5)
+ {
+ XSingleton<XCommon>.singleton.shareSB.Append(", ");
+ }
+ XSingleton<XCommon>.singleton.shareSB.Append(ProfDataList[i].ToString());
+ }
+ XSingleton<XDebug>.singleton.AddErrorLog("There's no data for prof ", basicTypeId.ToString(), ", data: {", XSingleton<XCommon>.singleton.shareSB.ToString(), "}", null);
+ result = default(T);
+ }
+ else
+ {
+ result = ProfDataList[num];
+ }
+ }
+ }
+ return result;
+ }
+
+ internal T ChooseProfData<T>(ref SeqListRef<T> ProfDataList, uint basicTypeId = 0u, int index = 0)
+ {
+ bool flag = ProfDataList.Count == 0;
+ T result;
+ if (flag)
+ {
+ result = default(T);
+ }
+ else
+ {
+ bool flag2 = ProfDataList.Count == 1;
+ if (flag2)
+ {
+ result = ProfDataList[0, index];
+ }
+ else
+ {
+ bool flag3 = basicTypeId == 0u;
+ if (flag3)
+ {
+ basicTypeId = XItemDrawerParam.DefaultProfession;
+ }
+ int num = (int)(basicTypeId - 1u);
+ bool flag4 = num < 0 || num >= ProfDataList.Count;
+ if (flag4)
+ {
+ XSingleton<XCommon>.singleton.shareSB.Length = 0;
+ for (int i = 0; i < ProfDataList.Count; i++)
+ {
+ bool flag5 = i != 0;
+ if (flag5)
+ {
+ XSingleton<XCommon>.singleton.shareSB.Append(", ");
+ }
+ StringBuilder shareSB = XSingleton<XCommon>.singleton.shareSB;
+ T t = ProfDataList[i, index];
+ shareSB.Append(t.ToString());
+ }
+ XSingleton<XDebug>.singleton.AddErrorLog("There's no data for prof ", basicTypeId.ToString(), ", data: {", XSingleton<XCommon>.singleton.shareSB.ToString(), "}", null);
+ result = default(T);
+ }
+ else
+ {
+ result = ProfDataList[num, index];
+ }
+ }
+ }
+ return result;
+ }
+
+ internal string ReplaceReturn(string s)
+ {
+ return s.Replace("{n}", "\n");
+ }
+
+ public void AddChild(Transform parent, Transform child)
+ {
+ child.parent = parent;
+ child.localPosition = Vector3.zero;
+ child.localRotation = Quaternion.identity;
+ child.localScale = Vector3.one;
+ XSingleton<XGameUI>.singleton.m_uiTool.MarkParentAsChanged(child.gameObject);
+ }
+
+ public void AddChild(GameObject parent, GameObject child)
+ {
+ child.transform.parent = parent.transform;
+ child.transform.localPosition = Vector3.zero;
+ child.transform.localRotation = Quaternion.identity;
+ child.transform.localScale = Vector3.one;
+ XSingleton<XGameUI>.singleton.m_uiTool.MarkParentAsChanged(child.gameObject);
+ }
+
+ public void AddChildNoMark(GameObject parent, GameObject child)
+ {
+ child.transform.parent = parent.transform;
+ child.transform.localPosition = Vector3.zero;
+ child.transform.localRotation = Quaternion.identity;
+ child.transform.localScale = Vector3.one;
+ }
+
+ public void AddChild(IUIRect parent, GameObject child, IXUIPanel panel)
+ {
+ child.transform.parent = parent.transform;
+ child.transform.localPosition = Vector3.zero;
+ child.transform.localRotation = Quaternion.identity;
+ child.transform.localScale = Vector3.one;
+ bool flag = XSingleton<XGameUI>.singleton.m_uiTool != null;
+ if (flag)
+ {
+ XSingleton<XGameUI>.singleton.m_uiTool.ChangePanel(child, parent, panel);
+ }
+ }
+
+ public long GetTimeStamp()
+ {
+ return (DateTime.Now.ToUniversalTime().Ticks - 621355968000000000L) / 10000000L;
+ }
+
+ public string TimeFormatSince1970(int elapsedSeconds, string format, bool isCountTimeZone = false)
+ {
+ return this.TimeNow((double)elapsedSeconds, isCountTimeZone).ToString(format);
+ }
+
+ public DateTime TimeNow(double elapsedSeconds, bool isCountTimeZone = false)
+ {
+ int num = 0;
+ if (isCountTimeZone)
+ {
+ num = TimeZone.CurrentTimeZone.GetUtcOffset(DateTime.Now).Hours;
+ }
+ DateTime result = new DateTime(1970, 1, 1, 0, 0, 0);
+ elapsedSeconds = Math.Max(0.0, elapsedSeconds);
+ result = result.AddSeconds(elapsedSeconds + (double)(num * 3600));
+ return result;
+ }
+
+ public double TimeFormatLastTime(double elapsedSeconds, bool isCountTimeZone = false)
+ {
+ return (this.TimeNow(elapsedSeconds, isCountTimeZone) - DateTime.Now).TotalSeconds;
+ }
+
+ public string TimeFormatString(int totalSecond, int lowCount = 0, int upCount = 3, int minUnit = 4, bool isCarry = false, bool needPadLeft = true)
+ {
+ this._Timebuilder.Length = 0;
+ upCount = Math.Min(3, upCount);
+ int num = 2 + (3 - upCount);
+ if (isCarry)
+ {
+ totalSecond = (int)Math.Ceiling((double)totalSecond / (double)this.TimeDuaration[minUnit]) * this.TimeDuaration[minUnit];
+ }
+ int i = num;
+ while (i < 5)
+ {
+ int num2 = totalSecond / this.TimeDuaration[i];
+ totalSecond %= this.TimeDuaration[i];
+ bool flag = 5 - i > 4 - minUnit + lowCount && this._Timebuilder.Length == 0;
+ if (!flag)
+ {
+ goto IL_96;
+ }
+ bool flag2 = num2 == 0;
+ if (!flag2)
+ {
+ goto IL_96;
+ }
+ IL_118:
+ i++;
+ continue;
+ IL_96:
+ bool flag3 = this._Timebuilder.Length != 0;
+ if (flag3)
+ {
+ this._Timebuilder.Append(":");
+ }
+ bool flag4 = i == 2 || !needPadLeft;
+ if (flag4)
+ {
+ this._Timebuilder.Append(num2.ToString());
+ }
+ else
+ {
+ this._Timebuilder.Append(num2.ToString().PadLeft(2, '0'));
+ }
+ bool flag5 = i == minUnit;
+ if (flag5)
+ {
+ return this._Timebuilder.ToString();
+ }
+ goto IL_118;
+ }
+ return this._Timebuilder.ToString();
+ }
+
+ public string TimeFormatString(float totalSecondFloat, int lowCount = 0, int upCount = 3, int minUnit = 4, bool isCarry = false)
+ {
+ this.TimeFormatString((int)totalSecondFloat, lowCount, upCount, minUnit, isCarry, true);
+ totalSecondFloat %= 1f;
+ totalSecondFloat *= 100f;
+ this._Timebuilder.Append(string.Format(".{0}", ((int)totalSecondFloat).ToString().PadLeft(2, '0')));
+ return this._Timebuilder.ToString();
+ }
+
+ public string TimeAgoFormatString(int totalSecond)
+ {
+ bool flag = totalSecond < 0;
+ string @string;
+ if (flag)
+ {
+ @string = XStringDefineProxy.GetString("ONLINE");
+ }
+ else
+ {
+ for (int i = 0; i < 5; i++)
+ {
+ int num = this.TimeDuaration[i];
+ int num2 = totalSecond / num;
+ bool flag2 = num2 > 0;
+ if (flag2)
+ {
+ return string.Format("{0}{1}{2}", num2.ToString(), XStringDefineProxy.GetString(this.TimeDuarationName[i]), XStringDefineProxy.GetString("AGO"));
+ }
+ }
+ @string = XStringDefineProxy.GetString("JUSTNOW");
+ }
+ return @string;
+ }
+
+ public string TimeOnOrOutFromString(int totalSecond)
+ {
+ bool flag = totalSecond < 0;
+ string @string;
+ if (flag)
+ {
+ @string = XStringDefineProxy.GetString("ONLINE");
+ }
+ else
+ {
+ @string = XStringDefineProxy.GetString("OUTLINE");
+ }
+ return @string;
+ }
+
+ public string TimeAccFormatString(int totalSecond, int minTime, int maxTime = 0)
+ {
+ bool flag = totalSecond < 0;
+ string @string;
+ if (flag)
+ {
+ @string = XStringDefineProxy.GetString("ONLINE");
+ }
+ else
+ {
+ for (int i = maxTime; i < 5; i++)
+ {
+ int num = this.TimeDuaration[i];
+ int num2 = totalSecond / num;
+ bool flag2 = num2 > 0 || i == minTime;
+ if (flag2)
+ {
+ return string.Format("{0}{1}", ((num2 > 0) ? num2 : 1).ToString(), XStringDefineProxy.GetString(this.TimeDuarationName[i]));
+ }
+ }
+ @string = XStringDefineProxy.GetString("JUSTNOW");
+ }
+ return @string;
+ }
+
+ public string TimeDuarationFormatString(int totalSecond, int minTime = 5)
+ {
+ StringBuilder stringBuilder = new StringBuilder();
+ bool flag = false;
+ bool flag2 = totalSecond <= 0;
+ if (flag2)
+ {
+ stringBuilder.Append(0).Append(XStringDefineProxy.GetString("SECOND_DUARATION"));
+ }
+ else
+ {
+ for (int i = 0; i < minTime; i++)
+ {
+ int num = this.TimeDuaration[i];
+ int num2 = totalSecond / num;
+ bool flag3 = num2 > 0;
+ if (flag3)
+ {
+ flag = true;
+ }
+ bool flag4 = flag;
+ if (flag4)
+ {
+ stringBuilder.Append(num2).Append(XStringDefineProxy.GetString(this.TimeName[i]));
+ }
+ totalSecond -= num2 * num;
+ bool flag5 = totalSecond == 0;
+ if (flag5)
+ {
+ break;
+ }
+ }
+ }
+ return stringBuilder.ToString();
+ }
+
+ public string TimeDuarationFormatSizeString(int totalSecond, int size = 5, int start = 0)
+ {
+ StringBuilder stringBuilder = new StringBuilder();
+ bool flag = false;
+ int num = 0;
+ bool flag2 = totalSecond <= 0;
+ if (flag2)
+ {
+ stringBuilder.Append(0).Append(XStringDefineProxy.GetString("SECOND_DUARATION"));
+ }
+ else
+ {
+ for (int i = start; i < 5; i++)
+ {
+ int num2 = this.TimeDuaration[i];
+ int num3 = totalSecond / num2;
+ bool flag3 = num3 > 0;
+ if (flag3)
+ {
+ flag = true;
+ }
+ bool flag4 = flag;
+ if (flag4)
+ {
+ num++;
+ stringBuilder.Append(num3).Append(XStringDefineProxy.GetString(this.TimeName[i]));
+ }
+ totalSecond -= num3 * num2;
+ bool flag5 = totalSecond == 0 || num >= size;
+ if (flag5)
+ {
+ break;
+ }
+ }
+ }
+ return stringBuilder.ToString();
+ }
+
+ public string TimeDurationBackFormatString(int totalSecond, int minTime = 5)
+ {
+ StringBuilder stringBuilder = new StringBuilder();
+ bool flag = false;
+ bool flag2 = totalSecond <= 0;
+ if (flag2)
+ {
+ stringBuilder.Append(0).Append(XStringDefineProxy.GetString("SECOND_DUARATION"));
+ }
+ else
+ {
+ for (int i = 0; i < minTime; i++)
+ {
+ int num = this.TimeDuaration[i];
+ int num2 = totalSecond / num;
+ bool flag3 = num2 > 0;
+ if (flag3)
+ {
+ flag = true;
+ }
+ bool flag4 = flag;
+ if (flag4)
+ {
+ stringBuilder.Append(num2).Append(XStringDefineProxy.GetString(this.TimeName[i]));
+ }
+ totalSecond -= num2 * num;
+ bool flag5 = totalSecond == 0;
+ if (flag5)
+ {
+ break;
+ }
+ }
+ }
+ return stringBuilder.ToString();
+ }
+
+ public string NumberFormat(int number)
+ {
+ bool flag = number < 0;
+ number = Math.Abs(number);
+ bool flag2 = number < 10000;
+ string text;
+ if (flag2)
+ {
+ text = number.ToString();
+ }
+ else
+ {
+ number /= 10000;
+ text = number.ToString() + "W";
+ }
+ bool flag3 = flag;
+ if (flag3)
+ {
+ text = "-" + text;
+ }
+ return text;
+ }
+
+ public string NumberFormat(ulong number)
+ {
+ bool flag = number < XSingleton<XGlobalConfig>.singleton.MinSeparateNum;
+ string result;
+ if (flag)
+ {
+ result = number.ToString();
+ }
+ else
+ {
+ ulong[] numberSeparators = XSingleton<XGlobalConfig>.singleton.NumberSeparators;
+ int num = -1;
+ for (int i = 0; i < numberSeparators.Length; i++)
+ {
+ bool flag2 = numberSeparators[i] <= number;
+ if (!flag2)
+ {
+ break;
+ }
+ num = i;
+ }
+ bool flag3 = num == -1;
+ if (flag3)
+ {
+ result = number.ToString();
+ }
+ else
+ {
+ bool flag4 = this.NumberSeparatorNames == null;
+ if (flag4)
+ {
+ this.NumberSeparatorNames = new string[numberSeparators.Length];
+ for (int j = 0; j < numberSeparators.Length; j++)
+ {
+ this.NumberSeparatorNames[j] = "NumberSeparator" + j.ToString();
+ }
+ }
+ result = string.Format("{0}{1}", (number / numberSeparators[num]).ToString(), XStringDefineProxy.GetString(this.NumberSeparatorNames[num]));
+ }
+ }
+ return result;
+ }
+
+ public string NumberFormatBillion(ulong number)
+ {
+ double num = 100000000.0;
+ bool flag = number > num;
+ string result;
+ if (flag)
+ {
+ double num2 = number / num;
+ ulong num3 = (ulong)(num2 * 100.0);
+ double num4 = num3 / 100.0;
+ result = string.Format("{0}{1}", num4, XStringDefineProxy.GetString("NumberSeparator1"));
+ }
+ else
+ {
+ result = this.NumberFormat(number);
+ }
+ return result;
+ }
+
+ public string GetBagExpandFullTips(BagType type)
+ {
+ string result;
+ switch (type)
+ {
+ case BagType.EquipBag:
+ result = XSingleton<XStringTable>.singleton.GetString("ExpandEquipBagFull");
+ break;
+ case BagType.EmblemBag:
+ result = XSingleton<XStringTable>.singleton.GetString("ExpandEmbleBagFull");
+ break;
+ case BagType.ArtifactBag:
+ result = XSingleton<XStringTable>.singleton.GetString("ExpandArtifactBagFull");
+ break;
+ case BagType.ItemBag:
+ result = XSingleton<XStringTable>.singleton.GetString("ExpandItemBagFull");
+ break;
+ default:
+ result = string.Empty;
+ break;
+ }
+ return result;
+ }
+
+ public Transform FindChild(Transform dlg, string childName)
+ {
+ string text = childName;
+ bool flag = childName.Contains("?profession?");
+ if (flag)
+ {
+ int num = XFastEnumIntEqualityComparer<RoleType>.ToInt(XSingleton<XAttributeMgr>.singleton.XPlayerData.Profession) % 10;
+ childName = childName.Replace("?profession?", num.ToString());
+ text = text.Replace("?profession?", num.ToString());
+ }
+ bool flag2 = childName.Contains("?profession1turn?");
+ if (flag2)
+ {
+ int num2 = XFastEnumIntEqualityComparer<RoleType>.ToInt(XSingleton<XAttributeMgr>.singleton.XPlayerData.Profession);
+ bool flag3 = num2 >= 10;
+ if (flag3)
+ {
+ int num3 = num2 % 100 / 10 + num2 % 10 * 2 - 2;
+ childName = childName.Replace("?profession1turn?", num3.ToString("d2"));
+ text = text.Replace("?profession1turn?", num3.ToString("d2"));
+ }
+ }
+ bool flag4 = childName.Contains("{");
+ Transform result;
+ if (flag4)
+ {
+ int num4 = childName.IndexOf("{");
+ int num5 = childName.IndexOf("}");
+ int num6 = int.Parse(childName.Substring(num4 + 1, num5 - num4 - 1)) - 1;
+ string text2 = childName.Substring(0, num4 - 1);
+ string text3 = childName.Substring(num5 + 1);
+ Transform transform = dlg.Find(text2);
+ bool flag5 = transform == null;
+ if (flag5)
+ {
+ result = null;
+ }
+ else
+ {
+ bool flag6 = num6 >= transform.childCount;
+ if (flag6)
+ {
+ result = null;
+ }
+ else
+ {
+ Transform transform2 = null;
+ int num7 = -1;
+ for (int i = 0; i < transform.childCount; i++)
+ {
+ transform2 = transform.GetChild(i);
+ bool activeSelf = transform2.gameObject.activeSelf;
+ if (activeSelf)
+ {
+ num7++;
+ }
+ bool flag7 = num6 == num7;
+ if (flag7)
+ {
+ break;
+ }
+ }
+ bool flag8 = text3 != "";
+ if (flag8)
+ {
+ result = transform2.Find(text3.Substring(1));
+ }
+ else
+ {
+ result = transform2;
+ }
+ }
+ }
+ }
+ else
+ {
+ Transform transform3 = dlg.Find(text);
+ result = transform3;
+ }
+ return result;
+ }
+
+ public int GetItemCount(int itemID)
+ {
+ return XSingleton<XGame>.singleton.Doc.XBagDoc.ItemBag.GetItemCount(itemID);
+ }
+
+ public bool IsMaxBuyPowerCnt()
+ {
+ return this.IsMaxBuyCnt(ItemEnum.FATIGUE);
+ }
+
+ public bool IsMaxBuyCnt(ItemEnum type)
+ {
+ int level = (int)XSingleton<XAttributeMgr>.singleton.XPlayerData.Level;
+ XRechargeDocument specificDocument = XDocuments.GetSpecificDocument<XRechargeDocument>(XRechargeDocument.uuID);
+ int vipLevel = (int)specificDocument.VipLevel;
+ XPurchaseDocument specificDocument2 = XDocuments.GetSpecificDocument<XPurchaseDocument>(XPurchaseDocument.uuID);
+ XPurchaseInfo purchaseInfo = specificDocument2.GetPurchaseInfo(level, vipLevel, type);
+ return purchaseInfo.totalBuyNum <= purchaseInfo.curBuyNum;
+ }
+
+ public bool CanEnterBattleScene(uint sceneID)
+ {
+ return this.CanEnterBattleScene(sceneID, 1);
+ }
+
+ public bool CanEnterBattleScene(uint sceneID, int cnt)
+ {
+ SceneTable.RowData sceneData = XSingleton<XSceneMgr>.singleton.GetSceneData(sceneID);
+ bool flag = sceneData == null;
+ bool result;
+ if (flag)
+ {
+ result = false;
+ }
+ else
+ {
+ bool flag2 = true;
+ for (int i = 0; i < sceneData.FatigueCost.Count; i++)
+ {
+ int num = 0;
+ bool flag3 = sceneData.FatigueCost[i, 0] <= 50;
+ if (flag3)
+ {
+ num = (int)XSingleton<XGame>.singleton.Doc.XBagDoc.GetVirtualItemCount((ItemEnum)sceneData.FatigueCost[i, 0]);
+ }
+ else
+ {
+ int num2 = -1;
+ XSingleton<XGame>.singleton.Doc.XBagDoc.ItemBag.FindItem((ulong)((long)sceneData.FatigueCost[i, 0]), out num2);
+ bool flag4 = num2 >= 0;
+ if (flag4)
+ {
+ XItem xitem = XSingleton<XGame>.singleton.Doc.XBagDoc.ItemBag[num2];
+ num = xitem.itemCount;
+ }
+ }
+ bool flag5 = num < sceneData.FatigueCost[i, 1];
+ if (flag5)
+ {
+ flag2 = false;
+ break;
+ }
+ }
+ result = flag2;
+ }
+ return result;
+ }
+
+ public void ShowLoginTip(string text)
+ {
+ DlgBase<XLoginTipView, XLoginTipBehaviour>.singleton.ShowTips(text);
+ }
+
+ public void StopLoginTip()
+ {
+ DlgBase<XLoginTipView, XLoginTipBehaviour>.singleton.StopTips();
+ }
+
+ public void ShowSystemTip(string text, string rgb = "fece00")
+ {
+ XSystemTipDocument specificDocument = XDocuments.GetSpecificDocument<XSystemTipDocument>(XSystemTipDocument.uuID);
+ bool flag = specificDocument != null;
+ if (flag)
+ {
+ specificDocument.ShowTip(text, rgb);
+ }
+ }
+
+ public void ShowSystemTip(int errcode, string rgb = "fece00")
+ {
+ XSystemTipDocument specificDocument = XDocuments.GetSpecificDocument<XSystemTipDocument>(XSystemTipDocument.uuID);
+ bool flag = specificDocument != null;
+ if (flag)
+ {
+ specificDocument.ShowTip(XStringDefineProxy.GetString((ErrorCode)errcode), rgb);
+ }
+ }
+
+ public void ShowSystemTip(ErrorCode errcode, string rgb = "fece00")
+ {
+ XSystemTipDocument specificDocument = XDocuments.GetSpecificDocument<XSystemTipDocument>(XSystemTipDocument.uuID);
+ bool flag = specificDocument != null;
+ if (flag)
+ {
+ specificDocument.ShowTip(this.ReplaceReturn(XStringDefineProxy.GetString(errcode)), rgb);
+ }
+ }
+
+ public void OnGetInvalidRequest(string name)
+ {
+ XSingleton<XDebug>.singleton.AddErrorLog("GetInvalidRequest: ", name, null, null, null, null);
+ }
+
+ public uint ShowSystemNoticeTip(string text)
+ {
+ XShowGetItemDocument specificDocument = XDocuments.GetSpecificDocument<XShowGetItemDocument>(XShowGetItemDocument.uuID);
+ return specificDocument.AddTip(text);
+ }
+
+ public void EditSystemNoticeTip(string text, uint id)
+ {
+ XShowGetItemDocument specificDocument = XDocuments.GetSpecificDocument<XShowGetItemDocument>(XShowGetItemDocument.uuID);
+ specificDocument.EditTip(text, id);
+ }
+
+ public int GetRowCount(int count, int columnCount)
+ {
+ bool flag = count <= 0;
+ int result;
+ if (flag)
+ {
+ result = 0;
+ }
+ else
+ {
+ result = (count - 1) / columnCount + 1;
+ }
+ return result;
+ }
+
+ public void SetVirtualItem(XNumberTween numTween, ulong num, bool bAnim = true, string postfix = "")
+ {
+ numTween.SetNumberWithTween(num, postfix, !bAnim, true);
+ bool flag = !bAnim;
+ if (!flag)
+ {
+ IXUITweenTool iconTween = numTween.IconTween;
+ bool flag2 = iconTween != null;
+ if (flag2)
+ {
+ iconTween.PlayTween(true, -1f);
+ }
+ }
+ }
+
+ public void ShowItemAccess(int itemid, AccessCallback callback = null)
+ {
+ ItemList.RowData itemConf = XBagDocument.GetItemConf(itemid);
+ bool flag = itemConf != null && itemConf.Access.Count > 0;
+ if (flag)
+ {
+ List<int> list = new List<int>();
+ List<int> list2 = new List<int>();
+ for (int i = 0; i < itemConf.Access.Count; i++)
+ {
+ list.Add(itemConf.Access[i, 0]);
+ list2.Add(itemConf.Access[i, 1]);
+ }
+ DlgBase<ItemAccessDlg, ItemAccessDlgBehaviour>.singleton.ShowAccess(itemid, list, list2, callback);
+ }
+ }
+
+ public void OnItemClick(IXUISprite sp)
+ {
+ int itemID = (int)sp.ID;
+ this.ShowTooltipDialog(itemID, sp, 0u);
+ }
+
+ public void OnBindItemClick(IXUISprite sp)
+ {
+ int itemID = (int)sp.ID;
+ XSingleton<TooltipParam>.singleton.bBinded = true;
+ this.ShowTooltipDialog(itemID, sp, 0u);
+ }
+
+ public void SetUIDepthDelta(GameObject go, int delta)
+ {
+ IXUITool uiTool = XSingleton<XGameUI>.singleton.m_uiTool;
+ uiTool.SetUIDepthDelta(go, delta);
+ }
+
+ public void UpdateWifi(IXUIButton btn, IXUISprite spr)
+ {
+ bool flag = this.wifi_green == 0u || this.wifi_yellow == 0u;
+ if (flag)
+ {
+ this.wifi_green = uint.Parse(XSingleton<XGlobalConfig>.singleton.GetValue("WIFI_GREEN"));
+ this.wifi_yellow = uint.Parse(XSingleton<XGlobalConfig>.singleton.GetValue("WIFI_YELO"));
+ }
+ long delay = XSingleton<XServerTimeMgr>.singleton.GetDelay();
+ bool flag2 = delay <= (long)((ulong)this.wifi_green);
+ if (flag2)
+ {
+ this.wifiBtn = "xh_2";
+ bool flag3 = btn != null;
+ if (flag3)
+ {
+ btn.SetAlpha(1f);
+ }
+ bool flag4 = spr != null;
+ if (flag4)
+ {
+ spr.SetAlpha(1f);
+ }
+ }
+ else
+ {
+ bool flag5 = delay <= (long)((ulong)this.wifi_yellow);
+ if (flag5)
+ {
+ this.wifiBtn = "xh_1";
+ bool flag6 = btn != null;
+ if (flag6)
+ {
+ btn.SetAlpha(1f);
+ }
+ bool flag7 = spr != null;
+ if (flag7)
+ {
+ spr.SetAlpha(1f);
+ }
+ }
+ else
+ {
+ this.wifiBtn = "xh_0";
+ bool flag8 = btn != null;
+ if (flag8)
+ {
+ btn.SetAlpha(1f);
+ }
+ bool flag9 = spr != null;
+ if (flag9)
+ {
+ spr.SetAlpha(1f);
+ }
+ }
+ }
+ bool flag10 = btn != null;
+ if (flag10)
+ {
+ btn.SetSprites(this.wifiBtn, this.wifiBtn, this.wifiBtn);
+ }
+ bool flag11 = spr != null;
+ if (flag11)
+ {
+ spr.SetSprite(this.wifiBtn);
+ }
+ bool flag12 = delay >= XServerTimeMgr.SyncTimeOut;
+ if (flag12)
+ {
+ bool flag13 = this.wifi_cur >= 1f && this.wifi_forward;
+ if (flag13)
+ {
+ this.wifi_forward = false;
+ }
+ bool flag14 = this.wifi_cur <= 0f && !this.wifi_forward;
+ if (flag14)
+ {
+ this.wifi_forward = true;
+ }
+ this.wifi_cur = (this.wifi_forward ? (Time.time % this.wifi_duration / this.wifi_duration) : (1f - Time.time % this.wifi_duration / this.wifi_duration));
+ bool flag15 = btn != null;
+ if (flag15)
+ {
+ btn.SetAlpha(this.wifi_cur);
+ }
+ bool flag16 = spr != null;
+ if (flag16)
+ {
+ spr.SetAlpha(this.wifi_cur);
+ }
+ }
+ }
+
+ public bool IsWeakNetwork()
+ {
+ uint num = uint.Parse(XSingleton<XGlobalConfig>.singleton.GetValue("WIFI_GREEN"));
+ uint num2 = uint.Parse(XSingleton<XGlobalConfig>.singleton.GetValue("WIFI_YELO"));
+ long delay = XSingleton<XServerTimeMgr>.singleton.GetDelay();
+ bool flag = delay <= (long)((ulong)num) || delay <= (long)((ulong)num2);
+ return !flag;
+ }
+
+ public void RefreshPing(IXUILabel _time, IXUISlider _slider, IXUILabel _free)
+ {
+ string batteryLevel = XSingleton<XUpdater.XUpdater>.singleton.XPlatform.GetBatteryLevel();
+ string text = DateTime.Now.ToString("HH:mm");
+ bool flag = _time != null;
+ if (flag)
+ {
+ _time.SetText(text);
+ }
+ int num = 100;
+ int.TryParse(batteryLevel, out num);
+ bool flag2 = _slider != null;
+ if (flag2)
+ {
+ _slider.Value = (float)num / 100f;
+ }
+ bool flag3 = _free != null;
+ if (flag3)
+ {
+ _free.Alpha = (float)(XSingleton<XLoginDocument>.singleton.freeflow ? 1 : 0);
+ }
+ }
+
+ public bool IsSystemExpress(string txt)
+ {
+ byte[] bytes = Encoding.UTF8.GetBytes(txt);
+ bool flag = bytes == null || bytes.Length <= 1;
+ return !flag && bytes[0] == 240;
+ }
+
+ public string StripInvalidUnicodeCharacters(string str)
+ {
+ return str;
+ }
+
+ public void ShowAfterLoginAnnouncement(PlatNotice announcement)
+ {
+ bool flag = announcement == null;
+ if (!flag)
+ {
+ bool isopen = announcement.isopen;
+ if (isopen)
+ {
+ DlgBase<XAnnouncementView, XAnnouncementBehaviour>.singleton.ShowAnnouncement(announcement.content);
+ }
+ }
+ }
+
+ public void ShowPatface()
+ {
+ DlgBase<XPatfaceView, XPatfaceBehaviour>.singleton.bShow = true;
+ RpcC2M_FetchPlatNotice rpcC2M_FetchPlatNotice = new RpcC2M_FetchPlatNotice();
+ rpcC2M_FetchPlatNotice.oArg.type = XSingleton<XClientNetwork>.singleton.AccountType;
+ RuntimePlatform platform = Application.platform;
+ if ((int)platform != 8)
+ {
+ if ((int)platform == 11)
+ {
+ rpcC2M_FetchPlatNotice.oArg.platid = PlatType.PLAT_ANDROID;
+ }
+ }
+ else
+ {
+ rpcC2M_FetchPlatNotice.oArg.platid = PlatType.PLAT_IOS;
+ }
+ XSingleton<XClientNetwork>.singleton.Send(rpcC2M_FetchPlatNotice);
+ }
+
+ public string GlobalConfigGetValue(string cfgName)
+ {
+ return XSingleton<XGlobalConfig>.singleton.GetValue(cfgName);
+ }
+
+ public Color StringToColor(string str)
+ {
+ bool flag = string.IsNullOrEmpty(str);
+ Color result;
+ if (flag)
+ {
+ result = Color.white;
+ }
+ else
+ {
+ int num = int.Parse(str, NumberStyles.AllowHexSpecifier);
+ float num2 = (float)(num / 65536);
+ float num3 = (float)(num / 256 % 256);
+ float num4 = (float)(num % 256);
+ result = new Color(num2 / 255f, num3 / 255f, num4 / 255f);
+ }
+ return result;
+ }
+
+ public string GetChatDesignation(uint desID, string specDesi, string name = "")
+ {
+ XDesignationDocument specificDocument = XDocuments.GetSpecificDocument<XDesignationDocument>(XDesignationDocument.uuID);
+ DesignationTable.RowData byID = specificDocument._DesignationTable.GetByID((int)desID);
+ bool flag = byID == null || !byID.ShowInChat;
+ string result;
+ if (flag)
+ {
+ result = name;
+ }
+ else
+ {
+ bool flag2 = byID.Effect != "";
+ if (flag2)
+ {
+ result = string.Format("{0}{1}", XLabelSymbolHelper.FormatDesignation(byID.Atlas, byID.Effect, 16), name);
+ }
+ else
+ {
+ bool flag3 = name != "";
+ if (flag3)
+ {
+ name = string.Format(" {0}", name);
+ }
+ bool special = byID.Special;
+ if (special)
+ {
+ result = string.Format("{0}{1}[-]{2}", byID.Color, specDesi, name);
+ }
+ else
+ {
+ result = string.Format("{0}{1}[-]{2}", byID.Color, byID.Designation, name);
+ }
+ }
+ }
+ return result;
+ }
+
+ public string SetChatCoverDesignation(string name, uint desID, bool justPicDesc = false)
+ {
+ XDesignationDocument specificDocument = XDocuments.GetSpecificDocument<XDesignationDocument>(XDesignationDocument.uuID);
+ DesignationTable.RowData byID = specificDocument._DesignationTable.GetByID((int)desID);
+ string text = string.Format("{0}{1}", XSingleton<XGlobalConfig>.singleton.GetValue("XUILabelSymbolNameColor"), name);
+ bool flag = byID == null || byID.Effect != "";
+ if (flag)
+ {
+ bool flag2 = byID != null;
+ if (flag2)
+ {
+ text = string.Format("{0}{1}", XLabelSymbolHelper.FormatDesignation(byID.Atlas, byID.Effect, 16), text);
+ }
+ }
+ else
+ {
+ bool flag3 = !justPicDesc;
+ if (flag3)
+ {
+ text = string.Format("{0}{1} {2}", XSingleton<XGlobalConfig>.singleton.GetValue("XUILabelSymbolDesignationColor"), byID.Designation, text);
+ }
+ }
+ return text;
+ }
+
+ public Color ParseColor(string text, int offset)
+ {
+ int num = this.HexToDecimal(text[offset]) << 4 | this.HexToDecimal(text[offset + 1]);
+ int num2 = this.HexToDecimal(text[offset + 2]) << 4 | this.HexToDecimal(text[offset + 3]);
+ int num3 = this.HexToDecimal(text[offset + 4]) << 4 | this.HexToDecimal(text[offset + 5]);
+ float num4 = 0.003921569f;
+ return new Color(num4 * (float)num, num4 * (float)num2, num4 * (float)num3);
+ }
+
+ public int HexToDecimal(char ch)
+ {
+ switch (ch)
+ {
+ case '0':
+ return 0;
+ case '1':
+ return 1;
+ case '2':
+ return 2;
+ case '3':
+ return 3;
+ case '4':
+ return 4;
+ case '5':
+ return 5;
+ case '6':
+ return 6;
+ case '7':
+ return 7;
+ case '8':
+ return 8;
+ case '9':
+ return 9;
+ case ':':
+ case ';':
+ case '<':
+ case '=':
+ case '>':
+ case '?':
+ case '@':
+ goto IL_D4;
+ case 'A':
+ break;
+ case 'B':
+ goto IL_BB;
+ case 'C':
+ goto IL_C0;
+ case 'D':
+ goto IL_C5;
+ case 'E':
+ goto IL_CA;
+ case 'F':
+ goto IL_CF;
+ default:
+ switch (ch)
+ {
+ case 'a':
+ break;
+ case 'b':
+ goto IL_BB;
+ case 'c':
+ goto IL_C0;
+ case 'd':
+ goto IL_C5;
+ case 'e':
+ goto IL_CA;
+ case 'f':
+ goto IL_CF;
+ default:
+ goto IL_D4;
+ }
+ break;
+ }
+ return 10;
+ IL_BB:
+ return 11;
+ IL_C0:
+ return 12;
+ IL_C5:
+ return 13;
+ IL_CA:
+ return 14;
+ IL_CF:
+ return 15;
+ IL_D4:
+ return 15;
+ }
+
+ public void ShowFatigueSureDlg(ButtonClickEventHandler handler)
+ {
+ string label = string.Format(XStringDefineProxy.GetString("FATIGUEOVERFLOWTIPS"), XSingleton<XGlobalConfig>.singleton.GetValue("MaxFatigue"));
+ string @string = XStringDefineProxy.GetString("COMMON_OK");
+ string string2 = XStringDefineProxy.GetString("COMMON_CANCEL");
+ XSingleton<UiUtility>.singleton.ShowModalDialog(label, @string, string2, handler, 100);
+ }
+
+ public void ShowRank(IXUISprite sp, IXUILabel label, int rank)
+ {
+ bool flag = 1 <= rank && rank <= 3;
+ if (flag)
+ {
+ sp.gameObject.SetActive(true);
+ label.gameObject.SetActive(false);
+ bool flag2 = rank == 1;
+ if (flag2)
+ {
+ sp.SetSprite("N1");
+ }
+ bool flag3 = rank == 2;
+ if (flag3)
+ {
+ sp.SetSprite("N2");
+ }
+ bool flag4 = rank == 3;
+ if (flag4)
+ {
+ sp.SetSprite("N3");
+ }
+ }
+ else
+ {
+ sp.gameObject.SetActive(false);
+ label.gameObject.SetActive(true);
+ bool flag5 = rank <= 0;
+ if (flag5)
+ {
+ label.SetText(XStringDefineProxy.GetString("NoRank"));
+ }
+ else
+ {
+ label.SetText(rank.ToString());
+ }
+ }
+ }
+
+ public void DestroyTextureInActivePool(XUIPool pool, string path)
+ {
+ List<GameObject> list = ListPool<GameObject>.Get();
+ pool.GetActiveList(list);
+ for (int i = 0; i < list.Count; i++)
+ {
+ GameObject gameObject = list[i];
+ IXUITexture ixuitexture = gameObject.transform.Find("path").GetComponent("XUITexture") as IXUITexture;
+ bool flag = ixuitexture != null;
+ if (flag)
+ {
+ ixuitexture.SetTexturePath("");
+ }
+ }
+ ListPool<GameObject>.Release(list);
+ }
+
+ public void SetMiniMapOpponentStatus(bool hide)
+ {
+ BattleIndicateHandler.SetMiniMapOpponentStatus(hide);
+ }
+
+ public string GetItemTypeStr(ItemType type)
+ {
+ return this.GetItemTypeStr(XFastEnumIntEqualityComparer<ItemType>.ToInt(type));
+ }
+
+ public string GetItemTypeStr(int type)
+ {
+ return XStringDefineProxy.GetString(XSingleton<XCommon>.singleton.StringCombine("ItemType", type.ToString()));
+ }
+
+ public void OnPayCallback(string msg)
+ {
+ XRechargeDocument specificDocument = XDocuments.GetSpecificDocument<XRechargeDocument>(XRechargeDocument.uuID);
+ specificDocument.OnPayCallback(msg);
+ }
+
+ public void SDKPandoraBuyGoods(string json)
+ {
+ XRechargeDocument specificDocument = XDocuments.GetSpecificDocument<XRechargeDocument>(XRechargeDocument.uuID);
+ specificDocument.SDKPandoraBuyGoods(json);
+ }
+
+ public void OnQQVipPayCallback(string msg)
+ {
+ XPlatformAbilityDocument specificDocument = XDocuments.GetSpecificDocument<XPlatformAbilityDocument>(XPlatformAbilityDocument.uuID);
+ specificDocument.OnQQVipPayCallback(msg);
+ }
+
+ public void OnGameCenterWakeUp(int type)
+ {
+ XSingleton<XDebug>.singleton.AddLog("[OnGameCenterWakeUp] StartUpType = " + type, null, null, null, null, null, XDebugColor.XDebug_None);
+ bool flag = (type == 2 && XSingleton<XLoginDocument>.singleton.Channel == XAuthorizationChannel.XAuthorization_QQ) || (type == 3 && XSingleton<XLoginDocument>.singleton.Channel == XAuthorizationChannel.XAuthorization_WeChat);
+ if (flag)
+ {
+ XSingleton<XDebug>.singleton.AddLog("[OnGameCenterWakeUp] PtcC2N_UpdateStartUpTypeNtf type = " + type, null, null, null, null, null, XDebugColor.XDebug_None);
+ PtcC2N_UpdateStartUpTypeNtf ptcC2N_UpdateStartUpTypeNtf = new PtcC2N_UpdateStartUpTypeNtf();
+ ptcC2N_UpdateStartUpTypeNtf.Data.type = (StartUpType)type;
+ XSingleton<XClientNetwork>.singleton.Send(ptcC2N_UpdateStartUpTypeNtf);
+ DlgBase<XMainInterface, XMainInterfaceBehaviour>.singleton.RefreshGameCenterInfo();
+ }
+ }
+
+ public void OnGetPlatFriendsInfo()
+ {
+ XSingleton<XDebug>.singleton.AddLog("[UiUtility] OnGetPlatFriendsInfo", null, null, null, null, null, XDebugColor.XDebug_None);
+ XFriendsDocument.Doc.SyncPlatFriendsInfo();
+ XSingleton<XLoginDocument>.singleton.SetFriendServerIcon();
+ XSingleton<XUpdater.XUpdater>.singleton.XPlatform.SendGameExData("QuerySelf", "");
+ bool flag = XSingleton<PDatabase>.singleton.playerInfo != null;
+ if (flag)
+ {
+ string pictureLarge = XSingleton<PDatabase>.singleton.playerInfo.data.pictureLarge;
+ XSingleton<XUICacheImage>.singleton.SetMainIcon(pictureLarge);
+ }
+ }
+
+ public void SerialHandle3DTouch(string msg)
+ {
+ XSingleton<X3DTouchMgr>.singleton.OnProcess3DTouch(msg);
+ }
+
+ public void SerialHandleScreenLock(string msg)
+ {
+ }
+
+ public void OnPayMarketingInfo(List<PayMarketingInfo> listInfo)
+ {
+ XRechargeDocument specificDocument = XDocuments.GetSpecificDocument<XRechargeDocument>(XRechargeDocument.uuID);
+ specificDocument.OnGetPayMarketingInfo(listInfo);
+ }
+
+ public void ShowSettingNumberDialog(uint itemID, string title, uint min, uint max, uint step, ModalSettingNumberDlg.GetInputNumber handler, int depth = 50)
+ {
+ DlgBase<ModalSettingNumberDlg, ModalSettingNumberDlgBehaviour>.singleton.Load();
+ DlgBase<ModalSettingNumberDlg, ModalSettingNumberDlgBehaviour>.singleton.MaxNumber = max;
+ DlgBase<ModalSettingNumberDlg, ModalSettingNumberDlgBehaviour>.singleton.MinNumber = min;
+ DlgBase<ModalSettingNumberDlg, ModalSettingNumberDlgBehaviour>.singleton.Title = title;
+ DlgBase<ModalSettingNumberDlg, ModalSettingNumberDlgBehaviour>.singleton.step = step;
+ DlgBase<ModalSettingNumberDlg, ModalSettingNumberDlgBehaviour>.singleton.ItemID = itemID;
+ DlgBase<ModalSettingNumberDlg, ModalSettingNumberDlgBehaviour>.singleton.SetModalInfo(handler);
+ DlgBase<ModalSettingNumberDlg, ModalSettingNumberDlgBehaviour>.singleton.SetVisible(true, true);
+ }
+
+ public string GetPartitionId()
+ {
+ return XSingleton<XClientNetwork>.singleton.ServerID.ToString();
+ }
+
+ public string GetRoleId()
+ {
+ bool flag = XSingleton<XEntityMgr>.singleton.Player != null;
+ string result;
+ if (flag)
+ {
+ result = XSingleton<XEntityMgr>.singleton.Player.Attributes.RoleID.ToString();
+ }
+ else
+ {
+ result = "0";
+ }
+ return result;
+ }
+
+ public void OnReplayStart()
+ {
+ bool flag = !DlgBase<ReplaykitDlg, ReplayBehaviour>.singleton.IsVisible();
+ if (flag)
+ {
+ DlgBase<ReplaykitDlg, ReplayBehaviour>.singleton.isPlaying = true;
+ DlgBase<ReplaykitDlg, ReplayBehaviour>.singleton.Show(true);
+ }
+ }
+
+ public void OnSetBg(bool on)
+ {
+ XSingleton<XChatIFlyMgr>.singleton.SetBackMusicOn(on);
+ }
+
+ public void OpenHtmlUrl(string key)
+ {
+ Dictionary<string, string> dictionary = new Dictionary<string, string>();
+ dictionary["url"] = XSingleton<XGlobalConfig>.singleton.GetValue(key);
+ dictionary["screendir"] = "SENSOR";
+ XSingleton<XUpdater.XUpdater>.singleton.XPlatform.SendExtDara("open_url", Json.Serialize(dictionary));
+ }
+
+ public void CloseSysAndNoticeServer(uint sysID)
+ {
+ PtcC2G_CloseHintNtf ptcC2G_CloseHintNtf = new PtcC2G_CloseHintNtf();
+ ptcC2G_CloseHintNtf.Data.systemid = sysID;
+ XSingleton<XClientNetwork>.singleton.Send(ptcC2G_CloseHintNtf);
+ XSingleton<XGameSysMgr>.singleton.SetSysRedPointState((XSysDefine)sysID, false);
+ XSingleton<XGameSysMgr>.singleton.RecalculateRedPointState((XSysDefine)sysID, true);
+ }
+
+ public void OpenUrl(string url, bool landscape)
+ {
+ Dictionary<string, string> dictionary = new Dictionary<string, string>();
+ dictionary["url"] = url;
+ dictionary["screendir"] = (landscape ? "LANDSCAPE" : "SENSOR");
+ XSingleton<XUpdater.XUpdater>.singleton.XPlatform.SendExtDara("open_url", Json.Serialize(dictionary));
+ }
+
+ public void Shuffle<T>(ref List<T> list)
+ {
+ for (int i = list.Count - 1; i > 0; i--)
+ {
+ int num = XSingleton<XCommon>.singleton.RandomInt(0, i + 1);
+ bool flag = num != i;
+ if (flag)
+ {
+ T value = list[i];
+ list[i] = list[num];
+ list[num] = value;
+ }
+ }
+ }
+
+ public void OnSetWebViewMenu(int menutype)
+ {
+ DlgBase<WebView, WebViewBehaviour>.singleton.OnSetWebViewMenu(menutype);
+ }
+
+ public void OnWebViewBackGame(int backtype)
+ {
+ DlgBase<WebView, WebViewBehaviour>.singleton.OnWebViewBackGame(backtype);
+ }
+
+ public void OnWebViewRefershRefPoint(string jsonstr)
+ {
+ DlgBase<WebView, WebViewBehaviour>.singleton.OnWebViewRefershRefPoint(jsonstr);
+ }
+
+ public void OnWebViewSetheaderInfo(string jsonstr)
+ {
+ DlgBase<WebView, WebViewBehaviour>.singleton.OnWebViewSetheaderInfo(jsonstr);
+ }
+
+ public void OnWebViewCloseLoading(int show)
+ {
+ DlgBase<WebView, WebViewBehaviour>.singleton.OnWebViewCloseLoading(show);
+ }
+
+ public void OnWebViewShowReconnect(int show)
+ {
+ DlgBase<WebView, WebViewBehaviour>.singleton.OnWebViewShowReconnect(show);
+ }
+
+ public void OnWebViewClose()
+ {
+ bool flag = DlgBase<WebView, WebViewBehaviour>.singleton.IsLoaded();
+ if (flag)
+ {
+ DlgBase<WebView, WebViewBehaviour>.singleton.SetVisible(false, true);
+ }
+ }
+
+ public void OnWebViewLiveTab()
+ {
+ bool flag = DlgBase<WebView, WebViewBehaviour>.singleton.IsLoaded();
+ if (flag)
+ {
+ DlgBase<WebView, WebViewBehaviour>.singleton.OnTabLive();
+ }
+ }
+
+ public void ShowPandoraPopView(bool bShow)
+ {
+ bool flag = bShow && XSingleton<XScene>.singleton.GameCamera != null && XSingleton<XScene>.singleton.GameCamera.UnityCamera != null && !XSingleton<XScene>.singleton.GameCamera.UnityCamera.enabled;
+ if (flag)
+ {
+ XSingleton<XScene>.singleton.GameCamera.UnityCamera.enabled = true;
+ }
+ XSingleton<XDebug>.singleton.AddGreenLog("Pandora UiUtiliy ShowPandoraPopView bShow = " + bShow.ToString(), null, null, null, null, null);
+ DlgBase<XPandoraSDKPopView, XPandoraSDKPopViewBehaviour>.singleton.SetVisible(bShow, true);
+ }
+
+ public void OnWXGroupResult(string apiId, string result, int error, WXGroupCallBackType type)
+ {
+ if (type != WXGroupCallBackType.DragonGuild)
+ {
+ if (type == WXGroupCallBackType.Guild)
+ {
+ DlgBase<XGuildHallView, XGuildHallBehaviour>.singleton.GuildGroupResult(apiId, result, error);
+ }
+ }
+ else
+ {
+ XSingleton<PDatabase>.singleton.wxGroupCallbackType = WXGroupCallBackType.Guild;
+ XDragonGuildDocument.Doc.View.DragonGuildGroupResult(apiId, result, error);
+ }
+ }
+
+ public void RefreshWXGroupBtn(WXGroupCallBackType type)
+ {
+ if (type != WXGroupCallBackType.DragonGuild)
+ {
+ if (type == WXGroupCallBackType.Guild)
+ {
+ DlgBase<XGuildHallView, XGuildHallBehaviour>.singleton.RefreshWXGroupBtn();
+ }
+ }
+ else
+ {
+ XSingleton<PDatabase>.singleton.wxGroupCallbackType = WXGroupCallBackType.Guild;
+ XDragonGuildDocument.Doc.RefreshWXGroupBtn();
+ }
+ }
+
+ public void NoticeShareResult(string result, ShareCallBackType type)
+ {
+ XSingleton<XDebug>.singleton.AddLog("NoticeShareResult " + result + ", type = " + type.ToString(), null, null, null, null, null, XDebugColor.XDebug_None);
+ bool flag = type != ShareCallBackType.AddQQFriend;
+ if (flag)
+ {
+ this.ShowSystemTip((result == "Success") ? XSingleton<XStringTable>.singleton.GetString("GUILD_GROUP_SHARE_SUC") : XSingleton<XStringTable>.singleton.GetString("GUILD_GROUP_SHARE_FAIL"), "fece00");
+ }
+ else
+ {
+ this.ShowSystemTip((result == "Success") ? XSingleton<XStringTable>.singleton.GetString("FRIEND_ADD_QQ_FRIEND_SEND_SUC") : XSingleton<XStringTable>.singleton.GetString("FRIEND_ADD_QQ_FRIEND_SEND_FAIL"), "fece00");
+ }
+ switch (type)
+ {
+ case ShareCallBackType.Normal:
+ XSingleton<XPandoraSDKDocument>.singleton.NoticePandoraShareResult(result);
+ break;
+ case ShareCallBackType.GloryPic:
+ {
+ XAchievementDocument specificDocument = XDocuments.GetSpecificDocument<XAchievementDocument>(XAchievementDocument.uuID);
+ bool flag2 = result.Contains("Success");
+ if (flag2)
+ {
+ specificDocument.SendWeekShareSuccess(0u);
+ }
+ break;
+ }
+ case ShareCallBackType.DungeonShare:
+ {
+ XSingleton<XDebug>.singleton.AddLog("DungeonShare " + result, null, null, null, null, null, XDebugColor.XDebug_None);
+ XAchievementDocument specificDocument2 = XDocuments.GetSpecificDocument<XAchievementDocument>(XAchievementDocument.uuID);
+ bool flag3 = result.Contains("Success");
+ if (flag3)
+ {
+ specificDocument2.SendWeekShareSuccess(specificDocument2.FirstPassSceneID);
+ }
+ specificDocument2.FirstPassSceneID = 0u;
+ bool flag4 = DlgBase<DungeonShareView, DungeonShareBehavior>.singleton.IsVisible();
+ if (flag4)
+ {
+ DlgBase<DungeonShareView, DungeonShareBehavior>.singleton.SetVisibleWithAnimation(false, null);
+ }
+ break;
+ }
+ case ShareCallBackType.WeekShare:
+ {
+ XAchievementDocument specificDocument3 = XDocuments.GetSpecificDocument<XAchievementDocument>(XAchievementDocument.uuID);
+ bool flag5 = result.Contains("Success");
+ if (flag5)
+ {
+ specificDocument3.SendWeekShareSuccess(0u);
+ }
+ break;
+ }
+ }
+ }
+
+ public bool CheckWXInstalled()
+ {
+ bool flag = XSingleton<XUpdater.XUpdater>.singleton.XPlatform.CheckStatus("Weixin_Installed", "");
+ bool flag2 = !flag;
+ bool result;
+ if (flag2)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XSingleton<XStringTable>.singleton.GetString("ERR_WECHAT_NOT_INSTALLED"), "fece00");
+ result = false;
+ }
+ else
+ {
+ result = true;
+ }
+ return result;
+ }
+
+ public bool CheckQQInstalled()
+ {
+ bool flag = XSingleton<XUpdater.XUpdater>.singleton.XPlatform.CheckStatus("QQ_Installed", "");
+ bool flag2 = !flag;
+ bool result;
+ if (flag2)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XSingleton<XStringTable>.singleton.GetString("ERR_QQ_NOT_INSTALLED"), "fece00");
+ result = false;
+ }
+ else
+ {
+ result = true;
+ }
+ return result;
+ }
+
+ public void UpdatePandoraSDKRedPoint(int pandoraSysID, bool showRedPoint, string module)
+ {
+ if (showRedPoint)
+ {
+ bool flag = XSingleton<XPandoraSDKDocument>.singleton.IsActivityTabShow(pandoraSysID);
+ if (flag)
+ {
+ XSingleton<XGameSysMgr>.singleton.ForceUpdateSysRedPointImmediately(pandoraSysID, showRedPoint);
+ }
+ }
+ else
+ {
+ XSingleton<XGameSysMgr>.singleton.ForceUpdateSysRedPointImmediately(pandoraSysID, showRedPoint);
+ }
+ bool flag2 = module == "action";
+ if (flag2)
+ {
+ XOperatingActivityDocument specificDocument = XDocuments.GetSpecificDocument<XOperatingActivityDocument>(XOperatingActivityDocument.uuID);
+ specificDocument.RefreshRedPoints();
+ }
+ else
+ {
+ bool flag3 = module == "callBack";
+ if (flag3)
+ {
+ ILuaEngine xluaEngine = XSingleton<XUpdater.XUpdater>.singleton.XLuaEngine;
+ xluaEngine.hotfixMgr.CallLuaFunc("LuaBackflowDocument", "RefreshPandoraTabRedpoint");
+ }
+ }
+ }
+
+ public void AttachPandoraSDKRedPoint(int sysID, string module)
+ {
+ bool flag = module == "action";
+ if (flag)
+ {
+ XOperatingActivityDocument specificDocument = XDocuments.GetSpecificDocument<XOperatingActivityDocument>(XOperatingActivityDocument.uuID);
+ specificDocument.AttachPandoraRedPoint(sysID);
+ }
+ else
+ {
+ bool flag2 = module == "callBack";
+ if (flag2)
+ {
+ XBackFlowDocument specificDocument2 = XDocuments.GetSpecificDocument<XBackFlowDocument>(XBackFlowDocument.uuID);
+ specificDocument2.AttachPandoraRedPoint(sysID);
+ }
+ }
+ }
+
+ public void ResetAllPopPLParent()
+ {
+ XSingleton<XPandoraSDKDocument>.singleton.ResetAllPopPLParent();
+ }
+
+ public void BillBoardCommonSetSpriteStr(params string[] strs)
+ {
+ this.ComSpriteStr.Clear();
+ for (int i = 0; i < strs.Length; i++)
+ {
+ this.ComSpriteStr.Add(strs[i]);
+ }
+ }
+
+ public double GetMachineTime()
+ {
+ return (double)(DateTime.Now.Ticks / 10000000L);
+ }
+
+ public int GetMachineTimeFrom1970()
+ {
+ return (int)((DateTime.Now - new DateTime(1970, 1, 1)).Ticks / 10000000L);
+ }
+
+ public string Decrypt(string CipherText)
+ {
+ byte[] bytes = Encoding.BigEndianUnicode.GetBytes(CipherText);
+ int num = bytes.Length;
+ byte[] array = new byte[num / 2];
+ for (int i = 0; i < num; i += 4)
+ {
+ byte b = bytes[i + 1];
+ byte b2 = bytes[i + 3];
+ int num2 = (int)(b & 15) << 4;
+ int num3 = (int)(b & 240);
+ int num4 = (int)(b2 & 15);
+ int num5 = (b2 & 240) >> 4;
+ array[i / 2] = Convert.ToByte(num2 | num5);
+ array[i / 2 + 1] = Convert.ToByte(num3 | num4);
+ }
+ return Encoding.BigEndianUnicode.GetString(array, 0, array.Length);
+ }
+
+ public bool CheckPlatfomStatus()
+ {
+ bool flag = XSingleton<XLoginDocument>.singleton.Channel == XAuthorizationChannel.XAuthorization_QQ;
+ if (flag)
+ {
+ bool flag2 = !this.CheckQQInstalled();
+ if (flag2)
+ {
+ return false;
+ }
+ }
+ bool flag3 = XSingleton<XLoginDocument>.singleton.Channel == XAuthorizationChannel.XAuthorization_WeChat;
+ if (flag3)
+ {
+ bool flag4 = !this.CheckWXInstalled();
+ if (flag4)
+ {
+ return false;
+ }
+ }
+ return true;
+ }
+
+ public bool IsOppositeSex(int one, int two)
+ {
+ one %= 10;
+ two %= 10;
+ List<int> intList = XSingleton<XGlobalConfig>.singleton.GetIntList("MaleTypeList");
+ List<int> intList2 = XSingleton<XGlobalConfig>.singleton.GetIntList("FemaleTypeList");
+ return (intList.Contains(one) && intList2.Contains(two)) || (intList.Contains(two) && intList2.Contains(one));
+ }
+
+ public void ShareToWXFriendBackEnd(string openID, string title, string desc, string tag)
+ {
+ Dictionary<string, object> dictionary = new Dictionary<string, object>();
+ dictionary["openId"] = openID;
+ dictionary["title"] = title;
+ dictionary["description"] = desc;
+ dictionary["thumbMediaId"] = "";
+ dictionary["mediaTagName"] = tag;
+ dictionary["messageExt"] = "ShareWithWeixin";
+ string text = Json.Serialize(dictionary);
+ XSingleton<XDebug>.singleton.AddLog("ShareToWXFriend paramStr = " + text, null, null, null, null, null, XDebugColor.XDebug_None);
+ XSingleton<XUpdater.XUpdater>.singleton.XPlatform.SendExtDara("share_send_to_friend_wx", text);
+ }
+
+ public void ShareToQQFreindBackEnd(string openID, string title, string desc, string tag, string targetUrl, string imageUrl, string previewText)
+ {
+ Dictionary<string, object> dictionary = new Dictionary<string, object>();
+ dictionary["act"] = 1;
+ dictionary["openId"] = openID;
+ dictionary["title"] = title;
+ dictionary["summary"] = desc;
+ dictionary["targetUrl"] = targetUrl;
+ dictionary["imageUrl"] = imageUrl;
+ dictionary["previewText"] = previewText;
+ dictionary["gameTag"] = tag;
+ string text = Json.Serialize(dictionary);
+ XSingleton<XDebug>.singleton.AddLog("SharePkToQQFriend paramStr = " + text, null, null, null, null, null, XDebugColor.XDebug_None);
+ XSingleton<XUpdater.XUpdater>.singleton.XPlatform.SendExtDara("share_send_to_friend_qq", text);
+ }
+
+ public void PandoraPicShare(string accountType, string scene, string objPath)
+ {
+ XSingleton<XDebug>.singleton.AddLog(string.Concat(new string[]
+ {
+ "UiUtility PandoraPicShare : accountType = ",
+ accountType,
+ ",scene = ",
+ scene,
+ ",objPath = ",
+ objPath
+ }), null, null, null, null, null, XDebugColor.XDebug_None);
+ GameObject gameObject = GameObject.Find(objPath);
+ bool flag = gameObject != null;
+ if (flag)
+ {
+ XSingleton<XDebug>.singleton.AddLog("UiUtility PandoraPicShare find obj", null, null, null, null, null, XDebugColor.XDebug_None);
+ Bounds boundsIncludesChildren = XSingleton<XUpdater.XUpdater>.singleton.XPandoraManager.GetBoundsIncludesChildren(gameObject.transform);
+ Vector3 vector = XSingleton<XGameUI>.singleton.UICamera.WorldToScreenPoint(boundsIncludesChildren.min);
+ Vector3 vector2 = XSingleton<XGameUI>.singleton.UICamera.WorldToScreenPoint(boundsIncludesChildren.max);
+ Rect rect;
+ rect= new Rect(vector.x, vector.y, vector2.x - vector.x, vector2.y - vector.y);
+ XSingleton<XScreenShotMgr>.singleton.PartCaptureScreen(rect, accountType, scene);
+ }
+ }
+
+ public void OneKeyAddQQFriend(string openID, string friendName)
+ {
+ bool flag = (int)Application.platform == 8;
+ if (flag)
+ {
+ XSingleton<PDatabase>.singleton.shareCallbackType = ShareCallBackType.AddQQFriend;
+ }
+ string name = XSingleton<XAttributeMgr>.singleton.XPlayerData.Name;
+ string @string = XStringDefineProxy.GetString("FRIEND_ADD_QQ_FRIEND_REMARK", new object[]
+ {
+ friendName
+ });
+ string string2 = XStringDefineProxy.GetString("FRIEND_ADD_QQ_FRIEND", new object[]
+ {
+ name
+ });
+ Dictionary<string, object> dictionary = new Dictionary<string, object>();
+ dictionary["openId"] = openID;
+ dictionary["desc"] = @string;
+ dictionary["verifyMsg"] = string2;
+ string text = Json.Serialize(dictionary);
+ XSingleton<XDebug>.singleton.AddLog("AddQQFriend paramStr = " + text, null, null, null, null, null, XDebugColor.XDebug_None);
+ XSingleton<XUpdater.XUpdater>.singleton.XPlatform.SendExtDara("add_game_qq_friend", text);
+ }
+
+ public void ShowPressToolTips(bool pressed, string content, Vector3 pos, Vector3 offset)
+ {
+ DlgBase<PressTipsDlg, PressTipsBehaviour>.singleton.Setup(pressed, content, pos, offset);
+ }
+
+ public bool ToDownLoadCorrectPackage(IXUIButton button)
+ {
+ RuntimePlatform platform = Application.platform;
+ if ((int)platform != 8)
+ {
+ if ((int)platform == 11)
+ {
+ string @string = XSingleton<XStringTable>.singleton.GetString("XUPDATE_ERROR_VERSIONNOTMATCH_ANDROID_URL");
+ XSingleton<XDebug>.singleton.AddLog("AndroidAppStore Url: ", @string, null, null, null, null, XDebugColor.XDebug_None);
+ Application.OpenURL(@string);
+ }
+ }
+ else
+ {
+ string string2 = XSingleton<XStringTable>.singleton.GetString("XUPDATE_ERROR_VERSIONNOTMATCH_URL");
+ XSingleton<XDebug>.singleton.AddLog("AppStore Url: ", string2, null, null, null, null, XDebugColor.XDebug_None);
+ Application.OpenURL(string2);
+ }
+ return true;
+ }
+
+ public bool ToDownLoadCorrectPackagePre(IXUIButton button)
+ {
+ RuntimePlatform platform = Application.platform;
+ if ((int)platform != 8)
+ {
+ if ((int)platform == 11)
+ {
+ string @string = XSingleton<XStringTable>.singleton.GetString("XUPDATE_ERROR_VERSIONNOTMATCH_ANDROID_PRE_URL");
+ XSingleton<XDebug>.singleton.AddLog("AndroidAppStore Url: ", @string, null, null, null, null, XDebugColor.XDebug_None);
+ Application.OpenURL(@string);
+ }
+ }
+ else
+ {
+ string string2 = XSingleton<XStringTable>.singleton.GetString("XUPDATE_ERROR_VERSIONNOTMATCH_URL");
+ XSingleton<XDebug>.singleton.AddLog("AppStore Url: ", string2, null, null, null, null, XDebugColor.XDebug_None);
+ Application.OpenURL(string2);
+ }
+ return true;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/UiUtility.cs.meta b/Client/Assets/Scripts/XMainClient/UI/UiUtility.cs.meta
new file mode 100644
index 00000000..8bc079b8
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/UiUtility.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 270c9b56c2a368449838a16a42bd081f
+timeCreated: 1611403469
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/VoiceQAAudio.cs b/Client/Assets/Scripts/XMainClient/UI/VoiceQAAudio.cs
new file mode 100644
index 00000000..bc3d2f43
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/VoiceQAAudio.cs
@@ -0,0 +1,17 @@
+using System;
+
+namespace XMainClient.UI
+{
+ internal class VoiceQAAudio
+ {
+ public bool isTips;
+
+ public ulong audioID;
+
+ public float audioTime;
+
+ public VoiceQATipsType tipsType;
+
+ public float signTime;
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/VoiceQAAudio.cs.meta b/Client/Assets/Scripts/XMainClient/UI/VoiceQAAudio.cs.meta
new file mode 100644
index 00000000..6e84f615
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/VoiceQAAudio.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 334103efffd2287479f7534cb992509f
+timeCreated: 1611403551
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/VoiceQATipsType.cs b/Client/Assets/Scripts/XMainClient/UI/VoiceQATipsType.cs
new file mode 100644
index 00000000..45f76448
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/VoiceQATipsType.cs
@@ -0,0 +1,13 @@
+using System;
+
+namespace XMainClient.UI
+{
+ public enum VoiceQATipsType
+ {
+ WELCOME,
+ RIGHT,
+ START,
+ NEXT,
+ OVER
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/VoiceQATipsType.cs.meta b/Client/Assets/Scripts/XMainClient/UI/VoiceQATipsType.cs.meta
new file mode 100644
index 00000000..3c4d2104
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/VoiceQATipsType.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: aec5449b84de7624391c1de80ab0d303
+timeCreated: 1611404341
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/WebView.cs b/Client/Assets/Scripts/XMainClient/UI/WebView.cs
new file mode 100644
index 00000000..539c4bd7
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/WebView.cs
@@ -0,0 +1,439 @@
+using System;
+using System.Collections.Generic;
+using MiniJSON;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class WebView : DlgBase<WebView, WebViewBehaviour>
+ {
+ public override string fileName
+ {
+ get
+ {
+ return "GameSystem/PlatformAbility/WebViewDlg";
+ }
+ }
+
+ public override int layer
+ {
+ get
+ {
+ return 1;
+ }
+ }
+
+ public override bool autoload
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override bool hideMainMenu
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override bool pushstack
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override bool fullscreenui
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ private uint _network_token = 0u;
+
+ private uint _loading_token = 0u;
+
+ private bool _is_loading = false;
+
+ private XMainInterfaceDocument _doc = null;
+
+ protected override void Init()
+ {
+ base.Init();
+ this._doc = XDocuments.GetSpecificDocument<XMainInterfaceDocument>(XMainInterfaceDocument.uuID);
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ base.uiBehaviour.mCloseBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnClose));
+ base.uiBehaviour.mBackBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnBack));
+ base.uiBehaviour.mCheckLive.RegisterOnCheckEventHandler(new CheckBoxOnCheckEventHandler(this.OnModeChanged));
+ base.uiBehaviour.mCheckVideo.RegisterOnCheckEventHandler(new CheckBoxOnCheckEventHandler(this.OnModeChanged));
+ base.uiBehaviour.mCollect.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnCollectPage));
+ base.uiBehaviour.mTryAgain.RegisterLabelClickEventHandler(new LabelClickEventHandler(this.OnRetryLabel));
+ }
+
+ private void OnRedPointRefersh(bool show)
+ {
+ base.uiBehaviour.mRedPoint.SetVisible(show);
+ }
+
+ protected override void OnShow()
+ {
+ base.uiBehaviour.mVideoTitle.SetVisible(false);
+ base.uiBehaviour.mChoiceSp.SetVisible(true);
+ base.uiBehaviour.mRedPoint.SetVisible(false);
+ base.uiBehaviour.mTryAgainTip.SetVisible(false);
+ this._network_token = XSingleton<XTimerMgr>.singleton.SetTimer(1f, new XTimerMgr.ElapsedEventHandler(this.OnRefreshNetWorkStatus), null);
+ this.StartLoading();
+ base.uiBehaviour.mCheckLive.bChecked = true;
+ XSingleton<XChatIFlyMgr>.singleton.OnOpenWebView();
+ base.uiBehaviour.mBackBtn.SetVisible(false);
+ base.uiBehaviour.mCloseBtn.SetVisible(true);
+ this.SetNetWorkStatus(0);
+ }
+
+ protected override void OnHide()
+ {
+ base.OnHide();
+ XSingleton<XTimerMgr>.singleton.KillTimer(this._network_token);
+ this._network_token = 0u;
+ XSingleton<XTimerMgr>.singleton.KillTimer(this._loading_token);
+ this._loading_token = 0u;
+ this._is_loading = false;
+ }
+
+ private bool OnClose(IXUIButton btn)
+ {
+ XSingleton<XChatIFlyMgr>.singleton.OnCloseWebView();
+ this.SetVisible(false, true);
+ return true;
+ }
+
+ private bool OnBack(IXUIButton btn)
+ {
+ XSingleton<XChatIFlyMgr>.singleton.OnEvalWebViewJs("DNBackClick()");
+ return true;
+ }
+
+ private bool OnCollectPage(IXUIButton btn)
+ {
+ XSingleton<XChatIFlyMgr>.singleton.OnEvalWebViewJs("DNCollectClick()");
+ return true;
+ }
+
+ public bool OnModeChanged(IXUICheckBox box)
+ {
+ bool is_loading = this._is_loading;
+ bool result;
+ if (is_loading)
+ {
+ result = false;
+ }
+ else
+ {
+ bool bChecked = box.bChecked;
+ if (bChecked)
+ {
+ bool flag = box.ID == 1UL;
+ if (flag)
+ {
+ XSingleton<XDebug>.singleton.AddLog("Live click", null, null, null, null, null, XDebugColor.XDebug_None);
+ XSingleton<XChatIFlyMgr>.singleton.OnEvalWebViewJs("DNLiveClick()");
+ }
+ else
+ {
+ bool flag2 = box.ID == 2UL;
+ if (flag2)
+ {
+ XSingleton<XDebug>.singleton.AddLog("Video click", null, null, null, null, null, XDebugColor.XDebug_None);
+ XSingleton<XChatIFlyMgr>.singleton.OnEvalWebViewJs("DNVideoClick()");
+ }
+ }
+ }
+ result = true;
+ }
+ return result;
+ }
+
+ public void OnRetryLabel(IXUILabel label)
+ {
+ this.StartLoading();
+ XSingleton<XChatIFlyMgr>.singleton.OnRefreshWebViewShow(true);
+ }
+
+ public void OnShowDetail(string label)
+ {
+ base.uiBehaviour.mVideoTitle.SetVisible(true);
+ base.uiBehaviour.mVideoTitle.SetText(label);
+ base.uiBehaviour.mChoiceSp.SetVisible(false);
+ base.uiBehaviour.mBackBtn.SetVisible(true);
+ base.uiBehaviour.mCloseBtn.SetVisible(false);
+ }
+
+ public void SetNetWorkStatus(int status)
+ {
+ bool flag = status == 0;
+ if (flag)
+ {
+ base.uiBehaviour.mNetWorkStaus.SetVisible(false);
+ base.uiBehaviour.mNetWorkWifi.SetVisible(true);
+ }
+ else
+ {
+ bool flag2 = status == 1;
+ if (flag2)
+ {
+ base.uiBehaviour.mNetWorkStaus.SetVisible(true);
+ base.uiBehaviour.mNetWorkWifi.SetVisible(false);
+ base.uiBehaviour.mNetWorkStaus.SetSprite("xh_2");
+ }
+ else
+ {
+ base.uiBehaviour.mNetWorkStaus.SetVisible(true);
+ base.uiBehaviour.mNetWorkWifi.SetVisible(false);
+ base.uiBehaviour.mNetWorkStaus.SetSprite("xh_0");
+ }
+ }
+ }
+
+ public void OnRefreshNetWorkStatus(object obj)
+ {
+ int netWorkStatus = 0;
+ bool flag = Application.internetReachability == 0;
+ if (flag)
+ {
+ netWorkStatus = 2;
+ }
+ else
+ {
+ bool flag2 = (int)Application.internetReachability == 2;
+ if (flag2)
+ {
+ netWorkStatus = 0;
+ }
+ else
+ {
+ bool flag3 = (int)Application.internetReachability == 1;
+ if (flag3)
+ {
+ netWorkStatus = 1;
+ }
+ }
+ }
+ this.SetNetWorkStatus(netWorkStatus);
+ this._network_token = XSingleton<XTimerMgr>.singleton.SetTimer(1f, new XTimerMgr.ElapsedEventHandler(this.OnRefreshNetWorkStatus), null);
+ }
+
+ public void OnTabLive()
+ {
+ bool flag = base.IsVisible();
+ if (flag)
+ {
+ base.uiBehaviour.mCheckLive.bChecked = true;
+ }
+ }
+
+ private void StartLoading()
+ {
+ this._is_loading = true;
+ this._loading_token = XSingleton<XTimerMgr>.singleton.SetTimer(10f, new XTimerMgr.ElapsedEventHandler(this.OnLoadingFailed), null);
+ base.uiBehaviour.mLoading.SetVisible(true);
+ base.uiBehaviour.mTryAgainTip.SetVisible(false);
+ }
+
+ private void OnLoadingFailed(object obj)
+ {
+ this._is_loading = false;
+ base.uiBehaviour.mLoading.SetVisible(false);
+ base.uiBehaviour.mTryAgainTip.SetVisible(true);
+ }
+
+ public void OnLoadFinished()
+ {
+ base.uiBehaviour.mLoading.SetVisible(false);
+ this._is_loading = false;
+ XSingleton<XTimerMgr>.singleton.KillTimer(this._loading_token);
+ this._loading_token = 0u;
+ }
+
+ public void OnSetWebViewMenu(int menutype)
+ {
+ bool flag = !base.IsLoaded() || !base.IsVisible();
+ if (!flag)
+ {
+ bool flag2 = menutype == 0;
+ if (flag2)
+ {
+ base.uiBehaviour.mVideoTitle.SetVisible(false);
+ base.uiBehaviour.mChoiceSp.SetVisible(true);
+ }
+ else
+ {
+ base.uiBehaviour.mVideoTitle.SetVisible(true);
+ base.uiBehaviour.mChoiceSp.SetVisible(false);
+ base.uiBehaviour.mVideoTitle.SetText("");
+ base.uiBehaviour.mBackBtn.SetVisible(true);
+ base.uiBehaviour.mCloseBtn.SetVisible(false);
+ }
+ }
+ }
+
+ public void OnWebViewBackGame(int backtype)
+ {
+ bool flag = !base.IsLoaded() || !base.IsVisible();
+ if (!flag)
+ {
+ bool flag2 = backtype == 0;
+ if (flag2)
+ {
+ base.uiBehaviour.mVideoTitle.SetVisible(false);
+ base.uiBehaviour.mChoiceSp.SetVisible(true);
+ }
+ else
+ {
+ this.SetVisible(false, true);
+ }
+ }
+ }
+
+ public void OnWebViewRefershRefPoint(string jsonstr)
+ {
+ bool flag = !base.IsLoaded() || !base.IsVisible();
+ if (!flag)
+ {
+ object obj = Json.Deserialize(jsonstr);
+ Dictionary<string, object> dictionary = obj as Dictionary<string, object>;
+ bool flag2 = dictionary.ContainsKey("extendMenus");
+ if (flag2)
+ {
+ object obj2 = dictionary["extendMenus"];
+ List<object> list = obj2 as List<object>;
+ bool flag3 = list != null && list.Count > 0;
+ if (flag3)
+ {
+ Dictionary<string, object> dictionary2 = list[0] as Dictionary<string, object>;
+ bool flag4 = dictionary2 != null && dictionary2.ContainsKey("isRed");
+ if (flag4)
+ {
+ int num = 0;
+ int.TryParse(dictionary2["isRed"].ToString(), out num);
+ base.uiBehaviour.mRedPoint.SetVisible(num == 1);
+ }
+ }
+ }
+ }
+ }
+
+ public void OnWebViewSetheaderInfo(string jsonstr)
+ {
+ bool flag = !base.IsLoaded() || !base.IsVisible();
+ if (!flag)
+ {
+ this.OnWebViewRefershRefPoint(jsonstr);
+ object obj = Json.Deserialize(jsonstr);
+ Dictionary<string, object> dictionary = obj as Dictionary<string, object>;
+ bool flag2 = dictionary.ContainsKey("title");
+ if (flag2)
+ {
+ string text = dictionary["title"] as string;
+ bool flag3 = !string.IsNullOrEmpty(text);
+ if (flag3)
+ {
+ base.uiBehaviour.mVideoTitle.SetText(text);
+ base.uiBehaviour.mBackBtn.SetVisible(true);
+ base.uiBehaviour.mCloseBtn.SetVisible(false);
+ }
+ }
+ }
+ }
+
+ public void OnWebViewCloseLoading(int show)
+ {
+ bool flag = !base.IsLoaded() || !base.IsVisible();
+ if (!flag)
+ {
+ bool flag2 = show == 1;
+ if (flag2)
+ {
+ base.uiBehaviour.mLoading.SetVisible(true);
+ base.uiBehaviour.mTryAgainTip.SetVisible(false);
+ this._is_loading = true;
+ this._loading_token = XSingleton<XTimerMgr>.singleton.SetTimer(10f, new XTimerMgr.ElapsedEventHandler(this.OnLoadingFailed), null);
+ }
+ else
+ {
+ base.uiBehaviour.mLoading.SetVisible(false);
+ XSingleton<XTimerMgr>.singleton.KillTimer(this._loading_token);
+ this._loading_token = 0u;
+ this._is_loading = false;
+ }
+ }
+ }
+
+ public void OnWebViewShowReconnect(int show)
+ {
+ bool flag = !base.IsLoaded() || !base.IsVisible();
+ if (!flag)
+ {
+ bool flag2 = show == 1;
+ if (flag2)
+ {
+ base.uiBehaviour.mLoading.SetVisible(false);
+ base.uiBehaviour.mTryAgainTip.SetVisible(true);
+ }
+ else
+ {
+ base.uiBehaviour.mTryAgainTip.SetVisible(false);
+ }
+ }
+ }
+
+ public void OnScreenLock(bool islock)
+ {
+ bool flag = !base.IsLoaded() || !base.IsVisible();
+ if (!flag)
+ {
+ XSingleton<XChatIFlyMgr>.singleton.OnWebViewScreenLock(islock);
+ }
+ }
+
+ public void HandleScreenLock(string msg)
+ {
+ bool flag = !base.IsLoaded() || !base.IsVisible();
+ if (!flag)
+ {
+ XSingleton<XDebug>.singleton.AddLog("Screen lock: ", msg, null, null, null, null, XDebugColor.XDebug_None);
+ object obj = Json.Deserialize(msg);
+ Dictionary<string, object> dictionary = obj as Dictionary<string, object>;
+ bool flag2 = dictionary.ContainsKey("data");
+ if (flag2)
+ {
+ Dictionary<string, object> dictionary2 = dictionary["data"] as Dictionary<string, object>;
+ bool flag3 = dictionary2 != null;
+ if (flag3)
+ {
+ bool flag4 = dictionary2.ContainsKey("flag");
+ if (flag4)
+ {
+ bool flag5 = dictionary2["flag"].ToString() == "lock";
+ bool islock = flag5;
+ XSingleton<XDebug>.singleton.AddLog("Will eval screen lock: ", islock.ToString(), null, null, null, null, XDebugColor.XDebug_None);
+ XSingleton<XChatIFlyMgr>.singleton.OnWebViewScreenLock(islock);
+ }
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/WebView.cs.meta b/Client/Assets/Scripts/XMainClient/UI/WebView.cs.meta
new file mode 100644
index 00000000..f81388c2
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/WebView.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 603e19574c8a6984892d026ad910e024
+timeCreated: 1611403833
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/WebViewBehaviour.cs b/Client/Assets/Scripts/XMainClient/UI/WebViewBehaviour.cs
new file mode 100644
index 00000000..20c4c04a
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/WebViewBehaviour.cs
@@ -0,0 +1,56 @@
+using System;
+using UILib;
+using XMainClient.UI.UICommon;
+
+namespace XMainClient.UI
+{
+ internal class WebViewBehaviour : DlgBehaviourBase
+ {
+ public IXUIButton mCloseBtn;
+
+ public IXUIButton mBackBtn;
+
+ public IXUIButton mCollect;
+
+ public IXUICheckBox mCheckLive;
+
+ public IXUICheckBox mCheckVideo;
+
+ public IXUILabel mTryAgain;
+
+ public IXUILabel mTryAgainTip;
+
+ public IXUILabel mVideoTitle;
+
+ public IXUISprite mLoading;
+
+ public IXUISprite mChoiceSp;
+
+ public IXUISprite mRedPoint;
+
+ public IXUISprite mNetWorkStaus;
+
+ public IXUISprite mNetWorkWifi;
+
+ private void Awake()
+ {
+ this.mCloseBtn = (base.transform.Find("Bg/Close").GetComponent("XUIButton") as IXUIButton);
+ this.mCloseBtn.ID = 1UL;
+ this.mBackBtn = (base.transform.Find("Bg/Return").GetComponent("XUIButton") as IXUIButton);
+ this.mBackBtn.ID = 2UL;
+ this.mCollect = (base.transform.Find("Bg/Collect").GetComponent("XUIButton") as IXUIButton);
+ this.mCheckLive = (base.transform.Find("Bg/TabTpl/tab1/template/Bg").GetComponent("XUICheckBox") as IXUICheckBox);
+ this.mCheckLive.ID = 1UL;
+ this.mCheckVideo = (base.transform.Find("Bg/TabTpl/tab2/template/Bg").GetComponent("XUICheckBox") as IXUICheckBox);
+ this.mCheckVideo.ID = 2UL;
+ this.mTryAgain = (base.transform.Find("Bg/Tip/Again").GetComponent("XUILabel") as IXUILabel);
+ this.mTryAgainTip = (base.transform.Find("Bg/Tip").GetComponent("XUILabel") as IXUILabel);
+ this.mVideoTitle = (base.transform.Find("Bg/Title").GetComponent("XUILabel") as IXUILabel);
+ this.mChoiceSp = (base.transform.Find("Bg/TabTpl").GetComponent("XUISprite") as IXUISprite);
+ this.mRedPoint = (base.transform.Find("Bg/Collect/RedPoint").GetComponent("XUISprite") as IXUISprite);
+ this.mNetWorkStaus = (base.transform.Find("Bg/Sys4G").GetComponent("XUISprite") as IXUISprite);
+ this.mNetWorkWifi = (base.transform.Find("Bg/SysWifi").GetComponent("XUISprite") as IXUISprite);
+ this.mLoading = (base.transform.Find("Bg/loading").GetComponent("XUISprite") as IXUISprite);
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/WebViewBehaviour.cs.meta b/Client/Assets/Scripts/XMainClient/UI/WebViewBehaviour.cs.meta
new file mode 100644
index 00000000..e38a74ea
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/WebViewBehaviour.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: e5e75fdc12d7e2b4b88ad2c9be7bdbec
+timeCreated: 1611404744
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/WeddingEnterApplyBehaviour.cs b/Client/Assets/Scripts/XMainClient/UI/WeddingEnterApplyBehaviour.cs
new file mode 100644
index 00000000..588c2ce8
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/WeddingEnterApplyBehaviour.cs
@@ -0,0 +1,42 @@
+using System;
+using UILib;
+using XMainClient.UI.UICommon;
+
+namespace XMainClient.UI
+{
+ internal class WeddingEnterApplyBehaviour : DlgBehaviourBase
+ {
+ public IXUICheckBox m_ToggleEnter;
+
+ public IXUICheckBox m_ToggleApply;
+
+ public IXUIScrollView m_ScrollView;
+
+ public IXUIWrapContent m_WrapContent;
+
+ public IXUILabel m_EmptyList;
+
+ public IXUILabel m_EmptyList2;
+
+ public IXUIButton m_GoApplyTab;
+
+ public IXUIButton m_ClosedSpr;
+
+ public IXUILabel m_Title;
+
+ private void Awake()
+ {
+ this.m_ToggleEnter = (base.transform.Find("Bg/ToggleEnter").GetComponent("XUICheckBox") as IXUICheckBox);
+ this.m_ToggleApply = (base.transform.Find("Bg/ToggleApply").GetComponent("XUICheckBox") as IXUICheckBox);
+ this.m_ToggleEnter.ID = 0UL;
+ this.m_ToggleApply.ID = 1UL;
+ this.m_ScrollView = (base.transform.Find("Bg/Panel").GetComponent("XUIScrollView") as IXUIScrollView);
+ this.m_WrapContent = (base.transform.Find("Bg/Panel/WrapContent").GetComponent("XUIWrapContent") as IXUIWrapContent);
+ this.m_EmptyList = (base.transform.Find("Bg/Empty").GetComponent("XUILabel") as IXUILabel);
+ this.m_EmptyList2 = (base.transform.Find("Bg/Empty2").GetComponent("XUILabel") as IXUILabel);
+ this.m_GoApplyTab = (base.transform.Find("Bg/GoApply").GetComponent("XUIButton") as IXUIButton);
+ this.m_Title = (base.transform.Find("Bg/Title").GetComponent("XUILabel") as IXUILabel);
+ this.m_ClosedSpr = (base.transform.Find("Close").GetComponent("XUIButton") as IXUIButton);
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/WeddingEnterApplyBehaviour.cs.meta b/Client/Assets/Scripts/XMainClient/UI/WeddingEnterApplyBehaviour.cs.meta
new file mode 100644
index 00000000..a938d5b9
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/WeddingEnterApplyBehaviour.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 4f0bfe9ec97723e40a03198f047f45fb
+timeCreated: 1611403699
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/WeddingEnterApplyView.cs b/Client/Assets/Scripts/XMainClient/UI/WeddingEnterApplyView.cs
new file mode 100644
index 00000000..e4454cb7
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/WeddingEnterApplyView.cs
@@ -0,0 +1,290 @@
+using System;
+using System.Collections.Generic;
+using KKSG;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class WeddingEnterApplyView : DlgBase<WeddingEnterApplyView, WeddingEnterApplyBehaviour>
+ {
+ public override string fileName
+ {
+ get
+ {
+ return "GameSystem/Wedding/WeddingEnterApplyDlg";
+ }
+ }
+
+ public override int layer
+ {
+ get
+ {
+ return 1;
+ }
+ }
+
+ public override int group
+ {
+ get
+ {
+ return 1;
+ }
+ }
+
+ public override bool autoload
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ private int m_SelectedTab = -1;
+
+ private uint _CDToken = 0u;
+
+ private List<IXUILabel> m_TimeLabelList = new List<IXUILabel>();
+
+ private List<ulong> m_TimeInvID = new List<ulong>();
+
+ private Dictionary<ulong, uint> m_TimeDic = new Dictionary<ulong, uint>();
+
+ protected override void Init()
+ {
+ base.uiBehaviour.m_EmptyList.SetText(XSingleton<XStringTable>.singleton.GetString("WeddingEnterEmpty"));
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ base.uiBehaviour.m_ToggleEnter.RegisterOnCheckEventHandler(new CheckBoxOnCheckEventHandler(this._OnToggleChanged));
+ base.uiBehaviour.m_ToggleApply.RegisterOnCheckEventHandler(new CheckBoxOnCheckEventHandler(this._OnToggleChanged));
+ base.uiBehaviour.m_WrapContent.RegisterItemUpdateEventHandler(new WrapItemUpdateEventHandler(this._WrapContentItemUpdated));
+ base.uiBehaviour.m_ClosedSpr.RegisterClickEventHandler(new ButtonClickEventHandler(this._OnCloseClicked));
+ base.uiBehaviour.m_GoApplyTab.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnGoApplyTabClicked));
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ base.uiBehaviour.m_ToggleEnter.bChecked = true;
+ XWeddingDocument specificDocument = XDocuments.GetSpecificDocument<XWeddingDocument>(XWeddingDocument.uuID);
+ specificDocument.GetAllWeddingInfo();
+ }
+
+ protected override void OnHide()
+ {
+ base.OnHide();
+ XSingleton<XTimerMgr>.singleton.KillTimer(this._CDToken);
+ }
+
+ public override void StackRefresh()
+ {
+ XWeddingDocument specificDocument = XDocuments.GetSpecificDocument<XWeddingDocument>(XWeddingDocument.uuID);
+ specificDocument.GetAllWeddingInfo();
+ }
+
+ public void RefreshInfo()
+ {
+ bool flag = this.m_SelectedTab < 0;
+ if (!flag)
+ {
+ bool active = this.m_SelectedTab == 0 && this.GetCurrWeddingList().Count == 0;
+ base.uiBehaviour.m_EmptyList.gameObject.SetActive(active);
+ base.uiBehaviour.m_GoApplyTab.gameObject.SetActive(active);
+ bool active2 = this.m_SelectedTab == 1 && this.GetCurrWeddingList().Count == 0;
+ base.uiBehaviour.m_EmptyList2.gameObject.SetActive(active2);
+ this.StartTimer();
+ base.uiBehaviour.m_WrapContent.SetContentCount(this.GetCurrWeddingList().Count, false);
+ }
+ }
+
+ private List<WeddingBriefInfo> GetCurrWeddingList()
+ {
+ XWeddingDocument specificDocument = XDocuments.GetSpecificDocument<XWeddingDocument>(XWeddingDocument.uuID);
+ bool flag = this.m_SelectedTab == 0;
+ List<WeddingBriefInfo> result;
+ if (flag)
+ {
+ result = specificDocument.CanEnterWedding;
+ }
+ else
+ {
+ result = specificDocument.CanApplyWedding;
+ }
+ return result;
+ }
+
+ private void _WrapContentItemUpdated(Transform t, int index)
+ {
+ bool flag = this.m_SelectedTab < 0;
+ if (!flag)
+ {
+ bool flag2 = index >= this.GetCurrWeddingList().Count;
+ if (!flag2)
+ {
+ List<WeddingBriefInfo> currWeddingList = this.GetCurrWeddingList();
+ WeddingBriefInfo weddingBriefInfo = currWeddingList[index];
+ bool flag3 = weddingBriefInfo == null;
+ if (!flag3)
+ {
+ IXUILabel ixuilabel = t.Find("Name").GetComponent("XUILabel") as IXUILabel;
+ string @string = XStringDefineProxy.GetString((weddingBriefInfo.brief.type == WeddingType.WeddingType_Normal) ? "WeddingEnterApplyNameN" : "WeddingEnterApplyNameS", new object[]
+ {
+ weddingBriefInfo.brief.role1.name,
+ weddingBriefInfo.brief.role2.name
+ });
+ ixuilabel.SetText(@string);
+ IXUILabel ixuilabel2 = t.Find("Invited").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel2.SetText((this.m_SelectedTab == 0) ? XStringDefineProxy.GetString("WeddingEnterApplyType1") : XStringDefineProxy.GetString("WeddingEnterApplyType2"));
+ IXUIButton ixuibutton = t.Find("Invited/BtnInvite").GetComponent("XUIButton") as IXUIButton;
+ ixuibutton.ID = weddingBriefInfo.brief.weddingid;
+ ixuibutton.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnWeddingBtnClicked));
+ ixuilabel2.gameObject.SetActive(!weddingBriefInfo.isApply);
+ GameObject gameObject = t.Find("Bg2").gameObject;
+ gameObject.SetActive(weddingBriefInfo.isApply);
+ IXUILabel ixuilabel3 = t.Find("Time").GetComponent("XUILabel") as IXUILabel;
+ int num = this.m_TimeLabelList.IndexOf(ixuilabel3);
+ bool flag4 = num >= 0 && num < this.m_TimeInvID.Count;
+ if (flag4)
+ {
+ this.m_TimeInvID[num] = weddingBriefInfo.brief.weddingid;
+ }
+ else
+ {
+ this.m_TimeLabelList.Add(ixuilabel3);
+ this.m_TimeInvID.Add(weddingBriefInfo.brief.weddingid);
+ }
+ uint num2;
+ bool flag5 = this.m_TimeDic.TryGetValue(weddingBriefInfo.brief.weddingid, out num2);
+ if (flag5)
+ {
+ bool flag6 = num2 > 0u;
+ if (flag6)
+ {
+ ixuilabel3.SetText(XSingleton<UiUtility>.singleton.TimeFormatString((int)num2, 2, 3, 4, false, true));
+ }
+ else
+ {
+ ixuilabel3.SetText(XSingleton<XStringTable>.singleton.GetString("WeddingEnterApplyEnd"));
+ }
+ }
+ }
+ }
+ }
+ }
+
+ public void StartTimer()
+ {
+ bool flag = !base.IsVisible();
+ if (!flag)
+ {
+ this.m_TimeLabelList.Clear();
+ this.m_TimeInvID.Clear();
+ this.m_TimeDic.Clear();
+ List<WeddingBriefInfo> currWeddingList = this.GetCurrWeddingList();
+ for (int i = 0; i < currWeddingList.Count; i++)
+ {
+ this.m_TimeDic[currWeddingList[i].brief.weddingid] = currWeddingList[i].brief.lefttime;
+ }
+ XSingleton<XTimerMgr>.singleton.KillTimer(this._CDToken);
+ this._CDToken = XSingleton<XTimerMgr>.singleton.SetTimer(1f, new XTimerMgr.ElapsedEventHandler(this.LeftTimeUpdate), null);
+ }
+ }
+
+ private void LeftTimeUpdate(object o)
+ {
+ List<WeddingBriefInfo> currWeddingList = this.GetCurrWeddingList();
+ for (int i = 0; i < currWeddingList.Count; i++)
+ {
+ bool flag = currWeddingList[i].brief.lefttime > 0u;
+ if (flag)
+ {
+ WeddingBrief brief = currWeddingList[i].brief;
+ uint lefttime = brief.lefttime;
+ brief.lefttime = lefttime - 1u;
+ }
+ this.m_TimeDic[currWeddingList[i].brief.weddingid] = currWeddingList[i].brief.lefttime;
+ int num = this.m_TimeInvID.IndexOf(currWeddingList[i].brief.weddingid);
+ bool flag2 = num >= 0 && num < this.m_TimeLabelList.Count;
+ if (flag2)
+ {
+ IXUILabel ixuilabel = this.m_TimeLabelList[num];
+ bool flag3 = ixuilabel.IsVisible();
+ if (flag3)
+ {
+ bool flag4 = currWeddingList[i].brief.lefttime > 0u;
+ if (flag4)
+ {
+ ixuilabel.SetText(XSingleton<UiUtility>.singleton.TimeFormatString((int)currWeddingList[i].brief.lefttime, 2, 3, 4, false, true));
+ }
+ else
+ {
+ ixuilabel.SetText(XSingleton<XStringTable>.singleton.GetString("WeddingEnterApplyEnd"));
+ }
+ }
+ }
+ }
+ XSingleton<XTimerMgr>.singleton.KillTimer(this._CDToken);
+ this._CDToken = XSingleton<XTimerMgr>.singleton.SetTimer(1f, new XTimerMgr.ElapsedEventHandler(this.LeftTimeUpdate), null);
+ }
+
+ private bool OnWeddingBtnClicked(IXUIButton btn)
+ {
+ ulong id = btn.ID;
+ XWeddingDocument specificDocument = XDocuments.GetSpecificDocument<XWeddingDocument>(XWeddingDocument.uuID);
+ bool flag = this.m_SelectedTab == 0;
+ if (flag)
+ {
+ specificDocument.EnterWedding(id);
+ }
+ else
+ {
+ specificDocument.WeddingInviteOperate(WeddingInviteOperType.Wedding_Apply, XSingleton<XAttributeMgr>.singleton.XPlayerData.RoleID, id);
+ this.UpdateApplyBtnState(btn);
+ }
+ return true;
+ }
+
+ public void UpdateApplyBtnState(IXUIButton btn)
+ {
+ GameObject gameObject = btn.gameObject.transform.parent.parent.Find("Bg2").gameObject;
+ gameObject.SetActive(true);
+ btn.gameObject.transform.parent.gameObject.SetActive(false);
+ }
+
+ private bool OnGoApplyTabClicked(IXUIButton btn)
+ {
+ base.uiBehaviour.m_ToggleApply.bChecked = true;
+ return true;
+ }
+
+ private bool _OnCloseClicked(IXUIButton iSp)
+ {
+ this.SetVisible(false, true);
+ return true;
+ }
+
+ private bool _OnToggleChanged(IXUICheckBox go)
+ {
+ bool flag = !go.bChecked;
+ bool result;
+ if (flag)
+ {
+ result = true;
+ }
+ else
+ {
+ this.m_SelectedTab = (int)go.ID;
+ base.uiBehaviour.m_Title.SetText((this.m_SelectedTab == 0) ? XStringDefineProxy.GetString("WeddingEnterApplyTab1") : XStringDefineProxy.GetString("WeddingEnterApplyTab2"));
+ XWeddingDocument specificDocument = XDocuments.GetSpecificDocument<XWeddingDocument>(XWeddingDocument.uuID);
+ specificDocument.GetAllWeddingInfo();
+ result = true;
+ }
+ return result;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/WeddingEnterApplyView.cs.meta b/Client/Assets/Scripts/XMainClient/UI/WeddingEnterApplyView.cs.meta
new file mode 100644
index 00000000..aa73efca
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/WeddingEnterApplyView.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: f68381fbc7cfd024b88722841902d3ab
+timeCreated: 1611404882
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/WeddingInviteTab.cs b/Client/Assets/Scripts/XMainClient/UI/WeddingInviteTab.cs
new file mode 100644
index 00000000..76b6863e
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/WeddingInviteTab.cs
@@ -0,0 +1,12 @@
+using System;
+
+namespace XMainClient.UI
+{
+ public enum WeddingInviteTab
+ {
+ WeddingFriends,
+ WeddingGuild,
+ WeddingInvited,
+ WeddingApplyList
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/WeddingInviteTab.cs.meta b/Client/Assets/Scripts/XMainClient/UI/WeddingInviteTab.cs.meta
new file mode 100644
index 00000000..a2bae78e
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/WeddingInviteTab.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 9e09d5e0e5f421d408fbadb0ee306479
+timeCreated: 1611404239
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/WeddingSceneHandler.cs b/Client/Assets/Scripts/XMainClient/UI/WeddingSceneHandler.cs
new file mode 100644
index 00000000..e7c0be48
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/WeddingSceneHandler.cs
@@ -0,0 +1,581 @@
+using System;
+using System.Collections.Generic;
+using KKSG;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class WeddingSceneHandler : DlgHandlerBase
+ {
+ protected override string FileName
+ {
+ get
+ {
+ return "GameSystem/Wedding/WeddingSceneHandler";
+ }
+ }
+
+ private IXUIButton m_exitHomeBtn;
+
+ private IXUIButton m_FlowerBtn;
+
+ private GameObject m_FlowerCD;
+
+ private IXUILabel m_FlowerCDTime;
+
+ private IXUIButton m_FireworksBtn;
+
+ private GameObject m_FireworksCD;
+
+ private IXUILabel m_FireworksCDTime;
+
+ private IXUIButton m_SwearBtn;
+
+ private IXUIButton m_InviteFriendsBtn;
+
+ private IXUILabel m_Happiness;
+
+ private IXUILabel m_HappinessMax;
+
+ private IXUILabel m_Content;
+
+ private IXUILabel m_WeddingName;
+
+ private IXUIList m_BtnsGrid;
+
+ private IXUISprite m_HappinessBtn;
+
+ private GameObject m_SwearDlg;
+
+ private IXUIButton m_AskSwearBtn;
+
+ private IXUILabel m_HappinessValue;
+
+ private IXUIButton m_CloseSwearBtn;
+
+ private GameObject m_SwearFX;
+
+ private GameObject m_InviteRedPoint;
+
+ private IXUILabel m_Tip1;
+
+ private IXUILabel m_Tip2;
+
+ private XFx m_Fireworks;
+
+ private XFx m_Candy;
+
+ private uint m_Tip1CDToken;
+
+ private string m_Tip1Content;
+
+ private bool m_UpdateTip2 = false;
+
+ private int m_FlowerTime = 0;
+
+ private int m_FireworksTime = 0;
+
+ private uint _CDTokenFlower = 0u;
+
+ private uint _CDTokenFireworks = 0u;
+
+ private List<uint> m_vecGuestShowTime = new List<uint>();
+
+ private int m_guestIndex = 0;
+
+ private uint m_weddingRunTime = 0u;
+
+ private bool m_HasVows = false;
+
+ private bool m_HasShowVows = false;
+
+ protected override void Init()
+ {
+ this.m_exitHomeBtn = (base.PanelObject.transform.Find("ExitHome").GetComponent("XUIButton") as IXUIButton);
+ this.m_Happiness = (base.PanelObject.transform.Find("Happiness/Value").GetComponent("XUILabel") as IXUILabel);
+ this.m_HappinessMax = (base.PanelObject.transform.Find("Happiness/Max").GetComponent("XUILabel") as IXUILabel);
+ this.m_HappinessBtn = (base.PanelObject.transform.Find("Happiness/P").GetComponent("XUISprite") as IXUISprite);
+ this.m_FlowerBtn = (base.PanelObject.transform.Find("Grid/SysAFlower").GetComponent("XUIButton") as IXUIButton);
+ this.m_FlowerCDTime = (base.PanelObject.transform.Find("Grid/SysAFlower/Mask/time").GetComponent("XUILabel") as IXUILabel);
+ this.m_FlowerCD = base.PanelObject.transform.Find("Grid/SysAFlower/Mask").gameObject;
+ this.m_FlowerCD.SetActive(false);
+ this.m_FireworksBtn = (base.PanelObject.transform.Find("Grid/SysBFireworks").GetComponent("XUIButton") as IXUIButton);
+ this.m_FireworksCDTime = (base.PanelObject.transform.Find("Grid/SysBFireworks/Mask/time").GetComponent("XUILabel") as IXUILabel);
+ this.m_FireworksCD = base.PanelObject.transform.Find("Grid/SysBFireworks/Mask").gameObject;
+ this.m_FireworksCD.SetActive(false);
+ this.m_SwearBtn = (base.PanelObject.transform.Find("Grid/SysDSwear").GetComponent("XUIButton") as IXUIButton);
+ this.m_InviteFriendsBtn = (base.PanelObject.transform.Find("Grid/SysCInvite").GetComponent("XUIButton") as IXUIButton);
+ this.m_InviteRedPoint = base.PanelObject.transform.Find("Grid/SysCInvite/RedPoint").gameObject;
+ this.m_WeddingName = (base.PanelObject.transform.Find("Name").GetComponent("XUILabel") as IXUILabel);
+ this.m_BtnsGrid = (base.PanelObject.transform.Find("Grid").GetComponent("XUIList") as IXUIList);
+ this.m_SwearFX = base.PanelObject.transform.Find("Grid/SysDSwear/FX").gameObject;
+ this.m_SwearDlg = base.PanelObject.transform.Find("SwearDlg").gameObject;
+ this.m_AskSwearBtn = (base.PanelObject.transform.Find("SwearDlg/Bg/OK").GetComponent("XUIButton") as IXUIButton);
+ this.m_CloseSwearBtn = (base.PanelObject.transform.Find("SwearDlg/Bg/Close").GetComponent("XUIButton") as IXUIButton);
+ this.m_HappinessValue = (base.PanelObject.transform.Find("SwearDlg/Bg/Happiness/Value").GetComponent("XUILabel") as IXUILabel);
+ this.m_Content = (base.PanelObject.transform.Find("SwearDlg/Bg/Label").GetComponent("XUILabel") as IXUILabel);
+ this.m_SwearDlg.gameObject.SetActive(false);
+ this.m_Tip1 = (base.PanelObject.transform.Find("Tip1").GetComponent("XUILabel") as IXUILabel);
+ this.m_Tip1.gameObject.SetActive(false);
+ this.m_Tip2 = (base.PanelObject.transform.Find("Tip2").GetComponent("XUILabel") as IXUILabel);
+ this.m_Tip2.gameObject.SetActive(false);
+ base.Init();
+ }
+
+ public override void RegisterEvent()
+ {
+ this.m_exitHomeBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnClickExitHome));
+ this.m_FlowerBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnClickFlowerBtn));
+ this.m_FireworksBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnClickFireworksBtn));
+ this.m_SwearBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnClickSwearBtn));
+ this.m_InviteFriendsBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnClickInviteFriendsBtn));
+ this.m_AskSwearBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnAskSwearBtn));
+ this.m_CloseSwearBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnCloseSwear));
+ this.m_HappinessBtn.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnHappinessClick));
+ base.RegisterEvent();
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ this.m_HappinessMax.SetText(string.Format("/{0}", XSingleton<XGlobalConfig>.singleton.GetValue("WeddingMaxHappyness")));
+ this.m_vecGuestShowTime = XSingleton<XGlobalConfig>.singleton.GetUIntList("WeddingGuestShowTime");
+ this.m_weddingRunTime = uint.Parse(XSingleton<XGlobalConfig>.singleton.GetValue("WeddingRunningTime"));
+ this.m_Content.SetText(XSingleton<UiUtility>.singleton.ReplaceReturn(XSingleton<XStringTable>.singleton.GetString("WeddingSwearTip")));
+ bool flag = XWeddingDocument.Doc.CurrWeddingInfo != null && XWeddingDocument.Doc.CurrWeddingInfo.role1 != null && XWeddingDocument.Doc.CurrWeddingInfo.role2 != null;
+ if (flag)
+ {
+ this.m_WeddingName.SetText(XStringDefineProxy.GetString("WeddingName", new object[]
+ {
+ XWeddingDocument.Doc.CurrWeddingInfo.role1.name,
+ XWeddingDocument.Doc.CurrWeddingInfo.role2.name
+ }));
+ this.m_SwearBtn.gameObject.SetActive(this.IsWeddingLover());
+ this.m_InviteFriendsBtn.gameObject.SetActive(this.IsWeddingLover());
+ this.m_BtnsGrid.Refresh();
+ }
+ this.m_FlowerCD.SetActive(false);
+ this.m_FireworksCD.SetActive(false);
+ this.m_HasVows = false;
+ this.m_SwearFX.SetActive(false);
+ this.m_InviteRedPoint.SetActive(XWeddingDocument.Doc.HasApplyCandidate);
+ this.m_HasShowVows = false;
+ }
+
+ private bool IsWeddingLover()
+ {
+ bool flag = XWeddingDocument.Doc.CurrWeddingInfo != null && XWeddingDocument.Doc.CurrWeddingInfo.role1 != null && XWeddingDocument.Doc.CurrWeddingInfo.role2 != null;
+ bool result;
+ if (flag)
+ {
+ ulong roleID = XSingleton<XAttributeMgr>.singleton.XPlayerData.RoleID;
+ result = (roleID == XWeddingDocument.Doc.CurrWeddingInfo.role1.roleid || roleID == XWeddingDocument.Doc.CurrWeddingInfo.role2.roleid);
+ }
+ else
+ {
+ result = false;
+ }
+ return result;
+ }
+
+ protected override void OnHide()
+ {
+ base.OnHide();
+ bool flag = this.m_Fireworks != null;
+ if (flag)
+ {
+ XSingleton<XFxMgr>.singleton.DestroyFx(this.m_Fireworks, true);
+ this.m_Fireworks = null;
+ }
+ bool flag2 = this.m_Candy != null;
+ if (flag2)
+ {
+ XSingleton<XFxMgr>.singleton.DestroyFx(this.m_Candy, true);
+ this.m_Candy = null;
+ }
+ XSingleton<XTimerMgr>.singleton.KillTimer(this.m_Tip1CDToken);
+ XSingleton<XTimerMgr>.singleton.KillTimer(this._CDTokenFlower);
+ XSingleton<XTimerMgr>.singleton.KillTimer(this._CDTokenFireworks);
+ }
+
+ private bool OnClickExitHome(IXUIButton btn)
+ {
+ XSingleton<XScene>.singleton.ReqLeaveScene();
+ return true;
+ }
+
+ private bool OnClickFlowerBtn(IXUIButton btn)
+ {
+ DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.SetVisible(true, true);
+ DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.SetSingleButtonMode(false);
+ string[] andSeparateValue = XSingleton<XGlobalConfig>.singleton.GetAndSeparateValue("WeddingFlowerCost", XGlobalConfig.SequenceSeparator);
+ uint num = uint.Parse(andSeparateValue[1]) * XWeddingDocument.Doc.AllAttendPlayerCount;
+ string text = "";
+ ItemList.RowData itemConf = XBagDocument.GetItemConf(int.Parse(andSeparateValue[0]));
+ bool flag = itemConf != null;
+ if (flag)
+ {
+ text = XSingleton<UiUtility>.singleton.ChooseProfString(itemConf.ItemName, 0u);
+ }
+ string mainLabel = string.Format(XStringDefineProxy.GetString("WeddingFlowerTip", new object[]
+ {
+ num,
+ text
+ }), new object[0]);
+ string @string = XStringDefineProxy.GetString(XStringDefine.COMMON_OK);
+ string string2 = XStringDefineProxy.GetString(XStringDefine.COMMON_CANCEL);
+ DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.SetLabelsWithSymbols(mainLabel, @string, string2);
+ DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.SetModalCallback(new ButtonClickEventHandler(this.EnsureFlower), null);
+ return true;
+ }
+
+ private bool EnsureFlower(IXUIButton btn)
+ {
+ DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.SetVisible(false, true);
+ XWeddingDocument.Doc.WeddingSceneOperator(WeddingOperType.WeddingOper_Flower);
+ return true;
+ }
+
+ public void RefreshInviteRedPoint()
+ {
+ this.m_InviteRedPoint.SetActive(XWeddingDocument.Doc.HasApplyCandidate);
+ }
+
+ public void OnFlowerRain()
+ {
+ Transform transform = XSingleton<UIManager>.singleton.UIRoot.Find("Camera").transform;
+ string value = XSingleton<XGlobalConfig>.singleton.GetValue("WeddingFlowerFxPath");
+ XFx xfx = XSingleton<XFxMgr>.singleton.CreateUIFx(value, transform, false);
+ xfx.DelayDestroy = 3f;
+ XSingleton<XFxMgr>.singleton.DestroyFx(xfx, false);
+ }
+
+ private bool OnClickFireworksBtn(IXUIButton btn)
+ {
+ DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.SetVisible(true, true);
+ DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.SetSingleButtonMode(false);
+ string[] andSeparateValue = XSingleton<XGlobalConfig>.singleton.GetAndSeparateValue("WeddingFireworksCost", XGlobalConfig.SequenceSeparator);
+ uint num = uint.Parse(andSeparateValue[1]) * XWeddingDocument.Doc.AllAttendPlayerCount;
+ string text = "";
+ ItemList.RowData itemConf = XBagDocument.GetItemConf(int.Parse(andSeparateValue[0]));
+ bool flag = itemConf != null;
+ if (flag)
+ {
+ text = XSingleton<UiUtility>.singleton.ChooseProfString(itemConf.ItemName, 0u);
+ }
+ string mainLabel = string.Format(XStringDefineProxy.GetString("WeddingFireworksTip", new object[]
+ {
+ num,
+ text
+ }), new object[0]);
+ string @string = XStringDefineProxy.GetString(XStringDefine.COMMON_OK);
+ string string2 = XStringDefineProxy.GetString(XStringDefine.COMMON_CANCEL);
+ DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.SetLabelsWithSymbols(mainLabel, @string, string2);
+ DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.SetModalCallback(new ButtonClickEventHandler(this.EnsureFireworks), null);
+ return true;
+ }
+
+ private bool EnsureFireworks(IXUIButton btn)
+ {
+ DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.SetVisible(false, true);
+ XWeddingDocument.Doc.WeddingSceneOperator(WeddingOperType.WeddingOper_Fireworks);
+ return true;
+ }
+
+ public void OnFireworks()
+ {
+ bool flag = this.m_Fireworks != null;
+ if (flag)
+ {
+ XSingleton<XFxMgr>.singleton.DestroyFx(this.m_Fireworks, true);
+ }
+ Transform transform = XSingleton<UIManager>.singleton.UIRoot.Find("Camera").transform;
+ string value = XSingleton<XGlobalConfig>.singleton.GetValue("WeddingFireworksPath");
+ this.m_Fireworks = XSingleton<XFxMgr>.singleton.CreateUIFx(value, transform, false);
+ }
+
+ public void OnCandyFx()
+ {
+ bool flag = this.m_Candy != null;
+ if (flag)
+ {
+ XSingleton<XFxMgr>.singleton.DestroyFx(this.m_Candy, true);
+ }
+ Transform transform = XSingleton<UIManager>.singleton.UIRoot.Find("Camera").transform;
+ string value = XSingleton<XGlobalConfig>.singleton.GetValue("WeddingCandyPath");
+ this.m_Candy = XSingleton<XFxMgr>.singleton.CreateUIFx(value, transform, false);
+ }
+
+ private bool OnClickSwearBtn(IXUIButton btn)
+ {
+ this.m_SwearDlg.SetActive(true);
+ return true;
+ }
+
+ public void CoolDownBtn(WeddingOperType type)
+ {
+ if (type != WeddingOperType.WeddingOper_Flower)
+ {
+ if (type == WeddingOperType.WeddingOper_Fireworks)
+ {
+ this.m_FireworksTime = XSingleton<XGlobalConfig>.singleton.GetInt("WeddingFireworksCD");
+ this.m_FireworksCDTime.SetText(this.m_FireworksTime.ToString());
+ this.m_FireworksCD.SetActive(true);
+ this.StarFireworksTimer();
+ }
+ }
+ else
+ {
+ this.m_FlowerTime = XSingleton<XGlobalConfig>.singleton.GetInt("WeddingFlowCD");
+ this.m_FlowerCDTime.SetText(this.m_FlowerTime.ToString());
+ this.m_FlowerCD.SetActive(true);
+ this.StarFlowerTimer();
+ }
+ }
+
+ private void StarFlowerTimer()
+ {
+ bool flag = !base.IsVisible();
+ if (!flag)
+ {
+ XSingleton<XTimerMgr>.singleton.KillTimer(this._CDTokenFlower);
+ this._CDTokenFlower = XSingleton<XTimerMgr>.singleton.SetTimer(1f, new XTimerMgr.ElapsedEventHandler(this.LeftTimeUpdateFlower), null);
+ }
+ }
+
+ private void StarFireworksTimer()
+ {
+ bool flag = !base.IsVisible();
+ if (!flag)
+ {
+ XSingleton<XTimerMgr>.singleton.KillTimer(this._CDTokenFireworks);
+ this._CDTokenFireworks = XSingleton<XTimerMgr>.singleton.SetTimer(1f, new XTimerMgr.ElapsedEventHandler(this.LeftTimeUpdateFireworks), null);
+ }
+ }
+
+ private void LeftTimeUpdateFlower(object o)
+ {
+ this.m_FlowerTime--;
+ XSingleton<XTimerMgr>.singleton.KillTimer(this._CDTokenFlower);
+ bool flag = this.m_FlowerTime <= 0;
+ if (flag)
+ {
+ this.m_FlowerCD.SetActive(false);
+ }
+ else
+ {
+ this.m_FlowerCDTime.SetText(this.m_FlowerTime.ToString());
+ this._CDTokenFlower = XSingleton<XTimerMgr>.singleton.SetTimer(1f, new XTimerMgr.ElapsedEventHandler(this.LeftTimeUpdateFlower), null);
+ }
+ }
+
+ private void LeftTimeUpdateFireworks(object o)
+ {
+ this.m_FireworksTime--;
+ XSingleton<XTimerMgr>.singleton.KillTimer(this._CDTokenFireworks);
+ bool flag = this.m_FireworksTime <= 0;
+ if (flag)
+ {
+ this.m_FireworksCD.SetActive(false);
+ }
+ else
+ {
+ this.m_FireworksCDTime.SetText(this.m_FireworksTime.ToString());
+ this._CDTokenFireworks = XSingleton<XTimerMgr>.singleton.SetTimer(1f, new XTimerMgr.ElapsedEventHandler(this.LeftTimeUpdateFireworks), null);
+ }
+ }
+
+ private bool OnClickInviteFriendsBtn(IXUIButton btn)
+ {
+ DlgBase<XWeddingInviteView, XWeddingInviteBehavior>.singleton.SetVisibleWithAnimation(true, null);
+ return true;
+ }
+
+ public void ShowPartnerSwearNtf(string name)
+ {
+ DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.SetVisible(true, true);
+ DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.SetSingleButtonMode(false);
+ string @string = XStringDefineProxy.GetString("WeddingSwearTitle");
+ string mainLabel = string.Format(XSingleton<UiUtility>.singleton.ReplaceReturn(XSingleton<XStringTable>.singleton.GetString("WeddingSwearContent")), name);
+ string string2 = XStringDefineProxy.GetString(XStringDefine.COMMON_OK);
+ string string3 = XStringDefineProxy.GetString("WeddingSwearCancel");
+ DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.SetTitle(@string);
+ DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.SetLabelsWithSymbols(mainLabel, string2, string3);
+ DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.SetModalCallback(new ButtonClickEventHandler(this.EnsureSwear), new ButtonClickEventHandler(this.NotEnsureSwear));
+ }
+
+ private bool EnsureSwear(IXUIButton btn)
+ {
+ XWeddingDocument.Doc.WeddingSceneOperator(WeddingOperType.WeddingOper_AgreeVows);
+ DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.SetVisible(false, true);
+ return true;
+ }
+
+ private bool NotEnsureSwear(IXUIButton btn)
+ {
+ XWeddingDocument.Doc.WeddingSceneOperator(WeddingOperType.WeddingOper_DisAgreeVows);
+ DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.SetVisible(false, true);
+ return true;
+ }
+
+ private bool OnAskSwearBtn(IXUIButton btn)
+ {
+ XWeddingDocument.Doc.WeddingSceneOperator(WeddingOperType.WeddingOper_ApplyVows);
+ return true;
+ }
+
+ public void ApplyVowsSuss()
+ {
+ bool activeSelf = this.m_SwearDlg.activeSelf;
+ if (activeSelf)
+ {
+ this.m_SwearDlg.SetActive(false);
+ }
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString("WeddingSwearSucc"), "fece00");
+ }
+
+ private bool OnCloseSwear(IXUIButton btn)
+ {
+ this.m_SwearDlg.SetActive(false);
+ return true;
+ }
+
+ public void UpdateHappiness(uint happiness)
+ {
+ bool flag = (ulong)happiness >= (ulong)((long)XSingleton<XGlobalConfig>.singleton.GetInt("WeddingMaxHappyness")) && !this.m_HasVows && this.IsWeddingLover() && !this.m_HasShowVows;
+ if (flag)
+ {
+ this.OnSwearPop();
+ this.m_SwearFX.SetActive(true);
+ this.m_HasShowVows = true;
+ }
+ this.m_HappinessValue.SetText(happiness.ToString());
+ this.m_Happiness.SetText(happiness.ToString());
+ }
+
+ public void OnVowsPrepare()
+ {
+ this.m_HasVows = true;
+ bool flag = this.IsWeddingLover();
+ if (flag)
+ {
+ this.m_SwearFX.SetActive(false);
+ }
+ }
+
+ public void UpdateWeddingState(WeddingState state, uint lefttime, bool vows)
+ {
+ this.m_HasVows = vows;
+ XSingleton<XDebug>.singleton.AddLog("weddingstate:" + state.ToString() + ", lefttime:" + lefttime.ToString(), null, null, null, null, null, XDebugColor.XDebug_None);
+ WeddingState weddingState = state;
+ if (weddingState != WeddingState.WeddingState_Prepare)
+ {
+ if (weddingState == WeddingState.WeddingState_Running)
+ {
+ this.m_Tip1Content = "WeddingState2";
+ this.m_UpdateTip2 = true;
+ XSingleton<XTimerMgr>.singleton.KillTimer(this.m_Tip1CDToken);
+ this.m_Tip1CDToken = XSingleton<XTimerMgr>.singleton.SetTimer(1f, new XTimerMgr.ElapsedEventHandler(this.LeftTime1Update), lefttime);
+ this.SetTipTime(this.m_Tip1, lefttime, this.m_Tip1Content);
+ this.CheckGuestShow(lefttime);
+ }
+ }
+ else
+ {
+ this.m_Tip1Content = "WeddingState1";
+ this.m_UpdateTip2 = false;
+ XSingleton<XTimerMgr>.singleton.KillTimer(this.m_Tip1CDToken);
+ this.m_Tip1CDToken = XSingleton<XTimerMgr>.singleton.SetTimer(1f, new XTimerMgr.ElapsedEventHandler(this.LeftTime1Update), lefttime);
+ this.SetTipTime(this.m_Tip1, lefttime, this.m_Tip1Content);
+ bool flag = this.IsWeddingLover();
+ if (flag)
+ {
+ this.m_Tip2.SetText(XStringDefineProxy.GetString("WeddingState4"));
+ this.m_Tip2.gameObject.SetActive(true);
+ }
+ }
+ }
+
+ private void LeftTime1Update(object o)
+ {
+ uint num = (uint)o - 1u;
+ this.SetTipTime(this.m_Tip1, num, this.m_Tip1Content);
+ bool updateTip = this.m_UpdateTip2;
+ if (updateTip)
+ {
+ this.CheckGuestShow(num);
+ }
+ XSingleton<XTimerMgr>.singleton.KillTimer(this.m_Tip1CDToken);
+ bool flag = num > 0u;
+ if (flag)
+ {
+ this.m_Tip1CDToken = XSingleton<XTimerMgr>.singleton.SetTimer(1f, new XTimerMgr.ElapsedEventHandler(this.LeftTime1Update), num);
+ }
+ }
+
+ private void CheckGuestShow(uint weddingLeftTime)
+ {
+ bool flag = this.m_guestIndex >= this.m_vecGuestShowTime.Count;
+ if (!flag)
+ {
+ uint num = this.m_weddingRunTime - weddingLeftTime;
+ uint num2 = this.m_vecGuestShowTime[this.m_guestIndex];
+ uint time = (num2 > num) ? (num2 - num) : 0u;
+ this.SetTipTime(this.m_Tip2, time, "WeddingState3");
+ bool flag2 = num2 <= num;
+ if (flag2)
+ {
+ this.m_guestIndex++;
+ }
+ }
+ }
+
+ private void SetTipTime(IXUILabel label, uint time, string content)
+ {
+ bool flag = time > 0u && time < 60u;
+ if (flag)
+ {
+ label.SetText(XStringDefineProxy.GetString(content, new object[]
+ {
+ time,
+ XSingleton<XStringTable>.singleton.GetString("SECOND_DUARATION")
+ }));
+ }
+ else
+ {
+ uint num = time / 60u;
+ label.SetText(XStringDefineProxy.GetString(content, new object[]
+ {
+ num,
+ XSingleton<XStringTable>.singleton.GetString("MINUTE_DUARATION")
+ }));
+ }
+ label.gameObject.SetActive(time > 0u);
+ }
+
+ private void OnHappinessClick(IXUISprite btn)
+ {
+ DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.SetVisible(true, true);
+ DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.SetSingleButtonMode(true);
+ string @string = XStringDefineProxy.GetString("WeddingHappinessTitle");
+ string mainLabel = string.Format(XSingleton<UiUtility>.singleton.ReplaceReturn(XSingleton<XStringTable>.singleton.GetString("WeddingHappinessContent")), new object[0]);
+ DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.SetTitle(@string);
+ DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.SetLabelsWithSymbols(mainLabel, XStringDefineProxy.GetString(XStringDefine.COMMON_OK), XStringDefineProxy.GetString(XStringDefine.COMMON_OK));
+ DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.SetModalCallback(new ButtonClickEventHandler(this.CloseHappinessDlg), null);
+ }
+
+ private bool CloseHappinessDlg(IXUIButton btn)
+ {
+ DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.SetVisible(false, true);
+ return true;
+ }
+
+ public void OnSwearPop()
+ {
+ this.m_SwearDlg.SetActive(true);
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/WeddingSceneHandler.cs.meta b/Client/Assets/Scripts/XMainClient/UI/WeddingSceneHandler.cs.meta
new file mode 100644
index 00000000..1d92df88
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/WeddingSceneHandler.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: c63c7e9eb33517140a5f25ab444902dc
+timeCreated: 1611404508
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/WeekNestDlg.cs b/Client/Assets/Scripts/XMainClient/UI/WeekNestDlg.cs
new file mode 100644
index 00000000..f09939ed
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/WeekNestDlg.cs
@@ -0,0 +1,225 @@
+using System;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class WeekNestDlg : DlgBase<WeekNestDlg, WeeknestBehaviour>
+ {
+ public override string fileName
+ {
+ get
+ {
+ return "OperatingActivity/WeekNest";
+ }
+ }
+
+ public override int layer
+ {
+ get
+ {
+ return 1;
+ }
+ }
+
+ public override bool autoload
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override bool hideMainMenu
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override bool pushstack
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override bool fullscreenui
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ private float m_fCoolTime = 0.5f;
+
+ private float m_fLastClickBtnTime = 0f;
+
+ private XWeekNestDocument m_doc;
+
+ public WeekNestRankHandler m_weekNestRankHandler;
+
+ protected override void Init()
+ {
+ base.Init();
+ this.m_doc = XWeekNestDocument.Doc;
+ this.m_doc.View = this;
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ base.uiBehaviour.m_goBattleBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnGoBattleClicked));
+ base.uiBehaviour.m_rankBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnRankBtnClicked));
+ base.uiBehaviour.m_closedBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnClickClosed));
+ }
+
+ public bool OnHelpClicked(IXUIButton button)
+ {
+ DlgBase<XCommonHelpTipView, XCommonHelpTipBehaviour>.singleton.ShowHelp(XSysDefine.XSys_Activity_GoddessTrial);
+ return true;
+ }
+
+ protected override void OnShow()
+ {
+ this.m_doc.HadRedDot = false;
+ base.uiBehaviour.m_tipsLab.SetText(XSingleton<UiUtility>.singleton.ReplaceReturn(XSingleton<XStringTable>.singleton.GetString("WeekNestTips")));
+ this.m_doc.ReqTeamCount();
+ }
+
+ protected override void OnHide()
+ {
+ base.OnHide();
+ }
+
+ public override void StackRefresh()
+ {
+ base.StackRefresh();
+ }
+
+ protected override void OnUnload()
+ {
+ base.uiBehaviour.m_bgTexture.SetTexturePath("");
+ DlgHandlerBase.EnsureUnload<WeekNestRankHandler>(ref this.m_weekNestRankHandler);
+ base.OnUnload();
+ }
+
+ public void Resfresh()
+ {
+ this.FillContent();
+ }
+
+ private void FillContent()
+ {
+ XExpeditionDocument xexpeditionDocument = XSingleton<XGame>.singleton.Doc.GetXComponent(XExpeditionDocument.uuID) as XExpeditionDocument;
+ ExpeditionTable.RowData expeditionDataByID = xexpeditionDocument.GetExpeditionDataByID(this.m_doc.CurDNid);
+ int dayCount = xexpeditionDocument.GetDayCount(TeamLevelType.TeamLevelWeekNest, null);
+ int dayMaxCount = xexpeditionDocument.GetDayMaxCount(TeamLevelType.TeamLevelWeekNest, null);
+ base.uiBehaviour.m_timesLab.SetText(string.Format("{0}{1}/{2}", XSingleton<XStringTable>.singleton.GetString("WeekNestFight"), dayCount, dayMaxCount));
+ this.FillBgTexture();
+ bool flag = expeditionDataByID != null;
+ if (flag)
+ {
+ base.uiBehaviour.m_tittleLab.SetText(expeditionDataByID.DNExpeditionName);
+ this.FillItem(expeditionDataByID);
+ }
+ }
+
+ private void FillItem(ExpeditionTable.RowData rowData)
+ {
+ base.uiBehaviour.m_ItemPool.ReturnAll(false);
+ bool flag = rowData.ViewableDropList == null || rowData.ViewableDropList.Length == 0;
+ if (!flag)
+ {
+ for (int i = 0; i < rowData.ViewableDropList.Length; i++)
+ {
+ GameObject gameObject = base.uiBehaviour.m_ItemPool.FetchGameObject(false);
+ gameObject.transform.parent = base.uiBehaviour.m_itemsGo.transform;
+ gameObject.name = i.ToString();
+ gameObject.transform.localScale = Vector3.one;
+ gameObject.transform.localPosition = new Vector3((float)(base.uiBehaviour.m_ItemPool.TplWidth * i), 0f, 0f);
+ IXUISprite ixuisprite = gameObject.transform.Find("Icon").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.ID = (ulong)rowData.ViewableDropList[i];
+ XSingleton<XItemDrawerMgr>.singleton.normalItemDrawer.DrawItem(gameObject, (int)rowData.ViewableDropList[i], 0, false);
+ ixuisprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(XSingleton<UiUtility>.singleton.OnItemClick));
+ }
+ }
+ }
+
+ private void FillBgTexture()
+ {
+ base.uiBehaviour.m_bgTexture.SetTexturePath("atlas/UI/common/Pic/" + this.m_doc.GetPicNameByDNid((uint)this.m_doc.CurDNid));
+ }
+
+ private bool OnGoBattleClicked(IXUIButton sp)
+ {
+ bool flag = this.SetButtonCool(this.m_fCoolTime);
+ bool result;
+ if (flag)
+ {
+ result = true;
+ }
+ else
+ {
+ XTeamDocument specificDocument = XDocuments.GetSpecificDocument<XTeamDocument>(XTeamDocument.uuID);
+ specificDocument.SetAndMatch(this.m_doc.CurDNid);
+ result = true;
+ }
+ return result;
+ }
+
+ private bool OnRankBtnClicked(IXUIButton sp)
+ {
+ bool flag = this.SetButtonCool(this.m_fCoolTime);
+ bool result;
+ if (flag)
+ {
+ result = true;
+ }
+ else
+ {
+ DlgHandlerBase.EnsureCreate<WeekNestRankHandler>(ref this.m_weekNestRankHandler, base.uiBehaviour.m_rankTra, true, this);
+ result = true;
+ }
+ return result;
+ }
+
+ private bool OnClickClosed(IXUIButton sp)
+ {
+ bool flag = this.SetButtonCool(this.m_fCoolTime);
+ bool result;
+ if (flag)
+ {
+ result = true;
+ }
+ else
+ {
+ this.SetVisible(false, true);
+ result = true;
+ }
+ return result;
+ }
+
+ private bool SetButtonCool(float time)
+ {
+ float num = Time.realtimeSinceStartup - this.m_fLastClickBtnTime;
+ bool flag = num < time;
+ bool result;
+ if (flag)
+ {
+ result = true;
+ }
+ else
+ {
+ this.m_fLastClickBtnTime = Time.realtimeSinceStartup;
+ result = false;
+ }
+ return result;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/WeekNestDlg.cs.meta b/Client/Assets/Scripts/XMainClient/UI/WeekNestDlg.cs.meta
new file mode 100644
index 00000000..f3727f95
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/WeekNestDlg.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 0af5848d963b37b4c996c57011c1e2d2
+timeCreated: 1611403165
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/WeekShareRewardHandler.cs b/Client/Assets/Scripts/XMainClient/UI/WeekShareRewardHandler.cs
new file mode 100644
index 00000000..c7a17a36
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/WeekShareRewardHandler.cs
@@ -0,0 +1,129 @@
+using System;
+using System.Collections;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class WeekShareRewardHandler : DlgHandlerBase
+ {
+ private IXUIButton _shareBtn;
+
+ private IXUIButton _getBtn;
+
+ private IXUILabel _weekDes;
+
+ private IXUILabel _activityDes;
+
+ private XUIPool _itemPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ protected XAchievementDocument _doc;
+
+ protected override void Init()
+ {
+ base.Init();
+ this.InitProperties();
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ bool flag = !this._doc.Monday;
+ if (flag)
+ {
+ DlgBase<RewardSystemDlg, TabDlgBehaviour>.singleton.uiBehaviour.StartCoroutine(this.RefreshMonday());
+ }
+ this.RefreshUI();
+ }
+
+ protected override void OnHide()
+ {
+ base.OnHide();
+ }
+
+ public override void OnUnload()
+ {
+ this._itemPool.ReturnAll(false);
+ this._doc.ShareHandler = null;
+ this._doc = null;
+ base.OnUnload();
+ }
+
+ public void RefreshUI()
+ {
+ this.RefreshBtnState();
+ this.RefreshRewards();
+ }
+
+ public void RefreshBtnState()
+ {
+ this._shareBtn.gameObject.SetActive(!this._doc.HasWeekReward);
+ this._getBtn.gameObject.SetActive(this._doc.HasWeekReward);
+ }
+
+ private void InitProperties()
+ {
+ this._doc = XDocuments.GetSpecificDocument<XAchievementDocument>(XAchievementDocument.uuID);
+ this._doc.ShareHandler = this;
+ this._shareBtn = (base.transform.Find("BtnShare").GetComponent("XUIButton") as IXUIButton);
+ this._shareBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.ClickToShare));
+ this._getBtn = (base.transform.Find("BtnGet").GetComponent("XUIButton") as IXUIButton);
+ this._getBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnClickGetBtn));
+ this._weekDes = (base.transform.Find("WeekDesc").GetComponent("XUILabel") as IXUILabel);
+ this._activityDes = (base.transform.Find("ActivityDes").GetComponent("XUILabel") as IXUILabel);
+ Transform transform = base.transform.Find("ItemList");
+ GameObject gameObject = transform.Find("ItemTpl").gameObject;
+ this._itemPool.SetupPool(transform.gameObject, gameObject, 4u, false);
+ }
+
+ private bool OnClickGetBtn(IXUIButton button)
+ {
+ this._doc.SendToGetWeekShareReward();
+ return true;
+ }
+
+ private bool ClickToShare(IXUIButton button)
+ {
+ XSingleton<PDatabase>.singleton.shareCallbackType = ShareCallBackType.WeekShare;
+ XSingleton<UIManager>.singleton.CloseAllUI();
+ DlgBase<ScreenShotShareView, ScreenShotShareBehaviour>.singleton.SetVisible(true, true);
+ DlgBase<ScreenShotShareView, ScreenShotShareBehaviour>.singleton.ShowMainView();
+ return true;
+ }
+
+ private void RefreshRewards()
+ {
+ this._weekDes.SetText(XSingleton<XStringTable>.singleton.GetString("WeekRewardsTime"));
+ this._activityDes.SetText(XSingleton<XStringTable>.singleton.GetString("WeekShareDec"));
+ this._itemPool.ReturnAll(false);
+ SeqList<int> sequenceList = XSingleton<XGlobalConfig>.singleton.GetSequenceList("WeekShareReward", true);
+ for (int i = 0; i < (int)sequenceList.Count; i++)
+ {
+ GameObject gameObject = this._itemPool.FetchGameObject(false);
+ gameObject.transform.localPosition = new Vector3((float)(i * this._itemPool.TplWidth), 0f, 0f);
+ IXUILabel ixuilabel = gameObject.transform.Find("Num").GetComponent("XUILabel") as IXUILabel;
+ int num = sequenceList[i, 0];
+ int itemCount = sequenceList[i, 1];
+ XSingleton<XItemDrawerMgr>.singleton.normalItemDrawer.DrawItem(gameObject, num, itemCount, true);
+ IXUISprite ixuisprite = gameObject.transform.Find("Icon").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.ID = (ulong)((long)num);
+ ixuisprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(XSingleton<UiUtility>.singleton.OnItemClick));
+ }
+ }
+
+ private IEnumerator RefreshMonday()
+ {
+ yield return new WaitForEndOfFrame();
+ this._doc.DisappearMonday();
+ XSingleton<XGameSysMgr>.singleton.RecalculateRedPointState(XSysDefine.XSys_WeekShareReward, true);
+ yield break;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/WeekShareRewardHandler.cs.meta b/Client/Assets/Scripts/XMainClient/UI/WeekShareRewardHandler.cs.meta
new file mode 100644
index 00000000..71547af0
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/WeekShareRewardHandler.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: bfa8d1f83ef1d7345b4423b1ca97ec85
+timeCreated: 1611404484
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/WeekendPartyHandler.cs b/Client/Assets/Scripts/XMainClient/UI/WeekendPartyHandler.cs
new file mode 100644
index 00000000..130f40c6
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/WeekendPartyHandler.cs
@@ -0,0 +1,98 @@
+using System;
+using KKSG;
+using UILib;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class WeekendPartyHandler : DlgHandlerBase
+ {
+ protected override string FileName
+ {
+ get
+ {
+ return "Battle/WeekendPartyBattleDlg";
+ }
+ }
+
+ private XWeekendPartyDocument m_Doc;
+
+ private IXUILabel m_BlueScore;
+
+ private IXUILabel m_RedScore;
+
+ private IXUILabel m_ReviveTime;
+
+ private XLeftTimeCounter m_LeftTimeCounter;
+
+ protected override void Init()
+ {
+ base.Init();
+ this.m_Doc = XDocuments.GetSpecificDocument<XWeekendPartyDocument>(XWeekendPartyDocument.uuID);
+ this.m_Doc.WeekendPartyBattleHandler = this;
+ this.m_BlueScore = (base.PanelObject.transform.Find("Battle/Score/Bluenum").GetComponent("XUILabel") as IXUILabel);
+ this.m_RedScore = (base.PanelObject.transform.Find("Battle/Score/Rednum").GetComponent("XUILabel") as IXUILabel);
+ this.m_ReviveTime = (base.PanelObject.transform.Find("LeftTime").GetComponent("XUILabel") as IXUILabel);
+ this.m_LeftTimeCounter = new XLeftTimeCounter(this.m_ReviveTime, true);
+ this.m_LeftTimeCounter.SetFormat(false);
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ }
+
+ public override void OnUnload()
+ {
+ this.m_Doc.WeekendPartyBattleHandler = null;
+ base.OnUnload();
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ this.RefreshWeekendPartyBattleData();
+ this.SetLeftTime();
+ }
+
+ private void SetLeftTime()
+ {
+ WeekEnd4v4List.RowData activityInfo = this.m_Doc.GetActivityInfo(this.m_Doc.CurrActID);
+ bool flag = activityInfo != null;
+ if (flag)
+ {
+ bool flag2 = DlgBase<BattleMain, BattleMainBehaviour>.singleton.IsLoaded() && DlgBase<BattleMain, BattleMainBehaviour>.singleton.IsVisible();
+ if (flag2)
+ {
+ DlgBase<BattleMain, BattleMainBehaviour>.singleton.SetLeftTime(activityInfo.MaxTime, -1);
+ }
+ }
+ }
+
+ public void RefreshWeekendPartyBattleData()
+ {
+ bool flag = XSingleton<XScene>.singleton.SceneType == SceneType.SCENE_WEEKEND4V4_CRAZYBOMB || XSingleton<XScene>.singleton.SceneType == SceneType.SCENE_WEEKEND4V4_LIVECHALLENGE;
+ if (flag)
+ {
+ this.m_BlueScore.SetText(this.m_Doc.EnemyScore.ToString());
+ this.m_RedScore.SetText(this.m_Doc.SelfScore.ToString());
+ }
+ else
+ {
+ this.m_BlueScore.SetText(this.m_Doc.SelfScore.ToString());
+ this.m_RedScore.SetText(this.m_Doc.EnemyScore.ToString());
+ }
+ }
+
+ public void ShowReviveUI(uint time)
+ {
+ this.m_LeftTimeCounter.SetLeftTime(time, -1);
+ }
+
+ public override void OnUpdate()
+ {
+ this.m_LeftTimeCounter.Update();
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/WeekendPartyHandler.cs.meta b/Client/Assets/Scripts/XMainClient/UI/WeekendPartyHandler.cs.meta
new file mode 100644
index 00000000..2dba9e22
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/WeekendPartyHandler.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 4bf8b048108921543bac6c8313f7f946
+timeCreated: 1611403689
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/WeeknestBehaviour.cs b/Client/Assets/Scripts/XMainClient/UI/WeeknestBehaviour.cs
new file mode 100644
index 00000000..224decd9
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/WeeknestBehaviour.cs
@@ -0,0 +1,48 @@
+using System;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class WeeknestBehaviour : DlgBehaviourBase
+ {
+ public IXUILabel m_tittleLab;
+
+ public IXUILabel m_timesLab;
+
+ public IXUILabel m_tipsLab;
+
+ public IXUIButton m_rankBtn;
+
+ public IXUIButton m_goBattleBtn;
+
+ public IXUIButton m_closedBtn;
+
+ public IXUITexture m_bgTexture;
+
+ public GameObject m_itemsGo;
+
+ public Transform m_rankTra;
+
+ public XUIPool m_ItemPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ private void Awake()
+ {
+ this.m_rankTra = base.transform.Find("Rank");
+ this.m_closedBtn = (base.transform.Find("Close").GetComponent("XUIButton") as IXUIButton);
+ Transform transform = base.transform.Find("Main/Tittles");
+ this.m_tittleLab = (transform.Find("Tittle1").GetComponent("XUILabel") as IXUILabel);
+ this.m_timesLab = (transform.Find("Times").GetComponent("XUILabel") as IXUILabel);
+ transform = base.transform.Find("Main/Btns");
+ this.m_rankBtn = (transform.Find("RankBtn").GetComponent("XUIButton") as IXUIButton);
+ this.m_goBattleBtn = (transform.Find("GoBtn").GetComponent("XUIButton") as IXUIButton);
+ this.m_bgTexture = (base.transform.Find("Main/P").GetComponent("XUITexture") as IXUITexture);
+ transform = base.transform.Find("Main/Items");
+ this.m_itemsGo = transform.gameObject;
+ this.m_ItemPool.SetupPool(transform.gameObject, transform.Find("Item").gameObject, 2u, false);
+ this.m_tipsLab = (transform.Find("t").GetComponent("XUILabel") as IXUILabel);
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/WeeknestBehaviour.cs.meta b/Client/Assets/Scripts/XMainClient/UI/WeeknestBehaviour.cs.meta
new file mode 100644
index 00000000..1624cdb2
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/WeeknestBehaviour.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: d060606b552ff46478e2ab02ba2a2580
+timeCreated: 1611404587
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/WelfareGrowthFundItem.cs b/Client/Assets/Scripts/XMainClient/UI/WelfareGrowthFundItem.cs
new file mode 100644
index 00000000..e4e0bd80
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/WelfareGrowthFundItem.cs
@@ -0,0 +1,158 @@
+using System;
+using UILib;
+using UnityEngine;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ public class WelfareGrowthFundItem
+ {
+ private Transform m_transform;
+
+ private IXUIButton m_getBtn;
+
+ private IXUILabel m_contentLabel;
+
+ private IXUILabel m_valueLabel;
+
+ private IXUILabel m_messageLabel;
+
+ private IXUISprite m_hasBuySprite;
+
+ private int m_type;
+
+ private int m_key;
+
+ private int m_value;
+
+ public void Init(Transform tf)
+ {
+ this.m_transform = tf;
+ this.m_getBtn = (tf.Find("Recharge").GetComponent("XUIButton") as IXUIButton);
+ this.m_contentLabel = (tf.Find("Content").GetComponent("XUILabel") as IXUILabel);
+ this.m_valueLabel = (tf.Find("Value").GetComponent("XUILabel") as IXUILabel);
+ this.m_messageLabel = (tf.Find("Message").GetComponent("XUILabel") as IXUILabel);
+ this.m_hasBuySprite = (tf.Find("HasBuy").GetComponent("XUISprite") as IXUISprite);
+ this.m_getBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnClickGetHandler));
+ }
+
+ private bool OnClickGetHandler(IXUIButton btn)
+ {
+ bool flag = this.m_type == 0;
+ bool result;
+ if (flag)
+ {
+ result = true;
+ }
+ else
+ {
+ XWelfareDocument specificDocument = XDocuments.GetSpecificDocument<XWelfareDocument>(XWelfareDocument.uuID);
+ specificDocument.GetGrowthFundAward(this.m_type, this.m_key);
+ result = true;
+ }
+ return result;
+ }
+
+ public void Set(int type, int key, int value)
+ {
+ this.m_type = type;
+ this.m_key = key;
+ this.m_value = value;
+ this.m_valueLabel.SetText(this.m_value.ToString());
+ bool flag = this.m_type == 0;
+ if (flag)
+ {
+ this.m_contentLabel.SetText(XStringDefineProxy.GetString("WELFARE_GROWTHFUND_CONTENT"));
+ }
+ else
+ {
+ this.m_contentLabel.SetText(XStringDefineProxy.GetString(XSingleton<XCommon>.singleton.StringCombine("WELFARE_GROWTHFUND_CONTENT", this.m_type.ToString()), new object[]
+ {
+ this.m_key
+ }));
+ }
+ }
+
+ public void Refresh()
+ {
+ XWelfareDocument specificDocument = XDocuments.GetSpecificDocument<XWelfareDocument>(XWelfareDocument.uuID);
+ bool flag = !specificDocument.HasBuyGrowthFund;
+ if (flag)
+ {
+ this.m_messageLabel.SetText(XStringDefineProxy.GetString("WELFARE_GROWTHFUND_ERROR"));
+ this.m_getBtn.SetVisible(false);
+ this.m_hasBuySprite.SetVisible(false);
+ }
+ else
+ {
+ bool flag2 = this.m_type == 0;
+ if (flag2)
+ {
+ this.m_hasBuySprite.SetVisible(true);
+ this.m_getBtn.SetVisible(false);
+ this.m_messageLabel.SetText(string.Empty);
+ }
+ else
+ {
+ bool flag3 = specificDocument.HasGrowthFundGet(this.m_type, this.m_key);
+ if (flag3)
+ {
+ this.m_hasBuySprite.SetVisible(true);
+ this.m_messageLabel.SetText(string.Empty);
+ this.m_getBtn.SetVisible(false);
+ }
+ else
+ {
+ this.m_hasBuySprite.SetVisible(false);
+ bool flag4 = this.m_type == 1;
+ if (flag4)
+ {
+ int level = (int)XSingleton<XAttributeMgr>.singleton.XPlayerData.Level;
+ bool flag5 = level < this.m_key;
+ if (flag5)
+ {
+ this.m_messageLabel.SetText(XStringDefineProxy.GetString("WELFARE_GROWTHFUND_MESSAGE1", new object[]
+ {
+ this.m_key - level
+ }));
+ this.m_getBtn.SetVisible(false);
+ }
+ else
+ {
+ this.m_messageLabel.SetText(string.Empty);
+ this.m_getBtn.SetVisible(true);
+ }
+ }
+ else
+ {
+ bool flag6 = this.m_type == 2;
+ if (flag6)
+ {
+ int loginDayCount = specificDocument.LoginDayCount;
+ bool flag7 = loginDayCount < this.m_key;
+ if (flag7)
+ {
+ this.m_messageLabel.SetText(XStringDefineProxy.GetString("WELFARE_GROWTHFUND_MESSAGE2", new object[]
+ {
+ this.m_key - loginDayCount
+ }));
+ this.m_getBtn.SetVisible(false);
+ }
+ else
+ {
+ this.m_messageLabel.SetText(string.Empty);
+ this.m_getBtn.SetVisible(true);
+ }
+ }
+ else
+ {
+ this.m_messageLabel.SetText(string.Empty);
+ this.m_getBtn.SetVisible(false);
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/WelfareGrowthFundItem.cs.meta b/Client/Assets/Scripts/XMainClient/UI/WelfareGrowthFundItem.cs.meta
new file mode 100644
index 00000000..08bfd55b
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/WelfareGrowthFundItem.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 7703afd8db973de409f586dc2dbd46cf
+timeCreated: 1611403951
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/XAchieveView.cs b/Client/Assets/Scripts/XMainClient/UI/XAchieveView.cs
new file mode 100644
index 00000000..620248b6
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XAchieveView.cs
@@ -0,0 +1,435 @@
+using System;
+using System.Collections.Generic;
+using KKSG;
+using UILib;
+using UnityEngine;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class XAchieveView : DlgHandlerBase
+ {
+ public IXUIWrapContent m_WrapContent;
+
+ public IXUIScrollView m_PanelScrollView;
+
+ public AchieveType m_achieveType;
+
+ private List<AchieveItemInfo> list = new List<AchieveItemInfo>();
+
+ private IXUILabel m_labAchipoint;
+
+ private IXUIProgress m_proAchiAll;
+
+ private IXUILabel m_lblAchiAll;
+
+ private IXUILabel m_rewarDesc;
+
+ private IXUIButton m_getBtn;
+
+ private IXUISprite m_sprRed;
+
+ private IXUIProgress[] m_proAchivType = new IXUIProgress[5];
+
+ private IXUILabel[] m_lblAchiType = new IXUILabel[5];
+
+ private GameObject[] m_rwds = new GameObject[3];
+
+ private bool canClaimPoint = false;
+
+ private XDesignationDocument _doc = null;
+
+ private IXUICheckBox[] m_padTabs = new IXUICheckBox[6];
+
+ private IXUISprite[] m_padPoint = new IXUISprite[6];
+
+ private GameObject m_objSurvey;
+
+ private GameObject m_objDetail;
+
+ private void InitDetail()
+ {
+ this.m_PanelScrollView = (base.PanelObject.transform.Find("detail/detail").GetComponent("XUIScrollView") as IXUIScrollView);
+ this.m_WrapContent = (base.PanelObject.transform.Find("detail/detail/WrapContent").GetComponent("XUIWrapContent") as IXUIWrapContent);
+ this.m_WrapContent.RegisterItemUpdateEventHandler(new WrapItemUpdateEventHandler(this.WrapContentItemUpdated));
+ }
+
+ private void ReqDetailInfo(int index)
+ {
+ bool flag = this._doc != null;
+ if (flag)
+ {
+ this.m_achieveType = (AchieveType)index;
+ this._doc.FetchAchieveType(this.m_achieveType);
+ }
+ }
+
+ public void RefreshDetails()
+ {
+ this.m_WrapContent.SetContentCount(this._doc.achievesDetails.Count, false);
+ this.m_PanelScrollView.ResetPosition();
+ }
+
+ private void WrapContentItemUpdated(Transform t, int index)
+ {
+ bool flag = this._doc != null;
+ if (flag)
+ {
+ bool flag2 = index < this._doc.achievesDetails.Count && index >= 0;
+ if (flag2)
+ {
+ AchieveItemInfo info = this._doc.achievesDetails[index];
+ this._SetRecord(t, info);
+ }
+ }
+ else
+ {
+ XSingleton<XDebug>.singleton.AddErrorLog("_doc is nil or index: ", index.ToString(), null, null, null, null);
+ }
+ }
+
+ protected void _SetRecord(Transform t, AchieveItemInfo info)
+ {
+ IXUILabel ixuilabel = t.Find("TLabel").GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel2 = t.Find("DLabel").GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel3 = t.Find("CLabel").GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel4 = t.Find("ch").GetComponent("XUILabel") as IXUILabel;
+ IXUIButton ixuibutton = t.Find("Get").GetComponent("XUIButton") as IXUIButton;
+ IXUISprite ixuisprite = t.Find("Icon").GetComponent("XUISprite") as IXUISprite;
+ IXUISprite ixuisprite2 = t.Find("Fini").GetComponent("XUISprite") as IXUISprite;
+ IXUISprite ixuisprite3 = t.Find("RedPoint").GetComponent("XUISprite") as IXUISprite;
+ GameObject gameObject = t.Find("ch_desc").gameObject;
+ GameObject gameObject2 = t.Find("bj").gameObject;
+ GameObject gameObject3 = t.Find("bj/bj").gameObject;
+ ixuilabel.SetText(info.row.Achievement);
+ ixuilabel2.SetText(info.row.Explanation);
+ string text = string.Empty;
+ string value = XSingleton<XGlobalConfig>.singleton.GetValue("AchieveColor");
+ for (int i = 0; i < info.row.Reward.Count; i++)
+ {
+ ItemList.RowData itemConf = XBagDocument.GetItemConf(info.row.Reward[i, 0]);
+ text = string.Concat(new object[]
+ {
+ text,
+ "[c]",
+ value,
+ itemConf.ItemName[0],
+ "[-][/c] ",
+ info.row.Reward[i, 1]
+ });
+ bool flag = i != info.row.Reward.Count - 1;
+ if (flag)
+ {
+ text += "\n";
+ }
+ }
+ ixuilabel3.SetText(text);
+ gameObject3.SetActive(info.state == AchieveState.Claim);
+ ixuisprite3.SetVisible(info.state == AchieveState.Claim);
+ ixuisprite2.SetVisible(info.state == AchieveState.Claimed);
+ ixuibutton.SetVisible(info.state != AchieveState.Claimed);
+ gameObject2.SetActive(info.state != AchieveState.Normal);
+ ixuisprite.SetSprite(info.row.ICON);
+ bool flag2 = info.row.DesignationName != "";
+ if (flag2)
+ {
+ ixuilabel4.gameObject.SetActive(true);
+ gameObject.SetActive(true);
+ ixuilabel4.SetText(info.row.DesignationName);
+ }
+ else
+ {
+ ixuilabel4.gameObject.SetActive(false);
+ gameObject.SetActive(false);
+ }
+ ixuibutton.SetEnable(info.state != AchieveState.Normal, false);
+ ixuibutton.ID = (ulong)((long)info.row.ID);
+ bool flag3 = info.state != AchieveState.Normal;
+ if (flag3)
+ {
+ ixuibutton.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnBtnClick));
+ }
+ }
+
+ public bool UnCompleteTipsBtn(IXUIButton btn)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString("Achi_Or_Des_UnComplete"), "fece00");
+ return true;
+ }
+
+ private bool OnBtnClick(IXUIButton btn)
+ {
+ AchieveItemInfo achieveItemInfo = new AchieveItemInfo();
+ bool flag = false;
+ for (int i = 0; i < this._doc.achievesDetails.Count; i++)
+ {
+ bool flag2 = this._doc.achievesDetails[i].row.ID == (int)btn.ID;
+ if (flag2)
+ {
+ flag = true;
+ achieveItemInfo = this._doc.achievesDetails[i];
+ break;
+ }
+ }
+ bool flag3 = flag && achieveItemInfo.state == AchieveState.Claim;
+ if (flag3)
+ {
+ this._doc.ClaimAchieve(achieveItemInfo.row.ID);
+ }
+ return true;
+ }
+
+ private void InitSurvey()
+ {
+ this.m_labAchipoint = (base.PanelObject.transform.Find("survey/title/Bg/TextLabel").GetComponent("XUILabel") as IXUILabel);
+ this.m_proAchiAll = (base.PanelObject.transform.Find("survey/slider").GetComponent("XUIProgress") as IXUIProgress);
+ this.m_lblAchiAll = (base.PanelObject.transform.Find("survey/slider/PLabel").GetComponent("XUILabel") as IXUILabel);
+ this.m_rewarDesc = (base.PanelObject.transform.Find("survey/desc/DescLabel").GetComponent("XUILabel") as IXUILabel);
+ this.m_getBtn = (base.PanelObject.transform.Find("survey/Get").GetComponent("XUIButton") as IXUIButton);
+ this.m_sprRed = (base.PanelObject.transform.Find("survey/Get/RedPoint").GetComponent("XUISprite") as IXUISprite);
+ for (int i = 0; i < this.m_proAchivType.Length; i++)
+ {
+ this.m_proAchivType[i] = (base.PanelObject.transform.Find("survey/right/cj" + i + "/slider1").GetComponent("XUIProgress") as IXUIProgress);
+ this.m_lblAchiType[i] = (base.PanelObject.transform.Find("survey/right/cj" + i + "/slider1/PLabel").GetComponent("XUILabel") as IXUILabel);
+ }
+ for (int j = 0; j < this.m_rwds.Length; j++)
+ {
+ this.m_rwds[j] = base.PanelObject.transform.Find("survey/items/item" + j).gameObject;
+ }
+ this.m_getBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnGetRewardBtnClick));
+ }
+
+ public bool OnGetRewardBtnClick(IXUIButton btn)
+ {
+ bool flag = this._doc != null && this._doc.achieveSurveyInfo != null;
+ if (flag)
+ {
+ this._doc.SendQueryGetAchiPointReward(this._doc.achieveSurveyInfo.rewardId);
+ }
+ return true;
+ }
+
+ public void RequstSurvey()
+ {
+ bool flag = this._doc != null;
+ if (flag)
+ {
+ this._doc.FetchAchieveSurvey();
+ }
+ }
+
+ public void RefreshSurvey()
+ {
+ bool flag = this._doc != null && this._doc.achieveSurveyInfo != null;
+ if (flag)
+ {
+ this.m_labAchipoint.SetText(this._doc.achieveSurveyInfo.achievePoint.ToString());
+ }
+ this.RefreshRws();
+ this.RefreshTypes();
+ this.RefreshProAll();
+ this.RefreshPoints();
+ }
+
+ private void RefreshRws()
+ {
+ AchievementPointRewardTable.RowData[] table = XDesignationDocument.achieveRwdTable.Table;
+ uint achievePoint = this._doc.achieveSurveyInfo.achievePoint;
+ SeqListRef<int> seqListRef = default(SeqListRef<int>);
+ bool flag = this._doc.achieveSurveyInfo.rewardId == 0u;
+ if (flag)
+ {
+ this.m_rewarDesc.SetText(XStringDefineProxy.GetString("Achi_Point_Reward_Desc_NULL"));
+ }
+ else
+ {
+ this.m_rewarDesc.SetText(string.Format(XStringDefineProxy.GetString("Achi_Point_Reward_Desc"), table[(int)(this._doc.achieveSurveyInfo.rewardId - 1u)].Point));
+ seqListRef = table[(int)(this._doc.achieveSurveyInfo.rewardId - 1u)].Reward;
+ }
+ bool flag2 = this._doc.achieveSurveyInfo.rewardId != 0u && (ulong)achievePoint >= (ulong)((long)table[(int)(this._doc.achieveSurveyInfo.rewardId - 1u)].Point) && seqListRef.Count > 0;
+ if (flag2)
+ {
+ this.m_getBtn.SetEnable(true, false);
+ this.m_sprRed.SetVisible(true);
+ this.canClaimPoint = true;
+ }
+ else
+ {
+ this.m_getBtn.SetEnable(false, false);
+ this.m_sprRed.SetVisible(false);
+ this.canClaimPoint = false;
+ }
+ int num = Math.Min(this.m_rwds.Length, seqListRef.Count);
+ IXUISprite ixuisprite = this.m_rwds[0].GetComponent("XUISprite") as IXUISprite;
+ int spriteWidth = ixuisprite.spriteWidth;
+ for (int i = 0; i < num; i++)
+ {
+ this.m_rwds[i].SetActive(true);
+ this.m_rwds[i].transform.localPosition = new Vector3(((float)i - (float)(num - 1) / 2f) * (float)spriteWidth, 0f, 0f);
+ XSingleton<XItemDrawerMgr>.singleton.normalItemDrawer.DrawItem(this.m_rwds[i], seqListRef[i, 0], seqListRef[i, 1], false);
+ }
+ bool flag3 = seqListRef.Count < this.m_rwds.Length;
+ if (flag3)
+ {
+ for (int j = seqListRef.Count; j < this.m_rwds.Length; j++)
+ {
+ this.m_rwds[j].SetActive(false);
+ }
+ }
+ }
+
+ private void RefreshTypes()
+ {
+ for (int i = 0; i < this.m_lblAchiType.Length; i++)
+ {
+ List<AchieveBriefInfo> dataList = this._doc.achieveSurveyInfo.dataList;
+ AchieveBriefInfo achieveBriefInfo = this.ParseBriefInfo(i);
+ this.m_lblAchiType[i].SetText(achieveBriefInfo.achievePoint + "/" + achieveBriefInfo.maxAchievePoint);
+ float value = achieveBriefInfo.achievePoint / achieveBriefInfo.maxAchievePoint;
+ bool flag = achieveBriefInfo.maxAchievePoint == 0u;
+ if (flag)
+ {
+ value = 0f;
+ }
+ this.m_proAchivType[i].value = value;
+ }
+ }
+
+ private AchieveBriefInfo ParseBriefInfo(int index)
+ {
+ List<AchieveBriefInfo> dataList = this._doc.achieveSurveyInfo.dataList;
+ for (int i = 0; i < dataList.Count; i++)
+ {
+ bool flag = dataList[i].achieveClassifyType == (uint)(index + 1);
+ if (flag)
+ {
+ return dataList[i];
+ }
+ }
+ return null;
+ }
+
+ private void RefreshProAll()
+ {
+ uint achievePoint = this._doc.achieveSurveyInfo.achievePoint;
+ uint maxAchievePoint = this._doc.achieveSurveyInfo.maxAchievePoint;
+ float value = achievePoint / maxAchievePoint;
+ this.m_proAchiAll.value = value;
+ this.m_lblAchiAll.SetText(achievePoint + "/" + maxAchievePoint);
+ }
+
+ public void RefreshPoints()
+ {
+ bool bState = false;
+ bool flag = this.canClaimPoint;
+ if (flag)
+ {
+ bState = true;
+ }
+ bool flag2 = base.IsVisible();
+ if (flag2)
+ {
+ this.m_padPoint[0].SetVisible(this.canClaimPoint);
+ for (int i = 1; i < this.m_padPoint.Length; i++)
+ {
+ AchieveBriefInfo achieveBriefInfo = this.ParseBriefInfo(i - 1);
+ bool flag3 = achieveBriefInfo != null;
+ if (flag3)
+ {
+ bool flag4 = achieveBriefInfo.canRewardCount > 0u;
+ if (flag4)
+ {
+ bState = true;
+ }
+ this.m_padPoint[i].SetVisible(achieveBriefInfo.canRewardCount > 0u);
+ }
+ }
+ }
+ XSingleton<XGameSysMgr>.singleton.SetSysRedPointState(XSysDefine.XSys_Design_Achieve, bState);
+ XSingleton<XGameSysMgr>.singleton.RecalculateRedPointState(XSysDefine.XSys_Design_Achieve, true);
+ XSingleton<XGameSysMgr>.singleton.RecalculateRedPointState(XSysDefine.XSys_Design, true);
+ XSingleton<XGameSysMgr>.singleton.RecalculateRedPointState(XSysDefine.XSys_Reward, true);
+ }
+
+ protected override void Init()
+ {
+ base.Init();
+ this._doc = XDocuments.GetSpecificDocument<XDesignationDocument>(XDesignationDocument.uuID);
+ for (int i = 0; i < this.m_padTabs.Length; i++)
+ {
+ this.m_padTabs[i] = (base.PanelObject.transform.Find("padTabs/TabTpl" + i + "/Bg").GetComponent("XUICheckBox") as IXUICheckBox);
+ this.m_padPoint[i] = (base.PanelObject.transform.Find("padTabs/TabTpl" + i + "/Bg/RedPoint").GetComponent("XUISprite") as IXUISprite);
+ this.m_padPoint[i].gameObject.SetActive(false);
+ bool flag = this.m_padTabs[i] != null;
+ if (flag)
+ {
+ this.m_padTabs[i].ID = (ulong)i;
+ this.m_padTabs[i].ForceSetFlag(i == 0);
+ this.m_padTabs[i].RegisterOnCheckEventHandler(new CheckBoxOnCheckEventHandler(this.OnTabControlStateChange));
+ }
+ }
+ this.m_objSurvey = base.PanelObject.transform.Find("survey").gameObject;
+ this.m_objDetail = base.PanelObject.transform.Find("detail").gameObject;
+ this.InitSurvey();
+ this.InitDetail();
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ this._doc = XDocuments.GetSpecificDocument<XDesignationDocument>(XDesignationDocument.uuID);
+ this._doc.achieveView = this;
+ this.m_objSurvey.SetActive(true);
+ this.m_objDetail.SetActive(false);
+ this.m_padTabs[0].ForceSetFlag(true);
+ this.RequstSurvey();
+ }
+
+ public override void OnUpdate()
+ {
+ base.OnUpdate();
+ }
+
+ protected override void OnHide()
+ {
+ base.OnHide();
+ base.PanelObject.SetActive(false);
+ }
+
+ public override void OnUnload()
+ {
+ this._doc = null;
+ base.OnUnload();
+ }
+
+ public bool OnTabControlStateChange(IXUICheckBox chkBox)
+ {
+ bool bChecked = chkBox.bChecked;
+ if (bChecked)
+ {
+ this.OnTabClick((int)chkBox.ID);
+ }
+ return true;
+ }
+
+ private void OnTabClick(int index)
+ {
+ this.m_objDetail.SetActive(index > 0);
+ this.m_objSurvey.SetActive(index <= 0);
+ bool flag = index <= 0;
+ if (flag)
+ {
+ this.RequstSurvey();
+ }
+ else
+ {
+ this.ReqDetailInfo(index);
+ }
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/XAchieveView.cs.meta b/Client/Assets/Scripts/XMainClient/UI/XAchieveView.cs.meta
new file mode 100644
index 00000000..ee971951
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XAchieveView.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 19d073c6fab4a284bbd5f1dce04106bb
+timeCreated: 1611403306
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/XActivityInviteBehavior.cs b/Client/Assets/Scripts/XMainClient/UI/XActivityInviteBehavior.cs
new file mode 100644
index 00000000..1f4f3743
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XActivityInviteBehavior.cs
@@ -0,0 +1,39 @@
+using System;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+
+namespace XMainClient.UI
+{
+ internal class XActivityInviteBehavior : DlgBehaviourBase
+ {
+ public IXUIButton AddFriendBtn;
+
+ public IXUIButton JoinGuildBtn;
+
+ public IXUIScrollView ScrollView;
+
+ public IXUIWrapContent WrapContent;
+
+ public Transform Tabs;
+
+ public IXUISprite Close;
+
+ public Transform EmptyFlag;
+
+ public IXUILabel FriendText;
+
+ private void Awake()
+ {
+ Transform transform = base.transform.Find("Bg/BtnAddFriendMiddle");
+ this.AddFriendBtn = (transform.GetComponent("XUIButton") as IXUIButton);
+ this.JoinGuildBtn = (base.transform.Find("Bg/BtnJoinGuild").GetComponent("XUIButton") as IXUIButton);
+ this.ScrollView = (base.transform.Find("Bg/Panel").GetComponent("XUIScrollView") as IXUIScrollView);
+ this.WrapContent = (base.transform.Find("Bg/Panel/WrapContent").GetComponent("XUIWrapContent") as IXUIWrapContent);
+ this.Tabs = base.transform.Find("Tabs");
+ this.Close = (base.transform.Find("Bg/Close").GetComponent("XUISprite") as IXUISprite);
+ this.EmptyFlag = base.transform.Find("Bg/Empty");
+ this.FriendText = (base.transform.Find("Bg/Text").GetComponent("XUILabel") as IXUILabel);
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/XActivityInviteBehavior.cs.meta b/Client/Assets/Scripts/XMainClient/UI/XActivityInviteBehavior.cs.meta
new file mode 100644
index 00000000..7227b640
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XActivityInviteBehavior.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 33f778be650779a45a9d01995b713b45
+timeCreated: 1611403554
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/XActivityInviteView.cs b/Client/Assets/Scripts/XMainClient/UI/XActivityInviteView.cs
new file mode 100644
index 00000000..f158cdb7
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XActivityInviteView.cs
@@ -0,0 +1,439 @@
+using System;
+using System.Collections.Generic;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class XActivityInviteView : DlgBase<XActivityInviteView, XActivityInviteBehavior>
+ {
+ public override string fileName
+ {
+ get
+ {
+ return "Home/ActivityInviteDlg";
+ }
+ }
+
+ public override int layer
+ {
+ get
+ {
+ return 1;
+ }
+ }
+
+ public override int group
+ {
+ get
+ {
+ return 1;
+ }
+ }
+
+ public override bool autoload
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ protected List<Transform> _tabs = new List<Transform>();
+
+ protected int _curTab = 2;
+
+ protected List<InviteMemberInfo> curList = new List<InviteMemberInfo>();
+
+ protected List<Vector3> _tabPos = new List<Vector3>();
+
+ protected override void Init()
+ {
+ this.InitTabs();
+ this.InitProperties();
+ }
+
+ protected override void OnUnload()
+ {
+ base.OnUnload();
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ this._curTab = 2;
+ this.RefreshTabs();
+ bool flag = DlgBase<XFriendsView, XFriendsBehaviour>.singleton.friendData.Count == 0;
+ if (flag)
+ {
+ this.Refresh(ActivityInviteTarget.Friend);
+ }
+ else
+ {
+ DlgBase<XFriendsView, XFriendsBehaviour>.singleton.QueryRoleState();
+ }
+ bool flag2 = (4 & XActivityInviteDocument.Doc.ShowType) > 0;
+ if (flag2)
+ {
+ XGuildMemberDocument specificDocument = XDocuments.GetSpecificDocument<XGuildMemberDocument>(XGuildMemberDocument.uuID);
+ specificDocument.ReqMemberList();
+ }
+ base.uiBehaviour.FriendText.SetText(XStringDefineProxy.GetString("PresentDegree", new object[]
+ {
+ XSingleton<XGlobalConfig>.singleton.GetInt("IBShopDegree")
+ }));
+ }
+
+ public override void OnXNGUIClick(GameObject obj, string path)
+ {
+ base.OnXNGUIClick(obj, path);
+ }
+
+ private void OnCloseClicked(IXUISprite iSp)
+ {
+ this.SetVisible(false, true);
+ this.ResetSendFlag();
+ }
+
+ private void ResetSendFlag()
+ {
+ foreach (List<InviteMemberInfo> list in XActivityInviteDocument.Doc.MemberInfos.Values)
+ {
+ foreach (InviteMemberInfo inviteMemberInfo in list)
+ {
+ inviteMemberInfo.bSent = false;
+ }
+ }
+ }
+
+ private bool OnAddFriendClicked(IXUIButton btn)
+ {
+ DlgBase<XFriendsView, XFriendsBehaviour>.singleton.RandomFriend();
+ this.SetVisible(false, true);
+ return true;
+ }
+
+ private void InitTabs()
+ {
+ this._tabs.Clear();
+ this._tabPos.Clear();
+ int num = 0;
+ foreach (object obj in base.uiBehaviour.Tabs)
+ {
+ Transform transform = (Transform)obj;
+ num++;
+ this._tabs.Add(transform);
+ IXUICheckBox ixuicheckBox = transform.GetComponent("XUICheckBox") as IXUICheckBox;
+ ixuicheckBox.ID = 1UL << num;
+ ixuicheckBox.RegisterOnCheckEventHandler(new CheckBoxOnCheckEventHandler(this.RefreshItems));
+ this._tabPos.Add(transform.localPosition);
+ }
+ }
+
+ private void InitProperties()
+ {
+ base.uiBehaviour.AddFriendBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnAddFriendClicked));
+ base.uiBehaviour.WrapContent.RegisterItemUpdateEventHandler(new WrapItemUpdateEventHandler(this.WrapContentItemUpdated));
+ base.uiBehaviour.WrapContent.RegisterItemInitEventHandler(new WrapItemInitEventHandler(this.WrapContentItemInit));
+ base.uiBehaviour.JoinGuildBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnJoinGuildClicked));
+ base.uiBehaviour.Close.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnCloseClicked));
+ }
+
+ public void Refresh(ActivityInviteTarget target)
+ {
+ this.RefreshCurTabItem(target);
+ base.uiBehaviour.FriendText.SetVisible(XActivityInviteDocument.Doc.CurOpType == XActivityInviteDocument.OpType.Send);
+ }
+
+ public void RefreshTabs()
+ {
+ base.uiBehaviour.JoinGuildBtn.gameObject.SetActive(false);
+ base.uiBehaviour.AddFriendBtn.gameObject.SetActive(false);
+ int[] array = Enum.GetValues(typeof(ActivityInviteTarget)) as int[];
+ int num = -1;
+ int num2 = Mathf.Min(array.Length, this._tabs.Count);
+ for (int i = 0; i < num2; i++)
+ {
+ bool flag = (array[i] & XActivityInviteDocument.Doc.ShowType) > 0;
+ if (flag)
+ {
+ this._tabs[i].gameObject.SetActive(true);
+ this._tabs[i].transform.localPosition = this._tabPos[++num];
+ }
+ else
+ {
+ this._tabs[i].gameObject.SetActive(false);
+ }
+ }
+ }
+
+ public bool RefreshCurTabItem(ActivityInviteTarget target)
+ {
+ for (int i = 0; i < this._tabs.Count; i++)
+ {
+ GameObject gameObject = this._tabs[i].gameObject;
+ bool activeSelf = gameObject.activeSelf;
+ if (activeSelf)
+ {
+ int num = 1 << i + 1;
+ bool flag = this._curTab == 0 || (target == (ActivityInviteTarget)this._curTab && num == this._curTab);
+ if (flag)
+ {
+ IXUICheckBox ixuicheckBox = gameObject.GetComponent("XUICheckBox") as IXUICheckBox;
+ bool bChecked = ixuicheckBox.bChecked;
+ if (bChecked)
+ {
+ this.RefreshItems(ixuicheckBox);
+ }
+ else
+ {
+ ixuicheckBox.bChecked = true;
+ }
+ }
+ }
+ }
+ return true;
+ }
+
+ public bool RefreshItems(IXUICheckBox go)
+ {
+ bool flag = !go.bChecked;
+ bool result;
+ if (flag)
+ {
+ result = false;
+ }
+ else
+ {
+ this._curTab = (int)go.ID;
+ List<InviteMemberInfo> list = null;
+ ActivityInviteTarget curTab = (ActivityInviteTarget)this._curTab;
+ bool flag2 = XActivityInviteDocument.Doc.MemberInfos.ContainsKey(curTab);
+ if (flag2)
+ {
+ list = XActivityInviteDocument.Doc.MemberInfos[curTab];
+ }
+ bool flag3 = list != null;
+ if (flag3)
+ {
+ base.uiBehaviour.WrapContent.SetContentCount(list.Count, false);
+ base.uiBehaviour.ScrollView.ResetPosition();
+ bool flag4 = list.Count == 0;
+ if (flag4)
+ {
+ bool flag5 = (long)this._curTab == 4L;
+ if (flag5)
+ {
+ XGuildMemberDocument specificDocument = XDocuments.GetSpecificDocument<XGuildMemberDocument>(XGuildMemberDocument.uuID);
+ List<XGuildMember> memberList = specificDocument.MemberList;
+ base.uiBehaviour.EmptyFlag.gameObject.SetActive(memberList.Count != 0);
+ base.uiBehaviour.JoinGuildBtn.gameObject.SetActive(memberList.Count == 0);
+ }
+ else
+ {
+ bool flag6 = (long)this._curTab == 2L;
+ if (flag6)
+ {
+ base.uiBehaviour.AddFriendBtn.gameObject.SetActive(true);
+ }
+ }
+ }
+ else
+ {
+ base.uiBehaviour.EmptyFlag.gameObject.SetActive(false);
+ base.uiBehaviour.JoinGuildBtn.gameObject.SetActive(false);
+ base.uiBehaviour.AddFriendBtn.gameObject.SetActive(false);
+ this.curList = list;
+ }
+ }
+ result = true;
+ }
+ return result;
+ }
+
+ private void WrapContentItemInit(Transform t, int index)
+ {
+ IXUIButton ixuibutton = t.Find("BtnInvite").GetComponent("XUIButton") as IXUIButton;
+ ixuibutton.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnInviteClick));
+ }
+
+ private bool OnInviteClick(IXUIButton go)
+ {
+ go.SetEnable(false, false);
+ this.SetSend(go.ID);
+ base.uiBehaviour.WrapContent.RefreshAllVisibleContents();
+ XActivityInviteDocument.OpType curOpType = XActivityInviteDocument.Doc.CurOpType;
+ XActivityInviteDocument.OpType opType = curOpType;
+ if (opType != XActivityInviteDocument.OpType.Send)
+ {
+ if (opType == XActivityInviteDocument.OpType.Invite)
+ {
+ this.PerformInvite(go.ID);
+ }
+ }
+ else
+ {
+ IXUILabel ixuilabel = go.gameObject.transform.Find("Label").GetComponent("XUILabel") as IXUILabel;
+ bool flag = ixuilabel.GetText() == XSingleton<XStringTable>.singleton.GetString("ActivityDegree");
+ if (flag)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XSingleton<XStringTable>.singleton.GetString("ActivityDegree"), "fece00");
+ }
+ else
+ {
+ XSingleton<XDebug>.singleton.AddLog("send btn clicked", null, null, null, null, null, XDebugColor.XDebug_None);
+ this.SetVisible(false, true);
+ DlgBase<PresentDlg, PresentBehaviour>.singleton.Show(go.ID);
+ }
+ }
+ return true;
+ }
+
+ private void PerformInvite(ulong roleID)
+ {
+ XInvitationDocument specificDocument = XDocuments.GetSpecificDocument<XInvitationDocument>(XInvitationDocument.uuID);
+ this.PreHandlerInviteType((ActivityInviteTarget)this._curTab, roleID);
+ specificDocument.SendActivityInvitation(XSysDefine.XSys_Home_Feast, XSingleton<XAttributeMgr>.singleton.XPlayerData.RoleID, true);
+ }
+
+ private void PreHandlerInviteType(ActivityInviteTarget type, ulong roleID)
+ {
+ if (type != ActivityInviteTarget.Friend)
+ {
+ if (type != ActivityInviteTarget.Guild)
+ {
+ }
+ }
+ else
+ {
+ DlgBase<XChatView, XChatBehaviour>.singleton.ChatFriendId = roleID;
+ XChatDocument specificDocument = XDocuments.GetSpecificDocument<XChatDocument>(XChatDocument.uuID);
+ ChatFriendData chatFriendData = specificDocument.FindFriendData(roleID);
+ bool flag = chatFriendData == null;
+ if (flag)
+ {
+ XFriendData friendDataById = DlgBase<XFriendsView, XFriendsBehaviour>.singleton.GetFriendDataById(roleID);
+ ChatFriendData chatFriendData2 = new ChatFriendData();
+ chatFriendData2.name = friendDataById.name;
+ chatFriendData2.roleid = friendDataById.roleid;
+ chatFriendData2.powerpoint = friendDataById.powerpoint;
+ chatFriendData2.profession = friendDataById.profession;
+ chatFriendData2.viplevel = friendDataById.viplevel;
+ chatFriendData2.isfriend = true;
+ chatFriendData2.msgtime = DateTime.Now;
+ chatFriendData2.setid = friendDataById.setid;
+ specificDocument.ChatFriendList.Add(chatFriendData2);
+ }
+ else
+ {
+ chatFriendData.msgtime = DateTime.Now;
+ }
+ }
+ }
+
+ private bool OnJoinGuildClicked(IXUIButton go)
+ {
+ this.SetVisibleWithAnimation(false, null);
+ DlgBase<XGuildListView, XGuildListBehaviour>.singleton.SetVisibleWithAnimation(true, null);
+ return true;
+ }
+
+ private void WrapContentItemUpdated(Transform t, int index)
+ {
+ bool flag = !XActivityInviteDocument.Doc.MemberInfos.ContainsKey((ActivityInviteTarget)this._curTab);
+ if (!flag)
+ {
+ List<InviteMemberInfo> list = XActivityInviteDocument.Doc.MemberInfos[(ActivityInviteTarget)this._curTab];
+ bool flag2 = index >= list.Count;
+ if (!flag2)
+ {
+ InviteMemberInfo inviteMemberInfo = list[index];
+ IXUILabel ixuilabel = t.Find("Info/Name").GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel2 = t.Find("Info/Level").GetComponent("XUILabel") as IXUILabel;
+ IXUISprite ixuisprite = t.Find("Info/AvatarBG/Avatar").GetComponent("XUISprite") as IXUISprite;
+ IXUISprite ixuisprite2 = t.Find("Info/Profession").GetComponent("XUISprite") as IXUISprite;
+ IXUILabel ixuilabel3 = t.Find("Info/AvatarBG/BattlePointBG/Power").GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel4 = t.Find("Info/GuildName").GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel5 = t.Find("State").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel5.SetText("");
+ Transform transform = t.Find("Info/AvatarBG/Relation");
+ ixuilabel.SetText(inviteMemberInfo.name);
+ ixuilabel2.SetText("Lv." + inviteMemberInfo.level.ToString());
+ ixuisprite.spriteName = XSingleton<XProfessionSkillMgr>.singleton.GetProfHeadIcon2((int)inviteMemberInfo.profession);
+ ixuisprite2.spriteName = XSingleton<XProfessionSkillMgr>.singleton.GetProfIcon((int)inviteMemberInfo.profession);
+ ixuilabel3.SetText(inviteMemberInfo.ppt.ToString());
+ bool flag3 = string.IsNullOrEmpty(inviteMemberInfo.guildname);
+ if (flag3)
+ {
+ ixuilabel4.SetText(XSingleton<XStringTable>.singleton.GetString("NoGuild"));
+ }
+ else
+ {
+ ixuilabel4.SetText(inviteMemberInfo.guildname);
+ }
+ Transform transform2 = transform.Find("Guild");
+ Transform transform3 = transform.Find("Friend");
+ transform2.gameObject.SetActive(this._curTab == 4);
+ transform3.gameObject.SetActive(this._curTab == 2);
+ IXUIButton ixuibutton = t.Find("BtnInvite").GetComponent("XUIButton") as IXUIButton;
+ ixuibutton.SetEnable(true, false);
+ ixuibutton.SetVisible(!inviteMemberInfo.bSent);
+ this.SetOpBtnContent(t, inviteMemberInfo);
+ }
+ }
+ }
+
+ private void SetSend(ulong id)
+ {
+ for (int i = 0; i < this.curList.Count; i++)
+ {
+ bool @checked = this.GetChecked(this.curList[i], id);
+ if (@checked)
+ {
+ this.curList[i].bSent = true;
+ }
+ }
+ }
+
+ private bool GetChecked(InviteMemberInfo info, ulong id)
+ {
+ XActivityInviteDocument.OpType curOpType = XActivityInviteDocument.Doc.CurOpType;
+ XActivityInviteDocument.OpType opType = curOpType;
+ return opType == XActivityInviteDocument.OpType.Invite && info.uid == id;
+ }
+
+ private void SetOpBtnContent(Transform item, InviteMemberInfo info)
+ {
+ IXUIButton ixuibutton = item.Find("BtnInvite").GetComponent("XUIButton") as IXUIButton;
+ IXUILabel ixuilabel = item.Find("Invited").GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel2 = item.Find("BtnInvite/Label").GetComponent("XUILabel") as IXUILabel;
+ XActivityInviteDocument.OpType curOpType = XActivityInviteDocument.Doc.CurOpType;
+ XActivityInviteDocument.OpType opType = curOpType;
+ if (opType != XActivityInviteDocument.OpType.Send)
+ {
+ if (opType == XActivityInviteDocument.OpType.Invite)
+ {
+ ixuibutton.ID = info.uid;
+ string text = info.bSent ? XSingleton<XStringTable>.singleton.GetString("ActivityInvited") : "";
+ ixuilabel.SetText(text);
+ ixuilabel2.SetText(XSingleton<XStringTable>.singleton.GetString("ActivityInvite"));
+ }
+ }
+ else
+ {
+ ixuibutton.ID = info.uid;
+ int @int = XSingleton<XGlobalConfig>.singleton.GetInt("IBShopDegree");
+ string @string = XSingleton<XStringTable>.singleton.GetString(((ulong)info.degree < (ulong)((long)@int)) ? "ActivityDegree" : "ActivitySend");
+ ixuilabel.SetText(@string);
+ ixuilabel2.SetText(@string);
+ }
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/XActivityInviteView.cs.meta b/Client/Assets/Scripts/XMainClient/UI/XActivityInviteView.cs.meta
new file mode 100644
index 00000000..9c5f8e04
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XActivityInviteView.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 6141843cbc9745c4c9a4fff6b2309871
+timeCreated: 1611403838
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/XBackFlowMallHandler.cs b/Client/Assets/Scripts/XMainClient/UI/XBackFlowMallHandler.cs
new file mode 100644
index 00000000..68c1e025
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XBackFlowMallHandler.cs
@@ -0,0 +1,209 @@
+using System;
+using KKSG;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ [Hotfix]
+ internal class XBackFlowMallHandler : DlgHandlerBase
+ {
+ protected override string FileName
+ {
+ get
+ {
+ return "Hall/BfMallHandler";
+ }
+ }
+
+ private XUIPool m_ItemPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ private IXUIList m_ShopItemList;
+
+ private IXUIButton m_RefreshBtn;
+
+ private IXUILabel m_CloseTip;
+
+ private IXUILabel m_ResetdTip;
+
+ private IXUILabel m_LeftTimes;
+
+ private int currLeftTime;
+
+ private uint _CDToken = 0u;
+
+ protected override void Init()
+ {
+ base.Init();
+ Transform transform = base.PanelObject.transform.Find("ShopItemList/Grid/ShopItemTpl");
+ this.m_ItemPool.SetupPool(transform.parent.gameObject, transform.gameObject, 6u, false);
+ this.m_RefreshBtn = (base.PanelObject.transform.Find("BtnRefresh").GetComponent("XUIButton") as IXUIButton);
+ this.m_ShopItemList = (base.PanelObject.transform.Find("ShopItemList/Grid").GetComponent("XUIList") as IXUIList);
+ this.m_CloseTip = (base.PanelObject.transform.Find("Title").GetComponent("XUILabel") as IXUILabel);
+ this.m_ResetdTip = (base.PanelObject.transform.Find("Tip").GetComponent("XUILabel") as IXUILabel);
+ this.m_LeftTimes = (base.PanelObject.transform.Find("Times").GetComponent("XUILabel") as IXUILabel);
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ this.m_RefreshBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnRefreshBtnClicked));
+ }
+
+ private bool OnRefreshBtnClicked(IXUIButton sp)
+ {
+ XBackFlowDocument.Doc.SendBackFlowActivityOperation(BackFlowActOp.BackFlowAct_ShopUpdate, 0u);
+ return true;
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ XBackFlowDocument.Doc.SendBackFlowActivityOperation(BackFlowActOp.BackFlowAct_ShopData, 0u);
+ this.m_ResetdTip.SetText(XStringDefineProxy.GetString("BackFlowShopResetTip"));
+ }
+
+ protected override void OnHide()
+ {
+ base.OnHide();
+ XSingleton<XTimerMgr>.singleton.KillTimer(this._CDToken);
+ }
+
+ public override void RefreshData()
+ {
+ bool flag = XBackFlowDocument.Doc.BackflowShopData == null;
+ if (!flag)
+ {
+ this.m_ItemPool.FakeReturnAll();
+ for (int i = 0; i < XBackFlowDocument.Doc.BackflowShopData.goods.Count; i++)
+ {
+ GameObject gameObject = this.m_ItemPool.FetchGameObject(false);
+ gameObject.transform.parent = this.m_ShopItemList.gameObject.transform;
+ gameObject.transform.localScale = Vector3.one;
+ this.SetShopItemInfo(gameObject, XBackFlowDocument.Doc.BackflowShopData.goods[i]);
+ }
+ this.m_ShopItemList.Refresh();
+ this.m_ItemPool.ActualReturnAll(false);
+ int @int = XSingleton<XGlobalConfig>.singleton.GetInt("BackFlowShopFreshCount");
+ this.m_LeftTimes.SetText(string.Format("{0}/{1}", XBackFlowDocument.Doc.BackflowShopData.freshCount, @int));
+ this.currLeftTime = (int)XBackFlowDocument.Doc.ShopLeftTime;
+ this.SetCloseLeftTime();
+ }
+ }
+
+ private void SetCloseLeftTime()
+ {
+ XSingleton<XTimerMgr>.singleton.KillTimer(this._CDToken);
+ bool flag = this.currLeftTime > 0;
+ if (flag)
+ {
+ bool flag2 = this.currLeftTime >= 43200;
+ string arg;
+ if (flag2)
+ {
+ arg = XSingleton<UiUtility>.singleton.TimeDuarationFormatString(this.currLeftTime, 4);
+ }
+ else
+ {
+ arg = XSingleton<UiUtility>.singleton.TimeDuarationFormatString(this.currLeftTime, 5);
+ }
+ this._CDToken = XSingleton<XTimerMgr>.singleton.SetTimer(1f, new XTimerMgr.ElapsedEventHandler(this.LeftTimeUpdate), null);
+ this.m_CloseTip.SetText(string.Format(XStringDefineProxy.GetString("BackFlowShopCloseTime"), arg));
+ }
+ this.m_CloseTip.SetVisible(this.currLeftTime > 0);
+ }
+
+ private void LeftTimeUpdate(object o)
+ {
+ this.currLeftTime--;
+ this.SetCloseLeftTime();
+ }
+
+ private void SetShopItemInfo(GameObject shopItem, BackFlowShopGood goodsInfo)
+ {
+ BackflowShop.RowData byGoodID = XBackFlowDocument.BackflowShopTable.GetByGoodID(goodsInfo.GoodID);
+ bool flag = byGoodID == null;
+ if (!flag)
+ {
+ this.SetQualityBorder(shopItem, byGoodID.Quality);
+ GameObject gameObject = shopItem.transform.Find("Item").gameObject;
+ XSingleton<XItemDrawerMgr>.singleton.normalItemDrawer.DrawItem(gameObject, (int)byGoodID.ItemID, (int)byGoodID.ItemCount, true);
+ IXUISprite ixuisprite = gameObject.transform.Find("Icon").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.ID = (ulong)byGoodID.ItemID;
+ ixuisprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(XSingleton<UiUtility>.singleton.OnItemClick));
+ IXUIButton ixuibutton = shopItem.transform.Find("BtnBuy").GetComponent("XUIButton") as IXUIButton;
+ ixuibutton.gameObject.SetActive(!goodsInfo.IsBuy);
+ ixuibutton.ID = (ulong)goodsInfo.GoodID;
+ ixuibutton.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnBuyBtnClicked));
+ string itemSmallIcon = XBagDocument.GetItemSmallIcon((int)byGoodID.CostType, 0u);
+ IXUISprite ixuisprite2 = ixuibutton.gameObject.transform.Find("MoneyCost/Icon").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite2.SetSprite(itemSmallIcon);
+ IXUILabel ixuilabel = ixuibutton.gameObject.transform.Find("MoneyCost").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel.SetText(byGoodID.CostNum.ToString());
+ GameObject gameObject2 = shopItem.transform.Find("Empty").gameObject;
+ gameObject2.SetActive(goodsInfo.IsBuy);
+ GameObject gameObject3 = shopItem.transform.Find("limit").gameObject;
+ gameObject3.SetActive(byGoodID.Discount > 0u && byGoodID.Discount != 100u && !goodsInfo.IsBuy);
+ IXUILabel ixuilabel2 = shopItem.transform.Find("limit/num").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel2.SetText((byGoodID.Discount / 10f).ToString());
+ }
+ }
+
+ private void SetQualityBorder(GameObject shopItem, uint quality)
+ {
+ for (int i = 0; i <= 5; i++)
+ {
+ string text = string.Format("Quality{0}", i);
+ Transform transform = shopItem.transform.Find(text);
+ bool flag = transform != null;
+ if (flag)
+ {
+ transform.gameObject.SetActive((long)i == (long)((ulong)quality));
+ }
+ }
+ }
+
+ private bool OnBuyBtnClicked(IXUIButton btn)
+ {
+ BackflowShop.RowData byGoodID = XBackFlowDocument.BackflowShopTable.GetByGoodID((uint)btn.ID);
+ bool flag = byGoodID == null;
+ bool result;
+ if (flag)
+ {
+ result = false;
+ }
+ else
+ {
+ DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.SetVisible(false, true);
+ DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.uiBehaviour.m_OKButton.ID = btn.ID;
+ ItemList.RowData itemConf = XBagDocument.GetItemConf((int)byGoodID.ItemID);
+ bool flag2 = itemConf == null;
+ if (flag2)
+ {
+ result = false;
+ }
+ else
+ {
+ string text = XSingleton<UiUtility>.singleton.ChooseProfString(itemConf.ItemName, 0u);
+ string message = string.Format(XStringDefineProxy.GetString("BackFlowShopBuyTip", new object[]
+ {
+ byGoodID.ItemCount,
+ text
+ }), new object[0]);
+ XSingleton<UiUtility>.singleton.ShowModalDialog(message, new ButtonClickEventHandler(this.OnClickOKBtn));
+ result = true;
+ }
+ }
+ return result;
+ }
+
+ private bool OnClickOKBtn(IXUIButton btn)
+ {
+ XBackFlowDocument.Doc.SendBackFlowActivityOperation(BackFlowActOp.BackFlowAct_ShopBuy, (uint)btn.ID);
+ DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.SetVisible(false, true);
+ return true;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/XBackFlowMallHandler.cs.meta b/Client/Assets/Scripts/XMainClient/UI/XBackFlowMallHandler.cs.meta
new file mode 100644
index 00000000..845f6998
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XBackFlowMallHandler.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 3c964e3840535b9479d35c849a8caaed
+timeCreated: 1611403602
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/XBackFlowPandoraSDKHandler.cs b/Client/Assets/Scripts/XMainClient/UI/XBackFlowPandoraSDKHandler.cs
new file mode 100644
index 00000000..2b8e736e
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XBackFlowPandoraSDKHandler.cs
@@ -0,0 +1,65 @@
+using System;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class XBackFlowPandoraSDKHandler : DlgHandlerBase
+ {
+ protected override string FileName
+ {
+ get
+ {
+ return "Hall/BfPandoraSDKHandler";
+ }
+ }
+
+ private XSysDefine currSys = XSysDefine.XSys_None;
+
+ protected override void Init()
+ {
+ base.Init();
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ this.ShowPandoraTab();
+ }
+
+ protected override void OnHide()
+ {
+ base.OnHide();
+ this.HidePandoraTab();
+ }
+
+ private void ShowPandoraTab()
+ {
+ bool flag = this.currSys == XSysDefine.XSys_None;
+ if (!flag)
+ {
+ int sysID = XFastEnumIntEqualityComparer<XSysDefine>.ToInt(this.currSys);
+ XSingleton<XPandoraSDKDocument>.singleton.ShowPandoraTab(sysID, true, base.PanelObject);
+ }
+ }
+
+ private void HidePandoraTab()
+ {
+ bool flag = this.currSys == XSysDefine.XSys_None;
+ if (!flag)
+ {
+ int sysID = XFastEnumIntEqualityComparer<XSysDefine>.ToInt(this.currSys);
+ XSingleton<XPandoraSDKDocument>.singleton.ShowPandoraTab(sysID, false, base.PanelObject);
+ }
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ }
+
+ public void SetCurrSys(XSysDefine sys)
+ {
+ this.currSys = sys;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/XBackFlowPandoraSDKHandler.cs.meta b/Client/Assets/Scripts/XMainClient/UI/XBackFlowPandoraSDKHandler.cs.meta
new file mode 100644
index 00000000..e80050f4
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XBackFlowPandoraSDKHandler.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 1d81aa3bccc73d64b88ea0b252f46cf6
+timeCreated: 1611403355
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/XBattleEnemyInfo.cs b/Client/Assets/Scripts/XMainClient/UI/XBattleEnemyInfo.cs
new file mode 100644
index 00000000..79340e95
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XBattleEnemyInfo.cs
@@ -0,0 +1,488 @@
+using System;
+using KKSG;
+using UILib;
+using UnityEngine;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class XBattleEnemyInfo
+ {
+ public int SequenceNum
+ {
+ get
+ {
+ return this.m_CurSequence;
+ }
+ set
+ {
+ this.m_CurSequence = value;
+ }
+ }
+
+ public XEntity Entity { get; set; }
+
+ public float HitTime
+ {
+ get
+ {
+ return this.m_HitTime;
+ }
+ }
+
+ public bool bNotBeHitRecently
+ {
+ get
+ {
+ return Time.time - this.m_HitTime > XBattleEnemyInfo.fNotBeHitTime;
+ }
+ }
+
+ public static bool bShow;
+
+ public static float fNotBeHitTime = 3f;
+
+ private int m_CurSequence;
+
+ private int m_PreSequence;
+
+ public GameObject m_Go;
+
+ private BattleEnemyType m_Type;
+
+ private float m_HitTime = 0f;
+
+ private bool m_bIsSuperArmorBroken = false;
+
+ public GameObject m_uiBg = null;
+
+ public IXUISprite m_uiAvatar = null;
+
+ public IXUILabel m_uiName = null;
+
+ public IXUIProgress m_uiProgressHp = null;
+
+ public IXUISprite m_uiSpriteHp = null;
+
+ public IXUISprite m_uiHpBackDrop = null;
+
+ public IXUIProgress m_uiSuperArmor = null;
+
+ public IXUISprite m_uiMp = null;
+
+ public IXUITweenTool m_uiSuperArmorFx = null;
+
+ public IXUISprite m_uiSuperArmorSpeedFx = null;
+
+ public IXUITweenTool m_uiBeHitTween;
+
+ public IXUITweenTool m_uiPositionTween;
+
+ public IXUIPanel m_uiPanel;
+
+ public IXUILabel m_uiLevel;
+
+ public IXUILabel m_uiHpLabel;
+
+ public IXUILabel m_uiMpLabel;
+
+ public XBuffMonitorHandler m_BuffMonitor;
+
+ public void SwapData(XBattleEnemyInfo other)
+ {
+ XEntity entity = this.Entity;
+ this.Entity = other.Entity;
+ other.Entity = entity;
+ float hitTime = this.m_HitTime;
+ this.m_HitTime = other.m_HitTime;
+ other.m_HitTime = hitTime;
+ bool bIsSuperArmorBroken = this.m_bIsSuperArmorBroken;
+ this.m_bIsSuperArmorBroken = other.m_bIsSuperArmorBroken;
+ other.m_bIsSuperArmorBroken = bIsSuperArmorBroken;
+ }
+
+ public XBattleEnemyInfo(int index, GameObject go, BattleEnemyType type)
+ {
+ this.m_CurSequence = index;
+ this.m_PreSequence = index;
+ this.m_Go = go;
+ this.m_Type = type;
+ this._InitUI();
+ }
+
+ public bool AttachUI(GameObject go)
+ {
+ bool flag = this.m_Go != null;
+ bool result;
+ if (flag)
+ {
+ result = false;
+ }
+ else
+ {
+ this.m_Go = go;
+ this._InitUI();
+ result = true;
+ }
+ return result;
+ }
+
+ private void _InitUI()
+ {
+ bool flag = this.m_Go == null;
+ if (flag)
+ {
+ this.m_uiPanel = null;
+ this.m_uiBg = null;
+ this.m_uiAvatar = null;
+ this.m_uiName = null;
+ this.m_uiBeHitTween = null;
+ this.m_uiPositionTween = null;
+ this.m_uiProgressHp = null;
+ this.m_uiSuperArmor = null;
+ this.m_uiSuperArmorFx = null;
+ this.m_uiSuperArmorSpeedFx = null;
+ this.m_uiSpriteHp = null;
+ this.m_uiLevel = null;
+ this.m_uiHpLabel = null;
+ this.m_uiMpLabel = null;
+ this.m_BuffMonitor = null;
+ }
+ else
+ {
+ Transform transform = this.m_Go.transform;
+ this.m_uiPanel = (transform.GetComponent("XUIPanel") as IXUIPanel);
+ this.m_uiBg = transform.Find("Bg").gameObject;
+ this.m_uiAvatar = (transform.Find("Bg/Avatar").GetComponent("XUISprite") as IXUISprite);
+ this.m_uiName = (transform.Find("Bg/PlayerName").GetComponent("XUILabel") as IXUILabel);
+ this.m_uiBeHitTween = (this.m_uiBg.GetComponent("XUIPlayTween") as IXUITweenTool);
+ this.m_uiPositionTween = (transform.GetComponent("XUIPlayTween") as IXUITweenTool);
+ this.m_uiPositionTween.RegisterOnFinishEventHandler(new OnTweenFinishEventHandler(this._OnTweenPositionFinished));
+ bool flag2 = this.m_Type == BattleEnemyType.BET_BOSS;
+ if (flag2)
+ {
+ this.m_uiProgressHp = (transform.Find("Bg/HpBar").GetComponent("XUIProgress") as IXUIProgress);
+ this.m_uiProgressHp.value = 0f;
+ this.m_uiSuperArmor = (transform.Find("Bg/SuperArmor").GetComponent("XUIProgress") as IXUIProgress);
+ this.m_uiSuperArmorFx = (transform.Find("Bg/SuperArmorFx").GetComponent("XUIPlayTween") as IXUITweenTool);
+ this.m_uiSuperArmorFx.gameObject.SetActive(false);
+ this.m_uiSuperArmorSpeedFx = (transform.Find("Bg/SpeedFx").GetComponent("XUISprite") as IXUISprite);
+ this.m_uiSuperArmorSpeedFx.gameObject.SetActive(false);
+ }
+ else
+ {
+ bool flag3 = this.m_Type == BattleEnemyType.BET_ROLE;
+ if (flag3)
+ {
+ this.m_uiSpriteHp = (transform.Find("Bg/HpBar/BackDrop").GetComponent("XUISprite") as IXUISprite);
+ this.m_uiSpriteHp.SetFillAmount(0f);
+ this.m_uiLevel = (transform.Find("Bg/Level").GetComponent("XUILabel") as IXUILabel);
+ this.m_uiHpLabel = (transform.Find("Bg/HpText").GetComponent("XUILabel") as IXUILabel);
+ this.m_uiMpLabel = (transform.Find("Bg/MpText").GetComponent("XUILabel") as IXUILabel);
+ this.m_uiMp = (transform.Find("Bg/MpBar/BackDrop").GetComponent("XUISprite") as IXUISprite);
+ this.m_uiHpBackDrop = (transform.Find("Bg/HpBar/BackDrop").GetComponent("XUISprite") as IXUISprite);
+ this.m_uiMp.SetFillAmount(0f);
+ }
+ }
+ DlgHandlerBase.EnsureCreate<XBuffMonitorHandler>(ref this.m_BuffMonitor, transform.Find("Bg/BuffFrame").gameObject, null, true);
+ this.m_BuffMonitor.InitMonitor(XSingleton<XGlobalConfig>.singleton.BuffMaxDisplayCountBoss, false, true);
+ this.m_Go.SetActive(false);
+ }
+ }
+
+ public void SetSuperArmorState(bool bBroken)
+ {
+ this.m_bIsSuperArmorBroken = bBroken;
+ bool flag = this.m_uiSuperArmorFx != null;
+ if (flag)
+ {
+ this.m_uiSuperArmorFx.PlayTween(true, -1f);
+ }
+ }
+
+ public void StopSuperArmorFx()
+ {
+ bool flag = this.m_uiSuperArmorFx != null;
+ if (flag)
+ {
+ this.m_uiSuperArmorFx.StopTween();
+ this.m_uiSuperArmorFx.gameObject.SetActive(false);
+ }
+ }
+
+ private void _UpdateRole()
+ {
+ bool deprecated = this.Entity.Deprecated;
+ if (!deprecated)
+ {
+ double attr = this.Entity.Attributes.GetAttr(XAttributeDefine.XAttr_MaxHP_Total);
+ double num = this.Entity.Attributes.GetAttr(XAttributeDefine.XAttr_CurrentHP_Basic);
+ bool flag = num < 0.0;
+ if (flag)
+ {
+ num = 0.0;
+ }
+ bool flag2 = num < attr && !XBattleEnemyInfo.bShow;
+ if (flag2)
+ {
+ XBattleEnemyInfo.bShow = true;
+ }
+ bool flag3 = this.m_Go == null;
+ if (!flag3)
+ {
+ double attr2 = this.Entity.Attributes.GetAttr(XAttributeDefine.XAttr_MaxMP_Total);
+ double num2 = this.Entity.Attributes.GetAttr(XAttributeDefine.XAttr_CurrentMP_Basic);
+ bool flag4 = this.Entity is XRole;
+ if (flag4)
+ {
+ int profID = XFastEnumIntEqualityComparer<RoleType>.ToInt((this.Entity.Attributes as XRoleAttributes).Profession);
+ string profHeadIcon = XSingleton<XProfessionSkillMgr>.singleton.GetProfHeadIcon(profID);
+ this.m_uiAvatar.spriteName = profHeadIcon;
+ }
+ else
+ {
+ this.m_uiAvatar.SetSprite(this.Entity.Present.PresentLib.Avatar, this.Entity.Present.PresentLib.Atlas, false);
+ }
+ this.m_uiName.SetText(this.Entity.Name);
+ this.m_uiLevel.SetText(this.Entity.Attributes.Level.ToString());
+ bool flag5 = attr == 0.0;
+ if (flag5)
+ {
+ this.m_uiSpriteHp.SetVisible(false);
+ this.m_uiHpLabel.SetVisible(false);
+ }
+ else
+ {
+ this.m_uiSpriteHp.SetVisible(true);
+ this.m_uiHpLabel.SetVisible(true);
+ this.m_uiSpriteHp.SetFillAmount((float)(num / attr));
+ this.m_uiHpLabel.SetText(string.Format("{0}/{1}", ((int)num).ToString(), ((int)attr).ToString()));
+ }
+ bool flag6 = num2 < 0.0;
+ if (flag6)
+ {
+ num2 = 0.0;
+ }
+ bool flag7 = attr2 == 0.0;
+ if (flag7)
+ {
+ this.m_uiMp.SetVisible(false);
+ this.m_uiMpLabel.SetVisible(false);
+ }
+ else
+ {
+ this.m_uiMp.SetVisible(true);
+ this.m_uiMpLabel.SetVisible(true);
+ this.m_uiMp.SetFillAmount((float)(num2 / attr2));
+ this.m_uiMpLabel.SetText(string.Format("{0}/{1}", ((int)num2).ToString(), ((int)attr2).ToString()));
+ }
+ }
+ }
+ }
+
+ private void _UpdateBoss()
+ {
+ bool deprecated = this.Entity.Deprecated;
+ if (!deprecated)
+ {
+ double attr = this.Entity.Attributes.GetAttr(XAttributeDefine.XAttr_MaxHP_Total);
+ double num = this.Entity.Attributes.GetAttr(XAttributeDefine.XAttr_CurrentHP_Basic);
+ bool flag = num < 0.0;
+ if (flag)
+ {
+ num = 0.0;
+ }
+ bool flag2 = num < attr && !XBattleEnemyInfo.bShow;
+ if (flag2)
+ {
+ XBattleEnemyInfo.bShow = true;
+ }
+ bool flag3 = this.m_Go == null;
+ if (!flag3)
+ {
+ XEntityStatistics.RowData byID = XSingleton<XEntityMgr>.singleton.EntityStatistics.GetByID(this.Entity.TypeID);
+ bool flag4 = byID.HpSection > 1u;
+ if (flag4)
+ {
+ this.m_uiProgressHp.SetTotalSection(byID.HpSection);
+ }
+ else
+ {
+ this.m_uiProgressHp.SetTotalSection(1u);
+ }
+ double attr2 = this.Entity.Attributes.GetAttr(XAttributeDefine.XAttr_MaxSuperArmor_Total);
+ double attr3 = this.Entity.Attributes.GetAttr(XAttributeDefine.XAttr_CurrentSuperArmor_Total);
+ this.m_uiAvatar.SetSprite(this.Entity.Present.PresentLib.Avatar, this.Entity.Present.PresentLib.Atlas, false);
+ this.m_uiName.SetText(this.Entity.Name);
+ bool flag5 = num == 0.0;
+ if (flag5)
+ {
+ this.m_uiProgressHp.SetVisible(false);
+ this.m_uiSuperArmor.SetVisible(false);
+ }
+ else
+ {
+ this.m_uiProgressHp.SetVisible(true);
+ this.m_uiSuperArmor.SetVisible(true);
+ this.m_uiProgressHp.value = (float)(num / attr);
+ bool flag6 = attr2 > 0.0;
+ if (flag6)
+ {
+ this.m_uiSuperArmor.gameObject.SetActive(true);
+ bool flag7 = attr3 <= attr2;
+ if (flag7)
+ {
+ this.m_uiSuperArmor.value = (float)(attr3 / attr2);
+ }
+ bool bIsSuperArmorBroken = this.m_bIsSuperArmorBroken;
+ if (bIsSuperArmorBroken)
+ {
+ this.m_uiSuperArmor.SetForegroundColor(new Color32(140, 219, 0, byte.MaxValue));
+ }
+ else
+ {
+ this.m_uiSuperArmor.SetForegroundColor(Color.white);
+ }
+ }
+ else
+ {
+ this.m_uiSuperArmor.value = 0f;
+ this.m_uiSuperArmor.gameObject.SetActive(false);
+ }
+ }
+ }
+ }
+ }
+
+ public void Update()
+ {
+ bool flag = this.Entity == null;
+ if (!flag)
+ {
+ bool flag2 = this.m_BuffMonitor != null;
+ if (flag2)
+ {
+ this.m_BuffMonitor.OnUpdate();
+ }
+ bool flag3 = this.m_Type == BattleEnemyType.BET_BOSS;
+ if (flag3)
+ {
+ this._UpdateBoss();
+ }
+ else
+ {
+ bool flag4 = this.m_Type == BattleEnemyType.BET_ROLE;
+ if (flag4)
+ {
+ this._UpdateRole();
+ }
+ }
+ }
+ }
+
+ public void SetVisible(bool bShow)
+ {
+ bool flag = this.m_Go != null;
+ if (flag)
+ {
+ this.m_Go.SetActive(bShow);
+ }
+ }
+
+ public bool IsRecentlyHit(float fMainTargetHitTime)
+ {
+ return this.m_HitTime > fMainTargetHitTime + XBattleEnemyInfo.fNotBeHitTime;
+ }
+
+ public void SetPosition(bool bAnim)
+ {
+ bool flag = this.m_CurSequence == this.m_PreSequence;
+ if (flag)
+ {
+ if (bAnim)
+ {
+ return;
+ }
+ bool flag2 = this.m_CurSequence == 0;
+ if (flag2)
+ {
+ this.m_PreSequence = 1;
+ }
+ else
+ {
+ this.m_PreSequence = 0;
+ }
+ }
+ else
+ {
+ bool flag3 = this.m_PreSequence * this.m_CurSequence != 0;
+ if (flag3)
+ {
+ bool flag4 = !bAnim;
+ if (flag4)
+ {
+ this.m_PreSequence = 0;
+ }
+ }
+ }
+ int num = this.m_PreSequence * 10 + this.m_CurSequence;
+ bool flag5 = this.m_uiPanel != null;
+ if (flag5)
+ {
+ if (bAnim)
+ {
+ this.m_uiPanel.SetDepth(30 - num);
+ this.m_uiPositionTween.SetTweenGroup(num);
+ this.m_uiPositionTween.PlayTween(true, -1f);
+ }
+ else
+ {
+ this.m_uiPanel.SetDepth(0);
+ this.m_uiPositionTween.ResetTweenByGroup(false, num);
+ }
+ }
+ this.m_PreSequence = this.m_CurSequence;
+ }
+
+ private void _OnTweenPositionFinished(IXUITweenTool tween)
+ {
+ bool flag = this.m_uiPanel != null;
+ if (flag)
+ {
+ this.m_uiPanel.SetDepth(0);
+ }
+ }
+
+ public void OnBeHit(ProjectDamageResult result)
+ {
+ bool flag = result.Value <= 0.0;
+ if (!flag)
+ {
+ bool flag2 = this.m_uiBeHitTween != null;
+ if (flag2)
+ {
+ this.m_uiBeHitTween.PlayTween(true, -1f);
+ }
+ this.m_HitTime = Time.time;
+ }
+ }
+
+ public void RefreshBuff()
+ {
+ bool flag = this.Entity == null || this.Entity.Deprecated;
+ if (!flag)
+ {
+ bool flag2 = this.Entity.Buffs != null && this.m_BuffMonitor != null;
+ if (flag2)
+ {
+ this.m_BuffMonitor.OnBuffChanged(this.Entity.Buffs.GetUIBuffList());
+ }
+ }
+ }
+
+ public void Unload()
+ {
+ DlgHandlerBase.EnsureUnload<XBuffMonitorHandler>(ref this.m_BuffMonitor);
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/XBattleEnemyInfo.cs.meta b/Client/Assets/Scripts/XMainClient/UI/XBattleEnemyInfo.cs.meta
new file mode 100644
index 00000000..fe97e831
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XBattleEnemyInfo.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: c91494eb396504f48818c0f84c729768
+timeCreated: 1611404537
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/XBattleEnemyInfoHandler.cs b/Client/Assets/Scripts/XMainClient/UI/XBattleEnemyInfoHandler.cs
new file mode 100644
index 00000000..1e2ea595
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XBattleEnemyInfoHandler.cs
@@ -0,0 +1,387 @@
+using System;
+using System.Collections.Generic;
+using UnityEngine;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class XBattleEnemyInfoHandler : DlgHandlerBase
+ {
+ public List<XBattleEnemyInfo> EnemyList
+ {
+ get
+ {
+ return this.m_EnemyList;
+ }
+ }
+
+ private int m_MainTargetIndex = -1;
+
+ private int m_NextMainTargetIndex = -1;
+
+ private BattleEnemyType m_Type;
+
+ private XUIPool m_BossPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ private XUIPool m_RolePool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ private List<XBattleEnemyInfo> m_EnemyList = new List<XBattleEnemyInfo>();
+
+ private int m_CurUICount = 0;
+
+ private int m_MaxUICount = 3;
+
+ private enum SwapRes
+ {
+ Success,
+ Fail,
+ NoUI
+ }
+
+ protected override void Init()
+ {
+ base.Init();
+ Transform transform = base.PanelObject.transform.Find("BossInfo");
+ this.m_BossPool.SetupPool(transform.parent.gameObject, transform.gameObject, 2u, false);
+ transform = base.PanelObject.transform.Find("RoleInfo");
+ this.m_RolePool.SetupPool(transform.parent.gameObject, transform.gameObject, 2u, false);
+ XBattleEnemyInfo.fNotBeHitTime = float.Parse(XSingleton<XGlobalConfig>.singleton.GetValue("BossNotBeHitTime"));
+ }
+
+ public override void OnUnload()
+ {
+ for (int i = 0; i < this.m_EnemyList.Count; i++)
+ {
+ this.m_EnemyList[i].Unload();
+ }
+ base.OnUnload();
+ }
+
+ public void InitBoss()
+ {
+ this.m_Type = BattleEnemyType.BET_BOSS;
+ this._Init();
+ }
+
+ public void InitRole()
+ {
+ this.m_Type = BattleEnemyType.BET_ROLE;
+ this._Init();
+ }
+
+ private void _Init()
+ {
+ for (int i = 0; i < this.m_EnemyList.Count; i++)
+ {
+ this.m_EnemyList[i].Unload();
+ }
+ this.m_EnemyList.Clear();
+ this.m_BossPool.ReturnAll(false);
+ this.m_RolePool.ReturnAll(false);
+ XBattleEnemyInfo.bShow = false;
+ this.m_MainTargetIndex = -1;
+ }
+
+ private XBattleEnemyInfo _CreateEnemy()
+ {
+ GameObject go = null;
+ bool flag = this.m_CurUICount < this.m_MaxUICount;
+ if (flag)
+ {
+ bool flag2 = this.m_Type == BattleEnemyType.BET_BOSS;
+ if (flag2)
+ {
+ go = this.m_BossPool.FetchGameObject(false);
+ }
+ else
+ {
+ go = this.m_RolePool.FetchGameObject(false);
+ }
+ this.m_CurUICount++;
+ }
+ XBattleEnemyInfo xbattleEnemyInfo = new XBattleEnemyInfo(this.m_EnemyList.Count, go, this.m_Type);
+ this.m_EnemyList.Add(xbattleEnemyInfo);
+ return xbattleEnemyInfo;
+ }
+
+ private void _TryGetEnemy()
+ {
+ bool flag = XSingleton<XEntityMgr>.singleton.Player == null;
+ if (!flag)
+ {
+ bool bSpectator = XSingleton<XScene>.singleton.bSpectator;
+ List<XEntity> opponent;
+ if (bSpectator)
+ {
+ bool isPVPScene = XSingleton<XScene>.singleton.IsPVPScene;
+ if (isPVPScene)
+ {
+ return;
+ }
+ opponent = XSingleton<XEntityMgr>.singleton.GetOpponent(XSingleton<XEntityMgr>.singleton.Player.WatchTo);
+ }
+ else
+ {
+ opponent = XSingleton<XEntityMgr>.singleton.GetOpponent(XSingleton<XEntityMgr>.singleton.Player);
+ }
+ for (int i = 0; i < opponent.Count; i++)
+ {
+ bool flag2 = this.m_Type == BattleEnemyType.BET_BOSS && !opponent[i].IsBoss;
+ if (!flag2)
+ {
+ bool flag3 = this.m_Type == BattleEnemyType.BET_ROLE && !opponent[i].IsBoss && !opponent[i].IsRole;
+ if (!flag3)
+ {
+ bool flag4 = opponent[i].IsDead || opponent[i].Deprecated;
+ if (!flag4)
+ {
+ ulong id = opponent[i].ID;
+ int j;
+ for (j = 0; j < this.m_EnemyList.Count; j++)
+ {
+ bool flag5 = this.m_EnemyList[j].Entity == opponent[i];
+ if (flag5)
+ {
+ break;
+ }
+ }
+ bool flag6 = j == this.m_EnemyList.Count;
+ if (flag6)
+ {
+ XBattleEnemyInfo xbattleEnemyInfo = this._CreateEnemy();
+ xbattleEnemyInfo.Entity = opponent[i];
+ xbattleEnemyInfo.SetPosition(false);
+ xbattleEnemyInfo.RefreshBuff();
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+
+ public override void OnUpdate()
+ {
+ bool flag = !this.active;
+ if (!flag)
+ {
+ base.OnUpdate();
+ this._RemoveDisappearEnemies();
+ this._TryGetEnemy();
+ for (int i = 0; i < this.m_EnemyList.Count; i++)
+ {
+ this.m_EnemyList[i].SetVisible(XBattleEnemyInfo.bShow);
+ }
+ bool flag2 = this.m_MainTargetIndex < 0 && XBattleEnemyInfo.bShow;
+ if (flag2)
+ {
+ this._UpdateMainTarget(true);
+ }
+ for (int j = 0; j < this.m_EnemyList.Count; j++)
+ {
+ this.m_EnemyList[j].Update();
+ }
+ this._UpdateMainTarget(false);
+ }
+ }
+
+ private void _DestroyEnemy(int index)
+ {
+ XBattleEnemyInfo xbattleEnemyInfo = this.m_EnemyList[index];
+ bool flag = xbattleEnemyInfo.m_Go != null;
+ if (flag)
+ {
+ bool flag2 = this.m_Type == BattleEnemyType.BET_BOSS;
+ if (flag2)
+ {
+ this.m_BossPool.ReturnInstance(xbattleEnemyInfo.m_Go, false);
+ }
+ else
+ {
+ this.m_RolePool.ReturnInstance(xbattleEnemyInfo.m_Go, false);
+ }
+ this.m_CurUICount--;
+ }
+ int sequenceNum = xbattleEnemyInfo.SequenceNum;
+ xbattleEnemyInfo.Unload();
+ this.m_EnemyList.RemoveAt(index);
+ for (int i = 0; i < this.m_EnemyList.Count; i++)
+ {
+ bool flag3 = this.m_EnemyList[i].SequenceNum > sequenceNum;
+ if (flag3)
+ {
+ XBattleEnemyInfo xbattleEnemyInfo2 = this.m_EnemyList[i];
+ int sequenceNum2 = xbattleEnemyInfo2.SequenceNum - 1;
+ xbattleEnemyInfo2.SequenceNum = sequenceNum2;
+ }
+ }
+ bool flag4 = this.m_MainTargetIndex == index;
+ if (flag4)
+ {
+ this.m_MainTargetIndex = -1;
+ }
+ else
+ {
+ bool flag5 = this.m_MainTargetIndex > index;
+ if (flag5)
+ {
+ this.m_MainTargetIndex--;
+ }
+ }
+ }
+
+ private void _RemoveDisappearEnemies()
+ {
+ bool flag = false;
+ for (int i = this.m_EnemyList.Count - 1; i >= 0; i--)
+ {
+ bool deprecated = this.m_EnemyList[i].Entity.Deprecated;
+ if (deprecated)
+ {
+ this._DestroyEnemy(i);
+ flag = true;
+ }
+ }
+ bool flag2 = flag;
+ if (flag2)
+ {
+ for (int j = 0; j < this.m_EnemyList.Count; j++)
+ {
+ bool flag3 = this.m_EnemyList[j].m_Go == null && this.m_CurUICount < this.m_MaxUICount;
+ if (flag3)
+ {
+ bool flag4 = this.m_Type == BattleEnemyType.BET_BOSS;
+ GameObject go;
+ if (flag4)
+ {
+ go = this.m_BossPool.FetchGameObject(false);
+ }
+ else
+ {
+ go = this.m_RolePool.FetchGameObject(false);
+ }
+ this.m_CurUICount++;
+ this.m_EnemyList[j].AttachUI(go);
+ }
+ this.m_EnemyList[j].SetPosition(false);
+ }
+ }
+ bool flag5 = this.m_EnemyList.Count == 0;
+ if (flag5)
+ {
+ XBattleEnemyInfo.bShow = false;
+ }
+ }
+
+ private void _UpdateMainTarget(bool bInit)
+ {
+ bool flag = !bInit && this.m_MainTargetIndex < 0;
+ if (!flag)
+ {
+ if (bInit)
+ {
+ this.m_MainTargetIndex = 0;
+ this._FindMainTarget(true);
+ }
+ else
+ {
+ this._FindMainTarget(this.m_EnemyList[this.m_MainTargetIndex].bNotBeHitRecently);
+ }
+ bool flag2 = this.m_NextMainTargetIndex == -1;
+ if (!flag2)
+ {
+ XBattleEnemyInfoHandler.SwapRes swapRes = this._SwapSequence(this.m_MainTargetIndex, this.m_NextMainTargetIndex);
+ bool flag3 = swapRes == XBattleEnemyInfoHandler.SwapRes.Success;
+ if (flag3)
+ {
+ this.m_EnemyList[this.m_MainTargetIndex].SetPosition(true);
+ this.m_EnemyList[this.m_NextMainTargetIndex].SetPosition(true);
+ this.m_MainTargetIndex = this.m_NextMainTargetIndex;
+ }
+ else
+ {
+ bool flag4 = swapRes == XBattleEnemyInfoHandler.SwapRes.NoUI;
+ if (flag4)
+ {
+ }
+ }
+ }
+ }
+ }
+
+ private void _FindMainTarget(bool bForceFind = false)
+ {
+ this.m_NextMainTargetIndex = -1;
+ bool flag = bForceFind || this.m_MainTargetIndex < 0;
+ float fMainTargetHitTime = 0f;
+ bool flag2 = this.m_MainTargetIndex >= 0;
+ if (flag2)
+ {
+ XEntity entity = this.m_EnemyList[this.m_MainTargetIndex].Entity;
+ bool flag3 = entity != null && entity.IsDead;
+ if (flag3)
+ {
+ flag = true;
+ fMainTargetHitTime = this.m_EnemyList[this.m_MainTargetIndex].HitTime - XBattleEnemyInfo.fNotBeHitTime + 1.5f;
+ }
+ else
+ {
+ fMainTargetHitTime = this.m_EnemyList[this.m_MainTargetIndex].HitTime;
+ }
+ }
+ bool flag4 = flag;
+ if (flag4)
+ {
+ for (int i = 0; i < this.m_EnemyList.Count; i++)
+ {
+ bool flag5 = this.m_EnemyList[i].IsRecentlyHit(fMainTargetHitTime) && this.m_EnemyList[i].Entity != null && !this.m_EnemyList[i].Entity.IsDead;
+ if (flag5)
+ {
+ this.m_NextMainTargetIndex = i;
+ break;
+ }
+ }
+ }
+ }
+
+ private XBattleEnemyInfoHandler.SwapRes _SwapSequence(int oneIndex, int otherIndex)
+ {
+ bool flag = oneIndex == otherIndex || oneIndex < 0 || otherIndex < 0 || oneIndex >= this.m_EnemyList.Count || otherIndex >= this.m_EnemyList.Count;
+ XBattleEnemyInfoHandler.SwapRes result;
+ if (flag)
+ {
+ result = XBattleEnemyInfoHandler.SwapRes.Fail;
+ }
+ else
+ {
+ bool flag2 = this.m_EnemyList[oneIndex].m_Go == null || this.m_EnemyList[otherIndex].m_Go == null;
+ if (flag2)
+ {
+ this.m_EnemyList[oneIndex].SwapData(this.m_EnemyList[otherIndex]);
+ result = XBattleEnemyInfoHandler.SwapRes.NoUI;
+ }
+ else
+ {
+ int sequenceNum = this.m_EnemyList[oneIndex].SequenceNum;
+ this.m_EnemyList[oneIndex].SequenceNum = this.m_EnemyList[otherIndex].SequenceNum;
+ this.m_EnemyList[otherIndex].SequenceNum = sequenceNum;
+ result = XBattleEnemyInfoHandler.SwapRes.Success;
+ }
+ }
+ return result;
+ }
+
+ public void OnBuffChange(ulong uid)
+ {
+ for (int i = 0; i < this.m_EnemyList.Count; i++)
+ {
+ bool flag = this.m_EnemyList[i].Entity.ID == uid;
+ if (flag)
+ {
+ this.m_EnemyList[i].RefreshBuff();
+ break;
+ }
+ }
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/XBattleEnemyInfoHandler.cs.meta b/Client/Assets/Scripts/XMainClient/UI/XBattleEnemyInfoHandler.cs.meta
new file mode 100644
index 00000000..be2795f8
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XBattleEnemyInfoHandler.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: e8746597d006b764eb0b95083be815a2
+timeCreated: 1611404753
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/XBattleOptionsHandler.cs b/Client/Assets/Scripts/XMainClient/UI/XBattleOptionsHandler.cs
new file mode 100644
index 00000000..6b8d202d
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XBattleOptionsHandler.cs
@@ -0,0 +1,45 @@
+using System;
+using UILib;
+using UnityEngine;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class XBattleOptionsHandler : DlgHandlerBase
+ {
+ private XOptionsDocument doc;
+
+ private IXUISlider m_CameraSpeed;
+
+ private int m_MinCameraSpeed;
+
+ private int m_MaxCameraSpeed;
+
+ protected override void Init()
+ {
+ base.Init();
+ this.m_CameraSpeed = (base.PanelObject.transform.Find("TailCameraSpeed/Bar").GetComponent("XUISlider") as IXUISlider);
+ string[] array = XSingleton<XGlobalConfig>.singleton.GetValue("TailCameraSpeedRange").Split(XGlobalConfig.SequenceSeparator);
+ this.m_MinCameraSpeed = int.Parse(array[0]);
+ this.m_MaxCameraSpeed = int.Parse(array[1]);
+ this.doc = XDocuments.GetSpecificDocument<XOptionsDocument>(XOptionsDocument.uuID);
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ this.m_CameraSpeed.Value = Mathf.Clamp01(Mathf.InverseLerp((float)this.m_MinCameraSpeed, (float)this.m_MaxCameraSpeed, (float)this.doc.GetValue(XOptionsDefine.OD_TAILCAMERA_SPEED)));
+ }
+
+ protected override void OnHide()
+ {
+ base.OnHide();
+ this.doc.SetValue(XOptionsDefine.OD_TAILCAMERA_SPEED, (int)Mathf.Lerp((float)this.m_MinCameraSpeed, (float)this.m_MaxCameraSpeed, this.m_CameraSpeed.Value), false);
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/XBattleOptionsHandler.cs.meta b/Client/Assets/Scripts/XMainClient/UI/XBattleOptionsHandler.cs.meta
new file mode 100644
index 00000000..62c0b9fb
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XBattleOptionsHandler.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 04d578eedf2f7e44abcb6ed12f50de01
+timeCreated: 1611402961
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/XBattleTeamTowerHandler.cs b/Client/Assets/Scripts/XMainClient/UI/XBattleTeamTowerHandler.cs
new file mode 100644
index 00000000..6375b502
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XBattleTeamTowerHandler.cs
@@ -0,0 +1,131 @@
+using System;
+using KKSG;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class XBattleTeamTowerHandler : DlgHandlerBase
+ {
+ public IXUILabel _total_coin;
+
+ public IXUILabel _total_manao;
+
+ public IXUILabel _req_level;
+
+ public IXUILabel _req_fight_point;
+
+ public IXUILabel _difficulty;
+
+ public XNumberTween _coin_tween;
+
+ public XNumberTween _manao_tween;
+
+ protected override void Init()
+ {
+ base.Init();
+ this._total_coin = (base.PanelObject.transform.Find("TotalCoin").GetComponent("XUILabel") as IXUILabel);
+ this._req_level = (base.PanelObject.transform.Find("InfoBack/Level").GetComponent("XUILabel") as IXUILabel);
+ this._req_fight_point = (base.PanelObject.transform.Find("InfoBack/FightPoint").GetComponent("XUILabel") as IXUILabel);
+ this._difficulty = (base.PanelObject.transform.Find("InfoBack/Difficulty").GetComponent("XUILabel") as IXUILabel);
+ this._coin_tween = XNumberTween.Create(this._total_coin);
+ this._total_manao = (base.PanelObject.transform.Find("TotalManao").GetComponent("XUILabel") as IXUILabel);
+ this._manao_tween = XNumberTween.Create(this._total_manao);
+ }
+
+ public void SetLeftTime(uint leftTime)
+ {
+ bool flag = DlgBase<BattleMain, BattleMainBehaviour>.singleton.IsLoaded();
+ if (flag)
+ {
+ DlgBase<BattleMain, BattleMainBehaviour>.singleton.SetLeftTime(leftTime, -1);
+ }
+ bool flag2 = DlgBase<SpectateSceneView, SpectateSceneBehaviour>.singleton.IsLoaded();
+ if (flag2)
+ {
+ DlgBase<SpectateSceneView, SpectateSceneBehaviour>.singleton.SetLeftTime(leftTime);
+ }
+ }
+
+ public void OnRefreshTowerInfo(PtcG2C_TowerSceneInfoNtf infoNtf)
+ {
+ bool flag = infoNtf.Data.leftTime > 0;
+ if (flag)
+ {
+ bool flag2 = DlgBase<BattleMain, BattleMainBehaviour>.singleton.IsLoaded();
+ if (flag2)
+ {
+ DlgBase<BattleMain, BattleMainBehaviour>.singleton.SetLeftTime((uint)infoNtf.Data.leftTime, -1);
+ }
+ bool flag3 = DlgBase<SpectateSceneView, SpectateSceneBehaviour>.singleton.IsLoaded();
+ if (flag3)
+ {
+ DlgBase<SpectateSceneView, SpectateSceneBehaviour>.singleton.SetLeftTime((uint)infoNtf.Data.leftTime);
+ }
+ }
+ bool flag4 = false;
+ bool flag5 = false;
+ for (int i = 0; i < infoNtf.Data.items.Count; i++)
+ {
+ ItemBrief itemBrief = infoNtf.Data.items[i];
+ bool flag6 = itemBrief.itemID == 1u;
+ if (flag6)
+ {
+ this._coin_tween.SetNumberWithTween((ulong)infoNtf.Data.items[0].itemCount, "", false, true);
+ flag4 = true;
+ }
+ else
+ {
+ bool flag7 = itemBrief.itemID == 93u;
+ if (flag7)
+ {
+ this._manao_tween.SetNumberWithTween((ulong)infoNtf.Data.items[1].itemCount, "", false, true);
+ flag5 = true;
+ }
+ }
+ }
+ bool flag8 = !flag4;
+ if (flag8)
+ {
+ this._coin_tween.SetNumberWithTween(0UL, "", false, true);
+ }
+ bool flag9 = !flag5;
+ if (flag9)
+ {
+ this._manao_tween.SetNumberWithTween(0UL, "", false, true);
+ }
+ this._req_level.SetText(infoNtf.Data.curTowerFloor.ToString());
+ double attr = XSingleton<XEntityMgr>.singleton.Player.PlayerAttributes.GetAttr(XAttributeDefine.XAttr_POWER_POINT_Total);
+ SceneTable.RowData sceneData = XSingleton<XSceneMgr>.singleton.GetSceneData(XSingleton<XScene>.singleton.SceneID);
+ double num = (double)sceneData.RecommendPower * 1.0;
+ bool flag10 = sceneData != null;
+ if (flag10)
+ {
+ num = (double)sceneData.RecommendPower * 1.0;
+ }
+ double num2 = (attr - num * 1.0) / num * 1.0;
+ bool flag11 = num2 > 0.01;
+ if (flag11)
+ {
+ this._req_fight_point.SetText(num.ToString());
+ this._req_fight_point.SetColor(Color.green);
+ }
+ else
+ {
+ bool flag12 = num2 > -0.01;
+ if (flag12)
+ {
+ this._req_fight_point.SetText(string.Format("[e2ca9e]{0}[-]", num));
+ }
+ else
+ {
+ this._req_fight_point.SetText(num.ToString());
+ this._req_fight_point.SetColor(Color.red);
+ }
+ }
+ this._difficulty.SetText("");
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/XBattleTeamTowerHandler.cs.meta b/Client/Assets/Scripts/XMainClient/UI/XBattleTeamTowerHandler.cs.meta
new file mode 100644
index 00000000..372d0248
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XBattleTeamTowerHandler.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 45b559979ab42584ba49e824d0e9ebee
+timeCreated: 1611403648
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/XBossRefreshAnimHander.cs b/Client/Assets/Scripts/XMainClient/UI/XBossRefreshAnimHander.cs
new file mode 100644
index 00000000..d0b36f04
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XBossRefreshAnimHander.cs
@@ -0,0 +1,294 @@
+using System;
+using System.Collections.Generic;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ public class XBossRefreshAnimHander : XSingleton<XBossRefreshAnimHander>
+ {
+ private GameObject PanelObject;
+
+ private IXUILabel m_lblTitle;
+
+ private IXUISprite m_sprIcon;
+
+ private IXUILabel m_lblDiff;
+
+ private IXUIProgress m_slider;
+
+ private IXUISprite m_sprBuff1;
+
+ private IXUILabel m_lblBuff1;
+
+ private IXUISprite m_sprBuff2;
+
+ private IXUILabel m_lblBuff2;
+
+ public GameObject m_objFx;
+
+ public IXUITweenTool m_tween1;
+
+ public IXUITweenTool m_tween2;
+
+ public IXUITweenTool m_tween3;
+
+ private uint m_timertoken = 0u;
+
+ public XBossRefreshAnimHander.State state = XBossRefreshAnimHander.State.None;
+
+ public List<int> frames = new List<int>();
+
+ private XBossBushDocument _doc = null;
+
+ private XElapseTimer timePass = new XElapseTimer();
+
+ private uint m_accTime = 0u;
+
+ private uint m_allCnt = 35u;
+
+ private uint m_playCnt = 0u;
+
+ public enum State
+ {
+ BEGIN,
+ PLAY,
+ Idle,
+ FADE,
+ None
+ }
+
+ public void Init(GameObject _go)
+ {
+ this._doc = (XSingleton<XGame>.singleton.Doc.GetXComponent(XBossBushDocument.uuID) as XBossBushDocument);
+ this.PanelObject = _go;
+ this.m_lblTitle = (_go.transform.Find("Avatar/Name").GetComponent("XUILabel") as IXUILabel);
+ this.m_sprIcon = (_go.transform.Find("Avatar/Avatar").GetComponent("XUISprite") as IXUISprite);
+ this.m_lblDiff = (_go.transform.Find("Diff").GetComponent("XUILabel") as IXUILabel);
+ this.m_slider = (_go.transform.Find("Progress").GetComponent("XUIProgress") as IXUIProgress);
+ this.m_sprBuff1 = (_go.transform.Find("T/Icon1").GetComponent("XUISprite") as IXUISprite);
+ this.m_lblBuff1 = (_go.transform.Find("T/Icon1/T2").GetComponent("XUILabel") as IXUILabel);
+ this.m_sprBuff2 = (_go.transform.Find("T/Icon").GetComponent("XUISprite") as IXUISprite);
+ this.m_lblBuff2 = (_go.transform.Find("T/Icon/T2").GetComponent("XUILabel") as IXUILabel);
+ this.m_objFx = _go.transform.Find("Avatar/FX").gameObject;
+ this.m_tween1 = (_go.transform.Find("Avatar/FX/q1").GetComponent("XUIPlayTween") as IXUITweenTool);
+ this.m_tween2 = (_go.transform.Find("Avatar/FX/q2").GetComponent("XUIPlayTween") as IXUITweenTool);
+ this.m_tween3 = (_go.transform.Find("Avatar/FX/q3").GetComponent("XUIPlayTween") as IXUITweenTool);
+ this.frames.Clear();
+ string value = XSingleton<XGlobalConfig>.singleton.GetValue("BossRush_Ani");
+ string[] array = value.Split(new char[]
+ {
+ '|'
+ });
+ for (int i = 0; i < array.Length; i++)
+ {
+ this.frames.Add(int.Parse(array[i]));
+ }
+ }
+
+ public void Show()
+ {
+ this._doc = XDocuments.GetSpecificDocument<XBossBushDocument>(XBossBushDocument.uuID);
+ this.state = XBossRefreshAnimHander.State.BEGIN;
+ bool flag = !this.PanelObject.activeSelf;
+ if (flag)
+ {
+ this.PanelObject.SetActive(true);
+ }
+ bool flag2 = this.timePass != null;
+ if (flag2)
+ {
+ this.timePass.LeftTime = 10f;
+ }
+ }
+
+ public void OnUpdate()
+ {
+ bool flag = this.state == XBossRefreshAnimHander.State.BEGIN;
+ if (flag)
+ {
+ this.m_lblDiff.gameObject.SetActive(false);
+ this.m_slider.gameObject.SetActive(true);
+ bool activeSelf = this.m_objFx.activeSelf;
+ if (activeSelf)
+ {
+ this.m_objFx.SetActive(false);
+ }
+ this.m_playCnt = 0u;
+ this.m_accTime = 0u;
+ this.state = XBossRefreshAnimHander.State.PLAY;
+ this.m_slider.value = 0f;
+ }
+ else
+ {
+ bool flag2 = this.state == XBossRefreshAnimHander.State.PLAY;
+ if (flag2)
+ {
+ this.timePass.Update();
+ this.m_accTime = (uint)(this.timePass.PassTime * 1000f);
+ bool flag3 = (ulong)this.m_accTime > (ulong)((long)this.GetFrame(this.m_playCnt));
+ if (flag3)
+ {
+ this.timePass.LeftTime = 1f;
+ this.m_accTime = 0u;
+ this.m_playCnt += 1u;
+ this.UpdateSlider();
+ this.RefreshRandBoss();
+ bool flag4 = this.m_playCnt >= this.m_allCnt;
+ if (flag4)
+ {
+ this.m_playCnt = 0u;
+ this.state = XBossRefreshAnimHander.State.Idle;
+ }
+ }
+ }
+ else
+ {
+ bool flag5 = this.state == XBossRefreshAnimHander.State.Idle;
+ if (flag5)
+ {
+ this.state = XBossRefreshAnimHander.State.None;
+ this.m_lblDiff.gameObject.SetActive(true);
+ this.m_slider.gameObject.SetActive(false);
+ bool flag6 = this._doc != null && this._doc.respData != null;
+ if (flag6)
+ {
+ this.RefreshBoss(this._doc.respData.confid, false);
+ }
+ this.PlayFxEff();
+ this.m_timertoken = XSingleton<XTimerMgr>.singleton.SetTimer(1f, new XTimerMgr.ElapsedEventHandler(this.PlayEndTimer), null);
+ }
+ else
+ {
+ bool flag7 = this.state == XBossRefreshAnimHander.State.FADE;
+ if (flag7)
+ {
+ bool activeSelf2 = this.PanelObject.activeSelf;
+ if (activeSelf2)
+ {
+ this.PanelObject.SetActive(false);
+ }
+ bool activeSelf3 = this.m_objFx.activeSelf;
+ if (activeSelf3)
+ {
+ this.m_objFx.SetActive(false);
+ }
+ DlgBase<BossRushDlg, BossRushBehavior>.singleton.PlayRefreshEff();
+ DlgBase<BossRushDlg, BossRushBehavior>.singleton.DelayRefresh();
+ this.state = XBossRefreshAnimHander.State.None;
+ }
+ }
+ }
+ }
+ }
+
+ private int GetFrame(uint index)
+ {
+ bool flag = this.frames.Count <= 0;
+ int result;
+ if (flag)
+ {
+ result = 15;
+ }
+ else
+ {
+ bool flag2 = (long)this.frames.Count <= (long)((ulong)index);
+ if (flag2)
+ {
+ result = this.frames[this.frames.Count - 1];
+ }
+ else
+ {
+ result = this.frames[(int)index];
+ }
+ }
+ return result;
+ }
+
+ public void OnUnload()
+ {
+ bool flag = this.m_timertoken > 0u;
+ if (flag)
+ {
+ XSingleton<XTimerMgr>.singleton.KillTimer(this.m_timertoken);
+ }
+ }
+
+ private void PlayFxEff()
+ {
+ this.m_objFx.SetActive(true);
+ this.m_tween1.ResetTween(true);
+ this.m_tween2.ResetTween(true);
+ this.m_tween3.ResetTween(true);
+ this.m_tween1.PlayTween(true, -1f);
+ this.m_tween2.ResetTween(true);
+ this.m_tween3.ResetTween(true);
+ }
+
+ private void PlayEndTimer(object o)
+ {
+ this.state = XBossRefreshAnimHander.State.FADE;
+ }
+
+ private void RefreshRandBoss()
+ {
+ int num = XBossBushDocument.bossRushTable.Table.Length - 2;
+ int uid = UnityEngine.Random.Range(1, num);
+ this.RefreshBoss(uid, true);
+ }
+
+ private void RefreshBoss(int uid, bool rand)
+ {
+ BossRushTable.RowData bossRushRow = this._doc.GetBossRushRow(uid);
+ XEntityStatistics.RowData byID = XSingleton<XEntityMgr>.singleton.EntityStatistics.GetByID((uint)bossRushRow.bossid);
+ XEntityPresentation.RowData byPresentID = XSingleton<XEntityMgr>.singleton.EntityInfo.GetByPresentID(byID.PresentID);
+ this.m_lblTitle.SetText(this.MakeBossName(byID.Name, (int)bossRushRow.bossdifficult[0]));
+ this.m_lblDiff.SetText(XStringDefineProxy.GetString("BOSSRUSH_DIF" + bossRushRow.bossdifficult[0]));
+ this.m_sprIcon.SetSprite(byPresentID.Avatar, byPresentID.Atlas, false);
+ if (rand)
+ {
+ BossRushBuffTable.RowData[] randBuffs = this._doc.GetRandBuffs();
+ this.m_sprBuff1.SetSprite(randBuffs[0].icon);
+ this.m_lblBuff1.SetText(randBuffs[0].Comment);
+ this.m_sprBuff2.SetSprite(randBuffs[1].icon);
+ this.m_lblBuff2.SetText(randBuffs[1].Comment);
+ int quality = randBuffs[0].Quality;
+ int quality2 = randBuffs[1].Quality;
+ string value = XSingleton<XGlobalConfig>.singleton.GetValue("Quality" + quality + "Color");
+ string value2 = XSingleton<XGlobalConfig>.singleton.GetValue("Quality" + quality2 + "Color");
+ this.m_lblBuff1.SetColor(XSingleton<UiUtility>.singleton.ParseColor(value, 0));
+ this.m_sprBuff1.SetColor(XSingleton<UiUtility>.singleton.ParseColor(value, 0));
+ this.m_lblBuff2.SetColor(XSingleton<UiUtility>.singleton.ParseColor(value2, 0));
+ this.m_sprBuff2.SetColor(XSingleton<UiUtility>.singleton.ParseColor(value2, 0));
+ }
+ else
+ {
+ this.m_sprBuff1.SetSprite(this._doc.bossBuff1Row.icon);
+ this.m_lblBuff1.SetText(this._doc.bossBuff1Row.Comment);
+ this.m_sprBuff2.SetSprite(this._doc.bossBuff2Row.icon);
+ this.m_lblBuff2.SetText(this._doc.bossBuff2Row.Comment);
+ int quality3 = this._doc.bossBuff1Row.Quality;
+ int quality4 = this._doc.bossBuff2Row.Quality;
+ string value3 = XSingleton<XGlobalConfig>.singleton.GetValue("Quality" + quality3 + "Color");
+ string value4 = XSingleton<XGlobalConfig>.singleton.GetValue("Quality" + quality4 + "Color");
+ this.m_lblBuff1.SetColor(XSingleton<UiUtility>.singleton.ParseColor(value3, 0));
+ this.m_sprBuff1.SetColor(XSingleton<UiUtility>.singleton.ParseColor(value3, 0));
+ this.m_lblBuff2.SetColor(XSingleton<UiUtility>.singleton.ParseColor(value4, 0));
+ this.m_sprBuff2.SetColor(XSingleton<UiUtility>.singleton.ParseColor(value4, 0));
+ }
+ }
+
+ private string MakeBossName(string name, int diff)
+ {
+ return DlgBase<BossRushDlg, BossRushBehavior>.singleton.colors[diff - 1] + name;
+ }
+
+ private void UpdateSlider()
+ {
+ float value = this.m_playCnt / this.m_allCnt;
+ this.m_slider.value = value;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/XBossRefreshAnimHander.cs.meta b/Client/Assets/Scripts/XMainClient/UI/XBossRefreshAnimHander.cs.meta
new file mode 100644
index 00000000..00c02b1c
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XBossRefreshAnimHander.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 1444a62a9a6feea4392cdc1f4ef6b3d1
+timeCreated: 1611403254
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/XBossRewardDlg.cs b/Client/Assets/Scripts/XMainClient/UI/XBossRewardDlg.cs
new file mode 100644
index 00000000..bef8cf76
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XBossRewardDlg.cs
@@ -0,0 +1,87 @@
+using System;
+using System.Collections.Generic;
+using UILib;
+using UnityEngine;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ public class XBossRewardDlg : XSingleton<XBossRewardDlg>
+ {
+ private XGuildDragonDocument _Doc = null;
+
+ private GameObject PanelObject;
+
+ private IXUIButton m_lblClose;
+
+ public IXUIScrollView m_ScrollView;
+
+ private IXUIWrapContent m_WrapContent;
+
+ public void Init(GameObject _go)
+ {
+ bool flag = this.PanelObject == null || this.PanelObject != _go;
+ if (flag)
+ {
+ this.PanelObject = _go;
+ this._Doc = XDocuments.GetSpecificDocument<XGuildDragonDocument>(XGuildDragonDocument.uuID);
+ this.m_lblClose = (_go.transform.Find("Bg/Close").GetComponent("XUIButton") as IXUIButton);
+ this.m_lblClose.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnCloseClick));
+ this.m_ScrollView = (_go.transform.Find("Bg/ScrollView").GetComponent("XUIScrollView") as IXUIScrollView);
+ this.m_WrapContent = (_go.transform.Find("Bg/ScrollView/WrapContent").GetComponent("XUIWrapContent") as IXUIWrapContent);
+ this.m_WrapContent.RegisterItemUpdateEventHandler(new WrapItemUpdateEventHandler(this.GuildRankWrapContentItemUpdated));
+ }
+ this.RefreshGuildRoleRank();
+ }
+
+ private void GuildRankWrapContentItemUpdated(Transform t, int index)
+ {
+ List<Seq2<uint>> currentRewardList = this._Doc.currentRewardList;
+ bool flag = index < 0 || index >= currentRewardList.Count;
+ if (!flag)
+ {
+ Seq2<uint> seq = currentRewardList[index];
+ XSingleton<XItemDrawerMgr>.singleton.normalItemDrawer.DrawItem(t.Find("ItemTpl").gameObject, (int)seq.value0, (int)seq.value1, false);
+ IXUISprite ixuisprite = t.Find("ItemTpl/Icon").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.ID = (ulong)seq.value0;
+ ixuisprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(XSingleton<UiUtility>.singleton.OnItemClick));
+ IXUILabel ixuilabel = t.Find("Name").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel.SetText(this.GetName(index));
+ IXUILabel ixuilabel2 = t.Find("Des").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel2.SetText(this.GetDes(index));
+ IXUILabel ixuilabel3 = t.Find("ItemTpl/ssssss").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel3.SetText(this.GetLabel(index));
+ }
+ }
+
+ private string GetName(int index)
+ {
+ string str = this._Doc.dicRewardName[index];
+ return XStringDefineProxy.GetString(str + "_TITLE");
+ }
+
+ private string GetLabel(int index)
+ {
+ string key = this._Doc.dicRewardName[index];
+ return XStringDefineProxy.GetString(key);
+ }
+
+ private string GetDes(int index)
+ {
+ string key = this._Doc.dicRewardDes[index];
+ return XStringDefineProxy.GetString(key);
+ }
+
+ public void RefreshGuildRoleRank()
+ {
+ this.m_WrapContent.SetContentCount(this._Doc.currentRewardList.Count, false);
+ this.m_ScrollView.ResetPosition();
+ }
+
+ private bool OnCloseClick(IXUIButton button)
+ {
+ this.PanelObject.SetActive(false);
+ return true;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/XBossRewardDlg.cs.meta b/Client/Assets/Scripts/XMainClient/UI/XBossRewardDlg.cs.meta
new file mode 100644
index 00000000..75bde497
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XBossRewardDlg.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: a635b2e61f191404997d4bb1322f3f9d
+timeCreated: 1611404288
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/XBriefLevelupBehaviour.cs b/Client/Assets/Scripts/XMainClient/UI/XBriefLevelupBehaviour.cs
new file mode 100644
index 00000000..496ec30f
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XBriefLevelupBehaviour.cs
@@ -0,0 +1,25 @@
+using System;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class XBriefLevelupBehaviour : DlgBehaviourBase
+ {
+ public IXUIButton m_Close;
+
+ public IXUISprite m_Close2;
+
+ public XUIPool m_FuncPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ private void Awake()
+ {
+ this.m_Close = (base.transform.Find("Bg/Close").GetComponent("XUIButton") as IXUIButton);
+ this.m_Close2 = (base.transform.Find("Bg").GetComponent("XUISprite") as IXUISprite);
+ Transform transform = base.transform.Find("Bg/Panel/Tpl");
+ this.m_FuncPool.SetupPool(transform.parent.gameObject, transform.gameObject, 3u, false);
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/XBriefLevelupBehaviour.cs.meta b/Client/Assets/Scripts/XMainClient/UI/XBriefLevelupBehaviour.cs.meta
new file mode 100644
index 00000000..fda10f10
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XBriefLevelupBehaviour.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: d05fbf960c15b224598294f6a9e9f3fc
+timeCreated: 1611404587
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/XBriefLevelupView.cs b/Client/Assets/Scripts/XMainClient/UI/XBriefLevelupView.cs
new file mode 100644
index 00000000..d50861f0
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XBriefLevelupView.cs
@@ -0,0 +1,362 @@
+using System;
+using KKSG;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class XBriefLevelupView : DlgBase<XBriefLevelupView, XBriefLevelupBehaviour>
+ {
+ public override string fileName
+ {
+ get
+ {
+ return "GameSystem/BriefLevelupDlg";
+ }
+ }
+
+ public override int group
+ {
+ get
+ {
+ return 1;
+ }
+ }
+
+ public override bool autoload
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ private XFPStrengthenDocument _doc = null;
+
+ private XDailyActivitiesDocument _activityDoc = null;
+
+ public XUIPool m_FpStrengthenPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ public XUIPool m_FpButtonPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ private XSysDefine[] _Funcs = new XSysDefine[]
+ {
+ XSysDefine.XSys_GuildDailyTask,
+ XSysDefine.XSys_Reward_Activity,
+ XSysDefine.XSys_Level_Elite,
+ XSysDefine.XSys_Activity_Nest
+ };
+
+ private XBriefLevelupView.DataItem[] DataArray;
+
+ private class DataItem
+ {
+ public int Index
+ {
+ get
+ {
+ return this.m_index;
+ }
+ }
+
+ private int m_index = 0;
+
+ public XSysDefine SysId = XSysDefine.XSys_None;
+
+ public bool IsOpen = false;
+
+ public bool IsRecommend = false;
+
+ public string RecommendTxt = "";
+
+ public string NameTxt = "";
+
+ public string TipsTxt = "";
+
+ public string IconTxt = "";
+
+ public DataItem(int index)
+ {
+ this.m_index = index;
+ }
+ }
+
+ protected override void Init()
+ {
+ this._doc = XDocuments.GetSpecificDocument<XFPStrengthenDocument>(XFPStrengthenDocument.uuID);
+ this._activityDoc = XDocuments.GetSpecificDocument<XDailyActivitiesDocument>(XDailyActivitiesDocument.uuID);
+ this.DataArray = new XBriefLevelupView.DataItem[this._Funcs.Length];
+ for (int i = 0; i < this.DataArray.Length; i++)
+ {
+ XBriefLevelupView.DataItem dataItem = new XBriefLevelupView.DataItem(i);
+ dataItem.SysId = this._Funcs[i];
+ this.DataArray[i] = dataItem;
+ this.SetRecommendInfo(this.DataArray[i].Index, ref this.DataArray[i].IsRecommend, ref this.DataArray[i].RecommendTxt);
+ this.SetBaseInfo(this.DataArray[i].SysId, ref this.DataArray[i].IconTxt, ref this.DataArray[i].NameTxt);
+ }
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ this._activityDoc.QueryDailyActivityData();
+ }
+
+ public override void RegisterEvent()
+ {
+ base.uiBehaviour.m_Close.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnCloseClicked));
+ base.uiBehaviour.m_Close2.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnCloseClicked));
+ }
+
+ public void FillContent()
+ {
+ this.FillData();
+ base.uiBehaviour.m_FuncPool.ReturnAll(false);
+ Vector3 tplPos = base.uiBehaviour.m_FuncPool.TplPos;
+ for (int i = 0; i < this.DataArray.Length; i++)
+ {
+ XBriefLevelupView.DataItem dataItem = this.DataArray[i];
+ GameObject gameObject = base.uiBehaviour.m_FuncPool.FetchGameObject(false);
+ gameObject.transform.localPosition = new Vector3(tplPos.x + (float)(i * base.uiBehaviour.m_FuncPool.TplWidth), tplPos.y);
+ IXUISprite ixuisprite = gameObject.transform.Find("Icon").GetComponent("XUISprite") as IXUISprite;
+ IXUILabel ixuilabel = gameObject.transform.Find("Name").GetComponent("XUILabel") as IXUILabel;
+ IXUISprite ixuisprite2 = gameObject.GetComponent("XUISprite") as IXUISprite;
+ GameObject gameObject2 = gameObject.transform.Find("Recommend").gameObject;
+ GameObject gameObject3 = gameObject.transform.Find("Noopen").gameObject;
+ IXUILabel ixuilabel2 = gameObject.transform.Find("Noopen/T").GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel3 = gameObject.transform.Find("Recommend/Exp").GetComponent("XUILabel") as IXUILabel;
+ gameObject2.SetActive(dataItem.IsRecommend);
+ ixuilabel3.SetText(dataItem.RecommendTxt);
+ gameObject3.SetActive(!dataItem.IsOpen);
+ ixuilabel2.SetText(dataItem.TipsTxt);
+ ixuisprite.SetSprite(dataItem.IconTxt);
+ ixuilabel.SetText(dataItem.NameTxt);
+ ixuisprite2.ID = (ulong)((long)XFastEnumIntEqualityComparer<XSysDefine>.ToInt(dataItem.SysId));
+ ixuisprite2.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.GoToStrengthSys));
+ }
+ }
+
+ private void FillData()
+ {
+ for (int i = 0; i < this.DataArray.Length; i++)
+ {
+ this.SysIsOpen(this.DataArray[i].SysId, ref this.DataArray[i].IsOpen, ref this.DataArray[i].TipsTxt);
+ }
+ for (int j = 0; j < this.DataArray.Length; j++)
+ {
+ for (int k = j + 1; k < this.DataArray.Length; k++)
+ {
+ bool flag = !this.DataArray[j].IsOpen && this.DataArray[k].IsOpen;
+ if (flag)
+ {
+ XBriefLevelupView.DataItem dataItem = this.DataArray[j];
+ this.DataArray[j] = this.DataArray[k];
+ this.DataArray[k] = dataItem;
+ }
+ }
+ }
+ }
+
+ private void SysIsOpen(XSysDefine define, ref bool isOpen, ref string tips)
+ {
+ bool flag = !XSingleton<XGameSysMgr>.singleton.IsSystemOpened(define);
+ if (flag)
+ {
+ isOpen = false;
+ tips = XSingleton<XStringTable>.singleton.GetString("NotOpen");
+ }
+ else
+ {
+ if (define <= XSysDefine.XSys_Reward_Activity)
+ {
+ if (define != XSysDefine.XSys_Level_Elite)
+ {
+ if (define == XSysDefine.XSys_Reward_Activity)
+ {
+ bool flag2 = this._activityDoc.IsFinishedAllActivity();
+ if (flag2)
+ {
+ isOpen = false;
+ tips = XSingleton<XStringTable>.singleton.GetString("LEVEL_CHALLENGE_FINISH");
+ return;
+ }
+ }
+ }
+ else
+ {
+ XExpeditionDocument specificDocument = XDocuments.GetSpecificDocument<XExpeditionDocument>(XExpeditionDocument.uuID);
+ int num = specificDocument.GetDayCount(TeamLevelType.TeamLevelAbyss, null);
+ bool flag3 = num <= 0;
+ if (flag3)
+ {
+ isOpen = false;
+ tips = XSingleton<XStringTable>.singleton.GetString("ERR_TEAM_TOWER_DAYCOUNT");
+ return;
+ }
+ num = (int)XSingleton<XGame>.singleton.Doc.XBagDoc.GetVirtualItemCount(ItemEnum.FATIGUE);
+ bool flag4 = num < XSingleton<XGlobalConfig>.singleton.GetInt("EliteNeedEnergy");
+ if (flag4)
+ {
+ isOpen = false;
+ tips = XSingleton<XStringTable>.singleton.GetString("ERR_SCENE_NOFATIGUE");
+ return;
+ }
+ }
+ }
+ else if (define != XSysDefine.XSys_Activity_Nest)
+ {
+ if (define == XSysDefine.XSys_GuildDailyTask)
+ {
+ XTaskDocument specificDocument2 = XDocuments.GetSpecificDocument<XTaskDocument>(XTaskDocument.uuID);
+ TaskStatus taskStatue = specificDocument2.GetTaskStatue();
+ bool flag5 = taskStatue == TaskStatus.TaskStatus_Over;
+ if (flag5)
+ {
+ isOpen = false;
+ tips = XSingleton<XStringTable>.singleton.GetString("LEVEL_CHALLENGE_FINISH");
+ return;
+ }
+ }
+ }
+ else
+ {
+ XExpeditionDocument specificDocument3 = XDocuments.GetSpecificDocument<XExpeditionDocument>(XExpeditionDocument.uuID);
+ int num2 = specificDocument3.GetDayCount(TeamLevelType.TeamLevelNest, null);
+ bool flag6 = num2 <= 0;
+ if (flag6)
+ {
+ isOpen = false;
+ tips = XSingleton<XStringTable>.singleton.GetString("ERR_TEAM_TOWER_DAYCOUNT");
+ return;
+ }
+ num2 = (int)XSingleton<XGame>.singleton.Doc.XBagDoc.GetVirtualItemCount(ItemEnum.FATIGUE);
+ bool flag7 = num2 < XSingleton<XGlobalConfig>.singleton.GetInt("NestNeedEnergy");
+ if (flag7)
+ {
+ isOpen = false;
+ tips = XSingleton<XStringTable>.singleton.GetString("ERR_SCENE_NOFATIGUE");
+ return;
+ }
+ }
+ isOpen = true;
+ }
+ }
+
+ private void SetRecommendInfo(int index, ref bool isRecommon, ref string recommonTxt)
+ {
+ string value = XSingleton<XGlobalConfig>.singleton.GetValue("LevelUpExpText");
+ bool flag = string.IsNullOrEmpty(value);
+ if (!flag)
+ {
+ string[] array = value.Split(XGlobalConfig.ListSeparator);
+ bool flag2 = array == null;
+ if (!flag2)
+ {
+ int num = 0;
+ while (num < array.Length && num < this.DataArray.Length)
+ {
+ bool flag3 = num != index;
+ if (!flag3)
+ {
+ string[] array2 = array[num].Split(XGlobalConfig.SequenceSeparator);
+ bool flag4 = array2 == null;
+ if (!flag4)
+ {
+ bool flag5 = array2.Length != 0;
+ if (flag5)
+ {
+ isRecommon = (array2[0] == "1");
+ }
+ bool flag6 = array2.Length > 1;
+ if (flag6)
+ {
+ recommonTxt = array2[1];
+ }
+ break;
+ }
+ }
+ num++;
+ }
+ }
+ }
+ }
+
+ private void SetBaseInfo(XSysDefine define, ref string iconTxt, ref string nameTxt)
+ {
+ FpStrengthenTable.RowData rowData = this._doc.SearchBySysID(define);
+ bool flag = rowData == null;
+ if (flag)
+ {
+ XSingleton<XDebug>.singleton.AddErrorLog("error,no this data in BQ", "---->", define.ToString(), null, null, null);
+ }
+ else
+ {
+ iconTxt = rowData.BQImageID;
+ nameTxt = rowData.BQName;
+ }
+ }
+
+ private XBriefLevelupView.DataItem GetDataBySystemId(XSysDefine systemId)
+ {
+ for (int i = 0; i < this.DataArray.Length; i++)
+ {
+ bool flag = this.DataArray[i].SysId == systemId;
+ if (flag)
+ {
+ return this.DataArray[i];
+ }
+ }
+ return null;
+ }
+
+ public bool OnCloseClicked(IXUIButton sp)
+ {
+ this.SetVisible(false, true);
+ return true;
+ }
+
+ public void OnCloseClicked(IXUISprite sp)
+ {
+ this.SetVisible(false, true);
+ }
+
+ public void GoToStrengthSys(IXUISprite sp)
+ {
+ this.SetVisible(false, true);
+ XBriefLevelupView.DataItem dataBySystemId = this.GetDataBySystemId((XSysDefine)sp.ID);
+ bool flag = dataBySystemId == null || !dataBySystemId.IsOpen;
+ if (!flag)
+ {
+ XSysDefine sysId = dataBySystemId.SysId;
+ if (sysId <= XSysDefine.XSys_Reward_Activity)
+ {
+ if (sysId != XSysDefine.XSys_Level_Elite)
+ {
+ if (sysId == XSysDefine.XSys_Reward_Activity)
+ {
+ DlgBase<RewardSystemDlg, TabDlgBehaviour>.singleton.ShowWorkGameSystem(XSysDefine.XSys_Reward_Activity);
+ }
+ }
+ else
+ {
+ DlgBase<DungeonSelect, DungeonSelectBehaviour>.singleton.AutoShowLastChapter(1u, false);
+ }
+ }
+ else if (sysId != XSysDefine.XSys_Activity_Nest)
+ {
+ if (sysId == XSysDefine.XSys_GuildDailyTask)
+ {
+ XSingleton<UIManager>.singleton.CloseAllUI();
+ XSingleton<XGameSysMgr>.singleton.OpenSystem(XSysDefine.XSys_GuildDailyTask, 0UL);
+ }
+ }
+ else
+ {
+ XSingleton<XGameSysMgr>.singleton.OpenSystem(dataBySystemId.SysId, 0UL);
+ }
+ }
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/XBriefLevelupView.cs.meta b/Client/Assets/Scripts/XMainClient/UI/XBriefLevelupView.cs.meta
new file mode 100644
index 00000000..7284bdc3
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XBriefLevelupView.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: dfa3a28ac84e3c645a56391af9c25b8e
+timeCreated: 1611404694
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/XBriefStrengthenBehaviour.cs b/Client/Assets/Scripts/XMainClient/UI/XBriefStrengthenBehaviour.cs
new file mode 100644
index 00000000..25208a73
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XBriefStrengthenBehaviour.cs
@@ -0,0 +1,28 @@
+using System;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class XBriefStrengthenBehaviour : DlgBehaviourBase
+ {
+ public IXUIButton m_Close;
+
+ public IXUISprite m_Close2;
+
+ public IXUILabel m_More;
+
+ public XUIPool m_FuncPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ private void Awake()
+ {
+ this.m_Close = (base.transform.Find("Bg/Close").GetComponent("XUIButton") as IXUIButton);
+ this.m_Close2 = (base.transform.Find("Bg").GetComponent("XUISprite") as IXUISprite);
+ Transform transform = base.transform.Find("Bg/P/Tpl");
+ this.m_FuncPool.SetupPool(transform.parent.gameObject, transform.gameObject, 3u, false);
+ this.m_More = (base.transform.Find("Bg/More").GetComponent("XUILabel") as IXUILabel);
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/XBriefStrengthenBehaviour.cs.meta b/Client/Assets/Scripts/XMainClient/UI/XBriefStrengthenBehaviour.cs.meta
new file mode 100644
index 00000000..c5b7b534
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XBriefStrengthenBehaviour.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: cdd7054ec6fb79748b0091381f4d5c21
+timeCreated: 1611404576
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/XBriefStrengthenView.cs b/Client/Assets/Scripts/XMainClient/UI/XBriefStrengthenView.cs
new file mode 100644
index 00000000..8f0c7995
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XBriefStrengthenView.cs
@@ -0,0 +1,124 @@
+using System;
+using System.Collections.Generic;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class XBriefStrengthenView : DlgBase<XBriefStrengthenView, XBriefStrengthenBehaviour>
+ {
+ public override string fileName
+ {
+ get
+ {
+ return "GameSystem/BriefStrengthenDlg";
+ }
+ }
+
+ public override int group
+ {
+ get
+ {
+ return 1;
+ }
+ }
+
+ public override bool autoload
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override bool pushstack
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public static readonly int FUNCTION_NUM = 3;
+
+ private XFPStrengthenDocument _doc = null;
+
+ public XUIPool m_FpStrengthenPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ public XUIPool m_FpButtonPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ private List<FpStrengthenTable.RowData> m_BQList = null;
+
+ protected override void Init()
+ {
+ this._doc = XDocuments.GetSpecificDocument<XFPStrengthenDocument>(XFPStrengthenDocument.uuID);
+ }
+
+ public override void RegisterEvent()
+ {
+ base.uiBehaviour.m_Close.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnCloseClicked));
+ base.uiBehaviour.m_Close2.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnCloseClicked));
+ base.uiBehaviour.m_More.RegisterLabelClickEventHandler(new LabelClickEventHandler(this._OnMoreClicked));
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ base.uiBehaviour.m_FuncPool.FakeReturnAll();
+ Vector3 tplPos = base.uiBehaviour.m_FuncPool.TplPos;
+ int num = 0;
+ this.m_BQList = this._doc.GetBQByType(200);
+ int num2 = 0;
+ while (num < XBriefStrengthenView.FUNCTION_NUM && num2 < this.m_BQList.Count)
+ {
+ FpStrengthenTable.RowData rowData = this.m_BQList[num2];
+ bool flag = rowData == null;
+ if (!flag)
+ {
+ GameObject gameObject = base.uiBehaviour.m_FuncPool.FetchGameObject(false);
+ gameObject.transform.localPosition = new Vector3(tplPos.x + (float)(num * base.uiBehaviour.m_FuncPool.TplWidth), tplPos.y);
+ IXUISprite ixuisprite = gameObject.transform.Find("Icon").GetComponent("XUISprite") as IXUISprite;
+ IXUILabel ixuilabel = gameObject.transform.Find("Name").GetComponent("XUILabel") as IXUILabel;
+ IXUISprite ixuisprite2 = gameObject.GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.SetSprite(rowData.BQImageID);
+ ixuilabel.SetText(rowData.BQName);
+ ixuisprite2.ID = (ulong)((long)num2);
+ ixuisprite2.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.GoToStrengthSys));
+ num++;
+ }
+ num2++;
+ }
+ base.uiBehaviour.m_FuncPool.ActualReturnAll(false);
+ }
+
+ public bool OnCloseClicked(IXUIButton sp)
+ {
+ this.SetVisible(false, true);
+ return true;
+ }
+
+ public void OnCloseClicked(IXUISprite sp)
+ {
+ this.SetVisible(false, true);
+ }
+
+ private void _OnMoreClicked(IXUILabel iLabel)
+ {
+ this.SetVisible(false, true);
+ DlgBase<XFpStrengthenView, XFPStrengthenBehaviour>.singleton.SetVisibleWithAnimation(true, null);
+ }
+
+ public void GoToStrengthSys(IXUISprite sp)
+ {
+ int num = (int)sp.ID;
+ this.SetVisible(false, true);
+ bool flag = num >= this.m_BQList.Count;
+ if (!flag)
+ {
+ XSingleton<XGameSysMgr>.singleton.OpenSystem((XSysDefine)this.m_BQList[num].BQSystem, 0UL);
+ }
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/XBriefStrengthenView.cs.meta b/Client/Assets/Scripts/XMainClient/UI/XBriefStrengthenView.cs.meta
new file mode 100644
index 00000000..e71e7b14
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XBriefStrengthenView.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: ef793500979442f43b6120415a1216d1
+timeCreated: 1611404804
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/XBuffIcon.cs b/Client/Assets/Scripts/XMainClient/UI/XBuffIcon.cs
new file mode 100644
index 00000000..11d1d98e
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XBuffIcon.cs
@@ -0,0 +1,186 @@
+using System;
+using UILib;
+using UnityEngine;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class XBuffIcon
+ {
+ private static float DISAPPEAR_START_LEFT_TIME = 3f;
+
+ private GameObject m_Go;
+
+ private IXUISprite m_uiIcon;
+
+ private IXUILabel m_uiLeftTime;
+
+ private IXUILabel m_uiCount;
+
+ private IXUITweenTool m_Tween;
+
+ private Vector3 m_OriginPos;
+
+ private float m_fLeftTime;
+
+ private int m_nLeftTime;
+
+ private float m_fStartTime;
+
+ private float m_fStartLeftTime;
+
+ private bool m_bActive = false;
+
+ private bool m_bPermernent = false;
+
+ private bool m_bShowTime = true;
+
+ private XBuffIcon.AnimState m_AnimState = XBuffIcon.AnimState.AS_NORMAL;
+
+ private enum AnimState
+ {
+ AS_NORMAL,
+ AS_DISAPPEARING
+ }
+
+ public void Init(GameObject go, bool bShowTime)
+ {
+ this.m_Go = go;
+ this.m_OriginPos = go.transform.localPosition;
+ this.m_uiIcon = (go.transform.Find("Icon").GetComponent("XUISprite") as IXUISprite);
+ this.m_uiLeftTime = (go.transform.Find("Time").GetComponent("XUILabel") as IXUILabel);
+ this.m_uiCount = (go.transform.Find("Count").GetComponent("XUILabel") as IXUILabel);
+ this.m_Tween = (go.GetComponent("XUIPlayTween") as IXUITweenTool);
+ this.m_bShowTime = bShowTime;
+ this.m_uiLeftTime.SetVisible(this.m_bShowTime);
+ this.Hide();
+ }
+
+ public void Set(UIBuffInfo buffInfo)
+ {
+ this.m_Go.transform.localPosition = this.m_OriginPos;
+ this.m_uiIcon.SetSprite(buffInfo.buffInfo.BuffIcon);
+ bool flag = buffInfo.stackCount <= 1u;
+ if (flag)
+ {
+ this.m_uiCount.SetText(string.Empty);
+ }
+ else
+ {
+ this.m_uiCount.SetText(XSingleton<XCommon>.singleton.StringCombine("[b]", buffInfo.stackCount.ToString()));
+ }
+ this.m_bPermernent = (buffInfo.buffInfo.BuffDuration < 0f);
+ XBuffIcon.AnimState animState = XBuffIcon.AnimState.AS_NORMAL;
+ bool flag2 = !this.m_bPermernent && buffInfo.leftTime <= XBuffIcon.DISAPPEAR_START_LEFT_TIME;
+ if (flag2)
+ {
+ animState = XBuffIcon.AnimState.AS_DISAPPEARING;
+ }
+ bool flag3 = animState != this.m_AnimState;
+ if (flag3)
+ {
+ this._ResetAnimState();
+ XBuffIcon.AnimState animState2 = animState;
+ if (animState2 == XBuffIcon.AnimState.AS_DISAPPEARING)
+ {
+ this._PlayStartDisappearAnim();
+ }
+ }
+ this.m_nLeftTime = 0;
+ this.m_fStartTime = buffInfo.startTime;
+ this.m_fStartLeftTime = buffInfo.leftTime;
+ this.m_fLeftTime = buffInfo.leftTime - (this._GetCurTime() - buffInfo.startTime);
+ this.m_bActive = true;
+ this._UpdateTime();
+ }
+
+ public void Hide()
+ {
+ this.m_Go.transform.localPosition = XGameUI.Far_Far_Away;
+ this._ResetAnimState();
+ this.m_bActive = false;
+ }
+
+ private float _GetCurTime()
+ {
+ bool syncMode = XSingleton<XGame>.singleton.SyncMode;
+ float result;
+ if (syncMode)
+ {
+ result = Time.realtimeSinceStartup;
+ }
+ else
+ {
+ result = Time.time;
+ }
+ return result;
+ }
+
+ private void _PlayStartDisappearAnim()
+ {
+ bool flag = this.m_Tween != null;
+ if (flag)
+ {
+ this.m_Tween.PlayTween(true, -1f);
+ this.m_AnimState = XBuffIcon.AnimState.AS_DISAPPEARING;
+ }
+ }
+
+ private void _ResetAnimState()
+ {
+ bool flag = this.m_AnimState == XBuffIcon.AnimState.AS_DISAPPEARING;
+ if (flag)
+ {
+ bool flag2 = this.m_Tween != null;
+ if (flag2)
+ {
+ this.m_Tween.ResetTween(true);
+ }
+ }
+ this.m_AnimState = XBuffIcon.AnimState.AS_NORMAL;
+ }
+
+ public void OnUpdate()
+ {
+ bool flag = !this.m_bActive;
+ if (!flag)
+ {
+ bool flag2 = !this.m_bPermernent && this.m_bShowTime;
+ if (flag2)
+ {
+ this.m_fLeftTime = this.m_fStartLeftTime - (this._GetCurTime() - this.m_fStartTime);
+ this._UpdateTime();
+ }
+ }
+ }
+
+ private void _UpdateTime()
+ {
+ bool bPermernent = this.m_bPermernent;
+ if (bPermernent)
+ {
+ this.m_uiLeftTime.SetText("");
+ this.m_uiLeftTime.Alpha = 1f;
+ }
+ else
+ {
+ int num = Mathf.CeilToInt(this.m_fLeftTime);
+ bool flag = num != this.m_nLeftTime;
+ if (flag)
+ {
+ this.m_nLeftTime = num;
+ bool flag2 = num <= 0 || (float)num > XSingleton<XGlobalConfig>.singleton.BuffMaxDisplayTime;
+ if (flag2)
+ {
+ this.m_uiLeftTime.Alpha = 0f;
+ }
+ else
+ {
+ this.m_uiLeftTime.SetText(XSingleton<XCommon>.singleton.StringCombine("[b]", num.ToString()));
+ this.m_uiLeftTime.Alpha = 1f;
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/XBuffIcon.cs.meta b/Client/Assets/Scripts/XMainClient/UI/XBuffIcon.cs.meta
new file mode 100644
index 00000000..899affb9
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XBuffIcon.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 3a3f090f19718364cae6d8382b831c9a
+timeCreated: 1611403595
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/XBuffMonitorHandler.cs b/Client/Assets/Scripts/XMainClient/UI/XBuffMonitorHandler.cs
new file mode 100644
index 00000000..bec9d9d1
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XBuffMonitorHandler.cs
@@ -0,0 +1,97 @@
+using System;
+using System.Collections.Generic;
+using UnityEngine;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class XBuffMonitorHandler : DlgHandlerBase
+ {
+ private XUIPool m_BuffPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ private XBuffIcon[] m_BuffList;
+
+ private GameObject m_TplGo;
+
+ private uint m_MaxDisplayBuffCount = 5u;
+
+ protected override void Init()
+ {
+ base.Init();
+ bool flag = base.PanelObject.layer == LayerMask.NameToLayer("Billboard");
+ if (flag)
+ {
+ this.m_TplGo = base.PanelObject.transform.Find("Buff").gameObject;
+ }
+ else
+ {
+ this.m_TplGo = (XSingleton<XResourceLoaderMgr>.singleton.CreateFromPrefab("UI/Common/Buff", true, false) as GameObject);
+ this.m_TplGo.transform.parent = base.PanelObject.transform;
+ }
+ Transform transform = base.PanelObject.transform.Find("BuffTpl");
+ this.m_TplGo.transform.localPosition = transform.localPosition;
+ this.m_TplGo.transform.localScale = transform.localScale;
+ transform.gameObject.SetActive(false);
+ this.m_BuffPool.SetupPool(base.PanelObject, this.m_TplGo, this.m_MaxDisplayBuffCount, false);
+ }
+
+ public override void OnUnload()
+ {
+ XResourceLoaderMgr.SafeDestroy(ref this.m_TplGo, true);
+ base.OnUnload();
+ }
+
+ public override void OnUpdate()
+ {
+ base.OnUpdate();
+ bool flag = this.m_BuffList == null;
+ if (!flag)
+ {
+ for (int i = 0; i < this.m_BuffList.Length; i++)
+ {
+ this.m_BuffList[i].OnUpdate();
+ }
+ }
+ }
+
+ public void InitMonitor(uint maxDisplayCount, bool bLeftToRight = true, bool bShowTime = true)
+ {
+ this.m_MaxDisplayBuffCount = maxDisplayCount;
+ bool flag = this.m_BuffList != null;
+ if (flag)
+ {
+ this.m_BuffPool.ReturnAll(false);
+ }
+ this.m_BuffList = new XBuffIcon[this.m_MaxDisplayBuffCount];
+ int num = 0;
+ while ((long)num < (long)((ulong)this.m_MaxDisplayBuffCount))
+ {
+ XBuffIcon xbuffIcon = new XBuffIcon();
+ GameObject gameObject = this.m_BuffPool.FetchGameObject(false);
+ gameObject.transform.localPosition = new Vector3(this.m_BuffPool.TplPos.x + (float)((bLeftToRight ? 1 : -1) * num * this.m_BuffPool.TplWidth), this.m_BuffPool.TplPos.y, this.m_BuffPool.TplPos.z);
+ xbuffIcon.Init(gameObject, bShowTime);
+ this.m_BuffList[num] = xbuffIcon;
+ num++;
+ }
+ }
+
+ public void OnBuffChanged(List<UIBuffInfo> buffList)
+ {
+ int num = 0;
+ int num2 = 0;
+ while (num2 < buffList.Count && num < this.m_BuffList.Length)
+ {
+ bool flag = buffList[num2].buffInfo == null || !buffList[num2].buffInfo.BuffIsVisible;
+ if (!flag)
+ {
+ this.m_BuffList[num++].Set(buffList[num2]);
+ }
+ num2++;
+ }
+ for (int i = num; i < this.m_BuffList.Length; i++)
+ {
+ this.m_BuffList[i].Hide();
+ }
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/XBuffMonitorHandler.cs.meta b/Client/Assets/Scripts/XMainClient/UI/XBuffMonitorHandler.cs.meta
new file mode 100644
index 00000000..531e25f6
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XBuffMonitorHandler.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 0d03d595ffcbe01428455344188e950b
+timeCreated: 1611403176
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/XBuyCountBehaviour.cs b/Client/Assets/Scripts/XMainClient/UI/XBuyCountBehaviour.cs
new file mode 100644
index 00000000..d584d475
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XBuyCountBehaviour.cs
@@ -0,0 +1,32 @@
+using System;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+
+namespace XMainClient.UI
+{
+ internal class XBuyCountBehaviour : DlgBehaviourBase
+ {
+ public IXUILabel m_Content = null;
+
+ public IXUILabelSymbol m_ContentLabelSymbol = null;
+
+ public IXUILabel m_LeftBuyCount = null;
+
+ public IXUIButton m_OKButton = null;
+
+ public IXUIButton m_CancelButton = null;
+
+ private void Awake()
+ {
+ Transform transform = base.transform.Find("Bg/Content");
+ this.m_Content = (transform.GetComponent("XUILabel") as IXUILabel);
+ this.m_ContentLabelSymbol = (transform.GetComponent("XUILabelSymbol") as IXUILabelSymbol);
+ this.m_LeftBuyCount = (base.transform.Find("Bg/LeftBuyCount").GetComponent("XUILabel") as IXUILabel);
+ Transform transform2 = base.transform.Find("Bg/OK");
+ this.m_OKButton = (transform2.GetComponent("XUIButton") as IXUIButton);
+ Transform transform3 = base.transform.Find("Bg/Cancel");
+ this.m_CancelButton = (transform3.GetComponent("XUIButton") as IXUIButton);
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/XBuyCountBehaviour.cs.meta b/Client/Assets/Scripts/XMainClient/UI/XBuyCountBehaviour.cs.meta
new file mode 100644
index 00000000..b36a3794
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XBuyCountBehaviour.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 7407b6348cbeaf14e94f4b05594b18f3
+timeCreated: 1611403942
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/XBuyCountView.cs b/Client/Assets/Scripts/XMainClient/UI/XBuyCountView.cs
new file mode 100644
index 00000000..6bbac211
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XBuyCountView.cs
@@ -0,0 +1,106 @@
+using System;
+using KKSG;
+using UILib;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class XBuyCountView : DlgBase<XBuyCountView, XBuyCountBehaviour>
+ {
+ public override string fileName
+ {
+ get
+ {
+ return "Common/BuyCountDlg";
+ }
+ }
+
+ public override int layer
+ {
+ get
+ {
+ return 100;
+ }
+ }
+
+ public override bool autoload
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ private TeamLevelType m_Type;
+
+ private XExpeditionDocument m_ExpDoc;
+
+ protected override void Init()
+ {
+ this.m_ExpDoc = XDocuments.GetSpecificDocument<XExpeditionDocument>(XExpeditionDocument.uuID);
+ }
+
+ public override void RegisterEvent()
+ {
+ base.uiBehaviour.m_CancelButton.RegisterClickEventHandler(new ButtonClickEventHandler(this._DoCancel));
+ base.uiBehaviour.m_OKButton.RegisterClickEventHandler(new ButtonClickEventHandler(this._DoOK));
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ }
+
+ public void ActiveShow(TeamLevelType dungeonType)
+ {
+ this._ShowBuyCountAndBuyConfirm("ACTIVE_BUYCOUNT_CONFIRM", dungeonType);
+ }
+
+ public void PassiveShow(TeamLevelType dungeonType)
+ {
+ this._ShowBuyCountAndBuyConfirm("PASSIVE_BUYCOUNT_CONFIRM", dungeonType);
+ }
+
+ private void _ShowBuyCountAndBuyConfirm(string reason, TeamLevelType dungeonType)
+ {
+ base.Load();
+ int num;
+ int num2;
+ bool flag = this.m_ExpDoc.CanBuy(dungeonType, out num, out num2);
+ if (flag)
+ {
+ CostInfo buyCost = this.m_ExpDoc.GetBuyCost(dungeonType);
+ base.uiBehaviour.m_ContentLabelSymbol.InputText = XStringDefineProxy.GetString(reason, new object[]
+ {
+ XLabelSymbolHelper.FormatCostWithIcon((int)buyCost.count, buyCost.type),
+ XStringDefineProxy.GetString(dungeonType.ToString())
+ });
+ base.uiBehaviour.m_LeftBuyCount.SetText((num2 - num).ToString());
+ this.m_Type = dungeonType;
+ this.SetVisibleWithAnimation(true, null);
+ }
+ else
+ {
+ bool flag2 = this.m_ExpDoc.GetBuyLimit(dungeonType) > 0;
+ if (flag2)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(ErrorCode.ERR_TEAMBUY_COUNT_MAX, "fece00");
+ }
+ }
+ }
+
+ private bool _DoOK(IXUIButton go)
+ {
+ this.SetVisibleWithAnimation(false, null);
+ this.m_ExpDoc.ReqBuyCount(this.m_Type);
+ return true;
+ }
+
+ private bool _DoCancel(IXUIButton go)
+ {
+ this.SetVisibleWithAnimation(false, null);
+ return true;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/XBuyCountView.cs.meta b/Client/Assets/Scripts/XMainClient/UI/XBuyCountView.cs.meta
new file mode 100644
index 00000000..071a0eb0
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XBuyCountView.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 1535af2e039d5bd4ab86bb818d431a4a
+timeCreated: 1611403262
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/XCampDuelMainHandler.cs b/Client/Assets/Scripts/XMainClient/UI/XCampDuelMainHandler.cs
new file mode 100644
index 00000000..520dc4f4
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XCampDuelMainHandler.cs
@@ -0,0 +1,594 @@
+using System;
+using System.Collections.Generic;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class XCampDuelMainHandler : DlgHandlerBase
+ {
+ public string CampName
+ {
+ get
+ {
+ bool flag = this.SelectID == 1;
+ string result;
+ if (flag)
+ {
+ result = XStringDefineProxy.GetString("CAMPDUEL_LEFT_NAME");
+ }
+ else
+ {
+ bool flag2 = this.SelectID == 2;
+ if (flag2)
+ {
+ result = XStringDefineProxy.GetString("CAMPDUEL_RIGHT_NAME");
+ }
+ else
+ {
+ result = "";
+ }
+ }
+ return result;
+ }
+ }
+
+ protected override string FileName
+ {
+ get
+ {
+ return "OperatingActivity/CampDuelFrame";
+ }
+ }
+
+ private XCampDuelDocument doc = null;
+
+ private XCampDuelPointRewardHandler _PointRewardHandler;
+
+ private int SelectID;
+
+ private uint _AutoRefresheTimeID;
+
+ private uint _AutoCloseBlahTimeID;
+
+ private Transform m_JoinFrame;
+
+ private Transform m_MainFrame;
+
+ private IXUITexture m_TexLeft;
+
+ private IXUITexture m_TexRight;
+
+ private IXUISprite m_Icon;
+
+ private IXUIButton m_BtnSelectLeft;
+
+ private IXUIButton m_BtnSelectRight;
+
+ private IXUILabel m_Intro;
+
+ private Transform m_Content;
+
+ private Transform m_Empty;
+
+ private IXUIButton m_BtnJoin;
+
+ private IXUILabel m_SelectReward;
+
+ private IXUILabel m_SelectName;
+
+ private IXUISprite m_BtnJoinHelp;
+
+ private IXUILabel m_LeftName;
+
+ private IXUILabel m_RightName;
+
+ private IXUILabel m_MainBlah;
+
+ private IXUILabel m_MainTips;
+
+ private IXUITexture m_MainCampTex;
+
+ private IXUILabel m_MainName;
+
+ private IXUISprite m_MainCondition;
+
+ private IXUIButton m_BtnMainHelp;
+
+ private IXUILabel m_BtnMainHelpTips;
+
+ private IXUILabel m_MainPoint;
+
+ private IXUILabel m_MainCurRewardPoint;
+
+ private Transform m_MainCurRewardText;
+
+ private Transform m_MainItem;
+
+ private IXUISprite m_MainItemIcon;
+
+ private IXUIButton m_MainBtnConfirm;
+
+ private IXUILabel m_MainConfirmPoint;
+
+ private IXUILabel m_MainFreeCourageCount;
+
+ private IXUILabel m_MainDragonCoinCourageCount;
+
+ private IXUIButton m_MainBtnCourage;
+
+ private Transform m_MainBtnCourageRedPoint;
+
+ private Transform m_MainFree;
+
+ private IXUILabel m_MainDragonCoin;
+
+ private IXUILabel m_MainCouragePoint;
+
+ private Transform m_MainRewardItemList;
+
+ private Transform m_MainCurRewardItemList;
+
+ private Transform m_MainNextRewardItemList;
+
+ private Transform m_MainChestFx;
+
+ private IXUISprite m_MainCurChest;
+
+ private IXUIButton m_MainBtnReward;
+
+ private IXUIButton m_MainBtnRank;
+
+ private IXUILabel m_MainEndTime;
+
+ private XUIPool m_ItemPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ private IXUITweenTool m_MainAddPointTween;
+
+ private IXUILabel m_MainAddPoint;
+
+ private IXUIButton m_Help;
+
+ private List<uint> itemid = new List<uint>();
+
+ private List<uint> itemCount = new List<uint>();
+
+ private XFx _BoxUpFx;
+
+ private XFx _NPCFx;
+
+ protected override void Init()
+ {
+ base.Init();
+ this.doc = XDocuments.GetSpecificDocument<XCampDuelDocument>(XCampDuelDocument.uuID);
+ this.doc.handler = this;
+ this.m_JoinFrame = base.transform.Find("JoinFrame");
+ this.m_MainFrame = base.transform.Find("MainFrame");
+ this.m_TexLeft = (this.m_JoinFrame.Find("Left/Tex").GetComponent("XUITexture") as IXUITexture);
+ this.m_TexRight = (this.m_JoinFrame.Find("Right/Tex").GetComponent("XUITexture") as IXUITexture);
+ this.m_BtnSelectLeft = (this.m_JoinFrame.Find("Left/BtnSelect").GetComponent("XUIButton") as IXUIButton);
+ this.m_BtnSelectRight = (this.m_JoinFrame.Find("Right/BtnSelect").GetComponent("XUIButton") as IXUIButton);
+ this.m_LeftName = (this.m_JoinFrame.Find("Left/T").GetComponent("XUILabel") as IXUILabel);
+ this.m_RightName = (this.m_JoinFrame.Find("Right/T").GetComponent("XUILabel") as IXUILabel);
+ this.m_Icon = (this.m_JoinFrame.Find("Detail/Avatar/Content").GetComponent("XUISprite") as IXUISprite);
+ this.m_Intro = (this.m_JoinFrame.Find("Detail/Intro").GetComponent("XUILabel") as IXUILabel);
+ this.m_Empty = this.m_JoinFrame.Find("Detail/CampSelect/Empty");
+ this.m_Content = this.m_JoinFrame.Find("Detail/CampSelect/Content");
+ this.m_BtnJoin = (this.m_JoinFrame.Find("Detail/CampSelect/BtnJoin").GetComponent("XUIButton") as IXUIButton);
+ this.m_SelectReward = (this.m_JoinFrame.Find("Detail/CampSelect/Content/Reward").GetComponent("XUILabel") as IXUILabel);
+ this.m_SelectName = (this.m_JoinFrame.Find("Detail/CampSelect/Content/Name").GetComponent("XUILabel") as IXUILabel);
+ this.m_BtnJoinHelp = (this.m_JoinFrame.Find("Detail/CampSelect/Content/Help").GetComponent("XUISprite") as IXUISprite);
+ this.m_MainTips = (this.m_MainFrame.Find("Intro").GetComponent("XUILabel") as IXUILabel);
+ this.m_MainCampTex = (this.m_MainFrame.Find("Camp/Tex").GetComponent("XUITexture") as IXUITexture);
+ this.m_MainName = (this.m_MainFrame.Find("Camp/Name").GetComponent("XUILabel") as IXUILabel);
+ this.m_MainCondition = (this.m_MainFrame.Find("Camp/Condition").GetComponent("XUISprite") as IXUISprite);
+ this.m_BtnMainHelp = (this.m_MainFrame.Find("Camp/Condition/Help").GetComponent("XUIButton") as IXUIButton);
+ this.m_BtnMainHelpTips = (this.m_MainFrame.Find("Camp/Condition/Content").GetComponent("XUILabel") as IXUILabel);
+ this.m_BtnMainHelpTips.gameObject.SetActive(false);
+ this.m_MainBlah = (this.m_MainFrame.Find("Camp/Blah").GetComponent("XUILabel") as IXUILabel);
+ this.m_MainBlah.gameObject.SetActive(false);
+ this.m_MainPoint = (this.m_MainFrame.Find("Point").GetComponent("XUILabel") as IXUILabel);
+ this.m_MainAddPointTween = (this.m_MainFrame.Find("Point/AddPoint").GetComponent("XUIPlayTween") as IXUITweenTool);
+ this.m_MainAddPoint = (this.m_MainFrame.Find("Point/AddPoint").GetComponent("XUILabel") as IXUILabel);
+ this.m_MainCurRewardPoint = (this.m_MainFrame.Find("CurrnetReward/Point").GetComponent("XUILabel") as IXUILabel);
+ this.m_MainAddPoint.gameObject.SetActive(false);
+ this.m_MainCurRewardText = this.m_MainFrame.Find("CurrnetReward/ChestTpl/T");
+ this.m_MainRewardItemList = this.m_MainFrame.Find("ItemIconList");
+ this.m_MainCurRewardItemList = this.m_MainFrame.Find("CurrnetReward/ItemIconList");
+ this.m_MainNextRewardItemList = this.m_MainFrame.Find("NextReward/ItemIconList");
+ this.m_MainCurChest = (this.m_MainFrame.Find("CurrnetReward/ChestTpl").GetComponent("XUISprite") as IXUISprite);
+ this.m_MainChestFx = this.m_MainFrame.Find("CurrnetReward/ChestTpl/Fx");
+ this.m_MainBtnReward = (this.m_MainFrame.Find("BtnReward").GetComponent("XUIButton") as IXUIButton);
+ this.m_MainBtnRank = (this.m_MainFrame.Find("BtnRank").GetComponent("XUIButton") as IXUIButton);
+ this.m_MainEndTime = (this.m_MainFrame.Find("EndTime").GetComponent("XUILabel") as IXUILabel);
+ Transform transform = this.m_MainFrame.Find("Operate/Contribute");
+ this.m_MainItem = transform.Find("ItemTpl");
+ this.m_MainItemIcon = (transform.Find("ItemTpl/Icon").GetComponent("XUISprite") as IXUISprite);
+ this.m_MainBtnConfirm = (transform.Find("BtnSubmit").GetComponent("XUIButton") as IXUIButton);
+ this.m_MainConfirmPoint = (transform.Find("Num").GetComponent("XUILabel") as IXUILabel);
+ transform = this.m_MainFrame.Find("Operate/Courage");
+ this.m_MainFreeCourageCount = (transform.Find("Detail/FreeNum").GetComponent("XUILabel") as IXUILabel);
+ this.m_MainDragonCoinCourageCount = (transform.Find("Detail/DragonCoinNum").GetComponent("XUILabel") as IXUILabel);
+ this.m_MainBtnCourage = (transform.Find("BtnCourage").GetComponent("XUIButton") as IXUIButton);
+ this.m_MainBtnCourageRedPoint = transform.Find("BtnCourage/RedPoint");
+ this.m_MainFree = transform.Find("BtnCourage/Free");
+ this.m_MainDragonCoin = (transform.Find("BtnCourage/DragonCoin").GetComponent("XUILabel") as IXUILabel);
+ this.m_MainCouragePoint = (transform.Find("Num").GetComponent("XUILabel") as IXUILabel);
+ this.m_Help = (this.m_MainFrame.Find("Title/Help").GetComponent("XUIButton") as IXUIButton);
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ this.m_BtnSelectLeft.ID = 1UL;
+ this.m_BtnSelectLeft.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnSelectClicked));
+ this.m_BtnSelectRight.ID = 2UL;
+ this.m_BtnSelectRight.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnSelectClicked));
+ this.m_BtnJoin.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnJoinClicked));
+ this.m_BtnJoinHelp.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnJoinHelpClicked));
+ this.m_BtnMainHelp.RegisterPressEventHandler(new ButtonPressEventHandler(this.OnHelpBtnPress));
+ this.m_MainBtnConfirm.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnConfirmClicked));
+ this.m_MainBtnCourage.ID = (ulong)uint.Parse(XSingleton<XGlobalConfig>.singleton.GetValue("CampDuelInspireAddPoint"));
+ this.m_MainBtnCourage.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnCourageClicked));
+ this.m_MainCurChest.ID = 1UL;
+ this.m_MainCurChest.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnChestClicked));
+ this.m_MainBtnReward.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnRewardClicked));
+ this.m_MainBtnRank.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnRankClicked));
+ this.m_MainItemIcon.ID = (ulong)((long)XCampDuelDocument.Doc.ConfirmItemID);
+ this.m_MainItemIcon.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnItemClicked));
+ this.m_Help.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnHelpClicked));
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ this.ShowUI();
+ }
+
+ protected override void OnHide()
+ {
+ this.m_TexLeft.SetTexturePath("");
+ this.m_TexRight.SetTexturePath("");
+ this.m_MainCampTex.SetTexturePath("");
+ XSingleton<XTimerMgr>.singleton.KillTimer(this._AutoRefresheTimeID);
+ this._AutoRefresheTimeID = 0u;
+ XSingleton<XTimerMgr>.singleton.KillTimer(this._AutoCloseBlahTimeID);
+ this._AutoCloseBlahTimeID = 0u;
+ this.UnloadFx(this._BoxUpFx);
+ this.UnloadFx(this._NPCFx);
+ this.m_MainBlah.gameObject.SetActive(false);
+ base.OnHide();
+ }
+
+ public override void StackRefresh()
+ {
+ base.StackRefresh();
+ }
+
+ public override void OnUnload()
+ {
+ DlgHandlerBase.EnsureUnload<XCampDuelPointRewardHandler>(ref this._PointRewardHandler);
+ this.doc.handler = null;
+ base.OnUnload();
+ }
+
+ public void ShowUI()
+ {
+ bool flag = !base.IsVisible();
+ if (!flag)
+ {
+ bool flag2 = this.doc.campID == 0;
+ if (flag2)
+ {
+ this.m_JoinFrame.gameObject.SetActive(true);
+ this.m_MainFrame.gameObject.SetActive(false);
+ this.ShowJoin();
+ }
+ else
+ {
+ this.m_JoinFrame.gameObject.SetActive(false);
+ this.m_MainFrame.gameObject.SetActive(true);
+ bool flag3 = this._AutoRefresheTimeID == 0u;
+ if (flag3)
+ {
+ this._AutoRefresh(null);
+ }
+ this.ShowMain();
+ }
+ }
+ }
+
+ private bool OnSelectClicked(IXUIButton btn)
+ {
+ this.SelectID = (int)btn.ID;
+ this.m_TexLeft.SetColor((btn.ID == 1UL) ? Color.white : Color.gray);
+ this.m_TexRight.SetColor((btn.ID == 1UL) ? Color.gray : Color.white);
+ this.m_Icon.SetSprite((btn.ID == 1UL) ? XSingleton<XGlobalConfig>.singleton.GetValue("CampDuelLeftIcon") : XSingleton<XGlobalConfig>.singleton.GetValue("CampDuelRightIcon"));
+ this.m_Empty.gameObject.SetActive(false);
+ this.m_Content.gameObject.SetActive(true);
+ this.m_SelectName.SetText(this.CampName);
+ this.m_SelectReward.SetText((btn.ID == 1UL) ? XStringDefineProxy.GetString("CAMPDUEL_LEFT_REWARD") : XStringDefineProxy.GetString("CAMPDUEL_RIGHT_REWARD"));
+ return true;
+ }
+
+ private bool OnJoinClicked(IXUIButton btn)
+ {
+ bool flag = this.SelectID == 0;
+ bool result;
+ if (flag)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XSingleton<XStringTable>.singleton.GetString("CAMPDUEL_JOIN_TIP"), "fece00");
+ result = true;
+ }
+ else
+ {
+ XSingleton<UiUtility>.singleton.ShowModalDialog(string.Format(XStringDefineProxy.GetString("CAMPDUEL_JOIN_CONFIRM"), this.CampName), XStringDefineProxy.GetString("COMMON_OK"), XStringDefineProxy.GetString("COMMON_CANCEL"), new ButtonClickEventHandler(this._Compose), null, false, XTempTipDefine.OD_START, 50);
+ result = true;
+ }
+ return result;
+ }
+
+ private bool _Compose(IXUIButton button)
+ {
+ XCampDuelDocument.Doc.ReqCampDuel(2u, (uint)this.SelectID);
+ XSingleton<UiUtility>.singleton.CloseModalDlg();
+ return true;
+ }
+
+ private void OnJoinHelpClicked(IXUISprite btn)
+ {
+ DlgHandlerBase.EnsureCreate<XCampDuelPointRewardHandler>(ref this._PointRewardHandler, this.m_JoinFrame, false, null);
+ this._PointRewardHandler.CampID = this.SelectID;
+ this._PointRewardHandler.SetVisible(true);
+ }
+
+ public void ShowJoin()
+ {
+ this.SelectID = 0;
+ string value = XSingleton<XGlobalConfig>.singleton.GetValue("CampDuelLeftTex");
+ this.m_TexLeft.SetTexturePath(value);
+ this.m_TexLeft.SetColor(Color.gray);
+ this.m_LeftName.SetText(XStringDefineProxy.GetString("CAMPDUEL_LEFT_NAME"));
+ value = XSingleton<XGlobalConfig>.singleton.GetValue("CampDuelRightTex");
+ this.m_TexRight.SetTexturePath(value);
+ this.m_TexRight.SetColor(Color.gray);
+ this.m_RightName.SetText(XStringDefineProxy.GetString("CAMPDUEL_RIGHT_NAME"));
+ this.m_Icon.SetSprite("");
+ string arg = XTempActivityDocument.Doc.GetEndTime(XCampDuelDocument.Doc.ActInfo, 1).ToString(XStringDefineProxy.GetString("CAMPDUEL_JOIN_INTRO_TIME"));
+ this.m_Intro.SetText(string.Format(XSingleton<UiUtility>.singleton.ReplaceReturn(XStringDefineProxy.GetString("CAMPDUEL_JOIN_INTRO")), arg));
+ this.m_Empty.gameObject.SetActive(true);
+ this.m_Content.gameObject.SetActive(false);
+ }
+
+ private bool OnHelpClicked(IXUIButton btn)
+ {
+ DlgBase<XCommonHelpTipView, XCommonHelpTipBehaviour>.singleton.ShowHelp(XSysDefine.XSys_CampDuel);
+ return true;
+ }
+
+ private bool OnConfirmClicked(IXUIButton btn)
+ {
+ XCampDuelDocument.Doc.ReqCampDuel(3u, (uint)btn.ID);
+ return true;
+ }
+
+ private bool OnCourageClicked(IXUIButton btn)
+ {
+ bool flag = XCampDuelDocument.Doc.FreeCourageCount != 0;
+ if (flag)
+ {
+ XCampDuelDocument.Doc.ReqCampDuel(4u, (uint)btn.ID);
+ }
+ else
+ {
+ XCampDuelDocument.Doc.ReqCampDuel(5u, (uint)btn.ID);
+ }
+ return true;
+ }
+
+ private bool OnRewardClicked(IXUIButton btn)
+ {
+ DlgHandlerBase.EnsureCreate<XCampDuelPointRewardHandler>(ref this._PointRewardHandler, this.m_MainFrame, false, null);
+ this._PointRewardHandler.CampID = XCampDuelDocument.Doc.campID;
+ this._PointRewardHandler.SetVisible(true);
+ return true;
+ }
+
+ private bool OnRankClicked(IXUIButton btn)
+ {
+ DlgBase<XRankView, XRankBehaviour>.singleton.ShowRank(XSysDefine.XSys_Rank_CampDuel);
+ return true;
+ }
+
+ private void OnItemClicked(IXUISprite btn)
+ {
+ XSingleton<UiUtility>.singleton.ShowItemAccess((int)btn.ID, null);
+ }
+
+ private void OnChestClicked(IXUISprite btn)
+ {
+ CampDuelPointReward.RowData rowData = this.doc.GetPointReward(this.doc.point);
+ bool flag = rowData == null;
+ if (flag)
+ {
+ rowData = this.doc.GetNextPointReward(this.doc.point);
+ }
+ bool flag2 = rowData == null;
+ if (!flag2)
+ {
+ this.itemid.Clear();
+ this.itemCount.Clear();
+ for (int i = 0; i < (int)rowData.Reward.count; i++)
+ {
+ this.itemid.Add((uint)rowData.Reward[i, 0]);
+ this.itemCount.Add((uint)rowData.Reward[i, 1]);
+ }
+ this.itemid.Add((uint)rowData.EXReward[0]);
+ this.itemCount.Add((uint)rowData.EXReward[1]);
+ DlgBase<ItemIconListDlg, ItemIconListDlgBehaviour>.singleton.Show(this.itemid, this.itemCount, true);
+ DlgBase<ItemIconListDlg, ItemIconListDlgBehaviour>.singleton.SetGlobalPosition(btn.gameObject.transform.position);
+ }
+ }
+
+ private void OnItemCloseClicked(IXUISprite btn)
+ {
+ this.m_MainRewardItemList.gameObject.SetActive(false);
+ }
+
+ private void OnHelpBtnPress(IXUIButton btn, bool state)
+ {
+ bool flag = this.m_BtnMainHelpTips.gameObject.activeInHierarchy != state;
+ if (flag)
+ {
+ this.m_BtnMainHelpTips.gameObject.SetActive(state);
+ }
+ }
+
+ public void ShowMain()
+ {
+ this.m_MainTips.SetText(XStringDefineProxy.GetString("CAMPDUEL_MAIN_TIP"));
+ this.m_MainCampTex.SetTexturePath((this.doc.campID == 1) ? XSingleton<XGlobalConfig>.singleton.GetValue("CampDuelLeftTex") : XSingleton<XGlobalConfig>.singleton.GetValue("CampDuelRightTex"));
+ this.m_MainName.SetText((this.doc.campID == 1) ? XStringDefineProxy.GetString("CAMPDUEL_LEFT_NAME") : XStringDefineProxy.GetString("CAMPDUEL_RIGHT_NAME"));
+ this.m_MainCondition.SetSprite((this.doc.aheadCampID == this.doc.campID) ? "Spr_Ahead" : "Spr_Beyond");
+ this.m_MainCondition.gameObject.SetActive(this.doc.aheadCampID != 0);
+ this.m_BtnMainHelpTips.SetText(XSingleton<UiUtility>.singleton.ReplaceReturn(XStringDefineProxy.GetString("CAMPDUEL_MAIN_HELP")));
+ this.RefreshPoint();
+ int confirmItemID = XCampDuelDocument.Doc.ConfirmItemID;
+ ulong num = XSingleton<XGame>.singleton.Doc.XBagDoc.GetItemCount(confirmItemID);
+ this.m_MainBtnConfirm.ID = num;
+ XSingleton<XItemDrawerMgr>.singleton.normalItemDrawer.DrawItem(this.m_MainItem.gameObject, confirmItemID, (int)num, true);
+ this.m_MainConfirmPoint.SetText(((int)num * int.Parse(XSingleton<XGlobalConfig>.singleton.GetValue("CampDuelItemPoint"))).ToString());
+ this.m_MainBtnConfirm.SetEnable(num > 0UL, false);
+ this.RefresheCourage();
+ this.m_MainCouragePoint.SetText(XSingleton<XGlobalConfig>.singleton.GetValue("CampDuelInspireAddPoint"));
+ this.m_MainEndTime.SetText(XTempActivityDocument.Doc.GetEndTime(XCampDuelDocument.Doc.ActInfo, 1).ToString(XStringDefineProxy.GetString("CAMPDUEL_END_TIME")));
+ }
+
+ public void RefreshPoint()
+ {
+ this.m_MainPoint.SetText(this.doc.point.ToString());
+ CampDuelPointReward.RowData pointReward = this.doc.GetPointReward(this.doc.point);
+ CampDuelPointReward.RowData nextPointReward = this.doc.GetNextPointReward(this.doc.point);
+ this.m_MainChestFx.gameObject.SetActive(pointReward != null);
+ this.m_MainCurRewardText.gameObject.SetActive(pointReward != null);
+ this.m_MainCurChest.SetColor((pointReward != null) ? Color.white : Color.gray);
+ bool flag = pointReward == null && nextPointReward != null;
+ if (flag)
+ {
+ this.m_MainCurChest.SetSprite(nextPointReward.Icon);
+ this.m_MainCurRewardPoint.SetText(string.Format(XStringDefineProxy.GetString("CAMPDUEL_REWARD_FIRST"), nextPointReward.Point - this.doc.point));
+ }
+ else
+ {
+ bool flag2 = pointReward != null && nextPointReward == null;
+ if (flag2)
+ {
+ this.m_MainCurChest.SetSprite(pointReward.Icon);
+ this.m_MainCurRewardPoint.SetText(XStringDefineProxy.GetString("CAMPDUEL_REWARD_MAX"));
+ }
+ else
+ {
+ bool flag3 = pointReward != null && nextPointReward != null;
+ if (flag3)
+ {
+ this.m_MainCurChest.SetSprite(pointReward.Icon);
+ this.m_MainCurRewardPoint.SetText(string.Format(XStringDefineProxy.GetString("CAMPDUEL_REWARD_NEXT"), nextPointReward.Point - this.doc.point));
+ }
+ }
+ }
+ }
+
+ public void RefresheCourage()
+ {
+ this.m_MainFreeCourageCount.SetText(string.Format("{0}/{1}", this.doc.FreeCourageCount, this.doc.FreeCourageMAX));
+ this.m_MainDragonCoinCourageCount.SetText(string.Format("{0}/{1}", this.doc.DragonCoinCourageCount, this.doc.DragonCoinCourageCost.Length));
+ this.m_MainFreeCourageCount.gameObject.SetActive(this.doc.FreeCourageCount != 0);
+ this.m_MainDragonCoinCourageCount.gameObject.SetActive(this.doc.FreeCourageCount == 0);
+ this.m_MainBtnCourageRedPoint.gameObject.SetActive(this.doc.IsRedPoint());
+ bool flag = this.doc.FreeCourageCount > 0;
+ if (flag)
+ {
+ this.m_MainFree.gameObject.SetActive(true);
+ this.m_MainDragonCoin.gameObject.SetActive(false);
+ this.m_MainBtnCourage.SetEnable(true, false);
+ }
+ else
+ {
+ this.m_MainFree.gameObject.SetActive(false);
+ this.m_MainDragonCoin.gameObject.SetActive(true);
+ this.m_MainBtnCourage.SetEnable(this.doc.DragonCoinCourageCount > 0, false);
+ int num = Mathf.Clamp(this.doc.DragonCoinCourageCost.Length - this.doc.DragonCoinCourageCount, 0, this.doc.DragonCoinCourageCost.Length - 1);
+ this.m_MainDragonCoin.SetText(this.doc.DragonCoinCourageCost[num]);
+ }
+ }
+
+ private void _AutoRefresh(object param)
+ {
+ bool flag = base.IsVisible();
+ if (flag)
+ {
+ XCampDuelDocument.Doc.ReqCampDuel(1u, 0u);
+ this._AutoRefresheTimeID = XSingleton<XTimerMgr>.singleton.SetTimer(5f, new XTimerMgr.ElapsedEventHandler(this._AutoRefresh), null);
+ }
+ }
+
+ private void _AutoCloseBlah(object param)
+ {
+ this.m_MainBlah.gameObject.SetActive(false);
+ }
+
+ public void ShowBlah()
+ {
+ int num = UnityEngine.Random.Range(0, 5);
+ this.m_MainBlah.gameObject.SetActive(true);
+ this.m_MainBlah.SetText(XStringDefineProxy.GetString(XSingleton<XCommon>.singleton.StringCombine("CAMPDUEL_BLAH", num.ToString())));
+ this._AutoCloseBlahTimeID = XSingleton<XTimerMgr>.singleton.SetTimer(3f, new XTimerMgr.ElapsedEventHandler(this._AutoCloseBlah), null);
+ }
+
+ public void AddNumPlayTween(int addPoint)
+ {
+ this.m_MainAddPoint.SetText(string.Format("+{0}", addPoint.ToString()));
+ this.m_MainAddPointTween.PlayTween(true, -1f);
+ }
+
+ public void PlayBoxUpFx()
+ {
+ bool flag = !base.IsVisible();
+ if (!flag)
+ {
+ bool flag2 = this._BoxUpFx != null && this._BoxUpFx.FxName == "Effects/FX_Particle/UIfx/UI_duelcampframe_Clip02";
+ if (flag2)
+ {
+ XSingleton<XFxMgr>.singleton.DestroyFx(this._BoxUpFx, true);
+ }
+ this._BoxUpFx = XSingleton<XFxMgr>.singleton.CreateAndPlay("Effects/FX_Particle/UIfx/UI_duelcampframe_Clip02", this.m_MainCurChest.transform, Vector3.zero, Vector3.one, 1f, true, 6f, true);
+ }
+ }
+
+ public void PlayNPCFx()
+ {
+ bool flag = !base.IsVisible();
+ if (!flag)
+ {
+ bool flag2 = this._NPCFx != null && this._NPCFx.FxName == "Effects/FX_Particle/UIfx/UI_duelcampframe_Clip03";
+ if (flag2)
+ {
+ XSingleton<XFxMgr>.singleton.DestroyFx(this._NPCFx, true);
+ }
+ this._NPCFx = XSingleton<XFxMgr>.singleton.CreateAndPlay("Effects/FX_Particle/UIfx/UI_duelcampframe_Clip03", this.m_MainCampTex.gameObject.transform, Vector3.zero, Vector3.one, 1f, true, 6f, true);
+ }
+ }
+
+ public void UnloadFx(XFx fx)
+ {
+ bool flag = fx != null;
+ if (flag)
+ {
+ XSingleton<XFxMgr>.singleton.DestroyFx(fx, true);
+ fx = null;
+ }
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/XCampDuelMainHandler.cs.meta b/Client/Assets/Scripts/XMainClient/UI/XCampDuelMainHandler.cs.meta
new file mode 100644
index 00000000..d1de2d47
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XCampDuelMainHandler.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 2e1833953238d964a857f5470396bdb8
+timeCreated: 1611403508
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/XCampDuelPointRewardHandler.cs b/Client/Assets/Scripts/XMainClient/UI/XCampDuelPointRewardHandler.cs
new file mode 100644
index 00000000..5cd88b30
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XCampDuelPointRewardHandler.cs
@@ -0,0 +1,106 @@
+using System;
+using System.Collections.Generic;
+using UILib;
+using UnityEngine;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class XCampDuelPointRewardHandler : DlgHandlerBase
+ {
+ protected override string FileName
+ {
+ get
+ {
+ return "OperatingActivity/CampDuelPointReward";
+ }
+ }
+
+ public int CampID;
+
+ private IXUIButton m_Close;
+
+ private XUIPool m_RewardPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ private XUIPool m_ItemPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ private Transform m_ExItem;
+
+ private IXUIScrollView m_ScrollView;
+
+ protected override void Init()
+ {
+ base.Init();
+ Transform transform = base.transform.Find("Bg");
+ this.m_Close = (transform.Find("Close").GetComponent("XUIButton") as IXUIButton);
+ this.m_ScrollView = (transform.Find("ScrollView").GetComponent("XUIScrollView") as IXUIScrollView);
+ this.m_RewardPool.SetupPool(null, transform.Find("ScrollView/RewardTpl").gameObject, 8u, false);
+ this.m_ItemPool.SetupPool(null, transform.Find("ScrollView/ItemTpl").gameObject, 10u, false);
+ this.m_ExItem = transform.Find("ScrollView/Extra");
+ this.m_ExItem.gameObject.SetActive(false);
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ this.m_Close.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnCloseClicked));
+ }
+
+ public bool OnCloseClicked(IXUIButton btn)
+ {
+ base.SetVisible(false);
+ return true;
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ this.RefreshList(true);
+ }
+
+ public void RefreshList(bool resetPos = true)
+ {
+ List<CampDuelPointReward.RowData> pointRewardList = XCampDuelDocument.Doc.GetPointRewardList(this.CampID);
+ bool flag = pointRewardList == null;
+ if (!flag)
+ {
+ this.m_RewardPool.FakeReturnAll();
+ this.m_ItemPool.FakeReturnAll();
+ for (int i = 0; i < pointRewardList.Count; i++)
+ {
+ GameObject gameObject = this.m_RewardPool.FetchGameObject(false);
+ IXUILabel ixuilabel = gameObject.transform.Find("Bg/Point/Num").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel.SetText(pointRewardList[i].Point.ToString());
+ for (int j = 0; j < (int)pointRewardList[i].Reward.count; j++)
+ {
+ GameObject gameObject2 = this.m_ItemPool.FetchGameObject(false);
+ XSingleton<XItemDrawerMgr>.singleton.normalItemDrawer.DrawItem(gameObject2, pointRewardList[i].Reward[j, 0], pointRewardList[i].Reward[j, 1], false);
+ IXUISprite ixuisprite = gameObject2.transform.Find("Icon").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.ID = (ulong)((long)pointRewardList[i].Reward[j, 0]);
+ ixuisprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(XSingleton<UiUtility>.singleton.OnItemClick));
+ gameObject2.transform.parent = gameObject.transform;
+ gameObject2.transform.localPosition = new Vector3(this.m_ItemPool.TplPos.x - this.m_RewardPool.TplPos.x + (float)(this.m_ItemPool.TplWidth * j), 0f);
+ }
+ bool flag2 = pointRewardList[i].EXReward.bufferRef.Length != 0;
+ if (flag2)
+ {
+ GameObject gameObject3 = this.m_ItemPool.FetchGameObject(false);
+ XSingleton<XItemDrawerMgr>.singleton.normalItemDrawer.DrawItem(gameObject3, pointRewardList[i].EXReward[0], pointRewardList[i].EXReward[1], false);
+ IXUISprite ixuisprite2 = gameObject3.transform.Find("Icon").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite2.ID = (ulong)((long)pointRewardList[i].EXReward[0]);
+ ixuisprite2.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(XSingleton<UiUtility>.singleton.OnItemClick));
+ gameObject3.transform.parent = gameObject.transform;
+ gameObject3.transform.localPosition = new Vector3(this.m_ExItem.localPosition.x - this.m_RewardPool.TplPos.x, 0f);
+ }
+ gameObject.transform.localPosition = new Vector3(0f, (float)(-(float)this.m_RewardPool.TplHeight * i)) + this.m_RewardPool.TplPos;
+ }
+ this.m_ItemPool.ActualReturnAll(false);
+ this.m_RewardPool.ActualReturnAll(false);
+ if (resetPos)
+ {
+ this.m_ScrollView.ResetPosition();
+ }
+ }
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/XCampDuelPointRewardHandler.cs.meta b/Client/Assets/Scripts/XMainClient/UI/XCampDuelPointRewardHandler.cs.meta
new file mode 100644
index 00000000..d6ea7f58
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XCampDuelPointRewardHandler.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: edcbe4bfd2c4ade4890bf2420da7d79f
+timeCreated: 1611404793
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/XCampDuelRankRewardHandler.cs b/Client/Assets/Scripts/XMainClient/UI/XCampDuelRankRewardHandler.cs
new file mode 100644
index 00000000..4a02711f
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XCampDuelRankRewardHandler.cs
@@ -0,0 +1,129 @@
+using System;
+using System.Collections.Generic;
+using UILib;
+using UnityEngine;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class XCampDuelRankRewardHandler : DlgHandlerBase
+ {
+ protected override string FileName
+ {
+ get
+ {
+ return "GameSystem/CampDuelRankRewardHandler";
+ }
+ }
+
+ public IXUIButton m_Close;
+
+ public XUIPool m_RewardPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ public XUIPool m_ItemPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ public IXUILabel m_RightText;
+
+ public IXUILabel m_BottomText;
+
+ public IXUIScrollView m_ScrollView;
+
+ protected override void Init()
+ {
+ base.Init();
+ Transform transform = base.transform.Find("Bg");
+ this.m_Close = (transform.Find("Close").GetComponent("XUIButton") as IXUIButton);
+ this.m_BottomText = (transform.Find("BottomText").GetComponent("XUILabel") as IXUILabel);
+ this.m_RightText = (transform.Find("Right/Text").GetComponent("XUILabel") as IXUILabel);
+ this.m_ScrollView = (transform.Find("ScrollView").GetComponent("XUIScrollView") as IXUIScrollView);
+ this.m_RewardPool.SetupPool(null, transform.Find("ScrollView/RewardTpl").gameObject, 8u, false);
+ this.m_ItemPool.SetupPool(null, transform.Find("ScrollView/Item").gameObject, 10u, false);
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ this.m_Close.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnCloseClicked));
+ }
+
+ public bool OnCloseClicked(IXUIButton btn)
+ {
+ base.SetVisible(false);
+ return true;
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ this.RefreshList(true);
+ this.m_BottomText.gameObject.SetActive(true);
+ this.m_BottomText.SetText(XStringDefineProxy.GetString("CAMPDUEL_RANK_REWARD"));
+ this.m_RightText.gameObject.SetActive(true);
+ this.m_RightText.SetText(XTempActivityDocument.Doc.GetEndTime(XCampDuelDocument.Doc.ActInfo, 1).ToString(XStringDefineProxy.GetString("CAMPDUEL_END_TIME")));
+ }
+
+ public void RefreshList(bool resetPos = true)
+ {
+ List<CampDuelRankReward.RowData> rankRewardList = XCampDuelDocument.Doc.GetRankRewardList();
+ bool flag = rankRewardList == null;
+ if (!flag)
+ {
+ this.m_RewardPool.FakeReturnAll();
+ this.m_ItemPool.FakeReturnAll();
+ int i = 0;
+ for (int j = 0; j < rankRewardList.Count; j++)
+ {
+ bool isWin = rankRewardList[j].IsWin;
+ if (isWin)
+ {
+ GameObject gameObject = this.m_RewardPool.FetchGameObject(false);
+ this.RefreshOneRankItem(gameObject.transform.Find("Bg/Win"), rankRewardList[j]);
+ while (i < rankRewardList.Count)
+ {
+ bool flag2 = !rankRewardList[i].IsWin;
+ if (flag2)
+ {
+ this.RefreshOneRankItem(gameObject.transform.Find("Bg/Lose"), rankRewardList[i]);
+ i++;
+ break;
+ }
+ i++;
+ }
+ gameObject.transform.localPosition = new Vector3(0f, (float)(-(float)this.m_RewardPool.TplHeight * j)) + this.m_RewardPool.TplPos;
+ }
+ }
+ this.m_ItemPool.ActualReturnAll(false);
+ this.m_RewardPool.ActualReturnAll(false);
+ if (resetPos)
+ {
+ this.m_ScrollView.ResetPosition();
+ }
+ }
+ }
+
+ private void RefreshOneRankItem(Transform t, CampDuelRankReward.RowData data)
+ {
+ IXUILabel ixuilabel = t.Find("Rank/RankNum").GetComponent("XUILabel") as IXUILabel;
+ bool flag = data.Rank[0] == data.Rank[1];
+ if (flag)
+ {
+ ixuilabel.SetText(string.Format(XStringDefineProxy.GetString("Qualifying_Rank_Reward_Desc1"), data.Rank[0]));
+ }
+ else
+ {
+ ixuilabel.SetText(string.Format(XStringDefineProxy.GetString("Qualifying_Rank_Reward_Desc2"), data.Rank[1]));
+ }
+ Transform parent = t.Find("Item");
+ for (int i = 0; i < (int)data.Reward.count; i++)
+ {
+ GameObject gameObject = this.m_ItemPool.FetchGameObject(false);
+ XSingleton<XItemDrawerMgr>.singleton.normalItemDrawer.DrawItem(gameObject, data.Reward[i, 0], data.Reward[i, 1], false);
+ IXUISprite ixuisprite = gameObject.transform.Find("Icon").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.ID = (ulong)((long)data.Reward[i, 0]);
+ ixuisprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(XSingleton<UiUtility>.singleton.OnItemClick));
+ XSingleton<UiUtility>.singleton.AddChild(parent, gameObject.transform);
+ gameObject.transform.localPosition = new Vector3((float)(this.m_ItemPool.TplWidth * i), 0f);
+ }
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/XCampDuelRankRewardHandler.cs.meta b/Client/Assets/Scripts/XMainClient/UI/XCampDuelRankRewardHandler.cs.meta
new file mode 100644
index 00000000..7daffb0a
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XCampDuelRankRewardHandler.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 99823ec0b3c323946961ec69d34c05a1
+timeCreated: 1611404196
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/XCharacterCommonMenuView.cs b/Client/Assets/Scripts/XMainClient/UI/XCharacterCommonMenuView.cs
new file mode 100644
index 00000000..a972c54b
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XCharacterCommonMenuView.cs
@@ -0,0 +1,700 @@
+using System;
+using System.Collections.Generic;
+using KKSG;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class XCharacterCommonMenuView : DlgBase<XCharacterCommonMenuView, XCharacterCommonMenuBehaviour>
+ {
+ public override string fileName
+ {
+ get
+ {
+ return "GameSystem/CharacterCommonMenu";
+ }
+ }
+
+ public override bool autoload
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override bool isHideChat
+ {
+ get
+ {
+ return false;
+ }
+ }
+
+ public override bool isHideTutorial
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ private ulong _roleShortID;
+
+ private ulong _roleID;
+
+ private string _roleName;
+
+ private uint _titleID;
+
+ private uint _roleLevel;
+
+ private uint _roleVipLevel;
+
+ private uint _powerPoint;
+
+ private uint _profession;
+
+ private string _guildName;
+
+ private bool _isMyFriend;
+
+ private bool _bBlock;
+
+ private uint _dataLastLogin;
+
+ private ulong _guildID;
+
+ private XUnitAppearanceTeam _team = default(XUnitAppearanceTeam);
+
+ private int charactorCommonMenuFilter = 0;
+
+ private bool _inGuildSelf;
+
+ private int _inviteGuildCD;
+
+ private float _pastTime;
+
+ private bool _canInviteGuild;
+
+ private bool _isHadPairPet;
+
+ private List<uint> _setid = new List<uint>();
+
+ private XCharacterCommonMenuDocument m_doc;
+
+ protected override void Init()
+ {
+ base.Init();
+ this.m_doc = XDocuments.GetSpecificDocument<XCharacterCommonMenuDocument>(XCharacterCommonMenuDocument.uuID);
+ this._inviteGuildCD = int.Parse(XSingleton<XGlobalConfig>.singleton.GetValue("InviteGuildPrivateCD"));
+ this._canInviteGuild = true;
+ this._pastTime = 0f;
+ }
+
+ protected override void OnUnload()
+ {
+ base.uiBehaviour.playerView = null;
+ base.OnUnload();
+ }
+
+ public void SetupMenuFilter(int filterValue)
+ {
+ this.charactorCommonMenuFilter = filterValue;
+ }
+
+ public override void RegisterEvent()
+ {
+ base.Init();
+ base.uiBehaviour.btnClose.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnClose));
+ base.uiBehaviour.btnSendFlower.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnSendFlower));
+ base.uiBehaviour.btnExchange.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnExchangeBtnClick));
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ base.uiBehaviour.btnSendFlower.gameObject.SetActive(XSingleton<XGameSysMgr>.singleton.IsSystemOpened(XSysDefine.XSys_FlowerRank));
+ this.SetPlayerInfo();
+ this.FillBtn();
+ }
+
+ public override void OnUpdate()
+ {
+ base.OnUpdate();
+ bool flag = !this._canInviteGuild;
+ if (flag)
+ {
+ this._pastTime += Time.deltaTime;
+ }
+ bool flag2 = this._pastTime >= (float)this._inviteGuildCD;
+ if (flag2)
+ {
+ this._canInviteGuild = true;
+ this._pastTime = 0f;
+ }
+ }
+
+ public void ShowMenu(UnitAppearance unitInfo)
+ {
+ bool flag = !base.IsVisible();
+ if (flag)
+ {
+ bool flag2 = unitInfo == null;
+ if (flag2)
+ {
+ XSingleton<XDebug>.singleton.AddLog("[CharacterCommonMenu] unitInfo is null", null, null, null, null, null, XDebugColor.XDebug_None);
+ }
+ else
+ {
+ this._roleID = unitInfo.uID;
+ this._roleName = unitInfo.unitName;
+ this._titleID = ((unitInfo.outlook != null && unitInfo.outlook.title != null) ? unitInfo.outlook.title.titleID : 0u);
+ this._roleLevel = unitInfo.level;
+ this._powerPoint = unitInfo.PowerPoint;
+ this._profession = unitInfo.unitType;
+ this._roleVipLevel = unitInfo.viplevel;
+ this._dataLastLogin = unitInfo.lastlogin;
+ this._guildName = ((unitInfo.outlook != null && unitInfo.outlook.guild != null) ? unitInfo.outlook.guild.name : "");
+ this._guildID = ((unitInfo.outlook != null && unitInfo.outlook.guild != null) ? unitInfo.outlook.guild.id : 0UL);
+ this._roleShortID = (ulong)unitInfo.nickid;
+ this._setid = ((unitInfo.outlook != null && unitInfo.outlook.pre != null) ? unitInfo.outlook.pre.setid : new List<uint>());
+ this._isMyFriend = DlgBase<XFriendsView, XFriendsBehaviour>.singleton.IsMyFriend(this._roleID);
+ this._bBlock = DlgBase<XFriendsView, XFriendsBehaviour>.singleton.IsBlock(this._roleID);
+ this._team.SetData(unitInfo.team);
+ this._isHadPairPet = false;
+ XEntity entity = XSingleton<XEntityMgr>.singleton.GetEntity(this._roleID);
+ bool flag3 = entity != null && entity.Attributes.Outlook.state.type == OutLookStateType.OutLook_RidePet;
+ if (flag3)
+ {
+ uint petType = XPetDocument.GetPetType(entity.Attributes.Outlook.state.param);
+ this._isHadPairPet = (petType == 1u);
+ }
+ XGuildDocument specificDocument = XDocuments.GetSpecificDocument<XGuildDocument>(XGuildDocument.uuID);
+ this._inGuildSelf = specificDocument.bInGuild;
+ this.SetVisibleWithAnimation(true, null);
+ }
+ }
+ }
+
+ public void RefreshBtns()
+ {
+ this.FillBtn();
+ }
+
+ public void SetBlock()
+ {
+ this._bBlock = DlgBase<XFriendsView, XFriendsBehaviour>.singleton.IsBlock(this._roleID);
+ }
+
+ private void SetPlayerInfo()
+ {
+ base.uiBehaviour.playerView.uidLab.SetText(string.Format("UID:{0}", this._roleShortID));
+ base.uiBehaviour.playerView.lbName.InputText = XSingleton<XCommon>.singleton.StringCombine(XTitleDocument.GetTitleWithFormat(this._titleID, this._roleName), XRechargeDocument.GetVIPIconString(this._roleVipLevel));
+ base.uiBehaviour.playerView.lbPPT.SetText(this._powerPoint.ToString());
+ base.uiBehaviour.playerView.sprHead.SetSprite(XSingleton<XProfessionSkillMgr>.singleton.GetProfHeadIcon2((int)this._profession));
+ base.uiBehaviour.playerView.SetGuildName(this._guildName);
+ base.uiBehaviour.playerView.lbLevel.SetText(this._roleLevel.ToString());
+ XSingleton<UiUtility>.singleton.ParseHeadIcon(this._setid, base.uiBehaviour.m_sprFrame);
+ this.UpdateOnlineState(base.uiBehaviour.playerView.lbName.gameObject.transform.parent, this._dataLastLogin);
+ int sysOpenLevel = XSingleton<XGameSysMgr>.singleton.GetSysOpenLevel(XFastEnumIntEqualityComparer<XSysDefine>.ToInt(XSysDefine.XSys_FlowerRank));
+ base.uiBehaviour.btnSendFlower.gameObject.SetActive((ulong)this._roleLevel >= (ulong)((long)sysOpenLevel));
+ base.uiBehaviour.btnExchange.ID = this._roleID;
+ XGuildCollectDocument specificDocument = XDocuments.GetSpecificDocument<XGuildCollectDocument>(XGuildCollectDocument.uuID);
+ base.uiBehaviour.btnExchange.SetVisible(XSingleton<XScene>.singleton.SceneType == SceneType.SCENE_GUILD_HALL && specificDocument.ActivityState);
+ }
+
+ private void FillBtn()
+ {
+ base.uiBehaviour.m_btntemPool.ReturnAll(true);
+ bool flag = XCharacterCommonMenuDocument.CharacterCommonInfoTable == null;
+ if (!flag)
+ {
+ int num = 0;
+ List<int> list = null;
+ bool flag2 = this.charactorCommonMenuFilter > 0;
+ if (flag2)
+ {
+ string key = XSingleton<XCommon>.singleton.StringCombine("CharacterCommonMenuFilter", this.charactorCommonMenuFilter.ToString());
+ list = XSingleton<XGlobalConfig>.singleton.GetIntList(key);
+ }
+ bool flag3 = list != null && list.Count > 0;
+ for (int i = 0; i < XCharacterCommonMenuDocument.CharacterCommonInfoTable.Table.Length; i++)
+ {
+ CharacterCommonInfo.RowData rowData = XCharacterCommonMenuDocument.CharacterCommonInfoTable.Table[i];
+ bool flag4 = rowData == null;
+ if (!flag4)
+ {
+ bool flag5 = flag3 && list.Contains((int)rowData.Type);
+ if (!flag5)
+ {
+ bool flag6 = !this.IsShow(rowData.Type);
+ if (!flag6)
+ {
+ GameObject gameObject = base.uiBehaviour.m_btntemPool.FetchGameObject(false);
+ gameObject.transform.parent = this.m_uiBehaviour.m_parentTra;
+ gameObject.transform.localScale = Vector3.one;
+ gameObject.transform.localPosition = new Vector3((float)(base.uiBehaviour.m_btntemPool.TplWidth * (num % 2)), (float)(-(float)base.uiBehaviour.m_btntemPool.TplHeight * (num / 2)), 0f);
+ IXUIButton ixuibutton = gameObject.GetComponent("XUIButton") as IXUIButton;
+ ixuibutton.ID = (ulong)rowData.Type;
+ ixuibutton.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnClickBtn));
+ IXUILabel ixuilabel = gameObject.transform.Find("T").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel.SetText(rowData.ShowText);
+ num++;
+ }
+ }
+ }
+ }
+ bool flag7 = num < 9;
+ if (flag7)
+ {
+ int num2 = (num % 2 == 0) ? (num / 2) : (num / 2 + 1);
+ base.uiBehaviour.m_bgSpr.spriteHeight = base.uiBehaviour.TotalHeight - (5 - num2) * base.uiBehaviour.m_btntemPool.TplHeight;
+ base.uiBehaviour.m_bgTra.localPosition = new Vector3(0f, (float)(-(float)(5 - num2) * base.uiBehaviour.m_btntemPool.TplHeight / 2), 0f);
+ }
+ else
+ {
+ base.uiBehaviour.m_bgSpr.spriteHeight = base.uiBehaviour.TotalHeight;
+ base.uiBehaviour.m_bgTra.localPosition = Vector3.zero;
+ }
+ this.charactorCommonMenuFilter = 0;
+ }
+ }
+
+ public bool IsShow(uint type)
+ {
+ switch (type)
+ {
+ case 2u:
+ return this._isMyFriend;
+ case 3u:
+ return !this._isMyFriend;
+ case 5u:
+ return this._team.bHasTeam;
+ case 6u:
+ return !this._team.bHasTeam;
+ case 7u:
+ return this._inGuildSelf;
+ case 8u:
+ return !this._inGuildSelf;
+ case 9u:
+ return !this._bBlock;
+ case 10u:
+ return this._bBlock;
+ case 12u:
+ return XMentorshipDocument.Doc.ClickedRoleMentorshipStatus == MentorApplyStatus.MentorApplyMaster;
+ case 13u:
+ return XMentorshipDocument.Doc.ClickedRoleMentorshipStatus == MentorApplyStatus.MentorApplyStudent;
+ case 14u:
+ return XCharacterCommonMenuDocument.IsHasRole && this._isHadPairPet;
+ case 15u:
+ {
+ XPetDocument specificDocument = XDocuments.GetSpecificDocument<XPetDocument>(XPetDocument.uuID);
+ return XCharacterCommonMenuDocument.IsHasRole && !this._isHadPairPet && specificDocument.IsDrivingPairPet;
+ }
+ }
+ return true;
+ }
+
+ private void UpdateOnlineState(Transform trans, uint lastlogin)
+ {
+ GameObject gameObject = trans.Find("Online").gameObject;
+ gameObject.SetActive(lastlogin == 0u);
+ IXUILabel ixuilabel = trans.Find("Offline").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel.SetText(string.Empty);
+ }
+
+ private bool OnClose(IXUIButton sprClose)
+ {
+ this.SetVisibleWithAnimation(false, null);
+ return true;
+ }
+
+ private bool OnSendFlower(IXUIButton go)
+ {
+ DlgBase<XFlowerSendView, XFlowerSendBehaviour>.singleton.ShowBoard(this._roleID, this._roleName);
+ return true;
+ }
+
+ private bool OnExchangeBtnClick(IXUIButton btn)
+ {
+ RpcC2G_GuildCampPartyReqExchange rpcC2G_GuildCampPartyReqExchange = new RpcC2G_GuildCampPartyReqExchange();
+ rpcC2G_GuildCampPartyReqExchange.oArg.role_id = btn.ID;
+ XSingleton<XClientNetwork>.singleton.Send(rpcC2G_GuildCampPartyReqExchange);
+ return true;
+ }
+
+ private bool OnClickBtn(IXUIButton button)
+ {
+ ulong id = button.ID;
+ ulong num = id;
+ ulong num2 = num - 1UL;
+ if (num2 <= 15UL)
+ {
+ switch ((uint)num2)
+ {
+ case 0u:
+ this.OnClickView(button);
+ break;
+ case 1u:
+ case 2u:
+ this.OnDeleteFriendClicked();
+ break;
+ case 3u:
+ this.OnChatClicked();
+ break;
+ case 4u:
+ case 5u:
+ this.OnClickTeamChat();
+ break;
+ case 6u:
+ case 7u:
+ this.OnGuildClicked();
+ break;
+ case 8u:
+ case 9u:
+ this.OnClickBlackList(button);
+ break;
+ case 10u:
+ this.OnPKBtnClicked();
+ break;
+ case 11u:
+ case 12u:
+ this.OnBSBtnClicked();
+ break;
+ case 13u:
+ case 14u:
+ this.OnInvite();
+ break;
+ case 15u:
+ this.OnTransform();
+ break;
+ }
+ }
+ return true;
+ }
+
+ private bool OnClickView(IXUIButton btn)
+ {
+ DlgBase<XOtherPlayerInfoView, XOtherPlayerInfoBehaviour>.singleton.SetPlayerInfo(this._roleID, this._roleName, this._setid, this._powerPoint, this._profession);
+ DlgBase<XOtherPlayerInfoView, XOtherPlayerInfoBehaviour>.singleton.SetVisibleWithAnimation(true, null);
+ return DlgBase<XOtherPlayerInfoView, XOtherPlayerInfoBehaviour>.singleton.ShowDetailInfo(btn);
+ }
+
+ private bool OnDeleteFriendClicked()
+ {
+ bool flag = XPartnerDocument.Doc.IsMyPartner(this._roleID);
+ bool result;
+ if (flag)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString("NeedCanclePartner"), "fece00");
+ result = true;
+ }
+ else
+ {
+ bool flag2 = !XSingleton<XGameSysMgr>.singleton.IsSystemOpened(XSysDefine.XSys_Friends);
+ if (flag2)
+ {
+ int sysid = XFastEnumIntEqualityComparer<XSysDefine>.ToInt(XSysDefine.XSys_Friends);
+ int sysOpenLevel = XSingleton<XGameSysMgr>.singleton.GetSysOpenLevel(sysid);
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString("EXPEDITION_REQUIRED_LEVEL", new object[]
+ {
+ sysOpenLevel
+ }) + XSingleton<XGameSysMgr>.singleton.GetSysName(sysid), "fece00");
+ result = true;
+ }
+ else
+ {
+ bool isMyFriend = this._isMyFriend;
+ if (isMyFriend)
+ {
+ XFriendsView singleton = DlgBase<XFriendsView, XFriendsBehaviour>.singleton;
+ singleton.OnRemoveFriendSucc = (Action)Delegate.Combine(singleton.OnRemoveFriendSucc, new Action(this.RemoveFriendSucc));
+ DlgBase<XFriendsView, XFriendsBehaviour>.singleton.RemoveFriend(this._roleID);
+ }
+ else
+ {
+ DlgBase<XFriendsView, XFriendsBehaviour>.singleton.AddFriendById(this._roleID);
+ }
+ result = true;
+ }
+ }
+ return result;
+ }
+
+ private bool OnChatClicked()
+ {
+ bool flag = !XSingleton<XGameSysMgr>.singleton.IsSystemOpened(XSysDefine.XSys_Friends);
+ bool result;
+ if (flag)
+ {
+ int sysid = XFastEnumIntEqualityComparer<XSysDefine>.ToInt(XSysDefine.XSys_Friends);
+ int sysOpenLevel = XSingleton<XGameSysMgr>.singleton.GetSysOpenLevel(sysid);
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString("EXPEDITION_REQUIRED_LEVEL", new object[]
+ {
+ sysOpenLevel
+ }) + XSingleton<XGameSysMgr>.singleton.GetSysName(sysid), "fece00");
+ result = true;
+ }
+ else
+ {
+ DlgBase<XFriendsSearchView, XFriendsSearchBehaviour>.singleton.SetVisible(false, true);
+ this.SetVisibleWithAnimation(false, null);
+ bool bBlock = this._bBlock;
+ if (bBlock)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString("FRIENDS_BLOCK_HINT_TEXT"), "fece00");
+ }
+ else
+ {
+ DlgBase<XOtherPlayerInfoView, XOtherPlayerInfoBehaviour>.singleton.SetPlayerInfo(this._roleID, this._roleName, this._setid, this._powerPoint, this._profession);
+ DlgBase<XOtherPlayerInfoView, XOtherPlayerInfoBehaviour>.singleton.PrivateChat(null);
+ }
+ result = true;
+ }
+ return result;
+ }
+
+ private bool OnClickTeamChat()
+ {
+ bool flag = XSingleton<XScene>.singleton.SceneType == SceneType.SCENE_FAMILYGARDEN;
+ bool result;
+ if (flag)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString("CurSceneCanNotCtrl"), "fece00");
+ result = true;
+ }
+ else
+ {
+ XTeamDocument specificDocument = XDocuments.GetSpecificDocument<XTeamDocument>(XTeamDocument.uuID);
+ bool flag2 = !XSingleton<XGameSysMgr>.singleton.IsSystemOpened(XSysDefine.XSys_Team);
+ if (flag2)
+ {
+ int sysid = XFastEnumIntEqualityComparer<XSysDefine>.ToInt(XSysDefine.XSys_Team);
+ int sysOpenLevel = XSingleton<XGameSysMgr>.singleton.GetSysOpenLevel(sysid);
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString("EXPEDITION_REQUIRED_LEVEL", new object[]
+ {
+ sysOpenLevel
+ }) + XSingleton<XGameSysMgr>.singleton.GetSysName(sysid), "fece00");
+ result = true;
+ }
+ else
+ {
+ XCharacterCommonMenuDocument specificDocument2 = XDocuments.GetSpecificDocument<XCharacterCommonMenuDocument>(XCharacterCommonMenuDocument.uuID);
+ bool flag3 = !this._team.bHasTeam;
+ if (flag3)
+ {
+ specificDocument2.TryInviteTeam(this._roleID);
+ }
+ else
+ {
+ specificDocument2.TryJoinTeam(this._team);
+ }
+ DlgBase<XFriendsSearchView, XFriendsSearchBehaviour>.singleton.SetVisible(false, true);
+ this.SetVisibleWithAnimation(false, null);
+ result = true;
+ }
+ }
+ return result;
+ }
+
+ private bool OnGuildClicked()
+ {
+ bool inGuildSelf = this._inGuildSelf;
+ if (inGuildSelf)
+ {
+ bool canInviteGuild = this._canInviteGuild;
+ if (canInviteGuild)
+ {
+ bool bBlock = this._bBlock;
+ if (bBlock)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString("RRIENDS_INVITE_GUILD_ERROR2"), "fece00");
+ }
+ else
+ {
+ XGuildDocument specificDocument = XDocuments.GetSpecificDocument<XGuildDocument>(XGuildDocument.uuID);
+ bool flag = specificDocument.BasicData.uid == this._guildID;
+ if (flag)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString("GUILD_SAME_IN"), "fece00");
+ return true;
+ }
+ DlgBase<XChatView, XChatBehaviour>.singleton.ChatFriendId = this._roleID;
+ ChatInfo chatInfo = new ChatInfo();
+ chatInfo.mTime = DateTime.Now;
+ chatInfo.isSelfSender = true;
+ chatInfo.mReceiverName = this._roleName;
+ chatInfo.mReceiverId = this._roleID;
+ chatInfo.mReciverPowerPoint = this._powerPoint;
+ chatInfo.mRecieverProfession = this._profession;
+ chatInfo.mReceiverVip = this._roleVipLevel;
+ XChatDocument specificDocument2 = XDocuments.GetSpecificDocument<XChatDocument>(XChatDocument.uuID);
+ specificDocument2.AddChatinfo2FriendList(chatInfo);
+ XInvitationDocument specificDocument3 = XDocuments.GetSpecificDocument<XInvitationDocument>(XInvitationDocument.uuID);
+ specificDocument3.SendGuildInvitationPrivate();
+ this._canInviteGuild = false;
+ }
+ }
+ else
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString("RRIENDS_INVITE_GUILD_ERROR"), "fece00");
+ }
+ }
+ else
+ {
+ bool flag2 = this._guildID == 0UL;
+ if (flag2)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString("FRIENDS_JOIN_GUILD"), "fece00");
+ }
+ else
+ {
+ XGuildViewDocument specificDocument4 = XDocuments.GetSpecificDocument<XGuildViewDocument>(XGuildViewDocument.uuID);
+ specificDocument4.View(this._guildID);
+ DlgBase<XFriendsSearchView, XFriendsSearchBehaviour>.singleton.SetVisible(false, true);
+ this.SetVisibleWithAnimation(false, null);
+ }
+ }
+ return true;
+ }
+
+ private bool OnClickBlackList(IXUIButton btn)
+ {
+ bool flag = !XSingleton<XGameSysMgr>.singleton.IsSystemOpened(XSysDefine.XSys_Friends);
+ bool result;
+ if (flag)
+ {
+ int sysid = XFastEnumIntEqualityComparer<XSysDefine>.ToInt(XSysDefine.XSys_Friends);
+ int sysOpenLevel = XSingleton<XGameSysMgr>.singleton.GetSysOpenLevel(sysid);
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString("EXPEDITION_REQUIRED_LEVEL", new object[]
+ {
+ sysOpenLevel
+ }) + XSingleton<XGameSysMgr>.singleton.GetSysName(sysid), "fece00");
+ result = true;
+ }
+ else
+ {
+ this.OnHide();
+ bool bBlock = this._bBlock;
+ if (bBlock)
+ {
+ ulong id = btn.ID;
+ btn.ID = this._roleID;
+ bool flag2 = DlgBase<XFriendsView, XFriendsBehaviour>.singleton.OnRemoveBlockFriend(btn);
+ btn.ID = id;
+ result = flag2;
+ }
+ else
+ {
+ XFriendsView singleton = DlgBase<XFriendsView, XFriendsBehaviour>.singleton;
+ singleton.OnAddBlockSucc = (Action)Delegate.Combine(singleton.OnAddBlockSucc, new Action(this.AddBlockSucc));
+ DlgBase<XFriendsView, XFriendsBehaviour>.singleton.AddBlockFriend(this._roleID);
+ result = true;
+ }
+ }
+ return result;
+ }
+
+ private bool OnPKBtnClicked()
+ {
+ int sysid = XFastEnumIntEqualityComparer<XSysDefine>.ToInt(XSysDefine.XSys_PK);
+ int sysOpenLevel = XSingleton<XGameSysMgr>.singleton.GetSysOpenLevel(sysid);
+ bool flag = !XSingleton<XGameSysMgr>.singleton.IsSystemOpened(XSysDefine.XSys_PK);
+ bool result;
+ if (flag)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString("EXPEDITION_REQUIRED_LEVEL", new object[]
+ {
+ sysOpenLevel
+ }) + XSingleton<XGameSysMgr>.singleton.GetSysName(sysid), "fece00");
+ result = false;
+ }
+ else
+ {
+ bool flag2 = (ulong)this._roleLevel < (ulong)((long)sysOpenLevel);
+ if (flag2)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString("PLAYER_SYS_NOT_OPEN"), "fece00");
+ result = false;
+ }
+ else
+ {
+ XPKInvitationDocument specificDocument = XDocuments.GetSpecificDocument<XPKInvitationDocument>(XPKInvitationDocument.uuID);
+ specificDocument.SendPKInvitation(this._roleID);
+ result = true;
+ }
+ }
+ return result;
+ }
+
+ private bool OnBSBtnClicked()
+ {
+ XMentorshipDocument.Doc.ClickedMainSceneRoleID = this._roleID;
+ bool flag = XMentorshipDocument.Doc.ClickedRoleMentorshipStatus == MentorApplyStatus.MentorApplyMaster;
+ if (flag)
+ {
+ XMentorshipDocument.Doc.SendMentorRelationOp(MentorRelationOpType.MentorRelationOp_ApplyMaster, XMentorshipDocument.Doc.ClickedMainSceneRoleID, 0);
+ }
+ else
+ {
+ bool flag2 = XMentorshipDocument.Doc.ClickedRoleMentorshipStatus == MentorApplyStatus.MentorApplyStudent;
+ if (flag2)
+ {
+ XMentorshipDocument.Doc.SendMentorRelationOp(MentorRelationOpType.MentorRelationOp_ApplyStudent, XMentorshipDocument.Doc.ClickedMainSceneRoleID, 0);
+ }
+ }
+ return true;
+ }
+
+ private bool OnInvite()
+ {
+ XPetDocument specificDocument = XDocuments.GetSpecificDocument<XPetDocument>(XPetDocument.uuID);
+ bool isHadPairPet = this._isHadPairPet;
+ if (isHadPairPet)
+ {
+ bool flag = !XSingleton<XGameSysMgr>.singleton.IsSystemOpened(XSysDefine.XSys_Horse);
+ if (flag)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString("ERR_PETSYS_NOT_OPEN"), "fece00");
+ return false;
+ }
+ specificDocument.ReqPetPetOperationOther(PetOtherOp.DoPetPairRide, this._roleID);
+ }
+ else
+ {
+ bool isDrivingPairPet = specificDocument.IsDrivingPairPet;
+ if (isDrivingPairPet)
+ {
+ specificDocument.ReqPetPetOperationOther(PetOtherOp.InvitePetPairRide, this._roleID);
+ }
+ }
+ return true;
+ }
+
+ private bool OnTransform()
+ {
+ XTransformDocument specificDocument = XDocuments.GetSpecificDocument<XTransformDocument>(XTransformDocument.uuID);
+ specificDocument.TryTransformOther(this._roleName, this._roleID);
+ this.SetVisibleWithAnimation(false, null);
+ return true;
+ }
+
+ private void AddBlockSucc()
+ {
+ XFriendsView singleton = DlgBase<XFriendsView, XFriendsBehaviour>.singleton;
+ singleton.OnAddBlockSucc = (Action)Delegate.Remove(singleton.OnAddBlockSucc, new Action(this.AddBlockSucc));
+ this.SetVisibleWithAnimation(false, null);
+ }
+
+ private void RemoveFriendSucc()
+ {
+ XFriendsView singleton = DlgBase<XFriendsView, XFriendsBehaviour>.singleton;
+ singleton.OnRemoveFriendSucc = (Action)Delegate.Remove(singleton.OnRemoveFriendSucc, new Action(this.RemoveFriendSucc));
+ this.SetVisibleWithAnimation(false, null);
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/XCharacterCommonMenuView.cs.meta b/Client/Assets/Scripts/XMainClient/UI/XCharacterCommonMenuView.cs.meta
new file mode 100644
index 00000000..bd242e8c
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XCharacterCommonMenuView.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 7073c5a64a62e5c49a5d819842d9671f
+timeCreated: 1611403931
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/XCommonHelpTipBehaviour.cs b/Client/Assets/Scripts/XMainClient/UI/XCommonHelpTipBehaviour.cs
new file mode 100644
index 00000000..9df110b1
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XCommonHelpTipBehaviour.cs
@@ -0,0 +1,25 @@
+using System;
+using UILib;
+using XMainClient.UI.UICommon;
+
+namespace XMainClient.UI
+{
+ internal class XCommonHelpTipBehaviour : DlgBehaviourBase
+ {
+ public IXUILabel m_Title;
+
+ public IXUIScrollView m_ScrollView;
+
+ public IXUILabel m_Content;
+
+ public IXUIButton m_Close;
+
+ private void Awake()
+ {
+ this.m_Title = (base.transform.Find("Title").GetComponent("XUILabel") as IXUILabel);
+ this.m_ScrollView = (base.transform.Find("ScrollView").GetComponent("XUIScrollView") as IXUIScrollView);
+ this.m_Content = (base.transform.Find("ScrollView/Content").GetComponent("XUILabel") as IXUILabel);
+ this.m_Close = (base.transform.Find("Btn").GetComponent("XUIButton") as IXUIButton);
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/XCommonHelpTipBehaviour.cs.meta b/Client/Assets/Scripts/XMainClient/UI/XCommonHelpTipBehaviour.cs.meta
new file mode 100644
index 00000000..65f08fdc
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XCommonHelpTipBehaviour.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: b4b73352035682f4bafaec52a90fb0db
+timeCreated: 1611404393
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/XCommonHelpTipView.cs b/Client/Assets/Scripts/XMainClient/UI/XCommonHelpTipView.cs
new file mode 100644
index 00000000..6cf1bd9f
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XCommonHelpTipView.cs
@@ -0,0 +1,126 @@
+using System;
+using UILib;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class XCommonHelpTipView : DlgBase<XCommonHelpTipView, XCommonHelpTipBehaviour>
+ {
+ public override bool autoload
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override string fileName
+ {
+ get
+ {
+ return "Common/CommonHelpTip";
+ }
+ }
+
+ private SystemHelpTable _systemHelpReader = null;
+
+ private string m_title;
+
+ private string m_content;
+
+ public void ShowHelp(string title, string content)
+ {
+ this.m_title = title;
+ this.m_content = XSingleton<UiUtility>.singleton.ReplaceReturn(content);
+ bool flag = !base.IsVisible();
+ if (flag)
+ {
+ this.SetVisibleWithAnimation(true, null);
+ }
+ }
+
+ public void ShowHelp(int sysID)
+ {
+ bool flag = this._systemHelpReader == null;
+ if (flag)
+ {
+ this._systemHelpReader = new SystemHelpTable();
+ XSingleton<XResourceLoaderMgr>.singleton.ReadFile("Table/SystemHelp", this._systemHelpReader);
+ }
+ SystemHelpTable.RowData bySystemID = this._systemHelpReader.GetBySystemID(sysID);
+ bool flag2 = bySystemID != null;
+ if (flag2)
+ {
+ bool flag3 = bySystemID.SystemHelp != null && bySystemID.SystemHelp.Length != 0;
+ if (flag3)
+ {
+ this.m_title = bySystemID.SystemHelp[0];
+ }
+ bool flag4 = bySystemID.SystemHelp != null && bySystemID.SystemHelp.Length > 1;
+ if (flag4)
+ {
+ this.m_content = XSingleton<UiUtility>.singleton.ReplaceReturn(bySystemID.SystemHelp[1]);
+ }
+ }
+ bool flag5 = !base.IsVisible();
+ if (flag5)
+ {
+ this.SetVisibleWithAnimation(true, null);
+ }
+ }
+
+ public void ShowHelp(XSysDefine sys)
+ {
+ this.m_title = "";
+ this.m_content = "";
+ bool flag = this._systemHelpReader == null;
+ if (flag)
+ {
+ this._systemHelpReader = new SystemHelpTable();
+ XSingleton<XResourceLoaderMgr>.singleton.ReadFile("Table/SystemHelp", this._systemHelpReader);
+ }
+ int key = XFastEnumIntEqualityComparer<XSysDefine>.ToInt(sys);
+ SystemHelpTable.RowData bySystemID = this._systemHelpReader.GetBySystemID(key);
+ bool flag2 = bySystemID != null;
+ if (flag2)
+ {
+ bool flag3 = bySystemID.SystemHelp != null && bySystemID.SystemHelp.Length != 0;
+ if (flag3)
+ {
+ this.m_title = bySystemID.SystemHelp[0];
+ }
+ bool flag4 = bySystemID.SystemHelp != null && bySystemID.SystemHelp.Length > 1;
+ if (flag4)
+ {
+ this.m_content = XSingleton<UiUtility>.singleton.ReplaceReturn(bySystemID.SystemHelp[1]);
+ }
+ }
+ bool flag5 = !base.IsVisible();
+ if (flag5)
+ {
+ this.SetVisibleWithAnimation(true, null);
+ }
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ base.uiBehaviour.m_Title.SetText(this.m_title);
+ base.uiBehaviour.m_Content.SetText(this.m_content);
+ base.uiBehaviour.m_ScrollView.ResetPosition();
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ base.uiBehaviour.m_Close.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnCloseBtnClicked));
+ }
+
+ private bool OnCloseBtnClicked(IXUIButton btn)
+ {
+ this.SetVisibleWithAnimation(false, null);
+ return false;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/XCommonHelpTipView.cs.meta b/Client/Assets/Scripts/XMainClient/UI/XCommonHelpTipView.cs.meta
new file mode 100644
index 00000000..d002a294
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XCommonHelpTipView.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 9236a757997fce14990a4894bf27f9e8
+timeCreated: 1611404146
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/XContentMailView.cs b/Client/Assets/Scripts/XMainClient/UI/XContentMailView.cs
new file mode 100644
index 00000000..5d052979
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XContentMailView.cs
@@ -0,0 +1,238 @@
+using System;
+using System.Collections.Generic;
+using KKSG;
+using UILib;
+using UnityEngine;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class XContentMailView : DlgHandlerBase
+ {
+ private XMailDocument _doc = null;
+
+ public IXUILabel m_lbltitle;
+
+ public IXUILabel m_lbldate;
+
+ public IXUILabel m_lalcont;
+
+ public IXUILabel m_lblvalit;
+
+ public GameObject m_objSlice;
+
+ public GameObject m_objTpl;
+
+ public IXUIButton m_btnrcv;
+
+ public IXUILabel m_lblrcv;
+
+ public IXUISprite m_sprclaim;
+
+ public Transform m_tranAttach;
+
+ public IXUIScrollView m_scroll;
+
+ private XUIPool m_pool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ private int leftTime = int.MaxValue;
+
+ protected override void Init()
+ {
+ base.Init();
+ this.m_lbltitle = (base.PanelObject.transform.Find("title/TitleLabel").GetComponent("XUILabel") as IXUILabel);
+ this.m_lbldate = (base.PanelObject.transform.Find("title/DateLabel").GetComponent("XUILabel") as IXUILabel);
+ this.m_lalcont = (base.PanelObject.transform.Find("content/contentLabel").GetComponent("XUILabel") as IXUILabel);
+ this.m_lblvalit = (base.PanelObject.transform.Find("btm/ValidityLabel").GetComponent("XUILabel") as IXUILabel);
+ this.m_btnrcv = (base.PanelObject.transform.Find("btm/rwdBtn").GetComponent("XUIButton") as IXUIButton);
+ this.m_lblrcv = (base.PanelObject.transform.Find("btm/rwdBtn/T").GetComponent("XUILabel") as IXUILabel);
+ this.m_sprclaim = (base.PanelObject.transform.Find("btm/claimSpr").GetComponent("XUISprite") as IXUISprite);
+ this.m_scroll = (base.PanelObject.transform.Find("items").GetComponent("XUIScrollView") as IXUIScrollView);
+ this.m_objSlice = base.PanelObject.transform.Find("bg/slice").gameObject;
+ this.m_objTpl = base.PanelObject.transform.Find("tpl").gameObject;
+ this.m_scroll.ResetPosition();
+ this.m_pool.SetupPool(this.m_scroll.gameObject, this.m_objTpl, 2u, false);
+ this.m_tranAttach = base.PanelObject.transform.Find("bg/bg/T");
+ XSystemMailView.doItemSelect = (XSystemMailView.DelSelect)Delegate.Combine(XSystemMailView.doItemSelect, new XSystemMailView.DelSelect(this.Refresh));
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ this.m_btnrcv.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnRcvBtnClick));
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ this._doc = (XSingleton<XGame>.singleton.Doc.GetXComponent(XMailDocument.uuID) as XMailDocument);
+ this.Refresh();
+ }
+
+ public override void OnUpdate()
+ {
+ base.OnUpdate();
+ bool flag = this.leftTime < 86400 && this._doc != null;
+ if (flag)
+ {
+ this.m_lblvalit.SetText(XStringDefineProxy.GetString("Mail_VALIT") + this._doc.valit);
+ }
+ }
+
+ public override void OnUnload()
+ {
+ XSystemMailView.doItemSelect = (XSystemMailView.DelSelect)Delegate.Remove(XSystemMailView.doItemSelect, new XSystemMailView.DelSelect(this.Refresh));
+ base.OnUnload();
+ }
+
+ private bool OnRcvBtnClick(IXUIButton btn)
+ {
+ MailItem mailItem = this._doc.GetMailItem();
+ bool flag = mailItem != null && mailItem.state == MailState.RWD;
+ if (flag)
+ {
+ this.OnRcvClick();
+ }
+ else
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString("Mail_TIP"), "fece00");
+ }
+ return true;
+ }
+
+ private void OnRcvClick()
+ {
+ MailItem mailItem = this._doc.GetMailItem();
+ bool flag = mailItem != null;
+ if (flag)
+ {
+ this._doc.ReqMailOP(MailOP.Claim, mailItem.id);
+ }
+ else
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString("Mail_DELAY"), "fece00");
+ }
+ }
+
+ public void Refresh()
+ {
+ bool flag = this._doc.ShowMailContent();
+ this.m_lbltitle.SetVisible(flag);
+ this.m_lbldate.SetVisible(flag);
+ this.m_lalcont.SetVisible(flag);
+ this.m_lblvalit.SetVisible(flag);
+ this.m_objSlice.SetActive(flag);
+ this.m_pool.ReturnAll(false);
+ this.m_btnrcv.SetVisible(flag);
+ this.m_tranAttach.gameObject.SetActive(flag);
+ this.m_sprclaim.SetVisible(flag);
+ bool flag2 = flag;
+ if (flag2)
+ {
+ MailItem mailItem = this._doc.GetMailItem();
+ this.m_lbltitle.SetText(mailItem.title);
+ this.m_lalcont.SetText(XSingleton<UiUtility>.singleton.ReplaceReturn(mailItem.content));
+ this.m_lbldate.SetText(XStringDefineProxy.GetString("Mail_TIME") + " " + mailItem.date.ToString("yyyy-MM-dd HH:mm:ss"));
+ bool flag3 = mailItem.items == null || mailItem.items.Count <= 0;
+ if (flag3)
+ {
+ this.m_btnrcv.SetVisible(false);
+ }
+ this.RefreshItems(mailItem.items, mailItem.xitems);
+ this.m_tranAttach.gameObject.SetActive(mailItem.items.Count > 0 || mailItem.xitems.Count > 0);
+ this.RefreshValit(mailItem);
+ this.m_lblrcv.SetText((mailItem.state == MailState.RWD) ? XStringDefineProxy.GetString("Mail_RCV") : XStringDefineProxy.GetString("Mail_NON"));
+ this.m_btnrcv.SetVisible(mailItem.state == MailState.RWD);
+ this.m_sprclaim.SetVisible(mailItem.state == MailState.CLAIMED);
+ }
+ }
+
+ private void RefreshValit(MailItem mailItem)
+ {
+ this.leftTime = mailItem.valit;
+ bool flag = mailItem.valit >= 86400;
+ if (flag)
+ {
+ this.m_lblvalit.SetText(XStringDefineProxy.GetString("Mail_VALIT") + mailItem.valit / 86400 + XStringDefineProxy.GetString("Mail_DAY"));
+ }
+ else
+ {
+ bool flag2 = mailItem.valit >= 3600;
+ if (flag2)
+ {
+ this.m_lblvalit.SetText(XStringDefineProxy.GetString("Mail_VALIT") + mailItem.valit / 3600 + XStringDefineProxy.GetString("Mail_HOUR"));
+ }
+ else
+ {
+ bool flag3 = mailItem.valit > 60;
+ if (flag3)
+ {
+ this.m_lblvalit.SetText(XStringDefineProxy.GetString("Mail_VALIT") + mailItem.valit / 60 + XStringDefineProxy.GetString("Mail_MIN"));
+ }
+ else
+ {
+ this.m_lblvalit.SetText(XStringDefineProxy.GetString("Mail_VALIT") + "1" + XStringDefineProxy.GetString("Mail_MIN"));
+ }
+ }
+ }
+ }
+
+ public void SetContentNil()
+ {
+ this._doc.RefreshContentNil();
+ }
+
+ private void RefreshItems(List<ItemBrief> items, List<Item> xitems)
+ {
+ for (int i = 0; i < items.Count; i++)
+ {
+ GameObject gameObject = this.m_pool.FetchGameObject(false);
+ XSingleton<XGameUI>.singleton.m_uiTool.MarkParentAsChanged(gameObject);
+ gameObject.transform.localPosition = new Vector3((float)(-172 + 86 * i), 0f, 0f);
+ ItemList.RowData itemConf = XBagDocument.GetItemConf((int)items[i].itemID);
+ XSingleton<XItemDrawerMgr>.singleton.normalItemDrawer.DrawItem(gameObject, itemConf.ItemID, (int)items[i].itemCount, false);
+ IXUISprite ixuisprite = gameObject.transform.Find("Icon").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.ID = (ulong)((long)itemConf.ItemID);
+ ixuisprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.ShowTips));
+ }
+ for (int j = 0; j < xitems.Count; j++)
+ {
+ GameObject gameObject2 = this.m_pool.FetchGameObject(false);
+ XSingleton<XGameUI>.singleton.m_uiTool.MarkParentAsChanged(gameObject2);
+ gameObject2.transform.localPosition = new Vector3((float)(-172 + 86 * (j + items.Count)), 0f, 0f);
+ XSingleton<XItemDrawerMgr>.singleton.normalItemDrawer.DrawItem(gameObject2, (int)xitems[j].ItemID, (int)xitems[j].ItemCount, false);
+ IXUISprite ixuisprite2 = gameObject2.transform.Find("Icon").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite2.ID = (ulong)xitems[j].ItemID;
+ ixuisprite2.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.ShowTips));
+ }
+ this.m_scroll.ResetPosition();
+ }
+
+ private void ShowTips(IXUISprite spr)
+ {
+ bool flag = this._doc != null;
+ if (flag)
+ {
+ MailItem mailItem = this._doc.GetMailItem();
+ List<Item> xitems = mailItem.xitems;
+ bool flag2 = false;
+ for (int i = 0; i < xitems.Count; i++)
+ {
+ bool flag3 = (ulong)xitems[i].ItemID == spr.ID;
+ if (flag3)
+ {
+ flag2 = true;
+ XItem mainItem = XBagDocument.MakeXItem(xitems[i]);
+ XSingleton<UiUtility>.singleton.ShowTooltipDialogWithSearchingCompare(mainItem, spr, false, 0u);
+ }
+ }
+ bool flag4 = !flag2;
+ if (flag4)
+ {
+ XItem mainItem2 = XBagDocument.MakeXItem((int)spr.ID, false);
+ XSingleton<UiUtility>.singleton.ShowTooltipDialogWithSearchingCompare(mainItem2, spr, false, 0u);
+ }
+ }
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/XContentMailView.cs.meta b/Client/Assets/Scripts/XMainClient/UI/XContentMailView.cs.meta
new file mode 100644
index 00000000..3b67263d
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XContentMailView.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 3e358abad20101c4d992e078e68b25f7
+timeCreated: 1611403607
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/XDesignationView.cs b/Client/Assets/Scripts/XMainClient/UI/XDesignationView.cs
new file mode 100644
index 00000000..5f2a98a7
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XDesignationView.cs
@@ -0,0 +1,536 @@
+using System;
+using System.Collections.Generic;
+using UILib;
+using UnityEngine;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class XDesignationView : DlgHandlerBase
+ {
+ protected override string FileName
+ {
+ get
+ {
+ return "ItemNew/DesignationFrame";
+ }
+ }
+
+ private XDesignationDocument _doc = null;
+
+ public GameObject m_TabTpl;
+
+ public GameObject[] m_TabRedPoint = new GameObject[6];
+
+ public XUIPool m_TabPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ public IXUIScrollView m_ScrollView;
+
+ public IXUIWrapContent m_DesListWrapContent;
+
+ public IXUICheckBox m_GeneralDes;
+
+ private bool _firstClick = true;
+
+ public IXUILabelSymbol m_CoverDesignation;
+
+ public IXUILabel m_AbilityLabel;
+
+ public IXUILabel m_FightLabel;
+
+ public IXUIButton m_CoverBtn;
+
+ public IXUIButton m_AbilityBtn;
+
+ public IXUILabel m_CoverBtnLabel;
+
+ public IXUILabel m_AbilityBtnLabel;
+
+ public GameObject m_AbilityBtnRedPoint;
+
+ public IXUILabelSymbol m_PlayerName;
+
+ private IXUILabel[] _timeLabel = new IXUILabel[8];
+
+ private int[] _leftTime = new int[8];
+
+ private static readonly int MAXSHOWITEM = 8;
+
+ private uint _timeToken;
+
+ private uint _reqTimeToken;
+
+ public readonly int UNSELECT = 10000;
+
+ private int _currentClickID;
+
+ public IXUISprite m_CurrentClickSprite;
+
+ protected override void Init()
+ {
+ base.Init();
+ this._doc = (XSingleton<XGame>.singleton.Doc.GetXComponent(XDesignationDocument.uuID) as XDesignationDocument);
+ this._currentClickID = this.UNSELECT;
+ this.m_ScrollView = (base.PanelObject.transform.Find("Right/ScrollView").GetComponent("XUIScrollView") as IXUIScrollView);
+ this.m_TabTpl = base.PanelObject.transform.Find("Tabs/TabTpl").gameObject;
+ this.m_TabPool.SetupPool(this.m_TabTpl.transform.parent.gameObject, this.m_TabTpl, 6u, false);
+ this.m_DesListWrapContent = (this.m_ScrollView.gameObject.transform.Find("WrapContent").GetComponent("XUIWrapContent") as IXUIWrapContent);
+ this.m_CoverDesignation = (base.PanelObject.transform.Find("Left/CoverDes/Designation").GetComponent("XUILabelSymbol") as IXUILabelSymbol);
+ this.m_AbilityLabel = (base.PanelObject.transform.Find("Left/Message/AttsLabel").GetComponent("XUILabel") as IXUILabel);
+ this.m_FightLabel = (base.PanelObject.transform.Find("Left/Message/FightLabel").GetComponent("XUILabel") as IXUILabel);
+ this.m_CoverBtn = (base.PanelObject.transform.Find("Right/Bottom/CoverBtn").GetComponent("XUIButton") as IXUIButton);
+ this.m_AbilityBtn = (base.PanelObject.transform.Find("Right/Bottom/AbilityBtn").GetComponent("XUIButton") as IXUIButton);
+ this.m_CoverBtnLabel = (this.m_CoverBtn.gameObject.transform.Find("TextLabel").GetComponent("XUILabel") as IXUILabel);
+ this.m_AbilityBtnLabel = (this.m_AbilityBtn.gameObject.transform.Find("TextLabel").GetComponent("XUILabel") as IXUILabel);
+ this.m_AbilityBtnRedPoint = this.m_AbilityBtn.gameObject.transform.Find("RedPoint").gameObject;
+ this.m_AbilityBtnRedPoint.SetActive(false);
+ this.m_PlayerName = (base.PanelObject.transform.Find("Left/CoverDes/Name").GetComponent("XUILabelSymbol") as IXUILabelSymbol);
+ this.m_PlayerName.InputText = XSingleton<XAttributeMgr>.singleton.XPlayerData.Name;
+ this._doc.SendQueryDesignationInfo();
+ this.SetDesTab();
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ this.m_CoverBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnCoverBtnClicked));
+ this.m_AbilityBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnAbilityBtnClicked));
+ this.m_DesListWrapContent.RegisterItemUpdateEventHandler(new WrapItemUpdateEventHandler(this.DesWrapListUpdated));
+ this.m_DesListWrapContent.RegisterItemInitEventHandler(new WrapItemInitEventHandler(this.ItemWrapListInit));
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ this._doc.SendQueryDesignationInfo();
+ this.m_GeneralDes.bChecked = true;
+ this._doc.DesList[0].Clear();
+ bool firstClick = this._firstClick;
+ if (firstClick)
+ {
+ this._firstClick = false;
+ }
+ else
+ {
+ this._doc.SendQueryDesignationList(1u);
+ this.SetDesignationList(this._doc.DesList[0], 0, true);
+ }
+ }
+
+ public override void OnUpdate()
+ {
+ base.OnUpdate();
+ }
+
+ protected override void OnHide()
+ {
+ base.OnHide();
+ base.PanelObject.SetActive(false);
+ XSingleton<XTimerMgr>.singleton.KillTimer(this._timeToken);
+ XSingleton<XTimerMgr>.singleton.KillTimer(this._reqTimeToken);
+ }
+
+ public override void OnUnload()
+ {
+ XSingleton<XTimerMgr>.singleton.KillTimer(this._timeToken);
+ XSingleton<XTimerMgr>.singleton.KillTimer(this._reqTimeToken);
+ base.OnUnload();
+ }
+
+ private void ItemWrapListInit(Transform t, int i)
+ {
+ this._timeLabel[i] = (t.Find("LeftTime").GetComponent("XUILabel") as IXUILabel);
+ }
+
+ public bool OnDesTabClicked(IXUICheckBox checkBox)
+ {
+ bool flag = !checkBox.bChecked;
+ bool result;
+ if (flag)
+ {
+ result = true;
+ }
+ else
+ {
+ bool flag2 = this._doc.LastDisPlayTab != (int)checkBox.ID;
+ if (flag2)
+ {
+ this._currentClickID = this.UNSELECT;
+ this.m_AbilityBtnRedPoint.SetActive(false);
+ }
+ this._doc.SendQueryDesignationList((uint)checkBox.ID + 1u);
+ result = true;
+ }
+ return result;
+ }
+
+ public bool OnCoverBtnClicked(IXUIButton btn)
+ {
+ bool flag = this._currentClickID == this.UNSELECT;
+ bool result;
+ if (flag)
+ {
+ result = true;
+ }
+ else
+ {
+ bool flag2 = (ulong)this._doc.CoverDesignationID == (ulong)((long)this._currentClickID);
+ if (flag2)
+ {
+ this._doc.SendQuerySetDesignation(1u, 0u);
+ }
+ else
+ {
+ this._doc.SendQuerySetDesignation(1u, (uint)this._currentClickID);
+ }
+ result = true;
+ }
+ return result;
+ }
+
+ public bool OnAbilityBtnClicked(IXUIButton iSp)
+ {
+ bool flag = this._currentClickID == this.UNSELECT;
+ bool result;
+ if (flag)
+ {
+ result = true;
+ }
+ else
+ {
+ bool flag2 = (ulong)this._doc.AbilityDesignationID == (ulong)((long)this._currentClickID);
+ if (flag2)
+ {
+ this._doc.SendQuerySetDesignation(2u, 0u);
+ }
+ else
+ {
+ this._doc.SendQuerySetDesignation(2u, (uint)this._currentClickID);
+ }
+ result = true;
+ }
+ return result;
+ }
+
+ public void OnItemClick(IXUISprite iSp)
+ {
+ bool flag = this._currentClickID == (int)iSp.ID;
+ if (!flag)
+ {
+ this.m_CoverBtn.SetEnable(true, false);
+ this.m_AbilityBtn.SetEnable(true, false);
+ bool flag2 = this.m_CurrentClickSprite != null;
+ if (flag2)
+ {
+ this.m_CurrentClickSprite.gameObject.transform.Find("Select").gameObject.SetActive(false);
+ }
+ this._currentClickID = (int)iSp.ID;
+ this.m_CurrentClickSprite = iSp;
+ iSp.gameObject.transform.Find("Select").gameObject.SetActive(true);
+ this.m_AbilityBtnRedPoint.SetActive(this._doc.GetPPTOfAbilityDes((uint)this._currentClickID) == this._doc.MaxAbilityDesNum && !this._doc.IsMaxAbilityDes);
+ this.RefreshBtnText();
+ }
+ }
+
+ public void RefreshBtnText()
+ {
+ this.m_AbilityBtnLabel.SetText(XStringDefineProxy.GetString(((long)this._currentClickID == (long)((ulong)this._doc.AbilityDesignationID)) ? "Designation_Btn_Text2" : "Designation_Btn_Text1"));
+ this.m_CoverBtnLabel.SetText(XStringDefineProxy.GetString(((long)this._currentClickID == (long)((ulong)this._doc.CoverDesignationID)) ? "Designation_Btn_Text4" : "Designation_Btn_Text3"));
+ }
+
+ public void UnCompleteTips(IXUISprite iSp)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString("Achi_Or_Des_UnComplete"), "fece00");
+ }
+
+ public void HideTabRedPoint()
+ {
+ this.m_AbilityBtnRedPoint.SetActive(false);
+ for (int i = 0; i < 6; i++)
+ {
+ this.m_TabRedPoint[i].SetActive(false);
+ }
+ XSingleton<XGameSysMgr>.singleton.SetSysRedPointState(XSysDefine.XSys_Design_Designation, false);
+ XSingleton<XGameSysMgr>.singleton.RecalculateRedPointState(XSysDefine.XSys_Item, true);
+ }
+
+ public void SetTabRedPoint(List<bool> state)
+ {
+ bool flag = state.Count == 0;
+ if (!flag)
+ {
+ bool flag2 = false;
+ int num = (state.Count < 6) ? state.Count : 6;
+ for (int i = 0; i < num; i++)
+ {
+ this.m_TabRedPoint[i].SetActive(state[i]);
+ flag2 |= state[i];
+ }
+ XSingleton<XGameSysMgr>.singleton.SetSysRedPointState(XSysDefine.XSys_Design_Designation, flag2);
+ XSingleton<XGameSysMgr>.singleton.RecalculateRedPointState(XSysDefine.XSys_Item, true);
+ }
+ }
+
+ public void SetDesTab()
+ {
+ this.m_TabPool.ReturnAll(false);
+ GameObject gameObject = this.m_TabPool.FetchGameObject(false);
+ IXUICheckBox ixuicheckBox = gameObject.transform.Find("Bg").GetComponent("XUICheckBox") as IXUICheckBox;
+ this.m_TabRedPoint[0] = gameObject.transform.Find("Bg/RedPoint").gameObject;
+ this.m_GeneralDes = ixuicheckBox;
+ ixuicheckBox.ID = 0UL;
+ ixuicheckBox.RegisterOnCheckEventHandler(new CheckBoxOnCheckEventHandler(this.OnDesTabClicked));
+ Vector3 tplPos = this.m_TabPool.TplPos;
+ for (int i = 1; i < 6; i++)
+ {
+ string @string = XStringDefineProxy.GetString("Designation_Tab_Name" + i.ToString());
+ gameObject = this.m_TabPool.FetchGameObject(false);
+ gameObject.transform.localPosition = new Vector3(tplPos.x, tplPos.y - (float)(this.m_TabPool.TplHeight * i), 0f);
+ this.m_TabRedPoint[i] = gameObject.transform.Find("Bg/RedPoint").gameObject;
+ ixuicheckBox = (gameObject.transform.Find("Bg").GetComponent("XUICheckBox") as IXUICheckBox);
+ ixuicheckBox.ID = (ulong)((long)i);
+ ixuicheckBox.RegisterOnCheckEventHandler(new CheckBoxOnCheckEventHandler(this.OnDesTabClicked));
+ IXUILabel ixuilabel = gameObject.transform.Find("Bg/TextLabel").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel.SetText(@string);
+ IXUILabel ixuilabel2 = gameObject.transform.Find("Bg/SelectedTextLabel").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel2.SetText(@string);
+ }
+ }
+
+ public void SetCurrentChooseDes(uint type, uint ID)
+ {
+ this.RefreshBtnText();
+ bool flag = ID == 0u;
+ if (flag)
+ {
+ bool flag2 = type == 1u;
+ if (flag2)
+ {
+ this.m_CoverDesignation.InputText = "";
+ }
+ else
+ {
+ this.m_AbilityLabel.SetText("");
+ this.m_FightLabel.SetText(XStringDefineProxy.GetString("NONE"));
+ }
+ }
+ else
+ {
+ DesignationTable.RowData byID = this._doc._DesignationTable.GetByID((int)ID);
+ bool flag3 = type == 1u;
+ if (flag3)
+ {
+ bool flag4 = byID.Effect == "";
+ if (flag4)
+ {
+ bool special = byID.Special;
+ if (special)
+ {
+ this.m_CoverDesignation.InputText = byID.Color + this._doc.SpecialDesignation;
+ }
+ else
+ {
+ this.m_CoverDesignation.InputText = byID.Color + byID.Designation;
+ }
+ }
+ else
+ {
+ this.m_CoverDesignation.InputText = XLabelSymbolHelper.FormatDesignation(byID.Atlas, byID.Effect, 16);
+ }
+ }
+ else
+ {
+ string text = "";
+ uint num = 0u;
+ this._doc.GetPPT(out text, out num, byID.Attribute, true);
+ this.m_AbilityLabel.SetText(text);
+ this.m_FightLabel.SetText(num.ToString());
+ }
+ }
+ }
+
+ private void DesWrapListUpdated(Transform t, int i)
+ {
+ bool flag = this._doc.LastDisPlayTab >= this._doc.DesList.Count;
+ if (flag)
+ {
+ XSingleton<XDebug>.singleton.AddErrorLog("tab_index is out of range of designation list. index = ", this._doc.LastDisPlayTab.ToString(), " cout = ", this._doc.DesList.Count.ToString(), null, null);
+ }
+ else
+ {
+ bool flag2 = i >= this._doc.DesList[this._doc.LastDisPlayTab].Count;
+ if (flag2)
+ {
+ XSingleton<XDebug>.singleton.AddErrorLog("i is out of range of designation list. i = ", i.ToString(), " cout = ", this._doc.DesList[this._doc.LastDisPlayTab].Count.ToString(), null, null);
+ }
+ else
+ {
+ DesignationInfo designationInfo = this._doc.DesList[this._doc.LastDisPlayTab][i];
+ IXUILabelSymbol ixuilabelSymbol = t.Find("Animation").GetComponent("XUILabelSymbol") as IXUILabelSymbol;
+ IXUISprite ixuisprite = t.Find("Sign/CoverSign").GetComponent("XUISprite") as IXUISprite;
+ IXUISprite ixuisprite2 = t.Find("Sign/AbilitySign").GetComponent("XUISprite") as IXUISprite;
+ IXUILabel ixuilabel = t.Find("DescLabel").GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel2 = t.Find("AttsLabel").GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel3 = t.Find("FightLabel").GetComponent("XUILabel") as IXUILabel;
+ GameObject gameObject = t.Find("New").gameObject;
+ IXUISprite ixuisprite3 = t.GetComponent("XUISprite") as IXUISprite;
+ ixuisprite3.ID = (ulong)((long)designationInfo.ID);
+ ixuisprite3.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnItemClick));
+ bool flag3 = designationInfo.completed && this._currentClickID == this.UNSELECT && i == 0;
+ if (flag3)
+ {
+ this.OnItemClick(ixuisprite3);
+ }
+ t.Find("Select").gameObject.SetActive(this._currentClickID == designationInfo.ID);
+ GameObject gameObject2 = t.Find("UnCompleted").gameObject;
+ gameObject.SetActive(designationInfo.isNew);
+ bool flag4 = designationInfo.effect == "";
+ string inputText;
+ if (flag4)
+ {
+ inputText = designationInfo.color + designationInfo.desName;
+ }
+ else
+ {
+ inputText = XLabelSymbolHelper.FormatDesignation(designationInfo.atlas, designationInfo.effect, 16);
+ }
+ ixuilabelSymbol.InputText = inputText;
+ IXUILabel ixuilabel4 = t.Find("LeftTime").GetComponent("XUILabel") as IXUILabel;
+ bool flag5 = designationInfo.leftTime < 0;
+ if (flag5)
+ {
+ this._leftTime[i % XDesignationView.MAXSHOWITEM] = -1;
+ this._timeLabel[i % XDesignationView.MAXSHOWITEM] = null;
+ ixuilabel4.SetVisible(false);
+ }
+ else
+ {
+ ixuilabel4.SetText(XSingleton<UiUtility>.singleton.TimeDuarationFormatString(designationInfo.leftTime - (int)(this._doc.GetNowTime() - this._doc.GetSignTime), 5));
+ this._timeLabel[i % XDesignationView.MAXSHOWITEM] = ixuilabel4;
+ this._leftTime[i % XDesignationView.MAXSHOWITEM] = designationInfo.leftTime;
+ ixuilabel4.SetVisible(true);
+ }
+ ixuisprite.SetVisible((long)designationInfo.ID == (long)((ulong)this._doc.CoverDesignationID));
+ ixuisprite2.SetVisible((long)designationInfo.ID == (long)((ulong)this._doc.AbilityDesignationID));
+ bool flag6 = (long)designationInfo.ID == (long)((ulong)this._doc.AbilityDesignationID);
+ if (flag6)
+ {
+ bool flag7 = (long)designationInfo.ID == (long)((ulong)this._doc.CoverDesignationID);
+ if (flag7)
+ {
+ ixuisprite2.gameObject.transform.localPosition = new Vector3((float)ixuisprite.spriteWidth, 0f);
+ }
+ else
+ {
+ ixuisprite2.gameObject.transform.localPosition = Vector3.zero;
+ }
+ }
+ ixuilabel.SetText(designationInfo.explanation);
+ string text = "";
+ uint num = 0u;
+ this._doc.GetPPT(out text, out num, designationInfo.attribute, false);
+ GameObject gameObject3 = t.Find("RedPoint").gameObject;
+ bool flag8 = designationInfo.completed && !this._doc.IsMaxAbilityDes && num == this._doc.MaxAbilityDesNum;
+ if (flag8)
+ {
+ gameObject3.SetActive(true);
+ }
+ else
+ {
+ gameObject3.SetActive(false);
+ }
+ ixuilabel2.SetText(text);
+ ixuilabel3.SetText(XStringDefineProxy.GetString("FRIENDS_FIGHT_POINT") + "+" + num.ToString());
+ bool completed = designationInfo.completed;
+ if (completed)
+ {
+ gameObject2.SetActive(false);
+ }
+ else
+ {
+ gameObject2.SetActive(true);
+ IXUISprite ixuisprite4 = gameObject2.GetComponent("XUISprite") as IXUISprite;
+ ixuisprite4.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.UnCompleteTips));
+ }
+ }
+ }
+ }
+
+ public void SetDesignationList(List<DesignationInfo> list, int type, bool resetScrollPos = true)
+ {
+ bool flag = !base.IsVisible();
+ if (!flag)
+ {
+ if (resetScrollPos)
+ {
+ this._currentClickID = this.UNSELECT;
+ this.m_CoverBtn.SetEnable(false, false);
+ this.m_AbilityBtn.SetEnable(false, false);
+ }
+ this._doc.LastDisPlayTab = type;
+ for (int i = 0; i < XDesignationView.MAXSHOWITEM; i++)
+ {
+ this._leftTime[i] = -1;
+ }
+ XSingleton<XTimerMgr>.singleton.KillTimer(this._timeToken);
+ XSingleton<XTimerMgr>.singleton.KillTimer(this._reqTimeToken);
+ int num = -1;
+ for (int j = 0; j < list.Count; j++)
+ {
+ bool flag2 = list[j].leftTime > 0;
+ if (flag2)
+ {
+ bool flag3 = num == -1 || list[j].leftTime < num;
+ if (flag3)
+ {
+ num = list[j].leftTime;
+ }
+ }
+ }
+ bool flag4 = num != -1;
+ if (flag4)
+ {
+ num -= (int)(this._doc.GetNowTime() - this._doc.GetSignTime);
+ bool flag5 = num < 0;
+ if (flag5)
+ {
+ num = 0;
+ }
+ this._reqTimeToken = XSingleton<XTimerMgr>.singleton.SetTimer((float)num + 1.1f, new XTimerMgr.ElapsedEventHandler(this.ReqInfo), null);
+ this._timeToken = XSingleton<XTimerMgr>.singleton.SetTimer(1f, new XTimerMgr.ElapsedEventHandler(this.RefreshLeftTime), null);
+ }
+ this.m_DesListWrapContent.SetContentCount(list.Count, false);
+ if (resetScrollPos)
+ {
+ this.m_ScrollView.ResetPosition();
+ }
+ }
+ }
+
+ private void ReqInfo(object o = null)
+ {
+ this._doc.SendQueryDesignationInfo();
+ this._doc.SendQueryDesignationList((uint)(this._doc.LastDisPlayTab + 1));
+ }
+
+ private void RefreshLeftTime(object o = null)
+ {
+ for (int i = 0; i < XDesignationView.MAXSHOWITEM; i++)
+ {
+ bool flag = this._leftTime[i] >= 0;
+ if (flag)
+ {
+ int num = this._leftTime[i] - (int)(this._doc.GetNowTime() - this._doc.GetSignTime);
+ bool flag2 = num < 0;
+ if (flag2)
+ {
+ this._leftTime[i] = -1;
+ num = 0;
+ }
+ this._timeLabel[i].SetText(XSingleton<UiUtility>.singleton.TimeDuarationFormatString(num, 5));
+ }
+ }
+ this._timeToken = XSingleton<XTimerMgr>.singleton.SetTimer(1f, new XTimerMgr.ElapsedEventHandler(this.RefreshLeftTime), null);
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/XDesignationView.cs.meta b/Client/Assets/Scripts/XMainClient/UI/XDesignationView.cs.meta
new file mode 100644
index 00000000..849fcf42
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XDesignationView.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 905dcade54f8e9b4280a08adc3ef4a8e
+timeCreated: 1611404138
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/XDragonGuildApproveSettingView.cs b/Client/Assets/Scripts/XMainClient/UI/XDragonGuildApproveSettingView.cs
new file mode 100644
index 00000000..d92134e1
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XDragonGuildApproveSettingView.cs
@@ -0,0 +1,63 @@
+using System;
+using UILib;
+
+namespace XMainClient.UI
+{
+ internal class XDragonGuildApproveSettingView : DlgHandlerBase
+ {
+ private IXUIInput m_PPTInput;
+
+ private IXUICheckBox m_AutoApprove;
+
+ private XDragonGuildApproveDocument _doc;
+
+ protected override void Init()
+ {
+ this.m_PPTInput = (base.PanelObject.transform.Find("SettingMenu/PPTInput").GetComponent("XUIInput") as IXUIInput);
+ this.m_AutoApprove = (base.PanelObject.transform.Find("SettingMenu/AutoApprove").GetComponent("XUICheckBox") as IXUICheckBox);
+ this._doc = XDocuments.GetSpecificDocument<XDragonGuildApproveDocument>(XDragonGuildApproveDocument.uuID);
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ IXUIButton ixuibutton = base.PanelObject.transform.Find("Close").GetComponent("XUIButton") as IXUIButton;
+ ixuibutton.RegisterClickEventHandler(new ButtonClickEventHandler(this._OnCloseBtnClick));
+ IXUIButton ixuibutton2 = base.PanelObject.transform.Find("SettingMenu/OK").GetComponent("XUIButton") as IXUIButton;
+ ixuibutton2.RegisterClickEventHandler(new ButtonClickEventHandler(this._OnOKBtnClicked));
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ DragonGuildApproveSetting approveSetting = this._doc.ApproveSetting;
+ this.m_PPTInput.SetText(approveSetting.GetStrPPT());
+ this.m_AutoApprove.bChecked = approveSetting.autoApprove;
+ }
+
+ private bool _OnOKBtnClicked(IXUIButton btn)
+ {
+ DragonGuildApproveSetting dragonGuildApproveSetting = new DragonGuildApproveSetting();
+ string text = this.m_PPTInput.GetText();
+ bool flag = text.Length == 0;
+ if (flag)
+ {
+ dragonGuildApproveSetting.PPT = 0u;
+ }
+ else
+ {
+ dragonGuildApproveSetting.PPT = uint.Parse(text);
+ }
+ dragonGuildApproveSetting.autoApprove = this.m_AutoApprove.bChecked;
+ this._doc.ReqSetApprove(dragonGuildApproveSetting);
+ base.SetVisible(false);
+ return true;
+ }
+
+ private bool _OnCloseBtnClick(IXUIButton go)
+ {
+ base.SetVisible(false);
+ return true;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/XDragonGuildApproveSettingView.cs.meta b/Client/Assets/Scripts/XMainClient/UI/XDragonGuildApproveSettingView.cs.meta
new file mode 100644
index 00000000..6dce79e7
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XDragonGuildApproveSettingView.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 8271046d224050b4d858507c1acad6d9
+timeCreated: 1611404040
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/XDragonGuildTaskBehaviour.cs b/Client/Assets/Scripts/XMainClient/UI/XDragonGuildTaskBehaviour.cs
new file mode 100644
index 00000000..e2cd6cfa
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XDragonGuildTaskBehaviour.cs
@@ -0,0 +1,56 @@
+using System;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+
+namespace XMainClient.UI
+{
+ public class XDragonGuildTaskBehaviour : DlgBehaviourBase
+ {
+ public IXUIButton m_close;
+
+ public Transform m_Trooplevel;
+
+ public IXUILabel m_GuildLevel;
+
+ public IXUIProgress m_progress;
+
+ public IXUILabel m_GuildExpMax;
+
+ public IXUILabel m_GuildExpCur;
+
+ public IXUILabel m_cdrewards;
+
+ public IXUICheckBox m_task;
+
+ public IXUICheckBox m_achieve;
+
+ public Transform m_Toptask;
+
+ public Transform m_Topachieve;
+
+ public IXUIWrapContent m_wrapcontent;
+
+ public Transform m_taskrep;
+
+ public Transform m_acieverep;
+
+ private void Awake()
+ {
+ this.m_close = (base.transform.Find("Bg/Close").GetComponent("XUIButton") as IXUIButton);
+ this.m_Trooplevel = base.transform.Find("Bg/TroopLevel");
+ this.m_progress = (this.m_Trooplevel.Find("ProgressBar").GetComponent("XUIProgress") as IXUIProgress);
+ this.m_GuildLevel = (this.m_Trooplevel.Find("Level").GetComponent("XUILabel") as IXUILabel);
+ this.m_GuildExpCur = (this.m_Trooplevel.Find("Value").GetComponent("XUILabel") as IXUILabel);
+ this.m_GuildExpMax = (this.m_Trooplevel.Find("ValueMax").GetComponent("XUILabel") as IXUILabel);
+ this.m_cdrewards = (base.transform.Find("Bg/CDRewards").GetComponent("XUILabel") as IXUILabel);
+ this.m_task = (base.transform.Find("Bg/buttons/SelectTask").GetComponent("XUICheckBox") as IXUICheckBox);
+ this.m_taskrep = base.transform.Find("Bg/buttons/SelectTask/redpoint");
+ this.m_achieve = (base.transform.Find("Bg/buttons/SelectAchieve").GetComponent("XUICheckBox") as IXUICheckBox);
+ this.m_acieverep = base.transform.Find("Bg/buttons/SelectAchieve/redpoint");
+ this.m_Toptask = base.transform.Find("Bg/Task/Top/Brunch/Task");
+ this.m_Topachieve = base.transform.Find("Bg/Task/Top/Brunch/Achieve");
+ this.m_wrapcontent = (base.transform.Find("Bg/Task/ScrollView/WrapContent").GetComponent("XUIWrapContent") as IXUIWrapContent);
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/XDragonGuildTaskBehaviour.cs.meta b/Client/Assets/Scripts/XMainClient/UI/XDragonGuildTaskBehaviour.cs.meta
new file mode 100644
index 00000000..50d47c4a
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XDragonGuildTaskBehaviour.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 3e2ead2e9d4c3064894b55430fccf0d8
+timeCreated: 1611403606
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/XDragonGuildTaskView.cs b/Client/Assets/Scripts/XMainClient/UI/XDragonGuildTaskView.cs
new file mode 100644
index 00000000..f4806e70
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XDragonGuildTaskView.cs
@@ -0,0 +1,272 @@
+using System;
+using System.Collections.Generic;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ public class XDragonGuildTaskView : DlgBase<XDragonGuildTaskView, XDragonGuildTaskBehaviour>
+ {
+ public uint CurFrame
+ {
+ get
+ {
+ return this._curframe;
+ }
+ }
+
+ public override string fileName
+ {
+ get
+ {
+ return "DungeonTroop/DungeonTroopTask";
+ }
+ }
+
+ public override int layer
+ {
+ get
+ {
+ return 1;
+ }
+ }
+
+ public override bool autoload
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override bool fullscreenui
+ {
+ get
+ {
+ return false;
+ }
+ }
+
+ private uint _curframe;
+
+ private XDragonGuildTaskDocument _doc = null;
+
+ protected override void Init()
+ {
+ base.Init();
+ this._curframe = 1u;
+ this._doc = XDocuments.GetSpecificDocument<XDragonGuildTaskDocument>(XDragonGuildTaskDocument.uuID);
+ this._doc.View = this;
+ base.uiBehaviour.m_wrapcontent.RegisterItemUpdateEventHandler(new WrapItemUpdateEventHandler(this.UpdateDailyTask));
+ base.uiBehaviour.m_task.ID = 1UL;
+ base.uiBehaviour.m_task.RegisterOnCheckEventHandler(new CheckBoxOnCheckEventHandler(this.OnTabStateChange));
+ base.uiBehaviour.m_achieve.ID = 2UL;
+ base.uiBehaviour.m_achieve.RegisterOnCheckEventHandler(new CheckBoxOnCheckEventHandler(this.OnTabStateChange));
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ this._doc.ReqInfo();
+ }
+
+ protected override void OnHide()
+ {
+ base.OnHide();
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ base.uiBehaviour.m_close.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnCloseClick));
+ }
+
+ public override void StackRefresh()
+ {
+ base.StackRefresh();
+ }
+
+ protected override void OnUnload()
+ {
+ base.OnUnload();
+ this._doc.View = null;
+ }
+
+ public override void OnUpdate()
+ {
+ base.OnUpdate();
+ }
+
+ public bool OnTabStateChange(IXUICheckBox check)
+ {
+ bool bChecked = check.bChecked;
+ if (bChecked)
+ {
+ this.OnTabClicked((int)check.ID);
+ }
+ return true;
+ }
+
+ private void OnTabClicked(int index)
+ {
+ this._curframe = (uint)index;
+ this._doc.ReqInfo();
+ }
+
+ public void RefreshUI()
+ {
+ this.UpdateProgress();
+ this.UpdateRedPoint();
+ bool flag = this.CurFrame == 1u;
+ if (flag)
+ {
+ this.RefreshTaskUI();
+ }
+ else
+ {
+ bool flag2 = this.CurFrame == 2u;
+ if (flag2)
+ {
+ this.RefreshAchieveUI();
+ }
+ }
+ base.uiBehaviour.m_GuildLevel.SetText("Lv." + XDragonGuildDocument.Doc.BaseData.level.ToString());
+ }
+
+ private void UpdateRedPoint()
+ {
+ base.uiBehaviour.m_taskrep.gameObject.SetActive(this._doc.HadTaskRedPoint());
+ base.uiBehaviour.m_acieverep.gameObject.SetActive(this._doc.HadAchieveRedPoint());
+ }
+
+ private bool OnCloseClick(IXUIButton btn)
+ {
+ this.SetVisible(false, true);
+ return true;
+ }
+
+ private void UpdateDailyTask(Transform t, int index)
+ {
+ XDragonGuildTpl dataByindex = this._doc.GetDataByindex(index, this._curframe);
+ Transform transform = t.Find("HadGet");
+ IXUILabel ixuilabel = t.Find("Title").GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel2 = t.Find("Describe").GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel3 = t.Find("Describe/T/ExpAddup").GetComponent("XUILabel") as IXUILabel;
+ IXUIButton ixuibutton = t.Find("GetBtn").GetComponent("XUIButton") as IXUIButton;
+ ixuibutton.ID = (ulong)dataByindex.id;
+ Transform transform2 = t.Find("GetBtn/Text");
+ Transform transform3 = t.Find("GetBtn/Text_cant");
+ Transform transform4 = t.Find("GetBtn/Text_over");
+ Transform transform5 = t.Find("Times");
+ IXUILabel ixuilabel4 = t.Find("Times/LeftTimes").GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel5 = t.Find("Time").GetComponent("XUILabel") as IXUILabel;
+ List<Transform> list = new List<Transform>();
+ Transform transform6 = t.Find("Items");
+ for (int i = 0; i < 3; i++)
+ {
+ list.Add(transform6.GetChild(i));
+ }
+ ixuilabel.SetText(dataByindex.title);
+ ixuilabel5.SetText(string.Format("{0}/{1}", dataByindex.doingCount, dataByindex.finishCount));
+ ixuilabel2.SetText(dataByindex.desc);
+ ixuilabel3.SetText("+" + dataByindex.exp.ToString());
+ transform2.gameObject.SetActive(dataByindex.state == 2);
+ transform3.gameObject.SetActive(dataByindex.state == 1);
+ transform4.gameObject.SetActive(dataByindex.state == 4);
+ transform.gameObject.SetActive(dataByindex.state == 3);
+ transform5.gameObject.SetActive(this.CurFrame == 2u);
+ ixuibutton.gameObject.SetActive(dataByindex.state != 3);
+ bool flag = dataByindex.state == 4 || dataByindex.state == 1;
+ if (flag)
+ {
+ ixuibutton.SetEnable(false, false);
+ }
+ else
+ {
+ ixuibutton.SetEnable(true, false);
+ }
+ bool flag2 = dataByindex.state == 2;
+ if (flag2)
+ {
+ ixuibutton.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnTaskOrAchieveClick));
+ }
+ bool flag3 = this.CurFrame == 2u;
+ if (flag3)
+ {
+ ixuilabel4.SetText(dataByindex.lefttime.ToString());
+ }
+ for (int j = 0; j < 3; j++)
+ {
+ list[j].gameObject.SetActive(true);
+ bool flag4 = j >= dataByindex.item.Count;
+ if (flag4)
+ {
+ list[j].gameObject.SetActive(false);
+ }
+ else
+ {
+ XSingleton<XItemDrawerMgr>.singleton.normalItemDrawer.DrawItem(list[j].gameObject, (int)dataByindex.item[j, 0], (int)dataByindex.item[j, 1], true);
+ XSingleton<XItemDrawerMgr>.singleton.normalItemDrawer.OpenClickShowTooltipEvent(list[j].gameObject, (int)dataByindex.item[j, 0]);
+ }
+ }
+ }
+
+ private bool OnTaskOrAchieveClick(IXUIButton btn)
+ {
+ int id = (int)btn.ID;
+ bool flag = this.CurFrame == 1u;
+ if (flag)
+ {
+ this._doc.ReqFetchTask(id);
+ }
+ else
+ {
+ bool flag2 = this.CurFrame == 2u;
+ if (flag2)
+ {
+ this._doc.ReqFetchAchieve(id);
+ }
+ }
+ return true;
+ }
+
+ public void OnTaskFetch(uint id)
+ {
+ for (int i = 0; i < this._doc.m_tasklist.Count; i++)
+ {
+ bool flag = id == this._doc.m_tasklist[i].id;
+ if (flag)
+ {
+ this._doc.m_tasklist[i].state = 3;
+ }
+ }
+ this.RefreshUI();
+ }
+
+ private void UpdateProgress()
+ {
+ base.uiBehaviour.m_GuildExpCur.SetText(XDragonGuildDocument.Doc.BaseData.curexp.ToString());
+ base.uiBehaviour.m_GuildExpMax.SetText("/" + XDragonGuildDocument.Doc.GetMaxExp().ToString());
+ base.uiBehaviour.m_progress.value = XDragonGuildDocument.Doc.BaseData.curexp / XDragonGuildDocument.Doc.GetMaxExp();
+ }
+
+ private void RefreshTaskUI()
+ {
+ base.uiBehaviour.m_cdrewards.SetText(this._doc.m_taskresettime);
+ base.uiBehaviour.m_wrapcontent.SetContentCount(this._doc.m_tasklist.Count, false);
+ base.uiBehaviour.m_cdrewards.SetVisible(true);
+ base.uiBehaviour.m_Toptask.gameObject.SetActive(true);
+ base.uiBehaviour.m_Topachieve.gameObject.SetActive(false);
+ }
+
+ private void RefreshAchieveUI()
+ {
+ base.uiBehaviour.m_wrapcontent.SetContentCount(this._doc.m_achievelist.Count, false);
+ base.uiBehaviour.m_cdrewards.SetVisible(false);
+ base.uiBehaviour.m_Toptask.gameObject.SetActive(false);
+ base.uiBehaviour.m_Topachieve.gameObject.SetActive(true);
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/XDragonGuildTaskView.cs.meta b/Client/Assets/Scripts/XMainClient/UI/XDragonGuildTaskView.cs.meta
new file mode 100644
index 00000000..52ce3b07
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XDragonGuildTaskView.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 8a9af65843dddf24f864a2f047b3412f
+timeCreated: 1611404092
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/XDragonHistoryHandler.cs b/Client/Assets/Scripts/XMainClient/UI/XDragonHistoryHandler.cs
new file mode 100644
index 00000000..95b63a98
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XDragonHistoryHandler.cs
@@ -0,0 +1,270 @@
+using System;
+using System.Collections.Generic;
+using KKSG;
+using UILib;
+using UnityEngine;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class XDragonHistoryHandler : DlgHandlerBase
+ {
+ private IXUIWrapContent _DetailWrapContent;
+
+ private IXUIScrollView _DetailScrollView;
+
+ private List<DragonGroupRecordInfoList> _RecordList;
+
+ private List<DragonGroupRoleInfo> _RoleInfoList;
+
+ private XExpeditionDocument _expDoc = null;
+
+ private XDragonNestDocument _dnDoc = null;
+
+ private XDragonPartnerDocument _doc = null;
+
+ private Transform[] _avatarList;
+
+ private Transform _EmptyDetail;
+
+ private Transform _EmptyMember;
+
+ private GameObject _SelectItemGB;
+
+ private int _selectedIndex = -1;
+
+ protected override void Init()
+ {
+ base.Init();
+ this._doc = XDocuments.GetSpecificDocument<XDragonPartnerDocument>(XDragonPartnerDocument.uuID);
+ this._dnDoc = XDocuments.GetSpecificDocument<XDragonNestDocument>(XDragonNestDocument.uuID);
+ this._expDoc = XDocuments.GetSpecificDocument<XExpeditionDocument>(XExpeditionDocument.uuID);
+ Transform transform = base.transform.Find("Member/Member/List");
+ int childCount = transform.childCount;
+ this._avatarList = new Transform[childCount];
+ for (int i = 0; i < childCount; i++)
+ {
+ this._avatarList[i] = transform.Find(XSingleton<XCommon>.singleton.StringCombine("Avatar", i.ToString()));
+ }
+ this._EmptyDetail = base.transform.Find("Member/EmptyDetail");
+ this._EmptyMember = base.transform.Find("Member/EmptyMember");
+ this._DetailScrollView = (base.transform.Find("Detail").GetComponent("XUIScrollView") as IXUIScrollView);
+ this._DetailWrapContent = (base.transform.Find("Detail/WrapContent").GetComponent("XUIWrapContent") as IXUIWrapContent);
+ this._DetailWrapContent.RegisterItemUpdateEventHandler(new WrapItemUpdateEventHandler(this.OnDetailWrapContentUpdate));
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ this.RefreshData();
+ this._doc.SendDragonGroupRecord();
+ }
+
+ public override void OnUnload()
+ {
+ this._avatarList = null;
+ base.OnUnload();
+ }
+
+ public override void RefreshData()
+ {
+ this.SetupDetailList();
+ this.SetupSelectMember(0);
+ }
+
+ private void SetupSelectMember(int index = 0)
+ {
+ bool flag = this._avatarList == null;
+ if (!flag)
+ {
+ bool flag2 = this._RoleInfoList == null;
+ if (flag2)
+ {
+ this._RoleInfoList = new List<DragonGroupRoleInfo>();
+ }
+ this._RoleInfoList.Clear();
+ bool active = false;
+ bool flag3 = this._RecordList != null && index >= 0 && index < this._RecordList.Count;
+ if (flag3)
+ {
+ int i = 0;
+ int count = this._RecordList[index].roleinfo.Count;
+ while (i < count)
+ {
+ bool flag4 = this._RecordList[index].roleinfo[i].roleid == XSingleton<XAttributeMgr>.singleton.XPlayerData.RoleID;
+ if (!flag4)
+ {
+ this._RoleInfoList.Add(this._RecordList[index].roleinfo[i]);
+ }
+ i++;
+ }
+ active = (this._RecordList[index].iswin && this._RoleInfoList.Count == 0);
+ }
+ int count2 = this._RoleInfoList.Count;
+ this._EmptyMember.gameObject.SetActive(active);
+ int j = 0;
+ int num = this._avatarList.Length;
+ while (j < num)
+ {
+ bool flag5 = j < count2;
+ if (flag5)
+ {
+ this._avatarList[j].gameObject.SetActive(true);
+ this.OnMemberWrapContentUpdate(this._avatarList[j], j);
+ }
+ else
+ {
+ this._avatarList[j].gameObject.SetActive(false);
+ }
+ j++;
+ }
+ }
+ }
+
+ private void OnSelectDetail(IXUISprite sprite)
+ {
+ bool flag = this._SelectItemGB != sprite.gameObject && this._SelectItemGB != null && !this._SelectItemGB.activeSelf;
+ if (flag)
+ {
+ this.ForceSetToggleFlag(this._SelectItemGB, false);
+ }
+ bool flag2 = null == this._SelectItemGB;
+ this._SelectItemGB = sprite.gameObject;
+ bool flag3 = flag2;
+ if (flag3)
+ {
+ this.ForceSetToggleFlag(this._SelectItemGB, true);
+ }
+ int num = (int)sprite.ID;
+ this.SetupSelectMember(num);
+ this._selectedIndex = num;
+ }
+
+ private void ForceSetToggleFlag(GameObject obj, bool flag)
+ {
+ bool flag2 = obj == null;
+ if (!flag2)
+ {
+ IXUICheckBox ixuicheckBox = obj.GetComponent("XUICheckBox") as IXUICheckBox;
+ bool flag3 = ixuicheckBox != null;
+ if (flag3)
+ {
+ ixuicheckBox.ForceSetFlag(flag);
+ }
+ }
+ }
+
+ private void OnMemberWrapContentUpdate(Transform t, int index)
+ {
+ bool flag = this._RoleInfoList == null || this._RoleInfoList.Count < index;
+ if (!flag)
+ {
+ IXUISprite ixuisprite = t.GetComponent("XUISprite") as IXUISprite;
+ IXUILabel ixuilabel = t.Find("Name").GetComponent("XUILabel") as IXUILabel;
+ IXUISprite ixuisprite2 = t.Find("Avatar").GetComponent("XUISprite") as IXUISprite;
+ IXUISprite ixuisprite3 = t.Find("Profession").GetComponent("XUISprite") as IXUISprite;
+ DragonGroupRoleInfo dragonGroupRoleInfo = this._RoleInfoList[index];
+ ixuisprite.ID = dragonGroupRoleInfo.roleid;
+ ixuisprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnClickAvatar));
+ ixuilabel.SetText(dragonGroupRoleInfo.rolename);
+ ixuisprite2.SetSprite(XSingleton<XProfessionSkillMgr>.singleton.GetProfHeadIcon2((int)dragonGroupRoleInfo.profession));
+ ixuisprite3.SetSprite(XSingleton<XProfessionSkillMgr>.singleton.GetProfIcon((int)dragonGroupRoleInfo.profession));
+ }
+ }
+
+ private void SetupDetailList()
+ {
+ this._RecordList = this._doc.RecordList;
+ bool flag = this._RecordList == null || this._RecordList.Count == 0;
+ if (flag)
+ {
+ this._DetailWrapContent.SetContentCount(0, false);
+ }
+ else
+ {
+ this._DetailWrapContent.SetContentCount(this._RecordList.Count, false);
+ }
+ this._EmptyDetail.gameObject.SetActive(this._RecordList == null || this._RecordList.Count == 0);
+ this._DetailScrollView.ResetPosition();
+ }
+
+ private void OnDetailWrapContentUpdate(Transform t, int index)
+ {
+ bool flag = this._RecordList == null || index >= this._RecordList.Count;
+ if (!flag)
+ {
+ IXUISprite ixuisprite = t.GetComponent("XUISprite") as IXUISprite;
+ IXUILabel ixuilabel = t.Find("Info/Date").GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel2 = t.Find("Info/Year").GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel3 = t.Find("Info/Period").GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel4 = t.Find("Info/StageName").GetComponent("XUILabel") as IXUILabel;
+ IXUISprite ixuisprite2 = t.Find("Info/AvatarBG/NestTpl/Bg/Icon").GetComponent("XUISprite") as IXUISprite;
+ IXUITexture ixuitexture = t.Find("Info/AvatarBG/NestTpl/Boss").GetComponent("XUITexture") as IXUITexture;
+ Transform transform = t.Find("Info/AvatarBG/NestTpl/Bg");
+ DragonGroupRecordInfoList dragonGroupRecordInfoList = this._RecordList[index];
+ IXUILabel ixuilabel5 = t.Find("Info/AvatarBG/NestTpl/Succeed").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel5.gameObject.SetActive(dragonGroupRecordInfoList.iswin);
+ IXUILabel ixuilabel6 = t.Find("Desc/Watch/Text").GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel7 = t.Find("Desc/Commend/Text").GetComponent("XUILabel") as IXUILabel;
+ Transform transform2 = t.Find("Medal/FirstDown");
+ Transform transform3 = t.Find("Medal/FirstPass");
+ IXUIList ixuilist = t.Find("Grid").GetComponent("XUIList") as IXUIList;
+ Transform transform4 = t.Find("Grid/Text1");
+ Transform transform5 = t.Find("Grid/Text2");
+ ixuilabel3.SetText(XSingleton<UiUtility>.singleton.TimeDuarationFormatString((int)dragonGroupRecordInfoList.costtime, 5));
+ DateTime dateTime = XSingleton<UiUtility>.singleton.TimeNow(dragonGroupRecordInfoList.time, true);
+ ixuilabel2.SetText(dateTime.ToString("yyyy"));
+ ixuilabel.SetText(dateTime.ToString("MM.dd"));
+ ExpeditionTable.RowData expeditionDataByID = this._expDoc.GetExpeditionDataByID((int)dragonGroupRecordInfoList.stageid);
+ DragonNestTable.RowData dragonNestByID = this._dnDoc.GetDragonNestByID(dragonGroupRecordInfoList.stageid);
+ ixuisprite.ID = (ulong)((long)index);
+ ixuisprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnSelectDetail));
+ bool flag2 = this._SelectItemGB == null && index == 0;
+ if (flag2)
+ {
+ this.OnSelectDetail(ixuisprite);
+ }
+ this.ForceSetToggleFlag(ixuisprite.gameObject, this._selectedIndex == index);
+ bool flag3 = expeditionDataByID != null && dragonNestByID != null;
+ if (flag3)
+ {
+ ixuilabel4.SetText(XExpeditionDocument.GetFullName(expeditionDataByID));
+ bool flag4 = (ulong)dragonNestByID.DragonNestWave == (ulong)((long)this._dnDoc.DragonNestBOSSWave);
+ if (flag4)
+ {
+ ixuitexture.gameObject.SetActive(true);
+ transform.gameObject.SetActive(false);
+ ixuitexture.SetTexturePath(dragonNestByID.DragonNestIcon);
+ ixuisprite2.SetSprite("");
+ }
+ else
+ {
+ ixuitexture.gameObject.SetActive(false);
+ transform.gameObject.SetActive(true);
+ ixuitexture.SetTexturePath("");
+ ixuisprite2.SetSprite(dragonNestByID.DragonNestIcon, dragonNestByID.DragonNestAtlas, false);
+ }
+ }
+ else
+ {
+ ixuitexture.SetTexturePath("");
+ ixuilabel4.SetText("");
+ ixuisprite2.SetSprite("");
+ }
+ ixuilabel6.SetText(XSingleton<XCommon>.singleton.StringCombine(dragonGroupRecordInfoList.watchnum.ToString(), XStringDefineProxy.GetString("Spectate_times")));
+ ixuilabel7.SetText(XSingleton<XCommon>.singleton.StringCombine(dragonGroupRecordInfoList.commendnum.ToString(), XStringDefineProxy.GetString("Spectate_times")));
+ transform4.gameObject.SetActive(dragonGroupRecordInfoList.ismostwatchnum);
+ transform5.gameObject.SetActive(dragonGroupRecordInfoList.ismostcommendnum);
+ ixuilist.Refresh();
+ transform2.gameObject.SetActive(dragonGroupRecordInfoList.iswin && dragonGroupRecordInfoList.isFirstPass && !dragonGroupRecordInfoList.isServerFirstPass);
+ transform3.gameObject.SetActive(dragonGroupRecordInfoList.iswin && dragonGroupRecordInfoList.isServerFirstPass);
+ }
+ }
+
+ private void OnClickAvatar(IXUISprite sp)
+ {
+ ulong id = sp.ID;
+ XCharacterCommonMenuDocument.ReqCharacterMenuInfo(id, false);
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/XDragonHistoryHandler.cs.meta b/Client/Assets/Scripts/XMainClient/UI/XDragonHistoryHandler.cs.meta
new file mode 100644
index 00000000..23406740
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XDragonHistoryHandler.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: f234664d3ad483848bc6c1b2d3ac5bea
+timeCreated: 1611404842
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/XDragonPartnerHandler.cs b/Client/Assets/Scripts/XMainClient/UI/XDragonPartnerHandler.cs
new file mode 100644
index 00000000..a2d90e2b
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XDragonPartnerHandler.cs
@@ -0,0 +1,147 @@
+using System;
+using UILib;
+using UnityEngine;
+
+namespace XMainClient.UI
+{
+ internal class XDragonPartnerHandler : DlgHandlerBase
+ {
+ protected override string FileName
+ {
+ get
+ {
+ return "GameSystem/DragonPartnerFrame";
+ }
+ }
+
+ private XDragonPartnerDocument m_doc;
+
+ private XDragonPartnerHandler.TabIndex m_CurrentTabIndex = XDragonPartnerHandler.TabIndex.Record;
+
+ private XDragonRecordHandler m_DragonRecordHandler;
+
+ private XDragonHistoryHandler m_DragonHistoryHandler;
+
+ private IXUICheckBox m_Tab0;
+
+ private IXUICheckBox m_Tab1;
+
+ private GameObject m_RecordFrame;
+
+ private GameObject m_HistoryFrame;
+
+ private enum TabIndex
+ {
+ Record,
+ History,
+ Max
+ }
+
+ protected override void Init()
+ {
+ base.Init();
+ this.m_doc = XDocuments.GetSpecificDocument<XDragonPartnerDocument>(XDragonPartnerDocument.uuID);
+ this.m_doc.View = this;
+ this.m_Tab0 = (base.PanelObject.transform.Find("padTabs/TabTpl0/Bg").GetComponent("XUICheckBox") as IXUICheckBox);
+ this.m_Tab1 = (base.PanelObject.transform.Find("padTabs/TabTpl1/Bg").GetComponent("XUICheckBox") as IXUICheckBox);
+ this.m_Tab0.ID = 0UL;
+ this.m_Tab0.RegisterOnCheckEventHandler(new CheckBoxOnCheckEventHandler(this.OnClickTab));
+ this.m_Tab1.ID = 1UL;
+ this.m_Tab1.RegisterOnCheckEventHandler(new CheckBoxOnCheckEventHandler(this.OnClickTab));
+ this.m_RecordFrame = base.PanelObject.transform.Find("DragonNestRecordingFrame").gameObject;
+ this.m_HistoryFrame = base.PanelObject.transform.Find("historyFrame").gameObject;
+ DlgHandlerBase.EnsureCreate<XDragonRecordHandler>(ref this.m_DragonRecordHandler, this.m_RecordFrame, this, false);
+ DlgHandlerBase.EnsureCreate<XDragonHistoryHandler>(ref this.m_DragonHistoryHandler, this.m_HistoryFrame, this, false);
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ this._ApplyTabData(this.m_CurrentTabIndex);
+ }
+
+ protected override void OnHide()
+ {
+ base.OnHide();
+ }
+
+ public override void OnUnload()
+ {
+ DlgHandlerBase.EnsureUnload<XDragonHistoryHandler>(ref this.m_DragonHistoryHandler);
+ DlgHandlerBase.EnsureUnload<XDragonRecordHandler>(ref this.m_DragonRecordHandler);
+ bool flag = this.m_doc != null;
+ if (flag)
+ {
+ this.m_doc.View = null;
+ }
+ base.OnUnload();
+ }
+
+ private bool OnClickTab(IXUICheckBox cbx)
+ {
+ bool bChecked = cbx.bChecked;
+ if (bChecked)
+ {
+ this.m_CurrentTabIndex = (XDragonPartnerHandler.TabIndex)cbx.ID;
+ this._ApplyTabData(this.m_CurrentTabIndex);
+ }
+ return true;
+ }
+
+ private void _ApplyTabData(XDragonPartnerHandler.TabIndex tab)
+ {
+ bool flag = base.IsVisible();
+ bool flag2 = flag;
+ if (flag2)
+ {
+ XDragonPartnerHandler.TabIndex currentTabIndex = this.m_CurrentTabIndex;
+ if (currentTabIndex != XDragonPartnerHandler.TabIndex.Record)
+ {
+ if (currentTabIndex == XDragonPartnerHandler.TabIndex.History)
+ {
+ this.m_DragonRecordHandler.SetVisible(false);
+ this.m_DragonHistoryHandler.SetVisible(true);
+ }
+ }
+ else
+ {
+ this.m_DragonRecordHandler.SetVisible(true);
+ this.m_DragonHistoryHandler.SetVisible(false);
+ }
+ }
+ }
+
+ public override void RefreshData()
+ {
+ bool flag = !base.IsVisible();
+ if (!flag)
+ {
+ XDragonPartnerHandler.TabIndex currentTabIndex = this.m_CurrentTabIndex;
+ if (currentTabIndex != XDragonPartnerHandler.TabIndex.Record)
+ {
+ if (currentTabIndex == XDragonPartnerHandler.TabIndex.History)
+ {
+ bool flag2 = this.m_DragonHistoryHandler.IsVisible();
+ if (flag2)
+ {
+ this.m_DragonHistoryHandler.RefreshData();
+ }
+ }
+ }
+ else
+ {
+ bool flag3 = this.m_DragonRecordHandler.IsVisible();
+ if (flag3)
+ {
+ this.m_DragonRecordHandler.RefreshData();
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/XDragonPartnerHandler.cs.meta b/Client/Assets/Scripts/XMainClient/UI/XDragonPartnerHandler.cs.meta
new file mode 100644
index 00000000..6e5e1629
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XDragonPartnerHandler.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 0896b45bd42398f49988a8e5ab126b12
+timeCreated: 1611402971
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/XDragonRecordHandler.cs b/Client/Assets/Scripts/XMainClient/UI/XDragonRecordHandler.cs
new file mode 100644
index 00000000..d108f76c
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XDragonRecordHandler.cs
@@ -0,0 +1,286 @@
+using System;
+using System.Collections.Generic;
+using KKSG;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class XDragonRecordHandler : DlgHandlerBase
+ {
+ private XDragonPartnerDocument _doc = null;
+
+ private XExpeditionDocument _expDoc = null;
+
+ private XDragonNestDocument _dnDoc = null;
+
+ private List<DragonGroupRoleInfo> m_dragonGroupRoleInfoList;
+
+ private IXUIButton m_BtnDragonNest;
+
+ private IXUIButton m_BtnRecruit;
+
+ private IXUIScrollView m_ScrollView;
+
+ private IXUIWrapContent m_WrapContent;
+
+ private Transform _EmptyDetail;
+
+ protected override void Init()
+ {
+ base.Init();
+ this._doc = XDocuments.GetSpecificDocument<XDragonPartnerDocument>(XDragonPartnerDocument.uuID);
+ this._expDoc = XDocuments.GetSpecificDocument<XExpeditionDocument>(XExpeditionDocument.uuID);
+ this._dnDoc = XDocuments.GetSpecificDocument<XDragonNestDocument>(XDragonNestDocument.uuID);
+ this.m_BtnDragonNest = (base.PanelObject.transform.Find("Btn_DragonNest").GetComponent("XUIButton") as IXUIButton);
+ this.m_BtnRecruit = (base.PanelObject.transform.Find("Btn_Recruit").GetComponent("XUIButton") as IXUIButton);
+ this.m_ScrollView = (base.PanelObject.transform.Find("detail/detail").GetComponent("XUIScrollView") as IXUIScrollView);
+ this.m_WrapContent = (base.PanelObject.transform.Find("detail/detail/WrapContent").GetComponent("XUIWrapContent") as IXUIWrapContent);
+ this._EmptyDetail = base.PanelObject.transform.Find("detail/EmptyDetail");
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ this.RefreshData();
+ this._doc.ReqDragonGroupRoleInfo();
+ }
+
+ public override void RefreshData()
+ {
+ this.SetupPartnerInfo();
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ this.m_BtnDragonNest.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnClickBtnDragonNest));
+ this.m_BtnRecruit.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnClickBtnRecruit));
+ this.m_WrapContent.RegisterItemUpdateEventHandler(new WrapItemUpdateEventHandler(this.PartnerWrapListUpdate));
+ }
+
+ public override void OnUnload()
+ {
+ this.m_dragonGroupRoleInfoList = null;
+ base.OnUnload();
+ }
+
+ private void PartnerWrapListUpdate(Transform item, int index)
+ {
+ bool flag = this.m_dragonGroupRoleInfoList == null || index >= this.m_dragonGroupRoleInfoList.Count;
+ if (!flag)
+ {
+ IXUISprite ixuisprite = item.GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnClickItem));
+ IXUISprite ixuisprite2 = item.Find("Info/Profession").GetComponent("XUISprite") as IXUISprite;
+ IXUILabel ixuilabel = item.Find("Info/Name").GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel2 = item.Find("Info/Level").GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel3 = item.Find("Info/AvatarBG/BattlePointBG/Power").GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel4 = item.Find("Info/GuildName").GetComponent("XUILabel") as IXUILabel;
+ IXUISprite ixuisprite3 = item.Find("Info/AvatarBG/Avatar").GetComponent("XUISprite") as IXUISprite;
+ IXUISprite ixuisprite4 = item.Find("Info/AvatarBG/AvatarFrame").GetComponent("XUISprite") as IXUISprite;
+ IXUILabel ixuilabel5 = item.Find("Stage/Name").GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel6 = item.Find("Stage/date/Date").GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel7 = item.Find("Stage/date/Time").GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel8 = item.Find("Stage/Times/Num").GetComponent("XUILabel") as IXUILabel;
+ Transform transform = item.Find("add");
+ IXUIButton ixuibutton = item.Find("add").GetComponent("XUIButton") as IXUIButton;
+ ixuibutton.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnClickAddFriend));
+ Transform transform2 = item.Find("hgd");
+ IXUILabel ixuilabel9 = transform2.Find("Level").GetComponent("XUILabel") as IXUILabel;
+ IXUISprite ixuisprite5 = transform2.Find("Level/Mark").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite5.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnClickDegreeHeart));
+ IXUIButton ixuibutton2 = item.Find("chat/btn").GetComponent("XUIButton") as IXUIButton;
+ ixuibutton2.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnClickChatBtn));
+ DragonGroupRoleInfo dragonGroupRoleInfo = this.m_dragonGroupRoleInfoList[index];
+ ixuibutton.ID = dragonGroupRoleInfo.roleid;
+ ixuibutton2.ID = (ulong)((long)index);
+ ixuisprite.ID = dragonGroupRoleInfo.roleid;
+ ixuisprite2.SetSprite(XSingleton<XProfessionSkillMgr>.singleton.GetProfIcon((int)dragonGroupRoleInfo.profession));
+ ixuilabel.SetText(dragonGroupRoleInfo.rolename);
+ ixuilabel2.SetText(dragonGroupRoleInfo.level.ToString());
+ ixuilabel3.SetText(dragonGroupRoleInfo.fighting.ToString());
+ ixuilabel4.SetText(string.IsNullOrEmpty(dragonGroupRoleInfo.guild) ? XStringDefineProxy.GetString("NONE") : dragonGroupRoleInfo.guild);
+ ixuisprite3.SetSprite(XSingleton<XProfessionSkillMgr>.singleton.GetProfHeadIcon2((int)dragonGroupRoleInfo.profession));
+ bool flag2 = dragonGroupRoleInfo.pre != null;
+ if (flag2)
+ {
+ XSingleton<UiUtility>.singleton.ParseHeadIcon(dragonGroupRoleInfo.pre.setid, ixuisprite4);
+ }
+ else
+ {
+ ixuisprite4.SetVisible(false);
+ }
+ ExpeditionTable.RowData expeditionDataByID = this._expDoc.GetExpeditionDataByID((int)dragonGroupRoleInfo.stageID);
+ bool flag3 = expeditionDataByID != null;
+ if (flag3)
+ {
+ ixuilabel5.SetText(XExpeditionDocument.GetFullName(expeditionDataByID));
+ DateTime dateTime = XSingleton<UiUtility>.singleton.TimeNow(dragonGroupRoleInfo.stageTime, true);
+ ixuilabel6.SetText(dateTime.ToString("yyyy.MM.dd"));
+ ixuilabel7.SetText(dateTime.ToString("HH:mm"));
+ ixuilabel8.SetText(dragonGroupRoleInfo.stageCount.ToString());
+ }
+ else
+ {
+ ixuilabel5.SetText("");
+ ixuilabel6.SetText("");
+ ixuilabel7.SetText("");
+ ixuilabel8.SetText("");
+ }
+ XFriendData friendDataById = DlgBase<XFriendsView, XFriendsBehaviour>.singleton.GetFriendDataById(dragonGroupRoleInfo.roleid);
+ bool flag4 = friendDataById != null;
+ if (flag4)
+ {
+ transform.gameObject.SetActive(false);
+ transform2.gameObject.SetActive(true);
+ bool flag5 = friendDataById.degreeAll < XSingleton<XFriendsStaticData>.singleton.MaxFriendlyEvaluation;
+ if (flag5)
+ {
+ ixuilabel9.SetText(friendDataById.degreeAll.ToString());
+ }
+ else
+ {
+ ixuilabel9.SetText("MAX");
+ }
+ float num = friendDataById.degreeAll;
+ num /= XSingleton<XFriendsStaticData>.singleton.MaxFriendlyEvaluation;
+ ixuisprite5.SetFillAmount(1f - num);
+ ixuisprite5.ID = (ulong)friendDataById.degreeAll;
+ }
+ else
+ {
+ transform.gameObject.SetActive(true);
+ transform2.gameObject.SetActive(false);
+ }
+ }
+ }
+
+ private void OnClickDegreeHeart(IXUISprite spr)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString("FRIENDS_DEGREE_HINT_TEXT_FMT", new object[]
+ {
+ spr.ID
+ }), "fece00");
+ }
+
+ private void OnClickItem(IXUISprite sp)
+ {
+ ulong id = sp.ID;
+ XCharacterCommonMenuDocument.ReqCharacterMenuInfo(id, false);
+ }
+
+ private bool OnClickAddFriend(IXUIButton btn)
+ {
+ DlgBase<XFriendsView, XFriendsBehaviour>.singleton.AddFriendById(btn.ID);
+ return true;
+ }
+
+ private bool OnClickBtnDragonNest(IXUIButton btn)
+ {
+ DlgBase<XDragonNestView, XDragonNestBehaviour>.singleton.SetVisibleWithAnimation(true, null);
+ return true;
+ }
+
+ private bool OnClickBtnRecruit(IXUIButton btn)
+ {
+ XSingleton<XGameSysMgr>.singleton.OpenSystem(XSysDefine.XSys_GroupRecruit, 0UL);
+ return true;
+ }
+
+ private bool OnClickChatBtn(IXUIButton btn)
+ {
+ int num = (int)btn.ID;
+ bool flag = num < 0 || num >= this.m_dragonGroupRoleInfoList.Count;
+ bool result;
+ if (flag)
+ {
+ result = false;
+ }
+ else
+ {
+ DragonGroupRoleInfo dragonGroupRoleInfo = this.m_dragonGroupRoleInfoList[num];
+ bool flag2 = DlgBase<XFriendsView, XFriendsBehaviour>.singleton.IsBlock(dragonGroupRoleInfo.roleid);
+ if (flag2)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString("CHAT_BLOCK_2"), "fece00");
+ }
+ else
+ {
+ ChatFriendData chatFriendData = new ChatFriendData();
+ chatFriendData.name = dragonGroupRoleInfo.rolename;
+ chatFriendData.roleid = dragonGroupRoleInfo.roleid;
+ chatFriendData.powerpoint = dragonGroupRoleInfo.fighting;
+ chatFriendData.profession = dragonGroupRoleInfo.profession;
+ chatFriendData.setid = ((dragonGroupRoleInfo.pre != null) ? dragonGroupRoleInfo.pre.setid : new List<uint>());
+ chatFriendData.isfriend = DlgBase<XFriendsView, XFriendsBehaviour>.singleton.IsMyFriend(dragonGroupRoleInfo.roleid);
+ chatFriendData.msgtime = DateTime.Now;
+ chatFriendData.viplevel = 0u;
+ XEntity entity = XSingleton<XEntityMgr>.singleton.GetEntity(dragonGroupRoleInfo.roleid);
+ bool flag3 = entity != null;
+ if (flag3)
+ {
+ XRoleAttributes xroleAttributes = (XRoleAttributes)entity.Attributes;
+ chatFriendData.profession = (uint)xroleAttributes.Profession;
+ }
+ DlgBase<XChatView, XChatBehaviour>.singleton.PrivateChatTo(chatFriendData);
+ }
+ result = true;
+ }
+ return result;
+ }
+
+ private void SetupPartnerInfo()
+ {
+ List<DragonGroupRoleInfo> dragonGroupRoleInfoLsit = this._doc.DragonGroupRoleInfoLsit;
+ bool flag = this.m_dragonGroupRoleInfoList == null;
+ if (flag)
+ {
+ this.m_dragonGroupRoleInfoList = new List<DragonGroupRoleInfo>();
+ }
+ this.m_dragonGroupRoleInfoList.Clear();
+ bool flag2 = dragonGroupRoleInfoLsit != null;
+ if (flag2)
+ {
+ for (int i = 0; i < dragonGroupRoleInfoLsit.Count; i++)
+ {
+ this.m_dragonGroupRoleInfoList.Add(dragonGroupRoleInfoLsit[i]);
+ }
+ }
+ this._EmptyDetail.gameObject.SetActive(this.m_dragonGroupRoleInfoList.Count == 0);
+ this.SortRoleInfoList();
+ bool flag3 = this.m_dragonGroupRoleInfoList.Count == 0;
+ if (flag3)
+ {
+ this.m_WrapContent.SetContentCount(0, false);
+ }
+ else
+ {
+ this.m_WrapContent.SetContentCount(this.m_dragonGroupRoleInfoList.Count, false);
+ }
+ this.m_ScrollView.ResetPosition();
+ }
+
+ private void SortRoleInfoList()
+ {
+ this.m_dragonGroupRoleInfoList.Sort(new Comparison<DragonGroupRoleInfo>(this.ComparePartner));
+ }
+
+ private int ComparePartner(DragonGroupRoleInfo a, DragonGroupRoleInfo b)
+ {
+ bool flag = a.stageTime != b.stageTime;
+ int result;
+ if (flag)
+ {
+ result = b.stageTime.CompareTo(a.stageTime);
+ }
+ else
+ {
+ result = b.stageCount.CompareTo(a.stageCount);
+ }
+ return result;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/XDragonRecordHandler.cs.meta b/Client/Assets/Scripts/XMainClient/UI/XDragonRecordHandler.cs.meta
new file mode 100644
index 00000000..e6c70f92
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XDragonRecordHandler.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 095141d508469c34ba8bf538f23ebb71
+timeCreated: 1611403154
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/XDragonRwdHandler.cs b/Client/Assets/Scripts/XMainClient/UI/XDragonRwdHandler.cs
new file mode 100644
index 00000000..2b62b0b1
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XDragonRwdHandler.cs
@@ -0,0 +1,189 @@
+using System;
+using UILib;
+using UnityEngine;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class XDragonRwdHandler : DlgHandlerBase
+ {
+ private IXUIWrapContent m_WrapContent;
+
+ private IXUIScrollView m_PanelScrollView;
+
+ private IXUILabel m_lblWeek;
+
+ private IXUILabel m_lblIntro;
+
+ private IXUILabel m_lblTimes;
+
+ private IXUICheckBox m_chbx;
+
+ private bool cbInit;
+
+ private XDragonRewardDocument doc;
+
+ protected override void Init()
+ {
+ base.Init();
+ bool flag = this.doc == null;
+ if (flag)
+ {
+ this.doc = XDocuments.GetSpecificDocument<XDragonRewardDocument>(XDragonRewardDocument.uuID);
+ }
+ this.m_PanelScrollView = (base.PanelObject.transform.Find("detail").GetComponent("XUIScrollView") as IXUIScrollView);
+ this.m_WrapContent = (base.PanelObject.transform.Find("detail/WrapContent").GetComponent("XUIWrapContent") as IXUIWrapContent);
+ this.m_lblWeek = (base.PanelObject.transform.Find("Title/T/Time").GetComponent("XUILabel") as IXUILabel);
+ this.m_lblIntro = (base.PanelObject.transform.Find("Title/Intro").GetComponent("XUILabel") as IXUILabel);
+ this.m_lblTimes = (base.PanelObject.transform.Find("Title/T/Times").GetComponent("XUILabel") as IXUILabel);
+ this.m_chbx = (base.PanelObject.transform.Find("Title/Agreement/Category/Normal").GetComponent("XUICheckBox") as IXUICheckBox);
+ this.m_WrapContent.RegisterItemUpdateEventHandler(new WrapItemUpdateEventHandler(this.WrapContentItemUpdated));
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ this.m_chbx.RegisterOnCheckEventHandler(new CheckBoxOnCheckEventHandler(this.OnSelectCnbx));
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ this.doc.rwdView = this;
+ this.cbInit = false;
+ this.m_lblWeek.SetText(XStringDefineProxy.GetString("DragonReset"));
+ this.m_lblIntro.SetText(XStringDefineProxy.GetString("DragonDesc"));
+ bool flag = this.doc == null;
+ if (flag)
+ {
+ this.doc = XDocuments.GetSpecificDocument<XDragonRewardDocument>(XDragonRewardDocument.uuID);
+ }
+ this.doc.FetchList();
+ }
+
+ protected override void OnHide()
+ {
+ this.cbInit = false;
+ base.OnHide();
+ }
+
+ public override void OnUnload()
+ {
+ this.doc = null;
+ base.OnUnload();
+ }
+
+ private bool OnSelectCnbx(IXUICheckBox chbx)
+ {
+ bool flag = this.cbInit;
+ if (flag)
+ {
+ bool flag2 = this.doc == null;
+ if (flag2)
+ {
+ this.doc = XDocuments.GetSpecificDocument<XDragonRewardDocument>(XDragonRewardDocument.uuID);
+ }
+ bool flag3 = chbx.bChecked != this.doc.isAgreeHelp;
+ if (flag3)
+ {
+ this.doc.AgreeHelp(chbx.bChecked);
+ }
+ }
+ return true;
+ }
+
+ public void Refresh()
+ {
+ this.cbInit = true;
+ this.m_chbx.bChecked = this.doc.isAgreeHelp;
+ this.m_lblTimes.SetText(this.doc.helpCnt.ToString());
+ this.m_WrapContent.SetContentCount(this.doc.rewds.Count, false);
+ this.m_PanelScrollView.ResetPosition();
+ }
+
+ private void WrapContentItemUpdated(Transform t, int index)
+ {
+ bool flag = this.doc != null;
+ if (flag)
+ {
+ bool flag2 = index < this.doc.rewds.Count && index >= 0;
+ if (flag2)
+ {
+ DragonRwdItem info = this.doc.rewds[index];
+ this._SetRecord(t, info);
+ }
+ }
+ }
+
+ private void _SetRecord(Transform t, DragonRwdItem info)
+ {
+ IXUILabel ixuilabel = t.Find("TLabel").GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel2 = t.Find("DLabel").GetComponent("XUILabel") as IXUILabel;
+ Transform transform = t.Find("ch");
+ IXUISprite ixuisprite = transform.Find("Sprite").GetComponent("XUISprite") as IXUISprite;
+ IXUIButton ixuibutton = t.Find("Get").GetComponent("XUIButton") as IXUIButton;
+ IXUISprite ixuisprite2 = t.Find("Icon").GetComponent("XUISprite") as IXUISprite;
+ IXUISprite ixuisprite3 = t.Find("Fini").GetComponent("XUISprite") as IXUISprite;
+ IXUISprite ixuisprite4 = t.Find("RedPoint").GetComponent("XUISprite") as IXUISprite;
+ GameObject gameObject = t.Find("bj").gameObject;
+ GameObject gameObject2 = t.Find("bj/bj").gameObject;
+ GameObject gameObject3 = t.Find("tmp1").gameObject;
+ GameObject gameObject4 = t.Find("tmp2").gameObject;
+ ixuilabel.SetText(info.row.Achievement);
+ ixuilabel2.SetText(info.row.Explanation);
+ string empty = string.Empty;
+ string value = XSingleton<XGlobalConfig>.singleton.GetValue("AchieveColor");
+ bool flag = !string.IsNullOrEmpty(info.row.DesignationName);
+ gameObject3.SetActive(flag);
+ gameObject4.SetActive(!flag);
+ Transform transform2 = flag ? gameObject3.transform : gameObject4.transform;
+ int num = Mathf.Min(3, (int)info.row.Reward.count);
+ for (int i = 0; i < num; i++)
+ {
+ GameObject gameObject5 = transform2.GetChild(i).gameObject;
+ gameObject5.transform.localScale = Vector3.one;
+ IXUISprite ixuisprite5 = gameObject5.transform.Find("Icon").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite5.ID = (ulong)((long)info.row.Reward[i, 0]);
+ XSingleton<XItemDrawerMgr>.singleton.normalItemDrawer.DrawItem(gameObject5, info.row.Reward[i, 0], info.row.Reward[i, 1], false);
+ ixuisprite5.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(XSingleton<UiUtility>.singleton.OnItemClick));
+ }
+ int j = num;
+ int num2 = 3;
+ while (j < num2)
+ {
+ transform2.GetChild(j).gameObject.SetActive(false);
+ j++;
+ }
+ gameObject2.SetActive(info.state == AchieveState.Claim);
+ ixuisprite4.SetVisible(info.state == AchieveState.Claim);
+ ixuisprite3.SetVisible(info.state == AchieveState.Claimed);
+ ixuibutton.SetVisible(info.state != AchieveState.Claimed);
+ gameObject.SetActive(info.state != AchieveState.Normal);
+ ixuisprite2.SetSprite(info.row.ICON);
+ bool flag2 = flag;
+ if (flag2)
+ {
+ ixuisprite.SetSprite(info.row.DesignationName);
+ }
+ transform.gameObject.SetActive(!string.IsNullOrEmpty(info.row.DesignationName));
+ ixuibutton.SetEnable(info.state != AchieveState.Normal, false);
+ ixuibutton.ID = (ulong)((long)info.row.ID);
+ bool flag3 = info.state != AchieveState.Normal;
+ if (flag3)
+ {
+ ixuibutton.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnBtnClick));
+ }
+ }
+
+ private bool OnBtnClick(IXUIButton btn)
+ {
+ bool flag = this.doc == null;
+ if (flag)
+ {
+ this.doc = XDocuments.GetSpecificDocument<XDragonRewardDocument>(XDragonRewardDocument.uuID);
+ }
+ this.doc.Claim((int)btn.ID);
+ return true;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/XDragonRwdHandler.cs.meta b/Client/Assets/Scripts/XMainClient/UI/XDragonRwdHandler.cs.meta
new file mode 100644
index 00000000..47806ca3
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XDragonRwdHandler.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: b7b766a4586b07948a84cb804d075413
+timeCreated: 1611404403
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/XDramaOperate.cs b/Client/Assets/Scripts/XMainClient/UI/XDramaOperate.cs
new file mode 100644
index 00000000..37d15a8a
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XDramaOperate.cs
@@ -0,0 +1,51 @@
+using System;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class XDramaOperate
+ {
+ protected XDramaDocument dramaDoc;
+
+ public XDramaOperate()
+ {
+ this.dramaDoc = XDocuments.GetSpecificDocument<XDramaDocument>(XDramaDocument.uuID);
+ }
+
+ protected void _FireEvent(XDramaOperateParam param)
+ {
+ DlgBase<DramaDlg, DramaDlgBehaviour>.singleton.SetupOperate(param);
+ param.Recycle();
+ }
+
+ protected string _GetRandomNpcText(XNpc npc)
+ {
+ bool flag = npc == null;
+ string result;
+ if (flag)
+ {
+ result = null;
+ }
+ else
+ {
+ string[] content = (npc.Attributes as XNpcAttributes).Content;
+ bool flag2 = content != null && content.Length != 0;
+ if (flag2)
+ {
+ result = content[XSingleton<XCommon>.singleton.RandomInt(content.Length)];
+ }
+ else
+ {
+ result = string.Empty;
+ }
+ }
+ return result;
+ }
+
+ public virtual void ShowNpc(XNpc npc)
+ {
+ DlgBase<DramaDlg, DramaDlgBehaviour>.singleton.SetVisible(true, true);
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/XDramaOperate.cs.meta b/Client/Assets/Scripts/XMainClient/UI/XDramaOperate.cs.meta
new file mode 100644
index 00000000..b0c38176
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XDramaOperate.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: b0192336c2fdf934591cfc05f20bfc8b
+timeCreated: 1611404348
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/XDramaOperateButton.cs b/Client/Assets/Scripts/XMainClient/UI/XDramaOperateButton.cs
new file mode 100644
index 00000000..b37f93de
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XDramaOperateButton.cs
@@ -0,0 +1,36 @@
+using System;
+using UILib;
+
+namespace XMainClient.UI
+{
+ internal class XDramaOperateButton : XDataBase
+ {
+ public string Name;
+
+ public ButtonClickEventHandler ClickEvent;
+
+ public float TargetTime;
+
+ public string TimeNote;
+
+ public bool StateEnable = true;
+
+ public ulong RID;
+
+ public override void Init()
+ {
+ base.Init();
+ this.Name = null;
+ this.ClickEvent = null;
+ this.TargetTime = 0f;
+ this.TimeNote = null;
+ this.StateEnable = true;
+ }
+
+ public override void Recycle()
+ {
+ base.Recycle();
+ XDataPool<XDramaOperateButton>.Recycle(this);
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/XDramaOperateButton.cs.meta b/Client/Assets/Scripts/XMainClient/UI/XDramaOperateButton.cs.meta
new file mode 100644
index 00000000..e1d91652
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XDramaOperateButton.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 2b46674d979fd034d902c56f8b64c85b
+timeCreated: 1611403498
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/XDramaOperateList.cs b/Client/Assets/Scripts/XMainClient/UI/XDramaOperateList.cs
new file mode 100644
index 00000000..fe16f827
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XDramaOperateList.cs
@@ -0,0 +1,34 @@
+using System;
+using UILib;
+
+namespace XMainClient.UI
+{
+ internal class XDramaOperateList : XDataBase
+ {
+ public string Name;
+
+ public SpriteClickEventHandler ClickEvent;
+
+ public float TargetTime;
+
+ public string TimeNote;
+
+ public ulong RID;
+
+ public override void Init()
+ {
+ base.Init();
+ this.Name = null;
+ this.ClickEvent = null;
+ this.TargetTime = 0f;
+ this.TimeNote = null;
+ this.RID = 0UL;
+ }
+
+ public override void Recycle()
+ {
+ base.Recycle();
+ XDataPool<XDramaOperateList>.Recycle(this);
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/XDramaOperateList.cs.meta b/Client/Assets/Scripts/XMainClient/UI/XDramaOperateList.cs.meta
new file mode 100644
index 00000000..e14f003c
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XDramaOperateList.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: a4cf5df586fdd1445b16ba25ae33b788
+timeCreated: 1611404283
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/XDramaOperateParam.cs b/Client/Assets/Scripts/XMainClient/UI/XDramaOperateParam.cs
new file mode 100644
index 00000000..4afdc067
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XDramaOperateParam.cs
@@ -0,0 +1,158 @@
+using System;
+using UILib;
+using XMainClient.UI.UICommon;
+
+namespace XMainClient.UI
+{
+ internal class XDramaOperateParam : XDataBase
+ {
+ public XDramaOperateButton[] Buttons
+ {
+ get
+ {
+ return this._Buttons;
+ }
+ }
+
+ public XDramaOperateList[] Lists
+ {
+ get
+ {
+ return this._Lists;
+ }
+ }
+
+ public int ButtonCount
+ {
+ get
+ {
+ return this._ButtonCount;
+ }
+ }
+
+ public int ListCount
+ {
+ get
+ {
+ return this._ListCount;
+ }
+ }
+
+ public static int MAX_BUTTON_COUNT = 4;
+
+ public static int MAX_LIST_COUNT = 2;
+
+ public XNpc Npc;
+
+ public string Text;
+
+ private XDramaOperateButton[] _Buttons = new XDramaOperateButton[XDramaOperateParam.MAX_BUTTON_COUNT];
+
+ private XDramaOperateList[] _Lists = new XDramaOperateList[XDramaOperateParam.MAX_LIST_COUNT];
+
+ private int _ButtonCount;
+
+ private int _ListCount;
+
+ public override void Init()
+ {
+ base.Init();
+ for (int i = 0; i < XDramaOperateParam.MAX_BUTTON_COUNT; i++)
+ {
+ bool flag = this._Buttons[i] != null;
+ if (flag)
+ {
+ this._Buttons[i].Recycle();
+ this._Buttons[i] = null;
+ }
+ }
+ for (int j = 0; j < XDramaOperateParam.MAX_LIST_COUNT; j++)
+ {
+ bool flag2 = this._Lists[j] != null;
+ if (flag2)
+ {
+ this._Lists[j].Recycle();
+ this._Lists[j] = null;
+ }
+ }
+ this._ButtonCount = 0;
+ this._ListCount = 0;
+ this.Npc = null;
+ this.Text = null;
+ }
+
+ public override void Recycle()
+ {
+ XDataPool<XDramaOperateParam>.Recycle(this);
+ }
+
+ public XDramaOperateButton AppendButton(string name, ButtonClickEventHandler callback, ulong id)
+ {
+ bool flag = this._ButtonCount >= XDramaOperateParam.MAX_BUTTON_COUNT;
+ XDramaOperateButton result;
+ if (flag)
+ {
+ result = null;
+ }
+ else
+ {
+ XDramaOperateButton data = XDataPool<XDramaOperateButton>.GetData();
+ data.Name = name;
+ data.RID = id;
+ bool flag2 = callback != null;
+ if (flag2)
+ {
+ data.ClickEvent = callback;
+ }
+ else
+ {
+ data.ClickEvent = new ButtonClickEventHandler(this._DefaultCallback);
+ }
+ this._Buttons[this._ButtonCount] = data;
+ this._ButtonCount++;
+ result = data;
+ }
+ return result;
+ }
+
+ public XDramaOperateList AppendList(string name, SpriteClickEventHandler callback, ulong id)
+ {
+ bool flag = this._ListCount >= XDramaOperateParam.MAX_LIST_COUNT;
+ XDramaOperateList result;
+ if (flag)
+ {
+ result = null;
+ }
+ else
+ {
+ XDramaOperateList data = XDataPool<XDramaOperateList>.GetData();
+ data.Name = name;
+ data.RID = id;
+ bool flag2 = callback != null;
+ if (flag2)
+ {
+ data.ClickEvent = callback;
+ }
+ else
+ {
+ data.ClickEvent = new SpriteClickEventHandler(this._DefaultCallback);
+ }
+ this._Lists[this._ListCount] = data;
+ this._ListCount++;
+ result = data;
+ }
+ return result;
+ }
+
+ private void _DefaultCallback(IXUISprite iSp)
+ {
+ DlgBase<DramaDlg, DramaDlgBehaviour>.singleton.SetVisible(false, true);
+ }
+
+ private bool _DefaultCallback(IXUIButton btn)
+ {
+ DlgBase<DramaDlg, DramaDlgBehaviour>.singleton.SetVisible(false, true);
+ return true;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/XDramaOperateParam.cs.meta b/Client/Assets/Scripts/XMainClient/UI/XDramaOperateParam.cs.meta
new file mode 100644
index 00000000..b2d39431
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XDramaOperateParam.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 0a2e7bdae87ec9c468ebfd96ae29d05f
+timeCreated: 1611403161
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/XFPStrengthenBehaviour.cs b/Client/Assets/Scripts/XMainClient/UI/XFPStrengthenBehaviour.cs
new file mode 100644
index 00000000..aff1b3e4
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XFPStrengthenBehaviour.cs
@@ -0,0 +1,38 @@
+using System;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+
+namespace XMainClient.UI
+{
+ internal class XFPStrengthenBehaviour : DlgBehaviourBase
+ {
+ public GameObject m_tabParentGo;
+
+ public IXUIButton m_Close;
+
+ public IXUIScrollView m_Scroll;
+
+ public IXUILabel m_MyFightLab;
+
+ public IXUILabel m_MyLevelLab;
+
+ public IXUILabel m_RecommendFightLab;
+
+ public IXUITexture m_RateTex;
+
+ public static readonly uint FUNCTION_NUM = 4u;
+
+ private void Awake()
+ {
+ this.m_Close = (base.transform.Find("Bg/Close").GetComponent("XUIButton") as IXUIButton);
+ this.m_Scroll = (base.transform.Find("Bg/Content/Panel").GetComponent("XUIScrollView") as IXUIScrollView);
+ Transform transform = base.transform.Find("Bg/Top");
+ this.m_MyFightLab = (transform.Find("MyFightLab").GetComponent("XUILabel") as IXUILabel);
+ this.m_RecommendFightLab = (transform.Find("RecommendFightLab").GetComponent("XUILabel") as IXUILabel);
+ this.m_MyLevelLab = (transform.Find("RecommendFightLab/LevelLab").GetComponent("XUILabel") as IXUILabel);
+ this.m_RateTex = (transform.Find("RateTex").GetComponent("XUITexture") as IXUITexture);
+ this.m_tabParentGo = base.transform.Find("Bg/functions/scroll").gameObject;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/XFPStrengthenBehaviour.cs.meta b/Client/Assets/Scripts/XMainClient/UI/XFPStrengthenBehaviour.cs.meta
new file mode 100644
index 00000000..93d8abb3
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XFPStrengthenBehaviour.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 1e6f1f032f1b1da47931d7e85f5f8677
+timeCreated: 1611403363
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/XFavorParam.cs b/Client/Assets/Scripts/XMainClient/UI/XFavorParam.cs
new file mode 100644
index 00000000..23d69dfe
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XFavorParam.cs
@@ -0,0 +1,38 @@
+using System;
+using UILib;
+
+namespace XMainClient.UI
+{
+ internal class XFavorParam : XDataBase
+ {
+ public XNpc Npc;
+
+ public string Text;
+
+ public bool isShowSend = false;
+
+ public bool isShowExchange = false;
+
+ public bool isShowExchangeRedpoint = false;
+
+ public ButtonClickEventHandler sendCallback;
+
+ public ButtonClickEventHandler exchangeCallback;
+
+ public override void Init()
+ {
+ this.Npc = null;
+ this.Text = string.Empty;
+ this.isShowSend = false;
+ this.isShowExchange = false;
+ this.isShowExchangeRedpoint = false;
+ this.sendCallback = null;
+ this.exchangeCallback = null;
+ }
+
+ public override void Recycle()
+ {
+ XDataPool<XFavorParam>.Recycle(this);
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/XFavorParam.cs.meta b/Client/Assets/Scripts/XMainClient/UI/XFavorParam.cs.meta
new file mode 100644
index 00000000..e5f02199
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XFavorParam.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 297a48643d69bd94795b87a790673531
+timeCreated: 1611403477
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/XFlowerReplyBehavior.cs b/Client/Assets/Scripts/XMainClient/UI/XFlowerReplyBehavior.cs
new file mode 100644
index 00000000..0641ab03
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XFlowerReplyBehavior.cs
@@ -0,0 +1,47 @@
+using System;
+using System.Collections.Generic;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+
+namespace XMainClient.UI
+{
+ internal class XFlowerReplyBehavior : DlgBehaviourBase
+ {
+ public IXUILabel m_SenderName = null;
+
+ public IXUILabel m_SenderCount = null;
+
+ public IXUILabel m_FlowerName = null;
+
+ public IXUILabel m_ThxContent = null;
+
+ public IXUISprite m_Close = null;
+
+ public IXUIButton m_Voice = null;
+
+ public IXUIButton m_QuickThx = null;
+
+ public Transform m_SpeakPanel = null;
+
+ public List<GameObject> m_ReplayBgList = new List<GameObject>();
+
+ private void Awake()
+ {
+ this.m_SpeakPanel = base.transform.Find("Bg/SpeakPanel");
+ this.m_SenderName = (base.transform.Find("Bg/SenderName").GetComponent("XUILabel") as IXUILabel);
+ this.m_SenderCount = (base.transform.Find("Bg/SendCount").GetComponent("XUILabel") as IXUILabel);
+ this.m_FlowerName = (base.transform.Find("Bg/FlowerName").GetComponent("XUILabel") as IXUILabel);
+ this.m_QuickThx = (base.transform.Find("Bg/BtnTHx").GetComponent("XUIButton") as IXUIButton);
+ this.m_Voice = (base.transform.Find("Bg/speak").GetComponent("XUIButton") as IXUIButton);
+ this.m_Close = (base.transform.Find("InputBlocker").GetComponent("XUISprite") as IXUISprite);
+ this.m_ThxContent = (base.transform.Find("Bg/ThxContent").GetComponent("XUILabel") as IXUILabel);
+ GameObject gameObject = base.transform.Find("Bg/Bg2").gameObject;
+ GameObject gameObject2 = base.transform.Find("Bg/Bg2_Advance").gameObject;
+ GameObject gameObject3 = base.transform.Find("Bg/Bg2_Elite").gameObject;
+ this.m_ReplayBgList.Add(gameObject);
+ this.m_ReplayBgList.Add(gameObject2);
+ this.m_ReplayBgList.Add(gameObject3);
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/XFlowerReplyBehavior.cs.meta b/Client/Assets/Scripts/XMainClient/UI/XFlowerReplyBehavior.cs.meta
new file mode 100644
index 00000000..7bd06b16
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XFlowerReplyBehavior.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 15a42a6b6aff3e14f80d001c60c7aeae
+timeCreated: 1611403264
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/XFlowerReplyView.cs b/Client/Assets/Scripts/XMainClient/UI/XFlowerReplyView.cs
new file mode 100644
index 00000000..34f6c083
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XFlowerReplyView.cs
@@ -0,0 +1,219 @@
+using System;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class XFlowerReplyView : DlgBase<XFlowerReplyView, XFlowerReplyBehavior>
+ {
+ public override string fileName
+ {
+ get
+ {
+ return "GameSystem/FlowerReply";
+ }
+ }
+
+ public override int layer
+ {
+ get
+ {
+ return 100;
+ }
+ }
+
+ public override bool autoload
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override bool isHideChat
+ {
+ get
+ {
+ return false;
+ }
+ }
+
+ public override bool isHideTutorial
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public Action OnClosed;
+
+ private XFlowerReplyDocument _Doc;
+
+ private int _flowerID;
+
+ private ulong _senderID;
+
+ private string _senderName;
+
+ private int _senderPower;
+
+ private int _senderProfession;
+
+ private int _senderVip;
+
+ private int _sendCount;
+
+ private Vector2 m_DragDistance = Vector2.zero;
+
+ private bool m_CancelRecord = false;
+
+ public void ShowView(int itemID, ulong senderID, string senderName, int senderPower, int senderProfession, int senderVip, int sendCount)
+ {
+ this._flowerID = itemID;
+ this._senderID = senderID;
+ this._senderName = senderName;
+ this._senderPower = senderPower;
+ this._senderProfession = senderProfession;
+ this._senderVip = senderVip;
+ this._sendCount = sendCount;
+ this.SetVisibleWithAnimation(true, null);
+ }
+
+ protected override void Init()
+ {
+ this._Doc = XDocuments.GetSpecificDocument<XFlowerReplyDocument>(XFlowerReplyDocument.uuID);
+ this._Doc.View = this;
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ this.UpdateReplyBg();
+ base.uiBehaviour.m_SpeakPanel.gameObject.SetActive(false);
+ base.uiBehaviour.m_SenderName.SetText(this._senderName);
+ base.uiBehaviour.m_SenderCount.SetText(this._sendCount.ToString());
+ base.uiBehaviour.m_FlowerName.SetText(XSingleton<UiUtility>.singleton.ChooseProfString(XBagDocument.GetItemConf(this._flowerID).ItemName, 0u));
+ base.uiBehaviour.m_ThxContent.SetText(this._Doc.GetThxContent(this._flowerID, this._sendCount));
+ }
+
+ private void UpdateReplyBg()
+ {
+ int num = this._flowerID - XFastEnumIntEqualityComparer<ItemEnum>.ToInt(ItemEnum.FLOWER_RED_ROSE);
+ for (int i = 0; i < base.uiBehaviour.m_ReplayBgList.Count; i++)
+ {
+ base.uiBehaviour.m_ReplayBgList[i].SetActive(i == num);
+ }
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ base.uiBehaviour.m_Close.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnCloseClicked));
+ base.uiBehaviour.m_Voice.RegisterPressEventHandler(new ButtonPressEventHandler(this.OnVoicePressButton));
+ base.uiBehaviour.m_Voice.RegisterDragEventHandler(new ButtonDragEventHandler(this.OnVoiceDragButton));
+ base.uiBehaviour.m_QuickThx.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnReplyClicked));
+ }
+
+ private bool OnReplyClicked(IXUIButton button)
+ {
+ DlgBase<XChatView, XChatBehaviour>.singleton.ChatFriendId = this._senderID;
+ ChatInfo chatInfo = new ChatInfo();
+ chatInfo.mTime = DateTime.Now;
+ chatInfo.isSelfSender = true;
+ chatInfo.mReceiverName = this._senderName;
+ chatInfo.mReceiverId = this._senderID;
+ chatInfo.mReciverPowerPoint = (uint)this._senderPower;
+ chatInfo.mRecieverProfession = (uint)this._senderProfession;
+ chatInfo.mReceiverVip = (uint)this._senderVip;
+ XChatDocument specificDocument = XDocuments.GetSpecificDocument<XChatDocument>(XChatDocument.uuID);
+ specificDocument.AddChatinfo2FriendList(chatInfo);
+ DlgBase<XChatView, XChatBehaviour>.singleton.SendChatContent(XStringDefineProxy.GetString("FLOWER_QUICK_THX"), ChatChannelType.Friends, true, null, false, 0UL, 0f, false, false);
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString("INVITATION_SENT_NOTIFICATION"), "fece00");
+ this.CloseDlg();
+ return true;
+ }
+
+ private void CloseDlg()
+ {
+ this.SetVisibleWithAnimation(false, null);
+ }
+
+ protected override void OnHide()
+ {
+ base.OnHide();
+ bool flag = this.OnClosed != null;
+ if (flag)
+ {
+ this.OnClosed();
+ }
+ }
+
+ private void OnCloseClicked(IXUISprite go)
+ {
+ this.CloseDlg();
+ }
+
+ private void OnVoicePressButton(IXUIButton button, bool state)
+ {
+ if (state)
+ {
+ this.m_DragDistance = Vector2.zero;
+ bool useApollo = XChatDocument.UseApollo;
+ if (useApollo)
+ {
+ XSingleton<XChatApolloMgr>.singleton.StartRecord(VoiceUsage.FLOWER_REPLY, null);
+ }
+ else
+ {
+ XSingleton<XChatIFlyMgr>.singleton.StartRecord(VoiceUsage.FLOWER_REPLY, null);
+ }
+ }
+ else
+ {
+ DlgBase<XChatView, XChatBehaviour>.singleton.ChatFriendId = this._senderID;
+ ChatInfo chatInfo = new ChatInfo();
+ chatInfo.mTime = DateTime.Now;
+ chatInfo.isSelfSender = true;
+ chatInfo.mReceiverName = this._senderName;
+ chatInfo.mReceiverId = this._senderID;
+ chatInfo.mReciverPowerPoint = (uint)this._senderPower;
+ chatInfo.mRecieverProfession = (uint)this._senderProfession;
+ chatInfo.mReceiverVip = (uint)this._senderVip;
+ XChatDocument specificDocument = XDocuments.GetSpecificDocument<XChatDocument>(XChatDocument.uuID);
+ specificDocument.AddChatinfo2FriendList(chatInfo);
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString("INVITATION_SENT_NOTIFICATION"), "fece00");
+ bool useApollo2 = XChatDocument.UseApollo;
+ if (useApollo2)
+ {
+ XSingleton<XChatApolloMgr>.singleton.StopRecord(this.m_CancelRecord);
+ }
+ else
+ {
+ XSingleton<XChatIFlyMgr>.singleton.StopRecord(this.m_CancelRecord);
+ }
+ bool flag = !this.m_CancelRecord;
+ if (flag)
+ {
+ this.CloseDlg();
+ }
+ }
+ }
+
+ private void OnVoiceDragButton(IXUIButton button, Vector2 delta)
+ {
+ this.m_DragDistance += delta;
+ bool flag = this.m_DragDistance.magnitude >= 100f;
+ if (flag)
+ {
+ this.m_CancelRecord = true;
+ }
+ else
+ {
+ this.m_CancelRecord = false;
+ }
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/XFlowerReplyView.cs.meta b/Client/Assets/Scripts/XMainClient/UI/XFlowerReplyView.cs.meta
new file mode 100644
index 00000000..33b6a4da
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XFlowerReplyView.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: a56d66b921d2ce54fbafa2ef4a9e3fc0
+timeCreated: 1611404286
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/XFpStrengthenView.cs b/Client/Assets/Scripts/XMainClient/UI/XFpStrengthenView.cs
new file mode 100644
index 00000000..c0afae81
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XFpStrengthenView.cs
@@ -0,0 +1,469 @@
+using System;
+using System.Collections.Generic;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class XFpStrengthenView : DlgBase<XFpStrengthenView, XFPStrengthenBehaviour>
+ {
+ public override string fileName
+ {
+ get
+ {
+ return "GameSystem/FpStrengthenDlg";
+ }
+ }
+
+ public override int group
+ {
+ get
+ {
+ return 1;
+ }
+ }
+
+ public override bool autoload
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override bool hideMainMenu
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override bool fullscreenui
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override bool pushstack
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ private XFPStrengthenDocument _doc = null;
+
+ public XUIPool m_FpStrengthenPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ public XUIPool m_FpButtonPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ private Dictionary<FunctionDef, IXUICheckBox> m_checkBoxDic = new Dictionary<FunctionDef, IXUICheckBox>();
+
+ private Dictionary<FunctionDef, XTuple<GameObject, GameObject>> m_tabReddot = new Dictionary<FunctionDef, XTuple<GameObject, GameObject>>();
+
+ private FunctionDef _curFunctionEnum = FunctionDef.ZHANLI;
+
+ private FunctionDef _defFunctionEnum = FunctionDef.END;
+
+ private bool _isFirst = true;
+
+ private bool _isFromShow = false;
+
+ protected override void Init()
+ {
+ this._doc = XDocuments.GetSpecificDocument<XFPStrengthenDocument>(XFPStrengthenDocument.uuID);
+ this._doc.StrengthenView = this;
+ this.m_FpStrengthenPool.SetupPool(base.uiBehaviour.m_tabParentGo, base.uiBehaviour.m_tabParentGo.transform.Find("template").gameObject, XFPStrengthenBehaviour.FUNCTION_NUM, false);
+ Transform transform = base.uiBehaviour.transform.Find("Bg/Content/Panel");
+ this.m_FpButtonPool.SetupPool(transform.gameObject, transform.Find("template").gameObject, 20u, false);
+ }
+
+ public override void RegisterEvent()
+ {
+ base.uiBehaviour.m_Close.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnCloseClicked));
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ base.uiBehaviour.m_Scroll.SetPosition(0f);
+ this.InitLeftViews();
+ this.FillTopContent();
+ bool flag = !this.m_checkBoxDic.ContainsKey(this._curFunctionEnum);
+ if (flag)
+ {
+ this._curFunctionEnum = this._defFunctionEnum;
+ }
+ this._isFromShow = true;
+ this._doc.RequsetFightNum();
+ this.m_checkBoxDic[this._curFunctionEnum].bChecked = true;
+ }
+
+ protected override void OnHide()
+ {
+ base.OnHide();
+ this.m_FpStrengthenPool.ReturnAll(false);
+ bool flag = this.m_checkBoxDic != null;
+ if (flag)
+ {
+ foreach (KeyValuePair<FunctionDef, IXUICheckBox> keyValuePair in this.m_checkBoxDic)
+ {
+ bool flag2 = keyValuePair.Value != null;
+ if (flag2)
+ {
+ keyValuePair.Value.ForceSetFlag(false);
+ }
+ }
+ }
+ this.m_tabReddot.Clear();
+ base.uiBehaviour.m_RateTex.SetTexturePath("");
+ }
+
+ protected override void OnUnload()
+ {
+ this.m_checkBoxDic.Clear();
+ this._doc = null;
+ base.OnUnload();
+ }
+
+ public override void StackRefresh()
+ {
+ base.uiBehaviour.m_Scroll.SetPosition(0f);
+ this.FillTopContent();
+ this._doc.RequsetFightNum();
+ }
+
+ public void ShowContent(FunctionDef fun = FunctionDef.ZHANLI)
+ {
+ bool flag = !XSingleton<XGameSysMgr>.singleton.IsSystemOpened(XSysDefine.XSys_Strong);
+ if (!flag)
+ {
+ this._curFunctionEnum = fun;
+ bool flag2 = !base.IsVisible();
+ if (flag2)
+ {
+ this.SetVisible(true, true);
+ }
+ }
+ }
+
+ public void RefreshUi(bool isFromMes)
+ {
+ bool flag = this._curFunctionEnum == FunctionDef.ZHANLI;
+ if (flag)
+ {
+ this.m_FpButtonPool.ReturnAll(false);
+ this.FillStrengthenContent();
+ this.RefreshTabRedDot();
+ bool flag2 = !this._isFromShow;
+ if (flag2)
+ {
+ this._doc.CancleNew(XFastEnumIntEqualityComparer<FunctionDef>.ToInt(this._curFunctionEnum));
+ }
+ else
+ {
+ this._isFromShow = false;
+ if (isFromMes)
+ {
+ this._doc.CancleNew(XFastEnumIntEqualityComparer<FunctionDef>.ToInt(this._curFunctionEnum));
+ }
+ }
+ }
+ }
+
+ public void RefreshTabRedDot()
+ {
+ bool flag = this.m_tabReddot == null || this.m_tabReddot.Count == 0;
+ if (!flag)
+ {
+ foreach (KeyValuePair<FunctionDef, XTuple<GameObject, GameObject>> keyValuePair in this.m_tabReddot)
+ {
+ bool flag2 = keyValuePair.Value != null;
+ if (flag2)
+ {
+ bool flag3 = keyValuePair.Key == FunctionDef.ZHANLI;
+ if (flag3)
+ {
+ bool tabNew = this._doc.GetTabNew(XFastEnumIntEqualityComparer<FunctionDef>.ToInt(keyValuePair.Key));
+ bool flag4 = tabNew;
+ if (flag4)
+ {
+ keyValuePair.Value.Item1.SetActive(true);
+ keyValuePair.Value.Item2.SetActive(false);
+ }
+ else
+ {
+ keyValuePair.Value.Item1.SetActive(false);
+ keyValuePair.Value.Item2.SetActive(this._doc.NeedUp);
+ }
+ }
+ else
+ {
+ keyValuePair.Value.Item1.SetActive(this._doc.GetTabNew(XFastEnumIntEqualityComparer<FunctionDef>.ToInt(keyValuePair.Key)));
+ keyValuePair.Value.Item2.SetActive(false);
+ }
+ }
+ }
+ }
+ }
+
+ private void InitLeftViews()
+ {
+ string @string = XStringDefineProxy.GetString("BQ_TITLE_STRING");
+ string[] array = @string.Split(new char[]
+ {
+ '|'
+ });
+ int num = 0;
+ this._defFunctionEnum = FunctionDef.END;
+ this.m_checkBoxDic.Clear();
+ this.m_tabReddot.Clear();
+ for (int i = 0; i < array.Length; i++)
+ {
+ bool flag = this.GetFuncNum(FunctionDef.ZHANLI + i) == 0;
+ if (!flag)
+ {
+ GameObject gameObject = this.m_FpStrengthenPool.FetchGameObject(false);
+ gameObject.transform.parent = base.uiBehaviour.m_tabParentGo.transform;
+ gameObject.transform.localScale = Vector3.one;
+ gameObject.transform.localPosition = new Vector3(this.m_FpStrengthenPool.TplPos.x, this.m_FpStrengthenPool.TplPos.y - (float)(num * this.m_FpStrengthenPool.TplHeight), this.m_FpStrengthenPool.TplPos.z);
+ this.InitTabInfo(gameObject.transform.Find("Bg"), array[i], i);
+ num++;
+ }
+ }
+ IXUIScrollView ixuiscrollView = base.uiBehaviour.m_tabParentGo.GetComponent("XUIScrollView") as IXUIScrollView;
+ ixuiscrollView.ResetPosition();
+ }
+
+ private void InitTabInfo(Transform tra, string name, int index)
+ {
+ bool flag = tra == null;
+ if (!flag)
+ {
+ IXUILabel ixuilabel = tra.Find("TextLabel").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel.SetText(name);
+ ixuilabel = (tra.Find("SelectedTextLabel").GetComponent("XUILabel") as IXUILabel);
+ ixuilabel.SetText(name);
+ IXUICheckBox ixuicheckBox = tra.GetComponent("XUICheckBox") as IXUICheckBox;
+ ixuicheckBox.RegisterOnCheckEventHandler(new CheckBoxOnCheckEventHandler(this.SelectStrengthItem));
+ ixuicheckBox.ID = (ulong)((long)(0 + index));
+ this.m_checkBoxDic.Add((FunctionDef)ixuicheckBox.ID, ixuicheckBox);
+ GameObject gameObject = tra.Find("New").gameObject;
+ GameObject gameObject2 = tra.Find("Up").gameObject;
+ this.m_tabReddot.Add((FunctionDef)ixuicheckBox.ID, new XTuple<GameObject, GameObject>(gameObject, gameObject2));
+ bool flag2 = this._defFunctionEnum == FunctionDef.END;
+ if (flag2)
+ {
+ this._defFunctionEnum = (FunctionDef)ixuicheckBox.ID;
+ }
+ }
+ }
+
+ private int GetFuncNum(FunctionDef def)
+ {
+ return this._doc.GetFuncNumByType(XFastEnumIntEqualityComparer<FunctionDef>.ToInt(def));
+ }
+
+ private void FillContentArea(FunctionDef def)
+ {
+ bool flag = def == FunctionDef.ZHANLI;
+ if (flag)
+ {
+ this.RefreshUi(false);
+ }
+ else
+ {
+ this.RefreshTabRedDot();
+ this.m_FpButtonPool.ReturnAll(false);
+ this.FillOtherContent(def);
+ this._doc.CancleNew(XFastEnumIntEqualityComparer<FunctionDef>.ToInt(def));
+ }
+ base.uiBehaviour.m_Scroll.ResetPosition();
+ }
+
+ private void FillTopContent()
+ {
+ uint num = (uint)XSingleton<XAttributeMgr>.singleton.XPlayerData.GetAttr(XAttributeDefine.XAttr_POWER_POINT_Basic);
+ RecommendFightNum.RowData recommendFightData = this._doc.GetRecommendFightData(XSysDefine.XSys_None, -1);
+ uint num2 = 1u;
+ bool flag = recommendFightData == null && XSingleton<XAttributeMgr>.singleton.XPlayerData != null;
+ if (flag)
+ {
+ XSingleton<XDebug>.singleton.AddErrorLog("the data is not find,level = " + XSingleton<XAttributeMgr>.singleton.XPlayerData.Level, null, null, null, null, null);
+ }
+ else
+ {
+ num2 = recommendFightData.Total;
+ }
+ base.uiBehaviour.m_MyFightLab.SetText(num.ToString());
+ base.uiBehaviour.m_RecommendFightLab.SetText(num2.ToString());
+ base.uiBehaviour.m_MyLevelLab.SetText(XSingleton<XAttributeMgr>.singleton.XPlayerData.Level.ToString());
+ int fightPercent = (int)(num / num2 * 100.0);
+ string totalFightRateDes = this._doc.GetTotalFightRateDes(fightPercent);
+ base.uiBehaviour.m_RateTex.SetTexturePath("atlas/UI/GameSystem/Activity/" + totalFightRateDes);
+ }
+
+ private void FillStrengthenContent()
+ {
+ int num = 0;
+ int num2 = 0;
+ for (int i = 0; i < this._doc.StrengthAuxDataList.Count; i++)
+ {
+ StrengthAuxData strengthAuxData = this._doc.StrengthAuxDataList[i];
+ bool flag = strengthAuxData == null || !strengthAuxData.IsShow;
+ if (!flag)
+ {
+ GameObject gameObject = this.m_FpButtonPool.FetchGameObject(true);
+ gameObject.transform.Find("Other").gameObject.SetActive(false);
+ gameObject.transform.localPosition = new Vector3(this.m_FpButtonPool.TplPos.x, this.m_FpButtonPool.TplPos.y - (float)(num * this.m_FpButtonPool.TplHeight), this.m_FpButtonPool.TplPos.z);
+ num++;
+ IXUIButton ixuibutton = gameObject.transform.Find("go").GetComponent("XUIButton") as IXUIButton;
+ ixuibutton.RegisterClickEventHandler(new ButtonClickEventHandler(this.GoToStrengthSys));
+ ixuibutton.ID = (ulong)((long)strengthAuxData.StrengthenData.BQSystem);
+ IXUISprite ixuisprite = gameObject.transform.Find("Sprite").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.SetSprite(strengthAuxData.StrengthenData.BQImageID);
+ bool tabNew = this._doc.GetTabNew(XFastEnumIntEqualityComparer<FunctionDef>.ToInt(this._curFunctionEnum));
+ bool flag2 = tabNew;
+ if (flag2)
+ {
+ bool flag3 = strengthAuxData.StrengthenData != null;
+ if (flag3)
+ {
+ gameObject.transform.Find("New").gameObject.SetActive(this._doc.GetNewStatus(strengthAuxData.StrengthenData.BQID));
+ }
+ else
+ {
+ gameObject.transform.Find("New").gameObject.SetActive(false);
+ }
+ gameObject.transform.Find("Up").gameObject.SetActive(false);
+ }
+ else
+ {
+ gameObject.transform.Find("New").gameObject.SetActive(false);
+ bool flag4 = strengthAuxData.FightPercent < (double)this._doc.ShowUpSprNum && num2 < 2;
+ if (flag4)
+ {
+ num2++;
+ gameObject.transform.Find("Up").gameObject.SetActive(true);
+ }
+ else
+ {
+ gameObject.transform.Find("Up").gameObject.SetActive(false);
+ }
+ }
+ gameObject = gameObject.transform.Find("Strengthen").gameObject;
+ gameObject.SetActive(true);
+ IXUILabel ixuilabel = gameObject.transform.Find("TittleLab").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel.SetText(strengthAuxData.StrengthenData.BQTips);
+ double num3 = strengthAuxData.FightPercent;
+ ixuilabel = (gameObject.transform.Find("RateLab").GetComponent("XUILabel") as IXUILabel);
+ ixuilabel.SetText(this._doc.GetPartFightRateDes(num3));
+ IXUISlider ixuislider = gameObject.transform.Find("Slider").GetComponent("XUISlider") as IXUISlider;
+ num3 = ((num3 > 100.0) ? 100.0 : num3);
+ num3 = ((num3 < 0.0) ? 0.0 : num3);
+ ixuislider.Value = (float)num3 / 100f;
+ }
+ }
+ }
+
+ private void FillOtherContent(FunctionDef def)
+ {
+ List<FpStrengthNew.RowData> strengthByType = this._doc.GetStrengthByType(XFastEnumIntEqualityComparer<FunctionDef>.ToInt(def));
+ for (int i = 0; i < strengthByType.Count; i++)
+ {
+ FpStrengthNew.RowData rowData = strengthByType[i];
+ bool flag = rowData == null;
+ if (!flag)
+ {
+ GameObject gameObject = this.m_FpButtonPool.FetchGameObject(true);
+ gameObject.transform.Find("Strengthen").gameObject.SetActive(false);
+ gameObject.transform.localPosition = new Vector3(this.m_FpButtonPool.TplPos.x, this.m_FpButtonPool.TplPos.y - (float)(i * this.m_FpButtonPool.TplHeight), this.m_FpButtonPool.TplPos.z);
+ IXUIButton ixuibutton = gameObject.transform.Find("go").GetComponent("XUIButton") as IXUIButton;
+ ixuibutton.RegisterClickEventHandler(new ButtonClickEventHandler(this.GoToStrengthSys));
+ ixuibutton.ID = (ulong)((long)rowData.BQSystem);
+ IXUISprite ixuisprite = gameObject.transform.Find("Sprite").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.SetSprite(rowData.BQImageID);
+ gameObject.transform.Find("New").gameObject.SetActive(this._doc.GetNewStatus(rowData.BQID));
+ gameObject.transform.Find("Up").gameObject.SetActive(false);
+ gameObject = gameObject.transform.Find("Other").gameObject;
+ gameObject.SetActive(true);
+ IXUILabel ixuilabel = gameObject.transform.Find("Label").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel.SetText(rowData.BQTips);
+ for (int j = 0; j < 5; j++)
+ {
+ gameObject.transform.Find(j.ToString()).gameObject.SetActive(j < rowData.StarNum);
+ }
+ }
+ }
+ }
+
+ private bool OnCloseClicked(IXUIButton sp)
+ {
+ this.SetVisible(false, true);
+ return true;
+ }
+
+ private bool SelectStrengthItem(IXUICheckBox iXUICheckBox)
+ {
+ FunctionDef functionDef = (FunctionDef)iXUICheckBox.ID;
+ bool bChecked = iXUICheckBox.bChecked;
+ if (bChecked)
+ {
+ bool flag = this._isFirst && functionDef == FunctionDef.ZHANLI;
+ if (flag)
+ {
+ this._isFirst = false;
+ return true;
+ }
+ this._curFunctionEnum = functionDef;
+ this.FillContentArea(functionDef);
+ }
+ return true;
+ }
+
+ public bool GoToStrengthSys(IXUIButton sp)
+ {
+ XSysDefine xsysDefine = (XSysDefine)sp.ID;
+ XSysDefine xsysDefine2 = xsysDefine;
+ if (xsysDefine2 - XSysDefine.XSys_Level_Normal > 1)
+ {
+ if (xsysDefine2 - XSysDefine.XSys_Item_Enchant > 1)
+ {
+ if (xsysDefine2 != XSysDefine.XSys_GuildDailyTask)
+ {
+ XSingleton<XGameSysMgr>.singleton.OpenSystem(xsysDefine, 0UL);
+ }
+ else
+ {
+ XSingleton<UIManager>.singleton.CloseAllUI();
+ XSingleton<XGameSysMgr>.singleton.OpenSystem(xsysDefine, 0UL);
+ }
+ }
+ else
+ {
+ XSingleton<XGameSysMgr>.singleton.OpenSystem(XSysDefine.XSys_Item_Equip, 0UL);
+ }
+ }
+ else
+ {
+ XLevelDocument specificDocument = XDocuments.GetSpecificDocument<XLevelDocument>(XLevelDocument.uuID);
+ bool flag = xsysDefine == XSysDefine.XSys_Level_Normal;
+ if (flag)
+ {
+ specificDocument.AutoGoBattle(0, 0, 0u);
+ }
+ else
+ {
+ specificDocument.AutoGoBattle(0, 0, 1u);
+ }
+ }
+ return true;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/XFpStrengthenView.cs.meta b/Client/Assets/Scripts/XMainClient/UI/XFpStrengthenView.cs.meta
new file mode 100644
index 00000000..a580ee80
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XFpStrengthenView.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 30cf03ac012bfdc4c840717e06adf35b
+timeCreated: 1611403523
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/XFreeTeamLeagueMainBehavior.cs b/Client/Assets/Scripts/XMainClient/UI/XFreeTeamLeagueMainBehavior.cs
new file mode 100644
index 00000000..bc67319a
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XFreeTeamLeagueMainBehavior.cs
@@ -0,0 +1,90 @@
+using System;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class XFreeTeamLeagueMainBehavior : DlgBehaviourBase
+ {
+ public IXUIButton RankBtn;
+
+ public IXUIButton VersusRecordsBtn;
+
+ public IXUIButton FinalResultBtn;
+
+ public IXUIButton CreateTeamBtn;
+
+ public IXUIButton TeamMatchBtn;
+
+ public IXUIButton HonorShopBtn;
+
+ public IXUIButton RankRewardsBtn;
+
+ public IXUIButton TeamQuitBtn;
+
+ public IXUIButton CloseBtn;
+
+ public IXUIButton HelpBtn;
+
+ public IXUILabel TeamNameLabel;
+
+ public IXUILabel TeamScoreLabel;
+
+ public IXUILabel PartInTimesLabel;
+
+ public IXUILabel WinPercentageLabel;
+
+ public IXUILabel ActivityRulesLabel;
+
+ public IXUISprite RankListMask;
+
+ public IXUIWrapContent rankWrapContent;
+
+ public IXUIScrollView rankScrollView;
+
+ public Transform TeamInfoRoot;
+
+ public Transform RankListRoot;
+
+ public Transform RewardsRoot;
+
+ public IXUILabel MyRankLabel;
+
+ public IXUILabel RewardsLeftTimeLabel;
+
+ public IXUILabel MainViewRankLabel;
+
+ public XUIPool MemberUIPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ private void Awake()
+ {
+ this.HonorShopBtn = (base.transform.Find("Bg/TitleBarFrame/BtnShop").GetComponent("XUIButton") as IXUIButton);
+ this.RankBtn = (base.transform.Find("Bg/TitleBarFrame/BtnRank").GetComponent("XUIButton") as IXUIButton);
+ this.VersusRecordsBtn = (base.transform.Find("Bg/TitleBarFrame/BtnChallengeRecord").GetComponent("XUIButton") as IXUIButton);
+ this.FinalResultBtn = (base.transform.Find("Bg/TitleBarFrame/BtnFinalResult").GetComponent("XUIButton") as IXUIButton);
+ this.RankRewardsBtn = (base.transform.Find("Bg/TitleBarFrame/BtnRankReward").GetComponent("XUIButton") as IXUIButton);
+ this.TeamMatchBtn = (base.transform.Find("Bg/BeginMatch").GetComponent("XUIButton") as IXUIButton);
+ this.CreateTeamBtn = (base.transform.Find("Bg/BtnOrganize").GetComponent("XUIButton") as IXUIButton);
+ this.TeamQuitBtn = (base.transform.Find("Bg/BtnQuit").GetComponent("XUIButton") as IXUIButton);
+ this.CloseBtn = (base.transform.Find("Bg/Close").GetComponent("XUIButton") as IXUIButton);
+ this.HelpBtn = (base.transform.Find("Bg/Help").GetComponent("XUIButton") as IXUIButton);
+ this.TeamNameLabel = (base.transform.Find("Bg/TeamInfo/Name/Content").GetComponent("XUILabel") as IXUILabel);
+ this.TeamScoreLabel = (base.transform.Find("Bg/TeamInfo/Score/Content").GetComponent("XUILabel") as IXUILabel);
+ this.PartInTimesLabel = (base.transform.Find("Bg/TeamInfo/Frequency/Content").GetComponent("XUILabel") as IXUILabel);
+ this.WinPercentageLabel = (base.transform.Find("Bg/TeamInfo/Rating/Content").GetComponent("XUILabel") as IXUILabel);
+ this.ActivityRulesLabel = (base.transform.Find("Bg/Intro/rules").GetComponent("XUILabel") as IXUILabel);
+ this.rankScrollView = (base.transform.Find("Bg/RankList/ScrollView").GetComponent("XUIScrollView") as IXUIScrollView);
+ this.rankWrapContent = (base.transform.Find("Bg/RankList/ScrollView/WrapContent").GetComponent("XUIWrapContent") as IXUIWrapContent);
+ this.TeamInfoRoot = base.transform.Find("Bg/TeamInfo");
+ this.RankListRoot = base.transform.Find("Bg/RankList");
+ this.RankListMask = (this.RankListRoot.Find("Mask").GetComponent("XUISprite") as IXUISprite);
+ this.RewardsRoot = base.transform.Find("Bg/Rewards/Root");
+ this.MainViewRankLabel = (base.transform.Find("Bg/TeamInfo/Rank/Content").GetComponent("XUILabel") as IXUILabel);
+ this.MyRankLabel = (this.RankListRoot.Find("BestRank/Text").GetComponent("XUILabel") as IXUILabel);
+ this.RewardsLeftTimeLabel = (this.RankListRoot.Find("LeftTime").GetComponent("XUILabel") as IXUILabel);
+ this.MemberUIPool.SetupPool(base.transform.Find("Bg/TeamList").gameObject, base.transform.Find("Bg/TeamList/MemberTpl").gameObject, 4u, false);
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/XFreeTeamLeagueMainBehavior.cs.meta b/Client/Assets/Scripts/XMainClient/UI/XFreeTeamLeagueMainBehavior.cs.meta
new file mode 100644
index 00000000..d151fb40
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XFreeTeamLeagueMainBehavior.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: c09a28a3a4ef1c54681b0e19ca008565
+timeCreated: 1611404487
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/XFreeTeamLeagueMainView.cs b/Client/Assets/Scripts/XMainClient/UI/XFreeTeamLeagueMainView.cs
new file mode 100644
index 00000000..511e80aa
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XFreeTeamLeagueMainView.cs
@@ -0,0 +1,465 @@
+using System;
+using System.Collections.Generic;
+using KKSG;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class XFreeTeamLeagueMainView : DlgBase<XFreeTeamLeagueMainView, XFreeTeamLeagueMainBehavior>
+ {
+ public override string fileName
+ {
+ get
+ {
+ return "GameSystem/TeamLeague/TeamLeagueMain";
+ }
+ }
+
+ public override int layer
+ {
+ get
+ {
+ return 1;
+ }
+ }
+
+ public override int group
+ {
+ get
+ {
+ return 1;
+ }
+ }
+
+ public override bool autoload
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override bool hideMainMenu
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override bool pushstack
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override bool fullscreenui
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ private XDummy[] _Avatars;
+
+ protected override void Init()
+ {
+ this.InitProperties();
+ this.InitTopRewards();
+ }
+
+ protected override void OnUnload()
+ {
+ base.OnUnload();
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ }
+
+ public override void StackRefresh()
+ {
+ base.StackRefresh();
+ XFreeTeamVersusLeagueDocument.Doc.SendGetLeagueBattleInfo();
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ XFreeTeamVersusLeagueDocument.Doc.SendGetLeagueBattleInfo();
+ this.InitRankRewards();
+ base.uiBehaviour.RankListRoot.gameObject.SetActive(false);
+ }
+
+ protected override void OnHide()
+ {
+ this.ClearState();
+ base.OnHide();
+ }
+
+ public void RefreshUI()
+ {
+ this.UpdateActivityRules();
+ this.UpdateTeamDetailInfo();
+ this.UpdateRoleAvartars();
+ this.UpdateActivityRewards();
+ this.UpdateFinalResultFlag();
+ this.RefreshMyRank();
+ }
+
+ public void ClearState()
+ {
+ base.uiBehaviour.rankWrapContent.SetContentCount(0, false);
+ base.uiBehaviour.MemberUIPool.ReturnAll(false);
+ XSingleton<X3DAvatarMgr>.singleton.EnableMainDummy(false, null);
+ base.Return3DAvatarPool();
+ this.ClearAvatarStates();
+ }
+
+ public void UpdateTeamDetailInfo()
+ {
+ XFreeTeamVersusLeagueDocument doc = XFreeTeamVersusLeagueDocument.Doc;
+ base.uiBehaviour.CreateTeamBtn.gameObject.SetActive(false);
+ base.uiBehaviour.TeamMatchBtn.gameObject.SetActive(doc.TeamLeagueID > 0UL);
+ base.uiBehaviour.TeamQuitBtn.gameObject.SetActive(doc.TeamLeagueID > 0UL);
+ base.uiBehaviour.TeamInfoRoot.gameObject.SetActive(true);
+ bool flag = doc.TeamLeagueID > 0UL;
+ if (flag)
+ {
+ base.uiBehaviour.PartInTimesLabel.SetText(doc.BattledTimes.ToString());
+ base.uiBehaviour.TeamNameLabel.SetText(doc.LeagueTeamName);
+ base.uiBehaviour.TeamScoreLabel.SetText(doc.BattleScore.ToString());
+ base.uiBehaviour.WinPercentageLabel.SetText((int)(doc.BattleWinRate * 100f) + "%");
+ }
+ else
+ {
+ base.uiBehaviour.CreateTeamBtn.gameObject.SetActive(true);
+ base.uiBehaviour.TeamInfoRoot.gameObject.SetActive(false);
+ }
+ }
+
+ public void UpdateRoleAvartars()
+ {
+ base.Return3DAvatarPool();
+ base.Alloc3DAvatarPool("TeamLeagueMain");
+ bool flag = XFreeTeamVersusLeagueDocument.Doc.TeamLeagueID > 0UL;
+ if (flag)
+ {
+ base.uiBehaviour.MemberUIPool.ReturnAll(false);
+ int myTeamMemberCount = XFreeTeamVersusLeagueDocument.Doc.GetMyTeamMemberCount();
+ for (int i = 0; i < myTeamMemberCount; i++)
+ {
+ LeagueTeamDetailInfo myTeamMemberInfoByIndex = XFreeTeamVersusLeagueDocument.Doc.GetMyTeamMemberInfoByIndex(i);
+ GameObject gameObject = base.uiBehaviour.MemberUIPool.FetchGameObject(false);
+ gameObject.transform.localPosition = new Vector3((float)(base.uiBehaviour.MemberUIPool.TplWidth * i), 0f, 0f);
+ this.UpdateTeamMemberInfo(gameObject, myTeamMemberInfoByIndex, i);
+ }
+ }
+ }
+
+ public void RefreshMyRank()
+ {
+ uint myTeamRank = XFreeTeamVersusLeagueDocument.Doc.MyTeamRank;
+ bool flag = myTeamRank == XRankDocument.INVALID_RANK;
+ if (flag)
+ {
+ base.uiBehaviour.MainViewRankLabel.SetText(XSingleton<XStringTable>.singleton.GetString("ARENA_NO_RANK"));
+ }
+ else
+ {
+ base.uiBehaviour.MainViewRankLabel.SetText(string.Format(XStringDefineProxy.GetString("Qualifying_Rank_Reward_Desc1"), myTeamRank + 1u));
+ }
+ bool activeSelf = base.uiBehaviour.RankListRoot.gameObject.activeSelf;
+ if (activeSelf)
+ {
+ bool flag2 = myTeamRank == XRankDocument.INVALID_RANK;
+ if (flag2)
+ {
+ base.uiBehaviour.MyRankLabel.SetText(XSingleton<XStringTable>.singleton.GetString("ARENA_NO_RANK"));
+ }
+ else
+ {
+ base.uiBehaviour.MyRankLabel.SetText(string.Format(XStringDefineProxy.GetString("Qualifying_Rank_Reward_Desc1"), myTeamRank + 1u));
+ }
+ }
+ }
+
+ public override void OnUpdate()
+ {
+ base.OnUpdate();
+ bool activeSelf = base.uiBehaviour.RankListRoot.gameObject.activeSelf;
+ if (activeSelf)
+ {
+ this.SetRewardLeftTime();
+ }
+ }
+
+ private void SetRewardLeftTime()
+ {
+ int rewardsLeftTime = XFreeTeamVersusLeagueDocument.Doc.GetRewardsLeftTime();
+ bool flag = rewardsLeftTime >= 1;
+ if (flag)
+ {
+ base.uiBehaviour.RewardsLeftTimeLabel.gameObject.SetActive(true);
+ bool flag2 = rewardsLeftTime >= 43200;
+ if (flag2)
+ {
+ base.uiBehaviour.RewardsLeftTimeLabel.SetText(XSingleton<UiUtility>.singleton.TimeDuarationFormatString(rewardsLeftTime, 4));
+ }
+ else
+ {
+ base.uiBehaviour.RewardsLeftTimeLabel.SetText(XSingleton<UiUtility>.singleton.TimeDuarationFormatString(rewardsLeftTime, 5));
+ }
+ }
+ else
+ {
+ base.uiBehaviour.RewardsLeftTimeLabel.gameObject.SetActive(false);
+ }
+ }
+
+ private void InitProperties()
+ {
+ this._Avatars = new XDummy[4];
+ base.uiBehaviour.HonorShopBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnShopBtnClicked));
+ base.uiBehaviour.RankBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnRankBtnClicked));
+ base.uiBehaviour.RankRewardsBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnRankRewardsBtnClicked));
+ base.uiBehaviour.VersusRecordsBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnVersusRecordsBtnClicked));
+ base.uiBehaviour.FinalResultBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnFinalResultBtnClicked));
+ base.uiBehaviour.CreateTeamBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnCreateOrMatchClicked));
+ base.uiBehaviour.TeamMatchBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnCreateOrMatchClicked));
+ base.uiBehaviour.TeamQuitBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnQuitTeamLeagueClicked));
+ base.uiBehaviour.CloseBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnCloseBtnClicked));
+ base.uiBehaviour.HelpBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnHelpBtnClicked));
+ base.uiBehaviour.RankListRoot.gameObject.SetActive(true);
+ base.uiBehaviour.rankWrapContent.RegisterItemUpdateEventHandler(new WrapItemUpdateEventHandler(this.UpdateRankRewardsItem));
+ base.uiBehaviour.RankListMask.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnCloseRankList));
+ }
+
+ private void UpdateRankRewardsItem(Transform itemTransform, int index)
+ {
+ LeagueRankReward leagueRankRewardTable = XFreeTeamVersusLeagueDocument.LeagueRankRewardTable;
+ bool flag = index < leagueRankRewardTable.Table.Length;
+ if (flag)
+ {
+ LeagueRankReward.RowData rowData = leagueRankRewardTable.Table[index];
+ IXUISprite ixuisprite = itemTransform.Find("RankImage").GetComponent("XUISprite") as IXUISprite;
+ IXUILabel ixuilabel = itemTransform.Find("Rank").GetComponent("XUILabel") as IXUILabel;
+ bool flag2 = rowData.rank[0] == rowData.rank[1] && rowData.rank[0] <= 3u;
+ if (flag2)
+ {
+ ixuilabel.gameObject.SetActive(false);
+ ixuisprite.gameObject.SetActive(true);
+ ixuisprite.SetSprite(ixuisprite.spriteName.Substring(0, ixuisprite.spriteName.Length - 1) + rowData.rank[0]);
+ }
+ else
+ {
+ ixuilabel.gameObject.SetActive(true);
+ ixuisprite.gameObject.SetActive(false);
+ ixuilabel.SetText(string.Format(XSingleton<XStringTable>.singleton.GetString("LeagueTeamNormalRank"), rowData.rank[0], rowData.rank[1]));
+ }
+ Transform transform = itemTransform.Find("Grid");
+ int childCount = transform.childCount;
+ int count = rowData.reward.Count;
+ int num = Mathf.Min(childCount, count);
+ int i;
+ for (i = 0; i < num; i++)
+ {
+ Transform child = transform.GetChild(i);
+ child.gameObject.SetActive(true);
+ XSingleton<XItemDrawerMgr>.singleton.normalItemDrawer.DrawItem(child.gameObject, (int)rowData.reward[i, 0], (int)rowData.reward[i, 1], false);
+ IXUISprite ixuisprite2 = child.Find("Icon").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite2.ID = (ulong)rowData.reward[i, 0];
+ ixuisprite2.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(XSingleton<UiUtility>.singleton.OnItemClick));
+ }
+ while (i < childCount)
+ {
+ Transform child2 = transform.GetChild(i);
+ child2.gameObject.SetActive(false);
+ i++;
+ }
+ }
+ }
+
+ private bool OnFinalResultBtnClicked(IXUIButton button)
+ {
+ DlgBase<XTeamLeagueFinalResultView, XTeamLeagueFinalResultBehavior>.singleton.SetVisibleWithAnimation(true, null);
+ return true;
+ }
+
+ private bool OnVersusRecordsBtnClicked(IXUIButton button)
+ {
+ bool flag = XFreeTeamVersusLeagueDocument.Doc.TeamLeagueID > 0UL;
+ if (flag)
+ {
+ DlgBase<XTeamLeagueRecordView, XTeamLeagueRecordBehavior>.singleton.SetVisibleWithAnimation(true, null);
+ }
+ else
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XSingleton<XStringTable>.singleton.GetString("CreateLeagueTeamFirst"), "fece00");
+ }
+ return true;
+ }
+
+ private bool OnRankBtnClicked(IXUIButton button)
+ {
+ DlgBase<XTeamLeagueRankView, XTeamLeagueRankBehavior>.singleton.SetVisibleWithAnimation(true, null);
+ XRankDocument specificDocument = XDocuments.GetSpecificDocument<XRankDocument>(XRankDocument.uuID);
+ specificDocument.ReqRankList(XRankType.LeagueTeamRank);
+ return true;
+ }
+
+ private bool OnRankRewardsBtnClicked(IXUIButton button)
+ {
+ base.uiBehaviour.RankListRoot.gameObject.SetActive(true);
+ this.RefreshMyRank();
+ return true;
+ }
+
+ private void OnCloseRankList(IXUISprite uiSprite)
+ {
+ base.uiBehaviour.RankListRoot.gameObject.SetActive(false);
+ }
+
+ private void UpdateActivityRewards()
+ {
+ }
+
+ private void UpdateFinalResultFlag()
+ {
+ IXUILabel ixuilabel = base.uiBehaviour.FinalResultBtn.gameObject.transform.Find("Type").GetComponent("XUILabel") as IXUILabel;
+ string text = (XFreeTeamVersusLeagueDocument.Doc.EliStateType == LeagueEliType.LeagueEliType_Cross) ? XSingleton<XStringTable>.singleton.GetString("LeagueCrossSeverFight") : XSingleton<XStringTable>.singleton.GetString("LeagueEliminationResult");
+ ixuilabel.SetText(text);
+ base.uiBehaviour.FinalResultBtn.gameObject.SetActive(XFreeTeamVersusLeagueDocument.Doc.EliStateType != LeagueEliType.LeagueEliType_None);
+ }
+
+ private void ClearAvatarStates()
+ {
+ for (int i = 0; i < 4; i++)
+ {
+ bool flag = this._Avatars[i] == null;
+ if (!flag)
+ {
+ this._Avatars[i] = null;
+ }
+ }
+ }
+
+ private void UpdateTeamMemberInfo(GameObject obj, LeagueTeamDetailInfo info, int index)
+ {
+ Transform transform = obj.transform.Find("Info");
+ IXUILabel ixuilabel = transform.Find("Name").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel.SetText(info.roleBrief.name);
+ IXUILabel ixuilabel2 = transform.Find("Level").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel2.SetText(info.roleBrief.level.ToString());
+ IXUISprite ixuisprite = transform.Find("ProfIcon").GetComponent("XUISprite") as IXUISprite;
+ int profID = XFastEnumIntEqualityComparer<RoleType>.ToInt(info.roleBrief.profession);
+ ixuisprite.spriteName = XSingleton<XProfessionSkillMgr>.singleton.GetProfIcon(profID);
+ Transform transform2 = transform.Find("Snapshot");
+ IUIDummy snapShot = transform2.GetComponent("UIDummy") as IUIDummy;
+ bool flag = info.roleBrief.roleid == XSingleton<XAttributeMgr>.singleton.XPlayerData.RoleID;
+ if (flag)
+ {
+ XSingleton<X3DAvatarMgr>.singleton.EnableMainDummy(true, snapShot);
+ XSingleton<X3DAvatarMgr>.singleton.ResetMainAnimation();
+ }
+ else
+ {
+ XDummy xdummy = XSingleton<X3DAvatarMgr>.singleton.FindCreateCommonRoleDummy(this.m_dummPool, info.roleBrief.roleid, (uint)XFastEnumIntEqualityComparer<RoleType>.ToInt(info.roleBrief.profession), info.roleBrief.outlook, snapShot, index);
+ this._Avatars[index] = xdummy;
+ }
+ }
+
+ private bool OnCreateOrMatchClicked(IXUIButton btn)
+ {
+ XTeamDocument specificDocument = XDocuments.GetSpecificDocument<XTeamDocument>(XTeamDocument.uuID);
+ XExpeditionDocument specificDocument2 = XDocuments.GetSpecificDocument<XExpeditionDocument>(XExpeditionDocument.uuID);
+ List<ExpeditionTable.RowData> expeditionList = specificDocument2.GetExpeditionList(TeamLevelType.TeamLevelTeamLeague);
+ bool flag = expeditionList.Count > 0;
+ if (flag)
+ {
+ specificDocument.SetAndMatch(expeditionList[0].DNExpeditionID);
+ }
+ return true;
+ }
+
+ private bool OnQuitTeamLeagueClicked(IXUIButton btn)
+ {
+ string @string = XStringDefineProxy.GetString("TEAM_LEAGUE_QUIT_TIP");
+ string string2 = XStringDefineProxy.GetString("COMMON_OK");
+ string string3 = XStringDefineProxy.GetString("COMMON_CANCEL");
+ DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.SetVisible(true, true);
+ DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.SetSingleButtonMode(false);
+ DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.SetLabelsWithSymbols(@string, string2, string3);
+ DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.SetModalCallback(new ButtonClickEventHandler(this.OnEnsureQuitTeamLeague), null);
+ return true;
+ }
+
+ private bool OnEnsureQuitTeamLeague(IXUIButton btn)
+ {
+ DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.SetVisible(false, true);
+ XFreeTeamVersusLeagueDocument specificDocument = XDocuments.GetSpecificDocument<XFreeTeamVersusLeagueDocument>(XFreeTeamVersusLeagueDocument.uuID);
+ specificDocument.ReqLeaveTeamLeague();
+ return true;
+ }
+
+ private bool OnCloseBtnClicked(IXUIButton btn)
+ {
+ this.SetVisibleWithAnimation(false, null);
+ return true;
+ }
+
+ private bool OnHelpBtnClicked(IXUIButton btn)
+ {
+ DlgBase<XCommonHelpTipView, XCommonHelpTipBehaviour>.singleton.ShowHelp(XSysDefine.XSys_TeamLeague);
+ return true;
+ }
+
+ private bool OnShopBtnClicked(IXUIButton btn)
+ {
+ DlgBase<MallSystemDlg, MallSystemBehaviour>.singleton.ShowShopSystem(XSysDefine.XSys_Mall_Honer, 0UL);
+ return true;
+ }
+
+ private void InitRankRewards()
+ {
+ base.uiBehaviour.RankListRoot.gameObject.SetActive(true);
+ LeagueRankReward leagueRankRewardTable = XFreeTeamVersusLeagueDocument.LeagueRankRewardTable;
+ base.uiBehaviour.rankWrapContent.SetContentCount(leagueRankRewardTable.Table.Length, false);
+ base.uiBehaviour.rankScrollView.ResetPosition();
+ }
+
+ private void UpdateActivityRules()
+ {
+ base.uiBehaviour.ActivityRulesLabel.SetText(XSingleton<UiUtility>.singleton.ReplaceReturn(XFreeTeamVersusLeagueDocument.Doc.GetOpenInstructionString()));
+ }
+
+ private void InitTopRewards()
+ {
+ SeqList<int> sequenceList = XSingleton<XGlobalConfig>.singleton.GetSequenceList("LeagueTeamRewards", true);
+ int i = 0;
+ int num = Mathf.Min(base.uiBehaviour.RewardsRoot.childCount, (int)sequenceList.Count);
+ while (i < num)
+ {
+ GameObject gameObject = base.uiBehaviour.RewardsRoot.GetChild(i).gameObject;
+ gameObject.SetActive(true);
+ XSingleton<XItemDrawerMgr>.singleton.normalItemDrawer.DrawItem(gameObject, sequenceList[i, 0], sequenceList[i, 1], false);
+ IXUISprite ixuisprite = gameObject.transform.Find("Icon").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.ID = (ulong)((long)sequenceList[i, 0]);
+ ixuisprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(XSingleton<UiUtility>.singleton.OnItemClick));
+ i++;
+ }
+ while (i < base.uiBehaviour.RewardsRoot.childCount)
+ {
+ base.uiBehaviour.RewardsRoot.GetChild(i).gameObject.SetActive(false);
+ i++;
+ }
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/XFreeTeamLeagueMainView.cs.meta b/Client/Assets/Scripts/XMainClient/UI/XFreeTeamLeagueMainView.cs.meta
new file mode 100644
index 00000000..af4744fe
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XFreeTeamLeagueMainView.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 37871ea0414458642832af5d44e46c96
+timeCreated: 1611403566
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/XFriendsRankHandler.cs b/Client/Assets/Scripts/XMainClient/UI/XFriendsRankHandler.cs
new file mode 100644
index 00000000..301b94b7
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XFriendsRankHandler.cs
@@ -0,0 +1,491 @@
+using System;
+using System.Collections.Generic;
+using KKSG;
+using MiniJSON;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUpdater;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class XFriendsRankHandler : DlgHandlerBase
+ {
+ public IXUIScrollView m_ScrollView;
+
+ public IXUIWrapContent m_WrapContent;
+
+ public Transform m_MyRank;
+
+ public Transform m_NoFriend;
+
+ public IXUIButton m_PkHelpBtn;
+
+ public IXUILabel m_PkHelpLabel;
+
+ private Dictionary<Transform, string> rankItemDict = new Dictionary<Transform, string>();
+
+ public Dictionary<Transform, IXUITexture> _WrapTextureList = new Dictionary<Transform, IXUITexture>();
+
+ private string m_noticeFriendOpenID;
+
+ protected override void Init()
+ {
+ base.Init();
+ this.m_ScrollView = (base.PanelObject.transform.Find("FriendsList").GetComponent("XUIScrollView") as IXUIScrollView);
+ this.m_WrapContent = (base.PanelObject.transform.Find("FriendsList/Friendname").GetComponent("XUIWrapContent") as IXUIWrapContent);
+ this.m_MyRank = base.PanelObject.transform.Find("Myname/Tpl");
+ this.m_MyRank.gameObject.SetActive(false);
+ this.m_NoFriend = base.PanelObject.transform.Find("NoFriend");
+ this.m_PkHelpBtn = (base.PanelObject.transform.Find("T3/Help").GetComponent("XUIButton") as IXUIButton);
+ this.m_PkHelpLabel = (base.PanelObject.transform.Find("T3/Content").GetComponent("XUILabel") as IXUILabel);
+ this.m_PkHelpLabel.gameObject.SetActive(false);
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ this.m_WrapContent.RegisterItemUpdateEventHandler(new WrapItemUpdateEventHandler(this._RankWrapListUpdated));
+ this.m_PkHelpBtn.RegisterPressEventHandler(new ButtonPressEventHandler(this.OnHelpBtnPress));
+ }
+
+ private void OnHelpBtnPress(IXUIButton btn, bool state)
+ {
+ bool flag = this.m_PkHelpLabel.gameObject.activeInHierarchy != state;
+ if (flag)
+ {
+ this.m_PkHelpLabel.gameObject.SetActive(state);
+ }
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ this.m_WrapContent.InitContent();
+ this.RefreshRankList();
+ this.m_PkHelpLabel.SetText(XSingleton<UiUtility>.singleton.ReplaceReturn(XStringDefineProxy.GetString("FRIEND_PK")));
+ this.m_PkHelpBtn.SetVisible(XSingleton<XGameSysMgr>.singleton.IsSystemOpened(XSysDefine.XSys_Friends_Pk));
+ }
+
+ protected override void OnHide()
+ {
+ base.OnHide();
+ this.rankItemDict.Clear();
+ this.ClearPreTabTextures();
+ }
+
+ public void ClearPreTabTextures()
+ {
+ foreach (KeyValuePair<Transform, IXUITexture> keyValuePair in this._WrapTextureList)
+ {
+ IXUITexture value = keyValuePair.Value;
+ value.ID = 0UL;
+ value.SetRuntimeTex(null, true);
+ }
+ this._WrapTextureList.Clear();
+ }
+
+ public void RefreshRankList()
+ {
+ bool flag = !base.IsVisible();
+ if (!flag)
+ {
+ this.rankItemDict.Clear();
+ XFriendsDocument specificDocument = XDocuments.GetSpecificDocument<XFriendsDocument>(XFriendsDocument.uuID);
+ bool flag2 = specificDocument.PlatFriendsRankList != null;
+ if (flag2)
+ {
+ XSingleton<XDebug>.singleton.AddLog("FriendsRank RefreshRankList doc.PlatFriendsRankList != null", null, null, null, null, null, XDebugColor.XDebug_None);
+ this.m_WrapContent.SetContentCount(specificDocument.PlatFriendsRankList.Count, false);
+ }
+ bool flag3 = specificDocument.SelfPlatRankInfo != null;
+ if (flag3)
+ {
+ XSingleton<XDebug>.singleton.AddLog("FriendsRank RefreshRankList doc.SelfPlatRankInfo != null", null, null, null, null, null, XDebugColor.XDebug_None);
+ this.SetMyRankInfo(specificDocument.SelfPlatRankInfo);
+ }
+ this.m_MyRank.gameObject.SetActive(specificDocument.SelfPlatRankInfo != null);
+ this.m_NoFriend.gameObject.SetActive(specificDocument.PlatFriendsRankList == null || specificDocument.PlatFriendsRankList.Count == 0);
+ this.m_ScrollView.ResetPosition();
+ }
+ }
+
+ private string SimplifyString(string s)
+ {
+ s = this.RemoveEmoji(s);
+ int num = 8;
+ bool flag = s.Length > num;
+ string result;
+ if (flag)
+ {
+ int num2 = s.Length - num;
+ string text = s.Substring(0, num / 2);
+ text = XSingleton<XCommon>.singleton.StringCombine(text, "...", s.Substring(num / 2 + num2));
+ result = text;
+ }
+ else
+ {
+ result = s;
+ }
+ return result;
+ }
+
+ private string RemoveEmoji(string s)
+ {
+ char[] array = s.ToCharArray();
+ List<char> list = new List<char>();
+ int i = 0;
+ while (i < array.Length - 1)
+ {
+ char c = array[i];
+ int num = (int)c;
+ bool flag = num == 55356;
+ if (flag)
+ {
+ char c2 = array[i + 1];
+ i += 2;
+ }
+ else
+ {
+ bool flag2 = num == 55357;
+ if (flag2)
+ {
+ char c2 = array[i + 1];
+ i += 2;
+ }
+ else
+ {
+ list.Add(array[i]);
+ i++;
+ }
+ }
+ }
+ bool flag3 = i == array.Length - 1;
+ if (flag3)
+ {
+ list.Add(array[i]);
+ }
+ return new string(list.ToArray());
+ }
+
+ private void SetBaseRankInfo(Transform item, PlatFriendRankInfo2Client rankInfo, int index)
+ {
+ bool flag = rankInfo == null;
+ if (!flag)
+ {
+ this.SetRank(item.gameObject, rankInfo.rank - 1u);
+ IXUILabel ixuilabel = item.Find("Name").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel.SetText(this.SimplifyString(rankInfo.platfriendBaseInfo.nickname));
+ IXUILabel ixuilabel2 = item.Find("Level").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel2.SetText(string.Format("Lv.{0}", rankInfo.level));
+ IXUILabel ixuilabel3 = item.Find("Value").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel3.SetText(rankInfo.maxAbility.ToString());
+ IXUILabel ixuilabel4 = item.Find("vip").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel4.SetText(rankInfo.vipLevel.ToString());
+ ixuilabel4.SetVisible(false);
+ IXUISprite ixuisprite = item.Find("headboard").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.SetSprite(XSingleton<XProfessionSkillMgr>.singleton.GetProfHeadIcon2(rankInfo.profession));
+ IXUISprite spr = item.Find("headboard/AvatarFrame").GetComponent("XUISprite") as IXUISprite;
+ XSingleton<UiUtility>.singleton.ParseHeadIcon((rankInfo.pre == null) ? new List<uint>() : rankInfo.pre.setid, spr);
+ IXUITexture ixuitexture = item.Find("platHead").GetComponent("XUITexture") as IXUITexture;
+ string bigpic = rankInfo.platfriendBaseInfo.bigpic;
+ XSingleton<XUICacheImage>.singleton.Load((bigpic != "") ? bigpic : string.Empty, ixuitexture, DlgBase<XFriendsView, XFriendsBehaviour>.singleton.uiBehaviour);
+ IXUISprite ixuisprite2 = item.Find("onling").GetComponent("XUISprite") as IXUISprite;
+ string sprite = rankInfo.isOnline ? "l_online_01" : "l_online_02";
+ ixuisprite2.SetSprite(sprite);
+ this._WrapTextureList[item] = ixuitexture;
+ }
+ }
+
+ private void SetMyRankInfo(PlatFriendRankInfo2Client rankInfo)
+ {
+ this.SetBaseRankInfo(this.m_MyRank, rankInfo, 99999);
+ GameObject gameObject = this.m_MyRank.Find("OutOfRange").gameObject;
+ gameObject.SetActive(rankInfo.rank == XFlowerRankDocument.INVALID_RANK);
+ GameObject gameObject2 = this.m_MyRank.Find("platHead/QQVIP").gameObject;
+ GameObject gameObject3 = this.m_MyRank.Find("platHead/QQSVIP").gameObject;
+ XPlatformAbilityDocument specificDocument = XDocuments.GetSpecificDocument<XPlatformAbilityDocument>(XPlatformAbilityDocument.uuID);
+ bool flag = specificDocument.QQVipInfo == null;
+ if (flag)
+ {
+ gameObject2.SetActive(false);
+ gameObject3.SetActive(false);
+ }
+ else
+ {
+ gameObject3.SetActive(specificDocument.QQVipInfo.is_svip);
+ gameObject2.SetActive(!specificDocument.QQVipInfo.is_svip && specificDocument.QQVipInfo.is_vip);
+ }
+ IXUISprite ixuisprite = this.m_MyRank.Find("wxLaunch").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnClickWXGameCenterLaunchIcon));
+ ixuisprite.SetVisible(XSingleton<XLoginDocument>.singleton.GetLaunchTypeServerInfo() == StartUpType.StartUp_WX && XSingleton<XLoginDocument>.singleton.Channel == XAuthorizationChannel.XAuthorization_WeChat);
+ IXUISprite ixuisprite2 = this.m_MyRank.Find("qqLaunch").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite2.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnClickQQGameCenterLaunchIcon));
+ ixuisprite2.SetVisible(XSingleton<XLoginDocument>.singleton.GetLaunchTypeServerInfo() == StartUpType.StartUp_QQ && XSingleton<XLoginDocument>.singleton.Channel == XAuthorizationChannel.XAuthorization_QQ);
+ }
+
+ private void _RankWrapListUpdated(Transform item, int index)
+ {
+ XFriendsDocument specificDocument = XDocuments.GetSpecificDocument<XFriendsDocument>(XFriendsDocument.uuID);
+ bool flag = index >= specificDocument.PlatFriendsRankList.Count;
+ if (!flag)
+ {
+ PlatFriendRankInfo2Client platFriendRankInfo2Client = specificDocument.PlatFriendsRankList[index];
+ bool flag2 = platFriendRankInfo2Client == null;
+ if (!flag2)
+ {
+ this.rankItemDict[item] = platFriendRankInfo2Client.platfriendBaseInfo.openid;
+ this.SetBaseRankInfo(item, platFriendRankInfo2Client, index);
+ IXUIButton ixuibutton = item.Find("BtnSend").GetComponent("XUIButton") as IXUIButton;
+ IXUILabel ixuilabel = item.Find("BtnSend/t").GetComponent("XUILabel") as IXUILabel;
+ ixuibutton.ID = (ulong)((long)index);
+ ixuibutton.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnSendBtnClicked));
+ ixuibutton.SetEnable(!platFriendRankInfo2Client.hasGiveGift, false);
+ ixuilabel.SetEnabled(!platFriendRankInfo2Client.hasGiveGift);
+ ixuibutton.SetVisible(platFriendRankInfo2Client.platfriendBaseInfo.openid != XSingleton<XLoginDocument>.singleton.OpenID);
+ IXUIButton ixuibutton2 = item.Find("BtnPk").GetComponent("XUIButton") as IXUIButton;
+ ixuibutton2.ID = (ulong)((long)index);
+ ixuibutton2.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnSendPkBtnClicked));
+ bool flag3 = XSingleton<XGameSysMgr>.singleton.IsSystemOpened(XSysDefine.XSys_Friends_Pk);
+ if (flag3)
+ {
+ ixuibutton2.SetVisible(platFriendRankInfo2Client.platfriendBaseInfo.openid != XSingleton<XLoginDocument>.singleton.OpenID);
+ }
+ else
+ {
+ ixuibutton2.SetVisible(false);
+ }
+ GameObject gameObject = item.Find("platHead/QQVIP").gameObject;
+ GameObject gameObject2 = item.Find("platHead/QQSVIP").gameObject;
+ QQVipType qqvipType;
+ bool flag4 = specificDocument.FriendsVipInfo.TryGetValue(platFriendRankInfo2Client.platfriendBaseInfo.openid, out qqvipType);
+ if (flag4)
+ {
+ gameObject2.SetActive(qqvipType == QQVipType.SVip);
+ gameObject.SetActive(qqvipType == QQVipType.Vip);
+ }
+ else
+ {
+ gameObject2.SetActive(false);
+ gameObject.SetActive(false);
+ }
+ IXUISprite ixuisprite = item.Find("wxLaunch").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.SetVisible(platFriendRankInfo2Client.startType == 3);
+ ixuisprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnClickWXGameCenterLaunchIcon));
+ IXUISprite ixuisprite2 = item.Find("qqLaunch").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite2.SetVisible(platFriendRankInfo2Client.startType == 2);
+ ixuisprite2.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnClickQQGameCenterLaunchIcon));
+ }
+ }
+ }
+
+ private void OnClickWXGameCenterLaunchIcon(IXUISprite btn)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XSingleton<XStringTable>.singleton.GetString("FriendRankWXGameCenterTip"), "fece00");
+ }
+
+ private void OnClickQQGameCenterLaunchIcon(IXUISprite btn)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XSingleton<XStringTable>.singleton.GetString("FriendRankQQGameCenterTip"), "fece00");
+ }
+
+ private void SetRank(GameObject go, uint rankIndex)
+ {
+ IXUILabel ixuilabel = go.transform.Find("Rank").GetComponent("XUILabel") as IXUILabel;
+ IXUISprite ixuisprite = go.transform.Find("RankImage").GetComponent("XUISprite") as IXUISprite;
+ bool flag = rankIndex == XRankDocument.INVALID_RANK;
+ if (flag)
+ {
+ ixuilabel.SetVisible(false);
+ ixuisprite.SetVisible(false);
+ }
+ else
+ {
+ string[] array = new string[]
+ {
+ "N1",
+ "N2",
+ "N3"
+ };
+ bool flag2 = rankIndex < 3u;
+ if (flag2)
+ {
+ ixuisprite.SetSprite(array[(int)rankIndex]);
+ ixuisprite.SetVisible(true);
+ ixuilabel.SetVisible(false);
+ }
+ else
+ {
+ ixuisprite.SetVisible(false);
+ ixuilabel.SetText("No." + (rankIndex + 1u));
+ ixuilabel.SetVisible(true);
+ }
+ }
+ }
+
+ private bool OnSendBtnClicked(IXUIButton btn)
+ {
+ int num = (int)btn.ID;
+ XFriendsDocument specificDocument = XDocuments.GetSpecificDocument<XFriendsDocument>(XFriendsDocument.uuID);
+ bool flag = num >= specificDocument.PlatFriendsRankList.Count;
+ bool result;
+ if (flag)
+ {
+ result = false;
+ }
+ else
+ {
+ PlatFriendRankInfo2Client platFriendRankInfo2Client = specificDocument.PlatFriendsRankList[num];
+ bool flag2 = platFriendRankInfo2Client == null;
+ if (flag2)
+ {
+ result = false;
+ }
+ else
+ {
+ specificDocument.SendGift2PlatFriend(platFriendRankInfo2Client.platfriendBaseInfo.openid);
+ result = true;
+ }
+ }
+ return result;
+ }
+
+ private bool OnSendPkBtnClicked(IXUIButton btn)
+ {
+ int num = (int)btn.ID;
+ XFriendsDocument specificDocument = XDocuments.GetSpecificDocument<XFriendsDocument>(XFriendsDocument.uuID);
+ bool flag = num >= specificDocument.PlatFriendsRankList.Count;
+ bool result;
+ if (flag)
+ {
+ result = false;
+ }
+ else
+ {
+ PlatFriendRankInfo2Client platFriendRankInfo2Client = specificDocument.PlatFriendsRankList[num];
+ bool flag2 = platFriendRankInfo2Client == null;
+ if (flag2)
+ {
+ result = false;
+ }
+ else
+ {
+ specificDocument.SendPk2PlatFriend(platFriendRankInfo2Client.platfriendBaseInfo.openid);
+ result = true;
+ }
+ }
+ return result;
+ }
+
+ private void ShareToQQFriend(string openID)
+ {
+ Dictionary<string, object> dictionary = new Dictionary<string, object>();
+ dictionary["act"] = 1;
+ dictionary["openId"] = openID;
+ dictionary["title"] = XSingleton<XGlobalConfig>.singleton.GetValue("PlatFriendShareTitle");
+ dictionary["summary"] = XSingleton<XGlobalConfig>.singleton.GetValue("PlatFriendShareSummary");
+ dictionary["targetUrl"] = XSingleton<XGlobalConfig>.singleton.GetValue("PlatFriendShareTargetUrlQQ");
+ dictionary["imageUrl"] = XSingleton<XGlobalConfig>.singleton.GetValue("PlatFriendShareImageUrlQQ");
+ dictionary["previewText"] = XSingleton<XGlobalConfig>.singleton.GetValue("PlatFriendSharePreviewTextQQ");
+ dictionary["gameTag"] = "MSG_HEART_SEND";
+ string text = Json.Serialize(dictionary);
+ XSingleton<XDebug>.singleton.AddLog("ShareToQQFriend paramStr = " + text, null, null, null, null, null, XDebugColor.XDebug_None);
+ XSingleton<XUpdater.XUpdater>.singleton.XPlatform.SendExtDara("share_send_to_friend_qq", text);
+ }
+
+ private void ShareToWXFriend(string openID)
+ {
+ Dictionary<string, object> dictionary = new Dictionary<string, object>();
+ dictionary["openId"] = openID;
+ dictionary["title"] = XSingleton<XGlobalConfig>.singleton.GetValue("PlatFriendShareTitle");
+ dictionary["description"] = XSingleton<XGlobalConfig>.singleton.GetValue("PlatFriendShareSummary");
+ dictionary["thumbMediaId"] = "";
+ dictionary["mediaTagName"] = "MSG_HEART_SEND";
+ dictionary["messageExt"] = "ShareWithWeixin";
+ string text = Json.Serialize(dictionary);
+ XSingleton<XDebug>.singleton.AddLog("ShareToWXFriend paramStr = " + text, null, null, null, null, null, XDebugColor.XDebug_None);
+ XSingleton<XUpdater.XUpdater>.singleton.XPlatform.SendExtDara("share_send_to_friend_wx", text);
+ }
+
+ public void OnRefreshSendGiftState(PlatFriendRankInfo2Client info)
+ {
+ bool flag = !base.IsVisible();
+ if (!flag)
+ {
+ foreach (KeyValuePair<Transform, string> keyValuePair in this.rankItemDict)
+ {
+ bool flag2 = keyValuePair.Value == info.platfriendBaseInfo.openid;
+ if (flag2)
+ {
+ IXUIButton ixuibutton = keyValuePair.Key.Find("BtnSend").GetComponent("XUIButton") as IXUIButton;
+ ixuibutton.SetEnable(!info.hasGiveGift, false);
+ break;
+ }
+ }
+ }
+ }
+
+ public void NoticeFriend(string openID)
+ {
+ bool flag = !base.IsVisible();
+ if (!flag)
+ {
+ this.m_noticeFriendOpenID = openID;
+ string @string = XStringDefineProxy.GetString("FRIEND_SEND_PLAT_FRIEND_TIP");
+ string string2 = XStringDefineProxy.GetString("FRIEND_SEND_PLAT_FRIEND_OK");
+ string string3 = XStringDefineProxy.GetString("FRIEND_SEND_PLAT_FRIEND_CANCEL");
+ DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.SetVisible(true, true);
+ DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.SetSingleButtonMode(false);
+ DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.SetLabelsWithSymbols(@string, string2, string3);
+ DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.SetModalCallback(new ButtonClickEventHandler(this.CheckNoticeFriend), null);
+ }
+ }
+
+ private bool CheckNoticeFriend(IXUIButton btn)
+ {
+ DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.SetVisible(false, true);
+ XAuthorizationChannel channel = XSingleton<XLoginDocument>.singleton.Channel;
+ string @string = XStringDefineProxy.GetString("FRIEND_SEND_PLAT_FRIEND_TIP");
+ bool flag = channel == XAuthorizationChannel.XAuthorization_QQ;
+ if (flag)
+ {
+ @string = XStringDefineProxy.GetString("FRIEND_SEND_PLAT_FRIEND_TIP_QQ");
+ }
+ else
+ {
+ bool flag2 = channel == XAuthorizationChannel.XAuthorization_WeChat;
+ if (flag2)
+ {
+ @string = XStringDefineProxy.GetString("FRIEND_SEND_PLAT_FRIEND_TIP_WX");
+ }
+ }
+ string string2 = XStringDefineProxy.GetString("FRIEND_SEND_PLAT_FRIEND_OK2");
+ string string3 = XStringDefineProxy.GetString("FRIEND_SEND_PLAT_FRIEND_CANCEL2");
+ DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.SetVisible(true, true);
+ DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.SetSingleButtonMode(false);
+ DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.SetLabelsWithSymbols(@string, string2, string3);
+ DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.SetModalCallback(new ButtonClickEventHandler(this.OnEnsureNoticeFriend), null);
+ return true;
+ }
+
+ private bool OnEnsureNoticeFriend(IXUIButton btn)
+ {
+ DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.SetVisible(false, true);
+ bool flag = XSingleton<XLoginDocument>.singleton.Channel == XAuthorizationChannel.XAuthorization_QQ;
+ if (flag)
+ {
+ this.ShareToQQFriend(this.m_noticeFriendOpenID);
+ }
+ else
+ {
+ bool flag2 = XSingleton<XLoginDocument>.singleton.Channel == XAuthorizationChannel.XAuthorization_WeChat;
+ if (flag2)
+ {
+ this.ShareToWXFriend(this.m_noticeFriendOpenID);
+ }
+ }
+ return true;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/XFriendsRankHandler.cs.meta b/Client/Assets/Scripts/XMainClient/UI/XFriendsRankHandler.cs.meta
new file mode 100644
index 00000000..531aa27e
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XFriendsRankHandler.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 7133bd1f86d2a1b4d8ba69343f9739f0
+timeCreated: 1611403933
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/XFriendsViewAddBlockHandler.cs b/Client/Assets/Scripts/XMainClient/UI/XFriendsViewAddBlockHandler.cs
new file mode 100644
index 00000000..cfd78460
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XFriendsViewAddBlockHandler.cs
@@ -0,0 +1,71 @@
+using System;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class XFriendsViewAddBlockHandler : DlgHandlerBase
+ {
+ private IXUIInput lbName;
+
+ private IXUIButton btnAdd;
+
+ private IXUITweenTool mTweenTool;
+
+ protected override void Init()
+ {
+ base.Init();
+ this.mTweenTool = (base.PanelObject.GetComponent("XUIPlayTween") as IXUITweenTool);
+ Transform transform = base.PanelObject.transform.Find("Bg");
+ this.lbName = (transform.Find("textinput").GetComponent("XUIInput") as IXUIInput);
+ this.btnAdd = (transform.Find("btnAdd").GetComponent("XUIButton") as IXUIButton);
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ IXUISprite ixuisprite = base.PanelObject.transform.Find("BgBlack").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnClose));
+ this.btnAdd.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnClickAddBlockFriend));
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ this.lbName.SetText(string.Empty);
+ }
+
+ protected override void OnHide()
+ {
+ }
+
+ private void OnHideTweenFinished(IXUITweenTool tween)
+ {
+ }
+
+ private void OnClose(IXUISprite sprClose)
+ {
+ base.SetVisible(false);
+ }
+
+ private bool OnClickAddBlockFriend(IXUIButton sp)
+ {
+ string text = this.lbName.GetText();
+ bool flag = (text + string.Empty).Length <= 0;
+ bool result;
+ if (flag)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString("FRIENDS_NAME_CANNOT_NULL"), "fece00");
+ result = false;
+ }
+ else
+ {
+ DlgBase<XFriendsView, XFriendsBehaviour>.singleton.AddBlockFriend(text);
+ result = true;
+ }
+ return result;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/XFriendsViewAddBlockHandler.cs.meta b/Client/Assets/Scripts/XMainClient/UI/XFriendsViewAddBlockHandler.cs.meta
new file mode 100644
index 00000000..617b46d9
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XFriendsViewAddBlockHandler.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 0fb9bc7111c54e846b143ab987898593
+timeCreated: 1611403212
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/XFriendsViewHintHandler.cs b/Client/Assets/Scripts/XMainClient/UI/XFriendsViewHintHandler.cs
new file mode 100644
index 00000000..7c78e252
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XFriendsViewHintHandler.cs
@@ -0,0 +1,56 @@
+using System;
+using UILib;
+using UnityEngine;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class XFriendsViewHintHandler : DlgHandlerBase
+ {
+ private IXUILabel lbHintText1;
+
+ private IXUILabel lbHintText2;
+
+ private IXUITweenTool mTweenTool;
+
+ protected override void Init()
+ {
+ base.Init();
+ this.mTweenTool = (base.PanelObject.GetComponent("XUIPlayTween") as IXUITweenTool);
+ Transform transform = base.PanelObject.transform.Find("Bg");
+ this.lbHintText1 = (transform.Find("T1").GetComponent("XUILabel") as IXUILabel);
+ this.lbHintText2 = (transform.Find("T2").GetComponent("XUILabel") as IXUILabel);
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ IXUISprite ixuisprite = base.PanelObject.transform.Find("BgBlack").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnClose));
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ this.lbHintText1.SetText(XStringDefineProxy.GetString("FRIEND_HINT_TIP1"));
+ this.lbHintText2.SetText(XStringDefineProxy.GetString("FRIEND_HINT_TIP2", new object[]
+ {
+ XSingleton<XFriendsStaticData>.singleton.SendGiftMinDegree
+ }));
+ }
+
+ protected override void OnHide()
+ {
+ base.OnHide();
+ }
+
+ private void OnHideTweenFinished(IXUITweenTool tween)
+ {
+ }
+
+ private void OnClose(IXUISprite sprClose)
+ {
+ base.SetVisible(false);
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/XFriendsViewHintHandler.cs.meta b/Client/Assets/Scripts/XMainClient/UI/XFriendsViewHintHandler.cs.meta
new file mode 100644
index 00000000..34de2035
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XFriendsViewHintHandler.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: b65a0c490d7863d45b86fe1a27c008f5
+timeCreated: 1611404397
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/XFriendsViewReceiveGiftHandler.cs b/Client/Assets/Scripts/XMainClient/UI/XFriendsViewReceiveGiftHandler.cs
new file mode 100644
index 00000000..e38eaef9
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XFriendsViewReceiveGiftHandler.cs
@@ -0,0 +1,237 @@
+using System;
+using System.Collections.Generic;
+using KKSG;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class XFriendsViewReceiveGiftHandler : DlgHandlerBase
+ {
+ private IXUITweenTool mTweenTool;
+
+ private IXUIWrapContent mListWrapContent;
+
+ private IXUIScrollView mListScrollView;
+
+ private IXUILabel lbNum;
+
+ private XPlayerInfoChildBaseView mListTempView;
+
+ private List<XFriendData> mList = new List<XFriendData>();
+
+ public List<XFriendData> friendGiftSortData = new List<XFriendData>();
+
+ private void _ResetReceiveGiftRank(List<XFriendData> friendData)
+ {
+ this.friendGiftSortData.Clear();
+ for (int i = 0; i < friendData.Count; i++)
+ {
+ this.friendGiftSortData.Add(friendData[i]);
+ }
+ bool flag = this.friendGiftSortData.Count > 0;
+ if (flag)
+ {
+ this.friendGiftSortData[0].receiveNo = 1;
+ bool flag2 = this.friendGiftSortData.Count > 1;
+ if (flag2)
+ {
+ this.friendGiftSortData.Sort(new Comparison<XFriendData>(this.CompareFriendGiftData));
+ this.friendGiftSortData[0].receiveNo = 1;
+ for (int j = 1; j < this.friendGiftSortData.Count; j++)
+ {
+ bool flag3 = this.friendGiftSortData[j].receiveAll == this.friendGiftSortData[j - 1].receiveAll;
+ if (flag3)
+ {
+ this.friendGiftSortData[j].receiveNo = this.friendGiftSortData[j - 1].receiveNo;
+ }
+ else
+ {
+ this.friendGiftSortData[j].receiveNo = j + 1;
+ }
+ }
+ }
+ }
+ }
+
+ private void _SortItemByReceiveTime(List<XFriendData> list)
+ {
+ uint num = (uint)XFastEnumIntEqualityComparer<FriendGiftReceive>.ToInt(FriendGiftReceive.FriendGift_ReceiveTaken);
+ uint num2 = (uint)XFastEnumIntEqualityComparer<FriendGiftReceive>.ToInt(FriendGiftReceive.FriendGift_Received);
+ List<XFriendData> list2 = new List<XFriendData>();
+ List<XFriendData> list3 = new List<XFriendData>();
+ for (int i = 0; i < list.Count; i++)
+ {
+ bool flag = list[i].receiveGiftState == num;
+ if (flag)
+ {
+ list2.Add(list[i]);
+ }
+ else
+ {
+ bool flag2 = list[i].receiveGiftState == num2;
+ if (flag2)
+ {
+ list3.Add(list[i]);
+ }
+ }
+ }
+ list2.Sort(new Comparison<XFriendData>(this.CompareFriendGiftDataByTime));
+ list3.Sort(new Comparison<XFriendData>(this.CompareFriendGiftDataByTime));
+ list.Clear();
+ list.AddRange(list3);
+ list.AddRange(list2);
+ }
+
+ private int CompareFriendGiftData(XFriendData a, XFriendData b)
+ {
+ return b.receiveAll.CompareTo(a.receiveAll);
+ }
+
+ private int CompareFriendGiftDataByTime(XFriendData a, XFriendData b)
+ {
+ return (int)(b.receivetime - a.receivetime);
+ }
+
+ public void RefreshList(List<XFriendData> list)
+ {
+ bool flag = !base.IsVisible();
+ if (!flag)
+ {
+ bool flag2 = list == null;
+ if (!flag2)
+ {
+ this._ResetReceiveGiftRank(list);
+ this.mList.Clear();
+ uint num = (uint)XFastEnumIntEqualityComparer<FriendGiftReceive>.ToInt(FriendGiftReceive.FriendGift_ReceiveNone);
+ for (int i = 0; i < this.friendGiftSortData.Count; i++)
+ {
+ bool flag3 = this.friendGiftSortData[i].receiveGiftState != num;
+ if (flag3)
+ {
+ this.mList.Add(this.friendGiftSortData[i]);
+ }
+ }
+ this._SortItemByReceiveTime(this.mList);
+ this.RefreshList();
+ }
+ }
+ }
+
+ public void RefreshList()
+ {
+ this._SortItemByReceiveTime(this.mList);
+ this.mListWrapContent.SetContentCount(this.mList.Count, false);
+ this.mListScrollView.ResetPosition();
+ int num = 0;
+ uint num2 = (uint)XFastEnumIntEqualityComparer<FriendGiftReceive>.ToInt(FriendGiftReceive.FriendGift_ReceiveTaken);
+ for (int i = 0; i < this.mList.Count; i++)
+ {
+ bool flag = this.mList[i].receiveGiftState == num2;
+ if (flag)
+ {
+ num++;
+ }
+ }
+ this.lbNum.SetText(string.Format(XSingleton<XFriendsStaticData>.singleton.CommonCountTotalFmt, DlgBase<XFriendsView, XFriendsBehaviour>.singleton.TodayReceiveCount, XSingleton<XFriendsStaticData>.singleton.ReceiveGifMaxTimes));
+ }
+
+ protected override void Init()
+ {
+ base.Init();
+ this.mTweenTool = (base.PanelObject.GetComponent("XUIPlayTween") as IXUITweenTool);
+ Transform transform = base.PanelObject.transform.Find("Bg");
+ this.lbNum = (transform.Find("Num").GetComponent("XUILabel") as IXUILabel);
+ this.mListScrollView = (transform.Find("List").GetComponent("XUIScrollView") as IXUIScrollView);
+ this.mListWrapContent = (this.mListScrollView.gameObject.transform.Find("WrapContent").GetComponent("XUIWrapContent") as IXUIWrapContent);
+ this.mListTempView = new XPlayerInfoChildBaseView();
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ IXUISprite ixuisprite = base.PanelObject.transform.Find("BgBlack").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnClose));
+ this.mListWrapContent.RegisterItemUpdateEventHandler(new WrapItemUpdateEventHandler(this._RankWrapListUpdated));
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ }
+
+ protected override void OnHide()
+ {
+ }
+
+ private void OnHideTweenFinished(IXUITweenTool tween)
+ {
+ }
+
+ private void OnClose(IXUISprite sprClose)
+ {
+ base.SetVisible(false);
+ }
+
+ private void _RankWrapListUpdated(Transform t, int i)
+ {
+ XFriendData xfriendData = this.mList[i];
+ XPlayerInfoChildBaseView xplayerInfoChildBaseView = this.mListTempView;
+ xplayerInfoChildBaseView.FindFrom(t);
+ IXUITexture tencentImage = t.Find("tencent").GetComponent("XUITexture") as IXUITexture;
+ DlgBase<XFriendsView, XFriendsBehaviour>.singleton.SetTencentImage(tencentImage);
+ t.Find("Received").gameObject.SetActive((ulong)xfriendData.receiveGiftState == (ulong)((long)XFastEnumIntEqualityComparer<FriendGiftReceive>.ToInt(FriendGiftReceive.FriendGift_ReceiveTaken)));
+ Transform transform = t.Find("Receive");
+ bool flag = (ulong)xfriendData.receiveGiftState == (ulong)((long)XFastEnumIntEqualityComparer<FriendGiftReceive>.ToInt(FriendGiftReceive.FriendGift_Received));
+ if (flag)
+ {
+ transform.gameObject.SetActive(true);
+ IXUIButton ixuibutton = transform.GetComponent("XUIButton") as IXUIButton;
+ ixuibutton.ID = xfriendData.roleid;
+ ixuibutton.RegisterClickEventHandler(new ButtonClickEventHandler(DlgBase<XFriendsView, XFriendsBehaviour>.singleton.OnClickReceiveGiftFromFriend));
+ }
+ else
+ {
+ transform.gameObject.SetActive(false);
+ }
+ t.Find("Returned").gameObject.SetActive((ulong)xfriendData.sendGiftState == (ulong)((long)XFastEnumIntEqualityComparer<FriendGiftSend>.ToInt(FriendGiftSend.FriendGift_Sended)));
+ transform = t.Find("Return");
+ bool flag2 = (ulong)xfriendData.sendGiftState == (ulong)((long)XFastEnumIntEqualityComparer<FriendGiftSend>.ToInt(FriendGiftSend.FriendGift_SendNone));
+ if (flag2)
+ {
+ transform.gameObject.SetActive(true);
+ IXUIButton ixuibutton2 = transform.GetComponent("XUIButton") as IXUIButton;
+ ixuibutton2.ID = xfriendData.roleid;
+ ixuibutton2.RegisterClickEventHandler(new ButtonClickEventHandler(DlgBase<XFriendsView, XFriendsBehaviour>.singleton.OnClickSendGiftToFriend));
+ }
+ else
+ {
+ transform.gameObject.SetActive(false);
+ }
+ IXUILabel ixuilabel = t.Find("Num").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel.SetText(xfriendData.receiveAll.ToString());
+ IXUILabel ixuilabel2 = t.Find("No").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel2.SetText(xfriendData.receiveNo.ToString());
+ IXUILabel ixuilabel3 = t.Find("Level").GetComponent("XUILabel") as IXUILabel;
+ bool flag3 = xfriendData.degreeAll < XSingleton<XFriendsStaticData>.singleton.MaxFriendlyEvaluation;
+ if (flag3)
+ {
+ ixuilabel3.SetText(xfriendData.degreeAll.ToString());
+ }
+ else
+ {
+ ixuilabel3.SetText("MAX");
+ }
+ IXUISprite ixuisprite = ixuilabel3.gameObject.transform.Find("Mark").GetComponent("XUISprite") as IXUISprite;
+ float num = xfriendData.degreeAll;
+ num /= XSingleton<XFriendsStaticData>.singleton.MaxFriendlyEvaluation;
+ ixuisprite.SetFillAmount(1f - num);
+ ixuisprite.ID = (ulong)xfriendData.degreeAll;
+ ixuisprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(DlgBase<XFriendsView, XFriendsBehaviour>.singleton.OnClickDegreeHeart));
+ xplayerInfoChildBaseView.sprHead.SetSprite(XSingleton<XProfessionSkillMgr>.singleton.GetProfHeadIcon2((int)xfriendData.profession));
+ xplayerInfoChildBaseView.lbName.InputText = XSingleton<XCommon>.singleton.StringCombine(XTitleDocument.GetTitleWithFormat(xfriendData.titleID, xfriendData.name), XStringDefineProxy.GetString("FRIEND_RECEIVE_GIFT_INFO"), XRechargeDocument.GetVIPIconString(xfriendData.viplevel));
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/XFriendsViewReceiveGiftHandler.cs.meta b/Client/Assets/Scripts/XMainClient/UI/XFriendsViewReceiveGiftHandler.cs.meta
new file mode 100644
index 00000000..c6308387
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XFriendsViewReceiveGiftHandler.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: e19fee2fe51e5ff4a869d0fe626c9731
+timeCreated: 1611404702
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/XGameSirBehaviour.cs b/Client/Assets/Scripts/XMainClient/UI/XGameSirBehaviour.cs
new file mode 100644
index 00000000..3862ebfe
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XGameSirBehaviour.cs
@@ -0,0 +1,25 @@
+using System;
+using UILib;
+using XMainClient.UI.UICommon;
+
+namespace XMainClient.UI
+{
+ internal class XGameSirBehaviour : DlgBehaviourBase
+ {
+ public IXUIButton m_ConnectBtn;
+
+ public IXUILabel m_ConntectStatus;
+
+ public IXUIButton m_ShowKeyBtn;
+
+ public IXUIButton m_CloseBtn;
+
+ private void Awake()
+ {
+ this.m_ConnectBtn = (base.transform.Find("Bg/Connect").GetComponent("XUIButton") as IXUIButton);
+ this.m_ShowKeyBtn = (base.transform.Find("Bg/Show").GetComponent("XUIButton") as IXUIButton);
+ this.m_ConntectStatus = (base.transform.Find("Bg/Connect/Label").GetComponent("XUILabel") as IXUILabel);
+ this.m_CloseBtn = (base.transform.Find("Bg/Close").GetComponent("XUIButton") as IXUIButton);
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/XGameSirBehaviour.cs.meta b/Client/Assets/Scripts/XMainClient/UI/XGameSirBehaviour.cs.meta
new file mode 100644
index 00000000..1600e1d8
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XGameSirBehaviour.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 09006bc4f27164445a981900532d99df
+timeCreated: 1611402971
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/XGameSirView.cs b/Client/Assets/Scripts/XMainClient/UI/XGameSirView.cs
new file mode 100644
index 00000000..6b84f573
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XGameSirView.cs
@@ -0,0 +1,256 @@
+using System;
+using System.Collections.Generic;
+using MiniJSON;
+using UILib;
+using XMainClient.UI.UICommon;
+using XUpdater;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class XGameSirView : DlgBase<XGameSirView, XGameSirBehaviour>
+ {
+ public override bool fullscreenui
+ {
+ get
+ {
+ return false;
+ }
+ }
+
+ public override string fileName
+ {
+ get
+ {
+ return "Common/GameSirDlg";
+ }
+ }
+
+ public override bool isHideChat
+ {
+ get
+ {
+ return false;
+ }
+ }
+
+ public override int layer
+ {
+ get
+ {
+ return 1;
+ }
+ }
+
+ public override int group
+ {
+ get
+ {
+ return 1;
+ }
+ }
+
+ public override bool autoload
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override bool hideMainMenu
+ {
+ get
+ {
+ return false;
+ }
+ }
+
+ public override bool pushstack
+ {
+ get
+ {
+ return false;
+ }
+ }
+
+ private IXGameSirControl SirControl
+ {
+ get
+ {
+ return XSingleton<XUpdater.XUpdater>.singleton.GameSirControl;
+ }
+ }
+
+ private XGameSirView.ConnectStatu mConnectStatu = XGameSirView.ConnectStatu.CONNECT;
+
+ private bool mConnecting = false;
+
+ private XElapseTimer m_ConnectTimeOut = new XElapseTimer();
+
+ public enum ConnectStatu
+ {
+ CONNECT,
+ CONNECTING,
+ CONNECTED
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ base.uiBehaviour.m_CloseBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.CloseClick));
+ base.uiBehaviour.m_ConnectBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.ConnectClick));
+ base.uiBehaviour.m_ShowKeyBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.ShowKeyCodeClick));
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ this.UpdateGameSirStatu();
+ this.RefreshWhenShow();
+ }
+
+ protected override void OnHide()
+ {
+ base.OnHide();
+ this.mConnecting = false;
+ this.m_ConnectTimeOut.LeftTime = 0f;
+ this.mConnectStatu = XGameSirView.ConnectStatu.CONNECT;
+ }
+
+ public override void OnUpdate()
+ {
+ base.OnUpdate();
+ this.UpdateGameSirStatu();
+ }
+
+ private void UpdateGameSirStatu()
+ {
+ bool flag = this.SirControl == null;
+ if (flag)
+ {
+ this.SetGameSirStatu(XGameSirView.ConnectStatu.CONNECT);
+ }
+ else
+ {
+ bool flag2 = this.SirControl.IsConnected();
+ if (flag2)
+ {
+ this.SetGameSirStatu(XGameSirView.ConnectStatu.CONNECTED);
+ }
+ else
+ {
+ bool flag3 = this.mConnecting;
+ if (flag3)
+ {
+ this.m_ConnectTimeOut.Update();
+ bool flag4 = this.m_ConnectTimeOut.LeftTime > 0f;
+ if (flag4)
+ {
+ this.SetGameSirStatu(XGameSirView.ConnectStatu.CONNECTING);
+ }
+ else
+ {
+ this.mConnecting = false;
+ }
+ }
+ else
+ {
+ this.SetGameSirStatu(XGameSirView.ConnectStatu.CONNECT);
+ }
+ }
+ }
+ }
+
+ private void SetGameSirStatu(XGameSirView.ConnectStatu statu)
+ {
+ bool flag = this.mConnectStatu == statu;
+ if (!flag)
+ {
+ this.mConnectStatu = statu;
+ this.RefreshWhenShow();
+ }
+ }
+
+ private void RefreshWhenShow()
+ {
+ XGameSirView.ConnectStatu connectStatu = this.mConnectStatu;
+ if (connectStatu != XGameSirView.ConnectStatu.CONNECTING)
+ {
+ if (connectStatu != XGameSirView.ConnectStatu.CONNECTED)
+ {
+ this.mConnecting = false;
+ base.uiBehaviour.m_ConntectStatus.SetText(XStringDefineProxy.GetString("HANDLE_STATU_CONNECT"));
+ base.uiBehaviour.m_ConnectBtn.SetEnable(true, false);
+ }
+ else
+ {
+ this.mConnecting = false;
+ base.uiBehaviour.m_ConntectStatus.SetText(XStringDefineProxy.GetString("HANDLE_STATU_CONNECTED"));
+ base.uiBehaviour.m_ConnectBtn.SetEnable(true, false);
+ }
+ }
+ else
+ {
+ base.uiBehaviour.m_ConntectStatus.SetText(XStringDefineProxy.GetString("HANDLE_STATU_CONNECTING"));
+ base.uiBehaviour.m_ConnectBtn.SetEnable(false, false);
+ }
+ }
+
+ private bool CloseClick(IXUIButton btn)
+ {
+ this.SetVisibleWithAnimation(false, null);
+ return true;
+ }
+
+ private bool ConnectClick(IXUIButton btn)
+ {
+ bool flag = this.mConnectStatu == XGameSirView.ConnectStatu.CONNECT;
+ if (flag)
+ {
+ this.m_ConnectTimeOut.LeftTime = (float)XSingleton<XGlobalConfig>.singleton.GetInt("GameSirTimeOut");
+ this.mConnecting = true;
+ bool flag2 = this.SirControl != null;
+ if (flag2)
+ {
+ this.SirControl.StartSir();
+ }
+ }
+ else
+ {
+ bool flag3 = this.mConnectStatu == XGameSirView.ConnectStatu.CONNECTED;
+ if (flag3)
+ {
+ this.mConnecting = false;
+ bool flag4 = this.SirControl != null;
+ if (flag4)
+ {
+ this.SirControl.StopSir();
+ }
+ }
+ }
+ return true;
+ }
+
+ private bool ShowKeyCodeClick(IXUIButton btn)
+ {
+ string value = XSingleton<XGlobalConfig>.singleton.GetValue("GameSirKeyUrl");
+ bool flag = string.IsNullOrEmpty(value);
+ bool result;
+ if (flag)
+ {
+ result = false;
+ }
+ else
+ {
+ Dictionary<string, string> dictionary = new Dictionary<string, string>();
+ XSingleton<XDebug>.singleton.AddGreenLog("Open GameSir Key:", value, null, null, null, null);
+ dictionary["url"] = value;
+ dictionary["screendir"] = "SENSOR";
+ XSingleton<XUpdater.XUpdater>.singleton.XPlatform.SendExtDara("open_url", Json.Serialize(dictionary));
+ result = true;
+ }
+ return result;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/XGameSirView.cs.meta b/Client/Assets/Scripts/XMainClient/UI/XGameSirView.cs.meta
new file mode 100644
index 00000000..f939d344
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XGameSirView.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: b4efaaa4a85a9774c87f47174425b037
+timeCreated: 1611404393
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/XGuildApplyBehaviour.cs b/Client/Assets/Scripts/XMainClient/UI/XGuildApplyBehaviour.cs
new file mode 100644
index 00000000..8724dbe7
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XGuildApplyBehaviour.cs
@@ -0,0 +1,42 @@
+using System;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+
+namespace XMainClient.UI
+{
+ internal class XGuildApplyBehaviour : DlgBehaviourBase
+ {
+ public IXUIButton m_Close = null;
+
+ public IXUIButton m_BtnApply = null;
+
+ public IXUIButton m_BtnEnterGuild;
+
+ public IXUILabel m_Annoucement;
+
+ public IXUILabel m_PPT;
+
+ public IXUILabel m_NeedApprove;
+
+ public IXUILabel m_ResultNote;
+
+ public GameObject m_ApplyMenu;
+
+ public GameObject m_ResultMenu;
+
+ private void Awake()
+ {
+ this.m_Close = (base.transform.Find("Bg/ApplyMenu/Close").GetComponent("XUIButton") as IXUIButton);
+ this.m_BtnApply = (base.transform.Find("Bg/ApplyMenu/OK").GetComponent("XUIButton") as IXUIButton);
+ this.m_BtnEnterGuild = (base.transform.Find("Bg/ResultMenu/OK").GetComponent("XUIButton") as IXUIButton);
+ this.m_Annoucement = (base.transform.Find("Bg/ApplyMenu/Annoucement").GetComponent("XUILabel") as IXUILabel);
+ this.m_Annoucement.SetText("");
+ this.m_PPT = (base.transform.Find("Bg/ApplyMenu/PPT").GetComponent("XUILabel") as IXUILabel);
+ this.m_NeedApprove = (base.transform.Find("Bg/ApplyMenu/NeedApprove").GetComponent("XUILabel") as IXUILabel);
+ this.m_ResultNote = (base.transform.Find("Bg/ResultMenu/Note").GetComponent("XUILabel") as IXUILabel);
+ this.m_ApplyMenu = base.transform.Find("Bg/ApplyMenu").gameObject;
+ this.m_ResultMenu = base.transform.Find("Bg/ResultMenu").gameObject;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/XGuildApplyBehaviour.cs.meta b/Client/Assets/Scripts/XMainClient/UI/XGuildApplyBehaviour.cs.meta
new file mode 100644
index 00000000..78b59692
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XGuildApplyBehaviour.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 8f3d2d75ba9b72a4f9281b7acd818006
+timeCreated: 1611404133
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/XGuildApplyView.cs b/Client/Assets/Scripts/XMainClient/UI/XGuildApplyView.cs
new file mode 100644
index 00000000..92557a1b
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XGuildApplyView.cs
@@ -0,0 +1,142 @@
+using System;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class XGuildApplyView : DlgBase<XGuildApplyView, XGuildApplyBehaviour>
+ {
+ public override string fileName
+ {
+ get
+ {
+ return "Guild/GuildApplyDlg";
+ }
+ }
+
+ public override int layer
+ {
+ get
+ {
+ return 1;
+ }
+ }
+
+ public override int group
+ {
+ get
+ {
+ return 1;
+ }
+ }
+
+ public override bool autoload
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ private ulong m_UID;
+
+ private string m_Name;
+
+ private XGuildListDocument _doc;
+
+ private XFx m_xfx;
+
+ protected override void Init()
+ {
+ this._doc = XDocuments.GetSpecificDocument<XGuildListDocument>(XGuildListDocument.uuID);
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ base.uiBehaviour.m_Close.RegisterClickEventHandler(new ButtonClickEventHandler(this._OnCloseBtnClick));
+ base.uiBehaviour.m_BtnApply.RegisterClickEventHandler(new ButtonClickEventHandler(this._OnApplyBtnClicked));
+ base.uiBehaviour.m_BtnEnterGuild.RegisterClickEventHandler(new ButtonClickEventHandler(this._OnEnterSceneBtnClicked));
+ }
+
+ public void ShowApply(ulong uid, string name, uint ppt, bool bNeedApprove, string annoucement)
+ {
+ bool flag = !base.IsVisible();
+ if (flag)
+ {
+ this.SetVisible(true, true);
+ }
+ this.m_UID = uid;
+ this.m_Name = name;
+ base.uiBehaviour.m_PPT.SetText(ppt.ToString());
+ base.uiBehaviour.m_NeedApprove.SetText(bNeedApprove ? XStringDefineProxy.GetString("YES") : XStringDefineProxy.GetString("NO"));
+ base.uiBehaviour.m_Annoucement.SetText(annoucement);
+ base.uiBehaviour.m_ApplyMenu.SetActive(true);
+ base.uiBehaviour.m_ResultMenu.SetActive(false);
+ base.uiBehaviour.m_Close.SetVisible(true);
+ }
+
+ public void Hide()
+ {
+ this.SetVisible(false, true);
+ this.DestroyFx(this.m_xfx);
+ }
+
+ public void ShowResult(bool bCreate, string name)
+ {
+ bool flag = !base.IsVisible();
+ if (flag)
+ {
+ this.SetVisible(true, true);
+ }
+ string text = bCreate ? XStringDefineProxy.GetString("CREATE") : XStringDefineProxy.GetString("JOIN");
+ base.uiBehaviour.m_ResultNote.SetText(XStringDefineProxy.GetString("GUILD_APPLY_SUCCESS", new object[]
+ {
+ text,
+ name
+ }));
+ base.uiBehaviour.m_ApplyMenu.SetActive(false);
+ base.uiBehaviour.m_ResultMenu.SetActive(true);
+ base.uiBehaviour.m_Close.SetVisible(false);
+ this.DestroyFx(this.m_xfx);
+ this.m_xfx = XSingleton<XFxMgr>.singleton.CreateFx("Effects/FX_Particle/UIfx/UI_yh", null, true);
+ this.m_xfx.Play(DlgBase<XMainInterface, XMainInterfaceBehaviour>.singleton.uiBehaviour.m_FxFirework.transform, Vector3.zero, Vector3.one, 1f, true, false);
+ }
+
+ public void DestroyFx(XFx fx)
+ {
+ bool flag = fx == null;
+ if (!flag)
+ {
+ XSingleton<XFxMgr>.singleton.DestroyFx(fx, true);
+ }
+ }
+
+ private bool _OnApplyBtnClicked(IXUIButton btn)
+ {
+ this._doc.ReqApplyGuild(this.m_UID, this.m_Name);
+ return true;
+ }
+
+ private bool _OnEnterSceneBtnClicked(IXUIButton btn)
+ {
+ this.Hide();
+ bool flag = DlgBase<XGuildViewView, XGuildViewBehaviour>.singleton.IsVisible();
+ if (flag)
+ {
+ DlgBase<XGuildViewView, XGuildViewBehaviour>.singleton.SetVisibleWithAnimation(false, null);
+ }
+ DlgBase<XGuildListView, XGuildListBehaviour>.singleton.SetVisibleWithAnimation(false, null);
+ XSingleton<XGameSysMgr>.singleton.OpenGuildSystem(XSysDefine.XSys_GuildHall);
+ return true;
+ }
+
+ private bool _OnCloseBtnClick(IXUIButton go)
+ {
+ this.Hide();
+ return true;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/XGuildApplyView.cs.meta b/Client/Assets/Scripts/XMainClient/UI/XGuildApplyView.cs.meta
new file mode 100644
index 00000000..97e00bfd
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XGuildApplyView.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 407a5564aae388447aeb1774fd5c9886
+timeCreated: 1611403614
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/XGuildApproveBehaviour.cs b/Client/Assets/Scripts/XMainClient/UI/XGuildApproveBehaviour.cs
new file mode 100644
index 00000000..d421b2d4
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XGuildApproveBehaviour.cs
@@ -0,0 +1,44 @@
+using System;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+
+namespace XMainClient.UI
+{
+ internal class XGuildApproveBehaviour : DlgBehaviourBase
+ {
+ public IXUIButton m_Close = null;
+
+ public IXUIButton m_BtnOneKeyCancel;
+
+ public IXUIButton m_BtnSetting;
+
+ public IXUIButton m_BtnSendMessage;
+
+ public IXUILabel m_RequiredPPT;
+
+ public IXUILabel m_NeedApprove;
+
+ public IXUILabel m_MemberCount;
+
+ public IXUIWrapContent m_WrapContent;
+
+ public IXUIScrollView m_ScrollView;
+
+ public GameObject m_SettingPanel;
+
+ private void Awake()
+ {
+ this.m_Close = (base.transform.Find("Bg/Close").GetComponent("XUIButton") as IXUIButton);
+ this.m_BtnOneKeyCancel = (base.transform.Find("Bg/BtnOneKeyCancel").GetComponent("XUIButton") as IXUIButton);
+ this.m_BtnSetting = (base.transform.Find("Bg/BtnSetting").GetComponent("XUIButton") as IXUIButton);
+ this.m_BtnSendMessage = (base.transform.Find("Bg/BtnSendMessage").GetComponent("XUIButton") as IXUIButton);
+ this.m_ScrollView = (base.transform.Find("Bg/Panel").GetComponent("XUIScrollView") as IXUIScrollView);
+ this.m_WrapContent = (base.transform.Find("Bg/Panel/WrapContent").GetComponent("XUIWrapContent") as IXUIWrapContent);
+ this.m_RequiredPPT = (base.transform.Find("Bg/PPTRequirement").GetComponent("XUILabel") as IXUILabel);
+ this.m_NeedApprove = (base.transform.Find("Bg/NeedApprove").GetComponent("XUILabel") as IXUILabel);
+ this.m_MemberCount = (base.transform.Find("Bg/MemberCount").GetComponent("XUILabel") as IXUILabel);
+ this.m_SettingPanel = base.transform.Find("Bg/SettingPanel").gameObject;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/XGuildApproveBehaviour.cs.meta b/Client/Assets/Scripts/XMainClient/UI/XGuildApproveBehaviour.cs.meta
new file mode 100644
index 00000000..2f8d0d46
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XGuildApproveBehaviour.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: a973609e058136343bfefde2e0597c25
+timeCreated: 1611404298
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/XGuildApproveSettingView.cs b/Client/Assets/Scripts/XMainClient/UI/XGuildApproveSettingView.cs
new file mode 100644
index 00000000..9964c904
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XGuildApproveSettingView.cs
@@ -0,0 +1,63 @@
+using System;
+using UILib;
+
+namespace XMainClient.UI
+{
+ internal class XGuildApproveSettingView : DlgHandlerBase
+ {
+ private IXUIInput m_PPTInput;
+
+ private IXUICheckBox m_AutoApprove;
+
+ private XGuildApproveDocument _doc;
+
+ protected override void Init()
+ {
+ this.m_PPTInput = (base.PanelObject.transform.Find("SettingMenu/PPTInput").GetComponent("XUIInput") as IXUIInput);
+ this.m_AutoApprove = (base.PanelObject.transform.Find("SettingMenu/AutoApprove").GetComponent("XUICheckBox") as IXUICheckBox);
+ this._doc = XDocuments.GetSpecificDocument<XGuildApproveDocument>(XGuildApproveDocument.uuID);
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ IXUIButton ixuibutton = base.PanelObject.transform.Find("Close").GetComponent("XUIButton") as IXUIButton;
+ ixuibutton.RegisterClickEventHandler(new ButtonClickEventHandler(this._OnCloseBtnClick));
+ IXUIButton ixuibutton2 = base.PanelObject.transform.Find("SettingMenu/OK").GetComponent("XUIButton") as IXUIButton;
+ ixuibutton2.RegisterClickEventHandler(new ButtonClickEventHandler(this._OnOKBtnClicked));
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ GuildApproveSetting approveSetting = this._doc.ApproveSetting;
+ this.m_PPTInput.SetText(approveSetting.GetStrPPT());
+ this.m_AutoApprove.bChecked = approveSetting.autoApprove;
+ }
+
+ private bool _OnOKBtnClicked(IXUIButton btn)
+ {
+ GuildApproveSetting guildApproveSetting = new GuildApproveSetting();
+ string text = this.m_PPTInput.GetText();
+ bool flag = text.Length == 0;
+ if (flag)
+ {
+ guildApproveSetting.PPT = 0;
+ }
+ else
+ {
+ guildApproveSetting.PPT = int.Parse(text);
+ }
+ guildApproveSetting.autoApprove = this.m_AutoApprove.bChecked;
+ this._doc.ReqSetApprove(guildApproveSetting);
+ base.SetVisible(false);
+ return true;
+ }
+
+ private bool _OnCloseBtnClick(IXUIButton go)
+ {
+ base.SetVisible(false);
+ return true;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/XGuildApproveSettingView.cs.meta b/Client/Assets/Scripts/XMainClient/UI/XGuildApproveSettingView.cs.meta
new file mode 100644
index 00000000..215c3bdd
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XGuildApproveSettingView.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 9a0c53d7728ceae4a9144f7ab6c0feb7
+timeCreated: 1611404199
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/XGuildApproveView.cs b/Client/Assets/Scripts/XMainClient/UI/XGuildApproveView.cs
new file mode 100644
index 00000000..9b16f1e3
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XGuildApproveView.cs
@@ -0,0 +1,245 @@
+using System;
+using System.Collections.Generic;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class XGuildApproveView : DlgBase<XGuildApproveView, XGuildApproveBehaviour>
+ {
+ public override string fileName
+ {
+ get
+ {
+ return "Guild/GuildApproveDlg";
+ }
+ }
+
+ public override int layer
+ {
+ get
+ {
+ return 1;
+ }
+ }
+
+ public override int group
+ {
+ get
+ {
+ return 1;
+ }
+ }
+
+ public override bool autoload
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override bool hideMainMenu
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override bool pushstack
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ private XGuildApproveDocument _ApproveDoc;
+
+ private XGuildDocument _GuildDoc;
+
+ private XGuildHallDocument _HallDoc;
+
+ private XGuildApproveSettingView _SettingView;
+
+ private bool m_ApproveStatu = false;
+
+ protected override void Init()
+ {
+ this._ApproveDoc = XDocuments.GetSpecificDocument<XGuildApproveDocument>(XGuildApproveDocument.uuID);
+ this._ApproveDoc.GuildApproveView = this;
+ this._GuildDoc = XDocuments.GetSpecificDocument<XGuildDocument>(XGuildDocument.uuID);
+ this._HallDoc = XDocuments.GetSpecificDocument<XGuildHallDocument>(XGuildHallDocument.uuID);
+ DlgHandlerBase.EnsureCreate<XGuildApproveSettingView>(ref this._SettingView, base.uiBehaviour.m_SettingPanel, null, true);
+ }
+
+ protected override void OnUnload()
+ {
+ this._ApproveDoc.GuildApproveView = null;
+ DlgHandlerBase.EnsureUnload<XGuildApproveSettingView>(ref this._SettingView);
+ base.OnUnload();
+ }
+
+ public override void RegisterEvent()
+ {
+ base.uiBehaviour.m_Close.RegisterClickEventHandler(new ButtonClickEventHandler(this._OnCloseBtnClick));
+ base.uiBehaviour.m_BtnOneKeyCancel.RegisterClickEventHandler(new ButtonClickEventHandler(this._OnOneKeyCancelBtnClick));
+ base.uiBehaviour.m_BtnSetting.RegisterClickEventHandler(new ButtonClickEventHandler(this._OnSettingBtnClick));
+ base.uiBehaviour.m_BtnSendMessage.RegisterClickEventHandler(new ButtonClickEventHandler(this._OnSendMessageBtnClick));
+ base.uiBehaviour.m_WrapContent.RegisterItemUpdateEventHandler(new WrapItemUpdateEventHandler(this._WrapContentItemUpdated));
+ base.uiBehaviour.m_WrapContent.RegisterItemInitEventHandler(new WrapItemInitEventHandler(this._WrapContentInit));
+ }
+
+ protected override void OnShow()
+ {
+ this._ApproveDoc.ReqApproveList();
+ this._SettingView.SetVisible(false);
+ this.RefreshSetting();
+ this.RefreshMember();
+ }
+
+ public void RefreshSetting()
+ {
+ GuildApproveSetting approveSetting = this._ApproveDoc.ApproveSetting;
+ bool flag = approveSetting.PPT == 0;
+ if (flag)
+ {
+ base.uiBehaviour.m_RequiredPPT.SetText(XStringDefineProxy.GetString("NONE"));
+ }
+ else
+ {
+ base.uiBehaviour.m_RequiredPPT.SetText(approveSetting.GetStrPPT());
+ }
+ base.uiBehaviour.m_NeedApprove.SetText(approveSetting.autoApprove ? XStringDefineProxy.GetString("GUILD_APPROVE_NEEDNT") : XStringDefineProxy.GetString("GUILD_APPROVE_NEED"));
+ }
+
+ public void RefreshMember()
+ {
+ this.m_ApproveStatu = false;
+ base.uiBehaviour.m_MemberCount.SetText(string.Format("{0}/{1}", this._GuildDoc.BasicData.memberCount, this._GuildDoc.BasicData.maxMemberCount));
+ }
+
+ public void RefreshList(bool bResetPosition)
+ {
+ List<XGuildApplyInfo> approveList = this._ApproveDoc.ApproveList;
+ int count = approveList.Count;
+ base.uiBehaviour.m_WrapContent.SetContentCount(count, false);
+ if (bResetPosition)
+ {
+ base.uiBehaviour.m_ScrollView.ResetPosition();
+ }
+ }
+
+ private void _WrapContentInit(Transform t, int index)
+ {
+ IXUIButton ixuibutton = t.Find("BtnOK").GetComponent("XUIButton") as IXUIButton;
+ IXUIButton ixuibutton2 = t.Find("BtnCancel").GetComponent("XUIButton") as IXUIButton;
+ ixuibutton.RegisterClickEventHandler(new ButtonClickEventHandler(this._OnOKBtnClick));
+ ixuibutton2.RegisterClickEventHandler(new ButtonClickEventHandler(this._OnCancelBtnClick));
+ }
+
+ private void _WrapContentItemUpdated(Transform t, int index)
+ {
+ bool flag = index < 0 || index >= this._ApproveDoc.ApproveList.Count;
+ if (!flag)
+ {
+ XGuildApplyInfo xguildApplyInfo = this._ApproveDoc.ApproveList[index];
+ IXUILabel ixuilabel = t.Find("Name").GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel2 = t.Find("Level").GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel3 = t.Find("PPT").GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel4 = t.Find("ApplyTime").GetComponent("XUILabel") as IXUILabel;
+ IXUISprite ixuisprite = t.Find("Portrait").GetComponent("XUISprite") as IXUISprite;
+ IXUIButton ixuibutton = t.Find("BtnOK").GetComponent("XUIButton") as IXUIButton;
+ IXUIButton ixuibutton2 = t.Find("BtnCancel").GetComponent("XUIButton") as IXUIButton;
+ IXUISprite ixuisprite2 = t.Find("Profession").GetComponent("XUISprite") as IXUISprite;
+ ixuilabel.SetText(xguildApplyInfo.name);
+ ixuilabel2.SetText("Lv." + xguildApplyInfo.level);
+ ixuilabel3.SetText(xguildApplyInfo.ppt.ToString());
+ ixuilabel4.SetText(XSingleton<UiUtility>.singleton.TimeAgoFormatString(xguildApplyInfo.time));
+ ixuisprite.SetSprite(XSingleton<XProfessionSkillMgr>.singleton.GetProfHeadIcon2(xguildApplyInfo.profession));
+ ixuisprite2.SetSprite(XSingleton<XProfessionSkillMgr>.singleton.GetProfIcon(xguildApplyInfo.profession));
+ ixuibutton.ID = (ulong)((long)index);
+ ixuibutton2.ID = (ulong)((long)index);
+ }
+ }
+
+ private bool _OnCloseBtnClick(IXUIButton go)
+ {
+ this.SetVisibleWithAnimation(false, null);
+ return true;
+ }
+
+ private bool _OnOneKeyCancelBtnClick(IXUIButton go)
+ {
+ bool flag = !this._GuildDoc.bInGuild;
+ bool result;
+ if (flag)
+ {
+ result = true;
+ }
+ else
+ {
+ XSingleton<UiUtility>.singleton.ShowModalDialog(XStringDefineProxy.GetString("GUILD_APPROVE_REJECT_ALL_CONFIRM"), XStringDefineProxy.GetString("COMMON_OK"), XStringDefineProxy.GetString("COMMON_CANCEL"), new ButtonClickEventHandler(this._OnOneKeyCancel));
+ result = true;
+ }
+ return result;
+ }
+
+ private bool _OnOneKeyCancel(IXUIButton go)
+ {
+ this._ApproveDoc.ReqRejectAll();
+ XSingleton<UiUtility>.singleton.CloseModalDlg();
+ return true;
+ }
+
+ private bool _OnSettingBtnClick(IXUIButton btn)
+ {
+ this._SettingView.SetVisible(true);
+ return true;
+ }
+
+ private bool _OnSendMessageBtnClick(IXUIButton btn)
+ {
+ XInvitationDocument specificDocument = XDocuments.GetSpecificDocument<XInvitationDocument>(XInvitationDocument.uuID);
+ specificDocument.SendGuildInvitation();
+ return true;
+ }
+
+ private bool _OnOKBtnClick(IXUIButton btn)
+ {
+ bool approveStatu = this.m_ApproveStatu;
+ bool result;
+ if (approveStatu)
+ {
+ result = false;
+ }
+ else
+ {
+ this.m_ApproveStatu = true;
+ this._ApproveDoc.ReqApprove(true, (int)btn.ID);
+ result = true;
+ }
+ return result;
+ }
+
+ private bool _OnCancelBtnClick(IXUIButton btn)
+ {
+ bool approveStatu = this.m_ApproveStatu;
+ bool result;
+ if (approveStatu)
+ {
+ result = false;
+ }
+ else
+ {
+ this.m_ApproveStatu = true;
+ this._ApproveDoc.ReqApprove(false, (int)btn.ID);
+ result = true;
+ }
+ return result;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/XGuildApproveView.cs.meta b/Client/Assets/Scripts/XMainClient/UI/XGuildApproveView.cs.meta
new file mode 100644
index 00000000..47da280a
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XGuildApproveView.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 7e66c91fc03d33e498c84ca04c158e64
+timeCreated: 1611404004
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/XGuildArenaDlg.cs b/Client/Assets/Scripts/XMainClient/UI/XGuildArenaDlg.cs
new file mode 100644
index 00000000..a7ee5049
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XGuildArenaDlg.cs
@@ -0,0 +1,214 @@
+using System;
+using System.Collections.Generic;
+using UILib;
+using XMainClient.UI.UICommon;
+using XMainClient.Utility;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class XGuildArenaDlg : DlgBase<XGuildArenaDlg, TabDlgBehaviour>
+ {
+ public override string fileName
+ {
+ get
+ {
+ return "Guild/GuildArenaDlg";
+ }
+ }
+
+ public override int layer
+ {
+ get
+ {
+ return 1;
+ }
+ }
+
+ public override int group
+ {
+ get
+ {
+ return 1;
+ }
+ }
+
+ public override bool pushstack
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override bool hideMainMenu
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override bool fullscreenui
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override bool autoload
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ private XGuildArenaDocument _Doc;
+
+ private Dictionary<GuildArenaTab, DlgHandlerBase> m_handlers = new Dictionary<GuildArenaTab, DlgHandlerBase>();
+
+ private IXUIButton m_Help;
+
+ private IXUISprite m_maskSprite;
+
+ protected override void Init()
+ {
+ base.Init();
+ this._Doc = XDocuments.GetSpecificDocument<XGuildArenaDocument>(XGuildArenaDocument.uuID);
+ this.m_Help = (base.uiBehaviour.m_root.Find("Help").GetComponent("XUIButton") as IXUIButton);
+ this.m_maskSprite = (base.uiBehaviour.m_root.Find("Mask").GetComponent("XUISprite") as IXUISprite);
+ this.RegisterHandler<GuildArenaHallHandle>(GuildArenaTab.Hall);
+ this.RegisterHandler<GuildArenaDuelHandler>(GuildArenaTab.Duel);
+ this.RegisterHandler<GuildArenaCombatHandle>(GuildArenaTab.Combat);
+ }
+
+ private void RegisterHandler<T>(GuildArenaTab index) where T : DlgHandlerBase, new()
+ {
+ bool flag = !this.m_handlers.ContainsKey(index);
+ if (flag)
+ {
+ T t = default(T);
+ t = DlgHandlerBase.EnsureCreate<T>(ref t, base.uiBehaviour.m_root, false, this);
+ this.m_handlers.Add(index, t);
+ }
+ }
+
+ private void RemoveHandler(GuildArenaTab index)
+ {
+ DlgHandlerBase dlgHandlerBase;
+ bool flag = this.m_handlers.TryGetValue(index, out dlgHandlerBase);
+ if (flag)
+ {
+ DlgHandlerBase.EnsureUnload<DlgHandlerBase>(ref dlgHandlerBase);
+ this.m_handlers.Remove(index);
+ }
+ }
+
+ protected override void OnUnload()
+ {
+ this.RemoveHandler(GuildArenaTab.Hall);
+ this.RemoveHandler(GuildArenaTab.Duel);
+ this.RemoveHandler(GuildArenaTab.Combat);
+ base.OnUnload();
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ base.uiBehaviour.m_Close.RegisterClickEventHandler(new ButtonClickEventHandler(this._CloseClickHandle));
+ this.m_Help.RegisterClickEventHandler(new ButtonClickEventHandler(this._OnHelpClick));
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ this.InitTabTableControl();
+ this._Doc.SendGuildIntegralInfo();
+ }
+
+ public void SelectTabIndex(GuildArenaTab tab)
+ {
+ bool flag = !base.IsVisible();
+ if (!flag)
+ {
+ int num = XFastEnumIntEqualityComparer<GuildArenaTab>.ToInt(tab);
+ IXUICheckBox byCheckBoxId = this.m_uiBehaviour.m_tabcontrol.GetByCheckBoxId((ulong)((long)num));
+ bool flag2 = byCheckBoxId == null;
+ if (!flag2)
+ {
+ byCheckBoxId.bChecked = true;
+ }
+ }
+ }
+
+ protected override void OnHide()
+ {
+ this.SetHandlerVisible(this._Doc.SelectTabIndex, false);
+ base.OnHide();
+ }
+
+ public void RefreshData()
+ {
+ DlgHandlerBase dlgHandlerBase;
+ bool flag = this.m_handlers.TryGetValue(this._Doc.SelectTabIndex, out dlgHandlerBase) && dlgHandlerBase.IsVisible();
+ if (flag)
+ {
+ dlgHandlerBase.RefreshData();
+ }
+ }
+
+ private void InitTabTableControl()
+ {
+ List<int> list = new List<int>
+ {
+ 1,
+ 2,
+ 3
+ };
+ List<string> list2 = new List<string>();
+ int i = 0;
+ int count = list.Count;
+ while (i < count)
+ {
+ list2.Add(string.Format("GUILD_ARENA_TAB{0}", list[i]));
+ i++;
+ }
+ base.uiBehaviour.m_tabcontrol.SetupTabs(list, list2, new XUITabControl.UITabControlCallback(this._OnTabControlUpdate), true, 1f, -1, true);
+ }
+
+ private void SetHandlerVisible(GuildArenaTab handlerID, bool isVisble)
+ {
+ DlgHandlerBase dlgHandlerBase;
+ bool flag = this.m_handlers.TryGetValue(handlerID, out dlgHandlerBase);
+ if (flag)
+ {
+ dlgHandlerBase.SetVisible(isVisble);
+ if (isVisble)
+ {
+ this._Doc.SelectTabIndex = handlerID;
+ }
+ }
+ }
+
+ private void _OnTabControlUpdate(ulong handId)
+ {
+ this.SetHandlerVisible(this._Doc.SelectTabIndex, false);
+ this.SetHandlerVisible((GuildArenaTab)handId, true);
+ this.m_maskSprite.SetAlpha((this._Doc.SelectTabIndex == GuildArenaTab.Hall) ? 0f : 1f);
+ }
+
+ private bool _OnHelpClick(IXUIButton btn)
+ {
+ DlgBase<XCommonHelpTipView, XCommonHelpTipBehaviour>.singleton.ShowHelp(XSysDefine.XSys_GuildPvp);
+ return true;
+ }
+
+ private bool _CloseClickHandle(IXUIButton btn)
+ {
+ this.SetVisibleWithAnimation(false, null);
+ return false;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/XGuildArenaDlg.cs.meta b/Client/Assets/Scripts/XMainClient/UI/XGuildArenaDlg.cs.meta
new file mode 100644
index 00000000..5fd19e47
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XGuildArenaDlg.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: f80bfd2b28c4a504394d2d4d481ecad6
+timeCreated: 1611404890
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/XGuildBasicInfoDisplay.cs b/Client/Assets/Scripts/XMainClient/UI/XGuildBasicInfoDisplay.cs
new file mode 100644
index 00000000..7931c7d9
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XGuildBasicInfoDisplay.cs
@@ -0,0 +1,245 @@
+using System;
+using UILib;
+using UnityEngine;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class XGuildBasicInfoDisplay
+ {
+ public Transform Root;
+
+ public IXUILabel GuildName;
+
+ public IXUILabel LeaderName;
+
+ public IXUILabel Annoucement;
+
+ public IXUILabel Level;
+
+ public IXUILabel Rank;
+
+ public IXUILabel MemberCount;
+
+ public IXUILabel Exp;
+
+ public IXUISprite Portrait;
+
+ public IXUILabel Liveness;
+
+ public IXUILabel Popularity;
+
+ public IXUILabel Technology;
+
+ public IXUILabel Resources;
+
+ public void Init(Transform go, bool bFirstInit)
+ {
+ this.Root = go;
+ Transform transform = this.Root.Find("GuildName");
+ bool flag = transform != null;
+ if (flag)
+ {
+ this.GuildName = (transform.GetComponent("XUILabel") as IXUILabel);
+ if (bFirstInit)
+ {
+ this.GuildName.SetText("");
+ }
+ }
+ else
+ {
+ this.GuildName = null;
+ }
+ transform = this.Root.Find("LeaderName");
+ bool flag2 = transform != null;
+ if (flag2)
+ {
+ this.LeaderName = (transform.GetComponent("XUILabel") as IXUILabel);
+ if (bFirstInit)
+ {
+ this.LeaderName.SetText("");
+ }
+ }
+ else
+ {
+ this.LeaderName = null;
+ }
+ transform = this.Root.Find("Announcement");
+ bool flag3 = transform != null;
+ if (flag3)
+ {
+ this.Annoucement = (transform.GetComponent("XUILabel") as IXUILabel);
+ if (bFirstInit)
+ {
+ this.Annoucement.SetText("");
+ }
+ }
+ else
+ {
+ this.Annoucement = null;
+ }
+ transform = this.Root.Find("Level");
+ bool flag4 = transform != null;
+ if (flag4)
+ {
+ this.Level = (transform.GetComponent("XUILabel") as IXUILabel);
+ if (bFirstInit)
+ {
+ this.Level.SetText("");
+ }
+ }
+ else
+ {
+ this.Level = null;
+ }
+ transform = this.Root.Find("Rank");
+ bool flag5 = transform != null;
+ if (flag5)
+ {
+ this.Rank = (transform.GetComponent("XUILabel") as IXUILabel);
+ if (bFirstInit)
+ {
+ this.Rank.SetText("");
+ }
+ }
+ else
+ {
+ this.Rank = null;
+ }
+ transform = this.Root.Find("MemberCount");
+ bool flag6 = transform != null;
+ if (flag6)
+ {
+ this.MemberCount = (transform.GetComponent("XUILabel") as IXUILabel);
+ if (bFirstInit)
+ {
+ this.MemberCount.SetText("");
+ }
+ }
+ else
+ {
+ this.MemberCount = null;
+ }
+ transform = this.Root.Find("Exp");
+ bool flag7 = transform != null;
+ if (flag7)
+ {
+ this.Exp = (transform.GetComponent("XUILabel") as IXUILabel);
+ if (bFirstInit)
+ {
+ this.Exp.SetText("");
+ }
+ }
+ else
+ {
+ this.Exp = null;
+ }
+ transform = this.Root.Find("Portrait");
+ bool flag8 = transform != null;
+ if (flag8)
+ {
+ this.Portrait = (transform.GetComponent("XUISprite") as IXUISprite);
+ }
+ else
+ {
+ this.Portrait = null;
+ }
+ transform = this.Root.Find("Liveness");
+ bool flag9 = transform != null;
+ if (flag9)
+ {
+ this.Liveness = (transform.GetComponent("XUILabel") as IXUILabel);
+ }
+ else
+ {
+ this.Liveness = null;
+ }
+ transform = this.Root.Find("Popularity");
+ bool flag10 = transform != null;
+ if (flag10)
+ {
+ this.Popularity = (transform.GetComponent("XUILabel") as IXUILabel);
+ }
+ else
+ {
+ this.Popularity = null;
+ }
+ transform = this.Root.Find("Technology");
+ bool flag11 = transform != null;
+ if (flag11)
+ {
+ this.Technology = (transform.GetComponent("XUILabel") as IXUILabel);
+ }
+ transform = this.Root.Find("Resources");
+ bool flag12 = transform != null;
+ if (flag12)
+ {
+ this.Resources = (transform.GetComponent("XUILabel") as IXUILabel);
+ }
+ }
+
+ public void Set(XGuildBasicData data)
+ {
+ bool flag = this.GuildName != null;
+ if (flag)
+ {
+ this.GuildName.SetText(data.guildName);
+ }
+ bool flag2 = this.LeaderName != null;
+ if (flag2)
+ {
+ this.LeaderName.SetText(data.leaderName);
+ }
+ bool flag3 = this.Annoucement != null;
+ if (flag3)
+ {
+ this.Annoucement.SetText(data.announcement);
+ }
+ bool flag4 = this.Level != null;
+ if (flag4)
+ {
+ this.Level.SetText("Lv." + data.level);
+ }
+ bool flag5 = this.MemberCount != null;
+ if (flag5)
+ {
+ this.MemberCount.SetText(string.Format("{0}/{1}", data.memberCount, data.maxMemberCount));
+ }
+ bool flag6 = this.Portrait != null;
+ if (flag6)
+ {
+ this.Portrait.SetSprite(XGuildDocument.GetPortraitName(data.portraitIndex));
+ }
+ bool flag7 = this.Exp != null;
+ if (flag7)
+ {
+ this.Exp.SetText(string.Format("{0}/{1}", XSingleton<UiUtility>.singleton.NumberFormat((ulong)(XGuildDocument.GuildConfig.GetBaseExp(data.level) + data.exp)), XSingleton<UiUtility>.singleton.NumberFormat((ulong)XGuildDocument.GuildConfig.GetTotalExp(data.level))));
+ }
+ bool flag8 = this.Rank != null;
+ if (flag8)
+ {
+ this.Rank.SetText("No." + data.rank);
+ }
+ bool flag9 = this.Liveness != null;
+ if (flag9)
+ {
+ this.Liveness.SetText(data.GetLiveness());
+ }
+ bool flag10 = this.Popularity != null;
+ if (flag10)
+ {
+ this.Popularity.SetText(data.popularity.ToString());
+ }
+ bool flag11 = this.Technology != null;
+ if (flag11)
+ {
+ this.Technology.SetText(data.technology.ToString());
+ }
+ bool flag12 = this.Resources != null;
+ if (flag12)
+ {
+ this.Resources.SetText(data.resource.ToString());
+ }
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/XGuildBasicInfoDisplay.cs.meta b/Client/Assets/Scripts/XMainClient/UI/XGuildBasicInfoDisplay.cs.meta
new file mode 100644
index 00000000..e772c71a
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XGuildBasicInfoDisplay.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: bc703fd132908b2488749bad0ae7c3e2
+timeCreated: 1611404446
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/XGuildBoonView.cs b/Client/Assets/Scripts/XMainClient/UI/XGuildBoonView.cs
new file mode 100644
index 00000000..b5be96b2
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XGuildBoonView.cs
@@ -0,0 +1,121 @@
+using System;
+using System.Collections.Generic;
+using UILib;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class XGuildBoonView : DlgBase<XGuildBoonView, XGuildBoonBehaviour>
+ {
+ public override string fileName
+ {
+ get
+ {
+ return "Guild/GuildSystem/GuildBoonDlg";
+ }
+ }
+
+ public override int layer
+ {
+ get
+ {
+ return 1;
+ }
+ }
+
+ public override bool pushstack
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override bool hideMainMenu
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override bool autoload
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ private static Dictionary<XSysDefine, string> _BoonBg = new Dictionary<XSysDefine, string>(default(XFastEnumIntEqualityComparer<XSysDefine>));
+
+ private XSubSysRedPointMgr redpointMgr = new XSubSysRedPointMgr();
+
+ static XGuildBoonView()
+ {
+ XGuildBoonView._BoonBg.Add(XSysDefine.XSys_GuildBoon_RedPacket, "gh_btn_ghhb");
+ XGuildBoonView._BoonBg.Add(XSysDefine.XSys_GuildBoon_Shop, "gh_btn_ghsd");
+ XGuildBoonView._BoonBg.Add(XSysDefine.XSys_GuildBoon_Salay, "gh_btn_ghhyd");
+ }
+
+ protected override void Init()
+ {
+ }
+
+ protected override void OnUnload()
+ {
+ base.OnUnload();
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ this.Refresh();
+ base.uiBehaviour.m_ScrollView.ResetPosition();
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ base.uiBehaviour.m_Close.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnCloseClick));
+ }
+
+ public override void StackRefresh()
+ {
+ base.StackRefresh();
+ this.Refresh();
+ }
+
+ private bool OnCloseClick(IXUIButton button)
+ {
+ this.SetVisibleWithAnimation(false, null);
+ return true;
+ }
+
+ public void Refresh()
+ {
+ }
+
+ public void RefreshRedPoints()
+ {
+ this.redpointMgr.UpdateRedPointUI();
+ }
+
+ private void OnBoonClick(IXUITexture sp)
+ {
+ switch ((int)sp.ID)
+ {
+ case 830:
+ DlgBase<XGuildSignRedPackageView, XGuildSignRedPackageBehaviour>.singleton.SetVisibleWithAnimation(true, null);
+ break;
+ case 831:
+ DlgBase<MallSystemDlg, MallSystemBehaviour>.singleton.ShowShopSystem(XSysDefine.XSys_Mall_Guild, 0UL);
+ break;
+ case 833:
+ DlgBase<GuildSalayDlg, GuildSalayBehavior>.singleton.SetVisibleWithAnimation(true, null);
+ break;
+ }
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/XGuildBoonView.cs.meta b/Client/Assets/Scripts/XMainClient/UI/XGuildBoonView.cs.meta
new file mode 100644
index 00000000..4cf7097d
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XGuildBoonView.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 4fdb5e2d68db69c4db73cb366e74606f
+timeCreated: 1611403701
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/XGuildCreateView.cs b/Client/Assets/Scripts/XMainClient/UI/XGuildCreateView.cs
new file mode 100644
index 00000000..66b0086b
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XGuildCreateView.cs
@@ -0,0 +1,186 @@
+using System;
+using System.Collections.Generic;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class XGuildCreateView : DlgHandlerBase
+ {
+ private IXUIInput m_NameInput;
+
+ private IXUILabel m_Cost;
+
+ private IXUISprite m_Portrait;
+
+ private GameObject m_CreatePanel;
+
+ private GameObject m_VipPanel;
+
+ private int m_PortraitIndex;
+
+ private int m_CostNum;
+
+ private GameObject m_CreateHighlight;
+
+ private Dictionary<IXUIButton, string> m_helpList = new Dictionary<IXUIButton, string>();
+
+ private XGuildListDocument _doc;
+
+ private XGuildDocument m_GuildDoc;
+
+ protected override void Init()
+ {
+ this.m_CreatePanel = base.PanelObject.transform.Find("CreateMenu").gameObject;
+ this.m_VipPanel = base.PanelObject.transform.Find("VipMenu").gameObject;
+ this.m_NameInput = (base.PanelObject.transform.Find("CreateMenu/NameInput").GetComponent("XUIInput") as IXUIInput);
+ this.m_Cost = (base.PanelObject.transform.Find("CreateMenu/OK/MoneyCost").GetComponent("XUILabel") as IXUILabel);
+ this.m_CostNum = XSingleton<XGlobalConfig>.singleton.GetInt("GuildCreateCost");
+ this.m_Cost.SetText(this.m_CostNum.ToString());
+ IXUILabelSymbol ixuilabelSymbol = base.PanelObject.transform.Find("VipMenu/Note").GetComponent("XUILabelSymbol") as IXUILabelSymbol;
+ ixuilabelSymbol.InputText = XStringDefineProxy.GetString("GUILD_CREATE_VIP_REQUIRE", new object[]
+ {
+ XSingleton<XGlobalConfig>.singleton.GetInt("GuildCreateVipRequirement")
+ });
+ this.m_Portrait = (base.PanelObject.transform.Find("CreateMenu/Portrait").GetComponent("XUISprite") as IXUISprite);
+ this._doc = XDocuments.GetSpecificDocument<XGuildListDocument>(XGuildListDocument.uuID);
+ this.m_GuildDoc = XDocuments.GetSpecificDocument<XGuildDocument>(XGuildDocument.uuID);
+ this.m_PortraitIndex = XSingleton<XCommon>.singleton.RandomInt(XGuildPortraitView.PORTRAIT_COUNT);
+ this.m_CreateHighlight = base.PanelObject.transform.Find("CreateMenu/OK/Highlight").gameObject;
+ Transform transform = base.PanelObject.transform.Find("CreateMenu/HelpList");
+ int i = 0;
+ int childCount = transform.childCount;
+ while (i < childCount)
+ {
+ Transform child = transform.GetChild(i);
+ this.m_helpList.Add(child.GetComponent("XUIButton") as IXUIButton, child.name);
+ Guildintroduce.RowData introduce = this.m_GuildDoc.GetIntroduce(child.name);
+ bool flag = introduce != null;
+ if (flag)
+ {
+ IXUILabel ixuilabel = child.Find("Label").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel.SetText(introduce.Title);
+ }
+ i++;
+ }
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ IXUIButton ixuibutton = base.PanelObject.transform.Find("VipMenu/Close").GetComponent("XUIButton") as IXUIButton;
+ IXUIButton ixuibutton2 = base.PanelObject.transform.Find("CreateMenu/Close").GetComponent("XUIButton") as IXUIButton;
+ ixuibutton.RegisterClickEventHandler(new ButtonClickEventHandler(this._OnCloseBtnClick));
+ ixuibutton2.RegisterClickEventHandler(new ButtonClickEventHandler(this._OnCloseBtnClick));
+ IXUIButton ixuibutton3 = base.PanelObject.transform.Find("CreateMenu/OK").GetComponent("XUIButton") as IXUIButton;
+ ixuibutton3.RegisterClickEventHandler(new ButtonClickEventHandler(this._OnCreateBtnClicked));
+ IXUIButton ixuibutton4 = base.PanelObject.transform.Find("VipMenu/OK").GetComponent("XUIButton") as IXUIButton;
+ ixuibutton4.RegisterClickEventHandler(new ButtonClickEventHandler(this._OnVipBtnClicked));
+ IXUIButton ixuibutton5 = base.PanelObject.transform.Find("CreateMenu/EditPortrait").GetComponent("XUIButton") as IXUIButton;
+ ixuibutton5.RegisterClickEventHandler(new ButtonClickEventHandler(this._OnEditPortraitClicked));
+ foreach (IXUIButton ixuibutton6 in this.m_helpList.Keys)
+ {
+ ixuibutton6.RegisterClickEventHandler(new ButtonClickEventHandler(this._ShowCreateHelpClick));
+ }
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ XRechargeDocument specificDocument = XDocuments.GetSpecificDocument<XRechargeDocument>(XRechargeDocument.uuID);
+ int vipLevel = (int)specificDocument.VipLevel;
+ bool flag = vipLevel >= XSingleton<XGlobalConfig>.singleton.GetInt("GuildCreateVipRequirement");
+ this.m_CreatePanel.SetActive(flag);
+ this.m_VipPanel.SetActive(!flag);
+ this.m_NameInput.SetText("");
+ this.m_Portrait.SetSprite(XGuildDocument.GetPortraitName(this.m_PortraitIndex));
+ bool flag2 = flag;
+ if (flag2)
+ {
+ this.m_CreateHighlight.SetActive(XSingleton<XGame>.singleton.Doc.XBagDoc.GetVirtualItemCount(ItemEnum.DRAGON_COIN) >= (ulong)((long)this.m_CostNum));
+ }
+ }
+
+ public override void OnUnload()
+ {
+ bool flag = this.m_helpList != null;
+ if (flag)
+ {
+ this.m_helpList.Clear();
+ this.m_helpList = null;
+ }
+ base.OnUnload();
+ }
+
+ protected override void OnHide()
+ {
+ base.OnHide();
+ }
+
+ private bool _ShowCreateHelpClick(IXUIButton button)
+ {
+ string helpName;
+ bool flag = this.m_helpList.TryGetValue(button, out helpName);
+ bool result;
+ if (flag)
+ {
+ XGuildDocument specificDocument = XDocuments.GetSpecificDocument<XGuildDocument>(XGuildDocument.uuID);
+ Guildintroduce.RowData introduce = specificDocument.GetIntroduce(helpName);
+ bool flag2 = introduce != null;
+ if (flag2)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemHelp(introduce.Desc, introduce.Title, XStringDefineProxy.GetString(XStringDefine.COMMON_OK));
+ }
+ result = true;
+ }
+ else
+ {
+ result = false;
+ }
+ return result;
+ }
+
+ private bool _OnCreateBtnClicked(IXUIButton btn)
+ {
+ string text = this.m_NameInput.GetText();
+ bool flag = text.Length == 0;
+ if (flag)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString("GUILD_CREATE_NAME_REQUIRE"), "fece00");
+ }
+ else
+ {
+ this._doc.ReqCreateGuild(text, this.m_PortraitIndex);
+ }
+ return true;
+ }
+
+ private bool _OnVipBtnClicked(IXUIButton btn)
+ {
+ XSingleton<XGameSysMgr>.singleton.OpenSystem(XSysDefine.XSys_Money, 0UL);
+ base.SetVisible(false);
+ return true;
+ }
+
+ private bool _OnCloseBtnClick(IXUIButton go)
+ {
+ base.SetVisible(false);
+ return true;
+ }
+
+ private bool _OnEditPortraitClicked(IXUIButton btn)
+ {
+ DlgBase<XGuildPortraitView, XGuildPortraitBehaviour>.singleton.Open(this.m_PortraitIndex, new ButtonClickEventHandler(this._OnPortraitChanged));
+ return true;
+ }
+
+ private bool _OnPortraitChanged(IXUIButton go)
+ {
+ this.m_PortraitIndex = DlgBase<XGuildPortraitView, XGuildPortraitBehaviour>.singleton.PortraitIndex;
+ this.m_Portrait.SetSprite(XGuildDocument.GetPortraitName(this.m_PortraitIndex));
+ return true;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/XGuildCreateView.cs.meta b/Client/Assets/Scripts/XMainClient/UI/XGuildCreateView.cs.meta
new file mode 100644
index 00000000..89994f65
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XGuildCreateView.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: b2b4327143dbc2b4fa31665d22f94107
+timeCreated: 1611404386
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/XGuildDragonView.cs b/Client/Assets/Scripts/XMainClient/UI/XGuildDragonView.cs
new file mode 100644
index 00000000..e36d195d
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XGuildDragonView.cs
@@ -0,0 +1,492 @@
+using System;
+using System.Collections.Generic;
+using KKSG;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class XGuildDragonView : DlgBase<XGuildDragonView, XGuildDragonBehaviour>
+ {
+ public override string fileName
+ {
+ get
+ {
+ return "Guild/GuildBossDlg";
+ }
+ }
+
+ public override int layer
+ {
+ get
+ {
+ return 1;
+ }
+ }
+
+ public override bool pushstack
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override bool hideMainMenu
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override bool autoload
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override bool fullscreenui
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public static readonly int REWARD_COUNT = 3;
+
+ private XGuildDragonDocument _Doc;
+
+ private XLeftTimeCounter m_LeftTime;
+
+ private uint mBossHp = 0u;
+
+ private ulong SubscribebuttonID = 0UL;
+
+ protected override void Init()
+ {
+ base.Init();
+ this.m_LeftTime = new XLeftTimeCounter(base.uiBehaviour.m_LeftTime, false);
+ this._Doc = XDocuments.GetSpecificDocument<XGuildDragonDocument>(XGuildDragonDocument.uuID);
+ this._Doc.GuildDragonView = this;
+ base.uiBehaviour.m_WrapContent.RegisterItemUpdateEventHandler(new WrapItemUpdateEventHandler(this.GuildRankWrapContentItemUpdated));
+ }
+
+ public void ShowGuildBossView()
+ {
+ XGuildDocument specificDocument = XDocuments.GetSpecificDocument<XGuildDocument>(XGuildDocument.uuID);
+ bool flag = !specificDocument.bInGuild;
+ if (flag)
+ {
+ XSingleton<UiUtility>.singleton.ShowModalDialog(XStringDefineProxy.GetString("MulActivity_ShowTips3"), XStringDefineProxy.GetString("COMMON_OK"), XStringDefineProxy.GetString("COMMON_CANCEL"), new ButtonClickEventHandler(this.JoinGuild));
+ }
+ else
+ {
+ bool flag2 = !base.IsVisible();
+ if (flag2)
+ {
+ this.SetVisibleWithAnimation(true, null);
+ }
+ }
+ }
+
+ private bool JoinGuild(IXUIButton btn)
+ {
+ DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.SetVisible(false, true);
+ DlgBase<XGuildListView, XGuildListBehaviour>.singleton.SetVisibleWithAnimation(true, null);
+ return true;
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ this._Doc.ReqGuildBossInfo();
+ this._Doc.ReqBossRoleRank(false);
+ this._Doc.ReqWorldBossState();
+ base.uiBehaviour.m_LeftTime.SetVisible(false);
+ base.uiBehaviour.m_LeftTimeHint.gameObject.SetActive(false);
+ base.uiBehaviour.m_RewardPanel.SetActive(false);
+ this.RefreshPrivilegeInfo();
+ this.ShowTimeSection();
+ this.RefreshSubscribe();
+ }
+
+ private void RefreshPrivilegeInfo()
+ {
+ XWelfareDocument specificDocument = XDocuments.GetSpecificDocument<XWelfareDocument>(XWelfareDocument.uuID);
+ base.uiBehaviour.m_PrivilegeIcon.SetGrey(specificDocument.IsOwnMemberPrivilege(MemberPrivilege.KingdomPrivilege_Commerce));
+ base.uiBehaviour.m_PrivilegeIcon.SetSprite(specificDocument.GetMemberPrivilegeIcon(MemberPrivilege.KingdomPrivilege_Commerce));
+ base.uiBehaviour.m_PrivilegeName.SetEnabled(specificDocument.IsOwnMemberPrivilege(MemberPrivilege.KingdomPrivilege_Commerce));
+ PayMemberTable.RowData memberPrivilegeConfig = specificDocument.GetMemberPrivilegeConfig(MemberPrivilege.KingdomPrivilege_Commerce);
+ bool flag = memberPrivilegeConfig != null;
+ if (flag)
+ {
+ BuffTable.RowData buffData = XSingleton<XBuffTemplateManager>.singleton.GetBuffData((int)memberPrivilegeConfig.guildBossBuffid[0], (int)memberPrivilegeConfig.guildBossBuffid[1]);
+ bool flag2 = buffData != null;
+ if (flag2)
+ {
+ base.uiBehaviour.m_PrivilegeName.SetText(XStringDefineProxy.GetString("WORLDBOSS_PRIVILEGE_BUFF", new object[]
+ {
+ buffData.BuffName
+ }));
+ }
+ base.uiBehaviour.m_PrivilegeIcon.SetVisible(buffData != null);
+ }
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ base.uiBehaviour.m_BtnClose.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnCloseClick));
+ base.uiBehaviour.m_BtnRank.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnRankClick));
+ base.uiBehaviour.m_BtnGoBattle.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnGoBattleClick));
+ base.uiBehaviour.m_BtnReward.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnRewardClick));
+ base.uiBehaviour.m_BtnSubscribe.ID = 0UL;
+ base.uiBehaviour.m_BtnSubscribe.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnSubscribeClick));
+ base.uiBehaviour.m_BtnCancelSubscribe.ID = 1UL;
+ base.uiBehaviour.m_BtnCancelSubscribe.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnSubscribeClick));
+ base.uiBehaviour.m_Privilege.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnPrivilegeClick));
+ }
+
+ protected override void OnUnload()
+ {
+ this.m_LeftTime = null;
+ this._Doc.GuildDragonView = null;
+ base.OnUnload();
+ }
+
+ public override void OnUpdate()
+ {
+ base.OnUpdate();
+ bool flag = this.m_LeftTime != null;
+ if (flag)
+ {
+ this.m_LeftTime.Update();
+ bool flag2 = this.m_LeftTime.GetLeftTime() <= 0;
+ if (flag2)
+ {
+ this.UpdateLeftTimeState(0f, this.mBossHp);
+ }
+ }
+ }
+
+ private void ShowTimeSection()
+ {
+ int num = 0;
+ int num2 = 0;
+ this._Doc.GetWorldBossTime(ref num, ref num2);
+ string arg = string.Format("{0}:{1}", (num / 100).ToString("D2"), (num % 100).ToString("D2"));
+ string arg2 = string.Format("{0}:{1}", (num2 / 100).ToString("D2"), (num2 % 100).ToString("D2"));
+ base.uiBehaviour.m_OpenTime.SetText(string.Format(XStringDefineProxy.GetString("WORLDBOSS_OPEN_TIME"), arg, arg2));
+ }
+
+ public void SetLeftTime(float time, uint BossHp)
+ {
+ this.m_LeftTime.SetLeftTime(time, -1);
+ base.uiBehaviour.m_LeftTime.SetVisible(time > 0f);
+ this.UpdateLeftTimeState(time, BossHp);
+ }
+
+ private void UpdateLeftTimeState(float time, uint BossHp)
+ {
+ this.mBossHp = BossHp;
+ bool flag = time <= 0f;
+ if (flag)
+ {
+ base.uiBehaviour.m_LeftTimeHint.gameObject.SetActive(true);
+ base.uiBehaviour.m_LeftTime.gameObject.SetActive(false);
+ bool flag2 = BossHp > 0u;
+ if (flag2)
+ {
+ base.uiBehaviour.m_LeftTimeHint.SetText(XStringDefineProxy.GetString("GUILD_BOSS_CONDITION_TIME"));
+ }
+ else
+ {
+ base.uiBehaviour.m_LeftTimeHint.SetText(XStringDefineProxy.GetString("GUILD_BOSS_CONDITION_BOSSDIE"));
+ }
+ }
+ else
+ {
+ base.uiBehaviour.m_LeftTimeHint.gameObject.SetActive(false);
+ bool flag3 = BossHp <= 0u;
+ if (flag3)
+ {
+ base.uiBehaviour.m_LeftTimeHint.gameObject.SetActive(true);
+ base.uiBehaviour.m_LeftTime.gameObject.SetActive(false);
+ base.uiBehaviour.m_LeftTimeHint.SetText(XStringDefineProxy.GetString("GUILD_BOSS_CONDITION_BOSSDIE"));
+ }
+ }
+ }
+
+ private bool OnCloseClick(IXUIButton button)
+ {
+ this.SetVisibleWithAnimation(false, null);
+ return true;
+ }
+
+ private bool OnRankClick(IXUIButton button)
+ {
+ DlgBase<XRankView, XRankBehaviour>.singleton.ShowRank(XSysDefine.XSys_Rank_GuildBoss);
+ return true;
+ }
+
+ private bool OnRewardClick(IXUIButton button)
+ {
+ base.uiBehaviour.m_RewardPanel.SetActive(true);
+ XSingleton<XBossRewardDlg>.singleton.Init(base.uiBehaviour.m_RewardPanel);
+ return true;
+ }
+
+ private bool OnSubscribeClick(IXUIButton button)
+ {
+ this.SubscribebuttonID = button.ID;
+ PushSubscribeTable.RowData pushSubscribe = XPushSubscribeDocument.GetPushSubscribe(PushSubscribeOptions.GuildBoss);
+ XSingleton<UiUtility>.singleton.ShowModalDialog((button.ID == 0UL) ? pushSubscribe.SubscribeDescription : pushSubscribe.CancelDescription, XStringDefineProxy.GetString("COMMON_OK"), XStringDefineProxy.GetString("COMMON_CANCEL"), new ButtonClickEventHandler(this.ReqSubscribeChange));
+ return true;
+ }
+
+ private bool ReqSubscribeChange(IXUIButton button)
+ {
+ XSingleton<UiUtility>.singleton.CloseModalDlg();
+ XPushSubscribeDocument specificDocument = XDocuments.GetSpecificDocument<XPushSubscribeDocument>(XPushSubscribeDocument.uuID);
+ specificDocument.ReqSetSubscribe(PushSubscribeOptions.GuildBoss, this.SubscribebuttonID == 0UL);
+ return true;
+ }
+
+ public void RefreshSubscribe()
+ {
+ PushSubscribeTable.RowData pushSubscribe = XPushSubscribeDocument.GetPushSubscribe(PushSubscribeOptions.GuildBoss);
+ XPushSubscribeDocument specificDocument = XDocuments.GetSpecificDocument<XPushSubscribeDocument>(XPushSubscribeDocument.uuID);
+ bool flag = XSingleton<XClientNetwork>.singleton.AccountType == LoginType.LGOIN_WECHAT_PF && pushSubscribe.IsShow && specificDocument.OptionsDefault != null && specificDocument.OptionsDefault.Count != 0;
+ if (flag)
+ {
+ bool curSubscribeStatus = specificDocument.GetCurSubscribeStatus(PushSubscribeOptions.GuildBoss);
+ base.uiBehaviour.m_BtnSubscribe.gameObject.SetActive(!curSubscribeStatus);
+ base.uiBehaviour.m_BtnCancelSubscribe.gameObject.SetActive(curSubscribeStatus);
+ }
+ else
+ {
+ base.uiBehaviour.m_BtnSubscribe.gameObject.SetActive(false);
+ base.uiBehaviour.m_BtnCancelSubscribe.gameObject.SetActive(false);
+ }
+ }
+
+ private bool OnGoBattleClick(IXUIButton button)
+ {
+ bool flag = this.m_LeftTime.GetLeftTime() > 0;
+ bool result;
+ if (flag)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString("GUILD_BOSS_CONDITION_TIME_NOTSTART"), "fece00");
+ result = false;
+ }
+ else
+ {
+ bool flag2 = this.mBossHp <= 0u;
+ if (flag2)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString("GUILD_BOSS_CONDITION_BOSSDIE_HINT"), "fece00");
+ result = false;
+ }
+ else
+ {
+ bool flag3 = XSingleton<XGameSysMgr>.singleton.IsSystemOpened(XSysDefine.XSys_GuildDragon);
+ if (flag3)
+ {
+ bool flag4 = XTeamDocument.GoSingleBattleBeforeNeed(new ButtonClickEventHandler(this.OnGoBattleClick), button);
+ if (flag4)
+ {
+ return true;
+ }
+ this._Doc.ReqEnterScene();
+ }
+ else
+ {
+ int sysOpenLevel = XSingleton<XGameSysMgr>.singleton.GetSysOpenLevel(XFastEnumIntEqualityComparer<XSysDefine>.ToInt(XSysDefine.XSys_GuildDragon));
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString("ERR_GUILD_DRAGONOPEN", new object[]
+ {
+ sysOpenLevel
+ }), "fece00");
+ }
+ result = true;
+ }
+ }
+ return result;
+ }
+
+ public void RefreshGuildRoleRank()
+ {
+ List<XBaseRankInfo> rankList = this._Doc.PersonRankList.rankList;
+ bool flag = rankList.Count == 0;
+ if (flag)
+ {
+ base.uiBehaviour.m_RankPanel_EmptyRank.gameObject.SetActive(true);
+ base.uiBehaviour.m_RankPanel_EmptyRank.SetText(XStringDefineProxy.GetString("GUILD_BOSS_EMPTY_RANK"));
+ base.uiBehaviour.m_WrapContent.gameObject.SetActive(false);
+ }
+ else
+ {
+ base.uiBehaviour.m_RankPanel_EmptyRank.gameObject.SetActive(false);
+ base.uiBehaviour.m_WrapContent.gameObject.SetActive(true);
+ base.uiBehaviour.m_WrapContent.SetContentCount(rankList.Count, false);
+ base.uiBehaviour.m_ScrollView.ResetPosition();
+ }
+ }
+
+ private void GuildRankWrapContentItemUpdated(Transform t, int index)
+ {
+ List<XBaseRankInfo> rankList = this._Doc.PersonRankList.rankList;
+ bool flag = index < 0 || index >= rankList.Count;
+ if (!flag)
+ {
+ XWorldBossDamageRankInfo xworldBossDamageRankInfo = rankList[index] as XWorldBossDamageRankInfo;
+ bool flag2 = xworldBossDamageRankInfo == null;
+ if (flag2)
+ {
+ XSingleton<XDebug>.singleton.AddErrorLog("XGuildDragonView.GuildRankWrapContentItemUpdated is null ", null, null, null, null, null);
+ }
+ else
+ {
+ IXUISprite ixuisprite = t.Find("Rank").GetComponent("XUISprite") as IXUISprite;
+ IXUILabel ixuilabel = t.Find("Rank3").GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel2 = t.Find("Name").GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel3 = t.Find("shanghai").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel3.SetText(XSingleton<UiUtility>.singleton.NumberFormatBillion((ulong)xworldBossDamageRankInfo.damage));
+ ixuilabel2.SetText(xworldBossDamageRankInfo.name);
+ switch (index)
+ {
+ case 0:
+ ixuisprite.spriteName = "N1";
+ ixuisprite.SetVisible(true);
+ break;
+ case 1:
+ ixuisprite.spriteName = "N2";
+ ixuisprite.SetVisible(true);
+ break;
+ case 2:
+ ixuisprite.spriteName = "N3";
+ ixuisprite.SetVisible(true);
+ break;
+ default:
+ ixuisprite.SetVisible(false);
+ ixuilabel.SetText((index + 1).ToString());
+ break;
+ }
+ }
+ }
+ }
+
+ public void _SetMyRankFrame(XBaseRankList list)
+ {
+ bool flag = list.rankList.Count == 0;
+ if (flag)
+ {
+ base.uiBehaviour.outofRange.SetActive(false);
+ base.uiBehaviour.rankInfo.SetActive(false);
+ }
+ else
+ {
+ XBaseRankInfo latestMyRankInfo = list.GetLatestMyRankInfo();
+ bool flag2 = latestMyRankInfo == null || latestMyRankInfo.id == 0UL;
+ if (flag2)
+ {
+ base.uiBehaviour.rankInfo.SetActive(false);
+ }
+ else
+ {
+ base.uiBehaviour.rankInfo.SetActive(true);
+ IXUISprite ixuisprite = base.uiBehaviour.rankInfo.transform.Find("Rank").GetComponent("XUISprite") as IXUISprite;
+ IXUILabel ixuilabel = base.uiBehaviour.rankInfo.transform.Find("Name").gameObject.GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel2 = base.uiBehaviour.rankInfo.transform.Find("shanghai").gameObject.GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel3 = base.uiBehaviour.rankInfo.transform.Find("Rank3").gameObject.GetComponent("XUILabel") as IXUILabel;
+ ixuilabel.SetText(latestMyRankInfo.name);
+ XWorldBossDamageRankInfo xworldBossDamageRankInfo = latestMyRankInfo as XWorldBossDamageRankInfo;
+ float num = 0f;
+ bool flag3 = xworldBossDamageRankInfo != null;
+ if (flag3)
+ {
+ num = xworldBossDamageRankInfo.damage;
+ }
+ ixuilabel2.SetText(XSingleton<UiUtility>.singleton.NumberFormatBillion((ulong)num));
+ switch (latestMyRankInfo.rank)
+ {
+ case 0u:
+ ixuisprite.spriteName = "N1";
+ ixuisprite.SetVisible(true);
+ break;
+ case 1u:
+ ixuisprite.spriteName = "N2";
+ ixuisprite.SetVisible(true);
+ break;
+ case 2u:
+ ixuisprite.spriteName = "N3";
+ ixuisprite.SetVisible(true);
+ break;
+ default:
+ ixuisprite.SetVisible(false);
+ ixuilabel3.SetText((latestMyRankInfo.rank + 1u).ToString());
+ break;
+ }
+ base.uiBehaviour.outofRange.SetActive(latestMyRankInfo.rank == XRankDocument.INVALID_RANK);
+ }
+ }
+ }
+
+ public void ShowDropList(int order, string title, uint listDropList0, uint listDropList1)
+ {
+ GameObject gameObject = base.uiBehaviour.transform.Find("Bg/Frame/DropFrame/Item" + order).gameObject;
+ bool flag = listDropList0 == uint.MaxValue && listDropList1 == uint.MaxValue;
+ if (flag)
+ {
+ gameObject.SetActive(false);
+ }
+ else
+ {
+ XSingleton<XItemDrawerMgr>.singleton.normalItemDrawer.DrawItem(gameObject, (int)listDropList0, (int)listDropList1, false);
+ IXUISprite ixuisprite = gameObject.transform.Find("Icon").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.ID = (ulong)listDropList0;
+ ixuisprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(XSingleton<UiUtility>.singleton.OnItemClick));
+ IXUILabel ixuilabel = gameObject.transform.Find("ssssss").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel.SetText(title);
+ }
+ }
+
+ public void ShowCurrentBoss(AskGuildBossInfoRes oRes, string BossNamePrefix, uint BossID, uint rank)
+ {
+ string name = XSingleton<XEntityMgr>.singleton.EntityStatistics.GetByID(BossID).Name;
+ base.uiBehaviour.m_BossName.SetText(BossNamePrefix + name);
+ string text = string.Empty;
+ bool flag = oRes.needguildlvl > 0u;
+ if (flag)
+ {
+ text += string.Format(XStringDefineProxy.GetString("GUILD_BOSS_CONDITION_RANK"), rank);
+ }
+ bool flag2 = !string.IsNullOrEmpty(text);
+ if (flag2)
+ {
+ text += ",";
+ }
+ bool flag3 = oRes.needKillBossId > 0u;
+ if (flag3)
+ {
+ text += string.Format(XStringDefineProxy.GetString("GUILD_BOSS_CONDITION_BOSS"), new object[0]);
+ }
+ base.uiBehaviour.m_Condition.SetText(text);
+ bool flag4 = oRes.needguildlvl == 0u && oRes.needKillBossId == 0u;
+ if (flag4)
+ {
+ base.uiBehaviour.m_ConditionTitle.SetText("");
+ }
+ }
+
+ private void OnPrivilegeClick(IXUISprite btn)
+ {
+ DlgBase<XWelfareView, XWelfareBehaviour>.singleton.CheckActiveMemberPrivilege(MemberPrivilege.KingdomPrivilege_Commerce);
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/XGuildDragonView.cs.meta b/Client/Assets/Scripts/XMainClient/UI/XGuildDragonView.cs.meta
new file mode 100644
index 00000000..dd8c3dee
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XGuildDragonView.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 90b893bf14e58074cb2ab2d0d0e656f8
+timeCreated: 1611404140
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/XGuildEditAnnounceView.cs b/Client/Assets/Scripts/XMainClient/UI/XGuildEditAnnounceView.cs
new file mode 100644
index 00000000..57ce4cb2
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XGuildEditAnnounceView.cs
@@ -0,0 +1,64 @@
+using System;
+using UILib;
+
+namespace XMainClient.UI
+{
+ internal class XGuildEditAnnounceView : DlgHandlerBase
+ {
+ private IXUIInput m_Input;
+
+ private XGuildHallDocument _HallDoc;
+
+ private XGuildDocument _GuildDoc;
+
+ private string m_inputValue;
+
+ protected override void Init()
+ {
+ this.m_Input = (base.PanelObject.transform.Find("EditAnnounceMenu/Input").GetComponent("XUIInput") as IXUIInput);
+ this._HallDoc = XDocuments.GetSpecificDocument<XGuildHallDocument>(XGuildHallDocument.uuID);
+ this._GuildDoc = XDocuments.GetSpecificDocument<XGuildDocument>(XGuildDocument.uuID);
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ IXUIButton ixuibutton = base.PanelObject.transform.Find("Close").GetComponent("XUIButton") as IXUIButton;
+ ixuibutton.RegisterClickEventHandler(new ButtonClickEventHandler(this._OnCloseBtnClick));
+ IXUIButton ixuibutton2 = base.PanelObject.transform.Find("EditAnnounceMenu/OK").GetComponent("XUIButton") as IXUIButton;
+ ixuibutton2.RegisterClickEventHandler(new ButtonClickEventHandler(this._OnOKBtnClicked));
+ this.m_Input.RegisterChangeEventHandler(new InputChangeEventHandler(this._OnInputChangeHandler));
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ this.m_Input.SetText(this._GuildDoc.BasicData.actualAnnoucement);
+ }
+
+ private void _OnInputChangeHandler(IXUIInput input)
+ {
+ string text = input.GetText();
+ bool flag = string.IsNullOrEmpty(text) || text.Equals(this.m_inputValue);
+ if (!flag)
+ {
+ this.m_inputValue = input.GetText();
+ this.m_inputValue = this.m_inputValue.Replace("\n", string.Empty);
+ input.SetText(this.m_inputValue);
+ }
+ }
+
+ private bool _OnOKBtnClicked(IXUIButton btn)
+ {
+ string text = this.m_Input.GetText();
+ this._HallDoc.ReqEditAnnounce(text);
+ return true;
+ }
+
+ private bool _OnCloseBtnClick(IXUIButton go)
+ {
+ base.SetVisible(false);
+ return true;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/XGuildEditAnnounceView.cs.meta b/Client/Assets/Scripts/XMainClient/UI/XGuildEditAnnounceView.cs.meta
new file mode 100644
index 00000000..9b7a934b
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XGuildEditAnnounceView.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 803e1781a8eca264783ea0632abe5379
+timeCreated: 1611404033
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/XGuildGrowthDonateBehavior.cs b/Client/Assets/Scripts/XMainClient/UI/XGuildGrowthDonateBehavior.cs
new file mode 100644
index 00000000..6c1069d4
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XGuildGrowthDonateBehavior.cs
@@ -0,0 +1,35 @@
+using System;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+
+namespace XMainClient.UI
+{
+ internal class XGuildGrowthDonateBehavior : DlgBehaviourBase
+ {
+ public GameObject RecordDlg;
+
+ public IXUIScrollView ScrollView;
+
+ public IXUIWrapContent WrapContent;
+
+ public IXUIButton CloseBtn;
+
+ public IXUIButton RecordBtn;
+
+ public IXUIScrollView RecordDlgScrollView;
+
+ public IXUIWrapContent RecordWrapContent;
+
+ private void Awake()
+ {
+ this.RecordDlg = base.transform.Find("RecordDlg").gameObject;
+ this.RecordDlgScrollView = (base.transform.Find("RecordDlg/ScrollView").GetComponent("XUIScrollView") as IXUIScrollView);
+ this.RecordWrapContent = (base.transform.Find("RecordDlg/ScrollView/WrapContent").GetComponent("XUIWrapContent") as IXUIWrapContent);
+ this.ScrollView = (base.transform.Find("Panel").GetComponent("XUIScrollView") as IXUIScrollView);
+ this.WrapContent = (base.transform.Find("Panel/WrapContent").GetComponent("XUIWrapContent") as IXUIWrapContent);
+ this.CloseBtn = (base.transform.Find("Close").GetComponent("XUIButton") as IXUIButton);
+ this.RecordBtn = (base.transform.Find("RecordBtn").GetComponent("XUIButton") as IXUIButton);
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/XGuildGrowthDonateBehavior.cs.meta b/Client/Assets/Scripts/XMainClient/UI/XGuildGrowthDonateBehavior.cs.meta
new file mode 100644
index 00000000..5f676175
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XGuildGrowthDonateBehavior.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 09d285db14bf4474ca0214a3a831f7a1
+timeCreated: 1611403159
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/XGuildGrowthEntranceBehavior.cs b/Client/Assets/Scripts/XMainClient/UI/XGuildGrowthEntranceBehavior.cs
new file mode 100644
index 00000000..6cc3b463
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XGuildGrowthEntranceBehavior.cs
@@ -0,0 +1,22 @@
+using System;
+using UILib;
+using XMainClient.UI.UICommon;
+
+namespace XMainClient.UI
+{
+ internal class XGuildGrowthEntranceBehavior : DlgBehaviourBase
+ {
+ public IXUIButton BuilderBtn;
+
+ public IXUIButton LabBtn;
+
+ public IXUIButton CloseBtn;
+
+ private void Awake()
+ {
+ this.BuilderBtn = (base.transform.Find("Bg/Rukou0/BuilderBtn").GetComponent("XUIButton") as IXUIButton);
+ this.LabBtn = (base.transform.Find("Bg/Rukou1/LabBtn").GetComponent("XUIButton") as IXUIButton);
+ this.CloseBtn = (base.transform.Find("Bg/Close").GetComponent("XUIButton") as IXUIButton);
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/XGuildGrowthEntranceBehavior.cs.meta b/Client/Assets/Scripts/XMainClient/UI/XGuildGrowthEntranceBehavior.cs.meta
new file mode 100644
index 00000000..8c8cfd14
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XGuildGrowthEntranceBehavior.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 1e3df84dd4f9775458fc13a4d7d1e455
+timeCreated: 1611403361
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/XGuildHallBehaviour.cs b/Client/Assets/Scripts/XMainClient/UI/XGuildHallBehaviour.cs
new file mode 100644
index 00000000..5cae34fe
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XGuildHallBehaviour.cs
@@ -0,0 +1,163 @@
+using System;
+using System.Collections.Generic;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class XGuildHallBehaviour : DlgBehaviourBase
+ {
+ public IXUIButton m_Close = null;
+
+ public IXUIButton m_BtnExit;
+
+ public IXUIButton m_BtnLog;
+
+ public IXUIButton m_BtnEditAnnounce;
+
+ public IXUIButton m_BtnRank;
+
+ public IXUIButton m_BtnEnter;
+
+ public IXUIButton m_BtnEditPortrait;
+
+ public IXUIButton m_BtnMall;
+
+ public IXUIButton m_BtnSignIn;
+
+ public IXUIButton m_BtnSkill;
+
+ public IXUIButton m_BtnMembers;
+
+ public IXUIButton m_BtnApprove;
+
+ public IXUIButton m_BtnDonate;
+
+ public IXUIButton m_BtnGZ;
+
+ public IXUIButton m_BtnRedPacker;
+
+ public IXUIButton m_BtnDmx;
+
+ public IXUIButton m_BtnJoker;
+
+ public IXUIButton m_BtnConsider;
+
+ public IXUIButton m_BtnBuild;
+
+ public IXUIButton m_BtnWXGroup;
+
+ public IXUIButton m_BtnWXGroupShare;
+
+ public IXUILabel m_WXGroupTip;
+
+ public IXUIButton m_BtnQQGroup;
+
+ public IXUILabel m_QQGroupTip;
+
+ public IXUILabel m_QQGroupName;
+
+ public IXUISprite m_Portrait;
+
+ public IXUISprite m_LivenessTipSprite;
+
+ public IXUILabel m_LivenessTipsLabel;
+
+ public IXUISprite m_PopularityTipSprite;
+
+ public IXUILabel m_PopularityTipLabel;
+
+ public IXUISprite m_ExpTipsSprite;
+
+ public IXUILabel m_ExpTipsLabel;
+
+ public IXUILabel m_Annoucement;
+
+ public GameObject m_EditAnnouncePanel;
+
+ public GameObject m_LogPanel;
+
+ public List<IXUIButton> m_checkGuildList = new List<IXUIButton>();
+
+ public XGuildBasicInfoDisplay m_BasicInfoDisplay = new XGuildBasicInfoDisplay();
+
+ public XUIPool m_ShielterItemPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ public Transform m_GrowthBuffHelpFrame;
+
+ public IXUILabel m_GrowthBuffHelpLabel;
+
+ private void Awake()
+ {
+ this.m_Close = (base.transform.Find("Bg/Close").GetComponent("XUIButton") as IXUIButton);
+ this.m_BtnExit = (base.transform.Find("Bg/BtnExit").GetComponent("XUIButton") as IXUIButton);
+ this.m_BtnSignIn = (base.transform.Find("Bg/BtnSignIn").GetComponent("XUIButton") as IXUIButton);
+ this.m_BtnSignIn.ID = 810UL;
+ this.m_BtnSkill = (base.transform.Find("Bg/BtnSkill").GetComponent("XUIButton") as IXUIButton);
+ this.m_BtnSkill.ID = 812UL;
+ this.m_BtnMembers = (base.transform.Find("Bg/BtnMembers").GetComponent("XUIButton") as IXUIButton);
+ this.m_BtnMembers.ID = 813UL;
+ this.m_BtnApprove = (base.transform.Find("Bg/BtnApprove").GetComponent("XUIButton") as IXUIButton);
+ this.m_BtnApprove.ID = 811UL;
+ this.m_BtnLog = (base.transform.Find("Bg/BtnLog").GetComponent("XUIButton") as IXUIButton);
+ this.m_BtnEditAnnounce = (base.transform.Find("Bg/BtnEditAnnounce").GetComponent("XUIButton") as IXUIButton);
+ this.m_BtnRank = (base.transform.Find("Bg/BtnRank").GetComponent("XUIButton") as IXUIButton);
+ this.m_BtnEnter = (base.transform.Find("Bg/BtnEnter").GetComponent("XUIButton") as IXUIButton);
+ this.m_BtnEnter.ID = 17UL;
+ this.m_BtnMall = (base.transform.Find("Bg/BtnMall").GetComponent("XUIButton") as IXUIButton);
+ this.m_BtnDonate = (base.transform.Find("Bg/Donation").GetComponent("XUIButton") as IXUIButton);
+ this.m_BtnDmx = (base.transform.Find("Bg/BtnDmx").GetComponent("XUIButton") as IXUIButton);
+ this.m_BtnDmx.ID = 840UL;
+ this.m_checkGuildList.Add(this.m_BtnDmx);
+ this.m_BtnGZ = (base.transform.Find("Bg/BtnGz").GetComponent("XUIButton") as IXUIButton);
+ this.m_BtnGZ.ID = 833UL;
+ this.m_BtnRedPacker = (base.transform.Find("Bg/BtnRed").GetComponent("XUIButton") as IXUIButton);
+ this.m_BtnRedPacker.ID = 830UL;
+ this.m_BtnJoker = (base.transform.Find("Bg/BtnJoker").GetComponent("XUIButton") as IXUIButton);
+ this.m_BtnJoker.ID = 820UL;
+ this.m_checkGuildList.Add(this.m_BtnJoker);
+ this.m_BtnConsider = (base.transform.Find("Bg/BtnConsider").GetComponent("XUIButton") as IXUIButton);
+ this.m_BtnConsider.ID = 823UL;
+ this.m_BtnBuild = (base.transform.Find("Bg/BtnBuild").GetComponent("XUIButton") as IXUIButton);
+ this.m_BtnBuild.ID = 824UL;
+ this.m_BtnWXGroup = (base.transform.Find("Bg/Group/BtnWXGroup").GetComponent("XUIButton") as IXUIButton);
+ this.m_BtnWXGroup.gameObject.SetActive(false);
+ this.m_BtnWXGroupShare = (base.transform.Find("Bg/Group/BtnWXGroupShare").GetComponent("XUIButton") as IXUIButton);
+ this.m_BtnWXGroupShare.gameObject.SetActive(false);
+ this.m_WXGroupTip = (base.transform.Find("Bg/Group/BtnWXGroup/LivenessTips").GetComponent("XUILabel") as IXUILabel);
+ this.m_BtnQQGroup = (base.transform.Find("Bg/Group/BtnQQGroup").GetComponent("XUIButton") as IXUIButton);
+ this.m_BtnQQGroup.gameObject.SetActive(false);
+ this.m_QQGroupTip = (base.transform.Find("Bg/Group/BtnQQGroup/LivenessTips").GetComponent("XUILabel") as IXUILabel);
+ this.m_QQGroupName = (base.transform.Find("Bg/Group/QQGroupInfo").GetComponent("XUILabel") as IXUILabel);
+ this.m_QQGroupName.gameObject.SetActive(false);
+ this.m_BtnEditPortrait = (base.transform.Find("Bg/BtnEditPortrait").GetComponent("XUIButton") as IXUIButton);
+ this.m_Portrait = (base.transform.Find("Bg/BasicInfo/Content/Portrait").GetComponent("XUISprite") as IXUISprite);
+ this.m_Annoucement = (base.transform.Find("Bg/Bg3/Announcement").GetComponent("XUILabel") as IXUILabel);
+ this.m_Annoucement.SetText("");
+ this.m_BasicInfoDisplay.Init(base.transform.Find("Bg/BasicInfo/Content"), true);
+ this.m_LivenessTipSprite = (base.transform.Find("Bg/BasicInfo/Content/Liveness/Tips").GetComponent("XUISprite") as IXUISprite);
+ this.m_LivenessTipsLabel = (base.transform.Find("Bg/BasicInfo/Content/LivenessTips").GetComponent("XUILabel") as IXUILabel);
+ this.m_PopularityTipSprite = (base.transform.Find("Bg/BasicInfo/Content/Popularity/Tips").GetComponent("XUISprite") as IXUISprite);
+ this.m_PopularityTipLabel = (base.transform.Find("Bg/BasicInfo/Content/prestigeTips").GetComponent("XUILabel") as IXUILabel);
+ this.m_PopularityTipLabel.SetVisible(false);
+ this.m_LivenessTipsLabel.SetVisible(false);
+ this.m_ExpTipsSprite = (base.transform.Find("Bg/BasicInfo/Content/Exp/Tips").GetComponent("XUISprite") as IXUISprite);
+ this.m_ExpTipsLabel = (base.transform.Find("Bg/BasicInfo/Content/ExpTips").GetComponent("XUILabel") as IXUILabel);
+ this.m_ExpTipsLabel.SetVisible(false);
+ this.m_EditAnnouncePanel = base.transform.Find("Bg/EditAnnouncePanel").gameObject;
+ this.m_LogPanel = base.transform.Find("Bg/LogPanel").gameObject;
+ this.m_ShielterItemPool.SetupPool(base.transform.Find("Bg/Bg3").gameObject, base.transform.Find("Bg/Bg3/HallShelterIcon").gameObject, 5u, false);
+ this.m_GrowthBuffHelpFrame = base.transform.Find("Bg/Bg3/HelpFrame");
+ this.m_GrowthBuffHelpLabel = (this.m_GrowthBuffHelpFrame.Find("Helps").GetComponent("XUILabel") as IXUILabel);
+ this.m_GrowthBuffHelpFrame.gameObject.SetActive(false);
+ }
+
+ private void OnApplicationPause(bool pause)
+ {
+ XGuildDocument specificDocument = XDocuments.GetSpecificDocument<XGuildDocument>(XGuildDocument.uuID);
+ specificDocument.QueryWXGroup();
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/XGuildHallBehaviour.cs.meta b/Client/Assets/Scripts/XMainClient/UI/XGuildHallBehaviour.cs.meta
new file mode 100644
index 00000000..81c45b0a
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XGuildHallBehaviour.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 7366294fd2958164e8a64d5aa97622e6
+timeCreated: 1611403940
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/XGuildHallView.cs b/Client/Assets/Scripts/XMainClient/UI/XGuildHallView.cs
new file mode 100644
index 00000000..b78c2d44
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XGuildHallView.cs
@@ -0,0 +1,1137 @@
+using System;
+using System.Collections.Generic;
+using KKSG;
+using MiniJSON;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUpdater;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class XGuildHallView : DlgBase<XGuildHallView, XGuildHallBehaviour>
+ {
+ public XGuildLogView LogView
+ {
+ get
+ {
+ return this._LogView;
+ }
+ }
+
+ public XGuildEditAnnounceView EditAnnounceView
+ {
+ get
+ {
+ return this._EditAnnounceView;
+ }
+ }
+
+ public bool Deprecated { get; set; }
+
+ public override string fileName
+ {
+ get
+ {
+ return "Guild/GuildHallDlg";
+ }
+ }
+
+ public override int layer
+ {
+ get
+ {
+ return 1;
+ }
+ }
+
+ public override int group
+ {
+ get
+ {
+ return 1;
+ }
+ }
+
+ public override bool autoload
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override bool hideMainMenu
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override bool pushstack
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override bool fullscreenui
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ private XGuildHallDocument _HallDoc;
+
+ private XGuildDocument _GuildDoc;
+
+ private XGuildGrowthDocument _GrowthDoc;
+
+ private XGuildEditAnnounceView _EditAnnounceView;
+
+ private XGuildLogView _LogView;
+
+ private XSubSysRedPointMgr redpointMgr = new XSubSysRedPointMgr();
+
+ protected override void Init()
+ {
+ this._HallDoc = XDocuments.GetSpecificDocument<XGuildHallDocument>(XGuildHallDocument.uuID);
+ this._HallDoc.GuildHallView = this;
+ this._GuildDoc = XDocuments.GetSpecificDocument<XGuildDocument>(XGuildDocument.uuID);
+ this._GrowthDoc = XDocuments.GetSpecificDocument<XGuildGrowthDocument>(XGuildGrowthDocument.uuID);
+ DlgHandlerBase.EnsureCreate<XGuildEditAnnounceView>(ref this._EditAnnounceView, base.uiBehaviour.m_EditAnnouncePanel, null, true);
+ DlgHandlerBase.EnsureCreate<XGuildLogView>(ref this._LogView, base.uiBehaviour.m_LogPanel, null, true);
+ this._LogView.LogSource = this._HallDoc;
+ IXUIObject[] btns = new IXUIObject[]
+ {
+ base.uiBehaviour.m_BtnApprove,
+ base.uiBehaviour.m_BtnSignIn,
+ base.uiBehaviour.m_BtnSkill,
+ base.uiBehaviour.m_BtnMembers,
+ base.uiBehaviour.m_BtnEnter,
+ base.uiBehaviour.m_BtnGZ,
+ base.uiBehaviour.m_BtnDmx,
+ base.uiBehaviour.m_BtnRedPacker,
+ base.uiBehaviour.m_BtnJoker
+ };
+ this.redpointMgr.SetupRedPoints(btns);
+ XSingleton<XGameSysMgr>.singleton.RegisterSubSysRedPointMgr(XSysDefine.XSys_GuildHall, this.redpointMgr);
+ }
+
+ protected override void OnUnload()
+ {
+ this._HallDoc.GuildHallView = null;
+ DlgHandlerBase.EnsureUnload<XGuildEditAnnounceView>(ref this._EditAnnounceView);
+ DlgHandlerBase.EnsureUnload<XGuildLogView>(ref this._LogView);
+ XSingleton<XGameSysMgr>.singleton.RegisterSubSysRedPointMgr(XSysDefine.XSys_GuildHall, null);
+ base.OnUnload();
+ }
+
+ public override void RegisterEvent()
+ {
+ base.uiBehaviour.m_Close.RegisterClickEventHandler(new ButtonClickEventHandler(this._OnCloseBtnClick));
+ base.uiBehaviour.m_BtnExit.RegisterClickEventHandler(new ButtonClickEventHandler(this._OnExitGuildBtnClick));
+ base.uiBehaviour.m_BtnSignIn.RegisterClickEventHandler(new ButtonClickEventHandler(this._OnSignInBtnClick));
+ base.uiBehaviour.m_BtnMall.RegisterClickEventHandler(new ButtonClickEventHandler(this._OnMallClick));
+ base.uiBehaviour.m_BtnDonate.RegisterClickEventHandler(new ButtonClickEventHandler(this._OnDonationClick));
+ base.uiBehaviour.m_BtnMembers.RegisterClickEventHandler(new ButtonClickEventHandler(this._OnMembersBtnClick));
+ base.uiBehaviour.m_BtnSkill.RegisterClickEventHandler(new ButtonClickEventHandler(this._OnSkillBtnClick));
+ base.uiBehaviour.m_BtnApprove.RegisterClickEventHandler(new ButtonClickEventHandler(this._OnApproveBtnClick));
+ base.uiBehaviour.m_BtnLog.RegisterClickEventHandler(new ButtonClickEventHandler(this._OnLogBtnClick));
+ base.uiBehaviour.m_BtnEditAnnounce.RegisterClickEventHandler(new ButtonClickEventHandler(this._OnEditAnnounceBtnClick));
+ base.uiBehaviour.m_BtnRank.RegisterClickEventHandler(new ButtonClickEventHandler(this._OnRankBtnClick));
+ base.uiBehaviour.m_BtnEnter.RegisterClickEventHandler(new ButtonClickEventHandler(this._OnEnterGuildBtnClick));
+ base.uiBehaviour.m_LivenessTipSprite.RegisterSpritePressEventHandler(new SpritePressEventHandler(this._OnLivenessPress));
+ base.uiBehaviour.m_PopularityTipSprite.RegisterSpritePressEventHandler(new SpritePressEventHandler(this._OnPopularityTipPress));
+ base.uiBehaviour.m_ExpTipsSprite.RegisterSpritePressEventHandler(new SpritePressEventHandler(this._OnExpTipsPress));
+ base.uiBehaviour.m_BtnEditPortrait.RegisterClickEventHandler(new ButtonClickEventHandler(this._OnPortraitClick));
+ base.uiBehaviour.m_BtnWXGroup.RegisterClickEventHandler(new ButtonClickEventHandler(this._OnGuildWXGroupClick));
+ base.uiBehaviour.m_BtnWXGroupShare.RegisterClickEventHandler(new ButtonClickEventHandler(this._OnGuildWXGroupShare));
+ base.uiBehaviour.m_BtnQQGroup.RegisterClickEventHandler(new ButtonClickEventHandler(this._OnGuildQQGroupClick));
+ base.uiBehaviour.m_BtnGZ.RegisterClickEventHandler(new ButtonClickEventHandler(this._OnGuildSalaryClick));
+ base.uiBehaviour.m_BtnDmx.RegisterClickEventHandler(new ButtonClickEventHandler(this._OnGuildDungeonClick));
+ base.uiBehaviour.m_BtnJoker.RegisterClickEventHandler(new ButtonClickEventHandler(this._OnGuildJokingClick));
+ base.uiBehaviour.m_BtnRedPacker.RegisterClickEventHandler(new ButtonClickEventHandler(this._OnGuildRedPackerClick));
+ base.uiBehaviour.m_BtnConsider.RegisterClickEventHandler(new ButtonClickEventHandler(this._OnGuildConsiderClick));
+ base.uiBehaviour.m_BtnBuild.RegisterClickEventHandler(new ButtonClickEventHandler(this._OnGuildBuildClick));
+ }
+
+ private void CheckOpenSystem()
+ {
+ int i = 0;
+ int count = base.uiBehaviour.m_checkGuildList.Count;
+ while (i < count)
+ {
+ Transform transform = base.uiBehaviour.m_checkGuildList[i].gameObject.transform.Find("Lock");
+ bool flag = transform == null;
+ if (!flag)
+ {
+ bool flag2 = true;
+ bool flag3 = base.uiBehaviour.m_checkGuildList[i].ID > 0UL;
+ if (flag3)
+ {
+ XSysDefine xsysDefine = (XSysDefine)base.uiBehaviour.m_checkGuildList[i].ID;
+ uint unlockLevel = XGuildDocument.GuildConfig.GetUnlockLevel(xsysDefine);
+ XSingleton<XDebug>.singleton.AddGreenLog(xsysDefine.ToString() + " " + unlockLevel.ToString(), null, null, null, null, null);
+ bool flag4 = this._GuildDoc.bInGuild && this._GuildDoc.Level >= unlockLevel && XSingleton<XGameSysMgr>.singleton.IsSystemOpened(xsysDefine);
+ if (flag4)
+ {
+ flag2 = false;
+ bool flag5 = xsysDefine == XSysDefine.XSys_GuildDungeon_SmallMonter;
+ if (flag5)
+ {
+ XGuildSmallMonsterDocument specificDocument = XDocuments.GetSpecificDocument<XGuildSmallMonsterDocument>(XGuildSmallMonsterDocument.uuID);
+ bool flag6 = !specificDocument.CheckEnterLevel();
+ if (flag6)
+ {
+ flag2 = true;
+ }
+ DlgBase<XGuildSmallMonsterView, XGuildSmallMonsterBehaviour>.singleton.RefreshRedp();
+ }
+ }
+ }
+ else
+ {
+ flag2 = true;
+ }
+ base.uiBehaviour.m_checkGuildList[i].SetGrey(!flag2);
+ transform.gameObject.SetActive(flag2);
+ }
+ i++;
+ }
+ }
+
+ private bool _OnGuildSalaryClick(IXUIButton btn)
+ {
+ bool flag = !this._GuildDoc.CheckInGuild();
+ bool result;
+ if (flag)
+ {
+ result = false;
+ }
+ else
+ {
+ DlgBase<GuildSalayDlg, GuildSalayBehavior>.singleton.SetVisibleWithAnimation(true, null);
+ result = true;
+ }
+ return result;
+ }
+
+ private bool _OnGuildDungeonClick(IXUIButton btn)
+ {
+ bool flag = !this._GuildDoc.CheckInGuild();
+ bool result;
+ if (flag)
+ {
+ result = false;
+ }
+ else
+ {
+ bool flag2 = !this.TryCheckInGuildSystem(XSysDefine.XSys_GuildDungeon_SmallMonter);
+ if (flag2)
+ {
+ result = false;
+ }
+ else
+ {
+ DlgBase<XGuildSmallMonsterView, XGuildSmallMonsterBehaviour>.singleton.SetVisibleWithAnimation(true, null);
+ result = true;
+ }
+ }
+ return result;
+ }
+
+ private bool _OnGuildJokingClick(IXUIButton btn)
+ {
+ bool flag = !this._GuildDoc.CheckInGuild();
+ bool result;
+ if (flag)
+ {
+ result = false;
+ }
+ else
+ {
+ DlgBase<XGuildJokerView, XGuildJokerBehaviour>.singleton.SetVisibleWithAnimation(true, null);
+ result = true;
+ }
+ return result;
+ }
+
+ private bool _OnGuildRedPackerClick(IXUIButton btn)
+ {
+ bool flag = !this._GuildDoc.CheckInGuild();
+ bool result;
+ if (flag)
+ {
+ result = false;
+ }
+ else
+ {
+ DlgBase<XGuildSignRedPackageView, XGuildSignRedPackageBehaviour>.singleton.SetVisibleWithAnimation(true, null);
+ result = true;
+ }
+ return result;
+ }
+
+ private bool _OnGuildConsiderClick(IXUIButton button)
+ {
+ bool flag = !this._GuildDoc.CheckInGuild();
+ bool result;
+ if (flag)
+ {
+ result = false;
+ }
+ else
+ {
+ DlgBase<XGuildGrowthEntranceView, XGuildGrowthEntranceBehavior>.singleton.SetVisibleWithAnimation(true, null);
+ result = true;
+ }
+ return result;
+ }
+
+ private bool _OnGuildBuildClick(IXUIButton btn)
+ {
+ bool flag = !this._GuildDoc.CheckInGuild();
+ bool result;
+ if (flag)
+ {
+ result = false;
+ }
+ else
+ {
+ DlgBase<XGuildGrowthBuildView, XGuildGrowthBuildBehavior>.singleton.SetVisibleWithAnimation(true, null);
+ result = true;
+ }
+ return result;
+ }
+
+ private bool TryCheckInGuildSystem(XSysDefine sys)
+ {
+ XGuildDocument specificDocument = XDocuments.GetSpecificDocument<XGuildDocument>(XGuildDocument.uuID);
+ bool flag = !specificDocument.bInGuild;
+ bool result;
+ if (flag)
+ {
+ result = false;
+ }
+ else
+ {
+ uint unlockLevel = XGuildDocument.GuildConfig.GetUnlockLevel(sys);
+ bool flag2 = specificDocument.Level < unlockLevel;
+ if (flag2)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString("GUILD_MAZE_NO_GUILD_LEVEL", new object[]
+ {
+ unlockLevel
+ }), "fece00");
+ result = false;
+ }
+ else
+ {
+ bool flag3 = !XSingleton<XGameSysMgr>.singleton.IsSystemOpened(sys);
+ if (flag3)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString("GUILD_MAZE_NO_PLAYER_LEVEL", new object[]
+ {
+ XSingleton<XGameSysMgr>.singleton.GetSystemOpenLevel(sys)
+ }), "fece00");
+ result = false;
+ }
+ else
+ {
+ bool flag4 = sys == XSysDefine.XSys_GuildDungeon_SmallMonter;
+ if (flag4)
+ {
+ XGuildSmallMonsterDocument specificDocument2 = XDocuments.GetSpecificDocument<XGuildSmallMonsterDocument>(XGuildSmallMonsterDocument.uuID);
+ bool flag5 = !specificDocument2.CheckEnterLevel();
+ if (flag5)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString("GUILD_MAZE_NO_PLAYER_LEVEL", new object[]
+ {
+ specificDocument2.GetEnterLevel()
+ }), "fece00");
+ return false;
+ }
+ }
+ result = true;
+ }
+ }
+ }
+ return result;
+ }
+
+ protected override void OnShow()
+ {
+ this._GrowthDoc.QueryBuffList();
+ this._GuildDoc.QueryWXGroup();
+ this._GuildDoc.QueryQQGroup();
+ this._EditAnnounceView.SetVisible(false);
+ this._LogView.SetVisible(false);
+ this._HallDoc.ReqGuildBrief();
+ this.RefreshPortrait();
+ this.CheckOpenSystem();
+ this.redpointMgr.UpdateRedPointUI();
+ base.uiBehaviour.m_BtnEnter.SetVisible(XSingleton<XScene>.singleton.SceneType != SceneType.SCENE_GUILD_HALL);
+ this.Refresh();
+ this.RefreshGrowthBuffList();
+ }
+
+ public void RefreshGrowthBuffList()
+ {
+ base.uiBehaviour.m_ShielterItemPool.ReturnAll(false);
+ int num = 0;
+ for (int i = 1; i < this._GrowthDoc.BuffList.Count; i++)
+ {
+ bool flag = !this._GrowthDoc.BuffList[i].Enable;
+ if (!flag)
+ {
+ GuildHall.RowData data = this._GrowthDoc.GetData(this._GrowthDoc.BuffList[i].BuffID, this._GrowthDoc.BuffList[i].BuffLevel);
+ bool flag2 = data == null;
+ if (!flag2)
+ {
+ GameObject gameObject = base.uiBehaviour.m_ShielterItemPool.FetchGameObject(false);
+ gameObject.transform.localPosition = new Vector3(base.uiBehaviour.m_ShielterItemPool.TplPos.x + (float)(num * base.uiBehaviour.m_ShielterItemPool.TplWidth), base.uiBehaviour.m_ShielterItemPool.TplPos.y);
+ IXUISprite ixuisprite = gameObject.transform.Find("HallShelterIcon").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.SetGrey(this._GrowthDoc.BuffList[i].Enable);
+ ixuisprite.SetSprite(data.icon, data.atlas, false);
+ IXUISprite ixuisprite2 = gameObject.GetComponent("XUISprite") as IXUISprite;
+ ixuisprite2.ID = (ulong)((long)i);
+ ixuisprite2.RegisterSpritePressEventHandler(new SpritePressEventHandler(this.OnGrowthBuffClick));
+ num++;
+ }
+ }
+ }
+ for (int j = 1; j < this._GrowthDoc.BuffList.Count; j++)
+ {
+ bool enable = this._GrowthDoc.BuffList[j].Enable;
+ if (!enable)
+ {
+ GuildHall.RowData data2 = this._GrowthDoc.GetData(this._GrowthDoc.BuffList[j].BuffID, this._GrowthDoc.BuffList[j].BuffLevel);
+ bool flag3 = data2 == null;
+ if (!flag3)
+ {
+ GameObject gameObject2 = base.uiBehaviour.m_ShielterItemPool.FetchGameObject(false);
+ gameObject2.transform.localPosition = new Vector3(base.uiBehaviour.m_ShielterItemPool.TplPos.x + (float)(num * base.uiBehaviour.m_ShielterItemPool.TplWidth), base.uiBehaviour.m_ShielterItemPool.TplPos.y);
+ IXUISprite ixuisprite3 = gameObject2.transform.Find("HallShelterIcon").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite3.SetGrey(this._GrowthDoc.BuffList[j].Enable);
+ ixuisprite3.SetSprite(data2.icon, data2.atlas, false);
+ IXUISprite ixuisprite4 = gameObject2.GetComponent("XUISprite") as IXUISprite;
+ ixuisprite4.ID = (ulong)((long)j);
+ ixuisprite4.RegisterSpritePressEventHandler(new SpritePressEventHandler(this.OnGrowthBuffClick));
+ num++;
+ }
+ }
+ }
+ }
+
+ private bool OnGrowthBuffClick(IXUISprite iSp, bool state)
+ {
+ base.uiBehaviour.m_GrowthBuffHelpFrame.gameObject.SetActive(state);
+ if (state)
+ {
+ base.uiBehaviour.m_GrowthBuffHelpFrame.localPosition = iSp.transform.localPosition;
+ GuildHall.RowData data = this._GrowthDoc.GetData(this._GrowthDoc.BuffList[(int)iSp.ID].BuffID, this._GrowthDoc.BuffList[(int)iSp.ID].BuffLevel);
+ bool flag = data == null;
+ if (flag)
+ {
+ base.uiBehaviour.m_GrowthBuffHelpFrame.gameObject.SetActive(false);
+ return false;
+ }
+ bool flag2 = !this._GrowthDoc.BuffList[(int)iSp.ID].Enable;
+ if (flag2)
+ {
+ base.uiBehaviour.m_GrowthBuffHelpLabel.SetText(string.Format("{0}\n{1}", data.currentLevelDescription, XStringDefineProxy.GetString("GuildGrowthBuffLearnTips")));
+ }
+ else
+ {
+ bool flag3 = this._GrowthDoc.BuffList[(int)iSp.ID].BuffLevel == this._GrowthDoc.BuffList[(int)iSp.ID].BuffMaxLevel;
+ if (flag3)
+ {
+ base.uiBehaviour.m_GrowthBuffHelpLabel.SetText(data.currentLevelDescription);
+ }
+ else
+ {
+ GuildHall.RowData data2 = this._GrowthDoc.GetData(this._GrowthDoc.BuffList[(int)iSp.ID].BuffID, this._GrowthDoc.BuffList[(int)iSp.ID].BuffLevel + 1u);
+ bool flag4 = data2 == null;
+ if (flag4)
+ {
+ return false;
+ }
+ base.uiBehaviour.m_GrowthBuffHelpLabel.SetText(string.Format("{0}\n{1}\n{2}", data.currentLevelDescription, XStringDefineProxy.GetString("GuildGrowthBuffNextLevel"), data2.currentLevelDescription));
+ }
+ }
+ }
+ return true;
+ }
+
+ private bool _OnCloseBtnClick(IXUIButton go)
+ {
+ this.SetVisibleWithAnimation(false, null);
+ return true;
+ }
+
+ private bool _OnPopularityTipPress(IXUISprite uiSprite, bool isPressed)
+ {
+ if (isPressed)
+ {
+ bool flag = !base.uiBehaviour.m_PopularityTipLabel.IsVisible();
+ if (flag)
+ {
+ base.uiBehaviour.m_PopularityTipLabel.SetVisible(true);
+ }
+ base.uiBehaviour.m_PopularityTipLabel.SetText(XSingleton<UiUtility>.singleton.ReplaceReturn(XStringDefineProxy.GetString("GUILD_RANK_TIPS")));
+ }
+ else
+ {
+ bool flag2 = base.uiBehaviour.m_PopularityTipLabel.IsVisible();
+ if (flag2)
+ {
+ base.uiBehaviour.m_PopularityTipLabel.SetVisible(false);
+ }
+ }
+ return false;
+ }
+
+ private bool _OnExpTipsPress(IXUISprite uiSprite, bool isPressed)
+ {
+ if (isPressed)
+ {
+ bool flag = !base.uiBehaviour.m_ExpTipsLabel.IsVisible();
+ if (flag)
+ {
+ base.uiBehaviour.m_ExpTipsLabel.SetVisible(true);
+ }
+ base.uiBehaviour.m_ExpTipsLabel.SetText(XSingleton<UiUtility>.singleton.ReplaceReturn(XStringDefineProxy.GetString("GUILD_EXP_TIPS")));
+ }
+ else
+ {
+ bool flag2 = base.uiBehaviour.m_ExpTipsLabel.IsVisible();
+ if (flag2)
+ {
+ base.uiBehaviour.m_ExpTipsLabel.SetVisible(false);
+ }
+ }
+ return true;
+ }
+
+ private bool _OnLivenessPress(IXUISprite uiSprite, bool isPressed)
+ {
+ if (isPressed)
+ {
+ bool flag = !base.uiBehaviour.m_LivenessTipsLabel.IsVisible();
+ if (flag)
+ {
+ base.uiBehaviour.m_LivenessTipsLabel.SetVisible(true);
+ }
+ base.uiBehaviour.m_LivenessTipsLabel.SetText(this._GuildDoc.BasicData.GetLivenessTips());
+ }
+ else
+ {
+ bool flag2 = base.uiBehaviour.m_LivenessTipsLabel.IsVisible();
+ if (flag2)
+ {
+ base.uiBehaviour.m_LivenessTipsLabel.SetVisible(false);
+ }
+ }
+ return false;
+ }
+
+ private bool _OnEnterGuildBtnClick(IXUIButton go)
+ {
+ bool flag = !this._GuildDoc.CheckInGuild();
+ bool result;
+ if (flag)
+ {
+ result = true;
+ }
+ else
+ {
+ this._GuildDoc.TryEnterGuildScene();
+ result = true;
+ }
+ return result;
+ }
+
+ private bool _OnExitGuildBtnClick(IXUIButton go)
+ {
+ bool flag = !this._GuildDoc.CheckInGuild();
+ bool result;
+ if (flag)
+ {
+ result = true;
+ }
+ else
+ {
+ XSingleton<UiUtility>.singleton.ShowModalDialog(XStringDefineProxy.GetString("GUILD_EXIT_CONFIRM"), XStringDefineProxy.GetString("COMMON_OK"), XStringDefineProxy.GetString("COMMON_CANCEL"), new ButtonClickEventHandler(this._OnExitGuild));
+ result = true;
+ }
+ return result;
+ }
+
+ private bool _OnExitGuild(IXUIButton go)
+ {
+ bool flag = !this._GuildDoc.CheckInGuild();
+ bool result;
+ if (flag)
+ {
+ result = true;
+ }
+ else
+ {
+ this._HallDoc.ReqExitGuild();
+ XSingleton<UiUtility>.singleton.CloseModalDlg();
+ result = true;
+ }
+ return result;
+ }
+
+ private bool _OnDonationClick(IXUIButton button)
+ {
+ bool flag = !this._GuildDoc.CheckInGuild();
+ bool result;
+ if (flag)
+ {
+ result = true;
+ }
+ else
+ {
+ DlgBase<XGuildDonateView, XGuildDonateBehavior>.singleton.SetVisibleWithAnimation(true, null);
+ result = true;
+ }
+ return result;
+ }
+
+ private bool _OnMallClick(IXUIButton go)
+ {
+ bool flag = !this._GuildDoc.CheckInGuild();
+ bool result;
+ if (flag)
+ {
+ result = true;
+ }
+ else
+ {
+ bool flag2 = !this._GuildDoc.CheckUnlockLevel(XSysDefine.XSys_GuildBoon_Shop);
+ if (flag2)
+ {
+ result = true;
+ }
+ else
+ {
+ DlgBase<MallSystemDlg, MallSystemBehaviour>.singleton.ShowShopSystem(XSysDefine.XSys_Mall_Guild, 0UL);
+ result = false;
+ }
+ }
+ return result;
+ }
+
+ private bool _OnSignInBtnClick(IXUIButton go)
+ {
+ bool flag = !this._GuildDoc.CheckInGuild();
+ bool result;
+ if (flag)
+ {
+ result = true;
+ }
+ else
+ {
+ bool flag2 = !this._GuildDoc.CheckUnlockLevel(XSysDefine.XSys_GuildHall_SignIn);
+ if (flag2)
+ {
+ result = true;
+ }
+ else
+ {
+ DlgBase<XGuildSignInView, XGuildSignInBehaviour>.singleton.SetVisibleWithAnimation(true, null);
+ result = true;
+ }
+ }
+ return result;
+ }
+
+ private bool _OnSkillBtnClick(IXUIButton go)
+ {
+ bool flag = !this._GuildDoc.CheckInGuild();
+ bool result;
+ if (flag)
+ {
+ result = true;
+ }
+ else
+ {
+ bool flag2 = !this._GuildDoc.CheckUnlockLevel(XSysDefine.XSys_GuildHall_Skill);
+ if (flag2)
+ {
+ result = true;
+ }
+ else
+ {
+ DlgBase<XGuildSkillView, XGuildSkillBehaviour>.singleton.SetVisibleWithAnimation(true, null);
+ result = true;
+ }
+ }
+ return result;
+ }
+
+ private bool _OnMembersBtnClick(IXUIButton go)
+ {
+ bool flag = !this._GuildDoc.CheckInGuild();
+ bool result;
+ if (flag)
+ {
+ result = true;
+ }
+ else
+ {
+ DlgBase<XGuildMembersView, XGuildMembersBehaviour>.singleton.SetVisibleWithAnimation(true, null);
+ result = true;
+ }
+ return result;
+ }
+
+ private bool _OnApproveBtnClick(IXUIButton go)
+ {
+ bool flag = !this._GuildDoc.CheckPermission(GuildPermission.GPEM_APPROVAL);
+ bool result;
+ if (flag)
+ {
+ result = true;
+ }
+ else
+ {
+ DlgBase<XGuildApproveView, XGuildApproveBehaviour>.singleton.SetVisibleWithAnimation(true, null);
+ result = true;
+ }
+ return result;
+ }
+
+ private bool _OnLogBtnClick(IXUIButton go)
+ {
+ bool flag = !this._GuildDoc.CheckInGuild();
+ bool result;
+ if (flag)
+ {
+ result = true;
+ }
+ else
+ {
+ this._HallDoc.ReqLogList();
+ this._LogView.SetVisible(true);
+ result = true;
+ }
+ return result;
+ }
+
+ private bool _OnEditAnnounceBtnClick(IXUIButton go)
+ {
+ bool flag = !this._GuildDoc.CheckPermission(GuildPermission.GPEM_ANNOUNCEMENT);
+ bool result;
+ if (flag)
+ {
+ result = true;
+ }
+ else
+ {
+ this._EditAnnounceView.SetVisible(true);
+ result = true;
+ }
+ return result;
+ }
+
+ private bool _OnRankBtnClick(IXUIButton go)
+ {
+ DlgBase<XRankView, XRankBehaviour>.singleton.ShowRank(XSysDefine.XSys_Rank_Guild);
+ return true;
+ }
+
+ private bool _OnPortraitClick(IXUIButton go)
+ {
+ bool flag = !this._GuildDoc.CheckPermission(GuildPermission.GPEM_ANNOUNCEMENT);
+ bool result;
+ if (flag)
+ {
+ result = true;
+ }
+ else
+ {
+ DlgBase<XGuildPortraitView, XGuildPortraitBehaviour>.singleton.Open(this._GuildDoc.BasicData.portraitIndex, new ButtonClickEventHandler(this._OnPortraitChanged));
+ result = true;
+ }
+ return result;
+ }
+
+ private bool _OnPortraitChanged(IXUIButton btn)
+ {
+ int portraitIndex = DlgBase<XGuildPortraitView, XGuildPortraitBehaviour>.singleton.PortraitIndex;
+ this._HallDoc.ReqEditPortrait(portraitIndex);
+ return true;
+ }
+
+ public void RefreshPortrait()
+ {
+ base.uiBehaviour.m_Portrait.SetSprite(XGuildDocument.GetPortraitName(this._GuildDoc.BasicData.portraitIndex));
+ }
+
+ public void RefreshAnnouncement()
+ {
+ XGuildBasicData basicData = this._GuildDoc.BasicData;
+ base.uiBehaviour.m_Annoucement.SetText(basicData.announcement);
+ }
+
+ public void RefreshButtonsState()
+ {
+ base.uiBehaviour.m_BtnApprove.SetVisible(this._GuildDoc.IHavePermission(GuildPermission.GPEM_APPROVAL));
+ base.uiBehaviour.m_BtnEditAnnounce.SetVisible(this._GuildDoc.IHavePermission(GuildPermission.GPEM_ANNOUNCEMENT));
+ base.uiBehaviour.m_BtnEditPortrait.SetVisible(this._GuildDoc.IHavePermission(GuildPermission.GPEM_SETTINGS));
+ this.RefreshWXGroupBtn();
+ this.RefreshQQGroupBtn();
+ this.RefreshRedPoints();
+ }
+
+ public void RefreshRedPoints()
+ {
+ this.redpointMgr.UpdateRedPointUI();
+ }
+
+ public void Refresh()
+ {
+ XGuildBasicData basicData = this._GuildDoc.BasicData;
+ base.uiBehaviour.m_BasicInfoDisplay.Set(basicData);
+ this.RefreshAnnouncement();
+ this.RefreshButtonsState();
+ }
+
+ public override void StackRefresh()
+ {
+ base.StackRefresh();
+ this.Refresh();
+ this.RefreshRedPoints();
+ this.RefreshPortrait();
+ this.CheckOpenSystem();
+ this._GrowthDoc.QueryBuffList();
+ this._HallDoc.ReqGuildBrief();
+ }
+
+ public void RefreshWXGroupBtn()
+ {
+ bool flag = !base.IsVisible();
+ if (!flag)
+ {
+ bool flag2 = XSingleton<XLoginDocument>.singleton.Channel != XAuthorizationChannel.XAuthorization_WeChat || !XSingleton<XGameSysMgr>.singleton.IsSystemOpened(XSysDefine.XSys_Guild_Bind_Group);
+ if (flag2)
+ {
+ base.uiBehaviour.m_BtnWXGroup.SetVisible(false);
+ base.uiBehaviour.m_BtnWXGroupShare.SetVisible(false);
+ }
+ else
+ {
+ base.uiBehaviour.m_WXGroupTip.SetVisible(false);
+ bool flag3 = XSingleton<PDatabase>.singleton.wxGroupInfo != null && XSingleton<PDatabase>.singleton.wxGroupInfo.data.flag == "Success" && XSingleton<PDatabase>.singleton.wxGroupInfo.data.errorCode != -10007;
+ if (flag3)
+ {
+ XSingleton<XDebug>.singleton.AddLog("[WXGroup RefreshWXGroupBtn] 1", null, null, null, null, null, XDebugColor.XDebug_None);
+ bool flag4 = false;
+ string[] array = XSingleton<PDatabase>.singleton.wxGroupInfo.data.openIdList.Split(new char[]
+ {
+ ','
+ });
+ for (int i = 0; i < array.Length; i++)
+ {
+ bool flag5 = array[i] == XSingleton<XLoginDocument>.singleton.OpenID;
+ if (flag5)
+ {
+ flag4 = true;
+ break;
+ }
+ }
+ bool flag6 = flag4;
+ if (flag6)
+ {
+ XSingleton<XDebug>.singleton.AddLog("[WXGroup RefreshWXGroupBtn] 2", null, null, null, null, null, XDebugColor.XDebug_None);
+ base.uiBehaviour.m_BtnWXGroup.SetVisible(false);
+ base.uiBehaviour.m_BtnWXGroupShare.SetVisible(true);
+ }
+ else
+ {
+ bool flag7 = XSingleton<PDatabase>.singleton.wxGroupInfo.data.errorCode == 0;
+ if (flag7)
+ {
+ XSingleton<XDebug>.singleton.AddLog("[WXGroup RefreshWXGroupBtn] 3", null, null, null, null, null, XDebugColor.XDebug_None);
+ base.uiBehaviour.m_BtnWXGroup.SetVisible(true);
+ base.uiBehaviour.m_BtnWXGroup.ID = 1UL;
+ base.uiBehaviour.m_BtnWXGroup.SetCaption(XSingleton<XStringTable>.singleton.GetString("GUILD_JOIN_WX_GROUP"));
+ base.uiBehaviour.m_BtnWXGroupShare.SetVisible(false);
+ base.uiBehaviour.m_WXGroupTip.SetVisible(true);
+ base.uiBehaviour.m_WXGroupTip.SetText(XSingleton<UiUtility>.singleton.ReplaceReturn(XSingleton<XStringTable>.singleton.GetString("GUILD_JOIN_WX_GROUP_TIP")));
+ }
+ else
+ {
+ XSingleton<XDebug>.singleton.AddLog("[WXGroup RefreshWXGroupBtn] 4", null, null, null, null, null, XDebugColor.XDebug_None);
+ base.uiBehaviour.m_BtnWXGroup.SetVisible(false);
+ base.uiBehaviour.m_BtnWXGroupShare.SetVisible(false);
+ }
+ }
+ }
+ else
+ {
+ bool flag8 = XSingleton<PDatabase>.singleton.wxGroupInfo != null && XSingleton<PDatabase>.singleton.wxGroupInfo.data.flag == "Success" && XSingleton<PDatabase>.singleton.wxGroupInfo.data.errorCode == -10007;
+ if (flag8)
+ {
+ XSingleton<XDebug>.singleton.AddLog("[WXGroup RefreshWXGroupBtn] 5", null, null, null, null, null, XDebugColor.XDebug_None);
+ bool flag9 = this._GuildDoc.Position == GuildPosition.GPOS_LEADER;
+ if (flag9)
+ {
+ base.uiBehaviour.m_BtnWXGroup.ID = 0UL;
+ base.uiBehaviour.m_BtnWXGroup.SetVisible(true);
+ base.uiBehaviour.m_BtnWXGroup.SetCaption(XSingleton<XStringTable>.singleton.GetString("GUILD_CREATE_WX_GROUP"));
+ base.uiBehaviour.m_BtnWXGroupShare.SetVisible(false);
+ base.uiBehaviour.m_WXGroupTip.SetVisible(true);
+ base.uiBehaviour.m_WXGroupTip.SetText(XSingleton<UiUtility>.singleton.ReplaceReturn(XSingleton<XStringTable>.singleton.GetString("GUILD_CREATE_WX_GROUP_TIP")));
+ }
+ else
+ {
+ base.uiBehaviour.m_BtnWXGroup.SetVisible(false);
+ base.uiBehaviour.m_BtnWXGroupShare.SetVisible(false);
+ }
+ }
+ else
+ {
+ XSingleton<XDebug>.singleton.AddLog("[WXGroup RefreshWXGroupBtn] 6", null, null, null, null, null, XDebugColor.XDebug_None);
+ base.uiBehaviour.m_BtnWXGroup.SetVisible(false);
+ base.uiBehaviour.m_BtnWXGroupShare.SetVisible(false);
+ }
+ }
+ }
+ }
+ }
+
+ private bool _OnGuildWXGroupClick(IXUIButton btn)
+ {
+ bool flag = XSingleton<XUpdater.XUpdater>.singleton.XPlatform.CheckStatus("Weixin_Installed", "");
+ bool flag2 = !flag;
+ bool result;
+ if (flag2)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XSingleton<XStringTable>.singleton.GetString("GUILD_WX_NOT_INSTALL"), "fece00");
+ result = false;
+ }
+ else
+ {
+ int num = (int)btn.ID;
+ Dictionary<string, string> dictionary = new Dictionary<string, string>();
+ dictionary["unionID"] = this._GuildDoc.BasicData.uid.ToString();
+ dictionary["chatRoomNickName"] = XSingleton<XAttributeMgr>.singleton.XPlayerData.Name;
+ bool flag3 = num == 0;
+ if (flag3)
+ {
+ XSingleton<PDatabase>.singleton.wxGroupCallbackType = WXGroupCallBackType.Guild;
+ dictionary["chatRoomName"] = this._GuildDoc.BasicData.guildName;
+ string param = Json.Serialize(dictionary);
+ XSingleton<XUpdater.XUpdater>.singleton.XPlatform.CreateWXGroup(param);
+ }
+ else
+ {
+ bool flag4 = num == 1;
+ if (flag4)
+ {
+ XSingleton<PDatabase>.singleton.wxGroupCallbackType = WXGroupCallBackType.Guild;
+ string param2 = Json.Serialize(dictionary);
+ XSingleton<XUpdater.XUpdater>.singleton.XPlatform.JoinWXGroup(param2);
+ }
+ }
+ result = true;
+ }
+ return result;
+ }
+
+ public bool _OnGuildWXGroupShare(IXUIButton btn)
+ {
+ bool flag = XSingleton<XUpdater.XUpdater>.singleton.XPlatform.CheckStatus("Weixin_Installed", "");
+ bool flag2 = !flag;
+ bool result;
+ if (flag2)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XSingleton<XStringTable>.singleton.GetString("GUILD_WX_NOT_INSTALL"), "fece00");
+ result = false;
+ }
+ else
+ {
+ XSingleton<PDatabase>.singleton.wxGroupCallbackType = WXGroupCallBackType.Guild;
+ Dictionary<string, object> dictionary = new Dictionary<string, object>();
+ dictionary["msgType"] = 1;
+ dictionary["subType"] = 1;
+ dictionary["unionid"] = this._GuildDoc.BasicData.uid.ToString();
+ dictionary["title"] = XSingleton<XGlobalConfig>.singleton.GetValue("GuildGroupShareTitle");
+ dictionary["description"] = XSingleton<XGlobalConfig>.singleton.GetValue("GuildGroupShareContent");
+ dictionary["mediaTagName"] = "MSG_INVITE";
+ dictionary["imgUrl"] = XSingleton<XGlobalConfig>.singleton.GetValue("GuildGroupShareImgUrl");
+ dictionary["messageExt"] = "messageExt";
+ dictionary["msdkExtInfo"] = "msdkExtInfo";
+ string param = Json.Serialize(dictionary);
+ XSingleton<XUpdater.XUpdater>.singleton.XPlatform.ShareWithWXGroup(param);
+ result = true;
+ }
+ return result;
+ }
+
+ public void GuildGroupResult(string apiId, string result, int error)
+ {
+ XSingleton<XDebug>.singleton.AddLog("[WXGroup GuildGroupResult]appiId:" + apiId + ",result:" + result, null, null, null, null, null, XDebugColor.XDebug_None);
+ int num = 0;
+ bool flag = !int.TryParse(apiId, out num);
+ if (flag)
+ {
+ XSingleton<XDebug>.singleton.AddLog("[WXGroup GuildGroupResult]appiId parse failed", null, null, null, null, null, XDebugColor.XDebug_None);
+ }
+ else
+ {
+ XGuildDocument specificDocument = XDocuments.GetSpecificDocument<XGuildDocument>(XGuildDocument.uuID);
+ bool flag2 = num == 6;
+ if (flag2)
+ {
+ bool flag3 = result == "Success";
+ if (flag3)
+ {
+ specificDocument.QueryWXGroup();
+ }
+ else
+ {
+ this.HandleErrorCode(error);
+ }
+ }
+ else
+ {
+ bool flag4 = num == 8;
+ if (flag4)
+ {
+ bool flag5 = result == "Success";
+ if (flag5)
+ {
+ specificDocument.QueryWXGroup();
+ }
+ else
+ {
+ this.HandleErrorCode(error);
+ }
+ }
+ }
+ }
+ }
+
+ private void HandleErrorCode(int errorCode)
+ {
+ string key = string.Format("GUILD_GROUP_ERROR_{0}", errorCode.ToString());
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XSingleton<XStringTable>.singleton.GetString(key), "fece00");
+ }
+
+ public void RefreshQQGroupBtn()
+ {
+ bool flag = !base.IsVisible();
+ if (!flag)
+ {
+ bool flag2 = XSingleton<XLoginDocument>.singleton.Channel != XAuthorizationChannel.XAuthorization_QQ || !XSingleton<XGameSysMgr>.singleton.IsSystemOpened(XSysDefine.XSys_Guild_Bind_Group);
+ if (flag2)
+ {
+ base.uiBehaviour.m_BtnQQGroup.SetVisible(false);
+ base.uiBehaviour.m_QQGroupName.SetVisible(false);
+ }
+ else
+ {
+ base.uiBehaviour.m_QQGroupName.SetVisible(true);
+ XSingleton<XDebug>.singleton.AddLog("[QQGroup RefreshQQGroupBtn] 1", null, null, null, null, null, XDebugColor.XDebug_None);
+ bool flag3 = this._GuildDoc.qqGroupBindStatus == GuildBindStatus.GBS_Owner || this._GuildDoc.qqGroupBindStatus == GuildBindStatus.GBS_Admin || this._GuildDoc.qqGroupBindStatus == GuildBindStatus.GBS_Member;
+ if (flag3)
+ {
+ bool flag4 = this._GuildDoc.Position == GuildPosition.GPOS_LEADER;
+ if (flag4)
+ {
+ XSingleton<XDebug>.singleton.AddLog("[QQGroup RefreshQQGroupBtn] 2", null, null, null, null, null, XDebugColor.XDebug_None);
+ base.uiBehaviour.m_BtnQQGroup.SetVisible(true);
+ base.uiBehaviour.m_BtnQQGroup.ID = 1UL;
+ base.uiBehaviour.m_BtnQQGroup.SetCaption(XSingleton<XStringTable>.singleton.GetString("GUILD_UNBIND_QQ_GROUP"));
+ base.uiBehaviour.m_QQGroupTip.SetVisible(false);
+ base.uiBehaviour.m_QQGroupName.SetText(this._GuildDoc.qqGroupName);
+ }
+ else
+ {
+ XSingleton<XDebug>.singleton.AddLog("[QQGroup RefreshQQGroupBtn] 3", null, null, null, null, null, XDebugColor.XDebug_None);
+ base.uiBehaviour.m_BtnQQGroup.SetVisible(false);
+ base.uiBehaviour.m_QQGroupName.SetText(this._GuildDoc.qqGroupName);
+ }
+ }
+ else
+ {
+ bool flag5 = this._GuildDoc.qqGroupBindStatus == GuildBindStatus.GBS_NotBind;
+ if (flag5)
+ {
+ bool flag6 = this._GuildDoc.Position == GuildPosition.GPOS_LEADER;
+ if (flag6)
+ {
+ XSingleton<XDebug>.singleton.AddLog("[QQGroup RefreshQQGroupBtn] 4", null, null, null, null, null, XDebugColor.XDebug_None);
+ base.uiBehaviour.m_BtnQQGroup.ID = 2UL;
+ base.uiBehaviour.m_BtnQQGroup.SetVisible(true);
+ base.uiBehaviour.m_BtnQQGroup.SetCaption(XSingleton<XStringTable>.singleton.GetString("GUILD_BIND_QQ_GROUP"));
+ base.uiBehaviour.m_QQGroupName.SetText(XSingleton<XStringTable>.singleton.GetString("GUILD_NOT_BIN_QQ_GROUP"));
+ base.uiBehaviour.m_QQGroupTip.SetVisible(true);
+ base.uiBehaviour.m_QQGroupTip.SetText(XSingleton<UiUtility>.singleton.ReplaceReturn(XSingleton<XStringTable>.singleton.GetString("GUILD_CREATE_QQ_GROUP_TIP")));
+ }
+ else
+ {
+ XSingleton<XDebug>.singleton.AddLog("[QQGroup RefreshQQGroupBtn] 5", null, null, null, null, null, XDebugColor.XDebug_None);
+ base.uiBehaviour.m_BtnQQGroup.SetVisible(false);
+ base.uiBehaviour.m_QQGroupName.SetText(XSingleton<XStringTable>.singleton.GetString("GUILD_NOT_BIN_QQ_GROUP"));
+ base.uiBehaviour.m_QQGroupTip.SetVisible(false);
+ }
+ }
+ else
+ {
+ bool flag7 = this._GuildDoc.qqGroupBindStatus == GuildBindStatus.GBS_NotMember;
+ if (flag7)
+ {
+ XSingleton<XDebug>.singleton.AddLog("[QQGroup RefreshQQGroupBtn] 6", null, null, null, null, null, XDebugColor.XDebug_None);
+ base.uiBehaviour.m_BtnQQGroup.SetVisible(true);
+ base.uiBehaviour.m_BtnQQGroup.ID = 3UL;
+ base.uiBehaviour.m_BtnQQGroup.SetCaption(XSingleton<XStringTable>.singleton.GetString("GUILD_JOIN_QQ_GROUP"));
+ base.uiBehaviour.m_QQGroupName.SetText(this._GuildDoc.qqGroupName);
+ base.uiBehaviour.m_QQGroupTip.SetVisible(true);
+ base.uiBehaviour.m_QQGroupTip.SetText(XSingleton<UiUtility>.singleton.ReplaceReturn(XSingleton<XStringTable>.singleton.GetString("GUILD_JOIN_QQ_GROUP_TIP")));
+ }
+ }
+ }
+ }
+ }
+ }
+
+ private bool _OnGuildQQGroupClick(IXUIButton btn)
+ {
+ int num = (int)btn.ID;
+ bool flag = num == 2;
+ if (flag)
+ {
+ this._GuildDoc.BindQQGroup();
+ }
+ else
+ {
+ bool flag2 = num == 3;
+ if (flag2)
+ {
+ this._GuildDoc.JoinQQGroup();
+ }
+ else
+ {
+ bool flag3 = num == 1;
+ if (flag3)
+ {
+ this._GuildDoc.UnbindQQGroup();
+ }
+ }
+ }
+ return true;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/XGuildHallView.cs.meta b/Client/Assets/Scripts/XMainClient/UI/XGuildHallView.cs.meta
new file mode 100644
index 00000000..54f8a231
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XGuildHallView.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: dde68928cddceb0449910349fcae7f26
+timeCreated: 1611404684
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/XGuildHuntDramaOperate.cs b/Client/Assets/Scripts/XMainClient/UI/XGuildHuntDramaOperate.cs
new file mode 100644
index 00000000..da2efedf
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XGuildHuntDramaOperate.cs
@@ -0,0 +1,52 @@
+using System;
+using System.Collections.Generic;
+using UILib;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class XGuildHuntDramaOperate : XDramaOperate
+ {
+ private XDramaOperateParam _param;
+
+ public override void ShowNpc(XNpc npc)
+ {
+ base.ShowNpc(npc);
+ this._param = XDataPool<XDramaOperateParam>.GetData();
+ this._param.Npc = npc;
+ this._param.Text = XSingleton<UiUtility>.singleton.ReplaceReturn(XStringDefineProxy.GetString("GuildGrowthHuntText"));
+ this._param.AppendButton(XStringDefineProxy.GetString("GuildGrowthHuntOK"), new ButtonClickEventHandler(this.ToDoSomething), 0UL);
+ this._param.AppendButton(XStringDefineProxy.GetString("GuildGrowthHuntRefuse"), new ButtonClickEventHandler(this.CloseUI), 0UL);
+ base._FireEvent(this._param);
+ }
+
+ private bool ToDoSomething(IXUIButton button)
+ {
+ bool flag = DlgBase<DramaDlg, DramaDlgBehaviour>.singleton.IsVisible();
+ if (flag)
+ {
+ DlgBase<DramaDlg, DramaDlgBehaviour>.singleton.SetVisible(false, true);
+ }
+ XExpeditionDocument specificDocument = XDocuments.GetSpecificDocument<XExpeditionDocument>(XExpeditionDocument.uuID);
+ List<ExpeditionTable.RowData> expeditionList = specificDocument.GetExpeditionList(TeamLevelType.TeamLevelGuildHunt);
+ XTeamDocument specificDocument2 = XDocuments.GetSpecificDocument<XTeamDocument>(XTeamDocument.uuID);
+ bool flag2 = expeditionList.Count > 0;
+ if (flag2)
+ {
+ specificDocument2.SetAndMatch(expeditionList[0].DNExpeditionID);
+ }
+ return true;
+ }
+
+ private bool CloseUI(IXUIButton button)
+ {
+ bool flag = DlgBase<DramaDlg, DramaDlgBehaviour>.singleton.IsVisible();
+ if (flag)
+ {
+ DlgBase<DramaDlg, DramaDlgBehaviour>.singleton.SetVisible(false, true);
+ }
+ return true;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/XGuildHuntDramaOperate.cs.meta b/Client/Assets/Scripts/XMainClient/UI/XGuildHuntDramaOperate.cs.meta
new file mode 100644
index 00000000..cd2a08fc
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XGuildHuntDramaOperate.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 7d631a79dbc8b5f41859654683123633
+timeCreated: 1611404000
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/XGuildListBehaviour.cs b/Client/Assets/Scripts/XMainClient/UI/XGuildListBehaviour.cs
new file mode 100644
index 00000000..6a98c5b5
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XGuildListBehaviour.cs
@@ -0,0 +1,54 @@
+using System;
+using System.Collections.Generic;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+
+namespace XMainClient.UI
+{
+ internal class XGuildListBehaviour : DlgBehaviourBase
+ {
+ public IXUIButton m_Close = null;
+
+ public IXUIWrapContent m_WrapContent;
+
+ public IXUIScrollView m_ScrollView;
+
+ public IXUIButton m_Create;
+
+ public IXUIButton m_QuickJoin;
+
+ public IXUIButton m_Search;
+
+ public IXUIInput m_SearchText;
+
+ public GameObject m_CreatePanel;
+
+ public XTitleBar m_TitleBar;
+
+ public Dictionary<IXUIButton, string> m_helpList = new Dictionary<IXUIButton, string>();
+
+ private void Awake()
+ {
+ this.m_Close = (base.transform.Find("Bg/Close").GetComponent("XUIButton") as IXUIButton);
+ this.m_ScrollView = (base.transform.Find("Bg/Panel").GetComponent("XUIScrollView") as IXUIScrollView);
+ this.m_WrapContent = (base.transform.Find("Bg/Panel/WrapContent").GetComponent("XUIWrapContent") as IXUIWrapContent);
+ this.m_Create = (base.transform.Find("Bg/Create").GetComponent("XUIButton") as IXUIButton);
+ this.m_QuickJoin = (base.transform.Find("Bg/QuickJoin").GetComponent("XUIButton") as IXUIButton);
+ this.m_Search = (base.transform.Find("Bg/Search").GetComponent("XUIButton") as IXUIButton);
+ this.m_SearchText = (base.transform.Find("Bg/SearchText").GetComponent("XUIInput") as IXUIInput);
+ this.m_CreatePanel = base.transform.Find("Bg/CreatePanel").gameObject;
+ Transform transform = base.transform.Find("Bg/HelpList");
+ int i = 0;
+ int childCount = transform.childCount;
+ while (i < childCount)
+ {
+ Transform child = transform.GetChild(i);
+ this.m_helpList.Add(child.GetComponent("XUIButton") as IXUIButton, child.name);
+ i++;
+ }
+ Transform transform2 = base.transform.Find("Bg/Titles");
+ DlgHandlerBase.EnsureCreate<XTitleBar>(ref this.m_TitleBar, transform2.gameObject, null, true);
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/XGuildListBehaviour.cs.meta b/Client/Assets/Scripts/XMainClient/UI/XGuildListBehaviour.cs.meta
new file mode 100644
index 00000000..c5803e8a
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XGuildListBehaviour.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: efd7eddd3e25b884395622bf7b1292ca
+timeCreated: 1611404805
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/XGuildListView.cs b/Client/Assets/Scripts/XMainClient/UI/XGuildListView.cs
new file mode 100644
index 00000000..290031f7
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XGuildListView.cs
@@ -0,0 +1,377 @@
+using System;
+using System.Collections.Generic;
+using KKSG;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class XGuildListView : DlgBase<XGuildListView, XGuildListBehaviour>
+ {
+ public XGuildCreateView CreateView
+ {
+ get
+ {
+ return this._CreateView;
+ }
+ }
+
+ public override string fileName
+ {
+ get
+ {
+ return "Guild/GuildListDlg";
+ }
+ }
+
+ public override int layer
+ {
+ get
+ {
+ return 1;
+ }
+ }
+
+ public override int group
+ {
+ get
+ {
+ return 1;
+ }
+ }
+
+ public override bool autoload
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override bool hideMainMenu
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override bool pushstack
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override bool fullscreenui
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ private int CurPPT
+ {
+ get
+ {
+ bool getPPT = this.GetPPT;
+ if (getPPT)
+ {
+ XPlayer player = XSingleton<XEntityMgr>.singleton.Player;
+ XPlayerAttributes xplayerAttributes = player.Attributes as XPlayerAttributes;
+ this.m_curPPT = (int)xplayerAttributes.GetAttr(XAttributeDefine.XAttr_POWER_POINT_Basic);
+ this.GetPPT = false;
+ }
+ return this.m_curPPT;
+ }
+ }
+
+ public static readonly Color TitleUnSelectedColor = new Color(0.607843161f, 0.607843161f, 0.607843161f);
+
+ public static readonly Color TitleSelectedColor = Color.white;
+
+ private XGuildListDocument _ListDoc;
+
+ private XGuildDocument _GuildDoc;
+
+ private XGuildCreateView _CreateView;
+
+ private XGuildBasicInfoDisplay _BasicInfoDisplayer = new XGuildBasicInfoDisplay();
+
+ private int m_curPPT = 0;
+
+ private bool GetPPT = false;
+
+ protected override void Init()
+ {
+ this._ListDoc = XDocuments.GetSpecificDocument<XGuildListDocument>(XGuildListDocument.uuID);
+ this._ListDoc.GuildListView = this;
+ this._GuildDoc = XDocuments.GetSpecificDocument<XGuildDocument>(XGuildDocument.uuID);
+ base.uiBehaviour.m_WrapContent.RegisterItemUpdateEventHandler(new WrapItemUpdateEventHandler(this.WrapContentItemUpdated));
+ base.uiBehaviour.m_WrapContent.RegisterItemInitEventHandler(new WrapItemInitEventHandler(this.WrapContentItemInit));
+ foreach (IXUIButton ixuibutton in base.uiBehaviour.m_helpList.Keys)
+ {
+ Guildintroduce.RowData introduce = this._GuildDoc.GetIntroduce(ixuibutton.gameObject.name);
+ bool flag = introduce != null;
+ if (flag)
+ {
+ IXUILabel ixuilabel = ixuibutton.gameObject.transform.Find("T").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel.SetText(introduce.Title);
+ }
+ }
+ DlgHandlerBase.EnsureCreate<XGuildCreateView>(ref this._CreateView, base.uiBehaviour.m_CreatePanel, null, true);
+ }
+
+ protected override void OnUnload()
+ {
+ this._ListDoc.GuildListView = null;
+ DlgHandlerBase.EnsureUnload<XGuildCreateView>(ref this._CreateView);
+ DlgHandlerBase.EnsureUnload<XTitleBar>(ref base.uiBehaviour.m_TitleBar);
+ base.OnUnload();
+ }
+
+ public override void Reset()
+ {
+ }
+
+ public override void RegisterEvent()
+ {
+ base.uiBehaviour.m_Close.RegisterClickEventHandler(new ButtonClickEventHandler(this._OnCloseBtnClick));
+ base.uiBehaviour.m_Create.RegisterClickEventHandler(new ButtonClickEventHandler(this._OnCreateBtnClick));
+ base.uiBehaviour.m_Search.RegisterClickEventHandler(new ButtonClickEventHandler(this._OnSearchBtnClick));
+ base.uiBehaviour.m_QuickJoin.RegisterClickEventHandler(new ButtonClickEventHandler(this._OnQuickJoinBtnClick));
+ base.uiBehaviour.m_TitleBar.RegisterClickEventHandler(new TitleClickEventHandler(this._OnTitleClickEventHandler));
+ foreach (IXUIButton ixuibutton in base.uiBehaviour.m_helpList.Keys)
+ {
+ ixuibutton.RegisterClickEventHandler(new ButtonClickEventHandler(this._ShowHelpClick));
+ }
+ }
+
+ protected override void OnShow()
+ {
+ base.uiBehaviour.m_SearchText.SetText("");
+ this._ListDoc.SearchText = "";
+ this._ListDoc.ReqGuildList();
+ this._CreateView.SetVisible(false);
+ this.RefreshPage(true);
+ base.uiBehaviour.m_TitleBar.Refresh((ulong)((long)XFastEnumIntEqualityComparer<GuildSortType>.ToInt(this._ListDoc.SortType)));
+ }
+
+ private bool _OnTitleClickEventHandler(ulong ID)
+ {
+ this._ListDoc.SortType = (GuildSortType)ID;
+ this._ListDoc.ReqGuildList();
+ return this._ListDoc.SortDirection > 0;
+ }
+
+ public void RefreshPage(bool bResetPosition = true)
+ {
+ List<XGuildListData> listData = this._ListDoc.ListData;
+ this.GetPPT = true;
+ base.uiBehaviour.m_WrapContent.SetContentCount(listData.Count, false);
+ }
+
+ public void NewContentAppended()
+ {
+ List<XGuildListData> listData = this._ListDoc.ListData;
+ base.uiBehaviour.m_WrapContent.SetContentCount(listData.Count, false);
+ }
+
+ private bool _ShowHelpClick(IXUIButton button)
+ {
+ string helpName;
+ bool flag = this.m_uiBehaviour.m_helpList.TryGetValue(button, out helpName);
+ bool result;
+ if (flag)
+ {
+ Guildintroduce.RowData introduce = this._GuildDoc.GetIntroduce(helpName);
+ bool flag2 = introduce != null;
+ if (flag2)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemHelp(introduce.Desc, introduce.Title, XStringDefineProxy.GetString(XStringDefine.COMMON_OK));
+ }
+ result = true;
+ }
+ else
+ {
+ result = false;
+ }
+ return result;
+ }
+
+ private void WrapContentItemInit(Transform t, int index)
+ {
+ IXUIButton ixuibutton = t.Find("ValidContent/Apply").GetComponent("XUIButton") as IXUIButton;
+ ixuibutton.RegisterClickEventHandler(new ButtonClickEventHandler(this._OnJoinBtnClick));
+ ixuibutton = (t.Find("ValidContent/View").GetComponent("XUIButton") as IXUIButton);
+ ixuibutton.RegisterClickEventHandler(new ButtonClickEventHandler(this._OnViewBtnClick));
+ IXUILabel ixuilabel = t.Find("LoadMore").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel.RegisterLabelClickEventHandler(new LabelClickEventHandler(this._OnLoadMoreClick));
+ }
+
+ private void WrapContentItemUpdated(Transform t, int index)
+ {
+ List<XGuildListData> listData = this._ListDoc.ListData;
+ bool flag = index >= listData.Count;
+ if (flag)
+ {
+ XSingleton<XDebug>.singleton.AddErrorLog("Item index out of range: ", index.ToString(), null, null, null, null);
+ }
+ else
+ {
+ XGuildListData xguildListData = listData[index];
+ Transform transform = t.Find("LoadMore");
+ Transform transform2 = t.Find("ValidContent");
+ IXUISprite ixuisprite = t.Find("Bg").GetComponent("XUISprite") as IXUISprite;
+ bool flag2 = xguildListData.uid == 0UL;
+ if (flag2)
+ {
+ ixuisprite.SetVisible(false);
+ transform.gameObject.SetActive(true);
+ transform2.gameObject.SetActive(false);
+ }
+ else
+ {
+ ixuisprite.SetVisible(true);
+ transform.gameObject.SetActive(false);
+ transform2.gameObject.SetActive(true);
+ this._BasicInfoDisplayer.Init(t.Find("ValidContent"), false);
+ this._BasicInfoDisplayer.Set(xguildListData);
+ IXUIButton ixuibutton = t.Find("ValidContent/Apply").GetComponent("XUIButton") as IXUIButton;
+ IXUILabel ixuilabel = t.Find("ValidContent/Apply/T").GetComponent("XUILabel") as IXUILabel;
+ IXUIButton ixuibutton2 = t.Find("ValidContent/View").GetComponent("XUIButton") as IXUIButton;
+ IXUISprite ixuisprite2 = t.Find("ValidContent/Portrait").GetComponent("XUISprite") as IXUISprite;
+ ixuibutton.SetEnable(!xguildListData.bIsApplying && !this._GuildDoc.bInGuild, false);
+ ixuisprite2.SetSprite(XGuildDocument.GetPortraitName(xguildListData.portraitIndex));
+ bool bIsApplying = xguildListData.bIsApplying;
+ if (bIsApplying)
+ {
+ ixuilabel.SetText(XStringDefineProxy.GetString("APPLYING"));
+ }
+ else
+ {
+ bool flag3 = !xguildListData.bNeedApprove;
+ if (flag3)
+ {
+ ixuilabel.SetText(XStringDefineProxy.GetString("JOIN"));
+ }
+ else
+ {
+ ixuilabel.SetText(XStringDefineProxy.GetString("APPLY"));
+ }
+ ixuibutton.SetGrey((ulong)xguildListData.requiredPPT < (ulong)((long)this.CurPPT));
+ }
+ ixuibutton.ID = (ulong)((long)index);
+ ixuibutton2.ID = (ulong)((long)index);
+ }
+ }
+ }
+
+ private bool _OnCloseBtnClick(IXUIButton go)
+ {
+ this.SetVisibleWithAnimation(false, null);
+ return true;
+ }
+
+ private bool _OnCreateBtnClick(IXUIButton go)
+ {
+ bool bInGuild = this._GuildDoc.bInGuild;
+ bool result;
+ if (bInGuild)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(ErrorCode.ERR_GUILD_ALREADY_IN_GUILD, "fece00");
+ result = true;
+ }
+ else
+ {
+ this._CreateView.SetVisible(true);
+ result = true;
+ }
+ return result;
+ }
+
+ private bool _OnSearchBtnClick(IXUIButton go)
+ {
+ string text = base.uiBehaviour.m_SearchText.GetText();
+ this._ListDoc.ReqSearch(text);
+ return true;
+ }
+
+ private bool _OnQuickJoinBtnClick(IXUIButton go)
+ {
+ bool bInGuild = this._GuildDoc.bInGuild;
+ bool result;
+ if (bInGuild)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(ErrorCode.ERR_GUILD_ALREADY_IN_GUILD, "fece00");
+ result = true;
+ }
+ else
+ {
+ this._ListDoc.ReqQuickJoin();
+ result = true;
+ }
+ return result;
+ }
+
+ private bool _OnViewBtnClick(IXUIButton go)
+ {
+ XGuildViewDocument specificDocument = XDocuments.GetSpecificDocument<XGuildViewDocument>(XGuildViewDocument.uuID);
+ int num = (int)go.ID;
+ bool flag = num < 0 || num >= this._ListDoc.ListData.Count;
+ bool result;
+ if (flag)
+ {
+ result = true;
+ }
+ else
+ {
+ specificDocument.View(this._ListDoc.ListData[num]);
+ result = true;
+ }
+ return result;
+ }
+
+ private bool _OnJoinBtnClick(IXUIButton go)
+ {
+ bool bInGuild = this._GuildDoc.bInGuild;
+ bool result;
+ if (bInGuild)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(ErrorCode.ERR_GUILD_ALREADY_IN_GUILD, "fece00");
+ result = true;
+ }
+ else
+ {
+ int num = (int)go.ID;
+ bool flag = num < 0 || num >= this._ListDoc.ListData.Count;
+ if (flag)
+ {
+ result = false;
+ }
+ else
+ {
+ XGuildListData xguildListData = this._ListDoc.ListData[num];
+ DlgBase<XGuildApplyView, XGuildApplyBehaviour>.singleton.ShowApply(xguildListData.uid, xguildListData.guildName, xguildListData.requiredPPT, xguildListData.bNeedApprove, xguildListData.announcement);
+ result = true;
+ }
+ }
+ return result;
+ }
+
+ private void _OnLoadMoreClick(IXUILabel go)
+ {
+ this._ListDoc.ReqMoreGuilds();
+ }
+
+ public override void StackRefresh()
+ {
+ base.StackRefresh();
+ base.uiBehaviour.m_WrapContent.RefreshAllVisibleContents();
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/XGuildListView.cs.meta b/Client/Assets/Scripts/XMainClient/UI/XGuildListView.cs.meta
new file mode 100644
index 00000000..f5d2b615
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XGuildListView.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 83406d3f7a7bd1a42966c0e1fb363173
+timeCreated: 1611404043
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/XGuildLogView.cs b/Client/Assets/Scripts/XMainClient/UI/XGuildLogView.cs
new file mode 100644
index 00000000..dcb17969
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XGuildLogView.cs
@@ -0,0 +1,88 @@
+using System;
+using System.Collections.Generic;
+using UILib;
+using UnityEngine;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class XGuildLogView : DlgHandlerBase
+ {
+ public ILogSource LogSource
+ {
+ set
+ {
+ this.m_LogSource = value;
+ }
+ }
+
+ private ILogSource m_LogSource;
+
+ private IXUIWrapContent m_WrapContent;
+
+ private IXUIScrollView m_ScrollView;
+
+ protected override void Init()
+ {
+ this.m_ScrollView = (base.PanelObject.transform.Find("LogMenu/Panel").GetComponent("XUIScrollView") as IXUIScrollView);
+ this.m_WrapContent = (base.PanelObject.transform.Find("LogMenu/Panel/WrapContent").GetComponent("XUIWrapContent") as IXUIWrapContent);
+ this.m_WrapContent.RegisterItemUpdateEventHandler(new WrapItemUpdateEventHandler(this._WrapContentItemUpdated));
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ Transform transform = base.PanelObject.transform.Find("Close");
+ bool flag = transform != null;
+ if (flag)
+ {
+ IXUIButton ixuibutton = transform.GetComponent("XUIButton") as IXUIButton;
+ ixuibutton.RegisterClickEventHandler(new ButtonClickEventHandler(this._OnCloseBtnClick));
+ }
+ }
+
+ public void Refresh()
+ {
+ List<ILogData> logList = this.m_LogSource.GetLogList();
+ int count = logList.Count;
+ this.m_WrapContent.SetContentCount(count, false);
+ this.m_ScrollView.ResetPosition();
+ }
+
+ private void _WrapContentItemUpdated(Transform t, int index)
+ {
+ List<ILogData> logList = this.m_LogSource.GetLogList();
+ bool flag = index < 0 || index >= logList.Count;
+ if (!flag)
+ {
+ ILogData logData = logList[index];
+ IXUILabelSymbol ixuilabelSymbol = t.Find("Content").GetComponent("XUILabelSymbol") as IXUILabelSymbol;
+ IXUILabel ixuilabel = t.Find("Time").GetComponent("XUILabel") as IXUILabel;
+ ixuilabelSymbol.RegisterNameEventHandler(new HyperLinkClickEventHandler(this._NameClick));
+ ixuilabelSymbol.InputText = logData.GetContent();
+ ixuilabel.SetText(logData.GetTime());
+ }
+ }
+
+ private bool _OnCloseBtnClick(IXUIButton go)
+ {
+ base.SetVisible(false);
+ return true;
+ }
+
+ private void _NameClick(string param)
+ {
+ string text = "";
+ ulong num = 0UL;
+ bool flag = XLabelSymbolHelper.ParseNameParam(param, ref text, ref num);
+ if (flag)
+ {
+ bool flag2 = num == XSingleton<XEntityMgr>.singleton.Player.Attributes.EntityID;
+ if (!flag2)
+ {
+ XCharacterCommonMenuDocument.ReqCharacterMenuInfo(num, false);
+ }
+ }
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/XGuildLogView.cs.meta b/Client/Assets/Scripts/XMainClient/UI/XGuildLogView.cs.meta
new file mode 100644
index 00000000..1ab5dc7f
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XGuildLogView.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 30f3bdeaf04e869429e85c11dcf2ee74
+timeCreated: 1611403523
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/XGuildMemberInfoDisplay.cs b/Client/Assets/Scripts/XMainClient/UI/XGuildMemberInfoDisplay.cs
new file mode 100644
index 00000000..4262aa63
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XGuildMemberInfoDisplay.cs
@@ -0,0 +1,176 @@
+using System;
+using UILib;
+using UnityEngine;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class XGuildMemberInfoDisplay
+ {
+ public Transform Root;
+
+ public IXUILabelSymbol Name;
+
+ public IXUILabel Position;
+
+ public IXUILabel Level;
+
+ public IXUILabel PPT;
+
+ public IXUISprite Portrait;
+
+ public IXUISprite Profession;
+
+ public IXUILabel Liveness;
+
+ public IXUISpriteAnimation Title;
+
+ public void Init(Transform go, bool bFirstInit)
+ {
+ this.Root = go;
+ Transform transform = this.Root.Find("Name");
+ bool flag = transform != null;
+ if (flag)
+ {
+ this.Name = (transform.GetComponent("XUILabelSymbol") as IXUILabelSymbol);
+ if (bFirstInit)
+ {
+ this.Name.InputText = "";
+ }
+ }
+ else
+ {
+ this.Name = null;
+ }
+ transform = this.Root.Find("Position");
+ bool flag2 = transform != null;
+ if (flag2)
+ {
+ this.Position = (transform.GetComponent("XUILabel") as IXUILabel);
+ if (bFirstInit)
+ {
+ this.Position.SetText("");
+ }
+ }
+ else
+ {
+ this.Position = null;
+ }
+ transform = this.Root.Find("Level");
+ bool flag3 = transform != null;
+ if (flag3)
+ {
+ this.Level = (transform.GetComponent("XUILabel") as IXUILabel);
+ if (bFirstInit)
+ {
+ this.Level.SetText("");
+ }
+ }
+ else
+ {
+ this.Level = null;
+ }
+ transform = this.Root.Find("PPT");
+ bool flag4 = transform != null;
+ if (flag4)
+ {
+ this.PPT = (transform.GetComponent("XUILabel") as IXUILabel);
+ if (bFirstInit)
+ {
+ this.PPT.SetText("");
+ }
+ }
+ else
+ {
+ this.PPT = null;
+ }
+ transform = this.Root.Find("Portrait");
+ bool flag5 = transform != null;
+ if (flag5)
+ {
+ this.Portrait = (transform.GetComponent("XUISprite") as IXUISprite);
+ }
+ else
+ {
+ this.Portrait = null;
+ }
+ transform = this.Root.Find("Profession");
+ bool flag6 = transform != null;
+ if (flag6)
+ {
+ this.Profession = (transform.GetComponent("XUISprite") as IXUISprite);
+ }
+ else
+ {
+ this.Profession = null;
+ }
+ transform = this.Root.Find("Liveness");
+ bool flag7 = transform != null;
+ if (flag7)
+ {
+ this.Liveness = (transform.GetComponent("XUILabel") as IXUILabel);
+ if (bFirstInit)
+ {
+ this.Liveness.SetText(string.Empty);
+ }
+ }
+ transform = this.Root.Find("Title");
+ bool flag8 = transform != null;
+ if (flag8)
+ {
+ this.Title = (transform.GetComponent("XUISpriteAnimation") as IXUISpriteAnimation);
+ }
+ }
+
+ public void Set(XGuildMemberBasicInfo data)
+ {
+ bool flag = this.Name != null;
+ if (flag)
+ {
+ this.Name.InputText = data.name + XWelfareDocument.GetMemberPrivilegeIconString(data.paymemberid) + XRechargeDocument.GetVIPIconString(data.vip);
+ }
+ bool flag2 = this.Position != null;
+ if (flag2)
+ {
+ this.Position.SetText(XGuildDocument.GuildPP.GetPositionName(data.position, false));
+ }
+ bool flag3 = this.Level != null;
+ if (flag3)
+ {
+ this.Level.SetText("Lv." + data.level);
+ }
+ bool flag4 = this.PPT != null;
+ if (flag4)
+ {
+ this.PPT.SetText(data.ppt.ToString());
+ }
+ bool flag5 = this.Portrait != null;
+ if (flag5)
+ {
+ this.Portrait.SetSprite(XSingleton<XProfessionSkillMgr>.singleton.GetProfHeadIcon2(data.profession));
+ }
+ bool flag6 = this.Profession != null;
+ if (flag6)
+ {
+ this.Profession.SetSprite(XSingleton<XProfessionSkillMgr>.singleton.GetProfIcon(data.profession));
+ }
+ bool flag7 = this.Liveness != null;
+ if (flag7)
+ {
+ this.Liveness.SetText(data.GetLiveness());
+ }
+ bool flag8 = this.Title != null;
+ if (flag8)
+ {
+ TitleTable.RowData title = XTitleDocument.GetTitle(data.titleID);
+ bool flag9 = title != null;
+ if (flag9)
+ {
+ this.Title.SetNamePrefix(title.RankAtlas, title.RankIcon);
+ this.Title.SetFrameRate(XTitleDocument.TITLE_FRAME_RATE);
+ this.Title.MakePixelPerfect();
+ }
+ }
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/XGuildMemberInfoDisplay.cs.meta b/Client/Assets/Scripts/XMainClient/UI/XGuildMemberInfoDisplay.cs.meta
new file mode 100644
index 00000000..16d386d4
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XGuildMemberInfoDisplay.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: a0d0675b532667b4298ac0ec4b9bb33a
+timeCreated: 1611404250
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/XGuildMembersBehaviour.cs b/Client/Assets/Scripts/XMainClient/UI/XGuildMembersBehaviour.cs
new file mode 100644
index 00000000..d8fcc7d1
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XGuildMembersBehaviour.cs
@@ -0,0 +1,27 @@
+using System;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+
+namespace XMainClient.UI
+{
+ internal class XGuildMembersBehaviour : DlgBehaviourBase
+ {
+ public IXUIButton m_Close = null;
+
+ public IXUIWrapContent m_WrapContent;
+
+ public IXUIScrollView m_ScrollView;
+
+ public XTitleBar m_TitleBar;
+
+ private void Awake()
+ {
+ this.m_Close = (base.transform.Find("Bg/Close").GetComponent("XUIButton") as IXUIButton);
+ this.m_ScrollView = (base.transform.Find("Bg/Panel").GetComponent("XUIScrollView") as IXUIScrollView);
+ this.m_WrapContent = (base.transform.Find("Bg/Panel/WrapContent").GetComponent("XUIWrapContent") as IXUIWrapContent);
+ Transform transform = base.transform.Find("Bg/Titles");
+ DlgHandlerBase.EnsureCreate<XTitleBar>(ref this.m_TitleBar, transform.gameObject, null, true);
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/XGuildMembersBehaviour.cs.meta b/Client/Assets/Scripts/XMainClient/UI/XGuildMembersBehaviour.cs.meta
new file mode 100644
index 00000000..ec818401
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XGuildMembersBehaviour.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 099900bdaf4f39444ba6d10ea4ae7528
+timeCreated: 1611403157
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/XGuildMembersView.cs b/Client/Assets/Scripts/XMainClient/UI/XGuildMembersView.cs
new file mode 100644
index 00000000..8db93ec2
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XGuildMembersView.cs
@@ -0,0 +1,432 @@
+using System;
+using System.Collections.Generic;
+using KKSG;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class XGuildMembersView : DlgBase<XGuildMembersView, XGuildMembersBehaviour>
+ {
+ public override string fileName
+ {
+ get
+ {
+ return "Guild/GuildMembersDlg";
+ }
+ }
+
+ public override int layer
+ {
+ get
+ {
+ return 1;
+ }
+ }
+
+ public override int group
+ {
+ get
+ {
+ return 1;
+ }
+ }
+
+ public override bool autoload
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override bool hideMainMenu
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override bool pushstack
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public static readonly Color TitleUnSelectedColor = new Color(0.607843161f, 0.607843161f, 0.607843161f);
+
+ public static readonly Color TitleSelectedColor = Color.white;
+
+ private XGuildMemberDocument _MemberDoc;
+
+ private XGuildDocument _GuildDoc;
+
+ private XGuildMemberInfoDisplay _MemberInfoDisplay = new XGuildMemberInfoDisplay();
+
+ private GuildPosition m_SelectedHigherPosition;
+
+ private GuildPosition m_SelectedLowerPosition;
+
+ private ulong m_SelectedMemberID;
+
+ private string m_SelectedName;
+
+ private XGuildMember m_SelectMember;
+
+ protected override void Init()
+ {
+ this._MemberDoc = XDocuments.GetSpecificDocument<XGuildMemberDocument>(XGuildMemberDocument.uuID);
+ this._MemberDoc.GuildMembersView = this;
+ this._GuildDoc = XDocuments.GetSpecificDocument<XGuildDocument>(XGuildDocument.uuID);
+ }
+
+ protected override void OnUnload()
+ {
+ this._MemberDoc.GuildMembersView = null;
+ DlgHandlerBase.EnsureUnload<XTitleBar>(ref base.uiBehaviour.m_TitleBar);
+ base.OnUnload();
+ }
+
+ public override void RegisterEvent()
+ {
+ base.uiBehaviour.m_Close.RegisterClickEventHandler(new ButtonClickEventHandler(this._OnCloseBtnClick));
+ base.uiBehaviour.m_WrapContent.RegisterItemUpdateEventHandler(new WrapItemUpdateEventHandler(this._WrapContentItemUpdated));
+ base.uiBehaviour.m_WrapContent.RegisterItemInitEventHandler(new WrapItemInitEventHandler(this._WrapContentItemInit));
+ base.uiBehaviour.m_TitleBar.RegisterClickEventHandler(new TitleClickEventHandler(this._OnTitleClickEventHandler));
+ }
+
+ protected override void OnShow()
+ {
+ this._MemberDoc.ReqMemberList();
+ base.uiBehaviour.m_TitleBar.Refresh((ulong)((long)XFastEnumIntEqualityComparer<GuildMemberSortType>.ToInt(this._MemberDoc.SortType)));
+ }
+
+ private bool _OnTitleClickEventHandler(ulong ID)
+ {
+ this._MemberDoc.SortType = (GuildMemberSortType)ID;
+ this._MemberDoc.SortAndShow();
+ return this._MemberDoc.SortDirection > 0;
+ }
+
+ public void RefreshAll(bool bResetPosition = true)
+ {
+ List<XGuildMember> memberList = this._MemberDoc.MemberList;
+ int count = memberList.Count;
+ base.uiBehaviour.m_WrapContent.SetContentCount(count, false);
+ if (bResetPosition)
+ {
+ base.uiBehaviour.m_ScrollView.ResetPosition();
+ }
+ }
+
+ public void Refresh()
+ {
+ base.uiBehaviour.m_WrapContent.RefreshAllVisibleContents();
+ }
+
+ public void RefreshFatigue()
+ {
+ }
+
+ public void OnRefreshDailyTaskReply()
+ {
+ base.uiBehaviour.m_WrapContent.RefreshAllVisibleContents();
+ }
+
+ private void _WrapContentItemInit(Transform t, int index)
+ {
+ IXUISprite ixuisprite = t.GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this._OnMemberClick));
+ IXUIButton ixuibutton = t.Find("Inherit").GetComponent("XUIButton") as IXUIButton;
+ ixuibutton.RegisterClickEventHandler(new ButtonClickEventHandler(this._OnInheritClick));
+ IXUIButton ixuibutton2 = t.Find("BtnTask").GetComponent("XUIButton") as IXUIButton;
+ ixuibutton2.RegisterClickEventHandler(new ButtonClickEventHandler(this._OnRefreshClick));
+ }
+
+ private bool _OnRefreshClick(IXUIButton button)
+ {
+ XGuildDailyTaskDocument.Doc.SendToRefreshTaskOp(DailyRefreshOperType.DROT_Refresh, button.ID);
+ return true;
+ }
+
+ private void _WrapContentItemUpdated(Transform t, int index)
+ {
+ bool flag = index < 0 || index >= this._MemberDoc.MemberList.Count;
+ if (!flag)
+ {
+ XGuildMember xguildMember = this._MemberDoc.MemberList[index];
+ ulong entityID = XSingleton<XEntityMgr>.singleton.Player.Attributes.EntityID;
+ IXUISprite ixuisprite = t.GetComponent("XUISprite") as IXUISprite;
+ GameObject gameObject = t.Find("PlayerBg").gameObject;
+ IXUILabel ixuilabel = t.Find("Contribution").GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel2 = t.Find("LastLoginTime").GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel3 = t.Find("LuckLevel").GetComponent("XUILabel") as IXUILabel;
+ IXUIButton ixuibutton = t.Find("Inherit").GetComponent("XUIButton") as IXUIButton;
+ ixuibutton.ID = (ulong)((long)index);
+ this._MemberInfoDisplay.Init(t, false);
+ this._MemberInfoDisplay.Set(xguildMember);
+ ixuibutton.SetVisible(xguildMember.isInherit);
+ List<string> stringList = XSingleton<XGlobalConfig>.singleton.GetStringList("LuckyLevel");
+ int index2 = Mathf.Min((int)(xguildMember.taskLuck - 1u), stringList.Count - 1);
+ ixuilabel3.SetText(stringList[index2]);
+ List<string> stringList2 = XSingleton<XGlobalConfig>.singleton.GetStringList("LuckyLevelColor");
+ Color color = XSingleton<UiUtility>.singleton.ConvertRGBStringToColor(stringList2[index2]);
+ ixuilabel3.SetColor(color);
+ IXUIButton ixuibutton2 = t.Find("BtnTask").GetComponent("XUIButton") as IXUIButton;
+ ixuibutton2.SetEnable(xguildMember.canRefresh && xguildMember.taskScore < 4u, false);
+ ixuibutton2.ID = xguildMember.uid;
+ IXUISprite ixuisprite2 = t.Find("BtnTask/TaskLevel").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite2.SetSprite(ixuisprite2.spriteName.Substring(0, ixuisprite2.spriteName.Length - 1) + xguildMember.taskScore);
+ ixuilabel.SetText(xguildMember.contribution.ToString());
+ bool flag2 = this._GuildDoc.Position == GuildPosition.GPOS_LEADER || this._GuildDoc.Position == GuildPosition.GPOS_VICELEADER;
+ if (flag2)
+ {
+ ixuilabel2.SetText(XSingleton<UiUtility>.singleton.TimeAgoFormatString(xguildMember.time));
+ }
+ else
+ {
+ ixuilabel2.SetText(XSingleton<UiUtility>.singleton.TimeOnOrOutFromString(xguildMember.time));
+ }
+ ixuisprite.ID = (ulong)((long)index);
+ gameObject.SetActive(entityID == xguildMember.uid);
+ }
+ }
+
+ private bool _OnCloseBtnClick(IXUIButton go)
+ {
+ this.SetVisibleWithAnimation(false, null);
+ return true;
+ }
+
+ private bool _OnOneKeyReceiveBtnClick(IXUIButton go)
+ {
+ bool flag = !this._GuildDoc.bInGuild;
+ bool result;
+ if (flag)
+ {
+ result = true;
+ }
+ else
+ {
+ XSingleton<UiUtility>.singleton.ShowModalDialog(XStringDefineProxy.GetString("GUILD_ONEKEY_RECEIVE_FATIGUE_CONFIRM"), XStringDefineProxy.GetString("COMMON_OK"), XStringDefineProxy.GetString("COMMON_CANCEL"), new ButtonClickEventHandler(this._OnOneKeyReceive));
+ result = true;
+ }
+ return result;
+ }
+
+ private bool _OnOneKeyReceive(IXUIButton go)
+ {
+ XSingleton<UiUtility>.singleton.CloseModalDlg();
+ this._MemberDoc.ReqOneKeyReceiveFatigue();
+ return true;
+ }
+
+ private bool _OnOneKeySendBtnClick(IXUIButton go)
+ {
+ this._MemberDoc.ReqOneKeySendFatigue();
+ return true;
+ }
+
+ private bool _OnReceiveBtnClick(IXUIButton btn)
+ {
+ this._MemberDoc.ReqReceiveFatigue((int)btn.ID);
+ return true;
+ }
+
+ private bool _OnSendBtnClick(IXUIButton btn)
+ {
+ this._MemberDoc.ReqSendFatigue((int)btn.ID);
+ return true;
+ }
+
+ private void _OnMemberClick(IXUISprite iSp)
+ {
+ int num = (int)iSp.ID;
+ bool flag = num < 0 || num >= this._MemberDoc.MemberList.Count;
+ if (!flag)
+ {
+ XGuildMember xguildMember = this._MemberDoc.MemberList[num];
+ bool flag2 = xguildMember.uid == XSingleton<XEntityMgr>.singleton.Player.Attributes.EntityID;
+ if (!flag2)
+ {
+ this.m_SelectMember = xguildMember;
+ this.m_SelectedName = xguildMember.name;
+ this.m_SelectedMemberID = xguildMember.uid;
+ GuildPosition position = xguildMember.position;
+ this.m_SelectedHigherPosition = (GuildPosition)XGuildDocument.GuildPP.GetHigherPosition(position);
+ this.m_SelectedLowerPosition = (GuildPosition)XGuildDocument.GuildPP.GetLowerPosition(position);
+ GuildPermission setPositionPermission = XGuildDocument.GuildPP.GetSetPositionPermission(this.m_SelectedHigherPosition, this.m_SelectedHigherPosition);
+ GuildPermission setPositionPermission2 = XGuildDocument.GuildPP.GetSetPositionPermission(position, this.m_SelectedLowerPosition);
+ List<string> list = new List<string>();
+ List<ButtonClickEventHandler> list2 = new List<ButtonClickEventHandler>();
+ list.Add(XStringDefineProxy.GetString("OTHERPLAYERINFO_MENU_VIEW"));
+ list2.Add(new ButtonClickEventHandler(DlgBase<XOtherPlayerInfoView, XOtherPlayerInfoBehaviour>.singleton.ShowDetailInfo));
+ bool flag3 = XSingleton<XGameSysMgr>.singleton.IsSystemOpened(XSysDefine.XSys_Friends);
+ if (flag3)
+ {
+ list.Add(XStringDefineProxy.GetString("OTHERPLAYERINFO_MENU_ADDFRIEND"));
+ list2.Add(new ButtonClickEventHandler(DlgBase<XOtherPlayerInfoView, XOtherPlayerInfoBehaviour>.singleton.AddFriend));
+ }
+ list.Add(XStringDefineProxy.GetString("OTHERPLAYERINFO_MENU_SENDFLOWER"));
+ list2.Add(new ButtonClickEventHandler(DlgBase<XOtherPlayerInfoView, XOtherPlayerInfoBehaviour>.singleton.SendFlower));
+ list.Add(XStringDefineProxy.GetString("OTHERPLAYERINFO_MENU_PRIVATECHAT"));
+ list2.Add(new ButtonClickEventHandler(DlgBase<XOtherPlayerInfoView, XOtherPlayerInfoBehaviour>.singleton.PrivateChat));
+ bool flag4 = this._GuildDoc.IHavePermission(setPositionPermission) || this._GuildDoc.IHavePermission(setPositionPermission2);
+ if (flag4)
+ {
+ list.Add(XStringDefineProxy.GetString("OTHERPLAYERINFO_MENU_INCREASEPOSITION"));
+ list2.Add(new ButtonClickEventHandler(this._HigherPositionClick));
+ }
+ bool flag5 = this._GuildDoc.IHavePermission(GuildPermission.GPEM_FIREMEMBER);
+ if (flag5)
+ {
+ list.Add(XStringDefineProxy.GetString("OTHERPLAYERINFO_MENU_FIREFROMGUILD"));
+ list2.Add(new ButtonClickEventHandler(this._OnKickAssBtnClick));
+ }
+ bool isInherit = xguildMember.isInherit;
+ if (isInherit)
+ {
+ list.Add(XStringDefineProxy.GetString("OTHERPLAYERINFO_MENU_INHERIT"));
+ list2.Add(new ButtonClickEventHandler(this._OnInheritDialog));
+ }
+ list.Add(XStringDefineProxy.GetString("OTHERPLAYERINFO_MENU_PK"));
+ list2.Add(new ButtonClickEventHandler(this._PKClick));
+ DlgBase<XOtherPlayerInfoView, XOtherPlayerInfoBehaviour>.singleton.ShowMenuUI(xguildMember.uid, xguildMember.name, list, list2, 0u, (uint)xguildMember.profession);
+ }
+ }
+ }
+
+ private bool _PKClick(IXUIButton btn)
+ {
+ XPKInvitationDocument specificDocument = XDocuments.GetSpecificDocument<XPKInvitationDocument>(XPKInvitationDocument.uuID);
+ specificDocument.SendPKInvitation(this.m_SelectedMemberID);
+ return true;
+ }
+
+ private bool _HigherPositionClick(IXUIButton btn)
+ {
+ DlgBase<GuildPositionMenu, GuildPositionBehaviour>.singleton.ShowMenu(this.m_SelectedMemberID);
+ return true;
+ }
+
+ private bool _HigherPosition(IXUIButton btn)
+ {
+ XSingleton<UiUtility>.singleton.CloseModalDlg();
+ this._MemberDoc.ReqChangePosition(this.m_SelectedMemberID, true);
+ return true;
+ }
+
+ private bool _LowerPositionClick(IXUIButton btn)
+ {
+ this._MemberDoc.ReqChangePosition(this.m_SelectedMemberID, false);
+ DlgBase<XOtherPlayerInfoView, XOtherPlayerInfoBehaviour>.singleton.SetVisibleWithAnimation(false, null);
+ return true;
+ }
+
+ private bool _OnInheritDialog(IXUIButton btn)
+ {
+ DlgBase<XOtherPlayerInfoView, XOtherPlayerInfoBehaviour>.singleton.SetVisibleWithAnimation(false, null);
+ bool flag = this.m_SelectMember == null;
+ bool result;
+ if (flag)
+ {
+ result = true;
+ }
+ else
+ {
+ this.RequestInherit(this.m_SelectMember);
+ result = false;
+ }
+ return result;
+ }
+
+ private bool _OnInheritClick(IXUIButton btn)
+ {
+ int num = (int)btn.ID;
+ bool flag = num < 0 || num >= this._MemberDoc.MemberList.Count;
+ bool result;
+ if (flag)
+ {
+ result = false;
+ }
+ else
+ {
+ this.RequestInherit(this._MemberDoc.MemberList[num]);
+ result = true;
+ }
+ return result;
+ }
+
+ private void RequestInherit(XGuildMember member)
+ {
+ bool flag = member == null;
+ if (!flag)
+ {
+ bool flag2 = member.uid == XSingleton<XEntityMgr>.singleton.Player.Attributes.EntityID;
+ if (!flag2)
+ {
+ bool flag3 = member.time >= 0;
+ if (flag3)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString("ERR_TEAM_INV_LOGOUT"), "fece00");
+ }
+ else
+ {
+ bool flag4 = !member.isInherit;
+ if (flag4)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString("ERR_GUILD_INHERIT_LVL"), "fece00");
+ }
+ else
+ {
+ XGuildInheritDocument specificDocument = XDocuments.GetSpecificDocument<XGuildInheritDocument>(XGuildInheritDocument.uuID);
+ specificDocument.SendReqInherit(member.uid);
+ }
+ }
+ }
+ }
+ }
+
+ private bool _OnKickAssBtnClick(IXUIButton btn)
+ {
+ DlgBase<XOtherPlayerInfoView, XOtherPlayerInfoBehaviour>.singleton.SetVisibleWithAnimation(false, null);
+ bool flag = !this._GuildDoc.CheckPermission(GuildPermission.GPEM_FIREMEMBER);
+ bool result;
+ if (flag)
+ {
+ result = true;
+ }
+ else
+ {
+ XSingleton<UiUtility>.singleton.ShowModalDialog(XStringDefineProxy.GetString("GUILD_FIREMEMBER_CONFIRM", new object[]
+ {
+ this.m_SelectedName
+ }), XStringDefineProxy.GetString("COMMON_OK"), XStringDefineProxy.GetString("COMMON_CANCEL"), new ButtonClickEventHandler(this._KickAss));
+ result = true;
+ }
+ return result;
+ }
+
+ private bool _KickAss(IXUIButton btn)
+ {
+ XSingleton<UiUtility>.singleton.CloseModalDlg();
+ bool flag = !this._GuildDoc.CheckPermission(GuildPermission.GPEM_FIREMEMBER);
+ bool result;
+ if (flag)
+ {
+ result = true;
+ }
+ else
+ {
+ this._MemberDoc.ReqKickAss(this.m_SelectedMemberID);
+ result = true;
+ }
+ return result;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/XGuildMembersView.cs.meta b/Client/Assets/Scripts/XMainClient/UI/XGuildMembersView.cs.meta
new file mode 100644
index 00000000..1d27e787
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XGuildMembersView.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 6831c6ca9a393154c870527c7a4f98c2
+timeCreated: 1611403881
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/XGuildPortraitBehaviour.cs b/Client/Assets/Scripts/XMainClient/UI/XGuildPortraitBehaviour.cs
new file mode 100644
index 00000000..5c89f399
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XGuildPortraitBehaviour.cs
@@ -0,0 +1,37 @@
+using System;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class XGuildPortraitBehaviour : DlgBehaviourBase
+ {
+ public IXUIButton m_Close = null;
+
+ public IXUIButton m_BtnOK;
+
+ public GameObject[] m_PortraitList = new GameObject[XGuildPortraitView.PORTRAIT_COUNT];
+
+ public GameObject[] m_SelectorList = new GameObject[XGuildPortraitView.PORTRAIT_COUNT];
+
+ public XUIPool m_PortraitPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ private void Awake()
+ {
+ this.m_Close = (base.transform.Find("Bg/Close").GetComponent("XUIButton") as IXUIButton);
+ this.m_BtnOK = (base.transform.Find("Bg/OK").GetComponent("XUIButton") as IXUIButton);
+ Transform transform = base.transform.Find("Bg/PortraitList/PortraitTpl");
+ this.m_PortraitPool.SetupPool(transform.parent.gameObject, transform.gameObject, (uint)XGuildPortraitView.PORTRAIT_COUNT, false);
+ Vector3 tplPos = this.m_PortraitPool.TplPos;
+ for (int i = 0; i < XGuildPortraitView.PORTRAIT_COUNT; i++)
+ {
+ GameObject gameObject = this.m_PortraitPool.FetchGameObject(false);
+ gameObject.transform.localPosition = new Vector3(tplPos.x + (float)(i % XGuildPortraitView.COL_COUNT * this.m_PortraitPool.TplWidth), tplPos.y - (float)(i / XGuildPortraitView.COL_COUNT * this.m_PortraitPool.TplHeight));
+ this.m_PortraitList[i] = gameObject.transform.Find("Portrait").gameObject;
+ this.m_SelectorList[i] = gameObject.transform.Find("Selector").gameObject;
+ }
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/XGuildPortraitBehaviour.cs.meta b/Client/Assets/Scripts/XMainClient/UI/XGuildPortraitBehaviour.cs.meta
new file mode 100644
index 00000000..eb3815ed
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XGuildPortraitBehaviour.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 9d8f05f9bed668f4484c242fcbcea5f9
+timeCreated: 1611404236
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/XGuildPortraitView.cs b/Client/Assets/Scripts/XMainClient/UI/XGuildPortraitView.cs
new file mode 100644
index 00000000..ff20ef92
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XGuildPortraitView.cs
@@ -0,0 +1,143 @@
+using System;
+using UILib;
+using XMainClient.UI.UICommon;
+
+namespace XMainClient.UI
+{
+ internal class XGuildPortraitView : DlgBase<XGuildPortraitView, XGuildPortraitBehaviour>
+ {
+ public int PortraitIndex
+ {
+ get
+ {
+ return this.m_SelectedIndex;
+ }
+ }
+
+ public override string fileName
+ {
+ get
+ {
+ return "Guild/GuildPortraitDlg";
+ }
+ }
+
+ public override int layer
+ {
+ get
+ {
+ return 1;
+ }
+ }
+
+ public override int group
+ {
+ get
+ {
+ return 1;
+ }
+ }
+
+ public override bool autoload
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override bool pushstack
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public static readonly int PORTRAIT_COUNT = 10;
+
+ public static readonly int COL_COUNT = 5;
+
+ private ButtonClickEventHandler _OKButtonHandler = null;
+
+ private int m_SelectedIndex = 0;
+
+ private IXUICheckBox[] m_Portraits = new IXUICheckBox[XGuildPortraitView.PORTRAIT_COUNT];
+
+ protected override void Init()
+ {
+ for (int i = 0; i < XGuildPortraitView.PORTRAIT_COUNT; i++)
+ {
+ IXUISprite ixuisprite = base.uiBehaviour.m_PortraitList[i].GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.SetSprite(XGuildDocument.GetPortraitName(i));
+ this.m_Portraits[i] = (base.uiBehaviour.m_PortraitList[i].GetComponent("XUICheckBox") as IXUICheckBox);
+ this.m_Portraits[i].ID = (ulong)((long)i);
+ }
+ }
+
+ protected override void OnUnload()
+ {
+ }
+
+ public override void RegisterEvent()
+ {
+ base.uiBehaviour.m_Close.RegisterClickEventHandler(new ButtonClickEventHandler(this._OnCloseBtnClick));
+ base.uiBehaviour.m_BtnOK.RegisterClickEventHandler(new ButtonClickEventHandler(this._OnOKBtnClick));
+ for (int i = 0; i < XGuildPortraitView.PORTRAIT_COUNT; i++)
+ {
+ this.m_Portraits[i].RegisterOnCheckEventHandler(new CheckBoxOnCheckEventHandler(this._OnPortraitClick));
+ }
+ }
+
+ protected override void OnShow()
+ {
+ bool flag = this.m_SelectedIndex >= 0 && this.m_SelectedIndex < XGuildPortraitView.PORTRAIT_COUNT;
+ if (flag)
+ {
+ this.m_Portraits[this.m_SelectedIndex].bChecked = true;
+ }
+ }
+
+ protected override void OnHide()
+ {
+ base.OnHide();
+ this._OKButtonHandler = null;
+ }
+
+ public void Open(int index, ButtonClickEventHandler OKButtonHandler)
+ {
+ this.m_SelectedIndex = index;
+ this._OKButtonHandler = OKButtonHandler;
+ this.SetVisibleWithAnimation(true, null);
+ }
+
+ private bool _OnPortraitClick(IXUICheckBox iXUICheckBox)
+ {
+ int num = (int)iXUICheckBox.ID;
+ base.uiBehaviour.m_SelectorList[num].SetActive(iXUICheckBox.bChecked);
+ bool bChecked = iXUICheckBox.bChecked;
+ if (bChecked)
+ {
+ this.m_SelectedIndex = num;
+ }
+ return true;
+ }
+
+ private bool _OnCloseBtnClick(IXUIButton go)
+ {
+ this.SetVisibleWithAnimation(false, null);
+ return true;
+ }
+
+ private bool _OnOKBtnClick(IXUIButton btn)
+ {
+ bool flag = this._OKButtonHandler != null;
+ if (flag)
+ {
+ this._OKButtonHandler(btn);
+ }
+ this.SetVisibleWithAnimation(false, null);
+ return true;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/XGuildPortraitView.cs.meta b/Client/Assets/Scripts/XMainClient/UI/XGuildPortraitView.cs.meta
new file mode 100644
index 00000000..38629f5a
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XGuildPortraitView.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 62dd8f23e4bf6a540971dfb3ea37b786
+timeCreated: 1611403842
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/XGuildRedPacketDetailView.cs b/Client/Assets/Scripts/XMainClient/UI/XGuildRedPacketDetailView.cs
new file mode 100644
index 00000000..1accdb21
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XGuildRedPacketDetailView.cs
@@ -0,0 +1,258 @@
+using System;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class XGuildRedPacketDetailView : DlgBase<XGuildRedPacketDetailView, GuildRedPackageDetailBehaviour>
+ {
+ public override string fileName
+ {
+ get
+ {
+ return "Guild/GuildSystem/GuildRedPackageDetailPanel";
+ }
+ }
+
+ public override int layer
+ {
+ get
+ {
+ return 1;
+ }
+ }
+
+ public override bool pushstack
+ {
+ get
+ {
+ return false;
+ }
+ }
+
+ public override bool autoload
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ private XGuildRedPacketDocument _Doc;
+
+ private XGuildDocument _GuildDoc;
+
+ private XGuildRedPakageLogView m_LogView;
+
+ private uint m_selectID = 0u;
+
+ private bool m_ShowEffect = false;
+
+ private XFx m_maskXfx = null;
+
+ protected override void Init()
+ {
+ this._Doc = XDocuments.GetSpecificDocument<XGuildRedPacketDocument>(XGuildRedPacketDocument.uuID);
+ this._GuildDoc = XDocuments.GetSpecificDocument<XGuildDocument>(XGuildDocument.uuID);
+ DlgHandlerBase.EnsureCreate<XGuildRedPakageLogView>(ref this.m_LogView, base.uiBehaviour.m_LogPanel, null, true);
+ this.m_LogView.LogSource = this._Doc;
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ base.uiBehaviour.m_bgSprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this._OnCloseBtnClick));
+ base.uiBehaviour.m_Reply.RegisterClickEventHandler(new ButtonClickEventHandler(this._OnReplyBtnClick));
+ }
+
+ public void ShowEffect(bool state, uint id = 0u)
+ {
+ this.m_ShowEffect = state;
+ this.m_selectID = id;
+ this.SetVisibleWithAnimation(true, null);
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ this._Doc.ReqDetail(this.m_selectID);
+ bool showEffect = this.m_ShowEffect;
+ if (showEffect)
+ {
+ this.m_maskXfx = XSingleton<XFxMgr>.singleton.CreateUIFx("Effects/FX_Particle/UIfx/UI_ghhb_cd_01", base.uiBehaviour.m_bgSprite.gameObject.transform, false);
+ XSingleton<XFxMgr>.singleton.CreateAndPlay("Effects/FX_Particle/UIfx/UI_ghhb_cd", base.uiBehaviour.m_root, Vector3.zero, Vector3.one, 1f, true, 3f, true);
+ this.m_ShowEffect = false;
+ }
+ base.uiBehaviour.m_playTween.PlayTween(true, -1f);
+ }
+
+ protected override void OnHide()
+ {
+ base.OnHide();
+ bool flag = base.uiBehaviour.m_playTween != null;
+ if (flag)
+ {
+ base.uiBehaviour.m_playTween.ResetTween(true);
+ }
+ bool flag2 = this.m_maskXfx != null;
+ if (flag2)
+ {
+ XSingleton<XFxMgr>.singleton.DestroyFx(this.m_maskXfx, true);
+ this.m_maskXfx = null;
+ }
+ base.uiBehaviour.m_sendHeadTexture.SetTexturePath("");
+ }
+
+ protected override void OnUnload()
+ {
+ bool flag = this.m_maskXfx != null;
+ if (flag)
+ {
+ XSingleton<XFxMgr>.singleton.DestroyFx(this.m_maskXfx, true);
+ this.m_maskXfx = null;
+ }
+ DlgHandlerBase.EnsureUnload<XGuildRedPakageLogView>(ref this.m_LogView);
+ base.OnUnload();
+ }
+
+ public void Refresh()
+ {
+ XGuildRedPacketDetail packetDetail = this._Doc.PacketDetail;
+ this.m_LogView.Refresh();
+ this._RefreshContent(packetDetail);
+ this._RefreshReason(packetDetail);
+ this._RefreshReply(packetDetail);
+ }
+
+ public void _RefreshReply(XGuildRedPacketDetail detailData)
+ {
+ bool flag = detailData.canThank && Time.time < detailData.brif.endTime && detailData.brif.fetchState != FetchState.FS_CANNOT_FETCH;
+ base.uiBehaviour.m_ReplyLabel.SetText(flag ? XStringDefineProxy.GetString("QUICK_REPLY_1") : XStringDefineProxy.GetString("GUILD_REDPACKET_DETAIL_EXIT"));
+ }
+
+ public void _RefreshReason(XGuildRedPacketDetail data)
+ {
+ GuildBonusTable.RowData redPacketConfig = XGuildRedPacketDocument.GetRedPacketConfig(data.brif.typeid);
+ bool flag = redPacketConfig == null;
+ if (flag)
+ {
+ base.uiBehaviour.m_Reason.InputText = "";
+ }
+ else
+ {
+ string guildBonusDesc = redPacketConfig.GuildBonusDesc;
+ bool flag2 = guildBonusDesc.Contains("{0}");
+ if (flag2)
+ {
+ base.uiBehaviour.m_Reason.InputText = string.Format(guildBonusDesc, data.brif.senderName);
+ }
+ else
+ {
+ base.uiBehaviour.m_Reason.InputText = guildBonusDesc;
+ }
+ }
+ }
+
+ private void _RefreshContent(XGuildRedPacketDetail data)
+ {
+ base.uiBehaviour.m_Count.SetText(string.Format("{0}/{1}", data.getCount, data.brif.maxCount));
+ base.uiBehaviour.m_Money.InputText = string.Format("{0}/{1}", data.getTotalCount, XLabelSymbolHelper.FormatCostWithIconLast(data.itemTotalCount, (ItemEnum)data.brif.itemid));
+ XGuildDocument specificDocument = XDocuments.GetSpecificDocument<XGuildDocument>(XGuildDocument.uuID);
+ bool flag = data.brif.sourceID > 0UL;
+ if (flag)
+ {
+ base.uiBehaviour.m_sendHeadSprite.SetVisible(false);
+ base.uiBehaviour.m_sendHeadTexture.SetVisible(true);
+ XSingleton<XUICacheImage>.singleton.Load(string.IsNullOrEmpty(data.brif.iconUrl) ? string.Empty : data.brif.iconUrl, base.uiBehaviour.m_sendHeadTexture, base.uiBehaviour);
+ base.uiBehaviour.m_SendName.InputText = XStringDefineProxy.GetString("GUILD_BONUE_PACKAGE_NAME", new object[]
+ {
+ data.brif.sourceName
+ });
+ }
+ else
+ {
+ base.uiBehaviour.m_SendName.InputText = XStringDefineProxy.GetString("GUILD_BONUE_PACKAGE_NAME", new object[]
+ {
+ specificDocument.BasicData.guildName
+ });
+ base.uiBehaviour.m_sendHeadSprite.SetVisible(true);
+ base.uiBehaviour.m_sendHeadTexture.SetTexturePath("");
+ base.uiBehaviour.m_sendHeadTexture.SetVisible(false);
+ }
+ bool flag2 = data.brif.fetchState == FetchState.FS_CAN_FETCH;
+ if (flag2)
+ {
+ float time = Time.time;
+ bool flag3 = time < data.brif.endTime;
+ if (flag3)
+ {
+ base.uiBehaviour.m_Note.InputText = XStringDefineProxy.GetString("GUILD_REDPACKET_FETCH");
+ }
+ else
+ {
+ base.uiBehaviour.m_Note.InputText = XStringDefineProxy.GetString("GUILD_REDPACKET_TIMEOVER");
+ }
+ }
+ else
+ {
+ bool flag4 = data.brif.fetchState == FetchState.FS_CANNOT_FETCH;
+ if (flag4)
+ {
+ base.uiBehaviour.m_Note.InputText = string.Empty;
+ }
+ else
+ {
+ ulong roleID = XSingleton<XAttributeMgr>.singleton.XPlayerData.RoleID;
+ int i;
+ for (i = 0; i < data.logList.Count; i++)
+ {
+ XGuildRedPacketLog xguildRedPacketLog = data.logList[i] as XGuildRedPacketLog;
+ bool flag5 = xguildRedPacketLog.uid == roleID;
+ if (flag5)
+ {
+ base.uiBehaviour.m_Note.InputText = XLabelSymbolHelper.FormatCostWithIconLast(xguildRedPacketLog.itemcount, (ItemEnum)xguildRedPacketLog.itemid);
+ break;
+ }
+ }
+ bool flag6 = i == data.logList.Count;
+ if (flag6)
+ {
+ base.uiBehaviour.m_Note.InputText = XStringDefineProxy.GetString("GUILD_REDPACKET_ALLFETCHED");
+ }
+ }
+ }
+ }
+
+ private bool _OnReplyBtnClick(IXUIButton go)
+ {
+ XGuildRedPacketDetail packetDetail = this._Doc.PacketDetail;
+ bool flag = packetDetail != null && packetDetail.canThank && Time.time < packetDetail.brif.endTime && packetDetail.brif.fetchState != FetchState.FS_CANNOT_FETCH;
+ if (flag)
+ {
+ DlgBase<QuickReplyDlg, XQuickReplyBehavior>.singleton.ShowView(1, new Action<bool>(this.CloseRedPackageDetail));
+ }
+ else
+ {
+ this._OnCloseBtnClick(null);
+ }
+ return true;
+ }
+
+ private void CloseRedPackageDetail(bool statu)
+ {
+ if (statu)
+ {
+ XQuickReplyDocument specificDocument = XDocuments.GetSpecificDocument<XQuickReplyDocument>(XQuickReplyDocument.uuID);
+ specificDocument.GetThanksForBonus(this._Doc.PacketDetail.brif.uid);
+ this._OnCloseBtnClick(null);
+ }
+ }
+
+ private void _OnCloseBtnClick(IXUISprite go)
+ {
+ this.SetVisibleWithAnimation(false, null);
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/XGuildRedPacketDetailView.cs.meta b/Client/Assets/Scripts/XMainClient/UI/XGuildRedPacketDetailView.cs.meta
new file mode 100644
index 00000000..1b903042
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XGuildRedPacketDetailView.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: ecdeab21ef96e1d4db9f24b105bed2e4
+timeCreated: 1611404789
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/XGuildRedPacketView.cs b/Client/Assets/Scripts/XMainClient/UI/XGuildRedPacketView.cs
new file mode 100644
index 00000000..9c215d64
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XGuildRedPacketView.cs
@@ -0,0 +1,278 @@
+using System;
+using System.Collections.Generic;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class XGuildRedPacketView : DlgBase<XGuildRedPacketView, XGuildRedPacketBehaviour>
+ {
+ public override string fileName
+ {
+ get
+ {
+ return "Guild/GuildSystem/GuildRedPacketDlg";
+ }
+ }
+
+ public override int layer
+ {
+ get
+ {
+ return 1;
+ }
+ }
+
+ public override bool pushstack
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override bool hideMainMenu
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override bool autoload
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override bool fullscreenui
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ private static string[] RedPacketBg = new string[]
+ {
+ "gh_hb_ui1",
+ "gh_hb_ui2"
+ };
+
+ private static Color[] OutterLightColor = new Color[]
+ {
+ new Color(0.8f, 0.6f, 0.2f),
+ new Color(0.2f, 0.3f, 0.9f)
+ };
+
+ private XGuildRedPacketDocument _Doc;
+
+ private XMainInterfaceDocument _MainDoc;
+
+ private Dictionary<Transform, XLeftTimeCounter> m_ActivePackets = new Dictionary<Transform, XLeftTimeCounter>();
+
+ private List<XLeftTimeCounter> m_LeftTimeList = new List<XLeftTimeCounter>();
+
+ private IXUISprite m_ClickedRP = null;
+
+ protected override void Init()
+ {
+ base.Init();
+ this._Doc = XDocuments.GetSpecificDocument<XGuildRedPacketDocument>(XGuildRedPacketDocument.uuID);
+ this._Doc.GuildRedPacketView = this;
+ this._MainDoc = XDocuments.GetSpecificDocument<XMainInterfaceDocument>(XMainInterfaceDocument.uuID);
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ base.uiBehaviour.m_Empty.SetActive(false);
+ this._Doc.bHasShowIconRedPacket = 0;
+ this._Doc.ReqList();
+ base.uiBehaviour.m_ScrollView.ResetPosition();
+ this.m_ClickedRP = null;
+ }
+
+ protected override void OnHide()
+ {
+ base.OnHide();
+ this._MainDoc.SetBlockItemsChange(false);
+ }
+
+ protected override void OnUnload()
+ {
+ this._Doc.GuildRedPacketView = null;
+ this._MainDoc.SetBlockItemsChange(false);
+ base.OnUnload();
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ base.uiBehaviour.m_Close.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnCloseClick));
+ base.uiBehaviour.m_Help.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnHelpClicked));
+ base.uiBehaviour.m_WrapContent.RegisterItemUpdateEventHandler(new WrapItemUpdateEventHandler(this._WrapContentItemUpdated));
+ }
+
+ public override void OnUpdate()
+ {
+ base.OnUpdate();
+ for (int i = 0; i < this.m_LeftTimeList.Count; i++)
+ {
+ this.m_LeftTimeList[i].Update();
+ }
+ }
+
+ private bool OnCloseClick(IXUIButton button)
+ {
+ this.SetVisibleWithAnimation(false, null);
+ return true;
+ }
+
+ public bool OnHelpClicked(IXUIButton button)
+ {
+ DlgBase<XCommonHelpTipView, XCommonHelpTipBehaviour>.singleton.ShowHelp(XSysDefine.XSys_GuildRedPacket);
+ return true;
+ }
+
+ public void Refresh(bool bResetPosition = true)
+ {
+ List<XGuildRedPacketBrief> packetList = this._Doc.PacketList;
+ int count = packetList.Count;
+ base.uiBehaviour.m_WrapContent.SetContentCount(count, false);
+ if (bResetPosition)
+ {
+ base.uiBehaviour.m_ScrollView.ResetPosition();
+ }
+ base.uiBehaviour.m_Empty.SetActive(count == 0);
+ }
+
+ private void _WrapContentItemUpdated(Transform t, int index)
+ {
+ bool flag = index < 0 || index >= this._Doc.PacketList.Count;
+ if (!flag)
+ {
+ XGuildRedPacketBrief xguildRedPacketBrief = this._Doc.PacketList[index];
+ IXUISprite ixuisprite = t.Find("RedPacket").GetComponent("XUISprite") as IXUISprite;
+ IXUILabel ixuilabel = t.Find("Name").GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel2 = t.Find("Count").GetComponent("XUILabel") as IXUILabel;
+ IXUISprite ixuisprite2 = t.Find("Bg").GetComponent("XUISprite") as IXUISprite;
+ IXUISprite ixuisprite3 = t.Find("Icon").GetComponent("XUISprite") as IXUISprite;
+ IXUISprite ixuisprite4 = t.Find("Title").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite2.ID = (ulong)((long)index);
+ bool flag2 = xguildRedPacketBrief.itemid == 7;
+ if (flag2)
+ {
+ ixuisprite.SetSprite(XGuildRedPacketView.RedPacketBg[1]);
+ }
+ else
+ {
+ ixuisprite.SetSprite(XGuildRedPacketView.RedPacketBg[0]);
+ }
+ ixuisprite4.SetSprite("gh_hb_word_" + xguildRedPacketBrief.itemid);
+ ixuisprite2.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this._OnRedPacketClick));
+ ixuilabel.SetText(xguildRedPacketBrief.senderName);
+ ixuilabel2.SetText(string.Format("{0}/{1}", xguildRedPacketBrief.maxCount - xguildRedPacketBrief.fetchedCount, xguildRedPacketBrief.maxCount));
+ ixuisprite3.SetSprite(XBagDocument.GetItemSmallIcon(xguildRedPacketBrief.itemid, 0u));
+ this._SetupState(t, xguildRedPacketBrief);
+ }
+ }
+
+ private void _SetupState(Transform t, XGuildRedPacketBrief data)
+ {
+ IXUILabel ixuilabel = t.Find("LeftTime").GetComponent("XUILabel") as IXUILabel;
+ Transform transform = t.Find("State/CanFetch");
+ Transform transform2 = t.Find("State/CantFetch");
+ Transform transform3 = t.Find("State/Fetched");
+ Transform transform4 = t.Find("State/Expired");
+ Transform transform5 = t.Find("Icon/Highlight");
+ Transform transform6 = t.Find("Icon/UI_ghhb_cd_02");
+ transform5.gameObject.SetActive(data.fetchState == FetchState.FS_CAN_FETCH);
+ transform6.gameObject.SetActive(data.fetchState == FetchState.FS_CAN_FETCH);
+ float time = Time.time;
+ transform2.gameObject.SetActive(data.fetchState == FetchState.FS_FETCHED);
+ transform.gameObject.SetActive(data.fetchState == FetchState.FS_CAN_FETCH && time < data.endTime);
+ transform3.gameObject.SetActive(data.fetchState == FetchState.FS_ALREADY_FETCH);
+ transform4.gameObject.SetActive(data.fetchState == FetchState.FS_CAN_FETCH && time >= data.endTime);
+ bool flag = time < data.endTime;
+ if (flag)
+ {
+ XLeftTimeCounter xleftTimeCounter = null;
+ bool flag2 = !this.m_ActivePackets.TryGetValue(t, out xleftTimeCounter);
+ if (flag2)
+ {
+ xleftTimeCounter = new XLeftTimeCounter(ixuilabel, false);
+ this.m_ActivePackets.Add(t, xleftTimeCounter);
+ this.m_LeftTimeList.Add(xleftTimeCounter);
+ }
+ xleftTimeCounter.SetLeftTime(data.endTime - time, -1);
+ xleftTimeCounter.SetFinishEventHandler(new TimeOverFinishEventHandler(this._OnLeftTimeOver), null);
+ ixuilabel.SetVisible(true);
+ }
+ else
+ {
+ ixuilabel.SetVisible(false);
+ }
+ }
+
+ public void ShowResult(XGuildRedPacketBrief brief)
+ {
+ bool flag = brief == null;
+ if (flag)
+ {
+ this.m_ClickedRP = null;
+ this._MainDoc.SetBlockItemsChange(false);
+ }
+ else
+ {
+ bool flag2 = this.m_ClickedRP == null;
+ if (flag2)
+ {
+ this._MainDoc.SetBlockItemsChange(false);
+ this.m_ClickedRP = null;
+ }
+ else
+ {
+ this.m_ClickedRP = null;
+ }
+ }
+ }
+
+ private void _OnLeftTimeOver(object o)
+ {
+ base.uiBehaviour.m_WrapContent.RefreshAllVisibleContents();
+ this._Doc.ReqList();
+ }
+
+ private void _OnRedPacketClick(IXUISprite iSp)
+ {
+ bool flag = this.m_ClickedRP != null;
+ if (!flag)
+ {
+ XGuildRedPacketBrief xguildRedPacketBrief = this._Doc.PacketList[(int)iSp.ID];
+ bool flag2 = xguildRedPacketBrief.fetchState == FetchState.FS_CAN_FETCH;
+ if (flag2)
+ {
+ this._Doc.ReqFetch((uint)xguildRedPacketBrief.uid);
+ this.m_ClickedRP = iSp;
+ }
+ else
+ {
+ bool flag3 = xguildRedPacketBrief.fetchState == FetchState.FS_CANNOT_FETCH;
+ if (flag3)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString("GUILD_BONUS_NOTFETCH"), "fece00");
+ }
+ else
+ {
+ DlgBase<XGuildRedPacketDetailView, GuildRedPackageDetailBehaviour>.singleton.ShowEffect(false, (uint)xguildRedPacketBrief.uid);
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/XGuildRedPacketView.cs.meta b/Client/Assets/Scripts/XMainClient/UI/XGuildRedPacketView.cs.meta
new file mode 100644
index 00000000..45addbea
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XGuildRedPacketView.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: e03bbd135bace464fb48b2dc36507d2e
+timeCreated: 1611404696
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/XGuildRedPakageLogView.cs b/Client/Assets/Scripts/XMainClient/UI/XGuildRedPakageLogView.cs
new file mode 100644
index 00000000..7e6c2dc4
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XGuildRedPakageLogView.cs
@@ -0,0 +1,125 @@
+using System;
+using System.Collections.Generic;
+using UILib;
+using UnityEngine;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class XGuildRedPakageLogView : DlgHandlerBase
+ {
+ public ILogSource LogSource
+ {
+ set
+ {
+ this.m_LogSource = value;
+ }
+ }
+
+ private ILogSource m_LogSource;
+
+ private XGuildRedPacketDocument _Doc;
+
+ private IXUIWrapContent m_WrapContent;
+
+ private IXUIScrollView m_ScrollView;
+
+ private Vector3 startPos = new Vector3(-96f, 0f, 0f);
+
+ protected override void Init()
+ {
+ this._Doc = XDocuments.GetSpecificDocument<XGuildRedPacketDocument>(XGuildRedPacketDocument.uuID);
+ this.m_ScrollView = (base.PanelObject.transform.Find("LogMenu/Panel").GetComponent("XUIScrollView") as IXUIScrollView);
+ this.m_WrapContent = (base.PanelObject.transform.Find("LogMenu/Panel/WrapContent").GetComponent("XUIWrapContent") as IXUIWrapContent);
+ this.m_WrapContent.RegisterItemUpdateEventHandler(new WrapItemUpdateEventHandler(this._WrapContentItemUpdated));
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ }
+
+ protected override void OnHide()
+ {
+ base.OnHide();
+ }
+
+ public void Refresh()
+ {
+ List<ILogData> logList = this.m_LogSource.GetLogList();
+ int count = logList.Count;
+ this.m_WrapContent.SetContentCount(count, false);
+ this.m_ScrollView.ResetPosition();
+ }
+
+ private void _WrapContentItemUpdated(Transform t, int index)
+ {
+ List<ILogData> logList = this.m_LogSource.GetLogList();
+ bool flag = index < 0 || index >= logList.Count;
+ if (!flag)
+ {
+ XGuildRedPacketLog xguildRedPacketLog = logList[index] as XGuildRedPacketLog;
+ IXUILabelSymbol ixuilabelSymbol = t.Find("Content").GetComponent("XUILabelSymbol") as IXUILabelSymbol;
+ IXUILabel ixuilabel = t.Find("Time").GetComponent("XUILabel") as IXUILabel;
+ IXUILabelSymbol ixuilabelSymbol2 = t.Find("Gold").GetComponent("XUILabelSymbol") as IXUILabelSymbol;
+ IXUISprite ixuisprite = t.Find("mvp").GetComponent("XUISprite") as IXUISprite;
+ ixuilabelSymbol.RegisterNameEventHandler(new HyperLinkClickEventHandler(this._NameClick));
+ bool flag2 = XSingleton<XAttributeMgr>.singleton.XPlayerData.RoleID == xguildRedPacketLog.uid;
+ if (flag2)
+ {
+ ixuilabelSymbol.InputText = XStringDefineProxy.GetString("YOU");
+ }
+ else
+ {
+ ixuilabelSymbol.InputText = XLabelSymbolHelper.FormatName(xguildRedPacketLog.name, xguildRedPacketLog.uid, "00ffff");
+ }
+ Vector3 localPosition = this.startPos;
+ bool flag3 = this._Doc.CheckLuckest(xguildRedPacketLog.uid);
+ if (flag3)
+ {
+ ixuisprite.SetVisible(true);
+ ixuisprite.gameObject.transform.localPosition = localPosition;
+ localPosition.x += (float)(ixuisprite.spriteWidth + 10);
+ }
+ else
+ {
+ ixuisprite.SetVisible(false);
+ }
+ ixuilabelSymbol2.InputText = XLabelSymbolHelper.FormatCostWithIcon(xguildRedPacketLog.itemcount, (ItemEnum)xguildRedPacketLog.itemid);
+ ixuilabel.SetText(string.Empty);
+ }
+ }
+
+ public override void RegisterEvent()
+ {
+ Transform transform = base.PanelObject.transform.Find("Close");
+ bool flag = transform != null;
+ if (flag)
+ {
+ IXUIButton ixuibutton = transform.GetComponent("XUIButton") as IXUIButton;
+ ixuibutton.RegisterClickEventHandler(new ButtonClickEventHandler(this._OnCloseBtnClick));
+ }
+ }
+
+ private bool _OnCloseBtnClick(IXUIButton go)
+ {
+ base.SetVisible(false);
+ return true;
+ }
+
+ private void _NameClick(string param)
+ {
+ string text = "";
+ ulong num = 0UL;
+ bool flag = XLabelSymbolHelper.ParseNameParam(param, ref text, ref num);
+ if (flag)
+ {
+ bool flag2 = num == XSingleton<XEntityMgr>.singleton.Player.Attributes.EntityID;
+ if (!flag2)
+ {
+ XCharacterCommonMenuDocument.ReqCharacterMenuInfo(num, false);
+ }
+ }
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/XGuildRedPakageLogView.cs.meta b/Client/Assets/Scripts/XMainClient/UI/XGuildRedPakageLogView.cs.meta
new file mode 100644
index 00000000..f02f6e46
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XGuildRedPakageLogView.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: f19a0960a7f08c841b60cb36eef273d5
+timeCreated: 1611404838
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/XGuildSignInBehaviour.cs b/Client/Assets/Scripts/XMainClient/UI/XGuildSignInBehaviour.cs
new file mode 100644
index 00000000..87b78347
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XGuildSignInBehaviour.cs
@@ -0,0 +1,45 @@
+using System;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class XGuildSignInBehaviour : DlgBehaviourBase
+ {
+ public IXUIButton m_Close = null;
+
+ public IXUIButton m_BtnLog;
+
+ public IXUIProgress m_ExpProgress;
+
+ public XUIPool m_ChestPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ public IXUILabel m_MemberCount;
+
+ public IXUILabel m_Exp;
+
+ public XNumberTween m_ExpTween;
+
+ public XUIPool m_SignInButtonPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ public GameObject m_LogPanel;
+
+ private void Awake()
+ {
+ this.m_Close = (base.transform.Find("Bg/Close").GetComponent("XUIButton") as IXUIButton);
+ this.m_BtnLog = (base.transform.Find("Bg/BtnLog").GetComponent("XUIButton") as IXUIButton);
+ this.m_LogPanel = base.transform.Find("Bg/LogPanel").gameObject;
+ Transform transform = base.transform.Find("Bg/Progress/Chests/ChestTpl");
+ this.m_ChestPool.SetupPool(transform.parent.gameObject, transform.gameObject, 2u, false);
+ transform = base.transform.Find("Bg/SignInButtons/SignInButtonTpl");
+ this.m_SignInButtonPool.SetupPool(transform.parent.gameObject, transform.gameObject, 3u, false);
+ this.m_ExpProgress = (base.transform.Find("Bg/Progress").GetComponent("XUIProgress") as IXUIProgress);
+ this.m_MemberCount = (base.transform.Find("Bg/MemberCount").GetComponent("XUILabel") as IXUILabel);
+ this.m_Exp = (base.transform.Find("Bg/CurrentExp").GetComponent("XUILabel") as IXUILabel);
+ this.m_ExpTween = XNumberTween.Create(this.m_Exp);
+ this.m_ExpTween.SetNumberWithTween(0UL, "", false, true);
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/XGuildSignInBehaviour.cs.meta b/Client/Assets/Scripts/XMainClient/UI/XGuildSignInBehaviour.cs.meta
new file mode 100644
index 00000000..f98c3110
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XGuildSignInBehaviour.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 9bf064775b32adc4292ee6abc77efeb0
+timeCreated: 1611404207
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/XGuildSignInView.cs b/Client/Assets/Scripts/XMainClient/UI/XGuildSignInView.cs
new file mode 100644
index 00000000..585b317e
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XGuildSignInView.cs
@@ -0,0 +1,249 @@
+using System;
+using System.Collections.Generic;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class XGuildSignInView : DlgBase<XGuildSignInView, XGuildSignInBehaviour>
+ {
+ public XGuildLogView LogView
+ {
+ get
+ {
+ return this._LogView;
+ }
+ }
+
+ public override string fileName
+ {
+ get
+ {
+ return "Guild/GuildSignInDlg";
+ }
+ }
+
+ public override int layer
+ {
+ get
+ {
+ return 1;
+ }
+ }
+
+ public override int group
+ {
+ get
+ {
+ return 1;
+ }
+ }
+
+ public override bool autoload
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override bool hideMainMenu
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override bool pushstack
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public int BUTTON_COUNT = 3;
+
+ public int CHEST_COUNT = 4;
+
+ private XGuildSignInDocument _SignInDoc;
+
+ private XGuildDocument _GuildDoc;
+
+ private XGuildLogView _LogView;
+
+ private XChestProgress m_Progress;
+
+ private List<IXUIButton> m_Buttons = new List<IXUIButton>();
+
+ private List<GameObject> m_ButtonGos = new List<GameObject>();
+
+ protected override void Init()
+ {
+ this._SignInDoc = XDocuments.GetSpecificDocument<XGuildSignInDocument>(XGuildSignInDocument.uuID);
+ this._SignInDoc.GuildSignInView = this;
+ this._GuildDoc = XDocuments.GetSpecificDocument<XGuildDocument>(XGuildDocument.uuID);
+ GuildCheckinBoxTable.RowData[] boxTableData = XGuildSignInDocument.GetBoxTableData();
+ uint num = 0u;
+ this.CHEST_COUNT = boxTableData.Length;
+ this.m_Progress = new XChestProgress(base.uiBehaviour.m_ExpProgress);
+ for (int i = 0; i < this.CHEST_COUNT; i++)
+ {
+ GuildCheckinBoxTable.RowData rowData = boxTableData[i];
+ XChest xchest = new XChest(base.uiBehaviour.m_ChestPool.FetchGameObject(false), null);
+ xchest.SetExp(rowData.process);
+ num = Math.Max(num, rowData.process);
+ this.m_Progress.AddChest(xchest);
+ }
+ this.m_Progress.SetExp(0u, num);
+ base.uiBehaviour.m_BtnLog.SetVisible(false);
+ this.m_Buttons.Clear();
+ this.m_ButtonGos.Clear();
+ GuildCheckinTable.RowData[] signInTableData = XGuildSignInDocument.GetSignInTableData();
+ this.BUTTON_COUNT = signInTableData.Length;
+ Vector3 tplPos = base.uiBehaviour.m_SignInButtonPool.TplPos;
+ for (int j = 0; j < this.BUTTON_COUNT; j++)
+ {
+ GuildCheckinTable.RowData rowData2 = signInTableData[j];
+ GameObject gameObject = base.uiBehaviour.m_SignInButtonPool.FetchGameObject(false);
+ gameObject.transform.localPosition = new Vector3(tplPos.x + (float)(base.uiBehaviour.m_SignInButtonPool.TplWidth * j), tplPos.y);
+ this.m_ButtonGos.Add(gameObject);
+ IXUILabel ixuilabel = gameObject.transform.Find("Progress").GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel2 = gameObject.transform.Find("Contribute").GetComponent("XUILabel") as IXUILabel;
+ IXUILabelSymbol ixuilabelSymbol = gameObject.transform.Find("BtnOK/Cost").GetComponent("XUILabelSymbol") as IXUILabelSymbol;
+ IXUIButton item = gameObject.transform.Find("BtnOK").GetComponent("XUIButton") as IXUIButton;
+ IXUISprite ixuisprite = gameObject.transform.Find("Bg").GetComponent("XUISprite") as IXUISprite;
+ IXUISprite ixuisprite2 = gameObject.transform.Find("Title").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.SetSprite("gh_qd_" + rowData2.type);
+ ixuisprite2.SetSprite("gh_qd_word_" + rowData2.type);
+ ixuilabel.SetText("+" + rowData2.process);
+ ixuilabel2.SetText("+" + rowData2.reward[1]);
+ ixuilabelSymbol.InputText = XLabelSymbolHelper.FormatCostWithIcon((int)rowData2.consume[1], (ItemEnum)rowData2.consume[0]);
+ this.m_Buttons.Add(item);
+ }
+ DlgHandlerBase.EnsureCreate<XGuildLogView>(ref this._LogView, base.uiBehaviour.m_LogPanel, null, true);
+ this._LogView.LogSource = this._SignInDoc;
+ }
+
+ protected override void OnUnload()
+ {
+ this._SignInDoc.GuildSignInView = null;
+ this.m_Progress.Unload();
+ DlgHandlerBase.EnsureUnload<XGuildLogView>(ref this._LogView);
+ base.OnUnload();
+ }
+
+ public override void RegisterEvent()
+ {
+ base.uiBehaviour.m_Close.RegisterClickEventHandler(new ButtonClickEventHandler(this._OnCloseBtnClick));
+ base.uiBehaviour.m_BtnLog.RegisterClickEventHandler(new ButtonClickEventHandler(this._OnLogBtnClick));
+ for (int i = 0; i < this.CHEST_COUNT; i++)
+ {
+ this.m_Progress.ChestList[i].m_Chest.ID = (ulong)((long)i);
+ this.m_Progress.ChestList[i].m_Chest.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnChestClicked));
+ }
+ for (int j = 0; j < this.BUTTON_COUNT; j++)
+ {
+ this.m_Buttons[j].ID = (ulong)((long)(j + 1));
+ this.m_Buttons[j].RegisterClickEventHandler(new ButtonClickEventHandler(this._OnSignInBtnClick));
+ }
+ }
+
+ protected override void OnShow()
+ {
+ this._LogView.SetVisible(false);
+ this._SignInDoc.ReqAllInfo();
+ this.RefreshProgress();
+ }
+
+ public override void OnUpdate()
+ {
+ base.OnUpdate();
+ this.m_Progress.Update(Time.deltaTime);
+ }
+
+ public void Refresh()
+ {
+ base.uiBehaviour.m_MemberCount.SetText(string.Format("{0}/{1}", this._SignInDoc.CurrentCount, this._SignInDoc.TotalCount));
+ for (int i = 0; i < this.BUTTON_COUNT; i++)
+ {
+ this.m_Buttons[i].SetEnable(this._SignInDoc.SignInSelection == 0u, false);
+ GameObject gameObject = this.m_Buttons[i].gameObject.transform.Find("RedPoint").gameObject;
+ gameObject.SetActive(false);
+ }
+ for (int j = 0; j < this.CHEST_COUNT; j++)
+ {
+ this.m_Progress.ChestList[j].Opened = this._SignInDoc.IsBoxOpen(j);
+ }
+ }
+
+ public void RefreshProgress()
+ {
+ this.m_Progress.TargetExp = this._SignInDoc.Progress;
+ base.uiBehaviour.m_ExpTween.SetNumberWithTween((ulong)this._SignInDoc.Progress, "", false, true);
+ }
+
+ public void OpenBox(int index)
+ {
+ for (int i = 0; i < this.CHEST_COUNT; i++)
+ {
+ bool flag = i != index;
+ if (!flag)
+ {
+ XChest xchest = this.m_Progress.ChestList[i];
+ xchest.Open();
+ break;
+ }
+ }
+ }
+
+ private void OnChestClicked(IXUISprite iSp)
+ {
+ uint num = (uint)iSp.ID;
+ bool flag = !this.m_Progress.IsExpEnough((int)num);
+ if (flag)
+ {
+ GuildCheckinBoxTable.RowData rowData = XGuildSignInDocument.GetBoxTableData()[(int)num];
+ bool flag2 = rowData == null;
+ if (!flag2)
+ {
+ List<uint> list = new List<uint>();
+ List<uint> list2 = new List<uint>();
+ for (int i = 0; i < rowData.viewabledrop.Count; i++)
+ {
+ list.Add(rowData.viewabledrop[i, 0]);
+ list2.Add(rowData.viewabledrop[i, 1]);
+ }
+ DlgBase<ItemIconListDlg, ItemIconListDlgBehaviour>.singleton.Show(list, list2, false);
+ DlgBase<ItemIconListDlg, ItemIconListDlgBehaviour>.singleton.SetGlobalPosition(iSp.gameObject.transform.position);
+ }
+ }
+ else
+ {
+ this._SignInDoc.ReqFetchBox(num);
+ }
+ }
+
+ private bool _OnCloseBtnClick(IXUIButton go)
+ {
+ this.SetVisibleWithAnimation(false, null);
+ return true;
+ }
+
+ private bool _OnSignInBtnClick(IXUIButton go)
+ {
+ this._SignInDoc.ReqSignIn((uint)go.ID);
+ return true;
+ }
+
+ private bool _OnLogBtnClick(IXUIButton go)
+ {
+ this._SignInDoc.ReqLogList();
+ this._LogView.SetVisible(true);
+ return true;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/XGuildSignInView.cs.meta b/Client/Assets/Scripts/XMainClient/UI/XGuildSignInView.cs.meta
new file mode 100644
index 00000000..98f7f822
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XGuildSignInView.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 658a4965409814f4081ae2e8c44158c9
+timeCreated: 1611403851
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/XGuildSignRedPackageView.cs b/Client/Assets/Scripts/XMainClient/UI/XGuildSignRedPackageView.cs
new file mode 100644
index 00000000..ac39c6fb
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XGuildSignRedPackageView.cs
@@ -0,0 +1,506 @@
+using System;
+using UILib;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class XGuildSignRedPackageView : DlgBase<XGuildSignRedPackageView, XGuildSignRedPackageBehaviour>
+ {
+ public override string fileName
+ {
+ get
+ {
+ return "Guild/GuildSignRedPacketDlg";
+ }
+ }
+
+ public override int layer
+ {
+ get
+ {
+ return 2;
+ }
+ }
+
+ public override bool pushstack
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override bool hideMainMenu
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override bool autoload
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override bool fullscreenui
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ private XGuildRedPacketDocument _Doc;
+
+ private XGuildDocument _GuildDoc;
+
+ private bool InActive = false;
+
+ private int m_startTime;
+
+ private int m_overTime;
+
+ private Action<bool> m_updateAction;
+
+ protected override void Init()
+ {
+ this._Doc = XDocuments.GetSpecificDocument<XGuildRedPacketDocument>(XGuildRedPacketDocument.uuID);
+ this._GuildDoc = XDocuments.GetSpecificDocument<XGuildDocument>(XGuildDocument.uuID);
+ base.uiBehaviour.m_instructionTitle.SetText(XSingleton<XGlobalConfig>.singleton.GetValue("GuildRedPacketTitle"));
+ base.uiBehaviour.m_scrollContent.SetText(XSingleton<UiUtility>.singleton.ReplaceReturn(XSingleton<XGlobalConfig>.singleton.GetValue("GuildRedPacketDesc")));
+ base.uiBehaviour.m_scrollView.ResetPosition();
+ string value = XSingleton<XGlobalConfig>.singleton.GetValue("GuildCheckInBonusTime");
+ string[] array = value.Split(XGlobalConfig.ListSeparator);
+ string[] array2 = array[0].Split(XGlobalConfig.SequenceSeparator);
+ string[] array3 = array[1].Split(XGlobalConfig.SequenceSeparator);
+ this.m_startTime = int.Parse(array2[0]) * 3600 + int.Parse(array2[1]) * 60;
+ this.m_overTime = int.Parse(array3[0]) * 3600 + int.Parse(array3[1]) * 60;
+ XSingleton<XDebug>.singleton.AddLog(string.Format("m_startime = {0},m_endtime ={1} ", this.m_startTime, this.m_overTime), null, null, null, null, null, XDebugColor.XDebug_None);
+ base.uiBehaviour.m_redPoint.gameObject.SetActive(false);
+ base.uiBehaviour.m_fixedRedPoint.gameObject.SetActive(false);
+ base.uiBehaviour.m_AakLabel.SetText(XStringDefineProxy.GetString("QUICK_REPLY_2"));
+ }
+
+ public void RefreshRedPoint()
+ {
+ base.uiBehaviour.m_redPoint.gameObject.SetActive(XSingleton<XGameSysMgr>.singleton.GetSysRedPointState(XSysDefine.XSys_GuildRedPacket));
+ base.uiBehaviour.m_fixedRedPoint.gameObject.SetActive(XSingleton<XGameSysMgr>.singleton.GetSysRedPointState(XSysDefine.XSys_GuildBoon_FixedRedPacket));
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ this._Doc.GetGuildCheckInBonusInfo();
+ this.RefreshSignInfo();
+ this.RefreshRedPoint();
+ }
+
+ public override void StackRefresh()
+ {
+ base.StackRefresh();
+ this.RefreshRedPoint();
+ this._Doc.GetGuildCheckInBonusInfo();
+ }
+
+ public override void OnUpdate()
+ {
+ base.OnUpdate();
+ bool flag = this._Doc == null || this._Doc.GuildBonus == null;
+ if (!flag)
+ {
+ bool flag2 = this._Doc.GuildBonus.timeofday > (double)this.m_startTime && this._Doc.GuildBonus.timeofday < (double)this.m_overTime;
+ bool flag3 = this.InActive != flag2;
+ if (flag3)
+ {
+ this.InActive = flag2;
+ bool flag4 = this.m_updateAction != null;
+ if (flag4)
+ {
+ this.m_updateAction(this.InActive);
+ }
+ }
+ double leftAskBonusTime = this._Doc.GuildBonus.leftAskBonusTime;
+ bool flag5 = base.uiBehaviour.m_Ask.IsVisible();
+ if (flag5)
+ {
+ bool flag6 = leftAskBonusTime > 0.0;
+ if (flag6)
+ {
+ base.uiBehaviour.m_AakLabel.SetText(string.Format("{0}{1}", XStringDefineProxy.GetString("INVITATION_SENT_NOTIFICATION"), (int)this._Doc.GuildBonus.leftAskBonusTime));
+ }
+ else
+ {
+ base.uiBehaviour.m_AakLabel.SetText(XStringDefineProxy.GetString("QUICK_REPLY_2"));
+ }
+ }
+ }
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ base.uiBehaviour.m_Close.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnCloseClick));
+ base.uiBehaviour.m_History.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnHistoryClick));
+ base.uiBehaviour.m_sign.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnSignClick));
+ base.uiBehaviour.m_Send.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnSendClick));
+ base.uiBehaviour.m_Ask.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnAskClick));
+ base.uiBehaviour.m_Fiexd.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnFiexdClick));
+ int i = 0;
+ int num = base.uiBehaviour.m_SignNodes.Length;
+ while (i < num)
+ {
+ base.uiBehaviour.m_SignNodes[i].m_pressCircle.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnCircleClick));
+ i++;
+ }
+ }
+
+ public void RefreshSignInfo()
+ {
+ XGuildCheckInBonusInfo guildBonus = this._Doc.GuildBonus;
+ this.SetOnLineNum(guildBonus.onLineNum, guildBonus.guildMemberNum);
+ this.SetSignValue(guildBonus.checkInNumber, guildBonus.guildMemberNum);
+ this.SetBonusBrief(guildBonus);
+ this.SetActiveCount(guildBonus.ActiveCount);
+ this.RefreshPermission();
+ this.RefreshSignStatu();
+ }
+
+ public void SetActiveCount(int activeCount)
+ {
+ int i = 0;
+ int num = base.uiBehaviour.m_redPakages.Length;
+ while (i < num)
+ {
+ bool flag = i < activeCount;
+ if (flag)
+ {
+ base.uiBehaviour.m_redPakages[i].SetVisible(true);
+ }
+ else
+ {
+ base.uiBehaviour.m_redPakages[i].SetVisible(false);
+ }
+ i++;
+ }
+ this.m_uiBehaviour.m_redNumber.SetText(string.Format("{0}/4", activeCount));
+ }
+
+ public void SetOnLineNum(int cur, int total)
+ {
+ this.m_uiBehaviour.m_OnlineValue.SetText(string.Format("{0}", cur));
+ this.m_uiBehaviour.m_BufferValue.SetText(string.Format("{0}%", this._Doc.GuildBonus.GetAddPercent(cur)));
+ }
+
+ public void SetSignValue(int signValue, int guildMemberNum)
+ {
+ string @string = XStringDefineProxy.GetString("GUILDRED_SIGN_VALUE", new object[]
+ {
+ string.Format("{0}", signValue)
+ });
+ this.m_uiBehaviour.m_SignValue.SetText(@string);
+ this.m_uiBehaviour.m_CurSignValue.SetText(signValue.ToString());
+ }
+
+ private void RefreshSignStatu()
+ {
+ bool isCheckIn = this._Doc.GuildBonus.isCheckIn;
+ this.m_uiBehaviour.m_sign.SetVisible(!isCheckIn);
+ }
+
+ private void OnCircleClick(IXUISprite uiSprite)
+ {
+ XGuildCheckInBonusInfo guildBonus = this._Doc.GuildBonus;
+ bool flag = (int)uiSprite.ID < guildBonus.BonusBriefs.Length;
+ if (flag)
+ {
+ XGuildCheckInBonusBrief xguildCheckInBonusBrief = this._Doc.GuildBonus.BonusBriefs[(int)uiSprite.ID];
+ bool flag2 = xguildCheckInBonusBrief == null;
+ if (flag2)
+ {
+ XSingleton<XDebug>.singleton.AddErrorLog("OnCircleClick Brief is null..", uiSprite.ID.ToString(), null, null, null, null);
+ }
+ else
+ {
+ bool flag3 = xguildCheckInBonusBrief.bonusState == BonusState.Bonus_UnActive;
+ if (flag3)
+ {
+ GuildBonusTable.RowData redPacketConfig = XGuildRedPacketDocument.GetRedPacketConfig(xguildCheckInBonusBrief.bonusType);
+ bool flag4 = redPacketConfig == null;
+ if (!flag4)
+ {
+ int itemID = (int)redPacketConfig.GuildBonusReward[0];
+ uint num = redPacketConfig.GuildBonusReward[1];
+ string text = XBagDocument.GetItemConf(itemID).ItemName[0];
+ string @string = XStringDefineProxy.GetString("GUILD_SIGN_REDPACKEGT_INFO", new object[]
+ {
+ xguildCheckInBonusBrief.brief.maxCount,
+ num,
+ text
+ });
+ XSingleton<UiUtility>.singleton.ShowSystemTip(string.Format("{0},{1}", @string, XStringDefineProxy.GetString("ERR_GUILDCHECKIN_BOXLIMIT")), "fece00");
+ }
+ }
+ else
+ {
+ bool flag5 = xguildCheckInBonusBrief.bonusState == BonusState.Bonus_Active;
+ if (flag5)
+ {
+ GuildBonusTable.RowData redPacketConfig2 = XGuildRedPacketDocument.GetRedPacketConfig(xguildCheckInBonusBrief.bonusType);
+ bool flag6 = redPacketConfig2 == null;
+ if (!flag6)
+ {
+ int itemID2 = (int)redPacketConfig2.GuildBonusReward[0];
+ uint num2 = redPacketConfig2.GuildBonusReward[1];
+ string text2 = XBagDocument.GetItemConf(itemID2).ItemName[0];
+ XSingleton<UiUtility>.singleton.ShowSystemTip(string.Format("{0}{1}", XStringDefineProxy.GetString("GUILD_SIGN_REDPACKEGT_INFO", new object[]
+ {
+ xguildCheckInBonusBrief.brief.maxCount,
+ num2,
+ text2
+ }), XStringDefineProxy.GetString("SIGN_REDPAKCAGE_TIPS")), "fece00");
+ }
+ }
+ else
+ {
+ bool flag7 = xguildCheckInBonusBrief.bonusState == BonusState.Bonus_Actived;
+ if (flag7)
+ {
+ DlgBase<XGuildRedPacketView, XGuildRedPacketBehaviour>.singleton.SetVisibleWithAnimation(true, null);
+ }
+ }
+ }
+ }
+ }
+ }
+
+ private void SetBonusBrief(XGuildCheckInBonusInfo bonusInfo)
+ {
+ XGuildCheckInBonusBrief[] bonusBriefs = bonusInfo.BonusBriefs;
+ int i = 0;
+ int num = bonusBriefs.Length;
+ while (i < num)
+ {
+ XGuildSignNode xguildSignNode = base.uiBehaviour.m_SignNodes[i];
+ bool flag = bonusBriefs[i] == null || xguildSignNode == null;
+ if (!flag)
+ {
+ xguildSignNode.SetSignNumber(bonusBriefs[i].bonueMemberCount);
+ xguildSignNode.SetBonusStatu(bonusBriefs[i].bonusState);
+ float bonusProgress = 0f;
+ bool flag2 = bonusBriefs[i].needMemberCount > 0u;
+ if (flag2)
+ {
+ bool flag3 = (long)bonusInfo.checkInNumber > (long)((ulong)bonusBriefs[i].bonueMemberCount);
+ if (flag3)
+ {
+ bonusProgress = 1f;
+ }
+ else
+ {
+ bool flag4 = (long)bonusInfo.checkInNumber < (long)((ulong)bonusBriefs[i].frontBonusMemberCount);
+ if (flag4)
+ {
+ bonusProgress = 0f;
+ }
+ else
+ {
+ bonusProgress = (float)((long)bonusInfo.checkInNumber - (long)((ulong)bonusBriefs[i].frontBonusMemberCount)) / bonusBriefs[i].needMemberCount;
+ }
+ }
+ }
+ xguildSignNode.SetBonusProgress(bonusProgress);
+ }
+ i++;
+ }
+ }
+
+ private void RefreshGuildLeader(bool state)
+ {
+ bool flag = this.InActive && this._Doc.GuildBonus.HasActive();
+ if (flag)
+ {
+ this.m_uiBehaviour.m_Send.SetGrey(true);
+ }
+ else
+ {
+ this.m_uiBehaviour.m_Send.SetGrey(false);
+ }
+ }
+
+ private void RefreshGuildMember(bool state)
+ {
+ bool flag = this._Doc.GuildBonus.AllActived();
+ bool flag2 = this.InActive || !flag;
+ if (flag2)
+ {
+ base.uiBehaviour.m_Ask.SetGrey(true);
+ }
+ else
+ {
+ base.uiBehaviour.m_Ask.SetGrey(false);
+ }
+ }
+
+ private void RefreshPermission()
+ {
+ XGuildDocument specificDocument = XDocuments.GetSpecificDocument<XGuildDocument>(XGuildDocument.uuID);
+ this.ResetPermission();
+ bool flag = specificDocument.IHavePermission(GuildPermission.GPEM_SENDCHECKINBONUS);
+ if (flag)
+ {
+ base.uiBehaviour.m_Send.SetVisible(true);
+ this.m_updateAction = new Action<bool>(this.RefreshGuildLeader);
+ }
+ else
+ {
+ base.uiBehaviour.m_Ask.SetVisible(true);
+ this.m_updateAction = new Action<bool>(this.RefreshGuildMember);
+ }
+ bool flag2 = this.m_updateAction != null;
+ if (flag2)
+ {
+ this.m_updateAction(this.InActive);
+ }
+ }
+
+ private void ResetPermission()
+ {
+ base.uiBehaviour.m_Send.SetVisible(false);
+ base.uiBehaviour.m_Ask.SetVisible(false);
+ }
+
+ private bool OnCloseClick(IXUIButton btn)
+ {
+ this.SetVisibleWithAnimation(false, null);
+ return true;
+ }
+
+ private bool OnFiexdClick(IXUIButton btn)
+ {
+ DlgBase<GuildFiexdRedPackageView, GuildFiexdRedPackageBehaviour>.singleton.SetVisibleWithAnimation(true, null);
+ return false;
+ }
+
+ private bool OnHistoryClick(IXUIButton btn)
+ {
+ DlgBase<XGuildRedPacketView, XGuildRedPacketBehaviour>.singleton.SetVisibleWithAnimation(true, null);
+ return true;
+ }
+
+ private bool OnSignClick(IXUIButton btn)
+ {
+ bool flag = !this._GuildDoc.CheckInGuild();
+ bool result;
+ if (flag)
+ {
+ result = true;
+ }
+ else
+ {
+ bool flag2 = !this._GuildDoc.CheckUnlockLevel(XSysDefine.XSys_GuildHall_SignIn);
+ if (flag2)
+ {
+ result = true;
+ }
+ else
+ {
+ DlgBase<XGuildSignInView, XGuildSignInBehaviour>.singleton.SetVisibleWithAnimation(true, null);
+ result = true;
+ }
+ }
+ return result;
+ }
+
+ private bool OnSendClick(IXUIButton btn)
+ {
+ bool flag = !this.InActive;
+ bool result;
+ if (flag)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString("GUILD_BONUSOUTTIME"), "fece00");
+ XSingleton<XDebug>.singleton.AddGreenLog(XSingleton<XCommon>.singleton.StringCombine("ServerTime;", XSingleton<UiUtility>.singleton.TimeDuarationFormatString((int)this._Doc.GuildBonus.timeofday, 5)), null, null, null, null, null);
+ result = false;
+ }
+ else
+ {
+ XGuildCheckInBonusBrief xguildCheckInBonusBrief;
+ bool flag2 = this._Doc.GuildBonus.TryGetFreeBrief(out xguildCheckInBonusBrief);
+ if (flag2)
+ {
+ string @string = XStringDefineProxy.GetString("GUILD_BONUSSENDIALOG", new object[]
+ {
+ this._Doc.GuildBonus.onLineNum,
+ this._Doc.GuildBonus.GetAddPercent(this._Doc.GuildBonus.onLineNum),
+ xguildCheckInBonusBrief.brief.maxCount
+ });
+ XSingleton<UiUtility>.singleton.ShowModalDialog(@string, XStringDefineProxy.GetString("COMMON_OK"), XStringDefineProxy.GetString("COMMON_CANCEL"), new ButtonClickEventHandler(this.OnSureSendGuildBonus));
+ }
+ else
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString("GUILD_BONUSONOTFREE"), "fece00");
+ }
+ result = true;
+ }
+ return result;
+ }
+
+ private bool OnSureSendGuildBonus(IXUIButton btn)
+ {
+ XSingleton<UiUtility>.singleton.CloseModalDlg();
+ this._Doc.GetSendGuildBonus();
+ return true;
+ }
+
+ private bool OnAskClick(IXUIButton btn)
+ {
+ bool flag = !this.InActive;
+ bool result;
+ if (flag)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString("GUILD_BONUSOUTTIME"), "fece00");
+ result = false;
+ }
+ else
+ {
+ XGuildCheckInBonusBrief xguildCheckInBonusBrief;
+ bool flag2 = this._Doc.GuildBonus.TryGetFreeBrief(out xguildCheckInBonusBrief);
+ if (flag2)
+ {
+ bool flag3 = this._Doc.GuildBonus.leftAskBonusTime > 0.0;
+ if (flag3)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString("GUILD_BONES_AFTER_TIME", new object[]
+ {
+ (int)this._Doc.GuildBonus.leftAskBonusTime
+ }), "fece00");
+ }
+ else
+ {
+ DlgBase<QuickReplyDlg, XQuickReplyBehavior>.singleton.ShowView(2, new Action<bool>(this.ShowAskForCheckInBonues));
+ }
+ }
+ else
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString("GUILD_BONUSONOTFREE"), "fece00");
+ }
+ result = true;
+ }
+ return result;
+ }
+
+ private void ShowAskForCheckInBonues(bool state)
+ {
+ if (state)
+ {
+ XQuickReplyDocument specificDocument = XDocuments.GetSpecificDocument<XQuickReplyDocument>(XQuickReplyDocument.uuID);
+ specificDocument.GetAskForCheckInBonus();
+ this._Doc.GuildBonus.leftAskBonusTime = (double)XSingleton<XGlobalConfig>.singleton.GetInt("GuildBonusAskTimeSpan");
+ }
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/XGuildSignRedPackageView.cs.meta b/Client/Assets/Scripts/XMainClient/UI/XGuildSignRedPackageView.cs.meta
new file mode 100644
index 00000000..43a9d715
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XGuildSignRedPackageView.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 81707443faf5c2246a28bb89a3546633
+timeCreated: 1611404037
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/XGuildViewBehaviour.cs b/Client/Assets/Scripts/XMainClient/UI/XGuildViewBehaviour.cs
new file mode 100644
index 00000000..1ec4c781
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XGuildViewBehaviour.cs
@@ -0,0 +1,32 @@
+using System;
+using UILib;
+using XMainClient.UI.UICommon;
+
+namespace XMainClient.UI
+{
+ internal class XGuildViewBehaviour : DlgBehaviourBase
+ {
+ public IXUIButton m_Close = null;
+
+ public IXUIButton m_BtnApply;
+
+ public IXUILabel m_Annoucement;
+
+ public IXUIWrapContent m_WrapContent;
+
+ public IXUIScrollView m_ScrollView;
+
+ public XGuildBasicInfoDisplay m_BasicInfoDisplay = new XGuildBasicInfoDisplay();
+
+ private void Awake()
+ {
+ this.m_Close = (base.transform.Find("Bg/Close").GetComponent("XUIButton") as IXUIButton);
+ this.m_BtnApply = (base.transform.Find("Bg/BtnApply").GetComponent("XUIButton") as IXUIButton);
+ this.m_Annoucement = (base.transform.Find("Bg/Bg3/Announcement").GetComponent("XUILabel") as IXUILabel);
+ this.m_Annoucement.SetText("");
+ this.m_BasicInfoDisplay.Init(base.transform.Find("Bg/BasicInfo/Content"), true);
+ this.m_ScrollView = (base.transform.Find("Bg/Panel").GetComponent("XUIScrollView") as IXUIScrollView);
+ this.m_WrapContent = (base.transform.Find("Bg/Panel/WrapContent").GetComponent("XUIWrapContent") as IXUIWrapContent);
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/XGuildViewBehaviour.cs.meta b/Client/Assets/Scripts/XMainClient/UI/XGuildViewBehaviour.cs.meta
new file mode 100644
index 00000000..dbdd476c
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XGuildViewBehaviour.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: a91601ac19759f14fb96b97bc1f2ac35
+timeCreated: 1611404297
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/XGuildViewView.cs b/Client/Assets/Scripts/XMainClient/UI/XGuildViewView.cs
new file mode 100644
index 00000000..86fc7f19
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XGuildViewView.cs
@@ -0,0 +1,172 @@
+using System;
+using System.Collections.Generic;
+using KKSG;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class XGuildViewView : DlgBase<XGuildViewView, XGuildViewBehaviour>
+ {
+ public override string fileName
+ {
+ get
+ {
+ return "Guild/GuildViewDlg";
+ }
+ }
+
+ public override int layer
+ {
+ get
+ {
+ return 1;
+ }
+ }
+
+ public override int group
+ {
+ get
+ {
+ return 1;
+ }
+ }
+
+ public override bool autoload
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override bool hideMainMenu
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override bool fullscreenui
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override bool pushstack
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ private XGuildDocument _GuildDoc;
+
+ private XGuildViewDocument _ViewDoc;
+
+ private XGuildMemberInfoDisplay _MemberInfoDisplay = new XGuildMemberInfoDisplay();
+
+ protected override void Init()
+ {
+ this._GuildDoc = XDocuments.GetSpecificDocument<XGuildDocument>(XGuildDocument.uuID);
+ this._ViewDoc = XDocuments.GetSpecificDocument<XGuildViewDocument>(XGuildViewDocument.uuID);
+ this._ViewDoc.GuildViewView = this;
+ }
+
+ protected override void OnUnload()
+ {
+ this._ViewDoc.GuildViewView = null;
+ }
+
+ public override void RegisterEvent()
+ {
+ base.uiBehaviour.m_Close.RegisterClickEventHandler(new ButtonClickEventHandler(this._OnCloseBtnClick));
+ base.uiBehaviour.m_BtnApply.RegisterClickEventHandler(new ButtonClickEventHandler(this._OnApplyBtnClick));
+ base.uiBehaviour.m_WrapContent.RegisterItemUpdateEventHandler(new WrapItemUpdateEventHandler(this._WrapContentItemUpdated));
+ base.uiBehaviour.m_WrapContent.RegisterItemInitEventHandler(new WrapItemInitEventHandler(this._WrapContentItemInit));
+ }
+
+ protected override void OnShow()
+ {
+ base.uiBehaviour.m_BtnApply.SetEnable(XSingleton<XGameSysMgr>.singleton.IsSystemOpened(XSysDefine.XSys_Guild) && !this._GuildDoc.bInGuild, false);
+ }
+
+ private bool _OnCloseBtnClick(IXUIButton go)
+ {
+ this.SetVisible(false, true);
+ return true;
+ }
+
+ private bool _OnApplyBtnClick(IXUIButton go)
+ {
+ bool bInGuild = this._GuildDoc.bInGuild;
+ bool result;
+ if (bInGuild)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(ErrorCode.ERR_GUILD_ALREADY_IN_GUILD, "fece00");
+ result = true;
+ }
+ else
+ {
+ DlgBase<XGuildApplyView, XGuildApplyBehaviour>.singleton.ShowApply(this._ViewDoc.BasicData.uid, this._ViewDoc.BasicData.guildName, (uint)this._ViewDoc.ApproveSetting.PPT, !this._ViewDoc.ApproveSetting.autoApprove, this._ViewDoc.BasicData.announcement);
+ result = true;
+ }
+ return result;
+ }
+
+ public void RefreshAnnouncement()
+ {
+ XGuildBasicData basicData = this._ViewDoc.BasicData;
+ base.uiBehaviour.m_Annoucement.SetText(basicData.announcement);
+ }
+
+ public void RefreshBasicInfo()
+ {
+ XGuildBasicData basicData = this._ViewDoc.BasicData;
+ base.uiBehaviour.m_BasicInfoDisplay.Set(basicData);
+ this.RefreshAnnouncement();
+ }
+
+ public void RefreshMembers()
+ {
+ List<XGuildMemberBasicInfo> memberList = this._ViewDoc.MemberList;
+ int count = memberList.Count;
+ base.uiBehaviour.m_WrapContent.SetContentCount(count, false);
+ base.uiBehaviour.m_ScrollView.ResetPosition();
+ }
+
+ private void _WrapContentItemInit(Transform t, int index)
+ {
+ IXUISprite ixuisprite = t.GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this._OnMemberClick));
+ }
+
+ private void _WrapContentItemUpdated(Transform t, int index)
+ {
+ bool flag = index < 0 || index >= this._ViewDoc.MemberList.Count;
+ if (!flag)
+ {
+ XGuildMemberBasicInfo data = this._ViewDoc.MemberList[index];
+ IXUISprite ixuisprite = t.GetComponent("XUISprite") as IXUISprite;
+ this._MemberInfoDisplay.Init(t, false);
+ this._MemberInfoDisplay.Set(data);
+ ixuisprite.ID = (ulong)((long)index);
+ }
+ }
+
+ private void _OnMemberClick(IXUISprite iSp)
+ {
+ int num = (int)iSp.ID;
+ bool flag = num < 0 || num >= this._ViewDoc.MemberList.Count;
+ if (flag)
+ {
+ }
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/XGuildViewView.cs.meta b/Client/Assets/Scripts/XMainClient/UI/XGuildViewView.cs.meta
new file mode 100644
index 00000000..b14ce5fc
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XGuildViewView.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 71424041c36579a40982dda357f08aa4
+timeCreated: 1611403933
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/XLoginView.cs b/Client/Assets/Scripts/XMainClient/UI/XLoginView.cs
new file mode 100644
index 00000000..7df45921
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XLoginView.cs
@@ -0,0 +1,525 @@
+using System;
+using System.Collections.Generic;
+using MiniJSON;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUpdater;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class XLoginView : DlgBase<XLoginView, LoginWindowBehaviour>
+ {
+ public override string fileName
+ {
+ get
+ {
+ return "SelectChar/LoginDlg";
+ }
+ }
+
+ public override int layer
+ {
+ get
+ {
+ return 1;
+ }
+ }
+
+ private XLoginDocument _doc = null;
+
+ protected override void Init()
+ {
+ this._doc = XSingleton<XLoginDocument>.singleton;
+ this._doc.View = this;
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ this.SetVersion("v" + XSingleton<XUpdater.XUpdater>.singleton.Version);
+ base.uiBehaviour.m_Login.SetVisible(!this._doc.IsPublish());
+ base.uiBehaviour.m_Account.SetVisible(!this._doc.IsPublish());
+ base.uiBehaviour.m_Password.SetVisible(!this._doc.IsPublish());
+ int num = 4;
+ float num2 = 0f;
+ float y = base.uiBehaviour.m_GuestLogin.gameObject.transform.localPosition.y;
+ bool flag = (int)Application.platform == 8;
+ if (flag)
+ {
+ num |= 1;
+ num2 -= (float)(base.uiBehaviour.m_GuestLogin.spriteWidth / 2 + 10);
+ }
+ bool flag2 = XSingleton<XUpdater.XUpdater>.singleton.XPlatform.CheckWeChatInstalled() || (int)Application.platform != 8;
+ if (flag2)
+ {
+ num |= 2;
+ num2 -= (float)(base.uiBehaviour.m_GuestLogin.spriteWidth / 2 + 10);
+ }
+ bool flag3 = (num & 1) > 0;
+ if (flag3)
+ {
+ base.uiBehaviour.m_GuestLogin.gameObject.transform.localPosition = new Vector3(num2, y);
+ num2 += (float)(base.uiBehaviour.m_GuestLogin.spriteWidth + 10);
+ }
+ else
+ {
+ base.uiBehaviour.m_GuestLogin.SetVisible(false);
+ }
+ bool flag4 = (num & 2) > 0;
+ if (flag4)
+ {
+ base.uiBehaviour.m_WXLogin.gameObject.transform.localPosition = new Vector3(num2, y);
+ num2 += (float)(base.uiBehaviour.m_WXLogin.spriteWidth + 10);
+ }
+ else
+ {
+ base.uiBehaviour.m_WXLogin.SetVisible(false);
+ }
+ bool flag5 = (num & 4) > 0;
+ if (flag5)
+ {
+ base.uiBehaviour.m_QQLogin.gameObject.transform.localPosition = new Vector3(num2, y);
+ num2 += (float)(base.uiBehaviour.m_QQLogin.spriteWidth + 10);
+ }
+ else
+ {
+ base.uiBehaviour.m_QQLogin.SetVisible(false);
+ }
+ }
+
+ public override void RegisterEvent()
+ {
+ base.uiBehaviour.m_Login.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnAccountInfoEnterClick));
+ base.uiBehaviour.m_QQLogin.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnQQLoginButtonClick));
+ base.uiBehaviour.m_WXLogin.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnWXLoginButtonClick));
+ base.uiBehaviour.m_GuestLogin.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnGuestButtonClick));
+ base.uiBehaviour.m_Notice.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnNoticeClicked));
+ base.uiBehaviour.m_CG.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnCGClicked));
+ base.uiBehaviour.m_CustomerService.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnCustomerServiceClicked));
+ base.uiBehaviour.m_EnterToSelectChar.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnEnterToSelectCharClicked));
+ base.uiBehaviour.m_ReturnToLogin.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnReturnToLoginClicked));
+ base.uiBehaviour.m_ServerListButton.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnSelectServerClick));
+ base.uiBehaviour.m_CloseServerList.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnServerListCloseClicked));
+ base.uiBehaviour.m_LeaveQueue.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnLeaveQueueClicked));
+ base.uiBehaviour.m_FriendWrapContent.RegisterItemUpdateEventHandler(new WrapItemUpdateEventHandler(this.FriendWrapContentUpdated));
+ }
+
+ public void RefreshAccount()
+ {
+ base.uiBehaviour.m_Account.SetText(this._doc.Account ?? "");
+ base.uiBehaviour.m_Password.SetText(this._doc.Password ?? "");
+ }
+
+ private bool OnAccountInfoEnterClick(IXUIButton button)
+ {
+ bool flag = this._doc.CheckLoginBlockTime();
+ if (flag)
+ {
+ string text = base.uiBehaviour.m_Account.GetText();
+ string text2 = base.uiBehaviour.m_Password.GetText();
+ this._doc.Authorization(XAuthorizationChannel.XAuthorization_Internal, true, false, text, text2);
+ }
+ else
+ {
+ XSingleton<UiUtility>.singleton.ShowLoginTip(XStringDefineProxy.GetString("LOGIN_TOO_FREQUENT"));
+ }
+ return true;
+ }
+
+ private bool OnQQLoginButtonClick(IXUIButton go)
+ {
+ bool flag = this._doc.CheckLoginBlockTime();
+ if (flag)
+ {
+ this._doc.Authorization(XAuthorizationChannel.XAuthorization_QQ, true, false, null, null);
+ }
+ else
+ {
+ XSingleton<UiUtility>.singleton.ShowLoginTip(XStringDefineProxy.GetString("LOGIN_TOO_FREQUENT"));
+ }
+ return true;
+ }
+
+ private bool OnWXLoginButtonClick(IXUIButton go)
+ {
+ bool flag = this._doc.CheckLoginBlockTime();
+ if (flag)
+ {
+ this._doc.Authorization(XAuthorizationChannel.XAuthorization_WeChat, true, false, null, null);
+ }
+ else
+ {
+ XSingleton<UiUtility>.singleton.ShowLoginTip(XStringDefineProxy.GetString("LOGIN_TOO_FREQUENT"));
+ }
+ return true;
+ }
+
+ private bool OnGuestButtonClick(IXUIButton go)
+ {
+ bool flag = this._doc.CheckLoginBlockTime();
+ if (flag)
+ {
+ this._doc.Authorization(XAuthorizationChannel.XAuthorization_Guest, true, false, null, null);
+ }
+ else
+ {
+ XSingleton<UiUtility>.singleton.ShowLoginTip(XStringDefineProxy.GetString("LOGIN_TOO_FREQUENT"));
+ }
+ return true;
+ }
+
+ private bool OnNoticeClicked(IXUIButton go)
+ {
+ XSingleton<UiUtility>.singleton.ShowAfterLoginAnnouncement(this._doc.Announcement);
+ return true;
+ }
+
+ private bool OnCGClicked(IXUIButton button)
+ {
+ XSingleton<XTimerMgr>.singleton.SetTimer(0.1f, new XTimerMgr.ElapsedEventHandler(XSingleton<XUpdater.XUpdater>.singleton.PlayCG), null);
+ return true;
+ }
+
+ private bool OnCustomerServiceClicked(IXUIButton go)
+ {
+ Dictionary<string, string> dictionary = new Dictionary<string, string>();
+ RuntimePlatform platform = Application.platform;
+ if ((int)platform != 8)
+ {
+ if ((int)platform != 11)
+ {
+ XSingleton<XDebug>.singleton.AddGreenLog("CustomerService-Login", null, null, null, null, null);
+ }
+ else
+ {
+ dictionary["url"] = XSingleton<XGlobalConfig>.singleton.GetValue("CustomerServiceLoginAndroid");
+ dictionary["screendir"] = "SENSOR";
+ XSingleton<XUpdater.XUpdater>.singleton.XPlatform.SendExtDara("open_url", Json.Serialize(dictionary));
+ }
+ }
+ else
+ {
+ dictionary["url"] = XSingleton<XGlobalConfig>.singleton.GetValue("CustomerServiceLoginApple");
+ dictionary["screendir"] = "SENSOR";
+ XSingleton<XUpdater.XUpdater>.singleton.XPlatform.SendExtDara("open_url", Json.Serialize(dictionary));
+ }
+ return true;
+ }
+
+ private bool OnEnterToSelectCharClicked(IXUIButton go)
+ {
+ bool flag = string.IsNullOrEmpty(XSingleton<XClientNetwork>.singleton.XLoginToken);
+ if (flag)
+ {
+ XSingleton<XLoginDocument>.singleton.AutoAuthorization(false);
+ }
+ else
+ {
+ XSingleton<XLoginDocument>.singleton.Login();
+ }
+ return true;
+ }
+
+ private bool OnReturnToLoginClicked(IXUIButton go)
+ {
+ this._doc.AuthorizationSignOut();
+ return true;
+ }
+
+ private void OnServerListCloseClicked(IXUISprite sp)
+ {
+ base.uiBehaviour.m_ServerList.gameObject.SetActive(false);
+ }
+
+ private bool OnLeaveQueueClicked(IXUIButton button)
+ {
+ base.uiBehaviour.m_QueueFrame.SetActive(false);
+ this._doc.CancelQueue();
+ return true;
+ }
+
+ public void TweenAlpha(bool bForward)
+ {
+ base.uiBehaviour.m_Tween.PlayTween(bForward, -1f);
+ }
+
+ public void SetVersion(string version)
+ {
+ bool flag = XSingleton<XUpdater.XUpdater>.singleton.XPlatform.IsTestMode();
+ if (flag)
+ {
+ base.uiBehaviour.m_Version.SetText(version + "Test");
+ }
+ else
+ {
+ base.uiBehaviour.m_Version.SetText(version);
+ }
+ }
+
+ public void ShowLogin()
+ {
+ base.uiBehaviour.m_normalFrame.SetActive(true);
+ base.uiBehaviour.m_ServerListFrame.SetActive(false);
+ base.uiBehaviour.m_QueueFrame.SetActive(false);
+ this.RefreshAccount();
+ }
+
+ public void ShowSelectServer()
+ {
+ base.uiBehaviour.m_normalFrame.SetActive(false);
+ base.uiBehaviour.m_ServerListFrame.SetActive(true);
+ base.uiBehaviour.m_ServerList.gameObject.SetActive(false);
+ base.uiBehaviour.m_QueueFrame.SetActive(false);
+ }
+
+ public void ShowQueue()
+ {
+ base.uiBehaviour.m_normalFrame.SetActive(false);
+ base.uiBehaviour.m_ServerListFrame.SetActive(false);
+ base.uiBehaviour.m_QueueFrame.SetActive(true);
+ base.uiBehaviour.m_QueueTip.SetText("");
+ }
+
+ public void RefreshQueueState()
+ {
+ bool flag = !base.uiBehaviour.m_QueueFrame.activeSelf;
+ if (!flag)
+ {
+ base.uiBehaviour.m_QueueTip.SetText(string.Format(XSingleton<UiUtility>.singleton.ReplaceReturn(XStringDefineProxy.GetString("WAIT_FOR_SERVER_QUEUE")), XSingleton<XClientNetwork>.singleton.Server, this._doc.RoleCountInQueue, XSingleton<UiUtility>.singleton.TimeAccFormatString((int)this._doc.LeftTimeInQueue, 3, 0)));
+ }
+ }
+
+ public void OnShowServerList()
+ {
+ base.uiBehaviour.m_ServerPool.ReturnAll(false);
+ base.uiBehaviour.m_ServerList.gameObject.SetActive(true);
+ this.SetupAreaServerList();
+ }
+
+ private void OnSelectServerClick(IXUISprite sp)
+ {
+ this.OnShowServerList();
+ }
+
+ public void SetCurrentServer()
+ {
+ base.uiBehaviour.m_CurrentServer.SetText(XSingleton<XClientNetwork>.singleton.Server);
+ }
+
+ private void SetupAreaServerList()
+ {
+ base.uiBehaviour.m_AreaPool.ReturnAll(false);
+ Vector3 localPosition = base.uiBehaviour.m_AreaPool._tpl.transform.localPosition;
+ int tplHeight = base.uiBehaviour.m_AreaPool.TplHeight;
+ IXUICheckBox ixuicheckBox = null;
+ string @string = XSingleton<XStringTable>.singleton.GetString("BACK_SERVERS");
+ bool flag = XSingleton<XLoginDocument>.singleton.BackFlowServerList.Count > 0;
+ for (int i = 0; i < this._doc.ZoneList.Count; i++)
+ {
+ GameObject gameObject = base.uiBehaviour.m_AreaPool.FetchGameObject(false);
+ gameObject.name = "Area" + i;
+ gameObject.transform.localPosition = localPosition + new Vector3(0f, (float)(-(float)i * tplHeight));
+ IXUILabel ixuilabel = gameObject.GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel2 = gameObject.transform.Find("Selected/Label").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel2.SetText(this._doc.ZoneList[i]);
+ ixuilabel.SetText(this._doc.ZoneList[i]);
+ ixuilabel.RegisterLabelClickEventHandler(new LabelClickEventHandler(this.OnAreaClicked));
+ string a = this._doc.ZoneList[i];
+ bool flag2 = flag && a == @string;
+ if (flag2)
+ {
+ flag = true;
+ this.ShowAreaServers(this._doc.ZoneList[i]);
+ ixuicheckBox = (gameObject.GetComponent("XUICheckBox") as IXUICheckBox);
+ }
+ bool flag3 = i == 2 && !flag;
+ if (flag3)
+ {
+ this.ShowAreaServers(this._doc.ZoneList[i]);
+ ixuicheckBox = (gameObject.GetComponent("XUICheckBox") as IXUICheckBox);
+ }
+ }
+ bool flag4 = ixuicheckBox != null;
+ if (flag4)
+ {
+ ixuicheckBox.bChecked = true;
+ }
+ }
+
+ private void ShowAreaServers(string zone)
+ {
+ bool flag = zone == XStringDefineProxy.GetString("FRIENDS_SERVERS");
+ if (flag)
+ {
+ base.uiBehaviour.m_FriendFrame.gameObject.SetActive(true);
+ base.uiBehaviour.m_ServerFrame.gameObject.SetActive(false);
+ base.uiBehaviour.m_FriendWrapContent.SetContentCount(this._doc.FriendOpenid.Count, true);
+ base.uiBehaviour.m_FriendScrollView.ResetPosition();
+ }
+ else
+ {
+ base.uiBehaviour.m_FriendFrame.gameObject.SetActive(false);
+ base.uiBehaviour.m_ServerFrame.gameObject.SetActive(true);
+ base.uiBehaviour.m_FriendWrapContent.SetContentCount(0, true);
+ }
+ base.uiBehaviour.m_ServerPool.ReturnAll(false);
+ Vector3 localPosition = base.uiBehaviour.m_ServerPool._tpl.transform.localPosition;
+ int tplHeight = base.uiBehaviour.m_ServerPool.TplHeight;
+ int tplWidth = base.uiBehaviour.m_ServerPool.TplWidth;
+ List<int> list = this._doc.ServerCategory[zone];
+ int num = 0;
+ for (int i = list.Count - 1; i >= 0; i--)
+ {
+ ServerInfo serverData = this._doc.GetServerData(list[i]);
+ bool flag2 = serverData == null;
+ if (!flag2)
+ {
+ bool flag3 = !XSingleton<XGame>.singleton.IsGMAccount;
+ if (flag3)
+ {
+ bool flag4 = serverData.StateTxt == 6;
+ if (flag4)
+ {
+ goto IL_2EF;
+ }
+ }
+ Transform transform = base.uiBehaviour.m_ServerPool.FetchGameObject(true).transform;
+ transform.name = "Server" + list[i];
+ int num2 = num / 2;
+ int num3 = num % 2;
+ num++;
+ transform.localPosition = localPosition + new Vector3((float)(num3 * tplWidth), (float)(-(float)num2 * tplHeight));
+ IXUISprite ixuisprite = transform.GetComponent("XUISprite") as IXUISprite;
+ IXUILabel ixuilabel = transform.Find("Bg/Name").GetComponent("XUILabel") as IXUILabel;
+ ixuisprite.ID = (ulong)((long)list[i]);
+ ixuilabel.SetText(serverData.ServerName);
+ ixuisprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnServerClicked));
+ IXUISprite ixuisprite2 = transform.Find("Bg/Status").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite2.SetSprite(this._ServerStateString((ServerStateEnum)serverData.State));
+ this._SetServerStateLabel(transform.gameObject, serverData.StateTxt);
+ IXUILabel ixuilabel2 = transform.Find("Bg/Level").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel2.Alpha = ((serverData.Level == 0u) ? 0f : 1f);
+ ixuilabel2.SetText(string.Format("Lv.{0}", serverData.Level));
+ }
+ IL_2EF:;
+ }
+ base.uiBehaviour.m_ServerScrollView.ResetPosition();
+ }
+
+ private void FriendWrapContentUpdated(Transform t, int index)
+ {
+ bool flag = index < 0 || index >= this._doc.FriendOpenid.Count;
+ if (flag)
+ {
+ t.gameObject.SetActive(false);
+ }
+ else
+ {
+ FriendServerInfo friendServerInfo = null;
+ bool flag2 = !this._doc.FriendServerDic.TryGetValue(this._doc.FriendOpenid[index], out friendServerInfo);
+ if (!flag2)
+ {
+ ServerInfo serverData = this._doc.GetServerData(this._doc.FriendServerDic[this._doc.FriendOpenid[index]].info.serverid);
+ bool flag3 = serverData == null;
+ if (!flag3)
+ {
+ IXUISprite ixuisprite = t.GetComponent("XUISprite") as IXUISprite;
+ IXUILabel ixuilabel = t.Find("Bg/Name").GetComponent("XUILabel") as IXUILabel;
+ ixuisprite.ID = (ulong)((long)friendServerInfo.info.serverid);
+ ixuilabel.SetText(serverData.ServerName);
+ ixuisprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnServerClicked));
+ IXUISprite ixuisprite2 = t.Find("Bg/Status").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite2.SetSprite(this._ServerStateString((ServerStateEnum)serverData.State));
+ this._SetServerStateLabel(t.gameObject, serverData.StateTxt);
+ IXUILabel ixuilabel2 = t.Find("Bg/Level").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel2.Alpha = ((friendServerInfo.info.level == 0) ? 0f : 1f);
+ ixuilabel2.SetText(string.Format("Lv.{0}", friendServerInfo.info.level));
+ IXUILabel ixuilabel3 = t.Find("Bg/GameName").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel3.SetText(friendServerInfo.info.rolename);
+ IXUILabel ixuilabel4 = t.Find("Bg/IMName").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel4.SetText(friendServerInfo.account);
+ IXUITexture ixuitexture = t.Find("Bg/Icon").GetComponent("XUITexture") as IXUITexture;
+ ixuitexture.SetVisible(true);
+ ixuitexture.SetTexturePath("");
+ XSingleton<XUICacheImage>.singleton.Load(friendServerInfo.icon, ixuitexture, base.uiBehaviour);
+ }
+ }
+ }
+ }
+
+ private void OnAreaClicked(IXUILabel sp)
+ {
+ this.ShowAreaServers(sp.GetText());
+ }
+
+ private void OnServerClicked(IXUISprite sp)
+ {
+ base.uiBehaviour.m_ServerList.gameObject.SetActive(false);
+ this._doc.OnServerChanged((int)sp.ID);
+ }
+
+ private Color _ServerStateColor(ServerStateEnum state)
+ {
+ Color result;
+ switch (state)
+ {
+ case ServerStateEnum.TIMEOUT:
+ result = new Color(1f, 1f, 1f, 1f);
+ break;
+ case ServerStateEnum.EMPTY:
+ result = new Color(0.1254902f, 0.8784314f, 0.160784319f, 1f);
+ break;
+ case ServerStateEnum.NORMAL:
+ result = new Color(0.996078432f, 0.7254902f, 0f, 1f);
+ break;
+ case ServerStateEnum.FULL:
+ result = new Color(0.8784314f, 0.286274523f, 0.1254902f, 1f);
+ break;
+ default:
+ result = new Color(1f, 1f, 1f, 1f);
+ break;
+ }
+ return result;
+ }
+
+ private string _ServerStateString(ServerStateEnum state)
+ {
+ string result;
+ switch (state)
+ {
+ case ServerStateEnum.TIMEOUT:
+ result = "fwq_0";
+ break;
+ case ServerStateEnum.EMPTY:
+ result = "fwq_1";
+ break;
+ case ServerStateEnum.NORMAL:
+ result = "fwq_2";
+ break;
+ case ServerStateEnum.FULL:
+ result = "fwq_3";
+ break;
+ default:
+ result = "fwq_0";
+ break;
+ }
+ return result;
+ }
+
+ private void _SetServerStateLabel(GameObject go, int state)
+ {
+ int num = XFastEnumIntEqualityComparer<ServerFlagEnum>.ToInt(ServerFlagEnum.MAX);
+ for (int i = 0; i < num; i++)
+ {
+ Transform transform = go.transform.Find(string.Format("Bg/State{0}", i));
+ bool flag = transform != null;
+ if (flag)
+ {
+ transform.gameObject.SetActive(state == i);
+ }
+ }
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/XLoginView.cs.meta b/Client/Assets/Scripts/XMainClient/UI/XLoginView.cs.meta
new file mode 100644
index 00000000..284a1045
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XLoginView.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 78b82f0cdcbcf914aaf8a27735881108
+timeCreated: 1611403982
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/XMISystemAnnounceHandler.cs b/Client/Assets/Scripts/XMainClient/UI/XMISystemAnnounceHandler.cs
new file mode 100644
index 00000000..e674747c
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XMISystemAnnounceHandler.cs
@@ -0,0 +1,106 @@
+using System;
+using System.Text;
+using UILib;
+using UnityEngine;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class XMISystemAnnounceHandler : DlgHandlerBase
+ {
+ protected override string FileName
+ {
+ get
+ {
+ return "GameSystem/ForeshowDlg";
+ }
+ }
+
+ private IXUISprite m_closedSpr;
+
+ private IXUISprite m_iconSpr;
+
+ private IXUILabel m_nameLab;
+
+ private IXUILabel m_levelLab;
+
+ private IXUILabel m_describeLab;
+
+ protected override void Init()
+ {
+ base.Init();
+ Transform transform = base.PanelObject.transform.Find("Bg");
+ this.m_closedSpr = (transform.Find("Close").GetComponent("XUISprite") as IXUISprite);
+ this.m_iconSpr = (transform.Find("Icon").GetComponent("XUISprite") as IXUISprite);
+ transform = transform.Find("SkillFrame").transform;
+ this.m_nameLab = (transform.Find("AttrName").GetComponent("XUILabel") as IXUILabel);
+ this.m_levelLab = (transform.Find("Level").GetComponent("XUILabel") as IXUILabel);
+ this.m_describeLab = (transform.Find("Describe").GetComponent("XUILabel") as IXUILabel);
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ this.m_closedSpr.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnClickClosedSpr));
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ this.FillContent();
+ }
+
+ protected override void OnHide()
+ {
+ base.OnHide();
+ }
+
+ public override void OnUnload()
+ {
+ base.OnUnload();
+ }
+
+ public override void RefreshData()
+ {
+ base.RefreshData();
+ }
+
+ public override void StackRefresh()
+ {
+ base.StackRefresh();
+ }
+
+ public void RefreshUI()
+ {
+ this.FillContent();
+ }
+
+ private void FillContent()
+ {
+ SystemAnnounce.RowData sysAnnounceData = XSingleton<XGameSysMgr>.singleton.GetSysAnnounceData(XSingleton<XAttributeMgr>.singleton.XPlayerData.Level);
+ bool flag = sysAnnounceData == null;
+ if (!flag)
+ {
+ this.m_iconSpr.SetSprite(sysAnnounceData.IconName);
+ this.m_nameLab.SetText(sysAnnounceData.SystemDescription);
+ this.m_levelLab.SetText(string.Format(XSingleton<XStringTable>.singleton.GetString("SKILL_LEARN"), sysAnnounceData.OpenAnnounceLevel));
+ StringBuilder stringBuilder = new StringBuilder();
+ for (int i = 0; i < sysAnnounceData.AnnounceDesc.Length; i++)
+ {
+ stringBuilder.Append(sysAnnounceData.AnnounceDesc[i]);
+ bool flag2 = i != sysAnnounceData.AnnounceDesc.Length - 1;
+ if (flag2)
+ {
+ stringBuilder.Append("{n}");
+ }
+ }
+ this.m_describeLab.SetText(XSingleton<UiUtility>.singleton.ReplaceReturn(stringBuilder.ToString()));
+ }
+ }
+
+ protected void OnClickClosedSpr(IXUISprite sp)
+ {
+ base.SetVisible(false);
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/XMISystemAnnounceHandler.cs.meta b/Client/Assets/Scripts/XMainClient/UI/XMISystemAnnounceHandler.cs.meta
new file mode 100644
index 00000000..7968b290
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XMISystemAnnounceHandler.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 542d7f87c3363ba49b5f9c0174709572
+timeCreated: 1611403714
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/XMainInterface.cs b/Client/Assets/Scripts/XMainClient/UI/XMainInterface.cs
new file mode 100644
index 00000000..0fed08bc
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XMainInterface.cs
@@ -0,0 +1,3026 @@
+using System;
+using System.Collections.Generic;
+using KKSG;
+using MiniJSON;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUpdater;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class XMainInterface : DlgBase<XMainInterface, XMainInterfaceBehaviour>
+ {
+ public XMainInterfaceDocument MainDoc
+ {
+ get
+ {
+ return this._main_doc;
+ }
+ }
+
+ public bool MenuSwitchBtnState
+ {
+ get
+ {
+ return this._MenuSwitchBtnState;
+ }
+ }
+
+ public override string fileName
+ {
+ get
+ {
+ return "Hall/HallDlg";
+ }
+ }
+
+ public override int layer
+ {
+ get
+ {
+ return 1;
+ }
+ }
+
+ public override bool isMainUI
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override bool autoload
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ private bool _bH1Opened;
+
+ private int _curPPT = 0;
+
+ private XAchievementDocument _achievement_doc = null;
+
+ private XMainInterfaceDocument _main_doc = null;
+
+ private IPlatform _platform = null;
+
+ private SceneType m_curScene;
+
+ private DateTime _fatigePressTime = DateTime.Now;
+
+ private uint _pressToken = 0u;
+
+ private uint _fatigeRefreshToken = 0u;
+
+ private DateTime _last_power_sound_time = DateTime.Now;
+
+ public XMainInterfaceBriefHandler _TaskNaviHandler;
+
+ public SkyArenaWaitHandler _WaitHandler;
+
+ public HomeHandler _HomeHandler;
+
+ public XYuyinView _yuyinHandler;
+
+ public WeddingSceneHandler _WeddingHandler;
+
+ public YorozuyaHandler _yorozuyaHandler;
+
+ public DanceMotionHandler _DanceMotionHandler;
+
+ public XMainSubstanceHandler _substanceHandler;
+
+ public float DramaDlgCloseTime = 0f;
+
+ private int _curExpInd = 0;
+
+ private int _maxExpCount = 4;
+
+ private XTimerMgr.ElapsedEventHandler _refreshFatigeTimeCb = null;
+
+ private XTimerMgr.ElapsedEventHandler _showFatigeRecoverTimeCb = null;
+
+ private GameCommunityHandler _GameCommunityHandler = null;
+
+ private bool _V3SwitchBtnState = false;
+
+ private bool _MenuSwitchBtnState = true;
+
+ private bool _H2SwitchBtnState = true;
+
+ public uint MulActTipsToken;
+
+ private int _MulActTipsCD;
+
+ private XLeftTimeCounter _LevelSealCDCounter = null;
+
+ private bool isLevelSealCountdown = false;
+
+ private float lastPingTime = -60f;
+
+ private float lastDebugUITrigger = -1f;
+
+ public bool fakeShow = true;
+
+ private XFx m_activityFx = null;
+
+ private bool m_isFromTime = false;
+
+ private float m_fClickTime = 0f;
+
+ private IXUIButton lastSelectV3Button = null;
+
+ public XMainInterface()
+ {
+ this._refreshFatigeTimeCb = new XTimerMgr.ElapsedEventHandler(this.RefreshFatigeTime);
+ this._showFatigeRecoverTimeCb = new XTimerMgr.ElapsedEventHandler(this.ShowFatigeRecoverTime);
+ }
+
+ protected override void Init()
+ {
+ this._platform = XSingleton<XUpdater.XUpdater>.singleton.XPlatform;
+ XPlayer player = XSingleton<XEntityMgr>.singleton.Player;
+ XPlayerAttributes xplayerAttributes = player.Attributes as XPlayerAttributes;
+ this._curPPT = (int)xplayerAttributes.GetAttr(XAttributeDefine.XAttr_POWER_POINT_Basic);
+ this._main_doc = XDocuments.GetSpecificDocument<XMainInterfaceDocument>(XMainInterfaceDocument.uuID);
+ this._main_doc.View = this;
+ this._achievement_doc = XDocuments.GetSpecificDocument<XAchievementDocument>(XAchievementDocument.uuID);
+ this._achievement_doc.HallMainView = this;
+ this.DramaDlgCloseTime = 0f;
+ DlgHandlerBase.EnsureCreate<XMainInterfaceBriefHandler>(ref this._TaskNaviHandler, base.uiBehaviour.m_TaskNaviFrame.transform, true, null);
+ this._MulActTipsCD = XSingleton<XGlobalConfig>.singleton.GetInt("MulActivityTipsCD");
+ this._V3SwitchBtnState = false;
+ this._MenuSwitchBtnState = true;
+ this._H2SwitchBtnState = true;
+ }
+
+ protected override void OnLoad()
+ {
+ DlgHandlerBase.EnsureCreate<HomeHandler>(ref this._HomeHandler, base.uiBehaviour.m_HomeGo.transform, true, null);
+ DlgHandlerBase.EnsureCreate<XYuyinView>(ref this._yuyinHandler, base.uiBehaviour.transform, true, this);
+ DlgHandlerBase.EnsureCreate<WeddingSceneHandler>(ref this._WeddingHandler, base.uiBehaviour.m_HomeGo.transform, true, null);
+ DlgHandlerBase.EnsureCreate<XMainSubstanceHandler>(ref this._substanceHandler, base.uiBehaviour.m_SysGrid, null, true);
+ DlgHandlerBase.EnsureCreate<YorozuyaHandler>(ref this._yorozuyaHandler, base.uiBehaviour.transform, true, null);
+ DlgHandlerBase.EnsureCreate<DanceMotionHandler>(ref this._DanceMotionHandler, base.uiBehaviour.m_DanceMotion, null, false);
+ bool flag = XSingleton<XScene>.singleton.SceneType == SceneType.SKYCITY_WAITING || XSingleton<XScene>.singleton.SceneType == SceneType.SCENE_HORSE || XSingleton<XScene>.singleton.SceneType == SceneType.SCENE_BATTLEFIELD_READY || XSingleton<XScene>.singleton.SceneType == SceneType.SCENE_BIGMELEE_READY;
+ if (flag)
+ {
+ DlgHandlerBase.EnsureCreate<SkyArenaWaitHandler>(ref this._WaitHandler, base.uiBehaviour.m_Canvas, true, this);
+ }
+ }
+
+ protected override void OnUnload()
+ {
+ this._LevelSealCDCounter = null;
+ this.m_uiBehaviour.m_txtAvatar.SetTexturePath("");
+ XBigMeleeEntranceDocument specificDocument = XDocuments.GetSpecificDocument<XBigMeleeEntranceDocument>(XBigMeleeEntranceDocument.uuID);
+ DlgHandlerBase.EnsureUnload<BigMeleeRankHandler>(ref specificDocument.RankHandler);
+ DlgHandlerBase.EnsureUnload<HomeHandler>(ref this._HomeHandler);
+ DlgHandlerBase.EnsureUnload<WeddingSceneHandler>(ref this._WeddingHandler);
+ DlgHandlerBase.EnsureUnload<XMainInterfaceBriefHandler>(ref this._TaskNaviHandler);
+ DlgHandlerBase.EnsureUnload<SkyArenaWaitHandler>(ref this._WaitHandler);
+ DlgHandlerBase.EnsureUnload<XYuyinView>(ref this._yuyinHandler);
+ DlgHandlerBase.EnsureUnload<GameCommunityHandler>(ref this._GameCommunityHandler);
+ DlgHandlerBase.EnsureUnload<XMainSubstanceHandler>(ref this._substanceHandler);
+ DlgHandlerBase.EnsureUnload<YorozuyaHandler>(ref this._yorozuyaHandler);
+ DlgHandlerBase.EnsureUnload<DanceMotionHandler>(ref this._DanceMotionHandler);
+ this._main_doc.View = null;
+ XSingleton<XGameSysMgr>.singleton.Reset();
+ this._MenuSwitchBtnState = true;
+ XSingleton<XTimerMgr>.singleton.KillTimer(this.MulActTipsToken);
+ bool flag = this.m_activityFx != null;
+ if (flag)
+ {
+ XSingleton<XFxMgr>.singleton.DestroyFx(this.m_activityFx, true);
+ this.m_activityFx = null;
+ }
+ base.OnUnload();
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ this.lastPingTime = -60f;
+ this._SetSceneUI();
+ this._main_doc.Present();
+ this.lastSelectV3Button = null;
+ XPlatformAbilityDocument.Doc.QueryQQVipInfo();
+ DlgBase<XChatSmallView, XChatSmallBehaviour>.singleton.ShowChatDefaultMiniUI();
+ bool flag = !DlgBase<XChatSmallView, XChatSmallBehaviour>.singleton.IsInited;
+ if (flag)
+ {
+ DlgBase<XChatSmallView, XChatSmallBehaviour>.singleton.ShowPanel(false);
+ }
+ DlgBase<BroadMiniDlg, BroadcastMiniBehaviour>.singleton.Show(true);
+ DlgBase<RadioDlg, RadioBehaviour>.singleton.Show(true);
+ XFriendsDocument specificDocument = XDocuments.GetSpecificDocument<XFriendsDocument>(XFriendsDocument.uuID);
+ specificDocument.ReqFriendsInfo();
+ this.RefreshSysAnnounce();
+ base.uiBehaviour.m_RecoverTime.SetVisible(false);
+ XSingleton<XChatIFlyMgr>.singleton.InitFlyMgr();
+ XSingleton<XScreenShotMgr>.singleton.Init();
+ this._InitH5();
+ this.HandlerYuyin();
+ this.RefreshMoneyInfo(0, false);
+ this.CalMenuSwitchBtnRedPointState();
+ this.CalH2SwitchBtnRedPointState(null);
+ this._main_doc.OnLoadWebViewConfig();
+ XDanceDocument.Doc.GetAllDanceIDs();
+ this.SetActivityEffect(false);
+ }
+
+ private void _InitH5()
+ {
+ foreach (XSysDefine sys in XSingleton<XGameSysMgr>.singleton.SysH5)
+ {
+ this.RefreshH5ButtonState(sys, false);
+ }
+ bool flag = this._substanceHandler != null && this._substanceHandler.IsVisible();
+ if (flag)
+ {
+ this._substanceHandler.Sort();
+ }
+ XSpectateDocument specificDocument = XDocuments.GetSpecificDocument<XSpectateDocument>(XSpectateDocument.uuID);
+ this.ShowLiveCount(specificDocument.LiveCount);
+ this.InitSevenLoginWhenShow();
+ }
+
+ protected override void OnSetVisiblePure(bool bShow)
+ {
+ base.OnSetVisiblePure(bShow);
+ if (bShow)
+ {
+ this._InitH5();
+ this.RefreshMoneyInfo(0, false);
+ bool flag = DlgBase<XMainInterface, XMainInterfaceBehaviour>.singleton._TaskNaviHandler.TaskHandler.IsVisible();
+ if (flag)
+ {
+ DlgBase<XMainInterface, XMainInterfaceBehaviour>.singleton._TaskNaviHandler.TaskHandler.RefreshData();
+ }
+ }
+ }
+
+ private void HandlerYuyin()
+ {
+ YuyinIconType type = YuyinIconType.Hall;
+ SceneType sceneType = XSingleton<XScene>.singleton.SceneType;
+ if (sceneType <= SceneType.SCENE_GUILD_HALL)
+ {
+ if (sceneType != SceneType.SCENE_HALL)
+ {
+ if (sceneType == SceneType.SCENE_GUILD_HALL)
+ {
+ type = YuyinIconType.Guild;
+ }
+ }
+ else
+ {
+ type = YuyinIconType.Hall;
+ }
+ }
+ else if (sceneType != SceneType.SCENE_FAMILYGARDEN)
+ {
+ if (sceneType == SceneType.SCENE_LEISURE)
+ {
+ type = YuyinIconType.LEISURE;
+ }
+ }
+ else
+ {
+ type = YuyinIconType.HOME;
+ }
+ bool flag = this._yuyinHandler != null;
+ if (flag)
+ {
+ this._yuyinHandler.Refresh(type);
+ bool flag2 = this._yuyinHandler.m_panel != null && this._yuyinHandler.m_panel.gameObject != null;
+ if (flag2)
+ {
+ this._yuyinHandler.m_panel.gameObject.SetActive(this.fakeShow);
+ }
+ }
+ }
+
+ protected override void OnHide()
+ {
+ base.OnHide();
+ DlgBase<XChatSmallView, XChatSmallBehaviour>.singleton.SetVisible(false, true);
+ DlgBase<BroadMiniDlg, BroadcastMiniBehaviour>.singleton.Show(false);
+ DlgBase<RadioDlg, RadioBehaviour>.singleton.Show(false);
+ this._LevelSealCDCounter = null;
+ }
+
+ private void _SetSceneUI()
+ {
+ this.m_curScene = XSingleton<XScene>.singleton.SceneType;
+ this._yorozuyaHandler.SetVisible(false);
+ SceneType curScene = this.m_curScene;
+ if (curScene <= SceneType.SKYCITY_WAITING)
+ {
+ if (curScene <= SceneType.SCENE_GUILD_HALL)
+ {
+ if (curScene == SceneType.SCENE_HALL)
+ {
+ this.SetHallUi();
+ this._bH1Opened = true;
+ return;
+ }
+ if (curScene != SceneType.SCENE_GUILD_HALL)
+ {
+ goto IL_D8;
+ }
+ this.SetGuildHallUi();
+ this._bH1Opened = false;
+ return;
+ }
+ else
+ {
+ if (curScene == SceneType.SCENE_FAMILYGARDEN)
+ {
+ this.SetHomeUi();
+ this._bH1Opened = true;
+ return;
+ }
+ if (curScene != SceneType.SKYCITY_WAITING)
+ {
+ goto IL_D8;
+ }
+ }
+ }
+ else if (curScene <= SceneType.SCENE_BIGMELEE_READY)
+ {
+ if (curScene != SceneType.SCENE_HORSE && curScene != SceneType.SCENE_BIGMELEE_READY)
+ {
+ goto IL_D8;
+ }
+ }
+ else
+ {
+ if (curScene == SceneType.SCENE_WEDDING)
+ {
+ this.SetWeddingUI();
+ this._bH1Opened = true;
+ return;
+ }
+ if (curScene != SceneType.SCENE_BATTLEFIELD_READY)
+ {
+ if (curScene != SceneType.SCENE_LEISURE)
+ {
+ goto IL_D8;
+ }
+ this.SetLeisureUi();
+ this._bH1Opened = true;
+ return;
+ }
+ }
+ this.SetWaitingUi();
+ this._bH1Opened = true;
+ return;
+ IL_D8:
+ this.SetHallUi();
+ }
+
+ private void SetHallUi()
+ {
+ this._TaskNaviHandler.SetVisible(true);
+ base.uiBehaviour.m_SysListH1.SetVisible(true);
+ base.uiBehaviour.m_SysListH0.SetVisible(true);
+ base.uiBehaviour.m_SysListV1.SetVisible(true);
+ base.uiBehaviour.m_SecondMenu.SetActive(true);
+ this._substanceHandler.SetVisible(true);
+ base.uiBehaviour.m_MenuSwitchBtn.SetVisible(true);
+ this._WeddingHandler.SetVisible(false);
+ this._HomeHandler.SetVisible(false);
+ base.uiBehaviour.m_SysListH3.SetVisible(false);
+ base.uiBehaviour.m_ExitGuild.SetVisible(false);
+ base.uiBehaviour.m_SysListGuildH1.SetVisible(false);
+ base.uiBehaviour.m_SysListGuildV1.SetVisible(false);
+ base.uiBehaviour.m_SysListGuildH2.SetVisible(false);
+ this.OnMainSysChange();
+ }
+
+ private void SetGuildHallUi()
+ {
+ this._WeddingHandler.SetVisible(false);
+ this._HomeHandler.SetVisible(false);
+ this._TaskNaviHandler.SetVisible(false);
+ base.uiBehaviour.m_SysListH3.SetVisible(false);
+ base.uiBehaviour.m_SysListH1.SetVisible(true);
+ base.uiBehaviour.m_SysListH0.SetVisible(false);
+ base.uiBehaviour.m_SysListV1.SetVisible(false);
+ base.uiBehaviour.m_SecondMenu.SetActive(false);
+ this._substanceHandler.SetVisible(true);
+ base.uiBehaviour.m_MenuSwitchBtn.SetVisible(true);
+ base.uiBehaviour.m_ExitGuild.SetVisible(true);
+ base.uiBehaviour.m_SysListGuildH1.SetVisible(true);
+ base.uiBehaviour.m_SysListGuildV1.SetVisible(true);
+ base.uiBehaviour.m_SysListGuildH2.SetVisible(true);
+ base.uiBehaviour.m_SysListH0.CloseList();
+ base.uiBehaviour.m_SysListH3.CloseList();
+ this._ShowGuildMenu();
+ this.RefreshV3H1OnOtherScene();
+ bool menuSwitchBtnState = this._MenuSwitchBtnState;
+ if (menuSwitchBtnState)
+ {
+ this.OnMenuSwitchBtnClick(null);
+ }
+ }
+
+ private void SetWaitingUi()
+ {
+ this._WeddingHandler.SetVisible(false);
+ this._HomeHandler.SetVisible(false);
+ base.uiBehaviour.m_SysListH3.SetVisible(false);
+ base.uiBehaviour.m_SysListV1.SetVisible(false);
+ base.uiBehaviour.m_SecondMenu.SetActive(false);
+ base.uiBehaviour.m_ExitGuild.SetVisible(false);
+ this._substanceHandler.SetVisible(false);
+ base.uiBehaviour.m_SysListGuildH1.SetVisible(false);
+ base.uiBehaviour.m_SysListGuildV1.SetVisible(false);
+ base.uiBehaviour.m_SysListGuildH2.SetVisible(false);
+ XTeamDocument specificDocument = XDocuments.GetSpecificDocument<XTeamDocument>(XTeamDocument.uuID);
+ bool flag = XSingleton<XScene>.singleton.SceneType == SceneType.SKYCITY_WAITING;
+ if (flag)
+ {
+ this._TaskNaviHandler.SetVisible(specificDocument.bInTeam);
+ }
+ bool flag2 = XSingleton<XScene>.singleton.SceneType == SceneType.SCENE_HORSE || XSingleton<XScene>.singleton.SceneType == SceneType.SCENE_BIGMELEE_READY || XSingleton<XScene>.singleton.SceneType == SceneType.SCENE_BATTLEFIELD_READY;
+ if (flag2)
+ {
+ this._TaskNaviHandler.SetVisible(false);
+ }
+ bool flag3 = XSingleton<XScene>.singleton.SceneType == SceneType.SCENE_BIGMELEE_READY;
+ if (flag3)
+ {
+ base.uiBehaviour.m_SysListH1.SetVisible(false);
+ base.uiBehaviour.m_SysListH0.SetVisible(false);
+ base.uiBehaviour.m_MenuSwitchBtn.SetVisible(false);
+ }
+ else
+ {
+ base.uiBehaviour.m_SysListH1.SetVisible(true);
+ base.uiBehaviour.m_SysListH0.SetVisible(true);
+ base.uiBehaviour.m_MenuSwitchBtn.SetVisible(true);
+ }
+ this.RefreshV3H1OnOtherScene();
+ }
+
+ private void SetHomeUi()
+ {
+ this._HomeHandler.SetVisible(true);
+ this.BottomDownBtns(true);
+ this._WeddingHandler.SetVisible(false);
+ this._TaskNaviHandler.SetVisible(false);
+ base.uiBehaviour.m_ExitGuild.SetVisible(false);
+ base.uiBehaviour.m_SysListH0.SetVisible(false);
+ this._substanceHandler.SetVisible(false);
+ base.uiBehaviour.m_SysListV1.SetVisible(false);
+ base.uiBehaviour.m_SecondMenu.SetActive(false);
+ base.uiBehaviour.m_SysListGuildH1.SetVisible(false);
+ base.uiBehaviour.m_SysListGuildV1.SetVisible(false);
+ base.uiBehaviour.m_SysListGuildH2.SetVisible(false);
+ bool menuSwitchBtnState = this._MenuSwitchBtnState;
+ if (menuSwitchBtnState)
+ {
+ this.OnMenuSwitchBtnClick(null);
+ }
+ this.OnMainSysChange();
+ }
+
+ private void SetWeddingUI()
+ {
+ this._WeddingHandler.SetVisible(true);
+ base.uiBehaviour.m_V3SwitchBtn.SetVisible(true);
+ base.uiBehaviour.m_SysListV3.SetVisible(true);
+ this._HomeHandler.SetVisible(false);
+ this._TaskNaviHandler.SetVisible(false);
+ base.uiBehaviour.m_ExitGuild.SetVisible(false);
+ base.uiBehaviour.m_SysListV1.SetVisible(false);
+ base.uiBehaviour.m_SecondMenu.SetActive(false);
+ this._substanceHandler.SetVisible(false);
+ base.uiBehaviour.m_SysListGuildH1.SetVisible(false);
+ base.uiBehaviour.m_SysListGuildV1.SetVisible(false);
+ base.uiBehaviour.m_SysListGuildH2.SetVisible(false);
+ base.uiBehaviour.m_SysListH3.SetVisible(false);
+ base.uiBehaviour.m_SysListH1.SetVisible(false);
+ base.uiBehaviour.m_MenuSwitchBtn.SetVisible(false);
+ this.OnMainSysChange();
+ }
+
+ private void SetLeisureUi()
+ {
+ this._yorozuyaHandler.SetVisible(true);
+ this._WeddingHandler.SetVisible(false);
+ base.uiBehaviour.m_V3SwitchBtn.SetVisible(false);
+ base.uiBehaviour.m_SysListV3.SetVisible(false);
+ this._HomeHandler.SetVisible(false);
+ this._TaskNaviHandler.SetVisible(false);
+ base.uiBehaviour.m_ExitGuild.SetVisible(false);
+ base.uiBehaviour.m_SysListV1.SetVisible(false);
+ base.uiBehaviour.m_SecondMenu.SetActive(false);
+ this._substanceHandler.SetVisible(false);
+ base.uiBehaviour.m_SysListGuildH1.SetVisible(false);
+ base.uiBehaviour.m_SysListGuildV1.SetVisible(false);
+ base.uiBehaviour.m_SysListGuildH2.SetVisible(false);
+ base.uiBehaviour.m_SysListH3.SetVisible(false);
+ base.uiBehaviour.m_SysListH1.SetVisible(false);
+ base.uiBehaviour.m_MenuSwitchBtn.SetVisible(false);
+ }
+
+ public void BottomDownBtns(bool visible)
+ {
+ base.uiBehaviour.m_V3SwitchBtn.SetVisible(visible);
+ base.uiBehaviour.m_SysListV3.SetVisible(visible);
+ base.uiBehaviour.m_SysListH3.SetVisible(visible);
+ base.uiBehaviour.m_SysListH1.SetVisible(visible);
+ base.uiBehaviour.m_MenuSwitchBtn.SetVisible(visible);
+ }
+
+ public override void RegisterEvent()
+ {
+ base.uiBehaviour.m_MenuSwitchBtn.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnMenuSwitchBtnClick));
+ base.uiBehaviour.m_H2SwitchBtn.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnH2SwitchBtnClick));
+ base.uiBehaviour.m_H2ListTween.RegisterOnFinishEventHandler(new OnTweenFinishEventHandler(this.CalH2SwitchBtnRedPointState));
+ base.uiBehaviour.m_PlayerAvatar.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnAvatarClick));
+ for (int i = 0; i < base.uiBehaviour.m_SysButtonsMapping.Length; i++)
+ {
+ IXUIButton ixuibutton = base.uiBehaviour.m_SysButtonsMapping[i];
+ bool flag = ixuibutton != null;
+ if (flag)
+ {
+ ixuibutton.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnSysIconClicked));
+ }
+ }
+ base.uiBehaviour.m_ExitGuild.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnExitGuildClick));
+ base.uiBehaviour.m_V3SwitchBtn.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnV3SwitchBtnClick));
+ base.uiBehaviour.m_MotionDance.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnMotionClicked));
+ base.uiBehaviour.m_MotionLover.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnMotionClicked));
+ }
+
+ public override void OnUpdate()
+ {
+ bool flag = !XSingleton<XTimerMgr>.singleton.NeedFixedUpdate;
+ if (!flag)
+ {
+ base.OnUpdate();
+ bool flag2 = this.isLevelSealCountdown && this._LevelSealCDCounter != null;
+ if (flag2)
+ {
+ this._LevelSealCDCounter.Update();
+ }
+ bool v3SwitchBtnState = this._V3SwitchBtnState;
+ if (v3SwitchBtnState)
+ {
+ base.uiBehaviour.m_TransformLeftTime.Update();
+ }
+ bool flag3 = this.lastDebugUITrigger > 0f;
+ if (flag3)
+ {
+ this.lastDebugUITrigger -= Time.deltaTime;
+ }
+ bool flag4 = this.lastDebugUITrigger <= 0f && Input.GetKey((KeyCode)285);
+ if (flag4)
+ {
+ DlgBase<DemoUI, DemoUIBehaviour>.singleton.Toggle();
+ this.lastDebugUITrigger = 0.05f;
+ }
+ bool key = Input.GetKey((KeyCode)96);
+ if (key)
+ {
+ bool flag5 = Input.GetKey((KeyCode)256) || Input.GetKey((KeyCode)48);
+ if (flag5)
+ {
+ XSingleton<XCommand>.singleton.CustomCommand(0);
+ }
+ bool flag6 = Input.GetKey((KeyCode)257) || Input.GetKey((KeyCode)49);
+ if (flag6)
+ {
+ XSingleton<XCommand>.singleton.CustomCommand(1);
+ }
+ bool flag7 = Input.GetKey((KeyCode)258) || Input.GetKey((KeyCode)50);
+ if (flag7)
+ {
+ XSingleton<XCommand>.singleton.CustomCommand(2);
+ }
+ bool flag8 = Input.GetKey((KeyCode)259) || Input.GetKey((KeyCode)51);
+ if (flag8)
+ {
+ XSingleton<XCommand>.singleton.CustomCommand(3);
+ }
+ bool flag9 = Input.GetKey((KeyCode)260) || Input.GetKey((KeyCode)52);
+ if (flag9)
+ {
+ XSingleton<XCommand>.singleton.CustomCommand(4);
+ }
+ bool flag10 = Input.GetKey((KeyCode)261) || Input.GetKey((KeyCode)53);
+ if (flag10)
+ {
+ XSingleton<XCommand>.singleton.CustomCommand(5);
+ }
+ bool flag11 = Input.GetKey((KeyCode)262) || Input.GetKey((KeyCode)54);
+ if (flag11)
+ {
+ XSingleton<XCommand>.singleton.CustomCommand(6);
+ }
+ bool flag12 = Input.GetKey((KeyCode)263) || Input.GetKey((KeyCode)55);
+ if (flag12)
+ {
+ XSingleton<XCommand>.singleton.CustomCommand(7);
+ }
+ bool flag13 = Input.GetKey((KeyCode)264) || Input.GetKey((KeyCode)56);
+ if (flag13)
+ {
+ XSingleton<XCommand>.singleton.CustomCommand(8);
+ }
+ bool flag14 = Input.GetKey((KeyCode)265) || Input.GetKey((KeyCode)57);
+ if (flag14)
+ {
+ XSingleton<XCommand>.singleton.CustomCommand(9);
+ }
+ }
+ this.UpdateRedPointState();
+ this.UpdateWifi();
+ bool flag15 = Time.unscaledTime - this.lastPingTime > 60f || this.lastPingTime < 0f;
+ if (flag15)
+ {
+ this.lastPingTime = Time.unscaledTime;
+ this.RefreshPing();
+ }
+ }
+ }
+
+ public void RefreshMoneyInfo(int itemid = 0, bool bAnim = false)
+ {
+ for (int i = 0; i < this.m_uiBehaviour.m_MoneyList.Count; i++)
+ {
+ bool flag = itemid == 0 || this.m_uiBehaviour.m_MoneyList[i].ItemID == itemid;
+ if (flag)
+ {
+ this.m_uiBehaviour.m_MoneyList[i].RefreshValue(bAnim);
+ bool flag2 = itemid != 0;
+ if (flag2)
+ {
+ break;
+ }
+ }
+ }
+ }
+
+ public void UpdateRedPointState()
+ {
+ }
+
+ private void UpdateWifi()
+ {
+ IXUIButton sysButton = this.m_uiBehaviour.GetSysButton(XSysDefine.XSys_Wifi);
+ bool flag = sysButton != null;
+ if (flag)
+ {
+ XSingleton<UiUtility>.singleton.UpdateWifi(sysButton, null);
+ }
+ }
+
+ private void _ShowGuildMenu()
+ {
+ foreach (XSysDefine sys in base.uiBehaviour.m_SysGuild)
+ {
+ base.uiBehaviour.GetSysButton(sys).SetVisible(true);
+ }
+ this.OnGuildSysChange();
+ base.uiBehaviour.m_SysListGuildH1.SetAnimateSmooth(true);
+ base.uiBehaviour.m_SysListGuildV1.SetAnimateSmooth(true);
+ base.uiBehaviour.m_SysListGuildH2.SetAnimateSmooth(true);
+ base.uiBehaviour.m_SysListGuildH1.Refresh();
+ base.uiBehaviour.m_SysListGuildV1.Refresh();
+ base.uiBehaviour.m_SysListGuildH2.Refresh();
+ }
+
+ public void RefreshSysAnnounce()
+ {
+ bool flag = XSingleton<XScene>.singleton.SceneType != SceneType.SKYCITY_WAITING;
+ if (flag)
+ {
+ bool flag2 = DlgBase<AnnounceView, AnnounceBehaviour>.singleton.IsVisible();
+ if (flag2)
+ {
+ DlgBase<AnnounceView, AnnounceBehaviour>.singleton.RefreshUI();
+ }
+ }
+ }
+
+ public void RefreshWelcomeBackFlow()
+ {
+ bool flag = this.MainDoc.BackFlow && XSingleton<XScene>.singleton.SceneType == SceneType.SCENE_HALL;
+ if (flag)
+ {
+ this.OnShowFlowBack();
+ }
+ }
+
+ public void OnGuildSysChange()
+ {
+ XGuildDocument specificDocument = XDocuments.GetSpecificDocument<XGuildDocument>(XGuildDocument.uuID);
+ foreach (XSysDefine sys in base.uiBehaviour.m_SysGuild)
+ {
+ uint unlockLevel = XGuildDocument.GuildConfig.GetUnlockLevel(sys);
+ IXUIButton sysButton = base.uiBehaviour.GetSysButton(sys);
+ Transform transform = sysButton.gameObject.transform.Find("OpenAtLevel");
+ IXUILabel ixuilabel = null;
+ IXUISprite ixuisprite = sysButton.gameObject.GetComponent("XUISprite") as IXUISprite;
+ bool flag = transform != null;
+ if (flag)
+ {
+ ixuilabel = (transform.GetComponent("XUILabel") as IXUILabel);
+ ixuilabel.SetText(string.Empty);
+ }
+ bool flag2 = specificDocument.bInGuild && specificDocument.Level >= unlockLevel && XSingleton<XGameSysMgr>.singleton.IsSystemOpened(sys);
+ if (flag2)
+ {
+ try
+ {
+ bool flag3 = ixuisprite != null;
+ if (flag3)
+ {
+ ixuisprite.SetColor(Color.white);
+ }
+ bool flag4 = ixuilabel != null;
+ if (flag4)
+ {
+ ixuilabel.SetVisible(false);
+ }
+ }
+ catch (Exception ex)
+ {
+ XSingleton<XDebug>.singleton.AddErrorLog(sysButton.gameObject.name, null, null, null, null, null);
+ XSingleton<XDebug>.singleton.AddErrorLog(ex.Message, null, null, null, null, null);
+ }
+ }
+ else
+ {
+ bool flag5 = ixuilabel != null;
+ if (flag5)
+ {
+ ixuilabel.SetVisible(true);
+ }
+ }
+ }
+ foreach (XSysDefine xsysDefine in base.uiBehaviour.m_SysGuildNormal)
+ {
+ IXUIButton sysButton2 = base.uiBehaviour.GetSysButton(xsysDefine);
+ bool flag6 = XSingleton<XGameSysMgr>.singleton.IsSystemOpened(xsysDefine);
+ XSysDefine xsysDefine2 = xsysDefine;
+ if (xsysDefine2 == XSysDefine.XSys_GuildCollect || xsysDefine2 == XSysDefine.XSys_GuildCollectSummon)
+ {
+ XGuildCollectDocument specificDocument2 = XDocuments.GetSpecificDocument<XGuildCollectDocument>(XGuildCollectDocument.uuID);
+ flag6 = (flag6 && specificDocument2.ActivityState);
+ }
+ base.uiBehaviour.GetSysButton(xsysDefine).SetVisible(flag6);
+ }
+ base.uiBehaviour.m_SysListH2.Refresh();
+ }
+
+ public void OnTitanSysChange()
+ {
+ XPlayerAttributes attr = XSingleton<XEntityMgr>.singleton.Player.Attributes as XPlayerAttributes;
+ bool flag = XSingleton<UIManager>.singleton.IsUIShowed();
+ int num = 0;
+ for (int i = 0; i < base.uiBehaviour.m_SysH4.Length; i++)
+ {
+ XSysDefine xsysDefine = base.uiBehaviour.m_SysH4[i];
+ bool flag2 = XSingleton<XGameSysMgr>.singleton.IsSystemOpened(xsysDefine, attr);
+ bool flag3 = flag;
+ if (flag3)
+ {
+ XSysDefine xsysDefine2 = xsysDefine;
+ if (xsysDefine2 == XSysDefine.XSys_Mail || xsysDefine2 == XSysDefine.XSys_Setting)
+ {
+ flag2 = false;
+ }
+ }
+ IXUIButton sysButton = base.uiBehaviour.GetSysButton(xsysDefine);
+ sysButton.SetVisible(flag2);
+ bool flag4 = flag2;
+ if (flag4)
+ {
+ num++;
+ }
+ }
+ }
+
+ public void OnMainSysChange()
+ {
+ bool flag = !base.IsLoaded();
+ if (!flag)
+ {
+ for (int i = 0; i < base.uiBehaviour.m_ListSys.Count; i++)
+ {
+ XSysDefine xsysDefine = base.uiBehaviour.m_ListSys[i];
+ bool flag2 = XSingleton<XGameSysMgr>.singleton.SysH5.Contains(xsysDefine);
+ if (!flag2)
+ {
+ bool flag3 = base.uiBehaviour.m_SysGuildNormal.Contains(xsysDefine);
+ if (!flag3)
+ {
+ this.OnSingleSysChange(xsysDefine, false);
+ }
+ }
+ }
+ this.RefreshAllList();
+ }
+ }
+
+ public void OnSingleSysChange(XSysDefine sys, bool refreshList = true)
+ {
+ bool flag = !base.IsLoaded();
+ if (!flag)
+ {
+ bool flag2 = base.uiBehaviour.GetSysButton(sys) == null;
+ if (!flag2)
+ {
+ bool flag3 = XSingleton<XGameSysMgr>.singleton.IsSystemOpened(sys, XSingleton<XAttributeMgr>.singleton.XPlayerData);
+ if (sys <= XSysDefine.XSys_Welfare_NiceGirl)
+ {
+ if (sys <= XSysDefine.XSys_OnlineReward)
+ {
+ if (sys != XSysDefine.XSys_Guild)
+ {
+ if (sys == XSysDefine.XSys_OnlineReward)
+ {
+ XOnlineRewardDocument specificDocument = XDocuments.GetSpecificDocument<XOnlineRewardDocument>(XOnlineRewardDocument.uuID);
+ flag3 = (flag3 && specificDocument.CheckOver());
+ }
+ }
+ else
+ {
+ flag3 = (flag3 && this.m_curScene != SceneType.SCENE_GUILD_HALL);
+ }
+ }
+ else if (sys != XSysDefine.XSys_Broadcast)
+ {
+ if (sys != XSysDefine.XSys_SevenActivity)
+ {
+ if (sys == XSysDefine.XSys_Welfare_NiceGirl)
+ {
+ flag3 = (flag3 && XWelfareDocument.Doc.ArgentaMainInterfaceState && !XWelfareDocument.Doc.IsNiceGirlTasksFinished());
+ }
+ }
+ else
+ {
+ XSevenLoginDocument specificDocument2 = XDocuments.GetSpecificDocument<XSevenLoginDocument>(XSevenLoginDocument.uuID);
+ flag3 = (flag3 && specificDocument2.bHasAvailableSevenIcon);
+ }
+ }
+ else
+ {
+ flag3 = (flag3 && XSingleton<XLoginDocument>.singleton.Channel == XAuthorizationChannel.XAuthorization_QQ && this.IsSupportQgame());
+ }
+ }
+ else if (sys <= XSysDefine.XSys_Photo)
+ {
+ if (sys != XSysDefine.XSys_OperatingActivity)
+ {
+ if (sys != XSysDefine.XSys_ThemeActivity)
+ {
+ if (sys == XSysDefine.XSys_Photo)
+ {
+ int num = int.Parse(XSingleton<XGlobalConfig>.singleton.GetValue("PlatfromAbility"));
+ flag3 = (num != 0 && this.m_curScene != SceneType.SCENE_HORSE_RACE && this.m_curScene != SceneType.SCENE_HORSE && this.m_curScene != SceneType.SCENE_HEROBATTLE && this.m_curScene != SceneType.SCENE_BIGMELEE_READY);
+ bool flag4 = flag3;
+ if (flag4)
+ {
+ flag3 = XSingleton<XGameSysMgr>.singleton.IsSystemOpened(XSysDefine.XSys_Photo);
+ }
+ }
+ }
+ else
+ {
+ XThemeActivityDocument specificDocument3 = XDocuments.GetSpecificDocument<XThemeActivityDocument>(XThemeActivityDocument.uuID);
+ flag3 = (flag3 && specificDocument3.isHasHallIcon());
+ }
+ }
+ else
+ {
+ bool flag5 = XDocuments.GetSpecificDocument<XLevelSealDocument>(XLevelSealDocument.uuID).IsShowLevelSealIcon();
+ base.uiBehaviour.m_RemoveSealTip.SetVisible(flag5);
+ bool flag6 = flag5;
+ if (flag6)
+ {
+ this.ShowRemoveSealLeftTime(base.uiBehaviour.m_RemoveSealTip, ref this._LevelSealCDCounter, ref this.isLevelSealCountdown);
+ }
+ else
+ {
+ this._LevelSealCDCounter = null;
+ }
+ }
+ }
+ else if (sys != XSysDefine.XSys_QuickRide)
+ {
+ switch (sys)
+ {
+ case XSysDefine.XSys_GameCommunity:
+ break;
+ case XSysDefine.XSys_GameHorde:
+ break;
+ case XSysDefine.XSys_FriendCircle:
+ flag3 = (flag3 && XSingleton<XLoginDocument>.singleton.Channel == XAuthorizationChannel.XAuthorization_WeChat);
+ break;
+ case XSysDefine.XSys_QQVIP:
+ flag3 = (flag3 && XSingleton<XLoginDocument>.singleton.Channel == XAuthorizationChannel.XAuthorization_QQ);
+ break;
+ case XSysDefine.XSys_SystemAnnounce:
+ flag3 = (flag3 && this.SetSystemAnnounce());
+ break;
+ default:
+ if (sys == XSysDefine.XSys_Platform_StartPrivilege)
+ {
+ flag3 = (flag3 && (XSingleton<XLoginDocument>.singleton.Channel == XAuthorizationChannel.XAuthorization_WeChat || XSingleton<XLoginDocument>.singleton.Channel == XAuthorizationChannel.XAuthorization_QQ));
+ bool flag7 = flag3;
+ if (flag7)
+ {
+ IXUIButton sysButton = base.uiBehaviour.GetSysButton(XSysDefine.XSys_Platform_StartPrivilege);
+ bool flag8 = sysButton != null;
+ if (flag8)
+ {
+ Transform transform = sysButton.gameObject.transform.Find("seal");
+ bool flag9 = transform != null;
+ if (flag9)
+ {
+ IXUISprite ixuisprite = transform.gameObject.GetComponent("XUISprite") as IXUISprite;
+ bool flag10 = ixuisprite != null;
+ if (flag10)
+ {
+ bool flag11 = XSingleton<XLoginDocument>.singleton.Channel == XAuthorizationChannel.XAuthorization_WeChat;
+ if (flag11)
+ {
+ ixuisprite.spriteName = "ptic_04";
+ }
+ else
+ {
+ bool flag12 = XSingleton<XLoginDocument>.singleton.Channel == XAuthorizationChannel.XAuthorization_QQ;
+ if (flag12)
+ {
+ ixuisprite.spriteName = "ptic_05";
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ break;
+ }
+ }
+ else
+ {
+ flag3 = (flag3 && this.m_curScene != SceneType.SCENE_FAMILYGARDEN && this.m_curScene != SceneType.SCENE_GUILD_HALL && this.m_curScene != SceneType.SCENE_WEDDING && this.m_curScene != SceneType.SCENE_LEISURE);
+ }
+ base.uiBehaviour.GetSysButton(sys).SetVisible(flag3);
+ if (refreshList)
+ {
+ this.RefreshAllList();
+ }
+ }
+ }
+ }
+
+ public void RefreshAllList()
+ {
+ SceneType curScene = this.m_curScene;
+ if (curScene <= SceneType.SKYCITY_WAITING)
+ {
+ if (curScene <= SceneType.SCENE_GUILD_HALL)
+ {
+ if (curScene != SceneType.SCENE_HALL)
+ {
+ if (curScene != SceneType.SCENE_GUILD_HALL)
+ {
+ goto IL_CF;
+ }
+ base.uiBehaviour.m_SysListH2.Refresh();
+ base.uiBehaviour.m_SysListH1.Refresh();
+ goto IL_CF;
+ }
+ }
+ else
+ {
+ if (curScene == SceneType.SCENE_FAMILYGARDEN)
+ {
+ base.uiBehaviour.m_SysListH1.Refresh();
+ base.uiBehaviour.m_SysListH3.Refresh();
+ goto IL_CF;
+ }
+ if (curScene != SceneType.SKYCITY_WAITING)
+ {
+ goto IL_CF;
+ }
+ }
+ }
+ else
+ {
+ if (curScene > SceneType.SCENE_BIGMELEE_READY)
+ {
+ if (curScene != SceneType.SCENE_WEDDING)
+ {
+ if (curScene == SceneType.SCENE_BATTLEFIELD_READY)
+ {
+ goto IL_5E;
+ }
+ if (curScene != SceneType.SCENE_LEISURE)
+ {
+ goto IL_CF;
+ }
+ }
+ return;
+ }
+ if (curScene != SceneType.SCENE_HORSE && curScene != SceneType.SCENE_BIGMELEE_READY)
+ {
+ goto IL_CF;
+ }
+ }
+ IL_5E:
+ base.uiBehaviour.m_SysListH1.Refresh();
+ base.uiBehaviour.m_SysListH0.Refresh();
+ IL_CF:
+ base.uiBehaviour.m_SysListV1.Refresh();
+ base.uiBehaviour.m_SysListV2.Refresh();
+ base.uiBehaviour.m_SysListV3.Refresh();
+ base.uiBehaviour.m_SysListH2_1.Refresh();
+ base.uiBehaviour.m_SysListH2_2.Refresh();
+ this.RefreshListSwitchBtnVisable(base.uiBehaviour.m_V3SwitchBtn, base.uiBehaviour.m_SysListV3, null);
+ this.RefreshListSwitchBtnVisable(base.uiBehaviour.m_H2SwitchBtn, base.uiBehaviour.m_SysListH2_1, base.uiBehaviour.m_SysListH2_2);
+ this._TaskNaviHandler.OnSysChange();
+ }
+
+ public void RefreshH5ButtonState(XSysDefine sys, bool refreshList = true)
+ {
+ bool flag = !base.IsVisible();
+ if (!flag)
+ {
+ bool flag2 = this._substanceHandler != null && this._substanceHandler.IsVisible();
+ if (flag2)
+ {
+ this._substanceHandler.RefreshMainSubStance(sys, refreshList);
+ }
+ }
+ }
+
+ public void FakeShowSelf(bool bShow)
+ {
+ this.fakeShow = bShow;
+ base.uiBehaviour.m_MainMenuGo.SetActive(bShow);
+ DlgBase<BroadMiniDlg, BroadcastMiniBehaviour>.singleton.Show(bShow);
+ DlgBase<RadioDlg, RadioBehaviour>.singleton.Show(bShow);
+ base.uiBehaviour.m_PING.SetActive(bShow);
+ bool flag = this._WaitHandler != null;
+ if (flag)
+ {
+ this._WaitHandler.SetVisible(bShow);
+ }
+ SceneType curScene = this.m_curScene;
+ if (curScene <= SceneType.SKYCITY_WAITING)
+ {
+ if (curScene <= SceneType.SCENE_GUILD_HALL)
+ {
+ if (curScene == SceneType.SCENE_HALL)
+ {
+ base.uiBehaviour.m_ExitGuild.SetVisible(false);
+ base.uiBehaviour.m_SecondMenu.SetActive(bShow);
+ this._TaskNaviHandler.SetVisible(bShow);
+ goto IL_234;
+ }
+ if (curScene != SceneType.SCENE_GUILD_HALL)
+ {
+ goto IL_213;
+ }
+ base.uiBehaviour.m_ExitGuild.SetVisible(bShow);
+ this._TaskNaviHandler.SetVisible(false);
+ base.uiBehaviour.m_SecondMenu.SetActive(false);
+ goto IL_234;
+ }
+ else
+ {
+ if (curScene == SceneType.SCENE_FAMILYGARDEN)
+ {
+ XHomeCookAndPartyDocument doc = XHomeCookAndPartyDocument.Doc;
+ bool flag2 = doc.CurBanquetState == 0u;
+ if (flag2)
+ {
+ this._HomeHandler.SetVisible(bShow);
+ }
+ base.uiBehaviour.m_ExitGuild.SetVisible(false);
+ this._TaskNaviHandler.SetVisible(false);
+ base.uiBehaviour.m_SecondMenu.SetActive(false);
+ goto IL_234;
+ }
+ if (curScene != SceneType.SKYCITY_WAITING)
+ {
+ goto IL_213;
+ }
+ }
+ }
+ else
+ {
+ if (curScene > SceneType.SCENE_BIGMELEE_READY)
+ {
+ if (curScene != SceneType.SCENE_WEDDING)
+ {
+ if (curScene == SceneType.SCENE_BATTLEFIELD_READY)
+ {
+ goto IL_13F;
+ }
+ if (curScene != SceneType.SCENE_LEISURE)
+ {
+ goto IL_213;
+ }
+ }
+ base.uiBehaviour.m_ExitGuild.SetVisible(false);
+ this._TaskNaviHandler.SetVisible(false);
+ base.uiBehaviour.m_SecondMenu.SetActive(false);
+ goto IL_234;
+ }
+ if (curScene != SceneType.SCENE_HORSE && curScene != SceneType.SCENE_BIGMELEE_READY)
+ {
+ goto IL_213;
+ }
+ }
+ IL_13F:
+ XTeamDocument specificDocument = XDocuments.GetSpecificDocument<XTeamDocument>(XTeamDocument.uuID);
+ base.uiBehaviour.m_ExitGuild.SetVisible(false);
+ this._TaskNaviHandler.SetVisible(bShow && specificDocument.bInTeam);
+ base.uiBehaviour.m_SecondMenu.SetActive(false);
+ goto IL_234;
+ IL_213:
+ base.uiBehaviour.m_SecondMenu.SetActive(bShow);
+ this._TaskNaviHandler.SetVisible(bShow);
+ IL_234:
+ base.uiBehaviour.m_AvatarFrame.SetActive(bShow);
+ bool flag3 = this._yuyinHandler != null;
+ if (flag3)
+ {
+ this._yuyinHandler.m_panel.gameObject.SetActive(bShow);
+ }
+ DlgBase<XChatSmallView, XChatSmallBehaviour>.singleton.SetFakeHide(!bShow || !base.IsVisible());
+ this.RefreshSysAnnounce();
+ foreach (XSysDefine sys in XSingleton<XGameSysMgr>.singleton.SysH5)
+ {
+ this.RefreshH5ButtonState(sys, false);
+ }
+ bool flag4 = this._substanceHandler != null && this._substanceHandler.IsVisible();
+ if (flag4)
+ {
+ this._substanceHandler.Sort();
+ }
+ this.SetActivityEffect(false);
+ }
+
+ public Vector3 GetNewIconFlyPosH1(XSysDefine sys)
+ {
+ XPlayerAttributes xplayerAttributes = XSingleton<XEntityMgr>.singleton.Player.Attributes as XPlayerAttributes;
+ string name;
+ if (sys != XSysDefine.XSys_Item_Enhance)
+ {
+ name = base.uiBehaviour.GetSysButton(sys).gameObject.name;
+ }
+ else
+ {
+ name = base.uiBehaviour.GetSysButton(XSysDefine.XSys_Item).gameObject.name;
+ }
+ Vector3 childWorldPos = DlgBase<XMainInterface, XMainInterfaceBehaviour>.GetChildWorldPos(name);
+ return XSingleton<XGameUI>.singleton.UIRoot.InverseTransformPoint(childWorldPos);
+ }
+
+ public void SetActivityEffect(bool isFromTime)
+ {
+ bool flag = isFromTime && this.m_isFromTime;
+ if (!flag)
+ {
+ this.m_isFromTime = isFromTime;
+ bool flag2 = !this.fakeShow;
+ if (!flag2)
+ {
+ IXUIButton ixuibutton = base.uiBehaviour.m_SysButtonsMapping[57];
+ bool flag3 = ixuibutton == null;
+ if (!flag3)
+ {
+ bool flag4 = this.m_activityFx == null;
+ if (flag4)
+ {
+ this.m_activityFx = XSingleton<XFxMgr>.singleton.CreateUIFx("Effects/FX_Particle/UIfx/UI_shuangbeijiangli", ixuibutton.gameObject.transform.Find("Icon/Duck"), false);
+ }
+ bool flag5 = XActivityDocument.Doc.MainCityNeedEffect();
+ this.m_activityFx.SetActive(flag5);
+ bool flag6 = flag5;
+ if (flag6)
+ {
+ XFx.SyncRefreshUIRenderQueue(this.m_activityFx);
+ }
+ }
+ }
+ }
+ }
+
+ public void SetGridAnimateSmooth(bool b)
+ {
+ base.uiBehaviour.m_SysListH1.SetAnimateSmooth(b);
+ base.uiBehaviour.m_SysListH0.SetAnimateSmooth(b);
+ base.uiBehaviour.m_SysListV1.SetAnimateSmooth(b);
+ }
+
+ public void SetupBaseInfo(XAttributes attr)
+ {
+ int profID = XFastEnumIntEqualityComparer<RoleType>.ToInt(XSingleton<XEntityMgr>.singleton.Player.PlayerAttributes.Profession);
+ this.SetAvatar(XSingleton<XProfessionSkillMgr>.singleton.GetProfHeadIcon(profID));
+ this.SetVip();
+ this.SetLevel(attr.Level);
+ this.RefreshQQVipInfo();
+ this.RefreshGameCenterInfo();
+ this.RefreshSelfMemberPrivilegeIcon();
+ this.SetPowerpoint(this._curPPT);
+ this.SetExp(attr as XPlayerAttributes);
+ XFriendsDocument.Doc.SDKQueryFriends();
+ ILuaGameInfo luaGameInfo = XSingleton<XUpdater.XUpdater>.singleton.XLuaEngine.luaGameInfo;
+ luaGameInfo.exp = (uint)attr.Exp;
+ luaGameInfo.maxexp = (uint)attr.MaxExp;
+ luaGameInfo.level = attr.Level;
+ luaGameInfo.name = attr.Name;
+ luaGameInfo.ppt = this._curPPT;
+ luaGameInfo.coin = (uint)XSingleton<XGame>.singleton.Doc.XBagDoc.GetItemCount(1);
+ luaGameInfo.energy = (uint)XSingleton<XGame>.singleton.Doc.XBagDoc.GetItemCount(6);
+ luaGameInfo.dia = (uint)XSingleton<XGame>.singleton.Doc.XBagDoc.GetItemCount(9);
+ luaGameInfo.draggon = (uint)XSingleton<XGame>.singleton.Doc.XBagDoc.GetItemCount(7);
+ }
+
+ public void SetAvatar(string name)
+ {
+ IXUISprite ixuisprite = base.uiBehaviour.m_AvatarFrame.transform.Find("Avatar").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.spriteName = name;
+ this.SetTencentImage();
+ }
+
+ public void RefreshQQVipInfo()
+ {
+ bool flag = !base.IsLoaded();
+ if (!flag)
+ {
+ GameObject gameObject = base.uiBehaviour.m_AvatarFrame.transform.Find("CoverPanel/QQVIP").gameObject;
+ GameObject gameObject2 = base.uiBehaviour.m_AvatarFrame.transform.Find("CoverPanel/QQSVIP").gameObject;
+ QQVipInfoClient qqvipInfo = XPlatformAbilityDocument.Doc.QQVipInfo;
+ bool flag2 = XSingleton<XLoginDocument>.singleton.Channel == XAuthorizationChannel.XAuthorization_QQ && XSingleton<XGameSysMgr>.singleton.IsSystemOpened(XSysDefine.XSys_QQVIP) && qqvipInfo != null;
+ if (flag2)
+ {
+ gameObject.SetActive(qqvipInfo.is_vip && !qqvipInfo.is_svip);
+ gameObject2.SetActive(qqvipInfo.is_svip);
+ }
+ else
+ {
+ gameObject.SetActive(false);
+ gameObject2.SetActive(false);
+ }
+ }
+ }
+
+ public void RefreshGameCenterInfo()
+ {
+ bool flag = !base.IsLoaded();
+ if (!flag)
+ {
+ bool flag2 = !base.IsVisible();
+ if (!flag2)
+ {
+ GameObject gameObject = base.uiBehaviour.m_AvatarFrame.transform.Find("CoverPanel/WC").gameObject;
+ bool flag3 = XSingleton<XLoginDocument>.singleton.Channel == XAuthorizationChannel.XAuthorization_WeChat && XSingleton<XGameSysMgr>.singleton.IsSystemOpened(XSysDefine.XSys_Platform_StartPrivilege) && XSingleton<XLoginDocument>.singleton.GetLaunchTypeServerInfo() == StartUpType.StartUp_WX;
+ if (flag3)
+ {
+ gameObject.SetActive(true);
+ }
+ else
+ {
+ gameObject.SetActive(false);
+ }
+ }
+ }
+ }
+
+ public void RefreshSelfMemberPrivilegeIcon()
+ {
+ bool flag = !base.IsLoaded();
+ if (!flag)
+ {
+ bool flag2 = DlgBase<XMainInterface, XMainInterfaceBehaviour>.singleton.IsVisible();
+ if (flag2)
+ {
+ IXUISprite ixuisprite = base.uiBehaviour.m_AvatarFrame.transform.Find("CoverPanel/Tq").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.SetSprite(XWelfareDocument.GetSelfMemberPrivilegeIconName());
+ }
+ }
+ }
+
+ public void SetTencentImage()
+ {
+ bool flag = XSingleton<PDatabase>.singleton.playerInfo != null;
+ if (flag)
+ {
+ string pictureLarge = XSingleton<PDatabase>.singleton.playerInfo.data.pictureLarge;
+ XSingleton<XUICacheImage>.singleton.SetMainIcon(pictureLarge);
+ XSingleton<XUICacheImage>.singleton.Load(pictureLarge, this.m_uiBehaviour.m_txtAvatar, this.m_uiBehaviour);
+ }
+ else
+ {
+ XSingleton<XUICacheImage>.singleton.Load(string.Empty, this.m_uiBehaviour.m_txtAvatar, this.m_uiBehaviour);
+ }
+ this.SetHeadIcon();
+ }
+
+ public void SetHeadIcon()
+ {
+ XPrerogativeDocument specificDocument = XDocuments.GetSpecificDocument<XPrerogativeDocument>(XPrerogativeDocument.uuID);
+ XSingleton<UiUtility>.singleton.ParseHeadIcon(specificDocument.PlayerSetid, base.uiBehaviour.m_sprFrame);
+ }
+
+ public void SetVip()
+ {
+ XRechargeDocument specificDocument = XDocuments.GetSpecificDocument<XRechargeDocument>(XRechargeDocument.uuID);
+ }
+
+ public void SetLevel(uint lv)
+ {
+ base.uiBehaviour.m_Level.SetText(lv.ToString());
+ }
+
+ private void RefreshPing()
+ {
+ XSingleton<UiUtility>.singleton.RefreshPing(base.uiBehaviour.m_lblTime, base.uiBehaviour.m_sliderBattery, base.uiBehaviour.m_lblFree);
+ }
+
+ public void SetName(string name)
+ {
+ }
+
+ public void SetPowerpoint(int value)
+ {
+ IXUILabel ixuilabel = base.uiBehaviour.m_PlayerPPT.transform.Find("Power").GetComponent("XUILabel") as IXUILabel;
+ this._curPPT = value;
+ ixuilabel.SetText(value.ToString());
+ DlgBase<PPTDlg, PPTBehaviour>.singleton.ShowPPT(value);
+ }
+
+ public void OnPowerpointChanged(int oldValue, int newValue)
+ {
+ }
+
+ public void SetExp(XPlayerAttributes attr)
+ {
+ }
+
+ public void RefreshFatigeTime(object obj)
+ {
+ uint timeLeft = DlgBase<XPurchaseView, XPurchaseBehaviour>.singleton.GetTimeLeft(ItemEnum.FATIGUE);
+ ulong virtualItemCount = XSingleton<XGame>.singleton.Doc.XBagDoc.GetVirtualItemCount(ItemEnum.FATIGUE);
+ ulong num = ulong.Parse(XSingleton<XGlobalConfig>.singleton.GetValue("MaxRecoverFatigue"));
+ base.uiBehaviour.m_CurFatige.SetText(string.Format("{0}/{1}", virtualItemCount, num));
+ bool flag = virtualItemCount >= num;
+ if (flag)
+ {
+ base.uiBehaviour.m_CoverOneTime.SetText("00:00");
+ base.uiBehaviour.m_AllCoverTime.SetText("00:00");
+ bool flag2 = this._fatigeRefreshToken > 0u;
+ if (flag2)
+ {
+ XSingleton<XTimerMgr>.singleton.KillTimer(this._fatigeRefreshToken);
+ this._fatigeRefreshToken = 0u;
+ }
+ }
+ else
+ {
+ base.uiBehaviour.m_CoverOneTime.SetText(DlgBase<XPurchaseView, XPurchaseBehaviour>.singleton.FormatTime(timeLeft));
+ uint time = (uint)((ulong)timeLeft + (num - virtualItemCount) * 360UL);
+ base.uiBehaviour.m_AllCoverTime.SetText(DlgBase<XPurchaseView, XPurchaseBehaviour>.singleton.FormatTime(time));
+ this._fatigeRefreshToken = XSingleton<XTimerMgr>.singleton.SetTimer(1f, this._refreshFatigeTimeCb, null);
+ }
+ }
+
+ public void ShowFatigeRecoverTime(object obj)
+ {
+ base.uiBehaviour.m_RecoverTime.SetVisible(true);
+ this.RefreshFatigeTime(null);
+ }
+
+ private void OnPressAddFatige(IXUIButton sp, bool state)
+ {
+ if (state)
+ {
+ this._fatigePressTime = DateTime.Now;
+ this._pressToken = XSingleton<XTimerMgr>.singleton.SetTimer(0.3f, this._showFatigeRecoverTimeCb, null);
+ }
+ else
+ {
+ bool flag = !base.uiBehaviour.m_RecoverTime.IsVisible();
+ if (flag)
+ {
+ DlgBase<XPurchaseView, XPurchaseBehaviour>.singleton.ShowBorad(ItemEnum.FATIGUE);
+ }
+ else
+ {
+ base.uiBehaviour.m_RecoverTime.SetVisible(false);
+ }
+ bool flag2 = this._pressToken > 0u;
+ if (flag2)
+ {
+ XSingleton<XTimerMgr>.singleton.KillTimer(this._pressToken);
+ this._pressToken = 0u;
+ }
+ bool flag3 = this._fatigeRefreshToken > 0u;
+ if (flag3)
+ {
+ XSingleton<XTimerMgr>.singleton.KillTimer(this._fatigeRefreshToken);
+ this._fatigeRefreshToken = 0u;
+ }
+ }
+ }
+
+ public void ForceOpenSysIcons(XSysDefine sys)
+ {
+ this.SetGridAnimateSmooth(false);
+ bool flag = !this._bH1Opened;
+ if (flag)
+ {
+ this._bH1Opened = true;
+ this.OnMainSysChange();
+ }
+ }
+
+ public void OnSysChange(XSysDefine sys)
+ {
+ this.OnMainSysChange();
+ }
+
+ private void OnAvatarClick(IXUISprite go)
+ {
+ bool flag = !base.IsLoaded();
+ if (!flag)
+ {
+ bool flag2 = DlgBase<DemoUI, DemoUIBehaviour>.singleton.IsVisible();
+ DlgBase<DemoUI, DemoUIBehaviour>.singleton.SetVisible(!flag2, true);
+ bool flag3 = XSingleton<XScene>.singleton.SceneType != SceneType.SCENE_BIGMELEE_READY;
+ if (flag3)
+ {
+ DlgBase<XOptionsView, XOptionsBehaviour>.singleton.SetVisibleWithAnimation(true, null);
+ }
+ }
+ }
+
+ private bool _CanClick()
+ {
+ float time = Time.time;
+ bool flag = time - this.m_fClickTime > 3f;
+ bool result;
+ if (flag)
+ {
+ this.m_fClickTime = time;
+ result = true;
+ }
+ else
+ {
+ result = false;
+ }
+ return result;
+ }
+
+ private bool OnExitGuildClick(IXUIButton go)
+ {
+ bool flag = !base.IsLoaded();
+ bool result;
+ if (flag)
+ {
+ result = true;
+ }
+ else
+ {
+ bool flag2 = !this._CanClick();
+ if (flag2)
+ {
+ result = true;
+ }
+ else
+ {
+ XSingleton<XScene>.singleton.ReqLeaveScene();
+ bool flag3 = XSingleton<XScene>.singleton.SceneType == SceneType.SCENE_FAMILYGARDEN;
+ if (flag3)
+ {
+ HomePlantDocument doc = HomePlantDocument.Doc;
+ doc.ClearFarmInfo();
+ doc.HomeSprite.ClearInfo();
+ doc.GardenId = 0UL;
+ }
+ result = true;
+ }
+ }
+ return result;
+ }
+
+ private void ShowCharSysListFrame()
+ {
+ XPlayerAttributes attr = XSingleton<XEntityMgr>.singleton.Player.Attributes as XPlayerAttributes;
+ int num = 28;
+ for (int i = 0; i < base.uiBehaviour.m_SysChar.Length; i++)
+ {
+ bool flag = XSingleton<XGameSysMgr>.singleton.IsSystemOpened(base.uiBehaviour.m_SysChar[i], attr);
+ base.uiBehaviour.GetSysButton(base.uiBehaviour.m_SysChar[i]).SetVisible(flag);
+ bool flag2 = flag;
+ if (flag2)
+ {
+ num += 80;
+ }
+ }
+ }
+
+ private bool TryCheckInGuildSystem(XSysDefine sys)
+ {
+ bool flag = !base.IsLoaded();
+ bool result;
+ if (flag)
+ {
+ XSingleton<XDebug>.singleton.AddErrorLog("XMainInterface is Dispose!", null, null, null, null, null);
+ result = false;
+ }
+ else
+ {
+ bool flag2 = Array.IndexOf<XSysDefine>(base.uiBehaviour.m_SysGuild, sys) == -1;
+ if (flag2)
+ {
+ result = true;
+ }
+ else
+ {
+ XGuildDocument specificDocument = XDocuments.GetSpecificDocument<XGuildDocument>(XGuildDocument.uuID);
+ bool flag3 = !specificDocument.bInGuild;
+ if (flag3)
+ {
+ result = false;
+ }
+ else
+ {
+ uint unlockLevel = XGuildDocument.GuildConfig.GetUnlockLevel(sys);
+ bool flag4 = specificDocument.Level < unlockLevel;
+ if (flag4)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString("GUILD_MAZE_NO_GUILD_LEVEL", new object[]
+ {
+ unlockLevel
+ }), "fece00");
+ result = false;
+ }
+ else
+ {
+ bool flag5 = !XSingleton<XGameSysMgr>.singleton.IsSystemOpened(sys);
+ if (flag5)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString("GUILD_MAZE_NO_PLAYER_LEVEL", new object[]
+ {
+ XSingleton<XGameSysMgr>.singleton.GetSystemOpenLevel(sys)
+ }), "fece00");
+ result = false;
+ }
+ else
+ {
+ result = true;
+ }
+ }
+ }
+ }
+ }
+ return result;
+ }
+
+ public void OnSysIconClicked(XSysDefine sys)
+ {
+ this.OnSysIconClicked(base.uiBehaviour.GetSysButton(sys));
+ }
+
+ public bool OnSysIconClicked(IXUIButton go)
+ {
+ bool flag = !base.IsLoaded();
+ bool result;
+ if (flag)
+ {
+ result = true;
+ }
+ else
+ {
+ XSysDefine xsysDefine = (XSysDefine)go.ID;
+ bool flag2 = this.DramaDlgCloseTime > 0f;
+ if (flag2)
+ {
+ bool flag3 = Time.time - this.DramaDlgCloseTime < 1f;
+ if (flag3)
+ {
+ return true;
+ }
+ }
+ bool flag4 = !this.TryCheckInGuildSystem(xsysDefine);
+ if (flag4)
+ {
+ result = true;
+ }
+ else
+ {
+ Dictionary<string, string> dictionary = new Dictionary<string, string>();
+ XSysDefine xsysDefine2 = xsysDefine;
+ if (xsysDefine2 <= XSysDefine.XSys_OldFriendsBack)
+ {
+ if (xsysDefine2 <= XSysDefine.XSys_MentorshipMsg_Tip)
+ {
+ if (xsysDefine2 <= XSysDefine.XSys_WeekEndNest)
+ {
+ if (xsysDefine2 <= XSysDefine.XSys_Home_MyHome)
+ {
+ switch (xsysDefine2)
+ {
+ case XSysDefine.XSys_Character:
+ this.ShowCharSysListFrame();
+ goto IL_1362;
+ case XSysDefine.XSys_Level:
+ {
+ DlgBase<DungeonSelect, DungeonSelectBehaviour>.singleton.IsTaskMode = false;
+ bool flag5 = XSingleton<XScene>.singleton.SceneID != 1u;
+ if (flag5)
+ {
+ DlgBase<DungeonSelect, DungeonSelectBehaviour>.singleton.FadeShow();
+ }
+ else
+ {
+ this._TaskNaviHandler.NavigateToBattle();
+ }
+ goto IL_1362;
+ }
+ case XSysDefine.XSys_Item:
+ DlgBase<ItemSystemDlg, TabDlgBehaviour>.singleton.ShowWorkGameSystem(XSysDefine.XSys_Item);
+ goto IL_1362;
+ case XSysDefine.XSys_Skill:
+ DlgBase<XSkillTreeView, XSkillTreeBehaviour>.singleton.SetVisibleWithAnimation(true, null);
+ goto IL_1362;
+ case XSysDefine.XSys_Char:
+ case XSysDefine.XSys_Fashion:
+ case XSysDefine.XSys_Bag:
+ case XSysDefine.XSys_TShow:
+ case XSysDefine.XSys_Confession:
+ case XSysDefine.XSys_TShowRule:
+ case XSysDefine.XSys_FlowerRank:
+ case XSysDefine.XSys_Camp:
+ case XSysDefine.XSys_Design:
+ case XSysDefine.XSys_SuperReward:
+ case XSysDefine.XSys_Draw:
+ case XSysDefine.XSys_Mall:
+ case XSysDefine.XSys_Target:
+ case (XSysDefine)36:
+ case XSysDefine.XSys_ServerActivity:
+ case (XSysDefine)38:
+ case XSysDefine.XSys_LevelReward:
+ case (XSysDefine)43:
+ case XSysDefine.XSys_ReceiveEnergy:
+ case XSysDefine.XSys_SystemActivity:
+ case XSysDefine.XSys_BossRush:
+ case XSysDefine.XSys_DragonCrusade:
+ case XSysDefine.XSys_Arena:
+ case XSysDefine.XSys_Activity:
+ case (XSysDefine)53:
+ case XSysDefine.XSys_MulActivity:
+ case XSysDefine.XSys_PVPAcitivity:
+ case XSysDefine.XSys_DragonCoin:
+ case (XSysDefine)66:
+ case XSysDefine.XSys_WeekShareReward:
+ case XSysDefine.XSys_DungeonShareReward:
+ case XSysDefine.XSys_Maquee:
+ case XSysDefine.XSys_SendFlower:
+ case XSysDefine.XSys_Mentorship:
+ case XSysDefine.XSys_3GFree:
+ case XSysDefine.XSys_ChatGroup:
+ case (XSysDefine)79:
+ case (XSysDefine)83:
+ case (XSysDefine)84:
+ case XSysDefine.XSys_GuildRedPacket:
+ case XSysDefine.XSys_GayValley:
+ case XSysDefine.XSys_GayValleyManager:
+ goto IL_133D;
+ case XSysDefine.XSys_Horse:
+ DlgBase<XPetMainView, XPetMainBehaviour>.singleton.SetVisibleWithAnimation(true, null);
+ goto IL_1362;
+ case XSysDefine.XSys_Guild:
+ {
+ XGuildDocument specificDocument = XDocuments.GetSpecificDocument<XGuildDocument>(XGuildDocument.uuID);
+ bool flag6 = specificDocument != null;
+ if (flag6)
+ {
+ specificDocument.TryShowGuildHallUI();
+ }
+ goto IL_1362;
+ }
+ case XSysDefine.XSys_Recycle:
+ DlgBase<RecycleSystemDlg, TabDlgBehaviour>.singleton.ShowWorkGameSystem(XSysDefine.XSys_Recycle);
+ goto IL_1362;
+ case XSysDefine.XSys_Auction:
+ DlgBase<AuctionView, AuctionBehaviour>.singleton.SetVisibleWithAnimation(true, null);
+ goto IL_1362;
+ case XSysDefine.XSys_CardCollect:
+ DlgBase<CardCollectView, CardCollectBehaviour>.singleton.SetVisibleWithAnimation(true, null);
+ goto IL_1362;
+ case XSysDefine.XSys_Mail:
+ DlgBase<MailSystemDlg, TabDlgBehaviour>.singleton.ShowWorkGameSystem(XSysDefine.XSys_Mail_System);
+ goto IL_1362;
+ case XSysDefine.XSys_Wifi:
+ goto IL_1362;
+ case XSysDefine.XSys_Strong:
+ DlgBase<XFpStrengthenView, XFPStrengthenBehaviour>.singleton.ShowContent(FunctionDef.ZHANLI);
+ goto IL_1362;
+ case XSysDefine.XSys_Reward:
+ DlgBase<RewardSystemDlg, TabDlgBehaviour>.singleton.ShowWorkGameSystem(XSysDefine.XSys_Reward);
+ goto IL_1362;
+ case XSysDefine.XSys_OnlineReward:
+ DlgBase<XOnlineRewardView, XOnlineRewardBehaviour>.singleton.SetVisible(true, true);
+ goto IL_1362;
+ case XSysDefine.XSys_Setting:
+ DlgBase<XOptionsView, XOptionsBehaviour>.singleton.SetVisibleWithAnimation(true, null);
+ goto IL_1362;
+ case XSysDefine.XSys_Rank:
+ DlgBase<XRankView, XRankBehaviour>.singleton.ShowRank(XSysDefine.XSys_Rank);
+ goto IL_1362;
+ case XSysDefine.XSys_EquipCreate:
+ DlgBase<EquipCreateDlg, TabDlgBehaviour>.singleton.ShowWorkGameSystem(XSysDefine.XSys_EquipCreate);
+ goto IL_1362;
+ case XSysDefine.XSys_LevelSeal:
+ DlgBase<XOperatingActivityView, XOperatingActivityBehaviour>.singleton.Show(XSysDefine.XSys_LevelSeal, false);
+ goto IL_1362;
+ case XSysDefine.XSys_SuperRisk:
+ DlgBase<SuperRiskDlg, SuperRiskDlgBehaviour>.singleton.Show(true, 0);
+ goto IL_1362;
+ case XSysDefine.XSys_Qualifying:
+ DlgBase<XQualifyingView, XQualifyingBehaviour>.singleton.SetVisibleWithAnimation(true, null);
+ goto IL_1362;
+ case XSysDefine.XSys_Spectate:
+ DlgBase<SpectateView, SpectateBehaviour>.singleton.SetVisibleWithAnimation(true, null);
+ goto IL_1362;
+ case XSysDefine.XSys_DailyAcitivity:
+ DlgBase<DailyActivityDlg, TabDlgBehaviour>.singleton.ShowWorkGameSystem(XSysDefine.XSys_DailyAcitivity);
+ goto IL_1362;
+ case XSysDefine.XSys_ExcellentLive:
+ {
+ XSpectateDocument specificDocument2 = XDocuments.GetSpecificDocument<XSpectateDocument>(XSpectateDocument.uuID);
+ specificDocument2.ClickData = specificDocument2.MainInterfaceData;
+ specificDocument2.SetMainInterfaceBtnFalse();
+ string label = string.Format(XSingleton<UiUtility>.singleton.ReplaceReturn(XStringDefineProxy.GetString("ExcellentLiveTips")), specificDocument2.GetTitle(specificDocument2.ClickData.liveInfo));
+ string @string = XStringDefineProxy.GetString("COMMON_OK");
+ string string2 = XStringDefineProxy.GetString("COMMON_CANCEL");
+ XSingleton<UiUtility>.singleton.ShowModalDialog(label, @string, string2, new ButtonClickEventHandler(this.OnExcellentLiveClick));
+ goto IL_1362;
+ }
+ case XSysDefine.XSys_MobaAcitivity:
+ DlgBase<MobaActivityDlg, TabDlgBehaviour>.singleton.ShowWorkGameSystem(XSysDefine.XSys_MobaAcitivity);
+ goto IL_1362;
+ case XSysDefine.XSys_Money:
+ XSingleton<XGameSysMgr>.singleton.OpenSystem(XSysDefine.XSys_Recharge, 0UL);
+ goto IL_1362;
+ case XSysDefine.XSys_Coin:
+ {
+ XPurchaseView singleton = DlgBase<XPurchaseView, XPurchaseBehaviour>.singleton;
+ singleton.ReqQuickCommonPurchase(ItemEnum.GOLD);
+ goto IL_1362;
+ }
+ case XSysDefine.XSys_Power:
+ {
+ XPurchaseView singleton2 = DlgBase<XPurchaseView, XPurchaseBehaviour>.singleton;
+ singleton2.ReqQuickCommonPurchase(ItemEnum.FATIGUE);
+ goto IL_1362;
+ }
+ case XSysDefine.XSys_GameMall:
+ DlgBase<GameMallDlg, TabDlgBehaviour>.singleton.ShowMall(XSysDefine.XSys_GameMall_Dragon, MallType.WEEK, 0UL);
+ goto IL_1362;
+ case XSysDefine.XSys_Carnival:
+ DlgBase<CarnivalDlg, CarnivalBehavior>.singleton.SetVisibleWithAnimation(true, null);
+ goto IL_1362;
+ case XSysDefine.XSys_OtherPlayerInfo:
+ DlgBase<XOtherPlayerInfoView, XOtherPlayerInfoBehaviour>.singleton.SetVisibleWithAnimation(true, null);
+ goto IL_1362;
+ case XSysDefine.XSys_Chat:
+ DlgBase<XChatView, XChatBehaviour>.singleton.SetVisibleWithAnimation(true, null);
+ goto IL_1362;
+ case XSysDefine.XSys_Friends:
+ DlgBase<XFriendsView, XFriendsBehaviour>.singleton.OnShowFriendDlg();
+ goto IL_1362;
+ case XSysDefine.XSys_PK:
+ DlgBase<XPKInvitationView, XPKInvitationBehaviour>.singleton.SetVisibleWithAnimation(true, null);
+ goto IL_1362;
+ case XSysDefine.XSys_Broadcast:
+ this.OnQGameClick(go);
+ goto IL_1362;
+ case XSysDefine.XSys_GuildHall:
+ {
+ XGuildDocument specificDocument3 = XDocuments.GetSpecificDocument<XGuildDocument>(XGuildDocument.uuID);
+ bool flag7 = !specificDocument3.bInGuild;
+ if (flag7)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(ErrorCode.ERR_GUILD_NOT_IN_GUILD, "fece00");
+ }
+ else
+ {
+ DlgBase<XGuildHallView, XGuildHallBehaviour>.singleton.SetVisibleWithAnimation(true, null);
+ }
+ goto IL_1362;
+ }
+ case XSysDefine.XSys_GuildRelax:
+ DlgBase<XGuildRelaxGameView, XGuildRelaxGameBehaviour>.singleton.SetVisibleWithAnimation(true, null);
+ goto IL_1362;
+ case XSysDefine.XSys_GuildDragon:
+ break;
+ case XSysDefine.XSys_GuildPvp:
+ goto IL_A0D;
+ case XSysDefine.XSys_GuildMine:
+ goto IL_A54;
+ case XSysDefine.XSys_CrossGVG:
+ DlgBase<CrossGVGMainView, TabDlgBehaviour>.singleton.SetVisibleWithAnimation(true, null);
+ goto IL_1362;
+ case XSysDefine.XSys_Team:
+ {
+ DlgBase<XTeamView, TabDlgBehaviour>.singleton.ShowTeamView();
+ XTeamDocument specificDocument4 = XDocuments.GetSpecificDocument<XTeamDocument>(XTeamDocument.uuID);
+ goto IL_1362;
+ }
+ case XSysDefine.XSys_SevenActivity:
+ DlgBase<SevenLoginDlg, SevenLoginBehaviour>.singleton.SetVisibleWithAnimation(true, null);
+ goto IL_1362;
+ case XSysDefine.XSys_Title:
+ DlgBase<TitleDlg, TitleDlgBehaviour>.singleton.SetVisibleWithAnimation(true, null);
+ goto IL_1362;
+ default:
+ switch (xsysDefine2)
+ {
+ case XSysDefine.XSys_Home:
+ case XSysDefine.XSys_Home_Cooking:
+ case XSysDefine.XSys_Home_Fishing:
+ case XSysDefine.XSys_Home_Feast:
+ case XSysDefine.XSys_Home_MyHome:
+ DlgBase<HomeMainDlg, TabDlgBehaviour>.singleton.ShowWorkGameSystem(xsysDefine);
+ goto IL_1362;
+ case XSysDefine.XSys_Home_Plant:
+ DlgBase<HomeMainDlg, TabDlgBehaviour>.singleton.ShowWorkGameSystem(XSysDefine.XSys_Home);
+ goto IL_1362;
+ default:
+ goto IL_133D;
+ }
+ break;
+ }
+ }
+ else
+ {
+ if (xsysDefine2 == XSysDefine.XSys_Pet_Pairs)
+ {
+ DlgBase<PairsPetInviteView, PairsPetInviteBehaviour>.singleton.SetVisible(true, true);
+ goto IL_1362;
+ }
+ if (xsysDefine2 != XSysDefine.XSys_WeekEndNest)
+ {
+ goto IL_133D;
+ }
+ DlgBase<WeekEndNestDlg, WeekEndNestBehaviour>.singleton.SetVisible(true, true);
+ goto IL_1362;
+ }
+ }
+ else if (xsysDefine2 <= XSysDefine.XSys_Rank_WorldBoss)
+ {
+ if (xsysDefine2 == XSysDefine.XSys_Mall_Home)
+ {
+ DlgBase<MallSystemDlg, MallSystemBehaviour>.singleton.ShowShopSystem(xsysDefine, 0UL);
+ goto IL_1362;
+ }
+ if (xsysDefine2 != XSysDefine.XSys_Rank_WorldBoss)
+ {
+ goto IL_133D;
+ }
+ DlgBase<XRankView, XRankBehaviour>.singleton.ShowRank(XSysDefine.XSys_Rank_WorldBoss);
+ XWorldBossDocument specificDocument5 = XDocuments.GetSpecificDocument<XWorldBossDocument>(XWorldBossDocument.uuID);
+ specificDocument5.SetMainInterfaceBtnState(false);
+ goto IL_1362;
+ }
+ else
+ {
+ if (xsysDefine2 == XSysDefine.XSys_LevelSeal_Tip)
+ {
+ XLevelSealDocument specificDocument6 = XDocuments.GetSpecificDocument<XLevelSealDocument>(XLevelSealDocument.uuID);
+ specificDocument6.ReqLevelSealButtonClick();
+ goto IL_1362;
+ }
+ if (xsysDefine2 != XSysDefine.XSys_MentorshipMsg_Tip)
+ {
+ goto IL_133D;
+ }
+ DlgBase<XMentorshipApplicationsView, XMentorshipApplicationBehavior>.singleton.SetVisibleWithAnimation(true, null);
+ goto IL_1362;
+ }
+ }
+ else if (xsysDefine2 <= XSysDefine.XSys_Welfare_FirstRechange)
+ {
+ if (xsysDefine2 <= XSysDefine.XSys_Battlefield)
+ {
+ if (xsysDefine2 == XSysDefine.XSys_Activity_WorldBoss)
+ {
+ DlgBase<XWorldBossView, XWorldBossBehaviour>.singleton.ShowView();
+ goto IL_1362;
+ }
+ switch (xsysDefine2)
+ {
+ case XSysDefine.XSys_Activity_CaptainPVP:
+ {
+ XCaptainPVPDocument specificDocument7 = XDocuments.GetSpecificDocument<XCaptainPVPDocument>(XCaptainPVPDocument.uuID);
+ specificDocument7.SetMainInterfaceBtnState(false);
+ string label2 = XSingleton<UiUtility>.singleton.ReplaceReturn(XStringDefineProxy.GetString("MainInterfaceCaptainPVPTips"));
+ string string3 = XStringDefineProxy.GetString("BtnTips_EnterNow");
+ string string4 = XStringDefineProxy.GetString("BtnTips_Then");
+ XSingleton<UiUtility>.singleton.ShowModalDialog(label2, string3, string4, new ButtonClickEventHandler(this.OnCaptainJoin));
+ goto IL_1362;
+ }
+ case XSysDefine.XSys_Activity_GoddessTrial:
+ case XSysDefine.XSys_Activity_TeamTowerSingle:
+ goto IL_133D;
+ case XSysDefine.XSys_BigMelee:
+ DlgBase<BigMeleeEntranceView, BigMeleeEntranceBehaviour>.singleton.SetVisibleWithAnimation(true, null);
+ goto IL_1362;
+ case XSysDefine.XSys_BigMeleeEnd:
+ {
+ XBigMeleeEntranceDocument specificDocument8 = XDocuments.GetSpecificDocument<XBigMeleeEntranceDocument>(XBigMeleeEntranceDocument.uuID);
+ DlgHandlerBase.EnsureCreate<BigMeleeRankHandler>(ref specificDocument8.RankHandler, base.uiBehaviour.m_Canvas, true, null);
+ specificDocument8.RankHandler.SetType(false);
+ specificDocument8.MainInterfaceStateEnd = false;
+ this.RefreshH5ButtonState(XSysDefine.XSys_BigMeleeEnd, true);
+ goto IL_1362;
+ }
+ case XSysDefine.XSys_Battlefield:
+ DlgBase<BattleFieldEntranceView, BattleFieldEntranceBehaviour>.singleton.SetVisibleWithAnimation(true, null);
+ XBattleFieldEntranceDocument.Doc.SetMainInterfaceBtnState(false);
+ goto IL_1362;
+ default:
+ goto IL_133D;
+ }
+ }
+ else
+ {
+ switch (xsysDefine2)
+ {
+ case XSysDefine.XSys_MulActivity_SkyArena:
+ XSingleton<XGameSysMgr>.singleton.OpenSystem(XSysDefine.XSys_MulActivity_SkyArena, 0UL);
+ goto IL_1362;
+ case XSysDefine.XSys_MulActivity_Race:
+ XSingleton<XGameSysMgr>.singleton.OpenSystem(XSysDefine.XSys_MulActivity_Race, 0UL);
+ goto IL_1362;
+ case XSysDefine.XSys_MulActivity_WeekendParty:
+ DlgBase<ActivityWeekendPartyView, ActivityWeekendPartyBehaviour>.singleton.SetVisibleWithAnimation(true, null);
+ goto IL_1362;
+ case XSysDefine.XSys_MulActivity_SkyArenaEnd:
+ {
+ DlgBase<XRankView, XRankBehaviour>.singleton.ShowRank(XSysDefine.XSys_Rank_SkyArena);
+ PtcC2M_MulActivityIconSysReq ptcC2M_MulActivityIconSysReq = new PtcC2M_MulActivityIconSysReq();
+ ptcC2M_MulActivityIconSysReq.Data.id = (uint)XFastEnumIntEqualityComparer<XSysDefine>.ToInt(XSysDefine.XSys_MulActivity_SkyArenaEnd);
+ XSingleton<XClientNetwork>.singleton.Send(ptcC2M_MulActivityIconSysReq);
+ XSkyArenaEntranceDocument.Doc.MainInterfaceStateEnd = false;
+ this.RefreshH5ButtonState(XSysDefine.XSys_MulActivity_SkyArenaEnd, true);
+ goto IL_1362;
+ }
+ case (XSysDefine)556:
+ case (XSysDefine)557:
+ case (XSysDefine)558:
+ case (XSysDefine)559:
+ goto IL_133D;
+ case XSysDefine.XSys_Welfare:
+ DlgBase<XWelfareView, XWelfareBehaviour>.singleton.Show(XSysDefine.XSys_None);
+ goto IL_1362;
+ default:
+ if (xsysDefine2 != XSysDefine.XSys_Welfare_FirstRechange)
+ {
+ goto IL_133D;
+ }
+ DlgBase<XWelfareView, XWelfareBehaviour>.singleton.Show(XSysDefine.XSys_Welfare_FirstRechange);
+ goto IL_1362;
+ }
+ }
+ }
+ else if (xsysDefine2 <= XSysDefine.Xsys_Backflow)
+ {
+ if (xsysDefine2 == XSysDefine.XSys_Welfare_NiceGirl)
+ {
+ DlgBase<XWelfareView, XWelfareBehaviour>.singleton.Show(XSysDefine.XSys_Welfare_NiceGirl);
+ goto IL_1362;
+ }
+ if (xsysDefine2 != XSysDefine.Xsys_Backflow)
+ {
+ goto IL_133D;
+ }
+ DlgBase<XBackFlowDlg, XBackFlowBehavior>.singleton.SetVisible(true, true);
+ goto IL_1362;
+ }
+ else
+ {
+ if (xsysDefine2 == XSysDefine.Xsys_TaJieHelp)
+ {
+ DlgBase<TaJieHelpDlg, TaJieHelpBehaviour>.singleton.SetVisible(true, true);
+ goto IL_1362;
+ }
+ if (xsysDefine2 == XSysDefine.XSys_OperatingActivity)
+ {
+ DlgBase<XOperatingActivityView, XOperatingActivityBehaviour>.singleton.Show(XSysDefine.XSys_None, false);
+ goto IL_1362;
+ }
+ if (xsysDefine2 != XSysDefine.XSys_OldFriendsBack)
+ {
+ goto IL_133D;
+ }
+ DlgBase<XOperatingActivityView, XOperatingActivityBehaviour>.singleton.Show(XSysDefine.XSys_OldFriendsBack, false);
+ goto IL_1362;
+ }
+ }
+ else if (xsysDefine2 <= XSysDefine.XSys_GuildMineMain)
+ {
+ if (xsysDefine2 <= XSysDefine.XSys_GuildRelax_VoiceQA)
+ {
+ if (xsysDefine2 <= XSysDefine.XSys_GroupRecruitAuthorize)
+ {
+ if (xsysDefine2 == XSysDefine.XSys_NPCFavor)
+ {
+ XSingleton<XGameSysMgr>.singleton.OpenSystem(XSysDefine.XSys_NPCFavor, 0UL);
+ goto IL_1362;
+ }
+ if (xsysDefine2 != XSysDefine.XSys_GroupRecruitAuthorize)
+ {
+ goto IL_133D;
+ }
+ DlgBase<RecruitAuthorizeView, RecruitAuthorizeBehaviour>.singleton.SetVisibleWithAnimation(true, null);
+ goto IL_1362;
+ }
+ else
+ {
+ if (xsysDefine2 == XSysDefine.XSys_ThemeActivity)
+ {
+ DlgBase<XThemeActivityView, XThemeActivityBehaviour>.singleton.SetVisibleWithAnimation(true, null);
+ goto IL_1362;
+ }
+ if (xsysDefine2 != XSysDefine.XSys_GuildRelax_VoiceQA)
+ {
+ goto IL_133D;
+ }
+ XVoiceQADocument specificDocument9 = XDocuments.GetSpecificDocument<XVoiceQADocument>(XVoiceQADocument.uuID);
+ bool isVoiceQAIng = specificDocument9.IsVoiceQAIng;
+ if (isVoiceQAIng)
+ {
+ DlgBase<XVoiceQAView, XVoiceQABehaviour>.singleton.SetVisible(true, true);
+ }
+ else
+ {
+ string label3 = XSingleton<UiUtility>.singleton.ReplaceReturn(XStringDefineProxy.GetString("VoiceQA_Enter_Description_" + specificDocument9.TempType.ToString()));
+ string string5 = XStringDefineProxy.GetString("VoiceQA_Enter_btn1");
+ string string6 = XStringDefineProxy.GetString("VoiceQA_Enter_btn2");
+ XSingleton<UiUtility>.singleton.ShowModalDialog(label3, string5, string6, new ButtonClickEventHandler(this.OnVoiceQAJoin), new ButtonClickEventHandler(this.OnVoiceQARefuse), false, XTempTipDefine.OD_START, 50);
+ }
+ goto IL_1362;
+ }
+ }
+ else if (xsysDefine2 <= XSysDefine.XSys_GuildBoon_RedPacket)
+ {
+ if (xsysDefine2 == XSysDefine.XSys_GuildRelax_JokerMatch)
+ {
+ XGuildJockerMatchDocument specificDocument10 = XDocuments.GetSpecificDocument<XGuildJockerMatchDocument>(XGuildJockerMatchDocument.uuID);
+ specificDocument10.SendReqJokerMatchJoin();
+ goto IL_1362;
+ }
+ if (xsysDefine2 != XSysDefine.XSys_GuildBoon_RedPacket)
+ {
+ goto IL_133D;
+ }
+ XGuildRedPacketDocument specificDocument11 = XDocuments.GetSpecificDocument<XGuildRedPacketDocument>(XGuildRedPacketDocument.uuID);
+ specificDocument11.ReqGetLast();
+ goto IL_1362;
+ }
+ else
+ {
+ if (xsysDefine2 == XSysDefine.XSys_GuildChallenge)
+ {
+ goto IL_1362;
+ }
+ if (xsysDefine2 == XSysDefine.XSys_GuildQualifier)
+ {
+ XGuildDocument specificDocument12 = XDocuments.GetSpecificDocument<XGuildDocument>(XGuildDocument.uuID);
+ bool flag8 = !specificDocument12.bInGuild;
+ if (flag8)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(ErrorCode.ERR_GUILD_NOT_IN_GUILD, "fece00");
+ }
+ else
+ {
+ DlgBase<GuildQualifierDlg, GuildQualifierBehavior>.singleton.SetVisibleWithAnimation(true, null);
+ }
+ goto IL_1362;
+ }
+ if (xsysDefine2 != XSysDefine.XSys_GuildMineMain)
+ {
+ goto IL_133D;
+ }
+ DlgBase<GuildMineMainView, GuildMineMainBehaviour>.singleton.SetVisibleWithAnimation(true, null);
+ goto IL_1362;
+ }
+ }
+ else if (xsysDefine2 <= XSysDefine.XSys_IDIP_ZeroReward)
+ {
+ if (xsysDefine2 <= XSysDefine.XSys_GuildInherit)
+ {
+ if (xsysDefine2 == XSysDefine.XSys_GuildDailyTask)
+ {
+ DlgBase<XGuildDailyTaskView, XGuildDailyTaskBehavior>.singleton.SetVisible(true, true);
+ goto IL_1362;
+ }
+ if (xsysDefine2 != XSysDefine.XSys_GuildInherit)
+ {
+ goto IL_133D;
+ }
+ DlgBase<GuildInheritDlg, GuildInheritBehaviour>.singleton.SetVisibleWithAnimation(true, null);
+ goto IL_1362;
+ }
+ else
+ {
+ switch (xsysDefine2)
+ {
+ case XSysDefine.XSys_JockerKing:
+ {
+ XJokerKingDocument specificDocument13 = XDocuments.GetSpecificDocument<XJokerKingDocument>(XJokerKingDocument.uuID);
+ specificDocument13.JokerKingMatchAdd();
+ goto IL_1362;
+ }
+ case XSysDefine.XSys_Team_TeamList:
+ case XSysDefine.XSys_Team_MyTeam:
+ case XSysDefine.XSys_GuildWeeklyBountyTask:
+ goto IL_133D;
+ case XSysDefine.XSys_Team_Invited:
+ DlgBase<XTeamInvitedListView, XTeamInvitedListBehaviour>.singleton.SetVisibleWithAnimation(true, null);
+ goto IL_1362;
+ case XSysDefine.XSys_GuildDailyRefresh:
+ DlgBase<XGuildDailyRefreshTaskDlg, XGuildDailyRefreshTaskBehavior>.singleton.SetVisible(true, true);
+ goto IL_1362;
+ case XSysDefine.XSys_GuildDailyRequest:
+ DlgBase<XGuildDailyHandleRefreshDlg, XGuildDailyHandleRefreshBehavior>.singleton.SetVisible(true, true);
+ goto IL_1362;
+ default:
+ {
+ if (xsysDefine2 != XSysDefine.XSys_IDIP_ZeroReward)
+ {
+ goto IL_133D;
+ }
+ XIDIPDocument specificDocument14 = XDocuments.GetSpecificDocument<XIDIPDocument>(XIDIPDocument.uuID);
+ string leftTimeString = specificDocument14.GetLeftTimeString();
+ bool flag9 = leftTimeString == "0";
+ if (flag9)
+ {
+ specificDocument14.ZeroRewardBtnState = false;
+ this.RefreshH5ButtonState(XSysDefine.XSys_IDIP_ZeroReward, true);
+ }
+ else
+ {
+ string label4 = string.Format(XStringDefineProxy.GetString("IDIP_TIPS_ZEROREWARDClick"), leftTimeString);
+ XSingleton<UiUtility>.singleton.ShowModalDialog(label4, XStringDefineProxy.GetString("COMMON_OK"));
+ }
+ goto IL_1362;
+ }
+ }
+ }
+ }
+ else if (xsysDefine2 <= XSysDefine.XSys_SpriteSystem)
+ {
+ if (xsysDefine2 == XSysDefine.XSys_Photo)
+ {
+ XDanceDocument.Doc.GetAllDanceIDs();
+ this.RefreshV3BtnSelect(go);
+ DlgBase<ScreenShotShareView, ScreenShotShareBehaviour>.singleton.SetVisible(true, true);
+ DlgBase<ScreenShotShareView, ScreenShotShareBehaviour>.singleton.ShowMainView();
+ goto IL_1362;
+ }
+ if (xsysDefine2 != XSysDefine.XSys_SpriteSystem)
+ {
+ goto IL_133D;
+ }
+ DlgBase<SpriteSystemDlg, TabDlgBehaviour>.singleton.ShowWorkGameSystem(XSysDefine.XSys_SpriteSystem_Main);
+ goto IL_1362;
+ }
+ else
+ {
+ switch (xsysDefine2)
+ {
+ case XSysDefine.XSys_QuickRide:
+ {
+ this.RefreshV3BtnSelect(go);
+ XPetDocument specificDocument15 = XDocuments.GetSpecificDocument<XPetDocument>(XPetDocument.uuID);
+ bool flag10 = XSingleton<XAttributeMgr>.singleton.XPlayerData.Outlook.state.type == OutLookStateType.OutLook_RidePetCopilot;
+ if (flag10)
+ {
+ specificDocument15.OnReqOffPetPairRide();
+ }
+ else
+ {
+ bool flag11 = specificDocument15.Pets.Count == 0;
+ if (flag11)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString("PET_NONE"), "fece00");
+ }
+ else
+ {
+ specificDocument15.ReqRecentMount();
+ }
+ }
+ goto IL_1362;
+ }
+ case XSysDefine.XSys_AppStore_Praise:
+ case (XSysDefine)946:
+ case (XSysDefine)947:
+ case (XSysDefine)948:
+ case XSysDefine.XSys_WebView:
+ case XSysDefine.XSys_GameHorde:
+ case (XSysDefine)955:
+ case XSysDefine.XSys_ProfessionChange:
+ case XSysDefine.XSys_Questionnaire:
+ case (XSysDefine)964:
+ case (XSysDefine)965:
+ case (XSysDefine)966:
+ case (XSysDefine)967:
+ case (XSysDefine)968:
+ case (XSysDefine)969:
+ goto IL_133D;
+ case XSysDefine.XSys_Transform:
+ {
+ XTransformDocument specificDocument16 = XDocuments.GetSpecificDocument<XTransformDocument>(XTransformDocument.uuID);
+ specificDocument16.ReqSwitch();
+ goto IL_1362;
+ }
+ case XSysDefine.XSys_GameCommunity:
+ {
+ bool flag12 = this._GameCommunityHandler == null;
+ if (flag12)
+ {
+ this._GameCommunityHandler = DlgHandlerBase.EnsureCreate<GameCommunityHandler>(ref this._GameCommunityHandler, base.uiBehaviour.m_SecondMenu.transform, true, this);
+ }
+ else
+ {
+ this._GameCommunityHandler.SetVisible(!this._GameCommunityHandler.IsVisible());
+ }
+ goto IL_1362;
+ }
+ case XSysDefine.XSys_FriendCircle:
+ dictionary["link"] = XSingleton<XGlobalConfig>.singleton.GetValue("FriendsCircleUrl");
+ XSingleton<XUpdater.XUpdater>.singleton.XPlatform.SendExtDara("open_wx_deeplink", Json.Serialize(dictionary));
+ goto IL_1362;
+ case XSysDefine.XSys_QQVIP:
+ XPlatformAbilityDocument.Doc.ClickRedPointNtf();
+ XPlatformAbilityDocument.Doc.OpenQQVipRechargeH5();
+ goto IL_1362;
+ case XSysDefine.XSys_SystemAnnounce:
+ DlgBase<AnnounceView, AnnounceBehaviour>.singleton.SetVisible(true, true);
+ goto IL_1362;
+ case XSysDefine.XSys_HeroBattle:
+ {
+ XHeroBattleDocument specificDocument17 = XDocuments.GetSpecificDocument<XHeroBattleDocument>(XHeroBattleDocument.uuID);
+ specificDocument17.MaininterfaceState = false;
+ this.RefreshH5ButtonState(XSysDefine.XSys_HeroBattle, true);
+ string label5 = XSingleton<UiUtility>.singleton.ReplaceReturn(XStringDefineProxy.GetString("MainInterfaceHeroBattlePVPTips"));
+ string string7 = XStringDefineProxy.GetString("BtnTips_EnterNow");
+ string string8 = XStringDefineProxy.GetString("BtnTips_Then");
+ XSingleton<UiUtility>.singleton.ShowModalDialog(label5, string7, string8, new ButtonClickEventHandler(this.OnHeroBattleJoin));
+ goto IL_1362;
+ }
+ case XSysDefine.XSys_GuildBossMainInterface:
+ break;
+ case XSysDefine.XSys_GuildMineMainInterface:
+ goto IL_A54;
+ case XSysDefine.XSys_GuildPvpMainInterface:
+ goto IL_A0D;
+ case XSysDefine.XSys_TeamLeague:
+ {
+ XFreeTeamVersusLeagueDocument specificDocument18 = XDocuments.GetSpecificDocument<XFreeTeamVersusLeagueDocument>(XFreeTeamVersusLeagueDocument.uuID);
+ specificDocument18.SetMainInterfaceBtnState(false);
+ string label6 = XSingleton<UiUtility>.singleton.ReplaceReturn(XStringDefineProxy.GetString("MainInterfaceTeamLeagueTips"));
+ string string9 = XStringDefineProxy.GetString("BtnTips_EnterNow");
+ string string10 = XStringDefineProxy.GetString("BtnTips_Then");
+ XSingleton<UiUtility>.singleton.ShowModalDialog(label6, string9, string10, new ButtonClickEventHandler(this.OnTeamLeagueJoin));
+ goto IL_1362;
+ }
+ case XSysDefine.XSys_GuildMineEnd:
+ {
+ RpcC2M_QueryResWar rpcC2M_QueryResWar = new RpcC2M_QueryResWar();
+ rpcC2M_QueryResWar.oArg.param = QueryResWarEnum.RESWAR_FLOWAWARD;
+ XSingleton<XClientNetwork>.singleton.Send(rpcC2M_QueryResWar);
+ XGuildMineEntranceDocument specificDocument19 = XDocuments.GetSpecificDocument<XGuildMineEntranceDocument>(XGuildMineEntranceDocument.uuID);
+ specificDocument19.MainInterfaceStateEnd = false;
+ this.RefreshH5ButtonState(XSysDefine.XSys_GuildMineEnd, true);
+ goto IL_1362;
+ }
+ case XSysDefine.XSys_GuildTerritory:
+ DlgBase<GuildTerritoryMainDlg, GuildTerritoryMainBehaviour>.singleton.SetVisibleWithAnimation(true, null);
+ goto IL_1362;
+ case XSysDefine.XSys_GuildTerritoryIconInterface:
+ {
+ XGuildTerritoryDocument specificDocument20 = XDocuments.GetSpecificDocument<XGuildTerritoryDocument>(XGuildTerritoryDocument.uuID);
+ specificDocument20.OnClickTerritoryIcon();
+ goto IL_1362;
+ }
+ case XSysDefine.XSys_GuildTerritoryAllianceInterface:
+ DlgBase<GuildTerritoryLeagueDlg, GuildTerritoryLeagueBehaviour>.singleton.SetVisibleWithAnimation(true, null);
+ goto IL_1362;
+ case XSysDefine.XSys_GuildTerritoryMessageInterface:
+ {
+ DlgBase<GuildTerritoryMessageDlg, GuildTerritoryMessageBehaviour>.singleton.SetVisibleWithAnimation(true, null);
+ XGuildTerritoryDocument specificDocument21 = XDocuments.GetSpecificDocument<XGuildTerritoryDocument>(XGuildTerritoryDocument.uuID);
+ specificDocument21.bHavaShowMessageIcon = false;
+ goto IL_1362;
+ }
+ default:
+ if (xsysDefine2 == XSysDefine.XSys_Platform_StartPrivilege)
+ {
+ DlgBase<XQQWXGameCenterPrivilegeView, XQQWXGameCenterPrivilegeBehaviour>.singleton.SetVisibleWithAnimation(true, null);
+ goto IL_1362;
+ }
+ switch (xsysDefine2)
+ {
+ case XSysDefine.XSys_Exchange:
+ DlgBase<RequestDlg, RequestBehaviour>.singleton.SetVisibleWithAnimation(true, null);
+ goto IL_1362;
+ case XSysDefine.XSys_GuildCollectMainInterface:
+ {
+ XGuildCollectDocument specificDocument22 = XDocuments.GetSpecificDocument<XGuildCollectDocument>(XGuildCollectDocument.uuID);
+ specificDocument22.SetMainInterfaceBtnState(false);
+ XGuildDocument specificDocument23 = XDocuments.GetSpecificDocument<XGuildDocument>(XGuildDocument.uuID);
+ bool bInGuild = specificDocument23.bInGuild;
+ if (bInGuild)
+ {
+ string label7 = XSingleton<UiUtility>.singleton.ReplaceReturn(XStringDefineProxy.GetString("GuildCollectJoinTips1"));
+ string string11 = XStringDefineProxy.GetString("BtnTips_EnterNow");
+ string string12 = XStringDefineProxy.GetString("BtnTips_Then");
+ XSingleton<UiUtility>.singleton.ShowModalDialog(label7, string11, string12, new ButtonClickEventHandler(this.OnJoinGuildBtnClick));
+ }
+ else
+ {
+ string label8 = XSingleton<UiUtility>.singleton.ReplaceReturn(XStringDefineProxy.GetString("GuildCollectJoinTips2"));
+ string string13 = XStringDefineProxy.GetString("BtnTips_EnterGuild");
+ string string14 = XStringDefineProxy.GetString("BtnTips_Then");
+ XSingleton<UiUtility>.singleton.ShowModalDialog(label8, string13, string14, new ButtonClickEventHandler(this.OnJoinGuildBtnClick));
+ }
+ goto IL_1362;
+ }
+ case XSysDefine.XSys_GuildCollect:
+ DlgBase<GuildCollectRewardDlg, GuildCollectRewardBehaviour>.singleton.SetVisibleWithAnimation(true, null);
+ goto IL_1362;
+ case XSysDefine.XSys_BackFlowMall:
+ case XSysDefine.XSys_BackFlowWelfare:
+ case (XSysDefine)995:
+ goto IL_133D;
+ case XSysDefine.XSys_GuildCollectSummon:
+ {
+ XGuildCollectDocument specificDocument24 = XDocuments.GetSpecificDocument<XGuildCollectDocument>(XGuildCollectDocument.uuID);
+ specificDocument24.QuerySummon();
+ goto IL_1362;
+ }
+ default:
+ goto IL_133D;
+ }
+ break;
+ }
+ }
+ DlgBase<XGuildDragonView, XGuildDragonBehaviour>.singleton.ShowGuildBossView();
+ goto IL_1362;
+ IL_A0D:
+ DlgBase<XGuildArenaDlg, TabDlgBehaviour>.singleton.SetVisibleWithAnimation(true, null);
+ XGuildArenaDocument specificDocument25 = XDocuments.GetSpecificDocument<XGuildArenaDocument>(XGuildArenaDocument.uuID);
+ specificDocument25.bHasAvailableArenaIcon = false;
+ goto IL_1362;
+ IL_A54:
+ DlgBase<GuildMineEntranceView, GuildMineEntranceBehaviour>.singleton.SetVisibleWithAnimation(true, null);
+ goto IL_1362;
+ IL_133D:
+ XSingleton<XDebug>.singleton.AddErrorLog("This system hasn't finished: ", xsysDefine.ToString(), null, null, null, null);
+ IL_1362:
+ result = true;
+ }
+ }
+ return result;
+ }
+
+ public void SetSystemRedPointState(XSysDefine sys, bool state)
+ {
+ bool flag = sys == XSysDefine.XSys_GuildDailyTask;
+ if (flag)
+ {
+ this._TaskNaviHandler.TaskHandler.RefreshVisibleContents();
+ }
+ else
+ {
+ bool flag2 = sys == XSysDefine.XSys_GuildWeeklyBountyTask;
+ if (flag2)
+ {
+ this._TaskNaviHandler.TaskHandler.RefreshVisibleContents();
+ }
+ else
+ {
+ IXUIButton sysButton = base.uiBehaviour.GetSysButton(sys);
+ bool flag3 = sysButton == null;
+ if (!flag3)
+ {
+ Transform transform = sysButton.gameObject.transform.Find("RedPoint");
+ bool flag4 = transform != null;
+ if (flag4)
+ {
+ transform.gameObject.SetActive(state);
+ }
+ }
+ }
+ }
+ }
+
+ public void InitRedPointsWhenShow()
+ {
+ XGameSysMgr singleton = XSingleton<XGameSysMgr>.singleton;
+ for (int i = 0; i < base.uiBehaviour.m_SysButtonsMapping.Length; i++)
+ {
+ bool flag = base.uiBehaviour.m_SysButtonsMapping[i] != null;
+ if (flag)
+ {
+ XSysDefine sys = (XSysDefine)i;
+ List<XSysDefine> childSys = singleton.GetChildSys(sys);
+ for (int j = 0; j < childSys.Count; j++)
+ {
+ singleton.RecalculateRedPointState(childSys[j], false);
+ }
+ singleton.UpdateRedPointOnHallUI(sys);
+ }
+ }
+ this.OnGuildSysChange();
+ }
+
+ public void InitSevenLoginWhenShow()
+ {
+ bool flag = base.uiBehaviour == null || base.uiBehaviour.m_SevenLoginMessage == null;
+ if (!flag)
+ {
+ XSevenLoginDocument specificDocument = XDocuments.GetSpecificDocument<XSevenLoginDocument>(XSevenLoginDocument.uuID);
+ bool flag2 = !specificDocument.bHasAvailableSevenIcon;
+ if (!flag2)
+ {
+ string empty = string.Empty;
+ string empty2 = string.Empty;
+ bool flag3 = specificDocument.TryGetHallMessage(out empty, out empty2);
+ if (flag3)
+ {
+ base.uiBehaviour.m_SevenLoginMessage.SetText(empty);
+ base.uiBehaviour.m_SevenLoginSprite.SetSprite(empty2);
+ base.uiBehaviour.m_SevenLoginSprite.MakePixelPerfect();
+ }
+ }
+ }
+ }
+
+ public void SetMultiActivityTips(object o = null)
+ {
+ XActivityDocument doc = XActivityDocument.Doc;
+ bool flag = base.uiBehaviour.m_MulActTips.IsVisible() && doc.MainInterfaceTips != null && doc.MainInterfaceTips != "";
+ if (flag)
+ {
+ base.uiBehaviour.m_MulActTips.SetText(doc.MainInterfaceTips);
+ IXUITweenTool ixuitweenTool = base.uiBehaviour.m_MulActTips.gameObject.GetComponent("XUIPlayTween") as IXUITweenTool;
+ ixuitweenTool.PlayTween(true, -1f);
+ }
+ XSingleton<XTimerMgr>.singleton.KillTimer(this.MulActTipsToken);
+ this.MulActTipsToken = XSingleton<XTimerMgr>.singleton.SetTimer((float)this._MulActTipsCD, new XTimerMgr.ElapsedEventHandler(this.SetMultiActivityTips), null);
+ }
+
+ public void OnVoiceBtnAppear(uint textType)
+ {
+ XVoiceQADocument specificDocument = XDocuments.GetSpecificDocument<XVoiceQADocument>(XVoiceQADocument.uuID);
+ specificDocument.MainInterFaceBtnState = true;
+ this.RefreshH5ButtonState(XSysDefine.XSys_GuildRelax_VoiceQA, true);
+ }
+
+ public bool OnVoiceQAJoin(IXUIButton btn)
+ {
+ XVoiceQADocument specificDocument = XDocuments.GetSpecificDocument<XVoiceQADocument>(XVoiceQADocument.uuID);
+ specificDocument.VoiceQAJoinChoose(true, specificDocument.TempType);
+ DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.SetVisible(false, true);
+ return true;
+ }
+
+ public bool OnVoiceQARefuse(IXUIButton btn)
+ {
+ XVoiceQADocument specificDocument = XDocuments.GetSpecificDocument<XVoiceQADocument>(XVoiceQADocument.uuID);
+ specificDocument.VoiceQAJoinChoose(false, specificDocument.TempType);
+ DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.SetVisible(false, true);
+ return true;
+ }
+
+ private bool OnCaptainJoin(IXUIButton btn)
+ {
+ XSingleton<XGameSysMgr>.singleton.OpenSystem(XSysDefine.XSys_Activity_CaptainPVP, 0UL);
+ DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.SetVisible(false, true);
+ return true;
+ }
+
+ private bool OnTeamLeagueJoin(IXUIButton btn)
+ {
+ LeagueBattleTimeState todayState = XFreeTeamVersusLeagueDocument.Doc.TodayState;
+ bool flag = todayState == LeagueBattleTimeState.LBTS_CrossElimination || todayState == LeagueBattleTimeState.LBTS_Elimination;
+ if (flag)
+ {
+ DlgBase<XTeamLeagueFinalResultView, XTeamLeagueFinalResultBehavior>.singleton.SetVisibleWithAnimation(true, null);
+ }
+ else
+ {
+ DlgBase<XFreeTeamLeagueMainView, XFreeTeamLeagueMainBehavior>.singleton.SetVisibleWithAnimation(true, null);
+ }
+ DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.SetVisible(false, true);
+ return true;
+ }
+
+ private bool OnHeroBattleJoin(IXUIButton btn)
+ {
+ XSingleton<XGameSysMgr>.singleton.OpenSystem(XSysDefine.XSys_HeroBattle, 0UL);
+ DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.SetVisible(false, true);
+ return true;
+ }
+
+ private bool OnExcellentLiveClick(IXUIButton btn)
+ {
+ DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.SetVisible(false, true);
+ XSpectateDocument specificDocument = XDocuments.GetSpecificDocument<XSpectateDocument>(XSpectateDocument.uuID);
+ specificDocument.MainInterfaceEnterQuery();
+ return true;
+ }
+
+ private bool OnJoinGuildBtnClick(IXUIButton btn)
+ {
+ DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.SetVisible(false, true);
+ XGuildDocument specificDocument = XDocuments.GetSpecificDocument<XGuildDocument>(XGuildDocument.uuID);
+ specificDocument.TryEnterGuildScene();
+ return true;
+ }
+
+ public void ShowRemoveSealLeftTime(IXUILabel label, ref XLeftTimeCounter _LevelSealCDCounter, ref bool isLevelSealCountdown)
+ {
+ XLevelSealDocument specificDocument = XDocuments.GetSpecificDocument<XLevelSealDocument>(XLevelSealDocument.uuID);
+ int leftTime = specificDocument.GetLeftTime();
+ bool flag = leftTime >= 86400;
+ if (flag)
+ {
+ isLevelSealCountdown = false;
+ string text = string.Format(XSingleton<XStringTable>.singleton.GetString("SEAL_REMOVE_LEFT"), XSingleton<UiUtility>.singleton.TimeAccFormatString(leftTime, 1, 1));
+ label.SetText(text);
+ }
+ else
+ {
+ bool flag2 = leftTime <= 0;
+ if (flag2)
+ {
+ isLevelSealCountdown = false;
+ string text2 = string.Format(XSingleton<XStringTable>.singleton.GetString("SEAL_REMOVE_LEFT"), "00:00");
+ label.SetText(text2);
+ }
+ else
+ {
+ isLevelSealCountdown = true;
+ bool flag3 = _LevelSealCDCounter == null;
+ if (flag3)
+ {
+ _LevelSealCDCounter = new XLeftTimeCounter(label, false);
+ }
+ _LevelSealCDCounter.SetLeftTime((float)leftTime, -1);
+ _LevelSealCDCounter.SetFormatString(XSingleton<XStringTable>.singleton.GetString("SEAL_REMOVE_LEFT"));
+ _LevelSealCDCounter.SetTimeFormat(2, 3, 3, false);
+ _LevelSealCDCounter.SetCarry();
+ }
+ }
+ }
+
+ public void PlayGetPartnerEffect()
+ {
+ XSingleton<XFxMgr>.singleton.CreateAndPlay("Effects/FX_Particle/UIfx/UI_yh", base.uiBehaviour.transform, Vector3.zero, Vector3.one, 1f, true, 3f, true);
+ }
+
+ public void ShowLiveCount(uint count)
+ {
+ base.uiBehaviour.m_LiveTips.SetActive(count > 0u);
+ bool flag = count > 9u;
+ if (flag)
+ {
+ base.uiBehaviour.m_LiveCount.SetText("...");
+ }
+ else
+ {
+ base.uiBehaviour.m_LiveCount.SetText(count.ToString());
+ }
+ }
+
+ public bool SetSystemAnnounce()
+ {
+ SystemAnnounce.RowData sysAnnounceData = XSingleton<XGameSysMgr>.singleton.GetSysAnnounceData(XSingleton<XAttributeMgr>.singleton.XPlayerData.Level);
+ bool flag = sysAnnounceData == null;
+ bool result;
+ if (flag)
+ {
+ result = false;
+ }
+ else
+ {
+ IXUIButton sysButton = base.uiBehaviour.GetSysButton(XSysDefine.XSys_SystemAnnounce);
+ IXUILabel ixuilabel = sysButton.gameObject.transform.Find("Level").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel.SetText(sysAnnounceData.OpenAnnounceLevel.ToString());
+ IXUISprite ixuisprite = sysButton.gameObject.transform.Find("Icon").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.spriteName = sysAnnounceData.AnnounceIcon;
+ IXUISprite ixuisprite2 = sysButton.gameObject.transform.Find("Name").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite2.spriteName = sysAnnounceData.TextSpriteName;
+ ixuisprite2.MakePixelPerfect();
+ result = true;
+ }
+ return result;
+ }
+
+ public void SetGetExpAnimation(ulong exp, Vector3 pos)
+ {
+ bool flag = Camera.main == null;
+ if (!flag)
+ {
+ XSingleton<XDebug>.singleton.AddGreenLog("exp:", exp.ToString(), null, null, null, null);
+ int curExpInd = this._curExpInd;
+ this._curExpInd = (this._curExpInd + 1) % this._maxExpCount;
+ Vector3 vector = Camera.main.WorldToScreenPoint(pos);
+ Vector3 vector2 = XSingleton<XGameUI>.singleton.UICamera.ScreenToWorldPoint(vector);
+ vector2.z = 0f;
+ base.uiBehaviour.m_ExpValueMgr[curExpInd].gameObject.transform.InverseTransformPoint(vector2);
+ base.uiBehaviour.m_ExpValueMgr[curExpInd].SetText(string.Format("jy+{0}", exp));
+ base.uiBehaviour.m_ExpAnimationMgr[curExpInd].PlayTween(true, -1f);
+ }
+ }
+
+ public Vector3 GetSelectDanceMotionBtnPos()
+ {
+ bool flag = this.lastSelectV3Button != null;
+ Vector3 result;
+ if (flag)
+ {
+ result = this.lastSelectV3Button.gameObject.transform.position;
+ }
+ else
+ {
+ result = Vector3.zero;
+ }
+ return result;
+ }
+
+ private void RefreshV3BtnSelect(IXUIButton newBtn)
+ {
+ bool flag = this._DanceMotionHandler != null;
+ if (flag)
+ {
+ this._DanceMotionHandler.SetVisible(false);
+ }
+ bool flag2 = this.lastSelectV3Button != null;
+ if (flag2)
+ {
+ Transform transform = this.lastSelectV3Button.gameObject.transform.Find("Select");
+ bool flag3 = transform != null;
+ if (flag3)
+ {
+ transform.gameObject.SetActive(false);
+ }
+ }
+ bool flag4 = newBtn != null;
+ if (flag4)
+ {
+ Transform transform2 = newBtn.gameObject.transform.Find("Select");
+ bool flag5 = transform2 != null;
+ if (flag5)
+ {
+ transform2.gameObject.SetActive(true);
+ }
+ }
+ this.lastSelectV3Button = newBtn;
+ }
+
+ private bool OnMotionClicked(IXUIButton btn)
+ {
+ bool flag = !base.IsLoaded();
+ bool result;
+ if (flag)
+ {
+ result = true;
+ }
+ else
+ {
+ bool flag2 = false;
+ bool flag3 = this.lastSelectV3Button != null && this.lastSelectV3Button == btn && this._DanceMotionHandler != null && this._DanceMotionHandler.IsVisible();
+ if (flag3)
+ {
+ flag2 = true;
+ }
+ this.RefreshV3BtnSelect(btn);
+ bool flag4 = !flag2 && this._DanceMotionHandler != null;
+ if (flag4)
+ {
+ this._DanceMotionHandler.SetVisible(true);
+ XDanceDocument.Doc.GetDanceIDs((uint)btn.ID);
+ }
+ result = true;
+ }
+ return result;
+ }
+
+ public void RefreshMotionPanel(List<DanceMotionData> motions)
+ {
+ bool flag = this._DanceMotionHandler != null && this._DanceMotionHandler.IsVisible();
+ if (flag)
+ {
+ this._DanceMotionHandler.RefreshMotionPanel(motions);
+ }
+ }
+
+ private void OnV3SwitchBtnClick(IXUISprite iSp)
+ {
+ bool flag = !base.IsLoaded();
+ if (!flag)
+ {
+ this._V3SwitchBtnState = !this._V3SwitchBtnState;
+ int tweenGroup = this._V3SwitchBtnState ? 1 : 2;
+ base.uiBehaviour.m_V3ListTween.SetTweenGroup(tweenGroup);
+ base.uiBehaviour.m_V3ListTween.PlayTween(true, -1f);
+ base.uiBehaviour.m_V3SwitchTween.SetTweenGroup(tweenGroup);
+ base.uiBehaviour.m_V3SwitchTween.PlayTween(true, -1f);
+ bool flag2 = !this._V3SwitchBtnState;
+ if (flag2)
+ {
+ bool flag3 = this._DanceMotionHandler != null;
+ if (flag3)
+ {
+ this._DanceMotionHandler.SetVisible(false);
+ }
+ }
+ else
+ {
+ XTransformDocument specificDocument = XDocuments.GetSpecificDocument<XTransformDocument>(XTransformDocument.uuID);
+ specificDocument.ReqLeftTime();
+ }
+ }
+ }
+
+ private void OnH2SwitchBtnClick(IXUISprite iSp)
+ {
+ bool flag = !base.IsLoaded();
+ if (!flag)
+ {
+ this._H2SwitchBtnState = !this._H2SwitchBtnState;
+ bool h2SwitchBtnState = this._H2SwitchBtnState;
+ if (h2SwitchBtnState)
+ {
+ GameObject gameObject = base.uiBehaviour.m_H2SwitchBtn.gameObject.transform.Find("RedPoint").gameObject;
+ gameObject.SetActive(false);
+ }
+ int tweenGroup = this._H2SwitchBtnState ? 1 : 0;
+ base.uiBehaviour.m_H2ListTween.SetTweenGroup(tweenGroup);
+ base.uiBehaviour.m_H2SwitchTween.SetTweenGroup(tweenGroup);
+ base.uiBehaviour.m_H2ListTween.PlayTween(true, -1f);
+ base.uiBehaviour.m_H2SwitchTween.PlayTween(true, -1f);
+ }
+ }
+
+ public void CalH2SwitchBtnRedPointState(IXUITweenTool o = null)
+ {
+ bool flag = !base.IsLoaded();
+ if (!flag)
+ {
+ GameObject gameObject = base.uiBehaviour.m_H2SwitchBtn.gameObject.transform.Find("RedPoint").gameObject;
+ bool h2SwitchBtnState = this._H2SwitchBtnState;
+ if (h2SwitchBtnState)
+ {
+ gameObject.SetActive(false);
+ }
+ else
+ {
+ gameObject.SetActive(this.CalMenuUIRedPoint(XSysDefine.XSys_GameMall) || this.CalMenuUIRedPoint(XSysDefine.XSys_Auction) || this.CalMenuUIRedPoint(XSysDefine.XSys_Reward) || this.CalMenuUIRedPoint(XSysDefine.XSys_Welfare) || this.CalMenuUIRedPoint(XSysDefine.Xsys_Backflow) || this.CalMenuUIRedPoint(XSysDefine.XSys_Strong) || this.CalMenuUIRedPoint(XSysDefine.XSys_Spectate) || this.CalMenuUIRedPoint(XSysDefine.XSys_OperatingActivity) || this.CalMenuUIRedPoint(XSysDefine.XSys_Welfare_FirstRechange) || this.CalMenuUIRedPoint(XSysDefine.XSys_SevenActivity) || this.CalMenuUIRedPoint(XSysDefine.XSys_ThemeActivity) || this.CalMenuUIRedPoint(XSysDefine.XSys_Carnival));
+ }
+ }
+ }
+
+ private void OnMenuSwitchBtnClick(IXUISprite iSp)
+ {
+ bool flag = !base.IsLoaded();
+ if (!flag)
+ {
+ this._MenuSwitchBtnState = !this._MenuSwitchBtnState;
+ this.CalMenuSwitchBtnRedPointState();
+ int tweenGroup = this._MenuSwitchBtnState ? 1 : 2;
+ base.uiBehaviour.m_MenuSwitchBtnTween.SetTweenGroup(tweenGroup);
+ bool flag2 = this.m_curScene == SceneType.SCENE_HALL;
+ if (flag2)
+ {
+ base.uiBehaviour.m_SysListH0Tween.SetTweenGroup(tweenGroup);
+ base.uiBehaviour.m_SysListH0Tween.PlayTween(true, -1f);
+ }
+ else
+ {
+ bool flag3 = this.m_curScene == SceneType.SCENE_GUILD_HALL;
+ if (flag3)
+ {
+ base.uiBehaviour.m_SysListH2Tween.SetTweenGroup(tweenGroup);
+ base.uiBehaviour.m_SysListH2Tween.PlayTween(true, -1f);
+ }
+ else
+ {
+ bool flag4 = this.m_curScene == SceneType.SCENE_FAMILYGARDEN;
+ if (flag4)
+ {
+ base.uiBehaviour.m_SysListH3Tween.SetTweenGroup(tweenGroup);
+ base.uiBehaviour.m_SysListH3Tween.PlayTween(true, -1f);
+ }
+ }
+ }
+ base.uiBehaviour.m_SysListH1Tween.SetTweenGroup(tweenGroup);
+ base.uiBehaviour.m_SysListH1Tween.PlayTween(true, -1f);
+ base.uiBehaviour.m_MenuSwitchBtnTween.PlayTween(true, -1f);
+ }
+ }
+
+ public void CalMenuSwitchBtnRedPointState()
+ {
+ bool flag = !base.IsVisible();
+ if (!flag)
+ {
+ GameObject gameObject = base.uiBehaviour.m_MenuSwitchBtn.gameObject.transform.Find("RedPoint").gameObject;
+ bool menuSwitchBtnState = this._MenuSwitchBtnState;
+ if (menuSwitchBtnState)
+ {
+ bool flag2 = this.m_curScene == SceneType.SCENE_HALL;
+ if (flag2)
+ {
+ gameObject.SetActive(this.CalMenuUIRedPoint(XSysDefine.XSys_Friends) || this.CalMenuUIRedPoint(XSysDefine.XSys_Home) || this.CalMenuUIRedPoint(XSysDefine.XSys_Rank) || this.CalMenuUIRedPoint(XSysDefine.XSys_CardCollect) || this.CalMenuUIRedPoint(XSysDefine.XSys_NPCFavor));
+ }
+ else
+ {
+ bool flag3 = this.m_curScene == SceneType.SCENE_GUILD_HALL;
+ if (flag3)
+ {
+ gameObject.SetActive(this.CalMenuUIRedPoint(XSysDefine.XSys_GuildHall) || this.CalMenuUIRedPoint(XSysDefine.XSys_GuildRelax));
+ }
+ }
+ }
+ else
+ {
+ bool flag4 = false;
+ foreach (XSysDefine sys in base.uiBehaviour.m_SysH1)
+ {
+ flag4 = (flag4 || this.CalMenuUIRedPoint(sys));
+ }
+ gameObject.SetActive(flag4);
+ }
+ }
+ }
+
+ private bool CalMenuUIRedPoint(XSysDefine sys)
+ {
+ return XSingleton<XGameSysMgr>.singleton.IsSystemOpened(sys) && XSingleton<XGameSysMgr>.singleton.GetSysRedPointStateConsiderBlock(sys);
+ }
+
+ private void RefreshListSwitchBtnVisable(IXUIObject iSp, IXUIList uiList, IXUIList uiList2 = null)
+ {
+ bool flag = false;
+ for (int i = 0; i < uiList.gameObject.transform.childCount; i++)
+ {
+ Transform child = uiList.gameObject.transform.GetChild(i);
+ bool activeSelf = child.gameObject.activeSelf;
+ if (activeSelf)
+ {
+ flag = true;
+ break;
+ }
+ }
+ bool flag2 = uiList2 == null || flag;
+ if (flag2)
+ {
+ iSp.SetVisible(flag);
+ }
+ else
+ {
+ for (int j = 0; j < uiList2.gameObject.transform.childCount; j++)
+ {
+ Transform child2 = uiList2.gameObject.transform.GetChild(j);
+ bool activeSelf2 = child2.gameObject.activeSelf;
+ if (activeSelf2)
+ {
+ flag = true;
+ break;
+ }
+ }
+ iSp.SetVisible(flag);
+ }
+ }
+
+ private void RefreshV3H1OnOtherScene()
+ {
+ foreach (XSysDefine sys in base.uiBehaviour.m_SysV3)
+ {
+ this.OnSingleSysChange(sys, false);
+ }
+ base.uiBehaviour.m_SysListV3.Refresh();
+ foreach (XSysDefine sys2 in base.uiBehaviour.m_SysH1)
+ {
+ this.OnSingleSysChange(sys2, false);
+ }
+ base.uiBehaviour.m_SysListH1.Refresh();
+ }
+
+ public bool IsSupportQgame()
+ {
+ bool flag = XSingleton<XLoginDocument>.singleton.Channel == XAuthorizationChannel.XAuthorization_QQ;
+ bool flag2 = SystemInfo.processorType.StartsWith("Intel");
+ bool flag3 = SystemInfo.systemMemorySize >= XSingleton<XGlobalConfig>.singleton.GetInt("QGameMemory");
+ return XSingleton<XUpdater.XUpdater>.singleton.XBroadCast.IsBroadState() && flag && !flag2 && flag3;
+ }
+
+ private bool OnQGameClick(IXUIButton btn)
+ {
+ bool isPlaying = DlgBase<ReplaykitDlg, ReplayBehaviour>.singleton.isPlaying;
+ bool result;
+ if (isPlaying)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString("Replay_IsPlaying"), "fece00");
+ result = false;
+ }
+ else
+ {
+ XRadioDocument specificDocument = XDocuments.GetSpecificDocument<XRadioDocument>(XRadioDocument.uuID);
+ bool flag = specificDocument.roomState == XRadioDocument.BigRoomState.OutRoom;
+ if (flag)
+ {
+ XSingleton<XUpdater.XUpdater>.singleton.XBroadCast.EnterHall();
+ PtcC2G_CloseHintNtf ptcC2G_CloseHintNtf = new PtcC2G_CloseHintNtf();
+ ptcC2G_CloseHintNtf.Data.systemid = 80u;
+ XSingleton<XClientNetwork>.singleton.Send(ptcC2G_CloseHintNtf);
+ }
+ else
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString("ERR_FM_FORBID1"), "fece00");
+ }
+ result = true;
+ }
+ return result;
+ }
+
+ public void RefreshGuildCollectTime(int time, int summonTime)
+ {
+ base.uiBehaviour.m_GuildCollectLeftTime.SetText(XSingleton<UiUtility>.singleton.TimeFormatString(time, 2, 3, 4, false, true));
+ base.uiBehaviour.m_GuildCollectSummonTime.SetText(XSingleton<UiUtility>.singleton.TimeFormatString(summonTime, 2, 3, 4, false, true));
+ }
+
+ public void OnShowFlowBack()
+ {
+ Transform uiroot = XSingleton<UIManager>.singleton.UIRoot;
+ bool flag = uiroot != null;
+ if (flag)
+ {
+ Transform transform = uiroot.Find("Camera");
+ bool flag2 = transform != null;
+ if (flag2)
+ {
+ XFx xfx = XSingleton<XFxMgr>.singleton.CreateUIFx("Effects/FX_Particle/UIfx/UI_huanyinghuigu", transform, false);
+ bool flag3 = xfx != null;
+ if (flag3)
+ {
+ float num = 1.3f;
+ xfx.DelayDestroy = num;
+ XSingleton<XFxMgr>.singleton.DestroyFx(xfx, false);
+ XSingleton<XTimerMgr>.singleton.SetTimer(num, delegate(object param)
+ {
+ string @string = XStringDefineProxy.GetString("BackFlowWelcom");
+ string string2 = XStringDefineProxy.GetString("BackFlowWelcomCotent");
+ XSingleton<UiUtility>.singleton.ShowModalDialogWithTitle(@string, string2, XStringDefineProxy.GetString(XStringDefine.COMMON_OK), delegate(IXUIButton button)
+ {
+ this.MainDoc.BackFlow = false;
+ DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.SetVisible(false, true);
+ XSingleton<XShell>.singleton.Pause = false;
+ return true;
+ }, 50);
+ }, null);
+ }
+ }
+ }
+ }
+
+ public void SetTransformLeftTime(float time)
+ {
+ bool flag = !base.IsLoaded();
+ if (!flag)
+ {
+ base.uiBehaviour.m_TransformLeftTime.SetLeftTime(time, -1);
+ }
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/XMainInterface.cs.meta b/Client/Assets/Scripts/XMainClient/UI/XMainInterface.cs.meta
new file mode 100644
index 00000000..bc5b9010
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XMainInterface.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: f94ad8960f1b7cc4abaf8fa5b4e065ec
+timeCreated: 1611404898
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/XMainInterfaceBehaviour.cs b/Client/Assets/Scripts/XMainClient/UI/XMainInterfaceBehaviour.cs
new file mode 100644
index 00000000..5035bed3
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XMainInterfaceBehaviour.cs
@@ -0,0 +1,440 @@
+using System;
+using System.Collections.Generic;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class XMainInterfaceBehaviour : DlgBehaviourBase
+ {
+ public Transform m_Canvas;
+
+ public GameObject m_SecondMenu;
+
+ public GameObject m_MainMenuGo;
+
+ public IXUIList m_SysListH1;
+
+ public IXUIList m_SysListH0;
+
+ public IXUIList m_SysListH2;
+
+ public IXUIList m_SysListH3;
+
+ public IXUISprite m_MenuSwitchBtn;
+
+ public IXUITweenTool m_SysListH1Tween;
+
+ public IXUITweenTool m_SysListH0Tween;
+
+ public IXUITweenTool m_SysListH2Tween;
+
+ public IXUITweenTool m_SysListH3Tween;
+
+ public IXUITweenTool m_MenuSwitchBtnTween;
+
+ public IXUIList m_SysListV1;
+
+ public IXUIList m_SysListV2;
+
+ public IXUIList m_SysListV3;
+
+ public IXUISprite m_V3SwitchBtn;
+
+ public IXUIList m_SysListH2_1;
+
+ public IXUIList m_SysListH2_2;
+
+ public IXUISprite m_H2SwitchBtn;
+
+ public IXUITweenTool m_H2ListTween;
+
+ public IXUITweenTool m_H2SwitchTween;
+
+ public IXUIList m_SysListGuildH1;
+
+ public IXUIList m_SysListGuildV1;
+
+ public IXUIList m_SysListGuildH2;
+
+ public IXUITweenTool m_V3SwitchTween;
+
+ public IXUITweenTool m_V3ListTween;
+
+ public IXUIButton m_MotionDance;
+
+ public IXUIButton m_MotionLover;
+
+ public GameObject m_DanceMotion;
+
+ public GameObject m_SysGrid;
+
+ public IXUIButton m_ExitGuild;
+
+ public IXUITweenTool m_HeadMenuTween;
+
+ public GameObject m_HeadMenuTweenGameObject;
+
+ public IXUISlider m_sliderBattery;
+
+ public IXUILabel m_lblTime;
+
+ public IXUILabel m_lblFree;
+
+ public GameObject m_AvatarFrame;
+
+ public IXUISprite m_PlayerAvatar;
+
+ public IXUISprite m_sprFrame;
+
+ public IXUITexture m_txtAvatar;
+
+ public GameObject m_PlayerPPT;
+
+ public IXUILabel m_Level;
+
+ public GameObject m_PING;
+
+ public IXUILabel m_GuildCollectLeftTime;
+
+ public IXUILabel m_GuildCollectSummonTime;
+
+ public XLeftTimeCounter m_TransformLeftTime;
+
+ public List<XTitanItem> m_MoneyList = new List<XTitanItem>();
+
+ public GameObject m_TaskNaviFrame;
+
+ public IXUITweenTool m_FakeShowSelfTween;
+
+ public IXUISprite m_RecoverTime;
+
+ public IXUILabel m_CurFatige;
+
+ public IXUILabel m_AllCoverTime;
+
+ public IXUILabel m_CoverOneTime;
+
+ public GameObject m_HomeGo;
+
+ public GameObject m_FxFirework;
+
+ public IXUILabel m_RemoveSealTip;
+
+ public GameObject m_LiveTips;
+
+ public IXUILabel m_LiveCount;
+
+ public IXUILabel m_MulActTips;
+
+ public IXUILabel m_SevenLoginMessage;
+
+ public IXUISprite m_SevenLoginSprite;
+
+ public List<IXUITweenTool> m_ExpAnimationMgr = new List<IXUITweenTool>();
+
+ public List<IXUILabel> m_ExpValueMgr = new List<IXUILabel>();
+
+ public IXUIButton[] m_SysButtonsMapping = new IXUIButton[1024];
+
+ public List<XSysDefine> m_ListSys = new List<XSysDefine>();
+
+ public XSysDefine[] m_SysGuild = new XSysDefine[]
+ {
+ XSysDefine.XSys_GuildHall,
+ XSysDefine.XSys_GuildRelax,
+ XSysDefine.XSys_CrossGVG,
+ XSysDefine.XSys_GuildDragon,
+ XSysDefine.XSys_GuildPvp,
+ XSysDefine.XSys_GuildMine,
+ XSysDefine.XSys_GuildTerritory
+ };
+
+ public HashSet<XSysDefine> m_SysGuildNormal = new HashSet<XSysDefine>(default(XFastEnumIntEqualityComparer<XSysDefine>))
+ {
+ XSysDefine.XSys_GuildCollect,
+ XSysDefine.XSys_GuildCollectSummon
+ };
+
+ public XSysDefine[] m_SysChar = new XSysDefine[]
+ {
+ XSysDefine.XSys_Char,
+ XSysDefine.XSys_Bag
+ };
+
+ public XSysDefine[] m_SysH4 = new XSysDefine[]
+ {
+ XSysDefine.XSys_Chat,
+ XSysDefine.XSys_Setting,
+ XSysDefine.XSys_Mail
+ };
+
+ public HashSet<XSysDefine> m_SysH1 = new HashSet<XSysDefine>(default(XFastEnumIntEqualityComparer<XSysDefine>))
+ {
+ XSysDefine.XSys_Item,
+ XSysDefine.XSys_Skill,
+ XSysDefine.XSys_SpriteSystem,
+ XSysDefine.XSys_Horse,
+ XSysDefine.XSys_EquipCreate
+ };
+
+ public HashSet<XSysDefine> m_SysV3 = new HashSet<XSysDefine>(default(XFastEnumIntEqualityComparer<XSysDefine>))
+ {
+ XSysDefine.XSys_QuickRide,
+ XSysDefine.XSys_Photo
+ };
+
+ private void Awake()
+ {
+ this.m_Canvas = base.transform.Find("_canvas");
+ Transform transform = base.transform.Find("_canvas/MainMenuFrame/MainMenu/Panel1/SysGridH1");
+ this.m_SysListH1 = (transform.GetComponent("XUIList") as IXUIList);
+ this.m_SysListH1Tween = (transform.GetComponent("XUIPlayTween") as IXUITweenTool);
+ transform = base.transform.Find("_canvas/MainMenuFrame/MainMenu/Panel1/SysGridH0");
+ this.m_SysListH0 = (transform.GetComponent("XUIList") as IXUIList);
+ this.m_SysListH0Tween = (transform.GetComponent("XUIPlayTween") as IXUITweenTool);
+ transform = base.transform.Find("_canvas/MainMenuFrame/MainMenu/Panel1/SysGridGuildH1");
+ this.m_SysListH2 = (transform.GetComponent("XUIList") as IXUIList);
+ this.m_SysListH2Tween = (transform.GetComponent("XUIPlayTween") as IXUITweenTool);
+ transform = base.transform.Find("_canvas/MainMenuFrame/MainMenu/Panel1/SysGridH3");
+ this.m_SysListH3 = (transform.GetComponent("XUIList") as IXUIList);
+ this.m_SysListH3Tween = (transform.GetComponent("XUIPlayTween") as IXUITweenTool);
+ transform = base.transform.Find("_canvas/MainMenuFrame/MainMenu/MenuSwitchBtn");
+ this.m_MenuSwitchBtn = (transform.GetComponent("XUISprite") as IXUISprite);
+ this.m_MenuSwitchBtnTween = (transform.GetComponent("XUIPlayTween") as IXUITweenTool);
+ transform = base.transform.Find("_canvas/MainMenuFrame/MainMenu/Panel1/SysGridGuildH1");
+ this.m_SysListGuildH1 = (transform.GetComponent("XUIList") as IXUIList);
+ transform = base.transform.Find("_canvas/MainMenuFrame/MainMenu/Panel2/SysGridGuildV1");
+ this.m_SysListGuildV1 = (transform.GetComponent("XUIList") as IXUIList);
+ transform = base.transform.Find("_canvas/SecondMenuFrame/SysGridGuildH2");
+ this.m_SysListGuildH2 = (transform.GetComponent("XUIList") as IXUIList);
+ transform = base.transform.Find("_canvas/MainMenuFrame/MainMenu/Panel2/SysGridV1");
+ this.m_SysListV1 = (transform.GetComponent("XUIList") as IXUIList);
+ transform = base.transform.Find("_canvas/SecondMenuFrame/SecondMenu/SysGridV2");
+ this.m_SysListV2 = (transform.GetComponent("XUIList") as IXUIList);
+ transform = base.transform.Find("_canvas/MainMenuFrame/MainMenu/Panel5/SysGridV3");
+ this.m_SysListV3 = (transform.GetComponent("XUIList") as IXUIList);
+ transform = base.transform.Find("_canvas/MainMenuFrame/MainMenu/Panel5/V3SwitchBtn");
+ this.m_V3SwitchBtn = (transform.GetComponent("XUISprite") as IXUISprite);
+ this.m_V3SwitchTween = (transform.GetComponent("XUIPlayTween") as IXUITweenTool);
+ transform = base.transform.Find("_canvas/MainMenuFrame/MainMenu/Panel5/SysGridV3");
+ this.m_V3ListTween = (transform.GetComponent("XUIPlayTween") as IXUITweenTool);
+ transform = base.transform.Find("_canvas/SecondMenuFrame/SecondMenu/H2SwitchBtn");
+ this.m_H2SwitchBtn = (transform.GetComponent("XUISprite") as IXUISprite);
+ this.m_H2SwitchTween = (transform.GetComponent("XUIPlayTween") as IXUITweenTool);
+ transform = base.transform.Find("_canvas/SecondMenuFrame/SecondMenu/H2");
+ this.m_H2ListTween = (transform.GetComponent("XUIPlayTween") as IXUITweenTool);
+ transform = base.transform.Find("_canvas/SecondMenuFrame/SecondMenu/H2/SysGridH2_1");
+ this.m_SysListH2_1 = (transform.GetComponent("XUIList") as IXUIList);
+ transform = base.transform.Find("_canvas/SecondMenuFrame/SecondMenu/H2/SysGridH2_2");
+ this.m_SysListH2_2 = (transform.GetComponent("XUIList") as IXUIList);
+ transform = base.transform.Find("_canvas/MainMenuFrame/MainMenu");
+ this.m_MainMenuGo = transform.gameObject;
+ this.m_SecondMenu = base.transform.Find("_canvas/SecondMenuFrame/SecondMenu").gameObject;
+ transform = base.transform.Find("_canvas/ThirdMenuFrame/ThirdMenu");
+ this.m_ExitGuild = (base.transform.Find("_canvas/SecondMenuFrame/BtnExitGuild").GetComponent("XUIButton") as IXUIButton);
+ this.m_RecoverTime = (base.transform.Find("_canvas/RecoverTime").GetComponent("XUISprite") as IXUISprite);
+ List<string> list = new List<string>();
+ list.Add("_canvas/MainMenuFrame/MainMenu/Panel1/SysGridH1/SysAItem");
+ this.m_ListSys.Add(XSysDefine.XSys_Item);
+ list.Add("_canvas/MainMenuFrame/MainMenu/Panel1/SysGridH1/SysBSkill");
+ this.m_ListSys.Add(XSysDefine.XSys_Skill);
+ list.Add("_canvas/MainMenuFrame/MainMenu/Panel1/SysGridH1/SysCSprite");
+ this.m_ListSys.Add(XSysDefine.XSys_SpriteSystem);
+ list.Add("_canvas/MainMenuFrame/MainMenu/Panel1/SysGridH1/SysDEquipCreate");
+ this.m_ListSys.Add(XSysDefine.XSys_EquipCreate);
+ list.Add("_canvas/MainMenuFrame/MainMenu/Panel1/SysGridH1/SysEHorse");
+ this.m_ListSys.Add(XSysDefine.XSys_Horse);
+ list.Add("_canvas/MainMenuFrame/MainMenu/Panel1/SysGridH0/SysA_Friends");
+ this.m_ListSys.Add(XSysDefine.XSys_Friends);
+ list.Add("_canvas/MainMenuFrame/MainMenu/Panel1/SysGridH0/SysB_Home");
+ this.m_ListSys.Add(XSysDefine.XSys_Home);
+ list.Add("_canvas/MainMenuFrame/MainMenu/Panel1/SysGridH0/SysC_Rank");
+ this.m_ListSys.Add(XSysDefine.XSys_Rank);
+ list.Add("_canvas/MainMenuFrame/MainMenu/Panel1/SysGridH0/SysD_CardCollect");
+ this.m_ListSys.Add(XSysDefine.XSys_CardCollect);
+ list.Add("_canvas/MainMenuFrame/MainMenu/Panel1/SysGridH0/SysE_NPCFavor");
+ this.m_ListSys.Add(XSysDefine.XSys_NPCFavor);
+ list.Add("_canvas/MainMenuFrame/MainMenu/Panel1/SysGridH3/SysA_HomeMain");
+ this.m_ListSys.Add(XSysDefine.XSys_Home_Plant);
+ list.Add("_canvas/MainMenuFrame/MainMenu/Panel1/SysGridH3/SysB_HomeShop");
+ this.m_ListSys.Add(XSysDefine.XSys_Mall_Home);
+ list.Add("_canvas/MainMenuFrame/MainMenu/Panel1/SysGridH3/SysC_HomeCooking");
+ this.m_ListSys.Add(XSysDefine.XSys_Home_Cooking);
+ list.Add("_canvas/MainMenuFrame/MainMenu/Panel2/SysGridV1/SysAActivity");
+ this.m_ListSys.Add(XSysDefine.XSys_DailyAcitivity);
+ list.Add("_canvas/MainMenuFrame/MainMenu/Panel2/SysGridV1/SysCGuild");
+ this.m_ListSys.Add(XSysDefine.XSys_Guild);
+ list.Add("_canvas/MainMenuFrame/MainMenu/Panel2/SysGridV1/SysEPVP");
+ this.m_ListSys.Add(XSysDefine.XSys_MobaAcitivity);
+ list.Add("_canvas/SecondMenuFrame/SecondMenu/H2/SysGridH2_1/SysAGameMall");
+ this.m_ListSys.Add(XSysDefine.XSys_GameMall);
+ list.Add("_canvas/SecondMenuFrame/SecondMenu/H2/SysGridH2_1/SysCAuction");
+ this.m_ListSys.Add(XSysDefine.XSys_Auction);
+ list.Add("_canvas/SecondMenuFrame/SecondMenu/H2/SysGridH2_1/SysEReward");
+ this.m_ListSys.Add(XSysDefine.XSys_Reward);
+ list.Add("_canvas/SecondMenuFrame/SecondMenu/H2/SysGridH2_1/SysGWelfare");
+ this.m_ListSys.Add(XSysDefine.XSys_Welfare);
+ list.Add("_canvas/SecondMenuFrame/SecondMenu/H2/SysGridH2_1/SysIBq");
+ this.m_ListSys.Add(XSysDefine.XSys_Strong);
+ list.Add("_canvas/SecondMenuFrame/SecondMenu/H2/SysGridH2_1/SysXThemeActivity");
+ this.m_ListSys.Add(XSysDefine.XSys_ThemeActivity);
+ list.Add("_canvas/SecondMenuFrame/SecondMenu/H2/SysGridH2_2/SysACarnival");
+ this.m_ListSys.Add(XSysDefine.XSys_Carnival);
+ list.Add("_canvas/SecondMenuFrame/SecondMenu/H2/SysGridH2_2/SysCFirstRecharge");
+ this.m_ListSys.Add(XSysDefine.XSys_Welfare_FirstRechange);
+ list.Add("_canvas/SecondMenuFrame/SecondMenu/H2/SysGridH2_2/SysEOperatingActivity");
+ this.m_ListSys.Add(XSysDefine.XSys_OperatingActivity);
+ list.Add("_canvas/SecondMenuFrame/SecondMenu/H2/SysGridH2_2/SysG_Live");
+ this.m_ListSys.Add(XSysDefine.XSys_Spectate);
+ list.Add("_canvas/SecondMenuFrame/SecondMenu/H2/SysGridH2_2/SysISevenActivity");
+ this.m_ListSys.Add(XSysDefine.XSys_SevenActivity);
+ list.Add("_canvas/SecondMenuFrame/SecondMenu/SysGridV2/SysAGameCom");
+ this.m_ListSys.Add(XSysDefine.XSys_GameCommunity);
+ list.Add("_canvas/SecondMenuFrame/SecondMenu/SysGridV2/SysBBroadcast");
+ this.m_ListSys.Add(XSysDefine.XSys_Broadcast);
+ list.Add("_canvas/SecondMenuFrame/SecondMenu/SysGridV2/SysBFriendCir");
+ this.m_ListSys.Add(XSysDefine.XSys_FriendCircle);
+ list.Add("_canvas/SecondMenuFrame/SecondMenu/SysGridV2/SysCQQVIP");
+ this.m_ListSys.Add(XSysDefine.XSys_QQVIP);
+ list.Add("_canvas/SecondMenuFrame/SecondMenu/SysGridV2/SysDJC");
+ this.m_ListSys.Add(XSysDefine.XSys_Platform_StartPrivilege);
+ list.Add("_canvas/SecondMenuFrame/SecondMenu/SysGridV2/SysEAnnounceNew");
+ this.m_ListSys.Add(XSysDefine.XSys_SystemAnnounce);
+ this.CreateV3ListBtns(list, this.m_ListSys);
+ list.Add("_canvas/MainMenuFrame/MainMenu/Panel1/SysGridGuildH1/SysAGuildHall");
+ this.m_ListSys.Add(XSysDefine.XSys_GuildHall);
+ list.Add("_canvas/MainMenuFrame/MainMenu/Panel1/SysGridGuildH1/SysBGuildRelax");
+ this.m_ListSys.Add(XSysDefine.XSys_GuildRelax);
+ list.Add("_canvas/MainMenuFrame/MainMenu/Panel1/SysGridGuildH1/SysCrossGVG");
+ this.m_ListSys.Add(XSysDefine.XSys_CrossGVG);
+ list.Add("_canvas/MainMenuFrame/MainMenu/Panel2/SysGridGuildV1/SysHGuildMine");
+ this.m_ListSys.Add(XSysDefine.XSys_GuildMine);
+ list.Add("_canvas/MainMenuFrame/MainMenu/Panel2/SysGridGuildV1/SysIGuildTerritory");
+ this.m_ListSys.Add(XSysDefine.XSys_GuildTerritory);
+ list.Add("_canvas/MainMenuFrame/MainMenu/Panel2/SysGridGuildV1/SysCGuildDragon");
+ this.m_ListSys.Add(XSysDefine.XSys_GuildDragon);
+ list.Add("_canvas/MainMenuFrame/MainMenu/Panel2/SysGridGuildV1/SysBGuildPvp");
+ this.m_ListSys.Add(XSysDefine.XSys_GuildPvp);
+ list.Add("_canvas/SecondMenuFrame/SysGridGuildH2/SysGuildCollect");
+ this.m_ListSys.Add(XSysDefine.XSys_GuildCollect);
+ this.m_GuildCollectLeftTime = (base.transform.Find("_canvas/SecondMenuFrame/SysGridGuildH2/SysGuildCollect/Time").GetComponent("XUILabel") as IXUILabel);
+ list.Add("_canvas/SecondMenuFrame/SysGridGuildH2/SysGuildSummon");
+ this.m_ListSys.Add(XSysDefine.XSys_GuildCollectSummon);
+ this.m_GuildCollectSummonTime = (base.transform.Find("_canvas/SecondMenuFrame/SysGridGuildH2/SysGuildSummon/Time").GetComponent("XUILabel") as IXUILabel);
+ list.Add("_canvas/ThirdMenuFrame/PING/SysWifi");
+ this.m_ListSys.Add(XSysDefine.XSys_Wifi);
+ list.Add("_canvas/SecondMenuFrame/SecondMenu/H2/SysGridH2_2/SysKBackflow");
+ this.m_ListSys.Add(XSysDefine.Xsys_Backflow);
+ this.m_SysGrid = base.transform.Find("_canvas/MainMenuFrame/MainMenu/Panel3/SysGrid").gameObject;
+ for (int i = 0; i < this.m_ListSys.Count; i++)
+ {
+ XSysDefine xsysDefine = this.m_ListSys[i];
+ transform = base.transform.Find(list[i]);
+ bool flag = transform == null;
+ if (flag)
+ {
+ XSingleton<XDebug>.singleton.AddErrorLog("btn:" + list[i], null, null, null, null, null);
+ }
+ else
+ {
+ IXUIButton ixuibutton = transform.GetComponent("XUIButton") as IXUIButton;
+ ixuibutton.ID = (ulong)((long)xsysDefine);
+ this.m_SysButtonsMapping[(int)(checked((IntPtr)ixuibutton.ID))] = ixuibutton;
+ }
+ }
+ this.m_HomeGo = base.transform.Find("_canvas/Home").gameObject;
+ this.m_AvatarFrame = base.transform.Find("_canvas/ThirdMenuFrame/AvatarBG").gameObject;
+ this.m_PlayerAvatar = (base.transform.Find("_canvas/ThirdMenuFrame/AvatarBG/Avatar").GetComponent("XUISprite") as IXUISprite);
+ this.m_sprFrame = (base.transform.Find("_canvas/ThirdMenuFrame/AvatarBG/AvatarFrame").GetComponent("XUISprite") as IXUISprite);
+ this.m_txtAvatar = (base.transform.Find("_canvas/ThirdMenuFrame/AvatarBG/HeadPanel/Texture").GetComponent("XUITexture") as IXUITexture);
+ this.m_sliderBattery = (base.transform.Find("_canvas/ThirdMenuFrame/PING/Battery").GetComponent("XUISlider") as IXUISlider);
+ this.m_lblTime = (base.transform.Find("_canvas/ThirdMenuFrame/PING/TIME").GetComponent("XUILabel") as IXUILabel);
+ this.m_lblFree = (base.transform.Find("_canvas/ThirdMenuFrame/PING/T2").GetComponent("XUILabel") as IXUILabel);
+ this.m_Level = (this.m_AvatarFrame.transform.Find("CoverPanel/SwitchPanel/BaseInfo/Level").GetComponent("XUILabel") as IXUILabel);
+ this.m_PlayerPPT = this.m_AvatarFrame.transform.Find("BattlePointBG").gameObject;
+ this.m_PING = base.transform.Find("_canvas/ThirdMenuFrame/PING").gameObject;
+ Transform transform2 = this.m_AvatarFrame.transform.Find("MoneyInfo");
+ for (int j = 0; j < transform2.childCount; j++)
+ {
+ Transform child = transform2.GetChild(j);
+ int itemid = 0;
+ bool flag2 = child.name.StartsWith("Info") && int.TryParse(child.name.Substring(child.name.Length - 1, 1), out itemid);
+ if (flag2)
+ {
+ XTitanItem xtitanItem = new XTitanItem();
+ xtitanItem.Set(itemid, child.gameObject);
+ this.m_MoneyList.Add(xtitanItem);
+ }
+ }
+ this.m_CurFatige = (base.transform.Find("_canvas/RecoverTime/curfatige").GetComponent("XUILabel") as IXUILabel);
+ this.m_AllCoverTime = (base.transform.Find("_canvas/RecoverTime/allcovertime").GetComponent("XUILabel") as IXUILabel);
+ this.m_CoverOneTime = (base.transform.Find("_canvas/RecoverTime/coveronetime").GetComponent("XUILabel") as IXUILabel);
+ this.m_HeadMenuTweenGameObject = base.transform.Find("_canvas/ThirdMenuFrame/AvatarBG/CoverPanel/SwitchPanel").gameObject;
+ this.m_HeadMenuTween = (this.m_HeadMenuTweenGameObject.GetComponent("XUIPlayTween") as IXUITweenTool);
+ this.m_FakeShowSelfTween = (base.transform.Find("_canvas").GetComponent("XUIPlayTween") as IXUITweenTool);
+ this.m_FxFirework = base.transform.Find("_canvas/FxFirework").gameObject;
+ this.m_RemoveSealTip = (base.transform.Find("_canvas/SecondMenuFrame/SecondMenu/H2/SysGridH2_2/SysEOperatingActivity/Message").GetComponent("XUILabel") as IXUILabel);
+ this.m_SevenLoginMessage = (base.transform.Find("_canvas/SecondMenuFrame/SecondMenu/H2/SysGridH2_2/SysISevenActivity/Message").GetComponent("XUILabel") as IXUILabel);
+ this.m_SevenLoginSprite = (base.transform.Find("_canvas/SecondMenuFrame/SecondMenu/H2/SysGridH2_2/SysISevenActivity/P").GetComponent("XUISprite") as IXUISprite);
+ this.m_LiveTips = this.GetSysButton(XSysDefine.XSys_Spectate).gameObject.transform.Find("Member").gameObject;
+ this.m_LiveCount = (this.m_LiveTips.gameObject.transform.Find("Num").GetComponent("XUILabel") as IXUILabel);
+ this.m_LiveTips.SetActive(false);
+ this.m_MulActTips = (this.GetSysButton(XSysDefine.XSys_DailyAcitivity).gameObject.transform.Find("Tips").GetComponent("XUILabel") as IXUILabel);
+ this.m_TaskNaviFrame = base.transform.Find("_canvas/TaskNaviPanel").gameObject;
+ Transform transform3 = base.transform.Find("_canvas/ExpMgr");
+ for (int k = 0; k < 4; k++)
+ {
+ IXUITweenTool ixuitweenTool = transform3.GetChild(k).GetComponent("XUIPlayTween") as IXUITweenTool;
+ IXUILabel item = ixuitweenTool.gameObject.GetComponent("XUILabel") as IXUILabel;
+ this.m_ExpAnimationMgr.Add(ixuitweenTool);
+ this.m_ExpValueMgr.Add(item);
+ }
+ this.m_DanceMotion = base.transform.Find("_canvas/MainMenuFrame/MainMenu/DanceMotionFrame").gameObject;
+ }
+
+ private void CreateV3ListBtns(List<string> btnList, List<XSysDefine> ListSys)
+ {
+ btnList.Add("_canvas/MainMenuFrame/MainMenu/Panel5/SysGridV3/SysEPhoto");
+ this.m_ListSys.Add(XSysDefine.XSys_Photo);
+ btnList.Add("_canvas/MainMenuFrame/MainMenu/Panel5/SysGridV3/SysAHorseRide");
+ this.m_ListSys.Add(XSysDefine.XSys_QuickRide);
+ btnList.Add("_canvas/MainMenuFrame/MainMenu/Panel5/SysGridV3/SysAChange");
+ this.m_ListSys.Add(XSysDefine.XSys_Transform);
+ GameObject gameObject = base.transform.Find("_canvas/MainMenuFrame/MainMenu/Panel5/SysGridV3").gameObject;
+ for (int i = 0; i < gameObject.gameObject.transform.childCount; i++)
+ {
+ Transform child = gameObject.gameObject.transform.GetChild(i);
+ GameObject gameObject2 = child.Find("Select").gameObject;
+ bool flag = gameObject2 != null;
+ if (flag)
+ {
+ gameObject2.SetActive(false);
+ }
+ }
+ IXUILabel label = base.transform.Find("_canvas/MainMenuFrame/MainMenu/Panel5/SysGridV3/SysAChange/Time").GetComponent("XUILabel") as IXUILabel;
+ this.m_TransformLeftTime = new XLeftTimeCounter(label, true);
+ this.m_MotionDance = (base.transform.Find("_canvas/MainMenuFrame/MainMenu/Panel5/SysGridV3/SysCDance").GetComponent("XUIButton") as IXUIButton);
+ this.m_MotionLover = (base.transform.Find("_canvas/MainMenuFrame/MainMenu/Panel5/SysGridV3/SysBLoverDance").GetComponent("XUIButton") as IXUIButton);
+ this.m_MotionDance.ID = 1UL;
+ this.m_MotionLover.ID = 2UL;
+ }
+
+ public IXUIButton GetSysButton(XSysDefine sys)
+ {
+ bool flag = sys < XSysDefine.XSys_Num;
+ IXUIButton result;
+ if (flag)
+ {
+ result = this.m_SysButtonsMapping[(int)sys];
+ }
+ else
+ {
+ result = null;
+ }
+ return result;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/XMainInterfaceBehaviour.cs.meta b/Client/Assets/Scripts/XMainClient/UI/XMainInterfaceBehaviour.cs.meta
new file mode 100644
index 00000000..0980ac7a
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XMainInterfaceBehaviour.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 445692feaac1e6f4998791c4beaaf1c9
+timeCreated: 1611403644
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/XMainInterfaceBriefHandler.cs b/Client/Assets/Scripts/XMainClient/UI/XMainInterfaceBriefHandler.cs
new file mode 100644
index 00000000..b42a4c92
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XMainInterfaceBriefHandler.cs
@@ -0,0 +1,256 @@
+using System;
+using KKSG;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class XMainInterfaceBriefHandler : DlgHandlerBase
+ {
+ public XMainInterfaceTeamHandler TeamHandler
+ {
+ get
+ {
+ return this._TeamHandler;
+ }
+ }
+
+ public XMainInterfaceTaskHandler TaskHandler
+ {
+ get
+ {
+ return this._TaskHandler;
+ }
+ }
+
+ public bool IsShowingTaskTab
+ {
+ get
+ {
+ return this.m_SelectedTab == 1;
+ }
+ }
+
+ protected override string FileName
+ {
+ get
+ {
+ return "Hall/HallTaskNaviFrame";
+ }
+ }
+
+ private IXUICheckBox _TaskTab;
+
+ private IXUICheckBox _TeamTab;
+
+ private IXUISprite _TaskSprite;
+
+ private IXUISprite _TeamSprite;
+
+ private IXUIList m_List;
+
+ private IXUISprite m_SwitchBtn;
+
+ private IXUITweenTool m_SwitchTween;
+
+ private IXUITweenTool m_MainTween;
+
+ private XMainInterfaceTeamHandler _TeamHandler;
+
+ private XMainInterfaceTaskHandler _TaskHandler;
+
+ public bool _TaskSwitchBtnState = true;
+
+ public int IsNavigateToBattle = 0;
+
+ private int m_SelectedTab = 0;
+
+ private IXUILabel _TeamMemberCount;
+
+ private IXUITweenTool _TeamMemberTween;
+
+ private GameObject _TeamMemberGo;
+
+ private GameObject _TeamMatchingGo;
+
+ protected override void Init()
+ {
+ base.Init();
+ Transform transform = base.PanelObject.transform.Find("Main/TabList/Task");
+ this._TaskTab = (transform.GetComponent("XUICheckBox") as IXUICheckBox);
+ this._TaskSprite = (transform.GetComponent("XUISprite") as IXUISprite);
+ transform = base.PanelObject.transform.Find("Main/TabList/Team");
+ this._TeamTab = (transform.GetComponent("XUICheckBox") as IXUICheckBox);
+ this._TeamSprite = (transform.GetComponent("XUISprite") as IXUISprite);
+ this.m_List = (base.PanelObject.transform.Find("Main/TabList").GetComponent("XUIList") as IXUIList);
+ DlgHandlerBase.EnsureCreate<XMainInterfaceTeamHandler>(ref this._TeamHandler, base.PanelObject.transform.Find("Main/TeamFrame").gameObject, null, true);
+ DlgHandlerBase.EnsureCreate<XMainInterfaceTaskHandler>(ref this._TaskHandler, base.PanelObject.transform.Find("Main/TaskFrame").gameObject, null, true);
+ this._TeamMemberGo = this._TeamTab.gameObject.transform.Find("Member").gameObject;
+ this._TeamMatchingGo = this._TeamTab.gameObject.transform.Find("Matching").gameObject;
+ transform = this._TeamMemberGo.transform.Find("Num");
+ this._TeamMemberCount = (transform.GetComponent("XUILabel") as IXUILabel);
+ this._TeamMemberTween = (transform.GetComponent("XUIPlayTween") as IXUITweenTool);
+ bool flag = XSingleton<XScene>.singleton.SceneType == SceneType.SKYCITY_WAITING;
+ if (flag)
+ {
+ this._TaskTab.gameObject.SetActive(false);
+ this._TeamTab.bChecked = true;
+ this.m_SelectedTab = 2;
+ }
+ else
+ {
+ this._TaskTab.bChecked = true;
+ this.m_SelectedTab = 1;
+ }
+ this.m_List.Refresh();
+ this.m_SwitchBtn = (base.PanelObject.transform.Find("TaskSwitchBtn").GetComponent("XUISprite") as IXUISprite);
+ this.m_SwitchTween = (this.m_SwitchBtn.gameObject.GetComponent("XUIPlayTween") as IXUITweenTool);
+ this.m_MainTween = (base.PanelObject.transform.Find("Main").GetComponent("XUIPlayTween") as IXUITweenTool);
+ }
+
+ protected override void OnShow()
+ {
+ bool flag = this._TaskHandler != null;
+ if (flag)
+ {
+ this._TaskHandler.RefreshData();
+ }
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ this._TaskTab.ID = 1UL;
+ this._TaskSprite.ID = 1UL;
+ this._TaskTab.RegisterOnCheckEventHandler(new CheckBoxOnCheckEventHandler(this.OnTabClick));
+ this._TaskSprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this._OnSpriteClick));
+ this._TeamTab.ID = 2UL;
+ this._TeamSprite.ID = 2UL;
+ this._TeamTab.RegisterOnCheckEventHandler(new CheckBoxOnCheckEventHandler(this.OnTabClick));
+ this._TeamSprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this._OnSpriteClick));
+ this.m_SwitchBtn.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnTaskSwitchBtnClick));
+ }
+
+ public override void OnUnload()
+ {
+ DlgHandlerBase.EnsureUnload<XMainInterfaceTeamHandler>(ref this._TeamHandler);
+ DlgHandlerBase.EnsureUnload<XMainInterfaceTaskHandler>(ref this._TaskHandler);
+ base.OnUnload();
+ }
+
+ private void _OnSpriteClick(IXUISprite iSp)
+ {
+ bool flag = XSingleton<XScene>.singleton.SceneType == SceneType.SKYCITY_WAITING;
+ if (!flag)
+ {
+ int num = (int)iSp.ID;
+ bool flag2 = num == this.m_SelectedTab;
+ if (flag2)
+ {
+ bool flag3 = num == 1;
+ if (!flag3)
+ {
+ DlgBase<XTeamView, TabDlgBehaviour>.singleton.ShowTeamView();
+ }
+ }
+ this.m_SelectedTab = num;
+ }
+ }
+
+ private bool OnTabClick(IXUICheckBox iXUICheckBox)
+ {
+ bool flag = !base.bLoaded;
+ bool result;
+ if (flag)
+ {
+ result = true;
+ }
+ else
+ {
+ bool flag2 = !iXUICheckBox.bChecked;
+ if (flag2)
+ {
+ result = true;
+ }
+ else
+ {
+ int num = (int)iXUICheckBox.ID;
+ bool flag3 = num == 1;
+ if (flag3)
+ {
+ this._TaskHandler.SetVisible(true);
+ this._TeamHandler.SetVisible(false);
+ }
+ else
+ {
+ this._TaskHandler.SetVisible(false);
+ this._TeamHandler.SetVisible(true);
+ }
+ result = true;
+ }
+ }
+ return result;
+ }
+
+ public void NavigateToBattle()
+ {
+ XSingleton<XInput>.singleton.LastNpc = null;
+ Vector3 normalized = (XSingleton<XEntityMgr>.singleton.Player.EngineObject.Position - XSingleton<XScene>.singleton.BattleTargetPoint).normalized;
+ Vector3 dest = XSingleton<XScene>.singleton.BattleTargetPoint + normalized * 5.8f;
+ XNavigationEventArgs @event = XEventPool<XNavigationEventArgs>.GetEvent();
+ @event.Firer = XSingleton<XEntityMgr>.singleton.Player;
+ @event.Dest = dest;
+ XSingleton<XEventMgr>.singleton.FireEvent(@event);
+ this.IsNavigateToBattle = 1;
+ }
+
+ public void NavigateToNest()
+ {
+ XSingleton<XInput>.singleton.LastNpc = null;
+ Vector3 nestTargetPoint = XSingleton<XScene>.singleton.NestTargetPoint;
+ XNavigationEventArgs @event = XEventPool<XNavigationEventArgs>.GetEvent();
+ @event.Firer = XSingleton<XEntityMgr>.singleton.Player;
+ @event.Dest = nestTargetPoint;
+ XSingleton<XEventMgr>.singleton.FireEvent(@event);
+ this.IsNavigateToBattle = 2;
+ }
+
+ public void SetTeamMemberCount(int count)
+ {
+ bool flag = count == 0;
+ if (flag)
+ {
+ this._TeamMemberGo.SetActive(false);
+ }
+ else
+ {
+ this._TeamMemberGo.SetActive(true);
+ this._TeamMemberCount.SetText(count.ToString());
+ this._TeamMemberTween.PlayTween(true, -1f);
+ }
+ }
+
+ public void SetTeamMatching(bool bMatching)
+ {
+ this._TeamMatchingGo.SetActive(bMatching);
+ }
+
+ public void OnSysChange()
+ {
+ this._TeamTab.SetVisible(XSingleton<XGameSysMgr>.singleton.IsSystemOpened(XSysDefine.XSys_Team));
+ this.m_List.Refresh();
+ }
+
+ private void OnTaskSwitchBtnClick(IXUISprite iSp)
+ {
+ this._TaskSwitchBtnState = !this._TaskSwitchBtnState;
+ int tweenGroup = this._TaskSwitchBtnState ? 1 : 0;
+ this.m_MainTween.SetTweenGroup(tweenGroup);
+ this.m_SwitchTween.SetTweenGroup(tweenGroup);
+ this.m_MainTween.PlayTween(true, -1f);
+ this.m_SwitchTween.PlayTween(true, -1f);
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/XMainInterfaceBriefHandler.cs.meta b/Client/Assets/Scripts/XMainClient/UI/XMainInterfaceBriefHandler.cs.meta
new file mode 100644
index 00000000..cd92cbc7
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XMainInterfaceBriefHandler.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 8ca64c2091fcdc24d80c11b9137f1398
+timeCreated: 1611404100
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/XMainInterfaceMemberMonitor.cs b/Client/Assets/Scripts/XMainClient/UI/XMainInterfaceMemberMonitor.cs
new file mode 100644
index 00000000..3b6f294a
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XMainInterfaceMemberMonitor.cs
@@ -0,0 +1,94 @@
+using System;
+using KKSG;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class XMainInterfaceMemberMonitor
+ {
+ private GameObject m_Go;
+
+ private bool m_bActive = true;
+
+ private GameObject m_InfoFrame;
+
+ private GameObject m_EmptyFrame;
+
+ private IXUISprite m_uiAvatar;
+
+ private IXUILabel m_uiName;
+
+ private GameObject m_uiLeader;
+
+ private IXUILabel m_uiLevel;
+
+ private IXUISprite m_uiAdd;
+
+ private IXUISprite m_bg;
+
+ private XTeamBloodUIData m_MemberData;
+
+ public void SetGo(GameObject go)
+ {
+ this.m_Go = go;
+ this.m_InfoFrame = go.transform.Find("Info").gameObject;
+ this.m_EmptyFrame = go.transform.Find("Empty").gameObject;
+ this.m_uiAvatar = (this.m_InfoFrame.transform.Find("AvatarBG/Avatar").GetComponent("XUISprite") as IXUISprite);
+ this.m_uiName = (this.m_InfoFrame.transform.Find("PlayerName").GetComponent("XUILabel") as IXUILabel);
+ this.m_uiLeader = this.m_InfoFrame.transform.Find("TeamLeader").gameObject;
+ this.m_uiLevel = (this.m_InfoFrame.transform.Find("Level").GetComponent("XUILabel") as IXUILabel);
+ this.m_uiAdd = (this.m_EmptyFrame.transform.Find("Add").GetComponent("XUISprite") as IXUISprite);
+ this.m_uiAdd.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this._OnAddClicked));
+ this.m_bg = (go.transform.Find("BackDrop").GetComponent("XUISprite") as IXUISprite);
+ this.m_bg.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this._OnBgClicked));
+ }
+
+ public void SetActive(bool bActive)
+ {
+ this.m_bActive = bActive;
+ this.m_Go.SetActive(bActive);
+ }
+
+ public void SetMemberData(XTeamBloodUIData data)
+ {
+ this.m_MemberData = data;
+ this._SetBasicUI();
+ }
+
+ private void _OnAddClicked(IXUISprite iSp)
+ {
+ DlgBase<XTeamInviteView, XTeamInviteBehaviour>.singleton.SetVisibleWithAnimation(true, null);
+ }
+
+ private void _OnBgClicked(IXUISprite iSp)
+ {
+ bool flag = XSingleton<XScene>.singleton.SceneType == SceneType.SKYCITY_WAITING;
+ if (!flag)
+ {
+ DlgBase<XTeamView, TabDlgBehaviour>.singleton.ShowTeamView();
+ }
+ }
+
+ private void _SetBasicUI()
+ {
+ this.m_InfoFrame.SetActive(this.m_MemberData != null);
+ this.m_EmptyFrame.SetActive(this.m_MemberData == null);
+ bool flag = this.m_MemberData != null;
+ if (flag)
+ {
+ this.m_uiName.SetText(this.m_MemberData.name);
+ int profID = XFastEnumIntEqualityComparer<RoleType>.ToInt(this.m_MemberData.profession);
+ this.m_uiAvatar.spriteName = XSingleton<XProfessionSkillMgr>.singleton.GetProfIcon(profID);
+ this.m_uiLeader.SetActive(this.m_MemberData.bIsLeader);
+ bool flag2 = this.m_uiLevel != null;
+ if (flag2)
+ {
+ this.m_uiLevel.SetText("Lv." + this.m_MemberData.level.ToString());
+ }
+ }
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/XMainInterfaceMemberMonitor.cs.meta b/Client/Assets/Scripts/XMainClient/UI/XMainInterfaceMemberMonitor.cs.meta
new file mode 100644
index 00000000..97750a73
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XMainInterfaceMemberMonitor.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 1fd8175ac4e31f349a15a1cc7e384d17
+timeCreated: 1611403403
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/XMainInterfaceTaskHandler.cs b/Client/Assets/Scripts/XMainClient/UI/XMainInterfaceTaskHandler.cs
new file mode 100644
index 00000000..8fec09d1
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XMainInterfaceTaskHandler.cs
@@ -0,0 +1,122 @@
+using System;
+using System.Collections.Generic;
+using KKSG;
+using UILib;
+using UnityEngine;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class XMainInterfaceTaskHandler : DlgHandlerBase
+ {
+ private IXUIScrollView m_ScrollView;
+
+ private IXUIWrapContent m_WrapContent;
+
+ private GameObject m_Emtpy;
+
+ private XTaskDocument doc;
+
+ protected override void Init()
+ {
+ base.Init();
+ this.m_Emtpy = base.PanelObject.transform.Find("Empty").gameObject;
+ this.m_ScrollView = (base.PanelObject.transform.Find("Panel").GetComponent("XUIScrollView") as IXUIScrollView);
+ this.m_WrapContent = (this.m_ScrollView.gameObject.transform.Find("WrapContent").GetComponent("XUIWrapContent") as IXUIWrapContent);
+ this.doc = XDocuments.GetSpecificDocument<XTaskDocument>(XTaskDocument.uuID);
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ this.m_WrapContent.RegisterItemInitEventHandler(new WrapItemInitEventHandler(this._OnWrapInit));
+ this.m_WrapContent.RegisterItemUpdateEventHandler(new WrapItemUpdateEventHandler(this._OnWrapUpdated));
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ this.RefreshData();
+ }
+
+ private void _OnWrapInit(Transform t, int index)
+ {
+ }
+
+ private void _OnWrapUpdated(Transform t, int index)
+ {
+ bool flag = index < 0 || index >= this.doc.TaskRecord.Tasks.Count;
+ if (!flag)
+ {
+ XTaskInfo xtaskInfo = this.doc.TaskRecord.Tasks[index];
+ TaskTableNew.RowData tableData = xtaskInfo.TableData;
+ IXUISprite ixuisprite = t.Find("BackDrop").GetComponent("XUISprite") as IXUISprite;
+ IXUILabel ixuilabel = t.Find("Title").GetComponent("XUILabel") as IXUILabel;
+ IXUILabelSymbol ixuilabelSymbol = t.Find("Target").GetComponent("XUILabelSymbol") as IXUILabelSymbol;
+ GameObject gameObject = ixuilabelSymbol.gameObject.transform.Find("Fx").gameObject;
+ GameObject gameObject2 = ixuilabelSymbol.gameObject.transform.Find("RedPoint").gameObject;
+ bool flag2 = tableData == null;
+ if (flag2)
+ {
+ ixuisprite.RegisterSpriteClickEventHandler(null);
+ ixuilabel.SetText(string.Empty);
+ ixuilabelSymbol.InputText = string.Empty;
+ gameObject.SetActive(false);
+ gameObject2.SetActive(false);
+ }
+ else
+ {
+ ixuisprite.ID = (ulong)xtaskInfo.ID;
+ ixuisprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this._OnTaskClicked));
+ ixuilabel.SetText(XSingleton<XCommon>.singleton.StringCombine(XStringDefineProxy.GetString(XSingleton<XCommon>.singleton.StringCombine("TaskTypePrefix", tableData.TaskType.ToString())), tableData.TaskTitle));
+ ixuilabelSymbol.InputText = this.doc.ParseTaskDesc(tableData, xtaskInfo, true);
+ gameObject.SetActive(this.doc.NaviTask == xtaskInfo.ID);
+ gameObject2.SetActive(false);
+ bool flag3 = tableData.TaskType == 4u;
+ if (flag3)
+ {
+ gameObject2.SetActive(xtaskInfo.Status == TaskStatus.TaskStatus_CanTake || XSingleton<XGameSysMgr>.singleton.GetSysRedPointStateConsiderBlock(XSysDefine.XSys_GuildDailyTask));
+ }
+ bool flag4 = tableData.TaskType == 7u;
+ if (flag4)
+ {
+ gameObject2.SetActive(xtaskInfo.Status == TaskStatus.TaskStatus_CanTake || XSingleton<XGameSysMgr>.singleton.GetSysRedPointStateConsiderBlock(XSysDefine.XSys_GuildWeeklyBountyTask));
+ }
+ bool flag5 = tableData.TaskType == 8u;
+ if (flag5)
+ {
+ gameObject2.SetActive(xtaskInfo.Status != TaskStatus.TaskStatus_Finish);
+ }
+ }
+ }
+ }
+
+ public override void RefreshData()
+ {
+ base.RefreshData();
+ List<XTaskInfo> tasks = this.doc.TaskRecord.Tasks;
+ this.m_WrapContent.SetContentCount(tasks.Count, false);
+ bool flag = tasks.Count == 0;
+ if (flag)
+ {
+ this.m_Emtpy.SetActive(true);
+ }
+ else
+ {
+ this.m_Emtpy.SetActive(false);
+ this.m_ScrollView.ResetPosition();
+ }
+ }
+
+ public void RefreshVisibleContents()
+ {
+ this.m_WrapContent.RefreshAllVisibleContents();
+ }
+
+ private void _OnTaskClicked(IXUISprite iSp)
+ {
+ this.doc.DoTask((uint)iSp.ID);
+ this.m_WrapContent.RefreshAllVisibleContents();
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/XMainInterfaceTaskHandler.cs.meta b/Client/Assets/Scripts/XMainClient/UI/XMainInterfaceTaskHandler.cs.meta
new file mode 100644
index 00000000..9abfb20f
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XMainInterfaceTaskHandler.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 54b69be014cb44e43950f3de0ebda144
+timeCreated: 1611403735
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/XMainInterfaceTeamHandler.cs b/Client/Assets/Scripts/XMainClient/UI/XMainInterfaceTeamHandler.cs
new file mode 100644
index 00000000..4ef44ca1
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XMainInterfaceTeamHandler.cs
@@ -0,0 +1,220 @@
+using System;
+using System.Collections.Generic;
+using KKSG;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class XMainInterfaceTeamHandler : DlgHandlerBase
+ {
+ private GameObject m_InTeamFrame;
+
+ private GameObject m_OutTeamFrame;
+
+ private GameObject m_MatchingGo;
+
+ private GameObject m_RecruitRedPoint;
+
+ private IXUIButton m_BtnCreate;
+
+ private IXUIButton m_BtnJoin;
+
+ private IXUIButton m_BtnGroupChat;
+
+ private IXUISprite m_InTeamBg;
+
+ private int m_InTeamOriginHeight;
+
+ private XTeamDocument _TeamDoc;
+
+ private XUIPool m_TeamUIPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ private List<XMainInterfaceMemberMonitor> m_Members = new List<XMainInterfaceMemberMonitor>();
+
+ private List<XTeamBloodUIData> _teamList = new List<XTeamBloodUIData>();
+
+ private int m_MaxTeamCount;
+
+ private int m_PreActiveCount = 0;
+
+ protected override void Init()
+ {
+ base.Init();
+ this.m_InTeamFrame = base.PanelObject.transform.Find("InTeamFrame").gameObject;
+ this.m_OutTeamFrame = base.PanelObject.transform.Find("OutTeamFrame").gameObject;
+ this.m_BtnCreate = (this.m_OutTeamFrame.transform.Find("BtnCreate").GetComponent("XUIButton") as IXUIButton);
+ this.m_BtnJoin = (this.m_OutTeamFrame.transform.Find("BtnJoin").GetComponent("XUIButton") as IXUIButton);
+ this.m_BtnGroupChat = (this.m_OutTeamFrame.transform.Find("BtnGroupChat").GetComponent("XUIButton") as IXUIButton);
+ this.m_MatchingGo = this.m_InTeamFrame.transform.Find("Matching").gameObject;
+ this.m_RecruitRedPoint = this.m_OutTeamFrame.transform.Find("BtnGroupChat/RedPoint").gameObject;
+ this.m_InTeamBg = (this.m_InTeamFrame.transform.Find("Bg").GetComponent("XUISprite") as IXUISprite);
+ this.m_InTeamOriginHeight = this.m_InTeamBg.spriteHeight;
+ Transform transform = this.m_InTeamFrame.transform.Find("Panel/TeammateTpl");
+ this.m_TeamUIPool.SetupPool(transform.parent.gameObject, transform.gameObject, 4u, false);
+ this._TeamDoc = XDocuments.GetSpecificDocument<XTeamDocument>(XTeamDocument.uuID);
+ }
+
+ public void SetupRedPoint()
+ {
+ this.m_BtnGroupChat.SetVisible(XSingleton<XGameSysMgr>.singleton.IsSystemOpened(XSysDefine.XSys_GroupRecruit));
+ GroupChatDocument specificDocument = XDocuments.GetSpecificDocument<GroupChatDocument>(GroupChatDocument.uuID);
+ this.m_RecruitRedPoint.SetActive(specificDocument.bShowMotion);
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ this.m_BtnCreate.RegisterClickEventHandler(new ButtonClickEventHandler(this._OnCreateClicked));
+ this.m_BtnJoin.RegisterClickEventHandler(new ButtonClickEventHandler(this._OnJoinClicked));
+ this.m_BtnGroupChat.RegisterClickEventHandler(new ButtonClickEventHandler(this._OnGroupChatClicked));
+ this.m_InTeamBg.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this._OnBgClicked));
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ this.TeamInfoChange(this._TeamDoc.MyTeam);
+ }
+
+ public void TeamInfoChange(XTeam team)
+ {
+ this.SetupRedPoint();
+ bool flag = team == null;
+ if (flag)
+ {
+ this._teamList.Clear();
+ this.m_MaxTeamCount = 0;
+ this.OnTeamInfoChanged();
+ }
+ else
+ {
+ this.m_MaxTeamCount = team.teamBrief.totalMemberCount;
+ bool flag2 = team.members.Count != this._teamList.Count;
+ if (flag2)
+ {
+ int count = this._teamList.Count;
+ bool flag3 = team.members.Count < count;
+ if (flag3)
+ {
+ for (int i = count - 1; i >= team.members.Count; i--)
+ {
+ this._teamList.RemoveAt(i);
+ }
+ }
+ else
+ {
+ for (int j = count; j < team.members.Count; j++)
+ {
+ XTeamBloodUIData item = new XTeamBloodUIData();
+ this._teamList.Add(item);
+ }
+ }
+ }
+ for (int k = 0; k < this._teamList.Count; k++)
+ {
+ this._teamList[k].uid = team.members[k].uid;
+ this._teamList[k].level = (uint)team.members[k].level;
+ this._teamList[k].name = team.members[k].name;
+ this._teamList[k].profession = team.members[k].profession;
+ this._teamList[k].bIsLeader = team.members[k].bIsLeader;
+ }
+ this.OnTeamInfoChanged();
+ }
+ }
+
+ public void OnTeamInfoChanged()
+ {
+ bool flag = this._teamList.Count == 0;
+ if (flag)
+ {
+ this.m_InTeamFrame.SetActive(false);
+ this.m_OutTeamFrame.SetActive(true);
+ }
+ else
+ {
+ this.m_InTeamFrame.SetActive(true);
+ this.m_OutTeamFrame.SetActive(false);
+ int num = 1;
+ bool flag2 = XSingleton<XScene>.singleton.SceneType == SceneType.SKYCITY_WAITING;
+ if (flag2)
+ {
+ num = 0;
+ }
+ int num2 = Math.Min(this.m_MaxTeamCount - 1, this._teamList.Count - 1 + num);
+ bool flag3 = this.m_Members.Count < num2;
+ if (flag3)
+ {
+ for (int i = this.m_Members.Count; i < num2; i++)
+ {
+ XMainInterfaceMemberMonitor xmainInterfaceMemberMonitor = new XMainInterfaceMemberMonitor();
+ GameObject gameObject = this.m_TeamUIPool.FetchGameObject(false);
+ gameObject.transform.localPosition = new Vector3(this.m_TeamUIPool.TplPos.x, this.m_TeamUIPool.TplPos.y - (float)(this.m_TeamUIPool.TplHeight * i));
+ xmainInterfaceMemberMonitor.SetGo(gameObject);
+ this.m_Members.Add(xmainInterfaceMemberMonitor);
+ }
+ }
+ int j = 0;
+ int num3 = 0;
+ while (num3 < this._teamList.Count && j < this.m_Members.Count)
+ {
+ bool flag4 = this._teamList[num3].uid == XSingleton<XAttributeMgr>.singleton.XPlayerData.RoleID;
+ if (!flag4)
+ {
+ this.m_Members[j].SetMemberData(this._teamList[num3]);
+ this.m_Members[j].SetActive(true);
+ j++;
+ }
+ num3++;
+ }
+ while (j < num2)
+ {
+ this.m_Members[j].SetMemberData(null);
+ this.m_Members[j].SetActive(true);
+ j++;
+ }
+ this.m_PreActiveCount = j;
+ while (j < this.m_Members.Count)
+ {
+ this.m_Members[j].SetActive(false);
+ j++;
+ }
+ this.m_InTeamBg.spriteHeight = this.m_InTeamOriginHeight + (num2 - 1) * this.m_TeamUIPool.TplHeight;
+ bool flag5 = XSingleton<XScene>.singleton.SceneType == SceneType.SKYCITY_WAITING;
+ if (flag5)
+ {
+ this.m_MatchingGo.SetActive(false);
+ }
+ else
+ {
+ this.m_MatchingGo.SetActive(this._teamList.Count < this.m_MaxTeamCount);
+ }
+ }
+ }
+
+ private bool _OnGroupChatClicked(IXUIButton btn)
+ {
+ XSingleton<XGameSysMgr>.singleton.OpenSystem(XSysDefine.XSys_GroupRecruit, 0UL);
+ return true;
+ }
+
+ private bool _OnCreateClicked(IXUIButton btn)
+ {
+ DlgBase<XTeamView, TabDlgBehaviour>.singleton.ShowTeamView();
+ return true;
+ }
+
+ private void _OnBgClicked(IXUISprite iSp)
+ {
+ DlgBase<XTeamView, TabDlgBehaviour>.singleton.ShowTeamView();
+ }
+
+ private bool _OnJoinClicked(IXUIButton btn)
+ {
+ DlgBase<XTeamListView, XTeamListBehaviour>.singleton.SetVisibleWithAnimation(true, null);
+ return true;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/XMainInterfaceTeamHandler.cs.meta b/Client/Assets/Scripts/XMainClient/UI/XMainInterfaceTeamHandler.cs.meta
new file mode 100644
index 00000000..2d55fcf8
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XMainInterfaceTeamHandler.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: ceba0ad13eb6232478a5394f9af579a2
+timeCreated: 1611404579
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/XMainSubstance.cs b/Client/Assets/Scripts/XMainClient/UI/XMainSubstance.cs
new file mode 100644
index 00000000..a97c5ea9
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XMainSubstance.cs
@@ -0,0 +1,124 @@
+using System;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ public class XMainSubstance
+ {
+ private XSysDefine _systemID = XSysDefine.XSys_None;
+
+ private int _count = 0;
+
+ private int _index;
+
+ private XFx _xfx;
+
+ public GameObject gameObject;
+
+ public void Setup(GameObject go)
+ {
+ this.gameObject = go;
+ }
+
+ public void SetupSubstance(XSysDefine define, int showCount, int index = 0)
+ {
+ this._systemID = define;
+ this._count = showCount;
+ this._index = index;
+ this.Refresh();
+ }
+
+ public void Release()
+ {
+ this.DeleteXFX();
+ }
+
+ public void Recycle()
+ {
+ this._count = 0;
+ this._index = 0;
+ this.DeleteXFX();
+ this.gameObject.SetActive(false);
+ }
+
+ private void Refresh()
+ {
+ this.gameObject.SetActive(true);
+ OpenSystemTable.RowData systemOpen = XSingleton<XGameSysMgr>.singleton.GetSystemOpen(this._systemID);
+ Transform transform = this.gameObject.transform.Find("Member");
+ IXUILabel ixuilabel = this.gameObject.transform.Find("Member/Num").GetComponent("XUILabel") as IXUILabel;
+ IXUISprite ixuisprite = this.gameObject.transform.Find("Invatation").GetComponent("XUISprite") as IXUISprite;
+ IXUISprite ixuisprite2 = this.gameObject.transform.Find("Name").GetComponent("XUISprite") as IXUISprite;
+ IXUIButton ixuibutton = this.gameObject.transform.GetComponent("XUIButton") as IXUIButton;
+ Transform transform2 = this.gameObject.transform.Find("effect");
+ bool flag = this._count > 0;
+ if (flag)
+ {
+ transform.gameObject.SetActive(true);
+ ixuilabel.SetText(this._count.ToString());
+ }
+ else
+ {
+ transform.gameObject.SetActive(false);
+ }
+ bool flag2 = this._index < systemOpen.NoticeText.Count;
+ if (flag2)
+ {
+ ixuisprite2.SetSprite(systemOpen.NoticeText[this._index, 1], systemOpen.NoticeText[this._index, 0], false);
+ }
+ else
+ {
+ ixuisprite2.SetSprite("");
+ }
+ ixuisprite2.MakePixelPerfect();
+ bool flag3 = this._index < systemOpen.NoticeIcon.Count;
+ if (flag3)
+ {
+ ixuisprite.SetSprite(systemOpen.NoticeIcon[this._index, 1], systemOpen.NoticeIcon[this._index, 0], false);
+ }
+ else
+ {
+ ixuisprite.SetSprite("");
+ }
+ ixuisprite.MakePixelPerfect();
+ ixuibutton.ID = (ulong)((long)XFastEnumIntEqualityComparer<XSysDefine>.ToInt(this._systemID));
+ ixuibutton.RegisterClickEventHandler(new ButtonClickEventHandler(DlgBase<XMainInterface, XMainInterfaceBehaviour>.singleton.OnSysIconClicked));
+ bool flag4 = systemOpen.NoticeEffect != null && systemOpen.NoticeEffect.Length != 0;
+ if (flag4)
+ {
+ this.CreateXFX(systemOpen.NoticeEffect[0]);
+ }
+ else
+ {
+ this.DeleteXFX();
+ }
+ }
+
+ private void CreateXFX(string effectStr)
+ {
+ bool flag = this._xfx != null && this._xfx.FxName != effectStr;
+ if (flag)
+ {
+ this.DeleteXFX();
+ }
+ bool flag2 = this._xfx == null && !string.IsNullOrEmpty(effectStr) && this.gameObject != null;
+ if (flag2)
+ {
+ this._xfx = XSingleton<XFxMgr>.singleton.CreateUIFx(effectStr, this.gameObject.transform, false);
+ }
+ }
+
+ private void DeleteXFX()
+ {
+ bool flag = this._xfx != null;
+ if (flag)
+ {
+ XSingleton<XFxMgr>.singleton.DestroyFx(this._xfx, true);
+ this._xfx = null;
+ }
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/XMainSubstance.cs.meta b/Client/Assets/Scripts/XMainClient/UI/XMainSubstance.cs.meta
new file mode 100644
index 00000000..6a9258a3
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XMainSubstance.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 863404e4d5e42ad4a87f4b1bbbb2c4d5
+timeCreated: 1611404053
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/XMainSubstanceHandler.cs b/Client/Assets/Scripts/XMainClient/UI/XMainSubstanceHandler.cs
new file mode 100644
index 00000000..b8c084c0
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XMainSubstanceHandler.cs
@@ -0,0 +1,525 @@
+using System;
+using System.Collections.Generic;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ public class XMainSubstanceHandler : DlgHandlerBase
+ {
+ private IXUIList m_substanceList;
+
+ private XUIPool _tempPool;
+
+ private Stack<XMainSubstance> _stack;
+
+ private Dictionary<XSysDefine, XMainSubstance> _ShowSubStance;
+
+ private XMainSubstance GetSubstance()
+ {
+ bool flag = this._stack == null;
+ if (flag)
+ {
+ this._stack = new Stack<XMainSubstance>();
+ }
+ bool flag2 = this._stack.Count == 0;
+ XMainSubstance result;
+ if (flag2)
+ {
+ result = this.CreateSubStance();
+ }
+ else
+ {
+ result = this._stack.Pop();
+ }
+ return result;
+ }
+
+ public override void OnUnload()
+ {
+ this._tempPool = null;
+ bool flag = this._stack != null;
+ if (flag)
+ {
+ while (this._stack.Count > 0)
+ {
+ XMainSubstance xmainSubstance = this._stack.Pop();
+ xmainSubstance.Release();
+ }
+ }
+ bool flag2 = this._ShowSubStance != null;
+ if (flag2)
+ {
+ foreach (KeyValuePair<XSysDefine, XMainSubstance> keyValuePair in this._ShowSubStance)
+ {
+ keyValuePair.Value.Release();
+ }
+ this._ShowSubStance.Clear();
+ this._ShowSubStance = null;
+ }
+ base.OnUnload();
+ }
+
+ private void Release(XMainSubstance substance)
+ {
+ bool flag = substance != null;
+ if (flag)
+ {
+ substance.Recycle();
+ this._stack.Push(substance);
+ }
+ }
+
+ private XMainSubstance CreateSubStance()
+ {
+ XMainSubstance xmainSubstance = new XMainSubstance();
+ xmainSubstance.Setup(this._tempPool.FetchGameObject(false));
+ return xmainSubstance;
+ }
+
+ protected override void Init()
+ {
+ base.Init();
+ this._ShowSubStance = new Dictionary<XSysDefine, XMainSubstance>();
+ this.m_substanceList = (base.transform.GetComponent("XUIList") as IXUIList);
+ Transform transform = base.transform.Find("Temp");
+ this._tempPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+ this._tempPool.SetupPool(transform.parent.gameObject, transform.gameObject, 5u, false);
+ this._ShowSubStance = new Dictionary<XSysDefine, XMainSubstance>();
+ }
+
+ public void RefreshMainSubStance(XSysDefine define, bool refreshList = true)
+ {
+ int index = 0;
+ int showCount = 0;
+ bool flag = this.TryCheckInShow(define, out index, out showCount);
+ if (flag)
+ {
+ XMainSubstance substance;
+ bool flag2 = !this._ShowSubStance.TryGetValue(define, out substance);
+ if (flag2)
+ {
+ substance = this.GetSubstance();
+ this._ShowSubStance.Add(define, substance);
+ }
+ substance.SetupSubstance(define, showCount, index);
+ XSingleton<XDebug>.singleton.AddGreenLog("OnShow:" + define.ToString(), null, null, null, null, null);
+ }
+ else
+ {
+ XMainSubstance substance;
+ bool flag3 = this._ShowSubStance.TryGetValue(define, out substance);
+ if (flag3)
+ {
+ this.Release(substance);
+ this._ShowSubStance.Remove(define);
+ }
+ }
+ if (refreshList)
+ {
+ this.Sort();
+ }
+ }
+
+ public void Sort()
+ {
+ bool flag = this.m_substanceList != null;
+ if (flag)
+ {
+ this.m_substanceList.Refresh();
+ }
+ }
+
+ private bool TryCheckInShow(XSysDefine define, out int index, out int showCount)
+ {
+ showCount = 0;
+ index = 0;
+ bool flag = false;
+ bool flag2 = !XSingleton<XGameSysMgr>.singleton.IsSystemOpened(define);
+ bool result;
+ if (flag2)
+ {
+ result = flag;
+ }
+ else
+ {
+ if (define <= XSysDefine.Xsys_TaJieHelp)
+ {
+ if (define <= XSysDefine.XSys_Rank_WorldBoss)
+ {
+ if (define <= XSysDefine.XSys_PK)
+ {
+ if (define != XSysDefine.XSys_SuperRisk)
+ {
+ if (define != XSysDefine.XSys_ExcellentLive)
+ {
+ if (define == XSysDefine.XSys_PK)
+ {
+ XPKInvitationDocument specificDocument = XDocuments.GetSpecificDocument<XPKInvitationDocument>(XPKInvitationDocument.uuID);
+ flag = (specificDocument.InvitationCount > 0u);
+ bool flag3 = flag;
+ if (flag3)
+ {
+ showCount = (int)specificDocument.InvitationCount;
+ }
+ }
+ }
+ else
+ {
+ XSpectateDocument specificDocument2 = XDocuments.GetSpecificDocument<XSpectateDocument>(XSpectateDocument.uuID);
+ flag = specificDocument2.MainInterfaceState;
+ }
+ }
+ else
+ {
+ flag = XSuperRiskDocument.Doc.IsShowMainUiTips();
+ }
+ }
+ else if (define <= XSysDefine.XSys_Pet_Pairs)
+ {
+ if (define != XSysDefine.XSys_CrossGVG)
+ {
+ if (define == XSysDefine.XSys_Pet_Pairs)
+ {
+ XPetDocument specificDocument3 = XDocuments.GetSpecificDocument<XPetDocument>(XPetDocument.uuID);
+ flag = specificDocument3.BeInvited;
+ bool flag4 = flag;
+ if (flag4)
+ {
+ showCount = (int)specificDocument3.BeInvitedCount;
+ }
+ }
+ }
+ else
+ {
+ XCrossGVGDocument specificDocument4 = XDocuments.GetSpecificDocument<XCrossGVGDocument>(XCrossGVGDocument.uuID);
+ flag = specificDocument4.InterfaceState;
+ }
+ }
+ else if (define != XSysDefine.XSys_WeekEndNest)
+ {
+ if (define == XSysDefine.XSys_Rank_WorldBoss)
+ {
+ XWorldBossDocument specificDocument5 = XDocuments.GetSpecificDocument<XWorldBossDocument>(XWorldBossDocument.uuID);
+ flag = specificDocument5.MainInterfaceState;
+ }
+ }
+ else
+ {
+ WeekEndNestDocument doc = WeekEndNestDocument.Doc;
+ flag = (doc.GetStatus == 1u || (doc.NeedLoginShow && doc.GetStatus == 0u));
+ }
+ }
+ else if (define <= XSysDefine.XSys_Activity_WorldBoss)
+ {
+ if (define != XSysDefine.XSys_LevelSeal_Tip)
+ {
+ if (define != XSysDefine.XSys_MentorshipMsg_Tip)
+ {
+ if (define == XSysDefine.XSys_Activity_WorldBoss)
+ {
+ flag = (XSingleton<XGameSysMgr>.singleton.GetSysRedPointStateConsiderBlock(XSysDefine.XSys_Activity_WorldBoss) && XSingleton<XGameSysMgr>.singleton.IsSystemOpened(XSysDefine.XSys_Activity_WorldBoss));
+ }
+ }
+ else
+ {
+ flag = XMentorshipDocument.Doc.HasApplyMsg;
+ }
+ }
+ else
+ {
+ XLevelSealDocument specificDocument6 = XDocuments.GetSpecificDocument<XLevelSealDocument>(XLevelSealDocument.uuID);
+ uint status = specificDocument6.Status;
+ bool flag5 = status >= 3u;
+ if (flag5)
+ {
+ XSingleton<XDebug>.singleton.AddErrorLog("LevelSealStatus Error: status = ", status.ToString(), null, null, null, null);
+ }
+ else
+ {
+ bool flag6 = status > 0u;
+ if (flag6)
+ {
+ flag = true;
+ bool flag7 = status == 1u;
+ if (flag7)
+ {
+ index = 0;
+ }
+ else
+ {
+ bool flag8 = status == 2u;
+ if (flag8)
+ {
+ index = 1;
+ }
+ }
+ }
+ }
+ }
+ }
+ else if (define <= XSysDefine.XSys_MulActivity_SkyArenaEnd)
+ {
+ switch (define)
+ {
+ case XSysDefine.XSys_Activity_CaptainPVP:
+ {
+ XCaptainPVPDocument specificDocument7 = XDocuments.GetSpecificDocument<XCaptainPVPDocument>(XCaptainPVPDocument.uuID);
+ flag = specificDocument7.MainInterfaceState;
+ break;
+ }
+ case XSysDefine.XSys_Activity_GoddessTrial:
+ case XSysDefine.XSys_Activity_TeamTowerSingle:
+ break;
+ case XSysDefine.XSys_BigMelee:
+ {
+ XBigMeleeEntranceDocument specificDocument8 = XDocuments.GetSpecificDocument<XBigMeleeEntranceDocument>(XBigMeleeEntranceDocument.uuID);
+ flag = specificDocument8.MainInterfaceState;
+ break;
+ }
+ case XSysDefine.XSys_BigMeleeEnd:
+ {
+ XBigMeleeEntranceDocument specificDocument9 = XDocuments.GetSpecificDocument<XBigMeleeEntranceDocument>(XBigMeleeEntranceDocument.uuID);
+ flag = specificDocument9.MainInterfaceStateEnd;
+ break;
+ }
+ case XSysDefine.XSys_Battlefield:
+ flag = XBattleFieldEntranceDocument.Doc.MainInterfaceState;
+ break;
+ default:
+ switch (define)
+ {
+ case XSysDefine.XSys_MulActivity_SkyArena:
+ {
+ XSkyArenaEntranceDocument specificDocument10 = XDocuments.GetSpecificDocument<XSkyArenaEntranceDocument>(XSkyArenaEntranceDocument.uuID);
+ flag = specificDocument10.MainInterfaceState;
+ break;
+ }
+ case XSysDefine.XSys_MulActivity_Race:
+ flag = DlgBase<RaceEntranceView, RaceEntranceBehaviour>.singleton.MainInterfaceState;
+ break;
+ case XSysDefine.XSys_MulActivity_WeekendParty:
+ {
+ XWeekendPartyDocument specificDocument11 = XDocuments.GetSpecificDocument<XWeekendPartyDocument>(XWeekendPartyDocument.uuID);
+ flag = specificDocument11.MainInterfaceState;
+ break;
+ }
+ case XSysDefine.XSys_MulActivity_SkyArenaEnd:
+ flag = XSkyArenaEntranceDocument.Doc.MainInterfaceStateEnd;
+ break;
+ }
+ break;
+ }
+ }
+ else if (define != XSysDefine.XSys_Welfare_NiceGirl)
+ {
+ if (define == XSysDefine.Xsys_TaJieHelp)
+ {
+ flag = TaJieHelpDocument.Doc.ShowHallBtn;
+ }
+ }
+ else
+ {
+ flag = (XSingleton<XGameSysMgr>.singleton.IsSystemOpened(define, XSingleton<XAttributeMgr>.singleton.XPlayerData) && XWelfareDocument.Doc.ArgentaMainInterfaceState && !XWelfareDocument.Doc.IsNiceGirlTasksFinished());
+ }
+ }
+ else if (define <= XSysDefine.XSys_GuildInherit)
+ {
+ if (define <= XSysDefine.XSys_GuildRelax_JokerMatch)
+ {
+ if (define != XSysDefine.XSys_GroupRecruitAuthorize)
+ {
+ if (define != XSysDefine.XSys_GuildRelax_VoiceQA)
+ {
+ if (define == XSysDefine.XSys_GuildRelax_JokerMatch)
+ {
+ XGuildJockerMatchDocument specificDocument12 = XDocuments.GetSpecificDocument<XGuildJockerMatchDocument>(XGuildJockerMatchDocument.uuID);
+ flag = specificDocument12.bAvaiableIconWhenShow;
+ }
+ }
+ else
+ {
+ XVoiceQADocument specificDocument13 = XDocuments.GetSpecificDocument<XVoiceQADocument>(XVoiceQADocument.uuID);
+ flag = specificDocument13.MainInterFaceBtnState;
+ bool flag9 = flag;
+ if (flag9)
+ {
+ XVoiceQADocument specificDocument14 = XDocuments.GetSpecificDocument<XVoiceQADocument>(XVoiceQADocument.uuID);
+ index = (int)specificDocument14.TempType;
+ }
+ }
+ }
+ else
+ {
+ GroupChatDocument specificDocument15 = XDocuments.GetSpecificDocument<GroupChatDocument>(GroupChatDocument.uuID);
+ flag = specificDocument15.bShowMotion;
+ }
+ }
+ else if (define <= XSysDefine.XSys_GuildQualifier)
+ {
+ if (define != XSysDefine.XSys_GuildBoon_RedPacket)
+ {
+ if (define == XSysDefine.XSys_GuildQualifier)
+ {
+ XGuildQualifierDocument specificDocument16 = XDocuments.GetSpecificDocument<XGuildQualifierDocument>(XGuildQualifierDocument.uuID);
+ flag = specificDocument16.bHasAvailableLadderIcon;
+ }
+ }
+ else
+ {
+ XGuildRedPacketDocument specificDocument17 = XDocuments.GetSpecificDocument<XGuildRedPacketDocument>(XGuildRedPacketDocument.uuID);
+ flag = (specificDocument17.bHasShowIconRedPacket > 0);
+ bool flag10 = flag;
+ if (flag10)
+ {
+ showCount = specificDocument17.bHasShowIconRedPacket;
+ }
+ }
+ }
+ else if (define != XSysDefine.XSys_GuildDailyTask)
+ {
+ if (define == XSysDefine.XSys_GuildInherit)
+ {
+ XGuildInheritDocument specificDocument18 = XDocuments.GetSpecificDocument<XGuildInheritDocument>(XGuildInheritDocument.uuID);
+ flag = (specificDocument18.bHasAvailableIconShow > 0u);
+ bool flag11 = flag;
+ if (flag11)
+ {
+ showCount = (int)specificDocument18.bHasAvailableIconShow;
+ }
+ }
+ }
+ else
+ {
+ flag = XGuildDailyTaskDocument.Doc.DailyTaskBeenRefreshIcon;
+ }
+ }
+ else if (define <= XSysDefine.XSys_IDIP_ZeroReward)
+ {
+ if (define <= XSysDefine.XSys_Team_Invited)
+ {
+ if (define != XSysDefine.XSys_JockerKing)
+ {
+ if (define == XSysDefine.XSys_Team_Invited)
+ {
+ XTeamInviteDocument specificDocument19 = XDocuments.GetSpecificDocument<XTeamInviteDocument>(XTeamInviteDocument.uuID);
+ flag = (specificDocument19.m_InvitedCount > 0);
+ bool flag12 = flag;
+ if (flag12)
+ {
+ showCount = specificDocument19.m_InvitedCount;
+ }
+ }
+ }
+ else
+ {
+ XJokerKingDocument specificDocument20 = XDocuments.GetSpecificDocument<XJokerKingDocument>(XJokerKingDocument.uuID);
+ flag = specificDocument20.bAvaiableIconWhenShow;
+ }
+ }
+ else if (define != XSysDefine.XSys_GuildDailyRequest)
+ {
+ if (define == XSysDefine.XSys_IDIP_ZeroReward)
+ {
+ XIDIPDocument specificDocument21 = XDocuments.GetSpecificDocument<XIDIPDocument>(XIDIPDocument.uuID);
+ flag = specificDocument21.ZeroRewardBtnState;
+ }
+ }
+ else
+ {
+ flag = XGuildDailyTaskDocument.Doc.DailyTaskHelpRefreshIcon;
+ }
+ }
+ else if (define <= XSysDefine.XSys_GuildTerritoryMessageInterface)
+ {
+ switch (define)
+ {
+ case XSysDefine.XSys_HeroBattle:
+ {
+ XHeroBattleDocument specificDocument22 = XDocuments.GetSpecificDocument<XHeroBattleDocument>(XHeroBattleDocument.uuID);
+ flag = specificDocument22.MaininterfaceState;
+ break;
+ }
+ case XSysDefine.XSys_GuildBossMainInterface:
+ flag = (XSingleton<XGameSysMgr>.singleton.GetSysRedPointStateConsiderBlock(XSysDefine.XSys_GuildDragon) && XSingleton<XGameSysMgr>.singleton.IsSystemOpened(XSysDefine.XSys_GuildDragon));
+ break;
+ case XSysDefine.XSys_GuildMineMainInterface:
+ {
+ XGuildMineEntranceDocument specificDocument23 = XDocuments.GetSpecificDocument<XGuildMineEntranceDocument>(XGuildMineEntranceDocument.uuID);
+ flag = specificDocument23.MainInterfaceState;
+ break;
+ }
+ case XSysDefine.XSys_GuildPvpMainInterface:
+ flag = XSingleton<XGameSysMgr>.singleton.GetSysRedPointStateConsiderBlock(XSysDefine.XSys_GuildPvp);
+ break;
+ case XSysDefine.XSys_TeamLeague:
+ {
+ XFreeTeamVersusLeagueDocument specificDocument24 = XDocuments.GetSpecificDocument<XFreeTeamVersusLeagueDocument>(XFreeTeamVersusLeagueDocument.uuID);
+ flag = specificDocument24.MainInterfaceState;
+ break;
+ }
+ case XSysDefine.XSys_ProfessionChange:
+ case XSysDefine.XSys_Questionnaire:
+ break;
+ case XSysDefine.XSys_GuildMineEnd:
+ {
+ XGuildMineEntranceDocument specificDocument25 = XDocuments.GetSpecificDocument<XGuildMineEntranceDocument>(XGuildMineEntranceDocument.uuID);
+ flag = specificDocument25.MainInterfaceStateEnd;
+ break;
+ }
+ default:
+ switch (define)
+ {
+ case XSysDefine.XSys_GuildTerritoryIconInterface:
+ {
+ XGuildTerritoryDocument specificDocument26 = XDocuments.GetSpecificDocument<XGuildTerritoryDocument>(XGuildTerritoryDocument.uuID);
+ flag = (specificDocument26.TerritoryStyle > XGuildTerritoryDocument.GuildTerritoryStyle.NONE);
+ break;
+ }
+ case XSysDefine.XSys_GuildTerritoryAllianceInterface:
+ {
+ XGuildTerritoryDocument specificDocument27 = XDocuments.GetSpecificDocument<XGuildTerritoryDocument>(XGuildTerritoryDocument.uuID);
+ flag = (specificDocument27.bHavaTerritoryRecCount > 0u);
+ bool flag13 = flag;
+ if (flag13)
+ {
+ showCount = (int)specificDocument27.bHavaTerritoryRecCount;
+ }
+ break;
+ }
+ case XSysDefine.XSys_GuildTerritoryMessageInterface:
+ {
+ XGuildTerritoryDocument specificDocument28 = XDocuments.GetSpecificDocument<XGuildTerritoryDocument>(XGuildTerritoryDocument.uuID);
+ flag = specificDocument28.bHavaShowMessageIcon;
+ break;
+ }
+ }
+ break;
+ }
+ }
+ else if (define != XSysDefine.XSys_Exchange)
+ {
+ if (define == XSysDefine.XSys_GuildCollectMainInterface)
+ {
+ XGuildCollectDocument specificDocument29 = XDocuments.GetSpecificDocument<XGuildCollectDocument>(XGuildCollectDocument.uuID);
+ flag = specificDocument29.MainInterfaceBtnState;
+ }
+ }
+ else
+ {
+ XRequestDocument specificDocument30 = XDocuments.GetSpecificDocument<XRequestDocument>(XRequestDocument.uuID);
+ flag = (specificDocument30.MainInterfaceNum != 0);
+ bool flag14 = flag;
+ if (flag14)
+ {
+ showCount = specificDocument30.MainInterfaceNum;
+ }
+ }
+ result = flag;
+ }
+ return result;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/XMainSubstanceHandler.cs.meta b/Client/Assets/Scripts/XMainClient/UI/XMainSubstanceHandler.cs.meta
new file mode 100644
index 00000000..c9bc6d61
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XMainSubstanceHandler.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 6e6290a6d1d600e4d81f01626e628126
+timeCreated: 1611403904
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/XMentorshipApplicationBehavior.cs b/Client/Assets/Scripts/XMainClient/UI/XMentorshipApplicationBehavior.cs
new file mode 100644
index 00000000..3de55ff8
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XMentorshipApplicationBehavior.cs
@@ -0,0 +1,28 @@
+using System;
+using UILib;
+using XMainClient.UI.UICommon;
+
+namespace XMainClient.UI
+{
+ internal class XMentorshipApplicationBehavior : DlgBehaviourBase
+ {
+ public IXUIWrapContent WrapContent = null;
+
+ public IXUIButton CloseBtn;
+
+ public IXUIButton ClearBtn;
+
+ public IXUIScrollView scrollView;
+
+ public IXUIButton OneShotBtn;
+
+ private void Awake()
+ {
+ this.WrapContent = (base.transform.Find("Bg/List/WrapContent").GetComponent("XUIWrapContent") as IXUIWrapContent);
+ this.scrollView = (this.WrapContent.gameObject.transform.parent.GetComponent("XUIScrollView") as IXUIScrollView);
+ this.CloseBtn = (base.transform.Find("Bg/Close").GetComponent("XUIButton") as IXUIButton);
+ this.ClearBtn = (base.transform.Find("Bg/Clear").GetComponent("XUIButton") as IXUIButton);
+ this.OneShotBtn = (base.transform.Find("Bg/OneShotAccept").GetComponent("XUIButton") as IXUIButton);
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/XMentorshipApplicationBehavior.cs.meta b/Client/Assets/Scripts/XMainClient/UI/XMentorshipApplicationBehavior.cs.meta
new file mode 100644
index 00000000..58d958d4
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XMentorshipApplicationBehavior.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: e4174c0f0bb815741a4ca87a8fe90e11
+timeCreated: 1611404736
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/XMentorshipApplicationsView.cs b/Client/Assets/Scripts/XMainClient/UI/XMentorshipApplicationsView.cs
new file mode 100644
index 00000000..8489f3e6
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XMentorshipApplicationsView.cs
@@ -0,0 +1,267 @@
+using System;
+using KKSG;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class XMentorshipApplicationsView : DlgBase<XMentorshipApplicationsView, XMentorshipApplicationBehavior>
+ {
+ public override string fileName
+ {
+ get
+ {
+ return "GameSystem/Teachermessage";
+ }
+ }
+
+ public override int layer
+ {
+ get
+ {
+ return 1;
+ }
+ }
+
+ public override int group
+ {
+ get
+ {
+ return 1;
+ }
+ }
+
+ public override bool autoload
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ protected override void Init()
+ {
+ this.InitProperties();
+ }
+
+ protected override void OnUnload()
+ {
+ base.OnUnload();
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ XMentorshipDocument.Doc.SendCandidatesOpReq(EMentorMsgOpType.EMentorMsgOp_Get, 0UL, MentorMsgApplyType.MentorMsgApplyMax, 0, false);
+ base.uiBehaviour.OneShotBtn.gameObject.SetActive(false);
+ }
+
+ public void RefreshUI()
+ {
+ int beenApplyMsgCount = XMentorshipDocument.Doc.GetBeenApplyMsgCount();
+ base.uiBehaviour.WrapContent.SetContentCount(beenApplyMsgCount, false);
+ base.uiBehaviour.scrollView.ResetPosition();
+ base.uiBehaviour.OneShotBtn.gameObject.SetActive(XMentorshipDocument.Doc.GetBeenApplyReportsMsgCount() > 0);
+ }
+
+ private void InitProperties()
+ {
+ base.uiBehaviour.CloseBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnCloseView));
+ base.uiBehaviour.ClearBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnClearNews));
+ base.uiBehaviour.WrapContent.RegisterItemInitEventHandler(new WrapItemInitEventHandler(this.OnWrapContentItemInit));
+ base.uiBehaviour.WrapContent.RegisterItemUpdateEventHandler(new WrapItemUpdateEventHandler(this.OnWrapContentItemUpdate));
+ base.uiBehaviour.OneShotBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnShotAcceptReports));
+ }
+
+ private bool OnShotAcceptReports(IXUIButton button)
+ {
+ XMentorshipDocument.Doc.SendCandidatesOpReq(EMentorMsgOpType.EMentorMsgOpType_Agree, 0UL, MentorMsgApplyType.MentorMsgApplyReportTask, 0, true);
+ return true;
+ }
+
+ private bool OnClearNews(IXUIButton button)
+ {
+ XMentorshipDocument.Doc.SendCandidatesOpReq(EMentorMsgOpType.EMentorMsgOpType_Clear, 0UL, MentorMsgApplyType.MentorMsgApplyMax, 0, false);
+ return true;
+ }
+
+ private bool OnCloseView(IXUIButton button)
+ {
+ this.SetVisibleWithAnimation(false, null);
+ return true;
+ }
+
+ private void OnWrapContentItemUpdate(Transform itemTransform, int index)
+ {
+ MentorBeenApplyedInfo beenApplyInfoByIndex = XMentorshipDocument.Doc.GetBeenApplyInfoByIndex(index);
+ bool flag = beenApplyInfoByIndex != null;
+ if (flag)
+ {
+ IXUILabel ixuilabel = itemTransform.Find("level").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel.SetText(beenApplyInfoByIndex.roleInfo.level.ToString());
+ IXUISprite ixuisprite = itemTransform.Find("head").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.spriteName = XSingleton<XProfessionSkillMgr>.singleton.GetProfHeadIcon2((int)((int)beenApplyInfoByIndex.roleInfo.type % 10));
+ XFriendData friendDataById = DlgBase<XFriendsView, XFriendsBehaviour>.singleton.GetFriendDataById(beenApplyInfoByIndex.roleInfo.roleID);
+ IXUISprite ixuisprite2 = itemTransform.Find("Profession").GetComponent("XUISprite") as IXUISprite;
+ IXUILabelSymbol ixuilabelSymbol = itemTransform.Find("Name").GetComponent("XUILabelSymbol") as IXUILabelSymbol;
+ IXUILabel ixuilabel2 = itemTransform.Find("Name").GetComponent("XUILabel") as IXUILabel;
+ ixuisprite2.SetSprite(XSingleton<XProfessionSkillMgr>.singleton.GetProfIcon((int)((int)beenApplyInfoByIndex.roleInfo.type % 10)));
+ bool flag2 = friendDataById != null;
+ if (flag2)
+ {
+ ixuilabelSymbol.InputText = XSingleton<XCommon>.singleton.StringCombine(XTitleDocument.GetTitleWithFormat(friendDataById.titleID, friendDataById.name), XWelfareDocument.GetMemberPrivilegeIconString(friendDataById.paymemberid), XRechargeDocument.GetVIPIconString(friendDataById.viplevel));
+ }
+ else
+ {
+ ixuilabelSymbol.InputText = "";
+ ixuilabel2.SetText(beenApplyInfoByIndex.roleInfo.name);
+ }
+ IXUILabel ixuilabel3 = itemTransform.Find("MsgType").GetComponent("XUILabel") as IXUILabel;
+ switch (beenApplyInfoByIndex.applyType)
+ {
+ case MentorMsgApplyType.MentorMsgApplyMaster:
+ ixuilabel3.SetText(XSingleton<XStringTable>.singleton.GetString("MentorMsgApplyMaster"));
+ break;
+ case MentorMsgApplyType.MentorMsgApplyStudent:
+ ixuilabel3.SetText(XSingleton<XStringTable>.singleton.GetString("MentorMsgApplyStudent"));
+ break;
+ case MentorMsgApplyType.MentorMsgApplyInherit:
+ ixuilabel3.SetText(XSingleton<XStringTable>.singleton.GetString("MentorMsgApplyInherit"));
+ break;
+ case MentorMsgApplyType.MentorMsgApplyReportTask:
+ {
+ MentorTaskTable.RowData tableTaskInfoByTaskID = XMentorshipDocument.Doc.GetTableTaskInfoByTaskID((uint)beenApplyInfoByIndex.reportTaskID);
+ bool flag3 = tableTaskInfoByTaskID != null;
+ if (flag3)
+ {
+ ixuilabel3.SetText(tableTaskInfoByTaskID.TaskName);
+ }
+ else
+ {
+ ixuilabel3.SetText(XSingleton<XStringTable>.singleton.GetString("MentorPupilToReport"));
+ }
+ break;
+ }
+ case MentorMsgApplyType.MentorMsgApplyBreak:
+ ixuilabel3.SetText(XSingleton<XStringTable>.singleton.GetString("MentorMsgApplyBreak"));
+ break;
+ }
+ IXUIButton ixuibutton = itemTransform.Find("RefuseBtn").GetComponent("XUIButton") as IXUIButton;
+ ixuibutton.gameObject.SetActive(beenApplyInfoByIndex.applyType == MentorMsgApplyType.MentorMsgApplyStudent || beenApplyInfoByIndex.applyType == MentorMsgApplyType.MentorMsgApplyMaster);
+ ixuibutton.ID = (ulong)((long)index);
+ IXUIButton ixuibutton2 = itemTransform.Find("AcceptBtn").GetComponent("XUIButton") as IXUIButton;
+ ixuibutton2.gameObject.SetActive(beenApplyInfoByIndex.applyType == MentorMsgApplyType.MentorMsgApplyStudent || beenApplyInfoByIndex.applyType == MentorMsgApplyType.MentorMsgApplyMaster);
+ ixuibutton2.ID = (ulong)((long)index);
+ bool flag4 = beenApplyInfoByIndex.applyType == MentorMsgApplyType.MentorMsgApplyInherit || beenApplyInfoByIndex.applyType == MentorMsgApplyType.MentorMsgApplyReportTask || beenApplyInfoByIndex.applyType == MentorMsgApplyType.MentorMsgApplyBreak;
+ Transform transform = itemTransform.Find("OneBtn");
+ transform.gameObject.SetActive(flag4);
+ bool flag5 = flag4;
+ if (flag5)
+ {
+ IXUIButton ixuibutton3 = transform.GetComponent("XUIButton") as IXUIButton;
+ IXUILabel ixuilabel4 = itemTransform.Find("OneBtn/opStr").GetComponent("XUILabel") as IXUILabel;
+ bool flag6 = beenApplyInfoByIndex.applyType == MentorMsgApplyType.MentorMsgApplyReportTask;
+ if (flag6)
+ {
+ ixuibutton3.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnClickToAgreeReport));
+ ixuilabel4.SetText(XSingleton<XStringTable>.singleton.GetString("AcceptReport"));
+ ixuibutton3.ID = (ulong)((long)index);
+ }
+ else
+ {
+ bool flag7 = beenApplyInfoByIndex.applyType == MentorMsgApplyType.MentorMsgApplyInherit;
+ if (flag7)
+ {
+ ixuibutton3.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnClickToInherit));
+ ixuilabel4.SetText(XSingleton<XStringTable>.singleton.GetString("ToAccept"));
+ ixuibutton3.ID = (ulong)((long)index);
+ }
+ else
+ {
+ bool flag8 = beenApplyInfoByIndex.applyType == MentorMsgApplyType.MentorMsgApplyBreak;
+ if (flag8)
+ {
+ ixuibutton3.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnClickToBreak));
+ ixuilabel4.SetText(XSingleton<XStringTable>.singleton.GetString("ToConfirm"));
+ ixuibutton3.ID = (ulong)((long)index);
+ }
+ }
+ }
+ }
+ }
+ }
+
+ private bool OnClickToBreak(IXUIButton button)
+ {
+ int index = (int)button.ID;
+ MentorBeenApplyedInfo beenApplyInfoByIndex = XMentorshipDocument.Doc.GetBeenApplyInfoByIndex(index);
+ bool flag = beenApplyInfoByIndex != null;
+ if (flag)
+ {
+ XMentorshipDocument.Doc.SendCandidatesOpReq(EMentorMsgOpType.EMentorMsgOpType_Agree, beenApplyInfoByIndex.roleInfo.roleID, beenApplyInfoByIndex.applyType, 0, false);
+ }
+ return true;
+ }
+
+ private bool OnClickToInherit(IXUIButton button)
+ {
+ int index = (int)button.ID;
+ MentorBeenApplyedInfo beenApplyInfoByIndex = XMentorshipDocument.Doc.GetBeenApplyInfoByIndex(index);
+ bool flag = beenApplyInfoByIndex != null;
+ if (flag)
+ {
+ XMentorshipDocument.Doc.SendCandidatesOpReq(EMentorMsgOpType.EMentorMsgOpType_Agree, beenApplyInfoByIndex.roleInfo.roleID, beenApplyInfoByIndex.applyType, 0, false);
+ }
+ return true;
+ }
+
+ private void OnWrapContentItemInit(Transform itemTransform, int index)
+ {
+ IXUIButton ixuibutton = itemTransform.Find("RefuseBtn").GetComponent("XUIButton") as IXUIButton;
+ ixuibutton.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnRefuseApply));
+ IXUIButton ixuibutton2 = itemTransform.Find("AcceptBtn").GetComponent("XUIButton") as IXUIButton;
+ ixuibutton2.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnAcceptApply));
+ }
+
+ private bool OnClickToAgreeReport(IXUIButton button)
+ {
+ int index = (int)button.ID;
+ MentorBeenApplyedInfo beenApplyInfoByIndex = XMentorshipDocument.Doc.GetBeenApplyInfoByIndex(index);
+ bool flag = beenApplyInfoByIndex != null;
+ if (flag)
+ {
+ XMentorshipDocument.Doc.SendCandidatesOpReq(EMentorMsgOpType.EMentorMsgOpType_Agree, beenApplyInfoByIndex.roleInfo.roleID, beenApplyInfoByIndex.applyType, beenApplyInfoByIndex.reportTaskID, false);
+ }
+ return true;
+ }
+
+ private bool OnAcceptApply(IXUIButton button)
+ {
+ MentorBeenApplyedInfo beenApplyInfoByIndex = XMentorshipDocument.Doc.GetBeenApplyInfoByIndex((int)button.ID);
+ bool flag = beenApplyInfoByIndex != null;
+ if (flag)
+ {
+ XMentorshipDocument.Doc.SendCandidatesOpReq(EMentorMsgOpType.EMentorMsgOpType_Agree, beenApplyInfoByIndex.roleInfo.roleID, beenApplyInfoByIndex.applyType, 0, false);
+ }
+ return true;
+ }
+
+ private bool OnRefuseApply(IXUIButton button)
+ {
+ MentorBeenApplyedInfo beenApplyInfoByIndex = XMentorshipDocument.Doc.GetBeenApplyInfoByIndex((int)button.ID);
+ bool flag = beenApplyInfoByIndex != null;
+ if (flag)
+ {
+ XMentorshipDocument.Doc.SendCandidatesOpReq(EMentorMsgOpType.EMentorMsgOpType_Reject, beenApplyInfoByIndex.roleInfo.roleID, beenApplyInfoByIndex.applyType, 0, false);
+ }
+ return true;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/XMentorshipApplicationsView.cs.meta b/Client/Assets/Scripts/XMainClient/UI/XMentorshipApplicationsView.cs.meta
new file mode 100644
index 00000000..81b060a5
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XMentorshipApplicationsView.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 361cbc5f8cb05ed4c962d9e5b38dbc3a
+timeCreated: 1611403561
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/XMentorshipCandidatesBehavior.cs b/Client/Assets/Scripts/XMainClient/UI/XMentorshipCandidatesBehavior.cs
new file mode 100644
index 00000000..1fab81fb
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XMentorshipCandidatesBehavior.cs
@@ -0,0 +1,31 @@
+using System;
+using UILib;
+using XMainClient.UI.UICommon;
+
+namespace XMainClient.UI
+{
+ internal class XMentorshipCandidatesBehavior : DlgBehaviourBase
+ {
+ public IXUIWrapContent WrapContent = null;
+
+ public IXUIScrollView ScrollView = null;
+
+ public IXUIButton ClearBtn;
+
+ public IXUIButton CloseBtn;
+
+ public IXUILabel titleContent;
+
+ public IXUILabel btnContent;
+
+ private void Awake()
+ {
+ this.WrapContent = (base.transform.Find("Bg/List/WrapContent").GetComponent("XUIWrapContent") as IXUIWrapContent);
+ this.ScrollView = (this.WrapContent.gameObject.transform.parent.GetComponent("XUIScrollView") as IXUIScrollView);
+ this.ClearBtn = (base.transform.Find("Bg/ClearOrSwap").GetComponent("XUIButton") as IXUIButton);
+ this.CloseBtn = (base.transform.Find("Bg/Close").GetComponent("XUIButton") as IXUIButton);
+ this.titleContent = (base.transform.Find("Bg/Title/content").GetComponent("XUILabel") as IXUILabel);
+ this.btnContent = (base.transform.Find("Bg/ClearOrSwap/Type").GetComponent("XUILabel") as IXUILabel);
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/XMentorshipCandidatesBehavior.cs.meta b/Client/Assets/Scripts/XMainClient/UI/XMentorshipCandidatesBehavior.cs.meta
new file mode 100644
index 00000000..08586a14
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XMentorshipCandidatesBehavior.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 86ab2de60a740234cac4188a84926daa
+timeCreated: 1611404055
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/XMentorshipCandidatesView.cs b/Client/Assets/Scripts/XMainClient/UI/XMentorshipCandidatesView.cs
new file mode 100644
index 00000000..c0f026aa
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XMentorshipCandidatesView.cs
@@ -0,0 +1,311 @@
+using System;
+using KKSG;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class XMentorshipCandidatesView : DlgBase<XMentorshipCandidatesView, XMentorshipCandidatesBehavior>
+ {
+ public override string fileName
+ {
+ get
+ {
+ return "GameSystem/TeacherPupilInvitation";
+ }
+ }
+
+ public override int layer
+ {
+ get
+ {
+ return 1;
+ }
+ }
+
+ public override int group
+ {
+ get
+ {
+ return 1;
+ }
+ }
+
+ public override bool autoload
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ protected override void Init()
+ {
+ this.InitProperties();
+ }
+
+ protected override void OnUnload()
+ {
+ base.OnUnload();
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ this.RefreshTitleAndDownBtn();
+ bool flag = XMentorshipDocument.Doc.CurViewType == CandidatesViewType.Application;
+ if (flag)
+ {
+ XMentorshipDocument.Doc.SendCandidatesOpReq(EMentorMsgOpType.EMentorMsgOp_Get, 0UL, MentorMsgApplyType.MentorMsgApplyMax, 0, false);
+ }
+ else
+ {
+ bool flag2 = XMentorshipDocument.Doc.CurViewType == CandidatesViewType.Recommend;
+ if (flag2)
+ {
+ bool flag3 = XMentorshipDocument.Doc.CurRecommendType == CandidatesViewRecommendType.Master;
+ if (flag3)
+ {
+ XMentorshipDocument.Doc.SendToGetMyApplyMasterInfo(false);
+ }
+ else
+ {
+ XMentorshipDocument.Doc.SendToGetMyApplyPupilsInfo(false);
+ }
+ }
+ }
+ }
+
+ private void RefreshTitleAndDownBtn()
+ {
+ bool flag = XMentorshipDocument.Doc.CurViewType == CandidatesViewType.Application;
+ if (flag)
+ {
+ base.uiBehaviour.titleContent.SetText(XSingleton<XStringTable>.singleton.GetString("MentorshipApply"));
+ base.uiBehaviour.btnContent.SetText(XSingleton<XStringTable>.singleton.GetString("MentorshipClear"));
+ }
+ else
+ {
+ bool flag2 = XMentorshipDocument.Doc.CurViewType == CandidatesViewType.Recommend;
+ if (flag2)
+ {
+ base.uiBehaviour.titleContent.SetText(XSingleton<XStringTable>.singleton.GetString("MentorshipRecommend"));
+ base.uiBehaviour.btnContent.SetText(XSingleton<XStringTable>.singleton.GetString("FRIEND_ADDDLG_NO_COUNTDOWN"));
+ }
+ }
+ base.uiBehaviour.ClearBtn.SetEnable(true, false);
+ base.uiBehaviour.btnContent.SetText(XStringDefineProxy.GetString("FRIEND_ADDDLG_NO_COUNTDOWN"));
+ }
+
+ protected override void OnHide()
+ {
+ base.OnHide();
+ XMentorshipDocument.Doc.ResetCandidatesView();
+ }
+
+ public void RefreshUI()
+ {
+ int canidatesShowMsgCount = XMentorshipDocument.Doc.GetCanidatesShowMsgCount();
+ base.uiBehaviour.WrapContent.SetContentCount(canidatesShowMsgCount, false);
+ base.uiBehaviour.ScrollView.ResetPosition();
+ }
+
+ public void RefreshAllVisible()
+ {
+ base.uiBehaviour.WrapContent.RefreshAllVisibleContents();
+ }
+
+ public void RefreshCDTimeLabel(int leftTime)
+ {
+ bool flag = leftTime > 0;
+ if (flag)
+ {
+ base.uiBehaviour.ClearBtn.SetEnable(false, false);
+ base.uiBehaviour.btnContent.SetText(string.Format(XStringDefineProxy.GetString("FRIEND_ADDDLG_COUNTDOWN_FMT"), leftTime));
+ }
+ else
+ {
+ base.uiBehaviour.ClearBtn.SetEnable(true, false);
+ base.uiBehaviour.btnContent.SetText(XStringDefineProxy.GetString("FRIEND_ADDDLG_NO_COUNTDOWN"));
+ }
+ }
+
+ private void InitProperties()
+ {
+ base.uiBehaviour.CloseBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnCloseDialog));
+ base.uiBehaviour.ClearBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnClearNews));
+ base.uiBehaviour.WrapContent.RegisterItemInitEventHandler(new WrapItemInitEventHandler(this.OnWrapContentItemInit));
+ base.uiBehaviour.WrapContent.RegisterItemUpdateEventHandler(new WrapItemUpdateEventHandler(this.OnWrapContentItemUpdate));
+ }
+
+ private bool OnClearNews(IXUIButton button)
+ {
+ bool flag = XMentorshipDocument.Doc.CurViewType == CandidatesViewType.Application;
+ if (flag)
+ {
+ XMentorshipDocument.Doc.SendCandidatesOpReq(EMentorMsgOpType.EMentorMsgOpType_Clear, 0UL, MentorMsgApplyType.MentorMsgApplyMax, 0, false);
+ }
+ else
+ {
+ bool flag2 = XMentorshipDocument.Doc.CurViewType == CandidatesViewType.Recommend;
+ if (flag2)
+ {
+ bool flag3 = XMentorshipDocument.Doc.CurRecommendType == CandidatesViewRecommendType.Master;
+ if (flag3)
+ {
+ XMentorshipDocument.Doc.SendToGetMyApplyMasterInfo(true);
+ }
+ else
+ {
+ XMentorshipDocument.Doc.SendToGetMyApplyPupilsInfo(true);
+ }
+ }
+ }
+ return true;
+ }
+
+ private bool OnCloseDialog(IXUIButton button)
+ {
+ this.SetVisibleWithAnimation(false, null);
+ return true;
+ }
+
+ private void OnWrapContentItemUpdate(Transform itemTransform, int index)
+ {
+ IXUIButton ixuibutton = itemTransform.Find("Accept").GetComponent("XUIButton") as IXUIButton;
+ ixuibutton.gameObject.SetActive(XMentorshipDocument.Doc.CurViewType == CandidatesViewType.Application);
+ IXUIButton ixuibutton2 = itemTransform.Find("Refuse").GetComponent("XUIButton") as IXUIButton;
+ ixuibutton2.gameObject.SetActive(XMentorshipDocument.Doc.CurViewType == CandidatesViewType.Application);
+ IXUIButton ixuibutton3 = itemTransform.Find("Mentorship").GetComponent("XUIButton") as IXUIButton;
+ ixuibutton3.gameObject.SetActive(XMentorshipDocument.Doc.CurViewType == CandidatesViewType.Recommend);
+ MessageShowInfoItem candidateMsgShowInfo = XMentorshipDocument.Doc.GetCandidateMsgShowInfo(index);
+ bool flag = candidateMsgShowInfo != null;
+ if (flag)
+ {
+ IXUILabel ixuilabel = itemTransform.Find("level").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel.SetText(candidateMsgShowInfo.roleInfo.level.ToString());
+ uint titleID = (candidateMsgShowInfo.roleInfo.outlook != null && candidateMsgShowInfo.roleInfo.outlook.title != null) ? candidateMsgShowInfo.roleInfo.outlook.title.titleID : 0u;
+ IXUILabelSymbol ixuilabelSymbol = itemTransform.Find("Name").GetComponent("XUILabelSymbol") as IXUILabelSymbol;
+ ixuilabelSymbol.InputText = XTitleDocument.GetTitleWithFormat(titleID, candidateMsgShowInfo.roleInfo.name);
+ IXUISprite ixuisprite = itemTransform.Find("head").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.spriteName = XSingleton<XProfessionSkillMgr>.singleton.GetProfHeadIcon2((int)((int)candidateMsgShowInfo.roleInfo.type % 10));
+ IXUISprite ixuisprite2 = itemTransform.Find("Profession").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite2.spriteName = XSingleton<XProfessionSkillMgr>.singleton.GetProfIcon((int)((int)candidateMsgShowInfo.roleInfo.type % 10));
+ IXUILabel ixuilabel2 = itemTransform.Find("PromiseWords").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel2.SetText(candidateMsgShowInfo.promiseWords);
+ IXUILabel ixuilabel3 = itemTransform.Find("Mentorship/T").GetComponent("XUILabel") as IXUILabel;
+ bool flag2 = XMentorshipDocument.Doc.CurViewType == CandidatesViewType.Application;
+ if (flag2)
+ {
+ ixuibutton.ID = (ulong)((long)index);
+ ixuibutton2.ID = (ulong)((long)index);
+ }
+ else
+ {
+ ixuibutton3.ID = candidateMsgShowInfo.roleInfo.roleID;
+ bool applied = candidateMsgShowInfo.applied;
+ if (applied)
+ {
+ ixuibutton3.SetEnable(false, false);
+ ixuilabel3.SetText(XSingleton<XStringTable>.singleton.GetString("CHAT_SENT"));
+ }
+ else
+ {
+ ixuibutton3.SetEnable(true, false);
+ bool flag3 = XMentorshipDocument.Doc.CurRecommendType == CandidatesViewRecommendType.Master;
+ if (flag3)
+ {
+ ixuilabel3.SetText(XSingleton<XStringTable>.singleton.GetString("MentorshipMaster"));
+ }
+ else
+ {
+ ixuilabel3.SetText(XSingleton<XStringTable>.singleton.GetString("MentorshipPupil"));
+ }
+ }
+ }
+ }
+ }
+
+ private void OnStartPlayAudio(IXUISprite uiSprite)
+ {
+ }
+
+ private void OnStopSignPlay(object ob)
+ {
+ IXUISpriteAnimation ixuispriteAnimation = (IXUISpriteAnimation)ob;
+ bool flag = ixuispriteAnimation != null;
+ if (flag)
+ {
+ ixuispriteAnimation.SetFrameRate(0);
+ ixuispriteAnimation.Reset();
+ }
+ }
+
+ private void UpdateOpBtnState(Transform itemTransform)
+ {
+ IXUIButton ixuibutton = itemTransform.Find("Accept").GetComponent("XUIButton") as IXUIButton;
+ ixuibutton.gameObject.SetActive(XMentorshipDocument.Doc.CurViewType == CandidatesViewType.Application);
+ IXUIButton ixuibutton2 = itemTransform.Find("Refuse").GetComponent("XUIButton") as IXUIButton;
+ ixuibutton2.gameObject.SetActive(XMentorshipDocument.Doc.CurViewType == CandidatesViewType.Application);
+ IXUIButton ixuibutton3 = itemTransform.Find("Mentorship").GetComponent("XUIButton") as IXUIButton;
+ ixuibutton3.gameObject.SetActive(XMentorshipDocument.Doc.CurViewType == CandidatesViewType.Recommend);
+ }
+
+ private void OnPlayPromiseVoice(IXUISprite uiSprite)
+ {
+ }
+
+ private void OnWrapContentItemInit(Transform itemTransform, int index)
+ {
+ IXUIButton ixuibutton = itemTransform.Find("Accept").GetComponent("XUIButton") as IXUIButton;
+ ixuibutton.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnClickAcceptCandidate));
+ IXUIButton ixuibutton2 = itemTransform.Find("Refuse").GetComponent("XUIButton") as IXUIButton;
+ ixuibutton2.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnClickRefuseCandidate));
+ IXUIButton ixuibutton3 = itemTransform.Find("Mentorship").GetComponent("XUIButton") as IXUIButton;
+ ixuibutton3.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnMentorshipClicked));
+ }
+
+ private bool OnMentorshipClicked(IXUIButton button)
+ {
+ bool flag = XMentorshipDocument.Doc.CurRecommendType == CandidatesViewRecommendType.Master;
+ if (flag)
+ {
+ XMentorshipDocument.Doc.SendMentorRelationOp(MentorRelationOpType.MentorRelationOp_ApplyMaster, button.ID, 0);
+ }
+ else
+ {
+ XMentorshipDocument.Doc.SendMentorRelationOp(MentorRelationOpType.MentorRelationOp_ApplyStudent, button.ID, 0);
+ }
+ return true;
+ }
+
+ private bool OnClickRefuseCandidate(IXUIButton button)
+ {
+ MessageShowInfoItem candidateMsgShowInfo = XMentorshipDocument.Doc.GetCandidateMsgShowInfo((int)button.ID);
+ bool flag = candidateMsgShowInfo != null;
+ if (flag)
+ {
+ XMentorshipDocument.Doc.SendCandidatesOpReq(EMentorMsgOpType.EMentorMsgOpType_Reject, candidateMsgShowInfo.roleInfo.roleID, candidateMsgShowInfo.msgType, 0, false);
+ }
+ return true;
+ }
+
+ private bool OnClickAcceptCandidate(IXUIButton button)
+ {
+ MessageShowInfoItem candidateMsgShowInfo = XMentorshipDocument.Doc.GetCandidateMsgShowInfo((int)button.ID);
+ bool flag = candidateMsgShowInfo != null;
+ if (flag)
+ {
+ XMentorshipDocument.Doc.SendCandidatesOpReq(EMentorMsgOpType.EMentorMsgOpType_Agree, candidateMsgShowInfo.roleInfo.roleID, candidateMsgShowInfo.msgType, 0, false);
+ }
+ return true;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/XMentorshipCandidatesView.cs.meta b/Client/Assets/Scripts/XMainClient/UI/XMentorshipCandidatesView.cs.meta
new file mode 100644
index 00000000..1b5b5df7
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XMentorshipCandidatesView.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: e4d23467f19b48f42b4d1a16932eabed
+timeCreated: 1611404740
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/XMentorshipPupilsDramaOperate.cs b/Client/Assets/Scripts/XMainClient/UI/XMentorshipPupilsDramaOperate.cs
new file mode 100644
index 00000000..288f7024
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XMentorshipPupilsDramaOperate.cs
@@ -0,0 +1,391 @@
+using System;
+using KKSG;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class XMentorshipPupilsDramaOperate : XDramaOperate
+ {
+ private ulong m_SelectedRoleID = 0UL;
+
+ private string m_SelectedRoleName = null;
+
+ private XDramaOperateParam _param;
+
+ private XMentorshipDocument doc;
+
+ public override void ShowNpc(XNpc npc)
+ {
+ base.ShowNpc(npc);
+ this.doc = XDocuments.GetSpecificDocument<XMentorshipDocument>(XMentorshipDocument.uuID);
+ this._param = XDataPool<XDramaOperateParam>.GetData();
+ this._param.Npc = npc;
+ XMentorshipDocument.Doc.SendMentorshipInfoReq();
+ }
+
+ public void RefreshOperateStatus()
+ {
+ switch (this.doc.GetMyMentorShip())
+ {
+ case MyMentorship.None:
+ this._param.Text = XStringDefineProxy.GetString("MentorshipNpcDialog_0_None");
+ this._param.AppendButton(XStringDefineProxy.GetString("MentorshipNpcButton_FindMaster"), new ButtonClickEventHandler(this._FindMaster), 0UL);
+ this._param.AppendButton(XStringDefineProxy.GetString("MentorshipNpcButton_FindPupil"), new ButtonClickEventHandler(this._FindPupil), 0UL);
+ break;
+ case MyMentorship.Mentorship_Pupil:
+ this._param.Text = XStringDefineProxy.GetString("MentorshipNpcDialog_0_Pupil");
+ this._param.AppendButton(XStringDefineProxy.GetString("MentorshipNpcButton_ProcessRelation"), new ButtonClickEventHandler(this._ProcessRelation), 0UL);
+ this._param.AppendButton(XStringDefineProxy.GetString("MentorshipNpcButton_SelectForceComplete"), new ButtonClickEventHandler(this._SelectForceComplete), 0UL);
+ break;
+ case MyMentorship.Mentorship_Master:
+ this._param.Text = XStringDefineProxy.GetString("MentorshipNpcDialog_0_Master");
+ this._param.AppendButton(XStringDefineProxy.GetString("MentorshipNpcButton_ProcessRelation"), new ButtonClickEventHandler(this._ProcessRelation), 0UL);
+ this._param.AppendButton(XStringDefineProxy.GetString("MentorshipNpcButton_SelectComplete"), new ButtonClickEventHandler(this._SelectComplete), 0UL);
+ break;
+ }
+ base._FireEvent(this._param);
+ }
+
+ private bool _FindMaster(IXUIButton btn)
+ {
+ XSingleton<XGameSysMgr>.singleton.OpenSystem(XSysDefine.XSys_Mentorship, 0UL);
+ DlgBase<DramaDlg, DramaDlgBehaviour>.singleton.SetVisible(false, true);
+ return true;
+ }
+
+ private bool _FindPupil(IXUIButton btn)
+ {
+ XSingleton<XGameSysMgr>.singleton.OpenSystem(XSysDefine.XSys_Mentorship, 0UL);
+ DlgBase<DramaDlg, DramaDlgBehaviour>.singleton.SetVisible(false, true);
+ return true;
+ }
+
+ private int _GetBreakTargetTime(uint breakTime)
+ {
+ int @int = XSingleton<XGlobalConfig>.singleton.GetInt("MentorBreakConfirmTime");
+ return @int + (int)breakTime - this.doc.ReceiveingProtocolTime - (int)Time.time;
+ }
+
+ private bool _ProcessRelation(IXUIButton btn)
+ {
+ XDramaOperateParam data = XDataPool<XDramaOperateParam>.GetData();
+ data.Text = XSingleton<UiUtility>.singleton.ReplaceReturn(XStringDefineProxy.GetString("MentorshipNpcDialog_ProcessRelation"));
+ int num = int.MaxValue;
+ int relationTargetsCount = this.doc.GetRelationTargetsCount();
+ int num2 = 0;
+ for (int i = 0; i < relationTargetsCount; i++)
+ {
+ MentorRelationInfo relationTargetInfo = this.doc.GetRelationTargetInfo(i);
+ for (int j = 0; j < relationTargetInfo.statusTimeList.Count; j++)
+ {
+ MentorRelationTime mentorRelationTime = relationTargetInfo.statusTimeList[j];
+ bool flag = mentorRelationTime.status == MentorRelationStatus.MentorRelationBreakApply;
+ if (flag)
+ {
+ int num3 = this._GetBreakTargetTime(mentorRelationTime.time);
+ bool flag2 = num3 > 0;
+ if (flag2)
+ {
+ num = Math.Min(num3, num);
+ bool flag3 = relationTargetInfo.breakApplyRoleID == XSingleton<XAttributeMgr>.singleton.XPlayerData.RoleID;
+ if (flag3)
+ {
+ num2++;
+ }
+ }
+ break;
+ }
+ }
+ }
+ XDramaOperateButton xdramaOperateButton = data.AppendButton(XStringDefineProxy.GetString("MentorshipNpcButton_SelectBreak"), new ButtonClickEventHandler(this._SelectBreak), 0UL);
+ xdramaOperateButton.StateEnable = (num2 < relationTargetsCount);
+ XDramaOperateButton xdramaOperateButton2 = data.AppendButton(XStringDefineProxy.GetString("MentorshipNpcButton_SelectBreakCancel"), new ButtonClickEventHandler(this._SelectBreakCancel), 0UL);
+ bool flag4 = num != int.MaxValue;
+ if (flag4)
+ {
+ xdramaOperateButton2.TargetTime = (float)num + Time.realtimeSinceStartup;
+ xdramaOperateButton2.TimeNote = XSingleton<XStringTable>.singleton.GetString("MentorshipBreaking");
+ }
+ xdramaOperateButton2.StateEnable = (num2 != 0);
+ base._FireEvent(data);
+ return true;
+ }
+
+ private bool _SelectComplete(IXUIButton btn)
+ {
+ XDramaOperateParam data = XDataPool<XDramaOperateParam>.GetData();
+ data.Text = XSingleton<UiUtility>.singleton.ReplaceReturn(XStringDefineProxy.GetString("MentorshipNpcDialog_SelectComplete"));
+ data.AppendButton(XStringDefineProxy.GetString("MentorshipNpcButton_SelectNormalComplete"), new ButtonClickEventHandler(this._SelectNormalComplete), 0UL);
+ data.AppendButton(XStringDefineProxy.GetString("MentorshipNpcButton_SelectForceComplete"), new ButtonClickEventHandler(this._SelectForceComplete), 0UL);
+ base._FireEvent(data);
+ return true;
+ }
+
+ private void _CreateSelection(string noneText, string pupilText, string masterText, SpriteClickEventHandler handler, MentorRelationStatus status = MentorRelationStatus.MentorRelationMax)
+ {
+ MyMentorship myMentorShip = this.doc.GetMyMentorShip();
+ XDramaOperateParam data = XDataPool<XDramaOperateParam>.GetData();
+ int relationTargetsCount = this.doc.GetRelationTargetsCount();
+ bool flag = relationTargetsCount == 0 || myMentorShip == MyMentorship.None;
+ if (flag)
+ {
+ data.Text = noneText;
+ }
+ else
+ {
+ data.Text = ((myMentorShip == MyMentorship.Mentorship_Pupil) ? pupilText : masterText);
+ for (int i = 0; i < relationTargetsCount; i++)
+ {
+ MentorRelationInfo relationTargetInfo = this.doc.GetRelationTargetInfo(i);
+ bool flag2 = status == MentorRelationStatus.MentorRelationMax;
+ if (flag2)
+ {
+ data.AppendList(relationTargetInfo.roleInfo.name, handler, relationTargetInfo.roleInfo.roleID);
+ }
+ else
+ {
+ int num = 0;
+ for (int j = 0; j < relationTargetInfo.statusTimeList.Count; j++)
+ {
+ MentorRelationTime mentorRelationTime = relationTargetInfo.statusTimeList[j];
+ bool flag3 = mentorRelationTime.status == MentorRelationStatus.MentorRelationBreakApply;
+ if (flag3)
+ {
+ num = this._GetBreakTargetTime(mentorRelationTime.time);
+ bool flag4 = num > 0;
+ if (flag4)
+ {
+ break;
+ }
+ }
+ }
+ bool flag5 = num > 0;
+ if (flag5)
+ {
+ bool flag6 = status == MentorRelationStatus.MentorRelationBreakApply && relationTargetInfo.breakApplyRoleID == XSingleton<XAttributeMgr>.singleton.XPlayerData.RoleID;
+ if (flag6)
+ {
+ XDramaOperateList xdramaOperateList = data.AppendList(relationTargetInfo.roleInfo.name, handler, relationTargetInfo.roleInfo.roleID);
+ xdramaOperateList.TargetTime = (float)num + Time.realtimeSinceStartup;
+ }
+ }
+ else
+ {
+ bool flag7 = status == MentorRelationStatus.MentorRelationBreak;
+ if (flag7)
+ {
+ XDramaOperateList xdramaOperateList2 = data.AppendList(relationTargetInfo.roleInfo.name, handler, relationTargetInfo.roleInfo.roleID);
+ xdramaOperateList2.TimeNote = XStringDefineProxy.GetString("MentorshipBreaking");
+ }
+ }
+ }
+ }
+ }
+ base._FireEvent(data);
+ }
+
+ private bool _SelectForceComplete(IXUIButton btn)
+ {
+ this._CreateSelection(XSingleton<UiUtility>.singleton.ReplaceReturn(XStringDefineProxy.GetString("MentorshipNpcDialog_NoRelation")), XStringDefineProxy.GetString("MentorshipNpcDialog_SelectForceCompletePupil"), XStringDefineProxy.GetString("MentorshipNpcDialog_SelectForceCompleteMaster"), new SpriteClickEventHandler(this._ForceComplete), MentorRelationStatus.MentorRelationMax);
+ return true;
+ }
+
+ private bool _SelectNormalComplete(IXUIButton btn)
+ {
+ this._CreateSelection(XSingleton<UiUtility>.singleton.ReplaceReturn(XStringDefineProxy.GetString("MentorshipNpcDialog_NoRelation")), XStringDefineProxy.GetString("MentorshipNpcDialog_SelectNormalCompletePupil"), XStringDefineProxy.GetString("MentorshipNpcDialog_SelectNormalCompleteMaster"), new SpriteClickEventHandler(this._NormalComplete), MentorRelationStatus.MentorRelationMax);
+ return true;
+ }
+
+ private bool _SelectBreak(IXUIButton btn)
+ {
+ this._CreateSelection(XSingleton<UiUtility>.singleton.ReplaceReturn(XStringDefineProxy.GetString("MentorshipNpcDialog_NoRelation")), XStringDefineProxy.GetString("MentorshipNpcDialog_SelectBreakPupil"), XStringDefineProxy.GetString("MentorshipNpcDialog_SelectBreakMaster"), new SpriteClickEventHandler(this._Break), MentorRelationStatus.MentorRelationBreak);
+ return true;
+ }
+
+ private bool _SelectBreakCancel(IXUIButton btn)
+ {
+ this._CreateSelection(XSingleton<UiUtility>.singleton.ReplaceReturn(XStringDefineProxy.GetString("MentorshipNpcDialog_NoBreakingRelation")), XStringDefineProxy.GetString("MentorshipNpcDialog_SelectBreakCancelPupil"), XStringDefineProxy.GetString("MentorshipNpcDialog_SelectBreakCancelMaster"), new SpriteClickEventHandler(this._BreakCancel), MentorRelationStatus.MentorRelationBreakApply);
+ return true;
+ }
+
+ private void _GetSelectedRole(IXUISprite iSp)
+ {
+ this.m_SelectedRoleID = 0UL;
+ this.m_SelectedRoleName = string.Empty;
+ bool flag = iSp != null;
+ if (flag)
+ {
+ MentorRelationInfo relationTargetInfoByRoleID = this.doc.GetRelationTargetInfoByRoleID(iSp.ID);
+ bool flag2 = relationTargetInfoByRoleID != null;
+ if (flag2)
+ {
+ this.m_SelectedRoleID = relationTargetInfoByRoleID.roleInfo.roleID;
+ this.m_SelectedRoleName = relationTargetInfoByRoleID.roleInfo.name;
+ }
+ }
+ }
+
+ private void _Break(IXUISprite iSp)
+ {
+ this._GetSelectedRole(iSp);
+ XSingleton<UiUtility>.singleton.ShowModalDialog(XStringDefineProxy.GetString("MentorshipBreakConfirm", new object[]
+ {
+ this.m_SelectedRoleName
+ }), XStringDefineProxy.GetString(XStringDefine.COMMON_OK), XStringDefineProxy.GetString(XStringDefine.COMMON_CANCEL), new ButtonClickEventHandler(this._DoBreak));
+ }
+
+ private bool _DoBreak(IXUIButton btn)
+ {
+ XSingleton<UiUtility>.singleton.CloseModalDlg();
+ this.doc.SendMentorRelationOp(MentorRelationOpType.MentorRelationOp_Break, this.m_SelectedRoleID, 0);
+ return true;
+ }
+
+ private void _OnBreak(MentorRelationOpRes oRes)
+ {
+ XDramaOperateParam data = XDataPool<XDramaOperateParam>.GetData();
+ ErrorCode error = oRes.error;
+ if (error != ErrorCode.ERR_SUCCESS)
+ {
+ data.Text = XStringDefineProxy.GetString(oRes.error);
+ }
+ else
+ {
+ data.Text = XStringDefineProxy.GetString("MentorshipBreakSuccess");
+ }
+ base._FireEvent(data);
+ }
+
+ private void _BreakCancel(IXUISprite iSp)
+ {
+ this._GetSelectedRole(iSp);
+ XSingleton<UiUtility>.singleton.ShowModalDialog(XStringDefineProxy.GetString("MentorshipBreakCancelConfirm", new object[]
+ {
+ this.m_SelectedRoleName
+ }), XStringDefineProxy.GetString(XStringDefine.COMMON_OK), XStringDefineProxy.GetString(XStringDefine.COMMON_CANCEL), new ButtonClickEventHandler(this._DoBreakCancel));
+ }
+
+ private bool _DoBreakCancel(IXUIButton btn)
+ {
+ XSingleton<UiUtility>.singleton.CloseModalDlg();
+ this.doc.SendMentorRelationOp(MentorRelationOpType.MentorRelationOp_BreakCancel, this.m_SelectedRoleID, 0);
+ return true;
+ }
+
+ private void _OnBreakCancel(MentorRelationOpRes oRes)
+ {
+ XDramaOperateParam data = XDataPool<XDramaOperateParam>.GetData();
+ ErrorCode error = oRes.error;
+ if (error != ErrorCode.ERR_SUCCESS)
+ {
+ data.Text = XStringDefineProxy.GetString(oRes.error);
+ }
+ else
+ {
+ data.Text = XStringDefineProxy.GetString("MentorshipBreakCancelSuccess");
+ }
+ base._FireEvent(data);
+ }
+
+ private void _PlayCompleteFx()
+ {
+ XSingleton<XFxMgr>.singleton.CreateAndPlay("Effects/FX_Particle/UIfx/UI_yh", XSingleton<XGameUI>.singleton.UIRoot.transform, Vector3.zero, Vector3.one, 1f, false, 8f, true);
+ }
+
+ private void _ForceComplete(IXUISprite iSp)
+ {
+ this._GetSelectedRole(iSp);
+ XSingleton<UiUtility>.singleton.ShowModalDialog(XStringDefineProxy.GetString("MentorshipForceCompleteConfirm", new object[]
+ {
+ this.m_SelectedRoleName
+ }), XStringDefineProxy.GetString(XStringDefine.COMMON_OK), XStringDefineProxy.GetString(XStringDefine.COMMON_CANCEL), new ButtonClickEventHandler(this._DoForceComplete));
+ }
+
+ private bool _DoForceComplete(IXUIButton btn)
+ {
+ XSingleton<UiUtility>.singleton.CloseModalDlg();
+ bool flag = XMentorshipDocument.Doc.IsMentorshipInDaysEnough(this.m_SelectedRoleID) && XMentorshipDocument.Doc.IsCompletedTaskEnough(this.m_SelectedRoleID);
+ if (flag)
+ {
+ this.doc.SendMentorRelationOp(MentorRelationOpType.MentorRelationOp_ForceComplete, this.m_SelectedRoleID, 0);
+ }
+ return true;
+ }
+
+ private void _OnForceComplete(MentorRelationOpRes oRes)
+ {
+ XDramaOperateParam data = XDataPool<XDramaOperateParam>.GetData();
+ ErrorCode error = oRes.error;
+ if (error != ErrorCode.ERR_SUCCESS)
+ {
+ data.Text = XStringDefineProxy.GetString(oRes.error);
+ }
+ else
+ {
+ data.Text = XStringDefineProxy.GetString("MentorshipForceCompleteSuccess");
+ this._PlayCompleteFx();
+ XMentorshipDocument.Doc.SendMentorshipInfoReq();
+ }
+ base._FireEvent(data);
+ }
+
+ private void _NormalComplete(IXUISprite iSp)
+ {
+ this._GetSelectedRole(iSp);
+ XSingleton<UiUtility>.singleton.ShowModalDialog(XStringDefineProxy.GetString("MentorshipNormalCompleteConfirm", new object[]
+ {
+ this.m_SelectedRoleName
+ }), XStringDefineProxy.GetString(XStringDefine.COMMON_OK), XStringDefineProxy.GetString(XStringDefine.COMMON_CANCEL), new ButtonClickEventHandler(this._DoNormalComplete));
+ }
+
+ private bool _DoNormalComplete(IXUIButton btn)
+ {
+ XSingleton<UiUtility>.singleton.CloseModalDlg();
+ bool flag = XMentorshipDocument.Doc.IsMentorshipInDaysEnough(this.m_SelectedRoleID) && XMentorshipDocument.Doc.IsCompletedTaskEnough(this.m_SelectedRoleID);
+ if (flag)
+ {
+ this.doc.SendMentorRelationOp(MentorRelationOpType.MentorRelationOp_NormalComplete, this.m_SelectedRoleID, 0);
+ }
+ return true;
+ }
+
+ private void _OnNormalComplete(MentorRelationOpRes oRes)
+ {
+ XDramaOperateParam data = XDataPool<XDramaOperateParam>.GetData();
+ ErrorCode error = oRes.error;
+ if (error != ErrorCode.ERR_SUCCESS)
+ {
+ data.Text = XStringDefineProxy.GetString(oRes.error);
+ }
+ else
+ {
+ data.Text = XStringDefineProxy.GetString("MentorshipNormalCompleteSuccess");
+ this._PlayCompleteFx();
+ XMentorshipDocument.Doc.SendMentorshipInfoReq();
+ }
+ base._FireEvent(data);
+ }
+
+ public void OnMentorRelationOp(MentorRelationOpArg oArg, MentorRelationOpRes oRes)
+ {
+ switch (oArg.operation)
+ {
+ case MentorRelationOpType.MentorRelationOp_Break:
+ this._OnBreak(oRes);
+ break;
+ case MentorRelationOpType.MentorRelationOp_BreakCancel:
+ this._OnBreakCancel(oRes);
+ break;
+ case MentorRelationOpType.MentorRelationOp_NormalComplete:
+ this._OnNormalComplete(oRes);
+ break;
+ case MentorRelationOpType.MentorRelationOp_ForceComplete:
+ this._OnForceComplete(oRes);
+ break;
+ }
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/XMentorshipPupilsDramaOperate.cs.meta b/Client/Assets/Scripts/XMainClient/UI/XMentorshipPupilsDramaOperate.cs.meta
new file mode 100644
index 00000000..a9802b6d
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XMentorshipPupilsDramaOperate.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: eca109298134fdc43b0408b59da862f2
+timeCreated: 1611404788
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/XNPCFavorBehaviour.cs b/Client/Assets/Scripts/XMainClient/UI/XNPCFavorBehaviour.cs
new file mode 100644
index 00000000..e984a64a
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XNPCFavorBehaviour.cs
@@ -0,0 +1,56 @@
+using System;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+
+namespace XMainClient.UI
+{
+ internal class XNPCFavorBehaviour : DlgBehaviourBase
+ {
+ public Transform m_effect;
+
+ public IXUIButton m_Help;
+
+ public IXUIButton m_Close;
+
+ public Transform m_handlersTra;
+
+ public IXUILabel m_SendTimesLabel;
+
+ public IXUIButton m_AddBtn;
+
+ public IXUISprite m_PrivilegeSpr;
+
+ public IXUISprite m_SendTimesBtn;
+
+ public IXUICheckBox m_Tab0;
+
+ public IXUICheckBox m_Tab1;
+
+ public IXUICheckBox m_Tab2;
+
+ public GameObject m_Tab0_Redpoint;
+
+ public GameObject m_Tab1_Redpoint;
+
+ public GameObject m_Tab2_Redpoint;
+
+ private void Awake()
+ {
+ this.m_effect = base.transform.Find("Effect");
+ this.m_Help = (base.transform.Find("Help").GetComponent("XUIButton") as IXUIButton);
+ this.m_Close = (base.transform.Find("Close").GetComponent("XUIButton") as IXUIButton);
+ this.m_handlersTra = base.transform.Find("Handler");
+ this.m_SendTimesLabel = (base.transform.Find("Time").GetComponent("XUILabel") as IXUILabel);
+ this.m_AddBtn = (base.transform.Find("Time/Add").GetComponent("XUIButton") as IXUIButton);
+ this.m_SendTimesBtn = (base.transform.Find("Time/tq/p").GetComponent("XUISprite") as IXUISprite);
+ this.m_PrivilegeSpr = (base.transform.Find("Time/tq").GetComponent("XUISprite") as IXUISprite);
+ this.m_Tab0 = (base.transform.Find("Tabs/TabTpl0/Bg").GetComponent("XUICheckBox") as IXUICheckBox);
+ this.m_Tab1 = (base.transform.Find("Tabs/TabTpl1/Bg").GetComponent("XUICheckBox") as IXUICheckBox);
+ this.m_Tab2 = (base.transform.Find("Tabs/TabTpl2/Bg").GetComponent("XUICheckBox") as IXUICheckBox);
+ this.m_Tab0_Redpoint = base.transform.Find("Tabs/TabTpl0/Bg/RedPoint").gameObject;
+ this.m_Tab1_Redpoint = base.transform.Find("Tabs/TabTpl1/Bg/RedPoint").gameObject;
+ this.m_Tab2_Redpoint = base.transform.Find("Tabs/TabTpl2/Bg/RedPoint").gameObject;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/XNPCFavorBehaviour.cs.meta b/Client/Assets/Scripts/XMainClient/UI/XNPCFavorBehaviour.cs.meta
new file mode 100644
index 00000000..688a1789
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XNPCFavorBehaviour.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 6db6dfa3246f6f84985c8c5e6dce844e
+timeCreated: 1611403903
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/XNPCFavorDlg.cs b/Client/Assets/Scripts/XMainClient/UI/XNPCFavorDlg.cs
new file mode 100644
index 00000000..55a6b272
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XNPCFavorDlg.cs
@@ -0,0 +1,317 @@
+using System;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class XNPCFavorDlg : DlgBase<XNPCFavorDlg, XNPCFavorBehaviour>
+ {
+ public override string fileName
+ {
+ get
+ {
+ return "GameSystem/NpcBlessing/NpcBlessingDlg";
+ }
+ }
+
+ public override int sysid
+ {
+ get
+ {
+ return XFastEnumIntEqualityComparer<XSysDefine>.ToInt(XSysDefine.XSys_NPCFavor);
+ }
+ }
+
+ public override bool fullscreenui
+ {
+ get
+ {
+ return false;
+ }
+ }
+
+ private XNPCFavorDocument m_doc;
+
+ private XNPCFavorDlg.TabIndex m_CurrentTabIndex = XNPCFavorDlg.TabIndex.Relics;
+
+ private XNPCFavorHandler m_favorHandler = null;
+
+ private XNPCUnionHandler m_unionHandler = null;
+
+ private XNpcAttrHandler m_attrHandler = null;
+
+ private XFx uiFx = null;
+
+ private const string FX_HasNewActiveNPC = "Effects/FX_Particle/UIfx/UI_swjs_Clip01";
+
+ public enum TabIndex
+ {
+ Relics,
+ Union,
+ Addition
+ }
+
+ protected override void Init()
+ {
+ base.Init();
+ this.m_doc = XDocuments.GetSpecificDocument<XNPCFavorDocument>(XNPCFavorDocument.uuID);
+ this.m_doc.View = this;
+ this.m_uiBehaviour.m_Tab0.ID = 0UL;
+ this.m_uiBehaviour.m_Tab0.RegisterOnCheckEventHandler(new CheckBoxOnCheckEventHandler(this.OnClickTab));
+ this.m_uiBehaviour.m_Tab1.ID = 1UL;
+ this.m_uiBehaviour.m_Tab1.RegisterOnCheckEventHandler(new CheckBoxOnCheckEventHandler(this.OnClickTab));
+ this.m_uiBehaviour.m_Tab2.ID = 2UL;
+ this.m_uiBehaviour.m_Tab2.RegisterOnCheckEventHandler(new CheckBoxOnCheckEventHandler(this.OnClickTab));
+ DlgHandlerBase.EnsureCreate<XNPCFavorHandler>(ref this.m_favorHandler, this.m_uiBehaviour.m_handlersTra, false, this);
+ DlgHandlerBase.EnsureCreate<XNPCUnionHandler>(ref this.m_unionHandler, this.m_uiBehaviour.m_handlersTra, false, this);
+ DlgHandlerBase.EnsureCreate<XNpcAttrHandler>(ref this.m_attrHandler, this.m_uiBehaviour.m_handlersTra, false, this);
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ this.m_doc.ReqNPCFavorUnionInfo();
+ this.RefreshData();
+ this.CheckPlayFx();
+ this.m_uiBehaviour.m_Tab0.ForceSetFlag(true);
+ this._ApplyTabData(this.m_CurrentTabIndex);
+ }
+
+ public override void RegisterEvent()
+ {
+ base.uiBehaviour.m_Help.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnClickHelp));
+ base.uiBehaviour.m_Close.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnCloseClick));
+ base.uiBehaviour.m_AddBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnClickAddBtn));
+ base.uiBehaviour.m_SendTimesBtn.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnClickSendTimes));
+ }
+
+ protected override void OnUnload()
+ {
+ DlgHandlerBase.EnsureUnload<XNPCFavorHandler>(ref this.m_favorHandler);
+ DlgHandlerBase.EnsureUnload<XNPCUnionHandler>(ref this.m_unionHandler);
+ DlgHandlerBase.EnsureUnload<XNpcAttrHandler>(ref this.m_attrHandler);
+ bool flag = this.m_doc != null;
+ if (flag)
+ {
+ this.m_doc.View = null;
+ }
+ base.OnUnload();
+ }
+
+ protected override void OnHide()
+ {
+ bool flag = this.m_doc != null;
+ if (flag)
+ {
+ this.m_doc.RemoveAllNewTags();
+ }
+ base.OnHide();
+ }
+
+ private void CheckPlayFx()
+ {
+ bool hasNewNpcActive = this.m_doc.HasNewNpcActive;
+ if (hasNewNpcActive)
+ {
+ bool flag = this.uiFx == null;
+ if (flag)
+ {
+ this.uiFx = XSingleton<XFxMgr>.singleton.CreateUIFx("Effects/FX_Particle/UIfx/UI_swjs_Clip01", base.uiBehaviour.m_effect, false);
+ }
+ this.uiFx.Play();
+ }
+ }
+
+ public void Close(bool bWithAnim = true)
+ {
+ if (bWithAnim)
+ {
+ this.SetVisibleWithAnimation(false, null);
+ }
+ else
+ {
+ this.SetVisible(false, true);
+ }
+ bool flag = this.uiFx != null;
+ if (flag)
+ {
+ XSingleton<XFxMgr>.singleton.DestroyFx(this.uiFx, true);
+ }
+ this.uiFx = null;
+ }
+
+ protected bool OnCloseClick(IXUIButton go)
+ {
+ this.Close(true);
+ return true;
+ }
+
+ protected bool OnClickHelp(IXUIButton go)
+ {
+ DlgBase<XCommonHelpTipView, XCommonHelpTipBehaviour>.singleton.ShowHelp(XSysDefine.XSys_NPCFavor);
+ return true;
+ }
+
+ protected bool OnClickAddBtn(IXUIButton go)
+ {
+ this.ShowPurchase();
+ return true;
+ }
+
+ protected void OnClickSendTimes(IXUISprite go)
+ {
+ XSingleton<UiUtility>.singleton.ShowModalDialog(XStringDefineProxy.GetString("NPCPrivilegeHint"), new ButtonClickEventHandler(this.OnClickConfirm));
+ }
+
+ private bool OnClickConfirm(IXUIButton button)
+ {
+ DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.SetVisible(false, true);
+ XWelfareDocument specificDocument = XDocuments.GetSpecificDocument<XWelfareDocument>(XWelfareDocument.uuID);
+ bool flag = !specificDocument.IsOwnMemberPrivilege(MemberPrivilege.KingdomPrivilege_Court);
+ if (flag)
+ {
+ this.Close(true);
+ XSingleton<XGameSysMgr>.singleton.OpenSystem(XSysDefine.XSys_Welfare_KingdomPrivilege, 0UL);
+ }
+ return true;
+ }
+
+ private bool OnClickTab(IXUICheckBox cbx)
+ {
+ bool bChecked = cbx.bChecked;
+ if (bChecked)
+ {
+ this.m_CurrentTabIndex = (XNPCFavorDlg.TabIndex)cbx.ID;
+ this._ApplyTabData(this.m_CurrentTabIndex);
+ }
+ return true;
+ }
+
+ private void _ApplyTabData(XNPCFavorDlg.TabIndex tab)
+ {
+ bool flag = base.IsVisible();
+ bool flag2 = flag;
+ if (flag2)
+ {
+ switch (this.m_CurrentTabIndex)
+ {
+ case XNPCFavorDlg.TabIndex.Relics:
+ this.m_favorHandler.SetVisible(true);
+ this.m_unionHandler.SetVisible(false);
+ this.m_attrHandler.SetVisible(false);
+ break;
+ case XNPCFavorDlg.TabIndex.Union:
+ this.m_favorHandler.SetVisible(false);
+ this.m_unionHandler.SetVisible(true);
+ this.m_attrHandler.SetVisible(false);
+ break;
+ case XNPCFavorDlg.TabIndex.Addition:
+ this.m_favorHandler.SetVisible(false);
+ this.m_unionHandler.SetVisible(false);
+ this.m_attrHandler.SetVisible(true);
+ break;
+ }
+ }
+ }
+
+ public void RefreshData()
+ {
+ this.RefreshRedPoint();
+ this.RefreshPrivilege();
+ this.RefreshGiftTimesInfo();
+ bool flag = this.m_favorHandler.IsVisible();
+ if (flag)
+ {
+ this.m_favorHandler.RefreshData();
+ }
+ bool flag2 = this.m_unionHandler.IsVisible();
+ if (flag2)
+ {
+ this.m_unionHandler.RefreshData();
+ }
+ bool flag3 = this.m_attrHandler.IsVisible();
+ if (flag3)
+ {
+ this.m_attrHandler.RefreshData();
+ }
+ }
+
+ public void RefreshPrivilege()
+ {
+ XWelfareDocument specificDocument = XDocuments.GetSpecificDocument<XWelfareDocument>(XWelfareDocument.uuID);
+ this.m_uiBehaviour.m_PrivilegeSpr.SetColor(specificDocument.IsOwnMemberPrivilege(MemberPrivilege.KingdomPrivilege_Court) ? Color.white : Color.black);
+ }
+
+ public void RefreshGiftTimesInfo()
+ {
+ base.uiBehaviour.m_SendTimesLabel.SetText(this.m_doc.GiveLeftCount.ToString());
+ }
+
+ public void RefreshRedPoint()
+ {
+ this.m_uiBehaviour.m_Tab0_Redpoint.SetActive(this.m_doc.HasNewNpcActive || this.m_doc.HasCanLevelUpNpc);
+ this.m_uiBehaviour.m_Tab1_Redpoint.SetActive(this.m_doc.HasNewUnionActive);
+ this.m_uiBehaviour.m_Tab2_Redpoint.SetActive(false);
+ }
+
+ public void SetTabRedpoint(XNPCFavorDlg.TabIndex tabIndex, bool flag)
+ {
+ switch (tabIndex)
+ {
+ case XNPCFavorDlg.TabIndex.Relics:
+ this.m_uiBehaviour.m_Tab0_Redpoint.SetActive(flag);
+ break;
+ case XNPCFavorDlg.TabIndex.Union:
+ this.m_uiBehaviour.m_Tab1_Redpoint.SetActive(flag);
+ break;
+ case XNPCFavorDlg.TabIndex.Addition:
+ this.m_uiBehaviour.m_Tab2_Redpoint.SetActive(flag);
+ break;
+ }
+ }
+
+ public void SkipToNpc(uint npcId)
+ {
+ this.m_uiBehaviour.m_Tab0.ForceSetFlag(true);
+ this.m_CurrentTabIndex = XNPCFavorDlg.TabIndex.Relics;
+ this._ApplyTabData(this.m_CurrentTabIndex);
+ bool flag = this.m_favorHandler.IsVisible();
+ if (flag)
+ {
+ this.m_favorHandler.SkipToNpc(npcId);
+ }
+ }
+
+ public void ShowPurchase()
+ {
+ XSingleton<UiUtility>.singleton.ShowModalDialog(XStringDefineProxy.GetString("NPCBuyCountHintTitle"), XStringDefineProxy.GetReplaceString("NPCBuyCountHint", new object[]
+ {
+ XLabelSymbolHelper.FormatCostWithIcon((int)this.m_doc.BuyCost, ItemEnum.DRAGON_COIN),
+ this.m_doc.BuyLeftCount.ToString()
+ }), XStringDefineProxy.GetString("COMMON_OK"), XStringDefineProxy.GetString("COMMON_CANCEL"), new ButtonClickEventHandler(this.ConfirmBuyGiftCount), new ButtonClickEventHandler(this.CancelBuy), false, XTempTipDefine.OD_START, 50);
+ }
+
+ private bool ConfirmBuyGiftCount(IXUIButton btn)
+ {
+ bool flag = this.m_doc.BuyLeftCount <= 0u;
+ if (flag)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString("NPCHasNoBuyCount"), "fece00");
+ }
+ else
+ {
+ this.m_doc.ReqSrvBuyGiftCount();
+ }
+ DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.SetVisible(false, true);
+ return true;
+ }
+
+ private bool CancelBuy(IXUIButton btn)
+ {
+ DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.SetVisible(false, true);
+ return true;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/XNPCFavorDlg.cs.meta b/Client/Assets/Scripts/XMainClient/UI/XNPCFavorDlg.cs.meta
new file mode 100644
index 00000000..c1204c40
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XNPCFavorDlg.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: bd5dbef63bebe254b9253d40279a4fb4
+timeCreated: 1611404451
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/XNPCFavorDrama.cs b/Client/Assets/Scripts/XMainClient/UI/XNPCFavorDrama.cs
new file mode 100644
index 00000000..6f11088f
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XNPCFavorDrama.cs
@@ -0,0 +1,190 @@
+using System;
+using KKSG;
+using UILib;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class XNPCFavorDrama
+ {
+ private XFavorParam _param;
+
+ private XNPCFavorDocument doc;
+
+ private uint npcId = 0u;
+
+ public bool BDeprecated = true;
+
+ public void ShowNpc(XNpc npc)
+ {
+ DlgBase<DramaDlg, DramaDlgBehaviour>.singleton.SetVisible(true, true);
+ this.doc = XDocuments.GetSpecificDocument<XNPCFavorDocument>(XNPCFavorDocument.uuID);
+ this._param = XDataPool<XFavorParam>.GetData();
+ this._param.Npc = npc;
+ this.npcId = npc.TypeID;
+ XNPCFavorDocument.ShowNPCDrama(npc.TypeID);
+ }
+
+ public uint GetXNpcId()
+ {
+ return this.npcId;
+ }
+
+ public void RefreshOperateStatus(bool isfirst = false, string text = null)
+ {
+ bool flag = this._param == null;
+ if (!flag)
+ {
+ EFavorState state = this.doc.GetState(this.GetXNpcId());
+ bool bRecycled = this._param.bRecycled;
+ if (bRecycled)
+ {
+ this._param = XDataPool<XFavorParam>.GetData();
+ }
+ switch (state)
+ {
+ case EFavorState.CanSend:
+ this._param.Text = ((text == null) ? this.GetRandomGiveWords() : text);
+ this._param.isShowSend = !this.IsSendDialogOpen();
+ this._param.isShowExchange = false;
+ this._param.sendCallback = new ButtonClickEventHandler(this.ToSend);
+ break;
+ case EFavorState.SendWithExchange:
+ case EFavorState.Exchange:
+ this._param.Text = ((text == null) ? this.GetRandomGiveWords() : text);
+ this._param.isShowSend = (!this.IsSendDialogOpen() && !this.IsChangeDialogOpen());
+ this._param.isShowExchange = !this.IsChangeDialogOpen();
+ this._param.isShowExchangeRedpoint = true;
+ this._param.sendCallback = new ButtonClickEventHandler(this.ToSend);
+ this._param.exchangeCallback = new ButtonClickEventHandler(this.ToExchange);
+ break;
+ }
+ this._FireEvent(this._param);
+ }
+ }
+
+ private bool IsSendDialogOpen()
+ {
+ return DlgBase<DramaDlg, DramaDlgBehaviour>.singleton.IsVisible() && DlgBase<DramaDlg, DramaDlgBehaviour>.singleton.IsSendDilogVisible();
+ }
+
+ private bool IsChangeDialogOpen()
+ {
+ return DlgBase<DramaDlg, DramaDlgBehaviour>.singleton.IsVisible() && DlgBase<DramaDlg, DramaDlgBehaviour>.singleton.IsChangeDialogVisible();
+ }
+
+ private void _FireEvent(XFavorParam param)
+ {
+ DlgBase<DramaDlg, DramaDlgBehaviour>.singleton.SetUpFavorParam(param);
+ param.Recycle();
+ }
+
+ private bool ToSend(IXUIButton button)
+ {
+ bool flag = DlgBase<DramaDlg, DramaDlgBehaviour>.singleton.IsVisible();
+ if (flag)
+ {
+ NpcFeelingOneNpc oneNpcByXId = this.doc.GetOneNpcByXId(this.GetXNpcId());
+ bool flag2 = oneNpcByXId != null && this.doc.IsCanSend();
+ if (flag2)
+ {
+ bool flag3 = this.doc.IsCanLevelUp(oneNpcByXId);
+ if (flag3)
+ {
+ NpcFeeling.RowData npcTableInfoByXId = XNPCFavorDocument.GetNpcTableInfoByXId(this.GetXNpcId());
+ XSingleton<UiUtility>.singleton.ShowSystemTip(string.Format(XStringDefineProxy.GetString("NPCFavorisFull"), npcTableInfoByXId.name), "fece00");
+ }
+ else
+ {
+ DlgBase<DramaDlg, DramaDlgBehaviour>.singleton.ShowNPCFavorSend();
+ this.RefreshOperateStatus(false, this.GetRandomGiveWords());
+ this._FireEvent(this._param);
+ }
+ }
+ }
+ return true;
+ }
+
+ private bool ToExchange(IXUIButton button)
+ {
+ bool flag = DlgBase<DramaDlg, DramaDlgBehaviour>.singleton.IsVisible();
+ if (flag)
+ {
+ DlgBase<DramaDlg, DramaDlgBehaviour>.singleton.ShowNPCFavorExchnage();
+ this.RefreshOperateStatus(false, this.GetRandomExchangeWords());
+ this._FireEvent(this._param);
+ }
+ return true;
+ }
+
+ private bool ToConfirmSend()
+ {
+ XSingleton<UiUtility>.singleton.CloseModalDlg();
+ return true;
+ }
+
+ private string GetRandomGiveWords()
+ {
+ NpcFeeling.RowData npcTableInfoByXId = XNPCFavorDocument.GetNpcTableInfoByXId(this.GetXNpcId());
+ return (npcTableInfoByXId == null) ? string.Empty : this.GetRandomStr(npcTableInfoByXId.giveWords);
+ }
+
+ private string GetSendSuccessWords()
+ {
+ NpcFeeling.RowData npcTableInfoByXId = XNPCFavorDocument.GetNpcTableInfoByXId(this.GetXNpcId());
+ return (npcTableInfoByXId == null) ? string.Empty : this.GetRandomStr(npcTableInfoByXId.giveSuccessWords);
+ }
+
+ private string GetRandomExchangeWords()
+ {
+ NpcFeeling.RowData npcTableInfoByXId = XNPCFavorDocument.GetNpcTableInfoByXId(this.GetXNpcId());
+ return (npcTableInfoByXId == null) ? string.Empty : this.GetRandomStr(npcTableInfoByXId.exchangeWords);
+ }
+
+ private string GetExchangeSuccessWords()
+ {
+ NpcFeeling.RowData npcTableInfoByXId = XNPCFavorDocument.GetNpcTableInfoByXId(this.GetXNpcId());
+ return (npcTableInfoByXId == null) ? string.Empty : this.GetRandomStr(npcTableInfoByXId.giveSuccessWords);
+ }
+
+ private string GetRandomStr(string[] content)
+ {
+ bool flag = content != null && content.Length != 0;
+ string result;
+ if (flag)
+ {
+ result = content[XSingleton<XCommon>.singleton.RandomInt(content.Length)];
+ }
+ else
+ {
+ result = string.Empty;
+ }
+ return result;
+ }
+
+ public void SendSuccess()
+ {
+ bool flag = DlgBase<DramaDlg, DramaDlgBehaviour>.singleton.IsVisible();
+ if (flag)
+ {
+ DlgBase<DramaDlg, DramaDlgBehaviour>.singleton.NtfSendDramaRefresh();
+ this.RefreshOperateStatus(false, this.GetSendSuccessWords());
+ this._FireEvent(this._param);
+ }
+ this.doc.PlaySendSuccessFx(this.GetXNpcId());
+ }
+
+ public void ExchangeSuccess()
+ {
+ bool flag = DlgBase<DramaDlg, DramaDlgBehaviour>.singleton.IsVisible();
+ if (flag)
+ {
+ DlgBase<DramaDlg, DramaDlgBehaviour>.singleton.NtfExchangeDlgClose();
+ this.RefreshOperateStatus(false, this.GetExchangeSuccessWords());
+ this._FireEvent(this._param);
+ }
+ this.doc.PlayExchangeSuccessFx(this.GetXNpcId());
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/XNPCFavorDrama.cs.meta b/Client/Assets/Scripts/XMainClient/UI/XNPCFavorDrama.cs.meta
new file mode 100644
index 00000000..d26bcf04
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XNPCFavorDrama.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: d67540d48c741f64a8a3c581f608712f
+timeCreated: 1611404631
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/XNPCFavorDramaExchange.cs b/Client/Assets/Scripts/XMainClient/UI/XNPCFavorDramaExchange.cs
new file mode 100644
index 00000000..7f23b61e
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XNPCFavorDramaExchange.cs
@@ -0,0 +1,166 @@
+using System;
+using System.Collections.Generic;
+using KKSG;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class XNPCFavorDramaExchange : DlgHandlerBase
+ {
+ private XNPCFavorDrama operate
+ {
+ get
+ {
+ return XNPCFavorDocument.IsNpcDialogVisible();
+ }
+ }
+
+ protected override string FileName
+ {
+ get
+ {
+ return "GameSystem/NpcBlessing/NpcChangePresent";
+ }
+ }
+
+ private XNPCFavorDocument doc;
+
+ private IXUIButton exchangeBtn = null;
+
+ private Transform npcReturnItem = null;
+
+ private Transform myItem = null;
+
+ private IXUIButton closeBtn = null;
+
+ private ItemBrief role2npc = null;
+
+ private ItemBrief npc2role = null;
+
+ protected override void Init()
+ {
+ base.Init();
+ this.doc = XDocuments.GetSpecificDocument<XNPCFavorDocument>(XNPCFavorDocument.uuID);
+ this.exchangeBtn = (base.transform.Find("Bg/OK").GetComponent("XUIButton") as IXUIButton);
+ this.npcReturnItem = base.transform.Find("Bg/ItemNpc");
+ this.myItem = base.transform.Find("Bg/ItemPlayer");
+ this.closeBtn = (base.transform.Find("Bg/Close").GetComponent("XUIButton") as IXUIButton);
+ }
+
+ protected override void OnShow()
+ {
+ this.RefreshData();
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ this.exchangeBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnClickExchange));
+ this.closeBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnClickClose));
+ }
+
+ public override void OnUnload()
+ {
+ this.doc = null;
+ this.role2npc = null;
+ this.npc2role = null;
+ }
+
+ public override void RefreshData()
+ {
+ XNPCFavorDrama xnpcfavorDrama = XNPCFavorDocument.IsNpcDialogVisible();
+ bool flag = xnpcfavorDrama != null;
+ if (flag)
+ {
+ List<ItemBrief> exchangeInfoByXId = this.doc.GetExchangeInfoByXId(xnpcfavorDrama.GetXNpcId());
+ bool flag2 = exchangeInfoByXId != null;
+ if (flag2)
+ {
+ bool flag3 = this.doc.Role2NPC != null && this.doc.NPC2Role != null && this.doc.ExchangeNPCID == XNPCFavorDocument.GetNpcIdByXId(xnpcfavorDrama.GetXNpcId());
+ if (flag3)
+ {
+ this.role2npc = this.doc.Role2NPC;
+ this.npc2role = this.doc.NPC2Role;
+ }
+ else
+ {
+ bool flag4 = exchangeInfoByXId != null && exchangeInfoByXId.Count > 0 && exchangeInfoByXId.Count % 2 == 0;
+ if (flag4)
+ {
+ int num = exchangeInfoByXId.Count - 1;
+ this.role2npc = exchangeInfoByXId[num - 1];
+ this.npc2role = exchangeInfoByXId[num];
+ }
+ }
+ bool flag5 = this.role2npc == null || this.npc2role == null;
+ if (!flag5)
+ {
+ this.DrawItem(this.myItem, (int)this.role2npc.itemID, (int)this.role2npc.itemCount);
+ this.DrawItem(this.npcReturnItem, (int)this.npc2role.itemID, (int)this.npc2role.itemCount);
+ }
+ }
+ }
+ }
+
+ private bool OnClickExchange(IXUIButton btn)
+ {
+ bool flag = this.role2npc == null;
+ bool result;
+ if (flag)
+ {
+ result = false;
+ }
+ else
+ {
+ bool flag2 = this.role2npc != null;
+ if (flag2)
+ {
+ ulong itemCount = XBagDocument.BagDoc.GetItemCount((int)this.role2npc.itemID);
+ bool flag3 = itemCount < (ulong)this.role2npc.itemCount;
+ if (flag3)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString("NPCExchangeItemNotEnough"), "fece00");
+ return true;
+ }
+ ItemList.RowData itemConf = XBagDocument.GetItemConf((int)this.role2npc.itemID);
+ string arg = (itemConf == null) ? string.Empty : itemConf.ItemName[0];
+ XSingleton<UiUtility>.singleton.ShowModalDialog(string.Format(XStringDefineProxy.GetString("NPCExchangeHint"), this.role2npc.itemCount, arg), new ButtonClickEventHandler(this.ConfirmExchange));
+ }
+ result = true;
+ }
+ return result;
+ }
+
+ private bool OnClickClose(IXUIButton btn)
+ {
+ DlgBase<DramaDlg, DramaDlgBehaviour>.singleton.SetVisible(false, true);
+ return true;
+ }
+
+ private bool ConfirmExchange(IXUIButton btn)
+ {
+ XNPCFavorDrama xnpcfavorDrama = XNPCFavorDocument.IsNpcDialogVisible();
+ bool flag = xnpcfavorDrama != null && this.role2npc != null && this.npc2role != null;
+ if (flag)
+ {
+ this.doc.ReqSrvExchangeGift(XNPCFavorDocument.GetNpcIdByXId(xnpcfavorDrama.GetXNpcId()), this.role2npc, this.npc2role);
+ }
+ DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.SetVisible(false, true);
+ return true;
+ }
+
+ private void DrawItem(Transform item, int itemId, int itemNum)
+ {
+ XSingleton<XItemDrawerMgr>.singleton.normalItemDrawer.DrawItem(item.gameObject, itemId, itemNum, true);
+ IXUISprite ixuisprite = item.Find("Icon").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.ID = (ulong)((long)itemId);
+ ixuisprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(XSingleton<UiUtility>.singleton.OnItemClick));
+ IXUILabel ixuilabel = item.Find("Name").GetComponent("XUILabel") as IXUILabel;
+ ItemList.RowData itemConf = XBagDocument.GetItemConf(itemId);
+ ixuilabel.SetText((itemConf != null) ? itemConf.ItemName[0] : string.Empty);
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/XNPCFavorDramaExchange.cs.meta b/Client/Assets/Scripts/XMainClient/UI/XNPCFavorDramaExchange.cs.meta
new file mode 100644
index 00000000..dbde6d8b
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XNPCFavorDramaExchange.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 2039d2dfead7839489c7885e249663db
+timeCreated: 1611403405
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/XNPCFavorDramaSend.cs b/Client/Assets/Scripts/XMainClient/UI/XNPCFavorDramaSend.cs
new file mode 100644
index 00000000..71a83395
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XNPCFavorDramaSend.cs
@@ -0,0 +1,237 @@
+using System;
+using System.Collections.Generic;
+using KKSG;
+using UILib;
+using UnityEngine;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class XNPCFavorDramaSend : DlgHandlerBase
+ {
+ private XNPCFavorDrama operate
+ {
+ get
+ {
+ return XNPCFavorDocument.IsNpcDialogVisible();
+ }
+ }
+
+ protected override string FileName
+ {
+ get
+ {
+ return "GameSystem/NpcBlessing/NpcSendPresent";
+ }
+ }
+
+ private XNPCFavorDocument doc;
+
+ private IXUILabel m_LeftTimes;
+
+ private IXUIScrollView m_ScrollView;
+
+ private IXUIWrapContent m_WrapContent;
+
+ private List<NpcLikeItem> likeItems;
+
+ protected override void Init()
+ {
+ base.Init();
+ this.doc = XDocuments.GetSpecificDocument<XNPCFavorDocument>(XNPCFavorDocument.uuID);
+ this.m_LeftTimes = (base.transform.Find("LeftTimes").GetComponent("XUILabel") as IXUILabel);
+ this.m_ScrollView = (base.transform.Find("Panel").GetComponent("XUIScrollView") as IXUIScrollView);
+ this.m_WrapContent = (base.transform.Find("Panel/WrapContent").GetComponent("XUIWrapContent") as IXUIWrapContent);
+ }
+
+ protected override void OnShow()
+ {
+ this.RefreshData();
+ }
+
+ public override void OnUnload()
+ {
+ this.doc = null;
+ }
+
+ public override void RefreshData()
+ {
+ this.m_LeftTimes.SetText(this.doc.GiveLeftCount.ToString());
+ this.RefreshList();
+ }
+
+ public override void RegisterEvent()
+ {
+ this.m_WrapContent.RegisterItemUpdateEventHandler(new WrapItemUpdateEventHandler(this.WrapListUpdate));
+ }
+
+ private void RefreshList()
+ {
+ XNPCFavorDrama xnpcfavorDrama = XNPCFavorDocument.IsNpcDialogVisible();
+ bool flag = xnpcfavorDrama != null;
+ if (flag)
+ {
+ this.likeItems = this.doc.GetLikeItemsByXId(xnpcfavorDrama.GetXNpcId());
+ bool flag2 = this.likeItems != null;
+ if (flag2)
+ {
+ this.likeItems.Sort(new Comparison<NpcLikeItem>(XNPCFavorDramaSend.Compare));
+ this.m_WrapContent.SetContentCount(this.likeItems.Count, false);
+ this.m_ScrollView.ResetPosition();
+ }
+ else
+ {
+ XSingleton<XDebug>.singleton.AddLog("Error , Send Gift to UnActived Npc!", null, null, null, null, null, XDebugColor.XDebug_None);
+ }
+ }
+ }
+
+ private void WrapListUpdate(Transform item, int index)
+ {
+ bool flag = this.likeItems == null || index >= this.likeItems.Count;
+ if (flag)
+ {
+ for (int i = 0; i < item.childCount; i++)
+ {
+ item.GetChild(i).gameObject.SetActive(false);
+ }
+ }
+ else
+ {
+ for (int j = 0; j < item.childCount; j++)
+ {
+ item.GetChild(j).gameObject.SetActive(true);
+ }
+ NpcLikeItem npcLikeItem = this.likeItems[index];
+ this.DrawItem(item, npcLikeItem.itemid, npcLikeItem.itemcount, npcLikeItem.addexp, index, npcLikeItem.type);
+ }
+ }
+
+ private static int Compare(NpcLikeItem x, NpcLikeItem y)
+ {
+ bool flag = x.type != y.type;
+ int result;
+ if (flag)
+ {
+ result = XFastEnumIntEqualityComparer<NpcFlItemType>.ToInt(x.type) - XFastEnumIntEqualityComparer<NpcFlItemType>.ToInt(y.type);
+ }
+ else
+ {
+ result = (int)(x.itemid - y.itemid);
+ }
+ return result;
+ }
+
+ private void DrawItem(Transform item, uint itemId, uint itemNum, uint favorAdd, int index, NpcFlItemType type)
+ {
+ IXUIButton ixuibutton = item.Find("SendBtn").GetComponent("XUIButton") as IXUIButton;
+ IXUILabel ixuilabel = item.Find("friendship/Num").GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel2 = item.Find("HaveGot/Num").GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel3 = item.Find("Item/Name").GetComponent("XUILabel") as IXUILabel;
+ GameObject gameObject = item.Find("BgNormal").gameObject;
+ GameObject gameObject2 = item.Find("BgSpecial").gameObject;
+ Transform transform = item.Find("Item");
+ GameObject gameObject3 = transform.gameObject;
+ XSingleton<XItemDrawerMgr>.singleton.normalItemDrawer.DrawItem(gameObject3, (int)itemId, (int)itemNum, true);
+ IXUISprite ixuisprite = transform.Find("Icon").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.ID = (ulong)itemId;
+ ixuisprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(XSingleton<UiUtility>.singleton.OnItemClick));
+ ItemList.RowData itemConf = XBagDocument.GetItemConf((int)itemId);
+ ixuilabel3.SetText((itemConf != null) ? itemConf.ItemName[0] : string.Empty);
+ ulong itemCount = XBagDocument.BagDoc.GetItemCount((int)itemId);
+ string text = itemCount + "/" + itemNum;
+ bool flag = itemCount < (ulong)itemNum;
+ if (flag)
+ {
+ text = string.Concat(new object[]
+ {
+ "[ff0000]",
+ itemCount,
+ "/",
+ itemNum,
+ "[-]"
+ });
+ }
+ ixuilabel2.SetText(text);
+ ixuibutton.ID = (ulong)((long)index);
+ ixuibutton.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnClickSendBtn));
+ ixuilabel.SetText(favorAdd.ToString());
+ bool flag2 = type == NpcFlItemType.NPCFL_ITEM_TRIGGER_FAVOR;
+ if (flag2)
+ {
+ gameObject.SetActive(false);
+ gameObject2.SetActive(true);
+ }
+ else
+ {
+ gameObject.SetActive(true);
+ gameObject2.SetActive(false);
+ }
+ }
+
+ private bool OnClickSendBtn(IXUIButton btn)
+ {
+ bool flag = this.doc.GiveLeftCount <= 0u;
+ bool result;
+ if (flag)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString("ERR_NPCFL_GIVE_GIFT_COUNT_LESS"), "fece00");
+ result = true;
+ }
+ else
+ {
+ int num = (int)btn.ID;
+ bool flag2 = this.likeItems == null || num >= this.likeItems.Count;
+ if (flag2)
+ {
+ result = true;
+ }
+ else
+ {
+ NpcLikeItem npcLikeItem = this.likeItems[num];
+ uint itemid = npcLikeItem.itemid;
+ uint itemcount = npcLikeItem.itemcount;
+ uint addexp = npcLikeItem.addexp;
+ ulong itemCount = XBagDocument.BagDoc.GetItemCount((int)itemid);
+ bool flag3 = itemCount < (ulong)itemcount;
+ if (flag3)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString("NPCSendItemNotEnough"), "fece00");
+ }
+ else
+ {
+ NpcFeelingOneNpc oneNpcByXId = this.doc.GetOneNpcByXId(this.operate.GetXNpcId());
+ bool flag4 = oneNpcByXId == null;
+ if (flag4)
+ {
+ return true;
+ }
+ bool flag5 = oneNpcByXId.level >= this.doc.NpcFlLevTop;
+ if (flag5)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString("ERR_NPCFL_NPC_LEVEL_MAX"), "fece00");
+ return true;
+ }
+ bool flag6 = this.doc.IsCanLevelUp(oneNpcByXId);
+ if (flag6)
+ {
+ NpcFeeling.RowData npcTableInfoByXId = XNPCFavorDocument.GetNpcTableInfoByXId(this.operate.GetXNpcId());
+ XSingleton<UiUtility>.singleton.ShowSystemTip(string.Format(XStringDefineProxy.GetString("NPCFavorisFull"), npcTableInfoByXId.name), "fece00");
+ return true;
+ }
+ bool flag7 = this.operate != null;
+ if (flag7)
+ {
+ this.doc.ReqSrvGiveGift(oneNpcByXId.npcid, npcLikeItem);
+ ItemList.RowData itemConf = XBagDocument.GetItemConf((int)itemid);
+ string arg = (itemConf == null) ? string.Empty : itemConf.ItemName[0];
+ XSingleton<UiUtility>.singleton.ShowSystemTip(string.Format(XStringDefineProxy.GetString("NPCSendHint"), itemcount, arg, addexp), "fece00");
+ }
+ }
+ result = true;
+ }
+ }
+ return result;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/XNPCFavorDramaSend.cs.meta b/Client/Assets/Scripts/XMainClient/UI/XNPCFavorDramaSend.cs.meta
new file mode 100644
index 00000000..8769dd85
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XNPCFavorDramaSend.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 16b86ce14952b0e42a2283ea1c5f4299
+timeCreated: 1611403290
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/XNPCFavorHandler.cs b/Client/Assets/Scripts/XMainClient/UI/XNPCFavorHandler.cs
new file mode 100644
index 00000000..9c572b01
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XNPCFavorHandler.cs
@@ -0,0 +1,248 @@
+using System;
+using System.Collections.Generic;
+using KKSG;
+using UILib;
+using UnityEngine;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class XNPCFavorHandler : DlgHandlerBase
+ {
+ protected override string FileName
+ {
+ get
+ {
+ return "GameSystem/NpcBlessing/NpcEquipHandler";
+ }
+ }
+
+ private XNPCFavorDocument m_doc;
+
+ private const int MODIFYNUM = 4;
+
+ private IXUIScrollView m_ScrollView;
+
+ private IXUIWrapContent m_WrapContent;
+
+ private GameObject m_SendFrame;
+
+ private XNPCSendSubHandler m_SendHandler = null;
+
+ public uint _selectedNPCID = 0u;
+
+ private GameObject SelectedItem = null;
+
+ private List<uint> m_NpcBaseDatas = null;
+
+ protected override void Init()
+ {
+ base.Init();
+ this.m_doc = XDocuments.GetSpecificDocument<XNPCFavorDocument>(XNPCFavorDocument.uuID);
+ this.m_SendFrame = base.PanelObject.transform.Find("NpcInfo").gameObject;
+ DlgHandlerBase.EnsureCreate<XNPCSendSubHandler>(ref this.m_SendHandler, this.m_SendFrame, this, false);
+ this.m_SendHandler.SetParentHandler(this);
+ this.m_ScrollView = (base.PanelObject.transform.Find("Npc/NpcScrollView").GetComponent("XUIScrollView") as IXUIScrollView);
+ this.m_WrapContent = (base.PanelObject.transform.Find("Npc/NpcScrollView/WrapContent").GetComponent("XUIWrapContent") as IXUIWrapContent);
+ }
+
+ protected override void OnShow()
+ {
+ this.RefreshData();
+ this.m_SendHandler.SetVisible(true);
+ }
+
+ public override void RefreshData()
+ {
+ this.SetupNPCList();
+ bool flag = this.m_SendHandler.IsVisible();
+ if (flag)
+ {
+ this.m_SendHandler.RefreshData();
+ }
+ }
+
+ public override void RegisterEvent()
+ {
+ this.m_WrapContent.RegisterItemUpdateEventHandler(new WrapItemUpdateEventHandler(this.NPCWrapListUpdate));
+ }
+
+ protected override void OnHide()
+ {
+ bool flag = this.m_doc != null;
+ if (flag)
+ {
+ this.m_doc.RemoveAllNewTags();
+ }
+ }
+
+ public override void OnUnload()
+ {
+ this.m_doc = null;
+ this.m_NpcBaseDatas = null;
+ this._selectedNPCID = 0u;
+ this.SelectedItem = null;
+ DlgHandlerBase.EnsureUnload<XNPCSendSubHandler>(ref this.m_SendHandler);
+ base.OnUnload();
+ }
+
+ private void SetupNPCList()
+ {
+ this.m_NpcBaseDatas = this.m_doc.NPCIds;
+ bool flag = this.m_NpcBaseDatas != null;
+ if (flag)
+ {
+ this.m_WrapContent.SetContentCount(this.m_NpcBaseDatas.Count, false);
+ this.m_ScrollView.ResetPosition();
+ }
+ }
+
+ private void NPCWrapListUpdate(Transform item, int index)
+ {
+ bool flag = this.m_NpcBaseDatas == null || index >= this.m_NpcBaseDatas.Count;
+ if (!flag)
+ {
+ IXUILabel ixuilabel = item.Find("NpcName").GetComponent("XUILabel") as IXUILabel;
+ IXUISprite ixuisprite = item.Find("NpcHead").GetComponent("XUISprite") as IXUISprite;
+ IXUILabel ixuilabel2 = item.Find("NoActive").GetComponent("XUILabel") as IXUILabel;
+ GameObject gameObject = item.Find("JinDu").gameObject;
+ IXUIProgress ixuiprogress = item.Find("JinDu/Progress Bar").GetComponent("XUIProgress") as IXUIProgress;
+ IXUILabel ixuilabel3 = item.Find("JinDu/Value").GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel4 = item.Find("JinDu/ValueMax").GetComponent("XUILabel") as IXUILabel;
+ IXUISprite ixuisprite2 = item.Find("GroupIcon").GetComponent("XUISprite") as IXUISprite;
+ GameObject gameObject2 = item.Find("RedPoint").gameObject;
+ uint num = this.m_NpcBaseDatas[index];
+ NpcFeeling.RowData npcTableInfoById = XNPCFavorDocument.GetNpcTableInfoById(num);
+ NpcFeelingOneNpc oneNpc = this.m_doc.GetOneNpc(num);
+ GameObject gameObject3 = item.Find("New").gameObject;
+ ixuilabel.SetText(npcTableInfoById.name.ToString());
+ bool flag2 = oneNpc != null;
+ if (flag2)
+ {
+ gameObject.SetActive(true);
+ ixuilabel2.SetText(string.Empty);
+ ixuilabel3.SetText(oneNpc.exp.ToString());
+ NpcFeelingAttr.RowData attrDataByLevel = XNPCFavorDocument.GetAttrDataByLevel(oneNpc.npcid, oneNpc.level);
+ uint num2 = (attrDataByLevel == null) ? 0u : attrDataByLevel.needExp;
+ NpcFeelingAttr.RowData attrDataByLevel2 = XNPCFavorDocument.GetAttrDataByLevel(oneNpc.npcid, oneNpc.level + 1u);
+ uint num3 = 0u;
+ bool active = false;
+ bool flag3 = attrDataByLevel2 != null;
+ if (flag3)
+ {
+ num3 = attrDataByLevel2.needExp - num2;
+ active = (oneNpc.exp >= num3 && oneNpc.level < this.m_doc.NpcFlLevTop);
+ }
+ ixuilabel4.SetText(string.Format("/{0}", num3));
+ ixuiprogress.value = ((num3 == 0u) ? 0f : (oneNpc.exp * 1f / num3));
+ gameObject3.SetActive(oneNpc.isnew);
+ gameObject2.SetActive(active);
+ ixuisprite2.SetColor(Color.white);
+ }
+ else
+ {
+ gameObject.SetActive(false);
+ ixuilabel2.SetText(string.Format(XStringDefineProxy.GetString("NPCUnLock"), npcTableInfoById.openLevel));
+ gameObject3.SetActive(false);
+ gameObject2.SetActive(false);
+ ixuisprite2.SetColor(Color.black);
+ }
+ ixuisprite.SetColor((oneNpc != null) ? Color.white : Color.black);
+ ixuisprite.SetSprite(npcTableInfoById.icon);
+ ixuisprite2.SetSprite(string.Format("Group_{0}_0", npcTableInfoById.unionId - 1u));
+ IXUIButton ixuibutton = item.GetComponent("XUIButton") as IXUIButton;
+ ixuibutton.ID = (ulong)num;
+ ixuibutton.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnSelectNPC));
+ bool flag4 = this._selectedNPCID == 0u && index == 0;
+ if (flag4)
+ {
+ this.OnSelectNPC(ixuibutton);
+ }
+ this.ToggleSelection(item.gameObject, num == this._selectedNPCID);
+ }
+ }
+
+ private bool OnSelectNPC(IXUIButton btn)
+ {
+ uint num = (uint)btn.ID;
+ bool flag = this._selectedNPCID == num;
+ bool result;
+ if (flag)
+ {
+ result = true;
+ }
+ else
+ {
+ this._selectedNPCID = num;
+ bool flag2 = this.SelectedItem != null;
+ if (flag2)
+ {
+ this.ToggleSelection(this.SelectedItem, false);
+ }
+ this.ToggleSelection(btn.gameObject, true);
+ this.OnNotifyRefreshSubHandler();
+ result = true;
+ }
+ return result;
+ }
+
+ public void SkipToNpc(uint npcId)
+ {
+ bool flag = this.m_NpcBaseDatas == null;
+ if (!flag)
+ {
+ this._selectedNPCID = npcId;
+ bool flag2 = this.m_NpcBaseDatas.Count > 4;
+ if (flag2)
+ {
+ int num = 1;
+ for (int i = 0; i < this.m_NpcBaseDatas.Count; i++)
+ {
+ bool flag3 = this.m_NpcBaseDatas[i] == npcId;
+ if (flag3)
+ {
+ break;
+ }
+ num++;
+ }
+ float position = Mathf.Clamp01(((float)num - 2f) * 1f / (float)(this.m_NpcBaseDatas.Count - 4));
+ this.m_ScrollView.SetPosition(position);
+ }
+ this.m_WrapContent.SetContentCount(this.m_NpcBaseDatas.Count, false);
+ bool flag4 = this.m_SendHandler.IsVisible();
+ if (flag4)
+ {
+ this.m_SendHandler.RefreshData();
+ }
+ }
+ }
+
+ private void OnNotifyRefreshSubHandler()
+ {
+ bool flag = this.m_SendHandler.IsVisible();
+ if (flag)
+ {
+ this.m_SendHandler.RefreshData();
+ }
+ }
+
+ private void ToggleSelection(GameObject go, bool bSelect)
+ {
+ Transform transform = go.transform.Find("Select");
+ bool flag = transform != null;
+ if (flag)
+ {
+ GameObject gameObject = transform.gameObject;
+ bool flag2 = gameObject != null;
+ if (flag2)
+ {
+ gameObject.SetActive(bSelect);
+ }
+ }
+ if (bSelect)
+ {
+ this.SelectedItem = go;
+ }
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/XNPCFavorHandler.cs.meta b/Client/Assets/Scripts/XMainClient/UI/XNPCFavorHandler.cs.meta
new file mode 100644
index 00000000..b0e0eb15
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XNPCFavorHandler.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 480344dfd1048f646a408e15f51bf7a8
+timeCreated: 1611403656
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/XNPCSendSubHandler.cs b/Client/Assets/Scripts/XMainClient/UI/XNPCSendSubHandler.cs
new file mode 100644
index 00000000..879e2464
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XNPCSendSubHandler.cs
@@ -0,0 +1,339 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+using KKSG;
+using UILib;
+using UnityEngine;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class XNPCSendSubHandler : DlgHandlerBase
+ {
+ private XNPCFavorHandler _parentHandler = null;
+
+ private XNPCFavorDocument m_doc;
+
+ private IXUIScrollView m_ScrollView;
+
+ private Transform _items;
+
+ protected XUIPool _itemPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ private IXUISprite _RelicsSpr;
+
+ private IXUILabel _RelicsName;
+
+ private IXUILabel _RelicsLevel;
+
+ private IXUILabel _RelicsDesc;
+
+ private IXUILabel _RelicsAddition;
+
+ private IXUILabel _curAttr;
+
+ private IXUIButton _NextLevel;
+
+ private IXUIButton _LevelUpBtn;
+
+ private GameObject _LevelUpRedPoint;
+
+ private IXUIButton _SendBtn;
+
+ public void SetParentHandler(XNPCFavorHandler handler = null)
+ {
+ this._parentHandler = handler;
+ }
+
+ protected override void Init()
+ {
+ base.Init();
+ this.m_doc = XDocuments.GetSpecificDocument<XNPCFavorDocument>(XNPCFavorDocument.uuID);
+ this._items = null;
+ this._items = base.transform.Find("Panel/Items");
+ this.m_ScrollView = (this._items.GetComponent("XUIScrollView") as IXUIScrollView);
+ this._itemPool.SetupPool(this._items.gameObject, this._items.Find("Item").gameObject, 4u, false);
+ this._RelicsSpr = (base.transform.Find("EquipItem").GetComponent("XUISprite") as IXUISprite);
+ this._RelicsName = (base.transform.Find("Title/EquipName").GetComponent("XUILabel") as IXUILabel);
+ this._RelicsLevel = (base.transform.Find("Title/Level").GetComponent("XUILabel") as IXUILabel);
+ this._RelicsDesc = (base.transform.Find("Title/Tips").GetComponent("XUILabel") as IXUILabel);
+ this._RelicsAddition = (base.transform.Find("EquipEffect/Value").GetComponent("XUILabel") as IXUILabel);
+ this._curAttr = (base.transform.Find("EquipEffect/AttrValue").GetComponent("XUILabel") as IXUILabel);
+ this._NextLevel = (base.transform.Find("NextLevelBtn").GetComponent("XUIButton") as IXUIButton);
+ this._LevelUpBtn = (base.transform.Find("LevelUpBtn").GetComponent("XUIButton") as IXUIButton);
+ this._LevelUpRedPoint = base.transform.Find("LevelUpBtn/RedPoint").gameObject;
+ this._LevelUpRedPoint.SetActive(false);
+ this._SendBtn = (base.transform.Find("GoBtn").GetComponent("XUIButton") as IXUIButton);
+ }
+
+ protected override void OnShow()
+ {
+ this.RefreshData();
+ }
+
+ public override void RefreshData()
+ {
+ this.RefreshRelics();
+ this.RefreshItems();
+ }
+
+ public override void RegisterEvent()
+ {
+ this._NextLevel.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnClickNextAdditionBtn));
+ this._LevelUpBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnClickLevelUpBtn));
+ this._SendBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnClickSendBtn));
+ }
+
+ public override void OnUnload()
+ {
+ this.m_doc = null;
+ this._parentHandler = null;
+ }
+
+ private void RefreshRelics()
+ {
+ bool flag = this._parentHandler._selectedNPCID == 0u;
+ if (!flag)
+ {
+ NpcFeelingOneNpc oneNpc = this.m_doc.GetOneNpc(this._parentHandler._selectedNPCID);
+ NpcFeeling.RowData npcTableInfoById = XNPCFavorDocument.GetNpcTableInfoById(this._parentHandler._selectedNPCID);
+ this._RelicsSpr.SetSprite(npcTableInfoById.relicsIcon);
+ this._RelicsName.SetText(npcTableInfoById.relicsName);
+ this._RelicsLevel.SetText(string.Format("Lv.{0}", (oneNpc == null) ? 0u : oneNpc.level));
+ this._RelicsDesc.SetText(XSingleton<UiUtility>.singleton.ReplaceReturn(npcTableInfoById.relicsDesc));
+ uint lev = (oneNpc != null) ? oneNpc.level : 0u;
+ NpcFeelingAttr.RowData attrDataByLevel = XNPCFavorDocument.GetAttrDataByLevel(npcTableInfoById.npcId, lev);
+ bool flag2 = attrDataByLevel != null;
+ if (flag2)
+ {
+ StringBuilder sb = XNPCFavorDocument.sb;
+ sb.Length = 0;
+ int i = 0;
+ int count = attrDataByLevel.Attr.Count;
+ while (i < count)
+ {
+ uint attrid = attrDataByLevel.Attr[i, 0];
+ uint attrValue = attrDataByLevel.Attr[i, 1];
+ bool flag3 = i != 0;
+ if (flag3)
+ {
+ sb.Append(" ");
+ }
+ sb.Append(string.Format("{0}{1}", XAttributeCommon.GetAttrStr((int)attrid), (oneNpc != null) ? XAttributeCommon.GetAttrValueStr(attrid, attrValue, true) : "+0"));
+ i++;
+ }
+ this._curAttr.SetText(sb.ToString());
+ }
+ else
+ {
+ this._curAttr.SetText(string.Empty);
+ }
+ NpcFeelingAttr.RowData npcAttrByIdLev = XNPCFavorDocument.GetNpcAttrByIdLev(npcTableInfoById.npcId, (oneNpc == null) ? 0u : oneNpc.level);
+ bool flag4 = npcAttrByIdLev != null;
+ if (flag4)
+ {
+ this._RelicsAddition.SetText(XSingleton<UiUtility>.singleton.ReplaceReturn(npcAttrByIdLev.RelicsDesc));
+ }
+ else
+ {
+ this._RelicsAddition.SetText(string.Empty);
+ }
+ this._LevelUpRedPoint.SetActive(this.m_doc.IsCanLevelUp(oneNpc));
+ }
+ }
+
+ private void RefreshItems()
+ {
+ this._itemPool.ReturnAll(false);
+ bool flag = this._parentHandler._selectedNPCID > 0u;
+ if (flag)
+ {
+ NpcFeelingOneNpc oneNpc = this.m_doc.GetOneNpc(this._parentHandler._selectedNPCID);
+ bool flag2 = oneNpc != null;
+ if (flag2)
+ {
+ List<NpcLikeItem> likeitem = oneNpc.likeitem;
+ bool flag3 = likeitem != null;
+ if (flag3)
+ {
+ for (int i = 0; i < likeitem.Count; i++)
+ {
+ this.DrawItem((int)likeitem[i].itemid, (int)likeitem[i].itemcount, i);
+ }
+ }
+ }
+ else
+ {
+ NpcFeeling.RowData npcTableInfoById = XNPCFavorDocument.GetNpcTableInfoById(this._parentHandler._selectedNPCID);
+ SeqListRef<uint> clientItem = npcTableInfoById.clientItem;
+ for (int j = 0; j < clientItem.Count; j++)
+ {
+ this.DrawItem((int)clientItem[j, 0], (int)clientItem[j, 1], j);
+ }
+ }
+ }
+ this.m_ScrollView.ResetPosition();
+ }
+
+ private void DrawItem(int itemId, int itemNum, int i)
+ {
+ Transform transform = this.DrawItem(itemId, itemNum, this._items, i);
+ IXUILabel ixuilabel = transform.transform.Find("Num").GetComponent("XUILabel") as IXUILabel;
+ ulong itemCount = XBagDocument.BagDoc.GetItemCount(itemId);
+ string text = itemCount + "/" + itemNum;
+ bool flag = itemCount < (ulong)((long)itemNum);
+ if (flag)
+ {
+ text = string.Concat(new object[]
+ {
+ "[ff0000]",
+ itemCount,
+ "/",
+ itemNum,
+ "[-]"
+ });
+ }
+ ixuilabel.SetText(text);
+ }
+
+ private Transform DrawItem(int itemID, int num, Transform parent, int index)
+ {
+ GameObject gameObject = this._itemPool.FetchGameObject(false);
+ gameObject.transform.parent = parent;
+ gameObject.transform.localPosition = new Vector3((float)(index * this._itemPool.TplWidth), 0f, 0f);
+ XSingleton<XItemDrawerMgr>.singleton.normalItemDrawer.DrawItem(gameObject, itemID, num, true);
+ IXUISprite ixuisprite = gameObject.transform.Find("Icon").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.ID = (ulong)((long)itemID);
+ ixuisprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(XSingleton<UiUtility>.singleton.OnItemClick));
+ return gameObject.transform;
+ }
+
+ private bool OnClickSendBtn(IXUIButton btn)
+ {
+ bool flag = this._parentHandler._selectedNPCID == 0u;
+ bool result;
+ if (flag)
+ {
+ result = true;
+ }
+ else
+ {
+ NpcFeelingOneNpc oneNpc = this.m_doc.GetOneNpc(this._parentHandler._selectedNPCID);
+ bool flag2 = oneNpc != null;
+ if (flag2)
+ {
+ uint npcXIdById = XNPCFavorDocument.GetNpcXIdById(this._parentHandler._selectedNPCID);
+ XSingleton<UiUtility>.singleton.CloseModalDlg();
+ XSingleton<XInput>.singleton.LastNpc = XSingleton<XEntityMgr>.singleton.GetNpc(npcXIdById);
+ bool flag3 = XSingleton<XInput>.singleton.LastNpc != null;
+ if (flag3)
+ {
+ this.m_doc.View.Close(true);
+ }
+ else
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString("NPCNotInScene"), "fece00");
+ }
+ }
+ else
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString("NPCNotActive"), "fece00");
+ }
+ result = true;
+ }
+ return result;
+ }
+
+ private bool OnClickLevelUpBtn(IXUIButton btn)
+ {
+ bool flag = this._parentHandler._selectedNPCID == 0u;
+ bool result;
+ if (flag)
+ {
+ result = true;
+ }
+ else
+ {
+ NpcFeelingOneNpc oneNpc = this.m_doc.GetOneNpc(this._parentHandler._selectedNPCID);
+ bool flag2 = oneNpc != null;
+ if (flag2)
+ {
+ bool flag3 = this.m_doc.IsCanLevelUp(oneNpc);
+ if (flag3)
+ {
+ this.m_doc.ReqSrvLevelUp(this._parentHandler._selectedNPCID);
+ }
+ else
+ {
+ bool flag4 = oneNpc.level == this.m_doc.NpcFlLevTop;
+ if (flag4)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString("ERR_NPCFL_NPC_LEVEL_MAX"), "fece00");
+ }
+ else
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString("NPCLessEXP"), "fece00");
+ }
+ }
+ }
+ else
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString("NPCNotActive"), "fece00");
+ }
+ result = true;
+ }
+ return result;
+ }
+
+ private bool OnClickNextAdditionBtn(IXUIButton btn)
+ {
+ bool flag = this._parentHandler._selectedNPCID == 0u;
+ bool result;
+ if (flag)
+ {
+ result = true;
+ }
+ else
+ {
+ NpcFeelingOneNpc oneNpc = this.m_doc.GetOneNpc(this._parentHandler._selectedNPCID);
+ bool flag2 = oneNpc != null;
+ if (flag2)
+ {
+ uint selectedNPCID = this._parentHandler._selectedNPCID;
+ NpcFeelingAttr.RowData attrDataByLevel = XNPCFavorDocument.GetAttrDataByLevel(selectedNPCID, oneNpc.level + 1u);
+ bool flag3 = attrDataByLevel != null;
+ if (flag3)
+ {
+ string @string = XStringDefineProxy.GetString("NPCNextAddition");
+ SeqListRef<uint> attr = attrDataByLevel.Attr;
+ StringBuilder sb = XNPCFavorDocument.sb;
+ sb.Length = 0;
+ for (int i = 0; i < attr.Count; i++)
+ {
+ uint attrid = attr[i, 0];
+ uint attrValue = attr[i, 1];
+ bool flag4 = i != 0;
+ if (flag4)
+ {
+ sb.Append("\n");
+ }
+ sb.Append(string.Format("{0}{1}", XAttributeCommon.GetAttrStr((int)attrid), XAttributeCommon.GetAttrValueStr(attrid, attrValue, true)));
+ }
+ string label = sb.ToString();
+ XSingleton<UiUtility>.singleton.ShowModalDialogWithTitle(@string, label, XStringDefineProxy.GetString(XStringDefine.COMMON_OK), null, 50);
+ }
+ else
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString("NPCRelicsLevelMAX"), "fece00");
+ }
+ }
+ else
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString("NPCNotActive"), "fece00");
+ }
+ result = true;
+ }
+ return result;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/XNPCSendSubHandler.cs.meta b/Client/Assets/Scripts/XMainClient/UI/XNPCSendSubHandler.cs.meta
new file mode 100644
index 00000000..981297b6
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XNPCSendSubHandler.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: dcab30777a716ae4f969bdee9e75299f
+timeCreated: 1611404679
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/XNPCUnionHandler.cs b/Client/Assets/Scripts/XMainClient/UI/XNPCUnionHandler.cs
new file mode 100644
index 00000000..71341957
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XNPCUnionHandler.cs
@@ -0,0 +1,167 @@
+using System;
+using System.Collections.Generic;
+using KKSG;
+using UILib;
+using UnityEngine;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class XNPCUnionHandler : DlgHandlerBase
+ {
+ public uint SelectedUnionID
+ {
+ get
+ {
+ return this._selectedUnionID;
+ }
+ }
+
+ protected override string FileName
+ {
+ get
+ {
+ return "GameSystem/NPCBlessing/NpcGroupHandler";
+ }
+ }
+
+ private XNPCFavorDocument m_doc;
+
+ private IXUIScrollView m_ScrollView;
+
+ private IXUIWrapContent m_WrapContent;
+
+ private GameObject m_MemberFrame;
+
+ private XNPCUnionMemSubHandler m_MemberHandler = null;
+
+ private List<uint> m_UnionIds;
+
+ private uint _selectedUnionID = 0u;
+
+ private GameObject SelectedItem = null;
+
+ protected override void Init()
+ {
+ base.Init();
+ this.m_doc = XDocuments.GetSpecificDocument<XNPCFavorDocument>(XNPCFavorDocument.uuID);
+ this.m_MemberFrame = base.PanelObject.transform.Find("GroupInfo").gameObject;
+ DlgHandlerBase.EnsureCreate<XNPCUnionMemSubHandler>(ref this.m_MemberHandler, this.m_MemberFrame, this, false);
+ this.m_MemberHandler.SetParentHandler(this);
+ this.m_ScrollView = (base.PanelObject.transform.Find("Group/NpcScrollView").GetComponent("XUIScrollView") as IXUIScrollView);
+ this.m_WrapContent = (base.PanelObject.transform.Find("Group/NpcScrollView/WrapContent").GetComponent("XUIWrapContent") as IXUIWrapContent);
+ }
+
+ protected override void OnShow()
+ {
+ this.RefreshData();
+ this.m_MemberHandler.SetVisible(true);
+ }
+
+ public override void RefreshData()
+ {
+ this.SetupUnionList();
+ bool flag = this.m_MemberHandler.IsVisible();
+ if (flag)
+ {
+ this.m_MemberHandler.RefreshData();
+ }
+ }
+
+ public override void RegisterEvent()
+ {
+ this.m_WrapContent.RegisterItemUpdateEventHandler(new WrapItemUpdateEventHandler(this.UnionWrapListUpdate));
+ }
+
+ public override void OnUnload()
+ {
+ this.m_doc = null;
+ DlgHandlerBase.EnsureUnload<XNPCUnionMemSubHandler>(ref this.m_MemberHandler);
+ base.OnUnload();
+ }
+
+ private void SetupUnionList()
+ {
+ this.m_UnionIds = this.m_doc.UnionIds;
+ bool flag = this.m_UnionIds != null;
+ if (flag)
+ {
+ this.m_WrapContent.SetContentCount(this.m_UnionIds.Count, false);
+ this.m_ScrollView.ResetPosition();
+ }
+ }
+
+ private void UnionWrapListUpdate(Transform item, int index)
+ {
+ bool flag = this.m_UnionIds == null || index >= this.m_UnionIds.Count;
+ if (!flag)
+ {
+ uint num = this.m_UnionIds[index];
+ NpcFeelingUnite activeUniteInfo = this.m_doc.GetActiveUniteInfo(num);
+ NpcUniteAttr.RowData unionTableInfoByUnionId = XNPCFavorDocument.GetUnionTableInfoByUnionId(num, (activeUniteInfo == null) ? 0u : activeUniteInfo.level);
+ bool flag2 = unionTableInfoByUnionId == null;
+ if (!flag2)
+ {
+ IXUILabel ixuilabel = item.Find("GroupName").GetComponent("XUILabel") as IXUILabel;
+ IXUISprite ixuisprite = item.Find("GroupFlag").GetComponent("XUISprite") as IXUISprite;
+ IXUILabel ixuilabel2 = item.Find("GroupLevel").GetComponent("XUILabel") as IXUILabel;
+ uint unionSumLevel = this.m_doc.GetUnionSumLevel(num);
+ ixuilabel.SetText(unionTableInfoByUnionId.Name);
+ ixuilabel2.SetText(string.Format(XStringDefineProxy.GetString("NPCUnionLevel"), unionSumLevel));
+ ixuisprite.SetSprite(unionTableInfoByUnionId.Icon);
+ GameObject gameObject = item.Find("RedPoint").gameObject;
+ gameObject.SetActive(this.m_doc.IsUnionCanActiveNextLevel(num, unionSumLevel));
+ IXUISprite ixuisprite2 = item.Find("Btn").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite2.ID = (ulong)num;
+ ixuisprite2.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnSelectUnion));
+ bool flag3 = this._selectedUnionID == 0u && index == 0;
+ if (flag3)
+ {
+ this.OnSelectUnion(ixuisprite2);
+ }
+ this.ToggleSelection(item.gameObject, num == this._selectedUnionID);
+ }
+ }
+ }
+
+ private void OnSelectUnion(IXUISprite sprite)
+ {
+ uint num = (uint)sprite.ID;
+ bool flag = this._selectedUnionID == num;
+ if (!flag)
+ {
+ this._selectedUnionID = num;
+ bool flag2 = this.SelectedItem != null;
+ if (flag2)
+ {
+ this.ToggleSelection(this.SelectedItem, false);
+ }
+ this.ToggleSelection(sprite.transform.parent.gameObject, true);
+ this.OnNotifyRefreshSubHandler();
+ }
+ }
+
+ private void OnNotifyRefreshSubHandler()
+ {
+ bool flag = this.m_MemberHandler.IsVisible();
+ if (flag)
+ {
+ this.m_MemberHandler.RefreshData();
+ }
+ }
+
+ private void ToggleSelection(GameObject go, bool bSelect)
+ {
+ Transform transform = go.transform.Find("Select");
+ bool flag = transform != null;
+ if (flag)
+ {
+ transform.gameObject.SetActive(bSelect);
+ }
+ if (bSelect)
+ {
+ this.SelectedItem = go;
+ }
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/XNPCUnionHandler.cs.meta b/Client/Assets/Scripts/XMainClient/UI/XNPCUnionHandler.cs.meta
new file mode 100644
index 00000000..f405c0f9
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XNPCUnionHandler.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: ac26a7a1ce928954b9ecea193dccf047
+timeCreated: 1611404329
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/XNPCUnionMemSubHandler.cs b/Client/Assets/Scripts/XMainClient/UI/XNPCUnionMemSubHandler.cs
new file mode 100644
index 00000000..ef8a88ab
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XNPCUnionMemSubHandler.cs
@@ -0,0 +1,342 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+using KKSG;
+using UILib;
+using UnityEngine;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class XNPCUnionMemSubHandler : DlgHandlerBase
+ {
+ private XNPCUnionHandler _parentHandler = null;
+
+ private XNPCFavorDocument m_doc;
+
+ private IXUIScrollView m_ScrollView;
+
+ private IXUIWrapContent m_WrapContent;
+
+ private IXUIScrollView m_GroupEffectScrollView;
+
+ private IXUIWrapContent m_GroupEffecWrapContent;
+
+ private IXUIList m_AttrGrid;
+
+ private XUIPool m_AttrPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ private IXUIButton m_NextLevelBtn;
+
+ private IXUIButton m_ActiveBtn;
+
+ private GameObject m_ActiveRedPoint;
+
+ private List<uint> m_NpcIds = new List<uint>();
+
+ private uint SelectedUnionId = 0u;
+
+ private IXUILabel m_ActiveCondition;
+
+ private const int GROUP_NUM = 5;
+
+ public void SetParentHandler(XNPCUnionHandler handler = null)
+ {
+ this._parentHandler = handler;
+ }
+
+ protected override void Init()
+ {
+ base.Init();
+ this.m_doc = XDocuments.GetSpecificDocument<XNPCFavorDocument>(XNPCFavorDocument.uuID);
+ this.m_ScrollView = (base.transform.Find("ScrollView").GetComponent("XUIScrollView") as IXUIScrollView);
+ this.m_WrapContent = (base.transform.Find("ScrollView/Grid").GetComponent("XUIWrapContent") as IXUIWrapContent);
+ this.m_GroupEffectScrollView = (base.transform.Find("GroupEffect/ScrollView").GetComponent("XUIScrollView") as IXUIScrollView);
+ this.m_GroupEffecWrapContent = (base.transform.Find("GroupEffect/ScrollView/Grid").GetComponent("XUIWrapContent") as IXUIWrapContent);
+ this.m_AttrGrid = (base.transform.Find("AttrGrid").GetComponent("XUIList") as IXUIList);
+ Transform transform = base.transform.Find("AttrGrid/Tpl");
+ this.m_AttrPool.SetupPool(this.m_AttrGrid.gameObject, transform.gameObject, 4u, false);
+ this.m_NextLevelBtn = (base.transform.Find("NextLevelBtn").GetComponent("XUIButton") as IXUIButton);
+ this.m_ActiveBtn = (base.transform.Find("ActiveBtn").GetComponent("XUIButton") as IXUIButton);
+ this.m_ActiveRedPoint = base.transform.Find("ActiveBtn/RedPoint").gameObject;
+ this.m_ActiveRedPoint.SetActive(false);
+ this.m_ActiveCondition = (base.transform.Find("Tips").GetComponent("XUILabel") as IXUILabel);
+ }
+
+ protected override void OnShow()
+ {
+ this.RefreshData();
+ }
+
+ public override void RegisterEvent()
+ {
+ this.m_WrapContent.RegisterItemUpdateEventHandler(new WrapItemUpdateEventHandler(this.WrapListUpdate));
+ this.m_GroupEffecWrapContent.RegisterItemUpdateEventHandler(new WrapItemUpdateEventHandler(this.GroupEffectUpdate));
+ this.m_NextLevelBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnClickNextLevelBtn));
+ this.m_ActiveBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnClickActiveBtn));
+ }
+
+ public override void RefreshData()
+ {
+ this.SetUpItems();
+ this.SetUpEffects();
+ this.RefreshAttr();
+ }
+
+ public override void OnUnload()
+ {
+ this._parentHandler = null;
+ this.SelectedUnionId = 0u;
+ }
+
+ private void WrapListUpdate(Transform item, int index)
+ {
+ bool flag = index >= this.m_NpcIds.Count;
+ if (flag)
+ {
+ this.DrawItem(item, 0u, true);
+ }
+ else
+ {
+ uint npcid = this.m_NpcIds[index];
+ this.DrawItem(item, npcid, false);
+ }
+ }
+
+ private void SetUpItems()
+ {
+ this.m_NpcIds.Clear();
+ this.SelectedUnionId = this._parentHandler.SelectedUnionID;
+ bool flag = this.SelectedUnionId > 0u;
+ if (flag)
+ {
+ NpcFeelingUnite activeUniteInfo = this.m_doc.GetActiveUniteInfo(this.SelectedUnionId);
+ NpcUniteAttr.RowData unionTableInfoByUnionId = XNPCFavorDocument.GetUnionTableInfoByUnionId(this.SelectedUnionId, (activeUniteInfo == null) ? 0u : activeUniteInfo.level);
+ bool flag2 = unionTableInfoByUnionId != null;
+ if (flag2)
+ {
+ int i = 0;
+ int num = unionTableInfoByUnionId.npcId.Length;
+ while (i < num)
+ {
+ this.m_NpcIds.Add(unionTableInfoByUnionId.npcId[i]);
+ i++;
+ }
+ }
+ this.m_WrapContent.SetContentCount(this.m_NpcIds.Count, false);
+ this.m_ScrollView.ResetPosition();
+ }
+ }
+
+ private void DrawItem(Transform item, uint npcid, bool isHide = false)
+ {
+ IXUISprite ixuisprite = item.Find("rt/Icon").GetComponent("XUISprite") as IXUISprite;
+ IXUILabel ixuilabel = item.Find("rt/EquipLevel").GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel2 = item.Find("rt/wjh").GetComponent("XUILabel") as IXUILabel;
+ Transform transform = item.Find("rt");
+ if (isHide)
+ {
+ transform.gameObject.SetActive(false);
+ }
+ else
+ {
+ transform.gameObject.SetActive(true);
+ NpcFeelingOneNpc oneNpc = this.m_doc.GetOneNpc(npcid);
+ NpcFeeling.RowData npcTableInfoById = XNPCFavorDocument.GetNpcTableInfoById(npcid);
+ bool flag = npcTableInfoById != null;
+ if (flag)
+ {
+ ixuisprite.SetSprite(npcTableInfoById.relicsIcon);
+ }
+ ixuilabel2.SetText((oneNpc != null) ? string.Empty : XStringDefineProxy.GetString("NPCNotActive2"));
+ ixuilabel.SetText((oneNpc != null) ? string.Format("Lv.{0}", oneNpc.level) : string.Empty);
+ ixuisprite.ID = (ulong)npcid;
+ ixuisprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnClickNpc));
+ }
+ }
+
+ private void SetUpEffects()
+ {
+ bool flag = this.SelectedUnionId > 0u;
+ if (flag)
+ {
+ NpcFeelingUnite activeUniteInfo = this.m_doc.GetActiveUniteInfo(this.SelectedUnionId);
+ uint num = (activeUniteInfo == null) ? 0u : XNPCFavorDocument.GetUnionEffectLev(this.SelectedUnionId, activeUniteInfo.level);
+ uint num2 = num / 5u;
+ this.m_GroupEffecWrapContent.SetContentCount((int)(num2 + 5u), false);
+ this.m_GroupEffectScrollView.ResetPosition();
+ }
+ }
+
+ private void GroupEffectUpdate(Transform item, int index)
+ {
+ bool flag = this.SelectedUnionId > 0u;
+ if (flag)
+ {
+ NpcFeelingUnite activeUniteInfo = this.m_doc.GetActiveUniteInfo(this.SelectedUnionId);
+ uint num = (activeUniteInfo == null) ? 0u : XNPCFavorDocument.GetUnionEffectLev(this.SelectedUnionId, activeUniteInfo.level);
+ uint num2 = num / 5u;
+ uint num3 = num % 5u;
+ uint num4 = 5u - num3;
+ bool flag2 = index < (int)(num2 + 5u);
+ if (flag2)
+ {
+ bool flag3 = (long)index < (long)((ulong)num2);
+ if (flag3)
+ {
+ this.DrawEffect(item, 2);
+ }
+ else
+ {
+ bool flag4 = index < (int)(num2 + num3);
+ if (flag4)
+ {
+ this.DrawEffect(item, 1);
+ }
+ else
+ {
+ bool flag5 = index < (int)(num2 + num3 + num4);
+ if (flag5)
+ {
+ this.DrawEffect(item, 0);
+ }
+ }
+ }
+ }
+ else
+ {
+ this.DrawEffect(item, -1);
+ }
+ }
+ }
+
+ private void DrawEffect(Transform item, int num)
+ {
+ IXUISprite ixuisprite = item.Find("rt/Icon").GetComponent("XUISprite") as IXUISprite;
+ Transform transform = item.Find("rt");
+ switch (num)
+ {
+ case -1:
+ transform.gameObject.SetActive(false);
+ break;
+ case 0:
+ transform.gameObject.SetActive(true);
+ ixuisprite.SetAlpha(0f);
+ break;
+ case 1:
+ transform.gameObject.SetActive(true);
+ ixuisprite.SetAlpha(1f);
+ ixuisprite.SetSprite("Group_0_0");
+ break;
+ case 2:
+ transform.gameObject.SetActive(true);
+ ixuisprite.SetAlpha(1f);
+ ixuisprite.SetSprite("Group_0_1");
+ break;
+ }
+ }
+
+ private void RefreshAttr()
+ {
+ bool flag = this.SelectedUnionId > 0u;
+ if (flag)
+ {
+ this.m_AttrPool.FakeReturnAll();
+ NpcFeelingUnite activeUniteInfo = this.m_doc.GetActiveUniteInfo(this.SelectedUnionId);
+ NpcUniteAttr.RowData unionTableInfoByUnionId = XNPCFavorDocument.GetUnionTableInfoByUnionId(this.SelectedUnionId, (activeUniteInfo == null) ? 0u : activeUniteInfo.level);
+ SeqListRef<uint> attr = unionTableInfoByUnionId.Attr;
+ for (int i = 0; i < attr.Count; i++)
+ {
+ GameObject gameObject = this.m_AttrPool.FetchGameObject(false);
+ gameObject.transform.parent = this.m_AttrGrid.gameObject.transform;
+ gameObject.transform.localScale = Vector3.one;
+ uint attrValue = (activeUniteInfo == null) ? 0u : attr[i, 1];
+ this.DrawAttr(gameObject.transform, attr[i, 0], attrValue);
+ }
+ this.m_AttrPool.ActualReturnAll(false);
+ this.m_AttrGrid.Refresh();
+ NpcUniteAttr.RowData nextUnionDataByUnionId = XNPCFavorDocument.GetNextUnionDataByUnionId(this.SelectedUnionId, (activeUniteInfo == null) ? 0u : activeUniteInfo.level);
+ bool flag2 = nextUnionDataByUnionId != null;
+ if (flag2)
+ {
+ this.m_ActiveCondition.SetText(string.Format(XStringDefineProxy.GetString("NPCUnionActiveCondition"), nextUnionDataByUnionId.level));
+ }
+ this.m_ActiveRedPoint.SetActive(this.m_doc.IsUnionCanActiveNextLevel(this.SelectedUnionId));
+ }
+ }
+
+ private void DrawAttr(Transform item, uint attrId, uint attrValue)
+ {
+ IXUILabel ixuilabel = item.Find("Name").GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel2 = item.Find("Value").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel.SetText(XAttributeCommon.GetAttrStr((int)attrId));
+ ixuilabel2.SetText(XAttributeCommon.GetAttrValueStr(attrId, attrValue, true));
+ }
+
+ private void OnClickNpc(IXUISprite sp)
+ {
+ uint npcId = (uint)sp.ID;
+ bool flag = this.m_doc.View.IsVisible();
+ if (flag)
+ {
+ this.m_doc.View.SkipToNpc(npcId);
+ }
+ }
+
+ private bool OnClickNextLevelBtn(IXUIButton btn)
+ {
+ bool flag = this.SelectedUnionId > 0u;
+ if (flag)
+ {
+ NpcFeelingUnite activeUniteInfo = this.m_doc.GetActiveUniteInfo(this.SelectedUnionId);
+ NpcUniteAttr.RowData nextUnionDataByUnionId = XNPCFavorDocument.GetNextUnionDataByUnionId(this.SelectedUnionId, (activeUniteInfo == null) ? 0u : activeUniteInfo.level);
+ bool flag2 = nextUnionDataByUnionId != null;
+ if (flag2)
+ {
+ string @string = XStringDefineProxy.GetString("NPCNextAddition");
+ SeqListRef<uint> attr = nextUnionDataByUnionId.Attr;
+ StringBuilder sb = XNPCFavorDocument.sb;
+ sb.Length = 0;
+ for (int i = 0; i < attr.Count; i++)
+ {
+ uint attrid = attr[i, 0];
+ uint attrValue = attr[i, 1];
+ bool flag3 = i != 0;
+ if (flag3)
+ {
+ sb.Append("\n");
+ }
+ sb.Append(string.Format("{0}{1}", XAttributeCommon.GetAttrStr((int)attrid), XAttributeCommon.GetAttrValueStr(attrid, attrValue, true)));
+ }
+ string label = sb.ToString();
+ XSingleton<UiUtility>.singleton.ShowModalDialogWithTitle(@string, label, XStringDefineProxy.GetString(XStringDefine.COMMON_OK), null, 50);
+ }
+ }
+ return true;
+ }
+
+ private bool OnClickActiveBtn(IXUIButton btn)
+ {
+ bool flag = this.SelectedUnionId > 0u;
+ if (flag)
+ {
+ bool flag2 = this.m_doc.IsUnionCanActiveNextLevel(this.SelectedUnionId);
+ if (flag2)
+ {
+ NpcFeelingUnite activeUniteInfo = this.m_doc.GetActiveUniteInfo(this.SelectedUnionId);
+ NpcUniteAttr.RowData nextUnionDataByUnionId = XNPCFavorDocument.GetNextUnionDataByUnionId(this.SelectedUnionId, (activeUniteInfo == null) ? 0u : activeUniteInfo.level);
+ bool flag3 = nextUnionDataByUnionId != null;
+ if (flag3)
+ {
+ this.m_doc.ReqSrvActiveUnionLevel(this.SelectedUnionId, nextUnionDataByUnionId.level);
+ }
+ }
+ else
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString("NPCUnionNotReachActive"), "fece00");
+ }
+ }
+ return true;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/XNPCUnionMemSubHandler.cs.meta b/Client/Assets/Scripts/XMainClient/UI/XNPCUnionMemSubHandler.cs.meta
new file mode 100644
index 00000000..06cd06b8
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XNPCUnionMemSubHandler.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 0a96c1970a69d784da3a8631f5447c24
+timeCreated: 1611403164
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/XNpcAttrHandler.cs b/Client/Assets/Scripts/XMainClient/UI/XNpcAttrHandler.cs
new file mode 100644
index 00000000..c284ee6b
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XNpcAttrHandler.cs
@@ -0,0 +1,99 @@
+using System;
+using System.Collections.Generic;
+using UILib;
+using UnityEngine;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class XNpcAttrHandler : DlgHandlerBase
+ {
+ protected override string FileName
+ {
+ get
+ {
+ return "GameSystem/NPCBlessing/NpcAttrHandler";
+ }
+ }
+
+ private XNPCFavorDocument m_doc;
+
+ private IXUIList m_BasicUIList;
+
+ private XUIPool m_BasicAttrPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ private IXUIList m_OtherUIList;
+
+ private XUIPool m_OtherAttrPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ protected override void Init()
+ {
+ base.Init();
+ this.m_doc = XDocuments.GetSpecificDocument<XNPCFavorDocument>(XNPCFavorDocument.uuID);
+ this.m_BasicUIList = (base.transform.Find("AttrGrid").GetComponent("XUIList") as IXUIList);
+ Transform transform = this.m_BasicUIList.gameObject.transform.Find("Tpl");
+ this.m_BasicAttrPool.SetupPool(this.m_BasicUIList.gameObject, transform.gameObject, 10u, false);
+ transform.gameObject.SetActive(false);
+ this.m_OtherUIList = (base.transform.Find("NoBasicAttrGrid").GetComponent("XUIList") as IXUIList);
+ Transform transform2 = this.m_OtherUIList.gameObject.transform.Find("Tpl");
+ this.m_OtherAttrPool.SetupPool(this.m_OtherUIList.gameObject, transform2.gameObject, 5u, false);
+ transform2.gameObject.SetActive(false);
+ }
+
+ protected override void OnShow()
+ {
+ this.RefreshData();
+ }
+
+ public override void RefreshData()
+ {
+ this.RefreshAttr();
+ }
+
+ private void RefreshAttr()
+ {
+ this.m_BasicAttrPool.FakeReturnAll();
+ this.m_OtherAttrPool.FakeReturnAll();
+ Dictionary<uint, uint> dictSumAttr = this.m_doc.DictSumAttr;
+ foreach (KeyValuePair<uint, uint> keyValuePair in dictSumAttr)
+ {
+ uint key = keyValuePair.Key;
+ //Dictionary<uint, uint>.Enumerator enumerator;
+ //keyValuePair = enumerator.Current;
+ uint value = keyValuePair.Value;
+ bool flag = XAttributeCommon.IsBasicRange((int)key);
+ GameObject gameObject;
+ if (flag)
+ {
+ gameObject = this.m_BasicAttrPool.FetchGameObject(false);
+ gameObject.transform.parent = this.m_BasicUIList.gameObject.transform;
+ }
+ else
+ {
+ gameObject = this.m_OtherAttrPool.FetchGameObject(false);
+ gameObject.transform.parent = this.m_OtherUIList.gameObject.transform;
+ }
+ gameObject.transform.localScale = Vector3.one;
+ this.DrawAttr(gameObject.transform, key, value);
+ }
+ this.m_BasicAttrPool.ActualReturnAll(false);
+ this.m_OtherAttrPool.ActualReturnAll(false);
+ this.m_BasicUIList.Refresh();
+ this.m_OtherUIList.Refresh();
+ }
+
+ public override void OnUnload()
+ {
+ this.m_doc = null;
+ base.OnUnload();
+ }
+
+ private void DrawAttr(Transform item, uint attrId, uint attrValue)
+ {
+ IXUILabel ixuilabel = item.Find("Name").GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel2 = item.Find("Value").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel.SetText(XAttributeCommon.GetAttrStr((int)attrId));
+ ixuilabel2.SetText(XAttributeCommon.GetAttrValueStr(attrId, attrValue, true));
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/XNpcAttrHandler.cs.meta b/Client/Assets/Scripts/XMainClient/UI/XNpcAttrHandler.cs.meta
new file mode 100644
index 00000000..6c320c7f
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XNpcAttrHandler.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: c2b3ce1300e04a54daf75e3cda743a56
+timeCreated: 1611404495
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/XPartnerDramaOperate.cs b/Client/Assets/Scripts/XMainClient/UI/XPartnerDramaOperate.cs
new file mode 100644
index 00000000..5ab08f84
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XPartnerDramaOperate.cs
@@ -0,0 +1,78 @@
+using System;
+using KKSG;
+using UILib;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class XPartnerDramaOperate : XDramaOperate
+ {
+ public override void ShowNpc(XNpc npc)
+ {
+ base.ShowNpc(npc);
+ XDramaOperateParam data = XDataPool<XDramaOperateParam>.GetData();
+ data.Text = base._GetRandomNpcText(npc);
+ data.Npc = npc;
+ data.AppendButton(XSingleton<XStringTable>.singleton.GetString("PartnerNpcOk"), new ButtonClickEventHandler(this._OnOKClicked), 0UL);
+ data.AppendButton(XSingleton<XStringTable>.singleton.GetString("PartnerNpcCancel"), null, 0UL);
+ base._FireEvent(data);
+ }
+
+ private bool _OnOKClicked(IXUIButton btn)
+ {
+ DlgBase<DramaDlg, DramaDlgBehaviour>.singleton.SetVisible(false, true);
+ XPartnerDocument doc = XPartnerDocument.Doc;
+ bool flag = doc.PartnerID > 0UL;
+ bool result;
+ if (flag)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XSingleton<XStringTable>.singleton.GetString("HadGetedPartner"), "fece00");
+ result = true;
+ }
+ else
+ {
+ XTeamDocument specificDocument = XDocuments.GetSpecificDocument<XTeamDocument>(XTeamDocument.uuID);
+ bool flag2 = specificDocument.currentDungeonType != TeamLevelType.TeamLevelPartner;
+ if (flag2)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XSingleton<XStringTable>.singleton.GetString("NeedPartnerTeam"), "fece00");
+ result = true;
+ }
+ else
+ {
+ bool flag3 = !specificDocument.bInTeam;
+ if (flag3)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XSingleton<XStringTable>.singleton.GetString("TEAM_NOT_HAVE_TEAM"), "fece00");
+ result = true;
+ }
+ else
+ {
+ bool flag4 = specificDocument.MyTeam.members.Count != XSingleton<XGlobalConfig>.singleton.GetInt("PartnerNum");
+ if (flag4)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XSingleton<XStringTable>.singleton.GetString("PartnerTeamNumNotEnough"), "fece00");
+ result = true;
+ }
+ else
+ {
+ bool flag5 = !specificDocument.bIsLeader;
+ if (flag5)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XSingleton<XStringTable>.singleton.GetString("NotPartnerTeamLeader"), "fece00");
+ result = true;
+ }
+ else
+ {
+ specificDocument.ReqTeamOp(TeamOperate.TEAM_START_BATTLE, 0UL, null, TeamMemberType.TMT_NORMAL, null);
+ result = true;
+ }
+ }
+ }
+ }
+ }
+ return result;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/XPartnerDramaOperate.cs.meta b/Client/Assets/Scripts/XMainClient/UI/XPartnerDramaOperate.cs.meta
new file mode 100644
index 00000000..c0720e8d
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XPartnerDramaOperate.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 5ae003921a33b1742a1446fb55cb71d4
+timeCreated: 1611403793
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/XPetMainBehaviour.cs b/Client/Assets/Scripts/XMainClient/UI/XPetMainBehaviour.cs
new file mode 100644
index 00000000..6bfed796
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XPetMainBehaviour.cs
@@ -0,0 +1,178 @@
+using System;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class XPetMainBehaviour : DlgBehaviourBase
+ {
+ public Transform m_Bg;
+
+ public IXUIButton m_Close = null;
+
+ public IXUIButton m_Help;
+
+ public IXUIScrollView m_PetListScrollView;
+
+ public IXUIWrapContent m_WrapContent;
+
+ public IXUIProgress m_ExpBar;
+
+ public IXUILabel m_Exp;
+
+ public IXUILabel m_ExpBarLevel;
+
+ public GameObject m_FeedFrame;
+
+ public GameObject m_SkillFrame;
+
+ public IXUIButton m_BtnMount;
+
+ public IXUIButton m_BtnSkillLearn;
+
+ public GameObject m_ContentFrame;
+
+ public Transform m_Fx;
+
+ public IXUILabel m_MoodLevel;
+
+ public IXUISprite m_MoodIcon;
+
+ public IXUIProgress m_FullDegreeBar;
+
+ public IXUILabel m_FullDegree;
+
+ public IXUISprite m_FullDegreeColor;
+
+ public IXUISprite m_FullDegreeSp;
+
+ public Transform m_FullDegreeTip;
+
+ public Transform m_MoodTip;
+
+ public IXUISprite m_FullDegreeClose;
+
+ public IXUISprite m_MoodClose;
+
+ public IXUIButton m_Throw;
+
+ public IXUIButton m_Activation;
+
+ public IXUIButton m_ExpTransfer;
+
+ public IXUIButton m_TravelSet;
+
+ public GameObject m_ActivationSelected;
+
+ public IXUILabel m_ActivationLabel;
+
+ public IXUISprite m_Sex;
+
+ public IXUILabel m_Name;
+
+ public IXUILabel m_Level;
+
+ public IXUILabel m_SpeedUp;
+
+ public IXUILabel m_PPT;
+
+ public IXUILabel m_BtnMountLabel;
+
+ public IXUILabel m_FullDegreeLabel;
+
+ public IXUILabel m_MoodLabel;
+
+ public Transform m_FeedRedPoint;
+
+ public IXUILabel m_ExpPrivilegeLabel;
+
+ public IXUISprite m_ExpPrivilegeSp;
+
+ public IXUISprite m_PrivilegeBg;
+
+ public IXUISprite m_Caress;
+
+ public Transform m_Talk;
+
+ public IXUILabel m_TalkLabel;
+
+ public IXUILabel m_GoGetPet;
+
+ public IXUILabel m_GoGetFeed;
+
+ public XUIPool m_StarPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ public XUIPool m_AttributePool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ public IUIDummy m_PetSnapshot;
+
+ private void Awake()
+ {
+ this.m_Bg = base.transform.Find("Bg");
+ this.m_Close = (base.transform.Find("Bg/Close").GetComponent("XUIButton") as IXUIButton);
+ this.m_Help = (base.transform.Find("Bg/Help").GetComponent("XUIButton") as IXUIButton);
+ this.m_Fx = base.transform.Find("Bg/Fx");
+ this.m_WrapContent = (base.transform.Find("Bg/PetListPanel/WrapContent").GetComponent("XUIWrapContent") as IXUIWrapContent);
+ this.m_PetListScrollView = (base.transform.Find("Bg/PetListPanel").GetComponent("XUIScrollView") as IXUIScrollView);
+ Transform transform = base.transform.Find("Bg/ContentFrame");
+ this.m_ContentFrame = transform.gameObject;
+ this.m_ExpPrivilegeSp = (this.m_ContentFrame.transform.Find("Privilege").GetComponent("XUISprite") as IXUISprite);
+ this.m_PrivilegeBg = (this.m_ContentFrame.transform.Find("Privilege/T/p").GetComponent("XUISprite") as IXUISprite);
+ this.m_ExpPrivilegeLabel = (this.m_ContentFrame.transform.Find("Privilege/T").GetComponent("XUILabel") as IXUILabel);
+ this.m_Caress = (this.m_ContentFrame.transform.Find("Caress").GetComponent("XUISprite") as IXUISprite);
+ this.m_Talk = this.m_ContentFrame.transform.Find("Talk");
+ this.m_TalkLabel = (this.m_ContentFrame.transform.Find("Talk/Label").GetComponent("XUILabel") as IXUILabel);
+ this.m_ExpBar = (transform.Find("ExpBar").GetComponent("XUIProgress") as IXUIProgress);
+ this.m_Exp = (this.m_ExpBar.gameObject.transform.Find("Value").GetComponent("XUILabel") as IXUILabel);
+ this.m_ExpBarLevel = (this.m_ExpBar.gameObject.transform.Find("Level").GetComponent("XUILabel") as IXUILabel);
+ this.m_FeedFrame = transform.Find("FeedFrame").gameObject;
+ this.m_GoGetFeed = (this.m_FeedFrame.transform.Find("ItemPanel/NoFeed/GoGetFeed").GetComponent("XUILabel") as IXUILabel);
+ this.m_FeedRedPoint = this.m_FeedFrame.transform.Find("BtnFeed/RedPoint");
+ transform = base.transform.Find("Bg/ContentFrame/Right");
+ this.m_BtnMount = (transform.Find("BtnMount").GetComponent("XUIButton") as IXUIButton);
+ this.m_BtnMountLabel = (transform.Find("BtnMount/Label").GetComponent("XUILabel") as IXUILabel);
+ this.m_BtnSkillLearn = (transform.Find("BtnSkillLearn").GetComponent("XUIButton") as IXUIButton);
+ this.m_Sex = (transform.Find("DetailTip/Sex").GetComponent("XUISprite") as IXUISprite);
+ this.m_Name = (transform.Find("DetailTip/Name").GetComponent("XUILabel") as IXUILabel);
+ this.m_Level = (transform.Find("DetailTip/Level").GetComponent("XUILabel") as IXUILabel);
+ this.m_SpeedUp = (transform.Find("DetailTip/SpeedUp").GetComponent("XUILabel") as IXUILabel);
+ this.m_PPT = (transform.Find("DetailTip/PPT").GetComponent("XUILabel") as IXUILabel);
+ this.m_SkillFrame = transform.Find("DetailTip/Skill").gameObject;
+ Transform transform2 = transform.Find("DetailTip/Attribute/AttributeTpl");
+ Transform transform3 = transform.transform.Find("DetailTip/Attribute/AttributeTpl/Star/StarTpl");
+ this.m_StarPool.SetupPool(null, transform3.gameObject, XPetMainView.STAR_MAX, false);
+ int num = 0;
+ while ((long)num < (long)((ulong)XPetMainView.STAR_MAX))
+ {
+ GameObject gameObject = this.m_StarPool.FetchGameObject(false);
+ gameObject.name = string.Format("Star{0}", num);
+ num++;
+ }
+ this.m_AttributePool.SetupPool(null, transform2.gameObject, XPetMainView.ATTRIBUTE_NUM_MAX, false);
+ transform = base.transform.Find("Bg/ContentFrame/LeftUp");
+ this.m_Throw = (transform.Find("Throw").GetComponent("XUIButton") as IXUIButton);
+ this.m_Activation = (transform.Find("Activation").GetComponent("XUIButton") as IXUIButton);
+ this.m_ActivationSelected = transform.Find("Activation/Selected").gameObject;
+ this.m_ActivationLabel = (transform.Find("Activation/Label").GetComponent("XUILabel") as IXUILabel);
+ this.m_ExpTransfer = (transform.Find("ExpTransfer").GetComponent("XUIButton") as IXUIButton);
+ this.m_TravelSet = (transform.Find("TravelSet").GetComponent("XUIButton") as IXUIButton);
+ transform = base.transform.Find("Bg/ContentFrame/RightUp");
+ this.m_FullDegreeBar = (transform.Find("FullDegreeBar").GetComponent("XUIProgress") as IXUIProgress);
+ this.m_FullDegreeSp = (this.m_FullDegreeBar.gameObject.transform.Find("Eat").GetComponent("XUISprite") as IXUISprite);
+ this.m_FullDegree = (this.m_FullDegreeBar.gameObject.transform.Find("Value").GetComponent("XUILabel") as IXUILabel);
+ this.m_FullDegreeColor = (this.m_FullDegreeBar.gameObject.transform.Find("Overlay").GetComponent("XUISprite") as IXUISprite);
+ this.m_FullDegreeLabel = (this.m_FullDegreeBar.gameObject.transform.Find("Tip/Label").GetComponent("XUILabel") as IXUILabel);
+ this.m_FullDegreeClose = (this.m_FullDegreeBar.gameObject.transform.Find("Tip/Close").GetComponent("XUISprite") as IXUISprite);
+ this.m_FullDegreeTip = this.m_FullDegreeBar.gameObject.transform.Find("Tip");
+ this.m_MoodIcon = (transform.Find("Mood").GetComponent("XUISprite") as IXUISprite);
+ this.m_MoodLevel = (transform.Find("Mood/Level").GetComponent("XUILabel") as IXUILabel);
+ this.m_MoodLabel = (transform.Find("Mood/Tip/Label").GetComponent("XUILabel") as IXUILabel);
+ this.m_MoodClose = (transform.Find("Mood/Tip/Close").GetComponent("XUISprite") as IXUISprite);
+ this.m_MoodTip = transform.Find("Mood/Tip");
+ this.m_PetSnapshot = (this.m_ContentFrame.transform.Find("Snapshot").GetComponent("UIDummy") as IUIDummy);
+ this.m_GoGetPet = (base.transform.Find("Bg/GoGetPet").GetComponent("XUILabel") as IXUILabel);
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/XPetMainBehaviour.cs.meta b/Client/Assets/Scripts/XMainClient/UI/XPetMainBehaviour.cs.meta
new file mode 100644
index 00000000..1c8ef4d4
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XPetMainBehaviour.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 7cb6d9768613681429fba6e4780e2687
+timeCreated: 1611403998
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/XPetMainView.cs b/Client/Assets/Scripts/XMainClient/UI/XPetMainView.cs
new file mode 100644
index 00000000..a6c85dcf
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XPetMainView.cs
@@ -0,0 +1,923 @@
+using System;
+using System.Collections.Generic;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class XPetMainView : DlgBase<XPetMainView, XPetMainBehaviour>
+ {
+ public XFoodSelectorHandler FoodSelectorHandler
+ {
+ get
+ {
+ return this.m_FoodSelectorHandler;
+ }
+ }
+
+ public XPetSkillHandler SkillHandler
+ {
+ get
+ {
+ return this.m_SkillHandler;
+ }
+ }
+
+ public override string fileName
+ {
+ get
+ {
+ return "GameSystem/PetMainDlg";
+ }
+ }
+
+ public override int layer
+ {
+ get
+ {
+ return 1;
+ }
+ }
+
+ public override int group
+ {
+ get
+ {
+ return 1;
+ }
+ }
+
+ public override bool autoload
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override bool hideMainMenu
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override bool fullscreenui
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override bool pushstack
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ private XPetDocument doc;
+
+ private XFoodSelectorHandler m_FoodSelectorHandler;
+
+ private PairsPetSetHandler m_setHandler;
+
+ public XDummy m_Dummy;
+
+ private XPetSkillHandler m_SkillHandler;
+
+ public PetExpTransferHandler ExpTransferHandler;
+
+ public PetSkillLearnHandler SkillLearnHandler;
+
+ public static readonly uint STAR_MAX = 10u;
+
+ public static readonly uint ATTRIBUTE_NUM_MAX = 10u;
+
+ private uint _RefreshDataTimerID = 0u;
+
+ private uint _PlayActionTimerID = 0u;
+
+ private uint _PlayBubbleTimerID = 0u;
+
+ private XPetMainView.PetStatus _PetStatus;
+
+ public XFx _LevelUpFx;
+
+ private XFx _MoodUpFx;
+
+ private XFx _EatUpFx;
+
+ private XFx _GetFx;
+
+ private enum PetStatus
+ {
+ IDLE,
+ IDLE_PEOPLE,
+ Rand,
+ EAT,
+ CARESS
+ }
+
+ protected override void Init()
+ {
+ this.doc = XDocuments.GetSpecificDocument<XPetDocument>(XPetDocument.uuID);
+ this.doc.View = this;
+ DlgHandlerBase.EnsureCreate<XFoodSelectorHandler>(ref this.m_FoodSelectorHandler, base.uiBehaviour.m_FeedFrame, null, true);
+ DlgHandlerBase.EnsureCreate<XPetSkillHandler>(ref this.m_SkillHandler, base.uiBehaviour.m_SkillFrame, null, true);
+ DlgHandlerBase.EnsureCreate<PetExpTransferHandler>(ref this.ExpTransferHandler, base.uiBehaviour.m_Bg, false, this);
+ DlgHandlerBase.EnsureCreate<PetSkillLearnHandler>(ref this.SkillLearnHandler, base.uiBehaviour.m_Bg, false, null);
+ DlgHandlerBase.EnsureCreate<PairsPetSetHandler>(ref this.m_setHandler, base.uiBehaviour.m_Bg, false, null);
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ base.Alloc3DAvatarPool("XPetMainView");
+ this.InitShow();
+ this.m_FoodSelectorHandler.ShowBag(false);
+ this.doc.Select(this.doc.DefaultPet, true);
+ }
+
+ public override void StackRefresh()
+ {
+ base.StackRefresh();
+ base.Alloc3DAvatarPool("XPetMainView");
+ this.RefreshPetModel();
+ this.m_FoodSelectorHandler.ShowBag(false);
+ }
+
+ private void InitShow()
+ {
+ this.doc.ClearPetAnimation();
+ XSingleton<XTimerMgr>.singleton.KillTimer(this._RefreshDataTimerID);
+ XSingleton<XTimerMgr>.singleton.KillTimer(this._PlayActionTimerID);
+ XSingleton<XTimerMgr>.singleton.KillTimer(this._PlayBubbleTimerID);
+ }
+
+ public void UnloadFx(XFx fx)
+ {
+ bool flag = fx != null;
+ if (flag)
+ {
+ XSingleton<XFxMgr>.singleton.DestroyFx(fx, true);
+ fx = null;
+ }
+ }
+
+ private void UnloadShow()
+ {
+ this.doc.ClearPetAnimation();
+ XSingleton<XTimerMgr>.singleton.KillTimer(this._RefreshDataTimerID);
+ XSingleton<XTimerMgr>.singleton.KillTimer(this._PlayActionTimerID);
+ XSingleton<XTimerMgr>.singleton.KillTimer(this._PlayBubbleTimerID);
+ this._RefreshDataTimerID = 0u;
+ this._PlayActionTimerID = 0u;
+ this._PlayBubbleTimerID = 0u;
+ this.UnloadFx(this._LevelUpFx);
+ this.UnloadFx(this._MoodUpFx);
+ this.UnloadFx(this._EatUpFx);
+ this.UnloadFx(this._GetFx);
+ bool flag = base.uiBehaviour.m_PetSnapshot != null;
+ if (flag)
+ {
+ base.uiBehaviour.m_PetSnapshot.RefreshRenderQueue = null;
+ }
+ base.Return3DAvatarPool();
+ }
+
+ protected override void OnHide()
+ {
+ this.UnloadShow();
+ this.doc.HasNewPet = false;
+ base.OnHide();
+ }
+
+ protected override void OnUnload()
+ {
+ this.UnloadShow();
+ this.doc.View = null;
+ this.doc = null;
+ DlgHandlerBase.EnsureUnload<PetSkillLearnHandler>(ref this.SkillLearnHandler);
+ DlgHandlerBase.EnsureUnload<PetExpTransferHandler>(ref this.ExpTransferHandler);
+ DlgHandlerBase.EnsureUnload<XFoodSelectorHandler>(ref this.m_FoodSelectorHandler);
+ DlgHandlerBase.EnsureUnload<XPetSkillHandler>(ref this.m_SkillHandler);
+ DlgHandlerBase.EnsureUnload<PairsPetSetHandler>(ref this.m_setHandler);
+ base.OnUnload();
+ }
+
+ public override void RegisterEvent()
+ {
+ base.uiBehaviour.m_Help.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnHelpClicked));
+ base.uiBehaviour.m_Close.RegisterClickEventHandler(new ButtonClickEventHandler(this._OnCloseBtnClick));
+ base.uiBehaviour.m_WrapContent.RegisterItemUpdateEventHandler(new WrapItemUpdateEventHandler(this._OnPetListItemUpdated));
+ base.uiBehaviour.m_BtnMount.RegisterClickEventHandler(new ButtonClickEventHandler(this._OnMountClicked));
+ base.uiBehaviour.m_BtnSkillLearn.RegisterClickEventHandler(new ButtonClickEventHandler(this._OnSkillLearnClicked));
+ base.uiBehaviour.m_Activation.RegisterClickEventHandler(new ButtonClickEventHandler(this._OnActivationClicked));
+ base.uiBehaviour.m_Throw.RegisterClickEventHandler(new ButtonClickEventHandler(this._OnThrowClicked));
+ base.uiBehaviour.m_ExpTransfer.RegisterClickEventHandler(new ButtonClickEventHandler(this._OnExpTransferClicked));
+ base.uiBehaviour.m_TravelSet.RegisterClickEventHandler(new ButtonClickEventHandler(this._OnTravelSetClicked));
+ base.uiBehaviour.m_MoodClose.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this._OnMoodCloseClick));
+ base.uiBehaviour.m_FullDegreeClose.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this._OnFullDegreeCloseClick));
+ base.uiBehaviour.m_FullDegreeSp.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this._OnShowFullDegreeTip));
+ base.uiBehaviour.m_MoodIcon.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this._OnShowMoodTip));
+ base.uiBehaviour.m_Caress.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this._OnCaressClick));
+ base.uiBehaviour.m_GoGetPet.ID = ulong.Parse(XSingleton<XGlobalConfig>.singleton.GetValue("PetGoBuyPet"));
+ base.uiBehaviour.m_GoGetPet.RegisterLabelClickEventHandler(new LabelClickEventHandler(this._OnGoClick));
+ base.uiBehaviour.m_GoGetFeed.ID = ulong.Parse(XSingleton<XGlobalConfig>.singleton.GetValue("PetGoBuyFeed"));
+ base.uiBehaviour.m_GoGetFeed.RegisterLabelClickEventHandler(new LabelClickEventHandler(this._OnGoClick));
+ base.uiBehaviour.m_PrivilegeBg.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnMemberPrivilegeClicked));
+ }
+
+ private void OnMemberPrivilegeClicked(IXUISprite btn)
+ {
+ DlgBase<XWelfareView, XWelfareBehaviour>.singleton.CheckActiveMemberPrivilege(MemberPrivilege.KingdomPrivilege_Adventurer);
+ }
+
+ public bool OnHelpClicked(IXUIButton button)
+ {
+ DlgBase<XCommonHelpTipView, XCommonHelpTipBehaviour>.singleton.ShowHelp(XSysDefine.XSys_Horse);
+ return true;
+ }
+
+ private void _OnGoClick(IXUILabel go)
+ {
+ XSingleton<XGameSysMgr>.singleton.OpenSystem((XSysDefine)go.ID, 0UL);
+ }
+
+ private bool _OnCloseBtnClick(IXUIButton go)
+ {
+ this.SetVisibleWithAnimation(false, null);
+ return true;
+ }
+
+ private void _OnShowFullDegreeTip(IXUISprite iSp)
+ {
+ bool activeSelf = base.uiBehaviour.m_FullDegreeTip.gameObject.activeSelf;
+ if (activeSelf)
+ {
+ base.uiBehaviour.m_FullDegreeTip.gameObject.SetActive(false);
+ }
+ else
+ {
+ base.uiBehaviour.m_FullDegreeTip.gameObject.SetActive(true);
+ base.uiBehaviour.m_MoodTip.gameObject.SetActive(false);
+ base.uiBehaviour.m_FullDegreeLabel.SetText(XSingleton<UiUtility>.singleton.ReplaceReturn(XSingleton<XStringTable>.singleton.GetString("PET_FULL_DEGREE_TIP")));
+ }
+ }
+
+ private void _OnShowMoodTip(IXUISprite iSp)
+ {
+ bool activeSelf = base.uiBehaviour.m_MoodTip.gameObject.activeSelf;
+ if (activeSelf)
+ {
+ base.uiBehaviour.m_MoodTip.gameObject.SetActive(false);
+ }
+ else
+ {
+ base.uiBehaviour.m_MoodTip.gameObject.SetActive(true);
+ base.uiBehaviour.m_FullDegreeTip.gameObject.SetActive(false);
+ PetMoodTipsTable.RowData petMoodTip = this.doc.GetPetMoodTip(this.doc.CurSelectedPet.Mood);
+ base.uiBehaviour.m_MoodLabel.SetText(petMoodTip.tips);
+ XSingleton<XDebug>.singleton.AddLog("Mood:" + this.doc.CurSelectedPet.Mood, null, null, null, null, null, XDebugColor.XDebug_None);
+ }
+ }
+
+ private void _OnMoodCloseClick(IXUISprite iSp)
+ {
+ base.uiBehaviour.m_MoodTip.gameObject.SetActive(false);
+ }
+
+ private void _OnFullDegreeCloseClick(IXUISprite iSp)
+ {
+ base.uiBehaviour.m_FullDegreeTip.gameObject.SetActive(false);
+ }
+
+ private void _OnCaressClick(IXUISprite iSp)
+ {
+ this.doc.ReqPetTouch();
+ }
+
+ public void RefreshPage(bool bResetPosition = true)
+ {
+ this.RefreshList(bResetPosition);
+ this.RefreshContent();
+ }
+
+ public void RefreshContent()
+ {
+ XPet curSelectedPet = this.doc.CurSelectedPet;
+ bool flag = curSelectedPet == null;
+ if (flag)
+ {
+ base.uiBehaviour.m_ContentFrame.SetActive(false);
+ }
+ else
+ {
+ base.uiBehaviour.m_ContentFrame.SetActive(true);
+ this.RefreshBaseInfo();
+ this.RefreshAttribute();
+ this.RefreshExp();
+ this.RefreshFullDegree();
+ this.RefreshMood();
+ this.RefreshPrivilege();
+ base.uiBehaviour.m_FeedRedPoint.gameObject.SetActive(this.doc.HasRedPoint && curSelectedPet.UID == this.doc.CurFightUID);
+ }
+ this.m_SkillHandler.Refresh(curSelectedPet);
+ }
+
+ public void RefreshPrivilege()
+ {
+ base.uiBehaviour.m_ExpPrivilegeSp.gameObject.SetActive(false);
+ }
+
+ public void RefreshPetModel()
+ {
+ bool flag = this.doc.CurSelectedPet == null;
+ if (!flag)
+ {
+ XSingleton<XTimerMgr>.singleton.KillTimer(this._PlayActionTimerID);
+ this.m_Dummy = XSingleton<X3DAvatarMgr>.singleton.CreateCommonEntityDummy(this.m_dummPool, XPetDocument.GetPresentID(this.doc.CurSelectedPet.ID), this.m_uiBehaviour.m_PetSnapshot, this.m_Dummy, 1f);
+ this.PetActionChange(XPetActionFile.IDLE, this.doc.CurSelectedPet.ID, this.m_Dummy, true);
+ }
+ }
+
+ public void PlayPetLevelUpFx(Transform t, bool follow = false)
+ {
+ bool flag = !DlgBase<XPetMainView, XPetMainBehaviour>.singleton.IsVisible();
+ if (!flag)
+ {
+ Vector3 scale;
+ scale= new Vector3(t.localScale.x / 300f, t.localScale.y / 300f, t.localScale.z / 300f);
+ bool flag2 = this._LevelUpFx != null;
+ if (flag2)
+ {
+ XSingleton<XFxMgr>.singleton.DestroyFx(this._LevelUpFx, true);
+ }
+ this._LevelUpFx = XSingleton<XFxMgr>.singleton.CreateAndPlay("Effects/FX_Particle/Roles/Lzg_Ty/P_level_up_02", t, Vector3.zero, scale, 1f, follow, 5f, true);
+ }
+ }
+
+ public void PlayPetMoodUpFx()
+ {
+ bool flag = !DlgBase<XPetMainView, XPetMainBehaviour>.singleton.IsVisible();
+ if (!flag)
+ {
+ bool flag2 = this._MoodUpFx != null;
+ if (flag2)
+ {
+ XSingleton<XFxMgr>.singleton.DestroyFx(this._MoodUpFx, true);
+ }
+ this._MoodUpFx = XSingleton<XFxMgr>.singleton.CreateAndPlay("Effects/FX_Particle/VehicleFX/Vehicle_weiyang", base.uiBehaviour.m_Fx, Vector3.zero, Vector3.one, 1f, false, 5f, true);
+ }
+ }
+
+ public void PlayPetEatUpFx()
+ {
+ bool flag = !DlgBase<XPetMainView, XPetMainBehaviour>.singleton.IsVisible();
+ if (!flag)
+ {
+ bool flag2 = this._EatUpFx != null;
+ if (flag2)
+ {
+ XSingleton<XFxMgr>.singleton.DestroyFx(this._EatUpFx, true);
+ }
+ this._EatUpFx = XSingleton<XFxMgr>.singleton.CreateAndPlay("Effects/FX_Particle/VehicleFX/Vehicle_weiyang_Clip01", base.uiBehaviour.m_Fx, Vector3.zero, Vector3.one, 1f, false, 5f, true);
+ }
+ }
+
+ public void PlayPetGetFx()
+ {
+ bool flag = !DlgBase<XPetMainView, XPetMainBehaviour>.singleton.IsVisible();
+ if (!flag)
+ {
+ bool flag2 = this._GetFx != null;
+ if (flag2)
+ {
+ XSingleton<XFxMgr>.singleton.DestroyFx(this._GetFx, true);
+ }
+ this._GetFx = XSingleton<XFxMgr>.singleton.CreateAndPlay("Effects/FX_Particle/UIfx/UI_yh", base.uiBehaviour.m_Fx, Vector3.zero, Vector3.one, 1f, true, 5f, true);
+ XSingleton<XAudioMgr>.singleton.PlayUISound("Audio/UI/UI_Gethorse", true, AudioChannel.Action);
+ }
+ }
+
+ public void SetPetSex(IXUISprite sp, PetSex sex)
+ {
+ bool flag = sex == PetSex.Girl;
+ if (flag)
+ {
+ sp.SetSprite("zq_Gender0");
+ }
+ else
+ {
+ bool flag2 = sex == PetSex.Boy;
+ if (flag2)
+ {
+ sp.SetSprite("zq_Gender1");
+ }
+ else
+ {
+ XSingleton<XDebug>.singleton.AddErrorLog("Pet Sex is Null", null, null, null, null, null);
+ }
+ }
+ sp.MakePixelPerfect();
+ }
+
+ public void RefreshBaseInfo()
+ {
+ XPet curSelectedPet = this.doc.CurSelectedPet;
+ bool flag = curSelectedPet == null;
+ if (!flag)
+ {
+ this.SetPetSex(base.uiBehaviour.m_Sex, curSelectedPet.Sex);
+ base.uiBehaviour.m_Name.SetText(curSelectedPet.Name);
+ base.uiBehaviour.m_PPT.SetText(curSelectedPet.PPT.ToString());
+ base.uiBehaviour.m_Level.SetText(string.Format("Lv.{0}", curSelectedPet.showLevel.ToString()));
+ base.uiBehaviour.m_ActivationSelected.SetActive(this.doc.CurFightUID == curSelectedPet.UID);
+ string text = (this.doc.CurFightUID == curSelectedPet.UID) ? XSingleton<XStringTable>.singleton.GetString("ACTIVATED") : XSingleton<XStringTable>.singleton.GetString("ACTIVATION");
+ base.uiBehaviour.m_ActivationLabel.SetText(text);
+ text = ((this.doc.CurMount == curSelectedPet.UID) ? XSingleton<XStringTable>.singleton.GetString("PET_DOWN") : XSingleton<XStringTable>.singleton.GetString("PET_RIDE"));
+ base.uiBehaviour.m_BtnMountLabel.SetText(text);
+ }
+ }
+
+ private void RefreshAttribute()
+ {
+ XPet curSelectedPet = this.doc.CurSelectedPet;
+ bool flag = curSelectedPet == null;
+ if (!flag)
+ {
+ PetInfoTable.RowData petInfo = XPetDocument.GetPetInfo(curSelectedPet.ID);
+ BuffTable.RowData buffData = XSingleton<XBuffTemplateManager>.singleton.GetBuffData((int)petInfo.SpeedBuff, 1);
+ bool flag2 = buffData == null;
+ if (flag2)
+ {
+ XSingleton<XDebug>.singleton.AddErrorLog("Buff No Find!\nSp BuffId:" + petInfo.SpeedBuff, null, null, null, null, null);
+ }
+ bool flag3 = 1201 != (int)buffData.BuffChangeAttribute[0, 0];
+ if (flag3)
+ {
+ XSingleton<XDebug>.singleton.AddErrorLog("Buff No Find XAttr_RUN_SPEED_Percent.\nSp BuffId:" + petInfo.SpeedBuff, null, null, null, null, null);
+ }
+ base.uiBehaviour.m_SpeedUp.SetText(string.Format("{0}%", (buffData.BuffChangeAttribute[0, 1] + 100f).ToString()));
+ PetLevelTable.RowData petLevel = XPetDocument.GetPetLevel(curSelectedPet);
+ PetLevelTable.RowData petLevel2 = XPetDocument.GetPetLevel(curSelectedPet.ID, curSelectedPet.Level + 1);
+ base.uiBehaviour.m_AttributePool.ReturnAll(false);
+ int num = 0;
+ while ((long)num < (long)((ulong)XPetMainView.ATTRIBUTE_NUM_MAX))
+ {
+ bool flag4 = num >= petLevel.PetsAttributes.Count;
+ if (!flag4)
+ {
+ GameObject gameObject = base.uiBehaviour.m_AttributePool.FetchGameObject(false);
+ int spriteHeight = (gameObject.transform.GetComponent("XUISprite") as IXUISprite).spriteHeight;
+ IXUILabel ixuilabel = gameObject.transform.Find("AttributeName").GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel2 = gameObject.transform.Find("AttributeName/AttributeVal").GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel3 = gameObject.transform.Find("AttributeName/GrowUp").GetComponent("XUILabel") as IXUILabel;
+ gameObject.transform.localPosition = new Vector3(0f, (float)(-(float)spriteHeight * num), 0f);
+ string attrStr = XAttributeCommon.GetAttrStr((int)petLevel.PetsAttributes[num, 0]);
+ ixuilabel.SetText(attrStr);
+ uint num2 = 0u;
+ for (int i = 1; i <= curSelectedPet.Level; i++)
+ {
+ PetLevelTable.RowData petLevel3 = XPetDocument.GetPetLevel(curSelectedPet.ID, i);
+ num2 += petLevel3.PetsAttributes[num, 1];
+ }
+ ixuilabel2.SetText(XAttributeCommon.GetAttrValueStr(petLevel.PetsAttributes[num, 0], num2, false));
+ bool flag5 = petLevel2 != null;
+ if (flag5)
+ {
+ ixuilabel3.SetText(string.Format("+{0}", petLevel2.PetsAttributes[num, 1].ToString()));
+ }
+ else
+ {
+ ixuilabel3.SetText("");
+ }
+ }
+ num++;
+ }
+ }
+ }
+
+ public void RefreshExp()
+ {
+ XPet curSelectedPet = this.doc.CurSelectedPet;
+ bool flag = curSelectedPet == null;
+ if (!flag)
+ {
+ bool flag2 = this.doc.IsMaxLevel(curSelectedPet.ID, curSelectedPet.showLevel);
+ if (flag2)
+ {
+ base.uiBehaviour.m_Exp.SetText(XSingleton<XStringTable>.singleton.GetString("PET_LEVEL_MAX_TIP"));
+ base.uiBehaviour.m_ExpBar.value = 0f;
+ base.uiBehaviour.m_ExpBarLevel.SetText(string.Format("Lv.{0}", curSelectedPet.showLevel.ToString()));
+ this.doc.InPlayExpUp = false;
+ }
+ else
+ {
+ int num;
+ int num2;
+ this.doc.GetExpInfo(curSelectedPet, out num, out num2);
+ base.uiBehaviour.m_Exp.SetText(string.Format("{0}/{1}", num, num2));
+ base.uiBehaviour.m_ExpBar.value = Math.Min((float)num / (float)num2, 1f);
+ base.uiBehaviour.m_ExpBarLevel.SetText(string.Format("Lv.{0}", curSelectedPet.showLevel.ToString()));
+ }
+ }
+ }
+
+ public void RefreshFullDegree()
+ {
+ XPet curSelectedPet = this.doc.CurSelectedPet;
+ bool flag = curSelectedPet == null;
+ if (!flag)
+ {
+ PetInfoTable.RowData petInfo = XPetDocument.GetPetInfo(curSelectedPet.ID);
+ uint maxHungry = petInfo.maxHungry;
+ bool flag2 = maxHungry == 0u;
+ if (flag2)
+ {
+ XSingleton<XDebug>.singleton.AddErrorLog("FullDegreeMAX = 0", null, null, null, null, null);
+ }
+ else
+ {
+ base.uiBehaviour.m_FullDegree.SetText(string.Format("{0}%", curSelectedPet.showFullDegree));
+ base.uiBehaviour.m_FullDegreeBar.value = curSelectedPet.showFullDegree / maxHungry;
+ bool flag3 = (ulong)curSelectedPet.showFullDegree >= (ulong)((long)int.Parse(this.doc.ColorLevel[0]));
+ Color color;
+ if (flag3)
+ {
+ color= new Color(0.6784314f, 0.8392157f, 0.09019608f);
+ }
+ else
+ {
+ bool flag4 = (ulong)curSelectedPet.showFullDegree >= (ulong)((long)int.Parse(this.doc.ColorLevel[1]));
+ if (flag4)
+ {
+ color= new Color(1f, 0.470588237f, 0.121568628f);
+ }
+ else
+ {
+ color= new Color(0.894117653f, 0.266666681f, 0.266666681f);
+ }
+ }
+ base.uiBehaviour.m_FullDegreeColor.SetColor(color);
+ }
+ }
+ }
+
+ public void RefreshMood()
+ {
+ XPet curSelectedPet = this.doc.CurSelectedPet;
+ bool flag = curSelectedPet == null;
+ if (!flag)
+ {
+ PetMoodTipsTable.RowData petMoodTip = this.doc.GetPetMoodTip(curSelectedPet.Mood);
+ bool flag2 = petMoodTip != null;
+ if (flag2)
+ {
+ base.uiBehaviour.m_MoodLevel.SetText(petMoodTip.tip);
+ base.uiBehaviour.m_MoodIcon.SetSprite(petMoodTip.icon);
+ }
+ }
+ }
+
+ public void RefreshList(bool bResetPosition = true)
+ {
+ int num = Math.Min(this.doc.PetCountMax, (int)(this.doc.PetSeat + 1u));
+ base.uiBehaviour.m_WrapContent.SetContentCount(num, false);
+ if (bResetPosition)
+ {
+ base.uiBehaviour.m_PetListScrollView.ResetPosition();
+ }
+ else
+ {
+ base.uiBehaviour.m_WrapContent.RefreshAllVisibleContents();
+ }
+ }
+
+ public void SetTravelSetBtnStatus()
+ {
+ bool flag = this.doc.CurSelectedPet != null;
+ if (flag)
+ {
+ PetInfoTable.RowData petInfo = XPetDocument.GetPetInfo(this.doc.CurSelectedPet.ID);
+ base.uiBehaviour.m_TravelSet.gameObject.SetActive(petInfo != null && petInfo.PetType == 1u);
+ }
+ }
+
+ private void _OnPetListItemUpdated(Transform t, int index)
+ {
+ bool flag = index < 0;
+ if (flag)
+ {
+ XSingleton<XDebug>.singleton.AddErrorLog("index:" + index, null, null, null, null, null);
+ }
+ else
+ {
+ List<XPet> pets = this.doc.Pets;
+ IXUILabel ixuilabel = t.Find("Level").GetComponent("XUILabel") as IXUILabel;
+ IXUISprite ixuisprite = t.Find("Item/PetIcon").GetComponent("XUISprite") as IXUISprite;
+ IXUISprite ixuisprite2 = t.Find("Item/Quality").GetComponent("XUISprite") as IXUISprite;
+ GameObject gameObject = t.Find("Mount").gameObject;
+ GameObject gameObject2 = t.Find("Fight").gameObject;
+ IXUISprite ixuisprite3 = t.Find("Unlock").GetComponent("XUISprite") as IXUISprite;
+ GameObject gameObject3 = t.Find("New").gameObject;
+ GameObject gameObject4 = t.Find("Selected").gameObject;
+ GameObject gameObject5 = t.Find("Item").gameObject;
+ GameObject gameObject6 = t.Find("RedPoint").gameObject;
+ gameObject3.SetActive(false);
+ gameObject6.SetActive(false);
+ bool flag2 = index >= pets.Count;
+ if (flag2)
+ {
+ ixuilabel.SetText("");
+ gameObject5.SetActive(false);
+ gameObject.SetActive(false);
+ gameObject2.SetActive(false);
+ gameObject4.SetActive(false);
+ bool flag3 = (long)index >= (long)((ulong)this.doc.PetSeat);
+ if (flag3)
+ {
+ ixuisprite3.gameObject.SetActive(true);
+ ixuisprite3.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this._OnUnlockClicked));
+ }
+ else
+ {
+ ixuisprite3.gameObject.SetActive(false);
+ }
+ }
+ else
+ {
+ bool flag4 = this.doc.HasNewPet && index == pets.Count - 1;
+ if (flag4)
+ {
+ gameObject3.SetActive(true);
+ }
+ XPet xpet = pets[index];
+ gameObject5.SetActive(true);
+ ixuilabel.SetText("Lv." + xpet.showLevel);
+ gameObject4.SetActive(index == this.doc.CurSelectedIndex);
+ gameObject.SetActive(xpet.UID == this.doc.CurMount);
+ gameObject2.SetActive(xpet.UID == this.doc.CurFightUID);
+ ixuisprite3.gameObject.SetActive(false);
+ gameObject6.SetActive(xpet.UID == this.doc.CurFightUID && this.doc.HasRedPoint);
+ PetInfoTable.RowData petInfo = XPetDocument.GetPetInfo(xpet.ID);
+ bool flag5 = petInfo != null;
+ if (flag5)
+ {
+ ixuisprite.SetSprite(petInfo.icon, petInfo.Atlas, false);
+ }
+ ixuisprite2.SetSprite(XSingleton<UiUtility>.singleton.GetItemQualityFrame((int)petInfo.quality, 0));
+ ixuisprite.ID = (ulong)((long)index);
+ ixuisprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this._OnPetClicked));
+ }
+ }
+ }
+
+ private void _OnUnlockClicked(IXUISprite iSp)
+ {
+ bool flag = (ulong)this.doc.PetSeat < (ulong)((long)this.doc.PetSeatBuy.Length);
+ if (flag)
+ {
+ XSingleton<UiUtility>.singleton.ShowModalDialog(string.Format(XStringDefineProxy.GetString("PET_SEAT_BUY"), this.doc.PetSeatBuy[(int)this.doc.PetSeat]), XStringDefineProxy.GetString("COMMON_OK"), XStringDefineProxy.GetString("COMMON_CANCEL"), new ButtonClickEventHandler(this._BuySeat));
+ }
+ else
+ {
+ XSingleton<XDebug>.singleton.AddErrorLog(string.Concat(new object[]
+ {
+ "PetSeat:",
+ this.doc.PetSeat,
+ "\nPetSeatMAX",
+ this.doc.PetSeatBuy.Length
+ }), null, null, null, null, null);
+ }
+ }
+
+ private bool _BuySeat(IXUIButton btn)
+ {
+ this.doc.ReqBuySeat();
+ XSingleton<UiUtility>.singleton.CloseModalDlg();
+ return true;
+ }
+
+ private void _OnPetClicked(IXUISprite iSp)
+ {
+ int index = (int)iSp.ID;
+ this.doc.Select(index, false);
+ }
+
+ private bool _OnMountClicked(IXUIButton btn)
+ {
+ this.doc.ReqMount();
+ return true;
+ }
+
+ private bool _OnSkillLearnClicked(IXUIButton btn)
+ {
+ this.SkillLearnHandler.SetVisible(true);
+ return true;
+ }
+
+ private bool _OnActivationClicked(IXUIButton btn)
+ {
+ this.doc.ReqFight();
+ return true;
+ }
+
+ public override void LeaveStackTop()
+ {
+ base.LeaveStackTop();
+ base.Return3DAvatarPool();
+ }
+
+ private bool _OnThrowClicked(IXUIButton btn)
+ {
+ XSingleton<UiUtility>.singleton.ShowModalDialog(string.Format(XSingleton<UiUtility>.singleton.ReplaceReturn(XSingleton<XStringTable>.singleton.GetString("PET_THROW")), this.doc.CurSelectedPet.Name), XStringDefineProxy.GetString("COMMON_OK"), XStringDefineProxy.GetString("COMMON_CANCEL"), new ButtonClickEventHandler(this._PetThrow));
+ return true;
+ }
+
+ private bool _OnExpTransferClicked(IXUIButton btn)
+ {
+ bool flag = this.doc.Pets.Count < 2;
+ bool result;
+ if (flag)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XSingleton<XStringTable>.singleton.GetString("PET_TRANSFER_NOT_ENOUGH_TIP"), "fece00");
+ result = false;
+ }
+ else
+ {
+ bool flag2 = this.doc.CurSelectedPet == null;
+ if (flag2)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XSingleton<XStringTable>.singleton.GetString("PET_NO_SELECT"), "fece00");
+ result = false;
+ }
+ else
+ {
+ this.ExpTransferHandler.SetVisible(true);
+ result = true;
+ }
+ }
+ return result;
+ }
+
+ private bool _OnTravelSetClicked(IXUIButton btn)
+ {
+ bool flag = this.m_setHandler != null;
+ if (flag)
+ {
+ this.m_setHandler.SetVisible(true);
+ }
+ return true;
+ }
+
+ private bool _PetThrow(IXUIButton btn)
+ {
+ this.doc.ReqRelease();
+ XSingleton<UiUtility>.singleton.CloseModalDlg();
+ return true;
+ }
+
+ private void AutoRefresh(object param)
+ {
+ bool flag = base.IsVisible() && this.doc.CurSelectedPet != null;
+ if (flag)
+ {
+ bool flag2 = !this.doc.InPlayExpUp;
+ if (flag2)
+ {
+ this.doc.ReqPetInfo();
+ }
+ this._RefreshDataTimerID = XSingleton<XTimerMgr>.singleton.SetTimer(30f, new XTimerMgr.ElapsedEventHandler(this.AutoRefresh), null);
+ this.doc.PlayRandAction();
+ }
+ }
+
+ public void RefreshAutoRefresh()
+ {
+ XSingleton<XTimerMgr>.singleton.KillTimer(this._RefreshDataTimerID);
+ bool flag = base.IsVisible() && this.doc.CurSelectedPet != null;
+ if (flag)
+ {
+ bool flag2 = !this.doc.InPlayExpUp;
+ if (flag2)
+ {
+ this.doc.ReqPetInfo();
+ }
+ this._RefreshDataTimerID = XSingleton<XTimerMgr>.singleton.SetTimer(10f, new XTimerMgr.ElapsedEventHandler(this.AutoRefresh), null);
+ }
+ }
+
+ private void RefreshAction(object param)
+ {
+ bool flag = !DlgBase<XPetMainView, XPetMainBehaviour>.singleton.IsVisible();
+ if (!flag)
+ {
+ base.uiBehaviour.m_Talk.gameObject.SetActive(false);
+ this.doc.PlayIdleAction();
+ }
+ }
+
+ private void CloseBubble(object param)
+ {
+ bool flag = !DlgBase<XPetMainView, XPetMainBehaviour>.singleton.IsVisible();
+ if (!flag)
+ {
+ base.uiBehaviour.m_Talk.gameObject.SetActive(false);
+ }
+ }
+
+ public void PetActionChange(XPetActionFile Action, uint petID, XDummy m_Dummy, bool init = false)
+ {
+ bool flag = m_Dummy == null;
+ if (!flag)
+ {
+ XPetDocument specificDocument = XDocuments.GetSpecificDocument<XPetDocument>(XPetDocument.uuID);
+ PetBubble.RowData petBubble = specificDocument.GetPetBubble(Action, petID);
+ string sefile = petBubble.SEFile;
+ bool flag2 = !string.IsNullOrEmpty(sefile);
+ if (flag2)
+ {
+ XSingleton<XAudioMgr>.singleton.PlayUISound(sefile, true, AudioChannel.Action);
+ }
+ string actionFile = petBubble.ActionFile;
+ float length = m_Dummy.SetAnimationGetLength(actionFile);
+ XSingleton<XDebug>.singleton.AddLog("Pet Action:" + Action, null, null, null, null, null, XDebugColor.XDebug_None);
+ bool flag3 = Action == XPetActionFile.IDLE;
+ if (flag3)
+ {
+ this._PetStatus = XPetMainView.PetStatus.IDLE;
+ this.PlayActionTime(length);
+ }
+ bool flag4 = Action == XPetActionFile.IDLE_PEOPLE;
+ if (flag4)
+ {
+ this._PetStatus = XPetMainView.PetStatus.IDLE_PEOPLE;
+ this.PlayActionTime(length);
+ }
+ bool flag5 = Action == XPetActionFile.EAT;
+ if (flag5)
+ {
+ bool flag6 = this._PetStatus != XPetMainView.PetStatus.EAT;
+ if (flag6)
+ {
+ this._PetStatus = XPetMainView.PetStatus.EAT;
+ this.PlayActionTime(length);
+ this.PlayBubble(petBubble);
+ }
+ }
+ bool flag7 = Action == XPetActionFile.CARESS;
+ if (flag7)
+ {
+ bool flag8 = this._PetStatus != XPetMainView.PetStatus.CARESS;
+ if (flag8)
+ {
+ this._PetStatus = XPetMainView.PetStatus.CARESS;
+ this.PlayActionTime(length);
+ this.PlayBubble(petBubble);
+ }
+ }
+ bool flag9 = Action == XPetActionFile.LOSE || Action == XPetActionFile.HAPPY || Action == XPetActionFile.SLEEP || Action == XPetActionFile.HUNGER;
+ if (flag9)
+ {
+ bool flag10 = this._PetStatus == XPetMainView.PetStatus.IDLE;
+ if (flag10)
+ {
+ this._PetStatus = XPetMainView.PetStatus.Rand;
+ this.PlayActionTime(length);
+ this.PlayBubble(petBubble);
+ }
+ }
+ }
+ }
+
+ private void PlayActionTime(float length)
+ {
+ XSingleton<XTimerMgr>.singleton.KillTimer(this._PlayActionTimerID);
+ bool flag = length > 0f;
+ if (flag)
+ {
+ this._PlayActionTimerID = XSingleton<XTimerMgr>.singleton.SetTimer(length, new XTimerMgr.ElapsedEventHandler(this.RefreshAction), null);
+ }
+ }
+
+ private void PlayBubble(PetBubble.RowData petBubbleData)
+ {
+ string text = this.doc.RandomPlayBubble(petBubbleData.Bubble);
+ bool flag = !string.IsNullOrEmpty(text);
+ if (flag)
+ {
+ base.uiBehaviour.m_Talk.gameObject.SetActive(true);
+ base.uiBehaviour.m_TalkLabel.SetText(text);
+ XSingleton<XTimerMgr>.singleton.KillTimer(this._PlayBubbleTimerID);
+ this._PlayBubbleTimerID = XSingleton<XTimerMgr>.singleton.SetTimer(petBubbleData.BubbleTime, new XTimerMgr.ElapsedEventHandler(this.CloseBubble), null);
+ }
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/XPetMainView.cs.meta b/Client/Assets/Scripts/XMainClient/UI/XPetMainView.cs.meta
new file mode 100644
index 00000000..14d79aa7
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XPetMainView.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 35f1729fae2724047b70586dabb4345a
+timeCreated: 1611403560
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/XPlayerInfoChildBaseView.cs b/Client/Assets/Scripts/XMainClient/UI/XPlayerInfoChildBaseView.cs
new file mode 100644
index 00000000..95cffa1a
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XPlayerInfoChildBaseView.cs
@@ -0,0 +1,37 @@
+using System;
+using UILib;
+using UnityEngine;
+
+namespace XMainClient.UI
+{
+ public class XPlayerInfoChildBaseView
+ {
+ public IXUILabelSymbol lbName;
+
+ public IXUILabel lbLevel;
+
+ public IXUISprite sprHead;
+
+ public virtual void FindFrom(Transform t)
+ {
+ Transform transform = t.Find("name");
+ bool flag = null != transform;
+ if (flag)
+ {
+ this.lbName = (transform.GetComponent("XUILabelSymbol") as IXUILabelSymbol);
+ }
+ transform = t.Find("level");
+ bool flag2 = null != transform;
+ if (flag2)
+ {
+ this.lbLevel = (transform.GetComponent("XUILabel") as IXUILabel);
+ }
+ transform = t.Find("head");
+ bool flag3 = null != transform;
+ if (flag3)
+ {
+ this.sprHead = (transform.GetComponent("XUISprite") as IXUISprite);
+ }
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/XPlayerInfoChildBaseView.cs.meta b/Client/Assets/Scripts/XMainClient/UI/XPlayerInfoChildBaseView.cs.meta
new file mode 100644
index 00000000..80cc9018
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XPlayerInfoChildBaseView.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 71226d073b84d3e458897072f4836068
+timeCreated: 1611403933
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/XPlayerInfoChildView.cs b/Client/Assets/Scripts/XMainClient/UI/XPlayerInfoChildView.cs
new file mode 100644
index 00000000..5c7de4a9
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XPlayerInfoChildView.cs
@@ -0,0 +1,38 @@
+using System;
+using UILib;
+using UnityEngine;
+
+namespace XMainClient.UI
+{
+ public class XPlayerInfoChildView : XPlayerInfoChildBaseView
+ {
+ public IXUILabel lbPPT;
+
+ public IXUILabel lbGuildName;
+
+ public IXUILabel uidLab;
+
+ public override void FindFrom(Transform t)
+ {
+ base.FindFrom(t);
+ this.lbPPT = (t.Find("PPT").GetComponent("XUILabel") as IXUILabel);
+ this.lbGuildName = (t.Find("guild").GetComponent("XUILabel") as IXUILabel);
+ this.uidLab = (t.Find("UID").GetComponent("XUILabel") as IXUILabel);
+ }
+
+ public void SetGuildName(string name)
+ {
+ bool flag = (string.Empty + name).Length > 0;
+ if (flag)
+ {
+ this.lbGuildName.Alpha = 1f;
+ this.lbGuildName.SetText(name);
+ }
+ else
+ {
+ this.lbGuildName.SetText(string.Empty);
+ this.lbGuildName.Alpha = 0f;
+ }
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/XPlayerInfoChildView.cs.meta b/Client/Assets/Scripts/XMainClient/UI/XPlayerInfoChildView.cs.meta
new file mode 100644
index 00000000..07365609
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XPlayerInfoChildView.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 51854dd372a3c5d468332f1266f60240
+timeCreated: 1611403706
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/XPlayerMailView.cs b/Client/Assets/Scripts/XMainClient/UI/XPlayerMailView.cs
new file mode 100644
index 00000000..25a8304a
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XPlayerMailView.cs
@@ -0,0 +1,26 @@
+using System;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class XPlayerMailView : DlgHandlerBase
+ {
+ private XMailDocument _doc = null;
+
+ protected override void Init()
+ {
+ base.Init();
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ this._doc = (XSingleton<XGame>.singleton.Doc.GetXComponent(XMailDocument.uuID) as XMailDocument);
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/XPlayerMailView.cs.meta b/Client/Assets/Scripts/XMainClient/UI/XPlayerMailView.cs.meta
new file mode 100644
index 00000000..10a7d864
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XPlayerMailView.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 8c66746a9769a0d409567505ca49dab9
+timeCreated: 1611404099
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/XQuickReplyBehavior.cs b/Client/Assets/Scripts/XMainClient/UI/XQuickReplyBehavior.cs
new file mode 100644
index 00000000..c6ada7a9
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XQuickReplyBehavior.cs
@@ -0,0 +1,39 @@
+using System;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class XQuickReplyBehavior : DlgBehaviourBase
+ {
+ public XUIPool m_ItemPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ public IXUIScrollView m_WrapScrollView = null;
+
+ public IXUIWrapContent m_WrapContent = null;
+
+ public IXUISprite m_Close = null;
+
+ public IXUILabel m_Title = null;
+
+ public IXUIButton m_Voice = null;
+
+ public Transform m_WrapTemp = null;
+
+ public Transform m_SpeakPanel = null;
+
+ private void Awake()
+ {
+ this.m_SpeakPanel = base.transform.Find("Bg/SpeakPanel");
+ this.m_Title = (base.transform.Find("Bg/Title/Label").GetComponent("XUILabel") as IXUILabel);
+ this.m_Voice = (base.transform.Find("Bg/BtnVoice").GetComponent("XUIButton") as IXUIButton);
+ this.m_Close = (base.transform.Find("Bg/Close").GetComponent("XUISprite") as IXUISprite);
+ this.m_WrapScrollView = (base.transform.Find("Bg/ScrollView").GetComponent("XUIScrollView") as IXUIScrollView);
+ this.m_WrapContent = (base.transform.Find("Bg/ScrollView/WrapContent").GetComponent("XUIWrapContent") as IXUIWrapContent);
+ this.m_WrapTemp = base.transform.Find("Bg/ScrollView/WrapContent/Content");
+ this.m_ItemPool.SetupPool(this.m_WrapTemp.parent.gameObject, this.m_WrapTemp.gameObject, 2u, false);
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/XQuickReplyBehavior.cs.meta b/Client/Assets/Scripts/XMainClient/UI/XQuickReplyBehavior.cs.meta
new file mode 100644
index 00000000..edb16336
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XQuickReplyBehavior.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: c1e3808ba6633394f9227766078d356c
+timeCreated: 1611404492
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/XRewardLevelView.cs b/Client/Assets/Scripts/XMainClient/UI/XRewardLevelView.cs
new file mode 100644
index 00000000..40b9a7b9
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XRewardLevelView.cs
@@ -0,0 +1,270 @@
+using System;
+using System.Collections.Generic;
+using UILib;
+using UnityEngine;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class XRewardLevelView : DlgHandlerBase
+ {
+ public IXUIScrollView m_ScrollView;
+
+ public XUIPool m_RewardPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ public XUIPool m_RewardItemPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ public IXUILabel m_RemainTime;
+
+ protected XAchievementDocument _doc;
+
+ protected uint _remainTime;
+
+ protected uint _timer;
+
+ private uint _curID;
+
+ protected override void Init()
+ {
+ this._doc = (XSingleton<XGame>.singleton.Doc.GetXComponent(XAchievementDocument.uuID) as XAchievementDocument);
+ this._doc.RewardLevelView = this;
+ this.m_RemainTime = (base.PanelObject.transform.Find("RemainTime/Label").GetComponent("XUILabel") as IXUILabel);
+ Transform transform = base.PanelObject.transform.Find("Panel");
+ this.m_ScrollView = (transform.GetComponent("XUIScrollView") as IXUIScrollView);
+ Transform transform2 = base.PanelObject.transform.Find("Panel/RecordTpl/ItemReward/ItemTpl");
+ this.m_RewardItemPool.SetupPool(transform.gameObject, transform2.gameObject, 30u, false);
+ transform2 = base.PanelObject.transform.Find("Panel/RecordTpl");
+ this.m_RewardPool.SetupPool(transform2.parent.gameObject, transform2.gameObject, 10u, false);
+ }
+
+ public void UpdateRedPoint()
+ {
+ this._doc.HasCompleteAchivement(XSysDefine.XSys_ServerActivity);
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ this._remainTime = 0u;
+ RpcC2G_QueryOpenGameActivityTime rpc = new RpcC2G_QueryOpenGameActivityTime();
+ XSingleton<XClientNetwork>.singleton.Send(rpc);
+ this.RefreshList();
+ }
+
+ public override void OnUnload()
+ {
+ this._remainTime = 0u;
+ bool flag = this._timer > 0u;
+ if (flag)
+ {
+ XSingleton<XTimerMgr>.singleton.KillTimer(this._timer);
+ }
+ this._doc.RewardLevelView = null;
+ base.OnUnload();
+ }
+
+ protected string GetActivityString(string format, int catergory, int param, AchivementState state)
+ {
+ string result;
+ if (catergory - 502 > 1)
+ {
+ bool flag = state == AchivementState.Exceed || state == AchivementState.Not_Achive;
+ if (flag)
+ {
+ result = string.Format(format, "[ff0000]" + param + "[-]");
+ }
+ else
+ {
+ result = string.Format(format, "[00ff00]" + param + "[-]");
+ }
+ }
+ else
+ {
+ SceneTable.RowData sceneData = XSingleton<XSceneMgr>.singleton.GetSceneData((uint)param);
+ bool flag2 = state == AchivementState.Exceed || state == AchivementState.Not_Achive;
+ if (flag2)
+ {
+ result = string.Format(format, "[ff0000]" + sceneData.Comment + "[-]");
+ }
+ else
+ {
+ result = string.Format(format, "[00ff00]" + sceneData.Comment + "[-]");
+ }
+ }
+ return result;
+ }
+
+ protected bool OnFetchClicked(IXUIButton button)
+ {
+ this._curID = (uint)button.ID;
+ int achivementFatigue = this._doc.GetAchivementFatigue(this._curID);
+ int @int = XSingleton<XGlobalConfig>.singleton.GetInt("MaxFatigue");
+ int num = (int)XBagDocument.BagDoc.GetVirtualItemCount(ItemEnum.FATIGUE);
+ bool flag = achivementFatigue > 0 && num + achivementFatigue > @int;
+ if (flag)
+ {
+ XSingleton<UiUtility>.singleton.ShowFatigueSureDlg(new ButtonClickEventHandler(this.SureToFetch));
+ }
+ else
+ {
+ this._doc.FetchAchivement(this._curID);
+ }
+ return true;
+ }
+
+ protected bool SureToFetch(IXUIButton button)
+ {
+ XSingleton<UiUtility>.singleton.CloseModalDlg();
+ this._doc.FetchAchivement(this._curID);
+ return true;
+ }
+
+ protected bool OnLinkToClick(IXUIButton button)
+ {
+ return true;
+ }
+
+ private int ActivityCompare(int act1, int act2)
+ {
+ AchivementState achivementState = this._doc.GetAchivementState((uint)act1);
+ AchivementState achivementState2 = this._doc.GetAchivementState((uint)act2);
+ bool flag = achivementState > achivementState2;
+ int result;
+ if (flag)
+ {
+ result = -1;
+ }
+ else
+ {
+ bool flag2 = achivementState < achivementState2;
+ if (flag2)
+ {
+ result = 1;
+ }
+ else
+ {
+ result = act1.CompareTo(act2);
+ }
+ }
+ return result;
+ }
+
+ public void RefreshList()
+ {
+ this.UpdateRedPoint();
+ this.m_RewardPool.ReturnAll(false);
+ this.m_RewardItemPool.ReturnAll(false);
+ this.m_ScrollView.SetPosition(0f);
+ List<int> catergoryActivity = this._doc.GetCatergoryActivity(500);
+ catergoryActivity.Sort(new Comparison<int>(this.ActivityCompare));
+ for (int i = 0; i < catergoryActivity.Count; i++)
+ {
+ GameObject gameObject = this.m_RewardPool.FetchGameObject(false);
+ gameObject.name = "record" + catergoryActivity[i];
+ gameObject.transform.localPosition = this.m_RewardPool.TplPos - new Vector3(0f, (float)(this.m_RewardPool.TplHeight * i));
+ AchivementTable.RowData achivementData = this._doc.GetAchivementData((uint)catergoryActivity[i]);
+ bool flag = achivementData != null;
+ if (flag)
+ {
+ AchivementState achivementState = this._doc.GetAchivementState((uint)achivementData.AchievementID);
+ IXUILabel ixuilabel = gameObject.transform.Find("Name").GetComponent("XUILabel") as IXUILabel;
+ string activityString = this.GetActivityString(achivementData.AchievementDescription, achivementData.AchievementCategory, achivementData.AchievementParam, achivementState);
+ ixuilabel.SetText(activityString);
+ IXUIButton ixuibutton = gameObject.transform.Find("Fetch").GetComponent("XUIButton") as IXUIButton;
+ ixuibutton.ID = (ulong)((long)catergoryActivity[i]);
+ ixuibutton.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnFetchClicked));
+ GameObject gameObject2 = gameObject.transform.Find("Fetched").gameObject;
+ GameObject gameObject3 = gameObject.transform.Find("LinkTo").gameObject;
+ IXUIProgress ixuiprogress = gameObject.transform.Find("Progress").GetComponent("XUIProgress") as IXUIProgress;
+ ixuiprogress.gameObject.SetActive(false);
+ ixuibutton.gameObject.SetActive(false);
+ gameObject2.SetActive(false);
+ gameObject3.SetActive(false);
+ bool flag2 = achivementData.AchievementCategory == 504;
+ if (flag2)
+ {
+ ixuiprogress.gameObject.SetActive(true);
+ XFashionDocument specificDocument = XDocuments.GetSpecificDocument<XFashionDocument>(XFashionDocument.uuID);
+ int count = specificDocument.FashionBag.Count;
+ ixuiprogress.value = (float)count / (float)achivementData.AchievementParam;
+ IXUILabel ixuilabel2 = gameObject.transform.Find("Progress/T").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel2.SetText(string.Format("{0}/{1}", count, achivementData.AchievementParam));
+ }
+ switch (achivementState)
+ {
+ case AchivementState.Exceed:
+ ixuibutton.gameObject.SetActive(true);
+ ixuibutton.SetEnable(false, false);
+ break;
+ case AchivementState.Fetched:
+ gameObject2.SetActive(true);
+ break;
+ case AchivementState.Not_Achive:
+ gameObject3.SetActive(true);
+ break;
+ case AchivementState.Achive_NoFetch:
+ ixuibutton.gameObject.SetActive(true);
+ ixuibutton.SetEnable(true, false);
+ break;
+ }
+ Transform parent = gameObject.transform.Find("ItemReward");
+ for (int j = 0; j < achivementData.AchievementItem.Count; j++)
+ {
+ int num = achivementData.AchievementItem[j, 0];
+ GameObject gameObject4 = this.m_RewardItemPool.FetchGameObject(false);
+ gameObject4.name = "reward item " + num;
+ gameObject4.transform.parent = parent;
+ gameObject4.transform.localPosition = this.m_RewardItemPool.TplPos + new Vector3((float)(this.m_RewardItemPool.TplWidth * j), 0f);
+ XSingleton<XItemDrawerMgr>.singleton.normalItemDrawer.DrawItem(gameObject4, num, achivementData.AchievementItem[j, 1], false);
+ IXUISprite ixuisprite = gameObject4.transform.Find("Icon").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.ID = (ulong)((long)num);
+ ixuisprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.ShowItemDialog));
+ }
+ }
+ }
+ }
+
+ private void ShowItemDialog(IXUISprite spr)
+ {
+ XItem mainItem = XBagDocument.MakeXItem((int)spr.ID, false);
+ XSingleton<UiUtility>.singleton.ShowTooltipDialogWithSearchingCompare(mainItem, spr, false, 0u);
+ }
+
+ public void SetRemainTime(uint second)
+ {
+ this._remainTime = second;
+ this._RemainTime();
+ }
+
+ public void UpateRemainTime(object param)
+ {
+ bool flag = this._remainTime > 0u;
+ if (flag)
+ {
+ this._remainTime -= 1u;
+ this._RemainTime();
+ }
+ }
+
+ protected void _RemainTime()
+ {
+ bool flag = !base.IsVisible();
+ if (!flag)
+ {
+ bool flag2 = this._remainTime > 0u;
+ if (flag2)
+ {
+ string @string = XStringDefineProxy.GetString("REMAIN_TIME");
+ string text = XSingleton<UiUtility>.singleton.TimeFormatSince1970((int)this._remainTime, @string, false);
+ this.m_RemainTime.SetText(text);
+ this._timer = XSingleton<XTimerMgr>.singleton.SetTimer(1f, new XTimerMgr.ElapsedEventHandler(this.UpateRemainTime), null);
+ }
+ else
+ {
+ string string2 = XStringDefineProxy.GetString("GUILD_REDPACKET_TIMEOVER");
+ this.m_RemainTime.SetText(string2);
+ }
+ }
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/XRewardLevelView.cs.meta b/Client/Assets/Scripts/XMainClient/UI/XRewardLevelView.cs.meta
new file mode 100644
index 00000000..7c114b76
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XRewardLevelView.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 9c36cfd1905d42e43a7dbd857045db72
+timeCreated: 1611404209
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/XRwdMailView.cs b/Client/Assets/Scripts/XMainClient/UI/XRwdMailView.cs
new file mode 100644
index 00000000..a7d049ae
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XRwdMailView.cs
@@ -0,0 +1,121 @@
+using System;
+using UILib;
+using UnityEngine;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class XRwdMailView : DlgHandlerBase
+ {
+ private XMailDocument _doc = null;
+
+ public GameObject[] m_objitems = new GameObject[5];
+
+ public IXUIButton m_btnok;
+
+ public IXUITweenTool m_tweenbg;
+
+ public IXUITweenTool m_tweentitle;
+
+ private MailItem m_item;
+
+ private int[] m_to_x = new int[5];
+
+ private int[] m_from_x = new int[5];
+
+ private bool ani_start = false;
+
+ private float ani_duration = 1f;
+
+ private float ani_time = 0f;
+
+ private int items_cnt = 1;
+
+ private int ani_sped = 1;
+
+ private Vector3 items_pos;
+
+ protected override void Init()
+ {
+ base.Init();
+ this.m_btnok = (base.PanelObject.transform.Find("OK").GetComponent("XUIButton") as IXUIButton);
+ this.m_tweenbg = (base.PanelObject.transform.Find("CriticalConfirm").GetComponent("XUIPlayTween") as IXUITweenTool);
+ this.m_tweentitle = (base.PanelObject.transform.Find("titleLabel").GetComponent("XUIPlayTween") as IXUITweenTool);
+ for (int i = 0; i < this.m_objitems.Length; i++)
+ {
+ this.m_objitems[i] = base.PanelObject.transform.Find("items/item" + i).gameObject;
+ }
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ this.m_btnok.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnOKClick));
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ this._doc = (XSingleton<XGame>.singleton.Doc.GetXComponent(XMailDocument.uuID) as XMailDocument);
+ this.m_tweenbg.PlayTween(true, -1f);
+ this.m_tweentitle.PlayTween(true, -1f);
+ this.m_tweenbg.RegisterOnFinishEventHandler(null);
+ this.m_tweentitle.RegisterOnFinishEventHandler(new OnTweenFinishEventHandler(this.OnTweenEnd));
+ this.m_item = this._doc.GetMailItem();
+ this.items_cnt = this.m_item.items.Count;
+ for (int i = 0; i < this.items_cnt; i++)
+ {
+ this.m_objitems[i].SetActive(true);
+ ItemList.RowData itemConf = XBagDocument.GetItemConf((int)this.m_item.items[i].itemID);
+ XSingleton<XItemDrawerMgr>.singleton.normalItemDrawer.DrawItem(this.m_objitems[i], (int)this.m_item.items[i].itemID, (int)this.m_item.items[i].itemCount, false);
+ int num = (this.items_cnt % 2 == 0) ? ((int)((float)i - (float)this.items_cnt / 2f) * 100 + 50) : ((int)((float)i - (float)(this.items_cnt - 1) / 2f) * 100);
+ this.m_to_x[i] = num;
+ int num2 = (this.items_cnt % 2 == 0) ? ((int)(-(int)((float)this.items_cnt / 2f)) * 100 + 50) : ((int)((float)(-(float)(this.items_cnt - 1)) / 2f) * 100);
+ this.m_from_x[i] = 0;
+ this.items_pos = new Vector3(0f, 14f, 0f);
+ this.m_objitems[i].transform.localPosition = this.items_pos;
+ }
+ for (int j = this.m_item.items.Count; j < this.m_objitems.Length; j++)
+ {
+ this.m_objitems[j].SetActive(false);
+ }
+ }
+
+ private void OnTweenEnd(IXUITweenTool tween)
+ {
+ this.ani_time = Time.realtimeSinceStartup;
+ this.ani_duration = 1f;
+ this.ani_start = true;
+ this.ani_sped = 6;
+ }
+
+ public override void OnUpdate()
+ {
+ bool flag = this.ani_start;
+ if (flag)
+ {
+ bool flag2 = Time.realtimeSinceStartup - this.ani_time >= this.ani_duration;
+ if (flag2)
+ {
+ this.ani_start = false;
+ }
+ else
+ {
+ for (int i = 0; i < this.items_cnt; i++)
+ {
+ this.items_pos.x = Mathf.Lerp((float)this.m_from_x[i], (float)this.m_to_x[i], (float)this.ani_sped * (Time.realtimeSinceStartup - this.ani_time / this.ani_duration));
+ this.m_objitems[i].transform.localPosition = this.items_pos;
+ }
+ }
+ }
+ base.OnUpdate();
+ }
+
+ private bool OnOKClick(IXUIButton btn)
+ {
+ this._doc.ReqMailOP(MailOP.Claim, this.m_item.id);
+ base.SetVisible(false);
+ return true;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/XRwdMailView.cs.meta b/Client/Assets/Scripts/XMainClient/UI/XRwdMailView.cs.meta
new file mode 100644
index 00000000..12589280
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XRwdMailView.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 4f276a418b7fe4d4cabe90d9f5106067
+timeCreated: 1611403700
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/XSceneDamageRankHandler.cs b/Client/Assets/Scripts/XMainClient/UI/XSceneDamageRankHandler.cs
new file mode 100644
index 00000000..15798d4c
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XSceneDamageRankHandler.cs
@@ -0,0 +1,308 @@
+using System;
+using System.Collections.Generic;
+using KKSG;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class XSceneDamageRankHandler : DlgHandlerBase, IRankView
+ {
+ private XSceneDamageRankDocument doc;
+
+ private XUIPool m_RankPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ private List<GameObject> m_RankList = new List<GameObject>();
+
+ private bool m_bShow = false;
+
+ private uint m_AutoCloseTimerToken = 0u;
+
+ private uint m_AutoReqDataTimerToken = 0u;
+
+ private ulong[] cacheRoleids;
+
+ private int[] cacheStates;
+
+ protected override void Init()
+ {
+ base.Init();
+ this.doc = XDocuments.GetSpecificDocument<XSceneDamageRankDocument>(XSceneDamageRankDocument.uuID);
+ this.doc.RankHandler = this;
+ Transform transform = base.PanelObject.transform.Find("RankTpl");
+ this.m_RankPool.SetupPool(transform.parent.gameObject, transform.gameObject, 2u, false);
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ }
+
+ public override void OnUnload()
+ {
+ this.doc.RankHandler = null;
+ this._ClearAutoClose();
+ base.OnUnload();
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ this.m_bShow = true;
+ SceneTable.RowData sceneData = XSingleton<XSceneMgr>.singleton.GetSceneData(XSingleton<XScene>.singleton.SceneID);
+ SceneType type = (SceneType)sceneData.type;
+ if (type <= SceneType.SCENE_HEROBATTLE)
+ {
+ if (type == SceneType.SCENE_PVP)
+ {
+ XBattleCaptainPVPDocument specificDocument = XDocuments.GetSpecificDocument<XBattleCaptainPVPDocument>(XBattleCaptainPVPDocument.uuID);
+ this.doc.OnGetRank(specificDocument.RankList);
+ return;
+ }
+ if (type == SceneType.SCENE_HEROBATTLE)
+ {
+ XHeroBattleDocument specificDocument2 = XDocuments.GetSpecificDocument<XHeroBattleDocument>(XHeroBattleDocument.uuID);
+ this.doc.OnGetRank(specificDocument2.RankList);
+ return;
+ }
+ }
+ else if (type - SceneType.SCENE_WEEKEND4V4_MONSTERFIGHT <= 4 || type == SceneType.SCENE_WEEKEND4V4_DUCK)
+ {
+ this.RefreshWeekendPartRank();
+ return;
+ }
+ this._AutoReqData(null);
+ }
+
+ protected override void OnHide()
+ {
+ this.m_bShow = false;
+ this._ClearAutoClose();
+ this._ClearAutoReqData();
+ base.OnHide();
+ }
+
+ public void RefreshPage()
+ {
+ List<XBaseRankInfo> rankList = this.doc.RankList;
+ bool flag = rankList.Count > this.m_RankList.Count;
+ if (flag)
+ {
+ for (int i = this.m_RankList.Count; i < rankList.Count; i++)
+ {
+ GameObject gameObject = this.m_RankPool.FetchGameObject(false);
+ gameObject.transform.localPosition = new Vector3(this.m_RankPool.TplPos.x, this.m_RankPool.TplPos.y - (float)(this.m_RankPool.TplHeight * i), this.m_RankPool.TplPos.z);
+ this.m_RankList.Add(gameObject);
+ IXUILabel ixuilabel = gameObject.transform.Find("Rank").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel.SetText(string.Format("{0}.", i + 1));
+ bool bSpectator = XSingleton<XScene>.singleton.bSpectator;
+ if (bSpectator)
+ {
+ IXUICheckBox ixuicheckBox = gameObject.GetComponent("XUICheckBox") as IXUICheckBox;
+ ixuicheckBox.ID = (ulong)((long)i);
+ ixuicheckBox.RegisterOnCheckEventHandler(new CheckBoxOnCheckEventHandler(this.OnSpectateChangeClick));
+ }
+ }
+ }
+ else
+ {
+ bool flag2 = rankList.Count < this.m_RankList.Count;
+ if (flag2)
+ {
+ for (int j = this.m_RankList.Count - 1; j >= rankList.Count; j--)
+ {
+ this.m_RankPool.ReturnInstance(this.m_RankList[j], false);
+ }
+ this.m_RankList.RemoveRange(rankList.Count, this.m_RankList.Count - rankList.Count);
+ }
+ }
+ for (int k = 0; k < rankList.Count; k++)
+ {
+ GameObject gameObject2 = this.m_RankList[k];
+ bool bSpectator2 = XSingleton<XScene>.singleton.bSpectator;
+ if (bSpectator2)
+ {
+ IXUICheckBox ixuicheckBox2 = gameObject2.GetComponent("XUICheckBox") as IXUICheckBox;
+ bool flag3 = XSingleton<XEntityMgr>.singleton.Player != null && XSingleton<XEntityMgr>.singleton.Player.WatchTo != null && rankList[k].id == XSingleton<XEntityMgr>.singleton.Player.WatchTo.ID;
+ if (flag3)
+ {
+ ixuicheckBox2.ForceSetFlag(true);
+ }
+ else
+ {
+ ixuicheckBox2.ForceSetFlag(false);
+ }
+ }
+ IXUILabel ixuilabel2 = gameObject2.transform.Find("Name").GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel3 = gameObject2.transform.Find("Value").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel2.SetText(rankList[k].name);
+ XCaptainPVPRankInfo xcaptainPVPRankInfo = rankList[k] as XCaptainPVPRankInfo;
+ bool flag4 = xcaptainPVPRankInfo != null;
+ if (flag4)
+ {
+ ixuilabel3.SetText(rankList[k].GetValue());
+ }
+ else
+ {
+ ixuilabel3.SetText(XSingleton<UiUtility>.singleton.NumberFormat(rankList[k].value));
+ }
+ }
+ this.HideVoice();
+ }
+
+ private void _AutoReqData(object o)
+ {
+ this.doc.ReqRank();
+ bool bShow = this.m_bShow;
+ if (bShow)
+ {
+ this.m_AutoReqDataTimerToken = XSingleton<XTimerMgr>.singleton.SetTimer(2f, new XTimerMgr.ElapsedEventHandler(this._AutoReqData), null);
+ }
+ }
+
+ private void _ClearAutoClose()
+ {
+ XSingleton<XTimerMgr>.singleton.KillTimer(this.m_AutoCloseTimerToken);
+ }
+
+ private void _ClearAutoReqData()
+ {
+ this.m_AutoReqDataTimerToken = 0u;
+ XSingleton<XTimerMgr>.singleton.KillTimer(this.m_AutoReqDataTimerToken);
+ }
+
+ private bool OnSpectateChangeClick(IXUICheckBox checkBox)
+ {
+ bool flag = !checkBox.bChecked;
+ bool result;
+ if (flag)
+ {
+ result = true;
+ }
+ else
+ {
+ ulong id = this.doc.RankList[(int)checkBox.ID].id;
+ bool flag2 = XSingleton<XEntityMgr>.singleton.Player != null && XSingleton<XEntityMgr>.singleton.Player.WatchTo != null && id == XSingleton<XEntityMgr>.singleton.Player.WatchTo.ID;
+ if (flag2)
+ {
+ result = true;
+ }
+ else
+ {
+ XEntity entityConsiderDeath = XSingleton<XEntityMgr>.singleton.GetEntityConsiderDeath(id);
+ bool flag3 = entityConsiderDeath != null && entityConsiderDeath.IsRole;
+ if (flag3)
+ {
+ XSingleton<XEntityMgr>.singleton.Player.WatchIt(entityConsiderDeath as XRole);
+ }
+ result = true;
+ }
+ }
+ return result;
+ }
+
+ public void RefreshVoice(ulong[] roleids, int[] states)
+ {
+ bool flag = DlgBase<BattleMain, BattleMainBehaviour>.singleton.IsLoaded();
+ if (flag)
+ {
+ this.cacheRoleids = roleids;
+ this.cacheStates = states;
+ bool flag2 = roleids == null || states == null;
+ if (!flag2)
+ {
+ for (int i = 0; i < roleids.Length; i++)
+ {
+ this.PlayRole(roleids[i], states[i]);
+ }
+ }
+ }
+ }
+
+ public void PlayRole(ulong roleid, int state)
+ {
+ for (int i = 0; i < this.doc.RankList.Count; i++)
+ {
+ bool flag = this.doc.RankList[i].id == roleid && this.m_RankList.Count > i;
+ if (flag)
+ {
+ Transform transform = this.m_RankList[i].transform.Find("voice");
+ bool flag2 = transform != null;
+ if (flag2)
+ {
+ transform.gameObject.SetActive(state == 1);
+ }
+ Transform transform2 = this.m_RankList[i].transform.Find("speak");
+ bool flag3 = transform2 != null;
+ if (flag3)
+ {
+ transform2.gameObject.SetActive(state == 2);
+ }
+ }
+ }
+ }
+
+ public void HideVoice()
+ {
+ bool flag = DlgBase<BattleMain, BattleMainBehaviour>.singleton.IsLoaded();
+ if (flag)
+ {
+ for (int i = 0; i < this.m_RankList.Count; i++)
+ {
+ Transform transform = this.m_RankList[i].transform.Find("voice");
+ Transform transform2 = this.m_RankList[i].transform.Find("speak");
+ bool flag2 = transform.gameObject.activeSelf && transform2.gameObject.activeSelf;
+ if (flag2)
+ {
+ transform.gameObject.SetActive(false);
+ transform2.gameObject.SetActive(false);
+ }
+ }
+ this.RefreshVoice(this.cacheRoleids, this.cacheStates);
+ }
+ }
+
+ public void RefreshWeekendPartRank()
+ {
+ XWeekendPartyDocument specificDocument = XDocuments.GetSpecificDocument<XWeekendPartyDocument>(XWeekendPartyDocument.uuID);
+ List<WeekendPartyBattleRoleInfo> selfWeekendPartyBattleList = specificDocument.SelfWeekendPartyBattleList;
+ bool flag = selfWeekendPartyBattleList.Count > this.m_RankList.Count;
+ if (flag)
+ {
+ for (int i = this.m_RankList.Count; i < selfWeekendPartyBattleList.Count; i++)
+ {
+ GameObject gameObject = this.m_RankPool.FetchGameObject(false);
+ gameObject.transform.localPosition = new Vector3(this.m_RankPool.TplPos.x, this.m_RankPool.TplPos.y - (float)(this.m_RankPool.TplHeight * i), this.m_RankPool.TplPos.z);
+ this.m_RankList.Add(gameObject);
+ }
+ }
+ else
+ {
+ bool flag2 = selfWeekendPartyBattleList.Count < this.m_RankList.Count;
+ if (flag2)
+ {
+ for (int j = this.m_RankList.Count - 1; j >= selfWeekendPartyBattleList.Count; j--)
+ {
+ this.m_RankPool.ReturnInstance(this.m_RankList[j], false);
+ }
+ this.m_RankList.RemoveRange(selfWeekendPartyBattleList.Count, this.m_RankList.Count - selfWeekendPartyBattleList.Count);
+ }
+ }
+ for (int k = 0; k < selfWeekendPartyBattleList.Count; k++)
+ {
+ GameObject gameObject2 = this.m_RankList[k];
+ IXUILabel ixuilabel = gameObject2.transform.Find("Rank").GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel2 = gameObject2.transform.Find("Name").GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel3 = gameObject2.transform.Find("Value").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel.SetText(string.Format("{0}.", selfWeekendPartyBattleList[k].Rank));
+ ixuilabel2.SetText((selfWeekendPartyBattleList[k].roleName != null) ? selfWeekendPartyBattleList[k].roleName : "");
+ string arg = (XSingleton<XScene>.singleton.SceneType == SceneType.SCENE_WEEKEND4V4_CRAZYBOMB || XSingleton<XScene>.singleton.SceneType == SceneType.SCENE_WEEKEND4V4_LIVECHALLENGE) ? XStringDefineProxy.GetString("WeekendPartyBattleRankTypeDeath") : XStringDefineProxy.GetString("WeekendPartyBattleRankTypeScore");
+ uint num = (XSingleton<XScene>.singleton.SceneType == SceneType.SCENE_WEEKEND4V4_CRAZYBOMB || XSingleton<XScene>.singleton.SceneType == SceneType.SCENE_WEEKEND4V4_LIVECHALLENGE) ? selfWeekendPartyBattleList[k].beKilled : selfWeekendPartyBattleList[k].score;
+ ixuilabel3.SetText(string.Format("{0}{1}", arg, num));
+ }
+ this.HideVoice();
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/XSceneDamageRankHandler.cs.meta b/Client/Assets/Scripts/XMainClient/UI/XSceneDamageRankHandler.cs.meta
new file mode 100644
index 00000000..28d021e9
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XSceneDamageRankHandler.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 15e0c2c36456a6c4cbbda90b750cabe1
+timeCreated: 1611403266
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/XSelectCharView.cs b/Client/Assets/Scripts/XMainClient/UI/XSelectCharView.cs
new file mode 100644
index 00000000..c0cee4dd
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XSelectCharView.cs
@@ -0,0 +1,318 @@
+using System;
+using KKSG;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUpdater;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class XSelectCharView : DlgBase<XSelectCharView, SelectCharWindowBehaviour>
+ {
+ public int SelectCharIndex
+ {
+ get
+ {
+ return this._currentSelectedIndex;
+ }
+ set
+ {
+ this._currentSelectedIndex = value;
+ }
+ }
+
+ public override string fileName
+ {
+ get
+ {
+ return "SelectChar/DNSelectCharDlg";
+ }
+ }
+
+ public override int layer
+ {
+ get
+ {
+ return 1;
+ }
+ }
+
+ private XSelectCharacterDocument _doc = null;
+
+ private int _currentSelectedIndex = 0;
+
+ public RandomName _randomNameReader = null;
+
+ private bool _playForward = true;
+
+ private bool _enterWorld = true;
+
+ protected override void Init()
+ {
+ this._doc = XDocuments.GetSpecificDocument<XSelectCharacterDocument>(XSelectCharacterDocument.uuID);
+ this._doc.View = this;
+ this._doc.CurrentProf = 0;
+ base.uiBehaviour.m_Version.SetText("v" + XSingleton<XUpdater.XUpdater>.singleton.Version);
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ XSingleton<XLoginDocument>.singleton.ShowLoginReconnect();
+ }
+
+ public override void RegisterEvent()
+ {
+ base.uiBehaviour.m_enterworld.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnEnterworldButtonClick));
+ base.uiBehaviour.m_return.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnReturnClick));
+ base.uiBehaviour.m_createRandom.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnRandomNameClick));
+ for (int i = 0; i < XGame.RoleCount; i++)
+ {
+ base.uiBehaviour.m_create_profp[i].RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnProfSelect));
+ }
+ base.uiBehaviour.m_profTween.RegisterOnFinishEventHandler(new OnTweenFinishEventHandler(this.OnProfTweenFinish));
+ }
+
+ protected int FindSlotByUIIndex(int index)
+ {
+ return -1;
+ }
+
+ private bool OnEnterworldButtonClick(IXUIButton go)
+ {
+ base.uiBehaviour.m_SelectTween.PlayTween(true, -1f);
+ this._doc.OnEnterWorld();
+ return true;
+ }
+
+ private bool OnReturnClick(IXUIButton go)
+ {
+ this._doc.OnSelectCharBack();
+ return true;
+ }
+
+ private void OnProfSelect(IXUISprite sp)
+ {
+ this._currentSelectedIndex = (int)sp.ID;
+ XSelectcharStage xselectcharStage = XSingleton<XGame>.singleton.CurrentStage as XSelectcharStage;
+ bool flag = xselectcharStage != null;
+ if (flag)
+ {
+ xselectcharStage.ShowCharacter(this._currentSelectedIndex);
+ }
+ }
+
+ private void OnProfTweenFinish(IXUITweenTool tween)
+ {
+ bool flag = !base.IsVisible();
+ if (!flag)
+ {
+ this._playForward = !this._playForward;
+ bool flag2 = !this._playForward;
+ if (flag2)
+ {
+ this.SetProfIntro(this._doc.CurrentProf);
+ base.uiBehaviour.m_profTween.PlayTween(this._playForward, -1f);
+ }
+ }
+ }
+
+ private void SetIntroPoint(int oplevel)
+ {
+ base.uiBehaviour.m_AttrPoint.FakeReturnAll();
+ float x = base.uiBehaviour.m_AttrPoint.TplPos.x;
+ float y = base.uiBehaviour.m_AttrPoint.TplPos.y;
+ float num = (float)base.uiBehaviour.m_AttrPoint.TplWidth;
+ int @int = XSingleton<XGlobalConfig>.singleton.GetInt("ProfOperateLevelMax");
+ for (int i = 0; i < @int; i++)
+ {
+ GameObject gameObject = base.uiBehaviour.m_AttrPoint.FetchGameObject(false);
+ IXUISprite ixuisprite = gameObject.transform.Find("Light").GetComponent("XUISprite") as IXUISprite;
+ gameObject.transform.localPosition = new Vector3(x + (float)i * num, y);
+ ixuisprite.SetAlpha((float)((i < oplevel) ? 1 : 0));
+ }
+ base.uiBehaviour.m_AttrPoint.ActualReturnAll(false);
+ }
+
+ private void SetProfIntro(int prof)
+ {
+ base.uiBehaviour.m_profName.spriteName = XSingleton<XProfessionSkillMgr>.singleton.GetProfNameIcon(prof);
+ base.uiBehaviour.m_profDetail.SetText(XSingleton<XProfessionSkillMgr>.singleton.GetProfIntro(prof));
+ base.uiBehaviour.m_profType.SetText(XSingleton<XProfessionSkillMgr>.singleton.GetProfTypeIntro(prof));
+ this.SetIntroPoint((int)XSingleton<XProfessionSkillMgr>.singleton.GetProfOperateLevel(prof));
+ }
+
+ public void SwitchProfession(int profID)
+ {
+ bool activeInHierarchy = base.uiBehaviour.m_selectFrame.gameObject.activeInHierarchy;
+ if (activeInHierarchy)
+ {
+ bool flag = this._doc.CurrentProf > 0;
+ if (flag)
+ {
+ this._playForward = true;
+ base.uiBehaviour.m_create_profp[this._doc.CurrentProf - 1].gameObject.transform.Find("Select").gameObject.SetActive(false);
+ }
+ else
+ {
+ this.SetProfIntro(profID);
+ this._playForward = false;
+ }
+ this._doc.CurrentProf = profID;
+ bool flag2 = this._doc.CurrentProf > 0;
+ if (flag2)
+ {
+ base.uiBehaviour.m_create_profp[this._doc.CurrentProf - 1].gameObject.transform.Find("Select").gameObject.SetActive(true);
+ base.uiBehaviour.m_profTween.PlayTween(this._playForward, -1f);
+ }
+ }
+ }
+
+ private bool OnCreateCharButtonClick(IXUIButton go)
+ {
+ string text = base.uiBehaviour.m_createName.GetText();
+ bool flag = text.Length == 0;
+ bool result;
+ if (flag)
+ {
+ result = true;
+ }
+ else
+ {
+ bool flag2 = XSingleton<XAttributeMgr>.singleton.HasNoRoleOnBackFlowServer();
+ if (flag2)
+ {
+ string label = XSingleton<UiUtility>.singleton.ReplaceReturn(XStringDefineProxy.GetString("FirstRoleOnBackServerTip"));
+ string @string = XStringDefineProxy.GetString("CREATE");
+ string string2 = XStringDefineProxy.GetString("COMMON_CANCEL");
+ XSingleton<UiUtility>.singleton.ShowModalDialog(label, @string, string2, new ButtonClickEventHandler(this.CreateBackRole));
+ }
+ else
+ {
+ XSingleton<XLoginDocument>.singleton.CreateChar(text, (RoleType)this._doc.CurrentProf);
+ }
+ result = true;
+ }
+ return result;
+ }
+
+ private bool CreateBackRole(IXUIButton button)
+ {
+ XSingleton<UiUtility>.singleton.CloseModalDlg();
+ XSingleton<XLoginDocument>.singleton.CreateChar(base.uiBehaviour.m_createName.GetText(), (RoleType)this._doc.CurrentProf);
+ return true;
+ }
+
+ public void SetCreateNameVisable(bool state)
+ {
+ base.uiBehaviour.m_createNameFrame.gameObject.SetActive(state);
+ }
+
+ public void SetEnterGameVisable(bool state)
+ {
+ base.uiBehaviour.m_enterworld.SetVisible(state);
+ }
+
+ private void OnRandomNameClick(IXUISprite uiSprite)
+ {
+ bool flag = this._randomNameReader == null;
+ if (flag)
+ {
+ this._randomNameReader = new RandomName();
+ XSingleton<XResourceLoaderMgr>.singleton.ReadFile("Table/RandomName", this._randomNameReader);
+ }
+ string text = "";
+ string text2 = "";
+ while (text == "")
+ {
+ int key = XSingleton<XCommon>.singleton.RandomInt(1, this._randomNameReader.Table.Length);
+ text = this._randomNameReader.GetByID(key).FirstName;
+ }
+ while (text2 == "")
+ {
+ int key2 = XSingleton<XCommon>.singleton.RandomInt(1, this._randomNameReader.Table.Length);
+ text2 = this._randomNameReader.GetByID(key2).LastName;
+ }
+ string text3 = text + text2;
+ base.uiBehaviour.m_createName.SetText(text3);
+ }
+
+ public void ShowSelectCharGerenal()
+ {
+ base.uiBehaviour.m_return.SetVisible(true);
+ base.uiBehaviour.m_selectFrame.gameObject.SetActive(true);
+ base.uiBehaviour.m_createNameFrame.SetActive(false);
+ base.uiBehaviour.m_enterworld.gameObject.SetActive(false);
+ base.uiBehaviour.m_playerNameFrame.gameObject.SetActive(false);
+ this._enterWorld = true;
+ base.uiBehaviour.m_enterworld.SetEnable(true, false);
+ }
+
+ public void ShowSelectCharSelected(string name, int level)
+ {
+ base.uiBehaviour.m_return.SetVisible(true);
+ base.uiBehaviour.m_selectFrame.gameObject.SetActive(true);
+ base.uiBehaviour.m_createNameFrame.SetActive(false);
+ base.uiBehaviour.m_enterworld.gameObject.SetActive(true);
+ base.uiBehaviour.m_enterworld.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnEnterworldButtonClick));
+ base.uiBehaviour.m_enterWorldLabel.SetText(XStringDefineProxy.GetString("START_GAME"));
+ base.uiBehaviour.m_playerNameFrame.gameObject.SetActive(true);
+ base.uiBehaviour.m_playerNameLabel.SetText(name);
+ base.uiBehaviour.m_playerLevelLabel.SetText(string.Format("Lv.{0}", level));
+ this._enterWorld = true;
+ base.uiBehaviour.m_enterworld.SetEnable(true, false);
+ }
+
+ public void ShowSelectCharCreated()
+ {
+ base.uiBehaviour.m_return.SetVisible(true);
+ base.uiBehaviour.m_selectFrame.gameObject.SetActive(true);
+ base.uiBehaviour.m_enterworld.gameObject.SetActive(true);
+ base.uiBehaviour.m_enterworld.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnCreateCharButtonClick));
+ base.uiBehaviour.m_enterWorldLabel.SetText(XStringDefineProxy.GetString("CREATE_CHAR"));
+ base.uiBehaviour.m_playerNameFrame.gameObject.SetActive(false);
+ base.uiBehaviour.m_preLevel.SetText("");
+ bool flag = XSingleton<XAttributeMgr>.singleton.HasNoRoleOnBackFlowServer();
+ if (flag)
+ {
+ base.uiBehaviour.m_preLevel.SetText(string.Format("Lv.{0}", XSingleton<XAttributeMgr>.singleton.LoginExData.backflow_level));
+ }
+ bool flag2 = !base.uiBehaviour.m_createName.IsVisible();
+ if (flag2)
+ {
+ bool flag3 = base.uiBehaviour.m_createName.GetText().Length == 0;
+ if (flag3)
+ {
+ bool flag4 = XSingleton<PDatabase>.singleton.playerInfo != null;
+ if (flag4)
+ {
+ string nickName = XSingleton<PDatabase>.singleton.playerInfo.data.nickName;
+ base.uiBehaviour.m_createName.SetText(nickName);
+ }
+ else
+ {
+ this.OnRandomNameClick(null);
+ }
+ }
+ }
+ base.uiBehaviour.m_createNameFrame.SetActive(true);
+ }
+
+ public override void OnUpdate()
+ {
+ base.OnUpdate();
+ bool flag = base.uiBehaviour.m_createNameFrame != null && base.uiBehaviour.m_createNameFrame.activeSelf;
+ if (flag)
+ {
+ bool flag2 = base.uiBehaviour.m_createName.GetText().Length != 0;
+ bool flag3 = this._enterWorld != flag2;
+ if (flag3)
+ {
+ this._enterWorld = flag2;
+ base.uiBehaviour.m_enterworld.SetEnable(this._enterWorld, false);
+ }
+ }
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/XSelectCharView.cs.meta b/Client/Assets/Scripts/XMainClient/UI/XSelectCharView.cs.meta
new file mode 100644
index 00000000..f944746c
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XSelectCharView.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 01994922897633145af72ad9dbc694e5
+timeCreated: 1611402953
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/XServerActivityView.cs b/Client/Assets/Scripts/XMainClient/UI/XServerActivityView.cs
new file mode 100644
index 00000000..f290a0e8
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XServerActivityView.cs
@@ -0,0 +1,247 @@
+using System;
+using System.Collections.Generic;
+using UILib;
+using UnityEngine;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class XServerActivityView : DlgHandlerBase
+ {
+ public IXUIScrollView m_ScrollView;
+
+ public XUIPool m_RewardPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ public XUIPool m_RewardItemPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ public IXUILabel m_RemainTime;
+
+ protected XAchievementDocument _doc;
+
+ protected uint _remainTime;
+
+ protected uint _timer;
+
+ protected override void Init()
+ {
+ this._doc = (XSingleton<XGame>.singleton.Doc.GetXComponent(XAchievementDocument.uuID) as XAchievementDocument);
+ this._doc.ServerActivityView = this;
+ this.m_RemainTime = (base.PanelObject.transform.Find("RemainTime/Label").GetComponent("XUILabel") as IXUILabel);
+ Transform transform = base.PanelObject.transform.Find("Panel");
+ this.m_ScrollView = (transform.GetComponent("XUIScrollView") as IXUIScrollView);
+ Transform transform2 = base.PanelObject.transform.Find("Panel/RecordTpl/ItemReward/ItemTpl");
+ this.m_RewardItemPool.SetupPool(transform.gameObject, transform2.gameObject, 30u, false);
+ transform2 = base.PanelObject.transform.Find("Panel/RecordTpl");
+ this.m_RewardPool.SetupPool(transform2.parent.gameObject, transform2.gameObject, 10u, false);
+ }
+
+ public void UpdateRedPoint()
+ {
+ this._doc.HasCompleteAchivement(XSysDefine.XSys_ServerActivity);
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ this._remainTime = 0u;
+ RpcC2G_QueryOpenGameActivityTime rpc = new RpcC2G_QueryOpenGameActivityTime();
+ XSingleton<XClientNetwork>.singleton.Send(rpc);
+ this.RefreshList();
+ }
+
+ public override void OnUnload()
+ {
+ this._remainTime = 0u;
+ bool flag = this._timer > 0u;
+ if (flag)
+ {
+ XSingleton<XTimerMgr>.singleton.KillTimer(this._timer);
+ }
+ base.OnUnload();
+ this._doc.ServerActivityView = null;
+ }
+
+ protected string GetActivityString(string format, int catergory, int param, AchivementState state)
+ {
+ string result;
+ if (catergory - 502 > 1)
+ {
+ bool flag = state == AchivementState.Not_Achive || state == AchivementState.Exceed;
+ if (flag)
+ {
+ result = string.Format(format, "[ff0000]" + param + "[-]");
+ }
+ else
+ {
+ result = string.Format(format, "[00ff00]" + param + "[-]");
+ }
+ }
+ else
+ {
+ SceneTable.RowData sceneData = XSingleton<XSceneMgr>.singleton.GetSceneData((uint)param);
+ bool flag2 = state == AchivementState.Not_Achive || state == AchivementState.Exceed;
+ if (flag2)
+ {
+ result = string.Format(format, "[ff0000]" + sceneData.Comment + "[-]");
+ }
+ else
+ {
+ result = string.Format(format, "[00ff00]" + sceneData.Comment + "[-]");
+ }
+ }
+ return result;
+ }
+
+ protected bool OnFetchClicked(IXUIButton button)
+ {
+ this._doc.FetchAchivement((uint)button.ID);
+ return true;
+ }
+
+ protected bool OnLinkToClick(IXUIButton button)
+ {
+ return true;
+ }
+
+ private int ActivityCompare(int act1, int act2)
+ {
+ AchivementState achivementState = this._doc.GetAchivementState((uint)act1);
+ AchivementState achivementState2 = this._doc.GetAchivementState((uint)act2);
+ bool flag = achivementState > achivementState2;
+ int result;
+ if (flag)
+ {
+ result = -1;
+ }
+ else
+ {
+ bool flag2 = achivementState < achivementState2;
+ if (flag2)
+ {
+ result = 1;
+ }
+ else
+ {
+ result = act1.CompareTo(act2);
+ }
+ }
+ return result;
+ }
+
+ public void RefreshList()
+ {
+ this.UpdateRedPoint();
+ this.m_RewardPool.ReturnAll(false);
+ this.m_RewardItemPool.ReturnAll(false);
+ this.m_ScrollView.SetPosition(0f);
+ List<int> catergoryActivity = this._doc.GetCatergoryActivity(501);
+ bool flag = catergoryActivity == null || catergoryActivity.Count <= 0;
+ if (!flag)
+ {
+ catergoryActivity.Sort(new Comparison<int>(this.ActivityCompare));
+ for (int i = 0; i < catergoryActivity.Count; i++)
+ {
+ GameObject gameObject = this.m_RewardPool.FetchGameObject(false);
+ gameObject.name = "record" + catergoryActivity[i];
+ gameObject.transform.localPosition = this.m_RewardPool.TplPos - new Vector3(0f, (float)(this.m_RewardPool.TplHeight * i));
+ AchivementTable.RowData achivementData = this._doc.GetAchivementData((uint)catergoryActivity[i]);
+ bool flag2 = achivementData != null;
+ if (flag2)
+ {
+ AchivementState achivementState = this._doc.GetAchivementState((uint)achivementData.AchievementID);
+ IXUILabel ixuilabel = gameObject.transform.Find("Name").GetComponent("XUILabel") as IXUILabel;
+ string activityString = this.GetActivityString(achivementData.AchievementDescription, achivementData.AchievementCategory, achivementData.AchievementParam, achivementState);
+ ixuilabel.SetText(activityString);
+ IXUIButton ixuibutton = gameObject.transform.Find("Fetch").GetComponent("XUIButton") as IXUIButton;
+ ixuibutton.ID = (ulong)((long)catergoryActivity[i]);
+ ixuibutton.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnFetchClicked));
+ GameObject gameObject2 = gameObject.transform.Find("Fetched").gameObject;
+ GameObject gameObject3 = gameObject.transform.Find("LinkTo").gameObject;
+ IXUIProgress ixuiprogress = gameObject.transform.Find("Progress").GetComponent("XUIProgress") as IXUIProgress;
+ ixuiprogress.gameObject.SetActive(false);
+ ixuibutton.gameObject.SetActive(false);
+ gameObject2.SetActive(false);
+ gameObject3.SetActive(false);
+ bool flag3 = achivementData.AchievementCategory == 504;
+ if (flag3)
+ {
+ ixuiprogress.gameObject.SetActive(true);
+ XFashionDocument specificDocument = XDocuments.GetSpecificDocument<XFashionDocument>(XFashionDocument.uuID);
+ int count = specificDocument.FashionBag.Count;
+ ixuiprogress.value = (float)count / (float)achivementData.AchievementParam;
+ IXUILabel ixuilabel2 = gameObject.transform.Find("Progress/T").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel2.SetText(string.Format("{0}/{1}", count, achivementData.AchievementParam));
+ }
+ switch (achivementState)
+ {
+ case AchivementState.Exceed:
+ ixuibutton.gameObject.SetActive(true);
+ ixuibutton.SetEnable(false, false);
+ break;
+ case AchivementState.Fetched:
+ gameObject2.SetActive(true);
+ break;
+ case AchivementState.Not_Achive:
+ gameObject3.SetActive(true);
+ break;
+ case AchivementState.Achive_NoFetch:
+ ixuibutton.gameObject.SetActive(true);
+ ixuibutton.SetEnable(true, false);
+ break;
+ }
+ Transform parent = gameObject.transform.Find("ItemReward");
+ for (int j = 0; j < achivementData.AchievementItem.Count; j++)
+ {
+ int num = achivementData.AchievementItem[j, 0];
+ GameObject gameObject4 = this.m_RewardItemPool.FetchGameObject(false);
+ gameObject4.name = "reward item " + num;
+ gameObject4.transform.parent = parent;
+ gameObject4.transform.localPosition = this.m_RewardItemPool.TplPos + new Vector3((float)(this.m_RewardItemPool.TplWidth * j), 0f);
+ XSingleton<XItemDrawerMgr>.singleton.normalItemDrawer.DrawItem(gameObject4, num, achivementData.AchievementItem[j, 1], false);
+ IXUISprite ixuisprite = gameObject4.transform.Find("Icon").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.ID = (ulong)((long)num);
+ ixuisprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(XSingleton<UiUtility>.singleton.OnItemClick));
+ }
+ }
+ }
+ }
+ }
+
+ public void SetRemainTime(uint second)
+ {
+ this._remainTime = second;
+ this._RemainTime();
+ }
+
+ public void UpateRemainTime(object param)
+ {
+ bool flag = this._remainTime > 0u;
+ if (flag)
+ {
+ this._remainTime -= 1u;
+ this._RemainTime();
+ }
+ }
+
+ protected void _RemainTime()
+ {
+ bool flag = !base.IsVisible();
+ if (!flag)
+ {
+ bool flag2 = this._remainTime > 0u;
+ if (flag2)
+ {
+ string @string = XStringDefineProxy.GetString("REMAIN_TIME");
+ string text = XSingleton<UiUtility>.singleton.TimeFormatSince1970((int)this._remainTime, @string, false);
+ this.m_RemainTime.SetText(text);
+ this._timer = XSingleton<XTimerMgr>.singleton.SetTimer(1f, new XTimerMgr.ElapsedEventHandler(this.UpateRemainTime), null);
+ }
+ else
+ {
+ string string2 = XStringDefineProxy.GetString("GUILD_REDPACKET_TIMEOVER");
+ this.m_RemainTime.SetText(string2);
+ }
+ }
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/XServerActivityView.cs.meta b/Client/Assets/Scripts/XMainClient/UI/XServerActivityView.cs.meta
new file mode 100644
index 00000000..c556ab81
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XServerActivityView.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: e5ad225f191e4694290ca15ce9ac9f8a
+timeCreated: 1611404743
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/XShowGetItemUIBehaviour.cs b/Client/Assets/Scripts/XMainClient/UI/XShowGetItemUIBehaviour.cs
new file mode 100644
index 00000000..c11f96f5
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XShowGetItemUIBehaviour.cs
@@ -0,0 +1,30 @@
+using System;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class XShowGetItemUIBehaviour : DlgBehaviourBase
+ {
+ public XUIPool m_ShowItemPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ public GameObject m_itemTpl;
+
+ public IXUISprite m_sprBgTip;
+
+ public IXUITweenTool m_tweenBg;
+
+ public IXUITweener m_tweener;
+
+ private void Awake()
+ {
+ this.m_itemTpl = base.transform.Find("Bg/TipTpl/ItemTpl").gameObject;
+ this.m_ShowItemPool.SetupPool(this.m_itemTpl.transform.parent.gameObject, this.m_itemTpl, 4u, false);
+ this.m_sprBgTip = (base.transform.Find("Bg/TipTpl").GetComponent("XUISprite") as IXUISprite);
+ this.m_tweenBg = (base.transform.Find("Bg/TipTpl").GetComponent("XUIPlayTween") as IXUITweenTool);
+ this.m_tweener = (base.transform.Find("Bg/TipTpl").GetComponent("XUITweener") as IXUITweener);
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/XShowGetItemUIBehaviour.cs.meta b/Client/Assets/Scripts/XMainClient/UI/XShowGetItemUIBehaviour.cs.meta
new file mode 100644
index 00000000..97a6fef4
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XShowGetItemUIBehaviour.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 8c4c086ac8edae747946de07f6cbb8ae
+timeCreated: 1611404099
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/XShowGetItemUIView.cs b/Client/Assets/Scripts/XMainClient/UI/XShowGetItemUIView.cs
new file mode 100644
index 00000000..79b96ed0
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XShowGetItemUIView.cs
@@ -0,0 +1,200 @@
+using System;
+using System.Collections.Generic;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class XShowGetItemUIView : DlgBase<XShowGetItemUIView, XShowGetItemUIBehaviour>
+ {
+ public override string fileName
+ {
+ get
+ {
+ return "GameSystem/ShowGetItemDlg";
+ }
+ }
+
+ public override bool autoload
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override bool needOnTop
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override bool isHideChat
+ {
+ get
+ {
+ return false;
+ }
+ }
+
+ private XShowGetItemDocument _doc = null;
+
+ private List<XItem> m_items = new List<XItem>();
+
+ private uint m_token = 0u;
+
+ private OnTweenFinishEventHandler mAnimEnd;
+
+ public bool isPlaying = false;
+
+ protected override void OnHide()
+ {
+ XSingleton<XTimerMgr>.singleton.KillTimer(this.m_token);
+ base.OnHide();
+ }
+
+ protected override void OnUnload()
+ {
+ XSingleton<XTimerMgr>.singleton.KillTimer(this.m_token);
+ base.OnUnload();
+ }
+
+ protected override void Init()
+ {
+ base.Init();
+ bool flag = this._doc == null;
+ if (flag)
+ {
+ this._doc = XDocuments.GetSpecificDocument<XShowGetItemDocument>(XShowGetItemDocument.uuID);
+ }
+ }
+
+ protected override void OnShow()
+ {
+ }
+
+ private void Print(List<XItem> _items, string tag)
+ {
+ for (int i = 0; i < _items.Count; i++)
+ {
+ XSingleton<XDebug>.singleton.AddGreenLog(XSingleton<XCommon>.singleton.StringCombine(tag, string.Concat(new object[]
+ {
+ " itemid:",
+ _items[i].itemID,
+ " cnt:",
+ _items[i].itemCount
+ })), null, null, null, null, null);
+ }
+ }
+
+ public void ShowItems(List<XItem> _items, OnTweenFinishEventHandler _end)
+ {
+ bool flag = this._doc == null;
+ if (flag)
+ {
+ this._doc = XDocuments.GetSpecificDocument<XShowGetItemDocument>(XShowGetItemDocument.uuID);
+ }
+ bool flag2 = XEquipCreateDocument.Doc.IsForbidGetItemUI || this._doc.IsForbidByLua;
+ if (flag2)
+ {
+ this.SetVisible(false, true);
+ XShowGetItemDocument.ItemUIQueue.Clear();
+ }
+ else
+ {
+ bool flag3 = !base.IsVisible();
+ if (flag3)
+ {
+ this.SetVisibleWithAnimation(true, null);
+ }
+ this.isPlaying = true;
+ this.mAnimEnd = _end;
+ this.m_items = _items;
+ base.uiBehaviour.m_ShowItemPool.ReturnAll(false);
+ this.GridItems();
+ base.uiBehaviour.m_tweenBg.ResetTween(true);
+ base.uiBehaviour.m_tweenBg.PlayTween(true, -1f);
+ XSingleton<XTimerMgr>.singleton.KillTimer(this.m_token);
+ XSingleton<XDebug>.singleton.AddGreenLog(base.uiBehaviour.m_tweener.Duration.ToString(), null, null, null, null, null);
+ this.m_token = XSingleton<XTimerMgr>.singleton.SetTimer(base.uiBehaviour.m_tweener.Duration, new XTimerMgr.ElapsedEventHandler(this.OnPlayEnd), base.uiBehaviour.m_tweenBg);
+ }
+ }
+
+ public void OnPlayEnd(object o = null)
+ {
+ bool flag = o != null;
+ if (flag)
+ {
+ IXUITweenTool tween = o as IXUITweenTool;
+ this.isPlaying = false;
+ bool flag2 = this.mAnimEnd != null;
+ if (flag2)
+ {
+ XSingleton<XDebug>.singleton.AddLog("play end!", null, null, null, null, null, XDebugColor.XDebug_None);
+ this.mAnimEnd(tween);
+ }
+ }
+ XSingleton<XDebug>.singleton.AddGreenLog("the end event", null, null, null, null, null);
+ }
+
+ public void OnPlayEnd(IXUITweenTool tween)
+ {
+ this.isPlaying = false;
+ bool flag = this.mAnimEnd != null;
+ if (flag)
+ {
+ XSingleton<XDebug>.singleton.AddLog("play end!", null, null, null, null, null, XDebugColor.XDebug_None);
+ this.mAnimEnd(tween);
+ }
+ }
+
+ public void HandlePlayEnd()
+ {
+ bool flag = base.uiBehaviour != null && base.uiBehaviour.m_ShowItemPool != null;
+ if (flag)
+ {
+ base.uiBehaviour.m_ShowItemPool.ReturnAll(false);
+ }
+ }
+
+ private void GridItems()
+ {
+ int count = this.m_items.Count;
+ Vector3 localPosition;
+ localPosition= new Vector3(200f, -12f, 0f);
+ base.uiBehaviour.m_sprBgTip.spriteHeight = ((count > 5) ? 300 : 250);
+ for (int i = 0; i < count; i++)
+ {
+ bool flag = count > 5;
+ if (flag)
+ {
+ int num = (count % 2 == 0) ? (count / 2) : (count / 2 + 1);
+ bool flag2 = i < num;
+ if (flag2)
+ {
+ localPosition.x = 100f * ((float)i - (float)(num - 1) / 2f);
+ localPosition.y = -120f;
+ }
+ else
+ {
+ localPosition.x = 100f * ((float)(i - num) - (float)(count - num - 1) / 2f);
+ localPosition.y = -220f;
+ }
+ }
+ else
+ {
+ localPosition.x = 100f * ((float)i - (float)(count - 1) / 2f);
+ localPosition.y = -145f;
+ }
+ GameObject gameObject = base.uiBehaviour.m_ShowItemPool.FetchGameObject(false);
+ gameObject.name = "item" + i;
+ gameObject.transform.localPosition = localPosition;
+ XSingleton<XItemDrawerMgr>.singleton.DrawItem(gameObject, this.m_items[i]);
+ }
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/XShowGetItemUIView.cs.meta b/Client/Assets/Scripts/XMainClient/UI/XShowGetItemUIView.cs.meta
new file mode 100644
index 00000000..1e65cac0
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XShowGetItemUIView.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 2e1dc08c17a0954408839fb674367f50
+timeCreated: 1611403508
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/XShowGetItemView.cs b/Client/Assets/Scripts/XMainClient/UI/XShowGetItemView.cs
new file mode 100644
index 00000000..3ebf2a58
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XShowGetItemView.cs
@@ -0,0 +1,223 @@
+using System;
+using System.Collections.Generic;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class XShowGetItemView : DlgBase<XShowGetItemView, XShowGetItemBehaviour>
+ {
+ public override string fileName
+ {
+ get
+ {
+ return "GameSystem/ShowGetItemTip";
+ }
+ }
+
+ public override bool autoload
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override bool needOnTop
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override bool isHideChat
+ {
+ get
+ {
+ return false;
+ }
+ }
+
+ private XShowGetItemDocument _doc = null;
+
+ private GameObject _preShowItem = null;
+
+ private int _showCount;
+
+ protected override void Init()
+ {
+ base.Init();
+ this._doc = XDocuments.GetSpecificDocument<XShowGetItemDocument>(XShowGetItemDocument.uuID);
+ }
+
+ protected override void OnShow()
+ {
+ this._showCount = 0;
+ base.uiBehaviour.m_ShowItemPool.ReturnAll(false);
+ }
+
+ public void ShowItem(XItem item)
+ {
+ bool flag = this._doc.IsForbidGetItemUI || this._doc.IsForbidByLua;
+ if (flag)
+ {
+ this._doc.ItemQueue.Clear();
+ this.SetVisible(false, true);
+ }
+ else
+ {
+ bool flag2 = !base.IsVisible();
+ if (flag2)
+ {
+ this.SetVisible(true, true);
+ }
+ this._showCount++;
+ GameObject gameObject = base.uiBehaviour.m_ShowItemPool.FetchGameObject(false);
+ gameObject.transform.localPosition = base.uiBehaviour.m_ShowItemPool.TplPos;
+ bool flag3 = this._preShowItem != null;
+ if (flag3)
+ {
+ bool activeSelf = this._preShowItem.activeSelf;
+ if (activeSelf)
+ {
+ this._preShowItem.transform.parent = gameObject.transform;
+ }
+ }
+ this._preShowItem = gameObject;
+ IXUILabel ixuilabel = gameObject.transform.Find("Text").GetComponent("XUILabel") as IXUILabel;
+ string text = string.Format("[{0}]{1}", XSingleton<UiUtility>.singleton.GetItemQualityRGB((int)XBagDocument.GetItemConf(item.itemID).ItemQuality).ToString(), XSingleton<UiUtility>.singleton.ChooseProfString(XBagDocument.GetItemConf(item.itemID).ItemName, 0u));
+ ixuilabel.SetText(string.Format("{0}[ffffff]x{1}", XStringDefineProxy.GetString("GET_ITEM", new object[]
+ {
+ text
+ }), item.itemCount.ToString()));
+ IXUITweenTool ixuitweenTool = gameObject.transform.GetComponent("XUIPlayTween") as IXUITweenTool;
+ ixuitweenTool.SetTargetGameObject(gameObject);
+ ixuitweenTool.RegisterOnFinishEventHandler(new OnTweenFinishEventHandler(this.OnPlayTweenFinish));
+ ixuitweenTool.PlayTween(true, -1f);
+ }
+ }
+
+ public void ShowTip(string tip)
+ {
+ bool flag = !base.IsVisible();
+ if (flag)
+ {
+ this.SetVisible(true, true);
+ }
+ this._showCount++;
+ GameObject gameObject = base.uiBehaviour.m_ShowItemPool.FetchGameObject(false);
+ gameObject.transform.localPosition = base.uiBehaviour.m_ShowItemPool.TplPos;
+ bool flag2 = this._preShowItem != null;
+ if (flag2)
+ {
+ bool activeSelf = this._preShowItem.activeSelf;
+ if (activeSelf)
+ {
+ this._preShowItem.transform.parent = gameObject.transform;
+ }
+ }
+ this._preShowItem = gameObject;
+ IXUILabel ixuilabel = gameObject.transform.Find("Text").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel.SetText(tip);
+ IXUITweenTool ixuitweenTool = gameObject.transform.GetComponent("XUIPlayTween") as IXUITweenTool;
+ ixuitweenTool.SetTargetGameObject(gameObject);
+ ixuitweenTool.RegisterOnFinishEventHandler(new OnTweenFinishEventHandler(this.OnPlayTweenFinish));
+ ixuitweenTool.PlayTween(true, -1f);
+ }
+
+ public void ShowFullTip(int Count)
+ {
+ bool flag = !base.IsVisible();
+ if (flag)
+ {
+ this.SetVisible(true, true);
+ }
+ this._showCount++;
+ GameObject gameObject = base.uiBehaviour.m_ShowItemPool.FetchGameObject(false);
+ gameObject.transform.localPosition = base.uiBehaviour.m_ShowItemPool.TplPos;
+ bool flag2 = this._preShowItem != null;
+ if (flag2)
+ {
+ bool activeSelf = this._preShowItem.activeSelf;
+ if (activeSelf)
+ {
+ this._preShowItem.transform.parent = gameObject.transform;
+ }
+ }
+ this._preShowItem = gameObject;
+ IXUILabel ixuilabel = gameObject.transform.Find("Text").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel.SetText(XStringDefineProxy.GetString("EXCEED_ITEM", new object[]
+ {
+ Count
+ }));
+ IXUITweenTool ixuitweenTool = gameObject.transform.GetComponent("XUIPlayTween") as IXUITweenTool;
+ ixuitweenTool.SetTargetGameObject(gameObject);
+ ixuitweenTool.RegisterOnFinishEventHandler(new OnTweenFinishEventHandler(this.OnPlayTweenFinish));
+ ixuitweenTool.PlayTween(true, -1f);
+ }
+
+ public void ShowString(string str, uint id)
+ {
+ bool flag = !base.IsVisible();
+ if (flag)
+ {
+ this.SetVisible(true, true);
+ }
+ this._showCount++;
+ GameObject gameObject = base.uiBehaviour.m_ShowItemPool.FetchGameObject(false);
+ gameObject.transform.localPosition = base.uiBehaviour.m_ShowItemPool.TplPos;
+ bool flag2 = this._preShowItem != null;
+ if (flag2)
+ {
+ bool activeSelf = this._preShowItem.activeSelf;
+ if (activeSelf)
+ {
+ this._preShowItem.transform.parent = gameObject.transform;
+ }
+ }
+ this._preShowItem = gameObject;
+ IXUILabel ixuilabel = gameObject.transform.Find("Text").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel.SetText(str);
+ ixuilabel.ID = (ulong)id;
+ IXUITweenTool ixuitweenTool = gameObject.transform.GetComponent("XUIPlayTween") as IXUITweenTool;
+ ixuitweenTool.SetTargetGameObject(gameObject);
+ ixuitweenTool.RegisterOnFinishEventHandler(new OnTweenFinishEventHandler(this.OnPlayTweenFinish));
+ ixuitweenTool.PlayTween(true, -1f);
+ }
+
+ public void EditString(string str, uint id)
+ {
+ List<GameObject> list = ListPool<GameObject>.Get();
+ base.uiBehaviour.m_ShowItemPool.GetActiveList(list);
+ for (int i = 0; i < list.Count; i++)
+ {
+ IXUILabel ixuilabel = list[i].transform.Find("Text").GetComponent("XUILabel") as IXUILabel;
+ bool flag = ixuilabel.ID != (ulong)id;
+ if (!flag)
+ {
+ ixuilabel.SetText(str);
+ break;
+ }
+ }
+ ListPool<GameObject>.Release(list);
+ }
+
+ public void OnPlayTweenFinish(IXUITweenTool iPlayTween)
+ {
+ bool flag = !base.IsVisible();
+ if (!flag)
+ {
+ base.uiBehaviour.m_ShowItemPool.ReturnInstance(iPlayTween.gameObject, true);
+ this._showCount--;
+ bool flag2 = this._showCount == 0;
+ if (flag2)
+ {
+ this.SetVisible(false, true);
+ }
+ }
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/XShowGetItemView.cs.meta b/Client/Assets/Scripts/XMainClient/UI/XShowGetItemView.cs.meta
new file mode 100644
index 00000000..cba36f32
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XShowGetItemView.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: beb6e5994ea4e0749b7c18a989046207
+timeCreated: 1611404481
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/XSparkController.cs b/Client/Assets/Scripts/XMainClient/UI/XSparkController.cs
new file mode 100644
index 00000000..e54469e7
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XSparkController.cs
@@ -0,0 +1,111 @@
+using System;
+using System.Collections.Generic;
+using UILib;
+using UnityEngine;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class XSparkController
+ {
+ public Rect Region { get; set; }
+
+ public uint Count { get; set; }
+
+ private XUIPool m_Pool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ private float _ScaleMin = 1f;
+
+ private float _ScaleMax = 2f;
+
+ private float _DelayMin = 1f;
+
+ private float _DelayMax = 6f;
+
+ private int _FrameRateMin = 10;
+
+ private int _FrameRateMax = 20;
+
+ private Dictionary<GameObject, uint> m_TimeTokens = new Dictionary<GameObject, uint>();
+
+ public void InitSprite(GameObject parent, GameObject target)
+ {
+ this.m_Pool.SetupPool(parent, target, 2u, false);
+ }
+
+ public void InitScaleRange(float min, float max)
+ {
+ this._ScaleMax = max;
+ this._ScaleMin = min;
+ }
+
+ public void InitDelayRange(float min, float max)
+ {
+ this._DelayMax = max;
+ this._DelayMin = min;
+ }
+
+ public void InitFrameRateRange(int min, int max)
+ {
+ this._FrameRateMax = max;
+ this._FrameRateMin = min;
+ }
+
+ public void Setup()
+ {
+ this.StopAll();
+ this.m_Pool.FakeReturnAll();
+ int num = 0;
+ while ((long)num < (long)((ulong)this.Count))
+ {
+ GameObject gameObject = this.m_Pool.FetchGameObject(false);
+ IXUISpriteAnimation ixuispriteAnimation = gameObject.GetComponent("XUISpriteAnimation") as IXUISpriteAnimation;
+ ixuispriteAnimation.RegisterFinishCallback(new SpriteAnimationFinishCallback(this._OnSparkFinish));
+ this._GenerateSpark(gameObject, true);
+ num++;
+ }
+ this.m_Pool.ActualReturnAll(false);
+ }
+
+ public void StopAll()
+ {
+ foreach (uint token in this.m_TimeTokens.Values)
+ {
+ XSingleton<XTimerMgr>.singleton.KillTimer(token);
+ }
+ this.m_TimeTokens.Clear();
+ }
+
+ private void _GenerateSpark(GameObject go, bool bStart)
+ {
+ float interval = XSingleton<XCommon>.singleton.RandomFloat(this._DelayMin, this._DelayMax);
+ int frameRate = XSingleton<XCommon>.singleton.RandomInt(this._FrameRateMin, this._FrameRateMax);
+ float num = XSingleton<XCommon>.singleton.RandomFloat(this._ScaleMin, this._ScaleMax);
+ Vector3 localPosition;
+ localPosition.x = XSingleton<XCommon>.singleton.RandomFloat(this.Region.xMin, this.Region.xMax);
+ localPosition.y = XSingleton<XCommon>.singleton.RandomFloat(this.Region.yMin, this.Region.yMax);
+ localPosition.z = 0f;
+ IXUISpriteAnimation ixuispriteAnimation = go.GetComponent("XUISpriteAnimation") as IXUISpriteAnimation;
+ ixuispriteAnimation.SetFrameRate(frameRate);
+ go.transform.localScale = Vector3.one * num;
+ go.transform.localPosition = localPosition;
+ uint value = XSingleton<XTimerMgr>.singleton.SetTimer(interval, new XTimerMgr.ElapsedEventHandler(this._SparkShow), go);
+ this.m_TimeTokens.Add(go, value);
+ go.SetActive(false);
+ }
+
+ private void _SparkShow(object o)
+ {
+ GameObject gameObject = o as GameObject;
+ IXUISpriteAnimation ixuispriteAnimation = gameObject.GetComponent("XUISpriteAnimation") as IXUISpriteAnimation;
+ ixuispriteAnimation.Reset();
+ gameObject.SetActive(true);
+ this.m_TimeTokens.Remove(gameObject);
+ }
+
+ private void _OnSparkFinish(IXUISpriteAnimation anim)
+ {
+ this._GenerateSpark(anim.gameObject, false);
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/XSparkController.cs.meta b/Client/Assets/Scripts/XMainClient/UI/XSparkController.cs.meta
new file mode 100644
index 00000000..27a0eee1
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XSparkController.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 83114530066887942b87130ab4b9f846
+timeCreated: 1611404042
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/XSpriteAttributeAHandler.cs b/Client/Assets/Scripts/XMainClient/UI/XSpriteAttributeAHandler.cs
new file mode 100644
index 00000000..1e2849ff
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XSpriteAttributeAHandler.cs
@@ -0,0 +1,203 @@
+using System;
+using System.Collections.Generic;
+using KKSG;
+using UILib;
+using UnityEngine;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class XSpriteAttributeAHandler : DlgHandlerBase
+ {
+ protected override string FileName
+ {
+ get
+ {
+ return "GameSystem/SpriteSystem/SpriteAptitude";
+ }
+ }
+
+ private XUIPool m_AptitudePool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ private IXUIList m_AptitudeList;
+
+ private Dictionary<uint, double> aptitudeCompareData = new Dictionary<uint, double>();
+
+ protected override void Init()
+ {
+ base.Init();
+ this.m_AptitudeList = (base.PanelObject.transform.Find("Grid").GetComponent("XUIList") as IXUIList);
+ Transform transform = base.PanelObject.transform.Find("Grid/Tpl");
+ this.m_AptitudePool.SetupPool(transform.parent.gameObject, transform.gameObject, 5u, false);
+ }
+
+ public void SetSpriteAttributeInfo(SpriteInfo spriteData, XAttributes attributes, SpriteInfo compareData = null)
+ {
+ bool flag = spriteData == null;
+ if (flag)
+ {
+ this.m_AptitudePool.ReturnAll(false);
+ }
+ else
+ {
+ this.PreProcessComparedData(compareData, attributes);
+ this.CreateSpriteAptitude(spriteData.AddValue, spriteData.AttrID, spriteData.SpriteID, attributes, false);
+ }
+ }
+
+ public void SetSpriteAttributeInfo(uint spriteID)
+ {
+ this.aptitudeCompareData.Clear();
+ XSpriteSystemDocument specificDocument = XDocuments.GetSpecificDocument<XSpriteSystemDocument>(XSpriteSystemDocument.uuID);
+ SpriteTable.RowData bySpriteID = specificDocument._SpriteTable.GetBySpriteID(spriteID);
+ bool flag = bySpriteID == null;
+ if (!flag)
+ {
+ List<uint> attrID = new List<uint>();
+ List<double> list = new List<double>();
+ List<double> addValue = new List<double>();
+ XSpriteAttributeHandler.GetLevelOneSpriteAttr(bySpriteID, out attrID, out list, out addValue);
+ this.CreateSpriteAptitude(addValue, attrID, spriteID, null, true);
+ }
+ }
+
+ private void PreProcessComparedData(SpriteInfo compareData, XAttributes attributes = null)
+ {
+ this.aptitudeCompareData.Clear();
+ bool flag = compareData != null;
+ if (flag)
+ {
+ XSpriteSystemDocument specificDocument = XDocuments.GetSpecificDocument<XSpriteSystemDocument>(XSpriteSystemDocument.uuID);
+ for (int i = 0; i < compareData.AddValue.Count; i++)
+ {
+ bool flag2 = i < compareData.AttrID.Count;
+ if (flag2)
+ {
+ this.aptitudeCompareData[compareData.AttrID[i]] = specificDocument.CalAptitude(compareData.AttrID[i], compareData.AddValue[i], attributes);
+ }
+ else
+ {
+ XSingleton<XDebug>.singleton.AddErrorLog("Cannot Find Aptitude ID", null, null, null, null, null);
+ }
+ }
+ }
+ }
+
+ private void CreateSpriteAptitude(List<double> addValue, List<uint> attrID, uint spriteID, XAttributes attributes, bool readTable = false)
+ {
+ XSpriteSystemDocument specificDocument = XDocuments.GetSpecificDocument<XSpriteSystemDocument>(XSpriteSystemDocument.uuID);
+ this.m_AptitudePool.FakeReturnAll();
+ int i = 0;
+ while (i < addValue.Count)
+ {
+ bool flag = i < attrID.Count;
+ if (flag)
+ {
+ bool flag2 = attrID[i] == 0u;
+ if (!flag2)
+ {
+ GameObject obj = this.m_AptitudePool.FetchGameObject(false);
+ double num = specificDocument.CalAptitude(attrID[i], addValue[i], attributes);
+ this.SetAptitudeInfo(obj, attrID[i], this.GetMinAttr(spriteID, i), readTable ? ((uint)num / 100u) : ((uint)num), (uint)specificDocument.GetMaxAptitude(spriteID, i) / 100u);
+ }
+ }
+ else
+ {
+ XSingleton<XDebug>.singleton.AddErrorLog("Cannot Find Aptitude ID", null, null, null, null, null);
+ }
+ IL_B2:
+ i++;
+ continue;
+ goto IL_B2;
+ }
+ this.m_AptitudeList.Refresh();
+ this.m_AptitudePool.ActualReturnAll(false);
+ }
+
+ private uint GetMinAttr(uint spriteID, int index)
+ {
+ XSpriteSystemDocument specificDocument = XDocuments.GetSpecificDocument<XSpriteSystemDocument>(XSpriteSystemDocument.uuID);
+ SpriteTable.RowData bySpriteID = specificDocument._SpriteTable.GetBySpriteID(spriteID);
+ uint result;
+ switch (index)
+ {
+ case 0:
+ result = bySpriteID.Range1[0];
+ break;
+ case 1:
+ result = bySpriteID.Range2[0];
+ break;
+ case 2:
+ result = bySpriteID.Range3[0];
+ break;
+ case 3:
+ result = bySpriteID.Range4[0];
+ break;
+ case 4:
+ result = bySpriteID.Range5[0];
+ break;
+ default:
+ XSingleton<XDebug>.singleton.AddErrorLog("GetMaxAptitude error. index is out of the range. index = ", index.ToString(), null, null, null, null);
+ result = 0u;
+ break;
+ }
+ return result;
+ }
+
+ private void SetAptitudeInfo(GameObject obj, uint attrID, uint minAttr, uint attrValue, uint attrMax)
+ {
+ IXUILabel ixuilabel = obj.transform.Find("Name").GetComponent("XUILabel") as IXUILabel;
+ IXUIProgress ixuiprogress = obj.transform.Find("Progress Bar").GetComponent("XUIProgress") as IXUIProgress;
+ IXUILabel ixuilabel2 = obj.transform.Find("Value").GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel3 = obj.transform.Find("ValueMax").GetComponent("XUILabel") as IXUILabel;
+ string format = "Sprite_{0}";
+ XAttributeDefine xattributeDefine = (XAttributeDefine)attrID;
+ string key = string.Format(format, xattributeDefine.ToString());
+ ixuilabel.SetText(XStringDefineProxy.GetString(key));
+ ixuilabel3.SetText(XSingleton<XCommon>.singleton.StringCombine("/", attrMax.ToString()));
+ float num = float.Parse(XSingleton<XGlobalConfig>.singleton.GetValue("SpriteAptitudePBarBeginValueRatio"));
+ float num2 = minAttr * num / 100f;
+ ixuiprogress.value = ((attrMax - num2 == 0f) ? 1f : ((attrValue - num2) / (attrMax - num2)));
+ ixuilabel2.SetText(attrValue.ToString());
+ bool flag = this.aptitudeCompareData.Count > 0;
+ if (flag)
+ {
+ double num3 = 0.0;
+ bool flag2 = this.aptitudeCompareData.TryGetValue(attrID, out num3);
+ if (flag2)
+ {
+ bool flag3 = attrValue > (uint)num3;
+ if (flag3)
+ {
+ ixuilabel2.SetText(XStringDefineProxy.GetString("SpriteAttributeUpColor", new object[]
+ {
+ attrValue
+ }));
+ }
+ else
+ {
+ bool flag4 = attrValue < (uint)num3;
+ if (flag4)
+ {
+ ixuilabel2.SetText(XStringDefineProxy.GetString("SpriteAttributeDownColor", new object[]
+ {
+ attrValue
+ }));
+ }
+ else
+ {
+ ixuilabel2.SetText(attrValue.ToString());
+ }
+ }
+ }
+ else
+ {
+ ixuilabel2.SetText(XStringDefineProxy.GetString("SpriteAttributeUpColor", new object[]
+ {
+ attrValue
+ }));
+ }
+ }
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/XSpriteAttributeAHandler.cs.meta b/Client/Assets/Scripts/XMainClient/UI/XSpriteAttributeAHandler.cs.meta
new file mode 100644
index 00000000..dd75d600
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XSpriteAttributeAHandler.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: ad9af44f705fdbd4ea65b27c7ee71a10
+timeCreated: 1611404335
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/XSpriteAttributeHandler.cs b/Client/Assets/Scripts/XMainClient/UI/XSpriteAttributeHandler.cs
new file mode 100644
index 00000000..43e03123
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XSpriteAttributeHandler.cs
@@ -0,0 +1,87 @@
+using System;
+using System.Collections.Generic;
+using KKSG;
+using UnityEngine;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class XSpriteAttributeHandler : DlgHandlerBase
+ {
+ protected override string FileName
+ {
+ get
+ {
+ return "GameSystem/SpriteSystem/SpriteAttributeFrame";
+ }
+ }
+
+ private XSpriteAttributePHandler m_PropertyHandler;
+
+ private XSpriteAttributeAHandler m_AptitudeHandler;
+
+ private XSpriteAttributeSHandler m_SkillHandler;
+
+ protected override void Init()
+ {
+ base.Init();
+ Transform parent = base.PanelObject.transform.Find("SpriteAptitudeRoot");
+ DlgHandlerBase.EnsureCreate<XSpriteAttributeAHandler>(ref this.m_AptitudeHandler, parent, true, this);
+ Transform parent2 = base.PanelObject.transform.Find("SpriteAttributeRoot");
+ DlgHandlerBase.EnsureCreate<XSpriteAttributePHandler>(ref this.m_PropertyHandler, parent2, true, this);
+ Transform parent3 = base.PanelObject.transform.Find("SpriteSkillRoot");
+ DlgHandlerBase.EnsureCreate<XSpriteAttributeSHandler>(ref this.m_SkillHandler, parent3, true, this);
+ }
+
+ public override void OnUnload()
+ {
+ DlgHandlerBase.EnsureUnload<XSpriteAttributePHandler>(ref this.m_PropertyHandler);
+ DlgHandlerBase.EnsureUnload<XSpriteAttributeAHandler>(ref this.m_AptitudeHandler);
+ DlgHandlerBase.EnsureUnload<XSpriteAttributeSHandler>(ref this.m_SkillHandler);
+ base.OnUnload();
+ }
+
+ public void SetSpriteAttributeInfo(SpriteInfo spriteData, XAttributes attributes, SpriteInfo compareData = null)
+ {
+ this.m_PropertyHandler.SetSpriteAttributeInfo(spriteData, compareData);
+ this.m_AptitudeHandler.SetSpriteAttributeInfo(spriteData, attributes, compareData);
+ this.m_SkillHandler.SetSpriteAttributeInfo(spriteData, compareData);
+ }
+
+ public void SetSpriteAttributeInfo(uint spriteID)
+ {
+ this.m_PropertyHandler.SetSpriteAttributeInfo(spriteID);
+ this.m_AptitudeHandler.SetSpriteAttributeInfo(spriteID);
+ this.m_SkillHandler.SetSpriteAttributeInfo(spriteID);
+ }
+
+ public static void GetLevelOneSpriteAttr(SpriteTable.RowData spriteInfo, out List<uint> attrID, out List<double> attrValue, out List<double> attrMaxValue)
+ {
+ attrID = new List<uint>();
+ attrID.Add(spriteInfo.AttrID1);
+ attrID.Add(spriteInfo.AttrID2);
+ attrID.Add(spriteInfo.AttrID3);
+ attrID.Add(spriteInfo.AttrID4);
+ attrID.Add(spriteInfo.AttrID5);
+ List<double> list = new List<double>();
+ list.Add(spriteInfo.BaseAttr1);
+ list.Add(spriteInfo.BaseAttr2);
+ list.Add(spriteInfo.BaseAttr3);
+ list.Add(spriteInfo.BaseAttr4);
+ list.Add(spriteInfo.BaseAttr5);
+ attrMaxValue = new List<double>();
+ attrMaxValue.Add(spriteInfo.Range1[1]);
+ attrMaxValue.Add(spriteInfo.Range2[1]);
+ attrMaxValue.Add(spriteInfo.Range3[1]);
+ attrMaxValue.Add(spriteInfo.Range4[1]);
+ attrMaxValue.Add(spriteInfo.Range5[1]);
+ attrValue = new List<double>();
+ XSpriteSystemDocument specificDocument = XDocuments.GetSpecificDocument<XSpriteSystemDocument>(XSpriteSystemDocument.uuID);
+ for (int i = 0; i < attrID.Count; i++)
+ {
+ double num = list[i] + attrMaxValue[i] * specificDocument.GetSpriteLevelRatio(spriteInfo.SpriteQuality, 1u);
+ attrValue.Add(num / 100.0);
+ }
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/XSpriteAttributeHandler.cs.meta b/Client/Assets/Scripts/XMainClient/UI/XSpriteAttributeHandler.cs.meta
new file mode 100644
index 00000000..a3279929
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XSpriteAttributeHandler.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 7e8a919243e31454084e12cdd013f5cb
+timeCreated: 1611404005
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/XSpriteAttributePHandler.cs b/Client/Assets/Scripts/XMainClient/UI/XSpriteAttributePHandler.cs
new file mode 100644
index 00000000..5084b1f9
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XSpriteAttributePHandler.cs
@@ -0,0 +1,169 @@
+using System;
+using System.Collections.Generic;
+using KKSG;
+using UILib;
+using UnityEngine;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class XSpriteAttributePHandler : DlgHandlerBase
+ {
+ protected override string FileName
+ {
+ get
+ {
+ return "GameSystem/SpriteSystem/SpriteAttribute";
+ }
+ }
+
+ private XUIPool m_AttributePool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ private IXUIList m_AttributeList;
+
+ private Dictionary<uint, double> attrCompareData = new Dictionary<uint, double>();
+
+ private Dictionary<uint, double> aptitudeCompareData = new Dictionary<uint, double>();
+
+ protected override void Init()
+ {
+ base.Init();
+ this.m_AttributeList = (base.PanelObject.transform.Find("Grid").GetComponent("XUIList") as IXUIList);
+ Transform transform = base.PanelObject.transform.Find("Grid/Tpl");
+ this.m_AttributePool.SetupPool(transform.parent.gameObject, transform.gameObject, 6u, false);
+ }
+
+ private void PreProcessComparedData(SpriteInfo compareData)
+ {
+ this.attrCompareData.Clear();
+ bool flag = compareData != null;
+ if (flag)
+ {
+ for (int i = 0; i < compareData.AttrID.Count; i++)
+ {
+ bool flag2 = i < compareData.AttrValue.Count;
+ if (flag2)
+ {
+ this.attrCompareData[compareData.AttrID[i]] = compareData.AttrValue[i];
+ }
+ else
+ {
+ XSingleton<XDebug>.singleton.AddErrorLog("Cannot Find Aptitude ID", null, null, null, null, null);
+ }
+ }
+ }
+ }
+
+ private void CreateSpriteAttr(List<uint> attrID, List<double> attrValue, List<uint> evoAttrID, List<double> evoAttrValue)
+ {
+ this.m_AttributePool.FakeReturnAll();
+ for (int i = 0; i < attrID.Count; i++)
+ {
+ bool flag = attrID[i] == 0u;
+ if (!flag)
+ {
+ GameObject obj = this.m_AttributePool.FetchGameObject(false);
+ bool flag2 = i < attrValue.Count;
+ if (flag2)
+ {
+ double evoValue = 0.0;
+ bool flag3 = evoAttrID != null && evoAttrValue != null;
+ if (flag3)
+ {
+ for (int j = 0; j < evoAttrID.Count; j++)
+ {
+ bool flag4 = attrID[i] == evoAttrID[j] && j < evoAttrValue.Count;
+ if (flag4)
+ {
+ evoValue = evoAttrValue[j];
+ break;
+ }
+ }
+ }
+ this.SetAttributeInfo(obj, attrID[i], (uint)attrValue[i], evoValue);
+ }
+ else
+ {
+ XSingleton<XDebug>.singleton.AddErrorLog("Cannot Find Attr Value", null, null, null, null, null);
+ }
+ }
+ }
+ this.m_AttributeList.Refresh();
+ this.m_AttributePool.ActualReturnAll(false);
+ }
+
+ public void SetSpriteAttributeInfo(SpriteInfo spriteData, SpriteInfo compareData = null)
+ {
+ bool flag = spriteData == null;
+ if (flag)
+ {
+ this.m_AttributePool.ReturnAll(false);
+ }
+ else
+ {
+ this.PreProcessComparedData(compareData);
+ this.CreateSpriteAttr(spriteData.AttrID, spriteData.AttrValue, spriteData.EvoAttrID, spriteData.EvoAttrValue);
+ }
+ }
+
+ public void SetSpriteAttributeInfo(uint spriteID)
+ {
+ this.attrCompareData.Clear();
+ XSpriteSystemDocument specificDocument = XDocuments.GetSpecificDocument<XSpriteSystemDocument>(XSpriteSystemDocument.uuID);
+ SpriteTable.RowData bySpriteID = specificDocument._SpriteTable.GetBySpriteID(spriteID);
+ bool flag = bySpriteID == null;
+ if (!flag)
+ {
+ List<uint> attrID = new List<uint>();
+ List<double> attrValue = new List<double>();
+ List<double> list = new List<double>();
+ XSpriteAttributeHandler.GetLevelOneSpriteAttr(bySpriteID, out attrID, out attrValue, out list);
+ this.CreateSpriteAttr(attrID, attrValue, null, null);
+ }
+ }
+
+ private void SetAttributeInfo(GameObject obj, uint attrID, uint attrValue, double evoValue)
+ {
+ IXUILabel ixuilabel = obj.transform.Find("Name").GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel2 = obj.transform.Find("Value").GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel3 = obj.transform.Find("Addon").GetComponent("XUILabel") as IXUILabel;
+ string format = "Sprite_{0}";
+ XAttributeDefine xattributeDefine = (XAttributeDefine)attrID;
+ string key = string.Format(format, xattributeDefine.ToString());
+ ixuilabel.SetText(XStringDefineProxy.GetString(key));
+ ixuilabel2.SetText(attrValue.ToString());
+ ixuilabel3.SetVisible(evoValue != 0.0);
+ ixuilabel3.SetText(string.Format("+{0}", evoValue));
+ bool flag = this.attrCompareData.Count > 0;
+ if (flag)
+ {
+ double num = 0.0;
+ bool flag2 = this.attrCompareData.TryGetValue(attrID, out num);
+ if (flag2)
+ {
+ bool flag3 = attrValue > (uint)num;
+ if (flag3)
+ {
+ ixuilabel2.SetText("[00ff00]+" + attrValue.ToString() + "[-]");
+ }
+ else
+ {
+ bool flag4 = attrValue < (uint)num;
+ if (flag4)
+ {
+ ixuilabel2.SetText("[ff0000]+" + attrValue.ToString() + "[-]");
+ }
+ else
+ {
+ ixuilabel2.SetText("+" + attrValue.ToString());
+ }
+ }
+ }
+ else
+ {
+ ixuilabel2.SetText("[00ff00]+" + attrValue.ToString() + "[-]");
+ }
+ }
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/XSpriteAttributePHandler.cs.meta b/Client/Assets/Scripts/XMainClient/UI/XSpriteAttributePHandler.cs.meta
new file mode 100644
index 00000000..c0b71d4d
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XSpriteAttributePHandler.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 16132602cbb2ebd4d8526afa9987c2d0
+timeCreated: 1611403268
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/XSpriteAttributeSHandler.cs b/Client/Assets/Scripts/XMainClient/UI/XSpriteAttributeSHandler.cs
new file mode 100644
index 00000000..b023dc4f
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XSpriteAttributeSHandler.cs
@@ -0,0 +1,126 @@
+using System;
+using System.Collections.Generic;
+using KKSG;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class XSpriteAttributeSHandler : DlgHandlerBase
+ {
+ protected override string FileName
+ {
+ get
+ {
+ return "GameSystem/SpriteSystem/SpriteSkill";
+ }
+ }
+
+ private XUIPool m_SkillPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ private IXUIList m_SkillList;
+
+ private GameObject m_MainSkill;
+
+ private Dictionary<uint, double> attrCompareData = new Dictionary<uint, double>();
+
+ private Dictionary<uint, double> aptitudeCompareData = new Dictionary<uint, double>();
+
+ private List<uint> m_passiveSkillID = new List<uint>();
+
+ private uint m_mainSkillID;
+
+ private uint m_mainSkillLevel;
+
+ protected override void Init()
+ {
+ base.Init();
+ this.m_SkillList = (base.PanelObject.transform.Find("OtherSkill").GetComponent("XUIList") as IXUIList);
+ Transform transform = base.PanelObject.transform.Find("OtherSkill/Tpl");
+ this.m_SkillPool.SetupPool(transform.parent.gameObject, transform.gameObject, 3u, false);
+ this.m_MainSkill = base.PanelObject.transform.Find("MainSkill").gameObject;
+ this.m_MainSkill.SetActive(false);
+ }
+
+ private void CreateSpriteSkill(List<uint> passiveSkillID, uint skillID, uint evolutionLevel)
+ {
+ this.m_passiveSkillID = passiveSkillID;
+ this.m_mainSkillID = skillID;
+ this.m_mainSkillLevel = evolutionLevel;
+ this.m_SkillPool.FakeReturnAll();
+ for (int i = 0; i < passiveSkillID.Count; i++)
+ {
+ GameObject go = this.m_SkillPool.FetchGameObject(false);
+ this.SetSkillIcon(go, passiveSkillID[i], false, 0u);
+ }
+ this.m_SkillList.Refresh();
+ this.m_SkillPool.ActualReturnAll(false);
+ this.m_MainSkill.SetActive(true);
+ this.SetSkillIcon(this.m_MainSkill, skillID, true, evolutionLevel);
+ }
+
+ private void SetSkillIcon(GameObject go, uint skillID, bool mainSkill = false, uint evolutionLevel = 0u)
+ {
+ IXUISprite ixuisprite = go.transform.Find("Icon").GetComponent("XUISprite") as IXUISprite;
+ IXUILabel ixuilabel = go.transform.Find("Zhu").GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel2 = go.transform.Find("Level").GetComponent("XUILabel") as IXUILabel;
+ IXUISprite ixuisprite2 = go.transform.Find("Frame").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.ID = (ulong)skillID;
+ ixuisprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnSkillIconClicked));
+ XSpriteSystemDocument specificDocument = XDocuments.GetSpecificDocument<XSpriteSystemDocument>(XSpriteSystemDocument.uuID);
+ SpriteSkill.RowData spriteSkillData = specificDocument.GetSpriteSkillData((short)skillID, mainSkill, evolutionLevel);
+ bool flag = spriteSkillData != null;
+ if (flag)
+ {
+ ixuisprite.SetSprite(spriteSkillData.Icon, spriteSkillData.Atlas, false);
+ }
+ ixuilabel.SetVisible(mainSkill);
+ ixuisprite2.SetVisible(!mainSkill);
+ bool flag2 = !mainSkill;
+ if (flag2)
+ {
+ ixuisprite2.SetSprite(string.Format("kuang_zq0{0}", spriteSkillData.SkillQuality));
+ }
+ ixuilabel2.SetText(string.Format("[b]Lv.{0}[-]", evolutionLevel + 1u));
+ ixuilabel2.SetVisible(mainSkill);
+ }
+
+ private void OnSkillIconClicked(IXUISprite obj)
+ {
+ uint num = (uint)obj.ID;
+ bool flag = num == this.m_mainSkillID;
+ DlgBase<XSpriteSkillTipDlg, XSpriteSkillTipBehaviour>.singleton.ItemSelector.Select(obj);
+ DlgBase<XSpriteSkillTipDlg, XSpriteSkillTipBehaviour>.singleton.ShowSpriteSkill(num, flag, flag ? this.m_mainSkillLevel : 0u);
+ }
+
+ public void SetSpriteAttributeInfo(SpriteInfo spriteData, SpriteInfo compareData = null)
+ {
+ bool flag = spriteData == null;
+ if (flag)
+ {
+ this.m_SkillPool.ReturnAll(false);
+ this.m_MainSkill.SetActive(false);
+ }
+ else
+ {
+ this.CreateSpriteSkill(spriteData.PassiveSkillID, spriteData.SkillID, spriteData.EvolutionLevel);
+ }
+ }
+
+ public void SetSpriteAttributeInfo(uint spriteID)
+ {
+ this.attrCompareData.Clear();
+ this.aptitudeCompareData.Clear();
+ XSpriteSystemDocument specificDocument = XDocuments.GetSpecificDocument<XSpriteSystemDocument>(XSpriteSystemDocument.uuID);
+ SpriteTable.RowData bySpriteID = specificDocument._SpriteTable.GetBySpriteID(spriteID);
+ bool flag = bySpriteID == null;
+ if (!flag)
+ {
+ List<uint> passiveSkillID = new List<uint>();
+ this.CreateSpriteSkill(passiveSkillID, bySpriteID.SpriteSkillID, 0u);
+ }
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/XSpriteAttributeSHandler.cs.meta b/Client/Assets/Scripts/XMainClient/UI/XSpriteAttributeSHandler.cs.meta
new file mode 100644
index 00000000..3c446827
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XSpriteAttributeSHandler.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 15bb799c1c0adfc48b91b8ca2555268a
+timeCreated: 1611403264
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/XSpriteAvatarHandler.cs b/Client/Assets/Scripts/XMainClient/UI/XSpriteAvatarHandler.cs
new file mode 100644
index 00000000..2e60fbfb
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XSpriteAvatarHandler.cs
@@ -0,0 +1,307 @@
+using System;
+using System.Collections.Generic;
+using KKSG;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class XSpriteAvatarHandler : DlgHandlerBase
+ {
+ protected override string FileName
+ {
+ get
+ {
+ return "GameSystem/SpriteSystem/SpriteAvatarHandler";
+ }
+ }
+
+ private XSpriteSystemDocument _doc;
+
+ private XUIPool m_StarPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ private XUIPool m_MoonPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ private IXUILabel m_Name;
+
+ private IXUILabel m_Power;
+
+ private IXUILabel m_Level;
+
+ private IXUISprite m_LevelFrame;
+
+ private IUIDummy m_Snapshot;
+
+ private IXUISprite m_Avatar;
+
+ private IXUISprite m_Quality;
+
+ private GameObject m_StarGrid;
+
+ private XDummy m_Dummy;
+
+ private SpriteInfo m_SpriteData = null;
+
+ private XAttributes m_Attributes = null;
+
+ private SpriteTable.RowData m_SpriteInfo = null;
+
+ protected override void Init()
+ {
+ base.Init();
+ this._doc = XDocuments.GetSpecificDocument<XSpriteSystemDocument>(XSpriteSystemDocument.uuID);
+ Transform transform = base.PanelObject.transform.Find("Message/StarGrid/StarTpl");
+ this.m_StarPool.SetupPool(transform.parent.gameObject, transform.gameObject, 4u, false);
+ transform = base.PanelObject.transform.Find("Message/StarGrid/MoonTpl");
+ this.m_MoonPool.SetupPool(transform.parent.gameObject, transform.gameObject, 4u, false);
+ this.m_StarGrid = base.PanelObject.transform.Find("Message/StarGrid").gameObject;
+ this.m_Name = (base.PanelObject.transform.Find("Message/Name").GetComponent("XUILabel") as IXUILabel);
+ this.m_LevelFrame = (base.PanelObject.transform.Find("Message/Level").GetComponent("XUISprite") as IXUISprite);
+ this.m_Level = (base.PanelObject.transform.Find("Message/Level/Num").GetComponent("XUILabel") as IXUILabel);
+ this.m_Power = (base.PanelObject.transform.Find("Message/Power").GetComponent("XUILabel") as IXUILabel);
+ this.m_Quality = (base.PanelObject.transform.Find("Message/Quality").GetComponent("XUISprite") as IXUISprite);
+ this.m_Avatar = (base.PanelObject.transform.Find("AvatarBtn").GetComponent("XUISprite") as IXUISprite);
+ this.m_Snapshot = (base.PanelObject.transform.Find("Snapshot").GetComponent("UIDummy") as IUIDummy);
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ base.Alloc3DAvatarPool("XSpriteAvatarHandler", 1);
+ }
+
+ protected override void OnHide()
+ {
+ base.OnHide();
+ bool flag = this.m_Dummy != null;
+ if (flag)
+ {
+ XSingleton<X3DAvatarMgr>.singleton.DestroyDummy(this.m_dummPool, this.m_Dummy);
+ this.m_Dummy = null;
+ }
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ }
+
+ public override void OnUnload()
+ {
+ base.Return3DAvatarPool();
+ this.m_Dummy = null;
+ base.OnUnload();
+ }
+
+ public void HideAvatar()
+ {
+ bool flag = this.m_Dummy != null;
+ if (flag)
+ {
+ XSingleton<X3DAvatarMgr>.singleton.DestroyDummy(this.m_dummPool, this.m_Dummy);
+ this.m_Dummy = null;
+ }
+ this.m_Name.SetText("");
+ this.m_Level.gameObject.transform.parent.gameObject.SetActive(false);
+ this.m_Quality.SetVisible(false);
+ this.m_Power.SetText("");
+ this.m_StarPool.ReturnAll(false);
+ this.m_MoonPool.ReturnAll(false);
+ }
+
+ public void SetSpriteInfoByIndex(int index, int avatarIndex = 0, bool needClickEvent = false, bool showLevel = true)
+ {
+ bool flag = index >= this._doc.SpriteList.Count;
+ if (!flag)
+ {
+ this.SetSpriteInfo(this._doc.SpriteList[index], XSingleton<XAttributeMgr>.singleton.XPlayerData, avatarIndex, needClickEvent, showLevel);
+ }
+ }
+
+ public void SetSpriteInfo(SpriteInfo spriteData, XAttributes attributes, int avatarIndex = 6, bool needClickEvent = false, bool showLevel = true)
+ {
+ if (needClickEvent)
+ {
+ this.m_Avatar.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnClickAvatar));
+ }
+ else
+ {
+ this.m_Avatar.RegisterSpriteClickEventHandler(null);
+ }
+ bool flag = spriteData == null;
+ if (!flag)
+ {
+ this.m_SpriteInfo = this._doc._SpriteTable.GetBySpriteID(spriteData.SpriteID);
+ this.m_SpriteData = spriteData;
+ this.m_Attributes = attributes;
+ SpriteTable.RowData bySpriteID = this._doc._SpriteTable.GetBySpriteID(spriteData.SpriteID);
+ this.m_StarGrid.SetActive(true);
+ this.m_StarPool.ReturnAll(false);
+ this.m_MoonPool.ReturnAll(false);
+ uint num = spriteData.EvolutionLevel / XSpriteSystemDocument.MOONWORTH;
+ uint num2 = spriteData.EvolutionLevel % XSpriteSystemDocument.MOONWORTH;
+ float num3 = (num + num2 - 1f) / 2f;
+ int num4 = 0;
+ while ((long)num4 < (long)((ulong)(num + num2)))
+ {
+ bool flag2 = (long)num4 < (long)((ulong)num);
+ if (flag2)
+ {
+ GameObject gameObject = this.m_MoonPool.FetchGameObject(false);
+ Vector3 tplPos = this.m_MoonPool.TplPos;
+ gameObject.transform.localPosition = new Vector3(tplPos.x + ((float)num4 - num3) * (float)this.m_MoonPool.TplWidth, tplPos.y);
+ }
+ else
+ {
+ GameObject gameObject2 = this.m_StarPool.FetchGameObject(false);
+ Vector3 tplPos2 = this.m_StarPool.TplPos;
+ gameObject2.transform.localPosition = new Vector3(tplPos2.x + ((float)num4 - num3) * (float)this.m_StarPool.TplWidth, tplPos2.y);
+ }
+ num4++;
+ }
+ this.m_Name.SetText(string.Format("[{0}]{1}", this._doc.NAMECOLOR[(int)bySpriteID.SpriteQuality], bySpriteID.SpriteName));
+ this.m_Quality.SetVisible(true);
+ this.m_Quality.spriteName = string.Format("icondjdj_{0}", bySpriteID.SpriteQuality);
+ XSpriteSystemDocument specificDocument = XDocuments.GetSpecificDocument<XSpriteSystemDocument>(XSpriteSystemDocument.uuID);
+ if (showLevel)
+ {
+ this.m_Level.gameObject.transform.parent.gameObject.SetActive(true);
+ this.m_Level.SetText(string.Format("Lv. {0}", spriteData.Level));
+ }
+ else
+ {
+ this.m_Level.gameObject.transform.parent.gameObject.SetActive(false);
+ }
+ this.m_Power.SetText(string.Format(XStringDefineProxy.GetString("BOSSRUSH_POWER"), spriteData.PowerPoint));
+ this.m_LevelFrame.UpdateAnchors();
+ this.m_Dummy = XSingleton<X3DAvatarMgr>.singleton.CreateCommonEntityDummy(this.m_dummPool, bySpriteID.SpriteModelID, this.m_Snapshot, this.m_Dummy, 1f);
+ this.ResetSpriteAnim();
+ bool flag3 = this.m_SpriteInfo != null;
+ if (flag3)
+ {
+ this.ChangeMatColor(this.m_Dummy.EngineObject, this.m_SpriteInfo.PresentID);
+ }
+ }
+ }
+
+ public void SetSpriteInfo(uint spriteID, bool showLevel = true, uint power = 0u)
+ {
+ this.m_SpriteData = null;
+ this.m_Attributes = null;
+ this.m_SpriteInfo = this._doc._SpriteTable.GetBySpriteID(spriteID);
+ this.m_Name.SetText(string.Format("[{0}]{1}", this._doc.NAMECOLOR[(int)this.m_SpriteInfo.SpriteQuality], this.m_SpriteInfo.SpriteName));
+ this.m_Quality.SetVisible(true);
+ this.m_Quality.spriteName = string.Format("icondjdj_{0}", this.m_SpriteInfo.SpriteQuality);
+ this.m_Level.gameObject.transform.parent.gameObject.SetActive(showLevel);
+ if (showLevel)
+ {
+ this.m_Level.SetText("Lv.1");
+ }
+ this.m_Power.SetText(string.Format(XStringDefineProxy.GetString("BOSSRUSH_POWER"), (power == 0u) ? this.GetSpriteOneLevelPower(this.m_SpriteInfo) : power));
+ this.m_StarGrid.SetActive(false);
+ this.m_Dummy = XSingleton<X3DAvatarMgr>.singleton.CreateCommonEntityDummy(this.m_dummPool, this.m_SpriteInfo.SpriteModelID, this.m_Snapshot, this.m_Dummy, 1f);
+ this.ResetSpriteAnim();
+ bool flag = this.m_SpriteInfo != null;
+ if (flag)
+ {
+ this.ChangeMatColor(this.m_Dummy.EngineObject, this.m_SpriteInfo.PresentID);
+ }
+ }
+
+ private void ChangeMatColor(XGameObject xobject, uint presentID)
+ {
+ XSpriteSystemDocument specificDocument = XDocuments.GetSpecificDocument<XSpriteSystemDocument>(XSpriteSystemDocument.uuID);
+ SpriteTable.RowData byPresentID = specificDocument._SpriteTable.GetByPresentID(presentID);
+ bool flag = byPresentID != null;
+ if (flag)
+ {
+ xobject.CallCommand(XAffiliate._changeSpriteMatColorCb, byPresentID, -1, false);
+ }
+ }
+
+ public XEntityPresentation.RowData GetSpritePresent()
+ {
+ bool flag = this.m_Dummy == null;
+ XEntityPresentation.RowData result;
+ if (flag)
+ {
+ result = null;
+ }
+ else
+ {
+ bool flag2 = this.m_Dummy.Present == null;
+ if (flag2)
+ {
+ result = null;
+ }
+ else
+ {
+ result = this.m_Dummy.Present.PresentLib;
+ }
+ }
+ return result;
+ }
+
+ public void ResetSpriteAnim()
+ {
+ bool flag = this.m_Dummy == null;
+ if (!flag)
+ {
+ this.m_Dummy.ResetAnimation();
+ }
+ }
+
+ public float SetSpriteAnim(string clipname)
+ {
+ bool flag = this.m_Dummy == null;
+ float result;
+ if (flag)
+ {
+ result = -1f;
+ }
+ else
+ {
+ result = this.m_Dummy.SetAnimationGetLength(clipname);
+ }
+ return result;
+ }
+
+ private uint GetSpriteOneLevelPower(SpriteTable.RowData spriteInfo)
+ {
+ List<uint> list = new List<uint>();
+ List<double> list2 = new List<double>();
+ List<double> list3 = new List<double>();
+ XSpriteSystemDocument specificDocument = XDocuments.GetSpecificDocument<XSpriteSystemDocument>(XSpriteSystemDocument.uuID);
+ XSpriteAttributeHandler.GetLevelOneSpriteAttr(spriteInfo, out list, out list2, out list3);
+ double num = 0.0;
+ for (int i = 0; i < list3.Count; i++)
+ {
+ num += XSingleton<XPowerPointCalculator>.singleton.GetPPT(list[i], list3[i] / 100.0, null, 0);
+ }
+ for (int j = 0; j < list2.Count; j++)
+ {
+ num += XSingleton<XPowerPointCalculator>.singleton.GetPPT(list[j], (uint)list2[j], null, 0);
+ }
+ return (uint)num;
+ }
+
+ private void OnClickAvatar(IXUISprite btn)
+ {
+ bool flag = this.m_SpriteData != null;
+ if (flag)
+ {
+ DlgBase<XSpriteDetailView, XSpriteDetailBehaviour>.singleton.ShowDetail(this.m_SpriteData, this.m_Attributes);
+ }
+ else
+ {
+ bool flag2 = this.m_SpriteInfo != null;
+ if (flag2)
+ {
+ DlgBase<XSpriteDetailView, XSpriteDetailBehaviour>.singleton.ShowDetail(this.m_SpriteInfo.SpriteID);
+ }
+ }
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/XSpriteAvatarHandler.cs.meta b/Client/Assets/Scripts/XMainClient/UI/XSpriteAvatarHandler.cs.meta
new file mode 100644
index 00000000..f8655336
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XSpriteAvatarHandler.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 18e3e26ed1b070044ba8c2f01941475c
+timeCreated: 1611403299
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/XSystemItemMailView.cs b/Client/Assets/Scripts/XMainClient/UI/XSystemItemMailView.cs
new file mode 100644
index 00000000..a52f093d
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XSystemItemMailView.cs
@@ -0,0 +1,224 @@
+using System;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class XSystemItemMailView : MonoBehaviour
+ {
+ public bool Select
+ {
+ get
+ {
+ return base.gameObject != null && base.gameObject.activeSelf && this.showSign;
+ }
+ }
+
+ public ulong uid
+ {
+ get
+ {
+ return this.mailItem.id;
+ }
+ }
+
+ public bool isRwd
+ {
+ get
+ {
+ return this.mailItem != null && this.mailItem.state == MailState.RWD;
+ }
+ }
+
+ private XMailDocument _doc = null;
+
+ public IXUISprite m_sprsign;
+
+ public IXUISprite m_spricon;
+
+ public IXUILabel m_lbltitle;
+
+ public IXUISprite m_sprattach;
+
+ public IXUISprite m_sprhighlight;
+
+ public IXUILabel m_lblday;
+
+ private bool showSign = false;
+
+ private MailItem mailItem;
+
+ private int leftTime = int.MaxValue;
+
+ private uint timeToken = 0u;
+
+ private float refreshTime;
+
+ private string timer_show;
+
+ private void Awake()
+ {
+ this.m_sprsign = (base.transform.Find("sign").GetComponent("XUISprite") as IXUISprite);
+ this.m_spricon = (base.transform.Find("Icon1").GetComponent("XUISprite") as IXUISprite);
+ this.m_lbltitle = (base.transform.Find("titleLabel").GetComponent("XUILabel") as IXUILabel);
+ this.m_sprattach = (base.transform.Find("Icon2").GetComponent("XUISprite") as IXUISprite);
+ this.m_sprhighlight = (base.transform.Find("highlight").GetComponent("XUISprite") as IXUISprite);
+ this.m_lblday = (base.transform.Find("dayLabel").GetComponent("XUILabel") as IXUILabel);
+ this.m_sprsign.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnSignClick));
+ this.m_lbltitle.RegisterLabelClickEventHandler(new LabelClickEventHandler(this.OnItemClick));
+ this.ShowSel(false);
+ this.ShowHighLight(false);
+ }
+
+ public void OnDisable()
+ {
+ bool flag = this.timeToken > 0u;
+ if (flag)
+ {
+ XSingleton<XTimerMgr>.singleton.KillTimer(this.timeToken);
+ }
+ }
+
+ public void Update()
+ {
+ bool flag = this._doc != null && this._doc.select_mail == this.mailItem.id;
+ if (flag)
+ {
+ bool flag2 = this.leftTime <= 86400;
+ if (flag2)
+ {
+ float num = (float)this.leftTime - (Time.time - this.refreshTime);
+ bool flag3 = num >= 3600f;
+ if (flag3)
+ {
+ this.timer_show = (int)(num / 3600f) + XStringDefineProxy.GetString("Mail_HOUR");
+ }
+ else
+ {
+ bool flag4 = num >= 60f;
+ if (flag4)
+ {
+ this.timer_show = (int)(num / 60f) + XStringDefineProxy.GetString("Mail_MIN");
+ }
+ else
+ {
+ this.timer_show = "1" + XStringDefineProxy.GetString("Mail_MIN");
+ }
+ }
+ this._doc.valit = this.timer_show;
+ this.m_lblday.SetText(this.timer_show);
+ }
+ }
+ }
+
+ public void Refresh(ulong id)
+ {
+ this._doc = (XSingleton<XGame>.singleton.Doc.GetXComponent(XMailDocument.uuID) as XMailDocument);
+ this.mailItem = this._doc.GetMailItem(id);
+ this.m_lbltitle.SetText(this.mailItem.title);
+ this.m_lbltitle.SetColor(this.mailItem.isRead ? Color.gray : new Color(0.94f, 0.82f, 0.34f));
+ this.m_sprattach.SetAlpha((float)((this.mailItem.state == MailState.NONE) ? 0 : 1));
+ this.m_sprattach.spriteName = ((this.mailItem.state == MailState.RWD) ? "mail_0" : "mail_1");
+ bool flag = this.mailItem.valit >= 86400;
+ if (flag)
+ {
+ this.timer_show = this.mailItem.valit / 86400 + XStringDefineProxy.GetString("Mail_DAY");
+ }
+ else
+ {
+ bool flag2 = this.mailItem.valit >= 3600;
+ if (flag2)
+ {
+ this.timer_show = this.mailItem.valit / 3600 + XStringDefineProxy.GetString("Mail_HOUR");
+ }
+ else
+ {
+ bool flag3 = this.mailItem.valit > 60;
+ if (flag3)
+ {
+ this.timer_show = this.mailItem.valit / 60 + XStringDefineProxy.GetString("Mail_MIN");
+ }
+ else
+ {
+ this.timer_show = "1" + XStringDefineProxy.GetString("Mail_MIN");
+ }
+ }
+ }
+ this.m_lblday.SetText(this.timer_show);
+ this.leftTime = this.mailItem.valit;
+ this.refreshTime = Time.time;
+ bool flag4 = this.leftTime < 240;
+ if (flag4)
+ {
+ this.timeToken = XSingleton<XTimerMgr>.singleton.SetTimer((float)(this.leftTime + 4), new XTimerMgr.ElapsedEventHandler(this.OnTimeOut), null);
+ }
+ switch (this.mailItem.type)
+ {
+ case MailType.System:
+ this.m_spricon.spriteName = "mail_2";
+ break;
+ case MailType.Good:
+ this.m_spricon.spriteName = "mail_3";
+ break;
+ case MailType.Bad:
+ this.m_spricon.spriteName = "mail_4";
+ break;
+ case MailType.Cost:
+ this.m_spricon.spriteName = "mail_5";
+ break;
+ }
+ }
+
+ public void ShowHighLight(bool show)
+ {
+ this.m_sprhighlight.SetAlpha(show ? 1f : 0.01f);
+ }
+
+ private void OnItemClick(IXUILabel lbl)
+ {
+ bool flag = this.mailItem == null || DlgBase<RewdAnimDlg, RewdAnimBehaviour>.singleton.IsVisible();
+ if (!flag)
+ {
+ this._doc.SetSelect(this.mailItem.id);
+ bool flag2 = XSystemMailView.doItemSelect != null;
+ if (flag2)
+ {
+ XSystemMailView.doItemSelect();
+ }
+ bool flag3 = !this.mailItem.isRead;
+ if (flag3)
+ {
+ this._doc.ReqMailOP(MailOP.Read, this.mailItem.id);
+ }
+ this.ShowHighLight(true);
+ }
+ }
+
+ private void OnTimeOut(object handler)
+ {
+ this._doc.ReqMailInfo();
+ }
+
+ private void OnSignClick(IXUISprite spr)
+ {
+ bool flag = !DlgBase<RewdAnimDlg, RewdAnimBehaviour>.singleton.IsVisible();
+ if (flag)
+ {
+ this.ShowSel(!this.showSign);
+ bool flag2 = XSystemMailView.doSelSelect != null;
+ if (flag2)
+ {
+ XSystemMailView.doSelSelect();
+ }
+ }
+ }
+
+ public void ShowSel(bool show)
+ {
+ this.showSign = show;
+ this.m_sprsign.SetAlpha(show ? 1f : 0.01f);
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/XSystemItemMailView.cs.meta b/Client/Assets/Scripts/XMainClient/UI/XSystemItemMailView.cs.meta
new file mode 100644
index 00000000..67f24a12
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XSystemItemMailView.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 0fb0f6b95378a994fb2bd5d46b235b95
+timeCreated: 1611403211
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/XSystemMailView.cs b/Client/Assets/Scripts/XMainClient/UI/XSystemMailView.cs
new file mode 100644
index 00000000..ce3d8c0f
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XSystemMailView.cs
@@ -0,0 +1,258 @@
+using System;
+using System.Collections.Generic;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class XSystemMailView : DlgHandlerBase
+ {
+ private List<ulong> selects
+ {
+ get
+ {
+ List<ulong> list = new List<ulong>();
+ foreach (XSystemItemMailView xsystemItemMailView in this.items)
+ {
+ bool flag = xsystemItemMailView != null && xsystemItemMailView.Select;
+ if (flag)
+ {
+ list.Add(xsystemItemMailView.uid);
+ }
+ }
+ return list;
+ }
+ }
+
+ public bool hasRwd
+ {
+ get
+ {
+ bool result = false;
+ bool flag = this.items != null;
+ if (flag)
+ {
+ for (int i = 0; i < this.items.Length; i++)
+ {
+ XSystemItemMailView xsystemItemMailView = this.items[i];
+ bool flag2 = xsystemItemMailView != null;
+ if (flag2)
+ {
+ bool flag3 = xsystemItemMailView.Select && xsystemItemMailView.isRwd;
+ if (flag3)
+ {
+ result = true;
+ break;
+ }
+ }
+ }
+ }
+ return result;
+ }
+ }
+
+ private XMailDocument _doc = null;
+
+ public IXUISprite m_sprsel;
+
+ public IXUILabel m_lblpage;
+
+ public IXUIButton m_sprleft;
+
+ public IXUIButton m_sprright;
+
+ public IXUIButton m_btndel;
+
+ public IXUIButton m_btnsq;
+
+ public GameObject m_objDelHighlight;
+
+ public XSystemItemMailView[] items = new XSystemItemMailView[7];
+
+ public static XSystemMailView.DelSelect doSelSelect;
+
+ public static XSystemMailView.DelSelect doItemSelect;
+
+ private bool all_selected;
+
+ public delegate void DelSelect();
+
+ protected override void Init()
+ {
+ base.Init();
+ this.m_sprsel = (base.PanelObject.transform.Find("btm/AllSelItem/sign").GetComponent("XUISprite") as IXUISprite);
+ this.m_lblpage = (base.PanelObject.transform.Find("btm/pageItem/T").GetComponent("XUILabel") as IXUILabel);
+ this.m_sprleft = (base.PanelObject.transform.Find("btm/pageItem/left").GetComponent("XUIButton") as IXUIButton);
+ this.m_sprright = (base.PanelObject.transform.Find("btm/pageItem/right").GetComponent("XUIButton") as IXUIButton);
+ this.m_btndel = (base.PanelObject.transform.Find("btm/deletBtn").GetComponent("XUIButton") as IXUIButton);
+ this.m_btnsq = (base.PanelObject.transform.Find("btm/sqBtn").GetComponent("XUIButton") as IXUIButton);
+ this.m_objDelHighlight = this.m_btndel.gameObject.transform.Find("Highlight").gameObject;
+ this.ShowSel(false);
+ this.m_objDelHighlight.SetActive(false);
+ for (int i = 0; i < this.items.Length; i++)
+ {
+ string text = "Content/item" + i;
+ GameObject gameObject = base.PanelObject.transform.Find(text).gameObject;
+ bool flag = gameObject != null;
+ if (flag)
+ {
+ this.items[i] = gameObject.AddComponent<XSystemItemMailView>();
+ }
+ }
+ XSystemMailView.doSelSelect = new XSystemMailView.DelSelect(this.CheckDelbtnShow);
+ XSystemMailView.doItemSelect = (XSystemMailView.DelSelect)Delegate.Combine(XSystemMailView.doItemSelect, new XSystemMailView.DelSelect(this.Hidehighlight));
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ this.m_sprsel.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnAllSelClick));
+ this.m_btndel.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnDelClick));
+ this.m_sprleft.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnPageLeftClick));
+ this.m_sprright.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnPageRightClick));
+ this.m_btnsq.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnSQClick));
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ this._doc = (XSingleton<XGame>.singleton.Doc.GetXComponent(XMailDocument.uuID) as XMailDocument);
+ this._doc.ReqMailInfo();
+ }
+
+ public void Refresh()
+ {
+ this._doc.RefreshContentNil();
+ this.ShowItemsSel(false);
+ this.ShowSel(false);
+ this.m_objDelHighlight.SetActive(false);
+ this.m_btndel.SetEnable(false, false);
+ this.Hidehighlight();
+ this.RefreshItems();
+ this.RefreshPage();
+ }
+
+ public void RefreshItems()
+ {
+ List<MailItem> mails = this._doc.mails;
+ for (int i = 0; i < mails.Count; i++)
+ {
+ this.items[i].gameObject.SetActive(true);
+ this.items[i].Refresh(mails[i].id);
+ }
+ for (int j = mails.Count; j < 7; j++)
+ {
+ this.items[j].gameObject.SetActive(false);
+ }
+ }
+
+ public void RefreshPage()
+ {
+ this.m_lblpage.SetText(this._doc.GetPageFormat());
+ }
+
+ public override void OnUnload()
+ {
+ XSystemMailView.doItemSelect = (XSystemMailView.DelSelect)Delegate.Remove(XSystemMailView.doItemSelect, new XSystemMailView.DelSelect(this.Hidehighlight));
+ base.OnUnload();
+ }
+
+ private bool OnDelClick(IXUIButton btn)
+ {
+ bool flag = !this.m_objDelHighlight.activeSelf || DlgBase<RewdAnimDlg, RewdAnimBehaviour>.singleton.IsVisible();
+ bool result;
+ if (flag)
+ {
+ result = true;
+ }
+ else
+ {
+ bool hasRwd = this.hasRwd;
+ if (hasRwd)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString("Mail_RWD"), "fece00");
+ }
+ else
+ {
+ this._doc.ReqMailOP(MailOP.Delete, this.selects);
+ }
+ result = true;
+ }
+ return result;
+ }
+
+ private bool OnPageLeftClick(IXUIButton btn)
+ {
+ bool flag = this._doc.CtlPage(false);
+ if (flag)
+ {
+ this.Refresh();
+ }
+ return true;
+ }
+
+ private bool OnPageRightClick(IXUIButton btn)
+ {
+ bool flag = this._doc.CtlPage(true);
+ if (flag)
+ {
+ this.Refresh();
+ }
+ return true;
+ }
+
+ private bool OnSQClick(IXUIButton btn)
+ {
+ XSingleton<XDebug>.singleton.AddLog("sq click", null, null, null, null, null, XDebugColor.XDebug_None);
+ this._doc.ReqMailOP(MailOP.ClaimAll, new List<ulong>());
+ return true;
+ }
+
+ private void OnAllSelClick(IXUISprite spr)
+ {
+ this.ShowSel(!this.all_selected);
+ this.ShowItemsSel(this.all_selected);
+ this.CheckDelbtnShow();
+ }
+
+ private void ShowItemsSel(bool show)
+ {
+ foreach (XSystemItemMailView xsystemItemMailView in this.items)
+ {
+ xsystemItemMailView.ShowSel(show);
+ }
+ }
+
+ private void ShowSel(bool show)
+ {
+ this.all_selected = show;
+ this.m_sprsel.SetAlpha(show ? 1f : 0.01f);
+ }
+
+ private void CheckDelbtnShow()
+ {
+ bool flag = false;
+ foreach (XSystemItemMailView xsystemItemMailView in this.items)
+ {
+ bool select = xsystemItemMailView.Select;
+ if (select)
+ {
+ flag = true;
+ break;
+ }
+ }
+ this.m_objDelHighlight.SetActive(flag);
+ this.m_btndel.SetEnable(flag, false);
+ }
+
+ private void Hidehighlight()
+ {
+ foreach (XSystemItemMailView xsystemItemMailView in this.items)
+ {
+ xsystemItemMailView.ShowHighLight(false);
+ }
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/XSystemMailView.cs.meta b/Client/Assets/Scripts/XMainClient/UI/XSystemMailView.cs.meta
new file mode 100644
index 00000000..4451b4c8
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XSystemMailView.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: ef31b59f7c3fedd488d4985d322044a9
+timeCreated: 1611404803
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/XTargetRewardPopWindow.cs b/Client/Assets/Scripts/XMainClient/UI/XTargetRewardPopWindow.cs
new file mode 100644
index 00000000..39fa81f1
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XTargetRewardPopWindow.cs
@@ -0,0 +1,147 @@
+using System;
+using UILib;
+using UnityEngine;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class XTargetRewardPopWindow
+ {
+ public Transform panelObject = null;
+
+ public IXUIButton closeBtn = null;
+
+ public IXUIWrapContent wrapContent = null;
+
+ public IXUIScrollView panelScrollView = null;
+
+ public TargetItemInfo targetItemInfo = null;
+
+ private int maxAwardNum = 3;
+
+ public void init()
+ {
+ bool flag = this.wrapContent != null;
+ if (flag)
+ {
+ this.wrapContent.RegisterItemUpdateEventHandler(new WrapItemUpdateEventHandler(this.PopWrapContentItemUpdated));
+ }
+ bool flag2 = this.closeBtn != null;
+ if (flag2)
+ {
+ this.closeBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnClosePopwindow));
+ }
+ }
+
+ private bool OnClosePopwindow(IXUIButton btn)
+ {
+ bool flag = this.panelObject != null;
+ if (flag)
+ {
+ this.panelObject.gameObject.SetActive(false);
+ }
+ return true;
+ }
+
+ public void ShowPopView(TargetItemInfo info)
+ {
+ bool flag = this.panelObject != null;
+ if (flag)
+ {
+ this.panelObject.gameObject.SetActive(true);
+ this.targetItemInfo = info;
+ this.wrapContent.SetContentCount(info.subItems.Count, false);
+ this.panelScrollView.ResetPosition();
+ }
+ }
+
+ private void PopWrapContentItemUpdated(Transform t, int index)
+ {
+ bool flag = this.targetItemInfo != null;
+ if (flag)
+ {
+ bool flag2 = index < this.targetItemInfo.subItems.Count && index >= 0;
+ if (flag2)
+ {
+ this._SetRecord(t, this.targetItemInfo, index);
+ }
+ }
+ else
+ {
+ XSingleton<XDebug>.singleton.AddErrorLog("targetItemInfo is nil or index: ", index.ToString(), null, null, null, null);
+ }
+ }
+
+ protected void _SetRecord(Transform t, TargetItemInfo info, int showIndex)
+ {
+ IXUILabel ixuilabel = t.Find("TLabel").GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel2 = t.Find("DLabel").GetComponent("XUILabel") as IXUILabel;
+ IXUILabelSymbol ixuilabelSymbol = t.Find("Sprite").GetComponent("XUILabelSymbol") as IXUILabelSymbol;
+ IXUISprite ixuisprite = t.Find("Fini").GetComponent("XUISprite") as IXUISprite;
+ Transform[] array = new Transform[this.maxAwardNum];
+ for (int i = 0; i < this.maxAwardNum; i++)
+ {
+ array[i] = t.Find("tmp/ItemTpl1_" + (i + 1));
+ }
+ int num = info.subItems.Count - 1;
+ GoalAwards.RowData rowData = info.subItems[showIndex];
+ ixuilabel.SetText(rowData.Description);
+ ixuilabel2.SetText(rowData.Explanation);
+ bool flag = (ulong)info.gottenAwardsIndex >= (ulong)((long)(showIndex + 1));
+ if (flag)
+ {
+ ixuisprite.SetSprite("L_ylq");
+ }
+ else
+ {
+ ixuisprite.SetSprite("L_wlq");
+ }
+ bool flag2 = rowData.TitleID > 0u;
+ if (flag2)
+ {
+ ixuilabelSymbol.SetVisible(true);
+ XDesignationDocument specificDocument = XDocuments.GetSpecificDocument<XDesignationDocument>(XDesignationDocument.uuID);
+ DesignationTable.RowData byID = specificDocument._DesignationTable.GetByID((int)rowData.TitleID);
+ bool flag3 = byID.Effect == "";
+ string inputText;
+ if (flag3)
+ {
+ inputText = byID.Color + byID.Designation;
+ }
+ else
+ {
+ inputText = XLabelSymbolHelper.FormatDesignation(byID.Atlas, byID.Effect, 16);
+ }
+ ixuilabelSymbol.InputText = inputText;
+ }
+ else
+ {
+ ixuilabelSymbol.SetVisible(false);
+ }
+ int num2 = Math.Min(this.maxAwardNum, rowData.Awards.Count);
+ XTargetRewardDocument specificDocument2 = XDocuments.GetSpecificDocument<XTargetRewardDocument>(XTargetRewardDocument.uuID);
+ for (int j = 0; j < num2; j++)
+ {
+ bool flag4 = specificDocument2 != null && specificDocument2.m_designationId == (int)rowData.Awards[j, 0];
+ if (flag4)
+ {
+ array[j].gameObject.SetActive(false);
+ }
+ else
+ {
+ array[j].gameObject.SetActive(true);
+ int num3 = (int)rowData.Awards[j, 0];
+ int itemCount = (int)rowData.Awards[j, 1];
+ XSingleton<XItemDrawerMgr>.singleton.normalItemDrawer.DrawItem(array[j].gameObject, num3, itemCount, false);
+ IXUISprite ixuisprite2 = array[j].gameObject.transform.Find("Icon").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite2.ID = (ulong)((long)num3);
+ ixuisprite2.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(XSingleton<UiUtility>.singleton.OnItemClick));
+ }
+ }
+ for (int k = num2; k < this.maxAwardNum; k++)
+ {
+ array[k].gameObject.SetActive(false);
+ }
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/XTargetRewardPopWindow.cs.meta b/Client/Assets/Scripts/XMainClient/UI/XTargetRewardPopWindow.cs.meta
new file mode 100644
index 00000000..f332468e
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XTargetRewardPopWindow.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 88345a4401655be44908924a2f3263e8
+timeCreated: 1611404083
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/XTargetRewardView.cs b/Client/Assets/Scripts/XMainClient/UI/XTargetRewardView.cs
new file mode 100644
index 00000000..e18fc42e
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XTargetRewardView.cs
@@ -0,0 +1,328 @@
+using System;
+using UILib;
+using UnityEngine;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class XTargetRewardView : DlgHandlerBase
+ {
+ private XTargetRewardDocument _doc = null;
+
+ private XTargetRewardPopWindow popWindow = new XTargetRewardPopWindow();
+
+ private IXUICheckBox[] m_padTabs = new IXUICheckBox[4];
+
+ private IXUISprite[] m_padPoint = new IXUISprite[4];
+
+ public TargetRewardType m_targetRewardType;
+
+ public IXUIWrapContent m_WrapContent;
+
+ public IXUIScrollView m_PanelScrollView;
+
+ private IXUIList m_GoalList;
+
+ private int maxAwardNum = 4;
+
+ protected override void Init()
+ {
+ base.Init();
+ this.popWindow.panelObject = base.PanelObject.transform.Find("Top");
+ this.popWindow.closeBtn = (base.PanelObject.transform.Find("Top/Bg/Close").GetComponent("XUIButton") as IXUIButton);
+ this.popWindow.wrapContent = (base.PanelObject.transform.Find("Top/Bg/detail/WrapContent").GetComponent("XUIWrapContent") as IXUIWrapContent);
+ this.popWindow.panelScrollView = (base.PanelObject.transform.Find("Top/Bg/detail").GetComponent("XUIScrollView") as IXUIScrollView);
+ this.popWindow.init();
+ this._doc = XDocuments.GetSpecificDocument<XTargetRewardDocument>(XTargetRewardDocument.uuID);
+ this._doc.InitOpenGoalAward();
+ int num = 0;
+ for (int i = 0; i < this.m_padTabs.Length; i++)
+ {
+ this.m_padTabs[i] = (base.PanelObject.transform.Find("padTabs/TabList/TabTpl" + i + "/Bg").GetComponent("XUICheckBox") as IXUICheckBox);
+ this.m_padPoint[i] = (base.PanelObject.transform.Find("padTabs/TabList/TabTpl" + i + "/Bg/RedPoint").GetComponent("XUISprite") as IXUISprite);
+ IXUISprite ixuisprite = base.PanelObject.transform.Find("padTabs/TabList/TabTpl" + i).GetComponent("XUISprite") as IXUISprite;
+ this.m_padPoint[i].gameObject.SetActive(false);
+ bool flag = this.m_padTabs[i] != null;
+ if (flag)
+ {
+ this.m_padTabs[i].ID = (ulong)i;
+ this.m_padTabs[i].RegisterOnCheckEventHandler(new CheckBoxOnCheckEventHandler(this.OnTabControlStateChange));
+ }
+ bool flag2 = ixuisprite != null;
+ if (flag2)
+ {
+ ixuisprite.gameObject.SetActive(this._doc.m_isGoalOpen[i + 1]);
+ bool flag3 = this._doc.m_isGoalOpen[i + 1] && num == 0;
+ if (flag3)
+ {
+ num = i;
+ this.m_padTabs[i].ForceSetFlag(true);
+ }
+ else
+ {
+ this.m_padTabs[i].ForceSetFlag(false);
+ }
+ }
+ }
+ this.m_GoalList = (base.PanelObject.transform.Find("padTabs/TabList").GetComponent("XUIList") as IXUIList);
+ this.m_PanelScrollView = (base.PanelObject.transform.Find("detail/detail").GetComponent("XUIScrollView") as IXUIScrollView);
+ this.m_WrapContent = (base.PanelObject.transform.Find("detail/detail/WrapContent").GetComponent("XUIWrapContent") as IXUIWrapContent);
+ this.m_WrapContent.RegisterItemUpdateEventHandler(new WrapItemUpdateEventHandler(this.WrapContentItemUpdated));
+ this.m_GoalList.Refresh();
+ }
+
+ private void WrapContentItemUpdated(Transform t, int index)
+ {
+ bool flag = this._doc != null;
+ if (flag)
+ {
+ bool flag2 = index < this._doc.targetAwardDetails.Count && index >= 0;
+ if (flag2)
+ {
+ TargetItemInfo info = this._doc.targetAwardDetails[index];
+ this._SetRecord(t, info);
+ }
+ }
+ else
+ {
+ XSingleton<XDebug>.singleton.AddErrorLog("_doc is nil or index: ", index.ToString(), null, null, null, null);
+ }
+ }
+
+ protected void _SetProgressBar(IXUILabel label, IXUIProgress progressBar, TargetItemInfo info)
+ {
+ int num = info.subItems.Count - 1;
+ int num2 = (int)Math.Min(info.gottenAwardsIndex, info.doneIndex);
+ num2 = Math.Min(num2, num);
+ GoalAwards.RowData rowData = info.subItems[num2];
+ double num3 = info.totalvalue;
+ double num4 = rowData.AwardsValue;
+ bool flag = (ulong)info.gottenAwardsIndex == (ulong)((long)(num + 1));
+ if (flag)
+ {
+ label.SetVisible(false);
+ progressBar.SetVisible(false);
+ }
+ else
+ {
+ label.SetVisible(true);
+ progressBar.SetVisible(true);
+ bool flag2 = rowData.ShowType == 2u;
+ if (flag2)
+ {
+ bool flag3 = info.gottenAwardsIndex < info.doneIndex;
+ if (flag3)
+ {
+ num3 = 1.0;
+ num4 = 1.0;
+ }
+ else
+ {
+ num3 = 0.0;
+ num4 = 1.0;
+ }
+ }
+ label.SetText(XSingleton<UiUtility>.singleton.NumberFormat((ulong)num3) + " / " + XSingleton<UiUtility>.singleton.NumberFormat((ulong)num4));
+ bool flag4 = (ulong)info.gottenAwardsIndex < (ulong)((long)(num + 1)) && info.gottenAwardsIndex == info.doneIndex;
+ if (flag4)
+ {
+ bool flag5 = num3 < num4;
+ if (flag5)
+ {
+ progressBar.value = (float)(num3 / num4);
+ }
+ else
+ {
+ progressBar.value = 0f;
+ }
+ }
+ else
+ {
+ progressBar.value = 1f;
+ }
+ }
+ }
+
+ protected void _SetRecord(Transform t, TargetItemInfo info)
+ {
+ IXUILabel ixuilabel = t.Find("TLabel").GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel2 = t.Find("DLabel").GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel3 = t.Find("ch").GetComponent("XUILabel") as IXUILabel;
+ IXUIButton ixuibutton = t.Find("Get").GetComponent("XUIButton") as IXUIButton;
+ IXUISprite ixuisprite = t.Find("Fini").GetComponent("XUISprite") as IXUISprite;
+ IXUISprite ixuisprite2 = t.Find("RedPoint").GetComponent("XUISprite") as IXUISprite;
+ IXUIProgress ixuiprogress = t.Find("slider").GetComponent("XUIProgress") as IXUIProgress;
+ IXUILabel label = t.Find("slider/PLabel").GetComponent("XUILabel") as IXUILabel;
+ Transform[] array = new Transform[this.maxAwardNum];
+ for (int i = 0; i < this.maxAwardNum; i++)
+ {
+ array[i] = t.Find("tmp/ItemTpl1_" + (i + 1));
+ }
+ int num = info.subItems.Count - 1;
+ int num2 = (int)Math.Min(info.gottenAwardsIndex, info.doneIndex);
+ num2 = Math.Min(num2, num);
+ GoalAwards.RowData rowData = info.subItems[num2];
+ ixuilabel.SetText(rowData.Description);
+ ixuilabel2.SetText(rowData.Explanation);
+ ixuisprite.SetVisible((ulong)info.gottenAwardsIndex == (ulong)((long)(num + 1)));
+ ixuisprite2.SetVisible(info.gottenAwardsIndex < info.doneIndex);
+ this._SetProgressBar(label, ixuiprogress, info);
+ int num3 = Math.Min(this.maxAwardNum, rowData.Awards.Count);
+ bool flag = (ulong)info.gottenAwardsIndex == (ulong)((long)(num + 1));
+ if (flag)
+ {
+ num3 = 0;
+ }
+ for (int j = 0; j < num3; j++)
+ {
+ array[j].gameObject.SetActive(true);
+ int num4 = (int)rowData.Awards[j, 0];
+ int itemCount = (int)rowData.Awards[j, 1];
+ XSingleton<XItemDrawerMgr>.singleton.normalItemDrawer.DrawItem(array[j].gameObject, num4, itemCount, false);
+ IXUISprite ixuisprite3 = array[j].gameObject.transform.Find("Icon").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite3.ID = (ulong)((long)num4);
+ ixuisprite3.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(XSingleton<UiUtility>.singleton.OnItemClick));
+ }
+ for (int k = num3; k < this.maxAwardNum; k++)
+ {
+ array[k].gameObject.SetActive(false);
+ }
+ bool visible = info.gottenAwardsIndex >= info.doneIndex && (ulong)info.gottenAwardsIndex != (ulong)((long)(num + 1));
+ bool visible2 = info.gottenAwardsIndex < info.doneIndex;
+ ixuiprogress.SetVisible(visible);
+ ixuibutton.SetVisible(visible2);
+ ixuibutton.ID = (ulong)info.goalAwardsID;
+ ixuibutton.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnBtnClick));
+ ixuilabel3.ID = (ulong)info.goalAwardsID;
+ ixuilabel3.RegisterLabelClickEventHandler(new LabelClickEventHandler(this.OnLabelClick));
+ }
+
+ private void OnLabelClick(IXUILabel uiSprite)
+ {
+ this.ShowDetailView((int)uiSprite.ID);
+ }
+
+ private void ShowDetailView(int goalAwardsID)
+ {
+ TargetItemInfo info = new TargetItemInfo();
+ bool flag = false;
+ for (int i = 0; i < this._doc.targetAwardDetails.Count; i++)
+ {
+ bool flag2 = (ulong)this._doc.targetAwardDetails[i].goalAwardsID == (ulong)((long)goalAwardsID);
+ if (flag2)
+ {
+ flag = true;
+ info = this._doc.targetAwardDetails[i];
+ break;
+ }
+ }
+ bool flag3 = !flag;
+ if (!flag3)
+ {
+ this.popWindow.ShowPopView(info);
+ }
+ }
+
+ private bool OnBtnClick(IXUIButton btn)
+ {
+ TargetItemInfo targetItemInfo = new TargetItemInfo();
+ bool flag = false;
+ for (int i = 0; i < this._doc.targetAwardDetails.Count; i++)
+ {
+ bool flag2 = (ulong)this._doc.targetAwardDetails[i].goalAwardsID == (ulong)((long)((int)btn.ID));
+ if (flag2)
+ {
+ flag = true;
+ targetItemInfo = this._doc.targetAwardDetails[i];
+ break;
+ }
+ }
+ bool flag3 = flag && targetItemInfo.gottenAwardsIndex < targetItemInfo.doneIndex;
+ if (flag3)
+ {
+ this._doc.ClaimAchieve((int)btn.ID);
+ }
+ return true;
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ this._doc = XDocuments.GetSpecificDocument<XTargetRewardDocument>(XTargetRewardDocument.uuID);
+ this._doc.rwdView = this;
+ this.RefreshRedPoint();
+ this.m_padTabs[0].ForceSetFlag(true);
+ this.ReqDetailInfo(0);
+ }
+
+ public override void OnUpdate()
+ {
+ base.OnUpdate();
+ }
+
+ protected override void OnHide()
+ {
+ base.OnHide();
+ base.PanelObject.SetActive(false);
+ }
+
+ public override void OnUnload()
+ {
+ this._doc = null;
+ base.OnUnload();
+ }
+
+ public bool OnTabControlStateChange(IXUICheckBox chkBox)
+ {
+ bool bChecked = chkBox.bChecked;
+ if (bChecked)
+ {
+ this.OnTabClick((int)chkBox.ID);
+ }
+ return true;
+ }
+
+ private void OnTabClick(int index)
+ {
+ this.ReqDetailInfo(index);
+ }
+
+ private void ReqDetailInfo(int index)
+ {
+ bool flag = this._doc != null;
+ if (flag)
+ {
+ this.m_targetRewardType = index + TargetRewardType.Athletics;
+ this._doc.FetchTargetRewardType(this.m_targetRewardType);
+ }
+ }
+
+ public void RefreshDetails()
+ {
+ this.m_WrapContent.SetContentCount(this._doc.targetAwardDetails.Count, false);
+ this.m_PanelScrollView.ResetPosition();
+ }
+
+ public void RefreshRedPoint()
+ {
+ for (int i = 0; i < this.m_padPoint.Length; i++)
+ {
+ this.m_padPoint[i].SetVisible(false);
+ }
+ for (int j = 0; j < this._doc.m_redList.Count; j++)
+ {
+ int num = (int)this._doc.m_redList[j];
+ bool flag = num <= this.m_padPoint.Length;
+ if (flag)
+ {
+ this.m_padPoint[num - 1].SetVisible(true);
+ }
+ }
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/XTargetRewardView.cs.meta b/Client/Assets/Scripts/XMainClient/UI/XTargetRewardView.cs.meta
new file mode 100644
index 00000000..03cabe46
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XTargetRewardView.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 6543e0fde51f7ac4bbe615d152e24ffb
+timeCreated: 1611403850
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/XTeamBattleConfirmBehaviour.cs b/Client/Assets/Scripts/XMainClient/UI/XTeamBattleConfirmBehaviour.cs
new file mode 100644
index 00000000..641084cf
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XTeamBattleConfirmBehaviour.cs
@@ -0,0 +1,55 @@
+using System;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class XTeamBattleConfirmBehaviour : DlgBehaviourBase
+ {
+ public IXUIButton m_OK = null;
+
+ public IXUIButton m_Cancel = null;
+
+ public IXUILabel m_DungeonName;
+
+ public IXUIProgress m_Progress;
+
+ public XUIPool m_Pool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ public GameObject m_GoldGroup;
+
+ public IXUILabel m_statLab;
+
+ public GameObject m_tipsGo;
+
+ public IXUILabel m_CommonTip;
+
+ public GameObject m_RiftPanel;
+
+ public static int RiftBuffCount = 5;
+
+ public GameObject[] m_RiftBuffs;
+
+ private void Awake()
+ {
+ this.m_OK = (base.transform.Find("Bg/OK").GetComponent("XUIButton") as IXUIButton);
+ this.m_Cancel = (base.transform.Find("Bg/Cancel").GetComponent("XUIButton") as IXUIButton);
+ this.m_DungeonName = (base.transform.Find("Bg/DungeonName").GetComponent("XUILabel") as IXUILabel);
+ this.m_Progress = (base.transform.Find("Bg/Progress").GetComponent("XUIProgress") as IXUIProgress);
+ this.m_GoldGroup = base.transform.Find("Bg/RewardHunt").gameObject;
+ Transform transform = base.transform.Find("Bg/Members/Tpl");
+ this.m_Pool.SetupPool(transform.parent.gameObject, transform.gameObject, 4u, false);
+ this.m_statLab = (base.transform.Find("Bg/Start").GetComponent("XUILabel") as IXUILabel);
+ this.m_tipsGo = base.transform.Find("LetsMakeFriends").gameObject;
+ this.m_CommonTip = (base.transform.Find("Tip").GetComponent("XUILabel") as IXUILabel);
+ this.m_RiftPanel = base.transform.Find("Bg/RiftBuff").gameObject;
+ this.m_RiftBuffs = new GameObject[XTeamBattleConfirmBehaviour.RiftBuffCount];
+ for (int i = 0; i < XTeamBattleConfirmBehaviour.RiftBuffCount; i++)
+ {
+ this.m_RiftBuffs[i] = this.m_RiftPanel.transform.Find("BossBuff" + i).gameObject;
+ }
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/XTeamBattleConfirmBehaviour.cs.meta b/Client/Assets/Scripts/XMainClient/UI/XTeamBattleConfirmBehaviour.cs.meta
new file mode 100644
index 00000000..02665126
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XTeamBattleConfirmBehaviour.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 8f87ff617afbf2c4bb240f771f3852db
+timeCreated: 1611404134
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/XTeamBattleConfirmView.cs b/Client/Assets/Scripts/XMainClient/UI/XTeamBattleConfirmView.cs
new file mode 100644
index 00000000..09a31e30
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XTeamBattleConfirmView.cs
@@ -0,0 +1,296 @@
+using System;
+using KKSG;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class XTeamBattleConfirmView : DlgBase<XTeamBattleConfirmView, XTeamBattleConfirmBehaviour>
+ {
+ public override string fileName
+ {
+ get
+ {
+ return "Team/BattleBeginConfirmDlg";
+ }
+ }
+
+ public override int layer
+ {
+ get
+ {
+ return 1;
+ }
+ }
+
+ public override int group
+ {
+ get
+ {
+ return 1;
+ }
+ }
+
+ public override bool autoload
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override bool isPopup
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ private XTeamDocument doc;
+
+ private ButtonClickEventHandler m_OKHandler;
+
+ private ButtonClickEventHandler m_CancelHandler;
+
+ private float FIGHT_VOTE_TIME = 5f;
+
+ private float m_TargetTime;
+
+ private float m_CurrentTime;
+
+ protected override void Init()
+ {
+ this.doc = XDocuments.GetSpecificDocument<XTeamDocument>(XTeamDocument.uuID);
+ this.FIGHT_VOTE_TIME = (float)XSingleton<XGlobalConfig>.singleton.GetInt("TeamVoteTime");
+ }
+
+ public override void RegisterEvent()
+ {
+ base.uiBehaviour.m_OK.RegisterClickEventHandler(new ButtonClickEventHandler(this._OnOKBtnClick));
+ base.uiBehaviour.m_Cancel.RegisterClickEventHandler(new ButtonClickEventHandler(this._OnCancelBtnClick));
+ }
+
+ public override void OnUpdate()
+ {
+ base.OnUpdate();
+ bool flag = this.m_TargetTime > 0f;
+ if (flag)
+ {
+ bool flag2 = this.m_CurrentTime >= this.m_TargetTime;
+ if (flag2)
+ {
+ this.m_TargetTime = -1f;
+ }
+ else
+ {
+ bool flag3 = this.m_CurrentTime < this.m_TargetTime;
+ if (flag3)
+ {
+ this.m_CurrentTime += Time.deltaTime;
+ base.uiBehaviour.m_Progress.value = this.m_CurrentTime / this.m_TargetTime;
+ }
+ }
+ }
+ }
+
+ public void StartFightVote()
+ {
+ bool flag = !base.IsVisible();
+ if (flag)
+ {
+ this.SetVisibleWithAnimation(true, null);
+ }
+ this.m_OKHandler = new ButtonClickEventHandler(this._OnFightAgreeBtnClick);
+ this.m_CancelHandler = new ButtonClickEventHandler(this._OnFightRejectBtnClick);
+ this.m_TargetTime = this.FIGHT_VOTE_TIME;
+ this.m_CurrentTime = 0f;
+ base.uiBehaviour.m_Progress.value = 0f;
+ base.uiBehaviour.m_Progress.ForceUpdate();
+ this.RefreshFightVote();
+ }
+
+ public void RefreshFightVote()
+ {
+ bool flag = !base.IsVisible() || !this.doc.bInTeam;
+ if (!flag)
+ {
+ base.uiBehaviour.m_Pool.FakeReturnAll();
+ bool flag2 = this.doc.currentDungeonType == TeamLevelType.TeamLevelPartner;
+ if (flag2)
+ {
+ base.uiBehaviour.m_statLab.SetText(this.doc.currentDungeonName);
+ base.uiBehaviour.m_DungeonName.SetText(string.Format(XSingleton<XStringTable>.singleton.GetString("GetPartnerNeedMoney"), XSingleton<XGlobalConfig>.singleton.GetInt("PartnerNeedDragonCoin")));
+ base.uiBehaviour.m_tipsGo.SetActive(false);
+ base.uiBehaviour.m_CommonTip.SetVisible(false);
+ }
+ else
+ {
+ bool flag3 = this.doc.currentDungeonType == TeamLevelType.TeamLevelTeamLeague;
+ if (flag3)
+ {
+ base.uiBehaviour.m_statLab.SetText(XSingleton<XStringTable>.singleton.GetString("CREATE_TEAM_LEAGUE"));
+ base.uiBehaviour.m_DungeonName.SetText(this.doc.teamLeagueName);
+ base.uiBehaviour.m_tipsGo.SetActive(false);
+ base.uiBehaviour.m_CommonTip.SetText(XSingleton<XStringTable>.singleton.GetString("CREATE_TEAM_LEAGUE_TIP"));
+ base.uiBehaviour.m_CommonTip.SetVisible(true);
+ }
+ else
+ {
+ base.uiBehaviour.m_statLab.SetText(XSingleton<XStringTable>.singleton.GetString("START_FIGHT"));
+ bool flag4 = this.doc.MyTeam.teamBrief.rift == null;
+ if (flag4)
+ {
+ base.uiBehaviour.m_DungeonName.SetText(this.doc.currentDungeonName);
+ }
+ else
+ {
+ base.uiBehaviour.m_DungeonName.SetText(this.doc.MyTeam.teamBrief.rift.GetSceneName(this.doc.currentDungeonName));
+ }
+ bool flag5 = this.doc.currentDungeonType == TeamLevelType.TeamLevelWedding;
+ if (flag5)
+ {
+ base.uiBehaviour.m_tipsGo.SetActive(false);
+ }
+ else
+ {
+ base.uiBehaviour.m_tipsGo.SetActive(true);
+ }
+ base.uiBehaviour.m_CommonTip.SetVisible(false);
+ }
+ }
+ float num = (float)this.doc.MyTeam.members.Count * 0.5f - 0.5f;
+ Vector3 tplPos = base.uiBehaviour.m_Pool.TplPos;
+ for (int i = 0; i < this.doc.MyTeam.members.Count; i++)
+ {
+ GameObject gameObject = base.uiBehaviour.m_Pool.FetchGameObject(false);
+ IXUISprite ixuisprite = gameObject.transform.Find("Avatar").GetComponent("XUISprite") as IXUISprite;
+ IXUILabelSymbol ixuilabelSymbol = gameObject.transform.Find("Name").GetComponent("XUILabelSymbol") as IXUILabelSymbol;
+ IXUISprite ixuisprite2 = gameObject.GetComponent("XUISprite") as IXUISprite;
+ gameObject.transform.localPosition = new Vector3(((float)i - num) * (float)base.uiBehaviour.m_Pool.TplWidth, tplPos.y);
+ XTeamMember xteamMember = this.doc.MyTeam.members[i];
+ ixuisprite.SetSprite(XSingleton<XProfessionSkillMgr>.singleton.GetProfHeadIcon2(XFastEnumIntEqualityComparer<RoleType>.ToInt(xteamMember.profession)));
+ ixuilabelSymbol.InputText = XSingleton<XCommon>.singleton.StringCombine(xteamMember.name, XRechargeDocument.GetVIPIconString(xteamMember.vip));
+ bool flag6 = xteamMember.state != ExpTeamMemberState.EXPTEAM_READY;
+ if (flag6)
+ {
+ ixuisprite2.SetEnabled(false);
+ }
+ else
+ {
+ bool flag7 = !ixuisprite2.IsEnabled();
+ if (flag7)
+ {
+ ixuisprite2.SetEnabled(xteamMember.state == ExpTeamMemberState.EXPTEAM_READY);
+ }
+ }
+ }
+ base.uiBehaviour.m_Pool.ActualReturnAll(false);
+ base.uiBehaviour.m_OK.SetVisible(this.doc.MyTeam.myData != null && this.doc.MyTeam.myData.state == ExpTeamMemberState.EXPTEAM_IDLE);
+ base.uiBehaviour.m_Cancel.SetVisible(this.doc.MyTeam.myData != null && this.doc.MyTeam.myData.state == ExpTeamMemberState.EXPTEAM_IDLE);
+ this.doc.MyTeam.teamBrief.goldGroup.SetUI(base.uiBehaviour.m_GoldGroup, true);
+ this._SetRift(this.doc.MyTeam.teamBrief.rift);
+ }
+ }
+
+ private bool _OnOKBtnClick(IXUIButton go)
+ {
+ return this.m_OKHandler(go);
+ }
+
+ private bool _OnCancelBtnClick(IXUIButton go)
+ {
+ return this.m_CancelHandler(go);
+ }
+
+ private bool _OnFightAgreeBtnClick(IXUIButton go)
+ {
+ this.doc.ReqTeamOp(TeamOperate.TEAM_START_BATTLE_AGREE, 0UL, null, TeamMemberType.TMT_NORMAL, null);
+ return true;
+ }
+
+ private bool _OnFightRejectBtnClick(IXUIButton go)
+ {
+ this.SetVisibleWithAnimation(false, null);
+ this.doc.ReqTeamOp(TeamOperate.TEAM_START_BATTLE_DISAGREE, 0UL, null, TeamMemberType.TMT_NORMAL, null);
+ return true;
+ }
+
+ protected override void OnPopupBlocked()
+ {
+ this.doc.ReqTeamOp(TeamOperate.TEAM_START_BATTLE_DISAGREE, 0UL, null, TeamMemberType.TMT_NORMAL, null);
+ }
+
+ private void _SetRift(XTeamRift data)
+ {
+ bool flag = data == null;
+ if (flag)
+ {
+ base.uiBehaviour.m_RiftPanel.SetActive(false);
+ }
+ else
+ {
+ XRiftDocument specificDocument = XDocuments.GetSpecificDocument<XRiftDocument>(XRiftDocument.uuID);
+ Rift.RowData riftData = specificDocument.GetRiftData(data.floor, (int)data.id);
+ bool flag2 = riftData == null;
+ if (flag2)
+ {
+ XSingleton<XDebug>.singleton.AddErrorLog("Cant find rift data with floor ", data.floor.ToString(), null, null, null, null);
+ base.uiBehaviour.m_RiftPanel.SetActive(false);
+ }
+ else
+ {
+ base.uiBehaviour.m_RiftPanel.SetActive(true);
+ this._RefreshRiftBuff(base.uiBehaviour.m_RiftBuffs[0], string.Empty, XSingleton<XGlobalConfig>.singleton.GetValue("RiftAttr"), riftData.attack + "%");
+ this._RefreshRiftBuff(base.uiBehaviour.m_RiftBuffs[1], string.Empty, XSingleton<XGlobalConfig>.singleton.GetValue("RiftHP"), riftData.hp + "%");
+ int i = 2;
+ while (i < base.uiBehaviour.m_RiftBuffs.Length && i < data.buffs.Count + 2)
+ {
+ base.uiBehaviour.m_RiftBuffs[i].SetActive(true);
+ RiftBuffSuitMonsterType.RowData buffSuitRow = specificDocument.GetBuffSuitRow((uint)data.buffs[i - 2].BuffID, data.buffs[i - 2].BuffLevel);
+ bool flag3 = buffSuitRow == null;
+ if (flag3)
+ {
+ XDebug singleton = XSingleton<XDebug>.singleton;
+ string log = "Cant find RiftSuit with buff [";
+ BuffDesc buffDesc = data.buffs[i - 2];
+ string log2 = buffDesc.BuffID.ToString();
+ string log3 = ", ";
+ buffDesc = data.buffs[i - 2];
+ singleton.AddErrorLog(log, log2, log3, buffDesc.BuffLevel.ToString(), "]", null);
+ this._RefreshRiftBuff(base.uiBehaviour.m_RiftBuffs[i], string.Empty, string.Empty, string.Empty);
+ }
+ else
+ {
+ this._RefreshRiftBuff(base.uiBehaviour.m_RiftBuffs[i], buffSuitRow.atlas, buffSuitRow.icon, string.Empty);
+ }
+ i++;
+ }
+ while (i < base.uiBehaviour.m_RiftBuffs.Length)
+ {
+ base.uiBehaviour.m_RiftBuffs[i].SetActive(false);
+ i++;
+ }
+ }
+ }
+ }
+
+ private void _RefreshRiftBuff(GameObject go, string atlas, string sp, string text)
+ {
+ IXUILabel ixuilabel = go.transform.Find("value").GetComponent("XUILabel") as IXUILabel;
+ IXUISprite ixuisprite = go.transform.Find("P").GetComponent("XUISprite") as IXUISprite;
+ ixuilabel.SetText(text);
+ bool flag = string.IsNullOrEmpty(atlas);
+ if (flag)
+ {
+ ixuisprite.SetSprite(sp);
+ }
+ else
+ {
+ ixuisprite.SetSprite(sp, atlas, false);
+ }
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/XTeamBattleConfirmView.cs.meta b/Client/Assets/Scripts/XMainClient/UI/XTeamBattleConfirmView.cs.meta
new file mode 100644
index 00000000..06b307b8
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XTeamBattleConfirmView.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 924540c5c91f37c439fd36569c76e88f
+timeCreated: 1611404146
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/XTeamBattleQuickConfirmBehaviour.cs b/Client/Assets/Scripts/XMainClient/UI/XTeamBattleQuickConfirmBehaviour.cs
new file mode 100644
index 00000000..9e9c449f
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XTeamBattleQuickConfirmBehaviour.cs
@@ -0,0 +1,19 @@
+using System;
+using UILib;
+using XMainClient.UI.UICommon;
+
+namespace XMainClient.UI
+{
+ internal class XTeamBattleQuickConfirmBehaviour : DlgBehaviourBase
+ {
+ public IXUIButton m_Cancel = null;
+
+ public IXUILabel m_Time;
+
+ private void Awake()
+ {
+ this.m_Cancel = (base.transform.Find("Bg/Cancel").GetComponent("XUIButton") as IXUIButton);
+ this.m_Time = (base.transform.Find("Bg/CountDown").GetComponent("XUILabel") as IXUILabel);
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/XTeamBattleQuickConfirmBehaviour.cs.meta b/Client/Assets/Scripts/XMainClient/UI/XTeamBattleQuickConfirmBehaviour.cs.meta
new file mode 100644
index 00000000..5c858405
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XTeamBattleQuickConfirmBehaviour.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 5abcd4b836e1ce942807d1d55f041934
+timeCreated: 1611403792
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/XTeamBattleQuickConfirmView.cs b/Client/Assets/Scripts/XMainClient/UI/XTeamBattleQuickConfirmView.cs
new file mode 100644
index 00000000..e4ece634
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XTeamBattleQuickConfirmView.cs
@@ -0,0 +1,117 @@
+using System;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class XTeamBattleQuickConfirmView : DlgBase<XTeamBattleQuickConfirmView, XTeamBattleQuickConfirmBehaviour>
+ {
+ public override string fileName
+ {
+ get
+ {
+ return "Team/BattleQuickBeginConfirmDlg";
+ }
+ }
+
+ public override int layer
+ {
+ get
+ {
+ return 1;
+ }
+ }
+
+ public override int group
+ {
+ get
+ {
+ return 1;
+ }
+ }
+
+ public override bool autoload
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override bool isPopup
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ private XTeamDocument doc;
+
+ private float FIGHT_VOTE_TIME = 3f;
+
+ private float m_fLeftTime;
+
+ private int m_nLeftTime;
+
+ protected override void Init()
+ {
+ this.doc = XDocuments.GetSpecificDocument<XTeamDocument>(XTeamDocument.uuID);
+ this.FIGHT_VOTE_TIME = (float)XSingleton<XGlobalConfig>.singleton.GetInt("TeamFastMatchConfirmT");
+ }
+
+ public override void RegisterEvent()
+ {
+ base.uiBehaviour.m_Cancel.RegisterClickEventHandler(new ButtonClickEventHandler(this._OnCancelBtnClick));
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ this.m_fLeftTime = this.FIGHT_VOTE_TIME;
+ this.m_nLeftTime = (int)this.FIGHT_VOTE_TIME;
+ base.uiBehaviour.m_Time.SetText(this.m_nLeftTime.ToString());
+ base.uiBehaviour.m_Cancel.SetVisible(true);
+ }
+
+ public override void OnUpdate()
+ {
+ base.OnUpdate();
+ bool flag = this.m_fLeftTime > 0f;
+ if (flag)
+ {
+ this.m_fLeftTime -= Time.deltaTime;
+ int num = Mathf.CeilToInt(this.m_fLeftTime);
+ bool flag2 = this.m_nLeftTime != num;
+ if (flag2)
+ {
+ this.m_nLeftTime = num;
+ base.uiBehaviour.m_Time.SetText(this.m_nLeftTime.ToString());
+ }
+ }
+ else
+ {
+ base.uiBehaviour.m_Cancel.SetVisible(false);
+ this.SetVisibleWithAnimation(false, null);
+ }
+ }
+
+ private bool _OnCancelBtnClick(IXUIButton go)
+ {
+ PtcC2M_FMBRefuseC2M ptcC2M_FMBRefuseC2M = new PtcC2M_FMBRefuseC2M();
+ ptcC2M_FMBRefuseC2M.Data.refuse = true;
+ XSingleton<XClientNetwork>.singleton.Send(ptcC2M_FMBRefuseC2M);
+ this.SetVisibleWithAnimation(false, null);
+ return true;
+ }
+
+ protected override void OnPopupBlocked()
+ {
+ PtcC2M_FMBRefuseC2M ptcC2M_FMBRefuseC2M = new PtcC2M_FMBRefuseC2M();
+ ptcC2M_FMBRefuseC2M.Data.refuse = true;
+ XSingleton<XClientNetwork>.singleton.Send(ptcC2M_FMBRefuseC2M);
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/XTeamBattleQuickConfirmView.cs.meta b/Client/Assets/Scripts/XMainClient/UI/XTeamBattleQuickConfirmView.cs.meta
new file mode 100644
index 00000000..e1057d11
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XTeamBattleQuickConfirmView.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 8b3e51b1a8ef94e41add908dc5e21054
+timeCreated: 1611404094
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/XTeamConfirmBehaviour.cs b/Client/Assets/Scripts/XMainClient/UI/XTeamConfirmBehaviour.cs
new file mode 100644
index 00000000..d3ca7a6b
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XTeamConfirmBehaviour.cs
@@ -0,0 +1,43 @@
+using System;
+using UILib;
+using XMainClient.UI.UICommon;
+
+namespace XMainClient.UI
+{
+ internal class XTeamConfirmBehaviour : DlgBehaviourBase
+ {
+ public IXUIButton m_OK = null;
+
+ public IXUIButton m_Cancel = null;
+
+ public IXUILabel m_DungeonName;
+
+ public IXUILabel m_LeaderLevel;
+
+ public IXUILabel m_LeaderName;
+
+ public IXUILabel m_Content;
+
+ public IXUILabel m_MemberText;
+
+ public IXUILabel m_MemberCount;
+
+ public IXUILabel m_PPT;
+
+ public IXUIProgress m_Progress;
+
+ private void Awake()
+ {
+ this.m_OK = (base.transform.Find("Bg/OK").GetComponent("XUIButton") as IXUIButton);
+ this.m_Cancel = (base.transform.Find("Bg/Cancel").GetComponent("XUIButton") as IXUIButton);
+ this.m_DungeonName = (base.transform.Find("Bg/DungeonName").GetComponent("XUILabel") as IXUILabel);
+ this.m_LeaderLevel = (base.transform.Find("Bg/LeaderLevel").GetComponent("XUILabel") as IXUILabel);
+ this.m_LeaderName = (base.transform.Find("Bg/LeaderName").GetComponent("XUILabel") as IXUILabel);
+ this.m_Content = (base.transform.Find("Bg/Content").GetComponent("XUILabel") as IXUILabel);
+ this.m_MemberText = (base.transform.Find("Bg/Count").GetComponent("XUILabel") as IXUILabel);
+ this.m_MemberCount = (base.transform.Find("Bg/Count/Value").GetComponent("XUILabel") as IXUILabel);
+ this.m_PPT = (base.transform.Find("Bg/PPT/Value").GetComponent("XUILabel") as IXUILabel);
+ this.m_Progress = (base.transform.Find("Bg/Progress").GetComponent("XUIProgress") as IXUIProgress);
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/XTeamConfirmBehaviour.cs.meta b/Client/Assets/Scripts/XMainClient/UI/XTeamConfirmBehaviour.cs.meta
new file mode 100644
index 00000000..cc611a51
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XTeamConfirmBehaviour.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: f99e0fe6181a4e446afc34dc137dbf4c
+timeCreated: 1611404899
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/XTeamConfirmView.cs b/Client/Assets/Scripts/XMainClient/UI/XTeamConfirmView.cs
new file mode 100644
index 00000000..b3d3d600
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XTeamConfirmView.cs
@@ -0,0 +1,203 @@
+using System;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class XTeamConfirmView : DlgBase<XTeamConfirmView, XTeamConfirmBehaviour>
+ {
+ public override string fileName
+ {
+ get
+ {
+ return "Team/TeamConfirmDlg";
+ }
+ }
+
+ public override int layer
+ {
+ get
+ {
+ return 1;
+ }
+ }
+
+ public override int group
+ {
+ get
+ {
+ return 1;
+ }
+ }
+
+ public override bool autoload
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override bool isPopup
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ private XTeamInviteDocument doc;
+
+ private ButtonClickEventHandler m_OKHandler;
+
+ private ButtonClickEventHandler m_CancelHandler;
+
+ private float INVITE_TIME = 5f;
+
+ private float m_TargetTime;
+
+ private float m_CurrentTime;
+
+ private XTeamInviteData m_CurrentInviteData;
+
+ protected override void Init()
+ {
+ this.doc = XDocuments.GetSpecificDocument<XTeamInviteDocument>(XTeamInviteDocument.uuID);
+ this.INVITE_TIME = (float)XSingleton<XGlobalConfig>.singleton.GetInt("TeamInviteConfirmTime");
+ }
+
+ public override void RegisterEvent()
+ {
+ base.uiBehaviour.m_OK.RegisterClickEventHandler(new ButtonClickEventHandler(this._OnOKBtnClick));
+ base.uiBehaviour.m_Cancel.RegisterClickEventHandler(new ButtonClickEventHandler(this._OnCancelBtnClick));
+ }
+
+ public override void OnUpdate()
+ {
+ base.OnUpdate();
+ bool flag = this.m_TargetTime > 0f;
+ if (flag)
+ {
+ bool flag2 = this.m_CurrentTime >= this.m_TargetTime;
+ if (flag2)
+ {
+ this.m_TargetTime = -1f;
+ this._OnCancelBtnClick(null);
+ }
+ else
+ {
+ bool flag3 = this.m_CurrentTime < this.m_TargetTime;
+ if (flag3)
+ {
+ this.m_CurrentTime += Time.deltaTime;
+ base.uiBehaviour.m_Progress.value = this.m_CurrentTime / this.m_TargetTime;
+ }
+ }
+ }
+ }
+
+ public void ClearInviteList()
+ {
+ bool flag = this.m_CurrentInviteData != null;
+ if (flag)
+ {
+ this.m_CurrentInviteData.Recycle();
+ this.m_CurrentInviteData = null;
+ }
+ bool flag2 = base.IsVisible();
+ if (flag2)
+ {
+ this.SetVisibleWithAnimation(false, null);
+ }
+ }
+
+ public void InviteComing(XTeamInviteData data)
+ {
+ this.m_OKHandler = new ButtonClickEventHandler(this._OnInviteAgreeBtnClick);
+ this.m_CancelHandler = new ButtonClickEventHandler(this._OnInviteRejectBtnClick);
+ bool flag = this.m_CurrentInviteData != null;
+ if (flag)
+ {
+ this.doc.ReqTeamInviteAck(false, this.m_CurrentInviteData.inviteID);
+ this.m_CurrentInviteData.Recycle();
+ }
+ this.m_CurrentInviteData = data;
+ this.NewInvite(true);
+ }
+
+ public void NewInvite(bool bResetTime)
+ {
+ bool flag = this.m_CurrentInviteData == null;
+ if (!flag)
+ {
+ bool flag2 = !base.IsVisible();
+ if (flag2)
+ {
+ this.SetVisibleWithAnimation(true, null);
+ }
+ bool flag3 = !base.IsLoaded();
+ if (!flag3)
+ {
+ if (bResetTime)
+ {
+ this.m_TargetTime = this.INVITE_TIME;
+ this.m_CurrentTime = 0f;
+ base.uiBehaviour.m_Progress.value = 0f;
+ base.uiBehaviour.m_Progress.ForceUpdate();
+ }
+ XTeamInviteData currentInviteData = this.m_CurrentInviteData;
+ base.uiBehaviour.m_Content.SetText(XStringDefineProxy.GetString("TEAMCONFIRM_JOIN_CONTENT"));
+ base.uiBehaviour.m_MemberText.SetText(XStringDefineProxy.GetString("TEAMCONFIRM_JOIN_MEMBERTEXT"));
+ base.uiBehaviour.m_DungeonName.SetText(currentInviteData.briefData.dungeonName);
+ base.uiBehaviour.m_PPT.SetText(currentInviteData.briefData.leaderPPT.ToString());
+ base.uiBehaviour.m_MemberCount.SetText(string.Format("{0}/{1}", currentInviteData.briefData.currentMemberCount.ToString(), currentInviteData.briefData.totalMemberCount.ToString()));
+ base.uiBehaviour.m_LeaderName.SetText(currentInviteData.briefData.leaderName);
+ base.uiBehaviour.m_LeaderLevel.SetText(string.Format("Lv.{0}", currentInviteData.briefData.leaderLevel.ToString()));
+ }
+ }
+ }
+
+ private bool _OnOKBtnClick(IXUIButton go)
+ {
+ return this.m_OKHandler(go);
+ }
+
+ private bool _OnCancelBtnClick(IXUIButton go)
+ {
+ return this.m_CancelHandler(go);
+ }
+
+ private bool _OnInviteAgreeBtnClick(IXUIButton go)
+ {
+ bool flag = this.m_CurrentInviteData != null;
+ if (flag)
+ {
+ this.doc.ReqTeamInviteAck(true, this.m_CurrentInviteData.inviteID);
+ }
+ this.ClearInviteList();
+ return true;
+ }
+
+ private bool _OnInviteRejectBtnClick(IXUIButton go)
+ {
+ bool flag = this.m_CurrentInviteData != null;
+ if (flag)
+ {
+ bool flag2 = go != null;
+ if (flag2)
+ {
+ this.doc.ReqTeamInviteAck(false, this.m_CurrentInviteData.inviteID);
+ }
+ }
+ this.ClearInviteList();
+ return true;
+ }
+
+ protected override void OnPopupBlocked()
+ {
+ this.ClearInviteList();
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/XTeamConfirmView.cs.meta b/Client/Assets/Scripts/XMainClient/UI/XTeamConfirmView.cs.meta
new file mode 100644
index 00000000..9ddbdcd2
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XTeamConfirmView.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: fd4f3f1041819084d9fd33267a856c84
+timeCreated: 1611404937
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/XTeamInputPasswordBehaviour.cs b/Client/Assets/Scripts/XMainClient/UI/XTeamInputPasswordBehaviour.cs
new file mode 100644
index 00000000..11f7ef2d
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XTeamInputPasswordBehaviour.cs
@@ -0,0 +1,22 @@
+using System;
+using UILib;
+using XMainClient.UI.UICommon;
+
+namespace XMainClient.UI
+{
+ internal class XTeamInputPasswordBehaviour : DlgBehaviourBase
+ {
+ public IXUIInput m_Input;
+
+ public IXUIButton m_BtnOK;
+
+ public IXUIButton m_BtnClose;
+
+ private void Awake()
+ {
+ this.m_BtnOK = (base.transform.Find("Bg/OK").GetComponent("XUIButton") as IXUIButton);
+ this.m_BtnClose = (base.transform.Find("Bg/Close").GetComponent("XUIButton") as IXUIButton);
+ this.m_Input = (base.transform.Find("Bg/Input").GetComponent("XUIInput") as IXUIInput);
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/XTeamInputPasswordBehaviour.cs.meta b/Client/Assets/Scripts/XMainClient/UI/XTeamInputPasswordBehaviour.cs.meta
new file mode 100644
index 00000000..b03f73fb
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XTeamInputPasswordBehaviour.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 36b378954bbdc0349bfb3c6fb21fedea
+timeCreated: 1611403563
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/XTeamInviteBehaviour.cs b/Client/Assets/Scripts/XMainClient/UI/XTeamInviteBehaviour.cs
new file mode 100644
index 00000000..ad6074d2
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XTeamInviteBehaviour.cs
@@ -0,0 +1,51 @@
+using System;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+
+namespace XMainClient.UI
+{
+ internal class XTeamInviteBehaviour : DlgBehaviourBase
+ {
+ public IXUICheckBox m_ToggleRecommand;
+
+ public IXUICheckBox m_ToggleFriend;
+
+ public IXUICheckBox m_ToggleGuild;
+
+ public IXUICheckBox m_TogglePlatFriend;
+
+ public IXUIScrollView m_ScrollView;
+
+ public IXUIWrapContent m_WrapContent;
+
+ public GameObject m_EmptyList;
+
+ public IXUIButton m_BtnAddFriendBottom;
+
+ public IXUIButton m_BtnAddFriendMiddle;
+
+ public IXUIButton m_BtnJoinGuild;
+
+ public IXUISprite m_ClosedSpr;
+
+ private void Awake()
+ {
+ this.m_ToggleRecommand = (base.transform.Find("Bg/ToggleRecommand").GetComponent("XUICheckBox") as IXUICheckBox);
+ this.m_ToggleFriend = (base.transform.Find("Bg/ToggleFriend").GetComponent("XUICheckBox") as IXUICheckBox);
+ this.m_ToggleGuild = (base.transform.Find("Bg/ToggleGuild").GetComponent("XUICheckBox") as IXUICheckBox);
+ this.m_TogglePlatFriend = (base.transform.Find("Bg/TogglePlatFriend").GetComponent("XUICheckBox") as IXUICheckBox);
+ this.m_ToggleRecommand.ID = 0UL;
+ this.m_ToggleFriend.ID = 1UL;
+ this.m_ToggleGuild.ID = 2UL;
+ this.m_TogglePlatFriend.ID = 3UL;
+ this.m_ScrollView = (base.transform.Find("Bg/Panel").GetComponent("XUIScrollView") as IXUIScrollView);
+ this.m_WrapContent = (base.transform.Find("Bg/Panel/WrapContent").GetComponent("XUIWrapContent") as IXUIWrapContent);
+ this.m_EmptyList = base.transform.Find("Bg/Empty").gameObject;
+ this.m_BtnAddFriendBottom = (base.transform.Find("Bg/BtnAddFriendBottom").GetComponent("XUIButton") as IXUIButton);
+ this.m_BtnAddFriendMiddle = (base.transform.Find("Bg/BtnAddFriendMiddle").GetComponent("XUIButton") as IXUIButton);
+ this.m_BtnJoinGuild = (base.transform.Find("Bg/BtnJoinGuild").GetComponent("XUIButton") as IXUIButton);
+ this.m_ClosedSpr = (base.transform.Find("Bg/Close").GetComponent("XUISprite") as IXUISprite);
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/XTeamInviteBehaviour.cs.meta b/Client/Assets/Scripts/XMainClient/UI/XTeamInviteBehaviour.cs.meta
new file mode 100644
index 00000000..f2669268
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XTeamInviteBehaviour.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 19e70e493fc9a394f9cbca7b4a7cacab
+timeCreated: 1611403306
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/XTeamInviteView.cs b/Client/Assets/Scripts/XMainClient/UI/XTeamInviteView.cs
new file mode 100644
index 00000000..617bc6ad
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XTeamInviteView.cs
@@ -0,0 +1,393 @@
+using System;
+using System.Collections.Generic;
+using KKSG;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class XTeamInviteView : DlgBase<XTeamInviteView, XTeamInviteBehaviour>
+ {
+ public override string fileName
+ {
+ get
+ {
+ return "Team/TeamInviteDlg";
+ }
+ }
+
+ public override int layer
+ {
+ get
+ {
+ return 1;
+ }
+ }
+
+ public override int group
+ {
+ get
+ {
+ return 1;
+ }
+ }
+
+ public override bool autoload
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ private int m_SelectedTab = -1;
+
+ private XTeamDocument _TeamDoc;
+
+ private XTeamInviteDocument _InviteDoc;
+
+ private XGuildDocument _GuildDoc;
+
+ public List<IXUITexture> _WrapTextureList = new List<IXUITexture>();
+
+ private bool hasPlatFriends = false;
+
+ protected override void Init()
+ {
+ this._TeamDoc = XDocuments.GetSpecificDocument<XTeamDocument>(XTeamDocument.uuID);
+ this._GuildDoc = XDocuments.GetSpecificDocument<XGuildDocument>(XGuildDocument.uuID);
+ this._InviteDoc = XDocuments.GetSpecificDocument<XTeamInviteDocument>(XTeamInviteDocument.uuID);
+ this._InviteDoc.InviteHandler = this;
+ }
+
+ protected override void OnHide()
+ {
+ this.ClearPreTabTextures();
+ this.hasPlatFriends = false;
+ base.OnHide();
+ }
+
+ protected override void OnUnload()
+ {
+ this._InviteDoc.InviteHandler = null;
+ base.OnUnload();
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ base.uiBehaviour.m_ToggleFriend.RegisterOnCheckEventHandler(new CheckBoxOnCheckEventHandler(this._OnToggleChanged));
+ base.uiBehaviour.m_ToggleGuild.RegisterOnCheckEventHandler(new CheckBoxOnCheckEventHandler(this._OnToggleChanged));
+ base.uiBehaviour.m_ToggleRecommand.RegisterOnCheckEventHandler(new CheckBoxOnCheckEventHandler(this._OnToggleChanged));
+ base.uiBehaviour.m_TogglePlatFriend.RegisterOnCheckEventHandler(new CheckBoxOnCheckEventHandler(this._OnToggleChanged));
+ base.uiBehaviour.m_BtnAddFriendMiddle.RegisterClickEventHandler(new ButtonClickEventHandler(this._OnAddFriendClicked));
+ base.uiBehaviour.m_BtnAddFriendBottom.RegisterClickEventHandler(new ButtonClickEventHandler(this._OnAddFriendClicked));
+ base.uiBehaviour.m_BtnJoinGuild.RegisterClickEventHandler(new ButtonClickEventHandler(this._OnJoinGuildClicked));
+ base.uiBehaviour.m_WrapContent.RegisterItemUpdateEventHandler(new WrapItemUpdateEventHandler(this._WrapContentItemUpdated));
+ base.uiBehaviour.m_WrapContent.RegisterItemInitEventHandler(new WrapItemInitEventHandler(this._WrapContentItemInit));
+ base.uiBehaviour.m_ClosedSpr.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this._OnCloseClicked));
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ this._TryRefresh();
+ }
+
+ public override void StackRefresh()
+ {
+ this._TryRefresh();
+ }
+
+ private void _TryRefresh()
+ {
+ this._InviteDoc.ReqInviteList();
+ bool flag = this.m_SelectedTab != -1;
+ if (flag)
+ {
+ this.Refresh();
+ }
+ }
+
+ public void LocalServerRefresh()
+ {
+ bool flag = this.m_SelectedTab != 3;
+ if (flag)
+ {
+ this.Refresh();
+ }
+ }
+
+ public void Refresh()
+ {
+ bool flag = this._TeamDoc.currentExpInfo.isCrossServerInvite && XSingleton<XGameSysMgr>.singleton.IsSystemOpened(XSysDefine.XSys_Friends_Pk);
+ if (flag)
+ {
+ base.uiBehaviour.m_TogglePlatFriend.gameObject.SetActive(true);
+ }
+ else
+ {
+ base.uiBehaviour.m_TogglePlatFriend.gameObject.SetActive(false);
+ bool flag2 = this.m_SelectedTab == 3;
+ if (flag2)
+ {
+ this.m_SelectedTab = 0;
+ }
+ }
+ bool flag3 = this.m_SelectedTab == 3 && !this.hasPlatFriends;
+ if (flag3)
+ {
+ XSingleton<XDebug>.singleton.AddLog("[InvitePlatFriend]ReqPlatFriendsRank", null, null, null, null, null, XDebugColor.XDebug_None);
+ XFriendsDocument specificDocument = XDocuments.GetSpecificDocument<XFriendsDocument>(XFriendsDocument.uuID);
+ specificDocument.ReqPlatFriendsRank();
+ this.hasPlatFriends = true;
+ }
+ else
+ {
+ int num = 0;
+ bool flag4 = this.m_SelectedTab != -1;
+ if (flag4)
+ {
+ num = this._InviteDoc.InviteLists[this.m_SelectedTab].Count;
+ }
+ XSingleton<XDebug>.singleton.AddGreenLog(string.Concat(new object[]
+ {
+ "m_SelectedTab:",
+ this.m_SelectedTab,
+ "\ndataCount:",
+ num
+ }), null, null, null, null, null);
+ base.uiBehaviour.m_WrapContent.SetContentCount(num, false);
+ base.uiBehaviour.m_ScrollView.ResetPosition();
+ base.uiBehaviour.m_EmptyList.SetActive(num == 0);
+ base.uiBehaviour.m_BtnAddFriendMiddle.SetVisible(this.m_SelectedTab == 1 && num <= 1);
+ base.uiBehaviour.m_BtnAddFriendBottom.SetVisible(this.m_SelectedTab == 1 && num > 1 && num <= 2);
+ base.uiBehaviour.m_BtnJoinGuild.SetVisible(this.m_SelectedTab == 2 && !this._GuildDoc.bInGuild);
+ }
+ }
+
+ private void _WrapContentItemInit(Transform t, int index)
+ {
+ IXUIButton ixuibutton = t.Find("BtnInvite").GetComponent("XUIButton") as IXUIButton;
+ ixuibutton.RegisterClickEventHandler(new ButtonClickEventHandler(this._OnInviteClick));
+ }
+
+ private void _WrapContentItemUpdated(Transform t, int index)
+ {
+ bool flag = this.m_SelectedTab < 0;
+ if (!flag)
+ {
+ bool flag2 = index >= this._InviteDoc.InviteLists[this.m_SelectedTab].Count;
+ if (!flag2)
+ {
+ XTeamInviteListData xteamInviteListData = this._InviteDoc.InviteLists[this.m_SelectedTab][index];
+ bool flag3 = xteamInviteListData == null;
+ if (!flag3)
+ {
+ IXUILabelSymbol ixuilabelSymbol = t.Find("Info/Name").GetComponent("XUILabelSymbol") as IXUILabelSymbol;
+ IXUILabel ixuilabel = t.Find("Info/Level").GetComponent("XUILabel") as IXUILabel;
+ IXUISprite ixuisprite = t.Find("Info/AvatarBG/Avatar").GetComponent("XUISprite") as IXUISprite;
+ IXUISprite ixuisprite2 = t.Find("Info/Profession").GetComponent("XUISprite") as IXUISprite;
+ IXUILabel ixuilabel2 = t.Find("Info/AvatarBG/BattlePointBG/Power").GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel3 = t.Find("Info/GuildName").GetComponent("XUILabel") as IXUILabel;
+ IXUIButton ixuibutton = t.Find("BtnInvite").GetComponent("XUIButton") as IXUIButton;
+ GameObject gameObject = t.Find("Invited").gameObject;
+ IXUILabel ixuilabel4 = t.Find("State").GetComponent("XUILabel") as IXUILabel;
+ Transform t2 = t.Find("Info/AvatarBG/Relation");
+ Transform transform = t.Find("Info/AvatarBG/Plat/wxLaunch");
+ Transform transform2 = t.Find("Info/AvatarBG/Plat/qqLaunch");
+ Transform transform3 = t.Find("Info/AvatarBG/Status/Online");
+ Transform transform4 = t.Find("Info/AvatarBG/Status/Offline");
+ ixuilabelSymbol.InputText = XSingleton<XCommon>.singleton.StringCombine(xteamInviteListData.name, XRechargeDocument.GetVIPIconString(xteamInviteListData.vip));
+ ixuilabel.SetText("Lv." + xteamInviteListData.level.ToString());
+ ixuisprite.spriteName = XSingleton<XProfessionSkillMgr>.singleton.GetProfHeadIcon2((int)xteamInviteListData.profession);
+ ixuisprite2.spriteName = XSingleton<XProfessionSkillMgr>.singleton.GetProfIcon((int)xteamInviteListData.profession);
+ ixuilabel2.SetText(xteamInviteListData.ppt.ToString());
+ bool flag4 = string.IsNullOrEmpty(xteamInviteListData.guildname);
+ if (flag4)
+ {
+ ixuilabel3.SetVisible(false);
+ }
+ else
+ {
+ ixuilabel3.SetText(xteamInviteListData.guildname);
+ ixuilabel3.SetVisible(true);
+ }
+ XTeamRelation.Relation targetRelation = XTeamRelation.Relation.TR_NONE;
+ bool flag5 = this.m_SelectedTab == 1;
+ if (flag5)
+ {
+ targetRelation = (XTeamRelation.Relation)5;
+ }
+ else
+ {
+ bool flag6 = this.m_SelectedTab == 2;
+ if (flag6)
+ {
+ targetRelation = XTeamRelation.Relation.TR_GUILD;
+ }
+ }
+ XTeamView.SetTeamRelationUI(t2, xteamInviteListData.relation, true, targetRelation);
+ ixuibutton.ID = (ulong)((long)index);
+ ixuibutton.SetVisible(!xteamInviteListData.bSent);
+ gameObject.SetActive(xteamInviteListData.bSent);
+ bool flag7 = this.m_SelectedTab == 0;
+ if (flag7)
+ {
+ ixuilabel4.SetText(string.Empty);
+ }
+ else
+ {
+ ixuilabel4.SetText(XStringDefineProxy.GetString(xteamInviteListData.state.ToString()));
+ }
+ bool flag8 = this.m_SelectedTab == 3;
+ if (flag8)
+ {
+ transform2.gameObject.SetActive(XSingleton<XLoginDocument>.singleton.Channel == XAuthorizationChannel.XAuthorization_QQ);
+ transform.gameObject.SetActive(true);
+ transform3.gameObject.SetActive(false);
+ transform4.gameObject.SetActive(true);
+ }
+ else
+ {
+ transform2.gameObject.SetActive(false);
+ transform.gameObject.SetActive(false);
+ transform3.gameObject.SetActive(false);
+ transform4.gameObject.SetActive(false);
+ }
+ IXUITexture ixuitexture = t.Find("Info/AvatarBG/platHead").GetComponent("XUITexture") as IXUITexture;
+ bool flag9 = this.m_SelectedTab == 3;
+ if (flag9)
+ {
+ transform2.gameObject.SetActive(XSingleton<XLoginDocument>.singleton.Channel == XAuthorizationChannel.XAuthorization_QQ);
+ transform.gameObject.SetActive(XSingleton<XLoginDocument>.singleton.Channel == XAuthorizationChannel.XAuthorization_WeChat);
+ transform3.gameObject.SetActive(xteamInviteListData.isOnline);
+ transform4.gameObject.SetActive(!xteamInviteListData.isOnline);
+ ixuitexture.gameObject.SetActive(true);
+ ixuitexture.ID = (ulong)((long)index);
+ string bigpic = xteamInviteListData.bigpic;
+ XSingleton<XUICacheImage>.singleton.Load((bigpic != "") ? bigpic : string.Empty, ixuitexture, DlgBase<XTeamInviteView, XTeamInviteBehaviour>.singleton.uiBehaviour);
+ this._WrapTextureList.Add(ixuitexture);
+ }
+ else
+ {
+ transform2.gameObject.SetActive(false);
+ transform.gameObject.SetActive(false);
+ transform3.gameObject.SetActive(false);
+ transform4.gameObject.SetActive(false);
+ ixuitexture.gameObject.SetActive(false);
+ }
+ }
+ }
+ }
+ }
+
+ public void ClearPreTabTextures()
+ {
+ for (int i = 0; i < this._WrapTextureList.Count; i++)
+ {
+ this._WrapTextureList[i].SetTexturePath("");
+ }
+ this._WrapTextureList.Clear();
+ }
+
+ public override void OnXNGUIClick(GameObject obj, string path)
+ {
+ base.OnXNGUIClick(obj, path);
+ }
+
+ private void _OnCloseClicked(IXUISprite iSp)
+ {
+ this.SetVisible(false, true);
+ }
+
+ private bool _OnToggleChanged(IXUICheckBox go)
+ {
+ bool flag = !go.bChecked;
+ bool result;
+ if (flag)
+ {
+ result = true;
+ }
+ else
+ {
+ this.m_SelectedTab = (int)go.ID;
+ this.Refresh();
+ result = true;
+ }
+ return result;
+ }
+
+ private bool _OnInviteClick(IXUIButton go)
+ {
+ bool flag = this.m_SelectedTab < 0;
+ bool result;
+ if (flag)
+ {
+ result = true;
+ }
+ else
+ {
+ XTeamInviteListData xteamInviteListData = this._InviteDoc.InviteLists[this.m_SelectedTab][(int)go.ID];
+ bool flag2 = xteamInviteListData == null;
+ if (flag2)
+ {
+ result = true;
+ }
+ else
+ {
+ bool flag3 = xteamInviteListData.sameGuild == 0;
+ if (flag3)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString("TEAM_INVITE_NOT_SAMEGUILD"), "fece00");
+ result = true;
+ }
+ else
+ {
+ bool flag4 = this.m_SelectedTab == 3;
+ if (flag4)
+ {
+ XSingleton<XDebug>.singleton.AddLog("[InvitePlatFriend]_OnInviteClick", null, null, null, null, null, XDebugColor.XDebug_None);
+ this._TeamDoc.ReqTeamOp(TeamOperate.TEAM_INVITE, 0UL, null, TeamMemberType.TMT_NORMAL, xteamInviteListData.openid);
+ }
+ else
+ {
+ this._TeamDoc.ReqTeamOp(TeamOperate.TEAM_INVITE, xteamInviteListData.uid, null, TeamMemberType.TMT_NORMAL, null);
+ }
+ xteamInviteListData.bSent = true;
+ base.uiBehaviour.m_WrapContent.RefreshAllVisibleContents();
+ result = true;
+ }
+ }
+ }
+ return result;
+ }
+
+ private bool _OnAddFriendClicked(IXUIButton btn)
+ {
+ this.SetVisibleWithAnimation(false, null);
+ DlgBase<XFriendsView, XFriendsBehaviour>.singleton.RandomFriend();
+ return true;
+ }
+
+ private bool _OnJoinGuildClicked(IXUIButton btn)
+ {
+ bool flag = !XSingleton<XGameSysMgr>.singleton.IsSystemOpened(XSysDefine.XSys_Guild);
+ bool result;
+ if (flag)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString("GUILD_LOG_CANNOT_JOIN"), "fece00");
+ result = true;
+ }
+ else
+ {
+ this.SetVisibleWithAnimation(false, null);
+ DlgBase<XGuildListView, XGuildListBehaviour>.singleton.SetVisibleWithAnimation(true, null);
+ result = true;
+ }
+ return result;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/XTeamInviteView.cs.meta b/Client/Assets/Scripts/XMainClient/UI/XTeamInviteView.cs.meta
new file mode 100644
index 00000000..eef3d627
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XTeamInviteView.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 639c46a739916ee46936b55bd4a3f911
+timeCreated: 1611403845
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/XTeamInvitedListBehaviour.cs b/Client/Assets/Scripts/XMainClient/UI/XTeamInvitedListBehaviour.cs
new file mode 100644
index 00000000..94606ed2
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XTeamInvitedListBehaviour.cs
@@ -0,0 +1,33 @@
+using System;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+
+namespace XMainClient.UI
+{
+ internal class XTeamInvitedListBehaviour : DlgBehaviourBase
+ {
+ public IXUIButton m_Close = null;
+
+ public IXUIButton m_BtnIgnore;
+
+ public IXUIButton m_BtnDeny;
+
+ public IXUIScrollView m_ScrollView;
+
+ public IXUIWrapContent m_WrapContent;
+
+ public GameObject m_NoInvitation;
+
+ private void Awake()
+ {
+ this.m_Close = (base.transform.Find("Bg/Bg2/Close").GetComponent("XUIButton") as IXUIButton);
+ Transform transform = base.transform.Find("Bg");
+ this.m_BtnIgnore = (transform.Find("BtnIgnore").GetComponent("XUIButton") as IXUIButton);
+ this.m_BtnDeny = (transform.Find("BtnDeny").GetComponent("XUIButton") as IXUIButton);
+ this.m_ScrollView = (transform.Find("Panel").GetComponent("XUIScrollView") as IXUIScrollView);
+ this.m_WrapContent = (transform.Find("Panel/WrapContent").GetComponent("XUIWrapContent") as IXUIWrapContent);
+ this.m_NoInvitation = transform.Find("NoInvitation").gameObject;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/XTeamInvitedListBehaviour.cs.meta b/Client/Assets/Scripts/XMainClient/UI/XTeamInvitedListBehaviour.cs.meta
new file mode 100644
index 00000000..7d0d573f
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XTeamInvitedListBehaviour.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 8e4edc91dc3846b4f8888e834810e2f0
+timeCreated: 1611404128
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/XTeamInvitedListView.cs b/Client/Assets/Scripts/XMainClient/UI/XTeamInvitedListView.cs
new file mode 100644
index 00000000..de7df880
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XTeamInvitedListView.cs
@@ -0,0 +1,191 @@
+using System;
+using System.Collections.Generic;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class XTeamInvitedListView : DlgBase<XTeamInvitedListView, XTeamInvitedListBehaviour>
+ {
+ public override string fileName
+ {
+ get
+ {
+ return "Team/InviteListDlg";
+ }
+ }
+
+ public override int layer
+ {
+ get
+ {
+ return 1;
+ }
+ }
+
+ public override int group
+ {
+ get
+ {
+ return 1;
+ }
+ }
+
+ public override bool autoload
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override bool pushstack
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ private XTeamInviteDocument doc;
+
+ private uint m_TimerID = 0u;
+
+ protected override void Init()
+ {
+ this.doc = XDocuments.GetSpecificDocument<XTeamInviteDocument>(XTeamInviteDocument.uuID);
+ this.doc.InvitedView = this;
+ }
+
+ protected override void OnUnload()
+ {
+ XSingleton<XTimerMgr>.singleton.KillTimer(this.m_TimerID);
+ this.doc.InvitedView = null;
+ base.OnUnload();
+ }
+
+ public override void RegisterEvent()
+ {
+ base.uiBehaviour.m_Close.RegisterClickEventHandler(new ButtonClickEventHandler(this._OnCloseBtnClick));
+ base.uiBehaviour.m_BtnIgnore.RegisterClickEventHandler(new ButtonClickEventHandler(this._OnIgnoreBtnClick));
+ base.uiBehaviour.m_BtnDeny.RegisterClickEventHandler(new ButtonClickEventHandler(this._OnDenyBtnClick));
+ base.uiBehaviour.m_WrapContent.RegisterItemUpdateEventHandler(new WrapItemUpdateEventHandler(this.WrapContentItemUpdated));
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ XSingleton<XTimerMgr>.singleton.KillTimer(this.m_TimerID);
+ this._AutoRefresh(null);
+ }
+
+ protected override void OnHide()
+ {
+ base.OnHide();
+ XSingleton<XTimerMgr>.singleton.KillTimer(this.m_TimerID);
+ }
+
+ public override void StackRefresh()
+ {
+ XSingleton<XTimerMgr>.singleton.KillTimer(this.m_TimerID);
+ this._AutoRefresh(null);
+ }
+
+ private void _AutoRefresh(object param)
+ {
+ bool flag = base.IsVisible();
+ if (flag)
+ {
+ this.doc.ReqInvitedList();
+ this.m_TimerID = XSingleton<XTimerMgr>.singleton.SetTimer(3f, new XTimerMgr.ElapsedEventHandler(this._AutoRefresh), null);
+ }
+ }
+
+ public void RefreshPage()
+ {
+ List<XTeamInviteData> invitedList = this.doc.InvitedList;
+ base.uiBehaviour.m_WrapContent.SetContentCount(invitedList.Count, false);
+ base.uiBehaviour.m_NoInvitation.SetActive(invitedList.Count == 0);
+ }
+
+ private void WrapContentItemUpdated(Transform t, int index)
+ {
+ List<XTeamInviteData> invitedList = this.doc.InvitedList;
+ bool flag = index >= invitedList.Count;
+ if (flag)
+ {
+ XSingleton<XDebug>.singleton.AddErrorLog("Item index out of range: ", index.ToString(), null, null, null, null);
+ }
+ else
+ {
+ XTeamInviteData xteamInviteData = invitedList[index];
+ IXUILabel ixuilabel = t.Find("DungeonName").GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel2 = t.Find("Name").GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel3 = t.Find("PPT").GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel4 = t.Find("Time").GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel5 = t.Find("MemberCount").GetComponent("XUILabel") as IXUILabel;
+ GameObject gameObject = t.Find("RewardHunt").gameObject;
+ IXUISprite ixuisprite = t.Find("Regression").GetComponent("XUISprite") as IXUISprite;
+ IXUIButton ixuibutton = t.Find("BtnJoin").GetComponent("XUIButton") as IXUIButton;
+ ixuibutton.RegisterClickEventHandler(new ButtonClickEventHandler(this._OnJoinBtnClick));
+ bool flag2 = xteamInviteData.briefData.rift != null;
+ if (flag2)
+ {
+ ixuilabel.SetText(xteamInviteData.briefData.rift.GetSceneName(xteamInviteData.briefData.dungeonName));
+ }
+ else
+ {
+ ixuilabel.SetText(xteamInviteData.briefData.dungeonName);
+ }
+ ixuilabel2.SetText(xteamInviteData.invitorName);
+ ixuilabel3.SetText(xteamInviteData.briefData.GetStrTeamPPT(0.0));
+ ixuilabel4.SetText(XSingleton<UiUtility>.singleton.TimeAgoFormatString((int)xteamInviteData.time));
+ ixuilabel5.SetText(string.Format("{0}/{1}", xteamInviteData.briefData.currentMemberCount, xteamInviteData.briefData.totalMemberCount));
+ ixuisprite.SetVisible(xteamInviteData.briefData.regression);
+ xteamInviteData.briefData.goldGroup.SetUI(gameObject, true);
+ XTeamView.SetTeamRelationUI(t.Find("Relation"), xteamInviteData.invitorRelation, false, XTeamRelation.Relation.TR_NONE);
+ ixuibutton.ID = (ulong)((long)index);
+ }
+ }
+
+ private bool _OnCloseBtnClick(IXUIButton go)
+ {
+ this.SetVisibleWithAnimation(false, null);
+ return true;
+ }
+
+ private bool _OnIgnoreBtnClick(IXUIButton go)
+ {
+ this.doc.ReqIgnoreAll();
+ this.SetVisibleWithAnimation(false, null);
+ return true;
+ }
+
+ private bool _OnDenyBtnClick(IXUIButton go)
+ {
+ this.doc.ReqDeny();
+ this.SetVisibleWithAnimation(false, null);
+ return true;
+ }
+
+ private bool _OnJoinBtnClick(IXUIButton go)
+ {
+ int num = (int)go.ID;
+ bool flag = num >= this.doc.InvitedList.Count;
+ bool result;
+ if (flag)
+ {
+ result = true;
+ }
+ else
+ {
+ XTeamInviteData xteamInviteData = this.doc.InvitedList[num];
+ this.doc.ReqTeamInviteAck(true, xteamInviteData.inviteID);
+ result = true;
+ }
+ return result;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/XTeamInvitedListView.cs.meta b/Client/Assets/Scripts/XMainClient/UI/XTeamInvitedListView.cs.meta
new file mode 100644
index 00000000..c7d8ffaa
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XTeamInvitedListView.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 3b349d32c8b576346a44ae733ce208a6
+timeCreated: 1611403598
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/XTeamLeagueBattlePrepareBehaviour.cs b/Client/Assets/Scripts/XMainClient/UI/XTeamLeagueBattlePrepareBehaviour.cs
new file mode 100644
index 00000000..9d15a23a
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XTeamLeagueBattlePrepareBehaviour.cs
@@ -0,0 +1,73 @@
+using System;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class XTeamLeagueBattlePrepareBehaviour : DlgBehaviourBase
+ {
+ public IXUISprite m_UpBtn;
+
+ public IXUISprite m_DownBtn;
+
+ public GameObject m_ListView;
+
+ public Transform m_BlueView;
+
+ public Transform m_RedView;
+
+ public GameObject m_Info;
+
+ public Transform m_BlueInfo;
+
+ public Transform m_RedInfo;
+
+ public IXUILabel m_LeftTimeTip;
+
+ public IXUISprite m_BlueViewSwitch;
+
+ public IXUISprite m_RedViewSwitch;
+
+ public XUIPool[] m_MemberPool = new XUIPool[2];
+
+ public IXUIList[] m_MemberList = new IXUIList[2];
+
+ public IXUITweenTool m_BlueViewTween;
+
+ public IXUITweenTool m_RedViewTween;
+
+ public IXUITweenTool m_UpDownTween;
+
+ public IXUILabel m_TimeCount;
+
+ private void Awake()
+ {
+ this.m_UpBtn = (base.transform.Find("Bg/UpDown/LetmedieUp").GetComponent("XUISprite") as IXUISprite);
+ this.m_DownBtn = (base.transform.Find("Bg/UpDown/LetmedieDown").GetComponent("XUISprite") as IXUISprite);
+ this.m_ListView = base.transform.Find("Bg").gameObject;
+ this.m_BlueView = base.transform.Find("Bg/LeftView");
+ this.m_RedView = base.transform.Find("Bg/RightView");
+ this.m_MemberList[0] = (base.transform.Find("Bg/LeftView/MemberScrollView/List").GetComponent("XUIList") as IXUIList);
+ this.m_MemberList[1] = (base.transform.Find("Bg/RightView/MemberScrollView/List").GetComponent("XUIList") as IXUIList);
+ Transform transform = base.transform.Find("Bg/LeftView/MemberScrollView/List/MemberTpl");
+ Transform transform2 = base.transform.Find("Bg/RightView/MemberScrollView/List/MemberTpl");
+ this.m_MemberPool[0] = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+ this.m_MemberPool[0].SetupPool(this.m_MemberList[0].gameObject, transform.gameObject, 4u, false);
+ this.m_MemberPool[1] = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+ this.m_MemberPool[1].SetupPool(this.m_MemberList[1].gameObject, transform2.gameObject, 4u, false);
+ this.m_Info = base.transform.Find("Info").gameObject;
+ this.m_BlueInfo = base.transform.Find("Info/Blue");
+ this.m_RedInfo = base.transform.Find("Info/Red");
+ this.m_LeftTimeTip = (base.transform.Find("LeftTimeTip").GetComponent("XUILabel") as IXUILabel);
+ this.m_TimeCount = (base.transform.Find("countdown").GetComponent("XUILabel") as IXUILabel);
+ this.m_TimeCount.SetVisible(false);
+ this.m_BlueViewSwitch = (base.transform.Find("Bg/LeftView/close").GetComponent("XUISprite") as IXUISprite);
+ this.m_RedViewSwitch = (base.transform.Find("Bg/RightView/close").GetComponent("XUISprite") as IXUISprite);
+ this.m_BlueViewTween = (base.transform.Find("Bg/LeftView").GetComponent("XUIPlayTween") as IXUITweenTool);
+ this.m_RedViewTween = (base.transform.Find("Bg/RightView").GetComponent("XUIPlayTween") as IXUITweenTool);
+ this.m_UpDownTween = (base.transform.Find("Bg/UpDown").GetComponent("XUIPlayTween") as IXUITweenTool);
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/XTeamLeagueBattlePrepareBehaviour.cs.meta b/Client/Assets/Scripts/XMainClient/UI/XTeamLeagueBattlePrepareBehaviour.cs.meta
new file mode 100644
index 00000000..1fe7169d
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XTeamLeagueBattlePrepareBehaviour.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: f2c65aed24962e34c8c7668d88744584
+timeCreated: 1611404845
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/XTeamLeagueBattlePrepareView.cs b/Client/Assets/Scripts/XMainClient/UI/XTeamLeagueBattlePrepareView.cs
new file mode 100644
index 00000000..4c78cdec
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XTeamLeagueBattlePrepareView.cs
@@ -0,0 +1,374 @@
+using System;
+using KKSG;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class XTeamLeagueBattlePrepareView : DlgBase<XTeamLeagueBattlePrepareView, XTeamLeagueBattlePrepareBehaviour>
+ {
+ public override string fileName
+ {
+ get
+ {
+ return "Battle/TeamLeagueBattleDlg";
+ }
+ }
+
+ public override int layer
+ {
+ get
+ {
+ return 1;
+ }
+ }
+
+ public override bool autoload
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ private XTeamLeagueBattleDocument _BattleDoc;
+
+ private XFreeTeamVersusLeagueDocument _BaseDoc;
+
+ public LevelRewardTeamLeagueSmallHandler SmallRewardHandler = null;
+
+ public LevelRewardTeamLeagueBigHandler BigRewardHandler = null;
+
+ protected override void Init()
+ {
+ base.Init();
+ this._BattleDoc = XDocuments.GetSpecificDocument<XTeamLeagueBattleDocument>(XTeamLeagueBattleDocument.uuID);
+ this._BaseDoc = XDocuments.GetSpecificDocument<XFreeTeamVersusLeagueDocument>(XFreeTeamVersusLeagueDocument.uuID);
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ base.uiBehaviour.m_UpBtn.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnUp));
+ base.uiBehaviour.m_DownBtn.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnDown));
+ base.uiBehaviour.m_BlueViewSwitch.ID = 0UL;
+ base.uiBehaviour.m_BlueViewSwitch.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnLeftToogle));
+ base.uiBehaviour.m_RedViewSwitch.ID = 0UL;
+ base.uiBehaviour.m_RedViewSwitch.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnRightToogle));
+ }
+
+ private void OnUp(IXUISprite btn)
+ {
+ this._BattleDoc.ReqBattle(LeagueBattleReadyOper.LBReady_Up);
+ }
+
+ private void OnDown(IXUISprite btn)
+ {
+ this._BattleDoc.ReqBattle(LeagueBattleReadyOper.LBReady_Down);
+ }
+
+ private void OnLeftToogle(IXUISprite btn)
+ {
+ int num = (int)btn.ID;
+ base.uiBehaviour.m_BlueViewTween.SetTweenGroup(num);
+ base.uiBehaviour.m_BlueViewTween.PlayTween(true, -1f);
+ base.uiBehaviour.m_UpDownTween.SetTweenGroup(num);
+ base.uiBehaviour.m_UpDownTween.PlayTween(true, -1f);
+ btn.ID = (ulong)((num == 0) ? 1L : 0L);
+ }
+
+ private void OnRightToogle(IXUISprite btn)
+ {
+ int num = (int)btn.ID;
+ base.uiBehaviour.m_RedViewTween.SetTweenGroup(num);
+ base.uiBehaviour.m_RedViewTween.PlayTween(true, -1f);
+ btn.ID = (ulong)((num == 0) ? 1L : 0L);
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ this.RefreshTeamName();
+ }
+
+ private void RefreshTeamName()
+ {
+ bool flag = this._BattleDoc.LoadingInfoBlue != null;
+ if (flag)
+ {
+ IXUILabel ixuilabel = base.uiBehaviour.m_BlueView.Find("Title1").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel.SetText(this._BattleDoc.LoadingInfoBlue.name);
+ }
+ bool flag2 = this._BattleDoc.LoadingInfoRed != null;
+ if (flag2)
+ {
+ IXUILabel ixuilabel2 = base.uiBehaviour.m_RedView.Find("Title1").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel2.SetText(this._BattleDoc.LoadingInfoRed.name);
+ }
+ }
+
+ protected override void OnHide()
+ {
+ base.OnHide();
+ }
+
+ protected override void OnUnload()
+ {
+ DlgHandlerBase.EnsureUnload<LevelRewardTeamLeagueSmallHandler>(ref this.SmallRewardHandler);
+ DlgHandlerBase.EnsureUnload<LevelRewardTeamLeagueBigHandler>(ref this.BigRewardHandler);
+ base.OnUnload();
+ }
+
+ public void ResetCommonUI(bool show = true)
+ {
+ bool flag = DlgBase<BattleMain, BattleMainBehaviour>.singleton.IsLoaded() && DlgBase<BattleMain, BattleMainBehaviour>.singleton.IsVisible();
+ if (flag)
+ {
+ DlgBase<BattleMain, BattleMainBehaviour>.singleton.SkillHandler.SetVisible(show);
+ DlgBase<BattleMain, BattleMainBehaviour>.singleton.IndicateHandler.SetVisible(show);
+ DlgBase<BattleMain, BattleMainBehaviour>.singleton.LeftTimeLabel.SetVisible(show);
+ DlgBase<BattleMain, BattleMainBehaviour>.singleton.TeamMonitor.SetVisible(false);
+ }
+ bool bSpectator = XSingleton<XScene>.singleton.bSpectator;
+ if (bSpectator)
+ {
+ bool flag2 = DlgBase<SpectateSceneView, SpectateSceneBehaviour>.singleton.IsLoaded();
+ if (flag2)
+ {
+ DlgBase<SpectateSceneView, SpectateSceneBehaviour>.singleton.LeftTime.SetVisible(show);
+ }
+ }
+ }
+
+ private void RefreshKillInfo()
+ {
+ IXUILabel ixuilabel = base.uiBehaviour.m_BlueInfo.Find("Kill").GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel2 = base.uiBehaviour.m_RedInfo.Find("Kill").GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel3 = base.uiBehaviour.m_BlueInfo.Find("Damage").GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel4 = base.uiBehaviour.m_RedInfo.Find("Damage").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel.SetText(this._BattleDoc.BlueCanBattleNum.ToString());
+ ixuilabel2.SetText(this._BattleDoc.RedCanBattleNum.ToString());
+ XEntity entity = XSingleton<XEntityMgr>.singleton.GetEntity(this._BattleDoc.BluePKingRoleID);
+ XEntity entity2 = XSingleton<XEntityMgr>.singleton.GetEntity(this._BattleDoc.RedPKingRoleID);
+ bool flag = entity != null;
+ if (flag)
+ {
+ double attr = entity.Attributes.GetAttr(XAttributeDefine.XAttr_MaxHP_Total);
+ double attr2 = entity.Attributes.GetAttr(XAttributeDefine.XAttr_CurrentHP_Basic);
+ double num = (attr == 0.0) ? 0.0 : (attr2 / attr);
+ ixuilabel3.SetText(string.Format("{0:N2}%", num * 100.0));
+ }
+ else
+ {
+ ixuilabel4.SetText("0%");
+ }
+ bool flag2 = entity2 != null;
+ if (flag2)
+ {
+ double attr3 = entity2.Attributes.GetAttr(XAttributeDefine.XAttr_MaxHP_Total);
+ double attr4 = entity2.Attributes.GetAttr(XAttributeDefine.XAttr_CurrentHP_Basic);
+ double num2 = (attr3 == 0.0) ? 0.0 : (attr4 / attr3);
+ ixuilabel4.SetText(string.Format("{0:N2}%", num2 * 100.0));
+ }
+ else
+ {
+ ixuilabel4.SetText("0%");
+ }
+ }
+
+ public void RefreshBattleBaseInfo()
+ {
+ bool flag = !base.IsVisible();
+ if (!flag)
+ {
+ this.SetBattleList(base.uiBehaviour.m_BlueView, this._BattleDoc.BattleBaseInfoBlue, 0);
+ this.SetBattleList(base.uiBehaviour.m_RedView, this._BattleDoc.BattleBaseInfoRed, 1);
+ this.RefreshKillInfo();
+ }
+ }
+
+ private void SetBattleList(Transform view, LeagueBattleOneTeam battleTeamBaseInfo, int index)
+ {
+ bool flag = battleTeamBaseInfo == null;
+ if (!flag)
+ {
+ IXUILabel ixuilabel = view.Find("Title1").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel.SetText(battleTeamBaseInfo.name);
+ base.uiBehaviour.m_MemberPool[index].FakeReturnAll();
+ for (int i = 0; i < battleTeamBaseInfo.members.Count; i++)
+ {
+ GameObject gameObject = base.uiBehaviour.m_MemberPool[index].FetchGameObject(false);
+ gameObject.transform.parent = base.uiBehaviour.m_MemberList[index].gameObject.transform;
+ IXUILabel ixuilabel2 = gameObject.transform.Find("Name").GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel3 = gameObject.transform.Find("Num").GetComponent("XUILabel") as IXUILabel;
+ Transform transform = gameObject.transform.Find("Battle");
+ Transform transform2 = gameObject.transform.Find("Die");
+ ixuilabel2.SetText(battleTeamBaseInfo.members[i].basedata.name);
+ ixuilabel3.SetText(battleTeamBaseInfo.members[i].index.ToString());
+ transform.gameObject.SetActive(battleTeamBaseInfo.members[i].state == LeagueBattleRoleState.LBRoleState_Fighting);
+ transform2.gameObject.SetActive(battleTeamBaseInfo.members[i].state == LeagueBattleRoleState.LBRoleState_Failed);
+ ixuilabel3.gameObject.SetActive(battleTeamBaseInfo.members[i].state != LeagueBattleRoleState.LBRoleState_Failed && battleTeamBaseInfo.members[i].state != LeagueBattleRoleState.LBRoleState_Fighting);
+ ixuilabel2.SetColor(Color.white);
+ bool flag2 = battleTeamBaseInfo.members[i].basedata.roleid == XSingleton<XAttributeMgr>.singleton.XPlayerData.RoleID;
+ if (flag2)
+ {
+ ixuilabel2.SetText(string.Format("[{0}]{1}[-]", XSingleton<XGlobalConfig>.singleton.GetValue("PKSelfNameColor"), battleTeamBaseInfo.members[i].basedata.name));
+ }
+ bool flag3 = battleTeamBaseInfo.members[i].state == LeagueBattleRoleState.LBRoleState_Failed;
+ if (flag3)
+ {
+ ixuilabel2.SetColor(Color.gray);
+ }
+ }
+ base.uiBehaviour.m_MemberPool[index].ActualReturnAll(false);
+ base.uiBehaviour.m_MemberList[index].Refresh();
+ }
+ }
+
+ public void RefreshBattleState()
+ {
+ LeagueBattleFightState battleState = this._BattleDoc.BattleState;
+ if (battleState != LeagueBattleFightState.LBFight_Wait)
+ {
+ if (battleState == LeagueBattleFightState.LBFight_Fight)
+ {
+ base.uiBehaviour.m_Info.SetActive(true);
+ base.uiBehaviour.m_LeftTimeTip.gameObject.SetActive(false);
+ base.uiBehaviour.m_ListView.SetActive(this._BattleDoc.IsInTeamLeague);
+ bool flag = this._BattleDoc.IsInTeamLeague && this._BattleDoc.IsInBattleTeamLeague && this._BattleDoc.SelfBattleState == LeagueBattleRoleState.LBRoleState_Fighting;
+ if (flag)
+ {
+ base.uiBehaviour.m_BlueView.gameObject.SetActive(true);
+ base.uiBehaviour.m_RedView.gameObject.SetActive(false);
+ base.uiBehaviour.m_UpBtn.gameObject.SetActive(false);
+ base.uiBehaviour.m_DownBtn.gameObject.SetActive(false);
+ }
+ else
+ {
+ bool isInTeamLeague = this._BattleDoc.IsInTeamLeague;
+ if (isInTeamLeague)
+ {
+ base.uiBehaviour.m_BlueView.gameObject.SetActive(true);
+ base.uiBehaviour.m_RedView.gameObject.SetActive(false);
+ base.uiBehaviour.m_UpBtn.gameObject.SetActive(!this._BattleDoc.IsInBattleTeamLeague);
+ base.uiBehaviour.m_DownBtn.gameObject.SetActive(this._BattleDoc.IsInBattleTeamLeague);
+ }
+ else
+ {
+ base.uiBehaviour.m_BlueView.gameObject.SetActive(false);
+ base.uiBehaviour.m_RedView.gameObject.SetActive(false);
+ base.uiBehaviour.m_UpBtn.gameObject.SetActive(false);
+ base.uiBehaviour.m_DownBtn.gameObject.SetActive(false);
+ }
+ }
+ }
+ }
+ else
+ {
+ base.uiBehaviour.m_Info.SetActive(false);
+ base.uiBehaviour.m_LeftTimeTip.gameObject.SetActive(true);
+ base.uiBehaviour.m_LeftTimeTip.SetText(XSingleton<XStringTable>.singleton.GetString("GUILD_ARENA_READY"));
+ base.uiBehaviour.m_ListView.SetActive(this._BattleDoc.IsInTeamLeague);
+ base.uiBehaviour.m_BlueView.gameObject.SetActive(true);
+ base.uiBehaviour.m_RedView.gameObject.SetActive(false);
+ bool flag2 = this._BattleDoc.IsInTeamLeague && this._BattleDoc.IsInBattleTeamLeague;
+ if (flag2)
+ {
+ base.uiBehaviour.m_UpBtn.gameObject.SetActive(false);
+ base.uiBehaviour.m_DownBtn.gameObject.SetActive(true);
+ }
+ else
+ {
+ bool flag3 = this._BattleDoc.IsInTeamLeague && !this._BattleDoc.IsInBattleTeamLeague;
+ if (flag3)
+ {
+ base.uiBehaviour.m_UpBtn.gameObject.SetActive(true);
+ base.uiBehaviour.m_DownBtn.gameObject.SetActive(false);
+ }
+ else
+ {
+ base.uiBehaviour.m_UpBtn.gameObject.SetActive(false);
+ base.uiBehaviour.m_DownBtn.gameObject.SetActive(false);
+ }
+ }
+ }
+ }
+
+ public void RefreahCountTime(uint time)
+ {
+ bool flag = DlgBase<BattleMain, BattleMainBehaviour>.singleton.IsLoaded() && DlgBase<BattleMain, BattleMainBehaviour>.singleton.IsVisible();
+ if (flag)
+ {
+ DlgBase<BattleMain, BattleMainBehaviour>.singleton.SetLeftTime(time, -1);
+ }
+ bool flag2 = XSingleton<XScene>.singleton.bSpectator && DlgBase<SpectateSceneView, SpectateSceneBehaviour>.singleton.IsLoaded();
+ if (flag2)
+ {
+ DlgBase<SpectateSceneView, SpectateSceneBehaviour>.singleton.SetLeftTime(time);
+ }
+ }
+
+ public override void OnUpdate()
+ {
+ this.RefreshKillInfo();
+ }
+
+ public void PlaySmallReward(LeagueBattleOneResultNtf data)
+ {
+ bool flag = this.SmallRewardHandler == null;
+ if (flag)
+ {
+ bool flag2 = DlgBase<BattleMain, BattleMainBehaviour>.singleton.IsLoaded();
+ if (flag2)
+ {
+ DlgHandlerBase.EnsureCreate<LevelRewardTeamLeagueSmallHandler>(ref this.SmallRewardHandler, DlgBase<BattleMain, BattleMainBehaviour>.singleton.uiBehaviour.m_canvas, true, this);
+ }
+ bool flag3 = DlgBase<SpectateSceneView, SpectateSceneBehaviour>.singleton.IsLoaded();
+ if (flag3)
+ {
+ DlgHandlerBase.EnsureCreate<LevelRewardTeamLeagueSmallHandler>(ref this.SmallRewardHandler, DlgBase<SpectateSceneView, SpectateSceneBehaviour>.singleton.uiBehaviour.m_canvas, true, this);
+ }
+ }
+ bool flag4 = this.SmallRewardHandler != null;
+ if (flag4)
+ {
+ this.SmallRewardHandler.SetRewardData(data);
+ }
+ }
+
+ public void PlayBigReward(LeagueBattleResultNtf data)
+ {
+ this.CloseSmallReward();
+ bool flag = this.BigRewardHandler == null;
+ if (flag)
+ {
+ bool flag2 = DlgBase<BattleMain, BattleMainBehaviour>.singleton.IsLoaded();
+ if (flag2)
+ {
+ DlgHandlerBase.EnsureCreate<LevelRewardTeamLeagueBigHandler>(ref this.BigRewardHandler, DlgBase<BattleMain, BattleMainBehaviour>.singleton.uiBehaviour.m_canvas, true, this);
+ }
+ bool flag3 = DlgBase<SpectateSceneView, SpectateSceneBehaviour>.singleton.IsLoaded();
+ if (flag3)
+ {
+ DlgHandlerBase.EnsureCreate<LevelRewardTeamLeagueBigHandler>(ref this.BigRewardHandler, DlgBase<SpectateSceneView, SpectateSceneBehaviour>.singleton.uiBehaviour.m_canvas, true, this);
+ }
+ }
+ bool flag4 = this.BigRewardHandler != null;
+ if (flag4)
+ {
+ this.BigRewardHandler.SetRewardData(data);
+ }
+ }
+
+ public void CloseSmallReward()
+ {
+ bool flag = this.SmallRewardHandler != null;
+ if (flag)
+ {
+ this.SmallRewardHandler.CloseTween();
+ }
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/XTeamLeagueBattlePrepareView.cs.meta b/Client/Assets/Scripts/XMainClient/UI/XTeamLeagueBattlePrepareView.cs.meta
new file mode 100644
index 00000000..76a05be5
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XTeamLeagueBattlePrepareView.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: c0fd6db833312b04b854a8552ac9aa2a
+timeCreated: 1611404488
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/XTeamLeagueFinalResultView.cs b/Client/Assets/Scripts/XMainClient/UI/XTeamLeagueFinalResultView.cs
new file mode 100644
index 00000000..ff60bd26
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XTeamLeagueFinalResultView.cs
@@ -0,0 +1,285 @@
+using System;
+using System.Collections.Generic;
+using KKSG;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class XTeamLeagueFinalResultView : DlgBase<XTeamLeagueFinalResultView, XTeamLeagueFinalResultBehavior>
+ {
+ public override string fileName
+ {
+ get
+ {
+ return "GameSystem/TeamLeague/TeamLeagueFinalDuel";
+ }
+ }
+
+ public override int layer
+ {
+ get
+ {
+ return 1;
+ }
+ }
+
+ public override int group
+ {
+ get
+ {
+ return 1;
+ }
+ }
+
+ public override bool autoload
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override bool hideMainMenu
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override bool pushstack
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ private Dictionary<RoundFlag, List<GameObject>> _itemDic = new Dictionary<RoundFlag, List<GameObject>>();
+
+ protected override void Init()
+ {
+ this.InitProperties();
+ }
+
+ protected override void OnUnload()
+ {
+ base.OnUnload();
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ }
+
+ public override void StackRefresh()
+ {
+ base.StackRefresh();
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ XFreeTeamVersusLeagueDocument.Doc.SendGetLeagueEleInfo();
+ }
+
+ protected override void OnHide()
+ {
+ XFreeTeamVersusLeagueDocument.Doc.SendCloseLeagueEleNtf();
+ base.OnHide();
+ }
+
+ private void InitProperties()
+ {
+ base.uiBehaviour.EnterMatch.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnClickEnterMatch));
+ base.uiBehaviour.CloseBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnClickCloseBtn));
+ string text = (XFreeTeamVersusLeagueDocument.Doc.TodayState == LeagueBattleTimeState.LBTS_Elimination || XFreeTeamVersusLeagueDocument.Doc.TodayState == LeagueBattleTimeState.LBTS_CrossElimination) ? XSingleton<UiUtility>.singleton.ReplaceReturn(XSingleton<XStringTable>.singleton.GetString("LeagueFinalSchedule")) : "";
+ base.uiBehaviour.FinalTimeLabel.SetText(text);
+ this._itemDic.Clear();
+ foreach (object obj in base.uiBehaviour.Details.transform)
+ {
+ Transform transform = (Transform)obj;
+ string name = transform.name;
+ int num = name.IndexOf('_');
+ bool flag = num > 0;
+ if (flag)
+ {
+ uint num2 = Convert.ToUInt32(name.Substring(num - 1, 1));
+ RoundFlag key = (RoundFlag)num2;
+ bool flag2 = !this._itemDic.ContainsKey(key);
+ if (flag2)
+ {
+ this._itemDic.Add(key, new List<GameObject>());
+ }
+ this._itemDic[key].Add(transform.gameObject);
+ }
+ }
+ }
+
+ private void RefreshEnterMatchBtn()
+ {
+ bool flag = XFreeTeamVersusLeagueDocument.Doc.IsMyTeamInFinal();
+ if (flag)
+ {
+ base.uiBehaviour.EnterMatch.gameObject.SetActive(true);
+ base.uiBehaviour.EnterMatch.SetEnable(XFreeTeamVersusLeagueDocument.Doc.IsMyTeamInFighting(), false);
+ }
+ else
+ {
+ base.uiBehaviour.EnterMatch.gameObject.SetActive(false);
+ }
+ }
+
+ private bool OnClickCloseBtn(IXUIButton button)
+ {
+ this.SetVisible(false, true);
+ return true;
+ }
+
+ private bool OnClickEnterMatch(IXUIButton button)
+ {
+ bool flag = XFreeTeamVersusLeagueDocument.Doc.IsMyTeamInFighting();
+ if (flag)
+ {
+ XFreeTeamVersusLeagueDocument.Doc.SendJoinLeagueEleBattle();
+ }
+ else
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XSingleton<XStringTable>.singleton.GetString("LeagueNotInFinal"), "fece00");
+ }
+ return true;
+ }
+
+ private void UpdateDetailItem(Transform item, LBEleRoomInfo info)
+ {
+ bool flag = info == null;
+ if (flag)
+ {
+ info = new LBEleRoomInfo();
+ }
+ Transform item2 = item.Find("Team1");
+ Transform item3 = item.Find("Team2");
+ Transform transform = item.Find("Btnplay");
+ transform.gameObject.SetActive(true);
+ IXUISprite ixuisprite = transform.GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.ID = (ulong)info.liveid;
+ ixuisprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnClickLive));
+ ixuisprite.gameObject.SetActive(info.liveid > 0u);
+ bool flag2 = info.team1 != null && info.team1.leagueid > 0UL;
+ if (flag2)
+ {
+ this.UpdateTeamItem(item2, info.team1, info.winleagueid, info.state, info.liveid);
+ }
+ else
+ {
+ this.UpdateEmptyItem(item2);
+ }
+ bool flag3 = info.team2 != null && info.team2.leagueid > 0UL;
+ if (flag3)
+ {
+ this.UpdateTeamItem(item3, info.team2, info.winleagueid, info.state, info.liveid);
+ }
+ else
+ {
+ this.UpdateEmptyItem(item3);
+ }
+ }
+
+ private void OnClickLive(IXUISprite uiSprite)
+ {
+ bool flag = uiSprite.ID > 0UL;
+ if (flag)
+ {
+ XSpectateDocument specificDocument = XDocuments.GetSpecificDocument<XSpectateDocument>(XSpectateDocument.uuID);
+ specificDocument.EnterSpectateBattle((uint)uiSprite.ID, LiveType.LIVE_LEAGUEBATTLE);
+ }
+ }
+
+ private void UpdateEmptyItem(Transform item)
+ {
+ Transform transform = item.Find("Win");
+ Transform transform2 = item.Find("Lose");
+ Transform transform3 = item.Find("Empty");
+ transform.gameObject.SetActive(false);
+ transform2.gameObject.SetActive(false);
+ transform3.gameObject.SetActive(true);
+ }
+
+ private void UpdateTeamItem(Transform item, LBEleTeamInfo teamInfo, ulong winTeamId, LBEleRoomState state, uint liveID)
+ {
+ Transform transform = item.Find("Win");
+ Transform transform2 = item.Find("Lose");
+ Transform transform3 = item.Find("Empty");
+ transform.gameObject.SetActive(false);
+ transform2.gameObject.SetActive(false);
+ transform3.gameObject.SetActive(false);
+ Transform transform4 = (teamInfo.leagueid == winTeamId || winTeamId == 0UL) ? transform : transform2;
+ transform4.gameObject.SetActive(true);
+ IXUILabel ixuilabel = transform4.Find("Name").GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel2 = transform4.Find("Team").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel.SetText(teamInfo.name);
+ ixuilabel2.SetText(teamInfo.zonename + "-" + teamInfo.servername);
+ }
+
+ public void RefreshUI()
+ {
+ RoundFlag[] array = (RoundFlag[])Enum.GetValues(typeof(RoundFlag));
+ foreach (RoundFlag roundFlag in array)
+ {
+ int num = (int)roundFlag;
+ bool flag = this._itemDic.ContainsKey((RoundFlag)num);
+ if (flag)
+ {
+ List<GameObject> list = this._itemDic[(RoundFlag)num];
+ List<LBEleRoomInfo> roomsInfoByRound = XFreeTeamVersusLeagueDocument.Doc.GetRoomsInfoByRound((uint)num);
+ for (int j = 0; j < list.Count; j++)
+ {
+ LBEleRoomInfo info = (roomsInfoByRound != null && j < roomsInfoByRound.Count) ? roomsInfoByRound[j] : null;
+ this.UpdateDetailItem(list[j].transform, info);
+ }
+ }
+ }
+ LeagueTeamDetail eliChampionTeam = XFreeTeamVersusLeagueDocument.Doc.EliChampionTeam;
+ bool flag2 = eliChampionTeam != null && eliChampionTeam.members.Count > 0;
+ if (flag2)
+ {
+ base.uiBehaviour.ChampionMembers.gameObject.SetActive(true);
+ base.uiBehaviour.NoChampion.gameObject.SetActive(false);
+ base.uiBehaviour.GuildName.SetText(eliChampionTeam.teamname);
+ int childCount = base.uiBehaviour.ChampionMembers.childCount;
+ int num2 = Mathf.Min(childCount, eliChampionTeam.members.Count);
+ int k;
+ for (k = 0; k < num2; k++)
+ {
+ Transform child = base.uiBehaviour.ChampionMembers.GetChild(k);
+ child.gameObject.SetActive(true);
+ this.UpdateFinalItem(child, eliChampionTeam.members[k]);
+ }
+ while (k < childCount)
+ {
+ base.uiBehaviour.ChampionMembers.GetChild(k++).gameObject.SetActive(false);
+ }
+ }
+ else
+ {
+ base.uiBehaviour.ChampionMembers.gameObject.SetActive(false);
+ base.uiBehaviour.NoChampion.gameObject.SetActive(true);
+ base.uiBehaviour.GuildName.SetText("");
+ }
+ this.RefreshEnterMatchBtn();
+ }
+
+ private void UpdateFinalItem(Transform transform, LeagueTeamMemberDetail memberInfo)
+ {
+ IXUILabel ixuilabel = transform.Find("Name").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel.SetText(memberInfo.brief.name);
+ IXUILabel ixuilabel2 = transform.Find("Score/Num").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel2.SetText(memberInfo.pkpoint.ToString());
+ IXUISprite ixuisprite = transform.Find("head").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.SetSprite(XSingleton<XProfessionSkillMgr>.singleton.GetProfHeadIcon2(XFastEnumIntEqualityComparer<RoleType>.ToInt(memberInfo.brief.profession)));
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/XTeamLeagueFinalResultView.cs.meta b/Client/Assets/Scripts/XMainClient/UI/XTeamLeagueFinalResultView.cs.meta
new file mode 100644
index 00000000..6aae458d
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XTeamLeagueFinalResultView.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 430e90e9d0c84294d89c050d5d4dc9bf
+timeCreated: 1611403640
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/XTeamListBehaviour.cs b/Client/Assets/Scripts/XMainClient/UI/XTeamListBehaviour.cs
new file mode 100644
index 00000000..f1cd11cd
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XTeamListBehaviour.cs
@@ -0,0 +1,46 @@
+using System;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class XTeamListBehaviour : DlgBehaviourBase
+ {
+ public IXUIButton m_Close = null;
+
+ public IXUIButton m_BtnJoin;
+
+ public GameObject m_NoTeam;
+
+ public IXUIScrollView m_ScrollView;
+
+ public IXUIWrapContent m_WrapContent;
+
+ public XUIPool m_CategoryPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ public IXUIScrollView m_CategoryScrollView;
+
+ public XTitleBar m_TitleBar;
+
+ public IXUILabel m_PPTRequirement;
+
+ private void Awake()
+ {
+ this.m_Close = (base.transform.Find("Bg/Close").GetComponent("XUIButton") as IXUIButton);
+ Transform transform = base.transform.Find("Bg");
+ this.m_BtnJoin = (transform.Find("BtnJoin").GetComponent("XUIButton") as IXUIButton);
+ transform = transform.Find("Titles");
+ DlgHandlerBase.EnsureCreate<XTitleBar>(ref this.m_TitleBar, transform.gameObject, null, true);
+ transform = base.transform.Find("Bg/Categories/Category");
+ this.m_CategoryPool.SetupPool(transform.parent.gameObject, transform.gameObject, 2u, false);
+ this.m_CategoryScrollView = (base.transform.Find("Bg/Categories/ScrollView").GetComponent("XUIScrollView") as IXUIScrollView);
+ transform = base.transform.Find("Bg/AllTeamsFrame");
+ this.m_NoTeam = transform.Find("NoTeams").gameObject;
+ this.m_ScrollView = (transform.Find("Panel").GetComponent("XUIScrollView") as IXUIScrollView);
+ this.m_WrapContent = (transform.Find("Panel/WrapContent").GetComponent("XUIWrapContent") as IXUIWrapContent);
+ this.m_PPTRequirement = (base.transform.Find("Bg/BattlePoint/Num").GetComponent("XUILabel") as IXUILabel);
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/XTeamListBehaviour.cs.meta b/Client/Assets/Scripts/XMainClient/UI/XTeamListBehaviour.cs.meta
new file mode 100644
index 00000000..6d804045
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XTeamListBehaviour.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 45ce09b00652d9345a9ab173500369df
+timeCreated: 1611403648
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/XTeamListView.cs b/Client/Assets/Scripts/XMainClient/UI/XTeamListView.cs
new file mode 100644
index 00000000..39e55ff9
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XTeamListView.cs
@@ -0,0 +1,439 @@
+using System;
+using System.Collections.Generic;
+using KKSG;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class XTeamListView : DlgBase<XTeamListView, XTeamListBehaviour>
+ {
+ public override string fileName
+ {
+ get
+ {
+ return "Team/TeamListDlg";
+ }
+ }
+
+ public override int layer
+ {
+ get
+ {
+ return 1;
+ }
+ }
+
+ public override int group
+ {
+ get
+ {
+ return 1;
+ }
+ }
+
+ public override bool autoload
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override bool hideMainMenu
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override bool pushstack
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ private XTeamDocument doc;
+
+ private bool _bFirstOpen = false;
+
+ private uint _TimerID = 0u;
+
+ private int m_SelectedTeamID = 0;
+
+ private List<IXUICheckBox> m_SelectedCategoriesGo = new List<IXUICheckBox>();
+
+ private IXUICheckBox m_SelectAll;
+
+ protected override void Init()
+ {
+ this.doc = XDocuments.GetSpecificDocument<XTeamDocument>(XTeamDocument.uuID);
+ this.doc.AllListView = this;
+ this.doc.InitTeamListSelection();
+ }
+
+ protected override void OnUnload()
+ {
+ this.doc.AllListView = null;
+ DlgHandlerBase.EnsureUnload<XTitleBar>(ref base.uiBehaviour.m_TitleBar);
+ XSingleton<XTimerMgr>.singleton.KillTimer(this._TimerID);
+ base.OnUnload();
+ }
+
+ public override void RegisterEvent()
+ {
+ base.uiBehaviour.m_Close.RegisterClickEventHandler(new ButtonClickEventHandler(this._OnCloseBtnClick));
+ base.uiBehaviour.m_TitleBar.RegisterClickEventHandler(new TitleClickEventHandler(this._OnTitleClickEventHandler));
+ base.uiBehaviour.m_WrapContent.RegisterItemUpdateEventHandler(new WrapItemUpdateEventHandler(this.WrapContentItemUpdated));
+ base.uiBehaviour.m_BtnJoin.RegisterClickEventHandler(new ButtonClickEventHandler(this._OnJoinBtnClick));
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ this._bFirstOpen = true;
+ this.m_SelectedTeamID = -1;
+ XSingleton<XTimerMgr>.singleton.KillTimer(this._TimerID);
+ this._AutoRefresh(null);
+ base.uiBehaviour.m_TitleBar.Refresh((ulong)((long)XFastEnumIntEqualityComparer<TeamBriefSortType>.ToInt(this.doc.TeamListSortType)));
+ base.uiBehaviour.m_TitleBar.SetArrowDir(this.doc.TeamListSortDirection > 0);
+ this._InitCategories();
+ this.doc.ClearTeamList();
+ this.RefreshPage();
+ }
+
+ protected override void OnHide()
+ {
+ base.OnHide();
+ XSingleton<XTimerMgr>.singleton.KillTimer(this._TimerID);
+ this._TimerID = 0u;
+ }
+
+ public override void StackRefresh()
+ {
+ XSingleton<XTimerMgr>.singleton.KillTimer(this._TimerID);
+ this._AutoRefresh(null);
+ }
+
+ private void _InitCategories()
+ {
+ XExpeditionDocument specificDocument = XDocuments.GetSpecificDocument<XExpeditionDocument>(XExpeditionDocument.uuID);
+ this.m_SelectedCategoriesGo.Clear();
+ base.uiBehaviour.m_CategoryPool.FakeReturnAll();
+ GameObject gameObject = base.uiBehaviour.m_CategoryPool.FetchGameObject(false);
+ gameObject.transform.localPosition = base.uiBehaviour.m_CategoryPool.TplPos;
+ gameObject.transform.parent = base.uiBehaviour.m_CategoryPool._tpl.transform.parent;
+ XSingleton<XGameUI>.singleton.m_uiTool.MarkParentAsChanged(gameObject);
+ this.m_SelectAll = this._SetCategory(gameObject, 0UL, XStringDefineProxy.GetString("ALL"));
+ List<XTeamCategory> categories = specificDocument.TeamCategoryMgr.m_Categories;
+ for (int i = 0; i < categories.Count; i++)
+ {
+ gameObject = base.uiBehaviour.m_CategoryPool.FetchGameObject(false);
+ gameObject.transform.parent = base.uiBehaviour.m_CategoryScrollView.gameObject.transform;
+ XSingleton<XGameUI>.singleton.m_uiTool.MarkParentAsChanged(gameObject);
+ gameObject.transform.localPosition = new Vector3(base.uiBehaviour.m_CategoryPool.TplPos.x, base.uiBehaviour.m_CategoryPool.TplPos.y - (float)(base.uiBehaviour.m_CategoryPool.TplHeight * (i + 1)), base.uiBehaviour.m_CategoryPool.TplPos.z);
+ this.m_SelectedCategoriesGo.Add(this._SetCategory(gameObject, (ulong)((long)categories[i].category), categories[i].Name));
+ }
+ base.uiBehaviour.m_CategoryPool.ActualReturnAll(false);
+ this._RefreshCategoryStates();
+ base.uiBehaviour.m_CategoryScrollView.ResetPosition();
+ }
+
+ private IXUICheckBox _SetCategory(GameObject go, ulong id, string strName)
+ {
+ Transform transform = go.transform.Find("Normal");
+ IXUICheckBox ixuicheckBox = transform.GetComponent("XUICheckBox") as IXUICheckBox;
+ ixuicheckBox.ID = id;
+ ixuicheckBox.RegisterOnCheckEventHandler(new CheckBoxOnCheckEventHandler(this._OnCategoryStateChanged));
+ IXUILabel ixuilabel = go.transform.Find("Text").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel.SetText(strName);
+ return ixuicheckBox;
+ }
+
+ private void _RefreshCategoryStates()
+ {
+ bool bChecked = true;
+ for (int i = 0; i < this.m_SelectedCategoriesGo.Count; i++)
+ {
+ IXUICheckBox ixuicheckBox = this.m_SelectedCategoriesGo[i];
+ int item = (int)ixuicheckBox.ID;
+ bool flag = this.doc.TeamListSelectedCategories.Contains(item);
+ if (flag)
+ {
+ ixuicheckBox.bChecked = true;
+ }
+ else
+ {
+ ixuicheckBox.bChecked = false;
+ bChecked = false;
+ }
+ }
+ this.m_SelectAll.bChecked = bChecked;
+ }
+
+ private bool _OnCategoryStateChanged(IXUICheckBox ckb)
+ {
+ bool flag = false;
+ int num = (int)ckb.ID;
+ bool flag2 = this.doc.TeamListSelectedCategories.Contains(num);
+ if (flag2)
+ {
+ bool flag3 = !ckb.bChecked;
+ if (flag3)
+ {
+ this.doc.TeamListSelectedCategories.Remove(num);
+ bool flag4 = num == 0;
+ if (flag4)
+ {
+ this._SelectAll(false);
+ }
+ else
+ {
+ this.m_SelectAll.bChecked = false;
+ this.doc.TeamListSelectedCategories.Remove(0);
+ }
+ flag = true;
+ }
+ }
+ else
+ {
+ bool bChecked = ckb.bChecked;
+ if (bChecked)
+ {
+ this.doc.TeamListSelectedCategories.Add(num);
+ bool flag5 = num == 0;
+ if (flag5)
+ {
+ this._SelectAll(true);
+ }
+ flag = true;
+ }
+ }
+ bool flag6 = flag;
+ if (flag6)
+ {
+ this.doc.ReqTeamList(false);
+ }
+ return true;
+ }
+
+ private void _SelectAll(bool bSelect)
+ {
+ for (int i = 0; i < this.m_SelectedCategoriesGo.Count; i++)
+ {
+ int item = (int)this.m_SelectedCategoriesGo[i].ID;
+ if (bSelect)
+ {
+ this.doc.TeamListSelectedCategories.Add(item);
+ }
+ else
+ {
+ this.doc.TeamListSelectedCategories.Remove(item);
+ }
+ }
+ this._RefreshCategoryStates();
+ }
+
+ private void _AutoRefresh(object param)
+ {
+ bool flag = base.IsVisible();
+ if (flag)
+ {
+ this.doc.ReqTeamList(false);
+ this._TimerID = XSingleton<XTimerMgr>.singleton.SetTimer(3f, new XTimerMgr.ElapsedEventHandler(this._AutoRefresh), null);
+ }
+ }
+
+ public void RefreshPage()
+ {
+ List<XTeamBriefData> teamList = this.doc.TeamList;
+ base.uiBehaviour.m_WrapContent.SetContentCount(teamList.Count, false);
+ bool bFirstOpen = this._bFirstOpen;
+ if (bFirstOpen)
+ {
+ base.uiBehaviour.m_ScrollView.ResetPosition();
+ this._bFirstOpen = false;
+ }
+ base.uiBehaviour.m_NoTeam.SetActive(teamList.Count == 0);
+ XTeamBriefData xteamBriefData = null;
+ bool flag = this.m_SelectedTeamID != 0;
+ if (flag)
+ {
+ for (int i = 0; i < teamList.Count; i++)
+ {
+ bool flag2 = teamList[i].teamID == this.m_SelectedTeamID;
+ if (flag2)
+ {
+ xteamBriefData = teamList[i];
+ break;
+ }
+ }
+ bool flag3 = xteamBriefData == null;
+ if (flag3)
+ {
+ this.m_SelectedTeamID = 0;
+ }
+ }
+ this._UpdateButtonState(xteamBriefData);
+ }
+
+ private void WrapContentItemUpdated(Transform t, int index)
+ {
+ List<XTeamBriefData> teamList = this.doc.TeamList;
+ bool flag = index >= teamList.Count;
+ if (flag)
+ {
+ XSingleton<XDebug>.singleton.AddErrorLog("Item index out of range: ", index.ToString(), null, null, null, null);
+ }
+ else
+ {
+ XTeamBriefData xteamBriefData = teamList[index];
+ IXUILabel ixuilabel = t.Find("DungeonName").GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel2 = t.Find("TeamName").GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel3 = t.Find("DungeonLevel").GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel4 = t.Find("MemberCount").GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel5 = t.Find("CategoryName").GetComponent("XUILabel") as IXUILabel;
+ GameObject gameObject = t.Find("Select").gameObject;
+ IXUISprite ixuisprite = t.GetComponent("XUISprite") as IXUISprite;
+ GameObject gameObject2 = t.Find("Lock").gameObject;
+ IXUISprite ixuisprite2 = t.Find("Regression").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite2.SetVisible(xteamBriefData.regression);
+ IXUISprite ixuisprite3 = t.Find("SisterTA").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite3.ID = 0UL;
+ ixuisprite3.RegisterSpritePressEventHandler(new SpritePressEventHandler(this._OnPressTarjaInfo));
+ IXUILabel ixuilabel6 = ixuisprite3.transform.Find("Info").GetComponent("XUILabel") as IXUILabel;
+ bool flag2 = ixuilabel6 != null;
+ if (flag2)
+ {
+ ixuilabel6.SetVisible(false);
+ }
+ IXUISprite ixuisprite4 = t.Find("SisterTATeam").GetComponent("XUISprite") as IXUISprite;
+ ixuilabel6 = (ixuisprite4.transform.Find("Info").GetComponent("XUILabel") as IXUILabel);
+ bool flag3 = ixuilabel6 != null;
+ if (flag3)
+ {
+ ixuilabel6.SetVisible(false);
+ }
+ ixuisprite4.RegisterSpritePressEventHandler(new SpritePressEventHandler(this._OnPressTarjaInfo));
+ ixuisprite4.ID = 1UL;
+ ixuisprite.ID = (ulong)((long)index);
+ ixuisprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this._OnTeamClick));
+ bool flag4 = xteamBriefData.rift != null;
+ if (flag4)
+ {
+ ixuilabel.SetText(xteamBriefData.rift.GetSceneName(xteamBriefData.dungeonName));
+ }
+ else
+ {
+ ixuilabel.SetText(xteamBriefData.dungeonName);
+ }
+ ixuilabel2.SetText(xteamBriefData.teamName);
+ ixuilabel3.SetText(XStringDefineProxy.GetString("LEVEL", new object[]
+ {
+ xteamBriefData.dungeonLevel
+ }));
+ ixuilabel4.SetText(string.Format("{0}/{1}", xteamBriefData.currentMemberCount, xteamBriefData.totalMemberCount));
+ ixuilabel5.SetText((xteamBriefData.category != null) ? xteamBriefData.category.Name : string.Empty);
+ gameObject.SetActive(xteamBriefData.teamID == this.m_SelectedTeamID);
+ gameObject2.SetActive(xteamBriefData.hasPwd);
+ xteamBriefData.goldGroup.SetUI(t.Find("RewardHunt").gameObject, true);
+ ixuisprite4.SetVisible(xteamBriefData.isTarja);
+ ixuisprite3.SetVisible(this.doc.ShowTarja(xteamBriefData.dungeonID));
+ }
+ }
+
+ private bool _OnTitleClickEventHandler(ulong ID)
+ {
+ this.doc.TeamListSortType = (TeamBriefSortType)ID;
+ this.doc.SortTeamListAndShow();
+ return this.doc.TeamListSortDirection > 0;
+ }
+
+ private void _UpdateButtonState(XTeamBriefData briefData)
+ {
+ base.uiBehaviour.m_BtnJoin.SetEnable(this.m_SelectedTeamID != 0 && !this.doc.bInTeam, false);
+ bool flag = briefData != null;
+ if (flag)
+ {
+ base.uiBehaviour.m_PPTRequirement.SetText(briefData.GetStrTeamPPT(0.0));
+ }
+ else
+ {
+ base.uiBehaviour.m_PPTRequirement.SetText(XTeamBriefData.GetStrTeamPPT(0.0, 0.0));
+ }
+ }
+
+ private bool _OnCloseBtnClick(IXUIButton go)
+ {
+ this.SetVisibleWithAnimation(false, null);
+ return true;
+ }
+
+ private bool _OnPressTarjaInfo(IXUISprite sprite, bool pressed)
+ {
+ IXUILabel ixuilabel = sprite.transform.Find("Info").GetComponent("XUILabel") as IXUILabel;
+ bool flag = ixuilabel != null;
+ if (flag)
+ {
+ bool flag2 = sprite.ID == 1UL;
+ if (flag2)
+ {
+ ixuilabel.SetText(XSingleton<UiUtility>.singleton.ReplaceReturn(XStringDefineProxy.GetString("TEAM_TARJA_DESC_TEAM")));
+ }
+ else
+ {
+ ixuilabel.SetText(XSingleton<UiUtility>.singleton.ReplaceReturn(XStringDefineProxy.GetString("TEAM_TARJA_DESC")));
+ }
+ ixuilabel.SetVisible(pressed);
+ }
+ return false;
+ }
+
+ private void _OnTeamClick(IXUISprite iSp)
+ {
+ int num = (int)iSp.ID;
+ List<XTeamBriefData> teamList = this.doc.TeamList;
+ bool flag = num >= teamList.Count;
+ if (flag)
+ {
+ XSingleton<XDebug>.singleton.AddErrorLog("Item index out of range: ", num.ToString(), null, null, null, null);
+ }
+ else
+ {
+ XTeamBriefData xteamBriefData = teamList[num];
+ this.m_SelectedTeamID = xteamBriefData.teamID;
+ base.uiBehaviour.m_WrapContent.RefreshAllVisibleContents();
+ this._UpdateButtonState(xteamBriefData);
+ }
+ }
+
+ private bool _OnJoinBtnClick(IXUIButton go)
+ {
+ this._RealShowJoinTeamView();
+ return true;
+ }
+
+ private void _RealShowJoinTeamView()
+ {
+ bool bInTeam = this.doc.bInTeam;
+ if (bInTeam)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(ErrorCode.ERR_TEAM_ALREADY_INTEAM, "fece00");
+ }
+ else
+ {
+ XTeamBriefData teamBriefByID = this.doc.GetTeamBriefByID(this.m_SelectedTeamID);
+ bool flag = teamBriefByID == null;
+ if (!flag)
+ {
+ XTeamView.TryJoinTeam(teamBriefByID.teamID, teamBriefByID.hasPwd);
+ }
+ }
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/XTeamListView.cs.meta b/Client/Assets/Scripts/XMainClient/UI/XTeamListView.cs.meta
new file mode 100644
index 00000000..4f01c250
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XTeamListView.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 60929a2d2f94fca4d88d8e497eb10fb2
+timeCreated: 1611403835
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/XTeamView.cs b/Client/Assets/Scripts/XMainClient/UI/XTeamView.cs
new file mode 100644
index 00000000..eb0d640e
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XTeamView.cs
@@ -0,0 +1,338 @@
+using System;
+using KKSG;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class XTeamView : TabDlgBase<XTeamView>
+ {
+ public override string fileName
+ {
+ get
+ {
+ return "Team/TeamDlg";
+ }
+ }
+
+ public override int layer
+ {
+ get
+ {
+ return 1;
+ }
+ }
+
+ public override int group
+ {
+ get
+ {
+ return 0;
+ }
+ }
+
+ public XMyTeamHandler _MyTeamHandler;
+
+ public XTeamListHandler _TeamListHandler;
+
+ public XTeamDungeonSelectorHandler _DungeonSelectorHandler;
+
+ public XYuyinView _yuyinHandler;
+
+ public GameObject m_MyTeamPanel;
+
+ public GameObject m_TeamListPanel;
+
+ public GameObject m_DungeonSelectorPanel;
+
+ private XTeamDocument _doc;
+
+ private XTeamView.ShowTeamViewEventHandler mShowTeamViewEvent;
+
+ private TeamLevelType mCurTeamLeveltype = TeamLevelType.TeamLevelNest;
+
+ public delegate void ShowTeamViewEventHandler();
+
+ protected override void OnLoad()
+ {
+ base.OnLoad();
+ this.m_MyTeamPanel = base.uiBehaviour.transform.Find("Bg/MyTeamFrame").gameObject;
+ this.m_MyTeamPanel.SetActive(false);
+ this.m_TeamListPanel = base.uiBehaviour.transform.Find("Bg/TeamListFrame").gameObject;
+ this.m_TeamListPanel.SetActive(false);
+ this.m_DungeonSelectorPanel = base.uiBehaviour.transform.Find("Bg/SelectFrame").gameObject;
+ this.m_DungeonSelectorPanel.SetActive(false);
+ this._doc = XDocuments.GetSpecificDocument<XTeamDocument>(XTeamDocument.uuID);
+ }
+
+ protected override void OnUnload()
+ {
+ DlgHandlerBase.EnsureUnload<XMyTeamHandler>(ref this._MyTeamHandler);
+ DlgHandlerBase.EnsureUnload<XTeamListHandler>(ref this._TeamListHandler);
+ DlgHandlerBase.EnsureUnload<XTeamDungeonSelectorHandler>(ref this._DungeonSelectorHandler);
+ DlgHandlerBase.EnsureUnload<XYuyinView>(ref this._yuyinHandler);
+ base.OnUnload();
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ this._doc.ReqTeamOp(TeamOperate.TEAM_QUERYCOUNT, 0UL, null, TeamMemberType.TMT_NORMAL, null);
+ this._doc.ReqSceneDayCount();
+ RpcC2G_GetTowerActivityTop rpc = new RpcC2G_GetTowerActivityTop();
+ XSingleton<XClientNetwork>.singleton.Send(rpc);
+ XDragonNestDocument specificDocument = XDocuments.GetSpecificDocument<XDragonNestDocument>(XDragonNestDocument.uuID);
+ specificDocument.SendReqDragonNestInfo();
+ XGuildSmallMonsterDocument specificDocument2 = XDocuments.GetSpecificDocument<XGuildSmallMonsterDocument>(XGuildSmallMonsterDocument.uuID);
+ specificDocument2.SendQuerySmallMonterInfo();
+ bool flag = DlgBase<ScreenShotShareView, ScreenShotShareBehaviour>.singleton.IsLoaded() && DlgBase<ScreenShotShareView, ScreenShotShareBehaviour>.singleton.IsVisible();
+ if (flag)
+ {
+ DlgBase<ScreenShotShareView, ScreenShotShareBehaviour>.singleton.SetVisible(false, true);
+ }
+ DlgBase<RandomGiftView, RandomGiftBehaviour>.singleton.TryOpenUI();
+ }
+
+ public override void LeaveStackTop()
+ {
+ base.LeaveStackTop();
+ }
+
+ public void RefreshYuyin(ulong uid)
+ {
+ bool flag = this._yuyinHandler != null;
+ if (flag)
+ {
+ this._yuyinHandler.Refresh(YuyinIconType.Team);
+ }
+ }
+
+ public void ShowTeamView()
+ {
+ bool flag = XSingleton<XScene>.singleton.SceneType == SceneType.SCENE_FAMILYGARDEN;
+ if (flag)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString("CurSceneCanNotCtrl"), "fece00");
+ }
+ else
+ {
+ base.Load();
+ bool flag2 = !base.IsVisible();
+ if (flag2)
+ {
+ bool bInTeam = this._doc.bInTeam;
+ if (bInTeam)
+ {
+ base.ShowWorkGameSystem(XSysDefine.XSys_Team_MyTeam);
+ }
+ else
+ {
+ base.ShowWorkGameSystem(XSysDefine.XSys_Team_TeamList);
+ }
+ }
+ else
+ {
+ bool bInTeam2 = this._doc.bInTeam;
+ if (bInTeam2)
+ {
+ base.ShowSubGamsSystem(XSysDefine.XSys_Team_MyTeam);
+ }
+ else
+ {
+ base.ShowSubGamsSystem(XSysDefine.XSys_Team_TeamList);
+ }
+ }
+ bool bInTeam3 = this._doc.bInTeam;
+ if (bInTeam3)
+ {
+ this._yuyinHandler.Show(YuyinIconType.Team, 5);
+ this._yuyinHandler.Show(this._doc.bInTeam);
+ }
+ }
+ }
+
+ public void ShowTeamViewWithMsgBox(TeamLevelType _type, XTeamView.ShowTeamViewEventHandler _cbRealShow)
+ {
+ int dayLeftCount = ActivityNestHandler.GetDayLeftCount();
+ this.mCurTeamLeveltype = _type;
+ this.mShowTeamViewEvent = _cbRealShow;
+ bool flag = dayLeftCount > 0;
+ if (flag)
+ {
+ bool flag2 = _cbRealShow != null;
+ if (flag2)
+ {
+ _cbRealShow();
+ }
+ }
+ else
+ {
+ XExpeditionDocument specificDocument = XDocuments.GetSpecificDocument<XExpeditionDocument>(XExpeditionDocument.uuID);
+ int num;
+ int num2;
+ bool flag3 = specificDocument.CanBuy(_type, out num, out num2);
+ ButtonClickEventHandler handle;
+ ButtonClickEventHandler handle2;
+ string @string;
+ if (flag3)
+ {
+ handle = new ButtonClickEventHandler(this._ShowTeamViewBuyTimes);
+ handle2 = new ButtonClickEventHandler(this._ShowTeamViewNotBuyTimes);
+ CostInfo buyCost = specificDocument.GetBuyCost(_type);
+ @string = XStringDefineProxy.GetString("NEST_NO_TIMES_NEED_BUY_MSGBOX", new object[]
+ {
+ XLabelSymbolHelper.FormatCostWithIcon((int)buyCost.count, buyCost.type)
+ });
+ }
+ else
+ {
+ handle = new ButtonClickEventHandler(this._ShowTeamViewNotBuyTimes);
+ handle2 = new ButtonClickEventHandler(this._CancelShowTeamView);
+ @string = XStringDefineProxy.GetString("NEST_NO_TIMES_CANNOT_BUY_MSGBOX");
+ }
+ DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.Load();
+ DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.SetSingleButtonMode(false);
+ DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.SetVisible(false, true);
+ DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.SetLabelsWithSymbols(@string, XStringDefineProxy.GetString(XStringDefine.COMMON_OK), XStringDefineProxy.GetString(XStringDefine.COMMON_CANCEL));
+ DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.SetModalCallback(handle, handle2);
+ DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.SetTweenTargetAndPlay(DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.uiBehaviour.gameObject);
+ }
+ }
+
+ private bool _ShowTeamViewBuyTimes(IXUIButton btn)
+ {
+ XExpeditionDocument specificDocument = XDocuments.GetSpecificDocument<XExpeditionDocument>(XExpeditionDocument.uuID);
+ specificDocument.ReqBuyCount(this.mCurTeamLeveltype);
+ this._ShowTeamViewNotBuyTimes(btn);
+ return true;
+ }
+
+ private bool _ShowTeamViewNotBuyTimes(IXUIButton btn)
+ {
+ XSingleton<UiUtility>.singleton.CloseModalDlg();
+ bool flag = this.mShowTeamViewEvent != null;
+ if (flag)
+ {
+ this.mShowTeamViewEvent();
+ }
+ this.mShowTeamViewEvent = null;
+ return true;
+ }
+
+ protected bool _CancelShowTeamView(IXUIButton btn)
+ {
+ XSingleton<UiUtility>.singleton.CloseModalDlg();
+ this.mShowTeamViewEvent = null;
+ return true;
+ }
+
+ public override void SetupHandlers(XSysDefine sys)
+ {
+ XSysDefine xsysDefine = sys;
+ if (xsysDefine != XSysDefine.XSys_Team_TeamList)
+ {
+ if (xsysDefine != XSysDefine.XSys_Team_MyTeam)
+ {
+ XSingleton<XDebug>.singleton.AddErrorLog("System has not finished:", sys.ToString(), null, null, null, null);
+ }
+ else
+ {
+ base._AddActiveHandler(DlgHandlerBase.EnsureCreate<XMyTeamHandler>(ref this._MyTeamHandler, this.m_MyTeamPanel, this, true));
+ base._AddActiveHandler(DlgHandlerBase.EnsureCreate<XTeamDungeonSelectorHandler>(ref this._DungeonSelectorHandler, this.m_DungeonSelectorPanel, this, true));
+ base._AddActiveHandler(DlgHandlerBase.EnsureCreate<XYuyinView>(ref this._yuyinHandler, base.uiBehaviour.transform, true, this));
+ }
+ }
+ else
+ {
+ base._AddActiveHandler(DlgHandlerBase.EnsureCreate<XTeamListHandler>(ref this._TeamListHandler, this.m_TeamListPanel, this, true));
+ base._AddActiveHandler(DlgHandlerBase.EnsureCreate<XTeamDungeonSelectorHandler>(ref this._DungeonSelectorHandler, this.m_DungeonSelectorPanel, this, true));
+ }
+ }
+
+ public override void StackRefresh()
+ {
+ bool flag = (this._doc.bInTeam && this.mCurrentSys != XSysDefine.XSys_Team_MyTeam) || (!this._doc.bInTeam && this.mCurrentSys != XSysDefine.XSys_Team_TeamList);
+ if (flag)
+ {
+ this.ShowTeamView();
+ }
+ base.StackRefresh();
+ }
+
+ public static void TryJoinTeam(int teamID, bool bHasPwd)
+ {
+ XTeamDocument specificDocument = XDocuments.GetSpecificDocument<XTeamDocument>(XTeamDocument.uuID);
+ if (bHasPwd)
+ {
+ DlgBase<XTeamInputPasswordView, XTeamInputPasswordBehaviour>.singleton.TeamID = teamID;
+ DlgBase<XTeamInputPasswordView, XTeamInputPasswordBehaviour>.singleton.SetVisibleWithAnimation(true, null);
+ }
+ else
+ {
+ specificDocument.ReqTeamOp(TeamOperate.TEAM_JOIN, (ulong)((long)teamID), null, TeamMemberType.TMT_NORMAL, null);
+ }
+ }
+
+ public static void SetTeamRelationUI(Transform t, XTeamRelation relation, bool bOnlyOne, XTeamRelation.Relation targetRelation = XTeamRelation.Relation.TR_NONE)
+ {
+ bool flag = t == null;
+ if (!flag)
+ {
+ IXUIList ixuilist = t.GetComponent("XUIList") as IXUIList;
+ Transform transform = t.Find("Guild");
+ Transform transform2 = t.Find("Friend");
+ Transform transform3 = t.Find("Partner");
+ bool flag2 = true;
+ bool flag3 = relation == null;
+ if (!flag3)
+ {
+ bool flag4 = targetRelation > XTeamRelation.Relation.TR_NONE;
+ if (flag4)
+ {
+ bool flag5 = !relation.HasRelation(targetRelation);
+ if (flag5)
+ {
+ goto IL_181;
+ }
+ XTeamRelation.Relation relation2 = relation.ActualRelation & targetRelation;
+ transform.gameObject.SetActive(XTeamRelation.HasRelation(relation2, XTeamRelation.Relation.TR_GUILD));
+ transform2.gameObject.SetActive(XTeamRelation.HasRelation(relation2, XTeamRelation.Relation.TR_FRIEND) && !XTeamRelation.HasRelation(relation2, XTeamRelation.Relation.TR_PARTNER));
+ transform3.gameObject.SetActive(XTeamRelation.HasRelation(relation2, XTeamRelation.Relation.TR_PARTNER));
+ }
+ else
+ {
+ bool flag6 = !bOnlyOne;
+ if (flag6)
+ {
+ transform.gameObject.SetActive(XTeamRelation.HasRelation(relation.FinalRelation2, XTeamRelation.Relation.TR_GUILD));
+ transform2.gameObject.SetActive(XTeamRelation.HasRelation(relation.FinalRelation2, XTeamRelation.Relation.TR_FRIEND));
+ transform3.gameObject.SetActive(XTeamRelation.HasRelation(relation.FinalRelation, XTeamRelation.Relation.TR_PARTNER));
+ }
+ else
+ {
+ transform.gameObject.SetActive(relation.FinalRelation == XTeamRelation.Relation.TR_GUILD);
+ transform2.gameObject.SetActive(relation.FinalRelation == XTeamRelation.Relation.TR_FRIEND);
+ transform3.gameObject.SetActive(relation.FinalRelation == XTeamRelation.Relation.TR_PARTNER);
+ }
+ }
+ flag2 = false;
+ }
+ IL_181:
+ bool flag7 = flag2;
+ if (flag7)
+ {
+ transform.gameObject.SetActive(false);
+ transform2.gameObject.SetActive(false);
+ transform3.gameObject.SetActive(false);
+ }
+ bool flag8 = ixuilist != null;
+ if (flag8)
+ {
+ ixuilist.Refresh();
+ }
+ }
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/XTeamView.cs.meta b/Client/Assets/Scripts/XMainClient/UI/XTeamView.cs.meta
new file mode 100644
index 00000000..b5b29699
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XTeamView.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 01c14ed4d278cd94d97191d4737f882f
+timeCreated: 1611402954
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/XTempTipDefine.cs b/Client/Assets/Scripts/XMainClient/UI/XTempTipDefine.cs
new file mode 100644
index 00000000..48cfe895
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XTempTipDefine.cs
@@ -0,0 +1,26 @@
+using System;
+
+namespace XMainClient.UI
+{
+ public enum XTempTipDefine
+ {
+ OD_START,
+ OD_NO_SHOW = 0,
+ OD_JADE_UPGRADE_NO_EQUIP,
+ OD_JADE_UPGRADE_NO_BIND,
+ OD_CHAT_WORLD,
+ OD_SPRITE_AWAKE,
+ OD_SPRITE_TRAIN,
+ OD_ENCHANT_REPLACE,
+ OD_CARD_RESOLVE_TIP,
+ OD_ABYSS_PARTY_COST_REPLACE,
+ OD_ARTIFACT_COMPOSE_TRAVELSET,
+ OD_SMELTSTONE_EXCHANGED,
+ OD_FUSE_CONFIRM,
+ OD_INSCRIPTION_CONFIRM,
+ OD_RECAST_CONFIRM,
+ OD_CAPACITYDOWN_TIPS,
+ OD_REFINED_CONFIRM,
+ OD_END
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/XTempTipDefine.cs.meta b/Client/Assets/Scripts/XMainClient/UI/XTempTipDefine.cs.meta
new file mode 100644
index 00000000..79b237d0
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XTempTipDefine.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 4ab5e3892f15e8f4a9ab4b7da34b2eba
+timeCreated: 1611403666
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/XTitanItem.cs b/Client/Assets/Scripts/XMainClient/UI/XTitanItem.cs
new file mode 100644
index 00000000..ba593226
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XTitanItem.cs
@@ -0,0 +1,162 @@
+using System;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class XTitanItem : XDataBase
+ {
+ public int ItemID
+ {
+ get
+ {
+ return this.m_ItemID;
+ }
+ }
+
+ private int m_ItemID;
+
+ private ulong m_Upperbound;
+
+ private bool m_bHasUpperbound;
+
+ private ulong m_Value;
+
+ private GameObject m_go;
+
+ private IXUISprite m_uiIcon;
+
+ private IXUIButton m_btnAdd;
+
+ private XNumberTween m_uiTween;
+
+ private IXUILabel m_Tip;
+
+ public override void Init()
+ {
+ base.Init();
+ this.m_ItemID = 0;
+ this.m_Upperbound = 0UL;
+ this.m_bHasUpperbound = false;
+ this.m_go = null;
+ }
+
+ public override void Recycle()
+ {
+ base.Recycle();
+ XDataPool<XTitanItem>.Recycle(this);
+ }
+
+ public void Set(int itemid, GameObject go)
+ {
+ this.m_go = go;
+ this.m_ItemID = itemid;
+ bool flag = itemid == 6;
+ if (flag)
+ {
+ this.m_Upperbound = this.GetFatigueUpperbound();
+ this.m_bHasUpperbound = true;
+ }
+ this._SetUI();
+ this.RefreshValue(false);
+ }
+
+ private void _SetUI()
+ {
+ this.m_uiIcon = (this.m_go.transform.Find("icon").GetComponent("XUISprite") as IXUISprite);
+ Transform transform = this.m_go.transform.Find("Add");
+ bool flag = transform != null;
+ if (flag)
+ {
+ transform.gameObject.SetActive(this.IsShowAddBtn(this.m_ItemID));
+ }
+ Transform transform2 = this.m_go.transform.Find("Tip");
+ bool flag2 = transform2 != null;
+ if (flag2)
+ {
+ this.m_Tip = (this.m_go.transform.Find("Tip").GetComponent("XUILabel") as IXUILabel);
+ this.m_Tip.SetText(XSingleton<UiUtility>.singleton.ChooseProfString(XBagDocument.GetItemConf(this.m_ItemID).ItemName, 0u));
+ this.m_Tip.SetVisible(false);
+ }
+ Transform transform3 = this.m_go.transform.Find("Bg");
+ bool flag3 = transform3 != null;
+ if (flag3)
+ {
+ this.m_btnAdd = (transform3.GetComponent("XUIButton") as IXUIButton);
+ bool flag4 = this.m_btnAdd != null;
+ if (flag4)
+ {
+ this.m_btnAdd.RegisterPressEventHandler(null);
+ this.m_btnAdd.RegisterClickEventHandler(null);
+ bool flag5 = this.IsShowAddBtn(this.m_ItemID);
+ if (flag5)
+ {
+ this.m_btnAdd.RegisterClickEventHandler(new ButtonClickEventHandler(this._OnAddClicked));
+ }
+ else
+ {
+ this.m_btnAdd.RegisterPressEventHandler(new ButtonPressEventHandler(this._OnAddPress));
+ }
+ }
+ }
+ this.m_uiTween = XNumberTween.Create(this.m_go.transform);
+ string strSprite;
+ string strAtlas;
+ XBagDocument.GetItemBigIconAndAtlas(this.m_ItemID, out strSprite, out strAtlas, 0u);
+ this.m_uiIcon.SetSprite(strSprite, strAtlas, false);
+ }
+
+ private bool IsShowAddBtn(int itemID)
+ {
+ bool flag = itemID == int.Parse(XSingleton<XGlobalConfig>.singleton.GetValue("SpriteAwakeItemID")) || itemID == int.Parse(XSingleton<XGlobalConfig>.singleton.GetValue("SpriteStarUpItemID"));
+ return !flag;
+ }
+
+ public void RefreshValue(bool bAnim)
+ {
+ this.m_Value = XSingleton<XGame>.singleton.Doc.XBagDoc.GetItemCount(this.m_ItemID);
+ string postfix = string.Empty;
+ bool bHasUpperbound = this.m_bHasUpperbound;
+ if (bHasUpperbound)
+ {
+ bool flag = this.m_ItemID == 6;
+ if (flag)
+ {
+ this.m_Upperbound = this.GetFatigueUpperbound();
+ }
+ postfix = string.Format("/{0}", this.m_Upperbound);
+ }
+ XSingleton<UiUtility>.singleton.SetVirtualItem(this.m_uiTween, this.m_Value, bAnim, postfix);
+ }
+
+ private ulong GetFatigueUpperbound()
+ {
+ ulong num = ulong.Parse(XSingleton<XGlobalConfig>.singleton.GetValue("MaxRecoverFatigue"));
+ XWelfareDocument specificDocument = XDocuments.GetSpecificDocument<XWelfareDocument>(XWelfareDocument.uuID);
+ bool flag = specificDocument.IsOwnMemberPrivilege(MemberPrivilege.KingdomPrivilege_Court);
+ if (flag)
+ {
+ PayMemberTable.RowData memberPrivilegeConfig = specificDocument.GetMemberPrivilegeConfig(MemberPrivilege.KingdomPrivilege_Court);
+ num += (ulong)((memberPrivilegeConfig != null) ? ((long)memberPrivilegeConfig.FatigueLimit) : 0L);
+ }
+ return num;
+ }
+
+ private bool _OnAddClicked(IXUIButton btn)
+ {
+ DlgBase<XPurchaseView, XPurchaseBehaviour>.singleton.ReqQuickCommonPurchase(this.m_ItemID);
+ return true;
+ }
+
+ private void _OnAddPress(IXUIButton btn, bool state)
+ {
+ bool flag = this.m_Tip == null;
+ if (!flag)
+ {
+ this.m_Tip.SetVisible(state);
+ }
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/XTitanItem.cs.meta b/Client/Assets/Scripts/XMainClient/UI/XTitanItem.cs.meta
new file mode 100644
index 00000000..9fba4338
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XTitanItem.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 2dd7e7d228e575c4f9906946e3d79c00
+timeCreated: 1611403507
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/XVoiceQAView.cs b/Client/Assets/Scripts/XMainClient/UI/XVoiceQAView.cs
new file mode 100644
index 00000000..ebb1c46b
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XVoiceQAView.cs
@@ -0,0 +1,902 @@
+using System;
+using System.Collections.Generic;
+using KKSG;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class XVoiceQAView : DlgBase<XVoiceQAView, XVoiceQABehaviour>
+ {
+ public override bool autoload
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override bool pushstack
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override string fileName
+ {
+ get
+ {
+ return "GameSystem/AnswerDlg";
+ }
+ }
+
+ private XVoiceQADocument _doc = null;
+
+ private Vector2 m_DragDistance = Vector2.zero;
+
+ private bool m_CancelRecord = false;
+
+ private IXUILabel timeLabel;
+
+ private double targetTime;
+
+ private bool isGreenColor;
+
+ private bool isEndTime = false;
+
+ private static readonly ulong UNPLAY = 10001UL;
+
+ private static readonly ulong SYSTEMTIPS = 10000UL;
+
+ private ulong currPlayAudio = XVoiceQAView.UNPLAY;
+
+ private bool currPlayAudioIsMy = false;
+
+ public List<IXUILabel> m_RankName = new List<IXUILabel>();
+
+ public List<IXUILabel> m_RankNum = new List<IXUILabel>();
+
+ private LinkedList<VoiceQAAudio> _audioList = new LinkedList<VoiceQAAudio>();
+
+ private static readonly float AUDIODELAYPLAYTIME = 10f;
+
+ private static readonly int RANKSHOWNUMBER = 20;
+
+ private uint _timerToken;
+
+ private int _startid = 0;
+
+ private uint _startindex = 0u;
+
+ private double _starttime = 0.0;
+
+ private IXUISpriteAnimation playingAni;
+
+ private IXUISpriteAnimation[] aniArr = new IXUISpriteAnimation[6];
+
+ private static readonly Color greenColor = new Color32(63, 216, 51, byte.MaxValue);
+
+ private static readonly Color redColor = new Color32(byte.MaxValue, 0, 0, byte.MaxValue);
+
+ protected override void Init()
+ {
+ base.Init();
+ this._doc = XDocuments.GetSpecificDocument<XVoiceQADocument>(XVoiceQADocument.uuID);
+ this._audioList.Clear();
+ base.uiBehaviour.m_RankPool.ReturnAll(false);
+ this.m_RankName.Clear();
+ this.m_RankNum.Clear();
+ for (int i = 0; i < XVoiceQAView.RANKSHOWNUMBER; i++)
+ {
+ GameObject gameObject = base.uiBehaviour.m_RankPool.FetchGameObject(false);
+ gameObject.transform.localPosition = new Vector3(-10f, (float)(161 - 35 * i), 0f);
+ IXUILabel ixuilabel = gameObject.transform.Find("name").GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel2 = gameObject.transform.Find("num").GetComponent("XUILabel") as IXUILabel;
+ this.m_RankName.Add(ixuilabel);
+ this.m_RankNum.Add(ixuilabel2);
+ bool flag = i < 3;
+ if (flag)
+ {
+ ixuilabel.SetColor(new Color(255f, 255f, 0f, 255f));
+ ixuilabel2.SetColor(new Color(255f, 255f, 0f, 255f));
+ }
+ }
+ IXUILabel item = base.uiBehaviour.m_MultipleGo.transform.Find("ScoreRank/rank/myRank/num").GetComponent("XUILabel") as IXUILabel;
+ this.m_RankNum.Add(item);
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ base.uiBehaviour.m_Close.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnCloseClicked));
+ base.uiBehaviour.m_ExitVoiceQA.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnCloseClicked));
+ base.uiBehaviour.m_SingleWrapContent.RegisterItemInitEventHandler(new WrapItemInitEventHandler(this.WrapListInit));
+ base.uiBehaviour.m_MultiWrapContent.RegisterItemInitEventHandler(new WrapItemInitEventHandler(this.WrapListInit));
+ base.uiBehaviour.m_SingleWrapContent.RegisterItemUpdateEventHandler(new WrapItemUpdateEventHandler(this.DesWrapListUpdated));
+ base.uiBehaviour.m_MultiWrapContent.RegisterItemUpdateEventHandler(new WrapItemUpdateEventHandler(this.DesWrapListUpdated));
+ base.uiBehaviour.m_SpeakBtn.RegisterPressEventHandler(new ButtonPressEventHandler(this.OnVoiceButton));
+ base.uiBehaviour.m_SpeakBtn.RegisterDragEventHandler(new ButtonDragEventHandler(this.OnVoiceButtonDrag));
+ base.uiBehaviour.m_NextQuestion.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnNextQuestionBtnClick));
+ base.uiBehaviour.m_AutoPlay.RegisterOnCheckEventHandler(new CheckBoxOnCheckEventHandler(this.OnAutoPlayBtnClick));
+ base.uiBehaviour.m_Input.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnInputBtnClick));
+ }
+
+ private void SetTimesLabel(IXUILabel label, uint times)
+ {
+ label.SetText(XStringDefineProxy.GetString(string.Format("Multiple_times_{0}", times)));
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ XSingleton<XAudioMgr>.singleton.SetBusStatuMute("bus:/MainGroupControl/Except_Quiz", 0f);
+ XSingleton<XAudioMgr>.singleton.SetBusStatuMute("bus:/MainGroupControl/Quiz ", 1f);
+ DlgBase<XChatMaqueeView, XChatMaqueeBehaviour>.singleton.SetMaqueeSwitch(false);
+ XSingleton<XChatIFlyMgr>.singleton.EnableAutoPlay(false);
+ this._doc.GetReward();
+ base.uiBehaviour.m_AutoPlay.gameObject.SetActive(true);
+ base.uiBehaviour.m_SingleGo.SetActive(this._doc.CurrentType == 1u);
+ base.uiBehaviour.m_MultipleGo.SetActive(this._doc.CurrentType != 1u);
+ bool flag = this._doc.CurrentType == 2u;
+ if (flag)
+ {
+ DlgBase<DailyActivityDlg, TabDlgBehaviour>.singleton.SetVisible(false, true);
+ }
+ this.RefreshList();
+ this._doc.SendQueryVoiceQAInfo();
+ bool flag2 = !XSingleton<XClientNetwork>.singleton.IsWifiEnable() && XSingleton<XChatIFlyMgr>.singleton.IsChannelAutoPlayEnable(ChatChannelType.ZeroChannel);
+ if (flag2)
+ {
+ this._doc.IsAutoPlay = false;
+ }
+ base.uiBehaviour.m_AutoPlay.bChecked = this._doc.IsAutoPlay;
+ this.OnAutoPlayBtnClick(base.uiBehaviour.m_AutoPlay);
+ this.RefreshPage(this._startid, this._startindex, this._starttime);
+ }
+
+ private bool OnCloseClicked(IXUIButton btn)
+ {
+ this.SetVisibleWithAnimation(false, null);
+ return true;
+ }
+
+ private bool OnInputBtnClick(IXUIButton btn)
+ {
+ DlgBase<XChatInputView, XChatInputBehaviour>.singleton.ShowChatInput(new ChatInputStringBack(this.OnInputStringGet));
+ DlgBase<XChatInputView, XChatInputBehaviour>.singleton.SetInputType(ChatInputType.TEXT);
+ DlgBase<XChatInputView, XChatInputBehaviour>.singleton.SetCharacterLimit(50);
+ return true;
+ }
+
+ public void OnInputStringGet(string str)
+ {
+ XSingleton<XDebug>.singleton.AddLog("Player input string is ", str, null, null, null, null, XDebugColor.XDebug_None);
+ this._doc.SendAnswer(str, 0UL, 0u);
+ }
+
+ private bool OnAutoPlayBtnClick(IXUICheckBox iCheckBox)
+ {
+ bool flag = iCheckBox.bChecked && !XSingleton<XClientNetwork>.singleton.IsWifiEnable();
+ if (flag)
+ {
+ bool flag2 = XSingleton<XChatIFlyMgr>.singleton.IsChannelAutoPlayEnable(ChatChannelType.ZeroChannel);
+ if (flag2)
+ {
+ XSingleton<UiUtility>.singleton.ShowModalDialog(XStringDefineProxy.GetString("VoiceQA_AutoPlay_Error"), XStringDefineProxy.GetString("COMMON_OK"));
+ iCheckBox.bChecked = false;
+ return true;
+ }
+ }
+ this._doc.IsAutoPlay = iCheckBox.bChecked;
+ bool flag3 = !this._doc.IsAutoPlay;
+ if (flag3)
+ {
+ bool flag4 = !this.currPlayAudioIsMy;
+ if (flag4)
+ {
+ XSingleton<XAudioMgr>.singleton.StopUISound();
+ XSingleton<XChatIFlyMgr>.singleton.StopAutoPlay();
+ this.currPlayAudio = XVoiceQAView.UNPLAY;
+ }
+ this._audioList.Clear();
+ }
+ return true;
+ }
+
+ private void OnVoiceButtonDrag(IXUIButton sp, Vector2 delta)
+ {
+ this.m_DragDistance += delta;
+ bool flag = this.m_DragDistance.magnitude >= 100f;
+ if (flag)
+ {
+ this.m_CancelRecord = true;
+ }
+ else
+ {
+ this.m_CancelRecord = false;
+ }
+ }
+
+ private void OnVoiceButton(IXUIButton sp, bool state)
+ {
+ if (state)
+ {
+ this.m_CancelRecord = false;
+ XSingleton<XDebug>.singleton.AddLog("Press down", null, null, null, null, null, XDebugColor.XDebug_None);
+ this.m_DragDistance = Vector2.zero;
+ bool answerUseApollo = XChatDocument.m_AnswerUseApollo;
+ if (answerUseApollo)
+ {
+ XSingleton<XChatApolloMgr>.singleton.StartRecord(VoiceUsage.ANSWER, null);
+ }
+ else
+ {
+ XSingleton<XChatIFlyMgr>.singleton.StartRecord(VoiceUsage.ANSWER, null);
+ }
+ }
+ else
+ {
+ XSingleton<XDebug>.singleton.AddLog("Press up", null, null, null, null, null, XDebugColor.XDebug_None);
+ DlgBase<XChatView, XChatBehaviour>.singleton.SetActiveChannel(ChatChannelType.Team);
+ bool answerUseApollo2 = XChatDocument.m_AnswerUseApollo;
+ if (answerUseApollo2)
+ {
+ XSingleton<XChatApolloMgr>.singleton.StopRecord(this.m_CancelRecord);
+ }
+ else
+ {
+ XSingleton<XChatIFlyMgr>.singleton.StopRecord(this.m_CancelRecord);
+ }
+ this.m_CancelRecord = false;
+ }
+ }
+
+ public void VoiceQAStart(double time)
+ {
+ base.uiBehaviour.m_Start.SetActive(true);
+ base.uiBehaviour.m_Ongoing.SetActive(false);
+ base.uiBehaviour.m_End.SetActive(false);
+ bool isFirstOpenUI = this._doc.IsFirstOpenUI;
+ if (isFirstOpenUI)
+ {
+ this._doc.IsFirstOpenUI = false;
+ this.DealWithAudio(new VoiceQAAudio
+ {
+ isTips = true,
+ tipsType = VoiceQATipsType.WELCOME
+ }, QAAudioPriority.URGEN);
+ }
+ bool flag = this._doc.CurrentType != 1u;
+ if (flag)
+ {
+ base.uiBehaviour.m_RankScrollView.ResetPosition();
+ }
+ IXUILabel ixuilabel = base.uiBehaviour.m_Start.transform.Find("label").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel.SetText(XStringDefineProxy.GetString("VoiceQA_Start_Description_" + this._doc.CurrentType.ToString()));
+ this.timeLabel = (base.uiBehaviour.m_Start.transform.Find("time").GetComponent("XUILabel") as IXUILabel);
+ this.SetTime((double)(DateTime.Now.Ticks / 10000000L) + time, false);
+ }
+
+ public void SetQuestion(int id, uint index, bool isNew = true, double time = 0.0)
+ {
+ base.uiBehaviour.m_Start.SetActive(false);
+ base.uiBehaviour.m_Ongoing.SetActive(true);
+ base.uiBehaviour.m_End.SetActive(false);
+ base.uiBehaviour.m_NextQuestion.gameObject.SetActive(this._doc.CurrentType == 1u);
+ base.uiBehaviour.m_Right.SetActive(this._doc.IsNowDesRight);
+ this._audioList.Clear();
+ if (isNew)
+ {
+ VoiceQAAudio voiceQAAudio = new VoiceQAAudio();
+ voiceQAAudio.isTips = true;
+ voiceQAAudio.signTime = Time.time + 1000f;
+ bool flag = id == 1;
+ if (flag)
+ {
+ voiceQAAudio.tipsType = VoiceQATipsType.START;
+ this.DealWithAudio(voiceQAAudio, QAAudioPriority.URGEN);
+ }
+ else
+ {
+ voiceQAAudio.tipsType = VoiceQATipsType.NEXT;
+ this.DealWithAudio(voiceQAAudio, (this._doc.CurrentType == 1u) ? QAAudioPriority.AFTER : QAAudioPriority.URGEN);
+ }
+ }
+ bool flag2 = this._doc.CurrentType != 1u;
+ if (flag2)
+ {
+ this.RefreshList();
+ }
+ QuestionLibraryTable.RowData byID = this._doc.QuestionTable.GetByID((int)index);
+ base.uiBehaviour.m_QuesDesc.SetText(byID.Question);
+ base.uiBehaviour.m_QuesNum.SetText(string.Format(XStringDefineProxy.GetString("VoiceQA_QuestionNumber"), id));
+ base.uiBehaviour.m_Reward.InputText = XLabelSymbolHelper.FormatCostWithIcon((int)this._doc.Reward[0, 1], (ItemEnum)this._doc.Reward[0, 0]);
+ this.timeLabel = (base.uiBehaviour.m_Ongoing.transform.Find("message/time").GetComponent("XUILabel") as IXUILabel);
+ if (isNew)
+ {
+ QuestionLibraryTable.RowData byID2 = this._doc.QuestionTable.GetByID((int)index);
+ this.SetTime((double)(DateTime.Now.Ticks / 10000000L + (long)byID2.TimeLimit), false);
+ }
+ else
+ {
+ this.SetTime((double)(DateTime.Now.Ticks / 10000000L) + time, false);
+ }
+ }
+
+ public void VoiceQAEnd(uint questionNum, uint rightNum, List<ItemBrief> list)
+ {
+ base.uiBehaviour.m_Start.SetActive(false);
+ base.uiBehaviour.m_Ongoing.SetActive(false);
+ base.uiBehaviour.m_End.SetActive(true);
+ VoiceQAAudio voiceQAAudio = new VoiceQAAudio();
+ voiceQAAudio.isTips = true;
+ voiceQAAudio.tipsType = VoiceQATipsType.OVER;
+ this._audioList.Clear();
+ this.DealWithAudio(voiceQAAudio, QAAudioPriority.URGEN);
+ base.uiBehaviour.m_AutoPlay.gameObject.SetActive(false);
+ IXUILabel ixuilabel = base.uiBehaviour.m_End.transform.Find("label").GetComponent("XUILabel") as IXUILabel;
+ IXUILabelSymbol ixuilabelSymbol = base.uiBehaviour.m_End.transform.Find("reward").GetComponent("XUILabelSymbol") as IXUILabelSymbol;
+ ixuilabelSymbol.gameObject.SetActive(questionNum > 0u);
+ bool flag = questionNum > 0u;
+ if (flag)
+ {
+ string text = "";
+ for (int i = 0; i < list.Count; i++)
+ {
+ text += XLabelSymbolHelper.FormatCostWithIcon((int)list[i].itemCount, (ItemEnum)list[i].itemID);
+ }
+ ixuilabelSymbol.InputText = text;
+ ixuilabel.SetText(string.Format(XStringDefineProxy.GetString("VoiceQA_End_Description1"), questionNum, rightNum));
+ }
+ else
+ {
+ ixuilabel.SetText(XStringDefineProxy.GetString("VoiceQA_End_Description2"));
+ }
+ this.timeLabel = (base.uiBehaviour.m_End.transform.Find("time").GetComponent("XUILabel") as IXUILabel);
+ this.SetTime((double)(DateTime.Now.Ticks / 10000000L + 30L), true);
+ }
+
+ private bool OnNextQuestionBtnClick(IXUIButton btn)
+ {
+ XSingleton<XAudioMgr>.singleton.StopUISound();
+ XSingleton<XChatIFlyMgr>.singleton.StopAutoPlay();
+ this.currPlayAudioIsMy = false;
+ this._audioList.Clear();
+ this._doc.NextQuestionQuery();
+ return true;
+ }
+
+ private void OnAudioButtonClick(IXUISprite iSp)
+ {
+ this.DealWithAudio(new VoiceQAAudio
+ {
+ isTips = false,
+ audioID = this._doc.AnswerList[(int)iSp.ID].audioID,
+ audioTime = this._doc.AnswerList[(int)iSp.ID].audioTime
+ }, QAAudioPriority.URGEN);
+ }
+
+ private void AudioPlayEnd(object obj)
+ {
+ this.currPlayAudioIsMy = false;
+ bool flag = this.playingAni != null;
+ if (flag)
+ {
+ this.playingAni.StopAndReset();
+ this.playingAni = null;
+ }
+ this.PlayAudioList();
+ }
+
+ public void SetTime(double _targetTime, bool _isEndTime = false)
+ {
+ this.isEndTime = _isEndTime;
+ this.targetTime = _targetTime;
+ bool flag = this.targetTime > 10.0;
+ if (flag)
+ {
+ this.timeLabel.SetColor(XVoiceQAView.greenColor);
+ this.isGreenColor = true;
+ }
+ else
+ {
+ this.timeLabel.SetColor(XVoiceQAView.redColor);
+ this.isGreenColor = false;
+ }
+ }
+
+ private void WrapListInit(Transform t, int i)
+ {
+ this.aniArr[i] = (t.Find("voice/board/sign").GetComponent("XUISpriteAnimation") as IXUISpriteAnimation);
+ }
+
+ private void DesWrapListUpdated(Transform t, int i)
+ {
+ bool flag = this._doc.AnswerList[i].roleId == XSingleton<XAttributeMgr>.singleton.XPlayerData.RoleID;
+ IXUILabel ixuilabel = t.Find("time").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel.SetText(XSingleton<UiUtility>.singleton.TimeFormatString((int)this._doc.AnswerList[i].answerTime, 3, 3, 4, false, true));
+ IXUILabel ixuilabel2 = t.Find("voice/content").GetComponent("XUILabel") as IXUILabel;
+ string text = this._doc.AnswerList[i].content;
+ int num = (this._doc.CurrentType == 1u) ? 23 : 48;
+ bool flag2 = text.Length > num;
+ if (flag2)
+ {
+ text = text.Substring(0, num);
+ }
+ ixuilabel2.SetText(text);
+ bool flag3 = this._doc.CurrentType != 1u;
+ if (flag3)
+ {
+ Vector3 localPosition = ixuilabel2.gameObject.transform.localPosition;
+ localPosition.y = (float)((ixuilabel2.spriteHeight > 30) ? -41 : -50);
+ ixuilabel2.gameObject.transform.localPosition = localPosition;
+ }
+ GameObject gameObject = t.Find("voice/board").gameObject;
+ gameObject.SetActive(this._doc.AnswerList[i].audioID > 0UL);
+ bool flag4 = this._doc.CurrentType != 1u;
+ if (flag4)
+ {
+ IXUIButton ixuibutton = t.Find("voice/flower").GetComponent("XUIButton") as IXUIButton;
+ ixuibutton.gameObject.SetActive(!flag && this._doc.AnswerList[i].audioID > 0UL);
+ ixuibutton.ID = this._doc.AnswerList[i].roleId;
+ ixuibutton.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnSendFlowerClicked));
+ }
+ bool flag5 = this._doc.AnswerList[i].audioID > 0UL;
+ if (flag5)
+ {
+ IXUILabel ixuilabel3 = t.Find("voice/board/time").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel3.SetText(((this._doc.AnswerList[i].audioTime < 1000u) ? 1u : (this._doc.AnswerList[i].audioTime / 1000u)).ToString() + "''");
+ IXUISprite ixuisprite = t.Find("voice/board").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.ID = (ulong)((long)i);
+ ixuisprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnAudioButtonClick));
+ IXUISpriteAnimation ixuispriteAnimation = ixuisprite.gameObject.transform.Find("sign").GetComponent("XUISpriteAnimation") as IXUISpriteAnimation;
+ ixuispriteAnimation.ID = this._doc.AnswerList[i].audioID;
+ bool flag6 = this._doc.AnswerList[i].audioID == this.currPlayAudio;
+ if (flag6)
+ {
+ ixuispriteAnimation.Reset();
+ this.playingAni = ixuispriteAnimation;
+ }
+ else
+ {
+ ixuispriteAnimation.StopAndReset();
+ }
+ }
+ bool flag7 = flag;
+ if (flag7)
+ {
+ IXUISprite ixuisprite2 = t.Find("R/head").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite2.spriteName = XSingleton<XProfessionSkillMgr>.singleton.GetProfHeadIcon2((int)this._doc.AnswerList[i].profession);
+ }
+ else
+ {
+ IXUISprite ixuisprite3 = t.Find("L/head").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite3.spriteName = XSingleton<XProfessionSkillMgr>.singleton.GetProfHeadIcon2((int)this._doc.AnswerList[i].profession);
+ }
+ GameObject gameObject2 = t.Find("voice/right").gameObject;
+ gameObject2.SetActive(this._doc.AnswerList[i].right);
+ bool right = this._doc.AnswerList[i].right;
+ if (right)
+ {
+ bool isNew = this._doc.AnswerList[i].isNew;
+ if (isNew)
+ {
+ IXUITweenTool ixuitweenTool = gameObject2.GetComponent("XUIPlayTween") as IXUITweenTool;
+ ixuitweenTool.PlayTween(true, -1f);
+ }
+ bool flag8 = this._doc.AnswerList[i].isNew && flag && this._doc.CurrentType != 1u && !this._doc.IsNowDesRight;
+ if (flag8)
+ {
+ this._doc.IsNowDesRight = true;
+ base.uiBehaviour.m_Right.SetActive(true);
+ IXUITweenTool ixuitweenTool2 = base.uiBehaviour.m_Right.GetComponent("XUIPlayTween") as IXUITweenTool;
+ ixuitweenTool2.PlayTween(true, -1f);
+ }
+ }
+ GameObject gameObject3 = t.Find("reward").gameObject;
+ gameObject3.SetActive(this._doc.AnswerList[i].times > 0u);
+ bool flag9 = this._doc.AnswerList[i].times > 0u;
+ if (flag9)
+ {
+ IXUILabelSymbol ixuilabelSymbol = t.Find("reward/item").GetComponent("XUILabelSymbol") as IXUILabelSymbol;
+ ixuilabelSymbol.InputText = XLabelSymbolHelper.FormatCostWithIcon((int)(this._doc.Reward[0, 1] * this._doc.AnswerList[i].times), (ItemEnum)this._doc.Reward[0, 0]);
+ IXUILabel ixuilabel4 = t.Find("reward/times").GetComponent("XUILabel") as IXUILabel;
+ bool flag10 = this._doc.AnswerList[i].times > 1u;
+ if (flag10)
+ {
+ ixuilabel4.gameObject.SetActive(true);
+ this.SetTimesLabel(ixuilabel4, this._doc.AnswerList[i].times);
+ }
+ else
+ {
+ ixuilabel4.gameObject.SetActive(false);
+ }
+ }
+ bool flag11 = this._doc.CurrentType != 1u;
+ if (flag11)
+ {
+ GameObject gameObject4 = t.Find("R").gameObject;
+ GameObject gameObject5 = t.Find("L").gameObject;
+ gameObject4.SetActive(flag);
+ gameObject5.SetActive(!flag);
+ GameObject gameObject6 = t.Find("name").gameObject;
+ gameObject6.SetActive(flag);
+ GameObject gameObject7 = t.Find("name2").gameObject;
+ gameObject7.SetActive(!flag);
+ GameObject gameObject8 = t.Find("voice").gameObject;
+ IXUILabel ixuilabel5 = t.Find("enter").GetComponent("XUILabel") as IXUILabel;
+ gameObject8.SetActive(!this._doc.AnswerList[i].isEnterRoom);
+ ixuilabel5.gameObject.SetActive(this._doc.AnswerList[i].isEnterRoom);
+ bool isEnterRoom = this._doc.AnswerList[i].isEnterRoom;
+ if (isEnterRoom)
+ {
+ bool flag12 = flag;
+ if (flag12)
+ {
+ ixuilabel5.SetText(XStringDefineProxy.GetString("ME") + XStringDefineProxy.GetString("VoiceQA_EnterRoomInfo"));
+ }
+ else
+ {
+ ixuilabel5.SetText(this._doc.AnswerList[i].name + XStringDefineProxy.GetString("VoiceQA_EnterRoomInfo"));
+ }
+ }
+ bool flag13 = !flag;
+ if (flag13)
+ {
+ IXUILabelSymbol ixuilabelSymbol2 = gameObject7.GetComponent("XUILabelSymbol") as IXUILabelSymbol;
+ string inputText = XSingleton<UiUtility>.singleton.SetChatCoverDesignation(this._doc.AnswerList[i].name, this._doc.AnswerList[i].desID, false);
+ ixuilabelSymbol2.InputText = inputText;
+ }
+ GameObject gameObject9 = t.Find("quickreward").gameObject;
+ int rank = (int)this._doc.AnswerList[i].rank;
+ gameObject9.SetActive(rank != 0 && rank <= this._doc.ExtraReward.Count);
+ bool flag14 = rank != 0 && rank <= this._doc.ExtraReward.Count;
+ if (flag14)
+ {
+ IXUILabel ixuilabel6 = gameObject9.transform.Find("label").GetComponent("XUILabel") as IXUILabel;
+ bool flag15 = rank == 1;
+ if (flag15)
+ {
+ ixuilabel6.SetText(XStringDefineProxy.GetString("VoiceQA_quick_1"));
+ }
+ else
+ {
+ ixuilabel6.SetText(XStringDefineProxy.GetString("VoiceQA_quick_2"));
+ }
+ IXUILabelSymbol ixuilabelSymbol3 = gameObject9.transform.Find("item").GetComponent("XUILabelSymbol") as IXUILabelSymbol;
+ ixuilabelSymbol3.InputText = XLabelSymbolHelper.FormatCostWithIcon((int)this._doc.ExtraReward[rank - 1, 1], (ItemEnum)this._doc.ExtraReward[rank - 1, 0]);
+ }
+ }
+ bool isNew2 = this._doc.AnswerList[i].isNew;
+ if (isNew2)
+ {
+ this._doc.AnswerList[i].isNew = false;
+ bool flag16 = !this._doc.AnswerList[i].isEnterRoom;
+ if (flag16)
+ {
+ bool flag17 = this._doc.AnswerList[i].audioID > 0UL;
+ if (flag17)
+ {
+ bool flag18 = flag;
+ if (flag18)
+ {
+ VoiceQAAudio voiceQAAudio = new VoiceQAAudio();
+ voiceQAAudio.isTips = false;
+ voiceQAAudio.audioID = this._doc.AnswerList[i].audioID;
+ voiceQAAudio.audioTime = this._doc.AnswerList[i].audioTime;
+ this.currPlayAudioIsMy = true;
+ this.DealWithAudio(voiceQAAudio, QAAudioPriority.URGEN);
+ }
+ else
+ {
+ bool isAutoPlay = this._doc.IsAutoPlay;
+ if (isAutoPlay)
+ {
+ this.DealWithAudio(new VoiceQAAudio
+ {
+ isTips = false,
+ audioID = this._doc.AnswerList[i].audioID,
+ audioTime = this._doc.AnswerList[i].audioTime,
+ signTime = Time.time + XVoiceQAView.AUDIODELAYPLAYTIME
+ }, QAAudioPriority.AFTER);
+ }
+ }
+ }
+ bool flag19 = flag && this._doc.AnswerList[i].right;
+ if (flag19)
+ {
+ this.DealWithAudio(new VoiceQAAudio
+ {
+ isTips = true,
+ tipsType = VoiceQATipsType.RIGHT,
+ signTime = Time.time + 1000f
+ }, QAAudioPriority.BEFORE);
+ }
+ }
+ }
+ }
+
+ public void RefreshRank()
+ {
+ int num = Math.Min(this._doc.ScoreList.Count, XVoiceQAView.RANKSHOWNUMBER);
+ for (int i = 0; i < num; i++)
+ {
+ this.m_RankName[i].gameObject.transform.parent.gameObject.SetActive(true);
+ this.m_RankName[i].SetText(string.Format("{0}.{1}", i + 1, this._doc.GetPlayerNameByRoleID(this._doc.ScoreList[i].uuid)));
+ this.m_RankNum[i].SetText(this._doc.ScoreList[i].score.ToString());
+ }
+ for (int j = num; j < XVoiceQAView.RANKSHOWNUMBER; j++)
+ {
+ this.m_RankName[j].gameObject.transform.parent.gameObject.SetActive(false);
+ }
+ this.m_RankNum[XVoiceQAView.RANKSHOWNUMBER].SetText(this._doc.MyScore.ToString());
+ }
+
+ public void RefreshPage(int id, uint index, double time)
+ {
+ this._startid = id;
+ this._startindex = index;
+ this._starttime = time;
+ base.uiBehaviour.m_Title.SetText(XStringDefineProxy.GetString("VoiceQA_Title" + this._doc.CurrentType.ToString()));
+ bool flag = id == 0;
+ if (flag)
+ {
+ this.VoiceQAStart(time);
+ }
+ else
+ {
+ this.SetQuestion(id, index, false, time);
+ }
+ this.RefreshList();
+ }
+
+ public void RefreshList()
+ {
+ bool flag = !base.IsVisible();
+ if (!flag)
+ {
+ bool flag2 = this._doc.CurrentType == 1u;
+ IXUIScrollView ixuiscrollView;
+ IXUIWrapContent ixuiwrapContent;
+ if (flag2)
+ {
+ ixuiscrollView = base.uiBehaviour.m_SingleSrcollView;
+ ixuiwrapContent = base.uiBehaviour.m_SingleWrapContent;
+ }
+ else
+ {
+ ixuiscrollView = base.uiBehaviour.m_MultiSrollView;
+ ixuiwrapContent = base.uiBehaviour.m_MultiWrapContent;
+ }
+ int num = Mathf.Min(this._doc.AnswerList.Count, ixuiwrapContent.maxItemCount);
+ for (int i = num; i < 5; i++)
+ {
+ this.aniArr[i] = null;
+ }
+ ixuiwrapContent.SetContentCount(this._doc.AnswerList.Count, false);
+ bool flag3 = this._doc.AnswerList.Count < 3;
+ if (flag3)
+ {
+ ixuiscrollView.SetPosition(0f);
+ }
+ else
+ {
+ ixuiscrollView.NeedRecalcBounds();
+ ixuiscrollView.SetPosition(1f);
+ }
+ }
+ }
+
+ public override void OnUpdate()
+ {
+ base.OnUpdate();
+ bool flag = this.timeLabel == null;
+ if (!flag)
+ {
+ int num = (int)(this.targetTime - (double)(DateTime.Now.Ticks / 10000000L));
+ bool flag2 = num < 0;
+ if (flag2)
+ {
+ num = 0;
+ }
+ bool flag3 = !this.isEndTime && this.isGreenColor && num <= 10;
+ if (flag3)
+ {
+ this.timeLabel.SetColor(XVoiceQAView.redColor);
+ this.isGreenColor = false;
+ }
+ bool flag4 = this.isEndTime;
+ if (flag4)
+ {
+ bool flag5 = num == 0;
+ if (flag5)
+ {
+ this.timeLabel = null;
+ this.SetVisible(false, true);
+ }
+ else
+ {
+ this.timeLabel.SetText(num.ToString());
+ }
+ }
+ else
+ {
+ this.timeLabel.SetText(XSingleton<UiUtility>.singleton.TimeFormatString(num, 2, 2, 4, false, true));
+ }
+ }
+ }
+
+ private bool OnSendFlowerClicked(IXUIButton btn)
+ {
+ ulong id = btn.ID;
+ string playerNameByRoleID = this._doc.GetPlayerNameByRoleID(id);
+ DlgBase<XFlowerSendView, XFlowerSendBehaviour>.singleton.ShowBoard(id, playerNameByRoleID);
+ return true;
+ }
+
+ public void DealWithAudio(VoiceQAAudio audio, QAAudioPriority pro)
+ {
+ bool flag = pro == QAAudioPriority.URGEN;
+ if (flag)
+ {
+ bool flag2 = this.currPlayAudio == XVoiceQAView.SYSTEMTIPS;
+ if (flag2)
+ {
+ XSingleton<XAudioMgr>.singleton.StopUISound();
+ }
+ else
+ {
+ XSingleton<XChatIFlyMgr>.singleton.StopAutoPlay();
+ }
+ this.currPlayAudioIsMy = false;
+ this.PlayAudio(audio);
+ }
+ else
+ {
+ bool flag3 = pro == QAAudioPriority.BEFORE;
+ if (flag3)
+ {
+ this._audioList.AddFirst(audio);
+ }
+ else
+ {
+ this._audioList.AddLast(audio);
+ }
+ bool flag4 = this.currPlayAudio == XVoiceQAView.UNPLAY;
+ if (flag4)
+ {
+ this.PlayAudioList();
+ }
+ }
+ }
+
+ private void PlayAudio(VoiceQAAudio audio)
+ {
+ bool flag = this.playingAni != null;
+ if (flag)
+ {
+ this.playingAni.StopAndReset();
+ this.playingAni = null;
+ }
+ float interval = 0f;
+ bool isTips = audio.isTips;
+ if (isTips)
+ {
+ this.currPlayAudio = XVoiceQAView.SYSTEMTIPS;
+ switch (audio.tipsType)
+ {
+ case VoiceQATipsType.WELCOME:
+ XSingleton<XAudioMgr>.singleton.PlayUISound("Audio/VO/QuizGame_welcome", true, AudioChannel.Action);
+ interval = 4.885f;
+ break;
+ case VoiceQATipsType.RIGHT:
+ XSingleton<XAudioMgr>.singleton.PlayUISound("Audio/VO/QuizGame_right", true, AudioChannel.Action);
+ interval = 1.646f;
+ break;
+ case VoiceQATipsType.START:
+ XSingleton<XAudioMgr>.singleton.PlayUISound("Audio/VO/QuizGame_start", true, AudioChannel.Action);
+ interval = 3.964f;
+ break;
+ case VoiceQATipsType.NEXT:
+ XSingleton<XAudioMgr>.singleton.PlayUISound("Audio/VO/QuizGame_next", true, AudioChannel.Action);
+ interval = 0.683f;
+ break;
+ case VoiceQATipsType.OVER:
+ XSingleton<XAudioMgr>.singleton.PlayUISound("Audio/VO/QuizGame_over2", true, AudioChannel.Action);
+ interval = 3.809f;
+ break;
+ }
+ }
+ else
+ {
+ this.currPlayAudio = audio.audioID;
+ ulong audioID = audio.audioID;
+ XSingleton<XChatIFlyMgr>.singleton.StartPlayAudioId(audioID);
+ interval = audio.audioTime / 1000f;
+ for (int i = 0; i < 5; i++)
+ {
+ bool flag2 = this.aniArr[i] == null;
+ if (!flag2)
+ {
+ bool flag3 = !this.aniArr[i].gameObject.activeSelf;
+ if (!flag3)
+ {
+ bool flag4 = this.aniArr[i].ID == audio.audioID;
+ if (flag4)
+ {
+ this.aniArr[i].Reset();
+ this.playingAni = this.aniArr[i];
+ }
+ else
+ {
+ this.aniArr[i].StopAndReset();
+ }
+ }
+ }
+ }
+ }
+ XSingleton<XTimerMgr>.singleton.KillTimer(this._timerToken);
+ this._timerToken = XSingleton<XTimerMgr>.singleton.SetTimer(interval, new XTimerMgr.ElapsedEventHandler(this.AudioPlayEnd), null);
+ }
+
+ private void PlayAudioList()
+ {
+ bool flag = this._audioList.Count == 0;
+ if (flag)
+ {
+ this.currPlayAudio = XVoiceQAView.UNPLAY;
+ }
+ else
+ {
+ while (this._audioList.Count != 0)
+ {
+ VoiceQAAudio value = this._audioList.First.Value;
+ this._audioList.RemoveFirst();
+ bool flag2 = value.signTime > Time.time;
+ if (flag2)
+ {
+ this.PlayAudio(value);
+ break;
+ }
+ }
+ }
+ }
+
+ protected override void OnUnload()
+ {
+ XSingleton<XTimerMgr>.singleton.KillTimer(this._timerToken);
+ DlgBase<XChatMaqueeView, XChatMaqueeBehaviour>.singleton.SetMaqueeSwitch(true);
+ base.OnUnload();
+ }
+
+ protected override void OnHide()
+ {
+ base.OnHide();
+ XSingleton<XAudioMgr>.singleton.SetBusStatuMute("bus:/MainGroupControl/Except_Quiz", 1f);
+ XSingleton<XAudioMgr>.singleton.SetBusStatuMute("bus:/MainGroupControl/Quiz ", 1f);
+ DlgBase<XChatMaqueeView, XChatMaqueeBehaviour>.singleton.SetMaqueeSwitch(true);
+ XSingleton<XChatIFlyMgr>.singleton.EnableAutoPlay(true);
+ this.timeLabel = null;
+ XSingleton<XAudioMgr>.singleton.StopUISound();
+ XSingleton<XChatIFlyMgr>.singleton.StopAutoPlay();
+ this.currPlayAudioIsMy = false;
+ this._audioList.Clear();
+ this.currPlayAudio = XVoiceQAView.UNPLAY;
+ XSingleton<XTimerMgr>.singleton.KillTimer(this._timerToken);
+ this.OnRemoveAllQACache();
+ }
+
+ private void OnRemoveAllQACache()
+ {
+ bool flag = XChatDocument.is_delete_audio && XSingleton<XChatIFlyMgr>.singleton.NeedClear();
+ if (flag)
+ {
+ XSingleton<XChatIFlyMgr>.singleton.ClearAudioCache();
+ }
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/XVoiceQAView.cs.meta b/Client/Assets/Scripts/XMainClient/UI/XVoiceQAView.cs.meta
new file mode 100644
index 00000000..a60f635d
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XVoiceQAView.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 1fa0378770f2b5a4f9d91955bd8f0e43
+timeCreated: 1611403402
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/XWeddingCostBehavior.cs b/Client/Assets/Scripts/XMainClient/UI/XWeddingCostBehavior.cs
new file mode 100644
index 00000000..f842114e
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XWeddingCostBehavior.cs
@@ -0,0 +1,41 @@
+using System;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+
+namespace XMainClient.UI
+{
+ internal class XWeddingCostBehavior : DlgBehaviourBase
+ {
+ public GameObject DrawItem = null;
+
+ public IXUILabel TitleLabel = null;
+
+ public IXUILabel SecondTitle = null;
+
+ public IXUILabel TipLabel = null;
+
+ public IXUILabel CostTip = null;
+
+ public IXUILabel NumLabel = null;
+
+ public IXUIButton Close;
+
+ public IXUIButton OkBtn;
+
+ public IXUIButton Cancel;
+
+ private void Awake()
+ {
+ this.DrawItem = base.transform.Find("ItemTpl").gameObject;
+ this.TipLabel = (base.transform.Find("Tip").GetComponent("XUILabel") as IXUILabel);
+ this.SecondTitle = (base.transform.Find("Bg/Tip").GetComponent("XUILabel") as IXUILabel);
+ this.TitleLabel = (base.transform.Find("Title").GetComponent("XUILabel") as IXUILabel);
+ this.CostTip = (base.transform.Find("CostTip").GetComponent("XUILabel") as IXUILabel);
+ this.NumLabel = (base.transform.Find("TipNum").GetComponent("XUILabel") as IXUILabel);
+ this.Close = (base.transform.Find("Close").GetComponent("XUIButton") as IXUIButton);
+ this.OkBtn = (base.transform.Find("SureBtn").GetComponent("XUIButton") as IXUIButton);
+ this.Cancel = (base.transform.Find("Cancel").GetComponent("XUIButton") as IXUIButton);
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/XWeddingCostBehavior.cs.meta b/Client/Assets/Scripts/XMainClient/UI/XWeddingCostBehavior.cs.meta
new file mode 100644
index 00000000..fb82dd9b
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XWeddingCostBehavior.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 9623400d5068f9d4caf4ce31231f7fe1
+timeCreated: 1611404183
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/XWeddingCostView.cs b/Client/Assets/Scripts/XMainClient/UI/XWeddingCostView.cs
new file mode 100644
index 00000000..d1339dc8
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XWeddingCostView.cs
@@ -0,0 +1,117 @@
+using System;
+using KKSG;
+using UILib;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class XWeddingCostView : DlgBase<XWeddingCostView, XWeddingCostBehavior>
+ {
+ public override string fileName
+ {
+ get
+ {
+ return "GameSystem/Wedding/weddingCost";
+ }
+ }
+
+ public override int layer
+ {
+ get
+ {
+ return 1;
+ }
+ }
+
+ public override int group
+ {
+ get
+ {
+ return 1;
+ }
+ }
+
+ public override bool autoload
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ private WeddingType _weddingType;
+
+ protected override void Init()
+ {
+ this.InitProperties();
+ }
+
+ protected override void OnUnload()
+ {
+ base.OnUnload();
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ }
+
+ protected override void OnShow()
+ {
+ }
+
+ protected override void OnHide()
+ {
+ }
+
+ private bool OnCloseClicked(IXUIButton iSp)
+ {
+ this.SetVisible(false, true);
+ return true;
+ }
+
+ private void InitProperties()
+ {
+ base.uiBehaviour.Close.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnCloseClicked));
+ base.uiBehaviour.Cancel.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnCloseClicked));
+ base.uiBehaviour.OkBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnOkBtnClicked));
+ }
+
+ private bool OnOkBtnClicked(IXUIButton button)
+ {
+ XWeddingDocument.Doc.SendMarriageOp(MarriageOpType.MarriageOpType_MarryApply, this._weddingType, 0UL);
+ this.SetVisible(false, true);
+ return true;
+ }
+
+ public void RefreshUI(WeddingType type)
+ {
+ this.SetVisible(true, true);
+ this._weddingType = type;
+ string text = (type == WeddingType.WeddingType_Normal) ? XStringDefineProxy.GetString("Wedding_Npc_NormalWedding") : XStringDefineProxy.GetString("Wedding_Npc_BetterWedding");
+ base.uiBehaviour.TitleLabel.SetText(text);
+ string text2 = (type == WeddingType.WeddingType_Normal) ? XStringDefineProxy.GetString("weddingNormalWeddingWelfare") : XStringDefineProxy.GetString("weddingBetterWeddingWelfare");
+ base.uiBehaviour.SecondTitle.SetText(text2);
+ string text3 = (type == WeddingType.WeddingType_Normal) ? XStringDefineProxy.GetString("WeddingNormlWelfareTip") : XStringDefineProxy.GetString("WeddingBetterWelfareTip");
+ text3 = XSingleton<UiUtility>.singleton.ReplaceReturn(text3);
+ base.uiBehaviour.TipLabel.SetText(text3);
+ string key = (type == WeddingType.WeddingType_Normal) ? "MarriageCost" : "MarriageSplendidCost";
+ SeqList<int> sequenceList = XSingleton<XGlobalConfig>.singleton.GetSequenceList(key, true);
+ int num = sequenceList[0, 0];
+ int num2 = sequenceList[0, 1];
+ string text4 = XSingleton<XStringTable>.singleton.GetString("NeedCost") + XBagDocument.GetItemConf(num).ItemName[0];
+ base.uiBehaviour.CostTip.SetText(text4);
+ base.uiBehaviour.NumLabel.SetText("X" + num2);
+ XSingleton<XItemDrawerMgr>.singleton.normalItemDrawer.DrawItem(base.uiBehaviour.DrawItem, num, num2, false);
+ IXUISprite ixuisprite = base.uiBehaviour.DrawItem.transform.Find("Icon").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.ID = (ulong)((long)num);
+ ixuisprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(XSingleton<UiUtility>.singleton.OnItemClick));
+ }
+
+ public bool RefreshItems(IXUICheckBox go)
+ {
+ return true;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/XWeddingCostView.cs.meta b/Client/Assets/Scripts/XMainClient/UI/XWeddingCostView.cs.meta
new file mode 100644
index 00000000..b56b7d2e
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XWeddingCostView.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 971ab3b1b90459f47af72623a3ef566b
+timeCreated: 1611404187
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/XWeddingDramaOperate.cs b/Client/Assets/Scripts/XMainClient/UI/XWeddingDramaOperate.cs
new file mode 100644
index 00000000..5f33d5fc
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XWeddingDramaOperate.cs
@@ -0,0 +1,291 @@
+using System;
+using System.Collections.Generic;
+using KKSG;
+using UILib;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class XWeddingDramaOperate : XDramaOperate
+ {
+ private XDramaOperateParam _param;
+
+ private XWeddingDocument doc;
+
+ public override void ShowNpc(XNpc npc)
+ {
+ base.ShowNpc(npc);
+ this.doc = XDocuments.GetSpecificDocument<XWeddingDocument>(XWeddingDocument.uuID);
+ this._param = XDataPool<XDramaOperateParam>.GetData();
+ this._param.Npc = npc;
+ XWeddingDocument.Doc.SendMarriageRelationInfo();
+ }
+
+ public void RefreshOperateStatus()
+ {
+ switch (this.doc.GetMyMarriageRelation())
+ {
+ case MarriageStatus.MarriageStatus_Marriaged:
+ {
+ this._param.Text = XStringDefineProxy.GetString("MentorshipNpcDialog_0_Pupil");
+ string @string = XStringDefineProxy.GetString("Wedding_Npc_HoldFeast");
+ this._param.AppendButton(@string, new ButtonClickEventHandler(this.ToHoldWeddingFeast), 0UL);
+ this._param.AppendButton(XStringDefineProxy.GetString("Wedding_Npc_BreakMarriage"), new ButtonClickEventHandler(this.ToBreakMarriage), 0UL);
+ this._param.AppendButton(XStringDefineProxy.GetString("Wedding_Npc_JoinWedding"), new ButtonClickEventHandler(this.EnterMarriageScene), 0UL);
+ break;
+ }
+ case MarriageStatus.MarriageStatus_WeddingHoldingNoCar:
+ this._param.Text = XStringDefineProxy.GetString("MentorshipNpcDialog_0_Pupil");
+ this._param.AppendButton(XStringDefineProxy.GetString("Wedding_Npc_InviteFriends"), new ButtonClickEventHandler(this.ToInviteFriends), 0UL);
+ this._param.AppendButton(XStringDefineProxy.GetString("Wedding_Npc_JoinWedding"), new ButtonClickEventHandler(this.EnterMarriageScene), 0UL);
+ break;
+ case MarriageStatus.MarriageStatus_WeddingHoldedNoCar:
+ this._param.Text = XStringDefineProxy.GetString("MentorshipNpcDialog_0_Pupil");
+ this._param.AppendButton(XStringDefineProxy.GetString("Wedding_Npc_BreakMarriage"), new ButtonClickEventHandler(this.ToBreakMarriage), 0UL);
+ this._param.AppendButton(XStringDefineProxy.GetString("Wedding_Npc_JoinWedding"), new ButtonClickEventHandler(this.EnterMarriageScene), 0UL);
+ break;
+ case MarriageStatus.MarriageStatus_WeddingCarNoWedding:
+ this._param.Text = XStringDefineProxy.GetString("MentorshipNpcDialog_0_Pupil");
+ this._param.AppendButton(XStringDefineProxy.GetString("Wedding_Npc_HoldFeast"), new ButtonClickEventHandler(this.ToHoldWeddingFeast), 0UL);
+ this._param.AppendButton(XStringDefineProxy.GetString("Wedding_Npc_BreakMarriage"), new ButtonClickEventHandler(this.ToBreakMarriage), 0UL);
+ this._param.AppendButton(XStringDefineProxy.GetString("Wedding_Npc_JoinWedding"), new ButtonClickEventHandler(this.EnterMarriageScene), 0UL);
+ break;
+ case MarriageStatus.MarriageStatus_WeddingHoldingAndCar:
+ this._param.Text = XStringDefineProxy.GetString("MentorshipNpcDialog_0_Pupil");
+ this._param.AppendButton(XStringDefineProxy.GetString("Wedding_Npc_InviteFriends"), new ButtonClickEventHandler(this.ToInviteFriends), 0UL);
+ this._param.AppendButton(XStringDefineProxy.GetString("Wedding_Npc_JoinWedding"), new ButtonClickEventHandler(this.EnterMarriageScene), 0UL);
+ break;
+ case MarriageStatus.MarriageStatus_WeddingHoldedAndCar:
+ this._param.AppendButton(XStringDefineProxy.GetString("Wedding_Npc_JoinWedding"), new ButtonClickEventHandler(this.EnterMarriageScene), 0UL);
+ this._param.Text = XStringDefineProxy.GetString("MentorshipNpcDialog_0_Pupil");
+ this._param.AppendButton(XStringDefineProxy.GetString("Wedding_Npc_BreakMarriage"), new ButtonClickEventHandler(this.ToBreakMarriage), 0UL);
+ break;
+ case MarriageStatus.MarriageStatus_DivorceApply:
+ this._param.Text = XStringDefineProxy.GetString("MentorshipNpcDialog_0_Pupil");
+ this._param.AppendButton(XStringDefineProxy.GetString("Wedding_Npc_CancelBreak"), new ButtonClickEventHandler(this.ClickToCancel), 0UL);
+ this._param.AppendButton(XStringDefineProxy.GetString("Wedding_Npc_JoinWedding"), new ButtonClickEventHandler(this.EnterMarriageScene), 0UL);
+ break;
+ case MarriageStatus.MarriageStatus_Divorced:
+ this._param.Text = XStringDefineProxy.GetString("MentorshipNpcDialog_0_Pupil");
+ this._param.AppendButton(XStringDefineProxy.GetString("Wedding_Npc_JoinWedding"), new ButtonClickEventHandler(this.EnterMarriageScene), 0UL);
+ break;
+ default:
+ this._param.Text = XStringDefineProxy.GetString("MentorshipNpcDialog_0_Pupil");
+ this._param.AppendButton(XStringDefineProxy.GetString("Wedding_Npc_Abount"), new ButtonClickEventHandler(this.ToKnowMarriage), 0UL);
+ this._param.AppendButton(XStringDefineProxy.GetString("Wedding_Npc_ToMarry"), new ButtonClickEventHandler(this.ToGetMarriage), 0UL);
+ this._param.AppendButton(XStringDefineProxy.GetString("Wedding_Npc_JoinWedding"), new ButtonClickEventHandler(this.EnterMarriageScene), 0UL);
+ break;
+ }
+ base._FireEvent(this._param);
+ }
+
+ private bool ClickToCancel(IXUIButton button)
+ {
+ XDramaOperateParam data = XDataPool<XDramaOperateParam>.GetData();
+ this._param.Text = XStringDefineProxy.GetString("WeddingSelectToCancel");
+ RoleOutLookBrief partnerInfo = this.doc.GetPartnerInfo();
+ bool flag = partnerInfo != null && this.doc.DivorceApplyID == XSingleton<XAttributeMgr>.singleton.XPlayerData.RoleID;
+ if (flag)
+ {
+ XDramaOperateList xdramaOperateList = this._param.AppendList(partnerInfo.name, new SpriteClickEventHandler(this.ToCancelApplyDivorce), partnerInfo.roleid);
+ xdramaOperateList.TargetTime = (float)this.doc.LeftDivorceTime;
+ }
+ else
+ {
+ this._param.Text = XStringDefineProxy.GetString("ERR_MARRIAGE_ONLY_APPLIER_CANCLEDIVORCE");
+ }
+ base._FireEvent(data);
+ return true;
+ }
+
+ private void ToCancelApplyDivorce(IXUISprite uiSprite)
+ {
+ string message = XSingleton<UiUtility>.singleton.ReplaceReturn(XSingleton<XStringTable>.singleton.GetString("WeddingCancelBreakTip"));
+ XSingleton<UiUtility>.singleton.ShowModalDialog(message, new ButtonClickEventHandler(this.ToSendCancelApplyDivorce));
+ }
+
+ private bool ToSendCancelApplyDivorce(IXUIButton button)
+ {
+ XSingleton<UiUtility>.singleton.CloseModalDlg();
+ XWeddingDocument.Doc.SendMarriageOp(MarriageOpType.MarriageOpType_DivorceCancel, WeddingType.WeddingType_Normal, 0UL);
+ return true;
+ }
+
+ private bool ToBreakMarriage(IXUIButton button)
+ {
+ int @int = XSingleton<XGlobalConfig>.singleton.GetInt("MarriageFreeDivorceDay");
+ bool flag = XWeddingDocument.Doc.CoupleOfflineTime < @int * 60 * 60 * 24;
+ string message;
+ if (flag)
+ {
+ RoleOutLookBrief partnerInfo = XWeddingDocument.Doc.GetPartnerInfo();
+ SeqList<int> sequenceList = XSingleton<XGlobalConfig>.singleton.GetSequenceList("MarriageDivorceCost", true);
+ int itemID = sequenceList[0, 0];
+ int num = sequenceList[0, 1];
+ string arg = num + XBagDocument.GetItemConf(itemID).ItemName[0];
+ message = string.Format(XSingleton<UiUtility>.singleton.ReplaceReturn(XSingleton<XStringTable>.singleton.GetString("Wedding_Npc_ToBreakTip")), arg, (partnerInfo == null) ? "" : partnerInfo.name);
+ }
+ else
+ {
+ message = XSingleton<UiUtility>.singleton.ReplaceReturn(XSingleton<XStringTable>.singleton.GetString("WeddingBreakFreeCostTip"));
+ }
+ XSingleton<UiUtility>.singleton.ShowModalDialog(message, new ButtonClickEventHandler(this.ToSendBreakMarriage));
+ return true;
+ }
+
+ private bool ToSendBreakMarriage(IXUIButton button)
+ {
+ XSingleton<UiUtility>.singleton.CloseModalDlg();
+ XWeddingDocument.Doc.SendMarriageOp(MarriageOpType.MarriageOpType_Divorce, WeddingType.WeddingType_Normal, 0UL);
+ return true;
+ }
+
+ private string GetCostString(string global)
+ {
+ SeqList<int> sequenceList = XSingleton<XGlobalConfig>.singleton.GetSequenceList(global, true);
+ int itemID = sequenceList[0, 0];
+ int num = sequenceList[0, 1];
+ return num + "X" + XBagDocument.GetItemConf(itemID).ItemName[0];
+ }
+
+ private bool ToGetWeddingCar(IXUIButton button)
+ {
+ XSingleton<UiUtility>.singleton.ShowModalDialog(XStringDefineProxy.GetString("WeddingCarConfirmTip"), new ButtonClickEventHandler(this.ToSendWeddingCar));
+ return true;
+ }
+
+ private bool ToSendWeddingCar(IXUIButton button)
+ {
+ XSingleton<UiUtility>.singleton.CloseModalDlg();
+ XWeddingDocument.Doc.SendWeddingCar();
+ return true;
+ }
+
+ private bool ToInviteFriends(IXUIButton button)
+ {
+ DlgBase<XWeddingInviteView, XWeddingInviteBehavior>.singleton.SetVisibleWithAnimation(true, null);
+ return true;
+ }
+
+ private bool EnterMarriageScene(IXUIButton button)
+ {
+ DlgBase<WeddingEnterApplyView, WeddingEnterApplyBehaviour>.singleton.SetVisibleWithAnimation(true, null);
+ return true;
+ }
+
+ private bool ToHoldBetterWedding(IXUIButton button)
+ {
+ bool flag = this.IsAvailableTeam();
+ if (flag)
+ {
+ DlgBase<XWeddingCostView, XWeddingCostBehavior>.singleton.RefreshUI(WeddingType.WeddingType_Luxury);
+ }
+ return true;
+ }
+
+ private bool ToSendBetterWedding(IXUIButton button)
+ {
+ XSingleton<UiUtility>.singleton.CloseModalDlg();
+ XWeddingDocument.Doc.SendMarriageOp(MarriageOpType.MarriageOpType_MarryApply, WeddingType.WeddingType_Luxury, 0UL);
+ return true;
+ }
+
+ private bool ToHoldNormalWedding(IXUIButton button)
+ {
+ bool flag = this.IsAvailableTeam();
+ if (flag)
+ {
+ DlgBase<XWeddingCostView, XWeddingCostBehavior>.singleton.RefreshUI(WeddingType.WeddingType_Normal);
+ }
+ return true;
+ }
+
+ private bool IsAvailableTeam()
+ {
+ XTeamDocument specificDocument = XDocuments.GetSpecificDocument<XTeamDocument>(XTeamDocument.uuID);
+ bool bInTeam = specificDocument.bInTeam;
+ if (bInTeam)
+ {
+ List<XTeamMember> members = specificDocument.MyTeam.members;
+ bool flag = members.Count == 2 && XSingleton<UiUtility>.singleton.IsOppositeSex((int)members[0].profession, (int)members[1].profession);
+ if (flag)
+ {
+ return true;
+ }
+ }
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString("ERR_WEDDING_NEED_TWO_MARRIAGE"), "fece00");
+ return false;
+ }
+
+ private bool ToSendNormalWedding(IXUIButton button)
+ {
+ XSingleton<UiUtility>.singleton.CloseModalDlg();
+ XWeddingDocument.Doc.SendMarriageOp(MarriageOpType.MarriageOpType_MarryApply, WeddingType.WeddingType_Normal, 0UL);
+ return true;
+ }
+
+ private bool ToHoldWeddingFeast(IXUIButton button)
+ {
+ XSingleton<UiUtility>.singleton.ShowModalDialog(XStringDefineProxy.GetString("WeddingFeastOnlyOnce"), new ButtonClickEventHandler(this.ToSendReqWedding));
+ return true;
+ }
+
+ private bool ToSendReqWedding(IXUIButton button)
+ {
+ XSingleton<UiUtility>.singleton.CloseModalDlg();
+ XWeddingDocument.Doc.ReqHoldWedding();
+ return true;
+ }
+
+ private bool ToGetMarriage(IXUIButton button)
+ {
+ XDramaOperateParam data = XDataPool<XDramaOperateParam>.GetData();
+ data.Text = XStringDefineProxy.GetString("MentorshipNpcDialog_0_Master");
+ data.AppendButton(XStringDefineProxy.GetString("Wedding_Npc_NormalWedding"), new ButtonClickEventHandler(this.ToHoldNormalWedding), 0UL);
+ data.AppendButton(XStringDefineProxy.GetString("Wedding_Npc_BetterWedding"), new ButtonClickEventHandler(this.ToHoldBetterWedding), 0UL);
+ base._FireEvent(data);
+ return true;
+ }
+
+ private bool ToKnowMarriage(IXUIButton button)
+ {
+ string text = XSingleton<UiUtility>.singleton.ReplaceReturn(XSingleton<XStringTable>.singleton.GetString("WeddingRule"));
+ text = text.Replace("{s}", " ");
+ XSingleton<UiUtility>.singleton.ShowModalDialog(text, XStringDefineProxy.GetString("COMMON_OK"), new ButtonClickEventHandler(this.ToCloseMarriageIntro), 50);
+ return true;
+ }
+
+ private bool ToCloseMarriageIntro(IXUIButton button)
+ {
+ XSingleton<UiUtility>.singleton.CloseModalDlg();
+ return true;
+ }
+
+ public void RefreshMarriageOp(MarriageRelationOpArg oarg, MarriageRelationOpRes oRes)
+ {
+ XDramaOperateParam data = XDataPool<XDramaOperateParam>.GetData();
+ bool flag = oRes.error == ErrorCode.ERR_SUCCESS;
+ if (flag)
+ {
+ switch (oarg.opType)
+ {
+ case MarriageOpType.MarriageOpType_MarryApply:
+ data.Text = XSingleton<XStringTable>.singleton.GetString("WeddingApplySucceed");
+ break;
+ case MarriageOpType.MarriageOpType_Divorce:
+ data.Text = XSingleton<XStringTable>.singleton.GetString("WeddingDivorceSendSuccess");
+ break;
+ case MarriageOpType.MarriageOpType_DivorceCancel:
+ data.Text = XStringDefineProxy.GetString("WeddingDivorceCancelSuccess");
+ break;
+ }
+ }
+ else
+ {
+ data.Text = XStringDefineProxy.GetString(oRes.error);
+ }
+ base._FireEvent(data);
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/XWeddingDramaOperate.cs.meta b/Client/Assets/Scripts/XMainClient/UI/XWeddingDramaOperate.cs.meta
new file mode 100644
index 00000000..060426c8
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XWeddingDramaOperate.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: d71cdef535c968342a50c7452cb5f4eb
+timeCreated: 1611404634
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/XWeddingInviteBehavior.cs b/Client/Assets/Scripts/XMainClient/UI/XWeddingInviteBehavior.cs
new file mode 100644
index 00000000..f8faabb7
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XWeddingInviteBehavior.cs
@@ -0,0 +1,36 @@
+using System;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+
+namespace XMainClient.UI
+{
+ internal class XWeddingInviteBehavior : DlgBehaviourBase
+ {
+ public IXUIScrollView ScrollView;
+
+ public IXUIWrapContent WrapContent;
+
+ public Transform Tabs;
+
+ public IXUIButton Close;
+
+ public IXUICheckBox AllowStranger;
+
+ public IXUILabel InviteNum;
+
+ public GameObject ListRedPoint;
+
+ private void Awake()
+ {
+ Transform transform = base.transform.Find("Bg/BtnAddFriendMiddle");
+ this.ScrollView = (base.transform.Find("FriendList").GetComponent("XUIScrollView") as IXUIScrollView);
+ this.WrapContent = (base.transform.Find("FriendList/WrapContent").GetComponent("XUIWrapContent") as IXUIWrapContent);
+ this.Tabs = base.transform.Find("Tabs");
+ this.Close = (base.transform.Find("Close").GetComponent("XUIButton") as IXUIButton);
+ this.AllowStranger = (base.transform.Find("pp/Normal").GetComponent("XUICheckBox") as IXUICheckBox);
+ this.InviteNum = (base.transform.Find("InviteNum").GetComponent("XUILabel") as IXUILabel);
+ this.ListRedPoint = base.transform.Find("Tabs/item3/Bg/redpoint").gameObject;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/XWeddingInviteBehavior.cs.meta b/Client/Assets/Scripts/XMainClient/UI/XWeddingInviteBehavior.cs.meta
new file mode 100644
index 00000000..663e0487
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XWeddingInviteBehavior.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 506d422b80ab303448ff1646bb433b0f
+timeCreated: 1611403703
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/XWeddingInviteView.cs b/Client/Assets/Scripts/XMainClient/UI/XWeddingInviteView.cs
new file mode 100644
index 00000000..67ef8323
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XWeddingInviteView.cs
@@ -0,0 +1,280 @@
+using System;
+using System.Collections.Generic;
+using KKSG;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class XWeddingInviteView : DlgBase<XWeddingInviteView, XWeddingInviteBehavior>
+ {
+ public override string fileName
+ {
+ get
+ {
+ return "GameSystem/Wedding/WeddingInvite";
+ }
+ }
+
+ public override int layer
+ {
+ get
+ {
+ return 1;
+ }
+ }
+
+ public override int group
+ {
+ get
+ {
+ return 1;
+ }
+ }
+
+ public override bool autoload
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ protected List<IXUICheckBox> _tabs = new List<IXUICheckBox>();
+
+ protected int _curTab;
+
+ protected List<WeddingRoleInfo> _curList = new List<WeddingRoleInfo>();
+
+ protected override void Init()
+ {
+ this.InitTabs();
+ this.InitProperties();
+ }
+
+ protected override void OnUnload()
+ {
+ base.OnUnload();
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ this._curList.Clear();
+ this._curTab = 0;
+ XWeddingDocument.Doc.GetWeddingInviteInfo();
+ }
+
+ protected override void OnHide()
+ {
+ bool flag = base.uiBehaviour.AllowStranger.bChecked != XWeddingDocument.Doc.PermitStranger;
+ if (flag)
+ {
+ bool bChecked = base.uiBehaviour.AllowStranger.bChecked;
+ if (bChecked)
+ {
+ XWeddingDocument.Doc.WeddingInviteOperate(WeddingInviteOperType.Wedding_PermitStranger, 0UL, 0UL);
+ }
+ else
+ {
+ XWeddingDocument.Doc.WeddingInviteOperate(WeddingInviteOperType.Wedding_ForbidStranger, 0UL, 0UL);
+ }
+ }
+ }
+
+ private bool OnCloseClicked(IXUIButton iSp)
+ {
+ this.SetVisible(false, true);
+ return true;
+ }
+
+ private void ResetSendFlag()
+ {
+ foreach (List<InviteMemberInfo> list in XActivityInviteDocument.Doc.MemberInfos.Values)
+ {
+ foreach (InviteMemberInfo inviteMemberInfo in list)
+ {
+ inviteMemberInfo.bSent = false;
+ }
+ }
+ }
+
+ private bool OnAddFriendClicked(IXUIButton btn)
+ {
+ DlgBase<XFriendsView, XFriendsBehaviour>.singleton.RandomFriend();
+ this.SetVisible(false, true);
+ return true;
+ }
+
+ private void InitTabs()
+ {
+ this._tabs.Clear();
+ int num = 0;
+ foreach (object obj in base.uiBehaviour.Tabs)
+ {
+ Transform transform = (Transform)obj;
+ IXUICheckBox ixuicheckBox = transform.Find("Bg").GetComponent("XUICheckBox") as IXUICheckBox;
+ ixuicheckBox.ID = (ulong)((long)num);
+ ixuicheckBox.RegisterOnCheckEventHandler(new CheckBoxOnCheckEventHandler(this.RefreshItems));
+ num++;
+ this._tabs.Add(ixuicheckBox);
+ }
+ }
+
+ private void InitProperties()
+ {
+ base.uiBehaviour.WrapContent.RegisterItemUpdateEventHandler(new WrapItemUpdateEventHandler(this.WrapContentItemUpdated));
+ base.uiBehaviour.WrapContent.RegisterItemInitEventHandler(new WrapItemInitEventHandler(this.WrapContentItemInit));
+ base.uiBehaviour.Close.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnCloseClicked));
+ base.uiBehaviour.AllowStranger.RegisterOnCheckEventHandler(new CheckBoxOnCheckEventHandler(this.OnCheckAllowStranger));
+ }
+
+ private bool OnCheckAllowStranger(IXUICheckBox iXUICheckBox)
+ {
+ return true;
+ }
+
+ public void RefreshUI()
+ {
+ base.uiBehaviour.ListRedPoint.SetActive(XWeddingDocument.Doc.GetInviteRoleInfoList(WeddingInviteTab.WeddingApplyList).Count > 0);
+ base.uiBehaviour.AllowStranger.bChecked = XWeddingDocument.Doc.PermitStranger;
+ this._tabs[this._curTab].bChecked = true;
+ List<WeddingRoleInfo> inviteRoleInfoList = XWeddingDocument.Doc.GetInviteRoleInfoList(WeddingInviteTab.WeddingInvited);
+ int num = (XWeddingDocument.Doc.GetMyWeddingType() == WeddingType.WeddingType_Normal) ? XSingleton<XGlobalConfig>.singleton.GetInt("NormalWeddingInviteNum") : XSingleton<XGlobalConfig>.singleton.GetInt("LuxuryWeddingInviteNum");
+ base.uiBehaviour.InviteNum.SetText(inviteRoleInfoList.Count + "/" + num);
+ this.RefreshContent();
+ }
+
+ public bool RefreshItems(IXUICheckBox go)
+ {
+ bool bChecked = go.bChecked;
+ if (bChecked)
+ {
+ this._curTab = (int)go.ID;
+ this.RefreshContent();
+ }
+ return true;
+ }
+
+ private void WrapContentItemInit(Transform t, int index)
+ {
+ }
+
+ private void RefreshContent()
+ {
+ this._curList = XWeddingDocument.Doc.GetInviteRoleInfoList((WeddingInviteTab)this._curTab);
+ base.uiBehaviour.WrapContent.SetContentCount(this._curList.Count, false);
+ base.uiBehaviour.ScrollView.ResetPosition();
+ }
+
+ private void WrapContentItemUpdated(Transform t, int index)
+ {
+ bool flag = index < this._curList.Count;
+ if (flag)
+ {
+ WeddingRoleInfo weddingRoleInfo = this._curList[index];
+ IXUISprite ixuisprite = t.Find("head").GetComponent("XUISprite") as IXUISprite;
+ IXUISprite ixuisprite2 = t.Find("ProfIcon").GetComponent("XUISprite") as IXUISprite;
+ IXUILabelSymbol ixuilabelSymbol = t.Find("name").GetComponent("XUILabelSymbol") as IXUILabelSymbol;
+ IXUILabel ixuilabel = t.Find("name").GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel2 = t.Find("level").GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel3 = t.Find("PPT").GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel4 = t.Find("guild").GetComponent("XUILabel") as IXUILabel;
+ Transform transform = t.Find("friendFlag");
+ ixuilabel.SetText(weddingRoleInfo.name);
+ ixuisprite.spriteName = XSingleton<XProfessionSkillMgr>.singleton.GetProfHeadIcon2((int)weddingRoleInfo.profession);
+ ixuisprite2.spriteName = XSingleton<XProfessionSkillMgr>.singleton.GetProfIcon((int)weddingRoleInfo.profession);
+ ixuilabel3.SetText(weddingRoleInfo.ppt.ToString());
+ ixuilabel4.SetText(weddingRoleInfo.guildName);
+ ixuilabel2.SetText(weddingRoleInfo.level.ToString());
+ IXUIButton ixuibutton = t.Find("Invite").GetComponent("XUIButton") as IXUIButton;
+ ixuibutton.SetEnable(true, false);
+ ixuibutton.ID = weddingRoleInfo.roleID;
+ Transform transform2 = ixuibutton.gameObject.transform.Find("InviteText");
+ IXUILabel ixuilabel5 = ixuibutton.gameObject.transform.Find("ComedIn").GetComponent("XUILabel") as IXUILabel;
+ IXUIButton ixuibutton2 = t.Find("Agree").GetComponent("XUIButton") as IXUIButton;
+ IXUIButton ixuibutton3 = t.Find("Refuse").GetComponent("XUIButton") as IXUIButton;
+ ixuibutton2.ID = weddingRoleInfo.roleID;
+ ixuibutton3.ID = weddingRoleInfo.roleID;
+ transform.gameObject.SetActive(this._curTab == 0);
+ ixuilabel4.gameObject.SetActive(this._curTab == 1);
+ ixuibutton2.gameObject.SetActive(false);
+ ixuibutton3.gameObject.SetActive(false);
+ switch (this._curTab)
+ {
+ case 0:
+ case 1:
+ ixuibutton.gameObject.SetActive(true);
+ transform2.gameObject.SetActive(true);
+ ixuilabel5.gameObject.SetActive(false);
+ ixuibutton.RegisterClickEventHandler(new ButtonClickEventHandler(this.ToInviteToCome));
+ break;
+ case 2:
+ ixuibutton.gameObject.SetActive(true);
+ ixuibutton.RegisterClickEventHandler(new ButtonClickEventHandler(this.ClickToChat));
+ ixuibutton.SetEnable(!weddingRoleInfo.entered, false);
+ transform2.gameObject.SetActive(false);
+ ixuilabel5.gameObject.SetActive(true);
+ ixuilabel5.SetText(weddingRoleInfo.entered ? XSingleton<XStringTable>.singleton.GetString("WeddingAreadyCome") : XSingleton<XStringTable>.singleton.GetString("WeddingInvitedNotCome"));
+ break;
+ case 3:
+ ixuibutton2.gameObject.SetActive(true);
+ ixuibutton3.gameObject.SetActive(true);
+ ixuibutton2.RegisterClickEventHandler(new ButtonClickEventHandler(this.ClickToAgree));
+ ixuibutton3.RegisterClickEventHandler(new ButtonClickEventHandler(this.ClickToRefuse));
+ ixuibutton.gameObject.SetActive(false);
+ break;
+ }
+ }
+ }
+
+ private bool ClickToChat(IXUIButton button)
+ {
+ WeddingRoleInfo weddingRoleInfo = null;
+ for (int i = 0; i < this._curList.Count; i++)
+ {
+ bool flag = this._curList[i].roleID == button.ID;
+ if (flag)
+ {
+ weddingRoleInfo = this._curList[i];
+ break;
+ }
+ }
+ bool flag2 = weddingRoleInfo != null;
+ if (flag2)
+ {
+ DlgBase<XOtherPlayerInfoView, XOtherPlayerInfoBehaviour>.singleton.SetPlayerInfo(weddingRoleInfo.roleID, weddingRoleInfo.name, new List<uint>(), weddingRoleInfo.ppt, weddingRoleInfo.profession);
+ DlgBase<XOtherPlayerInfoView, XOtherPlayerInfoBehaviour>.singleton.PrivateChat(null);
+ }
+ return true;
+ }
+
+ private bool ClickToRefuse(IXUIButton button)
+ {
+ ulong id = button.ID;
+ XWeddingDocument.Doc.WeddingInviteOperate(WeddingInviteOperType.Wedding_DisagreeApply, id, 0UL);
+ return true;
+ }
+
+ private bool ClickToAgree(IXUIButton button)
+ {
+ ulong id = button.ID;
+ XWeddingDocument.Doc.WeddingInviteOperate(WeddingInviteOperType.Wedding_AgreeApply, id, 0UL);
+ return true;
+ }
+
+ private bool ToInviteToCome(IXUIButton button)
+ {
+ ulong id = button.ID;
+ XWeddingDocument.Doc.WeddingInviteOperate(WeddingInviteOperType.Wedding_Invite, id, XWeddingDocument.Doc.MyWeddingID);
+ return true;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/XWeddingInviteView.cs.meta b/Client/Assets/Scripts/XMainClient/UI/XWeddingInviteView.cs.meta
new file mode 100644
index 00000000..0f707235
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XWeddingInviteView.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 01a7e951980badc4f8e2fa38d8f18ce9
+timeCreated: 1611402954
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/XWeddingLitterBoyDramaOperate.cs b/Client/Assets/Scripts/XMainClient/UI/XWeddingLitterBoyDramaOperate.cs
new file mode 100644
index 00000000..317c7d48
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XWeddingLitterBoyDramaOperate.cs
@@ -0,0 +1,47 @@
+using System;
+using KKSG;
+using UILib;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class XWeddingLitterBoyDramaOperate : XDramaOperate
+ {
+ private XDramaOperateParam _param;
+
+ public override void ShowNpc(XNpc npc)
+ {
+ base.ShowNpc(npc);
+ this._param = XDataPool<XDramaOperateParam>.GetData();
+ this._param.Npc = npc;
+ string[] andSeparateValue = XSingleton<XGlobalConfig>.singleton.GetAndSeparateValue("WeddingFireworksCost", XGlobalConfig.SequenceSeparator);
+ uint num = uint.Parse(andSeparateValue[1]) * XWeddingDocument.Doc.AllAttendPlayerCount;
+ string text = "";
+ ItemList.RowData itemConf = XBagDocument.GetItemConf(int.Parse(andSeparateValue[0]));
+ bool flag = itemConf != null;
+ if (flag)
+ {
+ text = XSingleton<UiUtility>.singleton.ChooseProfString(itemConf.ItemName, 0u);
+ }
+ this._param.Text = string.Format(XStringDefineProxy.GetString("WeddingFireworksTip", new object[]
+ {
+ num,
+ text
+ }), new object[0]);
+ this._param.AppendButton(XStringDefineProxy.GetString(XStringDefine.COMMON_OK), new ButtonClickEventHandler(this.ToDoSomething), 0UL);
+ base._FireEvent(this._param);
+ }
+
+ private bool ToDoSomething(IXUIButton button)
+ {
+ bool flag = DlgBase<DramaDlg, DramaDlgBehaviour>.singleton.IsVisible();
+ if (flag)
+ {
+ DlgBase<DramaDlg, DramaDlgBehaviour>.singleton.SetVisible(false, true);
+ }
+ XWeddingDocument.Doc.WeddingSceneOperator(WeddingOperType.WeddingOper_Fireworks);
+ return true;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/XWeddingLitterBoyDramaOperate.cs.meta b/Client/Assets/Scripts/XMainClient/UI/XWeddingLitterBoyDramaOperate.cs.meta
new file mode 100644
index 00000000..e871347f
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XWeddingLitterBoyDramaOperate.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: ff0da60d27e286f478791055bbac1437
+timeCreated: 1611404945
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/XWeddingLitterGirlDramaOperate.cs b/Client/Assets/Scripts/XMainClient/UI/XWeddingLitterGirlDramaOperate.cs
new file mode 100644
index 00000000..433eef7a
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XWeddingLitterGirlDramaOperate.cs
@@ -0,0 +1,47 @@
+using System;
+using KKSG;
+using UILib;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class XWeddingLitterGirlDramaOperate : XDramaOperate
+ {
+ private XDramaOperateParam _param;
+
+ public override void ShowNpc(XNpc npc)
+ {
+ base.ShowNpc(npc);
+ this._param = XDataPool<XDramaOperateParam>.GetData();
+ this._param.Npc = npc;
+ string[] andSeparateValue = XSingleton<XGlobalConfig>.singleton.GetAndSeparateValue("WeddingFlowerCost", XGlobalConfig.SequenceSeparator);
+ uint num = uint.Parse(andSeparateValue[1]) * XWeddingDocument.Doc.AllAttendPlayerCount;
+ string text = "";
+ ItemList.RowData itemConf = XBagDocument.GetItemConf(int.Parse(andSeparateValue[0]));
+ bool flag = itemConf != null;
+ if (flag)
+ {
+ text = XSingleton<UiUtility>.singleton.ChooseProfString(itemConf.ItemName, 0u);
+ }
+ this._param.Text = string.Format(XStringDefineProxy.GetString("WeddingFlowerTip", new object[]
+ {
+ num,
+ text
+ }), new object[0]);
+ this._param.AppendButton(XStringDefineProxy.GetString(XStringDefine.COMMON_OK), new ButtonClickEventHandler(this.ToDoSomething), 0UL);
+ base._FireEvent(this._param);
+ }
+
+ private bool ToDoSomething(IXUIButton button)
+ {
+ bool flag = DlgBase<DramaDlg, DramaDlgBehaviour>.singleton.IsVisible();
+ if (flag)
+ {
+ DlgBase<DramaDlg, DramaDlgBehaviour>.singleton.SetVisible(false, true);
+ }
+ XWeddingDocument.Doc.WeddingSceneOperator(WeddingOperType.WeddingOper_Flower);
+ return true;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/XWeddingLitterGirlDramaOperate.cs.meta b/Client/Assets/Scripts/XMainClient/UI/XWeddingLitterGirlDramaOperate.cs.meta
new file mode 100644
index 00000000..ded6db62
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XWeddingLitterGirlDramaOperate.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 77d31b01b03b2e043b0aa689990bf3b3
+timeCreated: 1611403956
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/XWelfareDiamondHandler.cs b/Client/Assets/Scripts/XMainClient/UI/XWelfareDiamondHandler.cs
new file mode 100644
index 00000000..5fd8f5d1
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XWelfareDiamondHandler.cs
@@ -0,0 +1,257 @@
+using System;
+using System.Collections.Generic;
+using KKSG;
+using UILib;
+using UnityEngine;
+using XUpdater;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class XWelfareDiamondHandler : DlgHandlerBase
+ {
+ protected override string FileName
+ {
+ get
+ {
+ return "GameSystem/Welfare/DiamondFrame";
+ }
+ }
+
+ private IXUILabel m_Tip;
+
+ private GameObject m_WeeklyCard;
+
+ private GameObject m_MonthlyCard;
+
+ private IXUILabel m_RemainTime;
+
+ private IXUILabel m_RemainTimeName;
+
+ private int currLeftTime;
+
+ private uint _CDToken;
+
+ private const uint WEEKLY_CARD_TYPE = 1u;
+
+ private const uint MONTHLY_CARD_TYPE = 2u;
+
+ private List<uint> cardType = new List<uint>();
+
+ private List<PayCard> payInfo;
+
+ private Dictionary<uint, int> cardState = new Dictionary<uint, int>();
+
+ protected override void Init()
+ {
+ base.Init();
+ this.m_RemainTimeName = (base.PanelObject.transform.Find("LeftTimeName").GetComponent("XUILabel") as IXUILabel);
+ this.m_RemainTimeName.SetText(XSingleton<XStringTable>.singleton.GetString("PAY_CARD_LEFT_TIME_TITLE"));
+ this.m_RemainTime = (base.PanelObject.transform.Find("LeftTime").GetComponent("XUILabel") as IXUILabel);
+ this.m_Tip = (base.PanelObject.transform.Find("Tip").GetComponent("XUILabel") as IXUILabel);
+ this.m_Tip.SetText(XSingleton<XStringTable>.singleton.GetString("PAY_CARD_TIP"));
+ this.m_WeeklyCard = base.PanelObject.transform.Find("WeeklyCard/Tpl").gameObject;
+ this.m_MonthlyCard = base.PanelObject.transform.Find("MonthlyCard/Tpl").gameObject;
+ this.cardType.Clear();
+ this.cardType.Add(1u);
+ this.cardType.Add(2u);
+ }
+
+ protected override void OnHide()
+ {
+ base.OnHide();
+ IXUITexture ixuitexture = this.m_WeeklyCard.transform.Find("Icon").GetComponent("XUITexture") as IXUITexture;
+ bool flag = ixuitexture != null;
+ if (flag)
+ {
+ ixuitexture.SetTexturePath("");
+ }
+ ixuitexture = (this.m_MonthlyCard.transform.Find("Icon").GetComponent("XUITexture") as IXUITexture);
+ bool flag2 = ixuitexture != null;
+ if (flag2)
+ {
+ ixuitexture.SetTexturePath("");
+ }
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ IXUIButton ixuibutton = this.m_WeeklyCard.transform.Find("Btn").GetComponent("XUIButton") as IXUIButton;
+ ixuibutton.ID = 1UL;
+ ixuibutton.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnBuyBtnClicked));
+ IXUIButton ixuibutton2 = this.m_MonthlyCard.transform.Find("Btn").GetComponent("XUIButton") as IXUIButton;
+ ixuibutton2.ID = 2UL;
+ ixuibutton2.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnBuyBtnClicked));
+ }
+
+ private bool OnBuyBtnClicked(IXUIButton btn)
+ {
+ uint num = (uint)btn.ID;
+ int num2 = this.cardState[num];
+ bool flag = num2 == -1;
+ if (flag)
+ {
+ PayCardTable.RowData payCardConfig = XWelfareDocument.GetPayCardConfig(num);
+ XRechargeDocument specificDocument = XDocuments.GetSpecificDocument<XRechargeDocument>(XRechargeDocument.uuID);
+ bool flag2 = XSingleton<XUpdater.XUpdater>.singleton.XPlatform.Platfrom() == XPlatformType.Android;
+ if (flag2)
+ {
+ specificDocument.SDKSubscribe(payCardConfig.Price, 1, payCardConfig.ServiceCode, payCardConfig.Name, payCardConfig.ParamID, PayParamType.PAY_PARAM_CARD);
+ }
+ else
+ {
+ bool flag3 = XSingleton<XUpdater.XUpdater>.singleton.XPlatform.Platfrom() == XPlatformType.IOS;
+ if (flag3)
+ {
+ int buyNum = (num == 1u) ? 7 : 30;
+ specificDocument.SDKSubscribe(payCardConfig.Price, buyNum, payCardConfig.ServiceCode, payCardConfig.Name, payCardConfig.ParamID, PayParamType.PAY_PARAM_CARD);
+ }
+ }
+ }
+ else
+ {
+ XWelfareDocument specificDocument2 = XDocuments.GetSpecificDocument<XWelfareDocument>(XWelfareDocument.uuID);
+ specificDocument2.GetCardDailyDiamond(num);
+ }
+ return true;
+ }
+
+ public override void RefreshData()
+ {
+ XWelfareDocument specificDocument = XDocuments.GetSpecificDocument<XWelfareDocument>(XWelfareDocument.uuID);
+ this.payInfo = specificDocument.PayCardInfo;
+ uint payCardRemainTime = specificDocument.PayCardRemainTime;
+ this.cardState.Clear();
+ bool flag = this.payInfo == null;
+ if (!flag)
+ {
+ this.RefreshRemainTime(this.payInfo, payCardRemainTime);
+ for (int i = 0; i < this.cardType.Count; i++)
+ {
+ bool flag2 = false;
+ int num = 0;
+ for (int j = 0; j < this.payInfo.Count; j++)
+ {
+ bool flag3 = (this.cardType[i] == this.payInfo[j].type && this.payInfo[j].remainedCount > 0u) || (this.cardType[i] == this.payInfo[j].type && this.payInfo[j].isGet);
+ if (flag3)
+ {
+ flag2 = true;
+ num = j;
+ break;
+ }
+ }
+ bool flag4 = this.cardType[i] == 1u;
+ if (flag4)
+ {
+ this.RefreshCard(this.m_WeeklyCard, this.cardType[i], flag2 ? num : -1);
+ }
+ else
+ {
+ bool flag5 = this.cardType[i] == 2u;
+ if (flag5)
+ {
+ this.RefreshCard(this.m_MonthlyCard, this.cardType[i], flag2 ? num : -1);
+ }
+ }
+ }
+ }
+ }
+
+ private void RefreshRemainTime(List<PayCard> payInfo, uint remainTime)
+ {
+ bool flag = false;
+ bool flag2 = false;
+ bool flag3 = false;
+ for (int i = 0; i < payInfo.Count; i++)
+ {
+ bool flag4 = !payInfo[i].isGet && payInfo[i].remainedCount > 0u;
+ if (flag4)
+ {
+ flag2 = true;
+ }
+ bool flag5 = payInfo[i].isGet && payInfo[i].remainedCount > 0u;
+ if (flag5)
+ {
+ flag3 = true;
+ }
+ }
+ bool flag6 = !flag2 && flag3;
+ if (flag6)
+ {
+ flag = true;
+ }
+ this.m_RemainTime.gameObject.SetActive(flag);
+ this.m_RemainTimeName.gameObject.SetActive(flag);
+ bool flag7 = flag;
+ if (flag7)
+ {
+ this.currLeftTime = (int)remainTime;
+ this.m_RemainTime.SetText(XSingleton<UiUtility>.singleton.TimeFormatString((int)remainTime, 3, 3, 4, false, true));
+ XSingleton<XTimerMgr>.singleton.KillTimer(this._CDToken);
+ this._CDToken = XSingleton<XTimerMgr>.singleton.SetTimer(1f, new XTimerMgr.ElapsedEventHandler(this.LeftTimeUpdate), null);
+ }
+ }
+
+ private void LeftTimeUpdate(object o)
+ {
+ this.currLeftTime--;
+ bool flag = this.currLeftTime < 0;
+ if (flag)
+ {
+ this.m_RemainTime.gameObject.SetActive(false);
+ this.m_RemainTimeName.gameObject.SetActive(false);
+ }
+ else
+ {
+ this.m_RemainTime.SetText(XSingleton<UiUtility>.singleton.TimeFormatString(this.currLeftTime, 3, 3, 4, false, true));
+ XSingleton<XTimerMgr>.singleton.KillTimer(this._CDToken);
+ this._CDToken = XSingleton<XTimerMgr>.singleton.SetTimer(1f, new XTimerMgr.ElapsedEventHandler(this.LeftTimeUpdate), null);
+ }
+ }
+
+ private void RefreshCard(GameObject card, uint cardType, int index)
+ {
+ bool flag = this.payInfo == null;
+ if (!flag)
+ {
+ PayCard payCard = (index == -1) ? null : this.payInfo[index];
+ this.cardState.Add(cardType, index);
+ IXUILabel ixuilabel = card.transform.Find("Title").GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel2 = card.transform.Find("tip1").GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel3 = card.transform.Find("tip2").GetComponent("XUILabel") as IXUILabel;
+ IXUIButton ixuibutton = card.transform.Find("Btn").GetComponent("XUIButton") as IXUIButton;
+ IXUILabel ixuilabel4 = card.transform.Find("Btn/T").GetComponent("XUILabel") as IXUILabel;
+ IXUISprite ixuisprite = card.transform.Find("HasGot").GetComponent("XUISprite") as IXUISprite;
+ IXUITexture ixuitexture = card.transform.Find("Icon").GetComponent("XUITexture") as IXUITexture;
+ ixuitexture.SetTexturePath(XWelfareDocument.GetPayCardConfig(cardType).Icon);
+ IXUISprite ixuisprite2 = card.transform.Find("Btn/redpoint").GetComponent("XUISprite") as IXUISprite;
+ bool flag2 = payCard != null;
+ if (flag2)
+ {
+ ixuilabel2.gameObject.SetActive(false);
+ ixuilabel.SetText(string.Format(XSingleton<XStringTable>.singleton.GetString("PAY_CARD_LEFT_TIMES"), payCard.remainedCount));
+ int dayAward = XWelfareDocument.GetPayCardConfig(payCard.type).DayAward;
+ ixuilabel3.SetText(payCard.isGet ? string.Format(XSingleton<XStringTable>.singleton.GetString("PAY_CARD_HAS_GOT"), dayAward) : string.Format(XSingleton<XStringTable>.singleton.GetString("PAY_CARD_CAN_GET"), dayAward));
+ ixuilabel4.SetText(XSingleton<XStringTable>.singleton.GetString("PAY_GOT_TEX"));
+ ixuibutton.SetVisible(!payCard.isGet);
+ ixuisprite2.gameObject.SetActive(!payCard.isGet);
+ ixuisprite.gameObject.SetActive(payCard.isGet);
+ }
+ else
+ {
+ ixuilabel2.gameObject.SetActive(true);
+ ixuilabel.SetText(string.Format(XSingleton<XStringTable>.singleton.GetString("PAY_CARD_TITLE"), XWelfareDocument.GetPayCardConfig(cardType).Name));
+ ixuilabel2.SetText(string.Format(XSingleton<XStringTable>.singleton.GetString("PAY_CARD_TIP_1"), XWelfareDocument.GetPayCardConfig(cardType).Diamond));
+ int num = (cardType == 1u) ? 7 : 30;
+ ixuilabel3.SetText(string.Format(XSingleton<XStringTable>.singleton.GetString("PAY_CARD_TIP_2"), num, XWelfareDocument.GetPayCardConfig(cardType).DayAward));
+ float num2 = (float)XWelfareDocument.GetPayCardConfig(cardType).Price / 100f;
+ ixuilabel4.SetText(string.Format(XSingleton<XStringTable>.singleton.GetString("PAY_BUY_TEX"), num2));
+ ixuibutton.SetVisible(true);
+ ixuisprite2.gameObject.SetActive(false);
+ ixuisprite.gameObject.SetActive(false);
+ }
+ }
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/XWelfareDiamondHandler.cs.meta b/Client/Assets/Scripts/XMainClient/UI/XWelfareDiamondHandler.cs.meta
new file mode 100644
index 00000000..4be1655f
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XWelfareDiamondHandler.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: dc5ca9dd42a6410419bd1ba66c35666c
+timeCreated: 1611404678
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/XWelfareGiftBagHandler.cs b/Client/Assets/Scripts/XMainClient/UI/XWelfareGiftBagHandler.cs
new file mode 100644
index 00000000..105bacb2
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XWelfareGiftBagHandler.cs
@@ -0,0 +1,342 @@
+using System;
+using System.Collections.Generic;
+using KKSG;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class XWelfareGiftBagHandler : DlgHandlerBase
+ {
+ protected override string FileName
+ {
+ get
+ {
+ return "GameSystem/Welfare/GiftBagFrame";
+ }
+ }
+
+ private XUIPool m_GiftBagPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ private XUIPool m_ItemPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ private IXUIList m_GiftList;
+
+ private IXUILabel m_LeftTime;
+
+ private IXUILabel m_LeftTimeName;
+
+ private int currLeftTime;
+
+ private uint _CDToken;
+
+ private IXUISprite m_GiftBoxClosed;
+
+ private IXUISprite m_GiftBoxOpened;
+
+ private GameObject m_DefaultBg;
+
+ private GameObject m_BackFlowBg;
+
+ protected override void Init()
+ {
+ base.Init();
+ Transform transform = base.PanelObject.transform.Find("ListGiftBag/Grid/Tpl/List/ItemTpl");
+ this.m_ItemPool.SetupPool(transform.parent.gameObject, transform.gameObject, 6u, false);
+ Transform transform2 = base.PanelObject.transform.Find("ListGiftBag/Grid/Tpl");
+ this.m_GiftBagPool.SetupPool(transform2.parent.parent.gameObject, transform2.gameObject, 3u, false);
+ this.m_GiftList = (base.PanelObject.transform.Find("ListGiftBag/Grid").GetComponent("XUIList") as IXUIList);
+ this.m_LeftTime = (base.PanelObject.transform.Find("LeftTime").GetComponent("XUILabel") as IXUILabel);
+ this.m_LeftTimeName = (base.PanelObject.transform.Find("LeftTimeName").GetComponent("XUILabel") as IXUILabel);
+ this.m_LeftTimeName.SetText(XSingleton<XStringTable>.singleton.GetString("PAY_GIFTBAG_LEFT_TIME_TITLE"));
+ this.m_GiftBoxClosed = (base.PanelObject.transform.Find("DailyGift1").GetComponent("XUISprite") as IXUISprite);
+ this.m_GiftBoxOpened = (base.PanelObject.transform.Find("DailyGift2").GetComponent("XUISprite") as IXUISprite);
+ this.m_DefaultBg = base.PanelObject.transform.Find("Bg0").gameObject;
+ this.m_BackFlowBg = base.PanelObject.transform.Find("Bg1").gameObject;
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ this.m_GiftBoxClosed.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnClosedBoxClicked));
+ this.m_GiftBoxOpened.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnOpenedBoxClicked));
+ }
+
+ private void OnClosedBoxClicked(IXUISprite sp)
+ {
+ XWelfareDocument specificDocument = XDocuments.GetSpecificDocument<XWelfareDocument>(XWelfareDocument.uuID);
+ specificDocument.GetLittleGiftBag();
+ }
+
+ private void OnOpenedBoxClicked(IXUISprite sp)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XSingleton<XStringTable>.singleton.GetString("PAY_GIFTBAG_GIFT_HAVE_GOT"), "fece00");
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ bool flag = XSingleton<XGameSysMgr>.singleton.IsSystemOpened(XSysDefine.Xsys_Backflow);
+ this.m_DefaultBg.SetActive(!flag);
+ this.m_BackFlowBg.SetActive(flag);
+ }
+
+ protected override void OnHide()
+ {
+ base.OnHide();
+ XSingleton<XTimerMgr>.singleton.KillTimer(this._CDToken);
+ }
+
+ public override void RefreshData()
+ {
+ XSingleton<XDebug>.singleton.AddLog("Pay GiftBagHandler [RefreshData]", null, null, null, null, null, XDebugColor.XDebug_None);
+ XWelfareDocument specificDocument = XDocuments.GetSpecificDocument<XWelfareDocument>(XWelfareDocument.uuID);
+ PayAileen payGiftBagInfo = specificDocument.PayGiftBagInfo;
+ bool flag = payGiftBagInfo == null;
+ if (!flag)
+ {
+ this.currLeftTime = (int)payGiftBagInfo.remainedTime;
+ this.m_LeftTime.gameObject.SetActive(this.currLeftTime > 0);
+ this.m_LeftTimeName.gameObject.SetActive(this.currLeftTime > 0);
+ bool flag2 = this.currLeftTime > 0;
+ if (flag2)
+ {
+ this.m_LeftTime.SetText(XSingleton<UiUtility>.singleton.TimeFormatString((int)payGiftBagInfo.remainedTime, 3, 3, 4, false, true));
+ XSingleton<XTimerMgr>.singleton.KillTimer(this._CDToken);
+ this._CDToken = XSingleton<XTimerMgr>.singleton.SetTimer(1f, new XTimerMgr.ElapsedEventHandler(this.LeftTimeUpdate), null);
+ }
+ List<PayAileenInfo> aileenInfo = payGiftBagInfo.AileenInfo;
+ aileenInfo.Sort(new Comparison<PayAileenInfo>(XWelfareGiftBagHandler.GiftInfoCompare));
+ this.m_GiftBagPool.FakeReturnAll();
+ this.m_ItemPool.FakeReturnAll();
+ for (int i = 0; i < aileenInfo.Count; i++)
+ {
+ GameObject gameObject = this.m_GiftBagPool.FetchGameObject(false);
+ gameObject.transform.parent = this.m_GiftList.gameObject.transform;
+ gameObject.transform.localScale = Vector3.one;
+ this.SetGiftBagInfo(gameObject, aileenInfo[i]);
+ }
+ this.m_GiftList.Refresh();
+ this.m_GiftBagPool.ActualReturnAll(false);
+ this.m_ItemPool.ActualReturnAll(false);
+ this.m_GiftBoxClosed.SetVisible(specificDocument.RewardLittleGiftBag == 0u);
+ this.m_GiftBoxOpened.SetVisible(specificDocument.RewardLittleGiftBag > 0u);
+ }
+ }
+
+ private static int GiftInfoCompare(PayAileenInfo info1, PayAileenInfo info2)
+ {
+ XWelfareDocument specificDocument = XDocuments.GetSpecificDocument<XWelfareDocument>(XWelfareDocument.uuID);
+ PayAileenTable.RowData giftBagTableData = XWelfareDocument.GetGiftBagTableData(info1.paramID, specificDocument.PayGiftBagInfo.weekDays);
+ PayAileenTable.RowData giftBagTableData2 = XWelfareDocument.GetGiftBagTableData(info2.paramID, specificDocument.PayGiftBagInfo.weekDays);
+ bool flag = giftBagTableData != null && giftBagTableData2 != null;
+ int result;
+ if (flag)
+ {
+ result = giftBagTableData.Price - giftBagTableData2.Price;
+ }
+ else
+ {
+ result = 0;
+ }
+ return result;
+ }
+
+ private void LeftTimeUpdate(object o)
+ {
+ this.currLeftTime--;
+ bool flag = this.currLeftTime < 0;
+ if (flag)
+ {
+ this.m_LeftTime.gameObject.SetActive(false);
+ this.m_LeftTimeName.gameObject.SetActive(false);
+ }
+ else
+ {
+ this.m_LeftTime.SetText(XSingleton<UiUtility>.singleton.TimeFormatString(this.currLeftTime, 3, 3, 4, false, true));
+ XSingleton<XTimerMgr>.singleton.KillTimer(this._CDToken);
+ this._CDToken = XSingleton<XTimerMgr>.singleton.SetTimer(1f, new XTimerMgr.ElapsedEventHandler(this.LeftTimeUpdate), null);
+ }
+ }
+
+ private void SetGiftBagInfo(GameObject item, PayAileenInfo info)
+ {
+ XSingleton<XDebug>.singleton.AddLog("Pay GiftBagHandler [SetGiftBagInfo]", null, null, null, null, null, XDebugColor.XDebug_None);
+ XWelfareDocument specificDocument = XDocuments.GetSpecificDocument<XWelfareDocument>(XWelfareDocument.uuID);
+ PayAileenTable.RowData giftBagTableData = XWelfareDocument.GetGiftBagTableData(info.paramID, specificDocument.PayGiftBagInfo.weekDays);
+ bool flag = giftBagTableData == null;
+ if (!flag)
+ {
+ XSingleton<XDebug>.singleton.AddLog("Pay GiftBagHandler [SetGiftBagInfo] 1", null, null, null, null, null, XDebugColor.XDebug_None);
+ IXUISprite ixuisprite = item.transform.Find("PayMember").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.SetVisible(giftBagTableData.MemberLimit > 0);
+ ixuisprite.SetSprite(specificDocument.GetMemberPrivilegeIcon((MemberPrivilege)giftBagTableData.MemberLimit));
+ float num = (float)giftBagTableData.Price / 100f;
+ IXUILabel ixuilabel = item.transform.Find("Tip").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel.SetText(giftBagTableData.Desc);
+ IXUIList ixuilist = item.transform.Find("List").GetComponent("XUIList") as IXUIList;
+ XLevelSealDocument specificDocument2 = XDocuments.GetSpecificDocument<XLevelSealDocument>(XLevelSealDocument.uuID);
+ uint sealType = specificDocument2.GetSealType();
+ int giftBagID = this.GetGiftBagID(giftBagTableData, sealType);
+ ChestList.RowData chestConf = XBagDocument.GetChestConf(giftBagID);
+ bool flag2 = chestConf != null;
+ if (flag2)
+ {
+ uint[] dropID = chestConf.DropID;
+ bool flag3 = dropID != null;
+ if (flag3)
+ {
+ foreach (uint field in dropID)
+ {
+ int num2;
+ int num3;
+ CVSReader.GetRowDataListByField<DropList.RowData, int>(XBagDocument.DropTable.Table, (int)field, out num2, out num3, XBagDocument.comp);
+ bool flag4 = num2 < 0;
+ if (!flag4)
+ {
+ for (int j = num2; j <= num3; j++)
+ {
+ DropList.RowData rowData = XBagDocument.DropTable.Table[j];
+ GameObject gameObject = this.m_ItemPool.FetchGameObject(false);
+ gameObject.transform.parent = ixuilist.gameObject.transform;
+ XSingleton<XItemDrawerMgr>.singleton.normalItemDrawer.DrawItem(gameObject, rowData.ItemID, rowData.ItemCount, true);
+ IXUISprite ixuisprite2 = gameObject.transform.Find("Icon").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite2.ID = (ulong)((long)rowData.ItemID);
+ ixuisprite2.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(XSingleton<UiUtility>.singleton.OnItemClick));
+ }
+ }
+ }
+ }
+ }
+ ixuilist.Refresh();
+ IXUILabel ixuilabel2 = item.transform.Find("Btn/T").GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel3 = item.transform.Find("Owned").GetComponent("XUILabel") as IXUILabel;
+ IXUIButton ixuibutton = item.transform.Find("Btn").GetComponent("XUIButton") as IXUIButton;
+ ixuibutton.ID = (ulong)((long)XWelfareDocument.GetGiftBagTableIndex(info.paramID));
+ ixuibutton.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnGiftBagBtnClicked));
+ XSingleton<XDebug>.singleton.AddLog("Pay GiftBagHandler [SetGiftBagInfo] isbuy = " + info.isBuy.ToString(), null, null, null, null, null, XDebugColor.XDebug_None);
+ bool isBuy = info.isBuy;
+ if (isBuy)
+ {
+ ixuibutton.SetVisible(false);
+ ixuilabel3.SetVisible(true);
+ ixuilabel3.SetText(XSingleton<XStringTable>.singleton.GetString("PAY_HAS_GOT"));
+ }
+ else
+ {
+ ixuibutton.SetVisible(true);
+ ixuilabel3.SetVisible(false);
+ ixuilabel2.SetText(string.Format(XSingleton<XStringTable>.singleton.GetString("PAY_BUY_TEX"), num));
+ ixuibutton.SetEnable(true, false);
+ }
+ }
+ }
+
+ private bool OnGiftBagIconClicked(IXUIButton btn)
+ {
+ int itemID = (int)btn.ID;
+ XSingleton<UiUtility>.singleton.ShowTooltipDialog(itemID, null);
+ return true;
+ }
+
+ private bool OnGiftBagBtnClicked(IXUIButton btn)
+ {
+ int num = (int)btn.ID;
+ bool flag = num == -1 || num >= XWelfareDocument.AileenTable.Table.Length;
+ bool result;
+ if (flag)
+ {
+ result = false;
+ }
+ else
+ {
+ PayAileenTable.RowData rowData = XWelfareDocument.AileenTable.Table[num];
+ XWelfareDocument specificDocument = XDocuments.GetSpecificDocument<XWelfareDocument>(XWelfareDocument.uuID);
+ bool flag2 = (ulong)specificDocument.VipLevel < (ulong)((long)rowData.VipLimit);
+ if (flag2)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(string.Format(XSingleton<XStringTable>.singleton.GetString("PAY_GIFT_BAG_VIP_LIMIT"), rowData.VipLimit), "fece00");
+ result = false;
+ }
+ else
+ {
+ bool flag3 = rowData.MemberLimit > 0;
+ if (flag3)
+ {
+ bool flag4 = !specificDocument.IsOwnMemberPrivilege((MemberPrivilege)rowData.MemberLimit);
+ if (flag4)
+ {
+ PayMemberTable.RowData memberPrivilegeConfig = specificDocument.GetMemberPrivilegeConfig((MemberPrivilege)rowData.MemberLimit);
+ bool flag5 = memberPrivilegeConfig == null;
+ if (flag5)
+ {
+ return false;
+ }
+ XSingleton<UiUtility>.singleton.ShowModalDialog(XStringDefineProxy.GetString("PAY_GIFTBAG_PAYMEMBER_LIMIT", new object[]
+ {
+ memberPrivilegeConfig.Name
+ }), XStringDefineProxy.GetString("COMMON_OK"), XStringDefineProxy.GetString("COMMON_CANCEL"), new ButtonClickEventHandler(this.GoToKingdomPrivilege));
+ return false;
+ }
+ }
+ XRechargeDocument specificDocument2 = XDocuments.GetSpecificDocument<XRechargeDocument>(XRechargeDocument.uuID);
+ specificDocument2.SDKSubscribe(rowData.Price, 1, rowData.ServiceCode, rowData.Name, rowData.ParamID, PayParamType.PAY_PARAM_AILEEN);
+ result = true;
+ }
+ }
+ return result;
+ }
+
+ private bool GoToKingdomPrivilege(IXUIButton btn)
+ {
+ DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.SetVisible(false, true);
+ XWelfareDocument specificDocument = XDocuments.GetSpecificDocument<XWelfareDocument>(XWelfareDocument.uuID);
+ bool flag = !specificDocument.IsSystemAvailable(XSysDefine.XSys_Welfare_KingdomPrivilege);
+ bool result;
+ if (flag)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XSingleton<XStringTable>.singleton.GetString("PAY_KINGDOM_NOT_OPEN"), "fece00");
+ result = true;
+ }
+ else
+ {
+ DlgBase<XWelfareView, XWelfareBehaviour>.singleton.SelectTab(XSysDefine.XSys_Welfare_KingdomPrivilege);
+ result = true;
+ }
+ return result;
+ }
+
+ private int GetGiftBagID(PayAileenTable.RowData info, uint sealType)
+ {
+ int[] levelSealGiftID = info.LevelSealGiftID;
+ int num = (int)(sealType - 1u);
+ bool flag = levelSealGiftID != null && num < levelSealGiftID.Length && num >= 0;
+ int result;
+ if (flag)
+ {
+ result = levelSealGiftID[num];
+ }
+ else
+ {
+ result = 0;
+ }
+ return result;
+ }
+
+ public void ResetGiftBagBtnCD(int interval)
+ {
+ bool flag = !base.IsVisible();
+ if (!flag)
+ {
+ IXUIButton ixuibutton = base.PanelObject.transform.Find("ListGiftBag/Grid/item0/Btn").GetComponent("XUIButton") as IXUIButton;
+ IXUIButton ixuibutton2 = base.PanelObject.transform.Find("ListGiftBag/Grid/item1/Btn").GetComponent("XUIButton") as IXUIButton;
+ IXUIButton ixuibutton3 = base.PanelObject.transform.Find("ListGiftBag/Grid/item2/Btn").GetComponent("XUIButton") as IXUIButton;
+ ixuibutton.SetUnavailableCD(interval);
+ ixuibutton2.SetUnavailableCD(interval);
+ ixuibutton3.SetUnavailableCD(interval);
+ }
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/XWelfareGiftBagHandler.cs.meta b/Client/Assets/Scripts/XMainClient/UI/XWelfareGiftBagHandler.cs.meta
new file mode 100644
index 00000000..0924380f
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XWelfareGiftBagHandler.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: ef09890599fdd8447af1feaa413075ce
+timeCreated: 1611404802
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/XWelfareGrowthFundHandler.cs b/Client/Assets/Scripts/XMainClient/UI/XWelfareGrowthFundHandler.cs
new file mode 100644
index 00000000..2e22245e
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XWelfareGrowthFundHandler.cs
@@ -0,0 +1,138 @@
+using System;
+using System.Collections.Generic;
+using KKSG;
+using UILib;
+using UnityEngine;
+using XUpdater;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class XWelfareGrowthFundHandler : DlgHandlerBase
+ {
+ protected override string FileName
+ {
+ get
+ {
+ return "GameSystem/Welfare/GrowthFund";
+ }
+ }
+
+ private IXUIScrollView m_ScrollView;
+
+ private IXUIList m_ItemGrid;
+
+ private List<WelfareGrowthFundItem> m_ItemList;
+
+ private Transform m_ItemTemp;
+
+ private IXUISprite m_hasBuySprite;
+
+ private IXUIButton m_rechargeBtn;
+
+ private XWelfareDocument _Doc;
+
+ protected override void Init()
+ {
+ base.Init();
+ this._Doc = XDocuments.GetSpecificDocument<XWelfareDocument>(XWelfareDocument.uuID);
+ this.m_ScrollView = (base.FindInChild("XUIScrollView", "ScrollView") as IXUIScrollView);
+ this.m_ItemGrid = (base.FindInChild("XUIList", "ScrollView/Grid") as IXUIList);
+ this.m_ItemTemp = base.FindChild("ScrollView/Grid/ItemTpl");
+ this.m_ItemTemp.gameObject.SetActive(false);
+ this.m_rechargeBtn = (base.FindInChild("XUIButton", "ScrollView/Grid/Recharge/Recharge") as IXUIButton);
+ this.m_hasBuySprite = (base.FindInChild("XUISprite", "ScrollView/Grid/Recharge/HasBuy") as IXUISprite);
+ this.m_rechargeBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnClickRechargeHandler));
+ this.InitWelfreGrowthList();
+ }
+
+ private bool OnClickRechargeHandler(IXUIButton btn)
+ {
+ RechargeTable.RowData rowData;
+ bool flag = this._Doc.TryGetGrowthFundConf(XSysDefine.XSys_Welfare_StarFund, out rowData);
+ if (flag)
+ {
+ XRechargeDocument specificDocument = XDocuments.GetSpecificDocument<XRechargeDocument>(XRechargeDocument.uuID);
+ bool flag2 = XSingleton<XUpdater.XUpdater>.singleton.XPlatform.Platfrom() == XPlatformType.Android;
+ if (flag2)
+ {
+ specificDocument.SDKSubscribe(rowData.Price, 1, rowData.ServiceCode, rowData.Name, rowData.ParamID, PayParamType.PAY_PARAM_GROWTH_FUND);
+ }
+ else
+ {
+ bool flag3 = XSingleton<XUpdater.XUpdater>.singleton.XPlatform.Platfrom() == XPlatformType.IOS;
+ if (flag3)
+ {
+ int @int = XSingleton<XGlobalConfig>.singleton.GetInt("WelfareGrowthFundDays");
+ specificDocument.SDKSubscribe(rowData.Price, @int, rowData.ServiceCode, rowData.Name, rowData.ParamID, PayParamType.PAY_PARAM_GROWTH_FUND);
+ }
+ }
+ }
+ return true;
+ }
+
+ private void InitWelfreGrowthList()
+ {
+ this.m_ItemList = new List<WelfareGrowthFundItem>();
+ RechargeTable.RowData rowData;
+ bool flag = this._Doc.TryGetGrowthFundConf(XSysDefine.XSys_Welfare_StarFund, out rowData);
+ if (flag)
+ {
+ WelfareGrowthFundItem welfareGrowthFundItem = this.CreateGrowthFundItem();
+ welfareGrowthFundItem.Set(0, 0, rowData.Diamond);
+ int i = 0;
+ int count = rowData.RoleLevels.Count;
+ while (i < count)
+ {
+ welfareGrowthFundItem = this.CreateGrowthFundItem();
+ welfareGrowthFundItem.Set(1, rowData.RoleLevels[i, 0], rowData.RoleLevels[i, 1]);
+ i++;
+ }
+ i = 0;
+ count = rowData.LoginDays.Count;
+ while (i < count)
+ {
+ welfareGrowthFundItem = this.CreateGrowthFundItem();
+ welfareGrowthFundItem.Set(2, rowData.LoginDays[i, 0], rowData.LoginDays[i, 1]);
+ i++;
+ }
+ }
+ }
+
+ private WelfareGrowthFundItem CreateGrowthFundItem()
+ {
+ GameObject gameObject = XCommon.Instantiate<GameObject>(this.m_ItemTemp.gameObject);
+ gameObject.transform.parent = this.m_ItemGrid.gameObject.transform;
+ gameObject.transform.localScale = Vector2.one;
+ gameObject.name = this.m_ItemList.Count.ToString();
+ WelfareGrowthFundItem welfareGrowthFundItem = new WelfareGrowthFundItem();
+ gameObject.SetActive(true);
+ welfareGrowthFundItem.Init(gameObject.transform);
+ this.m_ItemList.Add(welfareGrowthFundItem);
+ return welfareGrowthFundItem;
+ }
+
+ public override void RefreshData()
+ {
+ base.RefreshData();
+ this.RefreshRechargeHandler();
+ bool flag = this.m_ItemList == null;
+ if (!flag)
+ {
+ int i = 0;
+ int count = this.m_ItemList.Count;
+ while (i < count)
+ {
+ this.m_ItemList[i].Refresh();
+ i++;
+ }
+ }
+ }
+
+ private void RefreshRechargeHandler()
+ {
+ this.m_rechargeBtn.SetVisible(!this._Doc.HasBuyGrowthFund);
+ this.m_hasBuySprite.SetVisible(this._Doc.HasBuyGrowthFund);
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/XWelfareGrowthFundHandler.cs.meta b/Client/Assets/Scripts/XMainClient/UI/XWelfareGrowthFundHandler.cs.meta
new file mode 100644
index 00000000..5dd211c1
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XWelfareGrowthFundHandler.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: c73504253f9142444814f6fb4655a982
+timeCreated: 1611404529
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/XWelfareKingdomPrivilegeDetailBehaviour.cs b/Client/Assets/Scripts/XMainClient/UI/XWelfareKingdomPrivilegeDetailBehaviour.cs
new file mode 100644
index 00000000..f17daeff
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XWelfareKingdomPrivilegeDetailBehaviour.cs
@@ -0,0 +1,34 @@
+using System;
+using UILib;
+using XMainClient.UI.UICommon;
+
+namespace XMainClient.UI
+{
+ internal class XWelfareKingdomPrivilegeDetailBehaviour : DlgBehaviourBase
+ {
+ public IXUILabel m_Title;
+
+ public IXUIScrollView m_ScrollView;
+
+ public IXUILabel m_Content;
+
+ public IXUIButton m_Close;
+
+ public IXUITexture m_Icon;
+
+ public IXUILabel m_Name;
+
+ public IXUILabel m_Notice;
+
+ private void Awake()
+ {
+ this.m_Title = (base.transform.Find("Title").GetComponent("XUILabel") as IXUILabel);
+ this.m_ScrollView = (base.transform.Find("ScrollView").GetComponent("XUIScrollView") as IXUIScrollView);
+ this.m_Content = (base.transform.Find("ScrollView/Content").GetComponent("XUILabel") as IXUILabel);
+ this.m_Close = (base.transform.Find("Btn").GetComponent("XUIButton") as IXUIButton);
+ this.m_Icon = (base.transform.Find("Texture").GetComponent("XUITexture") as IXUITexture);
+ this.m_Name = (base.transform.Find("Name").GetComponent("XUILabel") as IXUILabel);
+ this.m_Notice = (base.transform.Find("Notice").GetComponent("XUILabel") as IXUILabel);
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/XWelfareKingdomPrivilegeDetailBehaviour.cs.meta b/Client/Assets/Scripts/XMainClient/UI/XWelfareKingdomPrivilegeDetailBehaviour.cs.meta
new file mode 100644
index 00000000..60b4e242
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XWelfareKingdomPrivilegeDetailBehaviour.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: ac029eaefd8484f4fb606826d88fa662
+timeCreated: 1611404309
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/XWelfareKingdomPrivilegeDetailView.cs b/Client/Assets/Scripts/XMainClient/UI/XWelfareKingdomPrivilegeDetailView.cs
new file mode 100644
index 00000000..1c8804e6
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XWelfareKingdomPrivilegeDetailView.cs
@@ -0,0 +1,75 @@
+using System;
+using UILib;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class XWelfareKingdomPrivilegeDetailView : DlgBase<XWelfareKingdomPrivilegeDetailView, XWelfareKingdomPrivilegeDetailBehaviour>
+ {
+ public override bool autoload
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override string fileName
+ {
+ get
+ {
+ return "GameSystem/Welfare/KingdomPrivilegeDetail";
+ }
+ }
+
+ public override bool isHideTutorial
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override bool isPopup
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public void ShowDetail(PayMemberTable.RowData info, bool showDetail = true)
+ {
+ bool flag = !base.IsVisible();
+ if (flag)
+ {
+ this.SetVisibleWithAnimation(true, null);
+ }
+ base.uiBehaviour.m_Title.SetText(info.Name);
+ base.uiBehaviour.m_Content.SetText(info.Detail.Replace("|", "\n"));
+ base.uiBehaviour.m_Icon.SetTexturePath(info.Icon);
+ base.uiBehaviour.m_Name.SetVisible(showDetail);
+ base.uiBehaviour.m_Notice.SetVisible(!showDetail);
+ base.uiBehaviour.m_Notice.SetText(XSingleton<UiUtility>.singleton.ReplaceReturn(info.BuyNtf));
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ base.uiBehaviour.m_Close.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnCloseBtnClicked));
+ }
+
+ protected override void OnHide()
+ {
+ base.OnHide();
+ base.uiBehaviour.m_Icon.SetTexturePath("");
+ }
+
+ private bool OnCloseBtnClicked(IXUIButton btn)
+ {
+ this.SetVisibleWithAnimation(false, null);
+ return false;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/XWelfareKingdomPrivilegeDetailView.cs.meta b/Client/Assets/Scripts/XMainClient/UI/XWelfareKingdomPrivilegeDetailView.cs.meta
new file mode 100644
index 00000000..8ecc3b2a
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XWelfareKingdomPrivilegeDetailView.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 76838bcec28f4f5438022e53521bb503
+timeCreated: 1611403950
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/XWelfareKingdomPrivilegeHandler.cs b/Client/Assets/Scripts/XMainClient/UI/XWelfareKingdomPrivilegeHandler.cs
new file mode 100644
index 00000000..208d4da0
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XWelfareKingdomPrivilegeHandler.cs
@@ -0,0 +1,288 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+using KKSG;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUpdater;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class XWelfareKingdomPrivilegeHandler : DlgHandlerBase
+ {
+ protected override string FileName
+ {
+ get
+ {
+ return "GameSystem/Welfare/KingdomPrivilege";
+ }
+ }
+
+ private XUIPool m_PrivilegeTypePool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ private IXUIList m_PrivilegeTypeList;
+
+ private List<IXUILabel> m_LeftTimeLabel = new List<IXUILabel>();
+
+ private List<int> m_LeftTime = new List<int>();
+
+ private uint _CDToken = 0u;
+
+ protected override void Init()
+ {
+ base.Init();
+ Transform transform = base.PanelObject.transform.Find("ListType/Grid/Tpl");
+ this.m_PrivilegeTypePool.SetupPool(transform.parent.parent.gameObject, transform.gameObject, 3u, false);
+ this.m_PrivilegeTypeList = (base.PanelObject.transform.Find("ListType/Grid").GetComponent("XUIList") as IXUIList);
+ }
+
+ protected override void OnHide()
+ {
+ base.OnHide();
+ XSingleton<XTimerMgr>.singleton.KillTimer(this._CDToken);
+ XSingleton<UiUtility>.singleton.DestroyTextureInActivePool(this.m_PrivilegeTypePool, "Icon");
+ }
+
+ public override void RefreshData()
+ {
+ XWelfareDocument specificDocument = XDocuments.GetSpecificDocument<XWelfareDocument>(XWelfareDocument.uuID);
+ PayMemberTable payMemberTable = XWelfareDocument.PayMemberTable;
+ List<PayMember> payMemeberInfo = specificDocument.PayMemeberInfo;
+ this.m_LeftTimeLabel.Clear();
+ this.m_LeftTime.Clear();
+ bool flag = payMemeberInfo == null;
+ if (!flag)
+ {
+ this.m_PrivilegeTypePool.FakeReturnAll();
+ for (int i = 0; i < payMemberTable.Table.Length; i++)
+ {
+ int systemID = payMemberTable.Table[i].SystemID;
+ int id = payMemberTable.Table[i].ID;
+ bool flag2 = XSingleton<XGameSysMgr>.singleton.IsSystemOpen(systemID);
+ if (flag2)
+ {
+ GameObject gameObject = this.m_PrivilegeTypePool.FetchGameObject(false);
+ gameObject.transform.parent = this.m_PrivilegeTypeList.gameObject.transform;
+ gameObject.transform.localScale = Vector3.one;
+ bool flag3 = false;
+ for (int j = 0; j < payMemeberInfo.Count; j++)
+ {
+ bool flag4 = id == payMemeberInfo[j].ID;
+ if (flag4)
+ {
+ flag3 = true;
+ this.SetBaseInfo(gameObject, payMemberTable.Table[i], payMemeberInfo[j]);
+ }
+ }
+ bool flag5 = !flag3;
+ if (flag5)
+ {
+ this.SetBaseInfo(gameObject, payMemberTable.Table[i], null);
+ }
+ }
+ }
+ this.m_PrivilegeTypeList.Refresh();
+ this.m_PrivilegeTypePool.ActualReturnAll(false);
+ XSingleton<XTimerMgr>.singleton.KillTimer(this._CDToken);
+ this._CDToken = XSingleton<XTimerMgr>.singleton.SetTimer(1f, new XTimerMgr.ElapsedEventHandler(this.LeftTimeUpdate), null);
+ }
+ }
+
+ private void SetBaseInfo(GameObject item, PayMemberTable.RowData baseInfo, PayMember info)
+ {
+ float num = (float)baseInfo.Price / 100f;
+ IXUILabel ixuilabel = item.transform.Find("Title").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel.SetText(baseInfo.Name);
+ XWelfareDocument specificDocument = XDocuments.GetSpecificDocument<XWelfareDocument>(XWelfareDocument.uuID);
+ IXUISprite ixuisprite = item.transform.Find("TqIcon").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.SetSprite(specificDocument.GetMemberPrivilegeIcon((MemberPrivilege)baseInfo.ID));
+ IXUITexture ixuitexture = item.transform.Find("Icon").GetComponent("XUITexture") as IXUITexture;
+ ixuitexture.SetTexturePath(baseInfo.Icon);
+ IXUILabel ixuilabel2 = item.transform.Find("Value").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel2.SetText(XStringDefineProxy.GetString("PAY_KINGDOM_VALUE", new object[]
+ {
+ baseInfo.Value[1],
+ XSingleton<UiUtility>.singleton.ChooseProfString(XBagDocument.GetItemConf((int)baseInfo.Value[0]).ItemName, 0u)
+ }));
+ IXUILabel ixuilabel3 = item.transform.Find("Detail/DetailDesc").GetComponent("XUILabel") as IXUILabel;
+ string[] array = baseInfo.Desc.Split(new char[]
+ {
+ '|'
+ });
+ int num2 = 3;
+ StringBuilder stringBuilder = new StringBuilder();
+ for (int i = 0; i < array.Length; i++)
+ {
+ bool flag = i < num2;
+ if (flag)
+ {
+ stringBuilder.Append(array[i]);
+ }
+ else
+ {
+ bool flag2 = i == num2;
+ if (flag2)
+ {
+ stringBuilder.Append("......");
+ break;
+ }
+ }
+ bool flag3 = i != array.Length - 1 && i != num2;
+ if (flag3)
+ {
+ stringBuilder.Append("\n");
+ }
+ }
+ ixuilabel3.SetText(stringBuilder.ToString());
+ IXUIButton ixuibutton = item.transform.Find("Btn").GetComponent("XUIButton") as IXUIButton;
+ IXUILabel ixuilabel4 = item.transform.Find("LeftTime").GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel5 = item.transform.Find("Btn/T").GetComponent("XUILabel") as IXUILabel;
+ this.m_LeftTimeLabel.Add(ixuilabel4);
+ bool flag4 = info != null;
+ if (flag4)
+ {
+ this.m_LeftTime.Add(info.ExpireTime);
+ this.SetLeftTime(ixuilabel4, info.ExpireTime);
+ ixuilabel5.SetText((info.ExpireTime > 0) ? XSingleton<XStringTable>.singleton.GetString("PAY_KINGDOM_BUY_AGAIN") : baseInfo.Tip);
+ int @int = XSingleton<XGlobalConfig>.singleton.GetInt("WelfareMemberPrivilegeRenewDays");
+ bool visible = info.ExpireTime <= 86400 * @int;
+ ixuibutton.SetVisible(visible);
+ }
+ else
+ {
+ ixuilabel4.SetVisible(false);
+ ixuilabel5.SetText(baseInfo.Tip);
+ this.m_LeftTime.Add(0);
+ ixuibutton.SetVisible(true);
+ }
+ ixuibutton.ID = (ulong)((long)baseInfo.ID);
+ ixuibutton.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnBuyBtnClicked));
+ IXUISprite ixuisprite2 = item.transform.Find("Bg").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite2.ID = (ulong)((long)baseInfo.ID);
+ ixuisprite2.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnDetailBtnClicked));
+ }
+
+ private void SetLeftTime(IXUILabel leftTime, int time)
+ {
+ leftTime.SetVisible(time > 0);
+ bool flag = time > 86400;
+ if (flag)
+ {
+ int num = time / 86400;
+ leftTime.SetText(string.Format("{0}{1}", XStringDefineProxy.GetString("PAY_KINGDOM_LEFTTIME", new object[]
+ {
+ num
+ }), XSingleton<XStringTable>.singleton.GetString("DAY_DUARATION")));
+ }
+ else
+ {
+ leftTime.SetText(XStringDefineProxy.GetString("PAY_KINGDOM_LEFTTIME", new object[]
+ {
+ XSingleton<UiUtility>.singleton.TimeFormatString(time, 3, 3, 4, false, true)
+ }));
+ }
+ }
+
+ private void LeftTimeUpdate(object o)
+ {
+ for (int i = 0; i < this.m_LeftTime.Count; i++)
+ {
+ bool flag = this.m_LeftTime[i] > 0;
+ if (flag)
+ {
+ List<int> leftTime = this.m_LeftTime;
+ int index = i;
+ int num = leftTime[index];
+ leftTime[index] = num - 1;
+ int @int = XSingleton<XGlobalConfig>.singleton.GetInt("WelfareMemberPrivilegeRenewDays");
+ bool flag2 = this.m_LeftTime[i] == 0 || this.m_LeftTime[i] == 86400 * @int;
+ if (flag2)
+ {
+ XWelfareDocument specificDocument = XDocuments.GetSpecificDocument<XWelfareDocument>(XWelfareDocument.uuID);
+ specificDocument.ReqPayAllInfo();
+ }
+ }
+ bool flag3 = i < this.m_LeftTimeLabel.Count;
+ if (flag3)
+ {
+ this.SetLeftTime(this.m_LeftTimeLabel[i], this.m_LeftTime[i]);
+ }
+ }
+ XSingleton<XTimerMgr>.singleton.KillTimer(this._CDToken);
+ this._CDToken = XSingleton<XTimerMgr>.singleton.SetTimer(1f, new XTimerMgr.ElapsedEventHandler(this.LeftTimeUpdate), null);
+ }
+
+ private bool OnBuyBtnClicked(IXUIButton btn)
+ {
+ int num = (int)btn.ID;
+ XWelfareDocument specificDocument = XDocuments.GetSpecificDocument<XWelfareDocument>(XWelfareDocument.uuID);
+ PayMemberTable payMemberTable = XWelfareDocument.PayMemberTable;
+ List<PayMember> payMemeberInfo = specificDocument.PayMemeberInfo;
+ bool flag = payMemeberInfo == null;
+ bool result;
+ if (flag)
+ {
+ result = false;
+ }
+ else
+ {
+ for (int i = 0; i < payMemberTable.Table.Length; i++)
+ {
+ int id = payMemberTable.Table[i].ID;
+ bool flag2 = id == num;
+ if (flag2)
+ {
+ for (int j = 0; j < payMemeberInfo.Count; j++)
+ {
+ bool flag3 = id == payMemeberInfo[j].ID;
+ if (flag3)
+ {
+ bool flag4 = payMemeberInfo[j].ExpireTime > 0;
+ if (flag4)
+ {
+ DlgBase<XWelfareKingdomPrivilegeRenewView, XWelfareKingdomPrivilegeRenewBehaviour>.singleton.Show(payMemberTable.Table[i], false, 0);
+ return true;
+ }
+ }
+ }
+ XRechargeDocument specificDocument2 = XDocuments.GetSpecificDocument<XRechargeDocument>(XRechargeDocument.uuID);
+ bool flag5 = XSingleton<XUpdater.XUpdater>.singleton.XPlatform.Platfrom() == XPlatformType.Android;
+ if (flag5)
+ {
+ specificDocument2.SDKSubscribe(payMemberTable.Table[i].Price, 1, payMemberTable.Table[i].ServiceCode, payMemberTable.Table[i].Name, payMemberTable.Table[i].ParamID, PayParamType.PAY_PARAM_MEMBER);
+ }
+ else
+ {
+ bool flag6 = XSingleton<XUpdater.XUpdater>.singleton.XPlatform.Platfrom() == XPlatformType.IOS;
+ if (flag6)
+ {
+ specificDocument2.SDKSubscribe(payMemberTable.Table[i].Price, payMemberTable.Table[i].Days, payMemberTable.Table[i].ServiceCode, payMemberTable.Table[i].Name, payMemberTable.Table[i].ParamID, PayParamType.PAY_PARAM_MEMBER);
+ }
+ }
+ return true;
+ }
+ }
+ result = true;
+ }
+ return result;
+ }
+
+ private void OnDetailBtnClicked(IXUISprite sp)
+ {
+ int num = (int)sp.ID;
+ PayMemberTable payMemberTable = XWelfareDocument.PayMemberTable;
+ for (int i = 0; i < payMemberTable.Table.Length; i++)
+ {
+ int id = payMemberTable.Table[i].ID;
+ bool flag = id == num;
+ if (flag)
+ {
+ DlgBase<XWelfareKingdomPrivilegeDetailView, XWelfareKingdomPrivilegeDetailBehaviour>.singleton.ShowDetail(payMemberTable.Table[i], true);
+ break;
+ }
+ }
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/XWelfareKingdomPrivilegeHandler.cs.meta b/Client/Assets/Scripts/XMainClient/UI/XWelfareKingdomPrivilegeHandler.cs.meta
new file mode 100644
index 00000000..6f12ac20
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XWelfareKingdomPrivilegeHandler.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 40f5c364fa471724b914be9320639d4a
+timeCreated: 1611403616
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/XWelfareKingdomPrivilegeRenewBehaviour.cs b/Client/Assets/Scripts/XMainClient/UI/XWelfareKingdomPrivilegeRenewBehaviour.cs
new file mode 100644
index 00000000..41f17048
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XWelfareKingdomPrivilegeRenewBehaviour.cs
@@ -0,0 +1,37 @@
+using System;
+using UILib;
+using XMainClient.UI.UICommon;
+
+namespace XMainClient.UI
+{
+ internal class XWelfareKingdomPrivilegeRenewBehaviour : DlgBehaviourBase
+ {
+ public IXUILabel m_Title;
+
+ public IXUILabel m_Name;
+
+ public IXUIButton m_Close;
+
+ public IXUITexture m_Icon;
+
+ public IXUILabel m_Time;
+
+ public IXUILabel m_Price;
+
+ public IXUIButton m_Buy;
+
+ public IXUILabel m_RenewSucTip;
+
+ private void Awake()
+ {
+ this.m_Title = (base.transform.Find("Title").GetComponent("XUILabel") as IXUILabel);
+ this.m_Name = (base.transform.Find("Name").GetComponent("XUILabel") as IXUILabel);
+ this.m_Close = (base.transform.Find("Close").GetComponent("XUIButton") as IXUIButton);
+ this.m_Icon = (base.transform.Find("Texture").GetComponent("XUITexture") as IXUITexture);
+ this.m_Time = (base.transform.Find("Time").GetComponent("XUILabel") as IXUILabel);
+ this.m_Price = (base.transform.Find("Price").GetComponent("XUILabel") as IXUILabel);
+ this.m_Buy = (base.transform.Find("OK").GetComponent("XUIButton") as IXUIButton);
+ this.m_RenewSucTip = (base.transform.Find("RenewSuc").GetComponent("XUILabel") as IXUILabel);
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/XWelfareKingdomPrivilegeRenewBehaviour.cs.meta b/Client/Assets/Scripts/XMainClient/UI/XWelfareKingdomPrivilegeRenewBehaviour.cs.meta
new file mode 100644
index 00000000..a9530808
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XWelfareKingdomPrivilegeRenewBehaviour.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 920f055c6da557d45aa630584987f973
+timeCreated: 1611404144
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/XWelfareKingdomPrivilegeRenewView.cs b/Client/Assets/Scripts/XMainClient/UI/XWelfareKingdomPrivilegeRenewView.cs
new file mode 100644
index 00000000..e5a23e84
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XWelfareKingdomPrivilegeRenewView.cs
@@ -0,0 +1,102 @@
+using System;
+using KKSG;
+using UILib;
+using XMainClient.UI.UICommon;
+using XUpdater;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class XWelfareKingdomPrivilegeRenewView : DlgBase<XWelfareKingdomPrivilegeRenewView, XWelfareKingdomPrivilegeRenewBehaviour>
+ {
+ public override bool autoload
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override string fileName
+ {
+ get
+ {
+ return "GameSystem/Welfare/KingdomPrivilegeRenew";
+ }
+ }
+
+ private PayMemberTable.RowData payInfo;
+
+ public void Show(PayMemberTable.RowData info, bool suc = false, int leftTime = 0)
+ {
+ bool flag = !base.IsVisible();
+ if (flag)
+ {
+ this.SetVisibleWithAnimation(true, null);
+ }
+ this.payInfo = info;
+ base.uiBehaviour.m_Title.SetText(suc ? XSingleton<XStringTable>.singleton.GetString("PAY_KINGDOM_RENEW_TITLE") : XSingleton<XStringTable>.singleton.GetString("PAY_KINGDOM_BUY_AGAIN"));
+ base.uiBehaviour.m_Name.SetText(info.Name);
+ base.uiBehaviour.m_Icon.SetTexturePath(info.Icon);
+ base.uiBehaviour.m_Time.SetVisible(!suc);
+ base.uiBehaviour.m_Time.SetText(string.Format("{0}{1}", info.Days, XSingleton<XStringTable>.singleton.GetString("DAY_DUARATION")));
+ float num = (float)info.Price / 100f;
+ base.uiBehaviour.m_Price.SetText(XStringDefineProxy.GetString("PAY_UNIT", new object[]
+ {
+ num
+ }));
+ base.uiBehaviour.m_Price.SetVisible(!suc);
+ base.uiBehaviour.m_RenewSucTip.SetVisible(suc);
+ base.uiBehaviour.m_Buy.SetVisible(!suc);
+ if (suc)
+ {
+ int days = info.Days;
+ int num2 = leftTime / 86400;
+ base.uiBehaviour.m_RenewSucTip.SetText(XStringDefineProxy.GetString("PAY_KINGDOM_RENEW", new object[]
+ {
+ days,
+ num2
+ }));
+ }
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ base.uiBehaviour.m_Close.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnCloseBtnClicked));
+ base.uiBehaviour.m_Buy.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnBuyBtnClicked));
+ }
+
+ protected override void OnHide()
+ {
+ base.OnHide();
+ base.uiBehaviour.m_Icon.SetTexturePath("");
+ }
+
+ private bool OnCloseBtnClicked(IXUIButton btn)
+ {
+ this.SetVisibleWithAnimation(false, null);
+ return false;
+ }
+
+ private bool OnBuyBtnClicked(IXUIButton btn)
+ {
+ XRechargeDocument specificDocument = XDocuments.GetSpecificDocument<XRechargeDocument>(XRechargeDocument.uuID);
+ bool flag = XSingleton<XUpdater.XUpdater>.singleton.XPlatform.Platfrom() == XPlatformType.Android;
+ if (flag)
+ {
+ specificDocument.SDKSubscribe(this.payInfo.Price, 1, this.payInfo.ServiceCode, this.payInfo.Name, this.payInfo.ParamID, PayParamType.PAY_PARAM_MEMBER);
+ }
+ else
+ {
+ bool flag2 = XSingleton<XUpdater.XUpdater>.singleton.XPlatform.Platfrom() == XPlatformType.IOS;
+ if (flag2)
+ {
+ specificDocument.SDKSubscribe(this.payInfo.Price, this.payInfo.Days, this.payInfo.ServiceCode, this.payInfo.Name, this.payInfo.ParamID, PayParamType.PAY_PARAM_MEMBER);
+ }
+ }
+ this.SetVisibleWithAnimation(false, null);
+ return true;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/XWelfareKingdomPrivilegeRenewView.cs.meta b/Client/Assets/Scripts/XMainClient/UI/XWelfareKingdomPrivilegeRenewView.cs.meta
new file mode 100644
index 00000000..b98cb71c
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XWelfareKingdomPrivilegeRenewView.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 2b531de6b6f6d074f994048b4d497cb6
+timeCreated: 1611403498
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/XWelfareMoneyTreeHandler.cs b/Client/Assets/Scripts/XMainClient/UI/XWelfareMoneyTreeHandler.cs
new file mode 100644
index 00000000..5d88cc94
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XWelfareMoneyTreeHandler.cs
@@ -0,0 +1,443 @@
+using System;
+using System.Collections.Generic;
+using UILib;
+using UnityEngine;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class XWelfareMoneyTreeHandler : DlgHandlerBase
+ {
+ protected override string FileName
+ {
+ get
+ {
+ return "GameSystem/Welfare/GoldTree";
+ }
+ }
+
+ private XWelfareDocument _doc;
+
+ private uint _tick_token = 0u;
+
+ private uint _req_type = 0u;
+
+ private float _time_left;
+
+ private List<uint> _res = new List<uint>();
+
+ private int _play_index = 0;
+
+ private uint _play_token = 0u;
+
+ private int _cost_count = 100;
+
+ private GameObject _status_info;
+
+ private GameObject _once_info;
+
+ private GameObject _ten_info;
+
+ private GameObject _free_info;
+
+ private GameObject _gold_info;
+
+ private GameObject _fx_gold_tree;
+
+ private GameObject _free_time;
+
+ private GameObject _fx_gold_tree_putong;
+
+ private GameObject _fx_gold_tree_baoji;
+
+ private IXUIButton _free_btn;
+
+ private IXUILabel _free_count_free;
+
+ private IXUILabel _left_count;
+
+ private IXUILabel _free_count;
+
+ private IXUILabel _next_reset_info;
+
+ private IXUILabel _refresh_time;
+
+ private IXUILabel _free_left_time;
+
+ private IXUILabel _once_cost;
+
+ private IXUIButton _once_btn;
+
+ private IXUILabel _ten_cost;
+
+ private IXUIButton _ten_btn;
+
+ private IXUILabel _gold_num;
+
+ private IXUILabel _critical_times;
+
+ private IXUILabel _critical;
+
+ private IXUILabel _guide;
+
+ private IXUITweenTool _tween1;
+
+ private IXUITweenTool _tween2;
+
+ private IXUITweenTool _tween3;
+
+ private IXUITweenTool _tween4;
+
+ private IXUITweenTool _tween5;
+
+ private IXUITweenTool _tween6;
+
+ protected override void Init()
+ {
+ base.Init();
+ this._doc = XDocuments.GetSpecificDocument<XWelfareDocument>(XWelfareDocument.uuID);
+ this._status_info = base.PanelObject.transform.Find("Status").gameObject;
+ this._once_info = base.PanelObject.transform.Find("Once").gameObject;
+ this._ten_info = base.PanelObject.transform.Find("Ten").gameObject;
+ this._free_info = base.PanelObject.transform.Find("Free").gameObject;
+ this._gold_info = base.PanelObject.transform.Find("Gold").gameObject;
+ this._fx_gold_tree = base.PanelObject.transform.Find("FX/UI_Goldtree").gameObject;
+ this._fx_gold_tree_putong = base.PanelObject.transform.Find("FX/UI_Goldtree_putong").gameObject;
+ this._fx_gold_tree_baoji = base.PanelObject.transform.Find("FX/UI_Goldtree_baoji").gameObject;
+ this._free_time = base.PanelObject.transform.Find("Status/FreeTime").gameObject;
+ this._free_btn = (base.PanelObject.transform.Find("Free/Btn_ExchangeOne").GetComponent("XUIButton") as IXUIButton);
+ this._free_btn.ID = 1UL;
+ this._free_count_free = (base.PanelObject.transform.Find("Free/Cash/RemainTime").GetComponent("XUILabel") as IXUILabel);
+ this._left_count = (base.PanelObject.transform.Find("Status/PaidTime").GetComponent("XUILabel") as IXUILabel);
+ this._free_count = (base.PanelObject.transform.Find("Status/FreeTime/RemainTime").GetComponent("XUILabel") as IXUILabel);
+ this._next_reset_info = (base.PanelObject.transform.Find("Status/FreeTime/RemainTime").GetComponent("XUILabel") as IXUILabel);
+ this._free_left_time = (base.PanelObject.transform.Find("Status/FreeTime/Time").GetComponent("XUILabel") as IXUILabel);
+ this._refresh_time = (base.PanelObject.transform.Find("Status/RefreshTime").GetComponent("XUILabel") as IXUILabel);
+ this._once_cost = (base.PanelObject.transform.Find("Once/Cash/Num").GetComponent("XUILabel") as IXUILabel);
+ this._once_btn = (base.PanelObject.transform.Find("Once/Btn_ExchangeOne").GetComponent("XUIButton") as IXUIButton);
+ this._once_btn.ID = 2UL;
+ this._ten_cost = (base.PanelObject.transform.Find("Ten/Cash/Num").GetComponent("XUILabel") as IXUILabel);
+ this._ten_btn = (base.PanelObject.transform.Find("Ten/Btn_ExchangeTen").GetComponent("XUIButton") as IXUIButton);
+ this._ten_btn.ID = 3UL;
+ this._gold_num = (base.PanelObject.transform.Find("Gold/Icon/Number").GetComponent("XUILabel") as IXUILabel);
+ this._critical_times = (base.PanelObject.transform.Find("Gold/Critical/Times1").GetComponent("XUILabel") as IXUILabel);
+ this._critical = (base.PanelObject.transform.Find("Gold/Critical").GetComponent("XUILabel") as IXUILabel);
+ this._guide = (base.PanelObject.transform.Find("Help/Guide").GetComponent("XUILabel") as IXUILabel);
+ this._tween1 = (base.PanelObject.transform.Find("Gold").GetComponent("XUIPlayTween") as IXUITweenTool);
+ this._tween2 = (base.PanelObject.transform.Find("Gold/Bg").GetComponent("XUIPlayTween") as IXUITweenTool);
+ this._tween3 = (base.PanelObject.transform.Find("Gold/Icon").GetComponent("XUIPlayTween") as IXUITweenTool);
+ this._tween4 = (base.PanelObject.transform.Find("Gold/Critical").GetComponent("XUIPlayTween") as IXUITweenTool);
+ this._tween5 = (base.PanelObject.transform.Find("Gold/Critical/Times1").GetComponent("XUIPlayTween") as IXUITweenTool);
+ this._tween6 = (base.PanelObject.transform.Find("Gold/Critical/T").GetComponent("XUIPlayTween") as IXUITweenTool);
+ string value = XSingleton<XGlobalConfig>.singleton.GetValue("GoldClickConsume");
+ this._cost_count = int.Parse(value.Split(new char[]
+ {
+ '='
+ })[1]);
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ this._gold_info.SetActive(false);
+ this.ShowPaid();
+ this.ReqMoneyTree(0u, 1u);
+ this._guide.SetText(XSingleton<XStringTable>.singleton.GetString("MoneyBox"));
+ XShowGetItemDocument specificDocument = XDocuments.GetSpecificDocument<XShowGetItemDocument>(XShowGetItemDocument.uuID);
+ specificDocument.bBlock = true;
+ }
+
+ protected override void OnHide()
+ {
+ base.OnHide();
+ bool flag = this._tick_token > 0u;
+ if (flag)
+ {
+ XSingleton<XTimerMgr>.singleton.KillTimer(this._tick_token);
+ }
+ this._tick_token = 0u;
+ XShowGetItemDocument specificDocument = XDocuments.GetSpecificDocument<XShowGetItemDocument>(XShowGetItemDocument.uuID);
+ specificDocument.ClearItemQueue();
+ specificDocument.bBlock = false;
+ XSingleton<XTimerMgr>.singleton.KillTimer(this._play_token);
+ this._play_token = 0u;
+ }
+
+ public override void RegisterEvent()
+ {
+ this._free_btn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnReqGoldClick));
+ this._once_btn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnReqGoldClick));
+ this._ten_btn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnReqGoldClick));
+ base.RegisterEvent();
+ }
+
+ public override void RefreshData()
+ {
+ MoneyTreeData welfareMoneyTreeData = this._doc.WelfareMoneyTreeData;
+ bool flag = welfareMoneyTreeData.left_time == 0u && welfareMoneyTreeData.free_all_count - welfareMoneyTreeData.free_count > 0u && welfareMoneyTreeData.free_count + welfareMoneyTreeData.count < welfareMoneyTreeData.all_count;
+ if (flag)
+ {
+ this.ShowFree();
+ }
+ else
+ {
+ this.ShowPaid();
+ }
+ bool flag2 = this._req_type > 0u;
+ if (flag2)
+ {
+ bool flag3 = this._req_type == 1u;
+ if (flag3)
+ {
+ bool flag4 = this._doc.WelfareMoneyTreeData.result.Count > 0;
+ if (flag4)
+ {
+ this.StartPlayTween(this._doc.WelfareMoneyTreeData.result[0]);
+ }
+ else
+ {
+ this.StartPlayTween(1f);
+ }
+ this.StartPlayFx("goldtreeputong");
+ this._critical.SetVisible(false);
+ }
+ else
+ {
+ bool flag5 = this._req_type == 2u;
+ if (flag5)
+ {
+ this._res.Clear();
+ for (int i = 0; i < this._doc.WelfareMoneyTreeData.result.Count; i++)
+ {
+ this._res.Add(this._doc.WelfareMoneyTreeData.result[i]);
+ }
+ this._play_index = 0;
+ bool flag6 = this._res.Count <= 1;
+ if (flag6)
+ {
+ this.StartPlayFx("goldtreeputong");
+ this._critical.SetVisible(false);
+ }
+ else
+ {
+ this.StartPlayFx("goldtreebaoji");
+ this._critical.SetVisible(true);
+ }
+ bool flag7 = this._res.Count > 0;
+ if (flag7)
+ {
+ this.StartPlayResult(null);
+ }
+ else
+ {
+ this.StartPlayTween(1f);
+ }
+ }
+ }
+ this._req_type = 0u;
+ }
+ }
+
+ private void ShowFree()
+ {
+ this._once_info.SetActive(false);
+ this._ten_info.SetActive(false);
+ this._free_info.SetActive(true);
+ this._status_info.SetActive(false);
+ this._fx_gold_tree_putong.SetActive(false);
+ this._fx_gold_tree_baoji.SetActive(false);
+ this._free_time.SetActive(false);
+ this._left_count.SetVisible(false);
+ this._refresh_time.SetVisible(false);
+ this._free_left_time.SetVisible(false);
+ this._free_count_free.SetText(string.Format("({0}/{1})", this._doc.WelfareMoneyTreeData.free_all_count - this._doc.WelfareMoneyTreeData.free_count, this._doc.WelfareMoneyTreeData.free_all_count));
+ }
+
+ private void ShowPaid()
+ {
+ this._once_info.SetActive(true);
+ this._ten_info.SetActive(true);
+ this._free_info.SetActive(false);
+ this._status_info.SetActive(true);
+ this._fx_gold_tree_putong.SetActive(false);
+ this._fx_gold_tree_baoji.SetActive(false);
+ this._left_count.SetVisible(true);
+ this._once_cost.SetText(this._cost_count.ToString());
+ this._ten_cost.SetText((this._cost_count * 10).ToString());
+ bool flag = this._doc.WelfareMoneyTreeData.all_count <= this._doc.WelfareMoneyTreeData.count + this._doc.WelfareMoneyTreeData.free_count;
+ if (flag)
+ {
+ this._left_count.SetVisible(false);
+ this._refresh_time.SetVisible(true);
+ }
+ else
+ {
+ this._left_count.SetVisible(true);
+ this._refresh_time.SetVisible(false);
+ }
+ this._free_left_time.SetVisible(true);
+ this._time_left = this._doc.WelfareMoneyTreeData.left_time;
+ bool flag2 = this._time_left > 0f && this._time_left <= 10000f;
+ if (flag2)
+ {
+ this._free_time.SetActive(true);
+ this.DoCountDown(null);
+ }
+ else
+ {
+ this._free_time.SetActive(false);
+ }
+ int num = (int)(this._doc.WelfareMoneyTreeData.all_count - this._doc.WelfareMoneyTreeData.count - this._doc.WelfareMoneyTreeData.free_count);
+ num = ((num >= 0) ? num : 0);
+ this._left_count.SetText(string.Format("({0}/{1})", num, this._doc.WelfareMoneyTreeData.all_count));
+ }
+
+ private void ReqMoneyTree(uint type, uint num)
+ {
+ this._req_type = type;
+ RpcC2G_GoldClick rpcC2G_GoldClick = new RpcC2G_GoldClick();
+ rpcC2G_GoldClick.oArg.type = type;
+ rpcC2G_GoldClick.oArg.count = num;
+ XSingleton<XClientNetwork>.singleton.Send(rpcC2G_GoldClick);
+ }
+
+ private void SetTimeLeft(int time)
+ {
+ int num = time / 3600;
+ int num2 = (time - num * 3600) / 60;
+ int num3 = time % 60;
+ string text = string.Format("{0:D2}:{1:D2}", num2, num3);
+ this._free_left_time.SetText(text);
+ }
+
+ private bool OnReqGoldClick(IXUIButton btn)
+ {
+ bool flag = btn.ID == 1UL;
+ if (flag)
+ {
+ this.ReqMoneyTree(1u, 1u);
+ }
+ else
+ {
+ bool flag2 = btn.ID == 2UL;
+ if (flag2)
+ {
+ this.ReqMoneyTree(2u, 1u);
+ }
+ else
+ {
+ bool flag3 = btn.ID == 3UL;
+ if (flag3)
+ {
+ this.ReqMoneyTree(2u, 10u);
+ }
+ }
+ }
+ return true;
+ }
+
+ public void DoCountDown(object obj)
+ {
+ MoneyTreeData welfareMoneyTreeData = this._doc.WelfareMoneyTreeData;
+ this._time_left = welfareMoneyTreeData.left_time - (Time.time - welfareMoneyTreeData.req_time);
+ bool flag = this._tick_token > 0u;
+ if (flag)
+ {
+ XSingleton<XTimerMgr>.singleton.KillTimer(this._tick_token);
+ }
+ bool flag2 = this._time_left <= 0f;
+ if (flag2)
+ {
+ this._time_left = 0f;
+ this.SetTimeLeft(0);
+ bool flag3 = this._doc.WelfareMoneyTreeData.free_all_count - this._doc.WelfareMoneyTreeData.free_count > 0u;
+ if (flag3)
+ {
+ this.ShowFree();
+ }
+ }
+ else
+ {
+ this.SetTimeLeft((int)this._time_left);
+ this._tick_token = XSingleton<XTimerMgr>.singleton.SetTimer(1f, new XTimerMgr.ElapsedEventHandler(this.DoCountDown), null);
+ }
+ }
+
+ public void StartPlayFx(string fxname)
+ {
+ this._fx_gold_tree.SetActive(false);
+ this._fx_gold_tree_baoji.SetActive(false);
+ this._fx_gold_tree_putong.SetActive(false);
+ bool flag = fxname == "goldtree";
+ if (flag)
+ {
+ this._fx_gold_tree.SetActive(true);
+ }
+ else
+ {
+ bool flag2 = fxname == "goldtreeputong";
+ if (flag2)
+ {
+ this._fx_gold_tree_putong.SetActive(true);
+ }
+ else
+ {
+ bool flag3 = fxname == "goldtreebaoji";
+ if (flag3)
+ {
+ this._fx_gold_tree_baoji.SetActive(true);
+ }
+ }
+ }
+ }
+
+ public void StartPlayTween(float alpha)
+ {
+ bool flag = !base.IsVisible();
+ if (!flag)
+ {
+ int num = int.Parse(XSingleton<XGlobalConfig>.singleton.GetValue("GoldClickBaseCount"));
+ this._gold_num.SetText(((int)((float)num * alpha)).ToString());
+ this._critical_times.SetText(alpha.ToString());
+ bool flag2 = alpha <= 1f;
+ if (flag2)
+ {
+ this._critical.SetVisible(false);
+ }
+ else
+ {
+ this._critical.SetVisible(true);
+ }
+ this._gold_info.SetActive(true);
+ this._tween1.ResetTweenByGroup(true, 0);
+ this._tween1.PlayTween(true, -1f);
+ this._tween2.ResetTweenByGroup(true, 0);
+ this._tween2.PlayTween(true, -1f);
+ this._tween3.ResetTweenByGroup(true, 0);
+ this._tween3.PlayTween(true, -1f);
+ this._tween4.ResetTweenByGroup(true, 0);
+ this._tween4.PlayTween(true, -1f);
+ this._tween5.ResetTweenByGroup(true, 0);
+ this._tween5.PlayTween(true, -1f);
+ this._tween6.ResetTweenByGroup(true, 0);
+ this._tween6.PlayTween(true, -1f);
+ }
+ }
+
+ public void StartPlayResult(object obj)
+ {
+ bool flag = this._play_token > 0u;
+ if (flag)
+ {
+ XSingleton<XTimerMgr>.singleton.KillTimer(this._play_token);
+ }
+ bool flag2 = this._play_index < this._res.Count;
+ if (flag2)
+ {
+ this.StartPlayTween(this._res[this._play_index]);
+ this._play_index++;
+ this._play_token = XSingleton<XTimerMgr>.singleton.SetTimer(0.8f, new XTimerMgr.ElapsedEventHandler(this.StartPlayResult), null);
+ }
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/XWelfareMoneyTreeHandler.cs.meta b/Client/Assets/Scripts/XMainClient/UI/XWelfareMoneyTreeHandler.cs.meta
new file mode 100644
index 00000000..02bb603b
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XWelfareMoneyTreeHandler.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 6cc601e78aed834429cdea64bbcce34d
+timeCreated: 1611403899
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/XWelfareNiceGirlHandler.cs b/Client/Assets/Scripts/XMainClient/UI/XWelfareNiceGirlHandler.cs
new file mode 100644
index 00000000..d6b0b470
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XWelfareNiceGirlHandler.cs
@@ -0,0 +1,392 @@
+using System;
+using KKSG;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ public class XWelfareNiceGirlHandler : DlgHandlerBase
+ {
+ protected override string FileName
+ {
+ get
+ {
+ return "GameSystem/Welfare/XWelfareNiceGirlHandler";
+ }
+ }
+
+ private IXUIWrapContent _dailyWrapContent = null;
+
+ private IXUIWrapContent _specailWrapContent = null;
+
+ private XWelfareNiceGirlHandler.BlessType _curBlessType = XWelfareNiceGirlHandler.BlessType.DialyGift;
+
+ private Transform _dailyGiftRoot;
+
+ private Transform _specialGiftRoot;
+
+ private IXUIScrollView _dailyScrollView;
+
+ private IXUIScrollView _specialScrollView;
+
+ private IXUILabel _CDRewards;
+
+ private IXUICheckBox _dailyCheck;
+
+ private IXUICheckBox _specialCheck;
+
+ private enum BlessType
+ {
+ DialyGift,
+ SpecialGift
+ }
+
+ protected override void Init()
+ {
+ base.Init();
+ this.InitProperties();
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ XWelfareDocument.Doc.ArgentaMainInterfaceState = false;
+ DlgBase<XMainInterface, XMainInterfaceBehaviour>.singleton.RefreshH5ButtonState(XSysDefine.XSys_Welfare_NiceGirl, true);
+ XWelfareDocument.Doc.SendArgentaActivityInfo(1u, 0u);
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ }
+
+ public override void RefreshData()
+ {
+ base.RefreshData();
+ this.RefreshRedPoint();
+ bool flag = this._curBlessType == XWelfareNiceGirlHandler.BlessType.DialyGift;
+ if (flag)
+ {
+ bool bChecked = this._dailyCheck.bChecked;
+ if (bChecked)
+ {
+ this.RefreshScorllViewContent();
+ }
+ else
+ {
+ this._dailyCheck.bChecked = true;
+ }
+ }
+ bool flag2 = this._curBlessType == XWelfareNiceGirlHandler.BlessType.SpecialGift;
+ if (flag2)
+ {
+ bool bChecked2 = this._specialCheck.bChecked;
+ if (bChecked2)
+ {
+ this.RefreshScorllViewContent();
+ }
+ else
+ {
+ this._specialCheck.bChecked = true;
+ }
+ }
+ }
+
+ private void RefreshScorllViewContent()
+ {
+ this._dailyGiftRoot.gameObject.SetActive(this._curBlessType == XWelfareNiceGirlHandler.BlessType.DialyGift);
+ this._specialGiftRoot.gameObject.SetActive(this._curBlessType == XWelfareNiceGirlHandler.BlessType.SpecialGift);
+ bool flag = this._curBlessType == XWelfareNiceGirlHandler.BlessType.DialyGift;
+ if (flag)
+ {
+ int argentDailyDataCount = XWelfareDocument.Doc.GetArgentDailyDataCount();
+ this._dailyWrapContent.SetContentCount(argentDailyDataCount, false);
+ this._dailyScrollView.ResetPosition();
+ }
+ else
+ {
+ XTempActivityDocument.Doc.SortActivityTaskByType(7u);
+ int activityTaskCountByType = XTempActivityDocument.Doc.GetActivityTaskCountByType(7u);
+ this._specailWrapContent.SetContentCount(activityTaskCountByType, false);
+ this._specialScrollView.ResetPosition();
+ }
+ }
+
+ private void InitProperties()
+ {
+ this._CDRewards = (base.transform.Find("CDRewards").GetComponent("XUILabel") as IXUILabel);
+ this._dailyGiftRoot = base.transform.Find("DailyGift");
+ this._specialGiftRoot = base.transform.Find("SpecialGift");
+ this._dailyCheck = (base.transform.Find("buttons/SelectNormal").GetComponent("XUICheckBox") as IXUICheckBox);
+ this._dailyCheck.RegisterOnCheckEventHandler(new CheckBoxOnCheckEventHandler(this.OnTabChecked));
+ this._dailyCheck.ID = 0UL;
+ this._specialCheck = (base.transform.Find("buttons/SelectPerfect").GetComponent("XUICheckBox") as IXUICheckBox);
+ this._specialCheck.RegisterOnCheckEventHandler(new CheckBoxOnCheckEventHandler(this.OnTabChecked));
+ this._specialCheck.ID = 1UL;
+ this._dailyWrapContent = (this._dailyGiftRoot.Find("RightView/WrapContent").GetComponent("XUIWrapContent") as IXUIWrapContent);
+ this._dailyScrollView = (this._dailyGiftRoot.Find("RightView").GetComponent("XUIScrollView") as IXUIScrollView);
+ this._specailWrapContent = (this._specialGiftRoot.Find("RightView/WrapContent").GetComponent("XUIWrapContent") as IXUIWrapContent);
+ this._specialScrollView = (this._dailyGiftRoot.Find("RightView").GetComponent("XUIScrollView") as IXUIScrollView);
+ this._dailyWrapContent.RegisterItemInitEventHandler(new WrapItemInitEventHandler(this.DailyGiftContentInit));
+ this._dailyWrapContent.RegisterItemUpdateEventHandler(new WrapItemUpdateEventHandler(this.DailyGiftContentUpdate));
+ this._specailWrapContent.RegisterItemUpdateEventHandler(new WrapItemUpdateEventHandler(this.SpecialGiftContentUpdate));
+ this._specailWrapContent.RegisterItemInitEventHandler(new WrapItemInitEventHandler(this.SpecialGiftContentInit));
+ }
+
+ private void RefreshRedPoint()
+ {
+ Transform transform = base.transform.Find("buttons/SelectNormal/redpoint");
+ Transform transform2 = base.transform.Find("buttons/SelectPerfect/redpoint");
+ transform.gameObject.SetActive(XWelfareDocument.Doc.GetDailyGiftRedPoint());
+ transform2.gameObject.SetActive(XWelfareDocument.Doc.GetSpecialGiftRedPoint());
+ }
+
+ private void WrapContentUpdate(Transform itemTransform, int index)
+ {
+ bool flag = this._curBlessType == XWelfareNiceGirlHandler.BlessType.DialyGift;
+ if (flag)
+ {
+ this.DailyGiftContentUpdate(itemTransform, index);
+ }
+ else
+ {
+ this.SpecialGiftContentUpdate(itemTransform, index);
+ }
+ }
+
+ private void SpecialGiftContentUpdate(Transform itemTransform, int index)
+ {
+ IXUIButton ixuibutton = itemTransform.Find("OperateBtn").GetComponent("XUIButton") as IXUIButton;
+ IXUILabel ixuilabel = itemTransform.Find("TaskName").GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel2 = itemTransform.Find("Progress").GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel3 = itemTransform.Find("OperateBtn/Text").GetComponent("XUILabel") as IXUILabel;
+ IXUISprite ixuisprite = itemTransform.Find("TaskIcon").GetComponent("XUISprite") as IXUISprite;
+ Transform transform = itemTransform.Find("Items");
+ Transform transform2 = itemTransform.Find("HadGet");
+ SpActivityTask activityTaskInfoByIndex = XTempActivityDocument.Doc.GetActivityTaskInfoByIndex(7u, index);
+ bool flag = activityTaskInfoByIndex != null;
+ if (flag)
+ {
+ ixuibutton.gameObject.SetActive(true);
+ ixuibutton.ID = (ulong)activityTaskInfoByIndex.taskid;
+ transform2.gameObject.SetActive(false);
+ bool flag2 = activityTaskInfoByIndex.state == 0u;
+ if (flag2)
+ {
+ ixuilabel3.SetText(XSingleton<XStringTable>.singleton.GetString("PVPActivity_Go"));
+ }
+ else
+ {
+ bool flag3 = activityTaskInfoByIndex.state == 1u;
+ if (flag3)
+ {
+ ixuilabel3.SetText(XSingleton<XStringTable>.singleton.GetString("SRS_FETCH"));
+ }
+ else
+ {
+ ixuibutton.gameObject.SetActive(false);
+ transform2.gameObject.SetActive(true);
+ }
+ }
+ int num = 1;
+ SuperActivityTask.RowData dataByActivityByTypeID = XTempActivityDocument.Doc.GetDataByActivityByTypeID(7u, activityTaskInfoByIndex.taskid);
+ bool flag4 = dataByActivityByTypeID != null;
+ if (flag4)
+ {
+ num = dataByActivityByTypeID.cnt;
+ ixuisprite.SetSprite(dataByActivityByTypeID.icon);
+ ixuilabel.SetText(dataByActivityByTypeID.title);
+ }
+ ixuilabel2.SetText(string.Format("{0}/{1}", activityTaskInfoByIndex.progress, num));
+ SeqListRef<uint>? argentTaskRewards = XWelfareDocument.Doc.GetArgentTaskRewards(activityTaskInfoByIndex.taskid);
+ int i = 0;
+ bool flag5 = argentTaskRewards != null;
+ if (flag5)
+ {
+ int num2 = Mathf.Min((int)argentTaskRewards.Value.count, transform.childCount);
+ while (i < num2)
+ {
+ Transform child = transform.GetChild(i);
+ child.gameObject.SetActive(true);
+ XSingleton<XItemDrawerMgr>.singleton.normalItemDrawer.DrawItem(child.gameObject, (int)argentTaskRewards.Value[i, 0], (int)argentTaskRewards.Value[i, 1], true);
+ IXUISprite ixuisprite2 = child.gameObject.transform.Find("Icon").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite2.ID = (ulong)argentTaskRewards.Value[i, 0];
+ ixuisprite2.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(XSingleton<UiUtility>.singleton.OnItemClick));
+ i++;
+ }
+ }
+ while (i < transform.childCount)
+ {
+ transform.GetChild(i++).gameObject.SetActive(false);
+ }
+ }
+ }
+
+ private void DailyGiftContentUpdate(Transform itemTransform, int index)
+ {
+ Transform transform = itemTransform.Find("HadGet");
+ Transform transform2 = itemTransform.Find("Items");
+ IXUIButton ixuibutton = itemTransform.Find("GetBtn").GetComponent("XUIButton") as IXUIButton;
+ IXUILabel ixuilabel = itemTransform.Find("Title").GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel2 = itemTransform.Find("desc").GetComponent("XUILabel") as IXUILabel;
+ ArgentaDaily.RowData argentDailyDataByIndex = XWelfareDocument.Doc.GetArgentDailyDataByIndex(index);
+ bool flag = argentDailyDataByIndex != null;
+ if (flag)
+ {
+ ixuilabel.SetText(argentDailyDataByIndex.Title);
+ ixuilabel2.SetText(XSingleton<UiUtility>.singleton.ReplaceReturn(argentDailyDataByIndex.Description));
+ ixuibutton.ID = (ulong)argentDailyDataByIndex.ID;
+ bool flag2 = XWelfareDocument.Doc.CurArgentaDailyIDList.Contains(argentDailyDataByIndex.ID);
+ ixuibutton.gameObject.SetActive(!flag2);
+ transform.gameObject.SetActive(flag2);
+ SeqListRef<uint> reward = argentDailyDataByIndex.Reward;
+ int num = Mathf.Min((int)reward.count, transform2.childCount);
+ int i;
+ for (i = 0; i < num; i++)
+ {
+ Transform child = transform2.GetChild(i);
+ child.gameObject.SetActive(true);
+ XSingleton<XItemDrawerMgr>.singleton.normalItemDrawer.DrawItem(child.gameObject, (int)reward[i, 0], (int)reward[i, 1], true);
+ IXUISprite ixuisprite = child.gameObject.transform.Find("Icon").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.ID = (ulong)reward[i, 0];
+ ixuisprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(XSingleton<UiUtility>.singleton.OnItemClick));
+ }
+ while (i < transform2.childCount)
+ {
+ transform2.GetChild(i++).gameObject.SetActive(false);
+ }
+ }
+ }
+
+ private void WrapContentInit(Transform itemTransform, int index)
+ {
+ bool flag = this._curBlessType == XWelfareNiceGirlHandler.BlessType.DialyGift;
+ if (flag)
+ {
+ this.DailyGiftContentInit(itemTransform, index);
+ }
+ else
+ {
+ this.SpecialGiftContentInit(itemTransform, index);
+ }
+ }
+
+ private void DailyGiftContentInit(Transform itemTransform, int index)
+ {
+ IXUIButton ixuibutton = itemTransform.Find("GetBtn").GetComponent("XUIButton") as IXUIButton;
+ ixuibutton.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnClickDailyBtn));
+ }
+
+ private bool OnClickDailyBtn(IXUIButton button)
+ {
+ uint num = (uint)button.ID;
+ bool flag = num > 0u;
+ if (flag)
+ {
+ XWelfareDocument.Doc.SendArgentaActivityInfo(2u, num);
+ }
+ return true;
+ }
+
+ private void SpecialGiftContentInit(Transform itemTransform, int index)
+ {
+ IXUIButton ixuibutton = itemTransform.Find("OperateBtn").GetComponent("XUIButton") as IXUIButton;
+ ixuibutton.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnClickOperateBtn));
+ }
+
+ private bool OnClickOperateBtn(IXUIButton button)
+ {
+ uint num = (uint)button.ID;
+ uint activityState = XTempActivityDocument.Doc.GetActivityState(7u, num);
+ bool flag = activityState == 0u;
+ if (flag)
+ {
+ SuperActivityTask.RowData[] table = XTempActivityDocument.SuperActivityTaskTable.Table;
+ for (int i = 0; i < table.Length; i++)
+ {
+ bool flag2 = table[i].taskid == num;
+ if (flag2)
+ {
+ SuperActivityTask.RowData rowData = table[i];
+ bool flag3 = rowData.arg != null && rowData.arg.Length != 0;
+ if (flag3)
+ {
+ bool flag4 = rowData.arg[0] == 1;
+ if (flag4)
+ {
+ DlgBase<DungeonSelect, DungeonSelectBehaviour>.singleton.SelectChapter(rowData.arg[1], (uint)rowData.arg[2]);
+ }
+ else
+ {
+ bool flag5 = rowData.arg[0] == 2;
+ if (flag5)
+ {
+ DlgBase<TheExpView, TheExpBehaviour>.singleton.ShowView(rowData.arg[1]);
+ }
+ }
+ }
+ else
+ {
+ XSingleton<XGameSysMgr>.singleton.OpenSystem((int)rowData.jump);
+ }
+ return true;
+ }
+ }
+ }
+ else
+ {
+ XTempActivityDocument.Doc.GetActivityAwards(7u, num);
+ }
+ return true;
+ }
+
+ private bool OnTabChecked(IXUICheckBox iXUICheckBox)
+ {
+ bool flag = !iXUICheckBox.bChecked;
+ bool result;
+ if (flag)
+ {
+ result = false;
+ }
+ else
+ {
+ this._curBlessType = (XWelfareNiceGirlHandler.BlessType)iXUICheckBox.ID;
+ this.RefreshScorllViewContent();
+ result = true;
+ }
+ return result;
+ }
+
+ public override void OnUpdate()
+ {
+ base.OnUpdate();
+ this.SetRewardLeftTime();
+ }
+
+ private void SetRewardLeftTime()
+ {
+ int num = (int)(XWelfareDocument.Doc.ActivityLeftTime - (uint)((int)Time.realtimeSinceStartup));
+ bool flag = num >= 1;
+ if (flag)
+ {
+ this._CDRewards.gameObject.SetActive(true);
+ string str = string.Format(XSingleton<XStringTable>.singleton.GetString("MulActivity_Tips2"), ":");
+ bool flag2 = num >= 43200;
+ if (flag2)
+ {
+ this._CDRewards.SetText(str + XSingleton<UiUtility>.singleton.TimeDuarationFormatString(num, 4));
+ }
+ else
+ {
+ this._CDRewards.SetText(str + XSingleton<UiUtility>.singleton.TimeDuarationFormatString(num, 5));
+ }
+ }
+ else
+ {
+ this._CDRewards.gameObject.SetActive(false);
+ }
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/XWelfareNiceGirlHandler.cs.meta b/Client/Assets/Scripts/XMainClient/UI/XWelfareNiceGirlHandler.cs.meta
new file mode 100644
index 00000000..afc1c8db
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XWelfareNiceGirlHandler.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: c45af9bb14e76ab4a849924907185238
+timeCreated: 1611404501
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/XWelfareRewardBackHandler.cs b/Client/Assets/Scripts/XMainClient/UI/XWelfareRewardBackHandler.cs
new file mode 100644
index 00000000..1bce253f
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XWelfareRewardBackHandler.cs
@@ -0,0 +1,1134 @@
+using System;
+using System.Collections.Generic;
+using KKSG;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class XWelfareRewardBackHandler : DlgHandlerBase
+ {
+ protected override string FileName
+ {
+ get
+ {
+ return "GameSystem/Welfare/RewardBackFrame";
+ }
+ }
+
+ private IXUILabel mTipName;
+
+ private IXUIPanel mPanelHint;
+
+ private IXUISprite mTemplate;
+
+ private IXUISprite mNormalFind;
+
+ private IXUISprite mPerfectFind;
+
+ private bool mIsNormalFind = false;
+
+ private bool mIsToolFind = false;
+
+ private IXUISprite mCloseDoFind;
+
+ private IXUIScrollView mScrollView;
+
+ private IXUISprite mButtonsContent;
+
+ private IXUISprite mAilin;
+
+ private IXUILabel mFindBackName;
+
+ private IXUILabel mFindBackInfoLabel;
+
+ private IXUILabel mFindBackNum;
+
+ private IXUIButton mFindBackSub;
+
+ private IXUIButton mFindBackAdd;
+
+ private IXUILabel mCostNum;
+
+ private IXUISprite mMoneyType;
+
+ private IXUIButton mDoFindBack;
+
+ private IXUIButton mCancelFindBack;
+
+ private IXUISprite mItemTemplate;
+
+ private IXUIInput mNumberInput;
+
+ private XUIPool mRewardBackPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ private XUIPool mRewardItemPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ private Dictionary<int, FindBackData> mFindBackInfo = new Dictionary<int, FindBackData>();
+
+ private XWelfareDocument _doc;
+
+ private int mWanFindNum = 0;
+
+ private int mFindMax = 0;
+
+ private int mFindID = 0;
+
+ private FindBackData mCurData = null;
+
+ private int mMaxFatige = 225000;
+
+ private int mFullFatige = 200000;
+
+ private bool mHasInfo = false;
+
+ private int mBackItem2DragonCoin = 5;
+
+ protected override void Init()
+ {
+ base.Init();
+ this._doc = XDocuments.GetSpecificDocument<XWelfareDocument>(XWelfareDocument.uuID);
+ this.mTipName = (base.PanelObject.transform.Find("tipname").GetComponent("XUILabel") as IXUILabel);
+ this.mPanelHint = (base.PanelObject.transform.Find("PanelHint").GetComponent("XUIPanel") as IXUIPanel);
+ this.mTemplate = (base.PanelObject.transform.Find("Reward/RightView/ActivityTpl").GetComponent("XUISprite") as IXUISprite);
+ this.mRewardBackPool.SetupPool(this.mTemplate.parent.gameObject, this.mTemplate.gameObject, 5u, false);
+ this.mNormalFind = (base.PanelObject.transform.Find("buttons/SelectNormal").GetComponent("XUISprite") as IXUISprite);
+ this.mPerfectFind = (base.PanelObject.transform.Find("buttons/SelectPerfect").GetComponent("XUISprite") as IXUISprite);
+ this.mCloseDoFind = (base.PanelObject.transform.Find("PanelHint/back").GetComponent("XUISprite") as IXUISprite);
+ this.mScrollView = (base.PanelObject.transform.Find("Reward/RightView").GetComponent("XUIScrollView") as IXUIScrollView);
+ this.mButtonsContent = (base.PanelObject.transform.Find("buttons").GetComponent("XUISprite") as IXUISprite);
+ this.mAilin = (base.PanelObject.transform.Find("ailin").GetComponent("XUISprite") as IXUISprite);
+ this.mFindBackName = (base.PanelObject.transform.Find("PanelHint/findname").GetComponent("XUILabel") as IXUILabel);
+ this.mFindBackInfoLabel = (base.PanelObject.transform.Find("PanelHint/findinfo").GetComponent("XUILabel") as IXUILabel);
+ this.mFindBackNum = (base.PanelObject.transform.Find("PanelHint/Count/number").GetComponent("XUILabel") as IXUILabel);
+ this.mFindBackSub = (base.PanelObject.transform.Find("PanelHint/Count/Sub").GetComponent("XUIButton") as IXUIButton);
+ this.mFindBackAdd = (base.PanelObject.transform.Find("PanelHint/Count/Add").GetComponent("XUIButton") as IXUIButton);
+ this.mCostNum = (base.PanelObject.transform.Find("PanelHint/MoneyNum").GetComponent("XUILabel") as IXUILabel);
+ this.mMoneyType = (base.PanelObject.transform.Find("PanelHint/MoneyNum/icon").GetComponent("XUISprite") as IXUISprite);
+ this.mDoFindBack = (base.PanelObject.transform.Find("PanelHint/BtnOK").GetComponent("XUIButton") as IXUIButton);
+ this.mCancelFindBack = (base.PanelObject.transform.Find("PanelHint/BtnNO").GetComponent("XUIButton") as IXUIButton);
+ this.mItemTemplate = (base.PanelObject.transform.Find("PanelHint/ItemTemplate").GetComponent("XUISprite") as IXUISprite);
+ this.mRewardItemPool.SetupPool(this.mPanelHint.gameObject, this.mItemTemplate.gameObject, 3u, false);
+ this.mNumberInput = (base.PanelObject.transform.Find("PanelHint/Count").GetComponent("XUIInput") as IXUIInput);
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ this.mPanelHint.SetVisible(false);
+ this.mWanFindNum = 0;
+ this.mFindMax = 0;
+ this.mFindID = 0;
+ int.TryParse(XSingleton<XGlobalConfig>.singleton.GetValue("FindBackTicketExchangeDragon"), out this.mBackItem2DragonCoin);
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ this.mNormalFind.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnFindTypeClick));
+ this.mNormalFind.ID = 0UL;
+ this.mPerfectFind.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnFindTypeClick));
+ this.mPerfectFind.ID = 1UL;
+ this.mCloseDoFind.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnCloseFindBorad));
+ this.mFindBackSub.RegisterClickEventHandler(new ButtonClickEventHandler(this.SubFindCount));
+ this.mFindBackAdd.RegisterClickEventHandler(new ButtonClickEventHandler(this.AddFindCount));
+ this.mDoFindBack.RegisterClickEventHandler(new ButtonClickEventHandler(this.DoFindBack));
+ this.mCancelFindBack.RegisterClickEventHandler(new ButtonClickEventHandler(this.CancelFindBack));
+ this.mNumberInput.RegisterChangeEventHandler(new InputChangeEventHandler(this.InputChangeEventHandler));
+ }
+
+ private int compare(ItemFindBackInfo2Client a, ItemFindBackInfo2Client b)
+ {
+ return b.dayTime.CompareTo(a.dayTime);
+ }
+
+ private int compareids(int a, int b)
+ {
+ bool flag = this.mFindBackInfo[a].maxfindback == 0 && this.mFindBackInfo[b].maxfindback == 0;
+ int result;
+ if (flag)
+ {
+ result = b.CompareTo(a);
+ }
+ else
+ {
+ bool flag2 = this.mFindBackInfo[a].maxfindback == 0;
+ if (flag2)
+ {
+ result = 1;
+ }
+ else
+ {
+ bool flag3 = this.mFindBackInfo[b].maxfindback == 0;
+ if (flag3)
+ {
+ result = -1;
+ }
+ else
+ {
+ bool flag4 = this.GetFindBackCost(this.mFindBackInfo[a], true) == 0 && this.GetFindBackCost(this.mFindBackInfo[a], false) == 0 && this.GetFindBackCost(this.mFindBackInfo[b], true) == 0 && this.GetFindBackCost(this.mFindBackInfo[b], false) == 0;
+ if (flag4)
+ {
+ result = b.CompareTo(a);
+ }
+ else
+ {
+ bool flag5 = this.GetFindBackCost(this.mFindBackInfo[a], true) == 0 && this.GetFindBackCost(this.mFindBackInfo[a], false) == 0;
+ if (flag5)
+ {
+ result = -1;
+ }
+ else
+ {
+ bool flag6 = this.GetFindBackCost(this.mFindBackInfo[b], true) == 0 && this.GetFindBackCost(this.mFindBackInfo[b], false) == 0;
+ if (flag6)
+ {
+ result = 1;
+ }
+ else
+ {
+ bool flag7 = this.HasExpFindBack(this.mFindBackInfo[a]) && this.HasExpFindBack(this.mFindBackInfo[b]);
+ if (flag7)
+ {
+ result = b.CompareTo(a);
+ }
+ else
+ {
+ bool flag8 = this.HasExpFindBack(this.mFindBackInfo[a]);
+ if (flag8)
+ {
+ result = -1;
+ }
+ else
+ {
+ bool flag9 = this.HasExpFindBack(this.mFindBackInfo[b]);
+ if (flag9)
+ {
+ result = 1;
+ }
+ else
+ {
+ bool flag10 = this.HasDiceBack(this.mFindBackInfo[a]) || this.HasDiceBack(this.mFindBackInfo[b]);
+ if (flag10)
+ {
+ int num = int.Parse(XSingleton<XGlobalConfig>.singleton.GetValue("RiskDiceMaxNum"));
+ bool flag11 = XSuperRiskDocument.Doc.LeftDiceTime >= num;
+ if (flag11)
+ {
+ bool flag12 = this.HasDiceBack(this.mFindBackInfo[a]);
+ if (flag12)
+ {
+ return 1;
+ }
+ return -1;
+ }
+ }
+ result = b.CompareTo(a);
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ return result;
+ }
+
+ private void InitBackData()
+ {
+ bool flag = this._doc == null;
+ if (flag)
+ {
+ this._doc = XDocuments.GetSpecificDocument<XWelfareDocument>(XWelfareDocument.uuID);
+ }
+ List<ItemFindBackInfo2Client> findBackInfo = this._doc.FindBackInfo;
+ this.mFindBackInfo.Clear();
+ this.mHasInfo = false;
+ bool flag2 = findBackInfo != null;
+ if (flag2)
+ {
+ for (int i = 0; i < findBackInfo.Count; i++)
+ {
+ bool flag3 = findBackInfo[i].dragonCoinFindBackItems.Count != 0 || findBackInfo[i].goldCoinFindBackItems.Count != 0;
+ if (flag3)
+ {
+ this.mHasInfo = true;
+ }
+ }
+ }
+ bool flag4 = !this.mHasInfo;
+ if (flag4)
+ {
+ bool flag5 = base.IsVisible();
+ if (flag5)
+ {
+ this.mButtonsContent.SetVisible(false);
+ this.mAilin.SetVisible(true);
+ this.mTipName.SetVisible(false);
+ }
+ }
+ else
+ {
+ bool flag6 = base.IsVisible();
+ if (flag6)
+ {
+ this.mButtonsContent.SetVisible(true);
+ this.mAilin.SetVisible(false);
+ }
+ findBackInfo.Sort(new Comparison<ItemFindBackInfo2Client>(this.compare));
+ for (int j = 0; j < findBackInfo.Count; j++)
+ {
+ int num = XFastEnumIntEqualityComparer<ItemFindBackType>.ToInt(findBackInfo[j].id);
+ bool flag7 = this.mFindBackInfo.ContainsKey(num);
+ if (flag7)
+ {
+ this.mFindBackInfo[num].findbackinfo.Add(findBackInfo[j]);
+ }
+ else
+ {
+ FindBackData findBackData = new FindBackData();
+ findBackData.findbackinfo.Add(findBackInfo[j]);
+ this.mFindBackInfo[num] = findBackData;
+ findBackData.findid = num;
+ this.mFindBackInfo[num].isfind = false;
+ this.mFindBackInfo[num].findindex = 0;
+ }
+ this.mFindBackInfo[num].maxfindback += findBackInfo[j].findBackCount;
+ for (int k = 0; k < findBackInfo[j].goldCoinFindBackItems.Count; k++)
+ {
+ int itemID = (int)findBackInfo[j].goldCoinFindBackItems[k].itemID;
+ bool flag8 = findBackInfo[j].findBackCount == 0 && !this.mFindBackInfo[num].isfind;
+ if (flag8)
+ {
+ this.mFindBackInfo[num].findindex++;
+ }
+ bool flag9 = findBackInfo[j].findBackCount != 0;
+ if (flag9)
+ {
+ this.mFindBackInfo[num].isfind = true;
+ }
+ bool flag10 = !this.mFindBackInfo[num].goldItemCount.ContainsKey(itemID);
+ if (flag10)
+ {
+ this.mFindBackInfo[num].goldItemCount[itemID] = new List<int>();
+ }
+ this.mFindBackInfo[num].goldItemCount[itemID].Add((int)findBackInfo[j].goldCoinFindBackItems[k].itemCount);
+ }
+ List<KeyValuePair<int, List<int>>> list = new List<KeyValuePair<int, List<int>>>(this.mFindBackInfo[num].goldItemCount);
+ list.Sort((KeyValuePair<int, List<int>> s1, KeyValuePair<int, List<int>> s2) => s1.Key.CompareTo(s2.Key));
+ this.mFindBackInfo[num].goldItemCount.Clear();
+ for (int l = 0; l < list.Count; l++)
+ {
+ this.mFindBackInfo[num].goldItemCount[list[l].Key] = list[l].Value;
+ }
+ bool flag11 = findBackInfo[j].id == ItemFindBackType.NestBack;
+ bool flag12 = flag11;
+ if (flag12)
+ {
+ ItemBackTable.RowData rewardBackByIndex = XWelfareDocument.GetRewardBackByIndex(num);
+ bool flag13 = rewardBackByIndex != null;
+ if (flag13)
+ {
+ for (int m = 0; m < (int)rewardBackByIndex.ItemDragonCoin.count; m++)
+ {
+ bool flag14 = !this.mFindBackInfo[num].dragonCoinItemCount.ContainsKey(rewardBackByIndex.ItemDragonCoin[m, 0]);
+ if (flag14)
+ {
+ this.mFindBackInfo[num].dragonCoinItemCount[rewardBackByIndex.ItemDragonCoin[m, 0]] = new List<int>();
+ }
+ this.mFindBackInfo[num].dragonCoinItemCount[rewardBackByIndex.ItemDragonCoin[m, 0]].Add(rewardBackByIndex.ItemDragonCoin[m, 1]);
+ }
+ }
+ }
+ else
+ {
+ for (int n = 0; n < findBackInfo[j].dragonCoinFindBackItems.Count; n++)
+ {
+ int itemID2 = (int)findBackInfo[j].dragonCoinFindBackItems[n].itemID;
+ bool flag15 = !this.mFindBackInfo[num].dragonCoinItemCount.ContainsKey(itemID2);
+ if (flag15)
+ {
+ this.mFindBackInfo[num].dragonCoinItemCount[itemID2] = new List<int>();
+ }
+ this.mFindBackInfo[num].dragonCoinItemCount[itemID2].Add((int)findBackInfo[j].dragonCoinFindBackItems[n].itemCount);
+ }
+ }
+ list = new List<KeyValuePair<int, List<int>>>(this.mFindBackInfo[num].dragonCoinItemCount);
+ list.Sort((KeyValuePair<int, List<int>> s1, KeyValuePair<int, List<int>> s2) => s1.Key.CompareTo(s2.Key));
+ this.mFindBackInfo[num].dragonCoinItemCount.Clear();
+ for (int num2 = 0; num2 < list.Count; num2++)
+ {
+ this.mFindBackInfo[num].dragonCoinItemCount[list[num2].Key] = list[num2].Value;
+ }
+ }
+ }
+ }
+
+ public bool HasRedPoint()
+ {
+ List<int> list = new List<int>(this.mFindBackInfo.Keys);
+ int i = 0;
+ while (i < this.mFindBackInfo.Count)
+ {
+ bool flag = XFastEnumIntEqualityComparer<ItemFindBackType>.ToInt(ItemFindBackType.FATIGUE_GET) <= list[i] && XFastEnumIntEqualityComparer<ItemFindBackType>.ToInt(ItemFindBackType.FATIGUE_BUY) >= list[i];
+ if (!flag)
+ {
+ goto IL_61;
+ }
+ bool flag2 = (int)XBagDocument.BagDoc.GetVirtualItemCount(ItemEnum.FATIGUE) >= this.mFullFatige;
+ if (!flag2)
+ {
+ goto IL_61;
+ }
+ IL_DF:
+ i++;
+ continue;
+ IL_61:
+ bool flag3 = list[i] == XFastEnumIntEqualityComparer<ItemFindBackType>.ToInt(ItemFindBackType.DICE_BACK);
+ if (flag3)
+ {
+ int num = int.Parse(XSingleton<XGlobalConfig>.singleton.GetValue("RiskDiceMaxNum"));
+ bool flag4 = XSuperRiskDocument.Doc.LeftDiceTime >= num;
+ if (flag4)
+ {
+ goto IL_DF;
+ }
+ }
+ bool flag5 = this.mFindBackInfo[list[i]].maxfindback > 0;
+ if (flag5)
+ {
+ return !this._doc.GetFirstClick(XSysDefine.XSyS_Welfare_RewardBack);
+ }
+ goto IL_DF;
+ }
+ return false;
+ }
+
+ public override void RefreshData()
+ {
+ this.InitBackData();
+ bool flag = !base.IsVisible();
+ if (!flag)
+ {
+ this.mRewardBackPool.ReturnAll(false);
+ bool flag2 = XSingleton<XAttributeMgr>.singleton.XPlayerData == null;
+ if (!flag2)
+ {
+ XSingleton<XDebug>.singleton.AddLog("Findback info num: ", this.mFindBackInfo.Count.ToString(), null, null, null, null, XDebugColor.XDebug_None);
+ List<int> list = new List<int>(this.mFindBackInfo.Keys);
+ int num = 0;
+ uint level = XSingleton<XAttributeMgr>.singleton.XPlayerData.Level;
+ XLevelSealDocument specificDocument = XDocuments.GetSpecificDocument<XLevelSealDocument>(XLevelSealDocument.uuID);
+ ulong itemCount = XBagDocument.BagDoc.GetItemCount(XFastEnumIntEqualityComparer<ItemEnum>.ToInt(ItemEnum.FINDBACK_ITEM));
+ bool flag3 = list.Count > 1;
+ if (flag3)
+ {
+ list.Sort(new Comparison<int>(this.compareids));
+ }
+ for (int i = 0; i < this.mFindBackInfo.Count; i++)
+ {
+ bool flag4 = ((this.mIsNormalFind && this.mFindBackInfo[list[i]].goldItemCount.Count == 0) || (!this.mIsNormalFind && this.mFindBackInfo[list[i]].dragonCoinItemCount.Count == 0)) && (this.GetFindBackCost(this.mFindBackInfo[list[i]], true) != 0 || this.GetFindBackCost(this.mFindBackInfo[list[i]], false) != 0);
+ if (!flag4)
+ {
+ bool flag5 = (level == 32u || level == 40u || level == 50u) && specificDocument.IsInLevelSeal() && list[i] == 4;
+ if (!flag5)
+ {
+ GameObject gameObject = this.mRewardBackPool.FetchGameObject(false);
+ gameObject.transform.localPosition = new Vector3(this.mRewardBackPool.TplPos.x, this.mRewardBackPool.TplPos.y - (float)(num * this.mRewardBackPool.TplHeight), 0f);
+ num++;
+ XSingleton<XDebug>.singleton.AddLog("The item index: ", num.ToString(), null, null, null, null, XDebugColor.XDebug_None);
+ IXUISprite ixuisprite = gameObject.transform.Find("Item").GetComponent("XUISprite") as IXUISprite;
+ IXUISprite ixuisprite2 = gameObject.transform.Find("Item1").GetComponent("XUISprite") as IXUISprite;
+ IXUISprite ixuisprite3 = gameObject.transform.Find("Item2").GetComponent("XUISprite") as IXUISprite;
+ IXUILabel ixuilabel = gameObject.transform.Find("name").GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel2 = gameObject.transform.Find("desc").GetComponent("XUILabel") as IXUILabel;
+ IXUIButton ixuibutton = gameObject.transform.Find("Go").GetComponent("XUIButton") as IXUIButton;
+ IXUIButton ixuibutton2 = gameObject.transform.Find("Free").GetComponent("XUIButton") as IXUIButton;
+ IXUISprite ixuisprite4 = gameObject.transform.Find("Go/icon").GetComponent("XUISprite") as IXUISprite;
+ IXUISprite ixuisprite5 = gameObject.transform.Find("GoBoader").GetComponent("XUISprite") as IXUISprite;
+ ixuibutton.RegisterClickEventHandler(new ButtonClickEventHandler(this.TryFindBack));
+ ixuibutton.ID = (ulong)((long)list[i]);
+ ixuibutton2.RegisterClickEventHandler(new ButtonClickEventHandler(this.TryFindBack));
+ ixuibutton2.ID = (ulong)((long)list[i]);
+ ixuisprite5.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.WarningFatigeFull));
+ bool flag6 = this.GetFindBackCost(this.mFindBackInfo[list[i]], true) == 0 && this.GetFindBackCost(this.mFindBackInfo[list[i]], false) == 0;
+ Dictionary<int, List<int>> dictionary;
+ if (flag6)
+ {
+ ixuibutton.SetVisible(false);
+ ixuibutton2.SetVisible(true);
+ ixuibutton = ixuibutton2;
+ bool flag7 = this.mIsNormalFind;
+ if (flag7)
+ {
+ dictionary = this.mFindBackInfo[list[i]].goldItemCount;
+ }
+ else
+ {
+ dictionary = this.mFindBackInfo[list[i]].dragonCoinItemCount;
+ }
+ }
+ else
+ {
+ ixuibutton.SetVisible(true);
+ ixuibutton2.SetVisible(false);
+ bool flag8 = this.mIsNormalFind;
+ if (flag8)
+ {
+ dictionary = this.mFindBackInfo[list[i]].goldItemCount;
+ ixuisprite4.SetSprite("icon-1");
+ }
+ else
+ {
+ dictionary = this.mFindBackInfo[list[i]].dragonCoinItemCount;
+ this.mWanFindNum = 1;
+ this.mCurData = this.mFindBackInfo[list[i]];
+ bool flag9 = itemCount > 0UL && (int)itemCount * this.mBackItem2DragonCoin >= this.GetCurCost();
+ if (flag9)
+ {
+ ixuisprite4.SetSprite("icon-18");
+ }
+ else
+ {
+ ixuisprite4.SetSprite("icon-28");
+ }
+ }
+ }
+ bool flag10 = dictionary == null || dictionary.Count == 0;
+ if (flag10)
+ {
+ return;
+ }
+ IXUISprite[] array = new IXUISprite[]
+ {
+ ixuisprite,
+ ixuisprite2,
+ ixuisprite3
+ };
+ for (int j = 0; j < array.Length; j++)
+ {
+ array[j].SetVisible(false);
+ }
+ List<int> list2 = new List<int>(dictionary.Keys);
+ for (int k = 0; k < dictionary.Count; k++)
+ {
+ bool flag11 = k >= 3;
+ if (flag11)
+ {
+ break;
+ }
+ array[k].SetVisible(true);
+ XItem xitem = XBagDocument.MakeXItem(list2[k], false);
+ xitem.itemCount = dictionary[list2[k]][0];
+ XSingleton<XItemDrawerMgr>.singleton.DrawItem(array[k].gameObject, xitem);
+ IXUISprite ixuisprite6 = array[k].transform.Find("Icon").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite6.ID = (ulong)((long)list2[k]);
+ ixuisprite6.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.ShowItemTip));
+ }
+ ItemBackTable.RowData rewardBackByIndex = XWelfareDocument.GetRewardBackByIndex(list[i]);
+ bool flag12 = rewardBackByIndex != null;
+ if (flag12)
+ {
+ ixuilabel.SetText(rewardBackByIndex.SystemName);
+ ixuilabel2.SetText(rewardBackByIndex.Desc);
+ }
+ ixuisprite5.SetVisible(false);
+ bool flag13 = this.mFindBackInfo[list[i]].maxfindback <= 0;
+ if (flag13)
+ {
+ ixuibutton.SetEnable(false, false);
+ }
+ else
+ {
+ bool flag14 = this.mFindBackInfo[list[i]].goldItemCount.ContainsKey(XFastEnumIntEqualityComparer<ItemEnum>.ToInt(ItemEnum.FATIGUE)) || this.mFindBackInfo[list[i]].dragonCoinItemCount.ContainsKey(XFastEnumIntEqualityComparer<ItemEnum>.ToInt(ItemEnum.FATIGUE));
+ if (flag14)
+ {
+ bool flag15 = XBagDocument.BagDoc.GetVirtualItemCount(ItemEnum.FATIGUE) >= 200UL;
+ if (flag15)
+ {
+ ixuibutton.SetEnable(false, false);
+ ixuisprite5.SetVisible(true);
+ }
+ else
+ {
+ ixuibutton.SetEnable(true, false);
+ ixuisprite5.SetVisible(false);
+ }
+ }
+ else
+ {
+ bool flag16 = this.mFindBackInfo[list[i]].goldItemCount.ContainsKey(XFastEnumIntEqualityComparer<ItemEnum>.ToInt(ItemEnum.DICE)) || this.mFindBackInfo[list[i]].dragonCoinItemCount.ContainsKey(XFastEnumIntEqualityComparer<ItemEnum>.ToInt(ItemEnum.DICE));
+ if (flag16)
+ {
+ int num2 = int.Parse(XSingleton<XGlobalConfig>.singleton.GetValue("RiskDiceMaxNum"));
+ bool flag17 = XSuperRiskDocument.Doc.LeftDiceTime >= num2;
+ if (flag17)
+ {
+ ixuibutton.SetEnable(false, false);
+ }
+ else
+ {
+ ixuibutton.SetEnable(true, false);
+ }
+ }
+ else
+ {
+ ixuibutton.SetEnable(true, false);
+ }
+ }
+ }
+ }
+ }
+ }
+ bool flag18 = XBagDocument.BagDoc.GetVirtualItemCount(ItemEnum.FATIGUE) >= 200UL && this.mHasInfo;
+ if (flag18)
+ {
+ this.mTipName.SetVisible(true);
+ }
+ else
+ {
+ this.mTipName.SetVisible(false);
+ }
+ }
+ }
+ }
+
+ public void OnFindTypeClick(IXUISprite sp)
+ {
+ bool flag = sp.ID == 1UL;
+ if (flag)
+ {
+ this.mIsNormalFind = true;
+ }
+ else
+ {
+ this.mIsNormalFind = false;
+ }
+ this.RefreshData();
+ this.mScrollView.SetPosition(0f);
+ }
+
+ public void OnCloseFindBorad(IXUISprite sp)
+ {
+ this.mPanelHint.SetVisible(false);
+ }
+
+ private int GetFindBackCost(FindBackData data, bool isdragoncoin)
+ {
+ int num = 0;
+ for (int i = 0; i < data.findbackinfo.Count; i++)
+ {
+ if (isdragoncoin)
+ {
+ num += data.findbackinfo[i].dragonCoinCost;
+ }
+ else
+ {
+ num += data.findbackinfo[i].goldCoinCost;
+ }
+ }
+ return num;
+ }
+
+ private bool HasExpFindBack(FindBackData data)
+ {
+ List<int> list = new List<int>(data.goldItemCount.Keys);
+ bool flag = list.Contains(XFastEnumIntEqualityComparer<ItemEnum>.ToInt(ItemEnum.EXP));
+ bool result;
+ if (flag)
+ {
+ result = true;
+ }
+ else
+ {
+ list = new List<int>(data.dragonCoinItemCount.Keys);
+ bool flag2 = list.Contains(XFastEnumIntEqualityComparer<ItemEnum>.ToInt(ItemEnum.EXP));
+ result = flag2;
+ }
+ return result;
+ }
+
+ private bool HasDiceBack(FindBackData data)
+ {
+ List<int> list = new List<int>(data.goldItemCount.Keys);
+ bool flag = list.Contains(XFastEnumIntEqualityComparer<ItemEnum>.ToInt(ItemEnum.DICE));
+ bool result;
+ if (flag)
+ {
+ result = true;
+ }
+ else
+ {
+ list = new List<int>(data.dragonCoinItemCount.Keys);
+ bool flag2 = list.Contains(XFastEnumIntEqualityComparer<ItemEnum>.ToInt(ItemEnum.DICE));
+ result = flag2;
+ }
+ return result;
+ }
+
+ private void InitFindBackItem()
+ {
+ this.mRewardItemPool.FakeReturnAll();
+ bool flag = this.mIsNormalFind;
+ Dictionary<int, List<int>> dictionary;
+ if (flag)
+ {
+ dictionary = this.mCurData.goldItemCount;
+ }
+ else
+ {
+ dictionary = this.mCurData.dragonCoinItemCount;
+ }
+ bool flag2 = dictionary == null || dictionary.Count == 0;
+ if (!flag2)
+ {
+ List<int> list = new List<int>(dictionary.Keys);
+ for (int i = 0; i < dictionary.Count; i++)
+ {
+ GameObject gameObject = this.mRewardItemPool.FetchGameObject(false);
+ XItem xitem = XBagDocument.MakeXItem(list[i], false);
+ ItemBackTable.RowData rewardBackByIndex = XWelfareDocument.GetRewardBackByIndex(this.mCurData.findid);
+ bool flag3 = rewardBackByIndex != null;
+ if (flag3)
+ {
+ int num = Mathf.Min(this.mCurData.findbackinfo[0].findBackCount, this.mWanFindNum);
+ int num2 = (num == this.mWanFindNum) ? 0 : (this.mWanFindNum - num);
+ xitem.itemCount = num * dictionary[list[i]][0];
+ int num3 = 1;
+ for (int j = 0; j < num2 / rewardBackByIndex.count; j++)
+ {
+ bool flag4 = j + 1 < dictionary[list[i]].Count;
+ if (flag4)
+ {
+ xitem.itemCount += dictionary[list[i]][j + 1] * rewardBackByIndex.count;
+ num3++;
+ }
+ }
+ bool flag5 = num3 < dictionary[list[i]].Count;
+ if (flag5)
+ {
+ xitem.itemCount += num2 % rewardBackByIndex.count * dictionary[list[i]][num3];
+ }
+ }
+ int num4 = (i % 2 == 0) ? 1 : -1;
+ int num5 = this.mRewardItemPool.TplWidth / 2;
+ bool flag6 = list.Count % 2 == 1;
+ if (flag6)
+ {
+ num5 = 0;
+ }
+ xitem.Description.ItemDrawer.DrawItem(gameObject, xitem, true);
+ gameObject.transform.localPosition = new Vector3(this.mRewardItemPool.TplPos.x + (float)(num4 * ((i + 1) / 2) * this.mRewardItemPool.TplWidth) + (float)num5, this.mRewardItemPool.TplPos.y, this.mRewardItemPool.TplPos.z);
+ IXUISprite ixuisprite = gameObject.GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.ID = (ulong)((long)list[i]);
+ ixuisprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.ShowItemTip));
+ }
+ }
+ }
+
+ private bool TryFindBack(IXUIButton btn)
+ {
+ this.mFindID = (int)btn.ID;
+ this.mWanFindNum = 1;
+ this.mCurData = this.mFindBackInfo[this.mFindID];
+ this.mFindMax = this.mCurData.maxfindback;
+ this.mPanelHint.SetVisible(true);
+ this.mRewardItemPool.ReturnAll(false);
+ ulong itemCount = XBagDocument.BagDoc.GetItemCount(XFastEnumIntEqualityComparer<ItemEnum>.ToInt(ItemEnum.FINDBACK_ITEM));
+ bool flag = !this.mIsNormalFind && (int)itemCount * this.mBackItem2DragonCoin >= this.GetCurCost();
+ if (flag)
+ {
+ this.mIsToolFind = true;
+ }
+ else
+ {
+ this.mIsToolFind = false;
+ }
+ this.RefreshFindInfo();
+ return true;
+ }
+
+ private int GetCurCost()
+ {
+ int num = 0;
+ int num2 = this.mWanFindNum;
+ bool flag = this.mIsNormalFind;
+ if (flag)
+ {
+ for (int i = 0; i < this.mCurData.findbackinfo.Count; i++)
+ {
+ int num3 = (num2 < this.mCurData.findbackinfo[i].findBackCount) ? num2 : this.mCurData.findbackinfo[i].findBackCount;
+ bool flag2 = num2 > 0;
+ if (!flag2)
+ {
+ break;
+ }
+ num += num3 * this.mCurData.findbackinfo[i].goldCoinCost;
+ num2 -= this.mCurData.findbackinfo[i].findBackCount;
+ }
+ }
+ else
+ {
+ for (int j = 0; j < this.mCurData.findbackinfo.Count; j++)
+ {
+ int num4 = (num2 < this.mCurData.findbackinfo[j].findBackCount) ? num2 : this.mCurData.findbackinfo[j].findBackCount;
+ bool flag3 = num2 > 0;
+ if (!flag3)
+ {
+ break;
+ }
+ num += num4 * this.mCurData.findbackinfo[j].dragonCoinCost;
+ num2 -= this.mCurData.findbackinfo[j].findBackCount;
+ }
+ }
+ return num;
+ }
+
+ public int GetSingleFindBackNum()
+ {
+ bool flag = this.mIsNormalFind;
+ if (flag)
+ {
+ List<List<int>> list = new List<List<int>>(this.mCurData.goldItemCount.Values);
+ bool flag2 = list.Count > 0;
+ if (flag2)
+ {
+ return list[0][0];
+ }
+ }
+ else
+ {
+ List<List<int>> list2 = new List<List<int>>(this.mCurData.dragonCoinItemCount.Values);
+ bool flag3 = list2.Count > 0;
+ if (flag3)
+ {
+ return list2[0][0];
+ }
+ }
+ return 0;
+ }
+
+ private void RefreshFindInfo()
+ {
+ this.mFindBackNum.SetText(this.mWanFindNum.ToString());
+ this.mCostNum.SetText(this.GetCurCost().ToString());
+ bool flag = this.mIsNormalFind;
+ if (flag)
+ {
+ this.mMoneyType.SetSprite("icon-1");
+ this.mFindBackName.SetText(XSingleton<XStringTable>.singleton.GetString("WELFARE_GOLD_BACK"));
+ }
+ else
+ {
+ bool flag2 = !this.mIsToolFind;
+ if (flag2)
+ {
+ this.mMoneyType.SetSprite("icon-28");
+ }
+ else
+ {
+ this.mMoneyType.SetSprite("icon-18");
+ this.mCostNum.SetText((this.GetCurCost() / this.mBackItem2DragonCoin).ToString());
+ }
+ this.mFindBackName.SetText(XSingleton<XStringTable>.singleton.GetString("WELFARE_DRAGON_BACK"));
+ }
+ this.InitFindBackItem();
+ }
+
+ private bool SubFindCount(IXUIButton btn)
+ {
+ this.mWanFindNum--;
+ bool flag = this.mWanFindNum <= 0;
+ if (flag)
+ {
+ this.mWanFindNum = 1;
+ }
+ this.mNumberInput.SetText(this.mWanFindNum.ToString());
+ this.RefreshFindInfo();
+ return true;
+ }
+
+ private bool AddFindCount(IXUIButton btn)
+ {
+ this.mWanFindNum++;
+ bool flag = false;
+ ulong itemCount = XBagDocument.BagDoc.GetItemCount(XFastEnumIntEqualityComparer<ItemEnum>.ToInt(ItemEnum.FINDBACK_ITEM));
+ bool flag2 = this.mIsToolFind;
+ if (flag2)
+ {
+ bool flag3 = this.mWanFindNum <= this.mFindMax;
+ if (flag3)
+ {
+ bool flag4 = this.GetCurCost() > (int)itemCount * this.mBackItem2DragonCoin;
+ if (flag4)
+ {
+ this.mWanFindNum--;
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XSingleton<XStringTable>.singleton.GetString("WELFARE_ITEMMAX"), "fece00");
+ flag = true;
+ }
+ }
+ else
+ {
+ bool flag5 = this.mWanFindNum > this.mFindMax;
+ if (flag5)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XSingleton<XStringTable>.singleton.GetString("WELFARE_REACH_MAX"), "fece00");
+ flag = true;
+ }
+ this.mWanFindNum = ((this.mFindMax > 0) ? this.mFindMax : 1);
+ }
+ }
+ else
+ {
+ bool flag6 = this.mWanFindNum >= this.mFindMax;
+ if (flag6)
+ {
+ bool flag7 = this.mWanFindNum > this.mFindMax;
+ if (flag7)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XSingleton<XStringTable>.singleton.GetString("WELFARE_REACH_MAX"), "fece00");
+ flag = true;
+ }
+ this.mWanFindNum = ((this.mFindMax > 0) ? this.mFindMax : 1);
+ }
+ }
+ bool flag8 = XFastEnumIntEqualityComparer<ItemFindBackType>.ToInt(ItemFindBackType.FATIGUE_GET) <= this.mCurData.findid && XFastEnumIntEqualityComparer<ItemFindBackType>.ToInt(ItemFindBackType.FATIGUE_BUY) >= this.mCurData.findid;
+ if (flag8)
+ {
+ bool flag9 = (int)XBagDocument.BagDoc.GetVirtualItemCount(ItemEnum.FATIGUE) + (this.mWanFindNum - 1) * this.GetSingleFindBackNum() >= this.mFullFatige && this.mWanFindNum > 1;
+ if (flag9)
+ {
+ this.mWanFindNum--;
+ bool flag10 = !flag;
+ if (flag10)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XSingleton<XStringTable>.singleton.GetString("WELFARE_FATIGE_MAX"), "fece00");
+ }
+ }
+ }
+ bool flag11 = XFastEnumIntEqualityComparer<ItemFindBackType>.ToInt(ItemFindBackType.DICE_BACK) == this.mCurData.findid;
+ if (flag11)
+ {
+ int num = int.Parse(XSingleton<XGlobalConfig>.singleton.GetValue("RiskDiceMaxNum"));
+ bool flag12 = XSuperRiskDocument.Doc.LeftDiceTime + this.mWanFindNum * this.GetSingleFindBackNum() > num && this.mWanFindNum > 1;
+ if (flag12)
+ {
+ this.mWanFindNum--;
+ bool flag13 = !flag;
+ if (flag13)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XSingleton<XStringTable>.singleton.GetString("WELFARE_REACH_MAX"), "fece00");
+ }
+ }
+ }
+ this.mNumberInput.SetText(this.mWanFindNum.ToString());
+ this.RefreshFindInfo();
+ return true;
+ }
+
+ private bool DoFindBack(IXUIButton btn)
+ {
+ bool flag = this.mWanFindNum == 0;
+ bool result;
+ if (flag)
+ {
+ result = false;
+ }
+ else
+ {
+ bool flag2 = XFastEnumIntEqualityComparer<ItemFindBackType>.ToInt(ItemFindBackType.FATIGUE_GET) <= this.mCurData.findid && XFastEnumIntEqualityComparer<ItemFindBackType>.ToInt(ItemFindBackType.FATIGUE_BUY) >= this.mCurData.findid;
+ if (flag2)
+ {
+ int num = (int)XBagDocument.BagDoc.GetVirtualItemCount(ItemEnum.FATIGUE);
+ bool flag3 = num + this.mWanFindNum * this.GetSingleFindBackNum() > int.Parse(XSingleton<XGlobalConfig>.singleton.GetValue("MaxFatigue"));
+ if (flag3)
+ {
+ XSingleton<UiUtility>.singleton.ShowFatigueSureDlg(new ButtonClickEventHandler(this.GetFatigueSure));
+ return true;
+ }
+ bool flag4 = num + this.mWanFindNum * this.GetSingleFindBackNum() >= this.mMaxFatige;
+ if (flag4)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XSingleton<XStringTable>.singleton.GetString("WELFARE_FATIGE_FULL"), "fece00");
+ return false;
+ }
+ }
+ bool flag5 = XFastEnumIntEqualityComparer<ItemFindBackType>.ToInt(ItemFindBackType.DICE_BACK) == this.mCurData.findid;
+ if (flag5)
+ {
+ int num2 = int.Parse(XSingleton<XGlobalConfig>.singleton.GetValue("RiskDiceMaxNum"));
+ bool flag6 = XSuperRiskDocument.Doc.LeftDiceTime >= num2;
+ if (flag6)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XSingleton<XStringTable>.singleton.GetString("WELFARE_REACH_MAX"), "fece00");
+ return false;
+ }
+ }
+ bool flag7 = this.mIsNormalFind;
+ if (flag7)
+ {
+ int num3 = (int)XBagDocument.BagDoc.GetVirtualItemCount(ItemEnum.GOLD);
+ bool flag8 = num3 < this.GetCurCost();
+ if (flag8)
+ {
+ int num4 = this.GetCurCost() - num3;
+ int num5 = int.Parse(XSingleton<XGlobalConfig>.singleton.GetValue("GragonCoinExchangeGold"));
+ int num6 = (num4 % num5 == 0) ? (num4 / num5) : (num4 / num5 + 1);
+ int num7 = (int)XBagDocument.BagDoc.GetVirtualItemCount(ItemEnum.DRAGON_COIN);
+ bool flag9 = num7 > num6;
+ if (flag9)
+ {
+ string text = XBagDocument.GetItemConf(XFastEnumIntEqualityComparer<ItemEnum>.ToInt(ItemEnum.GOLD)).ItemName[0];
+ string text2 = XBagDocument.GetItemConf(XFastEnumIntEqualityComparer<ItemEnum>.ToInt(ItemEnum.DRAGON_COIN)).ItemName[0];
+ int num8 = num6 * num5;
+ DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.SetVisible(true, true);
+ DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.SetSingleButtonMode(false);
+ DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.SetLabelsWithSymbols(string.Format(XStringDefineProxy.GetString("WELFARE_NOT_ENOUGH"), new object[]
+ {
+ num4,
+ text,
+ num6,
+ text2,
+ num8,
+ text
+ }), XStringDefineProxy.GetString("YES"), XStringDefineProxy.GetString("NO"));
+ DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.SetModalCallback(new ButtonClickEventHandler(this.OnDoBuy), new ButtonClickEventHandler(this.OnCencelBuy));
+ }
+ else
+ {
+ DlgBase<XFpStrengthenView, XFPStrengthenBehaviour>.singleton.ShowContent(FunctionDef.JINBI);
+ }
+ return false;
+ }
+ }
+ else
+ {
+ int num9 = (int)XBagDocument.BagDoc.GetVirtualItemCount(ItemEnum.DRAGON_COIN);
+ bool flag10 = !this.mIsToolFind && num9 < this.GetCurCost();
+ if (flag10)
+ {
+ int num10 = (int)XBagDocument.BagDoc.GetVirtualItemCount(ItemEnum.DIAMOND);
+ bool flag11 = num10 > this.GetCurCost() - num9;
+ if (flag11)
+ {
+ DlgBase<XPurchaseView, XPurchaseBehaviour>.singleton.ReqQuickCommonPurchase(ItemEnum.DRAGON_COIN);
+ }
+ else
+ {
+ DlgBase<XFpStrengthenView, XFPStrengthenBehaviour>.singleton.ShowContent(FunctionDef.LONGBI);
+ }
+ return false;
+ }
+ }
+ this.mPanelHint.SetVisible(false);
+ RpcC2G_ItemFindBack rpcC2G_ItemFindBack = new RpcC2G_ItemFindBack();
+ rpcC2G_ItemFindBack.oArg.id = (ItemFindBackType)this.mCurData.findid;
+ rpcC2G_ItemFindBack.oArg.findBackCount = this.mWanFindNum;
+ rpcC2G_ItemFindBack.oArg.backType = 1 + (this.mIsNormalFind ? 1 : (this.mIsToolFind ? 2 : 0));
+ XSingleton<XClientNetwork>.singleton.Send(rpcC2G_ItemFindBack);
+ result = true;
+ }
+ return result;
+ }
+
+ private bool GetFatigueSure(IXUIButton btn)
+ {
+ this.mPanelHint.SetVisible(false);
+ RpcC2G_ItemFindBack rpcC2G_ItemFindBack = new RpcC2G_ItemFindBack();
+ rpcC2G_ItemFindBack.oArg.id = (ItemFindBackType)this.mCurData.findid;
+ rpcC2G_ItemFindBack.oArg.findBackCount = this.mWanFindNum;
+ rpcC2G_ItemFindBack.oArg.backType = 1 + (this.mIsNormalFind ? 1 : (this.mIsToolFind ? 2 : 0));
+ XSingleton<XClientNetwork>.singleton.Send(rpcC2G_ItemFindBack);
+ DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.SetVisible(false, true);
+ return true;
+ }
+
+ public bool OnDoBuy(IXUIButton btn)
+ {
+ RpcC2G_ItemFindBack rpcC2G_ItemFindBack = new RpcC2G_ItemFindBack();
+ rpcC2G_ItemFindBack.oArg.id = (ItemFindBackType)this.mCurData.findid;
+ rpcC2G_ItemFindBack.oArg.findBackCount = this.mWanFindNum;
+ rpcC2G_ItemFindBack.oArg.backType = 1 + (this.mIsNormalFind ? 1 : (this.mIsToolFind ? 2 : 0));
+ XSingleton<XClientNetwork>.singleton.Send(rpcC2G_ItemFindBack);
+ DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.SetVisible(false, true);
+ this.mPanelHint.SetVisible(false);
+ return true;
+ }
+
+ public bool OnCencelBuy(IXUIButton btn)
+ {
+ DlgBase<ModalDlg, ModalDlgBehaviour>.singleton.SetVisible(false, true);
+ this.mPanelHint.SetVisible(false);
+ return true;
+ }
+
+ private bool CancelFindBack(IXUIButton btn)
+ {
+ this.mPanelHint.SetVisible(false);
+ return true;
+ }
+
+ private void WarningFatigeFull(IXUISprite sp)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XSingleton<XStringTable>.singleton.GetString("WELFARE_FATIGE_ERROR"), "fece00");
+ }
+
+ private void ShowItemTip(IXUISprite sp)
+ {
+ XItem mainItem = XBagDocument.MakeXItem((int)sp.ID, false);
+ XSingleton<UiUtility>.singleton.ShowTooltipDialog(mainItem, null, sp, false, 0u);
+ }
+
+ private void InputChangeEventHandler(IXUIInput input)
+ {
+ bool flag = this.mCurData == null;
+ if (!flag)
+ {
+ bool flag2 = false;
+ int num = 1;
+ int.TryParse(input.GetText(), out num);
+ bool flag3 = num >= this.mFindMax;
+ if (flag3)
+ {
+ bool flag4 = num > this.mFindMax;
+ if (flag4)
+ {
+ flag2 = true;
+ }
+ num = ((this.mFindMax > 0) ? this.mFindMax : 1);
+ }
+ bool flag5 = XFastEnumIntEqualityComparer<ItemFindBackType>.ToInt(ItemFindBackType.FATIGUE_GET) <= this.mCurData.findid && XFastEnumIntEqualityComparer<ItemFindBackType>.ToInt(ItemFindBackType.FATIGUE_BUY) >= this.mCurData.findid;
+ if (flag5)
+ {
+ bool flag6 = (int)XBagDocument.BagDoc.GetVirtualItemCount(ItemEnum.FATIGUE) + (num - 1) * this.GetSingleFindBackNum() >= this.mFullFatige && num > 1 && this.GetSingleFindBackNum() > 0;
+ if (flag6)
+ {
+ num = (this.mFullFatige - (int)XBagDocument.BagDoc.GetVirtualItemCount(ItemEnum.FATIGUE)) / this.GetSingleFindBackNum();
+ }
+ }
+ bool flag7 = XFastEnumIntEqualityComparer<ItemFindBackType>.ToInt(ItemFindBackType.DICE_BACK) == this.mCurData.findid;
+ if (flag7)
+ {
+ int num2 = int.Parse(XSingleton<XGlobalConfig>.singleton.GetValue("RiskDiceMaxNum"));
+ bool flag8 = XSuperRiskDocument.Doc.LeftDiceTime + num * this.GetSingleFindBackNum() > num2 && num > 1 && this.GetSingleFindBackNum() > 0;
+ if (flag8)
+ {
+ num = (num2 - XSuperRiskDocument.Doc.LeftDiceTime) / this.GetSingleFindBackNum();
+ bool flag9 = !flag2;
+ if (flag9)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XSingleton<XStringTable>.singleton.GetString("WELFARE_REACH_MAX"), "fece00");
+ }
+ }
+ }
+ this.mWanFindNum = num;
+ input.SetText(num.ToString());
+ this.RefreshFindInfo();
+ }
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/XWelfareRewardBackHandler.cs.meta b/Client/Assets/Scripts/XMainClient/UI/XWelfareRewardBackHandler.cs.meta
new file mode 100644
index 00000000..375c25ec
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XWelfareRewardBackHandler.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: e7bd4f96eef3a4140b9975c3517a88d9
+timeCreated: 1611404750
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/XWelfareYyMallHandler.cs b/Client/Assets/Scripts/XMainClient/UI/XWelfareYyMallHandler.cs
new file mode 100644
index 00000000..71b53863
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XWelfareYyMallHandler.cs
@@ -0,0 +1,472 @@
+using System;
+using System.Collections.Generic;
+using UILib;
+using UnityEngine;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ public class XWelfareYyMallHandler : DlgHandlerBase
+ {
+ protected override string FileName
+ {
+ get
+ {
+ return "GameSystem/Welfare/YyMallHandler";
+ }
+ }
+
+ private const int colNum = 5;
+
+ private IXUIButton _refreshBtn;
+
+ private IXUIButton _detailBtn;
+
+ private IXUIScrollView _scrollView;
+
+ private IXUILabel _freeNumLabel;
+
+ private IXUILabel _privilegeFreeLabel;
+
+ private IXUILabel _dragonCoinLabel;
+
+ private IXUISprite _itemSprite;
+
+ private Transform _noneTimesTrans;
+
+ protected XUIPool _shopItemPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ private XFx _refreshTaskEffect;
+
+ private Transform _effectPanel;
+
+ private IXUISprite _extraRefresh;
+
+ private IXUISprite _courtPrivilege;
+
+ private XYYMallCategoryHandler _XYYMallCategoryHandler;
+
+ protected override void Init()
+ {
+ base.Init();
+ this.InitProperties();
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ XWelfareDocument.Doc.RefreshYYMallRedPoint();
+ XNormalShopDocument specificDocument = XDocuments.GetSpecificDocument<XNormalShopDocument>(XNormalShopDocument.uuID);
+ specificDocument.ReqGoodsList(XSysDefine.XSys_Welfare_YyMall);
+ bool flag = this._refreshTaskEffect != null;
+ if (flag)
+ {
+ this._refreshTaskEffect.SetActive(false);
+ }
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ }
+
+ public override void RefreshData()
+ {
+ base.RefreshData();
+ this.RefreshScorllViewContent();
+ this.RefreshBtnState();
+ this.RefreshPrivilegeCount();
+ }
+
+ public override void OnUnload()
+ {
+ bool flag = this._refreshTaskEffect != null;
+ if (flag)
+ {
+ XSingleton<XFxMgr>.singleton.DestroyFx(this._refreshTaskEffect, true);
+ }
+ DlgHandlerBase.EnsureUnload<XYYMallCategoryHandler>(ref this._XYYMallCategoryHandler);
+ base.OnUnload();
+ }
+
+ public void PlayRefreshEffect()
+ {
+ bool flag = this._refreshTaskEffect != null;
+ if (flag)
+ {
+ this._refreshTaskEffect.SetActive(true);
+ this._refreshTaskEffect.Play(this._effectPanel, Vector3.zero, Vector3.one, 1f, true, false);
+ }
+ }
+
+ private void RefreshPrivilegeCount()
+ {
+ int privilegeFreeRefreshCount = XWelfareDocument.Doc.GetPrivilegeFreeRefreshCount(MemberPrivilege.KingdomPrivilege_Adventurer);
+ int num = XWelfareDocument.Doc.IsOwnMemberPrivilege(MemberPrivilege.KingdomPrivilege_Adventurer) ? Math.Max(0, privilegeFreeRefreshCount - XWelfareDocument.Doc.PayMemberPrivilege.usedRefreshShopCount) : privilegeFreeRefreshCount;
+ this._privilegeFreeLabel.SetText(num + "/" + privilegeFreeRefreshCount);
+ this._courtPrivilege.SetGrey(XWelfareDocument.Doc.IsOwnMemberPrivilege(MemberPrivilege.KingdomPrivilege_Court));
+ this._extraRefresh.SetGrey(XWelfareDocument.Doc.IsOwnMemberPrivilege(MemberPrivilege.KingdomPrivilege_Adventurer));
+ }
+
+ private void RefreshBtnState()
+ {
+ XNormalShopDocument specificDocument = XDocuments.GetSpecificDocument<XNormalShopDocument>(XNormalShopDocument.uuID);
+ ShopTypeTable.RowData shopTypeData = specificDocument.GetShopTypeData(XSysDefine.XSys_Welfare_YyMall);
+ uint rereshCount = specificDocument.RereshCount;
+ this._refreshBtn.SetEnable(true, false);
+ bool flag = shopTypeData != null;
+ if (flag)
+ {
+ SeqRef<uint> refreshCount = shopTypeData.RefreshCount;
+ SeqListRef<uint> refreshCost = shopTypeData.RefreshCost;
+ bool flag2 = rereshCount >= refreshCount[0] + refreshCount[1];
+ if (flag2)
+ {
+ this._freeNumLabel.gameObject.SetActive(false);
+ this._dragonCoinLabel.gameObject.SetActive(false);
+ this._noneTimesTrans.gameObject.SetActive(true);
+ this._refreshBtn.SetEnable(false, false);
+ }
+ else
+ {
+ bool flag3 = rereshCount >= refreshCount[0];
+ if (flag3)
+ {
+ this._freeNumLabel.gameObject.SetActive(false);
+ this._dragonCoinLabel.gameObject.SetActive(true);
+ this._noneTimesTrans.gameObject.SetActive(false);
+ int index = (int)Mathf.Min(new float[]
+ {
+ rereshCount - refreshCount[0],
+ refreshCount[1] - 1u,
+ (float)(refreshCost.Count - 1)
+ });
+ int itemID = (int)refreshCost[index, 0];
+ ItemList.RowData itemConf = XBagDocument.GetItemConf(itemID);
+ bool flag4 = itemConf != null;
+ if (flag4)
+ {
+ this._itemSprite.SetSprite(itemConf.ItemIcon1[0]);
+ }
+ this._dragonCoinLabel.SetText(refreshCost[index, 1].ToString());
+ }
+ else
+ {
+ this._freeNumLabel.gameObject.SetActive(true);
+ this._dragonCoinLabel.gameObject.SetActive(false);
+ this._noneTimesTrans.gameObject.SetActive(false);
+ this._freeNumLabel.SetText(refreshCount[0] - rereshCount + "/" + refreshCount[0]);
+ }
+ }
+ }
+ }
+
+ private void RefreshScorllViewContent()
+ {
+ this._shopItemPool.ReturnAll(false);
+ XNormalShopDocument specificDocument = XDocuments.GetSpecificDocument<XNormalShopDocument>(XNormalShopDocument.uuID);
+ List<XNormalShopGoods> goodsList = specificDocument.GoodsList;
+ for (int i = 0; i < goodsList.Count; i++)
+ {
+ XNormalShopGoods xnormalShopGoods = goodsList[i];
+ ShopTable.RowData dataById = XNormalShopDocument.GetDataById((uint)xnormalShopGoods.item.uid);
+ bool flag = dataById != null;
+ if (flag)
+ {
+ float num = 0f;
+ GameObject gameObject = this._shopItemPool.FetchGameObject(false);
+ IXUISprite ixuisprite = gameObject.transform.Find("UnCompleted").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.gameObject.SetActive(false);
+ bool flag2 = i == 4 || i == 9;
+ if (flag2)
+ {
+ num = 15f;
+ bool flag3 = !XWelfareDocument.Doc.IsOwnMemberPrivilege(MemberPrivilege.KingdomPrivilege_Court);
+ if (flag3)
+ {
+ ixuisprite.gameObject.SetActive(true);
+ ixuisprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnOpenCourtPriviege));
+ }
+ }
+ gameObject.transform.localPosition = this._shopItemPool.TplPos + new Vector3((float)(i % 5 * this._shopItemPool.TplWidth) + num, (float)(-(float)i / 5 * this._shopItemPool.TplHeight), 0f);
+ XSingleton<XItemDrawerMgr>.singleton.normalItemDrawer.DrawItem(gameObject.transform.Find("Item").gameObject, xnormalShopGoods.item.itemID, (int)dataById.ItemOverlap, false);
+ IXUISprite ixuisprite2 = gameObject.transform.Find("Item/Icon").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite2.ID = (ulong)((long)xnormalShopGoods.item.itemID);
+ ixuisprite2.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnClickItemIcon));
+ IXUIButton ixuibutton = gameObject.transform.Find("BtnBuy").GetComponent("XUIButton") as IXUIButton;
+ ixuibutton.ID = (ulong)((long)i);
+ ixuibutton.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnBuyShopItem));
+ IXUISprite ixuisprite3 = gameObject.transform.Find("BtnBuy/MoneyCost/Icon").GetComponent("XUISprite") as IXUISprite;
+ string itemSmallIcon = XBagDocument.GetItemSmallIcon(xnormalShopGoods.priceType, 0u);
+ ixuisprite3.SetSprite(itemSmallIcon);
+ Transform transform = gameObject.transform.Find("buyed2");
+ transform.gameObject.SetActive(dataById.IsPrecious);
+ GameObject gameObject2 = gameObject.transform.Find("discount").gameObject;
+ gameObject2.SetActive(dataById.Benefit[1] > 0u && dataById.Benefit[1] != 100u);
+ IXUILabel ixuilabel = gameObject.transform.Find("discount/t").GetComponent("XUILabel") as IXUILabel;
+ float num2 = dataById.Benefit[1] / 10f;
+ ixuilabel.SetText(num2.ToString());
+ IXUILabel ixuilabel2 = gameObject.transform.Find("BtnBuy/MoneyCost").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel2.SetText(Mathf.FloorToInt((float)xnormalShopGoods.priceValue * num2 / 10f).ToString());
+ GameObject gameObject3 = gameObject.transform.Find("buyed").gameObject;
+ uint dailyCountCondition = (uint)dataById.DailyCountCondition;
+ int weekCountCondition = (int)dataById.WeekCountCondition;
+ int num3 = 0;
+ bool flag4 = dataById.CountCondition > 0u;
+ if (flag4)
+ {
+ num3 = xnormalShopGoods.totalSoldNum;
+ }
+ else
+ {
+ bool flag5 = dailyCountCondition > 0u;
+ if (flag5)
+ {
+ num3 = xnormalShopGoods.soldNum;
+ }
+ else
+ {
+ bool flag6 = weekCountCondition != 0;
+ if (flag6)
+ {
+ num3 = (int)xnormalShopGoods.weeklyBuyCount;
+ }
+ }
+ }
+ int countCondition = (int)dataById.CountCondition;
+ bool flag7 = dailyCountCondition == 0u && countCondition == 0 && weekCountCondition == 0;
+ if (flag7)
+ {
+ ixuibutton.SetEnable(true, false);
+ }
+ else
+ {
+ bool flag8 = countCondition != 0;
+ if (flag8)
+ {
+ bool flag9 = num3 >= countCondition;
+ if (flag9)
+ {
+ ixuibutton.SetEnable(false, false);
+ gameObject3.SetActive(true);
+ }
+ else
+ {
+ ixuibutton.SetEnable(true, false);
+ gameObject3.SetActive(false);
+ }
+ }
+ else
+ {
+ bool flag10 = dailyCountCondition != 0u && (long)num3 >= (long)((ulong)dailyCountCondition);
+ if (flag10)
+ {
+ ixuibutton.SetEnable(false, false);
+ gameObject3.SetActive(true);
+ }
+ else
+ {
+ bool flag11 = weekCountCondition != 0 && num3 >= weekCountCondition;
+ if (flag11)
+ {
+ ixuibutton.SetEnable(false, false);
+ gameObject3.SetActive(false);
+ }
+ else
+ {
+ ixuibutton.SetEnable(true, false);
+ gameObject3.SetActive(false);
+ }
+ }
+ }
+ }
+ }
+ }
+ this._scrollView.ResetPosition();
+ }
+
+ private void OnOpenAdventurerPriviege(IXUISprite uiSprite)
+ {
+ bool flag = !XWelfareDocument.Doc.IsOwnMemberPrivilege(MemberPrivilege.KingdomPrivilege_Adventurer);
+ if (flag)
+ {
+ XSingleton<UiUtility>.singleton.ShowModalDialog(XStringDefineProxy.GetString("KingdomPrivilege_Adventurer2Unlock"), XStringDefineProxy.GetString("COMMON_OK"), XStringDefineProxy.GetString("COMMON_CANCEL"), new ButtonClickEventHandler(this.OpenAdventurePriviege));
+ }
+ }
+
+ private bool OpenAdventurePriviege(IXUIButton button)
+ {
+ XSingleton<UiUtility>.singleton.CloseModalDlg();
+ XSingleton<XGameSysMgr>.singleton.OpenSystem(XSysDefine.XSys_Welfare_KingdomPrivilege_Adventurer, 0UL);
+ return true;
+ }
+
+ private void OnOpenCourtPriviege(IXUISprite uiSprite)
+ {
+ bool flag = !XWelfareDocument.Doc.IsOwnMemberPrivilege(MemberPrivilege.KingdomPrivilege_Court);
+ if (flag)
+ {
+ XSingleton<UiUtility>.singleton.ShowModalDialog(XStringDefineProxy.GetString("KingdomPrivilege_Court2Unlock"), XStringDefineProxy.GetString("COMMON_OK"), XStringDefineProxy.GetString("COMMON_CANCEL"), new ButtonClickEventHandler(this.OpenCourtPriviege));
+ }
+ }
+
+ private bool OpenCourtPriviege(IXUIButton button)
+ {
+ XSingleton<UiUtility>.singleton.CloseModalDlg();
+ XSingleton<XGameSysMgr>.singleton.OpenSystem(XSysDefine.XSys_Welfare_KingdomPrivilege_Court, 0UL);
+ return true;
+ }
+
+ private void OnClickItemIcon(IXUISprite spr)
+ {
+ bool flag = spr.ID > 0UL;
+ if (flag)
+ {
+ XItem mainItem = XBagDocument.MakeXItem((int)spr.ID, false);
+ XSingleton<UiUtility>.singleton.ShowTooltipDialogWithSearchingCompare(mainItem, spr, false, 0u);
+ }
+ }
+
+ private bool OnBuyShopItem(IXUIButton button)
+ {
+ int index = (int)button.ID;
+ XNormalShopDocument specificDocument = XDocuments.GetSpecificDocument<XNormalShopDocument>(XNormalShopDocument.uuID);
+ specificDocument.ReqBuy(index);
+ return true;
+ }
+
+ private void InitProperties()
+ {
+ Transform transform = base.transform.Find("ShopItemList");
+ GameObject gameObject = transform.Find("ShopItemTpl").gameObject;
+ this._shopItemPool.SetupPool(transform.gameObject, gameObject, 8u, false);
+ this._scrollView = (transform.GetComponent("XUIScrollView") as IXUIScrollView);
+ this._refreshBtn = (base.transform.Find("BtnRefresh").GetComponent("XUIButton") as IXUIButton);
+ this._refreshBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnRefreshShopList));
+ this._detailBtn = (base.transform.Find("Detail").GetComponent("XUIButton") as IXUIButton);
+ this._detailBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnClickOnDetail));
+ this._freeNumLabel = (base.transform.Find("BtnRefresh/FreeNum").GetComponent("XUILabel") as IXUILabel);
+ this._privilegeFreeLabel = (base.transform.Find("ExtraRefresh/Count").GetComponent("XUILabel") as IXUILabel);
+ this._dragonCoinLabel = (base.transform.Find("BtnRefresh/DragonCoinNum").GetComponent("XUILabel") as IXUILabel);
+ this._noneTimesTrans = base.transform.Find("BtnRefresh/NoneTimes");
+ this._itemSprite = (base.transform.Find("BtnRefresh/DragonCoinNum/p").GetComponent("XUISprite") as IXUISprite);
+ this._effectPanel = base.transform.Find("Effect");
+ this._refreshTaskEffect = XSingleton<XFxMgr>.singleton.CreateFx("Effects/FX_Particle/UIfx/UI_YyMallHandler_Clip01", null, true);
+ this._refreshTaskEffect.SetActive(false);
+ this._courtPrivilege = (base.transform.Find("Privilege").GetComponent("XUISprite") as IXUISprite);
+ this._courtPrivilege.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnOpenCourtPriviege));
+ this._extraRefresh = (base.transform.Find("ExtraRefresh").GetComponent("XUISprite") as IXUISprite);
+ this._extraRefresh.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnOpenAdventurerPriviege));
+ DlgHandlerBase.EnsureCreate<XYYMallCategoryHandler>(ref this._XYYMallCategoryHandler, base.transform, false, this);
+ }
+
+ private bool OnClickOnDetail(IXUIButton button)
+ {
+ bool flag = this._XYYMallCategoryHandler != null;
+ if (flag)
+ {
+ this._XYYMallCategoryHandler.SetVisible(true);
+ }
+ return true;
+ }
+
+ private bool OnRefreshShopList(IXUIButton button)
+ {
+ XNormalShopDocument specificDocument = XDocuments.GetSpecificDocument<XNormalShopDocument>(XNormalShopDocument.uuID);
+ bool flag = specificDocument.CanBuyPreciousShopItem();
+ if (flag)
+ {
+ XSingleton<UiUtility>.singleton.ShowModalDialog(XStringDefineProxy.GetString("YYMallPreciousTip"), XStringDefineProxy.GetString("COMMON_OK"), XStringDefineProxy.GetString("COMMON_CANCEL"), new ButtonClickEventHandler(this.DoRefreshShop));
+ }
+ else
+ {
+ this.DoRefreshShop(null);
+ }
+ return true;
+ }
+
+ private bool DoRefreshShop(IXUIButton button)
+ {
+ XSingleton<UiUtility>.singleton.CloseModalDlg();
+ XNormalShopDocument specificDocument = XDocuments.GetSpecificDocument<XNormalShopDocument>(XNormalShopDocument.uuID);
+ bool flag = !specificDocument.IsMoneyOrItemEnough((int)this.GetMoneyId(), (int)this.GetRefreshCost());
+ bool result;
+ if (flag)
+ {
+ specificDocument.ProcessItemOrMoneyNotEnough((int)this.GetMoneyId());
+ result = false;
+ }
+ else
+ {
+ RpcC2G_QueryShopItem rpcC2G_QueryShopItem = new RpcC2G_QueryShopItem();
+ rpcC2G_QueryShopItem.oArg.isrefresh = true;
+ rpcC2G_QueryShopItem.oArg.type = specificDocument.GetShopId(XSysDefine.XSys_Welfare_YyMall);
+ XSingleton<XClientNetwork>.singleton.Send(rpcC2G_QueryShopItem);
+ this.PlayRefreshEffect();
+ result = true;
+ }
+ return result;
+ }
+
+ private uint GetRefreshCost()
+ {
+ XNormalShopDocument specificDocument = XDocuments.GetSpecificDocument<XNormalShopDocument>(XNormalShopDocument.uuID);
+ ShopTypeTable.RowData shopTypeData = specificDocument.GetShopTypeData(XSysDefine.XSys_Welfare_YyMall);
+ bool flag = shopTypeData == null;
+ uint result;
+ if (flag)
+ {
+ XSingleton<XDebug>.singleton.AddErrorLog(string.Format("ShopTypeTable not find this systenId = {0}", XSysDefine.XSys_Welfare_YyMall), null, null, null, null, null);
+ result = 0u;
+ }
+ else
+ {
+ uint num = 0u;
+ uint rereshCount = specificDocument.RereshCount;
+ SeqRef<uint> refreshCount = shopTypeData.RefreshCount;
+ SeqListRef<uint> refreshCost = shopTypeData.RefreshCost;
+ bool flag2 = rereshCount >= refreshCount[0];
+ if (flag2)
+ {
+ int index = (int)Mathf.Min(rereshCount - refreshCount[0], (float)(refreshCost.count - 1));
+ num = refreshCost[index, 1];
+ }
+ result = num;
+ }
+ return result;
+ }
+
+ private uint GetMoneyId()
+ {
+ XNormalShopDocument specificDocument = XDocuments.GetSpecificDocument<XNormalShopDocument>(XNormalShopDocument.uuID);
+ ShopTypeTable.RowData shopTypeData = specificDocument.GetShopTypeData(XSysDefine.XSys_Welfare_YyMall);
+ bool flag = shopTypeData == null;
+ uint result;
+ if (flag)
+ {
+ XSingleton<XDebug>.singleton.AddErrorLog(string.Format("ShopTypeTable not find this systenId = {0}", XSysDefine.XSys_Welfare_YyMall), null, null, null, null, null);
+ result = 0u;
+ }
+ else
+ {
+ uint rereshCount = specificDocument.RereshCount;
+ uint num = 0u;
+ SeqRef<uint> refreshCount = shopTypeData.RefreshCount;
+ SeqListRef<uint> refreshCost = shopTypeData.RefreshCost;
+ bool flag2 = rereshCount >= refreshCount[0];
+ if (flag2)
+ {
+ int num2 = (int)Mathf.Min(rereshCount - refreshCount[0], refreshCount[1] - 1u);
+ bool flag3 = num2 >= refreshCost.Count;
+ if (flag3)
+ {
+ num2 = refreshCost.Count - 1;
+ }
+ num = refreshCost[num2, 0];
+ }
+ result = num;
+ }
+ return result;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/XWelfareYyMallHandler.cs.meta b/Client/Assets/Scripts/XMainClient/UI/XWelfareYyMallHandler.cs.meta
new file mode 100644
index 00000000..4eeeff1c
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XWelfareYyMallHandler.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 0cf3f5fe5aa2e6248ba7bd11c7555e99
+timeCreated: 1611403176
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/XWelffareFirstRechargrHandler.cs b/Client/Assets/Scripts/XMainClient/UI/XWelffareFirstRechargrHandler.cs
new file mode 100644
index 00000000..60bc3ea9
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XWelffareFirstRechargrHandler.cs
@@ -0,0 +1,206 @@
+using System;
+using System.Collections.Generic;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class XWelffareFirstRechargrHandler : DlgHandlerBase
+ {
+ protected override string FileName
+ {
+ get
+ {
+ return "GameSystem/Welfare/RechargeFirstGift";
+ }
+ }
+
+ private IXUILabel m_contentLabel;
+
+ private IXUIButton m_rechargeBtn;
+
+ private IXUIButton m_getGiftBtn;
+
+ private XUIPool m_itemPool;
+
+ private IXUIList m_itemList;
+
+ private List<XFx> m_ItemEffectList;
+
+ private XWelfareDocument _Doc;
+
+ protected override void Init()
+ {
+ base.Init();
+ this._Doc = XDocuments.GetSpecificDocument<XWelfareDocument>(XWelfareDocument.uuID);
+ this.m_ItemEffectList = new List<XFx>();
+ this.m_contentLabel = (base.PanelObject.transform.Find("Content").GetComponent("XUILabel") as IXUILabel);
+ this.m_rechargeBtn = (base.PanelObject.transform.Find("Recharge").GetComponent("XUIButton") as IXUIButton);
+ this.m_getGiftBtn = (base.PanelObject.transform.Find("GetGift").GetComponent("XUIButton") as IXUIButton);
+ this.m_itemList = (base.PanelObject.transform.Find("Reward").GetComponent("XUIList") as IXUIList);
+ this.m_itemPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+ Transform transform = base.PanelObject.transform.Find("Reward/item");
+ this.m_itemPool.SetupPool(this.m_itemList.gameObject, transform.gameObject, 5u, false);
+ this.InitAwardList();
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ this.RefreshData();
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ this.m_rechargeBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.ClickRechargeHandler));
+ this.m_getGiftBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.ClickGetGiftHandler));
+ }
+
+ private bool ClickRechargeHandler(IXUIButton btn)
+ {
+ DlgBase<GameMallDlg, TabDlgBehaviour>.singleton.ShowPurchase(ItemEnum.DIAMOND);
+ return true;
+ }
+
+ private bool ClickGetGiftHandler(IXUIButton btn)
+ {
+ this._Doc.GetPayFirstAward();
+ return true;
+ }
+
+ protected override void OnHide()
+ {
+ base.OnHide();
+ }
+
+ public override void OnUnload()
+ {
+ bool flag = this.m_itemPool != null;
+ if (flag)
+ {
+ this.m_itemPool.ReturnAllDisable();
+ this.m_itemPool = null;
+ }
+ bool flag2 = this.m_ItemEffectList != null;
+ if (flag2)
+ {
+ int i = 0;
+ int count = this.m_ItemEffectList.Count;
+ while (i < count)
+ {
+ XSingleton<XFxMgr>.singleton.DestroyFx(this.m_ItemEffectList[i], true);
+ i++;
+ }
+ this.m_ItemEffectList.Clear();
+ this.m_ItemEffectList = null;
+ }
+ base.OnUnload();
+ }
+
+ private void ClearEffectList()
+ {
+ bool flag = this.m_ItemEffectList != null;
+ if (flag)
+ {
+ int i = 0;
+ int count = this.m_ItemEffectList.Count;
+ while (i < count)
+ {
+ XSingleton<XFxMgr>.singleton.DestroyFx(this.m_ItemEffectList[i], true);
+ i++;
+ }
+ this.m_ItemEffectList.Clear();
+ }
+ }
+
+ private void SetItemEffect(GameObject parent, string effectName)
+ {
+ bool flag = string.IsNullOrEmpty(effectName);
+ if (!flag)
+ {
+ XFx xfx = XSingleton<XFxMgr>.singleton.CreateUIFx(effectName, parent.transform, false);
+ bool flag2 = xfx != null;
+ if (flag2)
+ {
+ this.m_ItemEffectList.Add(xfx);
+ }
+ }
+ }
+
+ public override void StackRefresh()
+ {
+ base.StackRefresh();
+ this.RefreshData();
+ }
+
+ public override void RefreshData()
+ {
+ bool flag = !base.IsVisible();
+ if (!flag)
+ {
+ this.m_rechargeBtn.SetVisible(!this._Doc.HasFullFirstRecharge());
+ this.m_getGiftBtn.SetVisible(this._Doc.GetCanRechargeFirst());
+ }
+ }
+
+ private void InitAwardList()
+ {
+ this.ClearEffectList();
+ PayFirst.RowData rowData;
+ bool flag = this._Doc.TryGetPayFirstData(XSysDefine.XSys_Welfare_FirstRechange, out rowData);
+ if (flag)
+ {
+ this.m_itemPool.FakeReturnAll();
+ List<DropList.RowData> list = new List<DropList.RowData>();
+ List<ChestList.RowData> list2;
+ bool flag2 = XBagDocument.TryGetChestListConf(rowData.Award, out list2);
+ if (flag2)
+ {
+ int i = 0;
+ int count = list2.Count;
+ while (i < count)
+ {
+ ChestList.RowData rowData2 = list2[i];
+ bool flag3 = !XBagDocument.IsProfMatchedFeable((uint)rowData2.Profession, XItemDrawerParam.DefaultProfession, false);
+ if (!flag3)
+ {
+ bool flag4 = XBagDocument.TryGetDropConf(rowData2.DropID, ref list);
+ if (flag4)
+ {
+ int j = 0;
+ int count2 = list.Count;
+ while (j < count2)
+ {
+ ItemList.RowData itemConf = XBagDocument.GetItemConf(list[j].ItemID);
+ GameObject gameObject = this.m_itemPool.FetchGameObject(false);
+ gameObject.transform.parent = this.m_itemList.gameObject.transform;
+ XSingleton<XItemDrawerMgr>.singleton.normalItemDrawer.DrawItem(gameObject, itemConf, list[j].ItemCount, false);
+ IXUISprite ixuisprite = gameObject.transform.Find("Icon").GetComponent("XUISprite") as IXUISprite;
+ IXUISprite ixuisprite2 = gameObject.transform.Find("Icon/Icon").GetComponent("XUISprite") as IXUISprite;
+ bool flag5 = itemConf == null;
+ if (flag5)
+ {
+ XSingleton<XDebug>.singleton.AddGreenLog("Not Exsit Item:", list[j].ItemID.ToString(), null, null, null, null);
+ }
+ else
+ {
+ this.SetItemEffect(ixuisprite2.gameObject, itemConf.ItemEffect);
+ ixuisprite.ID = (ulong)((long)list[j].ItemID);
+ ixuisprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(XSingleton<UiUtility>.singleton.OnItemClick));
+ }
+ j++;
+ }
+ }
+ }
+ i++;
+ }
+ }
+ this.m_itemPool.ActualReturnAll(false);
+ this.m_itemList.Refresh();
+ }
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/XWelffareFirstRechargrHandler.cs.meta b/Client/Assets/Scripts/XMainClient/UI/XWelffareFirstRechargrHandler.cs.meta
new file mode 100644
index 00000000..145320d5
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XWelffareFirstRechargrHandler.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 485931f677777dc44b00524ae25ed4e1
+timeCreated: 1611403657
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/XWheelOfFortuneHandler.cs b/Client/Assets/Scripts/XMainClient/UI/XWheelOfFortuneHandler.cs
new file mode 100644
index 00000000..e780dafa
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XWheelOfFortuneHandler.cs
@@ -0,0 +1,270 @@
+using System;
+using UILib;
+using UnityEngine;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class XWheelOfFortuneHandler : DlgHandlerBase
+ {
+ private static int START_DEGREE = 90;
+
+ private int DIRECTION = -1;
+
+ private int CIRCLE_DEGREE = 360;
+
+ private int FIRST_STAGE_DEGREE = 10;
+
+ private int SECOND_STAGE_DEGREE = 3;
+
+ private float RESULT_STAY_TIME = 1.5f;
+
+ private XCharacterItemDocument _doc;
+
+ private GameObject m_Arrow;
+
+ private IXCurve m_SpeedCurve;
+
+ private IXUIButton m_BtnStart;
+
+ private IXUIButton m_BtnClose;
+
+ private IXUITweenTool m_ShowTween;
+
+ private float m_StartSpeed;
+
+ private int[] m_IndexMap = new int[XLotteryBoxItem.POOL_SIZE];
+
+ private GameObject[] m_ItemList = new GameObject[XLotteryBoxItem.POOL_SIZE];
+
+ private int[] m_DegreeList = new int[XLotteryBoxItem.POOL_SIZE];
+
+ private XItem[] m_DataList = new XItem[XLotteryBoxItem.POOL_SIZE];
+
+ private int m_TargetIndex;
+
+ private int m_TargetDegree;
+
+ private XWheelState m_State;
+
+ private float m_CurrentDegree;
+
+ private float m_CurrentSpeed;
+
+ private float m_StartDecSpeedDegree;
+
+ private float m_DecSpeedDegreeLength;
+
+ private uint m_ResultStayTimerToken = 0u;
+
+ private ulong m_ItemUID;
+
+ private XItemSelector m_ItemSelector = new XItemSelector(0u);
+
+ private XFx m_Fx = null;
+
+ protected override void Init()
+ {
+ base.Init();
+ this.DIRECTION = XSingleton<XGlobalConfig>.singleton.GetInt("WheelOfFortuneDirection");
+ this.CIRCLE_DEGREE = 360 * this.DIRECTION;
+ this.FIRST_STAGE_DEGREE = (int)(float.Parse(XSingleton<XGlobalConfig>.singleton.GetValue("WheelOfFortuneFirstStageDegree")) * (float)this.CIRCLE_DEGREE);
+ this.SECOND_STAGE_DEGREE = (int)(float.Parse(XSingleton<XGlobalConfig>.singleton.GetValue("WheelOfFortuneSecondStageDegree")) * (float)this.CIRCLE_DEGREE);
+ this.RESULT_STAY_TIME = float.Parse(XSingleton<XGlobalConfig>.singleton.GetValue("WheelOfFortuneResultStayTime"));
+ this._doc = (XSingleton<XGame>.singleton.Doc.GetXComponent(XCharacterItemDocument.uuID) as XCharacterItemDocument);
+ GameObject gameObject = base.PanelObject.transform.Find("Bg/ItemTpl").gameObject;
+ GameObject gameObject2 = gameObject.transform.Find("Effect").gameObject;
+ this.m_ItemSelector.LoadFromUI(gameObject2, base.PanelObject.transform);
+ XUIPool xuipool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+ xuipool.SetupPool(gameObject.transform.parent.gameObject, gameObject, (uint)XLotteryBoxItem.POOL_SIZE, false);
+ for (int i = 0; i < XLotteryBoxItem.POOL_SIZE; i++)
+ {
+ GameObject gameObject3 = xuipool.FetchGameObject(false);
+ Transform transform = base.PanelObject.transform.Find("Bg/Pos/Pos" + i);
+ gameObject3.transform.parent = transform;
+ gameObject3.transform.localPosition = Vector3.zero;
+ this.m_ItemList[i] = gameObject3;
+ IXUISprite ixuisprite = gameObject3.transform.Find("Icon").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.ID = (ulong)((long)i);
+ ixuisprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this._OnItemClicked));
+ int num = (int)(Mathf.Atan2(transform.localPosition.y, transform.localPosition.x) * 57.29578f);
+ bool flag = this.DIRECTION * num < 0;
+ if (flag)
+ {
+ num += this.CIRCLE_DEGREE;
+ }
+ this.m_DegreeList[i] = num;
+ this.m_IndexMap[i] = i;
+ this.m_DataList[i] = new XNormalItem();
+ }
+ this.m_Arrow = base.PanelObject.transform.Find("Bg/Arrow").gameObject;
+ this.m_SpeedCurve = (this.m_Arrow.GetComponent("XCurve") as IXCurve);
+ this.m_StartSpeed = this.m_SpeedCurve.Evaluate(0f) * (float)this.DIRECTION;
+ this.m_BtnStart = (base.PanelObject.transform.Find("Bg/BtnStart").GetComponent("XUIButton") as IXUIButton);
+ this.m_BtnClose = (base.PanelObject.transform.Find("Close").GetComponent("XUIButton") as IXUIButton);
+ this.m_ShowTween = (base.PanelObject.GetComponent("XUIPlayTween") as IXUITweenTool);
+ this.m_Fx = XSingleton<XFxMgr>.singleton.CreateUIFx("Effects/FX_Particle/UIfx/UI_WheelOfFortune_fx", base.PanelObject.transform.Find("Bg/Bg/Bg"), false);
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ this.m_BtnStart.RegisterClickEventHandler(new ButtonClickEventHandler(this._OnStartClicked));
+ this.m_BtnClose.RegisterClickEventHandler(new ButtonClickEventHandler(this._OnCloseClicked));
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ this.m_State = XWheelState.WS_IDLE;
+ this.ToggleOperation(false, false);
+ this.m_ShowTween.PlayTween(true, -1f);
+ this.m_ItemSelector.Hide();
+ this.m_ResultStayTimerToken = 0u;
+ }
+
+ protected override void OnHide()
+ {
+ this._doc.ToggleBlock(false);
+ XSingleton<XTimerMgr>.singleton.KillTimer(this.m_ResultStayTimerToken);
+ base.OnHide();
+ }
+
+ public override void OnUnload()
+ {
+ this._doc.ToggleBlock(false);
+ XSingleton<XTimerMgr>.singleton.KillTimer(this.m_ResultStayTimerToken);
+ this.m_ItemSelector.Unload();
+ bool flag = this.m_Fx != null;
+ if (flag)
+ {
+ XSingleton<XFxMgr>.singleton.DestroyFx(this.m_Fx, true);
+ }
+ this.m_Fx = null;
+ base.OnUnload();
+ }
+
+ public override void OnUpdate()
+ {
+ base.OnUpdate();
+ bool flag = this.m_State == XWheelState.WS_IDLE || this.m_State == XWheelState.WS_DONE;
+ if (!flag)
+ {
+ bool flag2 = this.m_State == XWheelState.WS_DOING_FIRST_STAGE;
+ if (flag2)
+ {
+ this.m_CurrentSpeed = this.m_StartSpeed;
+ }
+ else
+ {
+ this.m_CurrentSpeed = this.m_SpeedCurve.Evaluate((this.m_CurrentDegree - this.m_StartDecSpeedDegree) / this.m_DecSpeedDegreeLength) * (float)this.DIRECTION;
+ }
+ this.m_CurrentDegree += this.m_CurrentSpeed * Time.deltaTime;
+ bool flag3 = this.m_State == XWheelState.WS_DOING_FIRST_STAGE && this.m_CurrentDegree * (float)this.DIRECTION > this.m_StartDecSpeedDegree * (float)this.DIRECTION;
+ if (flag3)
+ {
+ this.m_State = XWheelState.WS_DOING_SECOND_STAGE;
+ }
+ bool flag4 = this.m_CurrentDegree * (float)this.DIRECTION >= (float)(this.m_TargetDegree * this.DIRECTION);
+ if (flag4)
+ {
+ this.m_CurrentDegree = (float)this.m_TargetDegree;
+ this.m_State = XWheelState.WS_DONE;
+ this._FinishDoing();
+ }
+ this.m_Arrow.transform.localRotation = Quaternion.AngleAxis(this.m_CurrentDegree, Vector3.forward);
+ }
+ }
+
+ private void _FinishDoing()
+ {
+ this._doc.ToggleBlock(false);
+ ItemList.RowData itemConf = XBagDocument.GetItemConf(this.m_DataList[this.m_TargetIndex].itemID);
+ GameObject gameObject = this.m_ItemList[this.m_TargetIndex].transform.Find("Icon").gameObject;
+ bool flag = itemConf != null;
+ if (flag)
+ {
+ IXUISprite ixuisprite = this.m_ItemSelector.Effects.transform.Find("Anim").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.SetColor(XSingleton<UiUtility>.singleton.GetItemQualityColor((int)itemConf.ItemQuality));
+ this.m_ItemSelector.Select(gameObject);
+ }
+ this.m_ResultStayTimerToken = XSingleton<XTimerMgr>.singleton.SetTimer(this.RESULT_STAY_TIME, new XTimerMgr.ElapsedEventHandler(this._FinishStay), null);
+ }
+
+ private void _FinishStay(object o)
+ {
+ this.m_ResultStayTimerToken = 0u;
+ base.SetVisible(false);
+ }
+
+ private void _RandomPosition()
+ {
+ for (int i = 0; i < XLotteryBoxItem.POOL_SIZE; i++)
+ {
+ int num = XSingleton<XCommon>.singleton.RandomInt(i, XLotteryBoxItem.POOL_SIZE);
+ int num2 = this.m_IndexMap[num];
+ this.m_IndexMap[num] = this.m_IndexMap[i];
+ this.m_IndexMap[i] = num2;
+ }
+ }
+
+ public void OpenWheel(XLotteryBoxItem item)
+ {
+ base.SetVisible(true);
+ this._RandomPosition();
+ for (int i = 0; i < XLotteryBoxItem.POOL_SIZE; i++)
+ {
+ int num = this.m_IndexMap[i];
+ this.m_DataList[num].itemID = item.itemList[i].itemID;
+ this.m_DataList[num].itemCount = item.itemList[i].itemCount;
+ XSingleton<XItemDrawerMgr>.singleton.normalItemDrawer.DrawItem(this.m_ItemList[num], this.m_DataList[num].itemID, this.m_DataList[num].itemCount, false);
+ }
+ this.m_ItemUID = item.uid;
+ }
+
+ public void ShowResult(int targetIndex)
+ {
+ this.ToggleOperation(true, true);
+ this.m_TargetIndex = this.m_IndexMap[targetIndex];
+ this.m_TargetDegree = XWheelOfFortuneHandler.START_DEGREE + this.FIRST_STAGE_DEGREE + this.SECOND_STAGE_DEGREE;
+ this.m_StartDecSpeedDegree = (float)(XWheelOfFortuneHandler.START_DEGREE + this.FIRST_STAGE_DEGREE);
+ this.m_DecSpeedDegreeLength = (float)this.SECOND_STAGE_DEGREE;
+ int num = this.m_TargetDegree % this.CIRCLE_DEGREE;
+ int num2 = this.m_DegreeList[this.m_TargetIndex];
+ bool flag = (num2 - num) * this.DIRECTION < 0;
+ if (flag)
+ {
+ num2 += this.CIRCLE_DEGREE;
+ }
+ int num3 = num2 - num;
+ this.m_DecSpeedDegreeLength += (float)num3;
+ this.m_TargetDegree += num3;
+ this.m_State = XWheelState.WS_DOING_FIRST_STAGE;
+ this.m_CurrentDegree = (float)XWheelOfFortuneHandler.START_DEGREE;
+ }
+
+ public void ToggleOperation(bool bBlockClose, bool bBlockStart)
+ {
+ this.m_BtnClose.SetVisible(!bBlockClose);
+ this.m_BtnStart.SetVisible(!bBlockStart);
+ }
+
+ private void _OnItemClicked(IXUISprite icon)
+ {
+ int num = (int)icon.ID;
+ XSingleton<UiUtility>.singleton.ShowTooltipDialog(this.m_DataList[num].itemID, icon, 0u);
+ }
+
+ private bool _OnCloseClicked(IXUIButton btn)
+ {
+ base.SetVisible(false);
+ return true;
+ }
+
+ private bool _OnStartClicked(IXUIButton btn)
+ {
+ this._doc.UseItem(this.m_ItemUID);
+ return true;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/XWheelOfFortuneHandler.cs.meta b/Client/Assets/Scripts/XMainClient/UI/XWheelOfFortuneHandler.cs.meta
new file mode 100644
index 00000000..4104b1f8
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XWheelOfFortuneHandler.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: db843e908c8b2f944b8aee90b2606bb4
+timeCreated: 1611404653
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/XWheelState.cs b/Client/Assets/Scripts/XMainClient/UI/XWheelState.cs
new file mode 100644
index 00000000..1ea36948
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XWheelState.cs
@@ -0,0 +1,12 @@
+using System;
+
+namespace XMainClient.UI
+{
+ internal enum XWheelState
+ {
+ WS_IDLE,
+ WS_DOING_FIRST_STAGE,
+ WS_DOING_SECOND_STAGE,
+ WS_DONE
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/XWheelState.cs.meta b/Client/Assets/Scripts/XMainClient/UI/XWheelState.cs.meta
new file mode 100644
index 00000000..6fa59be5
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XWheelState.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 42070d1f7fb0d874daf563d2844072fa
+timeCreated: 1611403638
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/XWorldBossDamageRankHandler.cs b/Client/Assets/Scripts/XMainClient/UI/XWorldBossDamageRankHandler.cs
new file mode 100644
index 00000000..8abaf297
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XWorldBossDamageRankHandler.cs
@@ -0,0 +1,463 @@
+using System;
+using System.Collections.Generic;
+using KKSG;
+using UILib;
+using UnityEngine;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class XWorldBossDamageRankHandler : DlgHandlerBase, IRankView
+ {
+ private XUIPool m_RankItemPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ public IXUIWrapContent m_WrapContent;
+
+ public IXUIScrollView m_ScrollView;
+
+ private GameObject m_MyInfo;
+
+ private GameObject m_MyGuildInfo;
+
+ private IXUILabel m_MyRank;
+
+ private IXUILabel m_MyDamage;
+
+ private IXUILabel m_MyName;
+
+ private IXUILabel m_MyGuildName;
+
+ private IXUILabel m_GuildMemberNum;
+
+ private ulong m_MyID;
+
+ private uint timerToken = 0u;
+
+ public bool bInBattle = false;
+
+ private int showMaxCount;
+
+ private static readonly string NORMAL_BG = "kuang_xd";
+
+ private static readonly string MY_BG = "button_xd1";
+
+ public IRankSource RankSource;
+
+ private RankeType m_SelectedType = RankeType.WorldBossDamageRank;
+
+ private List<RankeType> m_RankTypes;
+
+ private XUIPool m_TabPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ private Dictionary<int, Transform> rankMap = new Dictionary<int, Transform>();
+
+ protected override void Init()
+ {
+ Transform transform = base.PanelObject.transform.Find("Bg/ScrollView");
+ this.m_ScrollView = (transform.GetComponent("XUIScrollView") as IXUIScrollView);
+ transform = transform.Find("WrapContent");
+ this.m_WrapContent = (transform.GetComponent("XUIWrapContent") as IXUIWrapContent);
+ transform = transform.Find("RankTpl");
+ this.m_RankItemPool.SetupPool(transform.parent.parent.gameObject, transform.gameObject, 2u, false);
+ transform = base.PanelObject.transform.Find("Bg/MyInfo");
+ bool flag = transform != null;
+ if (flag)
+ {
+ this.m_MyInfo = transform.gameObject;
+ this.m_MyRank = (transform.Find("Rank").GetComponent("XUILabel") as IXUILabel);
+ this.m_MyDamage = (transform.Find("Value").GetComponent("XUILabel") as IXUILabel);
+ this.m_MyName = (this.m_MyInfo.transform.Find("Name").GetComponent("XUILabel") as IXUILabel);
+ }
+ this.m_MyGuildInfo = base.PanelObject.transform.Find("Bg/MyGuildInfo").gameObject;
+ this.m_MyGuildName = (this.m_MyGuildInfo.transform.Find("Name").GetComponent("XUILabel") as IXUILabel);
+ this.m_GuildMemberNum = (base.PanelObject.transform.Find("Bg/GuildMemberNum").GetComponent("XUILabel") as IXUILabel);
+ transform = base.PanelObject.transform.Find("Bg/TabList/TabTpl");
+ this.m_TabPool.SetupPool(transform.parent.gameObject, transform.gameObject, 2u, false);
+ this.m_WrapContent.RegisterItemUpdateEventHandler(new WrapItemUpdateEventHandler(this.RankWrapContentItemUpdated));
+ this.showMaxCount = int.Parse(XSingleton<XGlobalConfig>.singleton.GetValue("WorldBossBattleDamageRankCount"));
+ }
+
+ public override void RegisterEvent()
+ {
+ Transform transform = base.PanelObject.transform.Find("Bg/Close");
+ bool flag = transform != null;
+ if (flag)
+ {
+ IXUIButton ixuibutton = transform.GetComponent("XUIButton") as IXUIButton;
+ ixuibutton.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnCloseClicked));
+ }
+ }
+
+ public void SetupRanks(List<RankeType> rankTypes, bool inBattle)
+ {
+ this.bInBattle = inBattle;
+ this.m_TabPool.ReturnAll(false);
+ this.m_RankTypes = rankTypes;
+ bool flag = rankTypes.Count == 0;
+ if (!flag)
+ {
+ Vector3 tplPos = this.m_TabPool.TplPos;
+ for (int i = 0; i < rankTypes.Count; i++)
+ {
+ GameObject gameObject = this.m_TabPool.FetchGameObject(false);
+ gameObject.transform.localPosition = new Vector3(((float)i - (float)rankTypes.Count * 0.5f + 0.5f) * (float)this.m_TabPool.TplWidth, tplPos.y);
+ IXUICheckBox ixuicheckBox = gameObject.GetComponent("XUICheckBox") as IXUICheckBox;
+ ixuicheckBox.ID = (ulong)((long)i);
+ ixuicheckBox.RegisterOnCheckEventHandler(new CheckBoxOnCheckEventHandler(this.OnTabSelectionChanged));
+ bool flag2 = i == 0;
+ if (flag2)
+ {
+ ixuicheckBox.bChecked = true;
+ }
+ Transform transform = gameObject.transform.Find("TextLabel");
+ string str = this.bInBattle ? "_in" : "_out";
+ string @string = XStringDefineProxy.GetString(rankTypes[i].ToString() + str);
+ bool flag3 = transform != null;
+ if (flag3)
+ {
+ IXUILabel ixuilabel = transform.GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel2 = gameObject.transform.Find("SelectedTextLabel").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel.SetText(@string);
+ ixuilabel2.SetText(@string);
+ }
+ else
+ {
+ IXUISprite ixuisprite = gameObject.transform.Find("Text").GetComponent("XUISprite") as IXUISprite;
+ IXUISprite ixuisprite2 = gameObject.transform.Find("SelectedText").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.SetSprite(@string + "0");
+ ixuisprite2.SetSprite(@string + "1");
+ }
+ }
+ }
+ }
+
+ private bool OnTabSelectionChanged(IXUICheckBox ckb)
+ {
+ bool flag = !ckb.bChecked;
+ bool result;
+ if (flag)
+ {
+ result = true;
+ }
+ else
+ {
+ int num = (int)ckb.ID;
+ bool flag2 = num >= this.m_RankTypes.Count;
+ if (flag2)
+ {
+ result = true;
+ }
+ else
+ {
+ this.m_SelectedType = this.m_RankTypes[num];
+ bool flag3 = this.m_MyInfo != null;
+ if (flag3)
+ {
+ bool flag4 = this.m_SelectedType != RankeType.GuildBossRank;
+ if (flag4)
+ {
+ this.m_MyName.SetText(XSingleton<XEntityMgr>.singleton.Player.Attributes.Name);
+ this.m_MyID = XSingleton<XEntityMgr>.singleton.Player.Attributes.EntityID;
+ }
+ else
+ {
+ XGuildDocument specificDocument = XDocuments.GetSpecificDocument<XGuildDocument>(XGuildDocument.uuID);
+ this.m_MyName.SetText(specificDocument.BasicData.guildName);
+ this.m_MyID = specificDocument.UID;
+ this.m_MyInfo.gameObject.SetActive(true);
+ }
+ bool flag5 = this.m_SelectedType == RankeType.WorldBossDamageRank || this.m_SelectedType == RankeType.WorldBossGuildRank || this.m_SelectedType == RankeType.WorldBossGuildRoleRank;
+ if (flag5)
+ {
+ XGuildDocument specificDocument2 = XDocuments.GetSpecificDocument<XGuildDocument>(XGuildDocument.uuID);
+ this.m_MyGuildName.SetText(specificDocument2.BasicData.guildName);
+ this.m_MyInfo.gameObject.SetActive(this.m_SelectedType == RankeType.WorldBossDamageRank || this.m_SelectedType == RankeType.WorldBossGuildRoleRank);
+ this.m_MyGuildInfo.gameObject.SetActive(this.m_SelectedType == RankeType.WorldBossGuildRank);
+ }
+ }
+ bool active = this.active;
+ if (active)
+ {
+ this._KillTimer();
+ this._ReqInfo(null);
+ }
+ result = true;
+ }
+ }
+ return result;
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ this._KillTimer();
+ this._ReqInfo(null);
+ bool flag = this.m_MyInfo != null;
+ if (flag)
+ {
+ this.m_MyInfo.SetActive(false);
+ }
+ this.m_MyGuildInfo.SetActive(false);
+ }
+
+ private void _ReqInfo(object param)
+ {
+ bool flag = this.RankSource != null;
+ if (flag)
+ {
+ bool flag2 = XSingleton<XScene>.singleton.SceneType == SceneType.SCENE_GUILD_BOSS;
+ if (flag2)
+ {
+ this.RankSource.ReqRankData(this.m_SelectedType, true);
+ }
+ else
+ {
+ bool flag3 = XSingleton<XScene>.singleton.SceneType == SceneType.SCENE_WORLDBOSS;
+ if (flag3)
+ {
+ this.RankSource.ReqRankData(RankeType.WorldBossDamageRank, true);
+ this.RankSource.ReqRankData(RankeType.WorldBossGuildRank, true);
+ this.RankSource.ReqRankData(RankeType.WorldBossGuildRoleRank, true);
+ }
+ }
+ }
+ this._KillTimer();
+ this.timerToken = XSingleton<XTimerMgr>.singleton.SetTimer(2f, new XTimerMgr.ElapsedEventHandler(this._ReqInfo), null);
+ }
+
+ protected override void OnHide()
+ {
+ base.OnHide();
+ this.bInBattle = false;
+ this._KillTimer();
+ }
+
+ private void _KillTimer()
+ {
+ bool flag = this.timerToken > 0u;
+ if (flag)
+ {
+ XSingleton<XTimerMgr>.singleton.KillTimer(this.timerToken);
+ }
+ this.timerToken = 0u;
+ }
+
+ public override void OnUnload()
+ {
+ this._KillTimer();
+ base.OnUnload();
+ }
+
+ public override void OnUpdate()
+ {
+ base.OnUpdate();
+ }
+
+ protected bool OnCloseClicked(IXUIButton go)
+ {
+ base.SetVisible(false);
+ return true;
+ }
+
+ public void RefreshPage()
+ {
+ this.rankMap.Clear();
+ ulong entityID = XSingleton<XEntityMgr>.singleton.Player.Attributes.EntityID;
+ XBaseRankList rankList = this.RankSource.GetRankList(this.m_SelectedType);
+ List<XBaseRankInfo> rankList2 = rankList.rankList;
+ int num = (rankList2.Count > this.showMaxCount) ? this.showMaxCount : rankList2.Count;
+ this.m_WrapContent.SetContentCount(num, false);
+ this.m_ScrollView.ResetPosition();
+ bool flag = this.m_MyInfo != null && XSingleton<XScene>.singleton.SceneType != SceneType.SCENE_WORLDBOSS;
+ if (flag)
+ {
+ this.m_MyInfo.gameObject.SetActive(true);
+ this.SetMyInfo(this.RankSource.GetRankList(this.m_SelectedType));
+ this.m_GuildMemberNum.gameObject.SetActive(false);
+ }
+ bool flag2 = XSingleton<XScene>.singleton.SceneType == SceneType.SCENE_WORLDBOSS;
+ if (flag2)
+ {
+ bool flag3 = this.m_SelectedType == RankeType.WorldBossDamageRank;
+ if (flag3)
+ {
+ this.SetMyInfo(this.RankSource.GetRankList(RankeType.WorldBossDamageRank));
+ }
+ else
+ {
+ this.SetMyInfo(this.RankSource.GetRankList(RankeType.WorldBossGuildRoleRank));
+ }
+ this.SetMyGuildInfo(this.RankSource.GetRankList(RankeType.WorldBossGuildRank));
+ XGuildDocument specificDocument = XDocuments.GetSpecificDocument<XGuildDocument>(XGuildDocument.uuID);
+ this.m_GuildMemberNum.gameObject.SetActive(specificDocument.bInGuild);
+ }
+ }
+
+ private void RankWrapContentItemUpdated(Transform t, int index)
+ {
+ List<XBaseRankInfo> rankList = this.RankSource.GetRankList(this.m_SelectedType).rankList;
+ bool flag = index < 0 || index >= rankList.Count;
+ if (!flag)
+ {
+ XBaseRankInfo xbaseRankInfo = rankList[index];
+ XWorldBossGuildRankInfo xworldBossGuildRankInfo = xbaseRankInfo as XWorldBossGuildRankInfo;
+ XWorldBossDamageRankInfo xworldBossDamageRankInfo = xbaseRankInfo as XWorldBossDamageRankInfo;
+ XWorldBossGuildRoleRankInfo xworldBossGuildRoleRankInfo = xbaseRankInfo as XWorldBossGuildRoleRankInfo;
+ float num = 0f;
+ bool flag2 = xworldBossGuildRankInfo != null;
+ if (flag2)
+ {
+ num = xworldBossGuildRankInfo.damage;
+ }
+ else
+ {
+ bool flag3 = xworldBossDamageRankInfo != null;
+ if (flag3)
+ {
+ num = xworldBossDamageRankInfo.damage;
+ }
+ else
+ {
+ bool flag4 = xworldBossGuildRoleRankInfo != null;
+ if (flag4)
+ {
+ num = xworldBossGuildRoleRankInfo.damage;
+ }
+ }
+ }
+ this.rankMap[index] = t;
+ IXUILabel ixuilabel = t.Find("Rank").GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel2 = t.Find("Name").GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel3 = t.Find("Value").GetComponent("XUILabel") as IXUILabel;
+ IXUISpriteAnimation ixuispriteAnimation = t.Find("Voice").GetComponent("XUISpriteAnimation") as IXUISpriteAnimation;
+ ixuispriteAnimation.StopAndReset();
+ t = t.Find("Bg");
+ bool flag5 = t != null;
+ if (flag5)
+ {
+ IXUISprite ixuisprite = t.GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.SetSprite((xbaseRankInfo.id == this.m_MyID) ? XWorldBossDamageRankHandler.MY_BG : XWorldBossDamageRankHandler.NORMAL_BG);
+ }
+ ixuilabel.SetText(string.Format("{0}.", xbaseRankInfo.rank + 1u));
+ ixuilabel2.SetText(xbaseRankInfo.name);
+ ixuilabel3.SetText(XSingleton<UiUtility>.singleton.NumberFormatBillion((ulong)num));
+ }
+ }
+
+ public void SetMyInfo(XBaseRankList rankData)
+ {
+ bool flag = rankData.myRankInfo == null;
+ if (flag)
+ {
+ this.m_MyRank.SetText(XStringDefineProxy.GetString("WORLDBOSS_NO_RANK"));
+ this.m_MyDamage.SetText("0");
+ }
+ else
+ {
+ bool flag2 = rankData.myRankInfo.rank == XRankDocument.INVALID_RANK || rankData.myRankInfo.id == 0UL;
+ if (flag2)
+ {
+ this.m_MyRank.SetText(XStringDefineProxy.GetString("WORLDBOSS_NO_RANK"));
+ this.m_MyDamage.SetText("0");
+ }
+ else
+ {
+ XWorldBossDamageRankInfo xworldBossDamageRankInfo = rankData.myRankInfo as XWorldBossDamageRankInfo;
+ XWorldBossGuildRoleRankInfo xworldBossGuildRoleRankInfo = rankData.myRankInfo as XWorldBossGuildRoleRankInfo;
+ float num = 0f;
+ bool flag3 = xworldBossDamageRankInfo != null;
+ if (flag3)
+ {
+ num = xworldBossDamageRankInfo.damage;
+ }
+ else
+ {
+ bool flag4 = xworldBossGuildRoleRankInfo != null;
+ if (flag4)
+ {
+ num = xworldBossGuildRoleRankInfo.damage;
+ }
+ }
+ this.m_MyRank.SetText(string.Format("{0}. ", rankData.myRankInfo.rank + 1u));
+ this.m_MyDamage.SetText(XSingleton<UiUtility>.singleton.NumberFormatBillion((ulong)num));
+ }
+ }
+ }
+
+ public void SetMyGuildInfo(XBaseRankList guildList)
+ {
+ IXUILabel ixuilabel = this.m_MyGuildInfo.transform.Find("Rank").GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel2 = this.m_MyGuildInfo.transform.Find("Value").GetComponent("XUILabel") as IXUILabel;
+ XGuildDocument specificDocument = XDocuments.GetSpecificDocument<XGuildDocument>(XGuildDocument.uuID);
+ bool flag = !specificDocument.bInGuild;
+ if (flag)
+ {
+ ixuilabel.SetText("");
+ ixuilabel2.SetText("");
+ this.m_MyGuildName.SetText("");
+ }
+ else
+ {
+ bool flag2 = guildList.myRankInfo == null;
+ if (flag2)
+ {
+ ixuilabel.SetText(XStringDefineProxy.GetString("WORLDBOSS_NO_RANK"));
+ ixuilabel2.SetText("0");
+ }
+ else
+ {
+ bool flag3 = guildList.myRankInfo.rank == XRankDocument.INVALID_RANK;
+ if (flag3)
+ {
+ ixuilabel.SetText(XStringDefineProxy.GetString("WORLDBOSS_NO_RANK"));
+ ixuilabel2.SetText("0");
+ }
+ else
+ {
+ XWorldBossGuildRankInfo xworldBossGuildRankInfo = guildList.myRankInfo as XWorldBossGuildRankInfo;
+ float num = 0f;
+ bool flag4 = xworldBossGuildRankInfo != null;
+ if (flag4)
+ {
+ num = xworldBossGuildRankInfo.damage;
+ }
+ ixuilabel.SetText(string.Format("{0}. ", guildList.myRankInfo.rank + 1u));
+ ixuilabel2.SetText(XSingleton<UiUtility>.singleton.NumberFormatBillion((ulong)num));
+ }
+ }
+ }
+ }
+
+ public void SetGuildMemberCount(uint count)
+ {
+ this.m_GuildMemberNum.SetText(XStringDefineProxy.GetString("WORLDBOSS_GUILD_MEMBER_NUM", new object[]
+ {
+ count
+ }));
+ }
+
+ public void RefreshVoice(ulong[] roles, int[] states)
+ {
+ }
+
+ public void HideVoice()
+ {
+ List<XBaseRankInfo> rankList = this.RankSource.GetRankList(this.m_SelectedType).rankList;
+ for (int i = 0; i < rankList.Count; i++)
+ {
+ Transform transform = this.rankMap[i].Find("voice");
+ bool flag = transform != null;
+ if (flag)
+ {
+ transform.gameObject.SetActive(false);
+ }
+ Transform transform2 = this.rankMap[i].Find("speak");
+ bool flag2 = transform2 != null;
+ if (flag2)
+ {
+ transform2.gameObject.SetActive(false);
+ }
+ }
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/XWorldBossDamageRankHandler.cs.meta b/Client/Assets/Scripts/XMainClient/UI/XWorldBossDamageRankHandler.cs.meta
new file mode 100644
index 00000000..87c57708
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XWorldBossDamageRankHandler.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 72147a29dcddc284a9c31351ee4f06f2
+timeCreated: 1611403936
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/XWorldBossEndRankView.cs b/Client/Assets/Scripts/XMainClient/UI/XWorldBossEndRankView.cs
new file mode 100644
index 00000000..3a152c27
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XWorldBossEndRankView.cs
@@ -0,0 +1,343 @@
+using System;
+using System.Collections.Generic;
+using KKSG;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class XWorldBossEndRankView : DlgBase<XWorldBossEndRankView, XWorldBossEndRankBehaviour>
+ {
+ public override string fileName
+ {
+ get
+ {
+ return "GameSystem/WorldBossEndRankDlg";
+ }
+ }
+
+ public override int sysid
+ {
+ get
+ {
+ return XFastEnumIntEqualityComparer<XSysDefine>.ToInt(XSysDefine.XSys_WorldBoss_EndRank);
+ }
+ }
+
+ public override bool autoload
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ private XWorldBossDocument _Doc;
+
+ private RankeType m_CurrRankType;
+
+ protected override void Init()
+ {
+ base.Init();
+ this._Doc = XDocuments.GetSpecificDocument<XWorldBossDocument>(XWorldBossDocument.uuID);
+ this._Doc.WorldBossEndRankView = this;
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ base.uiBehaviour.m_DamageRankTab.bChecked = true;
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ base.uiBehaviour.m_BtnClose.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnCloseClick));
+ base.uiBehaviour.m_BtnGoReward.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnGoRewardClick));
+ base.uiBehaviour.m_DamageRankTab.ID = (ulong)((long)XFastEnumIntEqualityComparer<RankeType>.ToInt(RankeType.WorldBossDamageRank));
+ base.uiBehaviour.m_DamageRankTab.RegisterOnCheckEventHandler(new CheckBoxOnCheckEventHandler(this.OnRankTabClicked));
+ base.uiBehaviour.m_GuildRankTab.ID = (ulong)((long)XFastEnumIntEqualityComparer<RankeType>.ToInt(RankeType.WorldBossGuildRank));
+ base.uiBehaviour.m_GuildRankTab.RegisterOnCheckEventHandler(new CheckBoxOnCheckEventHandler(this.OnRankTabClicked));
+ base.uiBehaviour.m_WrapContent.RegisterItemUpdateEventHandler(new WrapItemUpdateEventHandler(this.DamageRankWrapContentItemUpdated));
+ }
+
+ private bool OnRankTabClicked(IXUICheckBox checkbox)
+ {
+ bool flag = !checkbox.bChecked;
+ bool result;
+ if (flag)
+ {
+ result = false;
+ }
+ else
+ {
+ XWorldBossDocument specificDocument = XDocuments.GetSpecificDocument<XWorldBossDocument>(XWorldBossDocument.uuID);
+ this.m_CurrRankType = (RankeType)checkbox.ID;
+ RankeType currRankType = this.m_CurrRankType;
+ if (currRankType != RankeType.WorldBossGuildRank)
+ {
+ if (currRankType == RankeType.WorldBossDamageRank)
+ {
+ specificDocument.ReqWorldBossEnd();
+ }
+ }
+ else
+ {
+ specificDocument.ReqRankData(this.m_CurrRankType, false);
+ }
+ result = true;
+ }
+ return result;
+ }
+
+ protected override void OnUnload()
+ {
+ this._Doc.WorldBossDescView = null;
+ base.OnUnload();
+ }
+
+ private bool OnCloseClick(IXUIButton button)
+ {
+ this.SetVisibleWithAnimation(false, null);
+ return true;
+ }
+
+ private bool OnGoRewardClick(IXUIButton button)
+ {
+ XSingleton<XGameSysMgr>.singleton.OpenSystem(XSysDefine.XSys_Mail, 0UL);
+ this.SetVisibleWithAnimation(false, null);
+ return true;
+ }
+
+ public void RefreshDamageRank()
+ {
+ bool flag = !base.IsVisible();
+ if (!flag)
+ {
+ base.uiBehaviour.m_RankTitle.SetText(XSingleton<XStringTable>.singleton.GetString("WORLDBOSS_RESULT_RANK_ROLE"));
+ XWorldBossDocument specificDocument = XDocuments.GetSpecificDocument<XWorldBossDocument>(XWorldBossDocument.uuID);
+ List<WorldBossDamageInfo> endListDamage = specificDocument.EndListDamage;
+ bool flag2 = endListDamage.Count == 0;
+ if (flag2)
+ {
+ base.uiBehaviour.m_RankPanel_EmptyRank.gameObject.SetActive(true);
+ base.uiBehaviour.m_RankPanel_EmptyRank.SetText(XStringDefineProxy.GetString("GUILD_BOSS_EMPTY_RANK"));
+ base.uiBehaviour.m_WrapContent.gameObject.SetActive(false);
+ }
+ else
+ {
+ base.uiBehaviour.m_RankPanel_EmptyRank.gameObject.SetActive(false);
+ base.uiBehaviour.m_WrapContent.gameObject.SetActive(true);
+ base.uiBehaviour.m_WrapContent.SetContentCount(endListDamage.Count, false);
+ base.uiBehaviour.m_ScrollView.ResetPosition();
+ }
+ }
+ }
+
+ public void RefreshGuildRank()
+ {
+ bool flag = !base.IsVisible();
+ if (!flag)
+ {
+ base.uiBehaviour.m_RankTitle.SetText(XSingleton<XStringTable>.singleton.GetString("WORLDBOSS_RESULT_RANK_GUILD"));
+ XWorldBossDocument specificDocument = XDocuments.GetSpecificDocument<XWorldBossDocument>(XWorldBossDocument.uuID);
+ List<XBaseRankInfo> rankList = specificDocument.GuildRankList.rankList;
+ bool flag2 = rankList == null || rankList.Count == 0;
+ if (flag2)
+ {
+ base.uiBehaviour.m_RankPanel_EmptyRank.gameObject.SetActive(true);
+ base.uiBehaviour.m_RankPanel_EmptyRank.SetText(XStringDefineProxy.GetString("GUILD_BOSS_EMPTY_RANK"));
+ base.uiBehaviour.m_WrapContent.gameObject.SetActive(false);
+ }
+ else
+ {
+ base.uiBehaviour.m_RankPanel_EmptyRank.gameObject.SetActive(false);
+ base.uiBehaviour.m_WrapContent.gameObject.SetActive(true);
+ base.uiBehaviour.m_WrapContent.SetContentCount(rankList.Count, false);
+ base.uiBehaviour.m_ScrollView.ResetPosition();
+ }
+ }
+ }
+
+ private void DamageRankWrapContentItemUpdated(Transform t, int index)
+ {
+ bool flag = !base.IsVisible();
+ if (!flag)
+ {
+ XWorldBossDocument specificDocument = XDocuments.GetSpecificDocument<XWorldBossDocument>(XWorldBossDocument.uuID);
+ IXUISprite ixuisprite = t.Find("RankImage").GetComponent("XUISprite") as IXUISprite;
+ IXUILabel ixuilabel = t.Find("Rank").GetComponent("XUILabel") as IXUILabel;
+ IXUILabelSymbol ixuilabelSymbol = t.Find("Name").GetComponent("XUILabelSymbol") as IXUILabelSymbol;
+ IXUILabel ixuilabel2 = t.Find("Value").GetComponent("XUILabel") as IXUILabel;
+ float num = 0f;
+ string inputText = "";
+ bool flag2 = this.m_CurrRankType == RankeType.WorldBossDamageRank;
+ if (flag2)
+ {
+ List<WorldBossDamageInfo> endListDamage = specificDocument.EndListDamage;
+ bool flag3 = endListDamage == null;
+ if (flag3)
+ {
+ return;
+ }
+ bool flag4 = index < 0 || index >= endListDamage.Count;
+ if (flag4)
+ {
+ return;
+ }
+ WorldBossDamageInfo worldBossDamageInfo = endListDamage[index];
+ bool flag5 = worldBossDamageInfo == null;
+ if (flag5)
+ {
+ XSingleton<XDebug>.singleton.AddErrorLog("XGuildDragonView.GuildRankWrapContentItemUpdated is null ", null, null, null, null, null);
+ return;
+ }
+ num = worldBossDamageInfo.damage;
+ inputText = worldBossDamageInfo.rolename;
+ }
+ else
+ {
+ bool flag6 = this.m_CurrRankType == RankeType.WorldBossGuildRank;
+ if (flag6)
+ {
+ List<XBaseRankInfo> rankList = specificDocument.GuildRankList.rankList;
+ bool flag7 = rankList == null;
+ if (flag7)
+ {
+ return;
+ }
+ bool flag8 = index < 0 || index >= rankList.Count;
+ if (flag8)
+ {
+ return;
+ }
+ XBaseRankInfo xbaseRankInfo = rankList[index];
+ bool flag9 = xbaseRankInfo == null;
+ if (flag9)
+ {
+ XSingleton<XDebug>.singleton.AddErrorLog("XGuildDragonView.GuildRankWrapContentItemUpdated is null ", null, null, null, null, null);
+ return;
+ }
+ num = xbaseRankInfo.value;
+ inputText = xbaseRankInfo.name;
+ }
+ }
+ ixuilabel2.SetText(XSingleton<UiUtility>.singleton.NumberFormatBillion((ulong)num));
+ ixuilabelSymbol.InputText = inputText;
+ bool flag10 = index < 3;
+ if (flag10)
+ {
+ ixuisprite.spriteName = string.Format("N{0}", index + 1);
+ ixuisprite.SetVisible(true);
+ }
+ else
+ {
+ ixuisprite.SetVisible(false);
+ ixuilabel.SetText((index + 1).ToString());
+ }
+ }
+ }
+
+ public void SetMyRankFrame()
+ {
+ GameObject myRank = base.uiBehaviour.m_MyRank;
+ GameObject myOutOfRange = base.uiBehaviour.m_MyOutOfRange;
+ XWorldBossDocument specificDocument = XDocuments.GetSpecificDocument<XWorldBossDocument>(XWorldBossDocument.uuID);
+ List<XBaseRankInfo> rankList = specificDocument.GuildRankList.rankList;
+ bool flag = rankList != null && rankList.Count == 0;
+ if (flag)
+ {
+ myOutOfRange.SetActive(false);
+ myRank.SetActive(false);
+ }
+ else
+ {
+ bool flag2 = this.m_CurrRankType == RankeType.WorldBossGuildRank;
+ if (flag2)
+ {
+ XGuildDocument specificDocument2 = XDocuments.GetSpecificDocument<XGuildDocument>(XGuildDocument.uuID);
+ bool flag3 = !specificDocument2.bInGuild;
+ if (flag3)
+ {
+ myOutOfRange.SetActive(false);
+ myRank.SetActive(false);
+ return;
+ }
+ }
+ bool flag4 = specificDocument.GuildRankList.myRankInfo == null;
+ if (flag4)
+ {
+ myRank.SetActive(false);
+ }
+ else
+ {
+ myRank.SetActive(true);
+ IXUISprite ixuisprite = myRank.transform.Find("RankImage").GetComponent("XUISprite") as IXUISprite;
+ IXUILabelSymbol ixuilabelSymbol = myRank.transform.Find("Name").gameObject.GetComponent("XUILabelSymbol") as IXUILabelSymbol;
+ IXUILabel ixuilabel = myRank.transform.Find("Value").gameObject.GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel2 = myRank.transform.Find("Rank").gameObject.GetComponent("XUILabel") as IXUILabel;
+ ixuilabelSymbol.InputText = specificDocument.GuildRankList.myRankInfo.name;
+ ixuilabel.SetText(XSingleton<UiUtility>.singleton.NumberFormatBillion(specificDocument.GuildRankList.myRankInfo.value));
+ bool flag5 = specificDocument.GuildRankList.myRankInfo.rank < 3u;
+ if (flag5)
+ {
+ ixuisprite.spriteName = string.Format("N{0}", specificDocument.GuildRankList.myRankInfo.rank + 1u);
+ ixuisprite.SetVisible(true);
+ }
+ else
+ {
+ ixuisprite.SetVisible(false);
+ ixuilabel2.SetText((specificDocument.GuildRankList.myRankInfo.rank + 1u).ToString());
+ }
+ myOutOfRange.SetActive(specificDocument.GuildRankList.myRankInfo.rank == XRankDocument.INVALID_RANK);
+ }
+ }
+ }
+
+ public void SetMyRankFrame(WorldBossDamageInfo myInfo)
+ {
+ XWorldBossDocument specificDocument = XDocuments.GetSpecificDocument<XWorldBossDocument>(XWorldBossDocument.uuID);
+ GameObject myRank = base.uiBehaviour.m_MyRank;
+ GameObject myOutOfRange = base.uiBehaviour.m_MyOutOfRange;
+ List<WorldBossDamageInfo> endListDamage = specificDocument.EndListDamage;
+ bool flag = endListDamage.Count == 0;
+ if (flag)
+ {
+ myOutOfRange.SetActive(false);
+ myRank.SetActive(false);
+ }
+ else
+ {
+ bool flag2 = myInfo == null;
+ if (flag2)
+ {
+ myRank.SetActive(false);
+ }
+ else
+ {
+ myRank.SetActive(true);
+ IXUISprite ixuisprite = myRank.transform.Find("RankImage").GetComponent("XUISprite") as IXUISprite;
+ IXUILabelSymbol ixuilabelSymbol = myRank.transform.Find("Name").gameObject.GetComponent("XUILabelSymbol") as IXUILabelSymbol;
+ IXUILabel ixuilabel = myRank.transform.Find("Value").gameObject.GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel2 = myRank.transform.Find("Rank").gameObject.GetComponent("XUILabel") as IXUILabel;
+ ixuilabelSymbol.InputText = myInfo.rolename;
+ ixuilabel.SetText(XSingleton<UiUtility>.singleton.NumberFormatBillion((ulong)myInfo.damage));
+ bool flag3 = myInfo.rank < 3u;
+ if (flag3)
+ {
+ ixuisprite.spriteName = string.Format("N{0}", myInfo.rank + 1u);
+ ixuisprite.SetVisible(true);
+ }
+ else
+ {
+ ixuisprite.SetVisible(false);
+ ixuilabel2.SetText((myInfo.rank + 1u).ToString());
+ }
+ myOutOfRange.SetActive(myInfo.rank == XRankDocument.INVALID_RANK);
+ }
+ }
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/XWorldBossEndRankView.cs.meta b/Client/Assets/Scripts/XMainClient/UI/XWorldBossEndRankView.cs.meta
new file mode 100644
index 00000000..28c89b20
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XWorldBossEndRankView.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 56329a4464f472a458c3a7b0fe585304
+timeCreated: 1611403742
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/XWorldBossResultView.cs b/Client/Assets/Scripts/XMainClient/UI/XWorldBossResultView.cs
new file mode 100644
index 00000000..f751324c
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XWorldBossResultView.cs
@@ -0,0 +1,83 @@
+using System;
+using UILib;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class XWorldBossResultView : DlgBase<XWorldBossResultView, GuildDragonChallengeResultBehaviour>
+ {
+ public override string fileName
+ {
+ get
+ {
+ return "Battle/Comcotinue";
+ }
+ }
+
+ public override int layer
+ {
+ get
+ {
+ return 1;
+ }
+ }
+
+ public override bool pushstack
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ private XWorldBossDocument _Doc;
+
+ private XElapseTimer countDownTime = new XElapseTimer();
+
+ protected override void Init()
+ {
+ base.Init();
+ this._Doc = XDocuments.GetSpecificDocument<XWorldBossDocument>(XWorldBossDocument.uuID);
+ this._Doc.WorldBossResultView = this;
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ base.uiBehaviour.m_ReturnBtn.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnReturn));
+ }
+
+ private void OnReturn(IXUISprite sp)
+ {
+ this._Doc.ReqQutiScene();
+ }
+
+ public void ShowResult(bool isWin)
+ {
+ bool flag = !base.IsVisible();
+ if (flag)
+ {
+ this.countDownTime.LeftTime = float.Parse(XSingleton<XGlobalConfig>.singleton.GetValue("WorldBossGameEndCountDown"));
+ this.SetVisibleWithAnimation(true, new DlgBase<XWorldBossResultView, GuildDragonChallengeResultBehaviour>.OnAnimationOver(this.StartCountDown));
+ if (isWin)
+ {
+ base.uiBehaviour.m_Desription.SetText(XStringDefineProxy.GetString("WORLDBOSS_CHANGGLE_DES_WIN"));
+ }
+ else
+ {
+ base.uiBehaviour.m_Desription.SetText(XStringDefineProxy.GetString("WORLDBOSS_CHANGGLE_DES_FAILED"));
+ }
+ }
+ }
+
+ private void StartCountDown()
+ {
+ }
+
+ public override void OnUpdate()
+ {
+ base.OnUpdate();
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/XWorldBossResultView.cs.meta b/Client/Assets/Scripts/XMainClient/UI/XWorldBossResultView.cs.meta
new file mode 100644
index 00000000..75f33ae9
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XWorldBossResultView.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: cafd92e69c4d21441a2b27f3cf9ab894
+timeCreated: 1611404544
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/XWorldBossView.cs b/Client/Assets/Scripts/XMainClient/UI/XWorldBossView.cs
new file mode 100644
index 00000000..d2a5d120
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XWorldBossView.cs
@@ -0,0 +1,618 @@
+using System;
+using System.Collections.Generic;
+using KKSG;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class XWorldBossView : DlgBase<XWorldBossView, XWorldBossBehaviour>
+ {
+ public override string fileName
+ {
+ get
+ {
+ return "GameSystem/WorldBossDlg";
+ }
+ }
+
+ public override int layer
+ {
+ get
+ {
+ return 1;
+ }
+ }
+
+ public override bool pushstack
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override bool fullscreenui
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override bool hideMainMenu
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override bool autoload
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ private XWorldBossDocument _Doc;
+
+ private XLeftTimeCounter m_LeftTime;
+
+ private RankeType m_CurrRankType;
+
+ private ulong SubscribebuttonID = 0UL;
+
+ private uint mBossHp = 0u;
+
+ protected override void Init()
+ {
+ base.Init();
+ this.m_LeftTime = new XLeftTimeCounter(base.uiBehaviour.m_LeftTime, false);
+ this._Doc = XDocuments.GetSpecificDocument<XWorldBossDocument>(XWorldBossDocument.uuID);
+ this._Doc.WorldBossDescView = this;
+ }
+
+ public void ShowView()
+ {
+ bool flag = !base.IsVisible();
+ if (flag)
+ {
+ this.SetVisibleWithAnimation(true, null);
+ int num = 0;
+ int num2 = 0;
+ this._Doc.GetWorldBossTime(ref num, ref num2);
+ string arg = string.Format("{0}:{1}", (num / 100).ToString("D2"), (num % 100).ToString("D2"));
+ string arg2 = string.Format("{0}:{1}", (num2 / 100).ToString("D2"), (num2 % 100).ToString("D2"));
+ base.uiBehaviour.m_OpenTime.SetText(string.Format(XStringDefineProxy.GetString("WORLDBOSS_OPEN_TIME"), arg, arg2));
+ }
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ this.ShowDropList();
+ this.InitAwardPanelInfo();
+ base.uiBehaviour.m_GuildRankTab.bChecked = true;
+ this.OnRankTabClicked(base.uiBehaviour.m_GuildRankTab);
+ this._Doc.ReqWorldBossState();
+ base.uiBehaviour.m_LeftTime.SetVisible(false);
+ base.uiBehaviour.m_LeftTimeHint.gameObject.SetActive(false);
+ base.uiBehaviour.m_RewardPanel.SetActive(false);
+ base.uiBehaviour.m_AwardTip.SetText(XStringDefineProxy.GetString("WORLDBOSS_AWARD_TIP"));
+ this.RefreshSubscribe();
+ this.RefreshPrivilegeInfo();
+ }
+
+ private void RefreshPrivilegeInfo()
+ {
+ XWelfareDocument specificDocument = XDocuments.GetSpecificDocument<XWelfareDocument>(XWelfareDocument.uuID);
+ base.uiBehaviour.m_PrivilegeIcon.SetGrey(specificDocument.IsOwnMemberPrivilege(MemberPrivilege.KingdomPrivilege_Commerce));
+ base.uiBehaviour.m_PrivilegeIcon.SetSprite(specificDocument.GetMemberPrivilegeIcon(MemberPrivilege.KingdomPrivilege_Commerce));
+ base.uiBehaviour.m_PrivilegeName.SetEnabled(specificDocument.IsOwnMemberPrivilege(MemberPrivilege.KingdomPrivilege_Commerce));
+ PayMemberTable.RowData memberPrivilegeConfig = specificDocument.GetMemberPrivilegeConfig(MemberPrivilege.KingdomPrivilege_Commerce);
+ bool flag = memberPrivilegeConfig != null;
+ if (flag)
+ {
+ BuffTable.RowData buffData = XSingleton<XBuffTemplateManager>.singleton.GetBuffData((int)memberPrivilegeConfig.worldBossbuffid[0], (int)memberPrivilegeConfig.worldBossbuffid[1]);
+ bool flag2 = buffData != null;
+ if (flag2)
+ {
+ base.uiBehaviour.m_PrivilegeName.SetText(XStringDefineProxy.GetString("WORLDBOSS_PRIVILEGE_BUFF", new object[]
+ {
+ buffData.BuffName
+ }));
+ }
+ base.uiBehaviour.m_PrivilegeIcon.SetVisible(buffData != null);
+ }
+ }
+
+ protected override void OnHide()
+ {
+ base.OnHide();
+ base.uiBehaviour.m_BossTexture.SetTexturePath("");
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ base.uiBehaviour.m_BtnClose.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnCloseClick));
+ base.uiBehaviour.m_BtnGoBattle.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnGoBattleClick));
+ base.uiBehaviour.m_BtnReward.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnRewardClick));
+ base.uiBehaviour.m_BtnRewardPanelClose.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnRewardClose));
+ base.uiBehaviour.m_DamageRankTab.ID = (ulong)((long)XFastEnumIntEqualityComparer<RankeType>.ToInt(RankeType.WorldBossDamageRank));
+ base.uiBehaviour.m_DamageRankTab.RegisterOnCheckEventHandler(new CheckBoxOnCheckEventHandler(this.OnRankTabClicked));
+ base.uiBehaviour.m_GuildRankTab.ID = (ulong)((long)XFastEnumIntEqualityComparer<RankeType>.ToInt(RankeType.WorldBossGuildRank));
+ base.uiBehaviour.m_GuildRankTab.RegisterOnCheckEventHandler(new CheckBoxOnCheckEventHandler(this.OnRankTabClicked));
+ base.uiBehaviour.m_BtnSubscribe.ID = 0UL;
+ base.uiBehaviour.m_BtnSubscribe.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnSubscribeClick));
+ base.uiBehaviour.m_BtnCancelSubscribe.ID = 1UL;
+ base.uiBehaviour.m_BtnCancelSubscribe.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnSubscribeClick));
+ base.uiBehaviour.m_WrapContent.RegisterItemUpdateEventHandler(new WrapItemUpdateEventHandler(this.DamageRankWrapContentItemUpdated));
+ base.uiBehaviour.m_AwardWrapContent.RegisterItemUpdateEventHandler(new WrapItemUpdateEventHandler(this.AwardWrapContentItemUpdated));
+ base.uiBehaviour.m_Privilege.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnPrivilegeClick));
+ }
+
+ private void OnPrivilegeClick(IXUISprite btn)
+ {
+ DlgBase<XWelfareView, XWelfareBehaviour>.singleton.CheckActiveMemberPrivilege(MemberPrivilege.KingdomPrivilege_Commerce);
+ }
+
+ protected override void OnUnload()
+ {
+ this.m_LeftTime = null;
+ this._Doc.WorldBossDescView = null;
+ base.OnUnload();
+ }
+
+ private bool OnRankTabClicked(IXUICheckBox checkbox)
+ {
+ bool flag = !checkbox.bChecked;
+ bool result;
+ if (flag)
+ {
+ result = false;
+ }
+ else
+ {
+ this.m_CurrRankType = (RankeType)checkbox.ID;
+ this._Doc.ReqRankData(this.m_CurrRankType, false);
+ result = true;
+ }
+ return result;
+ }
+
+ private bool OnSubscribeClick(IXUIButton button)
+ {
+ this.SubscribebuttonID = button.ID;
+ PushSubscribeTable.RowData pushSubscribe = XPushSubscribeDocument.GetPushSubscribe(PushSubscribeOptions.WorldBoss);
+ XSingleton<UiUtility>.singleton.ShowModalDialog((button.ID == 0UL) ? pushSubscribe.SubscribeDescription : pushSubscribe.CancelDescription, XStringDefineProxy.GetString("COMMON_OK"), XStringDefineProxy.GetString("COMMON_CANCEL"), new ButtonClickEventHandler(this.ReqSubscribeChange));
+ return true;
+ }
+
+ private bool ReqSubscribeChange(IXUIButton button)
+ {
+ XSingleton<UiUtility>.singleton.CloseModalDlg();
+ XPushSubscribeDocument specificDocument = XDocuments.GetSpecificDocument<XPushSubscribeDocument>(XPushSubscribeDocument.uuID);
+ specificDocument.ReqSetSubscribe(PushSubscribeOptions.WorldBoss, this.SubscribebuttonID == 0UL);
+ return true;
+ }
+
+ public void RefreshSubscribe()
+ {
+ PushSubscribeTable.RowData pushSubscribe = XPushSubscribeDocument.GetPushSubscribe(PushSubscribeOptions.WorldBoss);
+ XPushSubscribeDocument specificDocument = XDocuments.GetSpecificDocument<XPushSubscribeDocument>(XPushSubscribeDocument.uuID);
+ bool flag = XSingleton<XClientNetwork>.singleton.AccountType == LoginType.LGOIN_WECHAT_PF && pushSubscribe.IsShow && specificDocument.OptionsDefault != null && specificDocument.OptionsDefault.Count != 0;
+ if (flag)
+ {
+ bool curSubscribeStatus = specificDocument.GetCurSubscribeStatus(PushSubscribeOptions.WorldBoss);
+ base.uiBehaviour.m_BtnSubscribe.gameObject.SetActive(!curSubscribeStatus);
+ base.uiBehaviour.m_BtnCancelSubscribe.gameObject.SetActive(curSubscribeStatus);
+ }
+ else
+ {
+ base.uiBehaviour.m_BtnSubscribe.gameObject.SetActive(false);
+ base.uiBehaviour.m_BtnCancelSubscribe.gameObject.SetActive(false);
+ }
+ }
+
+ public override void OnUpdate()
+ {
+ base.OnUpdate();
+ bool flag = this.m_LeftTime != null;
+ if (flag)
+ {
+ this.m_LeftTime.Update();
+ bool flag2 = this.m_LeftTime.GetLeftTime() <= 0;
+ if (flag2)
+ {
+ this.UpdateLeftTimeState(0f, this.mBossHp);
+ }
+ }
+ }
+
+ public void SetLeftTime(float time, uint BossHp)
+ {
+ this.m_LeftTime.SetLeftTime(time, -1);
+ base.uiBehaviour.m_LeftTime.SetVisible(time > 0f);
+ this.UpdateLeftTimeState(time, BossHp);
+ }
+
+ private void UpdateLeftTimeState(float time, uint BossHp)
+ {
+ this.mBossHp = BossHp;
+ bool flag = time <= 0f;
+ if (flag)
+ {
+ base.uiBehaviour.m_LeftTimeHint.gameObject.SetActive(true);
+ base.uiBehaviour.m_LeftTime.gameObject.SetActive(false);
+ bool flag2 = BossHp > 0u;
+ if (flag2)
+ {
+ base.uiBehaviour.m_LeftTimeHint.SetText(XStringDefineProxy.GetString("GUILD_BOSS_CONDITION_TIME"));
+ }
+ else
+ {
+ base.uiBehaviour.m_LeftTimeHint.SetText(XStringDefineProxy.GetString("GUILD_BOSS_CONDITION_BOSSDIE"));
+ }
+ }
+ else
+ {
+ base.uiBehaviour.m_LeftTimeHint.gameObject.SetActive(false);
+ bool flag3 = BossHp <= 0u;
+ if (flag3)
+ {
+ base.uiBehaviour.m_LeftTimeHint.gameObject.SetActive(true);
+ base.uiBehaviour.m_LeftTime.gameObject.SetActive(false);
+ base.uiBehaviour.m_LeftTimeHint.SetText(XStringDefineProxy.GetString("GUILD_BOSS_CONDITION_BOSSDIE"));
+ }
+ }
+ }
+
+ private bool OnCloseClick(IXUIButton button)
+ {
+ this.SetVisibleWithAnimation(false, null);
+ return true;
+ }
+
+ private bool OnRewardClick(IXUIButton button)
+ {
+ base.uiBehaviour.m_RewardPanel.SetActive(true);
+ base.uiBehaviour.m_AwardScrollView.ResetPosition();
+ return true;
+ }
+
+ private bool OnRewardClose(IXUIButton button)
+ {
+ base.uiBehaviour.m_RewardPanel.SetActive(false);
+ return true;
+ }
+
+ private bool OnGoBattleClick(IXUIButton button)
+ {
+ bool flag = this.m_LeftTime.GetLeftTime() > 0;
+ bool result;
+ if (flag)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString("WORLDBOSS_CHANGGLE_NOTOPEN"), "fece00");
+ result = false;
+ }
+ else
+ {
+ bool flag2 = this.mBossHp <= 0u;
+ if (flag2)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString("WORLDBOSS_CHANGGLE_DEAD"), "fece00");
+ result = false;
+ }
+ else
+ {
+ bool flag3 = XSingleton<XGameSysMgr>.singleton.IsSystemOpened(XSysDefine.XSys_Activity_WorldBoss);
+ if (flag3)
+ {
+ bool flag4 = XTeamDocument.GoSingleBattleBeforeNeed(new ButtonClickEventHandler(this.OnGoBattleClick), button);
+ if (flag4)
+ {
+ return true;
+ }
+ this._Doc.ReqEnterWorldBossScene();
+ }
+ else
+ {
+ int sysOpenLevel = XSingleton<XGameSysMgr>.singleton.GetSysOpenLevel(XFastEnumIntEqualityComparer<XSysDefine>.ToInt(XSysDefine.XSys_Activity_WorldBoss));
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString("ERR_WORLDBOSS_NOPEN", new object[]
+ {
+ sysOpenLevel
+ }), "fece00");
+ }
+ result = true;
+ }
+ }
+ return result;
+ }
+
+ public void RefreshDamageRank()
+ {
+ bool flag = this.m_CurrRankType == RankeType.WorldBossDamageRank;
+ List<XBaseRankInfo> rankList;
+ if (flag)
+ {
+ rankList = this._Doc.DamageRankList.rankList;
+ }
+ else
+ {
+ rankList = this._Doc.GuildRankList.rankList;
+ }
+ bool flag2 = rankList.Count == 0;
+ if (flag2)
+ {
+ base.uiBehaviour.m_RankPanel_EmptyRank.gameObject.SetActive(true);
+ base.uiBehaviour.m_RankPanel_EmptyRank.SetText(XStringDefineProxy.GetString("GUILD_BOSS_EMPTY_RANK"));
+ base.uiBehaviour.m_WrapContent.gameObject.SetActive(false);
+ }
+ else
+ {
+ base.uiBehaviour.m_RankPanel_EmptyRank.gameObject.SetActive(false);
+ base.uiBehaviour.m_WrapContent.gameObject.SetActive(true);
+ base.uiBehaviour.m_WrapContent.SetContentCount(rankList.Count, false);
+ base.uiBehaviour.m_ScrollView.ResetPosition();
+ }
+ }
+
+ private void DamageRankWrapContentItemUpdated(Transform t, int index)
+ {
+ bool flag = this.m_CurrRankType == RankeType.WorldBossGuildRank;
+ List<XBaseRankInfo> rankList;
+ if (flag)
+ {
+ rankList = this._Doc.GuildRankList.rankList;
+ }
+ else
+ {
+ rankList = this._Doc.DamageRankList.rankList;
+ }
+ bool flag2 = index < 0 || index >= rankList.Count;
+ if (!flag2)
+ {
+ XBaseRankInfo xbaseRankInfo = rankList[index];
+ bool flag3 = xbaseRankInfo == null;
+ if (flag3)
+ {
+ XSingleton<XDebug>.singleton.AddErrorLog("XGuildDragonView.GuildRankWrapContentItemUpdated is null ", null, null, null, null, null);
+ }
+ else
+ {
+ IXUISprite ixuisprite = t.Find("Rank").GetComponent("XUISprite") as IXUISprite;
+ IXUILabel ixuilabel = t.Find("Rank3").GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel2 = t.Find("Name").GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel3 = t.Find("shanghai").GetComponent("XUILabel") as IXUILabel;
+ XWorldBossGuildRankInfo xworldBossGuildRankInfo = xbaseRankInfo as XWorldBossGuildRankInfo;
+ XWorldBossDamageRankInfo xworldBossDamageRankInfo = xbaseRankInfo as XWorldBossDamageRankInfo;
+ float num = 0f;
+ bool flag4 = xworldBossGuildRankInfo != null;
+ if (flag4)
+ {
+ num = xworldBossGuildRankInfo.damage;
+ }
+ else
+ {
+ bool flag5 = xworldBossDamageRankInfo != null;
+ if (flag5)
+ {
+ num = xworldBossDamageRankInfo.damage;
+ }
+ }
+ ixuilabel3.SetText(XSingleton<UiUtility>.singleton.NumberFormatBillion((ulong)num));
+ ixuilabel2.SetText(xbaseRankInfo.name);
+ bool flag6 = index < 3;
+ if (flag6)
+ {
+ string spriteName = string.Format("N{0}", index + 1);
+ ixuisprite.spriteName = spriteName;
+ ixuisprite.SetVisible(true);
+ }
+ else
+ {
+ ixuisprite.SetVisible(false);
+ ixuilabel.SetText((index + 1).ToString());
+ }
+ }
+ }
+ }
+
+ public void SetMyRankFrame()
+ {
+ bool flag = this.m_CurrRankType == RankeType.WorldBossGuildRank;
+ XBaseRankList xbaseRankList;
+ if (flag)
+ {
+ xbaseRankList = this._Doc.GuildRankList;
+ }
+ else
+ {
+ xbaseRankList = this._Doc.DamageRankList;
+ }
+ GameObject gameObject = base.uiBehaviour.m_RankPanel.transform.Find("RankTpl").gameObject;
+ GameObject gameObject2 = base.uiBehaviour.m_RankPanel.transform.Find("OutOfRange").gameObject;
+ bool flag2 = xbaseRankList.rankList.Count == 0;
+ if (flag2)
+ {
+ gameObject2.SetActive(false);
+ gameObject.SetActive(false);
+ }
+ else
+ {
+ XBaseRankInfo latestMyRankInfo = xbaseRankList.GetLatestMyRankInfo();
+ bool flag3 = this.m_CurrRankType == RankeType.WorldBossGuildRank;
+ if (flag3)
+ {
+ XGuildDocument specificDocument = XDocuments.GetSpecificDocument<XGuildDocument>(XGuildDocument.uuID);
+ bool flag4 = !specificDocument.bInGuild;
+ if (flag4)
+ {
+ gameObject2.SetActive(false);
+ gameObject.SetActive(false);
+ return;
+ }
+ gameObject2.SetActive(latestMyRankInfo.rank == XRankDocument.INVALID_RANK);
+ bool flag5 = latestMyRankInfo == null || latestMyRankInfo.rank == XRankDocument.INVALID_RANK;
+ if (flag5)
+ {
+ gameObject.SetActive(false);
+ return;
+ }
+ }
+ else
+ {
+ gameObject2.SetActive(latestMyRankInfo.rank == XRankDocument.INVALID_RANK);
+ bool flag6 = latestMyRankInfo == null || latestMyRankInfo.id == 0UL;
+ if (flag6)
+ {
+ gameObject.SetActive(false);
+ return;
+ }
+ }
+ gameObject.SetActive(true);
+ IXUISprite ixuisprite = gameObject.transform.Find("Rank").GetComponent("XUISprite") as IXUISprite;
+ IXUILabel ixuilabel = gameObject.transform.Find("Name").gameObject.GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel2 = gameObject.transform.Find("shanghai").gameObject.GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel3 = gameObject.transform.Find("Rank3").gameObject.GetComponent("XUILabel") as IXUILabel;
+ ixuilabel.SetText(latestMyRankInfo.name);
+ XWorldBossGuildRankInfo xworldBossGuildRankInfo = latestMyRankInfo as XWorldBossGuildRankInfo;
+ XWorldBossDamageRankInfo xworldBossDamageRankInfo = latestMyRankInfo as XWorldBossDamageRankInfo;
+ float num = 0f;
+ bool flag7 = xworldBossGuildRankInfo != null;
+ if (flag7)
+ {
+ num = xworldBossGuildRankInfo.damage;
+ }
+ else
+ {
+ bool flag8 = xworldBossDamageRankInfo != null;
+ if (flag8)
+ {
+ num = xworldBossDamageRankInfo.damage;
+ }
+ }
+ ixuilabel2.SetText(XSingleton<UiUtility>.singleton.NumberFormatBillion((ulong)num));
+ bool flag9 = latestMyRankInfo.rank < 3u;
+ if (flag9)
+ {
+ string spriteName = string.Format("N{0}", latestMyRankInfo.rank + 1u);
+ ixuisprite.spriteName = spriteName;
+ ixuisprite.SetVisible(true);
+ }
+ else
+ {
+ ixuisprite.SetVisible(false);
+ ixuilabel3.SetText((latestMyRankInfo.rank + 1u).ToString());
+ }
+ }
+ }
+
+ private void InitAwardPanelInfo()
+ {
+ List<WorldBossRewardTable.RowData> awardList = this._Doc.GetAwardList(XSingleton<XAttributeMgr>.singleton.XPlayerData.Level);
+ base.uiBehaviour.m_AwardWrapContent.SetContentCount(awardList.Count, false);
+ base.uiBehaviour.m_AwardScrollView.ResetPosition();
+ }
+
+ private void AwardWrapContentItemUpdated(Transform t, int index)
+ {
+ List<WorldBossRewardTable.RowData> awardList = this._Doc.GetAwardList(XSingleton<XAttributeMgr>.singleton.XPlayerData.Level);
+ bool flag = index < 0 || index >= awardList.Count;
+ if (!flag)
+ {
+ WorldBossRewardTable.RowData rowData = awardList[index];
+ IXUILabel ixuilabel = t.Find("Bg/Rank/RankNum").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel.SetText(rowData.Rank[1].ToString());
+ for (int i = 0; i < 4; i++)
+ {
+ GameObject gameObject = t.Find(string.Format("Bg/Grid/ItemTpl{0}", i)).gameObject;
+ bool flag2 = i < rowData.ShowReward.Count;
+ if (flag2)
+ {
+ gameObject.gameObject.SetActive(true);
+ XSingleton<XItemDrawerMgr>.singleton.normalItemDrawer.DrawItem(gameObject, (int)rowData.ShowReward[i, 0], (int)rowData.ShowReward[i, 1], false);
+ IXUISprite ixuisprite = gameObject.transform.Find("Icon").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.ID = (ulong)rowData.ShowReward[i, 0];
+ ixuisprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(XSingleton<UiUtility>.singleton.OnItemClick));
+ }
+ else
+ {
+ gameObject.gameObject.SetActive(false);
+ }
+ }
+ }
+ }
+
+ public void ShowDropList()
+ {
+ WorldBossRewardTable.RowData dropReward = this._Doc.GetDropReward(XSingleton<XAttributeMgr>.singleton.XPlayerData.Level);
+ bool flag = dropReward == null;
+ if (!flag)
+ {
+ base.uiBehaviour.m_DropAwardPool.FakeReturnAll();
+ for (int i = 0; i < dropReward.ShowReward.Count; i++)
+ {
+ this.CreateDropAward((int)dropReward.ShowReward[i, 0], false);
+ }
+ AuctionHouseDocument specificDocument = XDocuments.GetSpecificDocument<AuctionHouseDocument>(AuctionHouseDocument.uuID);
+ List<GuildAuctReward.RowData> guildAuctReward = specificDocument.GetGuildAuctReward(AuctionActType.WorldBoss);
+ bool flag2 = guildAuctReward.Count > 0;
+ if (flag2)
+ {
+ uint[] rewardShow = guildAuctReward[0].RewardShow;
+ bool flag3 = rewardShow != null;
+ if (flag3)
+ {
+ for (int j = 0; j < rewardShow.Length; j++)
+ {
+ this.CreateDropAward((int)rewardShow[j], true);
+ }
+ }
+ }
+ base.uiBehaviour.m_DropAwardPool.ActualReturnAll(false);
+ base.uiBehaviour.m_DropAward.Refresh();
+ }
+ }
+
+ private void CreateDropAward(int itemID, bool bGuild)
+ {
+ GameObject gameObject = base.uiBehaviour.m_DropAwardPool.FetchGameObject(false);
+ gameObject.transform.parent = base.uiBehaviour.m_DropAward.gameObject.transform;
+ IXUILabel ixuilabel = gameObject.transform.Find("Flag").GetComponent("XUILabel") as IXUILabel;
+ ixuilabel.SetText(bGuild ? XStringDefineProxy.GetString("GUILDBOSS_ICON_FLAG") : XStringDefineProxy.GetString("WORLDBOSS_ICON_FLAG"));
+ XSingleton<XItemDrawerMgr>.singleton.normalItemDrawer.DrawItem(gameObject, itemID, 0, false);
+ IXUISprite ixuisprite = gameObject.transform.Find("Icon").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.ID = (ulong)((long)itemID);
+ ixuisprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(XSingleton<UiUtility>.singleton.OnItemClick));
+ }
+
+ public void ShowCurrentBoss(uint BossID)
+ {
+ string name = XSingleton<XEntityMgr>.singleton.EntityStatistics.GetByID(BossID).Name;
+ base.uiBehaviour.m_BossName.SetText(name);
+ string str = "";
+ string[] andSeparateValue = XSingleton<XGlobalConfig>.singleton.GetAndSeparateValue("WorldBossTexture", XGlobalConfig.ListSeparator);
+ for (int i = 0; i < andSeparateValue.Length; i++)
+ {
+ string[] array = andSeparateValue[i].Split(XGlobalConfig.SequenceSeparator);
+ bool flag = array.Length == 2;
+ if (flag)
+ {
+ bool flag2 = uint.Parse(array[0]) == BossID;
+ if (flag2)
+ {
+ str = array[1];
+ break;
+ }
+ }
+ }
+ base.uiBehaviour.m_BossTexture.SetTexturePath(XSingleton<XGlobalConfig>.singleton.GetValue("WorldBossTextureLocation") + str);
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/XWorldBossView.cs.meta b/Client/Assets/Scripts/XMainClient/UI/XWorldBossView.cs.meta
new file mode 100644
index 00000000..d88dc259
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XWorldBossView.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 2a519724f1281d641aec0cfeda377cfb
+timeCreated: 1611403495
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/XYyMallOperate.cs b/Client/Assets/Scripts/XMainClient/UI/XYyMallOperate.cs
new file mode 100644
index 00000000..d65b607f
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XYyMallOperate.cs
@@ -0,0 +1,28 @@
+using System;
+using UILib;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class XYyMallOperate : XDramaOperate
+ {
+ public override void ShowNpc(XNpc npc)
+ {
+ base.ShowNpc(npc);
+ XDramaOperateParam data = XDataPool<XDramaOperateParam>.GetData();
+ data.Text = base._GetRandomNpcText(npc);
+ data.Npc = npc;
+ data.AppendButton(XSingleton<XStringTable>.singleton.GetString("PartnerNpcOk"), new ButtonClickEventHandler(this._OnOKClicked), 0UL);
+ data.AppendButton(XSingleton<XStringTable>.singleton.GetString("PartnerNpcCancel"), null, 0UL);
+ base._FireEvent(data);
+ }
+
+ private bool _OnOKClicked(IXUIButton btn)
+ {
+ DlgBase<DramaDlg, DramaDlgBehaviour>.singleton.SetVisible(false, true);
+ XSingleton<XGameSysMgr>.singleton.OpenSystem(XSysDefine.XSys_Welfare_YyMall, 0UL);
+ return true;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/XYyMallOperate.cs.meta b/Client/Assets/Scripts/XMainClient/UI/XYyMallOperate.cs.meta
new file mode 100644
index 00000000..9c157c96
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/XYyMallOperate.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: e102db829385a0544adac0ff0efca534
+timeCreated: 1611404700
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/UI/YorozuyaHandler.cs b/Client/Assets/Scripts/XMainClient/UI/YorozuyaHandler.cs
new file mode 100644
index 00000000..1596b998
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/YorozuyaHandler.cs
@@ -0,0 +1,151 @@
+using System;
+using KKSG;
+using UILib;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient.UI
+{
+ internal class YorozuyaHandler : DlgHandlerBase
+ {
+ protected override string FileName
+ {
+ get
+ {
+ return "Hall/YorozuyaHandler";
+ }
+ }
+
+ private IXUIButton m_photoBtn;
+
+ private IXUIButton m_rideBtn;
+
+ private IXUIButton m_sceneTransformBtn;
+
+ private IXUIButton m_exitBtn;
+
+ private IXUIButton m_3dBtn;
+
+ private IXUIButton m_25dBtn;
+
+ private XSwitchSight m_SwitchSight;
+
+ protected override void Init()
+ {
+ base.Init();
+ this.m_photoBtn = (base.PanelObject.transform.Find("Photo").GetComponent("XUIButton") as IXUIButton);
+ this.m_rideBtn = (base.PanelObject.transform.Find("Ride").GetComponent("XUIButton") as IXUIButton);
+ this.m_sceneTransformBtn = (base.PanelObject.transform.Find("SceneTransform").GetComponent("XUIButton") as IXUIButton);
+ this.m_exitBtn = (base.PanelObject.transform.Find("Exit").GetComponent("XUIButton") as IXUIButton);
+ this.m_3dBtn = (base.PanelObject.transform.Find("3d2.5d/3d").GetComponent("XUIButton") as IXUIButton);
+ this.m_25dBtn = (base.PanelObject.transform.Find("3d2.5d/2.5d").GetComponent("XUIButton") as IXUIButton);
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ this.m_photoBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnClickYorozuyPhotoBtn));
+ this.m_rideBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnClickYorozuyRideBtn));
+ this.m_sceneTransformBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OpenTransUi));
+ this.m_exitBtn.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnClickExit));
+ this.m_SwitchSight = new XSwitchSight(new ButtonClickEventHandler(this.OnViewClick), this.m_25dBtn, this.m_3dBtn, null);
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ bool flag = XSingleton<XOperationData>.singleton.OperationMode == XOperationMode.X3D_Free;
+ if (flag)
+ {
+ XSingleton<XOperationData>.singleton.OperationMode = XOperationMode.X3D;
+ }
+ this.SetView(XSingleton<XOperationData>.singleton.OperationMode);
+ }
+
+ protected override void OnHide()
+ {
+ base.OnHide();
+ }
+
+ public override void OnUnload()
+ {
+ base.OnUnload();
+ }
+
+ public void SetView(XOperationMode mode)
+ {
+ if (mode != XOperationMode.X25D)
+ {
+ if (mode == XOperationMode.X3D)
+ {
+ this.m_3dBtn.gameObject.SetActive(true);
+ this.m_25dBtn.gameObject.SetActive(false);
+ }
+ }
+ else
+ {
+ this.m_3dBtn.gameObject.SetActive(false);
+ this.m_25dBtn.gameObject.SetActive(true);
+ }
+ }
+
+ private bool OnClickYorozuyPhotoBtn(IXUIButton btn)
+ {
+ DlgBase<ScreenShotShareView, ScreenShotShareBehaviour>.singleton.SetVisible(true, true);
+ DlgBase<ScreenShotShareView, ScreenShotShareBehaviour>.singleton.ShowMainView();
+ return true;
+ }
+
+ private bool OnClickYorozuyRideBtn(IXUIButton btn)
+ {
+ XPetDocument specificDocument = XDocuments.GetSpecificDocument<XPetDocument>(XPetDocument.uuID);
+ bool flag = XSingleton<XAttributeMgr>.singleton.XPlayerData.Outlook.state.type == OutLookStateType.OutLook_RidePetCopilot;
+ if (flag)
+ {
+ specificDocument.OnReqOffPetPairRide();
+ }
+ else
+ {
+ bool flag2 = specificDocument.Pets.Count == 0;
+ if (flag2)
+ {
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString("PET_NONE"), "fece00");
+ }
+ else
+ {
+ specificDocument.ReqRecentMount();
+ }
+ }
+ return true;
+ }
+
+ private bool OpenTransUi(IXUIButton btn)
+ {
+ DlgBase<YorozuyaDlg, YorozuyaBehaviour>.singleton.SetVisible(true, true);
+ return true;
+ }
+
+ private bool OnViewClick(IXUIButton btn)
+ {
+ this.SetView((XOperationMode)btn.ID);
+ return true;
+ }
+
+ private bool OnClickExit(IXUIButton btn)
+ {
+ SceneType sceneType = XSingleton<XScene>.singleton.SceneType;
+ bool flag = sceneType != SceneType.SCENE_LEISURE;
+ bool result;
+ if (flag)
+ {
+ result = true;
+ }
+ else
+ {
+ XSingleton<XScene>.singleton.ReqLeaveScene();
+ result = true;
+ }
+ return result;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/UI/YorozuyaHandler.cs.meta b/Client/Assets/Scripts/XMainClient/UI/YorozuyaHandler.cs.meta
new file mode 100644
index 00000000..920d40da
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/UI/YorozuyaHandler.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: d2af588f417e13c4b817c136d756c9da
+timeCreated: 1611404596
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant: