diff --git a/SVSim.BattleEngine/COPIED.manifest.tsv b/SVSim.BattleEngine/COPIED.manifest.tsv index 30d0c48..c0510a1 100644 --- a/SVSim.BattleEngine/COPIED.manifest.tsv +++ b/SVSim.BattleEngine/COPIED.manifest.tsv @@ -14,17 +14,21 @@ AnimationOrTween/Direction.cs AnimationOrTween/Direction.cs 7c497cb72737f19f0a3c ApiType.cs ApiType.cs 36dd6f7ae87a7caa985eebb0de02f709f7276c48068b1db2f28dcfd1fdc826be 0 ApplySkillTargetFilterCollection.cs ApplySkillTargetFilterCollection.cs 286c92d6dee5ffb49b9d62e5064bdd303fa5dc523e7e29b3ef8ec03f2e185b8b 0 AreaBGInfo.cs AreaBGInfo.cs 7d1b5307511080f36019fe6286effe9960c4cebe4a3174668dd1988b2ebbe995 0 +AreaBGInfoSection20.cs AreaBGInfoSection20.cs d9d4a8ae71b5e7f7616d212509c43bf0a0014f4488582ca558555c4f394508ba 0 AreaSelInfo.cs AreaSelInfo.cs ef8322fa8a622cb44b3e8ff1dc03b85f784d7397bfdf4b6018993489e5eeb35f 0 AreaSelectBG.cs AreaSelectBG.cs 1b3df23385533e2fa487ac99b6f7663d9f3dcebf9d8ef5b59517a6c60029dd03 0 AreaSelectChapterEffect.cs AreaSelectChapterEffect.cs 5fe6057da9763c57807cff59388f137a266436d82a9efe934c6ff4489f55e2b1 0 AreaSelectEffectControlBase.cs AreaSelectEffectControlBase.cs 4a0507a8649c0ff5027fd798212d71ea50609c5913f15a036adf47b74e62e03c 0 AreaSelectMapIcon.cs AreaSelectMapIcon.cs 8f53fba1e364974a1d0e2a74714fd75ad5b169a32227cd956d3178f3c0d631c5 0 AreaSelectUI.cs AreaSelectUI.cs b60642a02eefc4fa87bcf260ec6690bf0d9c85fbbb9306df71512a6243fee584 0 +AreaSelectUtility.cs AreaSelectUtility.cs 790c1e8736b553b68092b149e09ae456338760de052a90e79738cd502cd0a546 0 ArenaColosseum.cs ArenaColosseum.cs 66b067b705e632eae13711062dad303f645fefe0eb92c7ea53faca6e11c1b3f1 0 ArenaCompetition.cs ArenaCompetition.cs b93a87591acb5ab3e3e56a477ffbd2e9fd6a22a9fc0b46e29ace3553bbf4f279 0 ArenaData.cs ArenaData.cs 03b256eb428d73a1b51df1bbea80f883256bea98e97b7c6410a79f5097bd76e0 0 ArenaEntryBase.cs ArenaEntryBase.cs 382a1386eda2b152ff0dc698a10c1c1d87de74d44e776e4fbe16d65021249088 0 ArenaEntryDataBase.cs ArenaEntryDataBase.cs c952da76cb1ec0102c1f5b6ab3e858c59387811531043a489b5ef96b9286e01d 0 +ArenaEntryDialogBase.cs ArenaEntryDialogBase.cs e873492ef02e22395d8f2d6311792d26c4c5fbc286a21deb9dc83f95b74cc41f 0 +ArenaEntryDialogData.cs ArenaEntryDialogData.cs b72e3e49df92947f33295e50025226171ae8659c2141bae672fe59868a01f5f7 0 ArenaField.cs ArenaField.cs ffd6e156fa2abe44f29e9f16304290fe8544e3f08a2d273f88823efec7e50d8c 0 ArenaNextSceneSelector.cs ArenaNextSceneSelector.cs d9e4338e53fc085a892edb2cd7348764736ec35d475239d7b2a95ac67ede4e58 0 ArenaResultAnimationAgent.cs ArenaResultAnimationAgent.cs 0d8142cdeb937bb6b2b37d9e34de3ddaeccf6c8ddfad7a15b49601e8ac154dea 0 @@ -46,11 +50,13 @@ BackGroundBase.cs BackGroundBase.cs b45dfcd6593e604dfc630dbd09ed09003fbc03ce5d5c BaseCardIDComp.cs BaseCardIDComp.cs 2732088664fcd4f1d01b80755756874b6a72308dd126461ae9a76f6520cf144d 0 BattleCamera.cs BattleCamera.cs 35cd1b3cfb6d5c9932a5b9777983b01fede0c8638a4ade7637a18318048ff2d7 0 BattleCardBase.cs BattleCardBase.cs b105aec032149ab0a1730c6e06e25530699851707150ad4b72e24fe6d17fd50f 0 +BattleCardBaseExtensions.cs BattleCardBaseExtensions.cs 7725c04514bbf74f8b9a020ea882cd69d1ec4b8dadc6ee1147379c434cc0d772 0 BattleCardIconAnimations.cs BattleCardIconAnimations.cs b92ae5d235191bf076a2997b4cd85bb9bd9a7689a388014bdac7390d271f428d 0 BattleControl.cs BattleControl.cs 1638d42a0eb5e0291da90b24a62db923c6ed66eca5a114010f39ba265b2e7bb2 0 BattleCoroutine.cs BattleCoroutine.cs 52951b72da7d4605ff9ea8beb7e109b5634c0827bdcec30949c50fb36b75b6fa 0 BattleEnemy.cs BattleEnemy.cs e2c1e600cfa860ec5472508d52313db65b1bf8abfa1c28716e75e52a206c1a0c 0 BattleFinishParam.cs BattleFinishParam.cs 46ebca81cf025b911875d261bd9ab664392b66bbe0fcc86a48be93c80ed92d11 0 +BattleFinishResponsProcessing.cs BattleFinishResponsProcessing.cs c543f7e2941bc99f2325d7a88197390e5b676389d92297353797dda75a388fb1 0 BattleFinishSendBase.cs BattleFinishSendBase.cs 47a2e85409008b9e39579f7da0c312be4179954336e7bbc9f68a922f93757d08 0 BattleFinishToOpponentDisConnectChecker.cs BattleFinishToOpponentDisConnectChecker.cs ec4b9678aa85a1eaacef626a6e07c20274535a4fca97db841fefc53be7f5381e 0 BattleKeywordInfoListMgr.cs BattleKeywordInfoListMgr.cs a014170d0b3f5499635bcc2e29755dc2f3125d5a5a28b1741a4abc74b4abcf86 0 @@ -60,6 +66,7 @@ BattleMenuMgr.cs BattleMenuMgr.cs 7418699063e01641d0df1ed16773a9ac9418f418cc047f BattlePlayer.cs BattlePlayer.cs 001409844b46ddaf0a5edbce4e015749ece61053adf725a978987d7063a02632 0 BattlePlayerBase.cs BattlePlayerBase.cs 9d3a665158706460a52900008dcfcdf575dbe08cb6d3cc05e63e718b2885b51b 0 BattlePlayerVfxCreatorBase.cs BattlePlayerVfxCreatorBase.cs abcacc4b7a020259aa01cd08e31c1dd1abd8f87e482a64f9610032c453fa9fc4 0 +BattlePlayersExtension.cs BattlePlayersExtension.cs 07ff352633a54b241ec153b811641f031bcfdccd0f157c6b3760d1e7a2377fa3 0 BattleResultUIController.cs BattleResultUIController.cs d127088f56f60a0f3c3b5803e7254ecc3f966ad600aafad9cbd23683c45f4adb 0 BattleSettingBaseData.cs BattleSettingBaseData.cs 57fdad819d3665fae83b35eb6b6d282461a92ed003dc618121e7a4f70b3152af 0 BattleSettingData.cs BattleSettingData.cs dbf96af7489d434970b976ba065ddf8c9605754a9df727572e5c889404040291 0 @@ -77,6 +84,7 @@ BothBattlePlayerFilter.cs BothBattlePlayerFilter.cs d9b5460d0154326c4bfd32227da8 BuffCountInfo.cs BuffCountInfo.cs a8ca34862f1d83c9c99a702eb5c4bd02e799ad2b9127f4c380b940029e884214 0 BuffDetailInfoUI.cs BuffDetailInfoUI.cs bef5b52e085808e650d013187963b8a8bcfe6c6623a253cb9707d6fac740cab4 0 BuffInfo.cs BuffInfo.cs 820575948ba2de316270e52a8009838b00ed7c6a834e37883372be24f6b07fdd 0 +BuyCrystal.cs BuyCrystal.cs d80aaab65b5238080764b20eaa853163104480c859868cbd01ad67f1197228ba 0 ByteReader.cs ByteReader.cs 7a52a7fab89ef5915fab93560518b089d2e28b4a30ae9e1bfb145209ce1400a0 0 CantPlayCardFilterInfo.cs CantPlayCardFilterInfo.cs d83ea7282348ee3cf8b391748ec6720fa8a928ddb27020f8ee0191ea242d073d 0 CardBasePrm.cs CardBasePrm.cs e34d9f9bbf52dfe2a0b30cd56d5e900e711ac1423cd26d23dde627e6066c08c4 0 @@ -127,6 +135,8 @@ ColosseumBattleFinishDetail.cs ColosseumBattleFinishDetail.cs b666569fbebdaa212c ColosseumCardPanel.cs ColosseumCardPanel.cs 57ac21e9aea157c32ceeedcdf448d5cf25bfb4512c225c791136881cf97190ff 0 ColosseumDetail.cs ColosseumDetail.cs 336f55ca78aa976520347ca4d1dffd2c03c41de5eb8afab8643ffedce1645ba9 0 ColosseumEntry.cs ColosseumEntry.cs ee5af9a600edd2308b11682c9fa523931eed8a2c208b82d2ec4e9b2563f07074 0 +ColosseumEntryDialog.cs ColosseumEntryDialog.cs 72639f1b017747d65b7beafc941db3bd3aebf93347df8d288177bdbc1330a7de 0 +ColosseumHeadLine.cs ColosseumHeadLine.cs ef416babb05a866afc02451b41e891043e118796918eac9280c52301001a694f 0 ColosseumResultAnimationAgent.cs ColosseumResultAnimationAgent.cs 94516a64af44aba18eb5104283aa0e41ef4bdb87423bd857742eec53fb57a916 0 ColosseumResultAnimationHandler.cs ColosseumResultAnimationHandler.cs 7a2f79975efe09d891db158be9065a9edf2068af37d20ed02529109fd01300b5 0 ColosseumResultReporter.cs ColosseumResultReporter.cs 6e9ca923733f01c6c20aeb544c5ce5c0e58284bb2d480b1b5faa65ce7f24e060 0 @@ -136,6 +146,7 @@ ConnectionReportTrigger.cs ConnectionReportTrigger.cs c78d2c39db8a484c95b7e47c7b ConnectionReporter.cs ConnectionReporter.cs 64f1c1133af6cd674763ed612d837a14bbc5ce1908afc9f3a93ff6b6cc18577f 0 ConsistencyReportButtonAction.cs ConsistencyReportButtonAction.cs dbbc03ab138e28617e8f4d6e409f2441d50d9da8da8f53009a6b356e5e5273ec 0 ContentKeywordExt.cs ContentKeywordExt.cs 3e93b52de66c252f5225c0d8924e19c53852b3d9c9c46b5620702dc7b13e0986 0 +ConventionDeckDeleteTask.cs ConventionDeckDeleteTask.cs e142f9e79f8fb2405c0ab443e9ca97e90c371328751963335d91d94fc2919a3b 0 ConventionInfo.cs ConventionInfo.cs f4199507123b62b5da1633608e877cf0d9ed4ecf26a1671d520dfa2c8ee3026a 0 ConventionList.cs ConventionList.cs d0271cd5a5029c3ccf3fff460d093070d97fc13c1871573bd980733c6a21ad9c 0 ConventionListPlate.cs ConventionListPlate.cs 367921469919006a00056b6899bad8ff06c7ffcebe0142abe71b40a206b61ac2 0 @@ -148,8 +159,10 @@ CostHalfRoundDownModifier.cs CostHalfRoundDownModifier.cs d9acd090e82b61697e184e CostHalfRoundUpModifier.cs CostHalfRoundUpModifier.cs 92e2a80e70e590d861036e69c77beb5a48c52012885e62876240bed3a059fa70 0 CostSetModifier.cs CostSetModifier.cs f6821df3735ce643be552bb7b919ccb8c75a1c22135daf01ef28a6eed9bf7c02 0 CreateItemList.cs CreateItemList.cs 37647f56ebad7156a219ffed1f755fbb8554656599f82b67962c1c1802bb80c7 0 +Cute.Payment/StringExtensions.cs Cute.Payment/StringExtensions.cs 3d0f43fd0995ee154c7b873f31ba87f916fc6ba8b21ebd8231363f7dace95f4b 0 Cute.Payment\IPaymentCommonCallback.cs Cute.Payment\IPaymentCommonCallback.cs 21466450f2d87e33a5d8e8d681832bb230cc75547384d5cd69120e439235ebdf 0 Cute/EventExtension.cs Cute/EventExtension.cs abe1b8be9d01d8ad88901cdccf387563ae14282dd4e02b3fc1e1e7a872526f0c 0 +Cute/IEnumerableExtensions.cs Cute/IEnumerableExtensions.cs 6238351f85ebcc14e0cebfd1c1cc57162baf997d9e1b8de25a4316a41c9ff74b 0 Cute\AchievementManager.cs Cute\AchievementManager.cs ef74efb238feff1a14f3bc70c612b4faab3e5546612c2b21324998ae72d37091 0 Cute\AdjustManager.cs Cute\AdjustManager.cs 670477cb0f0b5e7d8c4940a6b826a57c037b8392a58caf242a0219160461c485 0 Cute\AssetBundleObject.cs Cute\AssetBundleObject.cs 8bb313efedc9c4ceea5ecc22768952299393dfa30e532c9d411e48f622929d2e 0 @@ -182,19 +195,25 @@ Cute\LocalSqliteKVS.cs Cute\LocalSqliteKVS.cs 75f8091265f3795e846c9a6ad45f8e3e46 Cute\ManifestDatahashKVS.cs Cute\ManifestDatahashKVS.cs 0eae9523c5fdafac69d67396e8b4b26bdca8749abe59feaf5775c1b92148602f 0 Cute\MovieManager.cs Cute\MovieManager.cs afe69325463e327cf9875f8a310f1b3c410652a13b144a7313920229e49df112 0 Cute\MoviePlayer.cs Cute\MoviePlayer.cs 146ae8ae35cedc1f977609b0dcb271ef46ef0def022b8c5de7720968bd7ca63f 0 +Cute\NativePluginWrapper.cs Cute\NativePluginWrapper.cs 0a343e7004cd6f8c06c5f34998587d909b6d73a3f2efccbcc9cb0d658a928e7e 0 Cute\NetworkManager.cs Cute\NetworkManager.cs 0045133deabae1d9d7323c1496d1e373c5fe4a1b731a81ed01ecac3500826ae1 0 Cute\NetworkTask.cs Cute\NetworkTask.cs dddf8a492571b5d0ae698a7e472c86f75a746d5ca0e7b34b08184cc820459acd 0 Cute\PCPlatform.cs Cute\PCPlatform.cs a0810fcee0d4228d7043804b71bc631414235a136d31e62090c9886e157e8186 0 Cute\PCPlatformSTEAM.cs Cute\PCPlatformSTEAM.cs d00b9316745b628d0bcb7ffd296e5ad3ee7e1e3dd006eabc652fd725b356bf2d 0 Cute\ParallelJob.cs Cute\ParallelJob.cs a6008b18295410cefa08fc98b6b9c4010c9a424120c322d86a050c2999f1750e 0 +Cute\PaymentCancelTask.cs Cute\PaymentCancelTask.cs 34797dfe926fceacb6ff6d806b9abdbb1c90d0dab64888fd034f6dabdc3fbacd 0 +Cute\PaymentItemListTask.cs Cute\PaymentItemListTask.cs 699476facb1c893aa3b01d467f421bc6dc39cf3e6bd0fbed8fae11466815b3e8 0 Cute\PaymentPCFinishTask.cs Cute\PaymentPCFinishTask.cs b8ec9fe1f1741a9525cb675d0b400b218c6d6b851f2eacaa104832afb44b627d 0 +Cute\PaymentPCItemListTask.cs Cute\PaymentPCItemListTask.cs 5bce671c6caa47d183cc8129bf1ae099d5c20e6c863ea5a90926878c7f09f13d 0 Cute\PaymentPCStartParams.cs Cute\PaymentPCStartParams.cs be95fa062f1bca344ca011a73ea9e6f9eef6fa2c559d3064c8ed9b2ca6fda902 0 Cute\PaymentPCStartParamsSTEAM.cs Cute\PaymentPCStartParamsSTEAM.cs fcaf910e2d5ab9f51703f7a9bdf959874059d42402e70984dacdf5d0dc5da459 0 Cute\PaymentPCStartTask.cs Cute\PaymentPCStartTask.cs bf5501c824f3d59f5f18c8bb2361243a06395c9275b2d576d172c082b8a3250e 0 +Cute\PaymentStartTask.cs Cute\PaymentStartTask.cs 293b3b16e2f607500c731421405b452aaaca04ae953a473611ee3cbf69b87a1f 0 Cute\PostParams.cs Cute\PostParams.cs 075f4ac38426adb7885083dd0638d902737d83d34c4b36befd8cef000ff4f2b1 0 Cute\QualityManager.cs Cute\QualityManager.cs c6bb9c24b798af63b951d77bf525604ad725c9f14eadccce016f0c91497beacf 0 Cute\ResourcesManager.cs Cute\ResourcesManager.cs 71d3f4d1e0d685fcc86ecb163a7c0509fc8455329c16cdb6d2a8a6044207f924 0 Cute\SavedataManager.cs Cute\SavedataManager.cs 5646f2abab140a3b680014dd7d642989be1b1e041292d0f60c814546a27d8130 0 +Cute\SceneType.cs Cute\SceneType.cs 2083fa25feabaf8fdadb5b76860cd3349cc41ce7dbedea1a6b976b71d1b97bd5 0 Cute\SignUpTask.cs Cute\SignUpTask.cs 12bc4a5ca60ba8e2305e5a1aa786a85911d9684005f38dea5469b67f42fb69c1 0 Cute\SkipCuteCheckResultCodes.cs Cute\SkipCuteCheckResultCodes.cs 9e61d6dca2c37a5cb99be5f4657fcd1789504cea08a9f234e35cfe5bc0c9b346 0 Cute\SocialServiceUtility.cs Cute\SocialServiceUtility.cs 98a01ef8cc4020f8fe4b1517946e9baa59f100cfa03bc0ebcc0d7561219d42e5 0 @@ -204,6 +223,7 @@ Cute\TimeData.cs Cute\TimeData.cs d1bb7dbdb7c456739a7949b2348121660df2ca5fba8f77 Cute\TimeUtil.cs Cute\TimeUtil.cs e1216cb3cf4bf4add6b239fa718ad5bfb62dcd704f66f4737b23461b03f70c9c 0 Cute\Toolbox.cs Cute\Toolbox.cs 1f33c50878dd0f2f2947ee38040fba727212db75b0a4fd783709e1f63eeeaaa0 0 Cute\URLScheme.cs Cute\URLScheme.cs e4a3c1b69dba941cda308d19b8c0e73af0c317c0834d8031d7702471a233cc11 0 +Cute\UpdateBirthTask.cs Cute\UpdateBirthTask.cs 044f9a7bdd08e345f4997f02a6f7917b447deb376173982e90e4a79ba7926b7f 0 Cute\UpdateiCloudUserDataTask.cs Cute\UpdateiCloudUserDataTask.cs 51b42f384a60587c64b7fa4e73ad23b0122cc03ff297ffd0d806043cce84586a 0 Cute\Utility.cs Cute\Utility.cs b81416aeee0d4e21d0793bf97ee0f88ab47d366f5cbd10207e402fe56fbb3554 0 Cute\WebViewManager.cs Cute\WebViewManager.cs b2ffdc6e77cb1f7f391a7ee4a1e7829c70ba7330c1e5e587b4294e15e3da2bd0 0 @@ -216,18 +236,23 @@ DataMgr.cs DataMgr.cs e26d86f920c1c4fa975100bca4e120da223aa00fdf2c7afe5555568503 Debug.cs Debug.cs b4f865824033417f743baa3ac8f75d9a6268aaff551b10a8c975797e52b9a774 0 DeckCreateMenuUI.cs DeckCreateMenuUI.cs 9fd67898af43926bec460f903d17c46b6276ec76fbdf5279f82a89099f14f52c 0 DeckData.cs DeckData.cs 6e55b1b948e5e0b023b2bcfda8ba3ba3349137ce7902bc954f448ea150ad8dff 0 +DeckDecisionColosseum.cs DeckDecisionColosseum.cs 1edab0c9684af6334efdff55da119b45e36281ef4023c977d0f568427ad2bf58 0 +DeckDecisionCompetition.cs DeckDecisionCompetition.cs f2bae2824426c51ab61195fc8ebfc9b3311d3b1a4ac3517eeeeb99424ae9d9c1 0 DeckDecisionUI.cs DeckDecisionUI.cs c860e82f9d92cc1a6ca9569185947f949731136a14f6923844f0d4f869b9e4e3 0 +DeckDeleteTask.cs DeckDeleteTask.cs e529a70056afede663a335da72e4a1970e6a2f66e7edf46eea930b91fb65c0d9 0 DeckFrame.cs DeckFrame.cs 10766591b689deda42f52312344641a216abea3bdd724cfb71b8e28861e0784e 0 DeckIntroduction.cs DeckIntroduction.cs 072fd4f510f7fb191b20a900a3599462f1a432b0fb5a5e7fe0f41f94a0c9770e 0 DeckIntroductionCopyDialog.cs DeckIntroductionCopyDialog.cs 3481c9bde5668f31b2cd110c38f5b1f37f23a01bc848dc97ab457e233ca7c27d 0 DeckIntroductionItem.cs DeckIntroductionItem.cs 203e91a28d0fb94e9f56e3353f6d245b278ad6fb5437ed99ad647970d44ea4d7 0 DeckListMenuUI.cs DeckListMenuUI.cs a3edab346b80866df72c2005c7a492f81c9a3da1bafd510fa6d6b205eedeb38f 0 +DeckSortDragDrop.cs DeckSortDragDrop.cs 021d2e2d02abd6552a89bf2a770197253dfc3a383e6826e2fadaf536d98fe28e 0 DegreeInfo.cs DegreeInfo.cs 1bef2f1b36023d033923cac8f96972380ed7e20a42b7114c67b4a29515fd02a1 0 DegreeInfoDetail.cs DegreeInfoDetail.cs 41c09ccb25ccd6a1628a1d56079767434a6fa5228bad103eaee88b12a8d00659 0 DepthBlurAndBloom.cs DepthBlurAndBloom.cs fddb16fe8e4701ffa5687fa2f6e1d10e37e4713163e6c64ae2b1070b7bf7774b 0 DetailMgr.cs DetailMgr.cs b9c05d782358a88ff7efe57f4d75c24bd9e8c11fb661f368c038e30a44293ba7 0 DetailPanelControl.cs DetailPanelControl.cs f14d798412cb1e071966ed715d863c42a24b34993de3cc2235bc9780daedc0c5 0 DialogBase.cs DialogBase.cs 29b1a74e1b413b9c7a6026a95855be50e17c9c9d9ded48fd29e50f1dddbe2bbf 0 +DialogRewardScroll.cs DialogRewardScroll.cs f2ce1417d54d7dd933b439639b4fb04980149681d4f4d78c7fb4d5df014a50f6 0 DialogSupport.cs DialogSupport.cs 38ea3efbeca826ccfcdde55f4454987ee703c1bd70d3009f5914b8552d81e8e9 0 DisconnectToDispChecker.cs DisconnectToDispChecker.cs eff0b9cffe1f860c52f1541d859903e7c04b0b9533e8e9fb17db419c111b20af 0 DisconnectToLoseChecker.cs DisconnectToLoseChecker.cs 62eb9d5ba9924579904be303dd687dc472a7846abcf897eaa9d71dd8cf3c564e 0 @@ -364,6 +389,7 @@ LoadingBase.cs LoadingBase.cs 0f63fc8676b84b1b8c36bf51f41b241c74e236abbff1e07b26 LoadingInScene.cs LoadingInScene.cs 9ae449b0ba5668e3d3d8d1d0ae340514617ac705d364c9be8993efe6afe4ddb1 0 LocalNotificationPriority.cs LocalNotificationPriority.cs ca3265d518980b3058603bcd1151b0ac7f934866f991ff967826870f4a9cb060 0 Localization.cs Localization.cs 07d154439612a9a8e6e49ec7edd9f5fc0a7af965d231291c96c0057d991e4a48 0 +Mail.cs Mail.cs ba86653cb360de7bd79848e81757c76dbb7c067ade9e0f8b7c7721fff4095907 0 MailData.cs MailData.cs 8229d3b651b4df09e52def59da26a70635224c3e8f80437d01c7a1012be8f942 0 MailDataDetail.cs MailDataDetail.cs 61caaf9762aff044c3f675a4899b47a31af0872a70f1035d822755842fd2ad3e 0 MailResult.cs MailResult.cs 373b73be1b55a04ddeaa492c150031556aa71144e4b662c609da6ac5f02aa75f 0 @@ -557,6 +583,7 @@ NullTurnPanelControl.cs NullTurnPanelControl.cs 4c65fd3cca218efa16563934404a0054 OffenseAddModifier.cs OffenseAddModifier.cs 5f3150bfdb6cc9b4f581ca0d1e82b05d649a6eb86542aa8eaa777961e40f5fc2 0 OffenseMultiplyModifier.cs OffenseMultiplyModifier.cs bbe0e1023839d6f97ce887615cada33d6c12eb9b1cd1ab09bc4ed3ff06c88317 0 OffenseSetModifier.cs OffenseSetModifier.cs 2100c8a68ca22b7d74e79d62fbd378b83a9a053332b1f10163dd8fed1b7adda2 0 +OmoteLog.cs OmoteLog.cs ef0f64c5883c69c821a03e1e1c985f2af82dc934ec5f6f598ef34d597893d92e 0 OmotePlugin.cs OmotePlugin.cs a70f953d064a1511a113f97403a03552e1db4622cf0941a41597efedfc529cd8 0 OpenURLOnClick.cs OpenURLOnClick.cs d2d823441976fdb025023fb4f5605c95a5d7bde38f1869dd1b31fa0eae8dc389 0 OperateMgr.cs OperateMgr.cs e850a929de25ffac21dc85de267235a530e4671ad5edf8652cca9c5be8418028 0 @@ -689,6 +716,7 @@ RivayleBackalleyField.cs RivayleBackalleyField.cs 52ff935248c68d70ec31e67d6f2147 RivayleField.cs RivayleField.cs 9b69b1048560d224f4d3ddd17c582720b1b67fb9694ad30263575280166de234 0 RoomBattleMatching.cs RoomBattleMatching.cs c45c33d2b1a471bd59943a860664bb145130c9b2d048103e7b5dc487acc4970e 0 RoomBattleMatchingDetail.cs RoomBattleMatchingDetail.cs f3585e9c69dbb3549d7ba0c34b195fa95a92122534cab9d16d0b22a3c871f2af 0 +RoomInviteFriendColum.cs RoomInviteFriendColum.cs 920eaa65fd97dc29468c5c7a0319f482d7b5a4ea37c16d1840896bf85054dc59 0 RoomInviteReceiveDialog.cs RoomInviteReceiveDialog.cs a199462c44acc0f178ff1d5c537de423dbe7d73b251b90f81dc534bc2e942d7f 0 RoomMatchFinish.cs RoomMatchFinish.cs 03e6a59f109b8d6ae000bc899a882ee9bb64d4361406c727198dc619a0010209 0 RoomMatchFinishDetail.cs RoomMatchFinishDetail.cs 3f80cc80214fe7f025c8d2c9378639ed5f81f9b086966fbe27bc6f5f0c74fba5 0 @@ -713,6 +741,7 @@ SendIntervalTrigger.cs SendIntervalTrigger.cs ac92d11f73c9cd58a08b07f2d852028a64 SendIntervalTriggerStandard.cs SendIntervalTriggerStandard.cs 81a57bf38fc4f6a89b47535a3d0b7498458ac3be9d86214b6121eb2037208ddb 0 SendKeyActionDataManager.cs SendKeyActionDataManager.cs b74f41da4e4f704e0300026d9af6e27a1374370214a6f77694db5dd01c726fd6 0 SetDamageInfo.cs SetDamageInfo.cs c19138615d995e320a4877de90d4801127c7cd0db62ce38d794d5a214c9cd694 0 +SetDataTranslateTask.cs SetDataTranslateTask.cs 28b678e72e8cdf528f3ebc4c91bd37de2694fc597fef1731c3bc4ca919f99ddb 0 SetHealModifierInfo.cs SetHealModifierInfo.cs ec923d2e56eac3a192da637eeef53fe587009fc60d76b27ff3cc7dc259e5d84c 0 SetShaderGlobalColorBG.cs SetShaderGlobalColorBG.cs 605e1b276a8dc8cc0bdb083470de6fd462e168a827200f932aac8d5b67245934 0 ShieldInfo.cs ShieldInfo.cs c7ca21d0fd446587d0e2ce1e80b29055ea4ef2f6c154a18eaa279543aba8eb1e 0 @@ -1278,6 +1307,7 @@ SkyboundArtCountAddModifier.cs SkyboundArtCountAddModifier.cs 253e896f5d73dc2493 SlideObjectReceiveControl.cs SlideObjectReceiveControl.cs 25066b5bbcee488a0ae0d634e595354d194715895dd8f197c57740dc9a65d654 0 SoundMgr.cs SoundMgr.cs 6446b13929ddfef0f1e421498e7e007e5f047fb0b9af01ad4cb155f10abb98c3 0 SpecialArenaField.cs SpecialArenaField.cs 412c324799fcf5ba3b44f569fc38eb55ee839d19eac69d239f0aa36b613b9ffa 0 +SpecialCrystalBuyFinishDialog.cs SpecialCrystalBuyFinishDialog.cs 5588d01b6ac44fe141c48e39bd6115b0bc9016c9558ae182519cc443877634b7 0 SpecialCrystalDialog.cs SpecialCrystalDialog.cs 15d2f53d2787f08015c1c962ad2a71349d8e97bd57f0a15833a83819de8deaeb 0 SpecialCrystalInfo.cs SpecialCrystalInfo.cs 5f8544bfa60c28abe33c1241f998b843b3556abd78ad806e86f1d0f54207144a 0 SpecialSkillBattleCard.cs SpecialSkillBattleCard.cs e48fbcea339fdf5bf613b12b2ff19ec67c3aa543c6bddb6b5054e1d2b92fa9bd 0 @@ -1297,6 +1327,7 @@ Sqlite3Plugin\Sqlite3LibImport.cs Sqlite3Plugin\Sqlite3LibImport.cs 183751c9a34a StageField.cs StageField.cs 00b4ce73ee0ecf03cd735eeaf3c92d88ff84d961545ce9a128fe276ca8a6bc20 0 StartPickMultiCardVfx.cs StartPickMultiCardVfx.cs 5319d35407eb703a1ce1e62c8010ca48bbbdab28664801e44229742709856dc2 0 StaticTextForUILabel.cs StaticTextForUILabel.cs 9436023ca36b366ede714d43732a219acd072f187f78f79c93f52d255a8ebc9e 0 +SteamManager.cs SteamManager.cs c788304a8880d9cafd3b5bb8244f77b433515585af0ab73d35204391939f2bae 0 StockEmitMgr.cs StockEmitMgr.cs 652918ba621b02fc0141d1cce1e68847dbfb9d6be19cf9d2b87ee737c1fac742 0 StockReceiveMgr.cs StockReceiveMgr.cs ca15f8d8c7a532558071dd010fcecff5e05ef69891f8f364db4537ddf8f08fdc 0 StockSequenceMgr.cs StockSequenceMgr.cs ff64a78a351e6ed010b0bf9ef00e84d6540109fe578cdbf2772e17d6d66ada38 0 @@ -1322,6 +1353,7 @@ TempleNightField.cs TempleNightField.cs 3d27607868382d47a14f17880cfd5e7a340112e9 TimeLeftUpdate.cs TimeLeftUpdate.cs 682a67e5ffaa1ab2e2f1ab05aed0caf5be8c2a228609b8325da1734a95ab3fa4 0 Timer.cs Timer.cs 0ac4b1fc273798a587d38987cc7a353d8c071a81c4b7ba293fdc59a9c2e1c804 0 TimerMgr.cs TimerMgr.cs cfe8eb9a3405153f46ae962772d23934c39daaa34336cf6b309484c511509d1e 0 +TitleMenu.cs TitleMenu.cs 538e67dc74b434cdfc31e9c802f0eea94006176f78d084183c2a17348bbd29b8 0 TitleUI.cs TitleUI.cs 50c94d31b173fcb949c3c29a1c89f8d5735587d4a9da87e81dc8bb5771b16538 0 TokenDrawModifier.cs TokenDrawModifier.cs ee94b1a849c7779f1c0fcaf0951c06cadcdfd0fe7c61182de4e1cc468af494cb 0 TopBar.cs TopBar.cs e3365819277393c8892627127c124e72917b3c50e15a9bf549b44cf2e2fa8350 0 @@ -1337,6 +1369,7 @@ TutorialResultAnimationAgent.cs TutorialResultAnimationAgent.cs 4101f22dc613cd36 TutorialResultAnimationHandler.cs TutorialResultAnimationHandler.cs bc841acb23029a83b76f7f751b61b6e763fed8d0db6990a204b7a9984212efcd 0 TutorialResultReporter.cs TutorialResultReporter.cs cec5f150092707940105b19a0fd27739dc5f0fa02c8d18e0ded38715bb7fdba2 0 TweenAlpha.cs TweenAlpha.cs d1f530a59b492a34140f88c0fecb88406289cc37817e822d3a36cd141ec03e7e 0 +TweenAlphaExtension.cs TweenAlphaExtension.cs e4d361dd647ad1e83bb624050c26875d4be5d96a201b99c52853c6a4add3b2c7 0 TweenColor.cs TweenColor.cs 27070a2f526015c8a9b68005be21e9235d46c72a35eb646b09e3d38fdaea8cb1 0 TweenPosition.cs TweenPosition.cs 1426cfaf028ac956d7e1e286ad67189723116ca2dc4926a101ca1784c90ec22a 0 TweenPositionX.cs TweenPositionX.cs d612a70acd8d1b45e9adbb01dc94a7649a4c05c7bfe0cea86728f8fd17e1a1de 0 @@ -1353,11 +1386,13 @@ UIBase_Textuer.cs UIBase_Textuer.cs 2a99abc5455d56dbd35db98494761d6ea07b7efcf0a3 UIBasicSprite.cs UIBasicSprite.cs 82e6d31f92cdccf975a2113546968dd72737df67c94cb55015e8e808749b3446 0 UIButton.cs UIButton.cs 6daadb36b071d0759d354c0368383bbc8fc7c7a419be5236a0a576e666b47ca8 0 UIButtonColor.cs UIButtonColor.cs 527c1e1d9db0da61cdc0348e893b3df2bef7fadd046b9079abeb5641483da7b0 0 +UIButtonExtension.cs UIButtonExtension.cs d5388ce532378ccb676a8c16bc1656e2d9f2ca81097bba2195f59692c12f17b5 0 UICamera.cs UICamera.cs 500eb9bb8f8bf4e7ed1f0073de80c5ccefe85273db00fc887295153d533c6525 0 UICardList.cs UICardList.cs 0c983d56f955b25b0e0d52b4b1ce7c4a51b175093770c24c66db0ca575abc288 0 UICenterOnChild.cs UICenterOnChild.cs 474da8b0e6bab01a59538a47351a71f3a3564f9242c37a9adb29419dcaf91ee1 0 UICenterOnClick.cs UICenterOnClick.cs f6fd08e24ca2e897bcbd22568be224eb3d7bae06f898d66fcd34f5fc20419178 0 UICurveLabel.cs UICurveLabel.cs e7eb2389c940c26327f302d9c11863726a359d46c85a5ad5a0d5d5e44cbe5d8d 0 +UIDragDropItem.cs UIDragDropItem.cs fcf70d217a44f6c6c6c11d91d643a6777f3ef107e9688a758f9a5aa43d6b3e0e 0 UIDragScrollView.cs UIDragScrollView.cs e5acfb873e2c58489438689c35fb49f9bc6a626e42b8210d99131027c5c614b4 0 UIDrawCall.cs UIDrawCall.cs 9450bbb24af68f5949415fdaf4d172e87f3666f50d04cc349a63317ba3ce16c0 0 UIEventListener.cs UIEventListener.cs 2e8420b6be9c0a4432e84df935bcd72a3d59ae68eb9cbcb7fbf7c37d22fa08d4 0 @@ -1382,14 +1417,18 @@ UIScrollView.cs UIScrollView.cs 3934d12e088d3908a2b563ed2f74c7890dff5b29c8619b9a UISlider.cs UISlider.cs 1bb12ff32ade8946f153cab1a17dacc463744a210bbef560515f597e2f437c5e 0 UISprite.cs UISprite.cs b810fda0ad0f38c06b5777913c404c4a1a4b669273c13c0466cca967157f8d34 0 UISpriteData.cs UISpriteData.cs 5ef69b73779d7935627e4ce8e9875ef6ba8695dc872453f547301748a82c6c96 0 +UISpriteExtension.cs UISpriteExtension.cs 74637513fbe54314d961e39105dc0b6238cf210507ddbbe7a5e008b40695b9c1 0 UITable.cs UITable.cs 7996e4ad3d48b3a05295671af25c135fdcb650cf7461e49a0d9e45ac2218771c 0 UITexture.cs UITexture.cs 4a620309b4b36a2d217bd365427011fa40fbd3572105312c5e67cfd9cf52f811 0 UIToggle.cs UIToggle.cs 4877e1f3dd9151b5dde182f2109999899d5ceaa3f390a8e0211424b77d8109dd 0 UITweenAlpha.cs UITweenAlpha.cs d0b2af23184022caa70b8f027340330171f41c11a1f79a74370c452379b6c26f 0 +UITweenPosition.cs UITweenPosition.cs 84a9e153b3b12431de5d26172a83954e1c62758db7ae119cafcbb6dd69d64af4 0 UITweener.cs UITweener.cs 639742c82b7b38d98215bb9852df84c92819b28dbb9dcf43d834ed615897cbb5 0 UIWidget.cs UIWidget.cs bcc292adf33c73b6e1091e74df776dee7808b10f1e8a5b6296f3efe5eee1ac03 0 UIWidgetContainer.cs UIWidgetContainer.cs 86cb92fd2fe067189987d823f21f7492355d99490a37d03d0ca4b98ef6b2d014 0 +UIWidgetExtension.cs UIWidgetExtension.cs 28aed5ab32d2ebc30b3dd568892f48549502d617a2ea5f08c563275e6fd83d26 0 UIWrapContent.cs UIWrapContent.cs 59a7ac9b3b6a8774ff69869ccf8d0a013efc3999ac636ec43ed5d2a90cf5c301 0 +UIWrapContentWizard.cs UIWrapContentWizard.cs f6694492aa9658b0e36900c60dc317b048d44d01a2420e840dd808e5c332ce66 0 UIWrapMuchContent.cs UIWrapMuchContent.cs fc9fc8a00a5073a46cb3bcf49af1bc1836c34e0f283c8a718630f09b0370c5de 0 UIWrapVariableContentVertical.cs UIWrapVariableContentVertical.cs 56aedb3a083cd1d98b508939e0c3153c6c50e7ae70f1a12948861add7967eb5a 0 UnionBurstCountAddModifier.cs UnionBurstCountAddModifier.cs 8beff11a43074eb1a3803dcfd0e5f9b094f5fd9967146439d6caf8c3fd468bb6 0 @@ -1409,6 +1448,8 @@ UserInfo.cs UserInfo.cs 5c073d43f4378f8629c524cc57e79097f67872fa898df84fa2e8b9e5 UserMission.cs UserMission.cs 2516293322a85ea704c66c79789c5b026a41024802aa464f943c019822424c06 0 UserPromotionMatch.cs UserPromotionMatch.cs 9456ac47ac4ae1050bf35e2c32556774053f2442c6d35f4029d635faceade38a 0 UserRank.cs UserRank.cs 482eb25d49fe10180258f86c98e5d016d0b2ae97dd9a703550ab6b203d12f1c0 0 +UserTicketCountContents.cs UserTicketCountContents.cs b1aa60147b8c6d1056b5109cfe65eaab2e397fbec8bceede5a1af09a0943dfda 0 +UserTicketCountDialog.cs UserTicketCountDialog.cs 4d91e04b0d6b4429b8aaf996b7a59122ad03796a8655f3944b762adc8a674d42 0 UserTutorial.cs UserTutorial.cs a9158fa4ed1954b5b0779acd6621f18d1046d1fcd196d0291ecf804c2f1733fb 0 UtilityDrumrollItem.cs UtilityDrumrollItem.cs e312d53d716b1ec16a7a12d4fea285b42c5db7d36074cd705f3c700946584b06 0 UtilityDrumrollScroll.cs UtilityDrumrollScroll.cs 33e4e607231f08df2286af7f8240407eab36a5c20139699f24a469e96a2f870a 0 @@ -1416,6 +1457,7 @@ ValueWithOperator.cs ValueWithOperator.cs 8f7f0a6779b0acef60616d8b11397e9287a2fd VariableSkillFilterCollection.cs VariableSkillFilterCollection.cs 81a4181b82be933b517204d193716c7b76af98f9c499635a1cded597b62dad30 0 VellsarDesertField.cs VellsarDesertField.cs aa6332744db7946bc81a58cc9366b5aa12645510de417e387d952fa83fdb6723 0 VideoHostingImplBase.cs VideoHostingImplBase.cs 5d306aeb8ed6ace236e7d47e577510b6d3bd70ab120d31a5880a650063b60672 0 +VideoHostingImplNull.cs VideoHostingImplNull.cs 5064b1d5e394c3925ef1b20d017450009d2296efbc193068e44d46280b9198b1 0 VideoHostingManager.cs VideoHostingManager.cs 4ca315a66a50eeb4780c8c41bf7b0d5bf1be464182b54ac24b68e8adb556e420 0 VideoHostingNicoNicoNotification.cs VideoHostingNicoNicoNotification.cs be17b4acb15f849f500dfb9e892250adb64c3c7c89e72488acd756e5b773bd09 0 VideoHostingUtil.cs VideoHostingUtil.cs 70b20ef9a7e8187d33356d37bf74f0da02005bf26e2e7b33b0b60ca8feca5fb6 0 @@ -1444,6 +1486,7 @@ Wizard.Battle.Card\IVirtualBattleCard.cs Wizard.Battle.Card\IVirtualBattleCard.c Wizard.Battle.Card\VirtualChantFieldBattleCard.cs Wizard.Battle.Card\VirtualChantFieldBattleCard.cs 1e05dff55c5c9bf722bb464b16ae763b03cd8a26ea02a41fa779461240f08982 0 Wizard.Battle.Card\VirtualClassBattleCard.cs Wizard.Battle.Card\VirtualClassBattleCard.cs 586494135800d6e0bd7486b2dbbc09fa683c411aff74b54bbb70f87545df04c8 0 Wizard.Battle.Card\VirtualFieldBattleCard.cs Wizard.Battle.Card\VirtualFieldBattleCard.cs 5f6212473f5a0c6a08ff1c21b9496a86281cd4bc4ddf1cf0697234f83a5c2dba 0 +Wizard.Battle.Card\VirtualSpecialSkillBattleCard.cs Wizard.Battle.Card\VirtualSpecialSkillBattleCard.cs a250e1c0a4dc782500eed1c3fbb1074dff6e730b2b722f29ee5c6b39c95b4c41 0 Wizard.Battle.Card\VirtualSpellBattleCard.cs Wizard.Battle.Card\VirtualSpellBattleCard.cs 7172c61bf30b7ff5ab86da9d618ce7b2fcbc6aa0c50845422fb2122cc1ab1704 0 Wizard.Battle.Card\VirtualUnitBattleCard.cs Wizard.Battle.Card\VirtualUnitBattleCard.cs ab7aa44de0f89f6dbc380b00e3657750ef8265eaaca459aef3f8376e3c6ff8a5 0 Wizard.Battle.Mulligan\IMulliganMgr.cs Wizard.Battle.Mulligan\IMulliganMgr.cs d49640f1076af798e9114ff9058b7fdfe5d5a194ed2420a6ef95122fa10d8c0f 0 @@ -1469,6 +1512,7 @@ Wizard.Battle.Operation\IOperationCommand.cs Wizard.Battle.Operation\IOperationC Wizard.Battle.Operation\OperationSimulator.cs Wizard.Battle.Operation\OperationSimulator.cs c97c6fdf16353d9d3aa5839528bc5832d00a85e27da8d786ad8274e1bf45708c 0 Wizard.Battle.Operation\PlayOperationCommand.cs Wizard.Battle.Operation\PlayOperationCommand.cs 4359c79e97c900f043931d02cc34057a7920fa0655bdd2e7a294e23727519cd7 0 Wizard.Battle.Operation\SimulateRandomSelectFilter.cs Wizard.Battle.Operation\SimulateRandomSelectFilter.cs 2d15e18af41ec05545d8b1d6db64f5d25240828ce3284d81fd23f775fa8c00f2 0 +Wizard.Battle.Operation\SimulateSkillCreator.cs Wizard.Battle.Operation\SimulateSkillCreator.cs e382b7cc573333a8577d00ebbb4c980dfeaa7e211cc6906afb7f1428777406e5 0 Wizard.Battle.Operation\SimulationSelection.cs Wizard.Battle.Operation\SimulationSelection.cs efe3abe803236d55e3594f15b65dafd9fff41a526e291a217ce63d1b89ecb475 0 Wizard.Battle.Operation\SkillOperationCommandBase.cs Wizard.Battle.Operation\SkillOperationCommandBase.cs 6de20c71e94e1c620846cfb5decefdd8e345da027540ef66a834c715e3c40664 0 Wizard.Battle.Operation\SkillTargetInfo.cs Wizard.Battle.Operation\SkillTargetInfo.cs e4a6b9b4e958284eeba861005523a0aabd366cdc427ca80078b180d565c6ffe0 0 @@ -1479,10 +1523,13 @@ Wizard.Battle.Phase\IResultPhase.cs Wizard.Battle.Phase\IResultPhase.cs ba6732b9 Wizard.Battle.Phase\LoadingPhase.cs Wizard.Battle.Phase\LoadingPhase.cs 60b11afc14b20ed0960ea55fd5c8e3d006ad1d12cbc907679cbbfcb8127eaee5 0 Wizard.Battle.Phase\MainPhase.cs Wizard.Battle.Phase\MainPhase.cs 7463c025866b5196219eeeb0132d69d91b45f4b6a80fb964471e23c96863937b 0 Wizard.Battle.Phase\MulliganPhaseBase.cs Wizard.Battle.Phase\MulliganPhaseBase.cs 2676daa3204e99605dc74d3bde3999e6f3a44af65d9081bef3fedf824904068f 0 +Wizard.Battle.Phase\NetworkBattlePhaseCreator.cs Wizard.Battle.Phase\NetworkBattlePhaseCreator.cs b5fc54b6da62a6f2774a5104a4e7102bf1f5ac91a5b81bf2816127445e063754 0 Wizard.Battle.Phase\NetworkMulliganPhase.cs Wizard.Battle.Phase\NetworkMulliganPhase.cs b5eb259294c4851654647b3e6d482667686bf7f28c6d97dcfa86032a6c9660eb 0 Wizard.Battle.Phase\OpeningPhase.cs Wizard.Battle.Phase\OpeningPhase.cs c47c033633cf5b813eb8384323c313a8b8ba2edfd91c1368fb1f5df9e4e73391 0 Wizard.Battle.Phase\PhaseCreatorBase.cs Wizard.Battle.Phase\PhaseCreatorBase.cs a5641cd3ac277cb47bd0d2e2ee904bc17155ecb18f2e4c2b60a3d643be9ed06d 0 Wizard.Battle.Phase\RecoveryAfterMulliganPhase.cs Wizard.Battle.Phase\RecoveryAfterMulliganPhase.cs 8b75c76e7a0122bff7e06a1bfe0817f1ce84585dea460e0d99225fb20d5fe4f5 0 +Wizard.Battle.Phase\RecoveryNetworkBattleMainPhaseCreator.cs Wizard.Battle.Phase\RecoveryNetworkBattleMainPhaseCreator.cs 79eef2223f6de01026063bb94ee89fc7c47c69c64838687af58a17b8cbd1397f 0 +Wizard.Battle.Phase\RecoveryNetworkBattleMulliganPhaseCreator.cs Wizard.Battle.Phase\RecoveryNetworkBattleMulliganPhaseCreator.cs 2161d3228cc97967a5bc16983341eb7a190f15307cbd0728967963634e637553 0 Wizard.Battle.Phase\RecoveryNetworkBeforeSubmitMulliganPhase.cs Wizard.Battle.Phase\RecoveryNetworkBeforeSubmitMulliganPhase.cs 6f16e1181f83f47de29f27017d1ecfd8aa6963f55524ee3457cc1a428778fb1e 0 Wizard.Battle.Phase\ResultPhase.cs Wizard.Battle.Phase\ResultPhase.cs 82729c54c9b19486a199fa40f6fc43d74092ac457e4c2e3bcff73b7113adbb25 0 Wizard.Battle.Phase\SingleMulliganPhase.cs Wizard.Battle.Phase\SingleMulliganPhase.cs 949ba3c58a0cb59f6ed337a46c3b949a60387390c0b310f545465dc09e7d6e48 0 @@ -1494,6 +1541,7 @@ Wizard.Battle.Player.ClassCharacter\PlayerHighRankSpineClassCharacter.cs Wizard. Wizard.Battle.Player.ClassCharacter\SpineObject.cs Wizard.Battle.Player.ClassCharacter\SpineObject.cs bd325662311d523dc9948557b3ddf899ed5a72fe18430f69e307360f7fa6758f 0 Wizard.Battle.Player.Emotion\Debug722006NullVfx.cs Wizard.Battle.Player.Emotion\Debug722006NullVfx.cs 65801eb05b7c9ee4c6514faa6d67f2d632ee95a47a74836a2f34072fe19a30db 0 Wizard.Battle.Player.Emotion\EmotionBase.cs Wizard.Battle.Player.Emotion\EmotionBase.cs 8a8edb24dbf845b07acf74e70658335d8fe23f67105e1e70e814153b836d4fad 0 +Wizard.Battle.Player.Emotion\EnemyAIEmotion.cs Wizard.Battle.Player.Emotion\EnemyAIEmotion.cs da412c54c553497108cf02172d041ef893420d9e495b1d017ea0f8dd70360c7f 0 Wizard.Battle.Player.Emotion\EnemyEmotionBase.cs Wizard.Battle.Player.Emotion\EnemyEmotionBase.cs 35c86dd528fcab638f076c4bf0ef4f4b96737b83bba5450d117abe5024aaec6c 0 Wizard.Battle.Player.Emotion\IEmotion.cs Wizard.Battle.Player.Emotion\IEmotion.cs 289e34823e07e0fa97f0259e3eeeeb1e0475f5c78aff8f6515f4208c7ad2f2e5 0 Wizard.Battle.Player.Emotion\IPlayerEmotion.cs Wizard.Battle.Player.Emotion\IPlayerEmotion.cs fe56394e17ad9a097aa1ef3da9df965c05e62c9850c21601b49b6eb87841d1d8 0 @@ -1501,6 +1549,7 @@ Wizard.Battle.Player.Emotion\NetworkOpponentEmotion.cs Wizard.Battle.Player.Emot Wizard.Battle.Player.Emotion\NullEmotion.cs Wizard.Battle.Player.Emotion\NullEmotion.cs c1318df605e2d6091d061ae7ab2912086641339782ce7772ccdb69e6017751d6 0 Wizard.Battle.Player.Emotion\NullPlayerEmotion.cs Wizard.Battle.Player.Emotion\NullPlayerEmotion.cs 06b4b9904bff94caec65f7ac4787c26e8a5a1d8c7bf011d71c9ee72206d3795c 0 Wizard.Battle.Player.Emotion\PlayerEmotion.cs Wizard.Battle.Player.Emotion\PlayerEmotion.cs f5c02d38012cea684c668d7db6b07cdeaecd31072a6d2bc727fc2ddbbb5689ca 0 +Wizard.Battle.Recovery\AINetworkBattleRecoveryRecordManager.cs Wizard.Battle.Recovery\AINetworkBattleRecoveryRecordManager.cs fd3735653061b2d2e25f1bb27f88cb394cfc5fa130235849e411ccf154417c77 0 Wizard.Battle.Recovery\BattleConditionEnemyInfo.cs Wizard.Battle.Recovery\BattleConditionEnemyInfo.cs 35f6c55a91314ee7cda4d1c93658aaafa972118ef0363c736dcd752bcaaaaaf0 0 Wizard.Battle.Recovery\BattleConditionInfo.cs Wizard.Battle.Recovery\BattleConditionInfo.cs d24a150006f866efadf537fd45c760cfed23d3373be6c7fcf39438827e00226f 0 Wizard.Battle.Recovery\BattleConditionPlayerInfo.cs Wizard.Battle.Recovery\BattleConditionPlayerInfo.cs 82270e49e674a227d787fca1094c22e7a658b20defb16c97aede6277b37687c6 0 @@ -1511,26 +1560,32 @@ Wizard.Battle.Recovery\HandCardInfo.cs Wizard.Battle.Recovery\HandCardInfo.cs b0 Wizard.Battle.Recovery\IRecoveryManager.cs Wizard.Battle.Recovery\IRecoveryManager.cs 183fafee041522a2c67f6e3c0b50751e4591e507f8f2950658fbc29ad3cbc78d 0 Wizard.Battle.Recovery\IRecoveryRecordManager.cs Wizard.Battle.Recovery\IRecoveryRecordManager.cs f8f95b3c268918fd18b849616a576e763819bf3d376dbbdb4a60393370a2d4e7 0 Wizard.Battle.Recovery\InPlayCardInfo.cs Wizard.Battle.Recovery\InPlayCardInfo.cs 63491906ad4c2e18fd2e7eadec2ee92d15eda18b8f726ec38f969da79e30155c 0 +Wizard.Battle.Recovery\NetworkBattleRecoveryManager.cs Wizard.Battle.Recovery\NetworkBattleRecoveryManager.cs 23cd6c9938774455f9960ee06296cd2a56a1fc0f61014a07caccec86603bcc72 0 +Wizard.Battle.Recovery\NetworkBattleRecoveryRecordManager.cs Wizard.Battle.Recovery\NetworkBattleRecoveryRecordManager.cs 83771ee98a8092c33bfdbebe4271a3a28829d23ceaec8d9bb4e1933d0755a20f 0 Wizard.Battle.Recovery\NullRecoveryManager.cs Wizard.Battle.Recovery\NullRecoveryManager.cs cda3f270ddd3fd686a0c2c97fe4cf2db18c7355456edf2f8c35f60caff753f32 0 Wizard.Battle.Recovery\NullRecoveryRecordManager.cs Wizard.Battle.Recovery\NullRecoveryRecordManager.cs d9fc4f9bbf285d820fd6e4346de1f23986428383ef791aed731adcdc8b168480 0 Wizard.Battle.Recovery\OperationRecorderBase.cs Wizard.Battle.Recovery\OperationRecorderBase.cs 1291b862fc0bccd5cc9c96af41498e36e2521a1c0f0655a81f78b4d4eef02877 0 Wizard.Battle.Recovery\RecoveryController.cs Wizard.Battle.Recovery\RecoveryController.cs b433838072979be22767455344a4529b74ec0cc4261c4606ec2100897b7e8889 0 Wizard.Battle.Recovery\RecoveryDataHandler.cs Wizard.Battle.Recovery\RecoveryDataHandler.cs 972832014b77ce9a1f5fff1df87a2222b8c62aedc2057bb931646e85bee24c08 0 Wizard.Battle.Recovery\RecoveryManagerBase.cs Wizard.Battle.Recovery\RecoveryManagerBase.cs 84aabcfd0acf652a15099057957432676384f0db3227953917208403c3cb8a2e 0 +Wizard.Battle.Recovery\RecoveryNetworkManagerBase.cs Wizard.Battle.Recovery\RecoveryNetworkManagerBase.cs cf7750bc684a93e208345a7b2294386e2b9c347385a49ed6303ad6ff3b1e7e0c 0 Wizard.Battle.Recovery\RecoveryOperationInfo.cs Wizard.Battle.Recovery\RecoveryOperationInfo.cs 37787cc77b98e18d1d4b9727d6bb640c04f47adf15ac463aab7b609e80a756ac 0 Wizard.Battle.Recovery\RecoveryRecordManagerBase.cs Wizard.Battle.Recovery\RecoveryRecordManagerBase.cs 272f5bf53d47ca90c2ad69377eab055c2e6f47fac6421a4864c0f414383ff973 0 Wizard.Battle.Recovery\ResultConditionInfo.cs Wizard.Battle.Recovery\ResultConditionInfo.cs 52d21760da08ba7b0e6e067cb7dc7a3890638ed6949305d3ad42a1fdf04e4743 0 Wizard.Battle.Recovery\SetupConditionInfo.cs Wizard.Battle.Recovery\SetupConditionInfo.cs a5b78784312eb08496ef6db3b2c61a53957cf288c93c53714674972f5f4d2b9e 0 +Wizard.Battle.Recovery\SingleBattleOperationRecorder.cs Wizard.Battle.Recovery\SingleBattleOperationRecorder.cs 79fcd07bd2f7f3be32376856db6525b0c1f358ba06b7e249dce97bea8bc933e8 0 Wizard.Battle.Recovery\SingleBattleRecoveryManager.cs Wizard.Battle.Recovery\SingleBattleRecoveryManager.cs 25db0435c1699768e94c47a781a343fcb610d6fff36d07d8f761e0f00e776957 0 Wizard.Battle.Recovery\SingleBattleRecoveryRecordManager.cs Wizard.Battle.Recovery\SingleBattleRecoveryRecordManager.cs ab5cd4adaf2efa49f19cf91da2892271a730eb764a2024c0c5694aa7752c15b3 0 Wizard.Battle.Resource\BattleResourceMgr.cs Wizard.Battle.Resource\BattleResourceMgr.cs 3b4f7a78710d82e763164ca8bdf257a4c238b9986120e4d560be27574c179e57 0 Wizard.Battle.Resource\IBattleResourceMgr.cs Wizard.Battle.Resource\IBattleResourceMgr.cs 59e39c39afa8186f237fa879f5cdb043aa2dc99e5117eb0e1204df77b563d607 0 Wizard.Battle.Resource\NullBattleResourceMgr.cs Wizard.Battle.Resource\NullBattleResourceMgr.cs 492b03d15cadeb08296bc74eb1a1b0c887756d1d87071ca1486a49f848a29a15 0 +Wizard.Battle.Resource\RecoveryBattleResourceMgr.cs Wizard.Battle.Resource\RecoveryBattleResourceMgr.cs 871da5e5d941195e8a07db734202dfc2fb45e7067dee882ae7d41e2c9e28721a 0 Wizard.Battle.Sound\LeaderSoundManager.cs Wizard.Battle.Sound\LeaderSoundManager.cs 50eb5262cd65deb22c5eb5ea3b47735844e8282d3e9b2ac064f520a9e12d397f 0 Wizard.Battle.Touch/ITouchProcessor.cs Wizard.Battle.Touch/ITouchProcessor.cs 6343a8aa50461bcb5e99f9cc9a689d81bd62516266456f7821da962ab93bd369 0 Wizard.Battle.UI/IClassInfomationUI.cs Wizard.Battle.UI/IClassInfomationUI.cs 05831a370255fda7e5f0091a278fb0c35ce7dd81c504395127589505e9cce4ee 0 Wizard.Battle.UI/LogType.cs Wizard.Battle.UI/LogType.cs a8de41a8d5d8f2289f75b9b9fc25d277e74c42723e78d09762fc72ae5f5e9e34 0 Wizard.Battle.UI/SkillGainType.cs Wizard.Battle.UI/SkillGainType.cs 7b12e7d3982bbf23dfeebbd90ea5fb045d801ff47d7713a3fb835db9642d05a5 0 +Wizard.Battle.View.Vfx/VfxResultEventExtension.cs Wizard.Battle.View.Vfx/VfxResultEventExtension.cs e34ff65e9a0df76f24f17185b3a80ebab326f4e413bccc18f084efea9a4094ac 0 Wizard.Battle.View/HandCardFrameEffectType.cs Wizard.Battle.View/HandCardFrameEffectType.cs 0457f58fe09057aa9f32c8b131186d1a252aaf30930e4269ef204d6429188ff5 0 Wizard.Battle.View/HandParameter.cs Wizard.Battle.View/HandParameter.cs e55287d3bdf32b98849f626ef833c347311a3483ffca92a73c70c9598955ec40 0 Wizard.Battle.View/IBattleCardView.cs Wizard.Battle.View/IBattleCardView.cs 79657bc2b1a864d548e9929640d5f2322561041114119ff3f6ce987c1a073f68 0 @@ -1538,6 +1593,7 @@ Wizard.Battle.View/IBattlePlayerView.cs Wizard.Battle.View/IBattlePlayerView.cs Wizard.Battle.View/IClassBattleCardView.cs Wizard.Battle.View/IClassBattleCardView.cs 15fa11b56a919f4f04a2429ed7b31d92839ae228356ae4fa805b23d867a6e750 0 Wizard.Battle.View/IPlayerView.cs Wizard.Battle.View/IPlayerView.cs d0f937abd9dfa4130e0d0ea2892c539aef0023df1eeb0d0dbe13a4f80ee26f50 0 Wizard.Battle/ActionProcessor.cs Wizard.Battle/ActionProcessor.cs 7c8b40454a4948dd48a58c0efc240703eab9a77aea0add64e542f6b06c7323af 0 +Wizard.Battle/IBattleCardUniqueIDExtension.cs Wizard.Battle/IBattleCardUniqueIDExtension.cs efa2bdc5fb017ca2a83be8bbe04c45d61108677bc19a6e755798153426270191 0 Wizard.BattleMgr\IBattleMgrContentsCreator.cs Wizard.BattleMgr\IBattleMgrContentsCreator.cs 7f1410027b146fe028bfadf5940599f1e576063dfa764e0be2754dfd7d19e30f 0 Wizard.BattleMgr\RecoveryNetworkBattleMgrContentsCreator.cs Wizard.BattleMgr\RecoveryNetworkBattleMgrContentsCreator.cs e99bea259ffacb5780693918571ecd548b01c567b2266aa9a1ac9d17423a242a 0 Wizard.Battle\EnemyAIInnerOptionsBuilder.cs Wizard.Battle\EnemyAIInnerOptionsBuilder.cs caaecda6f73da8c458bee8f4e67dd5ea1bfaf8cf17c2cf1636e98fff84a927b0 0 @@ -1549,7 +1605,9 @@ Wizard.Battle\NullInnerOptionsBuilder.cs Wizard.Battle\NullInnerOptionsBuilder.c Wizard.Battle\PlayerInnerOptionsBuilder.cs Wizard.Battle\PlayerInnerOptionsBuilder.cs 0ed76b5df3e18db737576bc6a4c8f06dbdaf227a67d8ca07d39cbbc10947e970 0 Wizard.Bingo\BingoDrawTask.cs Wizard.Bingo\BingoDrawTask.cs 9c235721777d20d8d0bf0eba785c92b794881142c4904ead3fbb73bd9c28d995 0 Wizard.Bingo\BingoInfoTask.cs Wizard.Bingo\BingoInfoTask.cs 3c651be0075b3dfdf781286166ddcffa16771a6a73eff7ae7d76a8a9e7a8d315 0 +Wizard.Bingo\BingoMissionDialog.cs Wizard.Bingo\BingoMissionDialog.cs 979377d116e53fbb2b126eee2d2ee6b27856ebbc6305e0c04ea651d4e7c98e09 0 Wizard.Bingo\BingoPage.cs Wizard.Bingo\BingoPage.cs 5e806667bd74fcd0ba59bdd9506d53a3395b4a76f0607518579a3c2022e01fc5 0 +Wizard.Bingo\BingoRewardsDialog.cs Wizard.Bingo\BingoRewardsDialog.cs 286d731b08070587ff651349c51f80a1b195f99d2020d52f379d3d6463f4781a 0 Wizard.DeckCardEdit\CachingCardBundle.cs Wizard.DeckCardEdit\CachingCardBundle.cs 3efcb163e9be8d023e12394684c83745081c500cf13a84b91674aab0eeace113 0 Wizard.DeckCardEdit\CardBundle.cs Wizard.DeckCardEdit\CardBundle.cs ae56efeea60e2288b595d57f6b48bc83661ff8f22b0607746a39b080714e439e 0 Wizard.DeckCardEdit\CardBundleController.cs Wizard.DeckCardEdit\CardBundleController.cs fa0cf42cf3d42e56dbcf0702ba21f15ccf4f4f38a7318472cbf8f473f7d97a61 0 @@ -1566,6 +1624,8 @@ Wizard.DeckSelect.FirstDisplayPageIndexGetter\DefaultFirstDisplayPageIndexGetter Wizard.DeckSelect.FirstDisplayPageIndexGetter\FirstDisplayPageIndexGetterBase.cs Wizard.DeckSelect.FirstDisplayPageIndexGetter\FirstDisplayPageIndexGetterBase.cs 40d49191845c1ef7511756a754e18726428eb4a14a4c3e2216cf8f04f4b0b95b 0 Wizard.DeckSelect.FirstDisplayPageIndexGetter\IFirstDisplayPageIndexGetter.cs Wizard.DeckSelect.FirstDisplayPageIndexGetter\IFirstDisplayPageIndexGetter.cs c0964e222f42a338369b5b77bfa65080dc7cf3b89cf384ae3f6068d982cd2b6c 0 Wizard.DeckSelect.FirstDisplayPageIndexGetter\QuestFirstDisplayPageIndexGetter.cs Wizard.DeckSelect.FirstDisplayPageIndexGetter\QuestFirstDisplayPageIndexGetter.cs 5e9ccf095c3d5aaa4e48b1de47ca7fc2f933e622ef4463d0861a90b5e1a7be99 0 +Wizard.Dialog.DataLink\IdPasswordInput.cs Wizard.Dialog.DataLink\IdPasswordInput.cs f36fd526687d2a0578a508ff43a9227c96b4846eee909e33ba410f99740eee73 0 +Wizard.Dialog.DataLink\PasswordSetting.cs Wizard.Dialog.DataLink\PasswordSetting.cs 7e92885af115503f47fde51f9f6d8f761137fddf511d9a30860b60a46e8f0fb5 0 Wizard.Dialog.Setting\ItemButton.cs Wizard.Dialog.Setting\ItemButton.cs 534a6040f8beee1a07181aecefb984c7968f12e262332c650f079e3d900443a8 0 Wizard.Dialog.Setting\ItemGrid.cs Wizard.Dialog.Setting\ItemGrid.cs dcf11b1527c573daea9cbf7cfbb8c10a589ef6c68bed7af13dd21175299f8fed 0 Wizard.Dialog.Setting\ItemLabel.cs Wizard.Dialog.Setting\ItemLabel.cs 6d738f7192ed4d48e3f6d976282e8c6b61d7de89df0d274109eb52b0d5b55cd9 0 @@ -1577,10 +1637,16 @@ Wizard.ErrorDialog\Dialog.cs Wizard.ErrorDialog\Dialog.cs 19ca6f8150bbec122121a5 Wizard.Lottery\DoubleChanceData.cs Wizard.Lottery\DoubleChanceData.cs 45ae69b003caf8018be47699ccd21d4979cd0ef83a84e46acc50e6425f247c34 0 Wizard.Lottery\LotteryApplyData.cs Wizard.Lottery\LotteryApplyData.cs a1f736b119c42db936962ef4b57821e5f0aaf4ab1458b6c2f92f25c727e4efcc 0 Wizard.Lottery\LotteryApplyDialog.cs Wizard.Lottery\LotteryApplyDialog.cs 8787f2ff7ae2f2b65a3b8c67419ccaa7bde8cef3345f5b439c5947dec470904d 0 +Wizard.Lottery\LotteryBigChanceTreasureBox.cs Wizard.Lottery\LotteryBigChanceTreasureBox.cs f3e3b6b80a29fced104dd21bea65d21ca30dc7debf429193cebec97f2b94de7e 0 Wizard.Lottery\LotteryInfoTask.cs Wizard.Lottery\LotteryInfoTask.cs 9ffdf996f9d23511427a2d19f85056187ed619fcc057f2d5a5f982f2cff48f6e 0 Wizard.Lottery\LotteryLoadTaskData.cs Wizard.Lottery\LotteryLoadTaskData.cs 4c935c7750aed7c86abc7984c465c869b5f3b6535e0c62925b74e0f9dac5d5c0 0 Wizard.Lottery\LotteryMissionData.cs Wizard.Lottery\LotteryMissionData.cs 2844dfd64d868c6ee758e9a32c986cdc2ffe9c3d7cefba74f151b3248569a9a0 0 +Wizard.Lottery\LotteryMissionDialog.cs Wizard.Lottery\LotteryMissionDialog.cs 002c660ba2174e63c5a198ff16656843eb4d1d9734383bcb4da1c1528965af2f 0 +Wizard.Lottery\LotteryMissionTreasureBox.cs Wizard.Lottery\LotteryMissionTreasureBox.cs 2dd2831bce979e9cfaf1b0c4bef4514d2f1048e3ba22533a9ebf931462c908e6 0 Wizard.Lottery\LotteryPage.cs Wizard.Lottery\LotteryPage.cs a5a97a7b28946779d4ebea31cccd2b6277bbbbae945823110f3f23541ba07977 0 +Wizard.Lottery\LotteryReceiveBigChanceTask.cs Wizard.Lottery\LotteryReceiveBigChanceTask.cs 0010ea6f71467290e35e5355db17af8e65ad8270aa71e1211414a393db262dd6 0 +Wizard.Lottery\LotteryReceiveDoubleChanceTask.cs Wizard.Lottery\LotteryReceiveDoubleChanceTask.cs 4ad932089f01371ffcfd8517a4d85515a5b59e3f2a886c5232aaf0c11f43063f 0 +Wizard.Lottery\LotteryReceiveTask.cs Wizard.Lottery\LotteryReceiveTask.cs 583a8c70272db900446ab96c3f47578b8b837c8326a4697e6847a4391e30a737 0 Wizard.Lottery\LotteryRewardData.cs Wizard.Lottery\LotteryRewardData.cs 27fadecd62fe1cb28a699bd3c50d1524810c60f9e12bb1ffdacda4bba8f51281 0 Wizard.Lottery\LotterySpecialRewardDialog.cs Wizard.Lottery\LotterySpecialRewardDialog.cs e0081b816349f36c61bf8f82f4a4dc461258da6dd89f9877a15bf43942677792 0 Wizard.Lottery\LotteryTreasureBox.cs Wizard.Lottery\LotteryTreasureBox.cs 9eafd4ea6ea090d35cfa571b6e9b0f86d28a5f9515cdc5365588b32789bee88c 0 @@ -1603,8 +1669,11 @@ Wizard.Scripts.Network.Data.TaskData.Arena\FinishDetail.cs Wizard.Scripts.Networ Wizard.Scripts.Network.Data.TaskData.Arena\TwoPickInfo.cs Wizard.Scripts.Network.Data.TaskData.Arena\TwoPickInfo.cs 8e76e6eca0a1bfae75aace89bb9e3bcd9edba9d5536e2ddc19e88e9b088e3ac1 0 Wizard.Scripts.Network.Data.TaskData.Battle\DoMatchingResponse.cs Wizard.Scripts.Network.Data.TaskData.Battle\DoMatchingResponse.cs 0333da0ebce1e8f6fec5d43ae0995ed62490be9536dde8868d4e70e0015b7879 0 Wizard.Scripts.Network.Data.TaskData.BuildDeckPurchase\BuildDeckBuyTask.cs Wizard.Scripts.Network.Data.TaskData.BuildDeckPurchase\BuildDeckBuyTask.cs bf259e4e745e2e7ca90860e31d9cdafdf3f1b0b81bea289a66c781588007998c 0 +Wizard.Scripts.Network.Data.TaskData.BuildDeckPurchase\BuildDeckDetailWindow.cs Wizard.Scripts.Network.Data.TaskData.BuildDeckPurchase\BuildDeckDetailWindow.cs 4a9c050e5aac15a4bc941d11ff7742db9053ae28104695633de6f9fb39e195b9 0 +Wizard.Scripts.Network.Data.TaskData.BuildDeckPurchase\BuildDeckPlate.cs Wizard.Scripts.Network.Data.TaskData.BuildDeckPurchase\BuildDeckPlate.cs bd9c91055c8a8f1568d52aa151905a4b2f48bbdae67ce8e220d5d6e2d926bf08 0 Wizard.Scripts.Network.Data.TaskData.BuildDeckPurchase\BuildDeckProductInfo.cs Wizard.Scripts.Network.Data.TaskData.BuildDeckPurchase\BuildDeckProductInfo.cs 2db317cebfbedee935a6035145c5c580ce1f4f9ea1b054485c16b8697f4fea6b 0 Wizard.Scripts.Network.Data.TaskData.BuildDeckPurchase\BuildDeckPurchaseInfo.cs Wizard.Scripts.Network.Data.TaskData.BuildDeckPurchase\BuildDeckPurchaseInfo.cs 045817a97fbc695eaa151ed8bba8878f1296ff764f3c7967c7f7aa762cb386c6 0 +Wizard.Scripts.Network.Data.TaskData.BuildDeckPurchase\BuildDeckPurchasePage.cs Wizard.Scripts.Network.Data.TaskData.BuildDeckPurchase\BuildDeckPurchasePage.cs 9195762e8890b62bac3795bbae963a167aa494df9704b1cc1f394ebe332def4c 0 Wizard.Scripts.Network.Data.TaskData.BuildDeckPurchase\BuildDeckSeriesPurchaseInfo.cs Wizard.Scripts.Network.Data.TaskData.BuildDeckPurchase\BuildDeckSeriesPurchaseInfo.cs d8aba20b16e641ba45718dafa95bb5bcd20c65417572dcad4a4e6f97fc96d7b4 0 Wizard.Scripts.Network.Data.TaskData.ItemPurchase\ItemPurchaseBuyTask.cs Wizard.Scripts.Network.Data.TaskData.ItemPurchase\ItemPurchaseBuyTask.cs 5efb8b505dfdce8f140a7272da996a88f88f6689bce8fa1cc1a7e849ceeedca2 0 Wizard.Scripts.Network.Data.TaskData.ItemPurchase\ItemPurchaseData.cs Wizard.Scripts.Network.Data.TaskData.ItemPurchase\ItemPurchaseData.cs 0804c342fc51f32cc6960cf06b9fb48de29b7c63cfe6f97b52b6c0144c872f02 0 @@ -1629,12 +1698,16 @@ Wizard.Scripts.Network.Data.TaskData.SpotCardExchange\SpotCardExchangeTask.cs Wi Wizard.Scripts.Network.Data.TaskData\ItemAcquireHistoryInfo.cs Wizard.Scripts.Network.Data.TaskData\ItemAcquireHistoryInfo.cs 4c472401abcddb81bf2cdaaddc6ed0ade73d7da1dfb9f67c3452ee5a4c969723 0 Wizard.Scripts.Network.Task.Arena.Competition\CardChooseTask.cs Wizard.Scripts.Network.Task.Arena.Competition\CardChooseTask.cs 93ccfceafd67e9942a7b317b90451bd68c55797e495216c6b44bb1e8638938f4 0 Wizard.Scripts.Network.Task.Arena.TwoPick\ClassCharaChooseTask.cs Wizard.Scripts.Network.Task.Arena.TwoPick\ClassCharaChooseTask.cs 8bcdf7ed2a08f985de5f275fa170b78dfb1a8e2476dfca944dd7247d6af7d8bd 0 +Wizard.Scripts.Network.Task.Arena.TwoPick\EntryTask.cs Wizard.Scripts.Network.Task.Arena.TwoPick\EntryTask.cs de7966ee9b54fcd6253410cdd68fd4a77913ac149f28855041c751927e424dcd 0 Wizard.Scripts.Network.Task.Arena.TwoPick\FinishTask.cs Wizard.Scripts.Network.Task.Arena.TwoPick\FinishTask.cs 681c3bdb8be55a1f506cccdfd59b3e7f0af81516678797449e868fdef781d96a 0 +Wizard.Scripts.Network.Task.Arena.TwoPick\RetireTask.cs Wizard.Scripts.Network.Task.Arena.TwoPick\RetireTask.cs 30ad231683ad77b44f0a2af37576b8a9606ca6fa88397b08be9e50b9f15f75d4 0 +Wizard.Scripts.Network.Task.Arena.TwoPick\TopTask.cs Wizard.Scripts.Network.Task.Arena.TwoPick\TopTask.cs dfc082986790a4b486316a8ff97e36667373b9ea6948040dbbdc1280f515efdf 0 Wizard.Scripts.Network.Task.Arena.TwoPick\TwoPickDoMatchingTask.cs Wizard.Scripts.Network.Task.Arena.TwoPick\TwoPickDoMatchingTask.cs 19f1b7e448c04ffd7adc9c67159fbe9267f56d69befe0de0bec64d32110bd785 0 Wizard.Scripts.Network.Task.Arena.TwoPick\TwoPickFinishBattleTask.cs Wizard.Scripts.Network.Task.Arena.TwoPick\TwoPickFinishBattleTask.cs 53ed74a982e1b150d4529cbe599e4d78956e6c8553a9587c2eab2b740e2cdfe4 0 Wizard.Scripts.Network.Task.Arena\ArenaEntryTaskBase.cs Wizard.Scripts.Network.Task.Arena\ArenaEntryTaskBase.cs c90dd25ddbe958f1b7dd5232fc1fb0869c633aa8f5479a254eca74e9b8caf21a 0 Wizard.Scripts.Network.Task.Arena\ArenaRetireTaskBase.cs Wizard.Scripts.Network.Task.Arena\ArenaRetireTaskBase.cs 360c197720496476b74663417abc4fe0566aa80ec367b6b78e53873de3e9382c 0 Wizard.Scripts.Network.Task.Arena\ArenaTopTaskBase.cs Wizard.Scripts.Network.Task.Arena\ArenaTopTaskBase.cs fbe64a62489560079041134eec8e483370391d4196c0cb405cb96d999a22a442 0 +Wizard.Scripts.Network.Task.ItemAcquireHistory\ItemAcquireHistoryInfoTask.cs Wizard.Scripts.Network.Task.ItemAcquireHistory\ItemAcquireHistoryInfoTask.cs ba8d78e8b960c6584c4734739b9d20eeb4200cc7928f55096dda2ac772859fe4 0 Wizard/AIAccelerateUtility.cs Wizard/AIAccelerateUtility.cs 3cc7d0196d1b8264fa1acc64f15cd394d9278fe3432de268f7860db041ebbb9f 0 Wizard/AIAttachTagSimulationUtility.cs Wizard/AIAttachTagSimulationUtility.cs 642ab3d7c5215294dca2b0340cde2ac4d10f2a51eb4dc08821dfdb2154e750fb 0 Wizard/AIAttachedTagRemoveTiming.cs Wizard/AIAttachedTagRemoveTiming.cs 8e9fcb21eb1ef0d5eaa4f3e7baab1b7074b930b8cbeedf2205632c759716e381 0 @@ -2285,10 +2358,12 @@ Wizard\AIWhenPlayTokenDraw.cs Wizard\AIWhenPlayTokenDraw.cs e61b4aaba2515f7e5968 Wizard\AI_LOGIC_LV.cs Wizard\AI_LOGIC_LV.cs e6a97a7f33f421973293eff0f046a0a8422ddc4103f3fb7b77a114c0f6b7b9d6 0 Wizard\AbortSoloPlayRecoveryTask.cs Wizard\AbortSoloPlayRecoveryTask.cs 983b900d2b180dcbd61032ecec688b66e8ab98504e7cb58250e4069f6040ad13 0 Wizard\AcceptAgreementTask.cs Wizard\AcceptAgreementTask.cs 0868aac7735e2826cff2db423a3de42943fe4fe2ca16d2e9f9f219f05cf7f5d3 0 +Wizard\AccountBase.cs Wizard\AccountBase.cs 34e53a3e027337ab0ec601f4c0b89c67c70f0ec0a3e3250eea6c81f5ca4498ff 0 Wizard\AchievementImpl.cs Wizard\AchievementImpl.cs f7e7690b1c5f5ed7e6d08e2ebb6624ac1c175a874b83806b16fd0fd89d857030 0 Wizard\AchievementReceiveRewardTask.cs Wizard\AchievementReceiveRewardTask.cs a12a24d0b68ea814ac403cf63490fab86443321b174e434ed93c76e5e328da3b 0 Wizard\ActivateCountTagCollection.cs Wizard\ActivateCountTagCollection.cs fb0b8de915750511da274995871c184582f447c1b1d5a6569960db243bf1f482 0 Wizard\AddCardToPlayoutPlayPtnTagCollection.cs Wizard\AddCardToPlayoutPlayPtnTagCollection.cs be590b8fc0998c928f0130913b0aa923eaff662f21368401ab13ea2d763f349b 0 +Wizard\AdjustSendSettingDialog.cs Wizard\AdjustSendSettingDialog.cs d0380674a5565223a3068fec0881d161a6d424adf3e3d7945c52730cc14de915 0 Wizard\AfterAttackTagCollection.cs Wizard\AfterAttackTagCollection.cs 399655aabb4fb431693df63b42794178c30765b5e3e708214bc55a7a1a6b9236 0 Wizard\AfterClashTagCollection.cs Wizard\AfterClashTagCollection.cs 7e4c59ef671559d3a1be6e9b7745fd67ff19afcdf2b37c8eb3eaa042596ef1ea 0 Wizard\AfterDiscardTagCollection.cs Wizard\AfterDiscardTagCollection.cs 076f64ad48ce2473fe5aacbe16790488872c5c1992577ba9cfb7d1472ade0d27 0 @@ -2334,13 +2409,16 @@ Wizard\BattleCardRealTargetInformation.cs Wizard\BattleCardRealTargetInformation Wizard\BattleInformation.cs Wizard\BattleInformation.cs 85808cdf3afae2207317b68833c14d5e65c10de6b630e7f5ed436ce4bfbe55cb 0 Wizard\BattleMenuUserPanel.cs Wizard\BattleMenuUserPanel.cs 15180328be642d73316aa50844f52541cb4596249c7982344fb419811dc05101 0 Wizard\BattleParameter.cs Wizard\BattleParameter.cs a034f5db7cd37a8d8fc3e4b14a0e575694e236dbd6ca307d9ab1f827b99258c7 0 +Wizard\BattlePassBuyTask.cs Wizard\BattlePassBuyTask.cs f5bdedcceb3493711109ca78540a01421b717ba39ec8536f8e7773fa33adac81 0 Wizard\BattlePassGaugeInfo.cs Wizard\BattlePassGaugeInfo.cs b4940b7f064149a0137e7b0a61a9df21eb20b5e8cc885769979f91ee45059cc9 0 Wizard\BattlePassGuage.cs Wizard\BattlePassGuage.cs fe0d550cbe5afc8acd6364b1a8966bdc08f1bcedf9467c32cc06e3d3b8c099b5 0 Wizard\BattlePassLevelInfo.cs Wizard\BattlePassLevelInfo.cs 8c2484b47fb952aeb2e32134999644dc78babcb03e2f1a482c3f340135918c8f 0 Wizard\BattlePassMonthlyMission.cs Wizard\BattlePassMonthlyMission.cs 2fe16dceba2cbaa3391d1e91821149c5eb45c64841478212dcbe59034724d8ae 0 Wizard\BattlePassProduct.cs Wizard\BattlePassProduct.cs fce42097d88e4c4dc131d415d67cf0ff38f2ffa0bb961bbcadd387eb0a865ff5 0 +Wizard\BattlePassProductDetailDialog.cs Wizard\BattlePassProductDetailDialog.cs 9f3582c8ab420112ebece5c75b18990edbafd1bca0fff54dfd8f1e4af2014d7e 0 Wizard\BattlePassPurchaseDialog.cs Wizard\BattlePassPurchaseDialog.cs 5be1730794cfe0edf290708880facbf66705762f3f7ab98e81207aa1f38152bd 0 Wizard\BattlePassPurchaseInfo.cs Wizard\BattlePassPurchaseInfo.cs 9e32041f4ef31a7e93998c17d87727417d2796eecef7eccc9ec09185fab25aac 0 +Wizard\BattlePassPurchaseInfoTask.cs Wizard\BattlePassPurchaseInfoTask.cs 5f3858243f55e8dfe990ea76f8e07305fd420a43fc7a653835c631ac1b77e248 0 Wizard\BattlePassPurchaseProductView.cs Wizard\BattlePassPurchaseProductView.cs 44bd65c0f0a0bb1060b91200e2dfe5f7c383c1e2997b9c76c159f2dae2fb9d30 0 Wizard\BattlePassResultPanel.cs Wizard\BattlePassResultPanel.cs 332992ec3f44533c9f99f06d577f6a6834e815859c09a54d4264807d8b946eb4 0 Wizard\BattlePassUtility.cs Wizard\BattlePassUtility.cs b3ca009f983e460691c482b98dec53341c517ad2c057366cc09c4b9665e6aeda 0 @@ -2361,6 +2439,7 @@ Wizard\BossRushHiddenBattleStartTask.cs Wizard\BossRushHiddenBattleStartTask.cs Wizard\BossRushInfo.cs Wizard\BossRushInfo.cs 5e0c725f4d19e75b060bc8545f857c0f91dab77e994dcf1fbdbc67b2554a627f 0 Wizard\BossRushLobbyAbilityCandidateData.cs Wizard\BossRushLobbyAbilityCandidateData.cs eeae65a4867ad4514df39f64edb586c9c3b5fe31ea9b58ac1f86e7b9baf66e7a 0 Wizard\BossRushLobbyAbilityData.cs Wizard\BossRushLobbyAbilityData.cs 3a508f41271c634e404f7e84dfcb817d670ed03d919a551af7b79da062726ef8 0 +Wizard\BossRushLobbyAbilityDetailDialog.cs Wizard\BossRushLobbyAbilityDetailDialog.cs 3ddb4707d8201279eb74fd95e37ce22213a810d5ca7af0ca02c7a57cf84aaefb 0 Wizard\BossRushLobbyBossData.cs Wizard\BossRushLobbyBossData.cs 9d6a1803f125be2c656e260e12634a466f074527daca5ef74c6130e24bbf6463 0 Wizard\BossRushLobbyData.cs Wizard\BossRushLobbyData.cs c146839c5aec76d23cc93048a16b4f14e918611567810d669b7e1be840d582d1 0 Wizard\BossRushSpecialSkill.cs Wizard\BossRushSpecialSkill.cs 13a0cc8b52ad626bbbb230cc07ffdda3c9ce695110c06a99c7e1e96006eaed88 0 @@ -2375,6 +2454,7 @@ Wizard\BrowserURL.cs Wizard\BrowserURL.cs 1d4323f80f3d9a2cf492bbe5ad06a3f07edbfc Wizard\BuffBonusTagCollection.cs Wizard\BuffBonusTagCollection.cs 1ba4e258a1b6c2aa9c823d8ff70bdc0712fc407d9e831272a81f9244271eae16 0 Wizard\BuffTriggerTagCollection.cs Wizard\BuffTriggerTagCollection.cs 99d3a0179a6b33a85efaca75a7e2632fa0c0fc0073be168c83d7116e1b37602a 0 Wizard\BuildDeckCard.cs Wizard\BuildDeckCard.cs 2f49148b8472e0a45edf5d4360902605658057db7c34abe6d3e8e46f7f299367 0 +Wizard\BuildDeckProductDetail.cs Wizard\BuildDeckProductDetail.cs b409987653155e54d2f2f868f37dafadf3536e63f9c919667fb3bd1d7d1ab222 0 Wizard\BuildDeckSeries.cs Wizard\BuildDeckSeries.cs 8f6144e6cb43e2a4924b3a5ebc06795d67461ea029bbc76126e97300532ba159 0 Wizard\CampaignBattleWin.cs Wizard\CampaignBattleWin.cs 1608aa1db4226d5928be000b720dd0cc691dcea190d34c4f2f0fdece90e8609d 0 Wizard\CampaignRewardInfo.cs Wizard\CampaignRewardInfo.cs 038717992648b3a4475456630a00f1a296113d304675e936a2a80b7a60de6fec 0 @@ -2403,13 +2483,19 @@ Wizard\CardSleeveRewardItem.cs Wizard\CardSleeveRewardItem.cs 9cf753ca79d8e25f1a Wizard\CardSleeveRewardView.cs Wizard\CardSleeveRewardView.cs 239ffd404400fe94dbfc08cc48d0591bcef769a5081a389134d5409275c84180 0 Wizard\CenteringUIWidget.cs Wizard\CenteringUIWidget.cs 1ddc0ddbbfcd6638010dc6889706b3a5944ac5b122103cf24f9c0d7adde66efc 0 Wizard\ChangeInplayTagCollection.cs Wizard\ChangeInplayTagCollection.cs 0e52c7c354104e962110f89f72971455b6d1835ee41c01e07886fee28491dcd0 0 +Wizard\ChangeableTitleUIParts.cs Wizard\ChangeableTitleUIParts.cs cb7bdf8645fd1094dcb3e81c01bee88ccd2a8b7c6b0cb5847a75093b5508eefa 0 Wizard\ChaosUtil.cs Wizard\ChaosUtil.cs 152adff597f552c9e74f44fe8c2bf41708055dc1c80e85410eea6aa04f0ad82c 0 Wizard\ChapterObjectCenteringSupporter.cs Wizard\ChapterObjectCenteringSupporter.cs 43ae389f01e2a45d87767adfab44caaccb10d590e0509e4dcd54ee4d6787e7d9 0 Wizard\ChapterSelectButton.cs Wizard\ChapterSelectButton.cs 94510cf6d704e60588b1239da078fd5ccc02cb37efa4b3e27edf429fdd9dbd1e 0 Wizard\ChapterSelectSphere.cs Wizard\ChapterSelectSphere.cs dfad54b585ff199b6fd6def8f79a55306e4d1c5aee9a6e9c3aae6ebfc753468b 0 Wizard\Chat.cs Wizard\Chat.cs e2376b5c58c19422a0f99ad05e74437e983847398f904dd2ce80ecb8ffaf66dc 0 +Wizard\ChatAddDeckTask.cs Wizard\ChatAddDeckTask.cs c0204c1e1114351438d3d87751dc485624de3c675aa63eea27d0aed3495f3401 0 +Wizard\ChatAddReplayTask.cs Wizard\ChatAddReplayTask.cs c0bc09a90c810749e4a87b15a266b4f54e1294afc2180580cd4e29bc99cbb7d8 0 Wizard\ChatConnectController.cs Wizard\ChatConnectController.cs 014c3d0c59f4e794b9105613e290a10548ee43fdf4951fef04d981dcd74bbff6 0 +Wizard\ChatDeckLogTask.cs Wizard\ChatDeckLogTask.cs 9a6b7a7bce57dc6e0f3c67f63823b4505208f9945755ace9713b5c1f6c3f81a5 0 Wizard\ChatDeckView.cs Wizard\ChatDeckView.cs 91a037627c00c5a88e2f2626051c9e8a97e4ec6bca015ca3c0bb7ab21ca41605 0 +Wizard\ChatDeleteDeckTask.cs Wizard\ChatDeleteDeckTask.cs c15aa3125367e0990d3135ff5d6467d3f3949e9ee04030e18abd03fc43521006 0 +Wizard\ChatGetMessagesTask.cs Wizard\ChatGetMessagesTask.cs c9aac6f4ca24248b688b47c6db2ed20017a33b45e3ca53cef7d0bb10ea60d4ad 0 Wizard\ChatInfo.cs Wizard\ChatInfo.cs 39a9ae7e4df948fccb0f3f1024b8fbba06603c7e608af8218147074aab1b72c7 0 Wizard\ChatLogContentBase.cs Wizard\ChatLogContentBase.cs 84d8752970bccfef5a9d0cf14196a3f1ebca41bf3883ddd8a75f832596a20a7a 0 Wizard\ChatLogPartsNotice.cs Wizard\ChatLogPartsNotice.cs 0691379a2bb1d279ed9777dde5468880e84d9bdb2af67f37e3a1aa72f665dd31 0 @@ -2420,7 +2506,9 @@ Wizard\ChatLogPlateLayoutNoMember.cs Wizard\ChatLogPlateLayoutNoMember.cs 9768cc Wizard\ChatLogUI.cs Wizard\ChatLogUI.cs 0b9af050bbf823b6367cdec09ad970423a3ab5245a86907201e30139c08883d0 0 Wizard\ChatMessageInfo.cs Wizard\ChatMessageInfo.cs c414c78903b6045ce4d88c76381d9bc1bdf1c02ecb23cc62c9acb4d27794c7aa 0 Wizard\ChatOpenCloseAnimation.cs Wizard\ChatOpenCloseAnimation.cs bc7683671e62091da2d54ba63ef146ad4881b74d8afdae41799f585a3a0e98bb 0 +Wizard\ChatPostTask.cs Wizard\ChatPostTask.cs 66e37f0c496691e81d50783424d14cdfd31706b10f782109b9b13e6889c661a7 0 Wizard\ChatReplayListDialog.cs Wizard\ChatReplayListDialog.cs 821eec442279d4101141b8117cb21db6779284f232eb7a943c94d442e0b5fc8b 0 +Wizard\ChatReplayListDialogContent.cs Wizard\ChatReplayListDialogContent.cs 23a3fba4a11cfd63677ab6f5affd9f28a1595bed1925fecf6fc67a8696227706 0 Wizard\ChatReplaySendConfirmDialog.cs Wizard\ChatReplaySendConfirmDialog.cs c94be67ae4c487eb107626d133e99b60e49bd3211d6f8cce1146004e9ac1ef4f 0 Wizard\ChatSendDeckUI.cs Wizard\ChatSendDeckUI.cs 1da32342f2f25220f56dc054075c3477736ab00f455494621e221d365b82488e 0 Wizard\ChatSendReplayListUI.cs Wizard\ChatSendReplayListUI.cs 94fd68696d7eb05eb569bbeabc0a360d4d824740a5875ea43018eab5e1b81915 0 @@ -2445,18 +2533,32 @@ Wizard\ClassSkinDetailWindow.cs Wizard\ClassSkinDetailWindow.cs 05f8f178d4cbec20 Wizard\ClassSkinSelectBuyMeansDialog.cs Wizard\ClassSkinSelectBuyMeansDialog.cs 769c2c46a5c7fab555acfd53982eeac368e3f0452eef8a34ecaca0402196cf0d 0 Wizard\ClassType.cs Wizard\ClassType.cs c0be0ce00bb64ad28a85f1f1edfafa0216b67a47fa8d744a1b69c19b78c786ce 0 Wizard\ClassUtil.cs Wizard\ClassUtil.cs fbfe755aff08092de955f89e8cc0494b289d74cf09eab426a239dcb2aca78a27 0 +Wizard\ClientCacheClearTask.cs Wizard\ClientCacheClearTask.cs 8c41f91c33321607d912f804a1a28df80b22eeb3d0c0196e24c7923e1f799462 0 Wizard\CloneActualFlags.cs Wizard\CloneActualFlags.cs feadf48e251d85e8d9b76ce2a973f56102a2c753d788ad21055e577d1788f8dd 0 Wizard\ColorCode.cs Wizard\ColorCode.cs c009240287a148d30c3fb249cf85ead5a885b76455dd42f79aaedc43d0b3b393 0 Wizard\ColosseumBattleFinishTask.cs Wizard\ColosseumBattleFinishTask.cs ef1c9eb75c4aea0a055af34dffff276283d7e6a4421351dc62921dbdd4acefd3 0 +Wizard\ColosseumDeckEntryAvatarTask.cs Wizard\ColosseumDeckEntryAvatarTask.cs dd0223aedf430ae7786bd6589a36d8ef97391d51c0fd711c58b711648e8eb5de 0 +Wizard\ColosseumDeckEntryHOFTask.cs Wizard\ColosseumDeckEntryHOFTask.cs df524cb66794d9bb323f4fd4c95686f8966f0f9b7f5c3a1fa3db2c55a61236c4 0 +Wizard\ColosseumDeckEntryTask.cs Wizard\ColosseumDeckEntryTask.cs e726973b4da919824104de8d7fe1e1f19ab16cb701410b938fa7ed611c8b1d90 0 +Wizard\ColosseumDetailTask.cs Wizard\ColosseumDetailTask.cs 329e490dd97517178656c5c547d2a74b89435001fd997737ec7074c4f213dc8b 0 Wizard\ColosseumDoMatchingTask.cs Wizard\ColosseumDoMatchingTask.cs bb9748c3e243e10959d05bb928f3fb3ebfc619d98ec1b5f584df7298c22cf7cf 0 Wizard\ColosseumEntryInfoTask.cs Wizard\ColosseumEntryInfoTask.cs a91e9a568dd5d734b8e21200735e9d5ef3ca21f985ceddeb86c8b34671b1793f 0 +Wizard\ColosseumEntryTask.cs Wizard\ColosseumEntryTask.cs ded9f76419dff211bdb5f8d64fc10ee7bb7dfa087276c615a7fbfdec222b1b84 0 +Wizard\ColosseumHOFDeckInfoTask.cs Wizard\ColosseumHOFDeckInfoTask.cs bb04deaf1a2523d0a8839188359aa941bf2a5929a7f02bf511967560e373e544 0 +Wizard\ColosseumWindFallDeckEntry.cs Wizard\ColosseumWindFallDeckEntry.cs 56efbfcc68a8b04630e0c8ab10b10baca60618e3d1a96e1bc58a9fc9979e7222 0 +Wizard\ColosseumWindFallDeckInfoTask.cs Wizard\ColosseumWindFallDeckInfoTask.cs 81b592e70de0fbe5e184740544bab6c5c10afad2240288a75e4e5c5c33971eb9 0 Wizard\CompetitionBattleDoMatchingTask.cs Wizard\CompetitionBattleDoMatchingTask.cs 2faadde3f3cd37235fb69e525903e01fbc5165a5958eda8f87679c9ed12c7bfc 0 Wizard\CompetitionBattleFinish.cs Wizard\CompetitionBattleFinish.cs 9c57fa74b82bb7cbb69253ebc959b03e4629cf6f600e17de6c2408ffc87664a3 0 Wizard\CompetitionBattleFinishDetail.cs Wizard\CompetitionBattleFinishDetail.cs 8fe99f2a423fd36c67a12e32f1efa60ea8c6229adaa6a19964a9b1bf6728ef3e 0 Wizard\CompetitionBattleFinishTask.cs Wizard\CompetitionBattleFinishTask.cs c9d0952c1d0b8f41d7d165f3e398accf16139341b5c9d77bc75d1936c970abcc 0 Wizard\CompetitionCardPanel.cs Wizard\CompetitionCardPanel.cs f7e68a3c5565a7b5379eae34148f63226cbaf5a943fcc9c675fc9b7f7e7caa39 0 Wizard\CompetitionCheckPeriodTask.cs Wizard\CompetitionCheckPeriodTask.cs d6721f2411b1d094508177e68b0178dfee7bc57ebaef2b345f8518ffb9977c55 0 +Wizard\CompetitionDetail.cs Wizard\CompetitionDetail.cs 071c83e5a47a35f1f10ecf59814567131e944eb4845480ea433fa753d8ace487 0 Wizard\CompetitionEntry.cs Wizard\CompetitionEntry.cs 87cc3080389dfa9f7293b7028ec058c0161cbc8f05e341dbacfe1a12da05d0bb 0 +Wizard\CompetitionEntryDialog.cs Wizard\CompetitionEntryDialog.cs aed3caa3ff1a66c8d1ccafd3395e997b8a250c6311a60da86bf8ebd21df89d67 0 +Wizard\CompetitionEntryTask.cs Wizard\CompetitionEntryTask.cs d47db9339e308e5962dd7924d04a06dabab60a2085af16430b5e888da2f576a0 0 +Wizard\CompetitionJoinTask.cs Wizard\CompetitionJoinTask.cs e979d61adddd303836992344e821176d7a31dccb689347c75bb8b38fe9f58eb1 0 +Wizard\CompetitionRegisterDeckTask.cs Wizard\CompetitionRegisterDeckTask.cs ae9d2f397c9cb5b8d16f5d0ade6ab5bb1bb56586f5caf7421efc3b479cd71379 0 Wizard\CompetitionResultAnimationAgent.cs Wizard\CompetitionResultAnimationAgent.cs 75b8a263a2ef3999b4abbcc79aeb8027457521e7cc84ee5de27b09d34810acf5 0 Wizard\CompetitionResultAnimationHandler.cs Wizard\CompetitionResultAnimationHandler.cs b881b9efd770b87585bf3d059976ffd97e5ea23e4cfcf9501d9ac45fe96f8994 0 Wizard\CompetitionResultReporter.cs Wizard\CompetitionResultReporter.cs c6e601412cc55d33f4136c71e11d1f92aede9f2bf4cc12e3154a8d526bbd62ed 0 @@ -2467,6 +2569,7 @@ Wizard\ConfigUpdateFoilPreferredTask.cs Wizard\ConfigUpdateFoilPreferredTask.cs Wizard\ConfigUpdatePrizePreferredTask.cs Wizard\ConfigUpdatePrizePreferredTask.cs 284c2f0cfa477d0e789b67094dc0d127fd9ea7ed28d66a7a1a036154dbf1b9bd 0 Wizard\ConventionCrossoverFormatBehavior.cs Wizard\ConventionCrossoverFormatBehavior.cs 66e89ced56b6978e69f48d4636e98381e1db3d97557ddeda5ca431eadfb1ef77 0 Wizard\ConventionDeckList.cs Wizard\ConventionDeckList.cs 8653b2d3cfd9d69413b0483bf384e05e18e0ca3b52f6239a212c5e5f01f2aceb 0 +Wizard\ConventionDeckOrderTask.cs Wizard\ConventionDeckOrderTask.cs a2ff41debca8b963c935e1a09671d24e597613cb7feeb73966a1339190574c98 0 Wizard\ConventionInfoTask.cs Wizard\ConventionInfoTask.cs 81ccf3c9eef5ee417b4e3f7e3c981f994f99933a4174219a6a884842395c5a45 0 Wizard\ConventionMyRotationFormatBehavior.cs Wizard\ConventionMyRotationFormatBehavior.cs ab7de41e7d5f64121605db416350e56b48833080cbcc685de4f21d3da774888b 0 Wizard\ConventionRotationFormatBehavior.cs Wizard\ConventionRotationFormatBehavior.cs ca2a9ab98335b94ae8b2f522ac626e422367ebac2766c2ff2d4baebe4cf82927 0 @@ -2483,25 +2586,38 @@ Wizard\CrossoverReceiveRankRewardTask.cs Wizard\CrossoverReceiveRankRewardTask.c Wizard\CrossoverRestrictedCard.cs Wizard\CrossoverRestrictedCard.cs 663c0ac1cabef1716b979c3ec4bdafa47ced26420eaaa08bd6b97e90acf1d815 0 Wizard\CrossoverRewardInfo.cs Wizard\CrossoverRewardInfo.cs bb3763306d0e7d3feefb748b1bf461a114a363d36703edb8a8a5d2b5734128ee 0 Wizard\CsvColumns.cs Wizard\CsvColumns.cs d113f92e1f0145adb323c093deca81aab1889e8de34ed78c852b8e5a764c1c4c 0 +Wizard\CustomEasing.cs Wizard\CustomEasing.cs c7ac36e40e66f046d42e1d688db22f2acc2567399ce23c0512e3e2c8beefa598 0 Wizard\DamagedTagCollection.cs Wizard\DamagedTagCollection.cs 8e6ecf677b4da8e16a68d3336959cd6d08af4830a0214297d65e96243f777c3f 0 Wizard\Data.cs Wizard\Data.cs 26bd39c591da328c1a30eccf773064be022145dad1f11a29584832b8a81d36e1 0 Wizard\DeckAttributeType.cs Wizard\DeckAttributeType.cs 006bb4c04d8a60c9caf04873dde6c962366348db03ec40a8bbc0071392f656dd 0 Wizard\DeckAutoCreateTask.cs Wizard\DeckAutoCreateTask.cs e8c21d513114d2c42ad85a28da4adb48642bd36dc012f6029fbc8a8d72b78d6c 0 Wizard\DeckBuildShortageCardView.cs Wizard\DeckBuildShortageCardView.cs 34428e4efb614c4fd59136d1bb87485ce117a97b2c6668f0481fff4b510a31d3 0 +Wizard\DeckConventionInfoTask.cs Wizard\DeckConventionInfoTask.cs 039f36879846589dc72f55ec47dc5446b737945f4ed67e76b1cf4b2df06f1b14 0 +Wizard\DeckConventionLeaderSkinUpdateTask.cs Wizard\DeckConventionLeaderSkinUpdateTask.cs 896b758a2d0d37c8251dc406bd190e2d792cbbb3b641019d42c7aa0d41be53c7 0 +Wizard\DeckConventionNameUpdateTask.cs Wizard\DeckConventionNameUpdateTask.cs 6b4414e4a5d63a2c721ed380d2d242d0db6007d6a8c5a87f84640130738632b7 0 +Wizard\DeckConventionRandomLeaderSkinUpdateTask.cs Wizard\DeckConventionRandomLeaderSkinUpdateTask.cs 4d02ed499b12d2854607eb19ae5ef9318eb116263a83a28da40de73221ffab77 0 +Wizard\DeckConventionUpdateSleeveTask.cs Wizard\DeckConventionUpdateSleeveTask.cs c6bd86775e4d4ddd932406cffbfd422617e46df5ecf072fe640524947584f548 0 Wizard\DeckConventionUpdateTask.cs Wizard\DeckConventionUpdateTask.cs a3166a78167c695c8a109a9581e59e2aa9145cfaf9af71815256034e99a7e89e 0 Wizard\DeckCopyDialog.cs Wizard\DeckCopyDialog.cs 32d95553dc268017f7d0345914c1f83243c928376e418f78d48615b568551957 0 Wizard\DeckDetailDialog.cs Wizard\DeckDetailDialog.cs f3af592eee584a5dab2cc31ac8668ac77f37cc97fac68bfd1f2edcba65da6848 0 Wizard\DeckGroup.cs Wizard\DeckGroup.cs c5334b68f875f193b100950fba847271ae5fe12e94c79aabd4a8220551066964 0 Wizard\DeckGroupListData.cs Wizard\DeckGroupListData.cs d107ef3fc0cae879fe755256b94e8cc7ddcaa64d3cffa1143246dfe68a185150 0 Wizard\DeckInfoTask.cs Wizard\DeckInfoTask.cs 4256d53231dfd8f243c47c9e94810d749c9542fb4c540f0ad486918dec5f3b3a 0 +Wizard\DeckIntroductionPeriodSelectDialog.cs Wizard\DeckIntroductionPeriodSelectDialog.cs 8c64a8b8c911bc266e67d01f22b02b50517b93347fdc2ed6d53c6a83de7ecf06 0 Wizard\DeckIntroductionTask.cs Wizard\DeckIntroductionTask.cs 3b03a5c38563b466f72fa956252693d5fc0b35c110d3b9c9ccc3e23057865587 0 +Wizard\DeckLeaderSkinUpdateTask.cs Wizard\DeckLeaderSkinUpdateTask.cs 8c2dc9ee848008241e91ef4fb6a5801d5df4e7413323f84575e03584405e2f1f 0 Wizard\DeckListUI.cs Wizard\DeckListUI.cs 358bf4fcf970e714fbe1bfa67db36794271d63f0b93d9f3fff38c5ecfec2b7e1 0 Wizard\DeckListUIParam.cs Wizard\DeckListUIParam.cs fa39362bce104dfb54eb1bdf781e9cd973157da9ad76aa33c0595f8934e1af6a 0 Wizard\DeckListUtility.cs Wizard\DeckListUtility.cs 353c79754fd9a0967d88439c3793c7759e75f6dccc99aaa506c63c263bc40ca7 0 +Wizard\DeckMyListTask.cs Wizard\DeckMyListTask.cs 0d7c1a216a20ac1aa47080e769ab1f5c3ce218243626ca32d6da32963733331f 0 +Wizard\DeckNameUpdateTask.cs Wizard\DeckNameUpdateTask.cs b96e148582ad92c01e978bbcc091c9ce2ab59df6d73309005fdeddfc095b1b7f 0 +Wizard\DeckOrderTask.cs Wizard\DeckOrderTask.cs b82f0d36352649e906517835f6f6b0a2a40861226be288e326987d90d57c129d 0 +Wizard\DeckRandomLeaderSkinUpdateTask.cs Wizard\DeckRandomLeaderSkinUpdateTask.cs d241a6b6bd2fce093788023993a562099da0358b6b56a7c54db3e03ad19bb37a 0 Wizard\DeckSelectUI.cs Wizard\DeckSelectUI.cs 2988481745cf6011c71470173e750d0d53e049eae0fd0222fdd58426552e4ea5 0 Wizard\DeckSelectUIDialog.cs Wizard\DeckSelectUIDialog.cs 57d268defebb1b9e21d26eb5d83eb0e6a017dfbef062ee03279a17c81707ce57 0 Wizard\DeckSelectUIDialogTitle.cs Wizard\DeckSelectUIDialogTitle.cs a392d397f6f7b885440ceedee71ee93e8acefe1e7cfb1508bc44a311a43567a0 0 Wizard\DeckUI.cs Wizard\DeckUI.cs f99d5d852a206e73ee5c25406ae03380225bfea8c68ce24b69de8347e220af59 0 +Wizard\DeckUpdateSleeveTask.cs Wizard\DeckUpdateSleeveTask.cs e94fbccc3c651e24fe9dd2be00ab13ab17eee2d5d134e317e98a54694638bdc9 0 Wizard\DeckUtil.cs Wizard\DeckUtil.cs 7a8e6c204f5312eabdb6c56cc8dfa366db3a9aa55584ede83c7cfec225b4d5a5 0 Wizard\DeckViewHelper.cs Wizard\DeckViewHelper.cs c364b815cd91be517d658f93ddf3a7ba7428261c156ee2162a17e211f4e294c2 0 Wizard\DeckVirtualCard.cs Wizard\DeckVirtualCard.cs 00c7e8d2ebae0dac6af30eb018cd1390a3ceba87b1348c93fe0c7c99eebf275d 0 @@ -2509,6 +2625,7 @@ Wizard\Degree.cs Wizard\Degree.cs 0f3cf092884c7d4c5a4479ce9f887c3b93e77c2c1fd205 Wizard\DegreeCategory.cs Wizard\DegreeCategory.cs f68c21dc08c6bf0b20af52a33792e14d680c5dab5abb1f2d78eba08e418f7806 0 Wizard\DegreeHelper.cs Wizard\DegreeHelper.cs 374834564120f9fada359f4d1c8ecb2fec73d9d9e8e0dff4d049c10459f94bcb 0 Wizard\DegreeMgr.cs Wizard\DegreeMgr.cs 556894217a0903686b0c2c1b4895d0585a3b85863617e5f97dfe49edb02b2c73 0 +Wizard\DeleteUserDataTask.cs Wizard\DeleteUserDataTask.cs c0c0f8f2fc97b9e20907adc5b8e08a36696c9d3f79ef24da92e11c9888fa2760 0 Wizard\DialogCreator.cs Wizard\DialogCreator.cs a48d5ef01c479732f8e1638ce589904cddae1ecfea80526321e5ab2c0ff29b32 0 Wizard\DialogItemPurchase.cs Wizard\DialogItemPurchase.cs 3b35164adbc25cb9075a6fdf4e605ba9b08e7272ba9ebbafae381c0e6206ba2d 0 Wizard\DialogSubText.cs Wizard\DialogSubText.cs 0f2c313c63527cab0897631df179960ffe766102c250fdb392cb9baccb819dc4 0 @@ -2615,28 +2732,59 @@ Wizard\GachaSelectBuyNumPopup.cs Wizard\GachaSelectBuyNumPopup.cs 2aa4ee4381bd6f Wizard\GachaUIParam.cs Wizard\GachaUIParam.cs 0b3d1a8dea33c121c44ad2d11b4d3329811913ddaeff65abd0e388ebdd566a2a 0 Wizard\GachaUtil.cs Wizard\GachaUtil.cs bcbe7800864a035b5f6ed151b417a52bdfb44f6ab75061220b1488ac19b05217 0 Wizard\GameStartAttachTagPolicyCollection.cs Wizard\GameStartAttachTagPolicyCollection.cs c4e1108a4e06f5cc00b27cfed24cd5556490e08cd912acdb504db349ec47d6c6 0 +Wizard\Gathering.cs Wizard\Gathering.cs f5160cbc2e6a75d616b31603269666b0876ca36cd23458eb1fa769d9dc0fad04 0 Wizard\GatheringAutoJoinTaskInfo.cs Wizard\GatheringAutoJoinTaskInfo.cs fc170ce4677f14fc4a9c2ead3d1818726a17a01d2defd0e8a34dbfb4da89e509 0 Wizard\GatheringChat.cs Wizard\GatheringChat.cs fde29e1f249d32a60a52c2db003f4b447c084ac27ee03f74acf1b2d093280f40 0 +Wizard\GatheringChatApiSettings.cs Wizard\GatheringChatApiSettings.cs 4ba131fccc0a9a14f7d6b630bf94f1e65f8cf5e742bcd990d85ea57125aeb2bf 0 Wizard\GatheringChatAutoJoinRoomMatch.cs Wizard\GatheringChatAutoJoinRoomMatch.cs 225266a9051831905157567681db05c36b3da18fabc55ea0eee7d78216c17cb4 0 Wizard\GatheringChatDeckList.cs Wizard\GatheringChatDeckList.cs 90f6d0c84fbf91a9577fc8bcd228a3fefbd74e45e54ca1c8ad493f0938049dbc 0 Wizard\GatheringChatInterruptOrLeave.cs Wizard\GatheringChatInterruptOrLeave.cs b8b940139f08fa99c5292bc657bc7d7aba7e5194826fe604a960fec262a65e7b 0 Wizard\GatheringChatSendRoomMatchUI.cs Wizard\GatheringChatSendRoomMatchUI.cs d0a0ddce3d5f464a5b642b0e80bd01ef1389893e40b91ddfffd8f45a9ce1f610 0 Wizard\GatheringChatSettings.cs Wizard\GatheringChatSettings.cs ea1d8e522d03131e4b885b4bc4943707e710e6758292ab0d9140dfc0096c4a15 0 +Wizard\GatheringConfirmDeckListTask.cs Wizard\GatheringConfirmDeckListTask.cs 1120ecff28adc0f07bdc4c55475d74005d8297025045f9809666f1bd4334f6d1 0 Wizard\GatheringCreateDialog.cs Wizard\GatheringCreateDialog.cs bfd5438b12dca19b991584ee3488d0355871f16b9a362dbbd26d56d5ae829b6a 0 Wizard\GatheringCreateTask.cs Wizard\GatheringCreateTask.cs 83b33e80d485f4f544510d8829537b9841d8f337afdc30e495a9ea40299f2134 0 +Wizard\GatheringEntry.cs Wizard\GatheringEntry.cs 317ea8b25031936502ca7315e620a96cd61c0a6f15b0dce0a14877258bdb7a98 0 +Wizard\GatheringEntryConfirm.cs Wizard\GatheringEntryConfirm.cs 98d8ca6aaec22465fff1bcec9363f040f429d3fa77c9a0f474588621e39644d3 0 Wizard\GatheringEntrySetting.cs Wizard\GatheringEntrySetting.cs 476bfbf70aad87c0909d546d10250b11c82b056d7460b19ba859464d764d9344 0 +Wizard\GatheringFriendListTask.cs Wizard\GatheringFriendListTask.cs 074948f46767ad157b41634bcbfbfa66baba91d4ff4e039523f5d88cf7fa482a 0 +Wizard\GatheringGetInfoTask.cs Wizard\GatheringGetInfoTask.cs de63b5ac7f5bf0cb4336192c5f116e0158fb32a48790c2a9cc948861706f7d2d 0 +Wizard\GatheringGetReceiveInviteTask.cs Wizard\GatheringGetReceiveInviteTask.cs 9bcfb3ca8fbfd974681c2b5dfc166a7d1905dc593ef30d79469ef7dedbdabd96 0 +Wizard\GatheringGetSelfInfoTask.cs Wizard\GatheringGetSelfInfoTask.cs 2b09b93b8a61d42d94f2eba0b3e628e0d0714c196df600cdea657bf9fba6f6ac 0 +Wizard\GatheringIDInput.cs Wizard\GatheringIDInput.cs 3504a7cf7cd5e7cd640006b4cb7455cb0899bcd183ca1abdf36677ee5ad483d0 0 Wizard\GatheringInfo.cs Wizard\GatheringInfo.cs 7614c505d5604ad78e39e70d5ed3b5ff5bc84d634312bafb10b6e9037861d6df 0 +Wizard\GatheringInterruptTask.cs Wizard\GatheringInterruptTask.cs 92c144bf58a3d1563ab4afd1f942089e49a8910dd0c24eaad770ff6a57c4e35a 0 +Wizard\GatheringInvite.cs Wizard\GatheringInvite.cs e3a38ed3c87edc06deaba43443497b65b27618cbcd08337b24ac4a750d3ff8e8 0 +Wizard\GatheringInviteUserListTask.cs Wizard\GatheringInviteUserListTask.cs abfc56a0dd376ca0dc233a5f75eb0e3fd3a8cad13d7a931960b881a0b44b81bf 0 +Wizard\GatheringJoining.cs Wizard\GatheringJoining.cs 5ff03014dc5c2ef76aff6f8509ddff78bd3957b0d9ab3368a8528145bb276d25 0 +Wizard\GatheringJoiningCategorySelect.cs Wizard\GatheringJoiningCategorySelect.cs cde01d6d8e8aec3a1608acc1529f4c07dc324d4b6dc77362bac8aa5016c0b1b5 0 +Wizard\GatheringJoiningInfo.cs Wizard\GatheringJoiningInfo.cs 98c8fc870f69519307db9e178cfb7e02c6167d96ae3e7277262ddc29eaf94256 0 +Wizard\GatheringLeaveTask.cs Wizard\GatheringLeaveTask.cs 23c6e808e151a5513390c561da63a224bea5a4f0fceebb1d92a8365a0d6f163b 0 Wizard\GatheringMatchedRoom.cs Wizard\GatheringMatchedRoom.cs 1531b714bd8ba8bc782ab35b68fa9bde01229f1705099fb9671c72d9ebc70db8 0 +Wizard\GatheringMemberList.cs Wizard\GatheringMemberList.cs 6c9e90fa64f98dc2e42b3dc901a153eb301ec58dcf86d655e17e72982f829568 0 Wizard\GatheringMyPageInfo.cs Wizard\GatheringMyPageInfo.cs c28baddfaafc8ef7685abfdf6ac6318f822524a30006247625391fd7b6568fd2 0 +Wizard\GatheringRanking.cs Wizard\GatheringRanking.cs f56e7728f13379007d7580d769a3aaab1999140b404e587cb01d8d1ab99b3c6b 0 +Wizard\GatheringRankingTask.cs Wizard\GatheringRankingTask.cs 000dd1e97df104d45801b2c6d610c4f47f0656a373c27b048c5ea3e43b406e3c 0 +Wizard\GatheringReceiveInviteList.cs Wizard\GatheringReceiveInviteList.cs 584ecc5fb0b0d770bb37755bf14c9f8a25093175b02dc0fe8843b327c91e6a86 0 Wizard\GatheringRoomEnterTournamentRoomTask.cs Wizard\GatheringRoomEnterTournamentRoomTask.cs 167e6f58f8ab1a9b182a4ac8f5178ed4c92c6bbd9feac6ef240deff757a14d2c 0 +Wizard\GatheringRoomEnterVacancyRoomTask.cs Wizard\GatheringRoomEnterVacancyRoomTask.cs cc645ab3c33905b5b187b27d8fcbca95bff35742726f1ebc4c9aebd24c435a09 0 Wizard\GatheringRule.cs Wizard\GatheringRule.cs ee446b445c77d6d0a1e6e0f64b54cbe2a8b15974376ebc7fefa65331bd42ce51 0 +Wizard\GatheringRuleView.cs Wizard\GatheringRuleView.cs d537ffdb1606fd8a080ee569c6a43f35189f160d39b84ff1245261339977e226 0 +Wizard\GatheringStartTimeSelectDialog.cs Wizard\GatheringStartTimeSelectDialog.cs fa3c7f79d74984bb1b42760c01ec937c2c1b4c14266459004b4789db8697e09b 0 Wizard\GatheringTornamentCreateTask.cs Wizard\GatheringTornamentCreateTask.cs 868e1e194981f75a91f070752033b408c400e1226fd5eb34bfa8b5d983057157 0 +Wizard\GatheringTournament.cs Wizard\GatheringTournament.cs e17736944fe7f6d74bf3e761433719d3f90d76089e4cabc32ea6b0b07b16295f 0 +Wizard\GatheringUpdateDeckLeaderSkin.cs Wizard\GatheringUpdateDeckLeaderSkin.cs 56e37229981c9e4415e4f60c9c7dec80b2ec4ec3b90c41acd4d14e41f7d46791 0 +Wizard\GatheringUpdateDeckName.cs Wizard\GatheringUpdateDeckName.cs cf11ca9e8dbd07c26cbe2cb8b165b1eefe2446f123d938edbdcabd516bcf3735 0 +Wizard\GatheringUpdateDeckRandomLeaderSkinTask.cs Wizard\GatheringUpdateDeckRandomLeaderSkinTask.cs 29cd6ff458645c5cbb37ac9b32f8e3720d0bb9c3e4273c62b8750ff5a2d21092 0 +Wizard\GatheringUpdateDeckSleeve.cs Wizard\GatheringUpdateDeckSleeve.cs 81b5296ae4b8c44b4801126dd02ad2ab0b55d10caca967b7ae064c3c82046a20 0 Wizard\GatheringUserInfo.cs Wizard\GatheringUserInfo.cs fc67c9a20b37d66061a42e83e25b059f5342c936ab45d5d3e0c76132e8b08e04 0 Wizard\GatheringUtility.cs Wizard\GatheringUtility.cs bf3292e3e5a29dcbd25e25fa60eac4976ca06736de83eeea7cff5beb232f7517 0 Wizard\GenerateDeckCodeTask.cs Wizard\GenerateDeckCodeTask.cs 9f32c9513ec63d8b19e36d402c1adfec123b7f5774b86369391ce5fcb3996e1b 0 +Wizard\GenerateDeckImageMaintenanceTask.cs Wizard\GenerateDeckImageMaintenanceTask.cs 93ab8840c0ea594c3d46d72a677d8c0ed8c620b7a4e7df5694eb4d6c5bb394ef 0 Wizard\GenerateDeckImageTask.cs Wizard\GenerateDeckImageTask.cs 0707c62e24e24b776145e4c81a1a4f4c6a2483c674333e2a40205646e541a5aa 0 Wizard\GenerateTagCollection.cs Wizard\GenerateTagCollection.cs c8a76fe65207f3e3ce6c06bfeb0317ea98796bf8f093dfa710b05547e8b8cfad 0 Wizard\GetCardMasterTask.cs Wizard\GetCardMasterTask.cs 76242fa1bce00c5820fb35ba1e7abd984841a2b12971987d7300384c23a9eb01 0 +Wizard\GetDeckDataFromCodeTask.cs Wizard\GetDeckDataFromCodeTask.cs c1ada3b7518e2346f4bad662e7f93708f4e9271b57221dd3a15ecc8a244826b4 0 Wizard\GetOnTagCollection.cs Wizard\GetOnTagCollection.cs 53dd75747aca1d11c8dde8703971ca327b36076ac25d7a4980cf21255835148f 0 Wizard\GetOnTriggerTagCollection.cs Wizard\GetOnTriggerTagCollection.cs 2b7b7621f4483bd52ca49e2c3294a56ff25e29ff7bf32baa1ff76d86111f2fb3 0 Wizard\GetSelectSkinOwnedStatusTask.cs Wizard\GetSelectSkinOwnedStatusTask.cs 2e704c9343f59ac2d42d26eda7db77045ef144b45b16b581a6316d9cae5d177a 0 @@ -2664,6 +2812,7 @@ Wizard\IgnoreFanfareBonusTagCollection.cs Wizard\IgnoreFanfareBonusTagCollection Wizard\IgnoreTargetTagCollection.cs Wizard\IgnoreTargetTagCollection.cs 792b1c640a8978a7f69d9d295480780e18c250ea874a655ab55dc1c99d535542 0 Wizard\InCompleteDeckDecideDialog.cs Wizard\InCompleteDeckDecideDialog.cs 81c448ba1d0e0d9614c0c7b6941a396e03ed0bc460b4419c79d2e88155835eb5 0 Wizard\InplayMovePatternFilter.cs Wizard\InplayMovePatternFilter.cs 99b4635adc0978eacd30a4eab54eedf0185b23b29f2824b7a66071566ff34737 0 +Wizard\InviteAcceptTask.cs Wizard\InviteAcceptTask.cs f06814ff9397bb193919ed86715914cc6bd5ec5e7a0842ac61a8258fdcea5633 0 Wizard\InviteConfigUpdateTask.cs Wizard\InviteConfigUpdateTask.cs 61a0624c5a9fda20507973901d5218d7bedafe21ed4eb355af8601dd64b8621f 0 Wizard\InviteGetListTask.cs Wizard\InviteGetListTask.cs e977b97383bd14e766ffe3997242099a9f0f619d47aaefac8f5cf0dc18139499 0 Wizard\Item.cs Wizard\Item.cs 1f08b86cf607be02d6083243247d28fb89bfae5ba9595f1cf74562680caa9025 0 @@ -2689,6 +2838,7 @@ Wizard\MaterialDefine.cs Wizard\MaterialDefine.cs c0e77fd2b296289d26960a188e1dde Wizard\MemberBattleBonusRateTagCollection.cs Wizard\MemberBattleBonusRateTagCollection.cs af0f9eb215dfdba042be2663c3485e0330a2da5cf1c64b001fbeb958f9c40f77 0 Wizard\MemberBattleBonusTagCollection.cs Wizard\MemberBattleBonusTagCollection.cs 7d5c866fa706411b0eef538feb6b10551066b0e552d757a081c9a2b1bf5a5107 0 Wizard\MemberEvoBonusTagCollection.cs Wizard\MemberEvoBonusTagCollection.cs 94fa4f95290b222605bc4c01b68d38d8f3bd64568887f0764034bd1a1ab429e5 0 +Wizard\MissionChangeReceiveSettingTask.cs Wizard\MissionChangeReceiveSettingTask.cs 69e3cc6fcacbd3aad6cc1e82453223eb64409f04e8daa698b10f8591cab4c89d 0 Wizard\MissionInfoTask.cs Wizard\MissionInfoTask.cs 68c13aa4f0b37a1e1f29c30ba2b2b3e9809be3a69b40fa7990c577521ebe082a 0 Wizard\MissionRetireTask.cs Wizard\MissionRetireTask.cs 4277fd692632db4c7d396bb9b2474e6a68ed738817e1d698c9cfc0fb7e4d6c06 0 Wizard\ModUnitRatePolicyCollection.cs Wizard\ModUnitRatePolicyCollection.cs 51ee8a8ca31e3fb5eef773271b95e463c8fe376f9b16e9f537aaf8ab1b03e4c7 0 @@ -2699,6 +2849,7 @@ Wizard\MultiDeckSelectDialog.cs Wizard\MultiDeckSelectDialog.cs 9a9b3b0532ab9ac8 Wizard\MyPage.cs Wizard\MyPage.cs 75afa5c09e9866a0f5a59ffd85f4cb7977975700b88d318238b675440cb7c1e2 0 Wizard\MyPageBGCustomDialog.cs Wizard\MyPageBGCustomDialog.cs 38a7ac3519303533e1d3df0c06e22fec9d12bb9c20bf2f5801bf0785f3a43d6a 0 Wizard\MyPageBGInfo.cs Wizard\MyPageBGInfo.cs 2a4a4b373afc76709bc4fe338c9cda07e9a9928403e14544aa866ba1b20cfd33 0 +Wizard\MyPageBGRandomSelectDialog.cs Wizard\MyPageBGRandomSelectDialog.cs 52f2e6fa028208c5b807fa57cb92800f569b4aad868dfe9fb27bce22f9b888fc 0 Wizard\MyPageCodeInputTask.cs Wizard\MyPageCodeInputTask.cs 08caac8e962f404c909fc35af58e4ce074af84fee4ceb00c537466f9ed0a24ca 0 Wizard\MyPageCustomBGControl.cs Wizard\MyPageCustomBGControl.cs 6dcda3459b2867c5cecfed12306c6546d704104d72050625c5445fe3dcc4f996 0 Wizard\MyPageCustomBGMasterData.cs Wizard\MyPageCustomBGMasterData.cs f804b67196ba049ab2bca36abbcb98246d603c7e9035901c75b40a3eda954326 0 @@ -2712,7 +2863,10 @@ Wizard\MyPageNotifications.cs Wizard\MyPageNotifications.cs 25336aac677f52bf5e9d Wizard\MyPageOtherButtons.cs Wizard\MyPageOtherButtons.cs 494a2042ca360483e7d4f42a5e9f32c1624e0f7e1a1fc2ff665d21f15d605618 0 Wizard\MyPageRefreshTask.cs Wizard\MyPageRefreshTask.cs f5e55531a94b6055f1dda47ef44c3f00de3c2bad9d86754e4604df0c8686c2d0 0 Wizard\MyPageRewardDialogBoxCount.cs Wizard\MyPageRewardDialogBoxCount.cs c7dc2f5080d1aff9a61c393316886f8985d9ba795433ddb8ee3bb61c3cd794a9 0 +Wizard\MyPageSettingUpdateTask.cs Wizard\MyPageSettingUpdateTask.cs a14c3d92d9c166bc065073edcb3c9eef4c63aa89fc0bc706bb4c0b5b8755872f 0 Wizard\MyPageSpecialWinRewardDialog.cs Wizard\MyPageSpecialWinRewardDialog.cs 71c3c9eea55e30d345a15e82b1bd271285b1401adb6b58c28dcbbfed62671bfa 0 +Wizard\MyRotationAbilityDetailDialog.cs Wizard\MyRotationAbilityDetailDialog.cs e4631c3e968aa8513320b7b483f74be935228c639f9a888a850e9357f5bb3898 0 +Wizard\MyRotationAbilityDetailDialogItem.cs Wizard\MyRotationAbilityDetailDialogItem.cs 6e140f24e4084617b9550add16bbf39521e2b394e3b92ba8a57d03ed7e62f13c 0 Wizard\MyRotationAbilityGroup.cs Wizard\MyRotationAbilityGroup.cs 221427bd0628660a209d850d6e01274d00ceadba7c5a951a3dd98e87d1c30653 0 Wizard\MyRotationAllInfo.cs Wizard\MyRotationAllInfo.cs 88ae58ae0352d620d94bfc461b28f50a3c6f9cc1cb015954748a32c8db3efde7 0 Wizard\MyRotationFormatBehavior.cs Wizard\MyRotationFormatBehavior.cs d99bf365ea3083a5f67df25071e655e6aedd2f11bd70f08c1242a558f3024e33 0 @@ -2798,12 +2952,18 @@ Wizard\PracticeDataMgr.cs Wizard\PracticeDataMgr.cs 8807b1c5f3579893c86becdab674 Wizard\PracticeDeckInfoTask.cs Wizard\PracticeDeckInfoTask.cs 38fa87c840d197ad9aa94bd147f129c4a3f5799b1187d51b39ed770971b6433c 0 Wizard\PracticeDeckSelectConfirmDialog.cs Wizard\PracticeDeckSelectConfirmDialog.cs 13f8bbdef277832992bdeb7600f8d0bfa2dee1e4d60e3585b182b72c35fa725c 0 Wizard\PracticeFinishTask.cs Wizard\PracticeFinishTask.cs d10192570f5b7a64781d5e092dc30b83c6959fea2af08b630521977ae9c6b197 0 +Wizard\PracticeInfoTask.cs Wizard\PracticeInfoTask.cs 9ae35a2d3365fe424242204dadc54f4238f4adffdfe630a16d81126cabeb91db 0 Wizard\PracticePuzzleBattleFinish.cs Wizard\PracticePuzzleBattleFinish.cs ed2e79308d9c0bf875285fae6dd3e7c0008d348f70b8b9b4515823bb30f7a046 0 Wizard\PracticePuzzleBattleStartTask.cs Wizard\PracticePuzzleBattleStartTask.cs bdcbb6d0b03d007e52ef3119fbee18375348aa9d3a1d45437d700978c63eaa35 0 Wizard\PracticePuzzleData.cs Wizard\PracticePuzzleData.cs dd1450b0ad2e2fe40e000e13a683e2a16e6a1e16e7713918dc609916c841e526 0 +Wizard\PracticePuzzleInfoTask.cs Wizard\PracticePuzzleInfoTask.cs c373278cddc19d7fb58a31f787ab0a8d62944ec3da434ee9ab597109a4e832ad 0 Wizard\PracticePuzzleListTask.cs Wizard\PracticePuzzleListTask.cs bef9de12e7f2e7d682dc8d5cfe6e53b47b2244c28672d69ad9c0fa34775b8797 0 Wizard\PracticePuzzleMissionData.cs Wizard\PracticePuzzleMissionData.cs 47003f300e5cf92034b000af42ec55b6d8797551ff78779f988cf4fb444b3969 0 +Wizard\PracticePuzzleMissionDialog.cs Wizard\PracticePuzzleMissionDialog.cs b6472a0aa64ff4caa64a1d4198e2f23d1cc76f3772d6814643660eaad3dbc116 0 +Wizard\PracticePuzzleMissionListTask.cs Wizard\PracticePuzzleMissionListTask.cs 3733a8ea34036488c322f4d3f625c67587be1a1b37e17ae8638cd2ec4e7d998c 0 +Wizard\PracticePuzzlePlate.cs Wizard\PracticePuzzlePlate.cs 8e6354d1ae67cf1e5e6b1556c105e182fe69ef764d71fc2eec3dc4d12afdbb95 0 Wizard\PracticePuzzleUI.cs Wizard\PracticePuzzleUI.cs aeadd06a59ad34917b6d49b08b7e588d6418b60c480854b398f83f1ab089a1bf 0 +Wizard\PracticeStartTask.cs Wizard\PracticeStartTask.cs b21e7c3a415255790de896ca890c7ed72dd47a325b77e6e5d1d6d7190a068e7e 0 Wizard\PreRotationFormatBehavior.cs Wizard\PreRotationFormatBehavior.cs da6d17ff9cab5d432f8c421d9a52ebb059ceae41c37920f366b2262e5a1e9592 0 Wizard\PremiumCardConversionDialogParts.cs Wizard\PremiumCardConversionDialogParts.cs ef813540d655bcf33bcdf994acfdae8185dc8dcf85976520da2f394c6125733a 0 Wizard\PremiumCardConversionTask.cs Wizard\PremiumCardConversionTask.cs bd38fcf046c19a6950f9dd0857065a55e01e6defd496a53413bc0aa2aa8d2142 0 @@ -2830,6 +2990,7 @@ Wizard\PuzzleQuestStatus.cs Wizard\PuzzleQuestStatus.cs 080f93e95b6fb21f06ca4e78 Wizard\PuzzleUtil.cs Wizard\PuzzleUtil.cs bafb6cdbfa6a9e1878ac22eecbe6c6fab77c4998dba4f4a7893813cfbb39e5a7 0 Wizard\PuzzleWinConditionDisplay.cs Wizard\PuzzleWinConditionDisplay.cs 7239697f83889fdb99f607e6ebdf7236178cf02a6c0f07b4d038e95b7f35a546 0 Wizard\QRCodeUtility.cs Wizard\QRCodeUtility.cs c8af515564303b95a73435f9cc6e227eab7869005b298fde2a9792aca85efbc4 0 +Wizard\QrCamera.cs Wizard\QrCamera.cs 9c0525dd8f9b1aadaf191037f88055d5c65b3724def453aa8e700845a8e20b53 0 Wizard\QuestAllConfirmDialog.cs Wizard\QuestAllConfirmDialog.cs 797160bab5654b592f9bd5e9390e42008336c0ba9e0aeea1aabdab7a0e435bed 0 Wizard\QuestBattleData.cs Wizard\QuestBattleData.cs 2c7b710d636f9f2112f6216b78f6516f17e573803db9277c03e2d04200b2e23a 0 Wizard\QuestBossData.cs Wizard\QuestBossData.cs 54bea11a04848ecbba06458cc3fb23ee38eb80ffe096871a490c3c3e10730f7a 0 @@ -2877,13 +3038,17 @@ Wizard\RedEtherCampaignPanel.cs Wizard\RedEtherCampaignPanel.cs 0e5e7c126acad45c Wizard\RedEtherCampaignResultData.cs Wizard\RedEtherCampaignResultData.cs 83dcda42b623e04deaad677b7a127eb8fc5a3b762d8969ed3d32e2bd4ec92a90 0 Wizard\RedEtherCampaignRewardData.cs Wizard\RedEtherCampaignRewardData.cs ee29767b469b128fd64232d415baf1a34b315478dd268f4fa59a9774b5789d3b 0 Wizard\ReferableVirtualCardBuildParameterCollection.cs Wizard\ReferableVirtualCardBuildParameterCollection.cs b04760995eddf63a9f8f7dcc1ca3064092bc880a67eb1ba7f808e77dfd7cf829 0 +Wizard\RefundWarningDialog.cs Wizard\RefundWarningDialog.cs 042a3919eb4fd59c607622b816a36703f76e81423feb9d886f1bf13435ca1ca3 0 +Wizard\RegionCodeUpdateTask.cs Wizard\RegionCodeUpdateTask.cs adb67c257ea42e034ce5f0b6e0c3d9595bc6bd0fe1326fbd9350e3c309dc1fcd 0 Wizard\ReincarnationSimulationTagCollection.cs Wizard\ReincarnationSimulationTagCollection.cs 863e9c6fd3b131c9564048419b2af5967689b9389fb803c8bc4b079185a578b0 0 Wizard\RemainTime.cs Wizard\RemainTime.cs cad4a6d7241987deccf91cab20b07146a393262888f556743b959d015c58c7cb 0 Wizard\RemoveByDestroyTagCollection.cs Wizard\RemoveByDestroyTagCollection.cs 6bb0f29c81a74b7bab7c062244773c4a7c366ea76836db7ca5abe860d097c38b 0 Wizard\RemoveSkillTagCollection.cs Wizard\RemoveSkillTagCollection.cs 4b31000c33a964929a361f964499aeddd2e884862600c4488c86d49e8a21120f 0 Wizard\ReplayContentView.cs Wizard\ReplayContentView.cs 60ca9b5671ddd42e7fc6845b9504d09b415ebae5bbb4e35a5c833bc1b4941a8d 0 +Wizard\ReplayDialog.cs Wizard\ReplayDialog.cs 9a367698f7e594b3a63f9b3422c61b6899ade748e1af06e4379f2b61dec52f80 0 Wizard\ReplayInfo.cs Wizard\ReplayInfo.cs c1a4ac59b3c2867dee7d40b8756492ddb6418bb5895a96e663eb0ec73b36bea4 0 Wizard\ReplayInfoItem.cs Wizard\ReplayInfoItem.cs f33d8625be78c3ff5edad57e4a9350f2721677352b1e637dde6f604c37db2471 0 +Wizard\ReplayInfoTask.cs Wizard\ReplayInfoTask.cs c3a2dd28d4b414bfb496d977c1caa207c9b8c12b3d2e601d001ca0868094d96c 0 Wizard\ReplaySkipAnimation.cs Wizard\ReplaySkipAnimation.cs 028d4fbc5d2ac366f5a90c86245482b36f37990c22eedd1f9b1109b5e673d346 0 Wizard\ResonanceTagCollection.cs Wizard\ResonanceTagCollection.cs 18e5ba29b08bf24bdf9b6f2078c6180099c9d468b1ab5c1fa05a0452199169ad 0 Wizard\RewardBase.cs Wizard\RewardBase.cs ea35849169b3987c450abbaece54578234821d644bf3289fc0307fd8ca14fe23 0 @@ -2902,6 +3067,7 @@ Wizard\RoomBattleFinishTaskHOF.cs Wizard\RoomBattleFinishTaskHOF.cs e023260976a1 Wizard\RoomBattleFinishTaskWindFall.cs Wizard\RoomBattleFinishTaskWindFall.cs 76b15e866a28db1664f4116da0ddb459071e11146b99f89b292bae34b2a7618d 0 Wizard\RoomNonPossessionCardCampaign.cs Wizard\RoomNonPossessionCardCampaign.cs c2a0ac27c8f58890764c6733cac8d4c73ecb67b27ebf4a4d18db2022980b0de4 0 Wizard\RoomRuleInfo.cs Wizard\RoomRuleInfo.cs 6ba79e521eaeba627b6ef48ac714180b870049479ed8690533f780c27c07cfcf 0 +Wizard\RoomTwoPickApiVariation.cs Wizard\RoomTwoPickApiVariation.cs 5799f31e14cab116c99dbb6e694270075d0a4345fd03a21c84596e93d79991c7 0 Wizard\RoomTwoPickMultiDeckInfo.cs Wizard\RoomTwoPickMultiDeckInfo.cs 162e9f436a85bbde551fe7b19f140aa0e2535c62a92a1736ba4aa5b7e6d502a5 0 Wizard\RotationFormatBehavior.cs Wizard\RotationFormatBehavior.cs b844d354970ff3f6967aca80a4dcb835831592dcecf7ea309081d373f5310eb9 0 Wizard\RubyText.cs Wizard\RubyText.cs 603c0127a9a30f36afd18e894bd0f14eb47c07dcbf2dc70795aee7febc873466 0 @@ -2920,14 +3086,23 @@ Wizard\SealedClassSelectObjectInitParam.cs Wizard\SealedClassSelectObjectInitPar Wizard\SealedController.cs Wizard\SealedController.cs 36eecb63551f28a57b21ba01b38cf385d241af0d89c9ea4d6bd2cde359cdfc8d 0 Wizard\SealedData.cs Wizard\SealedData.cs 64eef0afbb678d29b18696e41cf2ea13b2950eb9392154f9123ac1d6a554ec70 0 Wizard\SealedEntryData.cs Wizard\SealedEntryData.cs c8bbd9d82b200f0d2ce15fbc40fb52f4a369ebbdcab415fee9a2f33b4334dfc5 0 +Wizard\SealedFinishTask.cs Wizard\SealedFinishTask.cs 7fa003f442f64df3c89f2185af01e4fa7b58fbc72958b62cefd2e3f9f5b2913e 0 Wizard\SealedFormatBehavior.cs Wizard\SealedFormatBehavior.cs 22997985fd859e05aac4f25a208fdfcfda552e144ad99477c1217ec042d1c62c 0 +Wizard\SealedGetMaintCardListTask.cs Wizard\SealedGetMaintCardListTask.cs ccdd5a30df122c458c1cdcc8279bcacb6a578caee2f9facb3265f10da8abdfdd 0 Wizard\SealedLobby.cs Wizard\SealedLobby.cs 79a79c33dfb0c600d1b06b52a91a643de97d0db5491963c34fb89d04b093d41f 0 Wizard\SealedMyPageResponseData.cs Wizard\SealedMyPageResponseData.cs e4532941557173ee81bd1262fd7883720e7170ec80d739943d719c11c9ec0ff5 0 +Wizard\SealedRetireTask.cs Wizard\SealedRetireTask.cs cf6d405f2fb1313ac510338ae3c707153f8f11d5de310bbcd0f642ce57d6820c 0 +Wizard\SealedSelectClassTask.cs Wizard\SealedSelectClassTask.cs 1c2094251d6fe9c41355add5bc6dc874c3ddcab729049fa2180f4e0682db147c 0 +Wizard\SealedSelectPhantomCardTask.cs Wizard\SealedSelectPhantomCardTask.cs 956f88ad7a58fe5e32fc06d41feaa49a1d7b4a115bf73fd30e42d25be191d041 0 Wizard\SealedStepFuncs.cs Wizard\SealedStepFuncs.cs 681c73c79ee719bccbbe71160299bfdafa2ba531d8b73f6bf2efb1a37d2a87d3 0 +Wizard\SealedTopTask.cs Wizard\SealedTopTask.cs 89b8266bb15da762899461ad77502b6da0783adcdd85ff8bc4f3415e7a977993 0 +Wizard\SealedUpdateDeckTask.cs Wizard\SealedUpdateDeckTask.cs 0a0d61bf2bdb7a42e42a14eb9011819386b067b02c8bc5fb3d1f335e9a2ad36e 0 Wizard\SecretBossDeckConfirmDialog.cs Wizard\SecretBossDeckConfirmDialog.cs 278f242c93552a8308d4f2e7d3c87fa7fbaa35d4e99e7a079462cbc6a8791fec 0 Wizard\SecretBossInfo.cs Wizard\SecretBossInfo.cs 5ee84152be88797d9d5147965973aad8011e7ad23e07bf2c2a4df512012f99b9 0 Wizard\SelectBuyNumPopupBase.cs Wizard\SelectBuyNumPopupBase.cs ecea78a81f059d7e3d7bf18e05ef61bfa39a85e0b72b0f53991e8edbf498c90e 0 Wizard\SelectCardPurchaseConfirmDialog.cs Wizard\SelectCardPurchaseConfirmDialog.cs d903d5c304091a75730d89c2762f51c1c1f9bc8d4b6de53405e6a037a08c7e40 0 +Wizard\SelectRandomSkinButton.cs Wizard\SelectRandomSkinButton.cs 2a24f318941b32bd94e126c86a6f4821552be30fb57e177d369be5f845e70c86 0 +Wizard\SelectRandomSkinDialog.cs Wizard\SelectRandomSkinDialog.cs 8b623a5b03901b780465b88bd660fd5c5bcd46c5f6d5cf0ab7629e88390f035c 0 Wizard\SelectSkinCardDialog.cs Wizard\SelectSkinCardDialog.cs b4843278a392d9b14c898f0918ebdd7d5ad3e76eec457071d2c91739d611cdfb 0 Wizard\SelectSkinCardInfo.cs Wizard\SelectSkinCardInfo.cs 6011046eb19f8a1d354683c144f769a09f56ff42f43a4d4245aeb1beaac72fa2 0 Wizard\SelectSkinCardPlate.cs Wizard\SelectSkinCardPlate.cs b2f7078b56691bb3b8f2829af9d48e52c4ecd077fef2f705a63d27412749a125 0 @@ -2956,8 +3131,10 @@ Wizard\SleeveBuyTask.cs Wizard\SleeveBuyTask.cs 0d00a58104bd404cfb18e3a8354186f9 Wizard\SleeveCategory.cs Wizard\SleeveCategory.cs d636241391f0421028aec23fa83b44af32beb01a3af5bc14469fe076b8016a38 0 Wizard\SleeveMgr.cs Wizard\SleeveMgr.cs 65624ba278a3238a02189445cf03fdf423d1e8985338d938a389c002e5bbf497 0 Wizard\SleeveSeries.cs Wizard\SleeveSeries.cs 9a3658f9b77625a36c9ce51c8797c3fec4f8a9d48b541e828a372b71490b45ba 0 +Wizard\SmallResourceSelectDialog.cs Wizard\SmallResourceSelectDialog.cs bc259a0a322e2a85f27efc8e8e0639b84eb72d0cf1937426d0a2101ce82bb6d0 0 Wizard\SoftwareReset.cs Wizard\SoftwareReset.cs 34b932e97699b44f002a33ef3d500a42d2c91473bc726c7a5e1baed65a44d2af 0 Wizard\SoloBattleEnemyAI.cs Wizard\SoloBattleEnemyAI.cs c6816cba54b636abfb717276a9dc7b11a020e032552e8d81e724d377e87459f9 0 +Wizard\SpecialCrystalTaskInfo.cs Wizard\SpecialCrystalTaskInfo.cs c6bd836740e10fb7c1747712caa4751c052f753c9b35dfe6362d7d36f1c2cec8 0 Wizard\SpecialTitleAssetBundle.cs Wizard\SpecialTitleAssetBundle.cs e66f46da8066697b5f1ad0ae64808ca6bbbdbd93d0a17cabd5bebebe7c635c13 0 Wizard\SpecialTreasureInfo.cs Wizard\SpecialTreasureInfo.cs 7a11bde523e27e58b1ed032703c755e76da0a85e0b1919f7cdff673f440731d1 0 Wizard\SpeedChallengeInfo.cs Wizard\SpeedChallengeInfo.cs 9fd6697d1c55746b451fa07809d610d6ba1251ad6b723ece688a3b04fc996876 0 @@ -2967,11 +3144,13 @@ Wizard\SpotCardExchange.cs Wizard\SpotCardExchange.cs 40ab6e8cfa601cac24d61ee262 Wizard\SpotCardExchangeDialog.cs Wizard\SpotCardExchangeDialog.cs bb9eb3bed731bb46701d97f1951f7a10bfe8af3ce51cf88a87b1728b285bcc51 0 Wizard\SpotCardExchangeInfo.cs Wizard\SpotCardExchangeInfo.cs f8441842f1c264887158a5e5fa5305830a11308af593bd4049893b9a9f54d17a 0 Wizard\SpotCardExchangePlate.cs Wizard\SpotCardExchangePlate.cs 943fac1cde750532368f107b98903c6eeb5b6dfed972d2ac3b35692ee2111c1b 0 +Wizard\SpringPanelWithUpdate.cs Wizard\SpringPanelWithUpdate.cs c3d8b5959e4e102c40ae912beff6a25396811c1ae8453684ec48458a365fa509 0 Wizard\StarterClassSelectDialog.cs Wizard\StarterClassSelectDialog.cs 3522461bbc4d0f73d1beb639b37213f68a9691ea3a344df56e34ff7ba75b2e4b 0 Wizard\StarterPurchaseConfirmationDialog.cs Wizard\StarterPurchaseConfirmationDialog.cs b71ac292410e536bbdf302395b6b8584d500a40746167ad1ab885229cbfe2ecc 0 Wizard\StoryAISettingData.cs Wizard\StoryAISettingData.cs 14402dc36fa4ae13f154c8110141087145efb387c94292f7a5102dd3b671151d 0 Wizard\StoryAISettingDataSet.cs Wizard\StoryAISettingDataSet.cs 76693a53b4022593dd67cd8d08b41c2ab7647d8b3663176b13909ca0e6c11900 0 Wizard\StoryFinishTask.cs Wizard\StoryFinishTask.cs dbf0508b3638ac87b55872f060f672960b38de3c2cabcf6d8bdd3499047d4643 0 +Wizard\StoryLeaderSelectTask.cs Wizard\StoryLeaderSelectTask.cs d2b54bde8e3ef4f32c07e68b05f30e09991ebc9b59578110603d29374130be44 0 Wizard\StoryNotification.cs Wizard\StoryNotification.cs 2031e97ce2caa711e695a8ca6b372e9c43c4957e890d274a857887d387eb2808 0 Wizard\StorySectionBtn.cs Wizard\StorySectionBtn.cs 4c5017f7a46c2aadf025f170455524a7fbcdaf230357f103411171a21d2e67b9 0 Wizard\StorySectionSummaryDialog.cs Wizard\StorySectionSummaryDialog.cs 2592e979478669a865bccc1f2dcfd8943d38248f4f93e842c58cac1fc2125455 0 @@ -2994,6 +3173,14 @@ Wizard\TargetTagCollection.cs Wizard\TargetTagCollection.cs 1bd2fb66e58c9fae3d23 Wizard\TextLineCreater.cs Wizard\TextLineCreater.cs fdb7f0a918c2f5b92268954b3980724f29cb16a8098ea67c2d99633ae5bd1e92 0 Wizard\TokenPlayPattern.cs Wizard\TokenPlayPattern.cs c14d846afb81b876291013c077cbd503bebd27b651b5b78708e93d68758e2e7b 0 Wizard\ToolboxGame.cs Wizard\ToolboxGame.cs f0a39a9ec7a06d08cc2594cc93f010c602946492ed93c002775c41000f30ef75 0 +Wizard\TournamentCell.cs Wizard\TournamentCell.cs b07b968c6768b74b9345ab3aa1ae138950de022b08f92a16966b3daef81d379c 0 +Wizard\TournamentCellData.cs Wizard\TournamentCellData.cs ecc457bdf2dbaa7db9de893f69a07ac43e589ca140dad29866d658af386e605e 0 +Wizard\TournamentController.cs Wizard\TournamentController.cs 236122aa73487c600114c9b0010ab9e9c85a5745a267550088c8f790532647c9 0 +Wizard\TournamentData.cs Wizard\TournamentData.cs d81085f707aa7234732233bd2369575bb633ec742547072ab04f17c75d175e9d 0 +Wizard\TournamentRound.cs Wizard\TournamentRound.cs 03ad29b66c57329d01b4c5bcd55194698731ac49f382e4d7e2d354c269980205 0 +Wizard\TournamentRoundData.cs Wizard\TournamentRoundData.cs 45cc3860a5a515350ba0cd72b7557def64b0a2cfc4a236723246a6446a4e9bb3 0 +Wizard\TournamentWatch.cs Wizard\TournamentWatch.cs 662f35e0246af5d27ef00d73d44eecedff64e41cdcdeea8aff28765c1542fff4 0 +Wizard\TournamentWatchData.cs Wizard\TournamentWatchData.cs cd6aeff1787c5aca48fdba0f29001994fe4efc21a609d3cefb24f19f18c634cb 0 Wizard\TransformBackup.cs Wizard\TransformBackup.cs 590cfc9e5b00c6896b9bff2e1086827dd53d821b99cc83a76bc76f94ea053135 0 Wizard\TransitionDeleteTask.cs Wizard\TransitionDeleteTask.cs 8add5ad5b354244a204f363738e421430bf935f915e08b8d3c05a259902ccb98 0 Wizard\TransitionDialog.cs Wizard\TransitionDialog.cs 902558332dfac4b76963ac9021eb5c723ebb15dd15d3f4fd1c6fbbef30b2e37e 0 @@ -3008,6 +3195,7 @@ Wizard\TurnEndTagCollection.cs Wizard\TurnEndTagCollection.cs 176accc9ed7bbafa5b Wizard\TurnStartTagCollection.cs Wizard\TurnStartTagCollection.cs a6190321dd648393cb52de200be2bdd7dadeca06f602fd13c9803fd3d84e2849 0 Wizard\TutorialAreaSelect.cs Wizard\TutorialAreaSelect.cs fd8c11bbe4a98a5407fc1bdae75f3fae5fab2a996cde2a54a7fcbd5a73115352 0 Wizard\TutorialData.cs Wizard\TutorialData.cs 2fc9577f9c08b7803e3673d18eee530d3a61d95d0d8b8d5c166e97ab4dc557ed 0 +Wizard\TutorialUpdateTask.cs Wizard\TutorialUpdateTask.cs a7becdb53f2645cc7e6a49197310d3999d75c601f9babb3d005bdcd725fcd369 0 Wizard\TweenAnimation.cs Wizard\TweenAnimation.cs fcd6dd622114eb97f11737e4db6a7af924eb209a8a6a44ad4aade9d8a1e1ee4d 0 Wizard\TweenAnimationGroup.cs Wizard\TweenAnimationGroup.cs 5b6eeb31bb7d1cb9cdaae48da61d0b07ba6b5a72145c5b3e1e7a84a54f599c5e 0 Wizard\TwoPickFormat.cs Wizard\TwoPickFormat.cs 7f09731756f955d49fd610f3383ad697786e37c4d09d78bf577b03767bd40177 0 @@ -3015,6 +3203,7 @@ Wizard\TypeFilterDialog.cs Wizard\TypeFilterDialog.cs 4c764fe4b79a18bc267d077557 Wizard\TypeFilterSingle.cs Wizard\TypeFilterSingle.cs d59034d2a145657e5d06d6db841d13f3ea71a00ddb586f5e8994d8e14ad9de2b 0 Wizard\UIAtlasManager.cs Wizard\UIAtlasManager.cs 5c75b17b39bb1e5e6c14eed56ebbf00a21bc88427227a971897b7d41eae9a173 0 Wizard\UIDestroyUtility.cs Wizard\UIDestroyUtility.cs ba51f00bdab3124c314a2d7e2e1384f756e9519f4531f04952d2748ce7993eb6 0 +Wizard\UIDragMultiScrollView.cs Wizard\UIDragMultiScrollView.cs 8d500ede637b369c9d2f9bb07050f888f3300658d132cf76d1b91fd2f42971f6 0 Wizard\UIGauge.cs Wizard\UIGauge.cs 0118ff5fbb35e3386abbda434cac738fc420ecbac5dcba1e532483f4ac9b0d40 0 Wizard\UILabelEffectOverwriter.cs Wizard\UILabelEffectOverwriter.cs d91ad280e420b0b04a1e1fda0b58c993d0523b2dce9f58e40bf2fd98aaf9943b 0 Wizard\UILabelGradientOverwriter.cs Wizard\UILabelGradientOverwriter.cs 61d81c1710dbdcfdd5f2ecc07bfaf1aea701f80c45b46c4556705782c43a4eec 0 @@ -3030,6 +3219,10 @@ Wizard\UnlimitedFormatBehavior.cs Wizard\UnlimitedFormatBehavior.cs a9c6cda132c8 Wizard\UnlimitedRestrictedCard.cs Wizard\UnlimitedRestrictedCard.cs 295618ea53573f498923f63bfabd0b3543552761811830b83e2a18980edfc311 0 Wizard\UserGoods.cs Wizard\UserGoods.cs c21dd8bc5521e705da0994f68771149a54d461f49d00fbd54f9d8673bb047eb3 0 Wizard\UserInfoBase.cs Wizard\UserInfoBase.cs ad812a1d63e876c52e813a7a70bb468fd85a8814f1adeff8686f49763d4d3b2e 0 +Wizard\UserListView.cs Wizard\UserListView.cs 5e9cd533c035cbd561f1280429f26a49b7c670daa48346abbe6bbc3e0be5cc7f 0 +Wizard\UserListViewPlate.cs Wizard\UserListViewPlate.cs 8c1341eb0afebf6eac1c4ae041f955137d7f98270a80d4fee37a11f008a35bb2 0 +Wizard\UserPlateBase.cs Wizard\UserPlateBase.cs 4f6b7ab48d259876b5305882ff41034405c93696729bf24bb85125ce9922cca1 0 +Wizard\UserRegionUpdater.cs Wizard\UserRegionUpdater.cs b8c19dcd9a93ecf7f23efae777e654d497fcaf3954be322515cdab4a01bc8c2b 0 Wizard\UtilityDrumrollItemCustomize.cs Wizard\UtilityDrumrollItemCustomize.cs 4d708a6f05b32993026e2a719bd67a44446e41de59baa8f62878604f2653dda9 0 Wizard\VoteDataTask.cs Wizard\VoteDataTask.cs 970031c62f0a7056fae5f88a0033f4bdd6c92cf10b46a228608f19cbf50f8882 0 Wizard\VoteTask.cs Wizard\VoteTask.cs 6997ab7504f80977a4fe1db297832eb7a6b5cc9399a3cf6354e12c0d4be177bc 0 diff --git a/SVSim.BattleEngine/Engine/AreaBGInfoSection20.cs b/SVSim.BattleEngine/Engine/AreaBGInfoSection20.cs new file mode 100644 index 0000000..137abd2 --- /dev/null +++ b/SVSim.BattleEngine/Engine/AreaBGInfoSection20.cs @@ -0,0 +1,127 @@ +using System.Collections.Generic; +using Cute; + +public class AreaBGInfoSection20 +{ + public const int SECTION_ID = 20; + + public const int WERUSA_START = 10; + + private const int WERUSA_END = 17; + + private const int WERUSA_BG_SECTION_ID = 12; + + private const int LEVIRU_START = 18; + + private const int LEVIRU_END = 25; + + private const int LEVIRU_BG_SECTION_ID = 10; + + private const int IZUNIA_CHANGE_TEXTURE_START = 3; + + private const int IZUNIA_END = 9; + + private const int IZUNIA_BG_SECTION_ID = 2; + + public const int NATERA_START = 26; + + private const int NATERA_END = 33; + + private const int NATERA_BG_SECTION_ID = 9; + + private const int LAST_BATTLE_START = 34; + + private const int LAST_BATTLE_END = 40; + + private const int LAST_BATTLE_BG_SECTION_ID = 20; + + public static List GetChapterExtraDatas() + { + List list = new List(); + list.AddRange(Chapter1_2()); + list.AddRange(Chapter3_9()); + list.AddRange(OtherWorldChapters(10, 17, 12, new List { 1, 2, 6, 7 }, addTreeEffect: true)); + list.AddRange(OtherWorldChapters(18, 25, 10, new List { 1, 2 }, addTreeEffect: true)); + list.AddRange(OtherWorldChapters(26, 33, 9, new List { 2, 3, 4, 7, 8, 9 }, addTreeEffect: true)); + list.AddRange(OtherWorldChapters(34, 40, 20, null, addTreeEffect: false)); + return list; + } + + private static List OtherWorldChapters(int start, int end, int section, List extraTextureIndex, bool addTreeEffect) + { + List list = new List(); + for (int i = start; i <= end; i++) + { + ChapterExtraData chapterExtraData = new ChapterExtraData + { + SectionId = 20, + ExtraTextureChapter = i, + BGSectionId = section + }; + chapterExtraData.AddTreeEffect = addTreeEffect; + if (i == 17 || i == 25 || i == 33) + { + chapterExtraData.BGExtraEffectPath = "scn_map_change_9"; + chapterExtraData.SeType = Se.TYPE.SE_MAP_SECTION9_CHANGE_CHAPTER; + } + if (extraTextureIndex.IsNotNullOrEmpty()) + { + chapterExtraData.ExtraTextureIndex = extraTextureIndex; + chapterExtraData.BGSuffix = "b"; + } + list.Add(chapterExtraData); + } + return list; + } + + private static List Chapter1_2() + { + return new List + { + new ChapterExtraData + { + SectionId = 20, + ExtraTextureChapter = 1, + BGExtraEffectPath = "scn_map_change_9", + SeType = Se.TYPE.SE_MAP_SECTION20_CHANGE_CHAPTER1 + }, + new ChapterExtraData + { + SectionId = 20, + ExtraTextureChapter = 2, + BGExtraEffectPath = "scn_map_change_8", + AttachExtraEffectToBgRoot = true, + SeType = Se.TYPE.SE_MAP_TREE_EFFECT + } + }; + } + + private static List Chapter3_9() + { + List list = new List(); + for (int i = 3; i <= 9; i++) + { + ChapterExtraData chapterExtraData = new ChapterExtraData + { + SectionId = 20, + ExtraTextureChapter = i, + ExtraTextureIndex = { 1, 2, 6 }, + BGSectionId = 2, + BGSuffix = "b" + }; + if (i == 9) + { + chapterExtraData.BGExtraEffectPath = "scn_map_change_9"; + chapterExtraData.SeType = Se.TYPE.SE_MAP_SECTION9_CHANGE_CHAPTER; + } + list.Add(chapterExtraData); + } + return list; + } + + public static bool IsSpeedUpParticleTransition(int previousChapter, int nextChapter) + { + bool flag = previousChapter == 33 && nextChapter == 32; + return previousChapter == 0 || flag; + } +} diff --git a/SVSim.BattleEngine/Engine/AreaSelectUtility.cs b/SVSim.BattleEngine/Engine/AreaSelectUtility.cs new file mode 100644 index 0000000..9c04282 --- /dev/null +++ b/SVSim.BattleEngine/Engine/AreaSelectUtility.cs @@ -0,0 +1,39 @@ +using UnityEngine; + +public class AreaSelectUtility +{ + public const string BTN_IMAGE_NAME_SUFFIX_OFF = "{0}_off"; + + public const string BTN_IMAGE_NAME_SUFFIX_ON = "{0}_on"; + + public static readonly string ChapterSelectBtnPathPrefix = "btn_story_select"; + + public static readonly Color32 CLEAR_LABEL_COLOR_CLEARD_GRADIENT_TOP = new Color32(byte.MaxValue, 245, 161, byte.MaxValue); + + public static readonly Color32 CLEAR_LABEL_COLOR_CLEARD_GRADIENT_BUTTOM = new Color32(byte.MaxValue, 209, 71, byte.MaxValue); + + public static readonly Color32 CLEAR_LABEL_COLOR_CLEARD_EFFECT_OUTLINE8 = new Color32(94, 67, 31, byte.MaxValue); + + public static readonly Color32 CLEAR_LABEL_COLOR_ALREADY_READ_GRADIENT_TOP = new Color32(245, 249, byte.MaxValue, byte.MaxValue); + + public static readonly Color32 CLEAR_LABEL_COLOR_ALREADY_READ_GRADIENT_BUTTOM = new Color32(190, 218, 242, byte.MaxValue); + + public static readonly Color32 CLEAR_LABEL_COLOR_ALREADY_READ_EFFECT_OUTLINE8 = new Color32(60, 73, 96, byte.MaxValue); + + public static void SetClearLabelColor(UILabel clearLabel, StoryChapterData.ChapterClearStatus clearState) + { + switch (clearState) + { + case StoryChapterData.ChapterClearStatus.Cleared: + clearLabel.gradientTop = CLEAR_LABEL_COLOR_CLEARD_GRADIENT_TOP; + clearLabel.gradientBottom = CLEAR_LABEL_COLOR_CLEARD_GRADIENT_BUTTOM; + clearLabel.effectColor = CLEAR_LABEL_COLOR_CLEARD_EFFECT_OUTLINE8; + break; + case StoryChapterData.ChapterClearStatus.AlreadyRead: + clearLabel.gradientTop = CLEAR_LABEL_COLOR_ALREADY_READ_GRADIENT_TOP; + clearLabel.gradientBottom = CLEAR_LABEL_COLOR_ALREADY_READ_GRADIENT_BUTTOM; + clearLabel.effectColor = CLEAR_LABEL_COLOR_ALREADY_READ_EFFECT_OUTLINE8; + break; + } + } +} diff --git a/SVSim.BattleEngine/Engine/ArenaEntryDialogBase.cs b/SVSim.BattleEngine/Engine/ArenaEntryDialogBase.cs new file mode 100644 index 0000000..0c4010f --- /dev/null +++ b/SVSim.BattleEngine/Engine/ArenaEntryDialogBase.cs @@ -0,0 +1,175 @@ +using UnityEngine; +using Wizard; + +public abstract class ArenaEntryDialogBase : MonoBehaviour +{ + protected Se.TYPE _entryButtonSe = Se.TYPE.SYS_BTN_DECIDE_TRANS; + + private const int CHECK_DIALOG_DEPTH = 10; + + private ArenaEntryDataBase _entryData; + + private ArenaEntryDialogData _dialogData; + + protected ArenaData.eARENA_PAY _payType; + + public bool IsCompetition; + + protected string _mainTextId; + + protected string _ticketSpriteName; + + protected string _arenaNameTextId; + + public DialogBase ParentDialog { get; set; } + + protected abstract void Init(); + + protected abstract int GetTicketNum(); + + protected abstract ArenaEntryDataBase GetEntryData(); + + private void Start() + { + Init(); + _entryData = GetEntryData(); + _dialogData = GetComponent(); + SystemText systemText = Data.SystemText; + if (_dialogData._mainText != null) + { + _dialogData._mainText.text = systemText.Get(_mainTextId); + } + if (_dialogData._ticketHaveTitle != null) + { + _dialogData._ticketHaveTitle.text = systemText.Get("Arena_0037"); + _dialogData._ticketHaveNum.text = GetTicketNum().ToString(); + _dialogData._ticketHaveUnit.text = systemText.Get("Common_0117"); + _dialogData._ticketButtonTitle.text = systemText.Get("Arena_0004"); + _dialogData._ticketButtonSubTitle.text = systemText.Get("Arena_0038"); + _dialogData._ticketButtonUseNum.text = _entryData.ticketCost.ToString(); + _dialogData._ticketSprite.spriteName = _ticketSpriteName; + _dialogData._ticketButton.onClick.Add(new EventDelegate(delegate + { + if (ParentDialog.GetNowScene() == DialogBase.DialogScene.WAIT) + { + OnClickTicketEntryButton(); + } + })); + } + if (_dialogData._rupyHaveTitle != null) + { + _dialogData._rupyHaveTitle.text = systemText.Get("Shop_0065"); + _dialogData._rupyHaveNum.text = PlayerStaticData.UserRupyCount.ToString(); + _dialogData._rupyHaveUnit.text = systemText.Get("Common_0120"); + _dialogData._rupyButtonTitle.text = (IsCompetition ? systemText.Get("Competition_0067") : systemText.Get("Arena_0036")); + _dialogData._rupyButtonSubTitle.text = systemText.Get("Shop_0062"); + _dialogData._rupyButtonUseNum.text = _entryData.rupyCost.ToString(); + _dialogData._rupyButton.onClick.Add(new EventDelegate(delegate + { + if (ParentDialog.GetNowScene() == DialogBase.DialogScene.WAIT) + { + OnClickRupyEntryButton(); + } + })); + } + _dialogData._crystalHaveTitle.text = systemText.Get("Shop_0064"); + _dialogData._crystalHaveNum.text = PlayerStaticData.UserCrystalCount.ToString(); + _dialogData._crystalHaveUnit.text = systemText.Get("Common_0116"); + _dialogData._crystalButtonTitle.text = (IsCompetition ? systemText.Get("Competition_0046") : systemText.Get("Arena_0023")); + _dialogData._crystalButtonSubTitle.text = systemText.Get("Shop_0061"); + _dialogData._crystalButtonUseNum.text = _entryData.crystalCost.ToString(); + if (_entryData.ticketCost > GetTicketNum()) + { + SetButtonDisable(_dialogData._ticketButton, _dialogData._ticketButtonTitle); + } + if (_entryData.rupyCost > PlayerStaticData.UserRupyCount) + { + SetButtonDisable(_dialogData._rupyButton, _dialogData._rupyButtonTitle); + } + _dialogData._crystalButton.onClick.Add(new EventDelegate(delegate + { + if (ParentDialog.GetNowScene() == DialogBase.DialogScene.WAIT) + { + OnClickCrystalEntryButton(); + } + })); + } + + private void SetButtonDisable(UIButton in_Button, UILabel in_Label) + { + in_Button.GetComponent().isEnabled = false; + in_Label.color = LabelDefine.TEXT_COLOR_BUTTON_DISABLE; + in_Button.GetComponent().duration = 0f; + } + + private void OnClickTicketEntryButton() + { + int ticketNum = GetTicketNum(); + SystemText systemText = Data.SystemText; + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_BTN_DECIDE); + DialogBase dialogBase = UIManager.GetInstance().CreateDialogClose(); + dialogBase.SetTitleLabel(systemText.Get("Arena_0005")); + dialogBase.SetPanelDepth(10); + ArenaBuyDialog component = Object.Instantiate(_dialogData.BuyDialogObject).GetComponent(); + dialogBase.SetObj(component.gameObject); + component.SetTicketConfirmDialog(_entryData.ticketCost, ticketNum, _arenaNameTextId, _ticketSpriteName); + dialogBase.onPushButton1 = Entry; + dialogBase.SetButtonLayout(DialogBase.ButtonLayout.BlueBtn_CancelBtn); + dialogBase.SetButtonText(systemText.Get("Dia_Arena_003_Button")); + dialogBase.ClickSe_Btn1 = _entryButtonSe; + _payType = ArenaData.eARENA_PAY.Ticket; + } + + private void OnClickCrystalEntryButton() + { + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_BTN_DECIDE); + if (PlayerStaticData.IsLootBoxRegulation(_entryData.LootBoxType)) + { + LootBoxDialogUtility.CreateLootBoxRegulationDialog(_entryData.LootBoxType); + return; + } + if (_entryData.crystalCost > PlayerStaticData.UserCrystalCount) + { + ShopCommonUtility.CreateCrystalShortagePopup(); + return; + } + int userCrystalCount = PlayerStaticData.UserCrystalCount; + SystemText systemText = Data.SystemText; + DialogBase dialogBase = UIManager.GetInstance().CreateDialogClose(); + dialogBase.SetTitleLabel(systemText.Get("Arena_0005")); + dialogBase.SetPanelDepth(10); + ArenaBuyDialog component = Object.Instantiate(_dialogData.BuyDialogObject).GetComponent(); + dialogBase.SetObj(component.gameObject); + component.SetClystalConfirmDialog(_entryData.crystalCost, userCrystalCount, _arenaNameTextId, _entryData.ExpirtyInfo); + dialogBase.SetButtonLayout(DialogBase.ButtonLayout.BlueBtn_CancelBtn); + string text_btn = (IsCompetition ? systemText.Get("Competition_0036") : systemText.Get("Dia_Arena_004_Button")); + dialogBase.SetButtonText(text_btn); + dialogBase.ClickSe_Btn1 = _entryButtonSe; + dialogBase.onPushButton1 = Entry; + _payType = ArenaData.eARENA_PAY.Crystal; + } + + private void OnClickRupyEntryButton() + { + int userRupyCount = PlayerStaticData.UserRupyCount; + SystemText systemText = Data.SystemText; + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_BTN_DECIDE); + DialogBase dialogBase = UIManager.GetInstance().CreateDialogClose(); + dialogBase.SetTitleLabel(systemText.Get("Arena_0005")); + dialogBase.SetPanelDepth(10); + ArenaBuyDialog component = Object.Instantiate(_dialogData.BuyDialogObject).GetComponent(); + dialogBase.SetObj(component.gameObject); + component.SetRupyConfirmDialog(_entryData.rupyCost, userRupyCount, _arenaNameTextId); + dialogBase.onPushButton1 = Entry; + dialogBase.SetButtonLayout(DialogBase.ButtonLayout.BlueBtn_CancelBtn); + string text_btn = (IsCompetition ? systemText.Get("Competition_0036") : systemText.Get("Dia_Arena_005_Button")); + dialogBase.SetButtonText(text_btn); + dialogBase.ClickSe_Btn1 = _entryButtonSe; + _payType = ArenaData.eARENA_PAY.Rupy; + } + + protected virtual void Entry() + { + ParentDialog.CloseWithoutSelect(); + } +} diff --git a/SVSim.BattleEngine/Engine/ArenaEntryDialogData.cs b/SVSim.BattleEngine/Engine/ArenaEntryDialogData.cs new file mode 100644 index 0000000..6c63093 --- /dev/null +++ b/SVSim.BattleEngine/Engine/ArenaEntryDialogData.cs @@ -0,0 +1,52 @@ +using UnityEngine; + +public class ArenaEntryDialogData : MonoBehaviour +{ + public GameObject BuyDialogObject; + + public UILabel _mainText; + + public UISprite _ticketSprite; + + public UIButton _ticketButton; + + public UIButton _rupyButton; + + public UIButton _crystalButton; + + public UILabel _ticketHaveTitle; + + public UILabel _ticketHaveNum; + + public UILabel _ticketHaveUnit; + + public UILabel _ticketButtonTitle; + + public UILabel _ticketButtonSubTitle; + + public UILabel _ticketButtonUseNum; + + public UILabel _rupyHaveTitle; + + public UILabel _rupyHaveNum; + + public UILabel _rupyHaveUnit; + + public UILabel _rupyButtonTitle; + + public UILabel _rupyButtonSubTitle; + + public UILabel _rupyButtonUseNum; + + public UILabel _crystalHaveTitle; + + public UILabel _crystalHaveNum; + + public UILabel _crystalHaveUnit; + + public UILabel _crystalButtonTitle; + + public UILabel _crystalButtonSubTitle; + + public UILabel _crystalButtonUseNum; +} diff --git a/SVSim.BattleEngine/Engine/BattleCardBaseExtensions.cs b/SVSim.BattleEngine/Engine/BattleCardBaseExtensions.cs new file mode 100644 index 0000000..5ccb186 --- /dev/null +++ b/SVSim.BattleEngine/Engine/BattleCardBaseExtensions.cs @@ -0,0 +1,29 @@ +using System.Collections.Generic; +using System.Linq; +using Wizard.Battle; +using Wizard.Battle.View; + +public static class BattleCardBaseExtensions +{ + public static List ConvertToViewList(this IList battleCardBaseList) + { + return battleCardBaseList?.Select((BattleCardBase c) => c.BattleCardView).ToList(); + } + + public static BattleCardBase FindFromCardId(this IList battleCardBaseList, IBattleCardUniqueID cardId) + { + if (battleCardBaseList == null) + { + return null; + } + for (int i = 0; i < battleCardBaseList.Count; i++) + { + BattleCardBase battleCardBase = battleCardBaseList[i]; + if (battleCardBase.EquelsID(cardId)) + { + return battleCardBase; + } + } + return null; + } +} diff --git a/SVSim.BattleEngine/Engine/BattleFinishResponsProcessing.cs b/SVSim.BattleEngine/Engine/BattleFinishResponsProcessing.cs new file mode 100644 index 0000000..128b017 --- /dev/null +++ b/SVSim.BattleEngine/Engine/BattleFinishResponsProcessing.cs @@ -0,0 +1,125 @@ +using LitJson; +using Wizard; + +public class BattleFinishResponsProcessing +{ + public void Processing(JsonData ResponseData, MatchFinishBase matchFinishData) + { + matchFinishData.IsProcessed = true; + if (GameMgr.GetIns().GetDataMgr().m_BattleType == DataMgr.BattleType.RankBattle && Data.CurrentFormat != Format.Crossover) + { + if (ResponseData["data"].Keys.Contains("target_grand_master_point")) + { + UserRank.IsGrandMasterAvailability = true; + } + else + { + UserRank.IsGrandMasterAvailability = false; + } + } + Data.RedEtherCampaignResultData = null; + if (GameMgr.GetIns().GetDataMgr().m_BattleType == DataMgr.BattleType.ColosseumNormal || GameMgr.GetIns().GetDataMgr().m_BattleType == DataMgr.BattleType.ColosseumTwoPick || GameMgr.GetIns().GetDataMgr().m_BattleType == DataMgr.BattleType.ColosseumHof || GameMgr.GetIns().GetDataMgr().m_BattleType == DataMgr.BattleType.ColosseumWindFall || GameMgr.GetIns().GetDataMgr().m_BattleType == DataMgr.BattleType.ColosseumAvatar) + { + Data.ArenaData.ColosseumData.ResultEffect = ArenaColosseum.eResultEffect.None; + } + RankMatchFinishDetail rankMatchFinishDetail = matchFinishData as RankMatchFinishDetail; + matchFinishData._responseData = ResponseData; + JsonData jsonData = ResponseData["data"]; + foreach (string key in jsonData.Keys) + { + JsonData jsonData2 = jsonData[key.ToString()]; + if (jsonData2 == null) + { + if (key.ToString() == "user_promotion_match" && UserRank.IsGrandMasterAvailability && PlayerStaticData.IsMasterRankCurrentFormat()) + { + Data.Load.data._userRank[(int)Data.CurrentFormat].user_promotion_match.is_promotion = false; + } + continue; + } + switch (key.ToString()) + { + case "battle_result": + switch (jsonData2.ToInt()) + { + case 0: + matchFinishData.battleResult = BattleManagerBase.BATTLE_RESULT_TYPE.LOSE; + break; + case 1: + matchFinishData.battleResult = BattleManagerBase.BATTLE_RESULT_TYPE.WIN; + break; + case 2: + matchFinishData.battleResult = BattleManagerBase.BATTLE_RESULT_TYPE.CONSISTENCY; + break; + } + (BattleManagerBase.GetIns() as NetworkBattleManagerBase).BattleResultType = matchFinishData.battleResult; + break; + case "get_class_experience": + matchFinishData.get_class_chara_experience = jsonData2.ToInt(); + break; + case "class_experience": + matchFinishData.class_chara_experience = jsonData2.ToInt(); + break; + case "class_level": + matchFinishData.class_chara_level = jsonData2.ToInt(); + break; + case "achieved_info": + matchFinishData.AchievedInfo.Read(jsonData2); + break; + case "is_master_rank": + Data.Load.data._userRank[(int)Data.CurrentFormat].is_master_rank = jsonData2.ToInt() != 0; + break; + case "is_grand_master_rank": + Data.Load.data._userRank[(int)Data.CurrentFormat].is_grand_master_rank = jsonData2.ToInt() != 0; + break; + case "user_promotion_match": + Data.Load.data._userRank[(int)Data.CurrentFormat].user_promotion_match.match_count = jsonData2["match_count"].ToInt(); + Data.Load.data._userRank[(int)Data.CurrentFormat].user_promotion_match.battle_result = jsonData2["battle_result"].ToInt(); + Data.Load.data._userRank[(int)Data.CurrentFormat].user_promotion_match.win = jsonData2["win"].ToInt(); + Data.Load.data._userRank[(int)Data.CurrentFormat].user_promotion_match.lose = jsonData2["lose"].ToInt(); + Data.Load.data._userRank[(int)Data.CurrentFormat].user_promotion_match.is_promotion = jsonData2["is_promotion"].ToBoolean(); + break; + case "current_grand_master_point": + Data.Load.data._userRank[(int)Data.CurrentFormat].grandMasterData.currentMasterPoint = jsonData2.ToInt(); + UserRank.IsGrandMasterAvailability = true; + break; + case "target_grand_master_point": + Data.Load.data._userRank[(int)Data.CurrentFormat].grandMasterData.targetMasterPoint = jsonData2.ToInt(); + UserRank.IsGrandMasterAvailability = true; + break; + case "reward_list": + PlayerStaticData.UpdateHaveUserGoodsNumByJsonData(jsonData2); + break; + case "colosseum_special_params": + if (jsonData2.Keys.Contains("next_round")) + { + Data.ArenaData.ColosseumData.ResultEffect = ArenaColosseum.eResultEffect.None; + if (jsonData2["next_round"].ToInt() == 2) + { + Data.ArenaData.ColosseumData.ResultEffect = ArenaColosseum.eResultEffect.GroupA; + } + else if (jsonData2["next_round"].ToInt() == 3) + { + Data.ArenaData.ColosseumData.ResultEffect = ArenaColosseum.eResultEffect.Final; + } + } + else if (jsonData2.Keys.Contains("is_champion") && jsonData2["is_champion"].ToBoolean()) + { + Data.ArenaData.ColosseumData.ResultEffect = ArenaColosseum.eResultEffect.Clear; + } + break; + case "red_ether_campagin_info": + Data.RedEtherCampaignResultData = new RedEtherCampaignResultData(jsonData2); + break; + case "battle_dialog_list": + if (rankMatchFinishDetail != null) + { + rankMatchFinishDetail.HomeDialogData = new MyPageHomeDialogData(ResponseData["data"], "battle_dialog_list"); + } + break; + case "upgrade_treasure_box_info": + matchFinishData.TreasureBoxCpResultInfo.Parse(jsonData2); + break; + } + } + } +} diff --git a/SVSim.BattleEngine/Engine/BattlePlayersExtension.cs b/SVSim.BattleEngine/Engine/BattlePlayersExtension.cs new file mode 100644 index 0000000..3b5012d --- /dev/null +++ b/SVSim.BattleEngine/Engine/BattlePlayersExtension.cs @@ -0,0 +1,21 @@ +using System.Collections.Generic; +using Wizard.Battle; + +public static class BattlePlayersExtension +{ + public static IEnumerable AllCards(this IEnumerable battlePlayerInfos) + { + List list = new List(); + foreach (IBattlePlayerReadOnlyInfo battlePlayerInfo in battlePlayerInfos) + { + list.Add(battlePlayerInfo.SkillInfoClass); + list.AddRange(battlePlayerInfo.SkillInfoHandCards); + list.AddRange(battlePlayerInfo.SkillInfoDeckCards); + list.AddRange(battlePlayerInfo.SkillInfoInPlayCards); + list.AddRange(battlePlayerInfo.SkillInfoCemeterys); + list.AddRange(battlePlayerInfo.SkillInfoBanishCards); + list.AddRange(battlePlayerInfo.SkillInfoNecromanceZoneCards); + } + return list; + } +} diff --git a/SVSim.BattleEngine/Engine/BuyCrystal.cs b/SVSim.BattleEngine/Engine/BuyCrystal.cs new file mode 100644 index 0000000..8c500a5 --- /dev/null +++ b/SVSim.BattleEngine/Engine/BuyCrystal.cs @@ -0,0 +1,116 @@ +using System; +using Cute; +using UnityEngine; +using Wizard; + +public class BuyCrystal : MonoBehaviour +{ + public static void CreateBuyCrystal(bool isPlaySe = true, string scrollToProductId = null, bool onlyInputBirthday = false, Action onCancel = null, Action onFinish = null, bool isSpecialCrystal = false) + { + if (isPlaySe) + { + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_BTN_DECIDE); + } + if (!onlyInputBirthday && Data.Load.data._userCrystalCount.EnableSpecialCrystal) + { + SpecialCrystalDialog.Create(UIManager.GetInstance().LegendCrystalBuyDialogPrefab, scrollToProductId, onCancel, onFinish); + } + else + { + InstantiateCrystalDialog(scrollToProductId, onlyInputBirthday, onCancel, onFinish, isSpecialCrystal); + } + } + + public static void InstantiateCrystalDialog(string scrollToProductId = null, bool onlyInputBirthday = false, Action onCancel = null, Action onFinish = null, bool isSpecialCrystal = false) + { + PaymentPC instance = PaymentPC.GetInstance(); + instance.initialize(); + instance.ProductListFailed += PaymentListErrorDialog; + instance.ProductListSucceeded += delegate + { + OpenItemList(scrollToProductId, onlyInputBirthday, onCancel, onFinish, isSpecialCrystal); + }; + } + + private static void CheckVideoHostingRunningAndOpenItemList(string scrollToProductid, bool onlyInputBirthday = false, Action onCancel = null, Action onFinish = null, bool isSpecialCrystal = false) + { + if (SingletonMonoBehaviour.instance.IsRecording() || SingletonMonoBehaviour.instance.IsPublising()) + { + VideoHostingUtil.CreateDialogPrivacyBuyCrystalEnter(delegate + { + OpenItemList(scrollToProductid, onlyInputBirthday, onCancel, onFinish, isSpecialCrystal); + }); + } + else + { + OpenItemList(scrollToProductid, onlyInputBirthday, onCancel, onFinish, isSpecialCrystal); + } + } + + private static void OpenItemList(string scrollToProductId, bool onlyInputBirthday = false, Action onCancel = null, Action onFinish = null, bool isSpecialCrystal = false) + { + BuyCrystal buyCrystal = UnityEngine.Object.Instantiate(UIManager.GetInstance().BuyCrystalPrefab); + UIManager.GetInstance().IsCrystalDialogExe = true; + DialogBase dialog = UIManager.GetInstance().CreateDialogClose(); + dialog.SetSize(DialogBase.Size.M); + dialog.SetTitleLabel(Data.SystemText.Get("Shop_0003")); + dialog.SetObj(buyCrystal.gameObject); + dialog.SetButtonLayout(DialogBase.ButtonLayout.BlueBtn_CancelBtn); + dialog.isNotCloseWindowButton1 = true; + dialog.SetButtonText(Data.SystemText.Get("Dia_BuyCrystal_001_Button")); + dialog.OnClose = delegate + { + if (!isSpecialCrystal || !onlyInputBirthday) + { + PaymentImpl.GetInstance().finalize(); + } + if (VideoHostingUtil.IsAutoPauseRecording() || VideoHostingUtil.IsAutoPausePublishing()) + { + VideoHostingUtil.CreateDialogPrivacyBuyCrystalExit(); + } + UIManager.GetInstance().IsCrystalDialogExe = false; + }; + UIManager.GetInstance().closeInSceneLoading(); + CreateItemList item_list = buyCrystal.gameObject.GetComponent(); + item_list.ParentDialogBase = dialog; + item_list.ScrollToProductId = scrollToProductId; + item_list.IsOnlyInputBirthday = onlyInputBirthday; + item_list.OnFinishUpdateBirthday = delegate + { + onFinish.Call(); + if (onlyInputBirthday) + { + dialog.Close(); + } + }; + dialog.onPushButton1 = delegate + { + item_list.BirthUpdateButtonClickCallBack(); + }; + dialog.onPushButton2 = delegate + { + item_list.BirthCancelButtonClickCallBack(); + }; + dialog.onCloseWithoutSelect = delegate + { + onCancel.Call(); + }; + } + + public static void PaymentListErrorDialog() + { + if (BattleManagerBase.GetIns() == null) + { + DialogBase dialogBase = UIManager.GetInstance().CreateDialogClose(); + dialogBase.SetTitleLabel(Data.SystemText.Get("Shop_0094")); + dialogBase.SetSize(DialogBase.Size.M); + dialogBase.SetText(Data.SystemText.Get("Shop_0093")); + dialogBase.SetButtonLayout(DialogBase.ButtonLayout.OkBtn); + dialogBase.SetPanelDepth(100); + } + } + + public void OnClickCredit() + { + } +} diff --git a/SVSim.BattleEngine/Engine/ColosseumEntryDialog.cs b/SVSim.BattleEngine/Engine/ColosseumEntryDialog.cs new file mode 100644 index 0000000..761beed --- /dev/null +++ b/SVSim.BattleEngine/Engine/ColosseumEntryDialog.cs @@ -0,0 +1,51 @@ +using Cute; +using Wizard; + +public class ColosseumEntryDialog : ArenaEntryDialogBase +{ + public ColosseumEntry ColosseumEntryClass { get; set; } + + protected override void Init() + { + _mainTextId = "Colosseum_0004"; + _ticketSpriteName = "icon_colosseum_s"; + _arenaNameTextId = "Colosseum_0006"; + _entryButtonSe = Se.TYPE.SYS_BTN_DECIDE; + } + + protected override int GetTicketNum() + { + return PlayerStaticData.UserColosseumTicketNum; + } + + protected override ArenaEntryDataBase GetEntryData() + { + return Data.ArenaData.ColosseumData; + } + + protected override void Entry() + { + base.Entry(); + ColosseumEntryTask colosseumEntryTask = new ColosseumEntryTask(); + colosseumEntryTask.SetParameter(_payType); + StartCoroutine(Toolbox.NetworkManager.Connect(colosseumEntryTask, EntryTaskSuccess)); + } + + private void EntryTaskSuccess(NetworkTask.ResultCode inResult) + { + base.ParentDialog.CloseWithoutSelect(); + ColosseumEntryClass.EntryTaskSuccess(inResult); + } + + private void DeckSetAndMoveColosseum(DeckData inDeckData, bool isBattleEnd) + { + Data.ArenaData.ColosseumData.DeckList.Clear(); + Data.ArenaData.ColosseumData.DeckList.Add(inDeckData); + ColosseumDeckEntryTask colosseumDeckEntryTask = new ColosseumDeckEntryTask(); + colosseumDeckEntryTask.SetParameter(Data.ArenaData.ColosseumData.DeckList, isPublished: false); + UIManager.GetInstance().StartCoroutine(Toolbox.NetworkManager.Connect(colosseumDeckEntryTask, delegate + { + UIManager.GetInstance().ChangeViewScene(UIManager.ViewScene.Colosseum); + })); + } +} diff --git a/SVSim.BattleEngine/Engine/ColosseumHeadLine.cs b/SVSim.BattleEngine/Engine/ColosseumHeadLine.cs new file mode 100644 index 0000000..d2868d1 --- /dev/null +++ b/SVSim.BattleEngine/Engine/ColosseumHeadLine.cs @@ -0,0 +1,51 @@ +using UnityEngine; +using Wizard; + +public class ColosseumHeadLine : MonoBehaviour +{ + [SerializeField] + private UILabel _ticketNum; + + [SerializeField] + private UILabel _ticketCost; + + [SerializeField] + private UILabel _rupyNum; + + [SerializeField] + private UILabel _rupyCost; + + [SerializeField] + private UILabel _crystalNum; + + [SerializeField] + private UILabel _crystalCost; + + private void OnEnable() + { + UpdateHeadLine(); + } + + public void UpdateHeadLine() + { + int ticketCost = Data.ArenaData.ColosseumData.ticketCost; + int rupyCost = Data.ArenaData.ColosseumData.rupyCost; + int crystalCost = Data.ArenaData.ColosseumData.crystalCost; + SystemText systemText = Data.SystemText; + if (_ticketNum != null) + { + _ticketNum.text = PlayerStaticData.UserColosseumTicketNum.ToString(); + _ticketCost.text = systemText.Get("Arena_0045", ticketCost.ToString()); + } + if (_rupyNum != null) + { + _rupyNum.text = PlayerStaticData.UserRupyCount.ToString(); + _rupyCost.text = systemText.Get("Arena_0047", rupyCost.ToString()); + } + if (_crystalNum != null) + { + _crystalNum.text = PlayerStaticData.UserCrystalCount.ToString(); + _crystalCost.text = systemText.Get("Arena_0046", crystalCost.ToString()); + } + } +} diff --git a/SVSim.BattleEngine/Engine/ConventionDeckDeleteTask.cs b/SVSim.BattleEngine/Engine/ConventionDeckDeleteTask.cs new file mode 100644 index 0000000..60cfd1b --- /dev/null +++ b/SVSim.BattleEngine/Engine/ConventionDeckDeleteTask.cs @@ -0,0 +1,27 @@ +using Wizard; + +public class ConventionDeckDeleteTask : BaseTask +{ + public class ConventionDeckDeleteTaskParam : BaseParam + { + public string tournament_id; + + public int[] deck_no_list; + + public int deck_format; + } + + public ConventionDeckDeleteTask() + { + base.type = ApiType.Type.ConventionDeckDelete; + } + + public void SetParameter(string tournament_id, int[] deck_no, Format format) + { + ConventionDeckDeleteTaskParam conventionDeckDeleteTaskParam = new ConventionDeckDeleteTaskParam(); + conventionDeckDeleteTaskParam.tournament_id = tournament_id; + conventionDeckDeleteTaskParam.deck_no_list = deck_no; + conventionDeckDeleteTaskParam.deck_format = Data.FormatConvertApi(format); + base.Params = conventionDeckDeleteTaskParam; + } +} diff --git a/SVSim.BattleEngine/Engine/Cute.Payment/StringExtensions.cs b/SVSim.BattleEngine/Engine/Cute.Payment/StringExtensions.cs new file mode 100644 index 0000000..4e40f9a --- /dev/null +++ b/SVSim.BattleEngine/Engine/Cute.Payment/StringExtensions.cs @@ -0,0 +1,30 @@ +using System; +using System.Collections.Generic; + +namespace Cute.Payment; + +public static class StringExtensions +{ + public static string[] SubstringAtCount(this string self, int count) + { + List list = new List(); + int num = (int)Math.Ceiling((double)self.Length / (double)count); + for (int i = 0; i < num; i++) + { + int num2 = count * i; + if (self.Length <= num2) + { + break; + } + if (self.Length < num2 + count) + { + list.Add(self.Substring(num2)); + } + else + { + list.Add(self.Substring(num2, count)); + } + } + return list.ToArray(); + } +} diff --git a/SVSim.BattleEngine/Engine/Cute/IEnumerableExtensions.cs b/SVSim.BattleEngine/Engine/Cute/IEnumerableExtensions.cs new file mode 100644 index 0000000..8d9d832 --- /dev/null +++ b/SVSim.BattleEngine/Engine/Cute/IEnumerableExtensions.cs @@ -0,0 +1,12 @@ +using System.Collections.Generic; +using System.Linq; + +namespace Cute; + +public static class IEnumerableExtensions +{ + public static bool IsNotNullOrEmpty(this IEnumerable enumerable) + { + return enumerable?.Any() ?? false; + } +} diff --git a/SVSim.BattleEngine/Engine/Cute/NativePluginWrapper.cs b/SVSim.BattleEngine/Engine/Cute/NativePluginWrapper.cs new file mode 100644 index 0000000..707f472 --- /dev/null +++ b/SVSim.BattleEngine/Engine/Cute/NativePluginWrapper.cs @@ -0,0 +1,199 @@ +using UnityEngine; + +namespace Cute; + +public static class NativePluginWrapper +{ + public enum BatteryState + { + UNKNOWN, + DISCHARGING, + CHARGING, + FULL + } + + public enum NetworkMode + { + UNCONNECTED, + WIFI, + MOBILE + } + + public static void DeviceInit() + { + } + + public static int GetUseResidentMemory() + { + return 0; + } + + public static int GetUseVirtualMemory() + { + return 0; + } + + public static int GetDeviceFreeMemory() + { + return 0; + } + + public static int GetVmUseMemory() + { + return 0; + } + + public static int GetVmFreeMemory() + { + return 0; + } + + public static void SetStringToClipboard(string copyText) + { + ClipboardHelper.Clipboard = copyText; + } + + public static int GetAccelerometerRotation() + { + return 1; + } + + public static void RequestAudioFocus() + { + } + + public static void AbandonAudioFocus() + { + } + + public static string GetMacAddressByName(string devicename) + { + return null; + } + + public static void DispStatusBar(bool isDisp) + { + if (isDisp) + { + Screen.fullScreen = false; + } + else + { + Screen.fullScreen = true; + } + } + + public static void RegistPhoneStateListener() + { + } + + public static void UnregistPhoneStateListener() + { + } + + public static int GetBatteryLevel() + { + return 0; + } + + public static BatteryState GetBatteryState() + { + return BatteryState.UNKNOWN; + } + + public static int GetWifiAntenaLevel() + { + return 0; + } + + public static NetworkMode GetNetworkMode() + { + return NetworkMode.UNCONNECTED; + } + + public static bool IsAirplaneMode() + { + return false; + } + + public static int GetCdmaDbm() + { + return 0; + } + + public static int GetCdmaEcio() + { + return 0; + } + + public static int GetEvdoDbm() + { + return 0; + } + + public static int GetEvdoEcio() + { + return 0; + } + + public static int GetDescriveContents() + { + return 0; + } + + public static bool IsGsm() + { + return false; + } + + public static int GetSignalHashCode() + { + return 0; + } + + public static int GetGsmSignalStrength() + { + return 0; + } + + public static int GetGsmBitErrorRate() + { + return 0; + } + + public static void ShowToast(string text) + { + } + + public static void DumpWWWCache() + { + } + + public static void SetCacheMemorySize(int nMemSize) + { + } + + public static int GetCacheDiskUsage() + { + return 0; + } + + public static int GetCacheDiskCapacity() + { + return 0; + } + + public static int GetCacheCurrentMemoryUsage() + { + return 0; + } + + public static int GetCacheCurrentMemoryCapacity() + { + return 0; + } + + public static void ClearWWWCache() + { + } +} diff --git a/SVSim.BattleEngine/Engine/Cute/PaymentCancelTask.cs b/SVSim.BattleEngine/Engine/Cute/PaymentCancelTask.cs new file mode 100644 index 0000000..c6a8b71 --- /dev/null +++ b/SVSim.BattleEngine/Engine/Cute/PaymentCancelTask.cs @@ -0,0 +1,23 @@ +namespace Cute; + +public class PaymentCancelTask : NetworkTask +{ + private CuteNetworkDefine.ApiType apiType = CuteNetworkDefine.ApiType.PaymentCancel; + + public override string Url => $"{CustomPreference.GetApplicationServerURL()}{CuteNetworkDefine.ApiUrlList[apiType]}"; + + public void SetParameter(PaymentSkuInfo skuInfo, string errorMessage) + { + PaymentStartCancelParams paymentStartCancelParams = new PaymentStartCancelParams(); + paymentStartCancelParams.payment.product_id = skuInfo.productId; + paymentStartCancelParams.payment.currency_code = skuInfo.currencyCode; + paymentStartCancelParams.payment.price = skuInfo.price; + paymentStartCancelParams.error.message = errorMessage; + base.Params = paymentStartCancelParams; + } + + protected override int Parse() + { + return base.Parse(); + } +} diff --git a/SVSim.BattleEngine/Engine/Cute/PaymentItemListTask.cs b/SVSim.BattleEngine/Engine/Cute/PaymentItemListTask.cs new file mode 100644 index 0000000..6afbf72 --- /dev/null +++ b/SVSim.BattleEngine/Engine/Cute/PaymentItemListTask.cs @@ -0,0 +1,64 @@ +using LitJson; + +namespace Cute; + +public class PaymentItemListTask : NetworkTask +{ + private CuteNetworkDefine.ApiType apiType = CuteNetworkDefine.ApiType.PaymentItemList; + + public override string Url => $"{CustomPreference.GetApplicationServerURL()}{CuteNetworkDefine.ApiUrlList[apiType]}"; + + protected override int Parse() + { + PaymentImpl instance = PaymentImpl.GetInstance(); + resultCode = (int)base.ResponseData["data_headers"]["result_code"]; + if (resultCode != 1) + { + return resultCode; + } + JsonData jsonData = base.ResponseData["data"]; + instance.ProductIdList.Clear(); + instance.IdList.Clear(); + instance.ProductNameList.Clear(); + instance.ProductPriceList.Clear(); + instance.ProductTextList.Clear(); + instance.ProductPurchaseLimitList.Clear(); + instance.ProductPurchaseNumberList.Clear(); + instance.FormatProductPriceList.Clear(); + instance.ProductCsvIdList.Clear(); + instance.ProductImageNameList.Clear(); + instance.ProductIsSpecialShop.Clear(); + instance.ProductCurrentPurchaseCount.Clear(); + instance.ProductPurchaseLimitCount.Clear(); + instance.ProductEndTime.Clear(); + for (int i = 0; i < jsonData.Count; i++) + { + JsonData jsonData2 = jsonData[i]; + string text = jsonData2["store_product_id"].ToString(); + string value = jsonData2["name"].ToString().Replace("\\n", "\n"); + string value2 = jsonData2["text"].ToString(); + string text2 = jsonData2["purchase_limit"].ToString(); + string text3 = jsonData2["id"].ToString(); + string value3 = jsonData2["image_name"].ToString(); + string value4 = jsonData2["end_time"].ToString(); + bool value5 = ((jsonData2["special_shop_flag"].ToInt() != 0) ? true : false); + instance.ProductIdList.Add(text); + instance.IdList.Add(text3); + instance.ProductNameList.Add(text, value); + instance.ProductTextList.Add(text, value2); + instance.ProductPurchaseLimitList.Add(text3, text2); + instance.ProductPurchaseLimitCount.Add(text, int.Parse(text2)); + instance.ProductImageNameList.Add(text, value3); + if (jsonData2.Keys.Contains("number_of_product_purchased") && jsonData2["number_of_product_purchased"] != null) + { + string text4 = jsonData2["number_of_product_purchased"].ToString(); + instance.ProductPurchaseNumberList.Add(text3, text4); + instance.ProductCurrentPurchaseCount.Add(text, int.Parse(text4)); + } + instance.ProductCsvIdList.Add(text, text3); + instance.ProductIsSpecialShop.Add(text, value5); + instance.ProductEndTime.Add(text, value4); + } + return resultCode; + } +} diff --git a/SVSim.BattleEngine/Engine/Cute/PaymentPCItemListTask.cs b/SVSim.BattleEngine/Engine/Cute/PaymentPCItemListTask.cs new file mode 100644 index 0000000..08b1054 --- /dev/null +++ b/SVSim.BattleEngine/Engine/Cute/PaymentPCItemListTask.cs @@ -0,0 +1,61 @@ +using LitJson; + +namespace Cute; + +public class PaymentPCItemListTask : NetworkTask +{ + private CuteNetworkDefine.ApiType apiType = CuteNetworkDefine.ApiType.PaymentPCItemList; + + public override string Url => $"{CustomPreference.GetApplicationServerURL()}{CuteNetworkDefine.ApiUrlList[apiType]}"; + + protected override int Parse() + { + PaymentPC instance = PaymentPC.GetInstance(); + resultCode = (int)base.ResponseData["data_headers"]["result_code"]; + if (resultCode != 1) + { + return resultCode; + } + JsonData jsonData = base.ResponseData["data"]; + instance.ProductIdList.Clear(); + instance.IdList.Clear(); + instance.ProductNameList.Clear(); + instance.ProductPriceList.Clear(); + instance.ProductTextList.Clear(); + instance.ProductPurchaseLimitList.Clear(); + instance.FormatProductPriceList.Clear(); + instance.ProductCsvIdList.Clear(); + instance.ProductImageNameList.Clear(); + instance.ProductIsSpecialShop.Clear(); + instance.ProductCurrentPurchaseCount.Clear(); + instance.ProductEndTime.Clear(); + for (int i = 0; i < jsonData.Count; i++) + { + JsonData jsonData2 = jsonData[i]; + string text = jsonData2["store_product_id"].ToString(); + string value = jsonData2["name"].ToString().Replace("\\n", "\n"); + string value2 = jsonData2["text"].ToString(); + string value3 = jsonData2["price"].ToString(); + string text2 = jsonData2["purchase_limit"].ToString(); + string text3 = jsonData2["id"].ToString(); + string value4 = jsonData2["image_name"].ToString(); + string value5 = jsonData2["end_time"].ToString(); + bool value6 = ((jsonData2["special_shop_flag"].ToInt() != 0) ? true : false); + int value7 = jsonData2["purchase_num_current"].ToInt(); + instance.ProductIdList.Add(text); + instance.IdList.Add(text3); + instance.ProductNameList.Add(text, value); + instance.ProductPriceList.Add(text, value3); + instance.FormatProductPriceList.Add(text, value3); + instance.ProductTextList.Add(text, value2); + instance.ProductPurchaseLimitList.Add(text3, text2); + instance.ProductCsvIdList.Add(text, text3); + instance.ProductImageNameList.Add(text, value4); + instance.ProductIsSpecialShop.Add(text, value6); + instance.ProductCurrentPurchaseCount.Add(text, value7); + instance.ProductPurchaseLimitCount.Add(text, int.Parse(text2)); + instance.ProductEndTime.Add(text, value5); + } + return resultCode; + } +} diff --git a/SVSim.BattleEngine/Engine/Cute/PaymentStartTask.cs b/SVSim.BattleEngine/Engine/Cute/PaymentStartTask.cs new file mode 100644 index 0000000..78e3b27 --- /dev/null +++ b/SVSim.BattleEngine/Engine/Cute/PaymentStartTask.cs @@ -0,0 +1,32 @@ +namespace Cute; + +public class PaymentStartTask : NetworkTask +{ + private CuteNetworkDefine.ApiType apiType = CuteNetworkDefine.ApiType.PaymentStart; + + public PaymentBase.RefundWarningType NeedRefundWarningType { get; private set; } + + public override string Url => $"{CustomPreference.GetApplicationServerURL()}{CuteNetworkDefine.ApiUrlList[apiType]}"; + + public void SetParameter(PaymentSkuInfo skuInfo, bool isAlertAgree, bool isAlertActive) + { + PaymentStartCancelParams paymentStartCancelParams = new PaymentStartCancelParams(); + paymentStartCancelParams.payment.product_id = skuInfo.productId; + paymentStartCancelParams.payment.currency_code = skuInfo.currencyCode; + paymentStartCancelParams.payment.price = skuInfo.price; + paymentStartCancelParams.payment.isalertagree = (isAlertAgree ? 1 : 0); + paymentStartCancelParams.payment.isalertactive = (isAlertActive ? 1 : 0); + base.Params = paymentStartCancelParams; + } + + protected override int Parse() + { + int num = base.Parse(); + if (num != 1) + { + return num; + } + NeedRefundWarningType = (PaymentBase.RefundWarningType)base.ResponseData["data"]["refund_penalty_type"].ToInt(); + return num; + } +} diff --git a/SVSim.BattleEngine/Engine/Cute/SceneType.cs b/SVSim.BattleEngine/Engine/Cute/SceneType.cs new file mode 100644 index 0000000..46ec2eb --- /dev/null +++ b/SVSim.BattleEngine/Engine/Cute/SceneType.cs @@ -0,0 +1,14 @@ +namespace Cute; + +public enum SceneType +{ + None, + _Splash, + GameTitle, + Title, + Battle, + CardList, + GAMESCENE_TYPE_MAX, + _SoftwareReset, + TYPE_MAX +} diff --git a/SVSim.BattleEngine/Engine/Cute/UpdateBirthTask.cs b/SVSim.BattleEngine/Engine/Cute/UpdateBirthTask.cs new file mode 100644 index 0000000..fb8049a --- /dev/null +++ b/SVSim.BattleEngine/Engine/Cute/UpdateBirthTask.cs @@ -0,0 +1,34 @@ +using UnityEngine; + +namespace Cute; + +public class UpdateBirthTask : NetworkTask +{ + private class UpdateBirthPostParams : PostParams + { + public string birth = ""; + } + + private CuteNetworkDefine.ApiType apiType = CuteNetworkDefine.ApiType.BirthUpdate; + + public override string Url => $"{CustomPreference.GetApplicationServerURL()}{CuteNetworkDefine.ApiUrlList[apiType]}"; + + public void SetParameter(string birth) + { + UpdateBirthPostParams updateBirthPostParams = new UpdateBirthPostParams(); + updateBirthPostParams.birth = birth; + base.Params = updateBirthPostParams; + } + + protected override int Parse() + { + int num = base.Parse(); + if (num != 1) + { + return num; + } + CreateItemList.BirthDayUpdateServerTime = base.ResponseData["data_headers"]["servertime"].ToInt(); + CreateItemList.BirthDayUpdateRealTime = Time.realtimeSinceStartup; + return num; + } +} diff --git a/SVSim.BattleEngine/Engine/DeckDecisionColosseum.cs b/SVSim.BattleEngine/Engine/DeckDecisionColosseum.cs new file mode 100644 index 0000000..75136d5 --- /dev/null +++ b/SVSim.BattleEngine/Engine/DeckDecisionColosseum.cs @@ -0,0 +1,21 @@ +using UnityEngine; +using Wizard; + +public class DeckDecisionColosseum : MonoBehaviour +{ + [SerializeField] + private UILabel _descTextLabel; + + [SerializeField] + private UILabel _deckNameTextLabel; + + [SerializeField] + private UILabel _descText2Label; + + public void Init(DeckData inDeck) + { + _descTextLabel.text = Data.SystemText.Get("Card_0006"); + _deckNameTextLabel.text = Data.SystemText.Get("Card_0299", inDeck.GetDeckName()); + _descText2Label.text = Data.SystemText.Get("Colosseum_0081"); + } +} diff --git a/SVSim.BattleEngine/Engine/DeckDecisionCompetition.cs b/SVSim.BattleEngine/Engine/DeckDecisionCompetition.cs new file mode 100644 index 0000000..99a63d3 --- /dev/null +++ b/SVSim.BattleEngine/Engine/DeckDecisionCompetition.cs @@ -0,0 +1,41 @@ +using UnityEngine; +using Wizard; +using Wizard.Dialog.Setting; + +public class DeckDecisionCompetition : MonoBehaviour +{ + [SerializeField] + private UILabel _descTextLabel; + + [SerializeField] + private UILabel _deckNameTextLabel; + + [SerializeField] + private UILabel _descText2Label; + + [SerializeField] + private ItemToggle _toggle; + + public void Init(DeckData inDeck) + { + _descTextLabel.text = Data.SystemText.Get("Card_0006"); + _deckNameTextLabel.text = Data.SystemText.Get("Card_0299", inDeck.GetDeckName()); + _descText2Label.text = Data.SystemText.Get("Colosseum_0081"); + SettingToggle(); + } + + protected ItemToggle SettingToggle() + { + SystemText systemText = Data.SystemText; + ItemToggle item = _toggle; + item.SetTitleLabel(systemText.Get("Colosseum_0085")); + item.SetValue(PlayerPrefsWrapper.GetBool(PlayerPrefsWrapper.COMPETITION_PUBLISHED_SETTING)); + item.AddChangeCallback(delegate + { + bool value = item.GetValue(); + PlayerPrefsWrapper.SetBool(PlayerPrefsWrapper.COMPETITION_PUBLISHED_SETTING, value); + }); + item.SetActive_SeparatorLine(isActive: true); + return item; + } +} diff --git a/SVSim.BattleEngine/Engine/DeckDeleteTask.cs b/SVSim.BattleEngine/Engine/DeckDeleteTask.cs new file mode 100644 index 0000000..16fb29c --- /dev/null +++ b/SVSim.BattleEngine/Engine/DeckDeleteTask.cs @@ -0,0 +1,38 @@ +using Wizard; + +public class DeckDeleteTask : BaseTask +{ + public class DeckDeleteTaskParam : BaseParam + { + public int[] deck_no_list; + + public int deck_format; + } + + private Format _updateDeckFormat; + + public DeckDeleteTask() + { + base.type = ApiType.Type.DeckDelete; + } + + public void SetParameter(int[] deck_no, Format format) + { + DeckDeleteTaskParam deckDeleteTaskParam = new DeckDeleteTaskParam(); + deckDeleteTaskParam.deck_no_list = deck_no; + deckDeleteTaskParam.deck_format = Data.FormatConvertApi(format); + base.Params = deckDeleteTaskParam; + _updateDeckFormat = format; + } + + protected override int Parse() + { + int num = base.Parse(); + if (num != 1) + { + return num; + } + DeckListUtility.ParseDeckInfoResponceData(base.ResponseData["data"], _updateDeckFormat); + return num; + } +} diff --git a/SVSim.BattleEngine/Engine/DeckSortDragDrop.cs b/SVSim.BattleEngine/Engine/DeckSortDragDrop.cs new file mode 100644 index 0000000..411252b --- /dev/null +++ b/SVSim.BattleEngine/Engine/DeckSortDragDrop.cs @@ -0,0 +1,380 @@ +using UnityEngine; +using Wizard; + +public class DeckSortDragDrop : UIDragDropItem +{ + protected enum DropType + { + None, + Sort, + Add + } + + private const int UIPANEL_DEPTH = 50; + + private const float DRAG_OBJECT_ALPHA = 0.5f; + + private const float SORT_DELTA_UNDER = 5f; + + private const float PAGE_CHANGE_INTERVAL_TIME = 0.75f; + + public DeckListMenuUI DeckListMenuClass; + + protected Vector3 _defaultPosition; + + protected Transform _defaultParentTransform; + + protected UIPanel _uiPanel; + + protected Camera _deckListCamera; + + protected string _sortExecTargetName; + + protected bool _isHighSpeedCheck; + + protected Vector3 _oldMousePosition; + + protected bool _isDragStart; + + protected bool _isPress; + + protected bool _isSortExecEvenOnce; + + protected float _pageChangeIntervalTime; + + protected override void Awake() + { + IsGridRepositionUse = false; + _deckListCamera = UIManager.GetInstance().transform.Find("UIRoot/CameraUI").GetComponent(); + _pageChangeIntervalTime = 0f; + } + + protected override void Update() + { + if (_isHighSpeedCheck) + { + if (IsSortDrag() && !DeckListMenuClass.IsPlayingSortAnimation) + { + if ((_oldMousePosition - Input.mousePosition).magnitude == 0f) + { + bool isDrop = true; + if (_isPress) + { + isDrop = false; + } + CurrentTouchPositionSort(isDrop); + _isHighSpeedCheck = false; + } + _oldMousePosition = Input.mousePosition; + } + else + { + _isHighSpeedCheck = false; + } + } + if (_isDragStart && !DeckListMenuClass.IsPlayingSortAnimation) + { + _pageChangeIntervalTime += Time.deltaTime; + PageChangeUpdate(); + } + } + + protected override void OnPress(bool isPressed) + { + if (_isPress != isPressed && DeckListMenuClass.IsSortMode) + { + if (isPressed && !DeckListMenuClass.IsSortDragging) + { + if (!DeckListMenuClass.IsPlayingSortAnimation) + { + base.OnPress(isPressed); + DragDropStart(); + } + } + else if (IsSortDrag()) + { + base.OnPress(isPressed); + SetDragStatus(isDrag: false); + Object.Destroy(_uiPanel); + CurrentTouchPositionSort(isDrop: true); + if (_isSortExecEvenOnce) + { + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_TOGGLE_ON); + } + _isSortExecEvenOnce = false; + _isDragStart = false; + } + } + _isPress = isPressed; + } + + protected override void OnDragStart() + { + if (!DeckListMenuClass.IsPlayingSortAnimation) + { + base.OnDragStart(); + } + } + + protected void DragDropStart() + { + if (DeckListMenuClass.IsSortMode && !IsSortDrag()) + { + SetDragStatus(isDrag: true); + mTrans = base.transform; + base.transform.parent.GetComponent().Reposition(); + _defaultParentTransform = base.transform.parent; + _defaultPosition = base.transform.localPosition; + base.transform.parent = _deckListCamera.transform; + base.transform.gameObject.GetComponent().enabled = false; + _uiPanel = base.gameObject.AddComponent(); + _uiPanel.depth = 50; + base.gameObject.GetComponent().UpdateUIAlpha(0.5f); + base.transform.position = _deckListCamera.ScreenToWorldPoint(Input.mousePosition); + _isDragStart = true; + _isSortExecEvenOnce = false; + _pageChangeIntervalTime = 0.75f; + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_TOGGLE_ON); + } + } + + protected override void OnDragDropMove(Vector2 delta) + { + base.transform.position = _deckListCamera.ScreenToWorldPoint(Input.mousePosition); + if (!DeckListMenuClass.IsSortMode || DeckListMenuClass.IsPlayingSortAnimation) + { + return; + } + switch (UICamera.hoveredObject.name) + { + case "LeftDragArea": + return; + case "LeftArrow": + return; + case "RightArrow": + return; + case "RightDragArea": + return; + } + if (delta.magnitude < 5f) + { + DeckFrame inRetObject = null; + switch (GetSortTaget(UICamera.hoveredObject, out inRetObject)) + { + case DropType.Sort: + DeckSort(inRetObject.Transform.gameObject, inDrop: false); + break; + case DropType.Add: + AddExec(inRetObject, inDrop: false); + break; + } + _isHighSpeedCheck = false; + } + else + { + _isHighSpeedCheck = true; + } + } + + protected void DeckSort(GameObject inDropObject, bool inDrop) + { + bool flag = false; + if (inDropObject != null) + { + if (inDropObject.GetComponent() != null) + { + if (_sortExecTargetName != inDropObject.name) + { + flag = true; + if (DeckListMenuClass.DeckSort(inDropObject.name, base.name, ref _defaultPosition)) + { + _defaultParentTransform = base.gameObject.transform.parent; + base.transform.parent = _deckListCamera.transform; + } + if (inDrop) + { + MoveReset(); + } + else + { + base.transform.position = _deckListCamera.ScreenToWorldPoint(Input.mousePosition); + } + _sortExecTargetName = inDropObject.name; + } + } + else if (inDrop) + { + MoveReset(); + } + } + else if (inDrop) + { + MoveReset(); + } + _sortExecTargetName = string.Empty; + if (flag) + { + _isSortExecEvenOnce = true; + } + } + + protected void AddExec(DeckFrame inAddObject, bool inDrop) + { + DeckListMenuClass.DeckSortAddLast(inAddObject); + _defaultParentTransform = base.gameObject.transform.parent; + _defaultPosition = base.transform.localPosition; + if (!inDrop) + { + base.transform.parent = _deckListCamera.transform; + base.transform.position = _deckListCamera.ScreenToWorldPoint(Input.mousePosition); + } + else + { + MoveReset(); + } + _isSortExecEvenOnce = true; + } + + protected DropType GetSortTaget(GameObject inDropObject, out DeckFrame inRetObject) + { + inRetObject = new DeckFrame(); + if (inDropObject.GetComponent() != null) + { + string text = ((!(inDropObject.transform.position.x > _deckListCamera.ScreenToWorldPoint(Input.mousePosition).x)) ? (int.Parse(inDropObject.transform.name) + 1).ToString() : inDropObject.transform.name); + Transform transform = null; + for (int i = 0; i < DeckListMenuClass.DeckPageList.Count; i++) + { + transform = DeckListMenuClass.DeckPageList[i].transform.Find(text); + if (transform != null) + { + break; + } + } + if (text == base.gameObject.name) + { + return DropType.None; + } + if (transform == null || transform.GetComponent() == null) + { + inRetObject.Transform = base.gameObject.transform; + inRetObject.DeckId = DeckListMenuClass.GetDeckNoFromGameObject(inRetObject.Transform.gameObject); + return DropType.Add; + } + inRetObject.Transform = transform.gameObject.transform; + inRetObject.DeckId = DeckListMenuClass.GetDeckNoFromGameObject(inRetObject.Transform.gameObject); + return DropType.Sort; + } + return DropType.None; + } + + protected void CurrentTouchPositionSort(bool isDrop) + { + DeckFrame inRetObject = new DeckFrame(); + GameObject gameObject = null; + BetterList hitsList = UICamera.GetHitsList(); + for (int i = 0; i < hitsList.buffer.Length; i++) + { + if (hitsList.buffer[i].go != null && (bool)hitsList.buffer[i].go.GetComponent()) + { + gameObject = hitsList[i].go; + break; + } + } + if (gameObject != null) + { + switch (GetSortTaget(gameObject, out inRetObject)) + { + case DropType.Sort: + DeckSort(inRetObject.Transform.gameObject, isDrop); + break; + case DropType.Add: + AddExec(inRetObject, isDrop); + break; + default: + DeckSort(null, isDrop); + break; + } + } + else + { + DeckSort(null, isDrop); + } + } + + public void SortAnimeComplete() + { + base.gameObject.GetComponent().enabled = true; + } + + protected void MoveReset() + { + mParent = _defaultParentTransform; + base.transform.SetParent(_defaultParentTransform); + base.transform.localPosition = _defaultPosition; + base.gameObject.GetComponent().UpdateUIAlpha(1f); + base.transform.gameObject.GetComponent().enabled = true; + } + + private void OnApplicationPause(bool paused) + { + if (_isPress && paused) + { + OnPress(isPressed: false); + StopDragging(UICamera.hoveredObject); + mPressed = false; + } + } + + private void PageChangeUpdate() + { + BetterList hitsList = UICamera.GetHitsList(); + for (int i = 0; i < hitsList.buffer.Length; i++) + { + if (!(hitsList.buffer[i].go != null)) + { + continue; + } + if (hitsList.buffer[i].go.name == "LeftDragArea") + { + if (_pageChangeIntervalTime > 0.75f) + { + DeckListMenuClass.PrevPage(); + _pageChangeIntervalTime = 0f; + } + break; + } + if (hitsList.buffer[i].go.name == "RightDragArea") + { + if (_pageChangeIntervalTime > 0.75f) + { + DeckListMenuClass.NextPage(); + _pageChangeIntervalTime = 0f; + } + break; + } + } + } + + private bool IsSortDrag() + { + if (DeckListMenuClass.IsSortDragging && DeckListMenuClass.SortDragObject == base.gameObject) + { + return true; + } + return false; + } + + private void SetDragStatus(bool isDrag) + { + if (isDrag) + { + DeckListMenuClass.IsSortDragging = true; + DeckListMenuClass.SortDragObject = base.gameObject; + } + else + { + DeckListMenuClass.IsSortDragging = false; + DeckListMenuClass.SortDragObject = null; + } + } +} diff --git a/SVSim.BattleEngine/Engine/DialogRewardScroll.cs b/SVSim.BattleEngine/Engine/DialogRewardScroll.cs new file mode 100644 index 0000000..73967f9 --- /dev/null +++ b/SVSim.BattleEngine/Engine/DialogRewardScroll.cs @@ -0,0 +1,103 @@ +using System.Collections.Generic; +using UnityEngine; +using Wizard.Scripts.Network.Data.TableData; + +public class DialogRewardScroll : MonoBehaviour +{ + [SerializeField] + private UIWrapContentWizard WrapContent; + + [SerializeField] + private GameObject Item; + + [SerializeField] + private UIScrollBarWrapContent ScrollBar; + + [SerializeField] + private WrapContentsScrollBarSize WrapScrollbar; + + [SerializeField] + private UIScrollView ScrollView; + + [SerializeField] + private UILabel _emptyLabel; + + private const int SCROLL_ITEM_COUNT = 10; + + private const int HISTORY_ITEM_SPRITE_WIDTH = 800; + + private GameObject[] Items; + + private List _currentList; + + public List CurrentList + { + get + { + return _currentList; + } + set + { + _currentList = value; + _emptyLabel.gameObject.SetActive(_currentList.Count == 0); + } + } + + public ResourceHandler Handler { get; set; } + + public void Start() + { + CreateSomeItems(); + WrapContent.onInitializeItem = InitScrollItem; + ScrollBar.m_WrapContents = WrapContent; + } + + public void resetScrollWrap() + { + WrapContent.minIndex = -(CurrentList.Count - 1); + WrapContent.maxIndex = 0; + ScrollView.ResetPosition(); + WrapContent.resetItems(); + WrapScrollbar.ContentUpdate(); + ScrollView.ResetPosition(); + ScrollBar.gameObject.SetActive(value: true); + ScrollView.UpdateScrollbars(); + } + + private void InitScrollItem(GameObject obj, int wrapIndex, int realIndex) + { + GameObject gameObject = obj.transform.GetChild(0).gameObject; + if (-realIndex < 0 || -realIndex >= CurrentList.Count) + { + gameObject.SetActive(value: false); + return; + } + gameObject.SetActive(value: true); + int num = -realIndex; + SetHistoryItem(gameObject, CurrentList[num], num == CurrentList.Count - 1); + } + + private void SetHistoryItem(GameObject item, ItemAcquireHistory history, bool isLastItem) + { + item.GetComponent().width = 800; + item.GetComponent().SetHistoryItem(history, !isLastItem, Handler); + } + + private void CreateSomeItems() + { + Items = new GameObject[10]; + for (int i = 0; i < 10; i++) + { + GameObject gameObject = new GameObject(); + Transform obj = gameObject.transform; + obj.parent = WrapContent.transform; + obj.localPosition = Vector3.zero; + obj.localRotation = Quaternion.identity; + obj.localScale = Vector3.one; + gameObject.layer = WrapContent.gameObject.layer; + NGUITools.AddChild(gameObject, Item).SetActive(value: true); + gameObject.SetActive(value: true); + Items[i] = gameObject; + } + } +} diff --git a/SVSim.BattleEngine/Engine/Mail.cs b/SVSim.BattleEngine/Engine/Mail.cs new file mode 100644 index 0000000..da4b557 --- /dev/null +++ b/SVSim.BattleEngine/Engine/Mail.cs @@ -0,0 +1,566 @@ +using System; +using System.Collections.Generic; +using Cute; +using UnityEngine; +using Wizard; +using Wizard.ErrorDialog; + +public class Mail : UIBase +{ + private enum TAB_TYPE + { + NONE, + GIFT, + HISTORY + } + + private enum MAIL_ACTION_TYPE + { + NONE, + READ, + READALL + } + + [SerializeField] + private NguiObjs HistoryButton; + + [SerializeField] + private NguiObjs GiftButton; + + [SerializeField] + private UILabel GiftInfoLabel; + + [SerializeField] + private UIButton _giftTabButton; + + [SerializeField] + private UIButton _historyTabButton; + + [SerializeField] + private UIButton _allReceiveButton; + + [SerializeField] + private UILabel MailEmptyLabel; + + [SerializeField] + private UIWrapContentWizard WrapContent; + + [SerializeField] + private GameObject MailTemplate; + + [SerializeField] + private NguiObjs ReadAllMailButton; + + [SerializeField] + private GameObject MailReceive; + + [SerializeField] + private UIScrollBarWrapContent ScrollBar; + + [SerializeField] + private WrapContentsScrollBarSize WrapScrollbar; + + [SerializeField] + private UIScrollView ScrollView; + + private const int SCROLL_ITEM_COUNT = 5; + + private List _scrollItems = new List(); + + private const int MaxMailObjIndex = 100; + + private int _readMailID; + + private List _currentList; + + private TopBar _topBar; + + private TAB_TYPE _tabType; + + private MAIL_ACTION_TYPE _mailActionType = MAIL_ACTION_TYPE.READ; + + private const int HISTORY_MAX = 500; + + private int _lastHistoryCount; + + private List _assetList = new List(); + + private ResourceHandler _resourceHandler; + + private bool IsTutorial => Wizard.Data.Load.data._userTutorial.TutorialStep != 100; + + private void SetLanguage() + { + SystemText systemText = Wizard.Data.SystemText; + HistoryButton.labels[0].text = systemText.Get("Mail_0024"); + GiftButton.labels[0].text = systemText.Get("Mail_0002"); + ReadAllMailButton.labels[0].text = systemText.Get("Mail_0004"); + MailEmptyLabel.text = systemText.Get("Mail_0006"); + } + + public override void onFirstStart() + { + base.IsShowFooterMenu = true; + base.onFirstStart(); + _topBar = UIManager.GetInstance().CreateTopBar(base.gameObject, Wizard.Data.SystemText.Get("Mail_0002"), UIManager.ViewScene.MyPage); + SetLanguage(); + WrapContent.EnableNoLimit = false; + WrapContent.onInitializeItem = InitScrollItem; + ScrollBar.m_WrapContents = WrapContent; + HistoryButton.buttons[0].onClick.Clear(); + HistoryButton.buttons[0].onClick.Add(new EventDelegate(delegate + { + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_TOGGLE_ON); + GiftInfoLabel.text = Wizard.Data.SystemText.Get("Mail_0028", 100.ToString()); + ChangeHistory(); + })); + GiftButton.buttons[0].onClick.Clear(); + GiftButton.buttons[0].onClick.Add(new EventDelegate(delegate + { + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_TOGGLE_ON); + GiftInfoLabel.text = Wizard.Data.SystemText.Get("Mail_0027", 100.ToString()); + ChangeGift(); + })); + UIEventListener.Get(ReadAllMailButton.gameObject).onClick = OnReadAllMail; + ChangeGift(); + UIManager.GetInstance().SetLayerRecursive(base.transform, LayerMask.NameToLayer("MyPage")); + _resourceHandler = base.gameObject.AddMissingComponent(); + if (IsTutorial) + { + SetTutorialMode(); + ShowTutorialDialog(); + LoadTutorialResource(); + } + } + + private void LoadTutorialResource() + { + UIManager uiManager = UIManager.GetInstance(); + uiManager.Force_Increment_LockCountChangeView(); + _assetList.AddRange(GameMgr.GetIns().GetEffectMgr().InitCommonEffect("Json/EffectTutorialData", isBattle: true, isField: false, isBattleEffect: false, delegate + { + uiManager.Force_Decrement_LockCountChangeView(); + })); + } + + private void ShowTutorialDialog() + { + DialogBase dialogBase = MyPageMenu.CreateDialogForTutorial(); + dialogBase.SetText(Wizard.Data.SystemText.Get("Tutorial_0011")); + dialogBase.SetButtonLayout(DialogBase.ButtonLayout.OkBtn); + MyPageMenu.Instance.SetGuideToOkOnlyDialog(dialogBase); + dialogBase.OnClose = delegate + { + MyPageMenu.Instance.SetGuideEffect(_allReceiveButton.transform, Vector3.zero, 0f); + }; + } + + private void SetTutorialMode() + { + UIManager.SetObjectToGrey(_historyTabButton.gameObject, b: true); + UIManager.SetObjectToGrey(_giftTabButton.gameObject, b: true); + _topBar.SetBackButtonEnable(enable: false); + UIManager.SetObjectToGrey(_topBar.BuyCrystalButton.gameObject, b: true); + _topBar.BuyCrystalButton.isEnabled = false; + } + + protected override void onOpen() + { + base.onOpen(); + _currentList = Wizard.Data.MailTop.data.mail_data_list; + ResetScrollWrap(); + _tabType = TAB_TYPE.NONE; + ChangeGift(); + GiftInfoLabel.text = Wizard.Data.SystemText.Get("Mail_0027", 100.ToString()); + if (Wizard.Data.MailTop.data.limitOverPresentDeleted) + { + DialogBase dialogBase = UIManager.GetInstance().CreateDialogClose(); + dialogBase.SetTitleLabel(Wizard.Data.SystemText.Get("Mail_0066")); + dialogBase.SetText(Wizard.Data.SystemText.Get("Mail_0067")); + dialogBase.SetSize(DialogBase.Size.S); + dialogBase.SetButtonLayout(DialogBase.ButtonLayout.OkBtn); + } + UIManager.GetInstance().OnReadyViewScene(isFadein: true); + } + + private void ResetScrollWrap() + { + CreateItems(_currentList.Count); + WrapContent.minIndex = -(_currentList.Count - 1); + WrapContent.maxIndex = 0; + WrapScrollbar.ContentUpdate(); + WrapContent.SortBasedOnScrollMovement(); + ScrollView.ResetPosition(); + ScrollBar.gameObject.SetActive(value: true); + ScrollView.UpdateScrollbars(); + } + + private void InitScrollItem(GameObject obj, int wrapIndex, int realIndex) + { + GameObject gameObject = obj.transform.GetChild(0).gameObject; + if (-realIndex < 0 || -realIndex >= _currentList.Count) + { + gameObject.SetActive(value: false); + return; + } + gameObject.SetActive(value: true); + int num = -realIndex; + MailData mailData = _currentList[num]; + if (_tabType == TAB_TYPE.GIFT) + { + SetMailData(gameObject, mailData); + } + else if (_tabType == TAB_TYPE.HISTORY) + { + SetHistoryData(gameObject, mailData); + } + if (num < _currentList.Count - 1) + { + return; + } + if (_tabType == TAB_TYPE.GIFT) + { + MailTopTask mailTopTask = GameMgr.GetIns().GetMailTopTask(); + if (Wizard.Data.MyPage.data.unread_mail_count > mailTopTask.LastPageRead * 100) + { + LoadNextPage(); + } + } + else if (_tabType == TAB_TYPE.HISTORY) + { + int count = Wizard.Data.MailTop.data.mail_history_list.Count; + if (count >= 100 && count < 500 && _lastHistoryCount < 500) + { + LoadNextPage(); + } + } + } + + private void SetMailData(GameObject item, MailData mailData) + { + item.name = mailData.mail_id.ToString(); + AchievementWindowBase component = item.GetComponent(); + component.SetMail(mailData, OnReadMail, _resourceHandler); + if (IsTutorial) + { + component.SetGetButtonToGreyOut(); + } + } + + public override bool IsUseCommonBackground() + { + return true; + } + + private void ChangeHistory() + { + if (_tabType != TAB_TYPE.HISTORY) + { + _tabType = TAB_TYPE.HISTORY; + _currentList = Wizard.Data.MailTop.data.mail_history_list; + _lastHistoryCount = _currentList.Count; + ReadAllMailButton.gameObject.SetActive(value: false); + MailEmptyLabel.gameObject.SetActive(_currentList.Count == 0); + MailEmptyLabel.text = Wizard.Data.SystemText.Get("Mail_0029"); + HistoryButton.buttons[0].isEnabled = false; + GiftButton.buttons[0].isEnabled = true; + ResetScrollWrap(); + } + } + + private void ChangeGift() + { + if (_tabType != TAB_TYPE.GIFT) + { + _tabType = TAB_TYPE.GIFT; + _currentList = Wizard.Data.MailTop.data.mail_data_list; + ReadAllMailButton.gameObject.SetActive(value: true); + bool flag = _currentList.Count == 0; + UIManager.SetObjectToGrey(ReadAllMailButton.gameObject, flag); + MailEmptyLabel.gameObject.SetActive(flag); + MailEmptyLabel.text = Wizard.Data.SystemText.Get("Mail_0006"); + HistoryButton.buttons[0].isEnabled = true; + GiftButton.buttons[0].isEnabled = false; + ResetScrollWrap(); + } + } + + private void CreateItems(int requiredCount) + { + for (int i = 0; i < _scrollItems.Count; i++) + { + UnityEngine.Object.DestroyImmediate(_scrollItems[i]); + } + _scrollItems.Clear(); + requiredCount = Mathf.Min(requiredCount, 5); + for (int j = 0; j < requiredCount; j++) + { + GameObject gameObject = NGUITools.AddChild(WrapContent.gameObject); + NGUITools.AddChild(gameObject, MailTemplate); + gameObject.SetActive(value: true); + _scrollItems.Add(gameObject); + } + } + + private void OpenReadAllDialog(GameObject g) + { + SystemText systemText = Wizard.Data.SystemText; + DialogBase dialogBase = (IsTutorial ? MyPageMenu.CreateDialogForTutorial() : UIManager.GetInstance().CreateDialogClose()); + dialogBase.SetTitleLabel(systemText.Get("Mail_0011")); + dialogBase.SetText(systemText.Get("Mail_0017")); + dialogBase.SetButtonLayout(DialogBase.ButtonLayout.BlueBtn_CancelBtn); + dialogBase.SetButtonText(systemText.Get("Dia_Gift_001_Button")); + dialogBase.onPushButton1 = StartReadRequest; + if (IsTutorial) + { + dialogBase.Button2Grey = true; + dialogBase.SetDialogNoClose(); + MyPageMenu.Instance.SetGuideToOkOnlyDialog(dialogBase); + } + } + + private void PrepareReceiveSingleMail(int mail_index, int mail_id) + { + _readMailID = mail_id; + } + + private void StartReadRequest() + { + switch (_mailActionType) + { + case MAIL_ACTION_TYPE.READ: + { + UIManager.GetInstance().createInSceneCenterLoading(); + MailReadTask mailReadTask2 = new MailReadTask(1); + mailReadTask2.SetParameter(new string[1] { _readMailID.ToString() }, 1, IsTutorial); + StartCoroutine(Toolbox.NetworkManager.Connect(mailReadTask2, OnRequestMailRead, delegate(NetworkTask.ResultCode error) + { + UIManager.GetInstance().closeInSceneCenterLoading(); + BaseTask.OnRequestFailed(error); + }, delegate(int error) + { + UIManager.GetInstance().closeInSceneCenterLoading(); + BaseTask.OnFailedErrorCode(error); + CheckAndRemoveExpiredMail(); + })); + break; + } + case MAIL_ACTION_TYPE.READALL: + { + UIManager.GetInstance().createInSceneCenterLoading(); + MailReadTask mailReadTask = new MailReadTask(1); + int num = ((_currentList.Count > 100) ? 100 : _currentList.Count); + string[] array = new string[num]; + for (int i = 0; i < num; i++) + { + MailData mailData = _currentList[i]; + array[i] = mailData.mail_id.ToString(); + } + mailReadTask.SetParameter(array, 1, IsTutorial); + StartCoroutine(Toolbox.NetworkManager.Connect(mailReadTask, OnRequestMailRead, delegate(NetworkTask.ResultCode error) + { + UIManager.GetInstance().closeInSceneCenterLoading(); + BaseTask.OnRequestFailed(error); + }, delegate(int error) + { + UIManager.GetInstance().closeInSceneCenterLoading(); + BaseTask.OnFailedErrorCode(error); + })); + break; + } + } + } + + private void OnReadMail(int mail_index, int mail_id) + { + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_COMMON_BUTTON); + _mailActionType = MAIL_ACTION_TYPE.READ; + PrepareReceiveSingleMail(mail_index, mail_id); + StartReadRequest(); + } + + private void OnReadAllMail(GameObject g) + { + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_COMMON_BUTTON); + _mailActionType = MAIL_ACTION_TYPE.READALL; + OpenReadAllDialog(g); + } + + private void ShowReadDialog() + { + ReceiveReward receiveReward = base.gameObject.AddMissingComponent(); + DialogBase dialogBase = receiveReward.ShowReadDialog(Wizard.Data.ReadMail.data.total_recieve_count_list, MailReceive, base.gameObject, _resourceHandler); + if (IsTutorial) + { + MyPageMenu.Instance.SetGuideToOkOnlyDialog(dialogBase); + receiveReward.SetAllButtonDisable(); + dialogBase.OnClose = delegate + { + ShowMoveToCardPackDialog(); + }; + } + } + + private void ShowMoveToCardPackDialog() + { + SystemText systemText = Wizard.Data.SystemText; + DialogBase dialogBase = MyPageMenu.CreateDialogForTutorial(); + dialogBase.SetText(systemText.Get("Tutorial_0012")); + dialogBase.SetButtonLayout(DialogBase.ButtonLayout.OkBtn); + MyPageMenu.Instance.SetGuideToOkOnlyDialog(dialogBase); + dialogBase.OnClose = delegate + { + Footer footer = UIManager.GetInstance()._Footer; + for (int i = 0; i < footer._underButtons.Length; i++) + { + footer.SetButtonEnableColorChange(i, i == 5); + } + MyPageMenu.Instance.SetGuideEffect(footer._underButtons[5].transform, MyPageItemHome.TUTORIAL_OFFSET_FOOTER, 180f); + }; + } + + private void OnRequestMailRead(NetworkTask.ResultCode error) + { + MyPageMenu.Instance.OnReadGift(); + _currentList = Wizard.Data.MailTop.data.mail_data_list; + ResetScrollWrap(); + UIManager.GetInstance().closeInSceneCenterLoading(); + bool flag = _currentList.Count == 0; + UIManager.SetObjectToGrey(ReadAllMailButton.gameObject, flag); + MailEmptyLabel.gameObject.SetActive(flag); + if (Wizard.Data.ReadMail.data.is_unreceived_present) + { + DialogBase dialogBase = Dialog.Create(1601); + if (_mailActionType != MAIL_ACTION_TYPE.READ) + { + dialogBase.SetText(Wizard.Data.SystemText.Get("Mail_0049")); + } + if (Wizard.Data.ReadMail.data.total_recieve_count_list.Count > 0) + { + dialogBase.OnClose = ShowReadDialog; + } + } + else if (Wizard.Data.ReadMail.data.total_recieve_count_list.Count == 0) + { + SystemText systemText = Wizard.Data.SystemText; + DialogBase dialogBase2 = UIManager.GetInstance().CreateDialogClose(); + dialogBase2.CloseOnOff(flag: false); + dialogBase2.SetSize(DialogBase.Size.M); + dialogBase2.SetTitleLabel(systemText.Get("ErrorHeader_1601")); + dialogBase2.SetText(systemText.Get("Mail_0053")); + dialogBase2.SetButtonLayout(DialogBase.ButtonLayout.OkBtn); + } + else + { + ShowReadDialog(); + } + } + + private void SetHistoryData(GameObject item, MailData mailData) + { + item.name = mailData.mail_id.ToString(); + item.GetComponent().SetHistoryMail(mailData, _resourceHandler); + } + + public static string GetTimeLeft(long seconds_since_unix) + { + SystemText systemText = Wizard.Data.SystemText; + MailTopTask mailTopTask = GameMgr.GetIns().GetMailTopTask(); + long num = (long)Time.realtimeSinceStartup - mailTopTask.RequestTime; + long num2 = mailTopTask.ServerTime + num; + TimeSpan timeSpan = TimeSpan.FromSeconds(seconds_since_unix - num2); + if (timeSpan.TotalDays >= 1.0) + { + return systemText.Get("Mail_0047", ((int)timeSpan.TotalDays).ToString()); + } + if (timeSpan.TotalHours >= 1.0) + { + return systemText.Get("Mail_0046", ((int)timeSpan.TotalHours).ToString()); + } + int num3 = (int)timeSpan.TotalMinutes; + num3 = ((num3 > 0) ? ((num3 <= 1) ? 1 : num3) : 0); + return systemText.Get("Mail_0048", num3.ToString()); + } + + private void OnRequestMailList(NetworkTask.ResultCode error) + { + if (_tabType == TAB_TYPE.GIFT) + { + _currentList = Wizard.Data.MailTop.data.mail_data_list; + } + else if (_tabType == TAB_TYPE.HISTORY) + { + _currentList = Wizard.Data.MailTop.data.mail_history_list; + } + int count = Wizard.Data.MailTop.data.mail_history_list.Count; + if (count == _lastHistoryCount) + { + _lastHistoryCount = 500; + } + else + { + _lastHistoryCount = count; + } + if (GameMgr.GetIns().GetMailTopTask().LastPageRead == 1) + { + ResetScrollWrap(); + } + else + { + UpdateScrollSize(); + } + UIManager.GetInstance().closeInSceneCenterLoading(); + } + + private void LoadNextPage() + { + UIManager.GetInstance().createInSceneCenterLoading(); + MailTopTask mailTopTask = GameMgr.GetIns().GetMailTopTask(); + mailTopTask.SetParameterToNextPage(); + StartCoroutine(Toolbox.NetworkManager.Connect(mailTopTask, OnRequestMailList, BaseTask.OnRequestFailed, BaseTask.OnFailedErrorCode)); + } + + private void UpdateScrollSize() + { + WrapContent.minIndex = -(_currentList.Count - 1); + WrapScrollbar.ContentUpdate(); + ScrollView.UpdateScrollbars(); + } + + protected override void onClose() + { + base.onClose(); + Toolbox.ResourcesManager.RemoveAssetGroup(_assetList); + _assetList.Clear(); + _resourceHandler.UnloadAll(); + } + + private void CheckAndRemoveExpiredMail() + { + bool flag = false; + for (int num = _currentList.Count - 1; num >= 0; num--) + { + MailData mailData = _currentList[num]; + if (mailData.limit_type == 1 && IsExpired(mailData.reward_limit_time)) + { + _currentList.RemoveAt(num); + flag = true; + } + } + if (flag) + { + ResetScrollWrap(); + bool flag2 = _currentList.Count == 0; + UIManager.SetObjectToGrey(ReadAllMailButton.gameObject, flag2); + MailEmptyLabel.gameObject.SetActive(flag2); + } + } + + private static bool IsExpired(long seconds_since_unix) + { + MailTopTask mailTopTask = GameMgr.GetIns().GetMailTopTask(); + long num = (long)Time.realtimeSinceStartup - mailTopTask.RequestTime; + long num2 = mailTopTask.ServerTime + num; + return TimeSpan.FromSeconds(seconds_since_unix - num2).TotalSeconds <= 0.0; + } +} diff --git a/SVSim.BattleEngine/Engine/OmoteLog.cs b/SVSim.BattleEngine/Engine/OmoteLog.cs new file mode 100644 index 0000000..371c0d3 --- /dev/null +++ b/SVSim.BattleEngine/Engine/OmoteLog.cs @@ -0,0 +1,46 @@ +internal class OmoteLog +{ + private static bool mEnabled; + + protected OmoteLog() + { + } + + public static void SetEnable(bool enabled) + { + mEnabled = enabled; + } + + public static void Info(string format, params object[] args) + { + _ = mEnabled; + } + + public static void Warn(string format, params object[] args) + { + _ = mEnabled; + } + + public static void WarnUnless(bool assertion, string format, params object[] args) + { + if (!mEnabled) + { + } + } + + public static void Error(string format, params object[] args) + { + if (mEnabled) + { + Debug.LogError(string.Format(format, args)); + } + } + + public static void ErrorUnless(bool assertion, string format, params object[] args) + { + if (mEnabled && !assertion) + { + Debug.LogError(string.Format(format, args)); + } + } +} diff --git a/SVSim.BattleEngine/Engine/RoomInviteFriendColum.cs b/SVSim.BattleEngine/Engine/RoomInviteFriendColum.cs new file mode 100644 index 0000000..7796c7c --- /dev/null +++ b/SVSim.BattleEngine/Engine/RoomInviteFriendColum.cs @@ -0,0 +1,40 @@ +using System.Collections.Generic; +using UnityEngine; +using Wizard.UIFriend; + +public class RoomInviteFriendColum : FriendDataBase +{ + [SerializeField] + public UIButton ButtonObject; + + [SerializeField] + private UISprite _guildIcon; + + [SerializeField] + private UISprite _friendIcon; + + [SerializeField] + private UILabel ButtonLabel; + + [SerializeField] + public GameObject UnderLineObject; + + protected int EmblemId; + + protected int DegreeId; + + protected int RankId; + + public override void SetPlayerData(Friend.PlayerData inPlayerData, List inLoadList) + { + base.SetPlayerData(inPlayerData, inLoadList); + if (_guildIcon != null) + { + _guildIcon.gameObject.SetActive(inPlayerData.IsSameGuildMember); + } + if (_friendIcon != null) + { + _friendIcon.gameObject.SetActive(inPlayerData.isFriend); + } + } +} diff --git a/SVSim.BattleEngine/Engine/SetDataTranslateTask.cs b/SVSim.BattleEngine/Engine/SetDataTranslateTask.cs new file mode 100644 index 0000000..2e0cb77 --- /dev/null +++ b/SVSim.BattleEngine/Engine/SetDataTranslateTask.cs @@ -0,0 +1,26 @@ +using Cute; +using Wizard; + +public class SetDataTranslateTask : NetworkTask +{ + public class SetDataTranslateTaskParam : BaseParam + { + public string email_address; + } + + public override string Url => NtDataTranslateManager.GetInstance().GetSetTranslateInfoUrl(); + + public void SetParameter(string address) + { + SetDataTranslateTaskParam setDataTranslateTaskParam = new SetDataTranslateTaskParam(); + setDataTranslateTaskParam.email_address = address; + base.Params = setDataTranslateTaskParam; + } + + protected override int Parse() + { + int result = base.Parse(); + _ = 1; + return result; + } +} diff --git a/SVSim.BattleEngine/Engine/SpecialCrystalBuyFinishDialog.cs b/SVSim.BattleEngine/Engine/SpecialCrystalBuyFinishDialog.cs new file mode 100644 index 0000000..71785b7 --- /dev/null +++ b/SVSim.BattleEngine/Engine/SpecialCrystalBuyFinishDialog.cs @@ -0,0 +1,125 @@ +using System.Collections; +using System.Collections.Generic; +using Cute; +using UnityEngine; +using Wizard; + +public class SpecialCrystalBuyFinishDialog : MonoBehaviour +{ + [SerializeField] + private UILabel _label; + + [SerializeField] + private UITexture _tipsTexture; + + [SerializeField] + private GameObject _begginerRoot; + + [SerializeField] + private UIButton _goToShopButton; + + [SerializeField] + private UIButton _goToShopButton2; + + [SerializeField] + private UILabel _nextSceneLabel; + + private List _assetList = new List(); + + private SpecialCrystalInfo _specialCrystalInfo; + + private DialogBase _dialog; + + private string _productName; + + private static bool NeedExtraResultDialog(SpecialCrystalInfo info) + { + if (!info.EnableExtraResult) + { + return false; + } + return info.ExtraResultPurchaseCount == info.AvailablePurchaseCount; + } + + public static void Create(GameObject prefab, SpecialCrystalInfo info, string productName) + { + DialogBase dialogBase = UIManager.GetInstance().CreateDialogClose(); + SystemText systemText = Data.SystemText; + dialogBase.SetTitleLabel(systemText.Get("MyPage_0051")); + if (NeedExtraResultDialog(info)) + { + SpecialCrystalBuyFinishDialog component = Object.Instantiate(prefab).GetComponent(); + dialogBase.SetSize(DialogBase.Size.M); + dialogBase.SetButtonLayout(DialogBase.ButtonLayout.OkBtn); + dialogBase.onPushButton1 = delegate + { + ReloadMyPage(); + }; + dialogBase.SetObj(component.gameObject); + component._dialog = dialogBase; + component._specialCrystalInfo = info; + component._productName = productName; + } + else + { + dialogBase.SetSize(DialogBase.Size.S); + if (info.Status.StartsWith("80")) + { + dialogBase.SetText(Data.SystemText.Get("MyPage_0116", productName)); + } + else + { + dialogBase.SetText(Data.SystemText.Get("MyPage_0059", productName)); + } + dialogBase.SetButtonLayout(DialogBase.ButtonLayout.CloseBtn); + dialogBase.onPushButton1 = delegate + { + ReloadMyPage(); + }; + } + dialogBase.onCloseWithoutSelect = delegate + { + ReloadMyPage(); + }; + } + + public static void ReloadMyPage() + { + if (UIManager.GetInstance().GetCurrentScene() == UIManager.ViewScene.MyPage) + { + UIManager.GetInstance().ChangeViewScene(UIManager.ViewScene.MyPage); + } + } + + private IEnumerator Start() + { + _label.text = Data.SystemText.Get("MyPage_0059", _productName); + _nextSceneLabel.text = SceneTransition.TransitionData.GetTransitionText(_specialCrystalInfo.ResultDialogNextSceneClick); + ResourcesManager resourceManager = Toolbox.ResourcesManager; + string assetTypePath = Toolbox.ResourcesManager.GetAssetTypePath(_specialCrystalInfo.ExtraResultDialogBGImageFileName, ResourcesManager.AssetLoadPathType.SpecialCrystal); + _assetList.Add(assetTypePath); + yield return StartCoroutine(Toolbox.ResourcesManager.LoadAssetAsync(assetTypePath, null)); + _tipsTexture.mainTexture = resourceManager.LoadObject(resourceManager.GetAssetTypePath(_specialCrystalInfo.ExtraResultDialogBGImageFileName, ResourcesManager.AssetLoadPathType.SpecialCrystal, isfetch: true)) as Texture; + UIEventListener.Get(_goToShopButton.gameObject).onClick = delegate + { + OnClickNextSceneButton(); + }; + UIEventListener.Get(_goToShopButton2.gameObject).onClick = delegate + { + OnClickNextSceneButton(); + }; + } + + private void OnDestroy() + { + Toolbox.ResourcesManager.RemoveAssetGroup(_assetList); + _assetList.Clear(); + } + + private void OnClickNextSceneButton() + { + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_BTN_DECIDE); + MyPageBannerBase.SceneChangeBySetting(_specialCrystalInfo.ResultDialogNextSceneClick, _specialCrystalInfo.ResultDialogNextSceneStatus); + _dialog.Close(); + } +} diff --git a/SVSim.BattleEngine/Engine/SteamManager.cs b/SVSim.BattleEngine/Engine/SteamManager.cs new file mode 100644 index 0000000..1010c92 --- /dev/null +++ b/SVSim.BattleEngine/Engine/SteamManager.cs @@ -0,0 +1,122 @@ +using System; +using System.Text; +using AOT; +using Steamworks; +using UnityEngine; + +[DisallowMultipleComponent] +public class SteamManager : MonoBehaviour +{ + protected static bool s_EverInitialized; + + protected static SteamManager s_instance; + + protected bool m_bInitialized; + + protected SteamAPIWarningMessageHook_t m_SteamAPIWarningMessageHook; + + protected static SteamManager Instance + { + get + { + if (s_instance == null) + { + return new GameObject("SteamManager").AddComponent(); + } + return s_instance; + } + } + + public static bool Initialized => Instance.m_bInitialized; + + [MonoPInvokeCallback(typeof(SteamAPIWarningMessageHook_t))] + protected static void SteamAPIDebugTextHook(int nSeverity, StringBuilder pchDebugText) + { + } + + [RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.SubsystemRegistration)] + private static void InitOnPlayMode() + { + s_EverInitialized = false; + s_instance = null; + } + + protected virtual void Awake() + { + if (s_instance != null) + { + UnityEngine.Object.Destroy(base.gameObject); + return; + } + s_instance = this; + if (s_EverInitialized) + { + throw new Exception("Tried to Initialize the SteamAPI twice in one session!"); + } + UnityEngine.Object.DontDestroyOnLoad(base.gameObject); + if (!Packsize.Test()) + { + Debug.LogError("[Steamworks.NET] Packsize Test returned false, the wrong version of Steamworks.NET is being run in this platform.", this); + } + if (!DllCheck.Test()) + { + Debug.LogError("[Steamworks.NET] DllCheck Test returned false, One or more of the Steamworks binaries seems to be the wrong version.", this); + } + try + { + if (SteamAPI.RestartAppIfNecessary((AppId_t)453480u)) + { + Application.Quit(); + return; + } + } + catch (DllNotFoundException ex) + { + Debug.LogError("[Steamworks.NET] Could not load [lib]steam_api.dll/so/dylib. It's likely not in the correct location. Refer to the README for more details.\n" + ex, this); + Application.Quit(); + return; + } + m_bInitialized = SteamAPI.Init(); + if (!m_bInitialized) + { + Debug.LogError("[Steamworks.NET] SteamAPI_Init() failed. Refer to Valve's documentation or the comment above this line for more information.", this); + } + else + { + s_EverInitialized = true; + } + } + + protected virtual void OnEnable() + { + if (s_instance == null) + { + s_instance = this; + } + if (m_bInitialized && m_SteamAPIWarningMessageHook == null) + { + m_SteamAPIWarningMessageHook = SteamAPIDebugTextHook; + SteamClient.SetWarningMessageHook(m_SteamAPIWarningMessageHook); + } + } + + protected virtual void OnDestroy() + { + if (!(s_instance != this)) + { + s_instance = null; + if (m_bInitialized) + { + SteamAPI.Shutdown(); + } + } + } + + protected virtual void Update() + { + if (m_bInitialized) + { + SteamAPI.RunCallbacks(); + } + } +} diff --git a/SVSim.BattleEngine/Engine/TitleMenu.cs b/SVSim.BattleEngine/Engine/TitleMenu.cs new file mode 100644 index 0000000..596f7ad --- /dev/null +++ b/SVSim.BattleEngine/Engine/TitleMenu.cs @@ -0,0 +1,85 @@ +using UnityEngine; +using Wizard; + +public class TitleMenu : MonoBehaviour +{ + [SerializeField] + protected UIButton BtnCacheClear; + + [SerializeField] + protected UIButton BtnNewInfo; + + [SerializeField] + protected UIButton BtnCs; + + [SerializeField] + protected UIButton _quitBtn; + + [SerializeField] + protected UIButton _deleteUserDataButton; + + public GameObject ParentObject; + + private DialogBase dia; + + private void Start() + { + EventDelegate.Add(BtnCacheClear.onClick, ShowCacheClearInfo); + EventDelegate.Add(BtnNewInfo.onClick, ShowWebViewInfo); + EventDelegate.Add(BtnCs.onClick, ShowFAQInfo); + _quitBtn.gameObject.SetActive(value: true); + EventDelegate.Add(_quitBtn.onClick, Application.Quit); + _deleteUserDataButton.gameObject.SetActive(value: false); + } + + public void ShowWebViewInfo() + { + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_COMMON_BUTTON); + UIManager.GetInstance().WebViewHelper.OpenWebView(WebViewHelper.WebViewType.INFO); + } + + private void ShowFAQInfo() + { + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_COMMON_BUTTON); + DialogSupport.Create(); + } + + private void ShowCacheClearInfo() + { + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_COMMON_BUTTON); + SystemText systemText = Data.SystemText; + dia = UIManager.GetInstance().CreateDialogClose(); + dia.SetSize(DialogBase.Size.M); + dia.SetTitleLabel(systemText.Get("Title_0007")); + dia.SetText(systemText.Get("Title_0008")); + dia.SetButtonLayout(DialogBase.ButtonLayout.BlueBtn_CancelBtn); + dia.SetButtonText(systemText.Get("Dia_Title_001_Button")); + dia.SetReturnMsg(ParentObject, "ClearCache"); + dia.SetPanelDepth(3000); + } + + private void OnClickDeleteUserDataButton() + { + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_COMMON_BUTTON); + DialogBase dialogBase = UIManager.GetInstance().CreateDialogClose(); + dialogBase.SetSize(DialogBase.Size.M); + dialogBase.SetTitleLabel(Data.SystemText.Get("Title_0046")); + dialogBase.SetText(Data.SystemText.Get("Title_0047")); + dialogBase.SetButtonLayout(DialogBase.ButtonLayout.RedBtn_CancelBtn); + dialogBase.SetButtonText(Data.SystemText.Get("Title_0048")); + dialogBase.onPushButton1 = OpenDeleteUserDataConfirmDialog; + dialogBase.SetPanelDepth(3000); + } + + private void OpenDeleteUserDataConfirmDialog() + { + DialogBase dialogBase = UIManager.GetInstance().CreateDialogClose(); + dialogBase.SetSize(DialogBase.Size.M); + dialogBase.SetTitleLabel(Data.SystemText.Get("Title_0051")); + dialogBase.SetText(Data.SystemText.Get("Title_0049")); + dialogBase.SetButtonLayout(DialogBase.ButtonLayout.RedBtn_CancelBtn); + dialogBase.SetButtonText(Data.SystemText.Get("Title_0048")); + dialogBase.SetReturnMsg(ParentObject, "DeleteUserData"); + dialogBase.SetPanelDepth(3000); + } +} diff --git a/SVSim.BattleEngine/Engine/TweenAlphaExtension.cs b/SVSim.BattleEngine/Engine/TweenAlphaExtension.cs new file mode 100644 index 0000000..0fa9bb0 --- /dev/null +++ b/SVSim.BattleEngine/Engine/TweenAlphaExtension.cs @@ -0,0 +1,21 @@ +using AnimationOrTween; + +public static class TweenAlphaExtension +{ + public static void PlayPingPong(this TweenAlpha tweenAlpha, bool isIncreaseAlpha) + { + float num = tweenAlpha.from; + float num2 = tweenAlpha.to; + if ((isIncreaseAlpha && num > num2) || (!isIncreaseAlpha && num < num2)) + { + float num3 = num; + num = num2; + num2 = num3; + } + bool flag = tweenAlpha.direction == Direction.Forward; + tweenAlpha.from = (flag ? num : num2); + tweenAlpha.to = (flag ? num2 : num); + tweenAlpha.ResetToBeginning(); + tweenAlpha.PlayForward(); + } +} diff --git a/SVSim.BattleEngine/Engine/UIButtonExtension.cs b/SVSim.BattleEngine/Engine/UIButtonExtension.cs new file mode 100644 index 0000000..596c56e --- /dev/null +++ b/SVSim.BattleEngine/Engine/UIButtonExtension.cs @@ -0,0 +1,20 @@ +public static class UIButtonExtension +{ + public static void CopyButtonParameters(this UIButton dst, UIButton src) + { + dst.tweenTarget = src.tweenTarget; + dst.hover = src.hover; + dst.pressed = src.pressed; + dst.disabledColor = src.disabledColor; + dst.duration = src.duration; + dst.dragHighlight = src.dragHighlight; + dst.hoverSprite = src.hoverSprite; + dst.pressedSprite = src.pressedSprite; + dst.disabledSprite = src.disabledSprite; + dst.hoverSprite2D = src.hoverSprite2D; + dst.pressedSprite2D = src.pressedSprite2D; + dst.disabledSprite2D = src.disabledSprite2D; + dst.pixelSnap = src.pixelSnap; + dst.onClick = src.onClick; + } +} diff --git a/SVSim.BattleEngine/Engine/UIDragDropItem.cs b/SVSim.BattleEngine/Engine/UIDragDropItem.cs new file mode 100644 index 0000000..5e9550f --- /dev/null +++ b/SVSim.BattleEngine/Engine/UIDragDropItem.cs @@ -0,0 +1,360 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using UnityEngine; + +[AddComponentMenu("NGUI/Interaction/Drag and Drop Item")] +public class UIDragDropItem : MonoBehaviour +{ + public enum Restriction + { + None, + Horizontal, + Vertical, + PressAndHold + } + + public Restriction restriction; + + public bool cloneOnDrag; + + [HideInInspector] + public float pressAndHoldDelay = 1f; + + public bool interactable = true; + + public bool IsGridRepositionUse = true; + + [NonSerialized] + protected Transform mTrans; + + [NonSerialized] + protected Transform mParent; + + [NonSerialized] + protected Collider mCollider; + + [NonSerialized] + protected Collider2D mCollider2D; + + [NonSerialized] + protected UIButton mButton; + + [NonSerialized] + protected UIRoot mRoot; + + [NonSerialized] + protected UIGrid mGrid; + + [NonSerialized] + protected UITable mTable; + + [NonSerialized] + protected float mDragStartTime; + + [NonSerialized] + protected UIDragScrollView mDragScrollView; + + [NonSerialized] + protected bool mPressed; + + [NonSerialized] + protected bool mDragging; + + [NonSerialized] + protected UICamera.MouseOrTouch mTouch; + + public static List draggedItems = new List(); + + protected virtual void Awake() + { + mTrans = base.transform; + mCollider = base.gameObject.GetComponent(); + mCollider2D = base.gameObject.GetComponent(); + } + + protected virtual void OnEnable() + { + } + + protected virtual void OnDisable() + { + if (mDragging) + { + StopDragging(UICamera.hoveredObject); + } + } + + protected virtual void Start() + { + mButton = GetComponent(); + mDragScrollView = GetComponent(); + } + + protected virtual void OnPress(bool isPressed) + { + if (!interactable || UICamera.currentTouchID == -2 || UICamera.currentTouchID == -3) + { + return; + } + if (isPressed) + { + if (!mPressed) + { + mTouch = UICamera.currentTouch; + mDragStartTime = RealTime.time + pressAndHoldDelay; + mPressed = true; + } + } + else if (mPressed && mTouch == UICamera.currentTouch) + { + mPressed = false; + mTouch = null; + } + } + + protected virtual void Update() + { + if (restriction == Restriction.PressAndHold && mPressed && !mDragging && mDragStartTime < RealTime.time) + { + StartDragging(); + } + } + + protected virtual void OnDragStart() + { + if (!interactable || !base.enabled || mTouch != UICamera.currentTouch) + { + return; + } + if (restriction != Restriction.None) + { + if (restriction == Restriction.Horizontal) + { + Vector2 totalDelta = mTouch.totalDelta; + if (Mathf.Abs(totalDelta.x) < Mathf.Abs(totalDelta.y)) + { + return; + } + } + else if (restriction == Restriction.Vertical) + { + Vector2 totalDelta2 = mTouch.totalDelta; + if (Mathf.Abs(totalDelta2.x) > Mathf.Abs(totalDelta2.y)) + { + return; + } + } + else if (restriction == Restriction.PressAndHold) + { + return; + } + } + StartDragging(); + } + + public virtual void StartDragging() + { + if (!interactable || mDragging) + { + return; + } + if (cloneOnDrag) + { + mPressed = false; + GameObject gameObject = NGUITools.AddChild(base.transform.parent.gameObject, base.gameObject); + gameObject.transform.localPosition = base.transform.localPosition; + gameObject.transform.localRotation = base.transform.localRotation; + gameObject.transform.localScale = base.transform.localScale; + UIButtonColor component = gameObject.GetComponent(); + if (component != null) + { + component.defaultColor = GetComponent().defaultColor; + } + if (mTouch != null && mTouch.pressed == base.gameObject) + { + mTouch.current = gameObject; + mTouch.pressed = gameObject; + mTouch.dragged = gameObject; + mTouch.last = gameObject; + } + UIDragDropItem component2 = gameObject.GetComponent(); + component2.mTouch = mTouch; + component2.mPressed = true; + component2.mDragging = true; + component2.Start(); + component2.OnClone(base.gameObject); + component2.OnDragDropStart(); + if (UICamera.currentTouch == null) + { + UICamera.currentTouch = mTouch; + } + mTouch = null; + UICamera.Notify(base.gameObject, "OnPress", false); + UICamera.Notify(base.gameObject, "OnHover", false); + } + else + { + mDragging = true; + OnDragDropStart(); + } + } + + protected virtual void OnClone(GameObject original) + { + } + + protected virtual void OnDrag(Vector2 delta) + { + if (interactable && mDragging && base.enabled && mTouch == UICamera.currentTouch) + { + OnDragDropMove(delta * mRoot.pixelSizeAdjustment); + } + } + + protected virtual void OnDragEnd() + { + if (interactable && base.enabled && mTouch == UICamera.currentTouch) + { + StopDragging(UICamera.hoveredObject); + } + } + + public void StopDragging(GameObject go) + { + if (mDragging) + { + mDragging = false; + OnDragDropRelease(go); + } + } + + protected virtual void OnDragDropStart() + { + if (!draggedItems.Contains(this)) + { + draggedItems.Add(this); + } + if (mDragScrollView != null) + { + mDragScrollView.enabled = false; + } + if (mButton != null) + { + mButton.isEnabled = false; + } + else if (mCollider != null) + { + mCollider.enabled = false; + } + else if (mCollider2D != null) + { + mCollider2D.enabled = false; + } + mParent = mTrans.parent; + mRoot = NGUITools.FindInParents(mParent); + mGrid = NGUITools.FindInParents(mParent); + mTable = NGUITools.FindInParents(mParent); + if (UIDragDropRoot.root != null) + { + mTrans.parent = UIDragDropRoot.root; + } + Vector3 localPosition = mTrans.localPosition; + localPosition.z = 0f; + mTrans.localPosition = localPosition; + TweenPosition component = GetComponent(); + if (component != null) + { + component.enabled = false; + } + SpringPosition component2 = GetComponent(); + if (component2 != null) + { + component2.enabled = false; + } + NGUITools.MarkParentAsChanged(base.gameObject); + if (mTable != null) + { + mTable.repositionNow = true; + } + if (mGrid != null) + { + mGrid.repositionNow = true; + } + } + + protected virtual void OnDragDropMove(Vector2 delta) + { + mTrans.localPosition += (Vector3)delta; + } + + protected virtual void OnDragDropRelease(GameObject surface) + { + if (!cloneOnDrag) + { + if (mButton != null) + { + mButton.isEnabled = true; + } + else if (mCollider != null) + { + mCollider.enabled = true; + } + else if (mCollider2D != null) + { + mCollider2D.enabled = true; + } + UIDragDropContainer uIDragDropContainer = (surface ? NGUITools.FindInParents(surface) : null); + if (uIDragDropContainer != null) + { + mTrans.parent = ((uIDragDropContainer.reparentTarget != null) ? uIDragDropContainer.reparentTarget : uIDragDropContainer.transform); + Vector3 localPosition = mTrans.localPosition; + localPosition.z = 0f; + mTrans.localPosition = localPosition; + } + else + { + mTrans.parent = mParent; + } + mParent = mTrans.parent; + mGrid = NGUITools.FindInParents(mParent); + mTable = NGUITools.FindInParents(mParent); + if (mDragScrollView != null) + { + StartCoroutine(EnableDragScrollView()); + } + NGUITools.MarkParentAsChanged(base.gameObject); + if (mTable != null) + { + mTable.repositionNow = true; + } + if (!IsGridRepositionUse) + { + mGrid = null; + } + if (mGrid != null) + { + mGrid.repositionNow = true; + } + } + else + { + NGUITools.Destroy(base.gameObject); + } + OnDragDropEnd(); + } + + protected virtual void OnDragDropEnd() + { + draggedItems.Remove(this); + } + + protected IEnumerator EnableDragScrollView() + { + yield return new WaitForEndOfFrame(); + if (mDragScrollView != null) + { + mDragScrollView.enabled = true; + } + } +} diff --git a/SVSim.BattleEngine/Engine/UISpriteExtension.cs b/SVSim.BattleEngine/Engine/UISpriteExtension.cs new file mode 100644 index 0000000..1d6715b --- /dev/null +++ b/SVSim.BattleEngine/Engine/UISpriteExtension.cs @@ -0,0 +1,19 @@ +public static class UISpriteExtension +{ + public static void CopySpriteParameters(this UISprite dst, UISprite src) + { + dst.type = src.type; + dst.flip = src.flip; + dst.border = src.border; + dst.centerType = src.centerType; + dst.fillDirection = src.fillDirection; + dst.fillAmount = src.fillAmount; + dst.invert = src.invert; + dst.leftType = src.leftType; + dst.rightType = src.rightType; + dst.topType = src.topType; + dst.bottomType = src.bottomType; + dst.atlas = src.atlas; + dst.spriteName = src.spriteName; + } +} diff --git a/SVSim.BattleEngine/Engine/UITweenPosition.cs b/SVSim.BattleEngine/Engine/UITweenPosition.cs new file mode 100644 index 0000000..76f4f12 --- /dev/null +++ b/SVSim.BattleEngine/Engine/UITweenPosition.cs @@ -0,0 +1,169 @@ +using UnityEngine; + +public class UITweenPosition : MonoBehaviour +{ + public delegate void FinishCallBack(UITweenPosition in_FadeObject); + + [SerializeField] + public AnimationCurve Curve; + + public Vector2 From; + + public Vector2 To; + + private Vector2 _fromStart; + + private Vector2 _toStart; + + public float DelayTime; + + public float EndTime; + + private UIPanel _getPanel; + + private UIWidget _getWidget; + + private UIRect _getRect; + + private bool _isEnd; + + private float _timer; + + public Vector2 Value { get; set; } + + public FinishCallBack OnFinishCallBack { get; set; } + + public bool IsPlay { get; protected set; } + + public bool IsPlayFoward { get; set; } + + private void Awake() + { + _getPanel = base.gameObject.GetComponent(); + if (_getPanel != null) + { + _getRect = _getPanel; + } + else + { + _getWidget = base.gameObject.GetComponent(); + if (_getWidget == null && _getPanel == null) + { + _getWidget = base.gameObject.AddComponent(); + } + _getRect = _getWidget; + } + IsPlay = false; + Curve.postWrapMode = WrapMode.Once; + Curve.preWrapMode = WrapMode.Once; + } + + private void Update() + { + if (IsPlay) + { + _timer += Time.deltaTime; + if (_timer >= DelayTime) + { + float b = (_timer - DelayTime) / (Curve.keys[Curve.length - 1].time * EndTime); + b = Mathf.Min(Curve.keys[Curve.length - 1].time, b); + float x; + float y; + if (IsPlayFoward) + { + x = _fromStart.x + (To.x - _fromStart.x) * Curve.Evaluate(b); + y = _fromStart.y + (To.y - _fromStart.y) * Curve.Evaluate(b); + } + else + { + x = From.x + (_toStart.x - From.x) * Curve.Evaluate(Curve.keys[Curve.length - 1].time - b); + y = From.y + (_toStart.y - From.y) * Curve.Evaluate(Curve.keys[Curve.length - 1].time - b); + } + Value = new Vector2(x, y); + base.gameObject.transform.localPosition = Value; + if (b >= Curve.keys[Curve.length - 1].time) + { + if (IsPlayFoward) + { + base.gameObject.transform.localPosition = To; + } + else + { + base.gameObject.transform.localPosition = From; + } + IsPlay = false; + _isEnd = true; + _getRect.gameObject.SetActive(value: false); + _getRect.gameObject.SetActive(value: true); + } + } + } + if (_isEnd) + { + if (OnFinishCallBack != null) + { + OnFinishCallBack(this); + } + _isEnd = false; + } + } + + public void Cancel(bool setFrom = false, bool setTo = false) + { + IsPlay = false; + if (setFrom) + { + base.gameObject.transform.localPosition = new Vector2(From.x, From.y); + } + else if (setTo) + { + base.gameObject.transform.localPosition = new Vector2(To.x, To.y); + } + } + + public void PlayForward(bool resetFlag = false) + { + IsPlayFoward = true; + if (resetFlag) + { + _fromStart = From; + } + else + { + _fromStart = new Vector2(base.transform.localPosition.x, base.transform.localPosition.y); + } + if (base.gameObject.transform.localPosition.x != To.x || base.gameObject.transform.localPosition.y != To.y || resetFlag) + { + IsPlay = true; + _timer = 0f; + Update(); + } + else + { + _isEnd = true; + } + } + + public void PlayReverse(bool resetFlag = false) + { + IsPlayFoward = false; + if (resetFlag) + { + _toStart = To; + } + else + { + _toStart = new Vector2(base.transform.localPosition.x, base.transform.localPosition.y); + } + if (base.gameObject.transform.localPosition.x != From.x || base.gameObject.transform.localPosition.y != From.y || resetFlag) + { + IsPlay = true; + _timer = 0f; + Update(); + } + else + { + _isEnd = true; + } + } +} diff --git a/SVSim.BattleEngine/Engine/UIWidgetExtension.cs b/SVSim.BattleEngine/Engine/UIWidgetExtension.cs new file mode 100644 index 0000000..0aaacad --- /dev/null +++ b/SVSim.BattleEngine/Engine/UIWidgetExtension.cs @@ -0,0 +1,20 @@ +public static class UIWidgetExtension +{ + public static void CopyWidgetParameters(this UIWidget dst, UIWidget src) + { + dst.leftAnchor = src.leftAnchor; + dst.rightAnchor = src.rightAnchor; + dst.topAnchor = src.topAnchor; + dst.bottomAnchor = src.bottomAnchor; + dst.updateAnchors = src.updateAnchors; + dst.drawRegion = src.drawRegion; + dst.width = src.width; + dst.height = src.height; + dst.color = src.color; + dst.pivot = src.pivot; + dst.depth = src.depth; + dst.aspectRatio = src.aspectRatio; + dst.keepAspectRatio = src.keepAspectRatio; + dst.autoResizeBoxCollider = src.autoResizeBoxCollider; + } +} diff --git a/SVSim.BattleEngine/Engine/UIWrapContentWizard.cs b/SVSim.BattleEngine/Engine/UIWrapContentWizard.cs new file mode 100644 index 0000000..9302cf7 --- /dev/null +++ b/SVSim.BattleEngine/Engine/UIWrapContentWizard.cs @@ -0,0 +1,7 @@ +public class UIWrapContentWizard : UIWrapContent +{ + public void resetItems() + { + ResetChildPositions(); + } +} diff --git a/SVSim.BattleEngine/Engine/UserTicketCountContents.cs b/SVSim.BattleEngine/Engine/UserTicketCountContents.cs new file mode 100644 index 0000000..5ee969a --- /dev/null +++ b/SVSim.BattleEngine/Engine/UserTicketCountContents.cs @@ -0,0 +1,163 @@ +using System; +using Cute; +using UnityEngine; +using Wizard; + +public class UserTicketCountContents : MonoBehaviour +{ + public struct ItemColumn + { + public int UserGoodsId; + + public string IconTextureName; + + public int PossetionNumber; + + public string unitFormat; + + public string TimeLimit { get; set; } + } + + [SerializeField] + private UIButton ButtonChangeScene; + + [SerializeField] + private UILabel ButtonLabel; + + [SerializeField] + private UILabel ItemNameLabel; + + [SerializeField] + private UILabel InfoLabel; + + [SerializeField] + private UITexture IconTexture; + + [SerializeField] + private UILabel _timeLimitLabel; + + public void SetData(ItemColumn item, Action onClick) + { + int userGoodsId = item.UserGoodsId; + IconTexture.mainTexture = Toolbox.ResourcesManager.LoadObject(Toolbox.ResourcesManager.GetAssetTypePath(item.IconTextureName, ResourcesManager.AssetLoadPathType.Item, isfetch: true)); + ItemNameLabel.text = string.Format(item.unitFormat, UserGoods.getUserGoodsName(UserGoods.Type.Item, item.UserGoodsId), item.PossetionNumber.ToString()); + InfoLabel.text = Data.Master.GetItemText("ITI_" + userGoodsId); + if (string.IsNullOrEmpty(item.TimeLimit)) + { + _timeLimitLabel.gameObject.SetActive(value: false); + } + else + { + _timeLimitLabel.gameObject.SetActive(value: true); + _timeLimitLabel.text = Data.SystemText.Get("Shop_0193", item.TimeLimit); + } + UIManager.SetObjectToGrey(ButtonChangeScene.gameObject, b: false); + ButtonChangeScene.gameObject.SetActive(value: true); + ButtonChangeScene.onClick.Clear(); + SceneTransition.TransitionData transitionData; + switch (userGoodsId) + { + case 1: + ButtonLabel.text = Data.SystemText.Get("Arena_NewMode"); + ButtonChangeScene.onClick.Add(new EventDelegate(delegate + { + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_BTN_DECIDE); + transitionData = new SceneTransition.TransitionData("2pick"); + SceneTransition.ChangeScene(transitionData, null); + })); + break; + case 2: + ButtonLabel.text = Data.SystemText.Get("Colosseum_0001"); + if (Data.MaintenanceCodeList.Contains(NetworkDefine.MAINTENANCE_TYPE.COLOSSEUM)) + { + UIManager.SetObjectToGrey(ButtonChangeScene.gameObject, b: true); + } + else if (Data.ArenaData.ColosseumData.IsColosseumPeriod) + { + ButtonChangeScene.onClick.Add(new EventDelegate(delegate + { + transitionData = new SceneTransition.TransitionData("colosseum"); + SceneTransition.ChangeScene(transitionData, null); + })); + } + else + { + UIManager.SetObjectToGrey(ButtonChangeScene.gameObject, b: true); + } + break; + case 2001: + case 2002: + case 2004: + ButtonLabel.text = Data.SystemText.Get("Bingo_0023"); + ButtonChangeScene.onClick.Add(new EventDelegate(delegate + { + UIManager.GetInstance().ChangeViewScene(UIManager.ViewScene.Bingo); + })); + break; + default: + if (Data.Load.data.UserItemNotStartList.Contains(userGoodsId)) + { + ButtonChangeScene.gameObject.SetActive(value: false); + } + if (Item.IsSpotCardBuildDeckTicket(userGoodsId)) + { + ButtonLabel.text = Data.SystemText.Get("Shop_0200"); + GiftTransition giftTransition = Data.Master.GiftTransitionList.Find((GiftTransition data) => data._rewardType == 4 && data._rewardDetailId == userGoodsId); + if (giftTransition != null) + { + ButtonChangeScene.onClick.Add(new EventDelegate(delegate + { + transitionData = new SceneTransition.TransitionData("deck_pack"); + transitionData.Status = giftTransition._buttons[0]._transitionData.Status; + SceneTransition.ChangeScene(transitionData, null); + })); + } + } + else if (Item.IsLeaderSkinTicket(userGoodsId)) + { + ButtonLabel.text = Data.SystemText.Get("Shop_0192"); + GiftTransition giftTransition2 = Data.Master.GiftTransitionList.Find((GiftTransition data) => data._rewardType == 4 && data._rewardDetailId == userGoodsId); + if (giftTransition2 != null) + { + ButtonChangeScene.onClick.Add(new EventDelegate(delegate + { + transitionData = new SceneTransition.TransitionData("leader_skin"); + transitionData.Status = giftTransition2._buttons[0]._transitionData.Status; + SceneTransition.ChangeScene(transitionData, null); + })); + } + } + else + { + if (userGoodsId < 10001) + { + break; + } + ButtonLabel.text = Data.SystemText.Get("Mail_0022"); + if (Data.Master.GiftTransitionList.Find((GiftTransition data) => data._rewardType == 4 && data._rewardDetailId == userGoodsId) != null) + { + if (Data.MaintenanceCodeList.Contains(NetworkDefine.MAINTENANCE_TYPE.SHOP_CARDPACK_MAINTENANCE)) + { + UIManager.SetObjectToGrey(ButtonChangeScene.gameObject, b: true); + break; + } + ButtonChangeScene.onClick.Add(new EventDelegate(delegate + { + transitionData = new SceneTransition.TransitionData("card_pack"); + transitionData.Status = userGoodsId; + SceneTransition.ChangeScene(transitionData, null); + })); + } + else + { + ButtonChangeScene.gameObject.SetActive(value: false); + } + } + break; + } + ButtonChangeScene.onClick.Add(new EventDelegate(delegate + { + onClick.Call(); + })); + } +} diff --git a/SVSim.BattleEngine/Engine/UserTicketCountDialog.cs b/SVSim.BattleEngine/Engine/UserTicketCountDialog.cs new file mode 100644 index 0000000..40d367b --- /dev/null +++ b/SVSim.BattleEngine/Engine/UserTicketCountDialog.cs @@ -0,0 +1,127 @@ +using System; +using System.Collections.Generic; +using Cute; +using UnityEngine; +using Wizard; + +public class UserTicketCountDialog : MonoBehaviour +{ + [SerializeField] + private UIWrapContent _wrapContents; + + [SerializeField] + private WrapContentsScrollBarSize _wrapScrollbarSize; + + [SerializeField] + private UIScrollBarWrapContent _wrapScrollbarContents; + + [SerializeField] + private GameObject _noItemObject; + + private List _loadFileList = new List(); + + private DialogBase _parentDialog; + + private List _itemList = new List(); + + public void Init(DialogBase parentDialog) + { + _parentDialog = parentDialog; + UserTicketCountContents.ItemColumn item = default(UserTicketCountContents.ItemColumn); + for (int i = 0; i < Data.Master.ItemList.Count; i++) + { + int itemNum = PlayerStaticData.GetItemNum(Data.Master.ItemList[i].UserGoodsId); + if (itemNum > 0 && Item.IsTicket(UserGoods.Type.Item, Data.Master.ItemList[i].UserGoodsId)) + { + item.UserGoodsId = Data.Master.ItemList[i].UserGoodsId; + item.IconTextureName = Data.Master.ItemList[i].thumbnail; + item.PossetionNumber = itemNum; + item.unitFormat = Data.Master.ItemList[i].unitFormat; + string value = null; + Data.Load.data.UserItemExpireTimeDictionary.TryGetValue(item.UserGoodsId, out value); + item.TimeLimit = value; + _itemList.Add(item); + _loadFileList.Add(Toolbox.ResourcesManager.GetAssetTypePath(item.IconTextureName, ResourcesManager.AssetLoadPathType.Item)); + } + } + if (_itemList.Count == 0) + { + _noItemObject.SetActive(value: true); + _wrapContents.gameObject.SetActive(value: false); + _wrapScrollbarContents.gameObject.SetActive(value: false); + return; + } + UIScrollView component = _wrapContents.transform.parent.GetComponent(); + UIPanel component2 = component.GetComponent(); + _noItemObject.SetActive(value: false); + _wrapContents.gameObject.SetActive(value: true); + _wrapScrollbarContents.gameObject.SetActive(value: true); + _wrapContents.onInitializeItem = _OnInitializeItem; + _wrapContents.maxIndex = 0; + _wrapScrollbarContents.m_WrapContents = _wrapContents; + _wrapContents.minIndex = -(_itemList.Count - 1); + component.ResetPosition(); + if (component2.height > (float)(_itemList.Count * _wrapContents.itemSize)) + { + component.verticalScrollBar.gameObject.SetActive(value: false); + component.enabled = false; + } + else + { + component.verticalScrollBar.gameObject.SetActive(value: true); + component.enabled = true; + } + parentDialog.SetActive(inActive: false); + UIManager.GetInstance().createInSceneCenterLoading(); + UIManager.GetInstance().StartCoroutine(Toolbox.ResourcesManager.LoadAssetGroupAsync(_loadFileList, delegate + { + parentDialog.SetActive(inActive: true); + UIManager.GetInstance().closeInSceneCenterLoading(); + _wrapScrollbarSize.ContentUpdate(); + _wrapContents.SortBasedOnScrollMovement(); + })); + } + + private void _OnInitializeItem(GameObject go, int wrapIndex, int realIndex) + { + int num = realIndex * -1; + go.name = num.ToString(); + Transform[] componentsInChildren = go.GetComponentsInChildren(includeInactive: true); + Transform[] array; + if (num >= _itemList.Count || num < 0) + { + array = componentsInChildren; + for (int i = 0; i < array.Length; i++) + { + array[i].gameObject.SetActive(value: false); + } + return; + } + array = componentsInChildren; + for (int i = 0; i < array.Length; i++) + { + array[i].gameObject.SetActive(value: true); + } + SetContents(num, go.GetComponent()); + } + + private void SetContents(int ItemListIndex, UserTicketCountContents contents) + { + Action onClick = delegate + { + MoveSceneAction(); + }; + contents.SetData(_itemList[ItemListIndex], onClick); + } + + private void MoveSceneAction() + { + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_BTN_DECIDE); + _parentDialog.Close(); + } + + private void OnDestroy() + { + Toolbox.ResourcesManager.RemoveAssetGroup(_loadFileList); + } +} diff --git a/SVSim.BattleEngine/Engine/VideoHostingImplNull.cs b/SVSim.BattleEngine/Engine/VideoHostingImplNull.cs new file mode 100644 index 0000000..ed963c7 --- /dev/null +++ b/SVSim.BattleEngine/Engine/VideoHostingImplNull.cs @@ -0,0 +1,3 @@ +public class VideoHostingImplNull : VideoHostingImplBase +{ +} diff --git a/SVSim.BattleEngine/Engine/Wizard.Battle.Card/VirtualSpecialSkillBattleCard.cs b/SVSim.BattleEngine/Engine/Wizard.Battle.Card/VirtualSpecialSkillBattleCard.cs new file mode 100644 index 0000000..fbcde61 --- /dev/null +++ b/SVSim.BattleEngine/Engine/Wizard.Battle.Card/VirtualSpecialSkillBattleCard.cs @@ -0,0 +1,31 @@ +using Wizard.Battle.Operation; +using Wizard.Battle.Resource; +using Wizard.Battle.View; +using Wizard.Battle.View.Vfx; + +namespace Wizard.Battle.Card; + +public class VirtualSpecialSkillBattleCard : SpecialSkillBattleCard, IVirtualBattleCard +{ + public bool UsedRandomSkill { get; set; } + + public VirtualSpecialSkillBattleCard(BossRushSpecialSkill skill, BuildInfo buildInfo) + : base(skill, buildInfo) + { + } + + protected override IBattleCardView CreateView(BattleCardView.BuildInfo buildInfo, bool isNullView) + { + return new NullBattleCardView(buildInfo); + } + + protected override ICardVfxCreator CreateVfxCreator(bool isPlayer, IBattleCardView battleCardView, bool isNullView) + { + return NullCardVfxCreator.GetInstance(); + } + + public override SkillCreator CreateSkillCreator(BattlePlayerBase selfBattlPlayer, BattlePlayerBase opponentBattlePlayer, IBattleResourceMgr resourceMgr) + { + return new SimulateSkillCreator(this, selfBattlPlayer, opponentBattlePlayer, _buildInfo.ResourceMgr); + } +} diff --git a/SVSim.BattleEngine/Engine/Wizard.Battle.Operation/SimulateSkillCreator.cs b/SVSim.BattleEngine/Engine/Wizard.Battle.Operation/SimulateSkillCreator.cs new file mode 100644 index 0000000..d424d98 --- /dev/null +++ b/SVSim.BattleEngine/Engine/Wizard.Battle.Operation/SimulateSkillCreator.cs @@ -0,0 +1,27 @@ +using Wizard.Battle.Card; +using Wizard.Battle.Resource; + +namespace Wizard.Battle.Operation; + +public class SimulateSkillCreator : SkillCreator +{ + public SimulateSkillCreator(BattleCardBase ownerCard, BattlePlayerBase selfBattlePlayer, BattlePlayerBase opponentBattlePlayer, IBattleResourceMgr battleResourceMgr) + : base(ownerCard, selfBattlePlayer, opponentBattlePlayer, battleResourceMgr) + { + } + + protected override ISkillSelectFilter CreateRandomSelectFilter(string count) + { + return new SimulateRandomSelectFilter((IVirtualBattleCard)_ownerCard, count); + } + + protected override ISkillSelectFilter CreateIdNoDuplicationRandomSelectFilter(string count) + { + return new SimulateIdNoDuplicationRandomSelectFilter((IVirtualBattleCard)_ownerCard, count); + } + + protected override ISkillSelectFilter CreateCostNoDuplicationRandomSelectFilter(string count) + { + return new SimulateCostNoDuplicationRandomSelectFilter((IVirtualBattleCard)_ownerCard, count); + } +} diff --git a/SVSim.BattleEngine/Engine/Wizard.Battle.Phase/NetworkBattlePhaseCreator.cs b/SVSim.BattleEngine/Engine/Wizard.Battle.Phase/NetworkBattlePhaseCreator.cs new file mode 100644 index 0000000..b56407c --- /dev/null +++ b/SVSim.BattleEngine/Engine/Wizard.Battle.Phase/NetworkBattlePhaseCreator.cs @@ -0,0 +1,17 @@ +namespace Wizard.Battle.Phase; + +public class NetworkBattlePhaseCreator : PhaseCreatorBase +{ + protected readonly NetworkBattleManagerBase _networkBattleManager; + + public NetworkBattlePhaseCreator(NetworkBattleManagerBase battleMgr) + : base(battleMgr) + { + _networkBattleManager = battleMgr; + } + + public override IPhase CreateMulliganPhase() + { + return new NetworkMulliganPhase(_networkBattleManager, _networkBattleManager.NetworkSender); + } +} diff --git a/SVSim.BattleEngine/Engine/Wizard.Battle.Phase/RecoveryNetworkBattleMainPhaseCreator.cs b/SVSim.BattleEngine/Engine/Wizard.Battle.Phase/RecoveryNetworkBattleMainPhaseCreator.cs new file mode 100644 index 0000000..f347b6f --- /dev/null +++ b/SVSim.BattleEngine/Engine/Wizard.Battle.Phase/RecoveryNetworkBattleMainPhaseCreator.cs @@ -0,0 +1,14 @@ +namespace Wizard.Battle.Phase; + +public class RecoveryNetworkBattleMainPhaseCreator : NetworkBattlePhaseCreator +{ + public RecoveryNetworkBattleMainPhaseCreator(NetworkBattleManagerBase battleMgr) + : base(battleMgr) + { + } + + public override IPhase CreateMulliganPhase() + { + return new RecoveryNetworkAfterSubmitMulliganPhase(_networkBattleManager, _networkBattleManager.NetworkSender); + } +} diff --git a/SVSim.BattleEngine/Engine/Wizard.Battle.Phase/RecoveryNetworkBattleMulliganPhaseCreator.cs b/SVSim.BattleEngine/Engine/Wizard.Battle.Phase/RecoveryNetworkBattleMulliganPhaseCreator.cs new file mode 100644 index 0000000..4e76597 --- /dev/null +++ b/SVSim.BattleEngine/Engine/Wizard.Battle.Phase/RecoveryNetworkBattleMulliganPhaseCreator.cs @@ -0,0 +1,14 @@ +namespace Wizard.Battle.Phase; + +public class RecoveryNetworkBattleMulliganPhaseCreator : NetworkBattlePhaseCreator +{ + public RecoveryNetworkBattleMulliganPhaseCreator(NetworkBattleManagerBase battleMgr) + : base(battleMgr) + { + } + + public override IPhase CreateMulliganPhase() + { + return new RecoveryNetworkBeforeSubmitMulliganPhase(_networkBattleManager, _networkBattleManager.NetworkSender); + } +} diff --git a/SVSim.BattleEngine/Engine/Wizard.Battle.Player.Emotion/EnemyAIEmotion.cs b/SVSim.BattleEngine/Engine/Wizard.Battle.Player.Emotion/EnemyAIEmotion.cs new file mode 100644 index 0000000..ec16aa3 --- /dev/null +++ b/SVSim.BattleEngine/Engine/Wizard.Battle.Player.Emotion/EnemyAIEmotion.cs @@ -0,0 +1,20 @@ +using Wizard.Battle.Player.ClassCharacter; +using Wizard.Battle.View.Vfx; + +namespace Wizard.Battle.Player.Emotion; + +public class EnemyAIEmotion : EnemyEmotionBase +{ + private IEnemyAI _enemyAI; + + public EnemyAIEmotion(string emotionId, IClassCharacter classCharacter, IEnemyAI enemyAI) + : base(emotionId, classCharacter) + { + _enemyAI = enemyAI; + } + + public override VfxBase ReceiveOpponentEmotion(ClassCharaPrm.EmotionType emotionType) + { + return _enemyAI.GetEmote(AIEmoteCmdType.ON_RECEIVE, null, emotionType); + } +} diff --git a/SVSim.BattleEngine/Engine/Wizard.Battle.Recovery/AINetworkBattleRecoveryRecordManager.cs b/SVSim.BattleEngine/Engine/Wizard.Battle.Recovery/AINetworkBattleRecoveryRecordManager.cs new file mode 100644 index 0000000..53882e9 --- /dev/null +++ b/SVSim.BattleEngine/Engine/Wizard.Battle.Recovery/AINetworkBattleRecoveryRecordManager.cs @@ -0,0 +1,90 @@ +using System; +using Wizard.Battle.Mulligan; + +namespace Wizard.Battle.Recovery; + +public class AINetworkBattleRecoveryRecordManager : RecoveryRecordManagerBase +{ + protected override string DefaultRecoveryFileName => "recovery_ai_network.json"; + + public AINetworkBattleRecoveryRecordManager() + { + } + + public AINetworkBattleRecoveryRecordManager(string filePath) + : base(filePath) + { + } + + public override void SetupRecording(BattleManagerBase battleMgr, DataMgr.BattleType battleType, int randomSeed, int backGroundId, string bgmId = "NONE") + { + base.SetupRecording(battleMgr, battleType, randomSeed, backGroundId, bgmId); + RecordAINetworkBattleSettings(_recorder, battleType, randomSeed, backGroundId, bgmId); + } + + protected override OperationRecorderBase CreateOperationRecorder() + { + return new AINetworkBattleOperationRecorder(_recoveryFilePath); + } + + protected override void SetupRecorderEvents(OperationRecorderBase operationRecorder, BattleManagerBase battleMgr) + { + base.SetupRecorderEvents(operationRecorder, battleMgr); + BattlePlayer battlePlayer = battleMgr.BattlePlayer; + battlePlayer.OnTurnStartComplete = (Action)Delegate.Combine(battlePlayer.OnTurnStartComplete, new Action(operationRecorder.RecordTurnStart)); + BattleEnemy battleEnemy = battleMgr.BattleEnemy; + battleEnemy.OnTurnStartComplete = (Action)Delegate.Combine(battleEnemy.OnTurnStartComplete, new Action(operationRecorder.RecordTurnStart)); + battleMgr.OperateMgr.OnTurnEnd += operationRecorder.RecordTurnEnd; + } + + public override void SetupMulliganStartTimeRecorderEvent(BattleManagerBase battleMgr) + { + PlayerMulliganCtrl playerMlgCtrl = battleMgr.MulliganMgr.PlayerMlgCtrl; + playerMlgCtrl.OnMulliganLaunchComplete = (Action)Delegate.Combine(playerMlgCtrl.OnMulliganLaunchComplete, new Action(_recorder.RecordMulliganStart)); + } + + protected void RecordAINetworkBattleSettings(OperationRecorderBase operationRecorder, DataMgr.BattleType battleType, int randomSeed, int backGroundId, string bgmId) + { + DataMgr dataMgr = _gameMgr.GetDataMgr(); + operationRecorder.RecordBattleType(battleType); + operationRecorder.RecordRandomSeed(randomSeed); + operationRecorder.RecordBackGroundId(backGroundId); + operationRecorder.RecordBgmId(bgmId); + operationRecorder.RecordClass("player", dataMgr.GetPlayerClassId()); + operationRecorder.RecordSubClass("player", dataMgr.GetPlayerSubClassId()); + if (dataMgr.TryGetPlayerMyRotationInfo(out var myRotationInfo)) + { + operationRecorder.RecordMyRotationId("player", myRotationInfo.Id); + } + operationRecorder.RecordClass("enemy", dataMgr.GetEnemyClassId()); + operationRecorder.RecordSubClass("enemy", dataMgr.GetEnemySubClassId()); + if (dataMgr.TryGetEnemyMyRotationInfo(out var myRotationInfo2)) + { + operationRecorder.RecordMyRotationId("enemy", myRotationInfo2.Id); + } + operationRecorder.RecordChara("player", dataMgr.GetPlayerCharaId()); + operationRecorder.RecordChara("enemy", dataMgr.GetEnemyCharaId()); + operationRecorder.RecordSleeve("player", dataMgr.GetPlayerSleeveId()); + operationRecorder.RecordSleeve("enemy", dataMgr.GetEnemySleeveId()); + operationRecorder.RecordDeck("player", 'p', dataMgr.GetCurrentDeckData()); + operationRecorder.RecordDeck("enemy", 'e', dataMgr.GetCurrentEnemyDeckData()); + operationRecorder.RecordEnemyAIDifficulty(dataMgr.m_EnemyAIDifficulty); + operationRecorder.RecordEnemyAILogicLevel(dataMgr.m_EnemyAILogicLevel); + operationRecorder.RecordEnemyAIMaxLife(dataMgr.m_EnemyAIMaxLife); + operationRecorder.RecordEnemyAIDeckId(dataMgr.m_EnemyAIDeckId); + operationRecorder.RecordEnemyAIStyleId(dataMgr.m_EnemyAIStyleId); + operationRecorder.RecordEnemyAIEmoteId(dataMgr.m_EnemyAIEmoteId); + operationRecorder.RecordEnemyAIUseInnerEmote(dataMgr.m_EnemyAIUseInnerEmote); + operationRecorder.RecordPracticeDifficultyDegreeId(dataMgr.PracticeDifficultyDegreeId); + operationRecorder.RecordIsPreBuildDeck(dataMgr.IsLastSelectDeckAttributeType(DeckAttributeType.BuildDeck)); + operationRecorder.RecordIsTrialDeck(dataMgr.IsLastSelectDeckAttributeType(DeckAttributeType.TrialDeck)); + } + + public void RecordChangeAI(string logicName, int operationQueueCount) + { + if (_recorder is SingleBattleOperationRecorder singleBattleOperationRecorder) + { + singleBattleOperationRecorder.RecordChangeAI(logicName, operationQueueCount); + } + } +} diff --git a/SVSim.BattleEngine/Engine/Wizard.Battle.Recovery/NetworkBattleRecoveryManager.cs b/SVSim.BattleEngine/Engine/Wizard.Battle.Recovery/NetworkBattleRecoveryManager.cs new file mode 100644 index 0000000..3b39f31 --- /dev/null +++ b/SVSim.BattleEngine/Engine/Wizard.Battle.Recovery/NetworkBattleRecoveryManager.cs @@ -0,0 +1,19 @@ +using System; +using System.Collections; +using UnityEngine; +using Wizard.Battle.View.Vfx; + +namespace Wizard.Battle.Recovery; + +public class NetworkBattleRecoveryManager : RecoveryNetworkManagerBase +{ + public override VfxBase Recovery(BattlePlayer battlePlayer, BattleEnemy battleEnemy, Func startCoroutine) + { + return NullVfx.GetInstance(); + } + + public override VfxBase UpdateRecovery() + { + return NullVfx.GetInstance(); + } +} diff --git a/SVSim.BattleEngine/Engine/Wizard.Battle.Recovery/NetworkBattleRecoveryRecordManager.cs b/SVSim.BattleEngine/Engine/Wizard.Battle.Recovery/NetworkBattleRecoveryRecordManager.cs new file mode 100644 index 0000000..5b516ed --- /dev/null +++ b/SVSim.BattleEngine/Engine/Wizard.Battle.Recovery/NetworkBattleRecoveryRecordManager.cs @@ -0,0 +1,17 @@ +namespace Wizard.Battle.Recovery; + +public class NetworkBattleRecoveryRecordManager : RecoveryRecordManagerBase +{ + protected override string DefaultRecoveryFileName => "recovery_network.json"; + + protected override OperationRecorderBase CreateOperationRecorder() + { + return new NetworkBattleOperationRecorder(_recoveryFilePath); + } + + protected override void SetupRecorderEvents(OperationRecorderBase operationRecorder, BattleManagerBase battleMgr) + { + base.SetupRecorderEvents(operationRecorder, battleMgr); + battleMgr.OperateMgr.OnBeforePlayerTurnEnd += operationRecorder.RecordTurnEnd; + } +} diff --git a/SVSim.BattleEngine/Engine/Wizard.Battle.Recovery/RecoveryNetworkManagerBase.cs b/SVSim.BattleEngine/Engine/Wizard.Battle.Recovery/RecoveryNetworkManagerBase.cs new file mode 100644 index 0000000..386a726 --- /dev/null +++ b/SVSim.BattleEngine/Engine/Wizard.Battle.Recovery/RecoveryNetworkManagerBase.cs @@ -0,0 +1,105 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using Wizard.Battle.View.Vfx; + +namespace Wizard.Battle.Recovery; + +public abstract class RecoveryNetworkManagerBase : IRecoveryManager +{ + protected readonly RecoveryOperationInfo _operationInfo; + + protected bool _needUpdate; + + private readonly Queue _skillTargetNameQueue; + + protected Action StartRecoveryEvent; + + protected Action EndDataRecoveryEvent; + + protected Action EndRecoveryEvent; + + public DataMgr.BattleType BattleType => _operationInfo.BattleType; + + public bool? DidPlayerGoFirst => Data.BattleRecoveryInfo.first_turn == PlayerStaticData.UserViewerID; + + public int RandomSeed => Data.BattleRecoveryInfo.seed; + + public bool HasMulliganInfo => false; + + public int BackGroundId => Data.BattleRecoveryInfo.field_id; + + public string BgmId => "NONE"; + + public long RecordTime => long.Parse(DateTime.Now.ToLongTimeString()); + + public int IdxChangeSeed => Data.BattleRecoveryInfo.IdxChangeSeed; + + public static bool failedRecoveryFlag { get; private set; } + + public event Action OnStartRecovery + { + add + { + StartRecoveryEvent = (Action)Delegate.Combine(StartRecoveryEvent, value); + } + remove + { + StartRecoveryEvent = (Action)Delegate.Remove(StartRecoveryEvent, value); + } + } + + public event Action OnEndDataRecovery + { + add + { + EndDataRecoveryEvent = (Action)Delegate.Combine(EndDataRecoveryEvent, value); + } + remove + { + EndDataRecoveryEvent = (Action)Delegate.Remove(EndDataRecoveryEvent, value); + } + } + + public event Action OnEndRecovery + { + add + { + EndRecoveryEvent = (Action)Delegate.Combine(EndRecoveryEvent, value); + } + remove + { + EndRecoveryEvent = (Action)Delegate.Remove(EndRecoveryEvent, value); + } + } + + public RecoveryNetworkManagerBase() + { + } + + public void Setup() + { + DataMgr dataMgr = GameMgr.GetIns().GetDataMgr(); + dataMgr.SetPlayerCharaId(Data.BattleRecoveryInfo.chara_id); + dataMgr.SetEnemyCharaId(Data.BattleRecoveryInfo.opponent_chara_id); + } + + public abstract VfxBase Recovery(BattlePlayer battlePlayer, BattleEnemy battleEnemy, Func startCoroutine); + + public abstract VfxBase UpdateRecovery(); + + public virtual void RecoveryBeforeMulligan() + { + } + + public virtual VfxBase RecoveryMulligan(BattlePlayer battlePlayer, BattleEnemy battleEnemy) + { + return NullVfx.GetInstance(); + } + + public virtual string RecoveryPopSkillTargetCardName() + { + return ""; + } +} diff --git a/SVSim.BattleEngine/Engine/Wizard.Battle.Recovery/SingleBattleOperationRecorder.cs b/SVSim.BattleEngine/Engine/Wizard.Battle.Recovery/SingleBattleOperationRecorder.cs new file mode 100644 index 0000000..2953184 --- /dev/null +++ b/SVSim.BattleEngine/Engine/Wizard.Battle.Recovery/SingleBattleOperationRecorder.cs @@ -0,0 +1,580 @@ +using System; +using System.Collections.Generic; +using LitJson; +using Wizard.Battle.View.Vfx; +using Wizard.Story; + +namespace Wizard.Battle.Recovery; + +public class SingleBattleOperationRecorder : OperationRecorderBase +{ + protected DataMgr.BattleType _battleType; + + protected JsonData _setupJsonData = new JsonData(); + + protected string _tempRecoveryFilePath = ""; + + public SingleBattleOperationRecorder(string filePath, string tempFilePath = "") + : base(filePath) + { + _tempRecoveryFilePath = tempFilePath; + _setupJsonData["player"] = new JsonData(); + _setupJsonData["player"].SetJsonType(JsonType.Object); + _setupJsonData["enemy"] = new JsonData(); + _setupJsonData["enemy"].SetJsonType(JsonType.Object); + DataMgr.SpecialBattleSetting specialBattleSettingInfo = GameMgr.GetIns().GetDataMgr().SpecialBattleSettingInfo; + if (specialBattleSettingInfo != null) + { + RecordSpecialBattleSetting(specialBattleSettingInfo); + } + WriteJsonData(); + } + + public void ClearTempRecoveryFilePath() + { + _tempRecoveryFilePath = string.Empty; + } + + public override void RecordBattleType(DataMgr.BattleType battleType) + { + _battleType = battleType; + WriteJsonData(); + } + + public override void RecordRandomSeed(int randomSeed) + { + _setupJsonData["random_seed"] = randomSeed; + WriteJsonData(); + } + + public override void RecordBackGroundId(int backGroundId) + { + _setupJsonData["background_id"] = backGroundId; + WriteJsonData(); + } + + public override void RecordBgmId(string bgmId) + { + _setupJsonData["bgm_id"] = bgmId; + WriteJsonData(); + } + + public override void RecordClass(string playerName, int clanType) + { + _setupJsonData[playerName]["clan_type"] = clanType; + WriteJsonData(); + } + + public override void RecordSubClass(string playerName, int clanType) + { + _setupJsonData[playerName]["sub_class_type"] = clanType; + WriteJsonData(); + } + + public override void RecordMyRotationId(string playerName, string myRotationId) + { + _setupJsonData[playerName]["my_rotation_id"] = myRotationId; + WriteJsonData(); + } + + public override void RecordSleeve(string playerName, long sleeveId) + { + _setupJsonData[playerName]["sleeve_id"] = sleeveId; + WriteJsonData(); + } + + public override void RecordChara(string playerName, int charaId) + { + _setupJsonData[playerName]["chara_id"] = charaId; + WriteJsonData(); + } + + public override void RecordDeck(string playerName, char indexHeadChar, IEnumerable cardIds) + { + JsonData jsonData = new JsonData(); + _setupJsonData[playerName]["deck"] = jsonData; + jsonData.SetJsonType(JsonType.Array); + int num = 1; + foreach (int cardId in cardIds) + { + JsonData jsonData2 = new JsonData(); + jsonData2.SetJsonType(JsonType.Object); + jsonData2["index"] = indexHeadChar.ToString() + num; + jsonData2["id"] = cardId; + jsonData2["name"] = CardMaster.GetInstanceForBattle().GetCardParameterFromId(cardId).CardName; + jsonData.Add(jsonData2); + num++; + } + WriteJsonData(); + } + + public override void RecordEnemyAIDifficulty(int level) + { + _setupJsonData["enemy"]["ai_difficulty"] = level; + WriteJsonData(); + } + + public override void RecordEnemyAILogicLevel(int level) + { + _setupJsonData["enemy"]["ai_logic_level"] = level; + WriteJsonData(); + } + + public override void RecordEnemyAIMaxLife(int life) + { + _setupJsonData["enemy"]["ai_max_life"] = life; + WriteJsonData(); + } + + public override void RecordEnemyAIDeckId(int deckId) + { + _setupJsonData["enemy"]["ai_deck_id"] = deckId; + WriteJsonData(); + } + + public override void RecordEnemyAIStyleId(int styleId) + { + _setupJsonData["enemy"]["ai_style_id"] = styleId; + WriteJsonData(); + } + + public override void RecordEnemyAIEmoteId(int emoteId) + { + _setupJsonData["enemy"]["ai_emote_id"] = emoteId; + WriteJsonData(); + } + + public override void RecordEnemyAIUseInnerEmote(bool useInnerEmote) + { + _setupJsonData["enemy"]["ai_use_inner_emote"] = useInnerEmote; + WriteJsonData(); + } + + public override void RecordStartTurnIsPlayer(bool startTurnIsPlayer) + { + _setupJsonData["player_start_turn"] = startTurnIsPlayer; + WriteJsonData(); + } + + public override void RecordPracticeDifficultyDegreeId(int degreeId) + { + _setupJsonData["practice_difficulty_degree_id"] = degreeId; + WriteJsonData(); + } + + public override void RecordIsPreBuildDeck(bool isPreBuildDeck) + { + _setupJsonData["is_prebuild_deck"] = isPreBuildDeck; + WriteJsonData(); + } + + public override void RecordIsTrialDeck(bool isTrialDeck) + { + _setupJsonData["is_trial_deck"] = isTrialDeck; + WriteJsonData(); + } + + public override void RecordIsDefaultDeck(bool isDefaultDeck) + { + _setupJsonData["is_default_deck"] = isDefaultDeck; + WriteJsonData(); + } + + public override void RecordQuestStageId(int id) + { + _setupJsonData["quest_stage_id"] = id; + WriteJsonData(); + } + + public override void RecordQuestEnemyAiId(int id) + { + _setupJsonData["quest_enemy_ai_id"] = id; + WriteJsonData(); + } + + public override void RecordQuestEnemyEmblemId(int id) + { + _setupJsonData["quest_enemy_emblem_id"] = id; + WriteJsonData(); + } + + public override void RecordQuestEnemyDegreeId(int id) + { + _setupJsonData["quest_enemy_degree_id"] = id; + WriteJsonData(); + } + + public override void RecordQuestEnemyEmotionOverride(int id) + { + _setupJsonData["quest_enemy_emotion_override"] = id; + WriteJsonData(); + } + + public override void RecordQuestPlayerEmotionOverride(int id) + { + _setupJsonData["quest_player_emotion_override"] = id; + WriteJsonData(); + } + + public override void RecordQuestRecoveryPoint(int recoveryPoint) + { + _setupJsonData["recovery_point"] = recoveryPoint; + WriteJsonData(); + } + + public override void RecordQuestPlayerSkillList(List skills) + { + JsonData jsonData = new JsonData(); + _setupJsonData["quest_player_skill_list"] = jsonData; + jsonData.SetJsonType(JsonType.Array); + foreach (BossRushSpecialSkill skill in skills) + { + JsonData jsonData2 = new JsonData(); + jsonData2.SetJsonType(JsonType.Object); + jsonData2["original_card_id"] = skill.OriginalCardId; + jsonData2["name"] = skill.Name; + jsonData2["skill_text"] = skill.SkillText; + jsonData2["skill_desc_text"] = skill.SkillDescText; + jsonData2["is_foil"] = skill.IsFoil; + jsonData.Add(jsonData2); + } + WriteJsonData(); + } + + public override void RecordQuestEnemySkill(BossRushSpecialSkill skill) + { + JsonData jsonData = new JsonData(); + jsonData.SetJsonType(JsonType.Object); + jsonData["original_card_id"] = skill.OriginalCardId; + jsonData["name"] = skill.Name; + jsonData["skill_text"] = skill.SkillText; + jsonData["skill_desc_text"] = skill.SkillDescText; + jsonData["is_foil"] = skill.IsFoil; + _setupJsonData["quest_enemy_skill"] = jsonData; + WriteJsonData(); + } + + public override void RecordQuestMaxBattleCount(int maxBattleCount) + { + _setupJsonData["quest_max_battle_count"] = maxBattleCount; + WriteJsonData(); + } + + public override void RecordQuestCurrentWinCount(int currentWinCount) + { + _setupJsonData["quest_current_win_count"] = currentWinCount; + WriteJsonData(); + } + + public override void RecordQuestIsExtra(bool isExtra) + { + _setupJsonData["quest_is_extra"] = isExtra; + WriteJsonData(); + } + + public override void RecordQuestIsMockBattle(bool isMockBattle) + { + _setupJsonData["quest_is_mock_battle"] = isMockBattle; + WriteJsonData(); + } + + public override void RecordQuestExtraDeckScheduleId(int id) + { + _setupJsonData["quest_extra_deck_schedule_id"] = id; + WriteJsonData(); + } + + public override void RecordMissionNecessaryInformation(BattleManagerBase.MissionNecessaryInformation missionNecessaryInformation) + { + _setupJsonData["mission_necessary_information"] = new JsonData(); + _setupJsonData["mission_necessary_information"].SetJsonType(JsonType.Object); + foreach (KeyValuePair item in missionNecessaryInformation.GetOriginalTargetDictionary()) + { + _setupJsonData["mission_necessary_information"][item.Key] = item.Value; + } + WriteJsonData(); + } + + public override void RecordStoryData() + { + JsonData jsonData = new StoryRecoveryData(Data.SelectedStoryInfo).ToJsonData(); + foreach (string key in jsonData.Keys) + { + _setupJsonData[key] = jsonData[key]; + } + _setupJsonData["scenario_deck_is_pre_build"] = Data.StoryInfo.IsPreBuildDeck; + _setupJsonData["scenario_deck_is_trial"] = Data.StoryInfo.IsTrialDeck; + WriteJsonData(); + } + + public override void RecordMulliganStart() + { + } + + public override void RecordPractice3DFieldId(int id) + { + _setupJsonData["practice_3d_field_id"] = id; + WriteJsonData(); + } + + public override void RecordPlayerMulliganReplaceCards(IEnumerable replaceCards, IEnumerable completeCards) + { + JsonData jsonData = new JsonData(); + jsonData.SetJsonType(JsonType.Array); + foreach (BattleCardBase replaceCard in replaceCards) + { + jsonData.Add(replaceCard.GetName()); + } + _setupJsonData["player_mulligan_abandon"] = jsonData; + JsonData jsonData2 = new JsonData(); + jsonData2.SetJsonType(JsonType.Array); + foreach (int completeCard in completeCards) + { + jsonData2.Add("p" + completeCard); + } + _setupJsonData["player_mulligan_complete"] = jsonData2; + WriteJsonData(); + } + + public override void RecordEnemyMulliganReplaceCards(IEnumerable replaceCards, IEnumerable completeCards) + { + JsonData jsonData = new JsonData(); + jsonData.SetJsonType(JsonType.Array); + foreach (BattleCardBase replaceCard in replaceCards) + { + jsonData.Add(replaceCard.GetName()); + } + _setupJsonData["enemy_mulligan_abandon"] = jsonData; + JsonData jsonData2 = new JsonData(); + jsonData2.SetJsonType(JsonType.Array); + foreach (int completeCard in completeCards) + { + jsonData2.Add("e" + completeCard); + } + _setupJsonData["enemy_mulligan_complete"] = jsonData2; + WriteJsonData(); + } + + public override void RecordPlay(BattleCardBase card, BattleCardBase originalCard, IEnumerable selectedCards) + { + JsonData jsonData = new JsonData(); + jsonData["ope"] = "play"; + jsonData["index"] = CardToIndexName(card); + jsonData["id"] = card.CardId; + jsonData["name"] = card.BaseParameter.CardName; + jsonData["cost"] = card.Cost; + jsonData["is_choice_brave"] = (originalCard.IsChoiceBraveSkillCard ? 1 : 0); + WriteSkillTargetInfoToJson(selectedCards, jsonData); + _operationJsonDataList.Add(jsonData); + WriteJsonData(); + } + + public override VfxBase RecordAttack(BattleCardBase attackCard, BattleCardBase targetCard, SkillProcessor skillProcessor) + { + JsonData jsonData = new JsonData(); + jsonData["ope"] = "attack"; + jsonData["index"] = CardToIndexName(attackCard); + jsonData["id"] = attackCard.CardId; + jsonData["name"] = attackCard.BaseParameter.CardName; + jsonData["target"] = CardToIndexName(targetCard); + jsonData["target_id"] = targetCard.CardId; + jsonData["target_name"] = targetCard.BaseParameter.CardName; + _operationJsonDataList.Add(jsonData); + WriteJsonData(); + return NullVfx.GetInstance(); + } + + public override void RecordEvolve(BattleCardBase originalCard, BattleCardBase card, IEnumerable selectedCards) + { + JsonData jsonData = new JsonData(); + jsonData["ope"] = "evolve"; + jsonData["index"] = CardToIndexName(card); + jsonData["id"] = card.CardId; + jsonData["name"] = card.BaseParameter.CardName; + WriteSkillTargetInfoToJson(selectedCards, jsonData); + _operationJsonDataList.Add(jsonData); + WriteJsonData(); + } + + public override void RecordStartSelect(BattleCardBase card, bool isEvolve, List selectableCards, bool isChoiceBrave) + { + } + + public override void RecordSelect(BattleCardBase card, bool isEvolve, BattleCardBase actCard, bool isBurialRite, bool isChoiceBrave) + { + } + + public override void RecordCompleteSelect(BattleCardBase card, bool isEvolve, BattleCardBase actCard, bool isChoiceBrave, bool isBurialRite) + { + } + + public override void RecordStartChoice(BattleCardBase card, bool isEvolve, List choiceCards, bool isChoiceBrave) + { + } + + public override void RecordStartFusion(BattleCardBase card, List selectableCards) + { + } + + public override void RecordSelectFusion(BattleCardBase card) + { + } + + public override void RecordCompleteChoice(BattleCardBase card, bool isEvolve, List chosenCardList, BattleCardBase actCard, List chosenCardIndexList, bool hasSelectionSkill, bool isChoiceBrave) + { + } + + public override void RecordCancelChoice(BattleCardBase card, bool isEvolve, bool isChoiceBrave) + { + } + + public override void RecordCancelFusion(BattleCardBase card) + { + } + + public override void RecordCancelSelect(BattleCardBase actCard, bool isEvolve, bool isChoiceBrave) + { + } + + public override void RecordTurnStart() + { + } + + public override void RecordTurnEnd() + { + JsonData jsonData = new JsonData(); + jsonData["ope"] = "turn_end"; + _operationJsonDataList.Add(jsonData); + WriteJsonData(); + } + + public override void RecordRetire() + { + JsonData jsonData = new JsonData(); + jsonData["ope"] = "retire"; + _operationJsonDataList.Add(jsonData); + WriteJsonData(); + } + + public void RecordChangeAI(string logicName, int operationQueueCount) + { + JsonData jsonData = new JsonData(); + jsonData["ope"] = "change_ai"; + jsonData["logic"] = logicName; + jsonData["queue_count"] = operationQueueCount; + _operationJsonDataList.Add(jsonData); + WriteJsonData(); + } + + public override void RecordSkillTargets(IEnumerable targetCards) + { + foreach (BattleCardBase targetCard in targetCards) + { + _skillTargetList.Add(targetCard.GetName()); + } + WriteJsonData(); + } + + public void RecordSpecialBattleSetting(DataMgr.SpecialBattleSetting setting) + { + if (setting != null) + { + _setupJsonData["story_special_battle_player_attach_skill"] = setting.PlayerAttachSkillText; + _setupJsonData["story_special_battle_enemy_attach_skill"] = setting.EnemyAttachSkillText; + _setupJsonData["story_special_battle_player_start_pp"] = setting.PlayerStartPp; + _setupJsonData["story_special_battle_enemy_start_pp"] = setting.EnemyStartPp; + _setupJsonData["story_special_battle_player_current_life"] = setting.PlayerStartLife; + _setupJsonData["story_special_battle_player_start_life"] = setting.PlayerStartMaxLife; + _setupJsonData["story_special_battle_enemy_start_life"] = setting.EnemyStartMaxLife; + _setupJsonData["story_special_battle_id_override_in_battle_log"] = setting.IdOverrideInBattleLogText; + _setupJsonData["story_special_battle_id"] = setting.Id; + _setupJsonData["story_special_battle_banish_effect_override"] = setting.BanishEffectOverRideText; + _setupJsonData["story_special_battle_token_draw_effect_override"] = setting.TokenDrawEffectOverrideText; + _setupJsonData["story_special_battle_special_token_draw_effect_override"] = setting.SpecialTokenDrawEffectOverrideText; + _setupJsonData["story_special_battle_skip_result"] = (int)GameMgr.GetIns().GetDataMgr().SkipStorySpecialBattleResult; + WriteJsonData(); + } + } + + public override void RecordCompleteFusionSelect(BattleCardBase fusionCard, IEnumerable ingredientCards) + { + JsonData jsonData = new JsonData(); + jsonData["ope"] = "comp_fusion"; + jsonData["index"] = CardToIndexName(fusionCard); + jsonData["id"] = fusionCard.CardId; + jsonData["name"] = fusionCard.BaseParameter.CardName; + WriteSkillTargetInfoToJson(ingredientCards, jsonData); + _operationJsonDataList.Add(jsonData); + WriteJsonData(); + } + + protected override void WriteJsonData() + { + if (RecoveryManagerBase.failedRecoveryFlag) + { + return; + } + JsonData jsonData = new JsonData(); + jsonData["version"] = 0; + jsonData["battle_type"] = (int)_battleType; + jsonData["record_time"] = DateTime.Now.Ticks; + jsonData["setup"] = _setupJsonData; + jsonData["operations"] = new JsonData(); + jsonData["operations"].SetJsonType(JsonType.Array); + foreach (JsonData operationJsonData in _operationJsonDataList) + { + jsonData["operations"].Add(operationJsonData); + } + jsonData["check"] = new JsonData(); + jsonData["check"]["player"] = new JsonData(); + jsonData["check"]["player"].SetJsonType(JsonType.Object); + jsonData["check"]["enemy"] = new JsonData(); + jsonData["check"]["enemy"].SetJsonType(JsonType.Object); + BattlePlayer battlePlayer = BattleManagerBase.GetIns().BattlePlayer; + BattleEnemy battleEnemy = BattleManagerBase.GetIns().BattleEnemy; + JsonData jsonData2 = new JsonData(); + jsonData2.SetJsonType(JsonType.Array); + JsonData jsonData3 = new JsonData(); + jsonData3.SetJsonType(JsonType.Array); + JsonData jsonData4 = new JsonData(); + jsonData4.SetJsonType(JsonType.Array); + JsonData jsonData5 = new JsonData(); + jsonData5.SetJsonType(JsonType.Array); + foreach (BattleCardBase handCard in battlePlayer.HandCardList) + { + jsonData2.Add(handCard.GetName()); + } + foreach (BattleCardBase inPlayCard in battlePlayer.InPlayCards) + { + jsonData3.Add(inPlayCard.GetName()); + } + foreach (BattleCardBase handCard2 in battleEnemy.HandCardList) + { + jsonData4.Add(handCard2.GetName()); + } + foreach (BattleCardBase inPlayCard2 in battleEnemy.InPlayCards) + { + jsonData5.Add(inPlayCard2.GetName()); + } + jsonData["check"]["player"]["hand"] = jsonData2; + jsonData["check"]["player"]["inplay"] = jsonData3; + jsonData["check"]["enemy"]["hand"] = jsonData4; + jsonData["check"]["enemy"]["inplay"] = jsonData5; + JsonData jsonData6 = new JsonData(); + jsonData6.SetJsonType(JsonType.Array); + foreach (string skillTarget in _skillTargetList) + { + jsonData6.Add(skillTarget); + } + if (jsonData6.Count > 0) + { + jsonData["skill_targets"] = jsonData6; + } + WriteJsonDataToFile(jsonData); + } + + protected override void WriteJsonDataToFile(JsonData jsonData, string overrideFilePath = "") + { + base.WriteJsonDataToFile(jsonData, _tempRecoveryFilePath); + } +} diff --git a/SVSim.BattleEngine/Engine/Wizard.Battle.Resource/RecoveryBattleResourceMgr.cs b/SVSim.BattleEngine/Engine/Wizard.Battle.Resource/RecoveryBattleResourceMgr.cs new file mode 100644 index 0000000..f838b7c --- /dev/null +++ b/SVSim.BattleEngine/Engine/Wizard.Battle.Resource/RecoveryBattleResourceMgr.cs @@ -0,0 +1,51 @@ +using System; +using Cute; +using Wizard.Battle.View.Vfx; + +namespace Wizard.Battle.Resource; + +public class RecoveryBattleResourceMgr : BattleResourceMgr +{ + private bool _enable; + + public override VfxBase LoadAsset(string path, ResourcesManager.AssetLoadPathType pathType, Action action) + { + if (_enable) + { + return base.LoadAsset(path, pathType, action); + } + return NullVfx.GetInstance(); + } + + public override VfxBase LoadAsset(string fullPath, Action action) + { + if (_enable) + { + return base.LoadAsset(fullPath, action); + } + return NullVfx.GetInstance(); + } + + public override VfxBase LoadEffectBattle(string objectFullPath, string objectPath, string sePath) + { + if (_enable) + { + return base.LoadEffectBattle(objectFullPath, objectPath, sePath); + } + return NullVfx.GetInstance(); + } + + public override VfxBase LoadAndCreateEffectBattleInstance(string objectPath, EffectMgr.EngineType engineType, string sePath, Action loadEndCallback) + { + if (_enable) + { + return base.LoadAndCreateEffectBattleInstance(objectPath, engineType, sePath, loadEndCallback); + } + return NullVfx.GetInstance(); + } + + public void EnableLoadResouce() + { + _enable = true; + } +} diff --git a/SVSim.BattleEngine/Engine/Wizard.Battle.View.Vfx/VfxResultEventExtension.cs b/SVSim.BattleEngine/Engine/Wizard.Battle.View.Vfx/VfxResultEventExtension.cs new file mode 100644 index 0000000..44ebd6b --- /dev/null +++ b/SVSim.BattleEngine/Engine/Wizard.Battle.View.Vfx/VfxResultEventExtension.cs @@ -0,0 +1,47 @@ +using System; + +namespace Wizard.Battle.View.Vfx; + +public static class VfxResultEventExtension +{ + public static VfxBase GetAllFuncVfxResults(this Func func) + { + return CallAllFunc(func, (Delegate f) => ((Func)f)()); + } + + public static VfxBase GetAllFuncVfxResults(this Func func, T1 arg1) + { + return CallAllFunc(func, (Delegate f) => ((Func)f)(arg1)); + } + + public static VfxBase GetAllFuncVfxResults(this Func func, T1 arg1, T2 arg2) + { + return CallAllFunc(func, (Delegate f) => ((Func)f)(arg1, arg2)); + } + + public static VfxBase GetAllFuncVfxResults(this Func func, T1 arg1, T2 arg2, T3 arg3) + { + return CallAllFunc(func, (Delegate f) => ((Func)f)(arg1, arg2, arg3)); + } + + public static VfxBase GetAllFuncVfxResults(this Func func, T1 arg1, T2 arg2, T3 arg3, T4 arg4) + { + return CallAllFunc(func, (Delegate f) => ((Func)f)(arg1, arg2, arg3, arg4)); + } + + private static VfxBase CallAllFunc(Delegate func, Func call) + { + if ((object)func == null) + { + return NullVfx.GetInstance(); + } + ParallelVfxPlayer parallelVfxPlayer = ParallelVfxPlayer.Create(); + Delegate[] invocationList = func.GetInvocationList(); + foreach (Delegate arg in invocationList) + { + VfxBase vfx = call(arg); + parallelVfxPlayer.Register(vfx); + } + return parallelVfxPlayer; + } +} diff --git a/SVSim.BattleEngine/Engine/Wizard.Battle/IBattleCardUniqueIDExtension.cs b/SVSim.BattleEngine/Engine/Wizard.Battle/IBattleCardUniqueIDExtension.cs new file mode 100644 index 0000000..a6808a1 --- /dev/null +++ b/SVSim.BattleEngine/Engine/Wizard.Battle/IBattleCardUniqueIDExtension.cs @@ -0,0 +1,22 @@ +namespace Wizard.Battle; + +public static class IBattleCardUniqueIDExtension +{ + public static bool EquelsID(this IBattleCardUniqueID lhs, IBattleCardUniqueID rhs) + { + if (lhs == null || rhs == null) + { + return false; + } + if (lhs.IsPlayer == rhs.IsPlayer) + { + return lhs.Index == rhs.Index; + } + return false; + } + + public static string GetName(this IBattleCardUniqueID cardId) + { + return (cardId.IsPlayer ? "p" : "e") + cardId.Index; + } +} diff --git a/SVSim.BattleEngine/Engine/Wizard.Bingo/BingoMissionDialog.cs b/SVSim.BattleEngine/Engine/Wizard.Bingo/BingoMissionDialog.cs new file mode 100644 index 0000000..b554dea --- /dev/null +++ b/SVSim.BattleEngine/Engine/Wizard.Bingo/BingoMissionDialog.cs @@ -0,0 +1,55 @@ +using UnityEngine; + +namespace Wizard.Bingo; + +public class BingoMissionDialog : MonoBehaviour +{ + [SerializeField] + private GameObject _bingoMissionItemPrefab; + + [SerializeField] + private UIGrid _grid; + + [SerializeField] + private UIScrollView _scrollPanel; + + private BingoInfoTask.BingoInfoData _bingoInfoData; + + private ResourceHandler _resourceHandler; + + public static void Create(GameObject prefab, BingoInfoTask.BingoInfoData bingoData) + { + DialogBase dialogBase = UIManager.GetInstance().CreateDialogClose(); + BingoMissionDialog missionDialog = Object.Instantiate(prefab).GetComponent(); + missionDialog._resourceHandler = missionDialog.gameObject.AddMissingComponent(); + dialogBase.SetObj(missionDialog.gameObject); + dialogBase.SetSize(DialogBase.Size.M); + dialogBase.SetTitleLabel(Data.SystemText.Get("Bingo_0005")); + dialogBase.SetButtonLayout(DialogBase.ButtonLayout.CloseBtn); + dialogBase.OnClose = delegate + { + missionDialog._resourceHandler.UnloadAll(); + }; + missionDialog.Initialize(bingoData); + } + + private void Initialize(BingoInfoTask.BingoInfoData bingoInfoData) + { + _bingoInfoData = bingoInfoData; + UpdateMissionView(); + } + + private void UpdateMissionView() + { + _grid.transform.DestroyChildren(); + for (int i = 0; i < _bingoInfoData.MissionList.Count; i++) + { + bool flag = i + 1 == _bingoInfoData.MissionList.Count; + AchievementWindowBase component = NGUITools.AddChild(_grid.gameObject, _bingoMissionItemPrefab).GetComponent(); + component.gameObject.SetActive(value: true); + component.SetBingoMission(_bingoInfoData.MissionList[i], !flag, _resourceHandler); + } + _grid.Reposition(); + _scrollPanel.ResetPosition(); + } +} diff --git a/SVSim.BattleEngine/Engine/Wizard.Bingo/BingoRewardsDialog.cs b/SVSim.BattleEngine/Engine/Wizard.Bingo/BingoRewardsDialog.cs new file mode 100644 index 0000000..910f281 --- /dev/null +++ b/SVSim.BattleEngine/Engine/Wizard.Bingo/BingoRewardsDialog.cs @@ -0,0 +1,179 @@ +using UnityEngine; + +namespace Wizard.Bingo; + +public class BingoRewardsDialog : MonoBehaviour +{ + public enum MissionViewTab + { + First, + Second, + Third, + Fourth, + AfterFifth + } + + [SerializeField] + private GameObject _bingoMissionItemPrefab; + + [SerializeField] + private UIGrid _grid; + + private ResourceHandler _resourceHandler; + + [SerializeField] + private UIButton _firstRewardsButton; + + [SerializeField] + private UIButton _secondRewardsButton; + + [SerializeField] + private UIButton _thirdRewardsButton; + + [SerializeField] + private UIButton _fourthRewardsButton; + + [SerializeField] + private UIButton _fifthRewardsButton; + + [SerializeField] + private UIScrollView _scrollPanel; + + private BingoInfoTask.BingoInfoData _bingoInfoData; + + private MissionViewTab _currentViewTab; + + public static void Create(GameObject prefab, BingoInfoTask.BingoInfoData bingoData) + { + DialogBase dialogBase = UIManager.GetInstance().CreateDialogClose(); + BingoRewardsDialog rewardDialog = Object.Instantiate(prefab).GetComponent(); + rewardDialog._resourceHandler = rewardDialog.gameObject.AddMissingComponent(); + dialogBase.SetObj(rewardDialog.gameObject); + dialogBase.SetSize(DialogBase.Size.M); + dialogBase.SetTitleLabel(Data.SystemText.Get("Bingo_0006")); + dialogBase.SetButtonLayout(DialogBase.ButtonLayout.CloseBtn); + dialogBase.OnClose = delegate + { + rewardDialog._resourceHandler.UnloadAll(); + }; + rewardDialog.Initialize(bingoData); + } + + private void Initialize(BingoInfoTask.BingoInfoData bingoInfoData) + { + _bingoInfoData = bingoInfoData; + MissionViewTab viewTab = (MissionViewTab)Mathf.Clamp(_bingoInfoData.SheetNum - 1, 0, 4); + OnPushTabButton(viewTab, firstCall: true); + _firstRewardsButton.onClick.Clear(); + _firstRewardsButton.GetComponentInChildren().text = string.Format(Data.SystemText.Get("Bingo_0012"), GetCurrentTabIndex(MissionViewTab.First)); + _firstRewardsButton.onClick.Add(new EventDelegate(delegate + { + OnPushTabButton(MissionViewTab.First); + })); + _secondRewardsButton.onClick.Clear(); + _secondRewardsButton.GetComponentInChildren().text = string.Format(Data.SystemText.Get("Bingo_0012"), GetCurrentTabIndex(MissionViewTab.Second)); + _secondRewardsButton.onClick.Add(new EventDelegate(delegate + { + OnPushTabButton(MissionViewTab.Second); + })); + _thirdRewardsButton.onClick.Clear(); + _thirdRewardsButton.GetComponentInChildren().text = string.Format(Data.SystemText.Get("Bingo_0012"), GetCurrentTabIndex(MissionViewTab.Third)); + _thirdRewardsButton.onClick.Add(new EventDelegate(delegate + { + OnPushTabButton(MissionViewTab.Third); + })); + _fourthRewardsButton.onClick.Clear(); + _fourthRewardsButton.GetComponentInChildren().text = string.Format(Data.SystemText.Get("Bingo_0012"), GetCurrentTabIndex(MissionViewTab.Fourth)); + _fourthRewardsButton.onClick.Add(new EventDelegate(delegate + { + OnPushTabButton(MissionViewTab.Fourth); + })); + _fifthRewardsButton.onClick.Clear(); + _fifthRewardsButton.GetComponentInChildren().text = string.Format(Data.SystemText.Get("Bingo_0013"), GetCurrentTabIndex(MissionViewTab.AfterFifth)); + _fifthRewardsButton.onClick.Add(new EventDelegate(delegate + { + OnPushTabButton(MissionViewTab.AfterFifth); + })); + } + + private int GetCurrentTabIndex(MissionViewTab missionViewTab) + { + return (int)(missionViewTab + 1); + } + + private void OnPushTabButton(MissionViewTab viewTab, bool firstCall = false) + { + if (_currentViewTab != viewTab || firstCall) + { + _currentViewTab = viewTab; + UpdateMissionView(viewTab); + if (!firstCall) + { + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_TOGGLE_ON); + } + } + } + + private void UpdateMissionView(MissionViewTab viewTab) + { + ChangeTab(viewTab); + UpdateTabSprite(viewTab); + } + + public void ChangeTab(MissionViewTab viewTab) + { + _bingoInfoData.AllLineRewardsListDic.TryGetValue((int)viewTab, out var value); + _grid.transform.DestroyChildren(); + for (int i = 0; i < value.Count; i++) + { + bool flag = i + 1 == value.Count; + AchievementWindowBase component = NGUITools.AddChild(_grid.gameObject, _bingoMissionItemPrefab).GetComponent(); + component.gameObject.SetActive(value: true); + component.SetBingoRewardDetails(value[i], !flag, _resourceHandler); + } + _grid.Reposition(); + _scrollPanel.ResetPosition(); + } + + private void UpdateTabSprite(MissionViewTab scene) + { + switch (scene) + { + case MissionViewTab.First: + _firstRewardsButton.normalSprite = _firstRewardsButton.pressedSprite; + _secondRewardsButton.normalSprite = _secondRewardsButton.disabledSprite; + _thirdRewardsButton.normalSprite = _thirdRewardsButton.disabledSprite; + _fourthRewardsButton.normalSprite = _fourthRewardsButton.disabledSprite; + _fifthRewardsButton.normalSprite = _fifthRewardsButton.disabledSprite; + break; + case MissionViewTab.Second: + _firstRewardsButton.normalSprite = _firstRewardsButton.disabledSprite; + _secondRewardsButton.normalSprite = _secondRewardsButton.pressedSprite; + _thirdRewardsButton.normalSprite = _thirdRewardsButton.disabledSprite; + _fourthRewardsButton.normalSprite = _fourthRewardsButton.disabledSprite; + _fifthRewardsButton.normalSprite = _fifthRewardsButton.disabledSprite; + break; + case MissionViewTab.Third: + _firstRewardsButton.normalSprite = _firstRewardsButton.disabledSprite; + _secondRewardsButton.normalSprite = _secondRewardsButton.disabledSprite; + _thirdRewardsButton.normalSprite = _thirdRewardsButton.pressedSprite; + _fourthRewardsButton.normalSprite = _fourthRewardsButton.disabledSprite; + _fifthRewardsButton.normalSprite = _fifthRewardsButton.disabledSprite; + break; + case MissionViewTab.Fourth: + _firstRewardsButton.normalSprite = _firstRewardsButton.disabledSprite; + _secondRewardsButton.normalSprite = _secondRewardsButton.disabledSprite; + _thirdRewardsButton.normalSprite = _thirdRewardsButton.disabledSprite; + _fourthRewardsButton.normalSprite = _fourthRewardsButton.pressedSprite; + _fifthRewardsButton.normalSprite = _fifthRewardsButton.disabledSprite; + break; + case MissionViewTab.AfterFifth: + _firstRewardsButton.normalSprite = _firstRewardsButton.disabledSprite; + _secondRewardsButton.normalSprite = _secondRewardsButton.disabledSprite; + _thirdRewardsButton.normalSprite = _thirdRewardsButton.disabledSprite; + _fourthRewardsButton.normalSprite = _fourthRewardsButton.disabledSprite; + _fifthRewardsButton.normalSprite = _fifthRewardsButton.pressedSprite; + break; + } + } +} diff --git a/SVSim.BattleEngine/Engine/Wizard.Dialog.DataLink/IdPasswordInput.cs b/SVSim.BattleEngine/Engine/Wizard.Dialog.DataLink/IdPasswordInput.cs new file mode 100644 index 0000000..95be860 --- /dev/null +++ b/SVSim.BattleEngine/Engine/Wizard.Dialog.DataLink/IdPasswordInput.cs @@ -0,0 +1,18 @@ +using UnityEngine; + +namespace Wizard.Dialog.DataLink; + +public class IdPasswordInput : MonoBehaviour +{ + [SerializeField] + public UIInputWizard _idInput; + + [SerializeField] + public UIInputWizard _passwordInput; + + public void ResetInputValue() + { + _idInput.value = string.Empty; + _passwordInput.value = string.Empty; + } +} diff --git a/SVSim.BattleEngine/Engine/Wizard.Dialog.DataLink/PasswordSetting.cs b/SVSim.BattleEngine/Engine/Wizard.Dialog.DataLink/PasswordSetting.cs new file mode 100644 index 0000000..1a7b4c6 --- /dev/null +++ b/SVSim.BattleEngine/Engine/Wizard.Dialog.DataLink/PasswordSetting.cs @@ -0,0 +1,25 @@ +using UnityEngine; +using Wizard.Dialog.Setting; + +namespace Wizard.Dialog.DataLink; + +public class PasswordSetting : MonoBehaviour +{ + [SerializeField] + public UIInputWizard _firstInput; + + [SerializeField] + public UIInputWizard _secondInput; + + [SerializeField] + public UIButton _privacyPolicyButton; + + [SerializeField] + public ItemToggle _acceptToggle; + + public void ResetInputValue() + { + _firstInput.value = string.Empty; + _secondInput.value = string.Empty; + } +} diff --git a/SVSim.BattleEngine/Engine/Wizard.Lottery/LotteryBigChanceTreasureBox.cs b/SVSim.BattleEngine/Engine/Wizard.Lottery/LotteryBigChanceTreasureBox.cs new file mode 100644 index 0000000..e4bd3b7 --- /dev/null +++ b/SVSim.BattleEngine/Engine/Wizard.Lottery/LotteryBigChanceTreasureBox.cs @@ -0,0 +1,164 @@ +using Cute; +using UnityEngine; + +namespace Wizard.Lottery; + +public class LotteryBigChanceTreasureBox : LotteryTreasureBox +{ + [SerializeField] + private GameObject _parentTreasureObj; + + [SerializeField] + private GameObject _centerLine; + + [SerializeField] + private UISprite _backGround; + + [SerializeField] + private UILabel _labelOverTrasureBox; + + [SerializeField] + private UISprite _touchBg; + + [SerializeField] + private UILabel _labelCenter; + + protected override void UpdateInfoLabel() + { + switch (_lotteryRewardData.state) + { + case LotteryRewardData.eLotteryRewardState.Unapplied: + _labelInfoText.gameObject.SetActive(value: true); + break; + case LotteryRewardData.eLotteryRewardState.Applied: + case LotteryRewardData.eLotteryRewardState.WaitResult: + _labelInfoText.fontSize = 13; + _labelInfoText.gameObject.SetActive(value: true); + break; + default: + _labelInfoText.gameObject.SetActive(value: false); + break; + } + } + + protected override void UpdateStatusText() + { + switch (_lotteryRewardData.state) + { + case LotteryRewardData.eLotteryRewardState.Unapplied: + _labelStatus.text = Data.SystemText.Get("Mission_0087"); + _labelInfoText.color = LabelDefine.TEXT_COLOR_ORANGE; + _labelOverTrasureBox.text = Data.SystemText.Get("Mission_0010"); + break; + case LotteryRewardData.eLotteryRewardState.Applied: + case LotteryRewardData.eLotteryRewardState.WaitResult: + _labelStatus.text = Data.SystemText.Get("Mission_0089"); + _labelStatus.color = LabelDefine.TEXT_COLOR_ORANGE; + break; + case LotteryRewardData.eLotteryRewardState.NotReceived: + _labelCenter.text = Data.SystemText.Get("Mission_0091"); + _labelCenter.color = LabelDefine.TEXT_COLOR_ORANGE; + break; + case LotteryRewardData.eLotteryRewardState.Received: + _labelCenter.text = Data.SystemText.Get("Mission_0092"); + break; + case LotteryRewardData.eLotteryRewardState.NotAchieved: + _labelCenter.text = Data.SystemText.Get("Mission_0059"); + break; + default: + _labelStatus.text = string.Empty; + break; + } + } + + protected override void UpdateRewardImage() + { + if (_lotteryRewardData.state == LotteryRewardData.eLotteryRewardState.Received) + { + string textureRewardImage = string.Empty; + if (_lotteryRewardData.IsSpecial) + { + string path = "thumbnail_lottery"; + textureRewardImage = Toolbox.ResourcesManager.GetAssetTypePath(path, ResourcesManager.AssetLoadPathType.Lottery, isfetch: true); + _labelRewardNum.gameObject.SetActive(value: false); + } + else if (_lotteryRewardData.NormalGotRewardList.Count > 0) + { + string textureName = _lotteryRewardData.NormalGotRewardList[0].TextureName; + textureRewardImage = Toolbox.ResourcesManager.GetAssetTypePath(textureName, ResourcesManager.AssetLoadPathType.Item, isfetch: true); + _labelRewardNum.gameObject.SetActive(value: true); + _labelRewardNum.text = _lotteryRewardData.NormalGotRewardList[0].RewardGotNum.ToString(); + } + SetTextureRewardImage(textureRewardImage); + _labelCenter.gameObject.SetActive(value: true); + _backGround.gameObject.SetActive(value: false); + _labelTreasureTouch.gameObject.SetActive(value: false); + _touchBg.gameObject.SetActive(value: false); + return; + } + if (_lotteryRewardData.state == LotteryRewardData.eLotteryRewardState.Unapplied) + { + _centerLine.SetActive(value: true); + UIManager.SetObjectToGrey(_spriteTreasureImage.gameObject, b: true); + _textureRewardImage.gameObject.SetActive(value: false); + _labelRewardNum.gameObject.SetActive(value: false); + _backGround.gameObject.SetActive(value: false); + _labelOverTrasureBox.gameObject.SetActive(value: true); + return; + } + _textureRewardImage.gameObject.SetActive(value: false); + _labelRewardNum.gameObject.SetActive(value: false); + _spriteTreasureImage.gameObject.SetActive(value: true); + if (_lotteryRewardData.state == LotteryRewardData.eLotteryRewardState.NotReceived) + { + _labelTreasureTouch.gameObject.SetActive(value: true); + _labelTreasureTouch.text = GetTouchText(); + _backGround.gameObject.SetActive(value: false); + _touchBg.gameObject.SetActive(value: true); + _labelCenter.gameObject.SetActive(value: true); + } + else + { + _labelTreasureTouch.gameObject.SetActive(value: false); + if (_lotteryRewardData.state == LotteryRewardData.eLotteryRewardState.NotAchieved) + { + _labelCenter.gameObject.SetActive(value: true); + _backGround.gameObject.SetActive(value: false); + } + } + } + + protected override void UpdateNonActiveColor() + { + switch (_lotteryRewardData.state) + { + case LotteryRewardData.eLotteryRewardState.Received: + if (_lotteryRewardData.IsSpecial) + { + SetNonActiveColor(isNonActive: false); + } + else + { + SetNonActiveColor(isNonActive: true); + } + break; + case LotteryRewardData.eLotteryRewardState.Unapplied: + case LotteryRewardData.eLotteryRewardState.NotAchieved: + SetNonActiveColor(isNonActive: true); + break; + case LotteryRewardData.eLotteryRewardState.Applied: + case LotteryRewardData.eLotteryRewardState.WaitResult: + case LotteryRewardData.eLotteryRewardState.NotReceived: + SetNonActiveColor(isNonActive: false); + break; + default: + _labelStatus.text = string.Empty; + break; + } + } + + protected override void SetNonActiveColor(bool isNonActive) + { + UIManager.SetObjectToGrey(_parentTreasureObj, isNonActive); + } +} diff --git a/SVSim.BattleEngine/Engine/Wizard.Lottery/LotteryMissionDialog.cs b/SVSim.BattleEngine/Engine/Wizard.Lottery/LotteryMissionDialog.cs new file mode 100644 index 0000000..49eb220 --- /dev/null +++ b/SVSim.BattleEngine/Engine/Wizard.Lottery/LotteryMissionDialog.cs @@ -0,0 +1,42 @@ +using System.Collections.Generic; +using UnityEngine; + +namespace Wizard.Lottery; + +public class LotteryMissionDialog : MonoBehaviour +{ + [SerializeField] + private GameObject _lotteryMissionItemPrefab; + + [SerializeField] + private UIGrid _grid; + + public static void Create(GameObject prefab, LotteryInfoTask.LotteryInfoData lotteryData) + { + DialogBase dialogBase = UIManager.GetInstance().CreateDialogClose(); + LotteryMissionDialog component = Object.Instantiate(prefab).GetComponent(); + dialogBase.SetObj(component.gameObject); + dialogBase.SetSize(DialogBase.Size.M); + dialogBase.SetTitleLabel(Data.SystemText.Get("Mission_0075")); + dialogBase.SetButtonLayout(DialogBase.ButtonLayout.CloseBtn); + component.Initialize(lotteryData); + } + + private void Initialize(LotteryInfoTask.LotteryInfoData lotteryData) + { + List list = new List(lotteryData.LotteryMissionList); + if (lotteryData.BigChanceMission != null) + { + list.Add(lotteryData.BigChanceMission); + } + for (int i = 0; i < list.Count; i++) + { + LotteryMissionData lotteryData2 = list[i]; + bool flag = i + 1 == list.Count; + AchievementWindowBase component = NGUITools.AddChild(_grid.gameObject, _lotteryMissionItemPrefab).GetComponent(); + component.gameObject.SetActive(value: true); + component.SetLottery(lotteryData2, !flag); + } + _grid.Reposition(); + } +} diff --git a/SVSim.BattleEngine/Engine/Wizard.Lottery/LotteryMissionTreasureBox.cs b/SVSim.BattleEngine/Engine/Wizard.Lottery/LotteryMissionTreasureBox.cs new file mode 100644 index 0000000..289c157 --- /dev/null +++ b/SVSim.BattleEngine/Engine/Wizard.Lottery/LotteryMissionTreasureBox.cs @@ -0,0 +1,55 @@ +using System; +using UnityEngine; + +namespace Wizard.Lottery; + +public class LotteryMissionTreasureBox : LotteryTreasureBox +{ + [SerializeField] + private UILabel _categoryLabel; + + [SerializeField] + protected UISprite _categoryLabelLine; + + public void Initialize(LotteryRewardData data, string categoryText, Action onClickEvent) + { + _categoryLabel.text = categoryText; + SetData(data, string.Empty, onClickEvent); + switch (data.state) + { + case LotteryRewardData.eLotteryRewardState.Applied: + case LotteryRewardData.eLotteryRewardState.Received: + case LotteryRewardData.eLotteryRewardState.NotAchieved: + UIManager.SetObjectToGrey(_spriteTreasureImage.gameObject, b: true); + break; + default: + UIManager.SetObjectToGrey(_spriteTreasureImage.gameObject, b: false); + break; + case LotteryRewardData.eLotteryRewardState.NotReceived: + break; + } + if (data.MissionData.IsTimeOver) + { + UIManager.SetObjectToGrey(_spriteTreasureImage.gameObject, b: true); + } + } + + protected override void UpdateStatusText() + { + LotteryRewardData.eLotteryRewardState state = _lotteryRewardData.state; + base.UpdateStatusText(); + if (state == LotteryRewardData.eLotteryRewardState.NotAchieved) + { + _labelStatus.text = Data.SystemText.Get("Mission_0059"); + } + if (_lotteryRewardData.MissionData != null && _lotteryRewardData.MissionData.IsTimeOver) + { + _labelStatus.text = Data.SystemText.Get("Mission_0078"); + } + } + + public virtual void SetCategoryLabelLineWitdh(int width) + { + _categoryLabelLine.width = width; + } +} diff --git a/SVSim.BattleEngine/Engine/Wizard.Lottery/LotteryReceiveBigChanceTask.cs b/SVSim.BattleEngine/Engine/Wizard.Lottery/LotteryReceiveBigChanceTask.cs new file mode 100644 index 0000000..7a5a8ab --- /dev/null +++ b/SVSim.BattleEngine/Engine/Wizard.Lottery/LotteryReceiveBigChanceTask.cs @@ -0,0 +1,37 @@ +namespace Wizard.Lottery; + +public class LotteryReceiveBigChanceTask : BaseTask +{ + public class LotteryReceiveBigChanceTaskParam : BaseParam + { + public int campaign_id; + + public int mission_id; + } + + public LotteryRewardData Result { get; private set; } + + public LotteryReceiveBigChanceTask() + { + base.type = ApiType.Type.LotteryReceiveBigChance; + } + + public void SetParameter(int campaignId, int missionId) + { + LotteryReceiveBigChanceTaskParam lotteryReceiveBigChanceTaskParam = new LotteryReceiveBigChanceTaskParam(); + lotteryReceiveBigChanceTaskParam.campaign_id = campaignId; + lotteryReceiveBigChanceTaskParam.mission_id = missionId; + base.Params = lotteryReceiveBigChanceTaskParam; + } + + protected override int Parse() + { + int num = base.Parse(); + if (num != 1) + { + return num; + } + Result = new LotteryRewardData(base.ResponseData["data"]["lottery_reward"]); + return num; + } +} diff --git a/SVSim.BattleEngine/Engine/Wizard.Lottery/LotteryReceiveDoubleChanceTask.cs b/SVSim.BattleEngine/Engine/Wizard.Lottery/LotteryReceiveDoubleChanceTask.cs new file mode 100644 index 0000000..06e927e --- /dev/null +++ b/SVSim.BattleEngine/Engine/Wizard.Lottery/LotteryReceiveDoubleChanceTask.cs @@ -0,0 +1,37 @@ +namespace Wizard.Lottery; + +public class LotteryReceiveDoubleChanceTask : BaseTask +{ + public class LotteryReceiveDoubleChanceTaskParam : BaseParam + { + public int campaign_id; + + public int mission_id; + } + + public LotteryRewardData Result { get; private set; } + + public LotteryReceiveDoubleChanceTask() + { + base.type = ApiType.Type.LotteryReceiveDoubleChance; + } + + public void SetParameter(int campaignId, int missionId) + { + LotteryReceiveDoubleChanceTaskParam lotteryReceiveDoubleChanceTaskParam = new LotteryReceiveDoubleChanceTaskParam(); + lotteryReceiveDoubleChanceTaskParam.campaign_id = campaignId; + lotteryReceiveDoubleChanceTaskParam.mission_id = missionId; + base.Params = lotteryReceiveDoubleChanceTaskParam; + } + + protected override int Parse() + { + int num = base.Parse(); + if (num != 1) + { + return num; + } + Result = new LotteryRewardData(base.ResponseData["data"]["lottery_reward"]); + return num; + } +} diff --git a/SVSim.BattleEngine/Engine/Wizard.Lottery/LotteryReceiveTask.cs b/SVSim.BattleEngine/Engine/Wizard.Lottery/LotteryReceiveTask.cs new file mode 100644 index 0000000..1479973 --- /dev/null +++ b/SVSim.BattleEngine/Engine/Wizard.Lottery/LotteryReceiveTask.cs @@ -0,0 +1,34 @@ +namespace Wizard.Lottery; + +public class LotteryReceiveTask : BaseTask +{ + public class LotteryReceiveTaskParam : BaseParam + { + public int mission_id; + } + + public LotteryRewardData Result { get; private set; } + + public LotteryReceiveTask() + { + base.type = ApiType.Type.LotteryReceive; + } + + public void SetParameter(int mission_id) + { + LotteryReceiveTaskParam lotteryReceiveTaskParam = new LotteryReceiveTaskParam(); + lotteryReceiveTaskParam.mission_id = mission_id; + base.Params = lotteryReceiveTaskParam; + } + + protected override int Parse() + { + int num = base.Parse(); + if (num != 1) + { + return num; + } + Result = new LotteryRewardData(base.ResponseData["data"]["lottery_reward"]); + return num; + } +} diff --git a/SVSim.BattleEngine/Engine/Wizard.Scripts.Network.Data.TaskData.BuildDeckPurchase/BuildDeckDetailWindow.cs b/SVSim.BattleEngine/Engine/Wizard.Scripts.Network.Data.TaskData.BuildDeckPurchase/BuildDeckDetailWindow.cs new file mode 100644 index 0000000..9219c8e --- /dev/null +++ b/SVSim.BattleEngine/Engine/Wizard.Scripts.Network.Data.TaskData.BuildDeckPurchase/BuildDeckDetailWindow.cs @@ -0,0 +1,96 @@ +using System.Collections; +using System.Collections.Generic; +using Cute; +using UnityEngine; + +namespace Wizard.Scripts.Network.Data.TaskData.BuildDeckPurchase; + +public class BuildDeckDetailWindow : MonoBehaviour +{ + private const int SUPPLY_TYPE_LABEL_INDEX = 0; + + private const int SUPPLY_NAME_LABEL_INDEX = 1; + + private const int DEPTH_COPY_CONFIRM_DIALOG = 20; + + [SerializeField] + private BuildDeckProductDetail _buildDeckProductDetail; + + [SerializeField] + private UILabel _labelProductName; + + [SerializeField] + private UISprite _spriteClassColorIcon; + + [SerializeField] + private UILabel _labelDeckCode; + + private BuildDeckProductInfo _productInfo; + + private UICardList _uiCardList; + + private List _loadedCardList = new List(); + + public void SetSingleData(UICardList uiCardList, BuildDeckProductInfo productInfo) + { + _productInfo = productInfo; + _uiCardList = uiCardList; + _buildDeckProductDetail.SetSingleProductDetail(productInfo); + ClassCharacterMasterData charaPrmByClassId = GameMgr.GetIns().GetDataMgr().GetCharaPrmByClassId(productInfo.leader_id); + _labelProductName.text = productInfo.saleInfo.name; + ClassCharaPrm.SetClassLabelSetting(_labelProductName, charaPrmByClassId.ClassColorId); + _spriteClassColorIcon.spriteName = ClassCharaPrm.GetIconSpriteName(charaPrmByClassId.clan); + _uiCardList.SetClan(charaPrmByClassId.clan); + _uiCardList.SetDeckName(productInfo.saleInfo.name); + _uiCardList.SetMaxCardNum(40); + _labelDeckCode.text = Wizard.Data.SystemText.Get("Shop_0117", productInfo.deck_code); + } + + public void OnCloseWindow() + { + _uiCardList.RemoveData(); + Toolbox.ResourcesManager.RemoveAssetGroup(_loadedCardList); + } + + public void OnBtnCopyDeckCode() + { + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_BTN_DECIDE); + NativePluginWrapper.SetStringToClipboard(_productInfo.deck_code); + UIManager.GetInstance().CreateConfirmationDialog(Wizard.Data.SystemText.Get("Shop_0118", _productInfo.deck_code)).SetPanelDepth(20); + } + + public void OnBtnShowCardList() + { + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_BTN_DECIDE); + if (_uiCardList.getCardNum() > 0) + { + ShowUICardList(); + return; + } + UIManager.GetInstance().createInSceneCenterLoading(); + StartCoroutine(LoadCardAndShowUICardList()); + } + + private IEnumerator LoadCardAndShowUICardList() + { + List cardIdList = _productInfo.CardIdList; + List assetList = _uiCardList.GetLoadFileList(cardIdList); + yield return StartCoroutine(Toolbox.ResourcesManager.LoadAssetGroupAsync(assetList, null)); + _loadedCardList.AddRange(assetList); + List list = UIManager.GetInstance().getUIBase_CardManager().SortIDList(cardIdList, CardMaster.CardMasterId.Default); + for (int i = 0; i < list.Count; i++) + { + _uiCardList.addScrollItem(list[i]); + } + _uiCardList.SetFormat(Format.Rotation, null); + yield return null; + UIManager.GetInstance().closeInSceneCenterLoading(); + ShowUICardList(); + } + + private void ShowUICardList() + { + _uiCardList.SetActive(in_Active: true); + _uiCardList.ResetScroll(); + } +} diff --git a/SVSim.BattleEngine/Engine/Wizard.Scripts.Network.Data.TaskData.BuildDeckPurchase/BuildDeckPlate.cs b/SVSim.BattleEngine/Engine/Wizard.Scripts.Network.Data.TaskData.BuildDeckPurchase/BuildDeckPlate.cs new file mode 100644 index 0000000..0649690 --- /dev/null +++ b/SVSim.BattleEngine/Engine/Wizard.Scripts.Network.Data.TaskData.BuildDeckPurchase/BuildDeckPlate.cs @@ -0,0 +1,185 @@ +using System; +using Cute; +using UnityEngine; + +namespace Wizard.Scripts.Network.Data.TaskData.BuildDeckPurchase; + +public class BuildDeckPlate : MonoBehaviour +{ + private const int MAX_LENGTH_VIEW_DECK_PRODUCT_NAME = 15; + + private const int MAX_LENGTH_VIEW_DECK_PRODUCT_NAME_ALPHABET = 35; + + private readonly Vector3 POS_VIEW_SINGLE_PRODUCT_NAME = new Vector3(13f, -52f, 0f); + + [SerializeField] + private UIEventListener _eventListenerDeckImage; + + [SerializeField] + private UILabel _labelCostCrystalLeft; + + [SerializeField] + private UILabel _labelCostCrystalCenter; + + [SerializeField] + private UIButton m_BtnBuy; + + [SerializeField] + private UILabel m_LabelBuy; + + [SerializeField] + private UILabel m_LabelPurchased; + + [SerializeField] + private UILabel _LabelPurchaseNum; + + [SerializeField] + private UILabel _LabelProductName; + + [SerializeField] + private UITexture _uiDeckTexture; + + [SerializeField] + private UISprite _spriteClassColorIcon; + + [SerializeField] + private UILabel _labelCostTicket; + + [SerializeField] + private UITexture _leaderSkinTicketIcon; + + public BuildDeckProductInfo ProductInfo { get; private set; } + + public Texture ImageTexture { get; private set; } + + private void Start() + { + m_LabelPurchased.text = Wizard.Data.SystemText.Get("Shop_0100"); + } + + public void SetData(BuildDeckProductInfo productInfo, EventDelegate onPushBuyBtnCallback, Action onTapDeckImage) + { + ProductInfo = productInfo; + ClassCharacterMasterData charaPrmByClassId = GameMgr.GetIns().GetDataMgr().GetCharaPrmByClassId(productInfo.leader_id); + _LabelProductName.transform.localPosition = POS_VIEW_SINGLE_PRODUCT_NAME; + int maxLength = (Global.IsAlphabetLanguage() ? 35 : 15); + _LabelProductName.text = ShopCommonUtility.TrimProductName(productInfo.saleInfo.name, maxLength); + ClassCharaPrm.SetClassLabelSetting(_LabelProductName, charaPrmByClassId.ClassColorId); + _uiDeckTexture.mainTexture = Toolbox.ResourcesManager.LoadObject(Toolbox.ResourcesManager.GetAssetTypePath(productInfo.saleInfo.path, ResourcesManager.AssetLoadPathType.ShopBuildDeckThumbnail, isfetch: true)); + _spriteClassColorIcon.gameObject.SetActive(value: true); + _spriteClassColorIcon.spriteName = ClassCharaPrm.GetIconSpriteName(charaPrmByClassId.clan); + m_BtnBuy.onClick.Clear(); + m_BtnBuy.onClick.Add(onPushBuyBtnCallback); + _eventListenerDeckImage.onClick = null; + _eventListenerDeckImage.onClick = delegate + { + onTapDeckImage.Call(); + }; + _SetBuyButton(productInfo); + } + + private void _SetBuyButton(BuildDeckProductInfo productInfo) + { + int? num = null; + if (productInfo.saleInfo.costCrystal.HasValue) + { + num = productInfo.saleInfo.costCrystal.Value; + } + if (productInfo.saleInfo.costTicket.HasValue) + { + num = productInfo.saleInfo.costTicket.Value; + } + UIManager.SetObjectToGrey(m_BtnBuy.gameObject, b: false); + _labelCostTicket.gameObject.SetActive(value: false); + _leaderSkinTicketIcon.gameObject.SetActive(value: false); + int num2 = 0; + if (productInfo.saleInfo.costTicket.HasValue && productInfo.saleInfo.costTicketItemId.HasValue) + { + num2 = PlayerStaticData.GetItemNum((int)productInfo.saleInfo.costTicketItemId.Value); + _labelCostTicket.text = Wizard.Data.SystemText.Get("Shop_0189", productInfo.saleInfo.costTicket.Value.ToString()); + _leaderSkinTicketIcon.mainTexture = Toolbox.ResourcesManager.LoadObject(ShopCommonUtility.GetTicketIconPath(productInfo.saleInfo.costTicketItemId.Value.ToString(), isFetch: true)); + } + if (!productInfo.is_purchased) + { + m_BtnBuy.gameObject.SetActive(value: true); + m_BtnBuy.isEnabled = true; + m_LabelPurchased.gameObject.SetActive(value: false); + if (productInfo.saleInfo.isFree) + { + m_LabelBuy.text = Wizard.Data.SystemText.Get("Shop_0099"); + return; + } + m_LabelBuy.text = Wizard.Data.SystemText.Get("Shop_0095"); + if (productInfo.saleInfo.costTicket.HasValue && productInfo.saleInfo.costTicketItemId.HasValue) + { + _labelCostTicket.gameObject.SetActive(value: true); + _leaderSkinTicketIcon.gameObject.SetActive(value: true); + UIManager.SetObjectToGrey(m_BtnBuy.gameObject, num2 < productInfo.saleInfo.costTicket.Value); + } + if (!productInfo.saleInfo.costCrystal.HasValue) + { + _labelCostCrystalLeft.gameObject.SetActive(value: false); + _labelCostCrystalCenter.gameObject.SetActive(value: false); + } + else if (productInfo.purchase_num_max == 1) + { + SetCostLabel(num.Value, isCenter: true); + } + else + { + SetCostLabel(num.Value, isCenter: false); + } + if (productInfo.purchase_num_max == 1) + { + _LabelPurchaseNum.gameObject.SetActive(value: false); + return; + } + if (productInfo.is_first_price && productInfo.purchase_num_current <= 0) + { + _LabelPurchaseNum.gameObject.SetActive(value: true); + _LabelPurchaseNum.text = Wizard.Data.SystemText.Get("Shop_0122"); + return; + } + _LabelPurchaseNum.gameObject.SetActive(value: true); + int num3 = productInfo.purchase_num_max - productInfo.purchase_num_current; + _LabelPurchaseNum.text = Wizard.Data.SystemText.Get("Shop_0123", num3.ToString()); + } + else + { + m_BtnBuy.gameObject.SetActive(value: false); + m_LabelPurchased.gameObject.SetActive(value: true); + _LabelPurchaseNum.gameObject.SetActive(value: false); + if (productInfo.saleInfo.costTicket.HasValue && productInfo.saleInfo.costTicketItemId.HasValue) + { + _labelCostTicket.gameObject.SetActive(value: true); + _leaderSkinTicketIcon.gameObject.SetActive(value: true); + } + if (!productInfo.saleInfo.costCrystal.HasValue) + { + _labelCostCrystalLeft.gameObject.SetActive(value: false); + _labelCostCrystalCenter.gameObject.SetActive(value: false); + } + else + { + SetCostLabel(num.Value, isCenter: true); + } + } + } + + private void SetCostLabel(int cost, bool isCenter) + { + string text = Wizard.Data.SystemText.Get("Shop_0112", cost.ToString()); + if (isCenter) + { + _labelCostCrystalLeft.gameObject.SetActive(value: false); + _labelCostCrystalCenter.gameObject.SetActive(value: true); + _labelCostCrystalCenter.text = text; + } + else + { + _labelCostCrystalLeft.gameObject.SetActive(value: true); + _labelCostCrystalCenter.gameObject.SetActive(value: false); + _labelCostCrystalLeft.text = text; + } + } +} diff --git a/SVSim.BattleEngine/Engine/Wizard.Scripts.Network.Data.TaskData.BuildDeckPurchase/BuildDeckPurchasePage.cs b/SVSim.BattleEngine/Engine/Wizard.Scripts.Network.Data.TaskData.BuildDeckPurchase/BuildDeckPurchasePage.cs new file mode 100644 index 0000000..084b1c7 --- /dev/null +++ b/SVSim.BattleEngine/Engine/Wizard.Scripts.Network.Data.TaskData.BuildDeckPurchase/BuildDeckPurchasePage.cs @@ -0,0 +1,788 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using System.Linq; +using Cute; +using UnityEngine; +using Wizard.DeckCardEdit; +using Wizard.Lottery; + +namespace Wizard.Scripts.Network.Data.TaskData.BuildDeckPurchase; + +public class BuildDeckPurchasePage : BaseShopPurchasePage +{ + private const int DEFAULT_INDEX = 0; + + private const string LAYER_DIALOG_PRODUCT_DETAIL = "MyPage"; + + private const int SORTODER_DIALOG_PRODUCT_DETAIL = 2; + + private const int DEPTH_DIALOG_PRODUCT_DETAIL = 140; + + private const string LAYER_DIALOG_PURCHASE_REWARD = "MyPage"; + + private const int SORTODER_DIALOG_PURCHASE_REWARD = 2; + + private const int DEPTH_DIALOG_PURCHASE_REWARD = 140; + + [SerializeField] + private GameObject _prefabDialogSelectBuyMeans; + + [SerializeField] + private PurchaseConfirm _prefabDialogPurchaseConfirm; + + [SerializeField] + private BuildDeckDetailWindow _prefabDialogBuildDeckDetail; + + [SerializeField] + private CardDetailUI _cardDetailPrefab; + + private CardDetailUI _cardDetail; + + [SerializeField] + private UICardList _cardListPrefab; + + private UICardList _uiCardListClass; + + [SerializeField] + private ShopDrumrollScrollManager _drumrollManager; + + [SerializeField] + private UIButton _btnSeriesRewards; + + [SerializeField] + private UIAnchor _achiveAnchor; + + private BuildDeckSeriesPurchaseInfo _selectSeriesInfo; + + private BuildDeckProductInfo _purchaseProductInfo; + + private string _purchaseDeckName = string.Empty; + + private int _purchaseDeckClassId; + + private List _purchaseDeckCardIds; + + private BuildDeckPlate _selectPlate; + + private DialogBase _dialogPurchaseConfirm; + + private DialogBase _dialogSelectBuyMeans; + + private DialogBase _dialogProductDetail; + + private DialogBase _dialogCrystalShortage; + + private BuildDeckBuyTask _buyTask; + + private bool _isBuyConnect; + + private static int _autoShowBuildDeckProductId; + + private static bool _autoShowBuildDeckEnable; + + private Format _deckCreateFormat; + + private List _loadResource = new List(); + + private int _addShowSeriesId; + + [SerializeField] + private NotificatonAnimation _notificationAnimationPrefab; + + [SerializeField] + private GameObject _achieveLog; + + private NotificatonAnimation _notificationAnimation; + + public static void BuildDeckConfirmDialogShow(int productID) + { + _autoShowBuildDeckEnable = true; + _autoShowBuildDeckProductId = productID; + } + + public override void onFirstStart() + { + _cardDetail = UnityEngine.Object.Instantiate(_cardDetailPrefab); + _cardDetail.transform.parent = base.transform; + _cardDetail.transform.localPosition = Vector3.zero; + _cardDetail.transform.localScale = Vector3.one; + _cardDetail.Initialize(LayerMask.NameToLayer("Detail"), CardMaster.CardMasterId.Default); + _cardDetail.gameObject.SetActive(value: false); + _uiCardListClass = UnityEngine.Object.Instantiate(_cardListPrefab).GetComponent(); + _uiCardListClass.SetActive(in_Active: false); + _uiCardListClass.Init(base.gameObject, _cardDetail, null, null, "Detail", in_DetailCameraUse: true); + CreateTopBar(Wizard.Data.SystemText.Get("Shop_0116"), delegate + { + MyPageMenu.Instance.GoToShopCard(); + }); + _achiveAnchor.uiCamera = UIManager.GetInstance().MyPageUICameraObj.GetComponent(); + base.onFirstStart(); + } + + protected override void onOpen() + { + base.onOpen(); + _loadedResourceList = new List(); + StartGetBuildDeckInfo(OnBuildDeckInfoRequestFinished); + } + + protected override void onClose() + { + base.onClose(); + DisposeResource(); + } + + private void DisposeResource() + { + Toolbox.ResourcesManager.RemoveAssetGroup(_loadResource); + _loadResource.Clear(); + } + + private void StartGetBuildDeckInfo(Action callbackOnSuccess) + { + BuildDeckPurchaseInfoTask buildDeckPurchaseInfoTask = new BuildDeckPurchaseInfoTask(); + buildDeckPurchaseInfoTask.SetParameter(_addShowSeriesId); + StartCoroutine(Toolbox.NetworkManager.Connect(buildDeckPurchaseInfoTask, callbackOnSuccess)); + } + + private void StartBuyBuildDeck(ShopCommonUtility.SalesType costType, int id) + { + if (!_isBuyConnect) + { + _isBuyConnect = true; + UIManager.GetInstance().createInSceneCenterLoading(); + _buyTask = new BuildDeckBuyTask(); + _buyTask.SetParameter(id, costType); + StartCoroutine(Toolbox.NetworkManager.Connect(_buyTask, delegate(NetworkTask.ResultCode error) + { + onSuccessPurchase(error, costType); + }, _OnFailurePurchase, _OnResultCodeError)); + } + } + + private int GetViewSeriesId() + { + int seriesId = Wizard.Data.BuildDeckPurchaseInfo.seriesList[0]._seriesId; + int value = PlayerPrefsWrapper.GetValue(PlayerPrefsWrapper.LATEST_DECK_SERIES_ID); + if (seriesId != value) + { + PlayerPrefsWrapper.SetValue(PlayerPrefsWrapper.LATEST_DECK_SERIES_ID, seriesId); + PlayerPrefsWrapper.SetValue(PlayerPrefsWrapper.LAST_PURCHASE_DECK_SERIES_ID, seriesId); + } + if (_autoShowBuildDeckEnable) + { + return Wizard.Data.BuildDeckPurchaseInfo.GetSeriesId(_autoShowBuildDeckProductId); + } + int value2 = PlayerPrefsWrapper.GetValue(PlayerPrefsWrapper.SCENE_TRANSITION_VIEW_DECK_SERIES_ID); + if (value2 > -1) + { + PlayerPrefsWrapper.SetValue(PlayerPrefsWrapper.SCENE_TRANSITION_VIEW_DECK_SERIES_ID, -1); + return value2; + } + return PlayerPrefsWrapper.GetValue(PlayerPrefsWrapper.LAST_PURCHASE_DECK_SERIES_ID); + } + + private void OnBuildDeckInfoRequestFinished(NetworkTask.ResultCode error) + { + List seriesIdList = GetSeriesIdList(); + Dictionary seriesMasterDic = GetSeriesDataDictionary(); + List seriesList = Wizard.Data.BuildDeckPurchaseInfo.seriesList; + DisposeResource(); + foreach (BuildDeckSeriesPurchaseInfo item in seriesList) + { + foreach (BuildDeckProductInfo product in item.productList) + { + if (product.saleInfo.costTicket.HasValue && product.saleInfo.costTicketItemId.HasValue) + { + _loadResource.Add(ShopCommonUtility.GetTicketIconPath(product.saleInfo.costTicketItemId.Value.ToString(), isFetch: false)); + _loadResource.Add(ShopCommonUtility.GetTicketIconRightDownPath(product.saleInfo.costTicketItemId.Value.ToString(), isFetch: false)); + } + } + } + StartCoroutine(Toolbox.ResourcesManager.LoadAssetGroupAsync(_loadResource, delegate + { + StartCoroutine(loadSeriesImages(ResourcesManager.AssetLoadPathType.ShopBuildDeck, seriesIdList, seriesMasterDic, delegate + { + if (_drumrollSeriesImageList.Count <= 0) + { + UIManager.GetInstance().OnReadyViewScene(isFadein: true); + } + else + { + int viewSeriesId = GetViewSeriesId(); + int seriesIndex = seriesList.FindIndex((BuildDeckSeriesPurchaseInfo data) => data._seriesId == viewSeriesId); + if (seriesIndex < 0) + { + seriesIndex = 0; + } + List itemList = _drumrollSeriesImageList.Select((Texture tex, int index) => new ShopDrumrollScrollManager.DrumrollItem(tex, seriesList[index]._isNew)).ToList(); + StartCoroutine(_drumrollManager.CreateDrumrollScroll_Coroutine(itemList, seriesIndex, onSelectSeries, delegate + { + onSelectSeries(seriesIndex, delegate + { + UIManager.GetInstance().OnReadyViewScene(isFadein: true); + if (_autoShowBuildDeckEnable) + { + _autoShowBuildDeckEnable = false; + BuildDeckProductInfo productInfo = Wizard.Data.BuildDeckPurchaseInfo.GetProductInfo(_autoShowBuildDeckProductId); + if (productInfo != null) + { + createBuildDeckSelectBuyMeansDialog(productInfo); + } + } + }); + })); + } + })); + })); + } + + private List GetSeriesIdList() + { + return Wizard.Data.BuildDeckPurchaseInfo.seriesList.ConvertAll((BuildDeckSeriesPurchaseInfo info) => info._seriesId); + } + + private Dictionary GetSeriesDataDictionary() + { + Dictionary dictionary = new Dictionary(); + foreach (KeyValuePair item in Wizard.Data.Master.BuildDeckSeriesIdDic) + { + dictionary.Add(item.Key, item.Value); + } + return dictionary; + } + + private void onSelectSeries(int seriesIndex) + { + onSelectSeries(seriesIndex, null); + } + + private void onSelectSeries(int seriesIndex, Action onFinish) + { + BuildDeckSeriesPurchaseInfo seriesInfo = Wizard.Data.BuildDeckPurchaseInfo.seriesList[seriesIndex]; + _selectSeriesInfo = seriesInfo; + _titleLogoTexture.mainTexture = _seriesTitleImageList[seriesIndex]; + _labelSeriesDescription.text = seriesInfo._introduction; + if (seriesInfo.SeriesRewardList.Count > 0) + { + _btnSeriesRewards.gameObject.SetActive(value: true); + _btnSeriesRewards.onClick.Clear(); + _btnSeriesRewards.onClick.Add(new EventDelegate(delegate + { + OnClickSeriesRewardButton(seriesIndex); + })); + } + else + { + _btnSeriesRewards.gameObject.SetActive(value: false); + } + int num = _cacheSeriesIdList.IndexOf(seriesInfo._seriesId); + if (num != -1) + { + _cacheRefCountList[num]++; + ResetProductListScroll(seriesInfo.productList.Count); + onFinish.Call(); + return; + } + if (_cacheSeriesIdList.Count >= 4) + { + int num2 = _cacheRefCountList[0]; + int cacheIndex = 0; + for (int num3 = 1; num3 < _cacheRefCountList.Count; num3++) + { + if (num2 > _cacheRefCountList[num3]) + { + num2 = _cacheRefCountList[num3]; + cacheIndex = num3; + } + } + DeleteCacheSeriesByCashIndex(cacheIndex); + } + UIManager.GetInstance().LoadingViewManager.CreateInSceneCenter(); + StartCoroutine(loadBuildDecks(delegate + { + UIManager.GetInstance().LoadingViewManager.CloseInSceneCenter(); + if (_selectSeriesInfo == seriesInfo) + { + ResetProductListScroll(seriesInfo.productList.Count); + } + _cacheSeriesIdList.Add(seriesInfo._seriesId); + _cacheRefCountList.Add(1); + onFinish.Call(); + })); + } + + private void DeleteCacheSeriesByCashIndex(int cacheIndex) + { + List list = new List(); + BuildDeckSeriesPurchaseInfo buildDeckSeriesPurchaseInfo = Wizard.Data.BuildDeckPurchaseInfo.seriesList.Find((BuildDeckSeriesPurchaseInfo m) => m._seriesId == _cacheSeriesIdList[cacheIndex]); + if (buildDeckSeriesPurchaseInfo != null) + { + for (int num = 0; num < buildDeckSeriesPurchaseInfo.productList.Count; num++) + { + list.Add(Toolbox.ResourcesManager.GetAssetTypePath(buildDeckSeriesPurchaseInfo.productList[num].saleInfo.path, ResourcesManager.AssetLoadPathType.ShopBuildDeckThumbnail)); + } + } + Toolbox.ResourcesManager.RemoveAssetGroup(list); + _cacheSeriesIdList.RemoveAt(cacheIndex); + _cacheRefCountList.RemoveAt(cacheIndex); + for (int num2 = 0; num2 < list.Count; num2++) + { + _cacheResourceList.Remove(list[num2]); + } + } + + private IEnumerator loadBuildDecks(Action callBack = null) + { + UIManager.GetInstance().createInSceneCenterLoading(); + List listResource = new List(); + List productList = _selectSeriesInfo.productList; + for (int i = 0; i < productList.Count; i++) + { + listResource.Add(Toolbox.ResourcesManager.GetAssetTypePath(productList[i].saleInfo.path, ResourcesManager.AssetLoadPathType.ShopBuildDeckThumbnail)); + } + yield return StartCoroutine(Toolbox.ResourcesManager.LoadAssetGroupAsync(listResource, null)); + UIManager.GetInstance().closeInSceneCenterLoading(); + for (int j = 0; j < listResource.Count; j++) + { + _cacheResourceList.Add(listResource[j]); + } + callBack.Call(); + } + + protected override void OnInitializeItem(GameObject go, int wrapIndex, int realIndex) + { + if (_selectSeriesInfo == null) + { + return; + } + if (realIndex >= _selectSeriesInfo.productList.Count || realIndex < 0) + { + go.SetActive(value: false); + return; + } + go.SetActive(value: true); + BuildDeckPlate plate = go.GetComponent(); + EventDelegate eventDelegate = new EventDelegate(this, "onPushBuyButton"); + eventDelegate.parameters[0].value = plate; + plate.SetData(_selectSeriesInfo.productList[realIndex], eventDelegate, delegate + { + _onTapBuildDeckImage(plate); + }); + } + + private void _onTapBuildDeckImage(BuildDeckPlate plate) + { + if (!(_dialogProductDetail != null)) + { + _dialogProductDetail = UIManager.GetInstance().CreateDialogClose(); + _dialogProductDetail.SetSize(DialogBase.Size.M); + _dialogProductDetail.SetTitleLabel(Wizard.Data.SystemText.Get("Dia_BuyBuildDeck_003_Title")); + _dialogProductDetail.SetButtonLayout(DialogBase.ButtonLayout.CloseBtn); + _dialogProductDetail.gameObject.layer = LayerMask.NameToLayer("MyPage"); + _dialogProductDetail.SetBackViewLayer(LayerMask.NameToLayer("MyPage")); + _dialogProductDetail.SetDepthAndSortingOrder(140, 2); + BuildDeckDetailWindow component = UnityEngine.Object.Instantiate(_prefabDialogBuildDeckDetail).GetComponent(); + _dialogProductDetail.SetObj(component.gameObject); + component.SetSingleData(_uiCardListClass, plate.ProductInfo); + _dialogProductDetail.OnClose = component.OnCloseWindow; + } + } + + private void onPushBuyButton(BuildDeckPlate plate) + { + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_BTN_DECIDE); + _selectPlate = plate; + createBuildDeckSelectBuyMeansDialog(plate.ProductInfo); + } + + private void OnClickSeriesRewardButton(int seriesIndex) + { + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_COMMON_BUTTON); + DialogBase dialogBase = PurchaseRewardDialog.Create(Wizard.Data.BuildDeckPurchaseInfo.seriesList[seriesIndex].SeriesRewardList, _cardDetail, useLargeDetailDialog: false, PurchaseRewardDialog.Layout.NORMAL); + dialogBase.SetLayer("MyPage"); + dialogBase.SetDepthAndSortingOrder(140, 2); + } + + private void createBuildDeckSelectBuyMeansDialog(BuildDeckProductInfo pInfo) + { + if (_dialogSelectBuyMeans != null) + { + return; + } + _ = pInfo.is_purchased; + _dialogSelectBuyMeans = _createBaseDialogForSelectBuyMeans(pInfo.saleInfo); + BuildDeckSelectBuyMeansDialog component = UnityEngine.Object.Instantiate(_prefabDialogSelectBuyMeans).GetComponent(); + _dialogSelectBuyMeans.SetObj(component.gameObject); + Action onPushBuyCrystalBtnCallBack = null; + Action onPushBuyRupyBtnCallBack = null; + Action onPushBuyTicketBtnCallBack = null; + if (pInfo.saleInfo.isFree) + { + _dialogSelectBuyMeans.SetButtonLayout(DialogBase.ButtonLayout.OkBtn); + _dialogSelectBuyMeans.SetButtonText(Wizard.Data.SystemText.Get("Shop_0082")); + _dialogSelectBuyMeans.onPushButton1 = delegate + { + _purchaseProductInfo = pInfo; + UIManager.GetInstance().createInSceneCenterLoading(); + StartBuyBuildDeck(ShopCommonUtility.SalesType.free, pInfo.product_id); + }; + } + else + { + _dialogSelectBuyMeans.SetButtonLayout(DialogBase.ButtonLayout.NONE); + onPushBuyCrystalBtnCallBack = delegate + { + _purchaseProductInfo = pInfo; + _createPurchaseConfirmDialog(pInfo.saleInfo, ShopCommonUtility.SalesType.crystal, delegate + { + StartBuyBuildDeck(ShopCommonUtility.SalesType.crystal, pInfo.product_id); + }); + }; + onPushBuyRupyBtnCallBack = delegate + { + _purchaseProductInfo = pInfo; + _createPurchaseConfirmDialog(pInfo.saleInfo, ShopCommonUtility.SalesType.rupy, delegate + { + StartBuyBuildDeck(ShopCommonUtility.SalesType.rupy, pInfo.product_id); + }); + }; + onPushBuyTicketBtnCallBack = delegate + { + _purchaseProductInfo = pInfo; + _createPurchaseConfirmDialog(pInfo.saleInfo, ShopCommonUtility.SalesType.ticket, delegate + { + StartBuyBuildDeck(ShopCommonUtility.SalesType.ticket, pInfo.product_id); + }); + }; + } + component.Init(pInfo, _dialogSelectBuyMeans, onPushBuyCrystalBtnCallBack, onPushBuyRupyBtnCallBack, onPushBuyTicketBtnCallBack); + } + + private DialogBase _createBaseDialogForSelectBuyMeans(ShopCommonSaleInfo info) + { + DialogBase dialogBase = UIManager.GetInstance().CreateDialogClose(); + dialogBase.SetSize(DialogBase.Size.M); + dialogBase.SetTitleLabel(Wizard.Data.SystemText.Get("Dia_BuyBuildDeck_001_Title")); + dialogBase.SetReturnMsg(null, ""); + return dialogBase; + } + + private void _createPurchaseConfirmDialog(ShopCommonSaleInfo info, ShopCommonUtility.SalesType costType, Action buyApiFunc) + { + if (!(_dialogPurchaseConfirm != null) && ShopCommonUtility.IsHaveEnoughCost(info, costType, delegate + { + if (_dialogCrystalShortage == null) + { + _dialogCrystalShortage = ShopCommonUtility.CreateCrystalShortagePopup(); + } + })) + { + string warningTextId = (_purchaseProductInfo.ContainsOnlyRotationCards() ? null : "Shop_0139"); + _dialogPurchaseConfirm = ShopCommonUtility.CreatePurchaseConfirmPopup(info, costType, _prefabDialogPurchaseConfirm, buyApiFunc, warningTextId); + _dialogPurchaseConfirm.SetTitleLabel(Wizard.Data.SystemText.Get("Dia_BuyBuildDeck_002_Title")); + } + } + + private void _OnFailurePurchase(NetworkTask.ResultCode code) + { + _isBuyConnect = false; + UIManager.GetInstance().closeInSceneCenterLoading(); + } + + private void _OnResultCodeError(int code) + { + if (code != 110) + { + _isBuyConnect = false; + UIManager.GetInstance().closeInSceneCenterLoading(); + _ReloadBuildDeckInfo(); + } + } + + private void ShowRewardDialog(Action onFinish) + { + if (_buyTask.LotteryRewardList.Count == 0) + { + onFinish.Call(); + return; + } + DialogBase dialogBase = UIManager.GetInstance().CreateDialogClose(); + dialogBase.SetSize(DialogBase.Size.M); + dialogBase.SetTitleLabel(Wizard.Data.SystemText.Get("Story_0029")); + dialogBase.SetButtonLayout(DialogBase.ButtonLayout.OkBtn); + RewardBase component = NGUITools.AddChild(dialogBase.gameObject, UIManager.GetInstance().GetRewardDialogPrefab().gameObject).GetComponent(); + foreach (ReceivedReward lotteryReward in _buyTask.LotteryRewardList) + { + component.AddReward(lotteryReward); + if (!string.IsNullOrEmpty(lotteryReward.reward_message)) + { + dialogBase.SetTitleLabel(lotteryReward.reward_message); + } + } + component.EndCreate(); + dialogBase.OnClose = delegate + { + onFinish.Call(); + }; + } + + private void ShowLotteryApplyDialog(Action onFinish) + { + UIManager.GetInstance().LoadingViewManager.CreateInSceneCenter(); + string lotteryTexturePath = LotteryApplyDialog.GetLotteryTexturePath(_buyTask.LotteryData, isFetch: false); + _loadResource.Add(lotteryTexturePath); + StartCoroutine(Toolbox.ResourcesManager.LoadAssetAsync(lotteryTexturePath, delegate + { + UIManager.GetInstance().closeInSceneCenterLoading(); + LotteryApplyDialog.Create(_buyTask.LotteryData, autoClose: false).OnClose = delegate + { + ShowRewardDialog(delegate + { + onFinish.Call(); + }); + }; + })); + } + + private void onSuccessPurchase(NetworkTask.ResultCode error, ShopCommonUtility.SalesType salesType) + { + _isBuyConnect = false; + BuildDeckProductInfo savePurchaseProductInfo = _purchaseProductInfo; + if (_purchaseProductInfo != null) + { + PlayerPrefsWrapper.SetValue(PlayerPrefsWrapper.LAST_PURCHASE_DECK_SERIES_ID, _selectSeriesInfo._seriesId); + if (salesType == ShopCommonUtility.SalesType.ticket) + { + _addShowSeriesId = _selectSeriesInfo._seriesId; + } + if (!_buyTask.LotteryData.IsEnable && _buyTask.MissionRewardList.Count == 0) + { + ShowCreateDeckDialog(savePurchaseProductInfo); + } + else if (_buyTask.LotteryData.IsEnable) + { + ShowLotteryApplyDialog(delegate + { + ShowCreateDeckDialog(savePurchaseProductInfo); + }); + } + else if (_buyTask.MissionRewardList.Count > 0) + { + ShowMissionRewardDialog(delegate + { + ShowCreateDeckDialog(savePurchaseProductInfo); + }); + } + } + _ReloadBuildDeckInfo(); + } + + private void ShowCreateDeckDialog(BuildDeckProductInfo savePurchaseProductInfo) + { + DialogBase diaChange = UIManager.GetInstance().CreateDialogClose(); + bool hasResurgentCard = savePurchaseProductInfo.HasResurgentCard; + string empty = string.Empty; + empty = ((_buyTask._seriesRewardList.Count > 0) ? Wizard.Data.SystemText.Get("Shop_0144", savePurchaseProductInfo.saleInfo.name.Replace("\n", "")) : ((!hasResurgentCard) ? Wizard.Data.SystemText.Get("Shop_0124", savePurchaseProductInfo.saleInfo.name.Replace("\n", "")) : Wizard.Data.SystemText.Get("Shop_0256", savePurchaseProductInfo.saleInfo.name.Replace("\n", "")))); + diaChange.SetText(empty); + diaChange.SetTitleLabel(Wizard.Data.SystemText.Get("Dia_BuyBuildDeck_004_Title")); + diaChange.SetButtonLayout(DialogBase.ButtonLayout.BlueBtn_CancelBtn); + diaChange.SetButtonText(Wizard.Data.SystemText.Get("Dia_BuyBuildDeck_001_Button")); + _purchaseDeckName = savePurchaseProductInfo.saleInfo.name; + _purchaseDeckClassId = savePurchaseProductInfo.leader_id; + _purchaseDeckCardIds = savePurchaseProductInfo.CardIdList; + if (hasResurgentCard) + { + diaChange.onPushButton1 = delegate + { + CheckEmptyDeck(Format.Rotation); + }; + } + else + { + diaChange.onPushButton1 = OpenSelectFormatDialog; + } + diaChange.onPushButton2 = delegate + { + diaChange.CloseWithoutSelect(); + }; + diaChange.onCloseWithoutSelect = delegate + { + UIManager.GetInstance().StartCoroutine(ShowAchieveLog(_buyTask.NotificatonAnimationParams)); + _buyTask.NotificatonAnimationParams = null; + }; + } + + private void ShowMissionRewardDialog(Action onFinish) + { + DialogBase dialogBase = UIManager.GetInstance().CreateDialogClose(); + dialogBase.SetSize(DialogBase.Size.M); + dialogBase.SetTitleLabel(Wizard.Data.SystemText.Get("Story_0029")); + dialogBase.SetButtonLayout(DialogBase.ButtonLayout.OkBtn); + dialogBase.OnClose = delegate + { + onFinish.Call(); + }; + RewardBase component = NGUITools.AddChild(dialogBase.gameObject, UIManager.GetInstance().GetRewardDialogPrefab().gameObject).GetComponent(); + for (int num = 0; num < _buyTask.MissionRewardList.Count; num++) + { + component.AddReward(_buyTask.MissionRewardList[num]); + } + component.EndCreate(); + } + + private IEnumerator ShowAchieveLog(List paramList) + { + if (paramList != null) + { + if (_notificationAnimation != null) + { + UnityEngine.Object.Destroy(_notificationAnimation.gameObject); + _notificationAnimation = null; + } + _notificationAnimation = NGUITools.AddChild(_achieveLog, _notificationAnimationPrefab.gameObject).GetComponent(); + yield return StartCoroutine(_notificationAnimation.Exec(paramList)); + } + } + + private void CheckEmptyDeck(Format format) + { + _deckCreateFormat = format; + EmptyDeckInfoTask emptyDeckInfoTask = new EmptyDeckInfoTask(); + emptyDeckInfoTask.SetParameter(_deckCreateFormat); + StartCoroutine(Toolbox.NetworkManager.Connect(emptyDeckInfoTask, OnSuccessDeckListCheck)); + } + + private void OpenSelectFormatDialog() + { + DialogBase dialogBase = UIManager.GetInstance().CreateDialogClose(); + SystemText systemText = Wizard.Data.SystemText; + dialogBase.SetText(systemText.Get("Shop_0138")); + dialogBase.SetTitleLabel(systemText.Get("Dia_BuyBuildDeck_004_Title")); + dialogBase.AddButton(DialogBase.ButtonType.Blue, isReflect: true, systemText.Get("Common_0155")); + dialogBase.AddButton(DialogBase.ButtonType.Blue, isReflect: true, systemText.Get("Common_0154")); + dialogBase.onPushButton1 = delegate + { + CheckEmptyDeck(Format.Unlimited); + }; + dialogBase.onPushButton2 = delegate + { + CheckEmptyDeck(Format.Rotation); + }; + dialogBase.onCloseWithoutSelect = delegate + { + UIManager.GetInstance().StartCoroutine(ShowAchieveLog(_buyTask.NotificatonAnimationParams)); + _buyTask.NotificatonAnimationParams = null; + }; + } + + private void OnSuccessDeckListCheck(NetworkTask.ResultCode errorcode) + { + if (Wizard.Data.EmptyDeckInfo.CanDeckCreate) + { + SetUpDeckDataAndChangeViewDeckEdit(); + return; + } + DialogBase dialogBase = UIManager.GetInstance().CreateDialogClose(); + dialogBase.SetText(Wizard.Data.SystemText.Get("Dia_BuyBuildDeck_005_Body")); + dialogBase.SetTitleLabel(Wizard.Data.SystemText.Get("Dia_BuyBuildDeck_005_Title")); + dialogBase.SetButtonLayout(DialogBase.ButtonLayout.OkBtn); + dialogBase.SetButtonText(Wizard.Data.SystemText.Get("Dia_BuyBuildDeck_005_Button")); + dialogBase.onPushButton1 = delegate + { + UIManager.ChangeViewSceneParam param = new UIManager.ChangeViewSceneParam + { + IsUpdateFooterMenuTexture = true + }; + DeckListUI.ChangeSceneToDeckList(_deckCreateFormat, param); + }; + } + + private void SetUpDeckDataAndChangeViewDeckEdit() + { + DeckData deckData = new DeckData(); + deckData.SetDeckClassID(_purchaseDeckClassId); + deckData.SetDeckSleeveID(3000011L); + deckData.SetDeckIsComplete(isComplete: true); + deckData.SetCardIdList(_purchaseDeckCardIds); + DeckData deckData2 = new DeckData(_deckCreateFormat, DeckAttributeType.CustomDeck); + deckData2.SetDeckID(Wizard.Data.EmptyDeckInfo.EmptyDeckID); + DeckCardEditUI.SetBuildDeckEditParameter(deckData, _purchaseDeckName, deckData2); + UIManager.GetInstance().ChangeViewScene(UIManager.ViewScene.DeckCardEdit); + } + + private void _ReloadBuildDeckInfo() + { + if (MyPageMenu.Instance != null) + { + MyPageMenu.Instance.UpdateCrystalCount(); + MyPageMenu.Instance.UpdateRupyCount(); + } + else + { + UIManager.GetInstance().UpDateCrystalNum(); + } + List oldSeriesList = new List(Wizard.Data.BuildDeckPurchaseInfo.seriesList); + StartGetBuildDeckInfo(delegate + { + bool flag = false; + List seriesList = Wizard.Data.BuildDeckPurchaseInfo.seriesList; + for (int i = 0; i < seriesList.Count; i++) + { + if (oldSeriesList[i]._seriesId != seriesList[i]._seriesId) + { + flag = true; + } + if (seriesList[i]._seriesId == _selectSeriesInfo._seriesId) + { + if (_selectPlate != null) + { + if (_selectPlate.ProductInfo.product_id == _purchaseProductInfo.product_id) + { + _selectSeriesInfo = seriesList[i]; + BuildDeckPlate[] componentsInChildren = _wrapContent.gameObject.GetComponentsInChildren(); + foreach (BuildDeckPlate plate in componentsInChildren) + { + int realIndex = _selectSeriesInfo.productList.FindIndex((BuildDeckProductInfo p) => p.product_id == plate.ProductInfo.product_id); + OnInitializeItem(plate.gameObject, 0, realIndex); + } + } + else + { + onSelectSeries(i); + } + } + else + { + onSelectSeries(i); + } + } + } + if (oldSeriesList.Count != seriesList.Count) + { + flag = true; + } + _purchaseProductInfo = null; + _selectPlate = null; + if (flag) + { + List seriesIdList = GetSeriesIdList(); + Dictionary seriesDataDictionary = GetSeriesDataDictionary(); + StartCoroutine(loadSeriesImages(ResourcesManager.AssetLoadPathType.ShopBuildDeck, seriesIdList, seriesDataDictionary, delegate + { + List itemList = _drumrollSeriesImageList.ConvertAll((Texture tex) => new ShopDrumrollScrollManager.DrumrollItem(tex)); + StartCoroutine(_drumrollManager.CreateDrumrollScroll_Coroutine(itemList, 0, onSelectSeries, delegate + { + onSelectSeries(0); + UIManager.GetInstance().closeInSceneCenterLoading(); + })); + })); + } + else + { + UIManager.GetInstance().closeInSceneCenterLoading(); + } + }); + } +} diff --git a/SVSim.BattleEngine/Engine/Wizard.Scripts.Network.Task.Arena.TwoPick/EntryTask.cs b/SVSim.BattleEngine/Engine/Wizard.Scripts.Network.Task.Arena.TwoPick/EntryTask.cs new file mode 100644 index 0000000..49c56a9 --- /dev/null +++ b/SVSim.BattleEngine/Engine/Wizard.Scripts.Network.Task.Arena.TwoPick/EntryTask.cs @@ -0,0 +1,31 @@ +using LitJson; +using Wizard.Scripts.Network.Data.TaskData.Arena; +using Wizard.Scripts.Network.Data.TaskData.Arena.TwoPick; + +namespace Wizard.Scripts.Network.Task.Arena.TwoPick; + +public class EntryTask : ArenaEntryTaskBase +{ + public class ArenaTwoPickPrepareTaskParam : BaseParam + { + public int consume_item_type; + } + + public EntryTask() + { + base.type = ApiType.Type.ArenaTwoPickEntry; + } + + public override void SetParameter(int consumeItemType) + { + ArenaTwoPickPrepareTaskParam arenaTwoPickPrepareTaskParam = new ArenaTwoPickPrepareTaskParam(); + arenaTwoPickPrepareTaskParam.consume_item_type = consumeItemType; + base.Params = arenaTwoPickPrepareTaskParam; + } + + protected override void SetResponseParams(JsonData data, JsonData headerData) + { + Wizard.Data.TwoPickEntry = new Entry(data); + Wizard.Data.TwoPickInfo = new TwoPickInfo(data, headerData); + } +} diff --git a/SVSim.BattleEngine/Engine/Wizard.Scripts.Network.Task.Arena.TwoPick/RetireTask.cs b/SVSim.BattleEngine/Engine/Wizard.Scripts.Network.Task.Arena.TwoPick/RetireTask.cs new file mode 100644 index 0000000..24b6909 --- /dev/null +++ b/SVSim.BattleEngine/Engine/Wizard.Scripts.Network.Task.Arena.TwoPick/RetireTask.cs @@ -0,0 +1,34 @@ +using LitJson; + +namespace Wizard.Scripts.Network.Task.Arena.TwoPick; + +public class RetireTask : ArenaRetireTaskBase +{ + public class RetireTaskParam : BaseParam + { + } + + public RetireTask() + { + base.type = ApiType.Type.ArenaTwoPickRetire; + } + + public override void SetParameter() + { + RetireTaskParam retireTaskParam = new RetireTaskParam(); + base.Params = retireTaskParam; + } + + protected override int Parse() + { + int num = base.Parse(); + if (num != 1) + { + return num; + } + JsonData jsonData = base.ResponseData["data"]; + Wizard.Data.TwoPickInfo.SetEntryRewardList(jsonData["rewards"]); + PlayerStaticData.UpdateHaveUserGoodsNumByJsonData(base.ResponseData["data"]["reward_list"]); + return num; + } +} diff --git a/SVSim.BattleEngine/Engine/Wizard.Scripts.Network.Task.Arena.TwoPick/TopTask.cs b/SVSim.BattleEngine/Engine/Wizard.Scripts.Network.Task.Arena.TwoPick/TopTask.cs new file mode 100644 index 0000000..15b33b1 --- /dev/null +++ b/SVSim.BattleEngine/Engine/Wizard.Scripts.Network.Task.Arena.TwoPick/TopTask.cs @@ -0,0 +1,33 @@ +using Wizard.Scripts.Network.Data.TaskData.Arena; + +namespace Wizard.Scripts.Network.Task.Arena.TwoPick; + +public class TopTask : ArenaTopTaskBase +{ + public class ArenaTwoPickTopTaskParam : BaseParam + { + public int mode; + } + + public TopTask() + { + base.type = ApiType.Type.ArenaTwoPickTop; + } + + public override void SetParameter() + { + ArenaTwoPickTopTaskParam arenaTwoPickTopTaskParam = new ArenaTwoPickTopTaskParam(); + base.Params = arenaTwoPickTopTaskParam; + } + + protected override int Parse() + { + int num = base.Parse(); + if (num != 1) + { + return num; + } + Wizard.Data.TwoPickInfo = new TwoPickInfo(base.ResponseData["data"], base.ResponseData["data_headers"]); + return num; + } +} diff --git a/SVSim.BattleEngine/Engine/Wizard.Scripts.Network.Task.ItemAcquireHistory/ItemAcquireHistoryInfoTask.cs b/SVSim.BattleEngine/Engine/Wizard.Scripts.Network.Task.ItemAcquireHistory/ItemAcquireHistoryInfoTask.cs new file mode 100644 index 0000000..9859856 --- /dev/null +++ b/SVSim.BattleEngine/Engine/Wizard.Scripts.Network.Task.ItemAcquireHistory/ItemAcquireHistoryInfoTask.cs @@ -0,0 +1,32 @@ +using Wizard.Scripts.Network.Data.TaskData; + +namespace Wizard.Scripts.Network.Task.ItemAcquireHistory; + +public class ItemAcquireHistoryInfoTask : BaseTask +{ + public class ItemAcquireHistoryInfoTaskParam : BaseParam + { + } + + public ItemAcquireHistoryInfoTask() + { + base.type = ApiType.Type.ItemAcquireHistoryInfo; + } + + public void SetParameter() + { + ItemAcquireHistoryInfoTaskParam itemAcquireHistoryInfoTaskParam = new ItemAcquireHistoryInfoTaskParam(); + base.Params = itemAcquireHistoryInfoTaskParam; + } + + protected override int Parse() + { + int num = base.Parse(); + if (num != 1) + { + return num; + } + Wizard.Data.ItemAcquireHistoryInfo = new ItemAcquireHistoryInfo(base.ResponseData["data"]["histories"]); + return num; + } +} diff --git a/SVSim.BattleEngine/Engine/Wizard/AccountBase.cs b/SVSim.BattleEngine/Engine/Wizard/AccountBase.cs new file mode 100644 index 0000000..ee12dd2 --- /dev/null +++ b/SVSim.BattleEngine/Engine/Wizard/AccountBase.cs @@ -0,0 +1,445 @@ +using System; +using Cute; +using UnityEngine; +using Wizard.Dialog.DataLink; +using Wizard.Dialog.Setting; + +namespace Wizard; + +public class AccountBase : MonoBehaviour +{ + public enum DisplayType + { + NONE, + TITLE, + OTHER, + ACCOUNT_LINK, + ID_PASSWORD_INPUT, + PASSWORD_SETTING + } + + public enum TransitionOriginalScreen + { + TITLE, + OTHER + } + + [SerializeField] + private GameObject TransferContainer; + + [SerializeField] + private GameObject InputContainer; + + [SerializeField] + public IdPasswordInput _idPasswordInput; + + [SerializeField] + public PasswordSetting _passwordSetting; + + [SerializeField] + private GameObject TopContainer; + + [SerializeField] + private Transform _topContainerLine; + + [SerializeField] + private GameObject TitleContainer; + + [SerializeField] + private GameObject OtherContainer; + + [SerializeField] + private UIButton _appleButton; + + private const int INDEX_TOP_LABEL = 0; + + private const int INDEX_MID_LABEL = 1; + + private const int INDEX_INPUT_LABEL = 2; + + private const int INDEX_BOTTOM_LABEL = 3; + + private const int INDEX_BUTTON_LABEL = 4; + + private Vector3 AccountPos = new Vector3(0f, 70f, 0f); + + [SerializeField] + private UIGrid ButtonGrid; + + [SerializeField] + public NguiObjs BtnTransferCode; + + [SerializeField] + public NguiObjs BtnGoogle; + + [SerializeField] + public NguiObjs BtnFaceBook; + + [SerializeField] + public NguiObjs ButtonGetCode; + + [SerializeField] + public UILabel CommonLabelTop; + + [SerializeField] + public UILabel CommonLabelBtm; + + private readonly Vector3 TopContainerPosition = new Vector3(0f, -90f, 0f); + + private const int MIN_PASSWORD_LENGTH = 8; + + private const int MAX_PASSWORD_LENGTH = 16; + + private void Awake() + { + SetLabels(); + BtnGoogle.gameObject.SetActive(value: false); + _appleButton.gameObject.SetActive(value: false); + ButtonGrid.repositionNow = true; + } + + private void SetLabels() + { + SystemText systemText = Data.SystemText; + BtnTransferCode.labels[0].text = systemText.Get("Account_0094"); + ButtonGetCode.labels[0].text = (GameStartCheckTask.IsSetTransitionPassword ? systemText.Get("Account_0100") : systemText.Get("Account_0099")); + CommonLabelTop.text = systemText.Get("Account_0095"); + CommonLabelBtm.text = systemText.Get("Account_0073"); + } + + public void SetDisplayType(DisplayType type) + { + switch (type) + { + case DisplayType.TITLE: + TransferContainer.SetActive(value: true); + InputContainer.SetActive(value: false); + _idPasswordInput.gameObject.SetActive(value: false); + _passwordSetting.gameObject.SetActive(value: false); + OtherContainer.SetActive(value: false); + TitleContainer.SetActive(value: false); + UIUtil.SetPositionY(TopContainer.transform, -90f); + _topContainerLine.gameObject.SetActive(value: false); + break; + case DisplayType.OTHER: + TransferContainer.SetActive(value: true); + InputContainer.SetActive(value: false); + _idPasswordInput.gameObject.SetActive(value: false); + _passwordSetting.gameObject.SetActive(value: false); + TitleContainer.SetActive(value: false); + break; + case DisplayType.ACCOUNT_LINK: + TransferContainer.SetActive(value: true); + TransferContainer.transform.localPosition = AccountPos; + InputContainer.SetActive(value: false); + _idPasswordInput.gameObject.SetActive(value: false); + _passwordSetting.gameObject.SetActive(value: false); + TopContainer.SetActive(value: false); + OtherContainer.SetActive(value: false); + if (GetActiveChildCount(ButtonGrid.transform) <= 2) + { + UIUtil.SetPositionY(TitleContainer.transform, 50f); + UIUtil.SetPositionY(ButtonGrid.transform, -96f); + } + else + { + UIUtil.SetPositionY(TitleContainer.transform, 0f); + UIUtil.SetPositionY(ButtonGrid.transform, -60f); + } + break; + case DisplayType.ID_PASSWORD_INPUT: + TransferContainer.SetActive(value: false); + InputContainer.SetActive(value: false); + _idPasswordInput.gameObject.SetActive(value: true); + _passwordSetting.gameObject.SetActive(value: false); + break; + case DisplayType.PASSWORD_SETTING: + TransferContainer.SetActive(value: false); + InputContainer.SetActive(value: false); + _idPasswordInput.gameObject.SetActive(value: false); + _passwordSetting.gameObject.SetActive(value: true); + break; + } + } + + public DialogBase Init(DisplayType type, TransitionOriginalScreen from, Action close_callback = null) + { + SystemText text = Data.SystemText; + SetDisplayType(type); + DialogBase dialog = UIManager.GetInstance().CreateDialogClose(); + dialog.SetSize(DialogBase.Size.M); + dialog.SetObj(base.gameObject); + if (type != DisplayType.PASSWORD_SETTING) + { + if (type == DisplayType.OTHER) + { + dialog.SetTitleLabel(text.Get("Account_0001")); + } + else + { + dialog.SetTitleLabel(text.Get("Account_0004")); + } + dialog.SetButtonLayout(DialogBase.ButtonLayout.CloseBtn); + } + BtnTransferCode.buttons[0].onClick.Add(new EventDelegate(delegate + { + OnClickIdPasswordInputButton(dialog, from); + })); + BtnGoogle.buttons[0].onClick.Add(new EventDelegate(delegate + { + dialog.CloseWithoutSelect(); + UIManager.GetInstance().AccountTransferHelper.PressedTransitongButton = CuteNetworkDefine.ACCOUNT_TYPE.GOOGLE_PLAY; + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_COMMON_BUTTON); + DialogBase dialogBase = UIManager.GetInstance().CreateDialogClose(); + dialogBase.SetSize(DialogBase.Size.M); + dialogBase.SetTitleLabel(text.Get("Account_0015")); + dialogBase.SetText(text.Get("Account_0077")); + dialogBase.SetButtonLayout(DialogBase.ButtonLayout.BlueBtn_GrayBtn); + dialogBase.SetButtonText(text.Get("Account_0084"), text.Get("Account_0080")); + EventDelegate method_btn = new EventDelegate(delegate + { + UIManager.GetInstance().AccountTransferHelper.DataTransfer(close_callback); + }); + dialogBase.SetButtonDelegate(method_btn); + })); + BtnFaceBook.buttons[0].onClick.Add(new EventDelegate(delegate + { + dialog.CloseWithoutSelect(); + UIManager.GetInstance().AccountTransferHelper.PressedTransitongButton = CuteNetworkDefine.ACCOUNT_TYPE.FACEBOOK; + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_COMMON_BUTTON); + DialogBase dialogBase = UIManager.GetInstance().CreateDialogClose(); + dialogBase.SetSize(DialogBase.Size.M); + dialogBase.SetTitleLabel(text.Get("Account_0058")); + dialogBase.SetText(text.Get("Account_0079")); + dialogBase.SetButtonLayout(DialogBase.ButtonLayout.BlueBtn_GrayBtn); + dialogBase.SetButtonText(text.Get("Account_0084"), text.Get("Account_0080")); + EventDelegate method_btn = new EventDelegate(delegate + { + UIManager.GetInstance().WebViewHelper.CreateOpenURLWindow(WebViewHelper.UrlType.FACEBOOK); + }); + dialogBase.SetButtonDelegate(method_btn); + })); + ButtonGetCode.buttons[0].onClick.Add(new EventDelegate(delegate + { + OnClickPasswordSettingButton(dialog, from); + })); + return dialog; + } + + private void OnClickIdPasswordInputButton(DialogBase previousDialog, TransitionOriginalScreen from) + { + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_BTN_DECIDE); + previousDialog.CloseWithoutSelect(); + DialogBase idPasswordInputDialog = UIManager.GetInstance().AccountTransferHelper.CreateAccountTransferDialog(DisplayType.ID_PASSWORD_INPUT, from); + IdPasswordInput idPasswordInputObject = idPasswordInputDialog.InsideObject.GetComponent()._idPasswordInput; + UIInputWizard idInput = idPasswordInputObject._idInput; + UIInputWizard passwordInput = idPasswordInputObject._passwordInput; + EventDelegate item = new EventDelegate(delegate + { + idPasswordInputDialog.SetButtonDisable(string.IsNullOrEmpty(idInput.value) || string.IsNullOrEmpty(passwordInput.value)); + }); + UIInputWizard[] array = new UIInputWizard[2] { idInput, passwordInput }; + foreach (UIInputWizard input in array) + { + EventDelegate item2 = new EventDelegate(delegate + { + InputDialog.TextInputLimitCheck(input.characterLimit); + }); + input.onChange.Add(item); + input.onSubmit.Add(item2); + input.onDeselect.Add(item2); + } + SystemText systemText = Data.SystemText; + idPasswordInputDialog.SetSize(DialogBase.Size.S); + idPasswordInputDialog.SetTitleLabel(systemText.Get("Account_0001")); + idPasswordInputDialog.SetButtonLayout(DialogBase.ButtonLayout.DecisionBtn); + idPasswordInputDialog.SetButtonDisable(isEnableOK: true); + idPasswordInputDialog.isNotCloseWindowButton1 = true; + idPasswordInputDialog.onPushButton1 = delegate + { + string userId = idInput.value; + string passwordHash = Cryptographer.MakeMd5(passwordInput.value); + CheckTimeSlipRotationPeriod(delegate + { + GetGameDataByTransitionCode getGameDataByTransitionCode = new GetGameDataByTransitionCode(); + getGameDataByTransitionCode.SetParameter(userId, passwordHash); + UIManager.GetInstance().StartCoroutine(Toolbox.NetworkManager.Connect(getGameDataByTransitionCode, delegate(NetworkTask.ResultCode code) + { + idPasswordInputDialog.Close(); + UIManager.GetInstance().AccountTransferHelper.ShowAccountMagritionConfirmByTransferCode(code); + }, null, delegate + { + idPasswordInputObject.ResetInputValue(); + })); + }); + }; + } + + private static void CheckTimeSlipRotationPeriod(Action onFinish) + { + if (UIManager.GetInstance().GetCurrentScene() == UIManager.ViewScene.Title) + { + onFinish.Call(); + return; + } + CheckTimeSlipRotationPeriodTask task = new CheckTimeSlipRotationPeriodTask(); + UIManager.GetInstance().StartCoroutine(Toolbox.NetworkManager.Connect(task, delegate + { + onFinish.Call(); + })); + } + + private void OnClickPasswordSettingButton(DialogBase previousDialog, TransitionOriginalScreen from) + { + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_BTN_DECIDE); + previousDialog.CloseWithoutSelect(); + SystemText text = Data.SystemText; + DialogBase dialogBase = UIManager.GetInstance().CreateDialogClose(); + dialogBase.SetSize(DialogBase.Size.M); + dialogBase.SetTitleLabel(text.Get("Account_0101")); + dialogBase.SetText(text.Get("Account_0102")); + dialogBase.SetButtonLayout(DialogBase.ButtonLayout.BlueBtn_CancelBtn); + dialogBase.SetButtonText(text.Get("Account_0103")); + dialogBase.onPushButton1 = delegate + { + DialogBase passwordSettingDialog = UIManager.GetInstance().AccountTransferHelper.CreateAccountTransferDialog(DisplayType.PASSWORD_SETTING, from); + AccountBase passwordSettingAccountBase = passwordSettingDialog.InsideObject.GetComponent(); + PasswordSetting passwordSettingObject = passwordSettingAccountBase._passwordSetting; + UIInputWizard firstInput = passwordSettingObject._firstInput; + UIInputWizard secondInput = passwordSettingObject._secondInput; + EventDelegate eventDelegate = new EventDelegate(delegate + { + passwordSettingDialog.SetButtonDisable(string.IsNullOrEmpty(firstInput.value) || string.IsNullOrEmpty(secondInput.value) || !passwordSettingObject._acceptToggle.GetValue()); + }); + UIInputWizard[] array = new UIInputWizard[2] { firstInput, secondInput }; + foreach (UIInputWizard input in array) + { + EventDelegate item = new EventDelegate(delegate + { + InputDialog.TextInputLimitCheck(input.characterLimit); + }); + input.onChange.Add(eventDelegate); + input.onSubmit.Add(item); + input.onDeselect.Add(item); + } + passwordSettingObject._privacyPolicyButton.onClick.Add(new EventDelegate(delegate + { + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_BTN_DECIDE); + UIManager.GetInstance().WebViewHelper.OpenWebView(WebViewHelper.WebViewType.PRIVACY_POLICY); + })); + ItemToggle acceptToggle = passwordSettingObject._acceptToggle; + acceptToggle.SetValue(value: false); + acceptToggle.AddChangeCallback(eventDelegate); + passwordSettingDialog.SetSize(DialogBase.Size.M); + passwordSettingDialog.SetTitleLabel(text.Get("Account_0101")); + passwordSettingDialog.SetButtonLayout(DialogBase.ButtonLayout.BlueBtn_CancelBtn); + passwordSettingDialog.SetButtonText(text.Get("Account_0103")); + passwordSettingDialog.SetButtonDisable(isEnableOK: true); + passwordSettingDialog.isNotCloseWindowButton1 = true; + passwordSettingDialog.onPushButton1 = delegate + { + if (!CheckDataLinkPassword(firstInput.value, secondInput.value)) + { + passwordSettingObject.ResetInputValue(); + DialogBase dialogBase2 = UIManager.GetInstance().CreateDialogClose(); + dialogBase2.SetPanelDepth(passwordSettingAccountBase.GetComponent().depth + 5); + dialogBase2.SetTitleLabel(text.Get("Account_0101")); + dialogBase2.SetText(text.Get("Account_0107")); + dialogBase2.SetButtonLayout(DialogBase.ButtonLayout.OkBtn); + } + else + { + passwordSettingDialog.Close(); + UpdatePassword(firstInput.value); + } + }; + }; + } + + private static void UpdatePassword(string password) + { + SystemText text = Data.SystemText; + CheckTimeSlipRotationPeriodTask task = new CheckTimeSlipRotationPeriodTask(); + UIManager.GetInstance().StartCoroutine(Toolbox.NetworkManager.Connect(task, delegate + { + string parameter = Cryptographer.MakeMd5(password); + PublistTransitionCode publistTransitionCode = new PublistTransitionCode(); + publistTransitionCode.SetParameter(parameter); + UIManager.GetInstance().StartCoroutine(Toolbox.NetworkManager.Connect(publistTransitionCode, delegate + { + GameStartCheckTask.IsSetTransitionPassword = true; + GameMgr.GetIns().GetPrefabMgr().Load("UI/layoutParts/Dialog/PasswordConfirm"); + DialogBase dialogBase = UIManager.GetInstance().CreateDialogClose(); + dialogBase.SetSize(DialogBase.Size.M); + dialogBase.SetButtonLayout(DialogBase.ButtonLayout.OkBtn); + NguiObjs component = NGUITools.AddChild(dialogBase.gameObject, GameMgr.GetIns().GetPrefabMgr().Get("UI/layoutParts/Dialog/PasswordConfirm")).GetComponent(); + component.labels[0].text = text.Get("Account_0108"); + component.labels[1].text = text.Get("Account_0109"); + component.labels[2].text = text.Get("Profile_0008") + ": " + VideoHostingUtil.GetUserIDHidden($"{PlayerStaticData.UserViewerID:#,0}".Replace(",", " ")); + component.labels[3].text = text.Get("Account_0110"); + component.labels[4].text = text.Get("Profile_0009"); + component.buttons[0].onClick.Add(new EventDelegate(delegate + { + NativePluginWrapper.SetStringToClipboard(PlayerStaticData.UserViewerID.ToString()); + DialogBase dialogBase2 = UIManager.GetInstance().CreateDialogClose(); + dialogBase2.SetPanelDepth(100); + dialogBase2.SetSize(DialogBase.Size.S); + dialogBase2.SetText(text.Get("Profile_0015")); + dialogBase2.SetButtonLayout(DialogBase.ButtonLayout.OkBtn); + })); + })); + })); + } + + private bool CheckDataLinkPassword(string firstPass, string secondPass) + { + if (firstPass != secondPass) + { + return false; + } + if (firstPass.Length < 8 || 16 < firstPass.Length) + { + return false; + } + int num = 0; + int num2 = 0; + int num3 = 0; + foreach (char c in firstPass) + { + if ('0' <= c && c <= '9') + { + num++; + continue; + } + if ('a' <= c && c <= 'z') + { + num2++; + continue; + } + if ('A' <= c && c <= 'Z') + { + num3++; + continue; + } + return false; + } + if (num <= 0 || num2 <= 0 || num3 <= 0) + { + return false; + } + return true; + } + + private int GetActiveChildCount(Transform parent) + { + int num = 0; + for (int i = 0; i < parent.childCount; i++) + { + if (parent.GetChild(i).gameObject.activeSelf) + { + num++; + } + } + return num; + } +} diff --git a/SVSim.BattleEngine/Engine/Wizard/AdjustSendSettingDialog.cs b/SVSim.BattleEngine/Engine/Wizard/AdjustSendSettingDialog.cs new file mode 100644 index 0000000..1b0fd1e --- /dev/null +++ b/SVSim.BattleEngine/Engine/Wizard/AdjustSendSettingDialog.cs @@ -0,0 +1,47 @@ +using System; +using Cute; +using UnityEngine; + +namespace Wizard; + +public class AdjustSendSettingDialog : MonoBehaviour +{ + [SerializeField] + private UIToggle _toggle; + + private bool _firstToggleCall = true; + + public Action OnChange; + + public static AdjustSendSettingDialog Create(GameObject prefab) + { + DialogBase dialogBase = UIManager.GetInstance().CreateDialogClose(); + SystemText systemText = Data.SystemText; + dialogBase.SetButtonLayout(DialogBase.ButtonLayout.OkBtn); + dialogBase.SetTitleLabel(systemText.Get("MyPage_0072")); + dialogBase.SetText(systemText.Get("MyPage_0073")); + dialogBase.SetSize(DialogBase.Size.M); + AdjustSendSettingDialog component = UnityEngine.Object.Instantiate(prefab).GetComponent(); + dialogBase.SetObj(component.gameObject); + return component; + } + + private void Start() + { + _toggle.value = Data.Load.data._userConfig.ArrowAdjustSend; + _toggle.onChange.Add(new EventDelegate(delegate + { + OnChangeToggle(); + })); + } + + private void OnChangeToggle() + { + if (!_firstToggleCall) + { + GameMgr.GetIns().GetSoundMgr().PlaySe(_toggle.value ? Se.TYPE.SYS_TOGGLE_ON : Se.TYPE.SYS_TOGGLE_OFF); + OnChange.Call(_toggle.value); + } + _firstToggleCall = false; + } +} diff --git a/SVSim.BattleEngine/Engine/Wizard/BattlePassBuyTask.cs b/SVSim.BattleEngine/Engine/Wizard/BattlePassBuyTask.cs new file mode 100644 index 0000000..8eb4998 --- /dev/null +++ b/SVSim.BattleEngine/Engine/Wizard/BattlePassBuyTask.cs @@ -0,0 +1,54 @@ +using System.Collections.Generic; +using LitJson; + +namespace Wizard; + +public class BattlePassBuyTask : BaseTask +{ + public class BattlePassBuyTaskParam : BaseParam + { + public int season_id { get; set; } + + public int id { get; set; } + } + + public List RewardList { get; private set; } + + public BattlePassBuyTask() + { + base.type = ApiType.Type.BattlePassBuy; + } + + public void SetParameter(int seasonId, int id) + { + BattlePassBuyTaskParam battlePassBuyTaskParam = new BattlePassBuyTaskParam(); + battlePassBuyTaskParam.season_id = seasonId; + battlePassBuyTaskParam.id = id; + base.Params = battlePassBuyTaskParam; + } + + protected override int Parse() + { + int num = base.Parse(); + if (num != 1) + { + return num; + } + JsonData jsonData = base.ResponseData["data"]["achieved_info"]; + if (jsonData.Count > 0 && jsonData.Keys.Contains("battle_pass_reward_list")) + { + JsonData jsonData2 = jsonData["battle_pass_reward_list"]; + RewardList = new List(); + for (int i = 0; i < jsonData2.Count; i++) + { + JsonData jsonData3 = jsonData2[i]; + int rewardType = jsonData3["reward_type"].ToInt(); + long rewardId = jsonData3["reward_detail_id"].ToLong(); + int rewardCount = jsonData3["reward_number"].ToInt(); + RewardList.Add(new ReceivedReward(rewardType, rewardId, rewardCount)); + } + } + PlayerStaticData.UpdateHaveUserGoodsNumByJsonData(base.ResponseData["data"]["reward_list"]); + return num; + } +} diff --git a/SVSim.BattleEngine/Engine/Wizard/BattlePassProductDetailDialog.cs b/SVSim.BattleEngine/Engine/Wizard/BattlePassProductDetailDialog.cs new file mode 100644 index 0000000..d901205 --- /dev/null +++ b/SVSim.BattleEngine/Engine/Wizard/BattlePassProductDetailDialog.cs @@ -0,0 +1,65 @@ +using System; +using System.Collections.Generic; +using Cute; +using UnityEngine; + +namespace Wizard; + +public class BattlePassProductDetailDialog : MonoBehaviour +{ + private const string PATH_DIALOG_PREFAB = "UI/layoutParts/BattlePass/DialogBattlePassProductDetail"; + + [SerializeField] + private UILabel _descriptionLabel; + + [SerializeField] + private UITexture _posterTexture; + + private List _loadedResourceList; + + public static void Create(BattlePassProduct product) + { + DialogBase dialogBase = UIManager.GetInstance().CreateDialogClose(); + dialogBase.SetSize(DialogBase.Size.M); + dialogBase.SetButtonLayout(DialogBase.ButtonLayout.OkBtn); + dialogBase.SetPanelDepth(100); + dialogBase.SetTitleLabel(Data.SystemText.Get("BattlePass_0003")); + GameObject gameObject = UnityEngine.Object.Instantiate(Resources.Load("UI/layoutParts/BattlePass/DialogBattlePassProductDetail")) as GameObject; + dialogBase.SetObj(gameObject); + gameObject.GetComponent().Initialize(product); + } + + public void Initialize(BattlePassProduct product) + { + _descriptionLabel.text = product.Description; + _loadedResourceList = new List(); + LoadResources(product, delegate + { + _posterTexture.mainTexture = Toolbox.ResourcesManager.LoadObject(product.GetDetailPosterTexturePath(isFetch: true)) as Texture; + }); + } + + private void OnDestroy() + { + UnloadResources(); + } + + private void LoadResources(BattlePassProduct product, Action onFinishLoad) + { + UIManager.GetInstance().createInSceneCenterLoading(); + List loadPassList = new List(); + loadPassList.Add(product.GetDetailPosterTexturePath(isFetch: false)); + StartCoroutine(Toolbox.ResourcesManager.LoadAssetGroupAsync(loadPassList, delegate + { + _loadedResourceList.AddRange(loadPassList); + UIManager.GetInstance().closeInSceneCenterLoading(); + onFinishLoad.Call(); + })); + } + + private void UnloadResources() + { + Toolbox.ResourcesManager.RemoveAssetGroup(_loadedResourceList); + _loadedResourceList = null; + } +} diff --git a/SVSim.BattleEngine/Engine/Wizard/BattlePassPurchaseInfoTask.cs b/SVSim.BattleEngine/Engine/Wizard/BattlePassPurchaseInfoTask.cs new file mode 100644 index 0000000..8204443 --- /dev/null +++ b/SVSim.BattleEngine/Engine/Wizard/BattlePassPurchaseInfoTask.cs @@ -0,0 +1,47 @@ +using System; +using System.Collections.Generic; +using LitJson; + +namespace Wizard; + +public class BattlePassPurchaseInfoTask : BaseTask +{ + public BattlePassPurchaseInfo PurchaseInfo { get; private set; } + + public BattlePassPurchaseInfoTask() + { + base.type = ApiType.Type.BattlePassItemList; + } + + protected override int Parse() + { + int num = base.Parse(); + if (num != 1) + { + return num; + } + JsonData jsonData = base.ResponseData["data"]; + string text = jsonData["premium_pass_description"].ToString(); + text = text.Replace("\\n", "\n"); + if (jsonData.Keys.Contains("sales_period_info") && jsonData["sales_period_info"].Keys.Contains("sales_period_time")) + { + string arg = ConvertTime.ToLocal(DateTime.Parse(jsonData["sales_period_info"]["sales_period_time"].ToString())); + text = string.Format(text, arg); + } + List list = new List(); + JsonData jsonData2 = jsonData["products"]; + for (int i = 0; i < jsonData2.Count; i++) + { + int id = jsonData2[i]["id"].ToInt(); + int seasonId = jsonData2[i]["season_id"].ToInt(); + string name = jsonData2[i]["name"].ToString(); + int priceInCrystal = jsonData2[i]["price_crystal"].ToInt(); + string text2 = jsonData2[i]["description"].ToString(); + text2 = text2.Replace("\\n", "\n"); + ShopExpirtyInfo expirtyInfo = new ShopExpirtyInfo(jsonData2[i]["sales_period_info"]); + list.Add(new BattlePassProduct(id, seasonId, name, priceInCrystal, text2, expirtyInfo)); + } + PurchaseInfo = new BattlePassPurchaseInfo(text, list); + return num; + } +} diff --git a/SVSim.BattleEngine/Engine/Wizard/BossRushLobbyAbilityDetailDialog.cs b/SVSim.BattleEngine/Engine/Wizard/BossRushLobbyAbilityDetailDialog.cs new file mode 100644 index 0000000..47bf266 --- /dev/null +++ b/SVSim.BattleEngine/Engine/Wizard/BossRushLobbyAbilityDetailDialog.cs @@ -0,0 +1,252 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using Cute; +using UnityEngine; +using Wizard.Battle.View; + +namespace Wizard; + +public class BossRushLobbyAbilityDetailDialog : MonoBehaviour +{ + private const float SELECT_CARD_SCALE = 1.35f; + + private const float GRID_CARD_SCALE = 0.64f; + + private const int GRID_CARD_DEPTH = 5; + + private const int KEYWORD_DIALOG_DEPTH = 20; + + private const int KEYWORD_PANEL_DEPTH = 25; + + private static readonly Vector3 DIALOG_POSITION = new Vector3(0f, 0f, 2f); + + [SerializeField] + private CardImageHelpder _cardLoader; + + [SerializeField] + private UIButton _buttonOriginal; + + [SerializeField] + private UIGrid _cardGrid; + + [SerializeField] + private UILabel _nameLabel; + + [SerializeField] + private UIScrollView _descScrollView; + + [SerializeField] + private UILabel _descLabel; + + [SerializeField] + private GameObject _selectCardRoot; + + [SerializeField] + private GameObject _selectCursor; + + [SerializeField] + private TextLineCreater _descLineCreator; + + [SerializeField] + private GameObject _emptyOriginal; + + [SerializeField] + private GameObject _keywordCollider; + + private GameObject _selectCard; + + public static void Create(List abilityList, int maxBossCount, BossRushLobbyAbilityData defaultSelectAbility = null) + { + DialogBase dialogBase = UIManager.GetInstance().CreateDialogClose(); + dialogBase.SetSize(DialogBase.Size.L); + dialogBase.SetTitleLabel(Data.SystemText.Get("BossRush_0022")); + dialogBase.SetButtonLayout(DialogBase.ButtonLayout.CloseBtn); + dialogBase.transform.localPosition = DIALOG_POSITION; + if (abilityList.Count == 0) + { + dialogBase.SetText(Data.SystemText.Get("BossRush_0024")); + return; + } + GameObject gameObject = UnityEngine.Object.Instantiate(Resources.Load("UI/layoutParts/BossRush/BossRushLobbyAbilityDetailDialog")) as GameObject; + dialogBase.SetObj(gameObject); + gameObject.GetComponent().Initialize(abilityList, maxBossCount, defaultSelectAbility); + } + + private void Initialize(List abilityList, int maxBossCount, BossRushLobbyAbilityData defaultSelectAbility) + { + _emptyOriginal.SetActive(value: false); + UIManager.GetInstance().createInSceneCenterLoading(); + StartCoroutine(LoadResources(abilityList, delegate + { + InitializeCardList(abilityList, maxBossCount, defaultSelectAbility); + UIManager.GetInstance().closeInSceneCenterLoading(); + })); + } + + private void InitializeCardList(List abilityList, int maxBossCount, BossRushLobbyAbilityData defaultSelectAbility) + { + _buttonOriginal.gameObject.SetActive(value: false); + int num = 0; + if (defaultSelectAbility != null) + { + for (int i = 0; i < abilityList.Count; i++) + { + if (abilityList[i] == defaultSelectAbility) + { + num = i; + break; + } + } + } + for (int j = 0; j < maxBossCount; j++) + { + if (j >= abilityList.Count) + { + AddEmptyAbilityFrame(); + } + else + { + AddAbilityCardObj(abilityList, j, num); + } + } + _cardGrid.Reposition(); + UIBase_CardManager.CardObjData cardObjData = _cardLoader.GetCardObjData(num); + _selectCursor.transform.position = cardObjData.CardObj.transform.position; + } + + private void AddEmptyAbilityFrame() + { + NGUITools.AddChild(_cardGrid.gameObject, _emptyOriginal).SetActive(value: true); + } + + private void AddAbilityCardObj(List abilityList, int index, int defaultSelectIndex) + { + GameObject gameObject = NGUITools.AddChild(_cardGrid.gameObject, _buttonOriginal.gameObject); + UIButton component = gameObject.GetComponent(); + gameObject.SetActive(value: true); + BossRushLobbyAbilityData abilityData = abilityList[index]; + UIBase_CardManager.CardObjData objData = _cardLoader.GetCardObjData(index); + GameObject cardObj = objData.CardObj; + Vector3 localScale = cardObj.transform.localScale; + component.onClick.Add(new EventDelegate(delegate + { + OnClickAbility(abilityData, objData); + })); + cardObj.transform.parent = gameObject.transform; + cardObj.transform.localPosition = Vector3.zero; + cardObj.transform.localScale = localScale; + if (index == defaultSelectIndex) + { + SelectAbility(abilityData, objData); + } + } + + private void OnClickAbility(BossRushLobbyAbilityData abilityData, UIBase_CardManager.CardObjData objData) + { + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_BTN_DECIDE); + SelectAbility(abilityData, objData); + } + + private void SelectAbility(BossRushLobbyAbilityData abilityData, UIBase_CardManager.CardObjData objData) + { + SetNameLabel(abilityData); + _descLabel.SetWrapText(BattleCardBase.ConvertSkillDescriptionText(abilityData.SkillDescText)); + if (_selectCard != null) + { + UnityEngine.Object.Destroy(_selectCard); + } + _selectCursor.transform.position = objData.CardObj.transform.position; + _selectCard = NGUITools.AddChild(_selectCardRoot, objData.CardObj); + _selectCard.transform.localScale = new Vector3(1.35f, 1.35f, 1f); + CardListTemplate component = _selectCard.GetComponent(); + component.SetId(abilityData.DisplayCardId); + CardTemplateCustomize(component); + int textLineCount = Global.GetTextLineCount(_descLabel.text); + _descLineCreator.ShowLines(textLineCount); + _descScrollView.ResetPosition(); + UIEventListener.Get(_descLabel.gameObject).onClick = delegate + { + OnClickDescLabel(abilityData); + }; + UIEventListener.Get(_keywordCollider).onPress = delegate(GameObject g, bool b) + { + BattlePlayerView.PressKeyWordColorChange(_descLabel, b); + }; + UIEventListener.Get(_keywordCollider).onDragStart = delegate + { + BattlePlayerView.SetKeyWordLabelColor(_descLabel); + }; + } + + private void OnClickDescLabel(BossRushLobbyAbilityData abilityData) + { + if (abilityData.SkillDescText.Length > 0 && HasKeyword(abilityData.SkillDescText)) + { + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_COMMON_BUTTON); + IList keywords = BattleKeywordInfoListMgr.GetKeywords(abilityData.SkillDescText); + DialogBase dialogBase = BattlePlayerView.CreateKeyPanel(_descLabel, keywords, CardMaster.CardMasterId.Default); + dialogBase.SetPanelDepth(20, isSetBackViewDepthImmediately: true); + dialogBase.GetComponentInChildren().SetPanelDepth(25); + } + } + + public static bool HasKeyword(string skillDescText) + { + IList keywords = BattleKeywordInfoListMgr.GetKeywords(skillDescText); + bool result = false; + foreach (string item in keywords) + { + if (Data.Master.BattleKeyWordDic.ContainsKey(item)) + { + result = true; + break; + } + } + return result; + } + + private void SetNameLabel(BossRushLobbyAbilityData abilityData) + { + _nameLabel.text = abilityData.Name; + UIManager.GetInstance().getUIBase_CardManager().SetNameLabelStyle(_nameLabel, abilityData.IsFoil); + } + + private IEnumerator LoadResources(List abilityList, Action callBack) + { + List list = new List(); + CardMaster instance = CardMaster.GetInstance(CardMaster.CardMasterId.Default); + foreach (BossRushLobbyAbilityData ability in abilityList) + { + CardParameter cardParameterFromId = instance.GetCardParameterFromId(ability.DisplayCardId); + if (ability.IsFoil) + { + list.Add(cardParameterFromId.FoilCardId); + } + else + { + list.Add(ability.DisplayCardId); + } + } + float cardScale = 0.64f; + int depth = 5; + bool finish = false; + _cardLoader.Load(list, cardScale, depth, CardTemplateCustomize, delegate + { + finish = true; + }); + while (!finish) + { + yield return null; + } + callBack.Call(); + } + + private void CardTemplateCustomize(CardListTemplate cardTemplate) + { + cardTemplate.SetBossRushSkillFrame(); + cardTemplate.HideNum(); + cardTemplate.HideLabelsForBossRushSkill(); + cardTemplate.SetBossRushCardTexture(); + } +} diff --git a/SVSim.BattleEngine/Engine/Wizard/BuildDeckProductDetail.cs b/SVSim.BattleEngine/Engine/Wizard/BuildDeckProductDetail.cs new file mode 100644 index 0000000..f62c100 --- /dev/null +++ b/SVSim.BattleEngine/Engine/Wizard/BuildDeckProductDetail.cs @@ -0,0 +1,152 @@ +using System.Collections.Generic; +using System.Text; +using Cute; +using UnityEngine; +using Wizard.Scripts.Network.Data.TaskData.BuildDeckPurchase; + +namespace Wizard; + +public class BuildDeckProductDetail : BaseProductDetail +{ + [SerializeField] + private GameObject _labelSetHead; + + [SerializeField] + private GameObject _topLineCardList; + + [SerializeField] + private UILabel _labelCardNum; + + [SerializeField] + private GameObject _rewardCardParent; + + [SerializeField] + private GameObject _spotCardRoot; + + [SerializeField] + private GameObject _spotCardOriginal; + + [SerializeField] + private UIGrid _spotCardGrid; + + public void SetSingleProductDetail(BuildDeckProductInfo productInfo) + { + Texture textureProductImage = Toolbox.ResourcesManager.LoadObject(Toolbox.ResourcesManager.GetAssetTypePath(productInfo.saleInfo.path, ResourcesManager.AssetLoadPathType.ShopBuildDeckThumbnail, isfetch: true)); + List list = new List(); + Dictionary dictionary = new Dictionary(); + Dictionary dictionary2 = new Dictionary(); + for (int i = 0; i < productInfo.rewardInfoList.Count; i++) + { + ShopCommonRewardInfo shopCommonRewardInfo = productInfo.rewardInfoList[i]; + if (shopCommonRewardInfo.Type == 5) + { + dictionary.Add((int)shopCommonRewardInfo.UserGoodsId, shopCommonRewardInfo.Num); + } + else + { + list.Add(productInfo.rewardInfoList[i]); + } + } + for (int j = 0; j < productInfo.cardList.Count; j++) + { + BuildDeckCard buildDeckCard = productInfo.cardList[j]; + if (CardMaster.GetInstance(CardMaster.CardMasterId.Default).GetCardParameterFromId(buildDeckCard._cardId).IsBasicCard) + { + continue; + } + if (buildDeckCard.IsSpotCard) + { + if (dictionary2.ContainsKey(buildDeckCard._cardId)) + { + dictionary2[buildDeckCard._cardId] = dictionary2[buildDeckCard._cardId] + buildDeckCard._number; + } + else + { + dictionary2[buildDeckCard._cardId] = buildDeckCard._number; + } + } + else if (dictionary.ContainsKey(buildDeckCard._cardId)) + { + dictionary[buildDeckCard._cardId] += buildDeckCard._number; + } + else + { + dictionary.Add(buildDeckCard._cardId, buildDeckCard._number); + } + } + _spotCardRoot.SetActive(dictionary2.Count > 0); + _spotCardOriginal.SetActive(value: true); + foreach (KeyValuePair item in dictionary2) + { + string userGoodsName = UserGoods.getUserGoodsName(UserGoods.Type.Card, item.Key); + NGUITools.AddChild(_spotCardOriginal.transform.parent.gameObject, _spotCardOriginal).GetComponent().text = Data.SystemText.Get("Shop_0121", userGoodsName, item.Value.ToString()); + } + _spotCardGrid.Reposition(); + _spotCardOriginal.SetActive(value: false); + List list2 = ConvertSortedCardList(dictionary, productInfo.featured_card_id); + if (_rewardCardParent != null) + { + _rewardCardParent.SetActive(list2.Count > 0); + } + StringBuilder stringBuilder = new StringBuilder(); + int num = 0; + for (int k = 0; k < list2.Count; k++) + { + int num2 = list2[k]; + string userGoodsName2 = UserGoods.getUserGoodsName(UserGoods.Type.Card, num2); + int num3 = dictionary[num2]; + stringBuilder.Append(Data.SystemText.Get("Shop_0121", userGoodsName2, num3.ToString())); + stringBuilder.Append("\n"); + num += num3; + } + _labelCardNum.text = Data.SystemText.Get("Shop_0119", num.ToString()); + if (list.Count <= 0 || productInfo.purchase_num_current > 0) + { + list.Clear(); + _labelSetHead.SetActive(value: false); + _topLineCardList.SetActive(value: false); + } + else + { + _labelSetHead.SetActive(value: true); + _topLineCardList.SetActive(value: true); + } + SetProductDetail(textureProductImage, list, stringBuilder.ToString()); + } + + private List ConvertSortedCardList(Dictionary rewardCardDict, int featuredCardId) + { + List list = new List(rewardCardDict.Keys); + list.Sort(delegate(int x, int y) + { + CardParameter cardParameterFromId = CardMaster.GetInstance(CardMaster.CardMasterId.Default).GetCardParameterFromId(x); + CardParameter cardParameterFromId2 = CardMaster.GetInstance(CardMaster.CardMasterId.Default).GetCardParameterFromId(y); + if (cardParameterFromId.CardId == featuredCardId) + { + return -1; + } + if (cardParameterFromId2.CardId == featuredCardId) + { + return 1; + } + if (cardParameterFromId.IsPrizeCard && cardParameterFromId2.IsPrizeCard) + { + return 0; + } + if (cardParameterFromId.IsPrizeCard) + { + return -1; + } + if (cardParameterFromId2.IsPrizeCard) + { + return 1; + } + if (cardParameterFromId.Rarity != cardParameterFromId2.Rarity) + { + return cardParameterFromId2.Rarity.CompareTo(cardParameterFromId.Rarity); + } + return (cardParameterFromId.CardSetId != cardParameterFromId2.CardSetId) ? cardParameterFromId2.CardSetId.CompareTo(cardParameterFromId.CardSetId) : cardParameterFromId.CardId.CompareTo(cardParameterFromId2.CardId); + }); + return list; + } +} diff --git a/SVSim.BattleEngine/Engine/Wizard/ChangeableTitleUIParts.cs b/SVSim.BattleEngine/Engine/Wizard/ChangeableTitleUIParts.cs new file mode 100644 index 0000000..3399630 --- /dev/null +++ b/SVSim.BattleEngine/Engine/Wizard/ChangeableTitleUIParts.cs @@ -0,0 +1,22 @@ +using UnityEngine; + +namespace Wizard; + +public class ChangeableTitleUIParts : MonoBehaviour +{ + [SerializeField] + private UILabel _labelTapToStart; + + public void Init() + { + SetLabelTapToStart(); + } + + private void SetLabelTapToStart() + { + if (!(_labelTapToStart == null)) + { + _labelTapToStart.text = Data.SystemText.Get("System_0048"); + } + } +} diff --git a/SVSim.BattleEngine/Engine/Wizard/ChatAddDeckTask.cs b/SVSim.BattleEngine/Engine/Wizard/ChatAddDeckTask.cs new file mode 100644 index 0000000..33afde6 --- /dev/null +++ b/SVSim.BattleEngine/Engine/Wizard/ChatAddDeckTask.cs @@ -0,0 +1,31 @@ +namespace Wizard; + +public class ChatAddDeckTask : BaseTask +{ + public class ChatAddDeckTaskParam : BaseParam + { + public int deck_format { get; set; } + + public int deck_no { get; set; } + } + + public ChatAddDeckTask(ApiType.Type apiType) + { + base.type = apiType; + } + + public void SetParameter(int deckFormat, int deckNo) + { + ChatAddDeckTaskParam chatAddDeckTaskParam = new ChatAddDeckTaskParam(); + chatAddDeckTaskParam.deck_format = deckFormat; + chatAddDeckTaskParam.deck_no = deckNo; + base.Params = chatAddDeckTaskParam; + } + + protected override int Parse() + { + int result = base.Parse(); + _ = 1; + return result; + } +} diff --git a/SVSim.BattleEngine/Engine/Wizard/ChatAddReplayTask.cs b/SVSim.BattleEngine/Engine/Wizard/ChatAddReplayTask.cs new file mode 100644 index 0000000..ac423d0 --- /dev/null +++ b/SVSim.BattleEngine/Engine/Wizard/ChatAddReplayTask.cs @@ -0,0 +1,28 @@ +namespace Wizard; + +public class ChatAddReplayTask : BaseTask +{ + public class ChatAddReplayTaskParam : BaseParam + { + public long battle_id { get; set; } + } + + public ChatAddReplayTask(ApiType.Type apiType) + { + base.type = apiType; + } + + public void SetParameter(long battleId) + { + ChatAddReplayTaskParam chatAddReplayTaskParam = new ChatAddReplayTaskParam(); + chatAddReplayTaskParam.battle_id = battleId; + base.Params = chatAddReplayTaskParam; + } + + protected override int Parse() + { + int result = base.Parse(); + _ = 1; + return result; + } +} diff --git a/SVSim.BattleEngine/Engine/Wizard/ChatDeckLogTask.cs b/SVSim.BattleEngine/Engine/Wizard/ChatDeckLogTask.cs new file mode 100644 index 0000000..5ca6566 --- /dev/null +++ b/SVSim.BattleEngine/Engine/Wizard/ChatDeckLogTask.cs @@ -0,0 +1,45 @@ +using System.Collections.Generic; +using LitJson; + +namespace Wizard; + +public class ChatDeckLogTask : BaseTask +{ + public List DeckLogListRotation { get; private set; } + + public List DeckLogListUnlimited { get; private set; } + + public List DeckLogListPreRotation { get; private set; } + + public List DeckLogListCrossover { get; private set; } + + public List DeckLogListMyRotation { get; private set; } + + public ChatDeckLogTask(ApiType.Type apiType) + { + base.type = apiType; + } + + protected override int Parse() + { + int num = base.Parse(); + if (num != 1) + { + return num; + } + JsonData jsonData = base.ResponseData["data"]["deck_log"]; + GameMgr.GetIns().GetDataMgr().SetMaintenanceCardIds(base.ResponseData["data"]["maintenance_card_list"]); + DeckLogListRotation = ChatMessageInfo.DeckLogData.ParseDeckDataList(jsonData[Data.FormatConvertApi(Format.Rotation).ToString()]); + DeckLogListUnlimited = ChatMessageInfo.DeckLogData.ParseDeckDataList(jsonData[Data.FormatConvertApi(Format.Unlimited).ToString()]); + DeckLogListPreRotation = ChatMessageInfo.DeckLogData.ParseDeckDataList(jsonData[Data.FormatConvertApi(Format.PreRotation).ToString()]); + if (jsonData.TryGetValue(Data.FormatConvertApi(Format.Crossover).ToString(), out var value)) + { + DeckLogListCrossover = ChatMessageInfo.DeckLogData.ParseDeckDataList(value); + } + if (jsonData.TryGetValue(Data.FormatConvertApi(Format.MyRotation).ToString(), out var value2)) + { + DeckLogListMyRotation = ChatMessageInfo.DeckLogData.ParseDeckDataList(value2); + } + return num; + } +} diff --git a/SVSim.BattleEngine/Engine/Wizard/ChatDeleteDeckTask.cs b/SVSim.BattleEngine/Engine/Wizard/ChatDeleteDeckTask.cs new file mode 100644 index 0000000..67c3bc4 --- /dev/null +++ b/SVSim.BattleEngine/Engine/Wizard/ChatDeleteDeckTask.cs @@ -0,0 +1,53 @@ +using System.Collections.Generic; +using LitJson; + +namespace Wizard; + +public class ChatDeleteDeckTask : BaseTask +{ + public class ChatDeleteDeckTaskParam : BaseParam + { + public int deck_format { get; set; } + + public int message_id { get; set; } + } + + public Dictionary> DictDeckLogList { get; private set; } + + public ChatDeleteDeckTask(ApiType.Type apiType) + { + base.type = apiType; + } + + public void SetParameter(int deckFormat, int messageId) + { + ChatDeleteDeckTaskParam chatDeleteDeckTaskParam = new ChatDeleteDeckTaskParam(); + chatDeleteDeckTaskParam.deck_format = deckFormat; + chatDeleteDeckTaskParam.message_id = messageId; + base.Params = chatDeleteDeckTaskParam; + } + + protected override int Parse() + { + int num = base.Parse(); + if (num != 1) + { + return num; + } + JsonData jsonData = base.ResponseData["data"]["deck_log"]; + GameMgr.GetIns().GetDataMgr().SetMaintenanceCardIds(base.ResponseData["data"]["maintenance_card_list"]); + DictDeckLogList = new Dictionary>(); + DictDeckLogList[Format.Rotation] = ChatMessageInfo.DeckLogData.ParseDeckDataList(jsonData[Data.FormatConvertApi(Format.Rotation).ToString()]); + DictDeckLogList[Format.Unlimited] = ChatMessageInfo.DeckLogData.ParseDeckDataList(jsonData[Data.FormatConvertApi(Format.Unlimited).ToString()]); + DictDeckLogList[Format.PreRotation] = ChatMessageInfo.DeckLogData.ParseDeckDataList(jsonData[Data.FormatConvertApi(Format.PreRotation).ToString()]); + if (jsonData.TryGetValue(Data.FormatConvertApi(Format.Crossover).ToString(), out var value)) + { + DictDeckLogList[Format.Crossover] = ChatMessageInfo.DeckLogData.ParseDeckDataList(value); + } + if (jsonData.TryGetValue(Data.FormatConvertApi(Format.MyRotation).ToString(), out var value2)) + { + DictDeckLogList[Format.MyRotation] = ChatMessageInfo.DeckLogData.ParseDeckDataList(value2); + } + return num; + } +} diff --git a/SVSim.BattleEngine/Engine/Wizard/ChatGetMessagesTask.cs b/SVSim.BattleEngine/Engine/Wizard/ChatGetMessagesTask.cs new file mode 100644 index 0000000..4983b50 --- /dev/null +++ b/SVSim.BattleEngine/Engine/Wizard/ChatGetMessagesTask.cs @@ -0,0 +1,54 @@ +namespace Wizard; + +public class ChatGetMessagesTask : BaseTask +{ + public class ChatGetMessagesTaskParam : BaseParam + { + public int start_message_id { get; set; } + + public int direction { get; set; } + + public int wait_interval { get; set; } + } + + private const int LATEST_REQUEST_MESSAGE_ID = 0; + + private const Chat.eRequestDirection LATEST_REQUEST_DIRECTION = Chat.eRequestDirection.OLD; + + public ChatInfo ChatInfo { get; private set; } + + public ChatGetMessagesTask(ApiType.Type apiType) + { + base.type = apiType; + } + + public void SetParameter(int startMessageId, Chat.eRequestDirection direction, int waitInterval) + { + ChatGetMessagesTaskParam chatGetMessagesTaskParam = new ChatGetMessagesTaskParam(); + chatGetMessagesTaskParam.start_message_id = startMessageId; + chatGetMessagesTaskParam.direction = (int)direction; + chatGetMessagesTaskParam.wait_interval = waitInterval; + base.Params = chatGetMessagesTaskParam; + } + + public void SetParameterLatestLog(int waitInterval) + { + ChatGetMessagesTaskParam chatGetMessagesTaskParam = new ChatGetMessagesTaskParam(); + chatGetMessagesTaskParam.start_message_id = 0; + chatGetMessagesTaskParam.direction = 1; + chatGetMessagesTaskParam.wait_interval = waitInterval; + base.Params = chatGetMessagesTaskParam; + } + + protected override int Parse() + { + int num = base.Parse(); + if (num != 1) + { + return num; + } + GameMgr.GetIns().GetDataMgr().SetMaintenanceCardIds(base.ResponseData["data"]["maintenance_card_list"]); + ChatInfo = new ChatInfo(base.ResponseData["data"]); + return num; + } +} diff --git a/SVSim.BattleEngine/Engine/Wizard/ChatPostTask.cs b/SVSim.BattleEngine/Engine/Wizard/ChatPostTask.cs new file mode 100644 index 0000000..17b4e2b --- /dev/null +++ b/SVSim.BattleEngine/Engine/Wizard/ChatPostTask.cs @@ -0,0 +1,47 @@ +namespace Wizard; + +public class ChatPostTask : BaseTask +{ + public class ChatPostTaskParam : BaseParam + { + public int type { get; set; } + + public string message { get; set; } + } + + public AchievedInfo AchievedInfo { get; private set; } + + public ChatPostTask(ApiType.Type apiType) + { + base.type = apiType; + } + + public void SetParameter(int type, string message) + { + ChatPostTaskParam chatPostTaskParam = new ChatPostTaskParam(); + chatPostTaskParam.type = type; + chatPostTaskParam.message = message; + base.Params = chatPostTaskParam; + } + + protected override int Parse() + { + int num = base.Parse(); + if (num != 1) + { + return num; + } + if (base.ResponseData["data"].Count > 0) + { + if (base.ResponseData["data"].Keys.Contains("achieved_info")) + { + AchievedInfo = new AchievedInfo(base.ResponseData["data"]["achieved_info"]); + } + if (base.ResponseData["data"].Keys.Contains("reward_list")) + { + PlayerStaticData.UpdateHaveUserGoodsNumByJsonData(base.ResponseData["data"]["reward_list"]); + } + } + return num; + } +} diff --git a/SVSim.BattleEngine/Engine/Wizard/ChatReplayListDialogContent.cs b/SVSim.BattleEngine/Engine/Wizard/ChatReplayListDialogContent.cs new file mode 100644 index 0000000..1a0d839 --- /dev/null +++ b/SVSim.BattleEngine/Engine/Wizard/ChatReplayListDialogContent.cs @@ -0,0 +1,34 @@ +using System; +using Cute; +using UnityEngine; + +namespace Wizard; + +public class ChatReplayListDialogContent : MonoBehaviour +{ + [SerializeField] + private ReplayContentView _prefabReplayInfoView; + + [SerializeField] + private GameObject _rootReplayInfoView; + + [SerializeField] + private UIButton _btnReplaySend; + + private ReplayContentView _replayInfoView; + + public void SetData(ReplayInfoItem replayInfoItem, Action onClickReplaySend) + { + if (_replayInfoView == null) + { + _replayInfoView = NGUITools.AddChild(_rootReplayInfoView, _prefabReplayInfoView.gameObject).GetComponent(); + } + _replayInfoView.SetData(replayInfoItem); + _btnReplaySend.onClick.Clear(); + _btnReplaySend.onClick.Add(new EventDelegate(delegate + { + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_BTN_DECIDE); + onClickReplaySend.Call(); + })); + } +} diff --git a/SVSim.BattleEngine/Engine/Wizard/ClientCacheClearTask.cs b/SVSim.BattleEngine/Engine/Wizard/ClientCacheClearTask.cs new file mode 100644 index 0000000..e445575 --- /dev/null +++ b/SVSim.BattleEngine/Engine/Wizard/ClientCacheClearTask.cs @@ -0,0 +1,9 @@ +namespace Wizard; + +public class ClientCacheClearTask : BaseTask +{ + public ClientCacheClearTask() + { + base.type = ApiType.Type.ClientCacheClear; + } +} diff --git a/SVSim.BattleEngine/Engine/Wizard/ColosseumDeckEntryAvatarTask.cs b/SVSim.BattleEngine/Engine/Wizard/ColosseumDeckEntryAvatarTask.cs new file mode 100644 index 0000000..f5e0630 --- /dev/null +++ b/SVSim.BattleEngine/Engine/Wizard/ColosseumDeckEntryAvatarTask.cs @@ -0,0 +1,29 @@ +using System.Collections.Generic; +using LitJson; + +namespace Wizard; + +public class ColosseumDeckEntryAvatarTask : BaseTask +{ + public class ColosseumDeckEntryHOFTaskParam : BaseParam + { + public string deck_no_list; + } + + public ColosseumDeckEntryAvatarTask() + { + base.type = ApiType.Type.ColosseumAvatarDeckEntry; + } + + public void SetParameter(List deckList) + { + ColosseumDeckEntryHOFTaskParam colosseumDeckEntryHOFTaskParam = new ColosseumDeckEntryHOFTaskParam(); + List list = new List(); + for (int i = 0; i < deckList.Count; i++) + { + list.Add(deckList[i].GetDeckID()); + } + colosseumDeckEntryHOFTaskParam.deck_no_list = JsonMapper.ToJson(list); + base.Params = colosseumDeckEntryHOFTaskParam; + } +} diff --git a/SVSim.BattleEngine/Engine/Wizard/ColosseumDeckEntryHOFTask.cs b/SVSim.BattleEngine/Engine/Wizard/ColosseumDeckEntryHOFTask.cs new file mode 100644 index 0000000..0d1340a --- /dev/null +++ b/SVSim.BattleEngine/Engine/Wizard/ColosseumDeckEntryHOFTask.cs @@ -0,0 +1,29 @@ +using System.Collections.Generic; +using LitJson; + +namespace Wizard; + +public class ColosseumDeckEntryHOFTask : BaseTask +{ + public class ColosseumDeckEntryHOFTaskParam : BaseParam + { + public string deck_no_list; + } + + public ColosseumDeckEntryHOFTask() + { + base.type = ApiType.Type.ColosseumHOFDeckEntry; + } + + public void SetParameter(List deckList) + { + ColosseumDeckEntryHOFTaskParam colosseumDeckEntryHOFTaskParam = new ColosseumDeckEntryHOFTaskParam(); + List list = new List(); + for (int i = 0; i < deckList.Count; i++) + { + list.Add(deckList[i].GetDeckID()); + } + colosseumDeckEntryHOFTaskParam.deck_no_list = JsonMapper.ToJson(list); + base.Params = colosseumDeckEntryHOFTaskParam; + } +} diff --git a/SVSim.BattleEngine/Engine/Wizard/ColosseumDeckEntryTask.cs b/SVSim.BattleEngine/Engine/Wizard/ColosseumDeckEntryTask.cs new file mode 100644 index 0000000..38e9750 --- /dev/null +++ b/SVSim.BattleEngine/Engine/Wizard/ColosseumDeckEntryTask.cs @@ -0,0 +1,32 @@ +using System.Collections.Generic; +using LitJson; + +namespace Wizard; + +public class ColosseumDeckEntryTask : BaseTask +{ + public class ColosseumDeckEntryTaskParam : BaseParam + { + public string deck_no_list; + + public bool is_published; + } + + public ColosseumDeckEntryTask() + { + base.type = ApiType.Type.ColosseumDeckEntry; + } + + public void SetParameter(List deckList, bool isPublished) + { + ColosseumDeckEntryTaskParam colosseumDeckEntryTaskParam = new ColosseumDeckEntryTaskParam(); + List list = new List(); + for (int i = 0; i < deckList.Count; i++) + { + list.Add(deckList[i].GetDeckID()); + } + colosseumDeckEntryTaskParam.deck_no_list = JsonMapper.ToJson(list); + colosseumDeckEntryTaskParam.is_published = isPublished; + base.Params = colosseumDeckEntryTaskParam; + } +} diff --git a/SVSim.BattleEngine/Engine/Wizard/ColosseumDetailTask.cs b/SVSim.BattleEngine/Engine/Wizard/ColosseumDetailTask.cs new file mode 100644 index 0000000..44248cf --- /dev/null +++ b/SVSim.BattleEngine/Engine/Wizard/ColosseumDetailTask.cs @@ -0,0 +1,63 @@ +using System; +using LitJson; + +namespace Wizard; + +public class ColosseumDetailTask : BaseTask +{ + public const int COLOSSEUM_ANNOUNCE_ID_NOT_SET_ERROR_CODE = 4416; + + public ColosseumDetailTask() + { + base.type = ApiType.Type.ColosseumDetail; + } + + protected override int Parse() + { + int num = base.Parse(); + if (num != 1) + { + return num; + } + JsonData jsonData = base.ResponseData["data"]; + JsonData colosseumOwnStatus = jsonData["colosseum_status"]; + JsonData jsonData2 = jsonData["colosseum_info"]; + ArenaColosseum colosseumData = Data.ArenaData.ColosseumData; + colosseumData.ApiRuleParseAndSet(jsonData2["format"].ToInt()); + string text = ConvertTime.ToLocal(DateTime.Parse(jsonData2["start_time"].ToString())); + string text2 = ConvertTime.ToLocal(DateTime.Parse(jsonData2["end_time"].ToString())); + colosseumData.ColosseumTimeText = Data.SystemText.Get("Colosseum_0033", text, text2); + colosseumData.AnnounceNo = ((jsonData2["announce_id"] != null) ? jsonData2["announce_id"].ToString() : ""); + colosseumData.FinalRoundEliminateCount = jsonData2["final_round_eliminate_count"].ToInt(); + int num2 = 0; + colosseumData.FocusStageNo = ArenaColosseum.eStageNo.Max; + for (int i = 1; i <= 3; i++) + { + JsonData jsonData3 = jsonData[i.ToString()]; + text = ConvertTime.ToLocal(DateTime.Parse(jsonData3["start_time"].ToString()), ConvertTime.FORMAT.TIME_DATE_SHORT); + text2 = ConvertTime.ToLocal(DateTime.Parse(jsonData3["end_time"].ToString()), ConvertTime.FORMAT.TIME_DATE_SHORT); + if (jsonData3["is_now_round"].ToBoolean()) + { + colosseumData.FocusStageNo = (ArenaColosseum.eStageNo)i; + } + JsonData jsonData4 = jsonData3["round_detail"]; + for (int j = 0; j < jsonData4.Count; j++) + { + colosseumData.DetailData[num2].RoundTimeText = Data.SystemText.Get("Colosseum_0033", text, text2); + colosseumData.DetailData[num2].RoundTimeStartText = Data.SystemText.Get("Colosseum_0106", text); + colosseumData.DetailData[num2].RoundTimeEndText = Data.SystemText.Get("Colosseum_0107", text2); + colosseumData.DetailData[num2].GroupName = jsonData4[j]["group"].ToString(); + colosseumData.DetailData[num2].MaxBattleNum = jsonData4[j]["max_battle_count"].ToInt(); + colosseumData.DetailData[num2].BreakThroughNum = jsonData4[j]["breakthrough_number"].ToInt(); + colosseumData.DetailData[num2].MaxEntryNum = jsonData4[j]["entry_number"].ToInt(); + if (colosseumData.DetailData[num2].GroupName == "") + { + colosseumData.DetailData[num2].GroupName = Data.SystemText.Get("Colosseum_0079"); + } + num2++; + } + } + ColosseumEntryInfoTask.SetColosseumOwnStatus(colosseumOwnStatus); + return num; + } +} diff --git a/SVSim.BattleEngine/Engine/Wizard/ColosseumEntryTask.cs b/SVSim.BattleEngine/Engine/Wizard/ColosseumEntryTask.cs new file mode 100644 index 0000000..670485b --- /dev/null +++ b/SVSim.BattleEngine/Engine/Wizard/ColosseumEntryTask.cs @@ -0,0 +1,39 @@ +using LitJson; + +namespace Wizard; + +public class ColosseumEntryTask : BaseTask +{ + public class ColosseumEntryTaskParam : BaseParam + { + public int now_round_id; + + public int consume_item_type; + } + + public ColosseumEntryTask() + { + base.type = ApiType.Type.ColosseumEntry; + } + + public void SetParameter(ArenaData.eARENA_PAY inPayType) + { + ColosseumEntryTaskParam colosseumEntryTaskParam = new ColosseumEntryTaskParam(); + colosseumEntryTaskParam.consume_item_type = (int)inPayType; + colosseumEntryTaskParam.now_round_id = Data.ArenaData.ColosseumData.ServerRoundId; + base.Params = colosseumEntryTaskParam; + } + + protected override int Parse() + { + int num = base.Parse(); + if (num != 1) + { + return num; + } + PlayerStaticData.UpdateHaveUserGoodsNumByJsonData(base.ResponseData["data"]["reward_list"]); + JsonData jsonData = base.ResponseData["data"]; + Data.ArenaData.ColosseumData.ApiRuleParseAndSet(jsonData["entry_info"]["deck_format"].ToInt()); + return num; + } +} diff --git a/SVSim.BattleEngine/Engine/Wizard/ColosseumHOFDeckInfoTask.cs b/SVSim.BattleEngine/Engine/Wizard/ColosseumHOFDeckInfoTask.cs new file mode 100644 index 0000000..d7d13a0 --- /dev/null +++ b/SVSim.BattleEngine/Engine/Wizard/ColosseumHOFDeckInfoTask.cs @@ -0,0 +1,33 @@ +using System.Collections.Generic; +using LitJson; + +namespace Wizard; + +public class ColosseumHOFDeckInfoTask : BaseTask +{ + public List DeckList { get; private set; } + + public ColosseumHOFDeckInfoTask() + { + base.type = ApiType.Type.ColosseumHOFDeckInfo; + } + + protected override int Parse() + { + int num = base.Parse(); + if (num != 1) + { + return num; + } + DeckList = new List(); + JsonData jsonData = base.ResponseData["data"]; + for (int i = 0; i < jsonData.Count; i++) + { + JsonData deckData = jsonData[i]; + DeckData deckData2 = new DeckData(Format.Max, DeckAttributeType.CustomDeck); + deckData2.Initialize(deckData); + DeckList.Add(deckData2); + } + return num; + } +} diff --git a/SVSim.BattleEngine/Engine/Wizard/ColosseumWindFallDeckEntry.cs b/SVSim.BattleEngine/Engine/Wizard/ColosseumWindFallDeckEntry.cs new file mode 100644 index 0000000..1aa69a1 --- /dev/null +++ b/SVSim.BattleEngine/Engine/Wizard/ColosseumWindFallDeckEntry.cs @@ -0,0 +1,29 @@ +using System.Collections.Generic; +using LitJson; + +namespace Wizard; + +public class ColosseumWindFallDeckEntry : BaseTask +{ + public class ColosseumWindFallDeckEntryTaskParam : BaseParam + { + public string deck_no_list; + } + + public ColosseumWindFallDeckEntry() + { + base.type = ApiType.Type.ColosseumWindFallDeckEntry; + } + + public void SetParameter(List deckList) + { + ColosseumWindFallDeckEntryTaskParam colosseumWindFallDeckEntryTaskParam = new ColosseumWindFallDeckEntryTaskParam(); + List list = new List(); + for (int i = 0; i < deckList.Count; i++) + { + list.Add(deckList[i].GetDeckID()); + } + colosseumWindFallDeckEntryTaskParam.deck_no_list = JsonMapper.ToJson(list); + base.Params = colosseumWindFallDeckEntryTaskParam; + } +} diff --git a/SVSim.BattleEngine/Engine/Wizard/ColosseumWindFallDeckInfoTask.cs b/SVSim.BattleEngine/Engine/Wizard/ColosseumWindFallDeckInfoTask.cs new file mode 100644 index 0000000..01fb143 --- /dev/null +++ b/SVSim.BattleEngine/Engine/Wizard/ColosseumWindFallDeckInfoTask.cs @@ -0,0 +1,33 @@ +using System.Collections.Generic; +using LitJson; + +namespace Wizard; + +public class ColosseumWindFallDeckInfoTask : BaseTask +{ + public List DeckList { get; private set; } + + public ColosseumWindFallDeckInfoTask() + { + base.type = ApiType.Type.ColosseumWindFallDeckInfo; + } + + protected override int Parse() + { + int num = base.Parse(); + if (num != 1) + { + return num; + } + DeckList = new List(); + JsonData jsonData = base.ResponseData["data"]; + for (int i = 0; i < jsonData.Count; i++) + { + JsonData deckData = jsonData[i]; + DeckData deckData2 = new DeckData(Format.Max, DeckAttributeType.CustomDeck); + deckData2.Initialize(deckData); + DeckList.Add(deckData2); + } + return num; + } +} diff --git a/SVSim.BattleEngine/Engine/Wizard/CompetitionDetail.cs b/SVSim.BattleEngine/Engine/Wizard/CompetitionDetail.cs new file mode 100644 index 0000000..5b97c5c --- /dev/null +++ b/SVSim.BattleEngine/Engine/Wizard/CompetitionDetail.cs @@ -0,0 +1,87 @@ +using UnityEngine; +using Wizard.ErrorDialog; +using Wizard.Scripts.Network.Data.TaskData.Arena; + +namespace Wizard; + +public class CompetitionDetail : MonoBehaviour +{ + [SerializeField] + private GameObject _prefabRewardDialog; + + [SerializeField] + private CardDetailUI _cardDetailDialog; + + [SerializeField] + private GameObject _rewardRoot; + + [SerializeField] + private UILabel _formatLabel; + + [SerializeField] + private UILabel _entryPeriodTimeLabel; + + [SerializeField] + private UILabel _openPeriodTimeLabel; + + [SerializeField] + private UILabel _maxNumLabel; + + [SerializeField] + private UILabel _conditionLable; + + [SerializeField] + private UILabel _entryNum; + + [SerializeField] + private UILabel _tryNum; + + private const int COMPETITION_ANNOUNCE_ID_NOT_SET_ERROR_CODE = 5516; + + public void Init(DialogBase inDialog, ArenaCompetition data, bool isEntry) + { + SystemText systemText = Data.SystemText; + inDialog.SetSize(DialogBase.Size.M); + inDialog.SetTitleLabel(systemText.Get("Common_0022")); + inDialog.SetButtonLayout(DialogBase.ButtonLayout.GrayBtn_GrayBtn); + inDialog.SetButtonText(systemText.Get("Colosseum_0023"), systemText.Get("Colosseum_0025")); + string text = ""; + text = data.DeckFormat switch + { + Format.TwoPick => systemText.Get("Arena_0002"), + Format.Rotation => systemText.Get("Common_0154"), + _ => systemText.Get("Common_0155"), + }; + _formatLabel.text = systemText.Get("Colosseum_0054", text) + systemText.Get("Colosseum_0093"); + _openPeriodTimeLabel.text = systemText.Get("Competition_0029") + " : " + data.NowRoundTimeText; + _entryPeriodTimeLabel.text = systemText.Get("Competition_0028") + " : " + data.EntryTimeText; + _maxNumLabel.text = systemText.Get("Competition_0023", data.MaxBattleCount.ToString()); + _conditionLable.text = systemText.Get("Colosseum_0104", data.MaxLoseCount.ToString()); + _entryNum.text = systemText.Get("Colosseum_0088", data.MaxEntryCount.ToString()); + _tryNum.text = systemText.Get("Competition_0042", data.MaxChallengeCount.ToString()); + inDialog.onPushButton1 = delegate + { + if (!string.IsNullOrEmpty(data.AnnounceId)) + { + UIManager.GetInstance().WebViewHelper.OpenAnnounceWebView(data.AnnounceId); + } + else + { + Wizard.ErrorDialog.Dialog.Create(5516); + } + }; + inDialog.onPushButton2 = delegate + { + UIManager.GetInstance().StartFirstTips(CompetitionUtility.GetCompetitionTipsType(Data.ArenaData.CompetitionData.Rule)); + }; + RewardBase component = NGUITools.AddChild(_rewardRoot, _prefabRewardDialog).GetComponent(); + component.SetCardDetailUI(_cardDetailDialog); + foreach (Wizard.Scripts.Network.Data.TaskData.Arena.Reward entryReward in data.EntryRewardList) + { + component.AddReward(entryReward); + } + component.SetActiveRewardLabel(isShow: false); + component.SetOnlyIconEndCreate(); + base.transform.localPosition = Vector3.forward * 10f; + } +} diff --git a/SVSim.BattleEngine/Engine/Wizard/CompetitionEntryDialog.cs b/SVSim.BattleEngine/Engine/Wizard/CompetitionEntryDialog.cs new file mode 100644 index 0000000..be65624 --- /dev/null +++ b/SVSim.BattleEngine/Engine/Wizard/CompetitionEntryDialog.cs @@ -0,0 +1,186 @@ +using System; +using Cute; +using UnityEngine; +using Wizard.Scripts.Network.Data.TaskData.Arena; + +namespace Wizard; + +public class CompetitionEntryDialog : ArenaEntryDialogBase +{ + public delegate void OnCompleteEntry(); + + public delegate void OnCompleteJoin(); + + [SerializeField] + private GameObject _prefabRewardDialog; + + [SerializeField] + private CardDetailUI _cardDetailDialog; + + [SerializeField] + private UILabel _mainText; + + [SerializeField] + private GameObject _competitionEntryCompleteDialog; + + [SerializeField] + private GameObject _rewardRoot; + + [SerializeField] + private GameObject _freeEntryDialogLine; + + [SerializeField] + private UIButton _entryRupyButton; + + [SerializeField] + private UIButton _entryCrystalButton; + + [SerializeField] + private UIGrid _entryButtonGrid; + + [SerializeField] + private GameObject _rewardLabel; + + [SerializeField] + private GameObject _coutionLabel; + + public Action CompleteEntryHandler; + + public Action CompleteJoinHandler; + + private const int CELL_WIDTH_ADJUST = -12; + + private const int CELL_WIDTH_ADJUST_COUNT = 4; + + private readonly Vector3 FREE_BATTLE_LABEL_POS = new Vector3(0f, 198f, 0f); + + private readonly Vector3 FREE_BATTLE_COUTION_LABEL_POS = new Vector3(0f, 108f, 0f); + + private readonly Vector3 FREE_BATTLE_REWARD_LABEL_POS = new Vector3(0f, 29f, 0f); + + private readonly Vector3 FREE_BATTLE_REWARD_POS = new Vector3(0f, -96f, 0f); + + protected override void Init() + { + IsCompetition = true; + switch (Data.ArenaData.CompetitionData.CostType) + { + case ArenaCompetition.EntryCostType.EntryWithFree: + { + bool flag = Data.ArenaData.CompetitionData.CurrentWinCount > 0; + _mainText.text = (flag ? Data.SystemText.Get("Competition_0062", Data.ArenaData.CompetitionData.MaxChallengeCount.ToString()) : Data.SystemText.Get("Competition_0069", Data.ArenaData.CompetitionData.MaxChallengeCount.ToString())); + _freeEntryDialogLine.SetActive(value: true); + _mainText.gameObject.transform.localPosition = FREE_BATTLE_LABEL_POS; + _rewardRoot.transform.localPosition = FREE_BATTLE_REWARD_POS; + _rewardLabel.transform.localPosition = FREE_BATTLE_REWARD_LABEL_POS; + _coutionLabel.transform.localPosition = FREE_BATTLE_COUTION_LABEL_POS; + break; + } + case ArenaCompetition.EntryCostType.EntryWithCost: + _mainText.text = Data.SystemText.Get("Competition_0077", Data.ArenaData.CompetitionData.MaxChallengeCount.ToString()); + _freeEntryDialogLine.SetActive(value: false); + break; + } + _entryCrystalButton.gameObject.SetActive(Data.ArenaData.CompetitionData.crystalCost != 0); + _entryRupyButton.gameObject.SetActive(Data.ArenaData.CompetitionData.rupyCost != 0); + _entryButtonGrid.Reposition(); + _arenaNameTextId = "Competition_0035"; + _entryButtonSe = Se.TYPE.SYS_BTN_DECIDE; + } + + protected override int GetTicketNum() + { + return PlayerStaticData.UserColosseumTicketNum; + } + + protected override ArenaEntryDataBase GetEntryData() + { + return Data.ArenaData.CompetitionData; + } + + protected override void Entry() + { + base.Entry(); + if (Data.ArenaData.CompetitionData.CostType == ArenaCompetition.EntryCostType.EntryWithCost) + { + CompetitionEntryTask competitionEntryTask = new CompetitionEntryTask(); + competitionEntryTask.SetParameter(_payType); + StartCoroutine(Toolbox.NetworkManager.Connect(competitionEntryTask, EntryTaskSuccess)); + } + else + { + CompetitionPermanentEntryTask competitionPermanentEntryTask = new CompetitionPermanentEntryTask(); + competitionPermanentEntryTask.SetParameter(_payType); + StartCoroutine(Toolbox.NetworkManager.Connect(competitionPermanentEntryTask, EntryTaskSuccess)); + } + } + + private void EntryTaskSuccess(NetworkTask.ResultCode inResult) + { + base.ParentDialog.CloseWithoutSelect(); + CompleteEntryHandler.Call(); + DialogBase dialogBase = UIManager.GetInstance().CreateDialogClose(); + dialogBase.SetSize(DialogBase.Size.M); + dialogBase.SetTitleLabel(Data.SystemText.Get("Competition_0018")); + GameObject gameObject = UnityEngine.Object.Instantiate(_competitionEntryCompleteDialog); + dialogBase.SetObj(gameObject); + dialogBase.SetButtonLayout(DialogBase.ButtonLayout.OkBtn); + SetRewardInfo(gameObject, isOnlyIcon: false, isSetLabel: true); + gameObject.transform.localPosition = Vector3.forward * 10f; + dialogBase.OnClose = delegate + { + if (Data.ArenaData.CompetitionData.CostType == ArenaCompetition.EntryCostType.EntryWithFree) + { + UIManager.ViewScene nextScene = ((Data.ArenaData.CompetitionData.Rule == ArenaColosseum.eRule.TwoPick) ? UIManager.ViewScene.Competition2Pick : UIManager.ViewScene.CompetitionLobby); + UIManager.GetInstance().ChangeViewScene(nextScene); + } + else + { + CreateJoinCompetitionDialog(); + } + }; + } + + public void SetRewardInfoEntryConfirm() + { + SetRewardInfo(_rewardRoot, isOnlyIcon: true); + } + + public void SetRewardInfo(GameObject root, bool isOnlyIcon = false, bool isSetLabel = false) + { + RewardBase component = NGUITools.AddChild(root, _prefabRewardDialog).GetComponent(); + component.SetCardDetailUI(_cardDetailDialog); + foreach (Wizard.Scripts.Network.Data.TaskData.Arena.Reward entryReward in Data.ArenaData.CompetitionData.EntryRewardList) + { + component.AddReward(entryReward); + } + component.GetComponent().depth = 8; + if (component._rewardObjectInfoList.Count >= 4) + { + component.AllInEndCreate(0.8f, -12); + } + else + { + component.AllInEndCreate(1f); + } + if (isOnlyIcon) + { + component.SetOnlyIconEndCreate(isSleeveRotate: false); + } + component.SetActiveRewardLabel(isSetLabel); + } + + public void CreateJoinCompetitionDialog() + { + SystemText systemText = Data.SystemText; + DialogBase dialogBase = UIManager.GetInstance().CreateDialogClose(); + dialogBase.SetButtonLayout(DialogBase.ButtonLayout.BlueBtn_CancelBtn); + dialogBase.SetButtonText(systemText.Get("Competition_0039")); + dialogBase.SetText(systemText.Get("Competition_0078")); + dialogBase.ClickSe_Btn1 = Se.TYPE.SYS_BTN_DECIDE_TRANS; + dialogBase.SetButtonDelegate(delegate + { + CompleteJoinHandler.Call(); + }); + } +} diff --git a/SVSim.BattleEngine/Engine/Wizard/CompetitionEntryTask.cs b/SVSim.BattleEngine/Engine/Wizard/CompetitionEntryTask.cs new file mode 100644 index 0000000..1be9a71 --- /dev/null +++ b/SVSim.BattleEngine/Engine/Wizard/CompetitionEntryTask.cs @@ -0,0 +1,33 @@ +namespace Wizard; + +public class CompetitionEntryTask : BaseTask +{ + public class CompetitionEntryTaskParam : BaseParam + { + public int consume_item_type; + } + + public CompetitionEntryTask() + { + base.type = ApiType.Type.CompetitionEntry; + } + + public void SetParameter(ArenaData.eARENA_PAY inPayType) + { + CompetitionEntryTaskParam competitionEntryTaskParam = new CompetitionEntryTaskParam(); + competitionEntryTaskParam.consume_item_type = (int)inPayType; + base.Params = competitionEntryTaskParam; + } + + protected override int Parse() + { + int num = base.Parse(); + if (num != 1) + { + return num; + } + PlayerStaticData.UpdateHaveUserGoodsNumByJsonData(base.ResponseData["data"]["reward_list"]); + Data.ArenaData.CompetitionData.SetRestChallangeCountByEntry(base.ResponseData["data"]); + return num; + } +} diff --git a/SVSim.BattleEngine/Engine/Wizard/CompetitionJoinTask.cs b/SVSim.BattleEngine/Engine/Wizard/CompetitionJoinTask.cs new file mode 100644 index 0000000..dfd131e --- /dev/null +++ b/SVSim.BattleEngine/Engine/Wizard/CompetitionJoinTask.cs @@ -0,0 +1,9 @@ +namespace Wizard; + +public class CompetitionJoinTask : BaseTask +{ + public CompetitionJoinTask() + { + base.type = ApiType.Type.CompetitionJoin; + } +} diff --git a/SVSim.BattleEngine/Engine/Wizard/CompetitionRegisterDeckTask.cs b/SVSim.BattleEngine/Engine/Wizard/CompetitionRegisterDeckTask.cs new file mode 100644 index 0000000..b4b2654 --- /dev/null +++ b/SVSim.BattleEngine/Engine/Wizard/CompetitionRegisterDeckTask.cs @@ -0,0 +1,32 @@ +using System.Collections.Generic; +using LitJson; + +namespace Wizard; + +public class CompetitionRegisterDeckTask : BaseTask +{ + public class CompetitionRegisterDeckTaskParam : BaseParam + { + public string deck_no_list; + + public bool is_published; + } + + public CompetitionRegisterDeckTask() + { + base.type = ApiType.Type.CompetitionRegisterDeck; + } + + public void SetParameter(List deckList, bool isPublished) + { + CompetitionRegisterDeckTaskParam competitionRegisterDeckTaskParam = new CompetitionRegisterDeckTaskParam(); + List list = new List(); + for (int i = 0; i < deckList.Count; i++) + { + list.Add(deckList[i].GetDeckID()); + } + competitionRegisterDeckTaskParam.deck_no_list = JsonMapper.ToJson(list); + competitionRegisterDeckTaskParam.is_published = isPublished; + base.Params = competitionRegisterDeckTaskParam; + } +} diff --git a/SVSim.BattleEngine/Engine/Wizard/ConventionDeckOrderTask.cs b/SVSim.BattleEngine/Engine/Wizard/ConventionDeckOrderTask.cs new file mode 100644 index 0000000..fadabcf --- /dev/null +++ b/SVSim.BattleEngine/Engine/Wizard/ConventionDeckOrderTask.cs @@ -0,0 +1,27 @@ +namespace Wizard; + +public class ConventionDeckOrderTask : BaseTask +{ + public class DeckOrderTaskParam : BaseParam + { + public string tournament_id; + + public int[] deck_order; + + public int deck_format; + } + + public ConventionDeckOrderTask() + { + base.type = ApiType.Type.ConventionDeckOrder; + } + + public void SetParameter(string tournament_id, int[] deck_order, Format format) + { + DeckOrderTaskParam deckOrderTaskParam = new DeckOrderTaskParam(); + deckOrderTaskParam.tournament_id = tournament_id; + deckOrderTaskParam.deck_order = deck_order; + deckOrderTaskParam.deck_format = Data.FormatConvertApi(format); + base.Params = deckOrderTaskParam; + } +} diff --git a/SVSim.BattleEngine/Engine/Wizard/CustomEasing.cs b/SVSim.BattleEngine/Engine/Wizard/CustomEasing.cs new file mode 100644 index 0000000..b81f9f8 --- /dev/null +++ b/SVSim.BattleEngine/Engine/Wizard/CustomEasing.cs @@ -0,0 +1,411 @@ +using System; + +namespace Wizard; + +public class CustomEasing +{ + public enum eType + { + linear, + inQuad, + outQuad, + inOutQuad, + inCubic, + outCubic, + inOutCubic, + inQuart, + outQuart, + inOutQuart, + inSine, + outSine, + inOutSine, + inExpo, + outExpo, + inOutExpo, + inCirc, + outCirc, + inOutCirc, + inElastic, + outElastic, + inOutElastic, + inBack, + outBack, + inOutBack, + inBounce, + outBounce, + inOutBounce + } + + private delegate float easingFunc(float curTime); + + private float beginVal; + + private float endVal; + + private float changeVal; + + private float duration; + + private float curTime; + + private easingFunc func; + + public bool IsMoving { get; private set; } + + public CustomEasing(eType type, float beginValue, float endValue, float durationTime) + { + switch (type) + { + case eType.linear: + func = linear; + break; + case eType.inQuad: + func = inQuad; + break; + case eType.outQuad: + func = outQuad; + break; + case eType.inOutQuad: + func = inOutQuad; + break; + case eType.inCubic: + func = inCubic; + break; + case eType.outCubic: + func = outCubic; + break; + case eType.inOutCubic: + func = inOutCubic; + break; + case eType.inQuart: + func = inQuart; + break; + case eType.outQuart: + func = outQuart; + break; + case eType.inOutQuart: + func = inOutQuart; + break; + case eType.inSine: + func = inSine; + break; + case eType.outSine: + func = outSine; + break; + case eType.inOutSine: + func = inOutSine; + break; + case eType.inExpo: + func = inExpo; + break; + case eType.outExpo: + func = outExpo; + break; + case eType.inOutExpo: + func = inOutExpo; + break; + case eType.inCirc: + func = inCirc; + break; + case eType.outCirc: + func = outCirc; + break; + case eType.inOutCirc: + func = inOutCirc; + break; + case eType.inElastic: + func = inElastic; + break; + case eType.outElastic: + func = outElastic; + break; + case eType.inOutElastic: + func = inOutElastic; + break; + case eType.inBack: + func = inBack; + break; + case eType.outBack: + func = outBack; + break; + case eType.inOutBack: + func = inOutBack; + break; + case eType.inBounce: + func = inBounce; + break; + case eType.outBounce: + func = outBounce; + break; + case eType.inOutBounce: + func = inOutBounce; + break; + } + beginVal = beginValue; + endVal = endValue; + duration = durationTime; + curTime = 0f; + changeVal = endValue - beginValue; + IsMoving = true; + } + + public float GetCurVal(float deltaTime, bool canOver = false) + { + curTime += deltaTime; + if (curTime >= duration && !canOver) + { + IsMoving = false; + return endVal; + } + return func(curTime) + beginVal; + } + + private float linear(float t) + { + return changeVal * t / duration; + } + + private float inQuad(float t) + { + float num = t / duration; + return changeVal * num * num; + } + + private float outQuad(float t) + { + float num = t / duration; + return (0f - changeVal) * num * (num - 2f); + } + + private float inOutQuad(float t) + { + float num = t * 2f / duration; + if (num < 1f) + { + return changeVal / 2f * num * num; + } + return (0f - changeVal) / 2f * ((num - 1f) * (num - 3f) - 1f); + } + + private float inCubic(float t) + { + float num = t / duration; + return changeVal * num * num * num; + } + + private float outCubic(float t) + { + float num = t / duration - 1f; + return changeVal * (num * num * num + 1f); + } + + private float inOutCubic(float t) + { + float num = t * 2f / duration; + if (num < 1f) + { + return changeVal / 2f * num * num * num; + } + num -= 2f; + return changeVal / 2f * (num * num * num + 2f); + } + + private float inQuart(float t) + { + float num = t / duration; + return changeVal * num * num * num * num; + } + + private float outQuart(float t) + { + float num = t / duration - 1f; + return (0f - changeVal) * (num * num * num * num - 1f); + } + + private float inOutQuart(float t) + { + float num = t * 2f / duration; + if (num < 1f) + { + return changeVal / 2f * num * num * num * num; + } + num -= 2f; + return (0f - changeVal) / 2f * (num * num * num * num - 2f); + } + + private float inSine(float t) + { + return (0f - changeVal) * (float)Math.Cos((double)(t / duration) * (Math.PI / 2.0)) + changeVal; + } + + private float outSine(float t) + { + return changeVal * (float)Math.Sin((double)(t / duration) * (Math.PI / 2.0)); + } + + private float inOutSine(float t) + { + return (0f - changeVal) / 2f * ((float)Math.Cos((double)(t / duration) * Math.PI) - 1f); + } + + private float inExpo(float t) + { + if (t == 0f) + { + return 0f; + } + return changeVal * (float)Math.Pow(2.0, 10f * (t / duration - 1f)); + } + + private float outExpo(float t) + { + return changeVal * (0f - (float)Math.Pow(2.0, -10f * t / duration) + 1f); + } + + private float inOutExpo(float t) + { + if (t == 0f) + { + return 0f; + } + float num = t * 2f / duration; + if (num < 1f) + { + return changeVal / 2f * (float)Math.Pow(2.0, 10f * (num - 1f)); + } + return changeVal / 2f * (0f - (float)Math.Pow(2.0, -10f * (num - 1f)) + 2f); + } + + private float inCirc(float t) + { + float num = t / duration; + return (0f - changeVal) * ((float)Math.Sqrt(1f - num * num) - 1f); + } + + private float outCirc(float t) + { + float num = t / duration - 1f; + return changeVal * (float)Math.Sqrt(1f - num * num); + } + + private float inOutCirc(float t) + { + float num = t * 2f / duration; + if (num < 1f) + { + return (0f - changeVal) / 2f * ((float)Math.Sqrt(1f - num * num) - 1f); + } + num -= 2f; + return changeVal / 2f * ((float)Math.Sqrt(1f - num * num) + 1f); + } + + private float inElastic(float t) + { + float num = t / duration; + float num2 = 1.70158f; + float num3 = changeVal; + if (num == 0f) + { + return 0f; + } + float num4 = duration * 0.3f; + num2 = ((!(num3 < Math.Abs(changeVal))) ? (num4 / ((float)Math.PI * 2f) * (float)Math.Asin(changeVal / num3)) : (num4 / 4f)); + num -= 1f; + return 0f - num3 * (float)Math.Pow(2.0, 10f * num) * (float)Math.Sin((num * duration - num2) * ((float)Math.PI * 2f) / num4); + } + + private float outElastic(float t) + { + float num = t / duration; + float num2 = 1.70158f; + float num3 = changeVal; + if (num == 0f) + { + return 0f; + } + float num4 = duration * 0.3f; + num2 = ((!(num3 < Math.Abs(changeVal))) ? (num4 / ((float)Math.PI * 2f) * (float)Math.Asin(changeVal / num3)) : (num4 / 4f)); + return num3 * (float)Math.Pow(2.0, -10f * num) * (float)Math.Sin((num * duration - num2) * ((float)Math.PI * 2f) / num4) + changeVal; + } + + private float inOutElastic(float t) + { + float num = t * 2f / duration; + float num2 = 1.70158f; + float num3 = changeVal; + if (num == 0f) + { + return 0f; + } + float num4 = duration * 0.45f; + num2 = ((!(num3 < Math.Abs(changeVal))) ? (num4 / ((float)Math.PI * 2f) * (float)Math.Asin(changeVal / num3)) : (num4 / 4f)); + if (num < 1f) + { + num -= 1f; + return -0.5f * (num3 * (float)Math.Pow(2.0, 10f * num) * (float)Math.Sin((num * duration - num2) * ((float)Math.PI * 2f) / num4)); + } + num -= 1f; + return num3 * (float)Math.Pow(2.0, -10f * num) * (float)Math.Sin((num * duration - num2) * ((float)Math.PI * 2f / num4)) * 0.5f + changeVal; + } + + private float inBack(float t) + { + float num = t / duration; + float num2 = 1.70158f; + return changeVal * num * num * ((num2 + 1f) * num - num2); + } + + private float outBack(float t) + { + float num = t / duration - 1f; + float num2 = 1.70158f; + return changeVal * (num * num * ((num2 + 1f) * num + num2) + 1f); + } + + private float inOutBack(float t) + { + float num = t * 2f / duration; + float num2 = 2.5949094f; + if (num < 1f) + { + return changeVal / 2f * num * num * ((num2 + 1f) * num - num2); + } + num -= 2f; + return changeVal / 2f * (num * num * ((num2 + 1f) * num + num2) + 2f); + } + + private float inBounce(float t) + { + return changeVal - outBounce(duration - t); + } + + private float outBounce(float t) + { + float num = t / duration; + if (num < 0.36363637f) + { + return changeVal * (7.5625f * num * num); + } + if (num < 0.72727275f) + { + num -= 0.54545456f; + return changeVal * (7.5625f * num * num + 0.75f); + } + if (num < 0.90909094f) + { + num -= 0.8181818f; + return changeVal * (7.5625f * num * num + 0.9375f); + } + num -= 21f / 22f; + return changeVal * (7.5625f * num * num + 63f / 64f); + } + + private float inOutBounce(float t) + { + if (t * 2f < duration) + { + return inBounce(t * 2f) * 0.5f; + } + return 0.5f * outBounce(t * 2f - duration) + changeVal * 0.5f; + } +} diff --git a/SVSim.BattleEngine/Engine/Wizard/DeckConventionInfoTask.cs b/SVSim.BattleEngine/Engine/Wizard/DeckConventionInfoTask.cs new file mode 100644 index 0000000..84f0081 --- /dev/null +++ b/SVSim.BattleEngine/Engine/Wizard/DeckConventionInfoTask.cs @@ -0,0 +1,45 @@ +namespace Wizard; + +public class DeckConventionInfoTask : BaseTask +{ + public class DeckConventionInfoTaskParam : BaseParam + { + public string tournament_id; + + public int deck_no; + } + + private ConventionInfo _conventionInfo; + + public ConventionDeckList DeckList { get; private set; } + + public DeckConventionInfoTask() + { + base.type = ApiType.Type.DeckInfoConvention; + } + + public void SetParameter(int deck_no, ConventionInfo conventionInfo, ConventionDeckList conventionDeckList = null) + { + DeckConventionInfoTaskParam deckConventionInfoTaskParam = new DeckConventionInfoTaskParam(); + _conventionInfo = conventionInfo; + DeckList = conventionDeckList; + if (conventionDeckList == null) + { + DeckList = new ConventionDeckList(); + } + deckConventionInfoTaskParam.tournament_id = conventionInfo.Id; + deckConventionInfoTaskParam.deck_no = deck_no; + base.Params = deckConventionInfoTaskParam; + } + + protected override int Parse() + { + int num = base.Parse(); + if (num != 1) + { + return num; + } + DeckList.Parse(base.ResponseData, _conventionInfo); + return num; + } +} diff --git a/SVSim.BattleEngine/Engine/Wizard/DeckConventionLeaderSkinUpdateTask.cs b/SVSim.BattleEngine/Engine/Wizard/DeckConventionLeaderSkinUpdateTask.cs new file mode 100644 index 0000000..69286a2 --- /dev/null +++ b/SVSim.BattleEngine/Engine/Wizard/DeckConventionLeaderSkinUpdateTask.cs @@ -0,0 +1,47 @@ +using LitJson; + +namespace Wizard; + +public class DeckConventionLeaderSkinUpdateTask : BaseTask +{ + private class Param : BaseParam + { + public string tournament_id; + + public int deck_no; + + public int leader_skin_id; + } + + private ConventionDeckList _deckList; + + public DeckConventionLeaderSkinUpdateTask() + { + base.type = ApiType.Type.DeckLeaderSkinUpdateConvention; + } + + public void SetParameter(int deckNo, int leaderSkinId, ConventionDeckList deckList) + { + _deckList = deckList; + Param param = new Param(); + param.tournament_id = _deckList.Conventioninfo.Id; + param.deck_no = deckNo; + param.leader_skin_id = leaderSkinId; + base.Params = param; + } + + protected override int Parse() + { + int num = base.Parse(); + if (num != 1) + { + return num; + } + JsonData jsonData = base.ResponseData["data"]["user_deck"]; + int key = jsonData["deck_no"].ToInt(); + int skinId = jsonData["leader_skin_id"].ToInt(); + _deckList.DeckList[key].SetSkinId(skinId); + _deckList.DeckList[key].IsSkinRandom = false; + return num; + } +} diff --git a/SVSim.BattleEngine/Engine/Wizard/DeckConventionNameUpdateTask.cs b/SVSim.BattleEngine/Engine/Wizard/DeckConventionNameUpdateTask.cs new file mode 100644 index 0000000..d2bdc1c --- /dev/null +++ b/SVSim.BattleEngine/Engine/Wizard/DeckConventionNameUpdateTask.cs @@ -0,0 +1,45 @@ +using LitJson; + +namespace Wizard; + +public class DeckConventionNameUpdateTask : BaseTask +{ + public class DeckConventionNameUpdateTaskParam : BaseParam + { + public string tournament_id; + + public int deck_no; + + public string deck_name; + } + + private ConventionDeckList _deckList; + + public DeckConventionNameUpdateTask() + { + base.type = ApiType.Type.DeckNameUpdateConvention; + } + + public void SetParameter(int deck_no, string deck_name, ConventionDeckList deckList) + { + _deckList = deckList; + DeckConventionNameUpdateTaskParam deckConventionNameUpdateTaskParam = new DeckConventionNameUpdateTaskParam(); + deckConventionNameUpdateTaskParam.tournament_id = deckList.Conventioninfo.Id; + deckConventionNameUpdateTaskParam.deck_no = deck_no; + deckConventionNameUpdateTaskParam.deck_name = deck_name; + base.Params = deckConventionNameUpdateTaskParam; + } + + protected override int Parse() + { + int num = base.Parse(); + if (num != 1) + { + return num; + } + JsonData jsonData = base.ResponseData["data"]["user_deck"]; + int key = jsonData["deck_no"].ToInt(); + _deckList.DeckList[key].SetDeckName(jsonData["deck_name"].ToString()); + return num; + } +} diff --git a/SVSim.BattleEngine/Engine/Wizard/DeckConventionRandomLeaderSkinUpdateTask.cs b/SVSim.BattleEngine/Engine/Wizard/DeckConventionRandomLeaderSkinUpdateTask.cs new file mode 100644 index 0000000..c547096 --- /dev/null +++ b/SVSim.BattleEngine/Engine/Wizard/DeckConventionRandomLeaderSkinUpdateTask.cs @@ -0,0 +1,55 @@ +using System.Collections.Generic; +using LitJson; + +namespace Wizard; + +public class DeckConventionRandomLeaderSkinUpdateTask : BaseTask +{ + private class DeckConventionRandomLeaderSkinUpdateParam : BaseParam + { + public string tournament_id; + + public int deck_no; + + public int[] leader_skin_id_list; + } + + private ConventionDeckList _deckList; + + public int SelectedSkinId { get; private set; } + + public DeckConventionRandomLeaderSkinUpdateTask() + { + base.type = ApiType.Type.DeckRandomLeaderSkinUpdateConvention; + } + + public void SetParameter(int deckNo, int[] leaderSkinIdList, ConventionDeckList deckList) + { + _deckList = deckList; + DeckConventionRandomLeaderSkinUpdateParam deckConventionRandomLeaderSkinUpdateParam = new DeckConventionRandomLeaderSkinUpdateParam(); + deckConventionRandomLeaderSkinUpdateParam.tournament_id = _deckList.Conventioninfo.Id; + deckConventionRandomLeaderSkinUpdateParam.deck_no = deckNo; + deckConventionRandomLeaderSkinUpdateParam.leader_skin_id_list = leaderSkinIdList; + base.Params = deckConventionRandomLeaderSkinUpdateParam; + } + + protected override int Parse() + { + int num = base.Parse(); + if (num != 1) + { + return num; + } + JsonData jsonData = base.ResponseData["data"]["user_deck"]; + int key = jsonData["deck_no"].ToInt(); + _deckList.DeckList[key].IsSkinRandom = true; + JsonData jsonData2 = jsonData["leader_skin_id_list"]; + _deckList.DeckList[key].SelectRandomSkinIdList = new List(); + for (int i = 0; i < jsonData2.Count; i++) + { + _deckList.DeckList[key].SelectRandomSkinIdList.Add(jsonData2[i].ToInt()); + } + SelectedSkinId = jsonData["leader_skin_id"].ToInt(); + return num; + } +} diff --git a/SVSim.BattleEngine/Engine/Wizard/DeckConventionUpdateSleeveTask.cs b/SVSim.BattleEngine/Engine/Wizard/DeckConventionUpdateSleeveTask.cs new file mode 100644 index 0000000..629206e --- /dev/null +++ b/SVSim.BattleEngine/Engine/Wizard/DeckConventionUpdateSleeveTask.cs @@ -0,0 +1,46 @@ +using LitJson; + +namespace Wizard; + +public class DeckConventionUpdateSleeveTask : BaseTask +{ + public class SleeveConventionSetTaskParam : BaseParam + { + public string tournament_id; + + public int deck_no; + + public long sleeve_id; + } + + private ConventionDeckList _deckList; + + public DeckConventionUpdateSleeveTask() + { + base.type = ApiType.Type.DeckUpdateSleeveConvention; + } + + public void SetParameter(int deck_no, long sleeve_id, ConventionDeckList deckList) + { + _deckList = deckList; + SleeveConventionSetTaskParam sleeveConventionSetTaskParam = new SleeveConventionSetTaskParam(); + sleeveConventionSetTaskParam.tournament_id = deckList.Conventioninfo.Id; + sleeveConventionSetTaskParam.deck_no = deck_no; + sleeveConventionSetTaskParam.sleeve_id = sleeve_id; + base.Params = sleeveConventionSetTaskParam; + } + + protected override int Parse() + { + int num = base.Parse(); + if (num != 1) + { + return num; + } + JsonData jsonData = base.ResponseData["data"]["user_deck"]; + int key = jsonData["deck_no"].ToInt(); + long deckSleeveID = jsonData["sleeve_id"].ToLong(); + _deckList.DeckList[key].SetDeckSleeveID(deckSleeveID); + return num; + } +} diff --git a/SVSim.BattleEngine/Engine/Wizard/DeckIntroductionPeriodSelectDialog.cs b/SVSim.BattleEngine/Engine/Wizard/DeckIntroductionPeriodSelectDialog.cs new file mode 100644 index 0000000..29201e5 --- /dev/null +++ b/SVSim.BattleEngine/Engine/Wizard/DeckIntroductionPeriodSelectDialog.cs @@ -0,0 +1,35 @@ +using System; +using System.Collections.Generic; +using UnityEngine; + +namespace Wizard; + +public class DeckIntroductionPeriodSelectDialog : MonoBehaviour +{ + public DeckIntroductionTask DeckIntroductionDeta { get; private set; } + + private Action OnSelectEvent { get; set; } + + public static DialogBase Create(int defaultSelectId, DeckIntroductionTask task, Action onSelect) + { + List resultDeckSeriesNameList = task.ResultDeckSeriesNameList; + int defaultIndex = 0; + for (int i = 0; i < task.ResultDeckSeriesIdList.Count; i++) + { + if (task.ResultDeckSeriesIdList[i] == defaultSelectId) + { + defaultIndex = i; + } + } + GameObject obj = UnityEngine.Object.Instantiate(Resources.Load("UI/layoutParts/MyPage/DeckIntroductionPeriodSelectDialog")) as GameObject; + DeckIntroductionPeriodSelectDialog componentInChildren = obj.GetComponentInChildren(); + componentInChildren.DeckIntroductionDeta = task; + componentInChildren.OnSelectEvent = onSelect; + return DrumrollDialog.Create(obj.GetComponent(), resultDeckSeriesNameList, defaultIndex, componentInChildren.OnSelect); + } + + private void OnSelect(int index) + { + OnSelectEvent(DeckIntroductionDeta.ResultDeckSeriesIdList[index]); + } +} diff --git a/SVSim.BattleEngine/Engine/Wizard/DeckLeaderSkinUpdateTask.cs b/SVSim.BattleEngine/Engine/Wizard/DeckLeaderSkinUpdateTask.cs new file mode 100644 index 0000000..2bc4600 --- /dev/null +++ b/SVSim.BattleEngine/Engine/Wizard/DeckLeaderSkinUpdateTask.cs @@ -0,0 +1,41 @@ +namespace Wizard; + +public class DeckLeaderSkinUpdateTask : BaseTask +{ + private class Param : BaseParam + { + public int deck_no; + + public int leader_skin_id; + + public int deck_format; + } + + private Format _updateDeckFormat; + + public DeckLeaderSkinUpdateTask() + { + base.type = ApiType.Type.DeckLeaderSkinUpdate; + } + + public void SetParameter(int deckNo, int leaderSkinId, Format format) + { + Param param = new Param(); + param.deck_no = deckNo; + param.leader_skin_id = leaderSkinId; + param.deck_format = Data.FormatConvertApi(format); + base.Params = param; + _updateDeckFormat = format; + } + + protected override int Parse() + { + int num = base.Parse(); + if (num != 1) + { + return num; + } + DeckListUtility.DeckUpdate(base.ResponseData["data"]["user_deck"], _updateDeckFormat, DeckAttributeType.CustomDeck); + return num; + } +} diff --git a/SVSim.BattleEngine/Engine/Wizard/DeckMyListTask.cs b/SVSim.BattleEngine/Engine/Wizard/DeckMyListTask.cs new file mode 100644 index 0000000..2b0b1ae --- /dev/null +++ b/SVSim.BattleEngine/Engine/Wizard/DeckMyListTask.cs @@ -0,0 +1,39 @@ +namespace Wizard; + +public class DeckMyListTask : BaseTask +{ + public class DeckMyListTaskParam : BaseParam + { + public int deck_format; + } + + private Format _format; + + public DeckGroupListData DeckGroupListData { get; private set; } + + public DeckMyListTask() + { + base.type = ApiType.Type.DeckMyList; + } + + public void SetParameter(Format format) + { + DeckMyListTaskParam deckMyListTaskParam = new DeckMyListTaskParam(); + deckMyListTaskParam.deck_format = Data.FormatConvertApi(format); + base.Params = deckMyListTaskParam; + _format = format; + } + + protected override int Parse() + { + int num = base.Parse(); + if (num != 1) + { + return num; + } + GameMgr.GetIns().GetDataMgr().SetMaintenanceCardIds(base.ResponseData["data"]["maintenance_card_list"]); + DeckGroupListData = new DeckGroupListData(base.ResponseData["data"], _format); + GameMgr.GetIns().GetDataMgr().CurrentDeckListParamData = DeckGroupListData; + return num; + } +} diff --git a/SVSim.BattleEngine/Engine/Wizard/DeckNameUpdateTask.cs b/SVSim.BattleEngine/Engine/Wizard/DeckNameUpdateTask.cs new file mode 100644 index 0000000..fd971e9 --- /dev/null +++ b/SVSim.BattleEngine/Engine/Wizard/DeckNameUpdateTask.cs @@ -0,0 +1,41 @@ +namespace Wizard; + +public class DeckNameUpdateTask : BaseTask +{ + public class DeckNameUpdateTaskParam : BaseParam + { + public int deck_no; + + public string deck_name; + + public int deck_format; + } + + private Format _updateDeckFormat; + + public DeckNameUpdateTask() + { + base.type = ApiType.Type.DeckNameUpdate; + } + + public void SetParameter(int deck_no, string deck_name, Format format) + { + DeckNameUpdateTaskParam deckNameUpdateTaskParam = new DeckNameUpdateTaskParam(); + deckNameUpdateTaskParam.deck_no = deck_no; + deckNameUpdateTaskParam.deck_name = deck_name; + deckNameUpdateTaskParam.deck_format = Data.FormatConvertApi(format); + base.Params = deckNameUpdateTaskParam; + _updateDeckFormat = format; + } + + protected override int Parse() + { + int num = base.Parse(); + if (num != 1) + { + return num; + } + DeckListUtility.DeckUpdate(base.ResponseData["data"]["user_deck"], _updateDeckFormat, DeckAttributeType.CustomDeck); + return num; + } +} diff --git a/SVSim.BattleEngine/Engine/Wizard/DeckOrderTask.cs b/SVSim.BattleEngine/Engine/Wizard/DeckOrderTask.cs new file mode 100644 index 0000000..03c5c09 --- /dev/null +++ b/SVSim.BattleEngine/Engine/Wizard/DeckOrderTask.cs @@ -0,0 +1,38 @@ +namespace Wizard; + +public class DeckOrderTask : BaseTask +{ + public class DeckOrderTaskParam : BaseParam + { + public int[] deck_order; + + public int deck_format; + } + + private Format _updateDeckFormat; + + public DeckOrderTask() + { + base.type = ApiType.Type.DeckOrder; + } + + public void SetParameter(int[] deck_order, Format format) + { + DeckOrderTaskParam deckOrderTaskParam = new DeckOrderTaskParam(); + deckOrderTaskParam.deck_order = deck_order; + deckOrderTaskParam.deck_format = Data.FormatConvertApi(format); + _updateDeckFormat = format; + base.Params = deckOrderTaskParam; + } + + protected override int Parse() + { + int num = base.Parse(); + if (num != 1) + { + return num; + } + DeckListUtility.ParseDeckInfoResponceData(base.ResponseData["data"], _updateDeckFormat); + return num; + } +} diff --git a/SVSim.BattleEngine/Engine/Wizard/DeckRandomLeaderSkinUpdateTask.cs b/SVSim.BattleEngine/Engine/Wizard/DeckRandomLeaderSkinUpdateTask.cs new file mode 100644 index 0000000..3e70a36 --- /dev/null +++ b/SVSim.BattleEngine/Engine/Wizard/DeckRandomLeaderSkinUpdateTask.cs @@ -0,0 +1,47 @@ +using LitJson; + +namespace Wizard; + +public class DeckRandomLeaderSkinUpdateTask : BaseTask +{ + private class DeckRandomLeaderSkinUpdateParam : BaseParam + { + public int deck_format; + + public int deck_no; + + public int[] leader_skin_id_list; + } + + private Format _updateDeckFormat; + + public int SelectedSkinId { get; private set; } + + public DeckRandomLeaderSkinUpdateTask() + { + base.type = ApiType.Type.DeckRandomLeaderSkinUpdate; + } + + public void SetParameter(Format format, int deckNo, int[] leaderSkinIdList) + { + DeckRandomLeaderSkinUpdateParam deckRandomLeaderSkinUpdateParam = new DeckRandomLeaderSkinUpdateParam(); + deckRandomLeaderSkinUpdateParam.deck_format = Data.FormatConvertApi(format); + deckRandomLeaderSkinUpdateParam.deck_no = deckNo; + deckRandomLeaderSkinUpdateParam.leader_skin_id_list = leaderSkinIdList; + base.Params = deckRandomLeaderSkinUpdateParam; + _updateDeckFormat = format; + } + + protected override int Parse() + { + int num = base.Parse(); + if (num != 1) + { + return num; + } + JsonData jsonData = base.ResponseData["data"]["user_deck"]; + DeckListUtility.DeckUpdate(jsonData, _updateDeckFormat, DeckAttributeType.CustomDeck); + SelectedSkinId = jsonData["leader_skin_id"].ToInt(); + return num; + } +} diff --git a/SVSim.BattleEngine/Engine/Wizard/DeckUpdateSleeveTask.cs b/SVSim.BattleEngine/Engine/Wizard/DeckUpdateSleeveTask.cs new file mode 100644 index 0000000..c627c59 --- /dev/null +++ b/SVSim.BattleEngine/Engine/Wizard/DeckUpdateSleeveTask.cs @@ -0,0 +1,41 @@ +namespace Wizard; + +public class DeckUpdateSleeveTask : BaseTask +{ + public class SleeveSetTaskParam : BaseParam + { + public int deck_no; + + public long sleeve_id; + + public int deck_format; + } + + private Format _updateDeckFormat; + + public DeckUpdateSleeveTask() + { + base.type = ApiType.Type.DeckUpdateSleeve; + } + + public void SetParameter(int deck_no, long sleeve_id, Format format) + { + SleeveSetTaskParam sleeveSetTaskParam = new SleeveSetTaskParam(); + sleeveSetTaskParam.deck_no = deck_no; + sleeveSetTaskParam.sleeve_id = sleeve_id; + sleeveSetTaskParam.deck_format = Data.FormatConvertApi(format); + base.Params = sleeveSetTaskParam; + _updateDeckFormat = format; + } + + protected override int Parse() + { + int num = base.Parse(); + if (num != 1) + { + return num; + } + DeckListUtility.DeckUpdate(base.ResponseData["data"]["user_deck"], _updateDeckFormat, DeckAttributeType.CustomDeck); + return num; + } +} diff --git a/SVSim.BattleEngine/Engine/Wizard/DeleteUserDataTask.cs b/SVSim.BattleEngine/Engine/Wizard/DeleteUserDataTask.cs new file mode 100644 index 0000000..367db71 --- /dev/null +++ b/SVSim.BattleEngine/Engine/Wizard/DeleteUserDataTask.cs @@ -0,0 +1,9 @@ +namespace Wizard; + +public class DeleteUserDataTask : BaseTask +{ + public DeleteUserDataTask() + { + base.type = ApiType.Type.DeleteUserData; + } +} diff --git a/SVSim.BattleEngine/Engine/Wizard/Gathering.cs b/SVSim.BattleEngine/Engine/Wizard/Gathering.cs new file mode 100644 index 0000000..1e3ab38 --- /dev/null +++ b/SVSim.BattleEngine/Engine/Wizard/Gathering.cs @@ -0,0 +1,100 @@ +using System; +using System.Collections; +using Cute; +using UnityEngine; + +namespace Wizard; + +public class Gathering : UIBase +{ + [SerializeField] + private GatheringEntry _entryRoot; + + [SerializeField] + private GatheringJoining _joiningRoot; + + public override void onFirstStart() + { + _entryRoot.InitializeUI(); + _joiningRoot.InitializeUI(); + _entryRoot.gameObject.SetActive(value: false); + _joiningRoot.gameObject.SetActive(value: false); + base.IsShowFooterMenu = true; + base.onFirstStart(); + Data.MyPageNotifications.data.GatheringMyPageInfo.IsMatchingNotification = false; + if (Data.MyPage.data != null) + { + UIManager.GetInstance()._Footer.UpdateArenaBadgeIcon(); + } + GatheringGetSelfInfoTask task = new GatheringGetSelfInfoTask(isDependGatheringInfo: false); + StartCoroutine(Toolbox.NetworkManager.Connect(task, delegate + { + Initialize(task); + })); + } + + private UIManager.ChangeViewSceneParam CreateBackButtonParam() + { + return new UIManager.ChangeViewSceneParam + { + MyPageMenuIndex = 3, + OnFinishChangeView = delegate + { + MyPageMenu.Instance.GoToGatheringActionMenu(); + } + }; + } + + public static void BackToMyPageForDrop() + { + UIManager.ChangeViewSceneParam changeViewSceneParam = new UIManager.ChangeViewSceneParam(); + changeViewSceneParam.MyPageMenuIndex = 3; + changeViewSceneParam.OnFinishChangeView = delegate + { + MyPageMenu.Instance.GoToGatheringActionMenu(); + }; + UIManager.GetInstance().ChangeViewScene(UIManager.ViewScene.MyPage, changeViewSceneParam); + } + + private void Initialize(GatheringGetSelfInfoTask task) + { + GatheringInfo info = task.Info; + string titleMsg; + if (info.Role == GatheringRule.eRole.NONE) + { + _entryRoot.Initialize(task); + titleMsg = Data.SystemText.Get("Gathering_0002"); + } + else + { + _joiningRoot.Initialize(); + titleMsg = Data.SystemText.Get("Gathering_0034"); + } + _entryRoot.gameObject.SetActive(info.Role == GatheringRule.eRole.NONE); + _joiningRoot.gameObject.SetActive(info.Role != GatheringRule.eRole.NONE); + _joiningRoot.OnReceiveSelfInfo(info); + UIManager.GetInstance().CreateTopBar(base.gameObject, titleMsg, UIManager.ViewScene.MyPage, MoneyDraw: true, CreateBackButtonParam()).gameObject.layer = LayerMask.NameToLayer("MyPage"); + StartCoroutine(WaitForCommonBackGround(delegate + { + UIManager.GetInstance().OnReadyViewScene(isFadein: true); + })); + } + + private IEnumerator WaitForCommonBackGround(Action onComplete) + { + while (!CommonBackGround.Instance.IsFinishLod) + { + yield return null; + } + while (!CommonBackGround.Instance.IsFinishEffectLoading()) + { + yield return null; + } + onComplete?.Invoke(); + } + + public override bool IsUseCommonBackground() + { + return true; + } +} diff --git a/SVSim.BattleEngine/Engine/Wizard/GatheringChatApiSettings.cs b/SVSim.BattleEngine/Engine/Wizard/GatheringChatApiSettings.cs new file mode 100644 index 0000000..f275d7e --- /dev/null +++ b/SVSim.BattleEngine/Engine/Wizard/GatheringChatApiSettings.cs @@ -0,0 +1,18 @@ +namespace Wizard; + +public class GatheringChatApiSettings : IChatApiSettings +{ + public ApiType.Type ApiChatMessages => ApiType.Type.GatheringChatMessages; + + public ApiType.Type ApiChatPost => ApiType.Type.GatheringChatPost; + + public ApiType.Type ApiChatAddReplay => ApiType.Type.GatheringChatAddReplay; + + public ApiType.Type ApiChatReplayDetail => ApiType.Type.GatheringChatReplayDetail; + + public ApiType.Type ApiChatAddDeck => ApiType.Type.GatheringChatAddDeck; + + public ApiType.Type ApiChatDeleteDeck => ApiType.Type.GatheringChatDeleteDeck; + + public ApiType.Type ApiChatDeckLog => ApiType.Type.GatheringChatDeckLog; +} diff --git a/SVSim.BattleEngine/Engine/Wizard/GatheringConfirmDeckListTask.cs b/SVSim.BattleEngine/Engine/Wizard/GatheringConfirmDeckListTask.cs new file mode 100644 index 0000000..9d9b73f --- /dev/null +++ b/SVSim.BattleEngine/Engine/Wizard/GatheringConfirmDeckListTask.cs @@ -0,0 +1,34 @@ +using System.Collections.Generic; +using LitJson; + +namespace Wizard; + +public class GatheringConfirmDeckListTask : BaseTask +{ + public Format DeckFormat { get; private set; } + + public List DeckGroupList { get; private set; } + + public DeckGroupListData DeckGroupListData { get; private set; } + + public GatheringConfirmDeckListTask() + { + base.type = ApiType.Type.GatheringConfirmDeckList; + } + + protected override int Parse() + { + int num = base.Parse(); + if (num != 1) + { + return num; + } + JsonData jsonData = base.ResponseData["data"]; + GameMgr.GetIns().GetDataMgr().SetMaintenanceCardIds(jsonData["maintenance_card_list"]); + DeckFormat = Data.ParseApiFormat(jsonData["deck_format"].ToInt()); + DeckGroupList = new List(); + DeckGroupList.Add(DeckListUtility.CreateDeckGroup(jsonData["deck_list"], DeckFormat, DeckAttributeType.CustomDeck)); + DeckGroupListData = new DeckGroupListData(DeckGroupList); + return num; + } +} diff --git a/SVSim.BattleEngine/Engine/Wizard/GatheringEntry.cs b/SVSim.BattleEngine/Engine/Wizard/GatheringEntry.cs new file mode 100644 index 0000000..c7d1837 --- /dev/null +++ b/SVSim.BattleEngine/Engine/Wizard/GatheringEntry.cs @@ -0,0 +1,123 @@ +using UnityEngine; + +namespace Wizard; + +public class GatheringEntry : MonoBehaviour +{ + private enum ViewMode + { + ID_INPUT, + INVITE + } + + [SerializeField] + private GameObject _idInputPrefab; + + [SerializeField] + private GameObject _entryConfirmPrefab; + + [SerializeField] + private GameObject _receiveInviteListPrefab; + + [SerializeField] + private UIButton _changeViewIdInputButton; + + [SerializeField] + private UIButton _changeViewInviteButton; + + [SerializeField] + private GameObject _activeTabSprite; + + [SerializeField] + private GameObject _inviteBadge; + + [SerializeField] + private UILabel[] _categoryLabel; + + private GatheringIDInput _input; + + private GatheringEntryConfirm _entryConfirm; + + private GatheringReceiveInviteList _receiveInviteList; + + public void InitializeUI() + { + _input = NGUITools.AddChild(base.gameObject, _idInputPrefab).GetComponent(); + } + + public void Initialize(GatheringGetSelfInfoTask task) + { + _input.OnGetInfo = OnGetEntryGetheringInfo; + _changeViewIdInputButton.onClick.Add(new EventDelegate(delegate + { + OnClickShowIdInputButton(); + })); + _changeViewInviteButton.onClick.Add(new EventDelegate(delegate + { + OnClickInviteButton(); + })); + _inviteBadge.SetActive(task.HasInvite); + SetViewMode(ViewMode.ID_INPUT); + } + + private void OnGetEntryGetheringInfo(GatheringGetInfoTask task) + { + GameObject gameObject = Object.Instantiate(_entryConfirmPrefab); + _entryConfirm = gameObject.GetComponent(); + _entryConfirm.StartConfirm(task); + } + + private void OnClickShowIdInputButton() + { + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_BTN_DECIDE); + SetViewMode(ViewMode.ID_INPUT); + } + + private void OnClickInviteButton() + { + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_BTN_DECIDE); + SetViewMode(ViewMode.INVITE); + } + + private void SetViewMode(ViewMode mode) + { + if (_receiveInviteList != null) + { + Object.Destroy(_receiveInviteList.gameObject); + } + _input.gameObject.SetActive(mode == ViewMode.ID_INPUT); + switch (mode) + { + case ViewMode.ID_INPUT: + _activeTabSprite.transform.parent = _changeViewIdInputButton.transform; + break; + case ViewMode.INVITE: + _activeTabSprite.transform.parent = _changeViewInviteButton.transform; + _receiveInviteList = NGUITools.AddChild(base.gameObject, _receiveInviteListPrefab).GetComponent(); + _receiveInviteList.Show(this); + break; + } + for (int i = 0; i < _categoryLabel.Length; i++) + { + if (i == (int)mode) + { + _categoryLabel[i].color = LabelDefine.TEXT_COLOR_NORMAL; + } + else + { + _categoryLabel[i].color = LabelDefine.TEXT_COLOR_B0B0B0; + } + } + _activeTabSprite.transform.localPosition = Vector3.zero; + } + + public void ReOpenInvite() + { + SetViewMode(ViewMode.INVITE); + } + + public void UpdateInviteBadge(GatheringGetReceiveInviteTask task) + { + _inviteBadge.SetActive(task.InviteList.Count > 0); + } +} diff --git a/SVSim.BattleEngine/Engine/Wizard/GatheringEntryConfirm.cs b/SVSim.BattleEngine/Engine/Wizard/GatheringEntryConfirm.cs new file mode 100644 index 0000000..ffc2752 --- /dev/null +++ b/SVSim.BattleEngine/Engine/Wizard/GatheringEntryConfirm.cs @@ -0,0 +1,107 @@ +using System.Collections.Generic; +using Cute; +using UnityEngine; +using Wizard.RoomMatch; + +namespace Wizard; + +public class GatheringEntryConfirm : MonoBehaviour +{ + [SerializeField] + private GatheringRuleView _ruleView; + + [SerializeField] + private UserPlateBase _ownerPlate; + + private List _loadedResourceList = new List(); + + private GatheringInfo _info; + + private void Start() + { + } + + private void OnDestroy() + { + if (_loadedResourceList.Count > 0) + { + Toolbox.ResourcesManager.RemoveAssetGroup(_loadedResourceList); + _loadedResourceList.Clear(); + } + } + + public void StartConfirm(GatheringGetInfoTask task) + { + base.gameObject.SetActive(value: false); + _info = task.Info; + GatheringUserInfo ownerInfo = _info.OwnerInfo; + _loadedResourceList.AddRange(ownerInfo.GetUserAssetPathList()); + UIManager.GetInstance().StartCoroutine(Toolbox.ResourcesManager.LoadAssetGroupAsync(_loadedResourceList, delegate + { + base.gameObject.SetActive(value: true); + DialogBase dialogBase = UIManager.GetInstance().CreateDialogClose(); + _ruleView.SetGatheringInfo(task.Info); + dialogBase.SetObj(base.gameObject); + dialogBase.SetSize(DialogBase.Size.M); + dialogBase.SetButtonLayout(DialogBase.ButtonLayout.BlueBtn_CancelBtn); + dialogBase.SetButtonText(Data.SystemText.Get("Gathering_Join_0003")); + dialogBase.SetTitleLabel(Data.SystemText.Get("Gathering_Menu_0002")); + dialogBase.onPushButton1 = delegate + { + OnClickEntryButton(); + }; + _ownerPlate.InitializeSimplePlate(ownerInfo); + })); + } + + private void OnClickEntryButton() + { + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_BTN_DECIDE); + if (_info.Rule.IsEntryDeckOnly) + { + DialogBase dialogBase = UIManager.GetInstance().CreateDialogClose(); + dialogBase.SetButtonLayout(DialogBase.ButtonLayout.BlueBtn_CancelBtn); + dialogBase.SetTitleLabel(Data.SystemText.Get("Gathering_0025")); + dialogBase.SetText(Data.SystemText.Get("Gathering_Join_0007")); + dialogBase.SetButtonText(Data.SystemText.Get("Gathering_0022")); + dialogBase.onPushButton1 = delegate + { + ShowDeckListDialog(_info); + }; + } + else + { + GatheringEntryTask gatheringEntryTask = new GatheringEntryTask(); + gatheringEntryTask.SetParameter(_info.Id, null); + UIManager.GetInstance().StartCoroutine(Toolbox.NetworkManager.Connect(gatheringEntryTask, delegate + { + OnSuccessEntry(); + })); + } + } + + public static void ShowDeckListDialog(GatheringInfo info) + { + string deckListHeader = Data.SystemText.Get("Gathering_0026"); + MultiDeckSelectDialog.Create(RoomConnectController.RuleSelectDeckCount(info.Rule.BattleParameterInstance.Rule), info.Rule.BattleParameterInstance.DeckFormat, deckListHeader).OnDecide = delegate(List deckList) + { + EntryGathering(deckList, info); + }; + } + + public static void EntryGathering(List deckList, GatheringInfo info) + { + GatheringEntryTask gatheringEntryTask = new GatheringEntryTask(); + gatheringEntryTask.SetParameter(info.Id, deckList); + UIManager.GetInstance().StartCoroutine(Toolbox.NetworkManager.Connect(gatheringEntryTask, delegate + { + OnSuccessEntry(); + })); + } + + public static void OnSuccessEntry() + { + GatheringChat.ResetLatestReadChatMessageId(); + UIManager.GetInstance().ChangeViewScene(UIManager.ViewScene.Gathering); + } +} diff --git a/SVSim.BattleEngine/Engine/Wizard/GatheringFriendListTask.cs b/SVSim.BattleEngine/Engine/Wizard/GatheringFriendListTask.cs new file mode 100644 index 0000000..006d064 --- /dev/null +++ b/SVSim.BattleEngine/Engine/Wizard/GatheringFriendListTask.cs @@ -0,0 +1,46 @@ +using System.Collections.Generic; +using LitJson; + +namespace Wizard; + +public class GatheringFriendListTask : BaseTask +{ + public class InviteFriendData : GatheringUserInfo + { + public bool IsJoinGathering { get; private set; } + + public bool IsInvited { get; private set; } + + public InviteFriendData(JsonData data, bool isJoinedGuild, bool isInvited) + : base(data) + { + IsJoinGathering = isJoinedGuild; + IsInvited = isInvited; + } + } + + public List InviteFriendList { get; private set; } + + public GatheringFriendListTask() + { + base.type = ApiType.Type.GatheringFriendList; + } + + protected override int Parse() + { + int num = base.Parse(); + if (num != 1) + { + return num; + } + InviteFriendList = new List(); + JsonData jsonData = base.ResponseData["data"]; + for (int i = 0; i < jsonData.Count; i++) + { + JsonData jsonData2 = jsonData[i]; + InviteFriendData item = new InviteFriendData(jsonData2, jsonData2["is_join_gathering"].ToBoolean(), jsonData2["is_invited"].ToBoolean()); + InviteFriendList.Add(item); + } + return num; + } +} diff --git a/SVSim.BattleEngine/Engine/Wizard/GatheringGetInfoTask.cs b/SVSim.BattleEngine/Engine/Wizard/GatheringGetInfoTask.cs new file mode 100644 index 0000000..5bbd03e --- /dev/null +++ b/SVSim.BattleEngine/Engine/Wizard/GatheringGetInfoTask.cs @@ -0,0 +1,34 @@ +namespace Wizard; + +public class GatheringGetInfoTask : BaseTask +{ + public class GatheringGetInfoTaskParam : BaseParam + { + public string gathering_id; + } + + public GatheringInfo Info { get; private set; } + + public GatheringGetInfoTask() + { + base.type = ApiType.Type.GatheringGetInfo; + } + + public void SetParameter(string id) + { + GatheringGetInfoTaskParam gatheringGetInfoTaskParam = new GatheringGetInfoTaskParam(); + gatheringGetInfoTaskParam.gathering_id = id; + base.Params = gatheringGetInfoTaskParam; + } + + protected override int Parse() + { + int num = base.Parse(); + if (num != 1) + { + return num; + } + Info = new GatheringInfo(base.ResponseData["data"]); + return num; + } +} diff --git a/SVSim.BattleEngine/Engine/Wizard/GatheringGetReceiveInviteTask.cs b/SVSim.BattleEngine/Engine/Wizard/GatheringGetReceiveInviteTask.cs new file mode 100644 index 0000000..e4d50e2 --- /dev/null +++ b/SVSim.BattleEngine/Engine/Wizard/GatheringGetReceiveInviteTask.cs @@ -0,0 +1,48 @@ +using System.Collections.Generic; +using LitJson; + +namespace Wizard; + +public class GatheringGetReceiveInviteTask : BaseTask +{ + public class UserInfo + { + public GatheringUserInfo GatherintUserInfo { get; private set; } + + public string GatheringId { get; private set; } + + public string InviteId { get; private set; } + + public UserInfo(JsonData data) + { + JsonData jsonData = data["gathering"]; + InviteId = data["id"].ToString(); + GatheringId = jsonData["id"].ToString(); + GatherintUserInfo = new GatheringUserInfo(jsonData["master_user"]); + } + } + + public List InviteList { get; private set; } + + public GatheringGetReceiveInviteTask() + { + base.type = ApiType.Type.GatheringGetReceiveInvite; + } + + protected override int Parse() + { + int num = base.Parse(); + if (num != 1) + { + return num; + } + InviteList = new List(); + JsonData jsonData = base.ResponseData["data"]["invite_list"]; + for (int i = 0; i < jsonData.Count; i++) + { + InviteList.Add(new UserInfo(jsonData[i])); + } + Data.MyPageNotifications.data.IsInviteGathering = InviteList.Count > 0; + return num; + } +} diff --git a/SVSim.BattleEngine/Engine/Wizard/GatheringGetSelfInfoTask.cs b/SVSim.BattleEngine/Engine/Wizard/GatheringGetSelfInfoTask.cs new file mode 100644 index 0000000..971a3ab --- /dev/null +++ b/SVSim.BattleEngine/Engine/Wizard/GatheringGetSelfInfoTask.cs @@ -0,0 +1,50 @@ +using System.Collections.Generic; +using LitJson; + +namespace Wizard; + +public class GatheringGetSelfInfoTask : BaseTask +{ + public GatheringInfo Info { get; private set; } + + public bool HasInvite { get; private set; } + + public GatheringEntrySetting EntrySetting { get; private set; } + + public List ChatStampList { get; private set; } = new List(); + + public string _hashTags { get; private set; } + + public GatheringGetSelfInfoTask(bool isDependGatheringInfo) + { + base.type = (isDependGatheringInfo ? ApiType.Type.GatheringInfoDependJoin : ApiType.Type.GatheringSelfInfo); + } + + protected override int Parse() + { + int num = base.Parse(); + if (num != 1) + { + return num; + } + JsonData jsonData = base.ResponseData["data"]; + if (jsonData.Keys.Contains("has_invite")) + { + HasInvite = jsonData["has_invite"].ToInt() != 0; + } + if (jsonData.Count == 0 || !jsonData.Keys.Contains("gathering")) + { + Info = new GatheringInfo(); + return num; + } + Info = new GatheringInfo(jsonData); + EntrySetting = new GatheringEntrySetting(Info.Rule); + JsonData jsonData2 = jsonData["usable_stamp_list"]; + for (int i = 0; i < jsonData2.Count; i++) + { + ChatStampList.Add(jsonData2[i].ToInt()); + } + _hashTags = jsonData["hash_tag"].ToString(); + return num; + } +} diff --git a/SVSim.BattleEngine/Engine/Wizard/GatheringIDInput.cs b/SVSim.BattleEngine/Engine/Wizard/GatheringIDInput.cs new file mode 100644 index 0000000..05a44d3 --- /dev/null +++ b/SVSim.BattleEngine/Engine/Wizard/GatheringIDInput.cs @@ -0,0 +1,71 @@ +using System; +using System.Text.RegularExpressions; +using Cute; +using UnityEngine; + +namespace Wizard; + +public class GatheringIDInput : MonoBehaviour +{ + [SerializeField] + private UIButton _searchButton; + + [SerializeField] + private UIButton _pasteButton; + + [SerializeField] + private UIInputWizard _idInput; + + public Action OnGetInfo { get; set; } + + private void Start() + { + _searchButton.onClick.Add(new EventDelegate(delegate + { + OnClickSearchButton(); + })); + _idInput.onChange.Add(new EventDelegate(delegate + { + OnChangeInputId(); + })); + _pasteButton.onClick.Add(new EventDelegate(delegate + { + Paste(); + })); + UIManager.SetObjectToGrey(_searchButton.gameObject, b: true); + } + + private void OnChangeInputId() + { + UIManager.SetObjectToGrey(_searchButton.gameObject, !UIUtil.IsValidIdDigits(_idInput.value, 6)); + } + + private void OnClickSearchButton() + { + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_BTN_DECIDE); + GatheringGetInfoTask task = new GatheringGetInfoTask(); + task.SetParameter(_idInput.value); + StartCoroutine(Toolbox.NetworkManager.Connect(task, delegate + { + OnSuccessGetGatheringInfo(task); + })); + } + + private void OnSuccessGetGatheringInfo(GatheringGetInfoTask task) + { + OnGetInfo(task); + } + + private void Paste() + { + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_BTN_DECIDE); + string clipboard = ClipboardHelper.Clipboard; + clipboard = Regex.Replace(clipboard, "[0-9]", (Match match) => ((char)(match.Value[0] - 65296 + 48)).ToString()); + clipboard = Regex.Replace(clipboard, "\\s", ""); + if (UIUtil.IsValidIdDigits(clipboard, 6)) + { + _idInput.value = clipboard; + OnChangeInputId(); + } + } +} diff --git a/SVSim.BattleEngine/Engine/Wizard/GatheringInterruptTask.cs b/SVSim.BattleEngine/Engine/Wizard/GatheringInterruptTask.cs new file mode 100644 index 0000000..529a091 --- /dev/null +++ b/SVSim.BattleEngine/Engine/Wizard/GatheringInterruptTask.cs @@ -0,0 +1,9 @@ +namespace Wizard; + +public class GatheringInterruptTask : BaseTask +{ + public GatheringInterruptTask() + { + base.type = ApiType.Type.GatheringInterrupt; + } +} diff --git a/SVSim.BattleEngine/Engine/Wizard/GatheringInvite.cs b/SVSim.BattleEngine/Engine/Wizard/GatheringInvite.cs new file mode 100644 index 0000000..e4bc078 --- /dev/null +++ b/SVSim.BattleEngine/Engine/Wizard/GatheringInvite.cs @@ -0,0 +1,276 @@ +using System.Collections.Generic; +using Cute; +using UnityEngine; +using Wizard.RoomMatch; + +namespace Wizard; + +public class GatheringInvite : MonoBehaviour +{ + [SerializeField] + private UIButton _userIdSearchButton; + + [SerializeField] + private UIButton _friendInviteButton; + + [SerializeField] + private GameObject _idInputDialogPrefab; + + [SerializeField] + private GameObject _userDataDialogPrefab; + + [SerializeField] + private GameObject _friendListDialogPrefab; + + [SerializeField] + private UserListView _friendViewOriginal; + + [SerializeField] + private GameObject _inviteNoneRoot; + + [SerializeField] + private UIButton _twitterButton; + + [SerializeField] + private UILabel _twitterButtonText; + + private GatheringInviteUserListTask _inviteUserListTask; + + private GatheringJoining _parent; + + private GatheringGetSelfInfoTask _selfInfoTask; + + private const int ID_INPUT_PANEL_DEPTH = 19; + + private const int FRIEND_SELECT_PANEL_DEPTH = 30; + + private const int FRIEND_INVITE_CONFIRM_PANEL_DEPTH = 30; + + private void Start() + { + _userIdSearchButton.onClick.Add(new EventDelegate(delegate + { + OnClickUserIdSearch(); + })); + _friendInviteButton.onClick.Add(new EventDelegate(delegate + { + OnClickFriendInviteButton(); + })); + _twitterButtonText.text = Data.SystemText.Get("RoomBattle_0185"); + _twitterButton.onClick.Add(new EventDelegate(delegate + { + CopyInviteText(); + })); + } + + public void Show(GatheringJoining parent) + { + _parent = parent; + _selfInfoTask = new GatheringGetSelfInfoTask(isDependGatheringInfo: true); + StartCoroutine(Toolbox.NetworkManager.Connect(_selfInfoTask, delegate + { + if (!parent.CheckChangeStatus(_selfInfoTask.Info)) + { + GatheringInviteUserListTask inviteListTask = new GatheringInviteUserListTask(); + StartCoroutine(Toolbox.NetworkManager.Connect(inviteListTask, delegate + { + OnReceiveInviteList(inviteListTask); + })); + } + })); + } + + private void OnReceiveInviteList(GatheringInviteUserListTask task) + { + _inviteUserListTask = task; + _inviteNoneRoot.SetActive(task.InviteUserInfoList.Count == 0); + string actionButtonLabel = Data.SystemText.Get("Guild_List_0014"); + List list = new List(); + foreach (GatheringInviteUserListTask.InviteUserInfo inviteUserInfo in task.InviteUserInfoList) + { + list.Add(inviteUserInfo.userInfo); + } + UserListView.CreateView(_friendViewOriginal.gameObject, base.gameObject, list, OnClickInviteCancel, actionButtonLabel); + } + + private void OnClickInviteCancel(UserInfoBase userInfo) + { + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_BTN_DECIDE); + SystemText systemText = Data.SystemText; + UserDataDialog userDataDialog = UserDataDialog.Create(_userDataDialogPrefab, userInfo, systemText.Get("Gathering_Invite_0002")); + DialogBase dialog = userDataDialog.Dialog; + userDataDialog.SetDiscriptionLabel(systemText.Get("Guild_List_0015")); + dialog.SetButtonText(systemText.Get("Guild_List_0016")); + dialog.SetPanelDepth(30); + dialog.onPushButton1 = delegate + { + InviteCancel(userInfo as GatheringUserInfo); + }; + } + + private void InviteCancel(GatheringUserInfo userInfo) + { + GatheringInviteCancelTask gatheringInviteCancelTask = new GatheringInviteCancelTask(); + gatheringInviteCancelTask.SetParameter(_inviteUserListTask.GetInviteIdFromViewerId(userInfo.ViewerId)); + StartCoroutine(Toolbox.NetworkManager.Connect(gatheringInviteCancelTask, delegate + { + _parent.ReOpenCurrentCategory(); + })); + } + + private void OnClickFriendInviteButton() + { + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_BTN_DECIDE); + GatheringFriendListTask task = new GatheringFriendListTask(); + StartCoroutine(Toolbox.NetworkManager.Connect(task, delegate + { + OnReceiveFriendList(task); + })); + } + + private void OnReceiveFriendList(GatheringFriendListTask task) + { + if (task.InviteFriendList.Count <= 0) + { + ShowNoFriendDialog(); + return; + } + List list = new List(); + foreach (GatheringFriendListTask.InviteFriendData inviteFriend in task.InviteFriendList) + { + list.Add(inviteFriend); + } + string actionButtonLabel = Data.SystemText.Get("Guild_List_0007"); + UserListView friendList = UserListView.CreateDialog(_friendListDialogPrefab, list, OnSelectInviteFriend, actionButtonLabel); + friendList.Dialog.SetPanelDepth(30); + friendList.Dialog.SetTitleLabel(Data.SystemText.Get("Guild_List_0006")); + friendList.PanelDepth = 31; + friendList.PlateCustomize = FriendListePlateCustomize; + friendList.OnSelect = delegate(UserInfoBase userInfo) + { + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_BTN_DECIDE); + OnSelectInviteFriend(userInfo); + friendList.Dialog.Close(); + }; + } + + private void FriendListePlateCustomize(UserListViewPlate friendListPlate, UserInfoBase userInfoBase) + { + GatheringFriendListTask.InviteFriendData inviteData = userInfoBase as GatheringFriendListTask.InviteFriendData; + friendListPlate.gameObject.GetComponent().Initialize(inviteData); + } + + private void OnSelectInviteFriend(UserInfoBase userInfo) + { + SystemText systemText = Data.SystemText; + UserDataDialog userDataDialog = UserDataDialog.Create(_userDataDialogPrefab, userInfo, systemText.Get("Gathering_Invite_0002")); + DialogBase dialog = userDataDialog.Dialog; + userDataDialog.SetDiscriptionLabel(systemText.Get("Gathering_Invite_0003")); + dialog.SetButtonText(Data.SystemText.Get("Guild_List_0011")); + dialog.SetPanelDepth(30); + dialog.onPushButton1 = delegate + { + Invite(userInfo as GatheringUserInfo); + }; + } + + private void ShowNoFriendDialog() + { + DialogBase dialogBase = UIManager.GetInstance().CreateDialogClose(); + dialogBase.SetText(Data.SystemText.Get("Gathering_Invite_0005")); + dialogBase.SetButtonLayout(DialogBase.ButtonLayout.OkBtn); + dialogBase.SetSize(DialogBase.Size.S); + } + + private void OnClickUserIdSearch() + { + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_BTN_DECIDE); + GuildInputViewerIdDialog inputDialog = Object.Instantiate(_idInputDialogPrefab).GetComponent(); + DialogBase dialogBase = UIManager.GetInstance().CreateDialogClose(); + dialogBase.SetTitleLabel(Data.SystemText.Get("Guild_List_0002")); + dialogBase.SetSize(DialogBase.Size.S); + dialogBase.SetObj(inputDialog.gameObject); + dialogBase.SetPanelDepth(19); + inputDialog.InitializeDialog(dialogBase); + dialogBase.SetButtonLayout(DialogBase.ButtonLayout.BlueBtn_CancelBtn); + dialogBase.SetButtonText(Data.SystemText.Get("Guild_List_0005")); + dialogBase.onPushButton1 = delegate + { + FindViewerIdUser(inputDialog.InputValue); + }; + } + + private void FindViewerIdUser(int search_viewer_id) + { + FriendUserSearchTask friendUserSearchTask = new FriendUserSearchTask(); + friendUserSearchTask.SetParameter(search_viewer_id); + StartCoroutine(Toolbox.NetworkManager.Connect(friendUserSearchTask, delegate + { + GatheringUserInfo userInfo = new GatheringUserInfo(Data.SearchUserInfo.data.user); + SystemText systemText = Data.SystemText; + UserDataDialog userDataDialog = UserDataDialog.Create(_userDataDialogPrefab, userInfo, systemText.Get("Gathering_Invite_0002")); + DialogBase dialog = userDataDialog.Dialog; + userDataDialog.SetDiscriptionLabel(systemText.Get("Gathering_Invite_0003")); + dialog.SetButtonText(Data.SystemText.Get("Guild_List_0011")); + dialog.onPushButton1 = delegate + { + Invite(userInfo); + }; + })); + } + + private void Invite(GatheringUserInfo user) + { + GatheringInviteTask gatheringInviteTask = new GatheringInviteTask(); + gatheringInviteTask.SetParameter(user.ViewerId.ToString()); + StartCoroutine(Toolbox.NetworkManager.Connect(gatheringInviteTask, delegate + { + OnSuccessInvite(); + })); + } + + private void OnSuccessInvite() + { + UIManager.GetInstance().CreateConfirmationDialog(Data.SystemText.Get("Gathering_Invite_0004")).OnClose = delegate + { + _parent.ReOpenCurrentCategory(); + }; + } + + private void CopyInviteText() + { + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_BTN_DECIDE); + CreateDialog(Data.SystemText.Get("RoomBattle_0186"), Data.SystemText.Get("Gathering_0044")); + NativePluginWrapper.SetStringToClipboard(GetTweetText()); + } + + private string GetTweetText() + { + string hashTags = _selfInfoTask._hashTags; + GatheringInfo info = _selfInfoTask.Info; + string gatheringTypeString = GatheringUtility.GetGatheringTypeString(info); + string text = GetFormatTexForHashTag(info.Rule.BattleParameterInstance.DeckFormat) + "/" + RoomRuleSetting.GetWinTypeString(info.Rule.BattleParameterInstance.Rule); + return Data.SystemText.Get("Gathering_0043", hashTags, info.Id, gatheringTypeString, text, info.BattleStartTimeShort); + } + + private string GetFormatTexForHashTag(Format deckFormat) + { + return deckFormat switch + { + Format.Hof => Data.SystemText.Get("RoomBattle_0188"), + Format.Windfall => Data.SystemText.Get("RoomBattle_0193"), + Format.Crossover => Data.SystemText.Get("RoomBattle_0194"), + Format.MyRotation => Data.SystemText.Get("RoomBattle_0205"), + Format.Avatar => Data.SystemText.Get("RoomBattle_0208"), + _ => FormatBehaviorManager.GetFormatName(deckFormat), + }; + } + + private void CreateDialog(string title, string msg) + { + DialogBase dialogBase = UIManager.GetInstance().CreateDialogClose(); + dialogBase.SetTitleLabel(title); + dialogBase.SetText(msg); + dialogBase.SetButtonLayout(DialogBase.ButtonLayout.OkBtn); + } +} diff --git a/SVSim.BattleEngine/Engine/Wizard/GatheringInviteUserListTask.cs b/SVSim.BattleEngine/Engine/Wizard/GatheringInviteUserListTask.cs new file mode 100644 index 0000000..e9cf8ea --- /dev/null +++ b/SVSim.BattleEngine/Engine/Wizard/GatheringInviteUserListTask.cs @@ -0,0 +1,68 @@ +using System.Collections.Generic; +using LitJson; + +namespace Wizard; + +public class GatheringInviteUserListTask : BaseTask +{ + public class InviteUserInfo + { + public string InviteId { get; private set; } + + public GatheringUserInfo userInfo { get; private set; } + + public InviteUserInfo(JsonData json) + { + InviteId = json["id"].ToString(); + userInfo = new GatheringUserInfo(json["user_info"]); + } + } + + public class GatheringInviteUserListTaskParam : BaseParam + { + public int page; + + public int oldest_time; + } + + private Dictionary _inviteIdDictionary; + + public List InviteUserInfoList { get; private set; } + + public GatheringInviteUserListTask() + { + base.type = ApiType.Type.GatheringInviteUserList; + } + + public void SetParameter() + { + GatheringInviteUserListTaskParam gatheringInviteUserListTaskParam = new GatheringInviteUserListTaskParam(); + gatheringInviteUserListTaskParam.page = 0; + gatheringInviteUserListTaskParam.oldest_time = 0; + base.Params = gatheringInviteUserListTaskParam; + } + + protected override int Parse() + { + int num = base.Parse(); + if (num != 1) + { + return num; + } + _inviteIdDictionary = new Dictionary(); + InviteUserInfoList = new List(); + JsonData jsonData = base.ResponseData["data"]["invite_list"]; + for (int i = 0; i < jsonData.Count; i++) + { + InviteUserInfo inviteUserInfo = new InviteUserInfo(jsonData[i]); + InviteUserInfoList.Add(inviteUserInfo); + _inviteIdDictionary[inviteUserInfo.userInfo.ViewerId] = inviteUserInfo.InviteId; + } + return num; + } + + public string GetInviteIdFromViewerId(int viewerId) + { + return _inviteIdDictionary[viewerId]; + } +} diff --git a/SVSim.BattleEngine/Engine/Wizard/GatheringJoining.cs b/SVSim.BattleEngine/Engine/Wizard/GatheringJoining.cs new file mode 100644 index 0000000..0713acc --- /dev/null +++ b/SVSim.BattleEngine/Engine/Wizard/GatheringJoining.cs @@ -0,0 +1,148 @@ +using UnityEngine; + +namespace Wizard; + +public class GatheringJoining : MonoBehaviour +{ + [SerializeField] + private GameObject _categorySelectPrefab; + + [SerializeField] + private GameObject _chatPrefab; + + [SerializeField] + private GameObject _infoPrefab; + + [SerializeField] + private GameObject _memberListPrefab; + + [SerializeField] + private GameObject _rankingPrefab; + + [SerializeField] + private GameObject _invitePrefab; + + [SerializeField] + private GameObject _tournamentPrefab; + + private GatheringChat _chat; + + private GatheringJoiningCategorySelect _categorySelect; + + private GatheringMemberList _memberList; + + private GatheringInvite _invite; + + private GatheringRanking _ranking; + + private GatheringTournament _tournament; + + private GatheringJoiningInfo _info; + + private GatheringJoiningCategorySelect.Category _currentCategory; + + private GatheringInfo _gatheringInfo; + + public void InitializeUI() + { + _categorySelect = NGUITools.AddChild(base.gameObject, _categorySelectPrefab).GetComponent(); + _categorySelect.OnSelect = OnSelectCategory; + _info = NGUITools.AddChild(base.gameObject, _infoPrefab).GetComponent(); + _memberList = NGUITools.AddChild(base.gameObject, _memberListPrefab).GetComponent(); + } + + public void Initialize() + { + OnSelectCategory(GatheringJoiningCategorySelect.Category.CHAT); + } + + public void OnReceiveSelfInfo(GatheringInfo info) + { + _gatheringInfo = info; + _categorySelect.OnReceiveSelfInfo(info); + } + + public bool CheckChangeStatus(GatheringInfo currentInfo) + { + if (_gatheringInfo.State == currentInfo.State) + { + return false; + } + SystemText systemText = Data.SystemText; + DialogBase dialogBase = null; + dialogBase = ((currentInfo.State != GatheringInfo.eState.ACTIVE_BATTLE) ? UIManager.GetInstance().CreateConfirmationDialog(systemText.Get("Gathering_Chat_0010")) : UIManager.GetInstance().CreateConfirmationDialog(systemText.Get("Gathering_Chat_0009"))); + dialogBase.OnClose = delegate + { + UIManager.ChangeViewSceneParam param = new UIManager.ChangeViewSceneParam + { + MyPageMenuIndex = 3, + OnFinishChangeView = delegate + { + MyPageMenu.Instance.GoToGatheringActionMenu(); + } + }; + UIManager.GetInstance().ChangeViewScene(UIManager.ViewScene.MyPage, param); + }; + dialogBase.SetPanelDepth(4000); + return true; + } + + private void OnSelectCategory(GatheringJoiningCategorySelect.Category category) + { + _currentCategory = category; + if (_chat != null) + { + _chat.ReadyCloseCategory(); + _chat.CloseCategory(); + Object.Destroy(_chat.gameObject); + } + if (_memberList != null) + { + Object.Destroy(_memberList.gameObject); + } + if (_invite != null) + { + Object.Destroy(_invite.gameObject); + } + if (_ranking != null) + { + Object.Destroy(_ranking.gameObject); + } + if (_tournament != null) + { + Object.Destroy(_tournament.gameObject); + } + _info.gameObject.SetActive(category == GatheringJoiningCategorySelect.Category.INFO); + switch (category) + { + case GatheringJoiningCategorySelect.Category.CHAT: + _chat = NGUITools.AddChild(base.gameObject, _chatPrefab).GetComponent(); + _chat.OpenCategory(); + break; + case GatheringJoiningCategorySelect.Category.INFO: + _info.Show(this); + break; + case GatheringJoiningCategorySelect.Category.MEMBER_LIST: + _memberList = NGUITools.AddChild(base.gameObject, _memberListPrefab).GetComponent(); + _memberList.Show(this); + break; + case GatheringJoiningCategorySelect.Category.INVITE: + _invite = NGUITools.AddChild(base.gameObject, _invitePrefab).GetComponent(); + _invite.Show(this); + break; + case GatheringJoiningCategorySelect.Category.RANKING: + _ranking = NGUITools.AddChild(base.gameObject, _rankingPrefab).GetComponent(); + _ranking.Show(_gatheringInfo, this); + break; + case GatheringJoiningCategorySelect.Category.TOURNAMENT: + _tournament = NGUITools.AddChild(base.gameObject, _tournamentPrefab).GetComponent(); + _tournament.Show(_gatheringInfo, this); + break; + } + } + + public void ReOpenCurrentCategory() + { + OnSelectCategory(_currentCategory); + } +} diff --git a/SVSim.BattleEngine/Engine/Wizard/GatheringJoiningCategorySelect.cs b/SVSim.BattleEngine/Engine/Wizard/GatheringJoiningCategorySelect.cs new file mode 100644 index 0000000..71ccd8b --- /dev/null +++ b/SVSim.BattleEngine/Engine/Wizard/GatheringJoiningCategorySelect.cs @@ -0,0 +1,143 @@ +using System; +using Cute; +using UnityEngine; + +namespace Wizard; + +public class GatheringJoiningCategorySelect : MonoBehaviour +{ + public enum Category + { + CHAT, + INFO, + MEMBER_LIST, + INVITE, + RANKING, + TOURNAMENT + } + + [SerializeField] + private UIButton _chatButton; + + [SerializeField] + private UIButton _infoButton; + + [SerializeField] + private UIButton _memberListButton; + + [SerializeField] + private UIButton _inviteButton; + + [SerializeField] + private UIButton _rankingButton; + + [SerializeField] + private GameObject _selectCursor; + + [SerializeField] + private UISprite _bottomSprite; + + [SerializeField] + private GameObject _bgSpriteInvite; + + [SerializeField] + private GameObject _bgSpriteMemberList; + + [SerializeField] + private GameObject _bgSpriteRanking; + + [SerializeField] + private UILabel[] _categoryLabel; + + [SerializeField] + private UIGrid _grid; + + public Action OnSelect; + + private bool _isTournament; + + private void Start() + { + _categoryLabel[0].color = LabelDefine.TEXT_COLOR_NORMAL; + SetCursor(_chatButton); + _chatButton.onClick.Add(new EventDelegate(delegate + { + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_BTN_DECIDE); + SetCursor(_chatButton); + OnSelectCategory(Category.CHAT); + })); + _infoButton.onClick.Add(new EventDelegate(delegate + { + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_BTN_DECIDE); + SetCursor(_infoButton); + OnSelectCategory(Category.INFO); + })); + _memberListButton.onClick.Add(new EventDelegate(delegate + { + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_BTN_DECIDE); + SetCursor(_memberListButton); + OnSelectCategory(Category.MEMBER_LIST); + })); + _inviteButton.onClick.Add(new EventDelegate(delegate + { + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_BTN_DECIDE); + SetCursor(_inviteButton); + OnSelectCategory(Category.INVITE); + })); + _rankingButton.onClick.Add(new EventDelegate(delegate + { + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_BTN_DECIDE); + SetCursor(_rankingButton); + Category category = (_isTournament ? Category.TOURNAMENT : Category.RANKING); + OnSelectCategory(category); + })); + } + + private void OnSelectCategory(Category category) + { + int num = (int)((category == Category.TOURNAMENT) ? Category.RANKING : category); + for (int i = 0; i < _categoryLabel.Length; i++) + { + if (i == num) + { + _categoryLabel[i].color = LabelDefine.TEXT_COLOR_NORMAL; + } + else + { + _categoryLabel[i].color = LabelDefine.TEXT_COLOR_B0B0B0; + } + } + OnSelect.Call(category); + } + + private void SetCursor(UIButton parent) + { + _selectCursor.transform.parent = parent.transform; + _selectCursor.transform.localPosition = Vector3.zero; + } + + public void OnReceiveSelfInfo(GatheringInfo info) + { + if (info.State == GatheringInfo.eState.BEFORE_BATTLE) + { + _inviteButton.gameObject.SetActive(info.Role == GatheringRule.eRole.OWNER); + _rankingButton.gameObject.SetActive(value: false); + } + else + { + _inviteButton.gameObject.SetActive(value: false); + _rankingButton.gameObject.SetActive(value: true); + } + _grid.Reposition(); + GameObject gameObject = null; + gameObject = ((info.Role != GatheringRule.eRole.OWNER) ? ((info.State == GatheringInfo.eState.BEFORE_BATTLE) ? _bgSpriteMemberList : _bgSpriteRanking) : ((info.State == GatheringInfo.eState.BEFORE_BATTLE) ? _bgSpriteInvite : _bgSpriteRanking)); + _bottomSprite.topAnchor.target = gameObject.transform; + _bottomSprite.bottomAnchor.target = gameObject.transform; + _bottomSprite.ResetAnchors(); + _bottomSprite.UpdateAnchors(); + if (info.Rule != null) + { + _isTournament = info.Rule.Type == GatheringRule.eType.TOURNAMENT; + } + } +} diff --git a/SVSim.BattleEngine/Engine/Wizard/GatheringJoiningInfo.cs b/SVSim.BattleEngine/Engine/Wizard/GatheringJoiningInfo.cs new file mode 100644 index 0000000..7068d53 --- /dev/null +++ b/SVSim.BattleEngine/Engine/Wizard/GatheringJoiningInfo.cs @@ -0,0 +1,134 @@ +using Cute; +using UnityEngine; + +namespace Wizard; + +public class GatheringJoiningInfo : MonoBehaviour +{ + [SerializeField] + private GatheringRuleView _ruleView; + + [SerializeField] + private GatheringRuleView _eliminationRuleView; + + [SerializeField] + private GameObject _root; + + [SerializeField] + private UILabel _boardText; + + [SerializeField] + private UIButton _editBoardButton; + + [SerializeField] + private GameObject _editBoardInputDialogPrefab; + + [SerializeField] + private UIButton _idCopyButton; + + [SerializeField] + private UIButton _settingButton; + + [SerializeField] + private GameObject _gatheringSettingDialogPrefab; + + private GatheringGetSelfInfoTask _infoTask; + + private GatheringJoining _parent; + + private void Start() + { + _editBoardButton.onClick.Add(new EventDelegate(delegate + { + OnClickEditBoardButton(); + })); + _idCopyButton.onClick.Add(new EventDelegate(delegate + { + OnClickIdCopyButton(); + })); + _settingButton.onClick.Add(new EventDelegate(delegate + { + OnClickSettingButton(); + })); + } + + public void Show(GatheringJoining parent) + { + _parent = parent; + _root.SetActive(value: false); + GatheringGetSelfInfoTask task = new GatheringGetSelfInfoTask(isDependGatheringInfo: true); + UIManager.GetInstance().StartCoroutine(Toolbox.NetworkManager.Connect(task, delegate + { + OnReceiveInfo(task); + })); + } + + private void OnReceiveInfo(GatheringGetSelfInfoTask task) + { + _parent.CheckChangeStatus(task.Info); + _infoTask = task; + bool isTournament = _infoTask.Info.Rule.IsTournament; + _ruleView.gameObject.SetActive(!isTournament); + _eliminationRuleView.gameObject.SetActive(isTournament); + if (isTournament) + { + _eliminationRuleView.SetGatheringInfo(task.Info); + } + else + { + _ruleView.SetGatheringInfo(task.Info); + } + _root.SetActive(value: true); + _boardText.text = task.Info.Description; + bool active = task.Info.Role == GatheringRule.eRole.OWNER; + _editBoardButton.gameObject.SetActive(active); + _settingButton.gameObject.SetActive(active); + } + + private void OnClickEditBoardButton() + { + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_BTN_DECIDE); + GuildInputDescriptionDialog input = Object.Instantiate(_editBoardInputDialogPrefab).GetComponent(); + DialogBase dialogBase = UIManager.GetInstance().CreateDialogClose(); + dialogBase.SetSize(DialogBase.Size.S); + dialogBase.SetTitleLabel(Data.SystemText.Get("Guild_Profile_0007")); + dialogBase.SetButtonLayout(DialogBase.ButtonLayout.DecisionBtn); + dialogBase.SetObj(input.gameObject); + input.InputValue = _infoTask.Info.Description; + dialogBase.onPushButton1 = delegate + { + UpdateBoardText(input.InputValue); + }; + } + + private void UpdateBoardText(string text) + { + GatheringUpdateDescriptionTask gatheringUpdateDescriptionTask = new GatheringUpdateDescriptionTask(); + gatheringUpdateDescriptionTask.SetParameter(text); + StartCoroutine(Toolbox.NetworkManager.Connect(gatheringUpdateDescriptionTask, delegate + { + DialogBase dialogBase = UIManager.GetInstance().CreateConfirmationDialog(Data.SystemText.Get("Guild_Profile_0010")); + dialogBase.onPushButton1 = delegate + { + _parent.ReOpenCurrentCategory(); + }; + dialogBase.onCloseWithoutSelect = delegate + { + _parent.ReOpenCurrentCategory(); + }; + })); + } + + private void OnClickIdCopyButton() + { + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_BTN_DECIDE); + NativePluginWrapper.SetStringToClipboard(_infoTask.Info.Id); + UIManager.GetInstance().CreateConfirmationDialog(Data.SystemText.Get("Gathering_Information_0011")); + } + + private void OnClickSettingButton() + { + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_BTN_DECIDE); + GatheringSettingDialog.Create(_gatheringSettingDialogPrefab, _infoTask.Info); + } +} diff --git a/SVSim.BattleEngine/Engine/Wizard/GatheringLeaveTask.cs b/SVSim.BattleEngine/Engine/Wizard/GatheringLeaveTask.cs new file mode 100644 index 0000000..e295ba0 --- /dev/null +++ b/SVSim.BattleEngine/Engine/Wizard/GatheringLeaveTask.cs @@ -0,0 +1,9 @@ +namespace Wizard; + +public class GatheringLeaveTask : BaseTask +{ + public GatheringLeaveTask() + { + base.type = ApiType.Type.GatheringLeave; + } +} diff --git a/SVSim.BattleEngine/Engine/Wizard/GatheringMemberList.cs b/SVSim.BattleEngine/Engine/Wizard/GatheringMemberList.cs new file mode 100644 index 0000000..79e4e8e --- /dev/null +++ b/SVSim.BattleEngine/Engine/Wizard/GatheringMemberList.cs @@ -0,0 +1,204 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using System.Linq; +using Cute; +using UnityEngine; + +namespace Wizard; + +public class GatheringMemberList : MonoBehaviour +{ + private List _loadedResourceList = new List(); + + [SerializeField] + private SimpleScrollViewUI _memberListScrollView; + + [SerializeField] + private GameObject _userDataDialog; + + [SerializeField] + private GameObject _kickConfirmPrefab; + + [SerializeField] + private UILabel _memberCount; + + [SerializeField] + private GameObject _memberNoneObject; + + private GatheringJoining _parent; + + private GatheringGetSelfInfoTask _task; + + public void Show(GatheringJoining parent) + { + _parent = parent; + GatheringGetSelfInfoTask task = new GatheringGetSelfInfoTask(isDependGatheringInfo: true); + _memberCount.gameObject.SetActive(value: false); + _memberNoneObject.SetActive(value: false); + UIManager.GetInstance().StartCoroutine(Toolbox.NetworkManager.Connect(task, delegate + { + _memberCount.gameObject.SetActive(value: true); + OnReceiveInfo(task); + })); + } + + public void OnDestroy() + { + if (_loadedResourceList.Count > 0) + { + Toolbox.ResourcesManager.RemoveAssetGroup(_loadedResourceList); + _loadedResourceList.Clear(); + } + } + + private void OnReceiveInfo(GatheringGetSelfInfoTask task) + { + _parent.CheckChangeStatus(task.Info); + _task = task; + UpdateMemberList(task); + GatheringInfo info = task.Info; + _memberCount.text = Data.SystemText.Get("Guild_0005", info.CurrentMemberCount.ToString(), info.Rule.MaxMember.ToString()); + _memberNoneObject.SetActive(info.CurrentMemberCount == 0); + } + + private void UpdateMemberList(GatheringGetSelfInfoTask task) + { + UIManager.GetInstance().createInSceneCenterLoading(); + StartCoroutine(LoadImages(task, delegate + { + _memberListScrollView.CreateScrollView(task.Info.MemberList.Count, InitializePlate); + UIManager.GetInstance().closeInSceneCenterLoading(); + })); + } + + private IEnumerator LoadImages(GatheringGetSelfInfoTask task, Action callBack = null) + { + List memberList = task.Info.MemberList; + List list = new List(); + for (int i = 0; i < memberList.Count; i++) + { + GatheringUserInfo gatheringUserInfo = memberList[i]; + list.AddRange(gatheringUserInfo.GetUserAssetPathList()); + } + List loadPathList = list.Distinct().Except(_loadedResourceList).ToList(); + if (loadPathList.Count > 0) + { + yield return StartCoroutine(Toolbox.ResourcesManager.LoadAssetGroupAsync(loadPathList, null)); + _loadedResourceList.AddRange(loadPathList); + } + callBack.Call(); + } + + private void InitializePlate(int index, GameObject plate) + { + GatheringMemberPlate component = plate.GetComponent(); + component.Initialize(_task.Info, _task.Info.MemberList[index]); + component.OnClickFriendRequest = OnClickFriendRequest; + component.OnClickKick = OnClickKickButton; + component.OnClickDropOut = OnClickDropOutButton; + } + + private DialogBase CreateMemberActionDialog(GatheringUserInfo member, string title, string discription, string decideText, Action onDecide) + { + GuildUserDataDialog component = UnityEngine.Object.Instantiate(_userDataDialog).GetComponent(); + DialogBase dialogBase = UIManager.GetInstance().CreateDialogClose(); + dialogBase.SetSize(DialogBase.Size.S); + dialogBase.SetButtonLayout(DialogBase.ButtonLayout.BlueBtn_CancelBtn); + dialogBase.SetTitleLabel(title); + dialogBase.SetObj(component.gameObject); + component.SetUserData(member); + component.SetDiscriptionLabel(discription); + dialogBase.SetButtonText(decideText); + dialogBase.onPushButton1 = delegate + { + onDecide(); + }; + return dialogBase; + } + + private void OnClickFriendRequest(GatheringUserInfo member) + { + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_BTN_DECIDE); + Action onDecide = delegate + { + ApplyFriend(member.ViewerId); + }; + SystemText systemText = Data.SystemText; + string title = systemText.Get("Guild_Profile_0014"); + string discription = systemText.Get("Guild_Profile_0015"); + string decideText = systemText.Get("OtherFriend_0032"); + CreateMemberActionDialog(member, title, discription, decideText, onDecide); + } + + private void OnClickKickButton(GatheringUserInfo member) + { + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_BTN_DECIDE); + Action onKickDecide = delegate(bool kickEternal) + { + Kick(member, kickEternal); + }; + GatheringKickConfirm.Create(_kickConfirmPrefab, member, onKickDecide); + } + + private void Kick(GatheringUserInfo member, bool kickEternal) + { + GatheringKickTask gatheringKickTask = new GatheringKickTask(); + gatheringKickTask.SetParameter(member.ViewerId.ToString(), kickEternal); + StartCoroutine(Toolbox.NetworkManager.Connect(gatheringKickTask, delegate + { + OnKickSuccess(); + })); + } + + private void OnKickSuccess() + { + UIManager.GetInstance().CreateConfirmationDialog(Data.SystemText.Get("Gathering_Member_0006")).OnCloseStart = delegate + { + _parent.ReOpenCurrentCategory(); + }; + } + + private void OnClickDropOutButton() + { + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_BTN_DECIDE); + SystemText systemText = Data.SystemText; + string titleLabel = systemText.Get("Gathering_Member_0011"); + string message = systemText.Get("Gathering_Member_0008"); + string text_btn = systemText.Get("Gathering_Member_0009"); + DialogBase dialogBase = UIManager.GetInstance().CreateConfirmationDialog(message); + dialogBase.SetButtonLayout(DialogBase.ButtonLayout.RedBtn_CancelBtn); + dialogBase.SetButtonText(text_btn); + dialogBase.SetTitleLabel(titleLabel); + dialogBase.onPushButton1 = delegate + { + DropOut(); + }; + } + + private void DropOut() + { + GatheringLeaveTask task = new GatheringLeaveTask(); + StartCoroutine(Toolbox.NetworkManager.Connect(task, delegate + { + string message = Data.SystemText.Get("Gathering_Member_0010"); + UIManager.GetInstance().CreateConfirmationDialog(message).OnCloseStart = delegate + { + Gathering.BackToMyPageForDrop(); + }; + })); + } + + private void ApplyFriend(int viewerId) + { + FriendApplySendTask friendApplySendTask = new FriendApplySendTask(); + friendApplySendTask.SetParameter(viewerId); + StartCoroutine(Toolbox.NetworkManager.Connect(friendApplySendTask, OnSuccessApplyFriend)); + } + + private void OnSuccessApplyFriend(NetworkTask.ResultCode code) + { + UIManager.GetInstance().CreateConfirmationDialog(Data.SystemText.Get("Guild_Profile_0016")); + _parent.ReOpenCurrentCategory(); + } +} diff --git a/SVSim.BattleEngine/Engine/Wizard/GatheringRanking.cs b/SVSim.BattleEngine/Engine/Wizard/GatheringRanking.cs new file mode 100644 index 0000000..9c5a3b9 --- /dev/null +++ b/SVSim.BattleEngine/Engine/Wizard/GatheringRanking.cs @@ -0,0 +1,100 @@ +using System.Collections; +using System.Collections.Generic; +using System.Linq; +using Cute; +using UnityEngine; +using Wizard.RoomMatch; + +namespace Wizard; + +public class GatheringRanking : MonoBehaviour +{ + [SerializeField] + private GameObject _rankingPlateOriginal; + + [SerializeField] + private UIGrid _grid; + + [SerializeField] + private UIScrollView _scrollView; + + [SerializeField] + private GameObject _rootObject; + + [SerializeField] + private UILabel _ruleLabel; + + [SerializeField] + private UILabel _timeLabel; + + private List _loadedResourceList = new List(); + + private void Start() + { + _rankingPlateOriginal.SetActive(value: false); + UIManager.GetInstance().AttachAtlas(base.gameObject); + } + + public void Show(GatheringInfo info, GatheringJoining parent) + { + GatheringRule rule = info.Rule; + _rootObject.SetActive(value: false); + GatheringGetSelfInfoTask selfInfoTask = new GatheringGetSelfInfoTask(isDependGatheringInfo: true); + StartCoroutine(Toolbox.NetworkManager.Connect(selfInfoTask, delegate + { + if (!parent.CheckChangeStatus(selfInfoTask.Info)) + { + GatheringRankingTask task = new GatheringRankingTask(); + UIManager.GetInstance().StartCoroutine(Toolbox.NetworkManager.Connect(task, delegate + { + _rootObject.SetActive(value: true); + StartCoroutine(InitRanking(task)); + })); + } + _timeLabel.text = Data.SystemText.Get("Gathering_Information_0014", info.BattleStartTime, info.FinishTime); + _ruleLabel.text = RoomRuleSetting.GetWinTypeString(rule.BattleParameterInstance.Rule) + " " + FormatBehaviorManager.GetFormatName(rule.BattleParameterInstance.DeckFormat); + })); + } + + public void OnDestroy() + { + if (_loadedResourceList.Count > 0) + { + Toolbox.ResourcesManager.RemoveAssetGroup(_loadedResourceList); + _loadedResourceList.Clear(); + } + } + + private IEnumerator LoadImages(GatheringRankingTask task) + { + List list = new List(); + foreach (GatheringRankingTask.RankingUserInfo ranking in task.RankingList) + { + list.Add(ranking.gatheringUserInfo); + } + List list2 = new List(); + for (int i = 0; i < list.Count; i++) + { + list2.AddRange(list[i].GetUserAssetPathList()); + } + List loadPathList = list2.Distinct().Except(_loadedResourceList).ToList(); + if (loadPathList.Count > 0) + { + yield return StartCoroutine(Toolbox.ResourcesManager.LoadAssetGroupAsync(loadPathList, null)); + _loadedResourceList.AddRange(loadPathList); + } + } + + private IEnumerator InitRanking(GatheringRankingTask task) + { + yield return LoadImages(task); + foreach (GatheringRankingTask.RankingUserInfo ranking in task.RankingList) + { + GatheringRankingPlate component = NGUITools.AddChild(_grid.gameObject, _rankingPlateOriginal).GetComponent(); + component.gameObject.SetActive(value: true); + component.Initialize(ranking); + } + _grid.Reposition(); + _scrollView.ResetPosition(); + } +} diff --git a/SVSim.BattleEngine/Engine/Wizard/GatheringRankingTask.cs b/SVSim.BattleEngine/Engine/Wizard/GatheringRankingTask.cs new file mode 100644 index 0000000..f5890b1 --- /dev/null +++ b/SVSim.BattleEngine/Engine/Wizard/GatheringRankingTask.cs @@ -0,0 +1,47 @@ +using System.Collections.Generic; +using LitJson; + +namespace Wizard; + +public class GatheringRankingTask : BaseTask +{ + public class RankingUserInfo + { + public GatheringUserInfo gatheringUserInfo { get; private set; } + + public int Order { get; private set; } + + public int WinCount { get; private set; } + + public RankingUserInfo(JsonData data) + { + gatheringUserInfo = new GatheringUserInfo(data["user"]); + Order = data["rank"].ToInt(); + WinCount = data["score"].ToInt(); + } + } + + public List RankingList { get; private set; } + + public GatheringRankingTask() + { + base.type = ApiType.Type.GatheringRanking; + } + + protected override int Parse() + { + int num = base.Parse(); + if (num != 1) + { + return num; + } + JsonData jsonData = base.ResponseData["data"]["ranking"]; + RankingList = new List(); + for (int i = 0; i < jsonData.Count; i++) + { + RankingUserInfo item = new RankingUserInfo(jsonData[i]); + RankingList.Add(item); + } + return num; + } +} diff --git a/SVSim.BattleEngine/Engine/Wizard/GatheringReceiveInviteList.cs b/SVSim.BattleEngine/Engine/Wizard/GatheringReceiveInviteList.cs new file mode 100644 index 0000000..7e71f52 --- /dev/null +++ b/SVSim.BattleEngine/Engine/Wizard/GatheringReceiveInviteList.cs @@ -0,0 +1,126 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using System.Linq; +using Cute; +using UnityEngine; + +namespace Wizard; + +public class GatheringReceiveInviteList : MonoBehaviour +{ + [SerializeField] + private SimpleScrollViewUI _inviteListScrollView; + + [SerializeField] + private GameObject _infoDialogPrefab; + + [SerializeField] + private GameObject _inviteNoneRoot; + + private List _loadedResourceList = new List(); + + private GatheringGetReceiveInviteTask _receiveInviteTask; + + private GatheringEntry _parent; + + public void Show(GatheringEntry parent) + { + _parent = parent; + _receiveInviteTask = new GatheringGetReceiveInviteTask(); + StartCoroutine(Toolbox.NetworkManager.Connect(_receiveInviteTask, delegate + { + OnReceiveInfo(_receiveInviteTask); + })); + } + + public void OnDestroy() + { + if (_loadedResourceList.Count > 0) + { + Toolbox.ResourcesManager.RemoveAssetGroup(_loadedResourceList); + _loadedResourceList.Clear(); + } + } + + private void OnReceiveInfo(GatheringGetReceiveInviteTask task) + { + _parent.UpdateInviteBadge(task); + _inviteNoneRoot.SetActive(task.InviteList.Count == 0); + UIManager.GetInstance()._Footer.UpdateArenaBadgeIcon(); + UpdateInviteList(task); + } + + private void InitializePlate(int index, GameObject plate) + { + UserListViewPlate component = plate.GetComponent(); + component.Initialize(_receiveInviteTask.InviteList[index].GatherintUserInfo, Data.SystemText.Get("Gathering_Menu_0002")); + component.OnAction = delegate + { + OnClickInviteGatheringInfoButton(_receiveInviteTask.InviteList[index]); + }; + } + + private void UpdateInviteList(GatheringGetReceiveInviteTask task) + { + UIManager.GetInstance().createInSceneCenterLoading(); + StartCoroutine(LoadImages(task, delegate + { + _inviteListScrollView.CreateScrollView(task.InviteList.Count, InitializePlate); + UIManager.GetInstance().closeInSceneCenterLoading(); + })); + } + + private IEnumerator LoadImages(GatheringGetReceiveInviteTask task, Action callBack = null) + { + List inviteList = task.InviteList; + List list = new List(); + for (int i = 0; i < inviteList.Count; i++) + { + GatheringUserInfo gatherintUserInfo = inviteList[i].GatherintUserInfo; + list.AddRange(gatherintUserInfo.GetUserAssetPathList()); + } + List loadPathList = list.Distinct().Except(_loadedResourceList).ToList(); + if (loadPathList.Count > 0) + { + yield return StartCoroutine(Toolbox.ResourcesManager.LoadAssetGroupAsync(loadPathList, null)); + _loadedResourceList.AddRange(loadPathList); + } + callBack.Call(); + } + + private void OnClickInviteGatheringInfoButton(GatheringGetReceiveInviteTask.UserInfo userInfo) + { + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_BTN_DECIDE); + Action onReject = delegate + { + OnClickRejectInvite(userInfo); + }; + GatheringReceiveInfoDialog.Create(_infoDialogPrefab, userInfo.GatheringId, onReject); + } + + private void OnClickRejectInvite(GatheringGetReceiveInviteTask.UserInfo userInfo) + { + DialogBase dialogBase = UIManager.GetInstance().CreateConfirmationDialog(Data.SystemText.Get("Gathering_Join_0005")); + dialogBase.SetButtonLayout(DialogBase.ButtonLayout.RedBtn_CancelBtn); + dialogBase.SetTitleLabel(Data.SystemText.Get("Gathering_Menu_0004")); + dialogBase.SetButtonText(Data.SystemText.Get("Gathering_Join_0004")); + dialogBase.onPushButton1 = delegate + { + InviteReject(userInfo); + }; + } + + private void InviteReject(GatheringGetReceiveInviteTask.UserInfo userInfo) + { + GatheringInviteRejectTask gatheringInviteRejectTask = new GatheringInviteRejectTask(); + gatheringInviteRejectTask.SetParameter(userInfo.InviteId); + StartCoroutine(Toolbox.NetworkManager.Connect(gatheringInviteRejectTask, delegate + { + UIManager.GetInstance().CreateConfirmationDialog(Data.SystemText.Get("Gathering_Join_0006")).OnClose = delegate + { + _parent.ReOpenInvite(); + }; + })); + } +} diff --git a/SVSim.BattleEngine/Engine/Wizard/GatheringRoomEnterVacancyRoomTask.cs b/SVSim.BattleEngine/Engine/Wizard/GatheringRoomEnterVacancyRoomTask.cs new file mode 100644 index 0000000..de4cae2 --- /dev/null +++ b/SVSim.BattleEngine/Engine/Wizard/GatheringRoomEnterVacancyRoomTask.cs @@ -0,0 +1,39 @@ +using Cute; + +namespace Wizard; + +public class GatheringRoomEnterVacancyRoomTask : BaseRoomBattleEnterRoomTask +{ + private GatheringInfo _gatheringInfo; + + public GatheringAutoJoinTaskInfo GatheringAutoJoinTaskInfo { get; private set; } + + public GatheringRoomEnterVacancyRoomTask(GatheringInfo gatheringInfo) + { + _gatheringInfo = gatheringInfo; + base.type = ApiType.Type.GatheringRoomEnterVacancyRoom; + } + + protected override int Parse() + { + if (base.ResponseData.TryGetValue("data", out var value) && value.IsObject && value.TryGetValue("is_owner", out var value2) && value2.ToInt() != 0 && value.Keys.Contains("result_reason")) + { + value["result_reason"] = "-1"; + } + int num = base.Parse(); + if (num != 1) + { + return num; + } + GatheringAutoJoinTaskInfo = new GatheringAutoJoinTaskInfo(base.ResponseData, this, _gatheringInfo); + if (GatheringAutoJoinTaskInfo.NeedsRetry) + { + return num; + } + if (GatheringAutoJoinTaskInfo.IsOwner) + { + CustomPreference.SetNodeServerURL(value["node_server_url"].ToString()); + } + return num; + } +} diff --git a/SVSim.BattleEngine/Engine/Wizard/GatheringRuleView.cs b/SVSim.BattleEngine/Engine/Wizard/GatheringRuleView.cs new file mode 100644 index 0000000..c385b0c --- /dev/null +++ b/SVSim.BattleEngine/Engine/Wizard/GatheringRuleView.cs @@ -0,0 +1,150 @@ +using System.Collections; +using System.Collections.Generic; +using System.Linq; +using Cute; +using UnityEngine; +using Wizard.RoomMatch; + +namespace Wizard; + +public class GatheringRuleView : MonoBehaviour +{ + [SerializeField] + private UILabel _baseType; + + [SerializeField] + private UILabel _baseRule; + + [SerializeField] + private UILabel _memberCount; + + [SerializeField] + private UILabel _ownerName; + + [SerializeField] + private UILabel _ownerIsEntryBattle; + + [SerializeField] + private UILabel _ownerWatchBattle; + + [SerializeField] + private UILabel _timeTitle; + + [SerializeField] + private UILabel _startTime; + + [SerializeField] + private UILabel _endTime; + + [SerializeField] + private UILabel _battlePeriodLabel; + + [SerializeField] + private UILabel _battlePeriodLabelSingleLine; + + [SerializeField] + private UILabel _isDeckEntryLabel; + + [SerializeField] + private GameObject _isDeckEntryRoot; + + [SerializeField] + private UILabel _id; + + [SerializeField] + private UserPlateBase _ownerPlate; + + private List _loadResourcePath = new List(); + + public void SetGatheringInfo(GatheringInfo info) + { + SystemText systemText = Data.SystemText; + SetRule(info.Rule, info.CurrentMemberCount); + if (_baseType != null) + { + _baseType.text = GatheringUtility.GetGatheringTypeString(info); + } + if (_id != null) + { + _id.text = info.Id; + } + if (_ownerName != null) + { + _ownerName.text = info.OwnerInfo.Name; + } + if (_timeTitle != null) + { + _timeTitle.text = (info.Rule.IsTournament ? systemText.Get("Gathering_0009") : systemText.Get("Gathering_0012")); + } + if (_startTime != null) + { + _startTime.text = info.BattleStartTime; + } + if (_endTime != null) + { + _endTime.text = info.FinishTime; + } + if (_battlePeriodLabel != null && !info.Rule.IsTournament) + { + _battlePeriodLabel.text = systemText.Get("Gathering_Information_0005", info.BattleStartTime, info.FinishTime); + } + if (_battlePeriodLabelSingleLine != null && !info.Rule.IsTournament) + { + _battlePeriodLabelSingleLine.text = systemText.Get("Gathering_Information_0014", info.BattleStartTime, info.FinishTime); + } + if (_ownerWatchBattle != null) + { + switch (info.Rule.WatchSetting) + { + case GatheringRule.eWatchSetting.ALL_MEMBER: + _ownerWatchBattle.text = systemText.Get("Gathering_0016"); + break; + case GatheringRule.eWatchSetting.OWNER_ONLY: + _ownerWatchBattle.text = systemText.Get("Gathering_0015"); + break; + case GatheringRule.eWatchSetting.NONE: + _ownerWatchBattle.text = systemText.Get("Gathering_0017"); + break; + } + } + List loadResourceList = info.OwnerInfo.GetUserAssetPathList().Except(_loadResourcePath).ToList(); + UIManager.GetInstance().StartCoroutine(LoadResource(info, loadResourceList)); + } + + private void OnDestroy() + { + Toolbox.ResourcesManager.RemoveAssetGroup(_loadResourcePath); + _loadResourcePath.Clear(); + } + + private IEnumerator LoadResource(GatheringInfo info, List loadResourceList) + { + yield return UIManager.GetInstance().StartCoroutine(Toolbox.ResourcesManager.LoadAssetGroupAsync(loadResourceList, delegate + { + _loadResourcePath.AddRange(loadResourceList); + })); + if (_ownerPlate != null) + { + _ownerPlate.InitializeSimplePlate(info.OwnerInfo); + } + } + + private void SetRule(GatheringRule rule, int memberCount) + { + SystemText systemText = Data.SystemText; + _baseRule.text = RoomRuleSetting.GetWinTypeString(rule.BattleParameterInstance.Rule) + " " + FormatBehaviorManager.GetFormatName(rule.BattleParameterInstance.DeckFormat); + _memberCount.text = systemText.Get("Gathering_Information_0003", memberCount.ToString(), rule.MaxMember.ToString()); + if (_ownerIsEntryBattle != null) + { + _ownerIsEntryBattle.text = (rule.IsOwnerEntryBattle ? systemText.Get("Gathering_Information_0008") : systemText.Get("Gathering_Information_0009")); + } + if (_isDeckEntryRoot != null) + { + _isDeckEntryRoot.SetActive(!rule.IsTournament); + } + if (_isDeckEntryLabel != null) + { + _isDeckEntryLabel.text = (rule.IsEntryDeckOnly ? systemText.Get("Gathering_Information_0022") : systemText.Get("Gathering_Information_0023")); + } + } +} diff --git a/SVSim.BattleEngine/Engine/Wizard/GatheringStartTimeSelectDialog.cs b/SVSim.BattleEngine/Engine/Wizard/GatheringStartTimeSelectDialog.cs new file mode 100644 index 0000000..3306fe7 --- /dev/null +++ b/SVSim.BattleEngine/Engine/Wizard/GatheringStartTimeSelectDialog.cs @@ -0,0 +1,276 @@ +using System; +using System.Collections.Generic; +using System.Globalization; +using Cute; +using UnityEngine; + +namespace Wizard; + +public class GatheringStartTimeSelectDialog : MonoBehaviour +{ + [SerializeField] + private UtilityDrumrollScroll _daySelectDrum; + + [SerializeField] + private UtilityDrumrollScroll _hourSelectDrum; + + [SerializeField] + private UtilityDrumrollScroll _minuteSelectDrum; + + [SerializeField] + private UtilityDrumrollScroll _amPmSelectDrum; + + [SerializeField] + private UIPanel[] _alphaAnimationPanel; + + [SerializeField] + private GameObject _daySelectArrowUp; + + [SerializeField] + private GameObject _daySelectArrowDown; + + [SerializeField] + private GameObject _hourSelectArrowUp; + + [SerializeField] + private GameObject _hourSelectArrowDown; + + [SerializeField] + private GameObject _minuteSelectArrowUp; + + [SerializeField] + private GameObject _minuteSelectArrowDown; + + [SerializeField] + private GameObject _ampmSelectArrowUp; + + [SerializeField] + private GameObject _ampmSelectArrowDown; + + [SerializeField] + private GameObject _amPmSelectRoot; + + [SerializeField] + private GameObject _rootObject; + + private DialogBase _parentDialog; + + private List _dayList = new List(); + + private List _hourList = new List(); + + private List _minuteList = new List(); + + private DateTime _selectDay; + + private int _selectHour; + + private int _selectMinute; + + private bool _isAm; + + private readonly Vector3 ENG_ROOT_POSITION = new Vector3(-65f, 0f, 0f); + + private const int DAY_SELECT_LIMIT = 5; + + public const int MINUTE_SELECT_INTERVAL = 15; + + public const int DEFAULT_START_TIME_MINUTE = 16; + + private const int AM_INDEX = 0; + + private const int PM_INDEX = 1; + + private int SelectHour + { + get + { + if (!IsEnableAmPmSelect) + { + return _selectHour; + } + if (_selectHour == 12) + { + if (!_isAm) + { + return 12; + } + return 0; + } + if (_isAm) + { + return _selectHour; + } + return _selectHour + 12; + } + } + + private DateTime SelectTime => new DateTime(_selectDay.Year, _selectDay.Month, _selectDay.Day, SelectHour, _selectMinute, 0); + + private bool IsEnableAmPmSelect => CustomPreference.GetTextLanguage() == Global.LANG_TYPE.Eng.ToString(); + + public static DialogBase Create(GameObject prefab, Action onDecide, DateTime defaultTime) + { + DialogBase dialogBase = UIManager.GetInstance().CreateDialogClose(); + dialogBase.SetSize(DialogBase.Size.M); + dialogBase.SetButtonLayout(DialogBase.ButtonLayout.OkBtn); + dialogBase.SetPanelDepth(14); + dialogBase.SetTitleLabel(Data.SystemText.Get("MyPage_0082")); + GatheringStartTimeSelectDialog startDialog = UnityEngine.Object.Instantiate(prefab).GetComponent(); + dialogBase.SetObj(startDialog.gameObject); + startDialog.Initialize(defaultTime, dialogBase); + dialogBase.onPushButton1 = delegate + { + onDecide(startDialog.SelectTime); + }; + return dialogBase; + } + + private void Initialize(DateTime defaultTime, DialogBase parent) + { + _parentDialog = parent; + InitializeDaySelectDrum(defaultTime); + InitializeHourSelectDrum(defaultTime); + InitializeMinuteSelectDrum(defaultTime); + if (IsEnableAmPmSelect) + { + _rootObject.transform.localPosition = ENG_ROOT_POSITION; + InitializeAmPmSelectDrum(); + } + _amPmSelectRoot.SetActive(IsEnableAmPmSelect); + } + + private void InitializeDaySelectDrum(DateTime defaultTime) + { + int num = 0; + List list = new List(); + DateTime item = PlayerStaticData.UserTime.GetNowTime().AddMinutes(15.0); + string text = Data.SystemText.Get("System_DateLong"); + CultureInfo cultureInfo = new CultureInfo(Data.SystemText.Get("System_CultureInfo"), useUserOverride: false); + for (int i = 0; i < 5; i++) + { + int year = item.Year; + int month = item.Month; + int day = item.Day; + if (year == defaultTime.Year && month == defaultTime.Month && day == defaultTime.Day) + { + num = i; + } + list.Add(item.ToString(text, cultureInfo)); + _dayList.Add(item); + item = item.AddDays(1.0); + } + _selectDay = _dayList[num]; + DaySelectCallBack(num); + StartCoroutine(_daySelectDrum.CreateDrumrollScroll_Coroutine(list, num, DaySelectCallBack)); + } + + private void InitializeHourSelectDrum(DateTime defaultTime) + { + int num = 0; + List list = new List(); + int num2 = 0; + int num3 = 23; + int num4 = defaultTime.Hour; + if (IsEnableAmPmSelect) + { + num2 = 1; + num3 = 12; + _isAm = true; + if (num4 == 0) + { + num4 = 12; + } + else if (num4 == 12) + { + _isAm = false; + } + else if (num4 > 12) + { + num4 -= 12; + _isAm = false; + } + } + for (int i = num2; i <= num3; i++) + { + list.Add(i.ToString("00")); + if (i == num4) + { + num = i - num2; + } + _hourList.Add(i); + } + _selectHour = _hourList[num]; + HourSelectCallBack(num); + StartCoroutine(_hourSelectDrum.CreateDrumrollScroll_Coroutine(list, num, HourSelectCallBack)); + } + + private void InitializeMinuteSelectDrum(DateTime defaultTime) + { + int num = 0; + List list = new List(); + for (int i = 0; i < 60; i += 15) + { + list.Add(i.ToString("00")); + if (i == defaultTime.Minute) + { + num = i / 15; + } + _minuteList.Add(i); + } + _selectMinute = _minuteList[num]; + MinuteSelectCallback(num); + StartCoroutine(_minuteSelectDrum.CreateDrumrollScroll_Coroutine(list, num, MinuteSelectCallback)); + } + + private void DaySelectCallBack(int index) + { + _selectDay = _dayList[index]; + _daySelectArrowUp.SetActive(index > 0); + _daySelectArrowDown.SetActive(index < _dayList.Count - 1); + } + + private void HourSelectCallBack(int index) + { + _selectHour = _hourList[index]; + _hourSelectArrowUp.SetActive(index > 0); + _hourSelectArrowDown.SetActive(index < _hourList.Count - 1); + } + + private void MinuteSelectCallback(int index) + { + _selectMinute = _minuteList[index]; + _minuteSelectArrowUp.SetActive(index > 0); + _minuteSelectArrowDown.SetActive(index < _minuteList.Count - 1); + } + + private void InitializeAmPmSelectDrum() + { + int num = ((!_isAm) ? 1 : 0); + List list = new List(); + list.Add(Data.SystemText.Get("System_0059")); + list.Add(Data.SystemText.Get("System_0060")); + StartCoroutine(_amPmSelectDrum.CreateDrumrollScroll_Coroutine(list, num, AmPmSelectCallBack)); + AmPmSelectCallBack(num); + } + + private void AmPmSelectCallBack(int index) + { + _isAm = index == 0; + _ampmSelectArrowUp.SetActive(index != 0); + _ampmSelectArrowDown.SetActive(index == 0); + } + + private void Update() + { + float panelAlpha = _parentDialog.PanelAlpha; + UIPanel[] alphaAnimationPanel = _alphaAnimationPanel; + foreach (UIPanel uIPanel in alphaAnimationPanel) + { + if (uIPanel != null) + { + uIPanel.alpha = panelAlpha; + } + } + } +} diff --git a/SVSim.BattleEngine/Engine/Wizard/GatheringTournament.cs b/SVSim.BattleEngine/Engine/Wizard/GatheringTournament.cs new file mode 100644 index 0000000..c26f2fe --- /dev/null +++ b/SVSim.BattleEngine/Engine/Wizard/GatheringTournament.cs @@ -0,0 +1,228 @@ +using System.Collections.Generic; +using System.Linq; +using Cute; +using UnityEngine; +using Wizard.RoomMatch; + +namespace Wizard; + +public class GatheringTournament : MonoBehaviour +{ + private enum DoubleTab + { + Winners, + Losers + } + + [SerializeField] + private GameObject _originalTournament; + + [SerializeField] + private GameObject _tournamentRoot; + + [SerializeField] + private UILabel _ruleLabel; + + [SerializeField] + private GameObject _singleRoot; + + [SerializeField] + private GameObject _doubleRoot; + + [SerializeField] + private UIButton _winnersButton; + + [SerializeField] + private UIButton _losersButton; + + [SerializeField] + private GameObject _messageRoot; + + [SerializeField] + private UILabel _messageLabel; + + private List _tournamentControllers; + + private List _tournamentDataList; + + private List _resourceList; + + private DoubleTab _doubleTab; + + public void Show(GatheringInfo info, GatheringJoining parent) + { + UIManager.GetInstance().AttachAtlas(base.gameObject); + _originalTournament.SetActive(value: false); + _singleRoot.SetActive(value: false); + _doubleRoot.SetActive(value: false); + _ruleLabel.text = RoomRuleSetting.GetWinTypeString(info.Rule.BattleParameterInstance.Rule) + " " + FormatBehaviorManager.GetFormatName(info.Rule.BattleParameterInstance.DeckFormat); + GatheringGetSelfInfoTask task = new GatheringGetSelfInfoTask(isDependGatheringInfo: true); + StartCoroutine(Toolbox.NetworkManager.Connect(task, delegate + { + GatheringTournamentInfoTask tournamentInfoTask = new GatheringTournamentInfoTask(); + StartCoroutine(Toolbox.NetworkManager.Connect(tournamentInfoTask, delegate + { + if (tournamentInfoTask.TournamentDataList != null) + { + Setup(tournamentInfoTask.TournamentDataList, info); + } + else + { + SetMessage(Data.SystemText.Get("Gathering_Tournament_0009")); + } + })); + })); + } + + private void Setup(List tournamentDataList, GatheringInfo info) + { + _tournamentDataList = tournamentDataList; + _tournamentRoot.SetActive(value: true); + _messageRoot.SetActive(value: false); + bool flag = !info.OwnerInfo.IsSelf || info.Rule.IsOwnerEntryBattle; + _doubleTab = GetCurrentTabAndCell(out var currentCells, tournamentDataList, flag); + if (flag && currentCells.All((TournamentCellData c) => c == null)) + { + _doubleTab = GetCurrentTabAndCell(out currentCells, tournamentDataList, isEntry: false); + } + SetupTournamentType(info.Rule.TournamentType); + _resourceList = CollectResourcePath(tournamentDataList); + StartCoroutine(Toolbox.ResourcesManager.LoadAssetGroupAsync(_resourceList, delegate + { + _originalTournament.SetActive(value: true); + _tournamentControllers = new List(tournamentDataList.Count); + for (int i = 0; i < tournamentDataList.Count; i++) + { + TournamentController componentInChildren = NGUITools.AddChild(_tournamentRoot, _originalTournament).GetComponentInChildren(); + _tournamentControllers.Add(componentInChildren); + StartCoroutine(componentInChildren.Setup(tournamentDataList[i], currentCells[i], info, i == (int)_doubleTab)); + } + _originalTournament.SetActive(value: false); + })); + } + + private void SetupTournamentType(GatheringRule.eTournamentType type) + { + _singleRoot.SetActive(type == GatheringRule.eTournamentType.SINGLE_ELIMINATION); + _doubleRoot.SetActive(type == GatheringRule.eTournamentType.DOUBLE_ELIMINATION); + _winnersButton.onClick.Add(new EventDelegate(delegate + { + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_BTN_DECIDE); + SetDoubleTab(DoubleTab.Winners); + })); + _losersButton.onClick.Add(new EventDelegate(delegate + { + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_BTN_DECIDE); + SetDoubleTab(DoubleTab.Losers); + })); + UpdateDoubleTab(); + } + + private DoubleTab GetCurrentTabAndCell(out List currentCells, List tournamentDataList, bool isEntry) + { + currentCells = new List(tournamentDataList.Count); + foreach (TournamentData tournamentData in tournamentDataList) + { + bool flag = false; + for (int num = tournamentData.Rounds.Count - 1; num >= 0; num--) + { + foreach (TournamentCellData cell in tournamentData.Rounds[num].Cells) + { + if (IsCurrentCell(cell)) + { + currentCells.Add(cell); + flag = true; + break; + } + } + if (flag) + { + break; + } + } + if (!flag) + { + currentCells.Add(null); + } + } + if (currentCells.Count > 1) + { + if (currentCells[0] == null) + { + return DoubleTab.Winners; + } + if (currentCells[0].Round == tournamentDataList[0].Rounds[tournamentDataList[0].Rounds.Count - 2]) + { + return DoubleTab.Winners; + } + if (currentCells[0].State != TournamentCellData.CellState.Lose || currentCells[1] == null) + { + return DoubleTab.Winners; + } + return DoubleTab.Losers; + } + return DoubleTab.Winners; + bool IsCurrentCell(TournamentCellData targetCell) + { + if (targetCell == null) + { + return false; + } + TournamentCellData.CellState state = targetCell.State; + if (state == TournamentCellData.CellState.Unresolved || state == TournamentCellData.CellState.Active || state == TournamentCellData.CellState.Win || state == TournamentCellData.CellState.Lose) + { + if (isEntry) + { + return targetCell.ViewerId == PlayerStaticData.UserViewerID; + } + return true; + } + return false; + } + } + + private void UpdateDoubleTab() + { + _winnersButton.normalSprite = ((_doubleTab == DoubleTab.Winners) ? "pilltab_02_left_on" : "pilltab_02_left_off"); + _losersButton.normalSprite = ((_doubleTab == DoubleTab.Losers) ? "pilltab_02_right_on" : "pilltab_02_right_off"); + } + + private void SetDoubleTab(DoubleTab tab) + { + if (_doubleTab != tab) + { + _doubleTab = tab; + UpdateDoubleTab(); + for (int i = 0; i < _tournamentControllers.Count; i++) + { + _tournamentControllers[i].SetVisible(i == (int)tab); + } + } + } + + private List CollectResourcePath(List dataList) + { + List resourceList = new List(); + foreach (TournamentData data in dataList) + { + data.CollectResourcePath(ref resourceList); + } + return resourceList; + } + + private void OnDestroy() + { + if (_resourceList != null) + { + Toolbox.ResourcesManager.RemoveAssetGroup(_resourceList); + _resourceList.Clear(); + } + } + + private void SetMessage(string message) + { + _tournamentRoot.SetActive(value: false); + _messageRoot.SetActive(value: true); + _messageLabel.text = message; + } +} diff --git a/SVSim.BattleEngine/Engine/Wizard/GatheringUpdateDeckLeaderSkin.cs b/SVSim.BattleEngine/Engine/Wizard/GatheringUpdateDeckLeaderSkin.cs new file mode 100644 index 0000000..b223cce --- /dev/null +++ b/SVSim.BattleEngine/Engine/Wizard/GatheringUpdateDeckLeaderSkin.cs @@ -0,0 +1,24 @@ +namespace Wizard; + +public class GatheringUpdateDeckLeaderSkin : BaseTask +{ + public class GatheringUpdateDeckLeaderSkinParam : BaseParam + { + public int deck_no; + + public int leader_skin_id; + } + + public GatheringUpdateDeckLeaderSkin() + { + base.type = ApiType.Type.GatheringUpdateDeckLeaderSkin; + } + + public void SetParameter(int deckNo, int leaderSkinId) + { + GatheringUpdateDeckLeaderSkinParam gatheringUpdateDeckLeaderSkinParam = new GatheringUpdateDeckLeaderSkinParam(); + gatheringUpdateDeckLeaderSkinParam.deck_no = deckNo; + gatheringUpdateDeckLeaderSkinParam.leader_skin_id = leaderSkinId; + base.Params = gatheringUpdateDeckLeaderSkinParam; + } +} diff --git a/SVSim.BattleEngine/Engine/Wizard/GatheringUpdateDeckName.cs b/SVSim.BattleEngine/Engine/Wizard/GatheringUpdateDeckName.cs new file mode 100644 index 0000000..52385ad --- /dev/null +++ b/SVSim.BattleEngine/Engine/Wizard/GatheringUpdateDeckName.cs @@ -0,0 +1,24 @@ +namespace Wizard; + +public class GatheringUpdateDeckName : BaseTask +{ + public class GatheringUpdateDeckNameParam : BaseParam + { + public int deck_no; + + public string deck_name; + } + + public GatheringUpdateDeckName() + { + base.type = ApiType.Type.GatheringUpdateDeckName; + } + + public void SetParameter(int deckNo, string deckName) + { + GatheringUpdateDeckNameParam gatheringUpdateDeckNameParam = new GatheringUpdateDeckNameParam(); + gatheringUpdateDeckNameParam.deck_no = deckNo; + gatheringUpdateDeckNameParam.deck_name = deckName; + base.Params = gatheringUpdateDeckNameParam; + } +} diff --git a/SVSim.BattleEngine/Engine/Wizard/GatheringUpdateDeckRandomLeaderSkinTask.cs b/SVSim.BattleEngine/Engine/Wizard/GatheringUpdateDeckRandomLeaderSkinTask.cs new file mode 100644 index 0000000..6e7c47e --- /dev/null +++ b/SVSim.BattleEngine/Engine/Wizard/GatheringUpdateDeckRandomLeaderSkinTask.cs @@ -0,0 +1,40 @@ +using LitJson; + +namespace Wizard; + +public class GatheringUpdateDeckRandomLeaderSkinTask : BaseTask +{ + public class GatheringUpdateDeckRandomLeaderSkinParam : BaseParam + { + public int deck_no; + + public int[] leader_skin_id_list; + } + + public int SelectedSkinId { get; private set; } + + public GatheringUpdateDeckRandomLeaderSkinTask() + { + base.type = ApiType.Type.GatheringUpdateDeckRandomLeaderSkin; + } + + public void SetParameter(int deckNo, int[] leaderSkinIdList) + { + GatheringUpdateDeckRandomLeaderSkinParam gatheringUpdateDeckRandomLeaderSkinParam = new GatheringUpdateDeckRandomLeaderSkinParam(); + gatheringUpdateDeckRandomLeaderSkinParam.deck_no = deckNo; + gatheringUpdateDeckRandomLeaderSkinParam.leader_skin_id_list = leaderSkinIdList; + base.Params = gatheringUpdateDeckRandomLeaderSkinParam; + } + + protected override int Parse() + { + int num = base.Parse(); + if (num != 1) + { + return num; + } + JsonData jsonData = base.ResponseData["data"]["user_deck"]; + SelectedSkinId = jsonData["leader_skin_id"].ToInt(); + return num; + } +} diff --git a/SVSim.BattleEngine/Engine/Wizard/GatheringUpdateDeckSleeve.cs b/SVSim.BattleEngine/Engine/Wizard/GatheringUpdateDeckSleeve.cs new file mode 100644 index 0000000..16dfb6e --- /dev/null +++ b/SVSim.BattleEngine/Engine/Wizard/GatheringUpdateDeckSleeve.cs @@ -0,0 +1,24 @@ +namespace Wizard; + +public class GatheringUpdateDeckSleeve : BaseTask +{ + public class GatheringUpdateDeckSleeveParam : BaseParam + { + public int deck_no; + + public long sleeve_id; + } + + public GatheringUpdateDeckSleeve() + { + base.type = ApiType.Type.GatheringUpdateDeckSleeve; + } + + public void SetParameter(int deckNo, long sleeveId) + { + GatheringUpdateDeckSleeveParam gatheringUpdateDeckSleeveParam = new GatheringUpdateDeckSleeveParam(); + gatheringUpdateDeckSleeveParam.deck_no = deckNo; + gatheringUpdateDeckSleeveParam.sleeve_id = sleeveId; + base.Params = gatheringUpdateDeckSleeveParam; + } +} diff --git a/SVSim.BattleEngine/Engine/Wizard/GenerateDeckImageMaintenanceTask.cs b/SVSim.BattleEngine/Engine/Wizard/GenerateDeckImageMaintenanceTask.cs new file mode 100644 index 0000000..786c647 --- /dev/null +++ b/SVSim.BattleEngine/Engine/Wizard/GenerateDeckImageMaintenanceTask.cs @@ -0,0 +1,9 @@ +namespace Wizard; + +public class GenerateDeckImageMaintenanceTask : BaseTask +{ + public GenerateDeckImageMaintenanceTask() + { + base.type = ApiType.Type.GenerateDeckImageMaintenance; + } +} diff --git a/SVSim.BattleEngine/Engine/Wizard/GetDeckDataFromCodeTask.cs b/SVSim.BattleEngine/Engine/Wizard/GetDeckDataFromCodeTask.cs new file mode 100644 index 0000000..adc6749 --- /dev/null +++ b/SVSim.BattleEngine/Engine/Wizard/GetDeckDataFromCodeTask.cs @@ -0,0 +1,53 @@ +using Cute; +using DeckBuilder; +using LitJson; + +namespace Wizard; + +public class GetDeckDataFromCodeTask : BaseTask +{ + public class GetDeckDataFromCodeTaskParam : BaseParam + { + public string deck_code; + } + + public override string Url => $"{CustomPreference.GetDeckBuilderServerURL()}{ApiType.ApiList[base.type]}"; + + public GetDeckDataFromCodeTask() + { + base.type = ApiType.Type.GetDeckInfoFromDeckCode; + } + + public void SetParameter(string deck_code) + { + GetDeckDataFromCodeTaskParam getDeckDataFromCodeTaskParam = new GetDeckDataFromCodeTaskParam(); + getDeckDataFromCodeTaskParam.deck_code = deck_code; + base.Params = getDeckDataFromCodeTaskParam; + } + + protected override int Parse() + { + int num = base.Parse(); + if (num != 1) + { + return num; + } + Data.DeckDataFromDeckCode = new GetDeckDataFromCode(); + JsonData jsonData = base.ResponseData["data"]["deck"]; + int clanId = int.Parse(jsonData["clan"].ToString()); + int valueOrDefault = jsonData.GetValueOrDefault("sub_clan", 10); + Data.DeckDataFromDeckCode.ClanId = clanId; + Data.DeckDataFromDeckCode.SubClanId = valueOrDefault; + Data.DeckDataFromDeckCode.IsSubClanSet = CardBasePrm.ClanTypeIsUseable((CardBasePrm.ClanType)Data.DeckDataFromDeckCode.SubClanId); + string defaultValue = null; + Data.DeckDataFromDeckCode.MyRotationId = jsonData.GetValueOrDefault("rotation_id", defaultValue); + JsonData jsonData2 = jsonData["cardID"]; + int count = jsonData2.Count; + Data.DeckDataFromDeckCode.CardIds = new int[count]; + for (int i = 0; i < count; i++) + { + Data.DeckDataFromDeckCode.CardIds[i] = jsonData2[i].ToInt(); + } + return num; + } +} diff --git a/SVSim.BattleEngine/Engine/Wizard/InviteAcceptTask.cs b/SVSim.BattleEngine/Engine/Wizard/InviteAcceptTask.cs new file mode 100644 index 0000000..f532169 --- /dev/null +++ b/SVSim.BattleEngine/Engine/Wizard/InviteAcceptTask.cs @@ -0,0 +1,33 @@ +namespace Wizard; + +public class InviteAcceptTask : BaseTask +{ + public class InviteAcceptTaskParam : BaseParam + { + public int friend_viewer_id; + } + + public InviteAcceptTask() + { + base.type = ApiType.Type.InviteAccept; + } + + public void SetParameter(int friendViewerId) + { + InviteAcceptTaskParam inviteAcceptTaskParam = new InviteAcceptTaskParam(); + inviteAcceptTaskParam.friend_viewer_id = friendViewerId; + base.Params = inviteAcceptTaskParam; + } + + protected override int Parse() + { + int num = base.Parse(); + if (num != 1) + { + return num; + } + Data.InviteFriendBattle.RoomId = base.ResponseData["data"]["room_id"].ToString(); + Data.InviteFriendBattle.BattleParameterInstance = BattleParameter.JsonToBattleParameter(base.ResponseData["data"]); + return num; + } +} diff --git a/SVSim.BattleEngine/Engine/Wizard/MissionChangeReceiveSettingTask.cs b/SVSim.BattleEngine/Engine/Wizard/MissionChangeReceiveSettingTask.cs new file mode 100644 index 0000000..b4cf802 --- /dev/null +++ b/SVSim.BattleEngine/Engine/Wizard/MissionChangeReceiveSettingTask.cs @@ -0,0 +1,32 @@ +namespace Wizard; + +public class MissionChangeReceiveSettingTask : BaseTask +{ + public class MissionChangeReceiveSettingTaskParam : BaseParam + { + public int mission_receive_type; + } + + public MissionChangeReceiveSettingTask() + { + base.type = ApiType.Type.MissionChangeReceiveSetting; + } + + public void SetParameter(MissionInfoDetail.eMissionReceiveType missionReceiveType) + { + MissionChangeReceiveSettingTaskParam missionChangeReceiveSettingTaskParam = new MissionChangeReceiveSettingTaskParam(); + missionChangeReceiveSettingTaskParam.mission_receive_type = (int)missionReceiveType; + base.Params = missionChangeReceiveSettingTaskParam; + } + + protected override int Parse() + { + int num = base.Parse(); + if (num != 1) + { + return num; + } + Data.MissionInfo.data = new MissionInfoDetail(base.ResponseData["data"]); + return num; + } +} diff --git a/SVSim.BattleEngine/Engine/Wizard/MyPageBGRandomSelectDialog.cs b/SVSim.BattleEngine/Engine/Wizard/MyPageBGRandomSelectDialog.cs new file mode 100644 index 0000000..050907f --- /dev/null +++ b/SVSim.BattleEngine/Engine/Wizard/MyPageBGRandomSelectDialog.cs @@ -0,0 +1,121 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using Cute; +using UnityEngine; +using Wizard.UI.Dialog.ImageSelection; + +namespace Wizard; + +public class MyPageBGRandomSelectDialog : MonoBehaviour +{ + [SerializeField] + private ImageSelection _imageSelection; + + [SerializeField] + private UIButton _btnAllOff; + + [SerializeField] + private UILabel _labelButton; + + public static void Create(List currentSelectIdList, int panelDepth, Action> onDecide) + { + GameObject gameObject = UnityEngine.Object.Instantiate(Resources.Load("UI/layoutParts/MyPage/MyPageBGRandomSelectDialog")) as GameObject; + MyPageBGRandomSelectDialog customDialog = gameObject.GetComponent(); + DialogBase dialogBase = UIManager.GetInstance().CreateDialogClose(); + dialogBase.SetSize(DialogBase.Size.XL); + dialogBase.SetTitleLabel(Data.SystemText.Get("MyPage_0103")); + dialogBase.SetButtonLayout(DialogBase.ButtonLayout.OkBtn); + dialogBase.SetObj(gameObject); + dialogBase.SetPanelDepth(panelDepth); + dialogBase.onPushButton1 = delegate + { + onDecide.Call(customDialog._imageSelection.GetSelectedList()); + }; + customDialog.Initialize(panelDepth, dialogBase, currentSelectIdList); + } + + private void Initialize(int panelDepth, DialogBase dialog, List currentSelectIdList) + { + _btnAllOff.onClick.Clear(); + _btnAllOff.onClick.Add(new EventDelegate(delegate + { + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_COMMON_BUTTON); + OnClickAllOffButton(); + })); + _imageSelection.Create(panelDepth, dialog); + foreach (MyPageCustomBGMasterData myPageCustomBGMaster in Data.Master.MyPageCustomBGMasterList) + { + if (currentSelectIdList.Contains(myPageCustomBGMaster.Id)) + { + AddItem(myPageCustomBGMaster.Id); + } + } + foreach (MyPageCustomBGMasterData myPageCustomBGMaster2 in Data.Master.MyPageCustomBGMasterList) + { + if (Data.Load.data.AcquiredMyPageBGList.Contains(myPageCustomBGMaster2.Id) && !currentSelectIdList.Contains(myPageCustomBGMaster2.Id)) + { + AddItem(myPageCustomBGMaster2.Id); + } + } + _imageSelection.SelectMultiItem(currentSelectIdList); + _imageSelection.SetDisplayPage(0); + _imageSelection.LoadDisplayPage(); + _imageSelection.Open(); + UpdateAllButton(); + } + + private void AddItem(string id) + { + ResourcesManager.AssetLoadPathType type = ResourcesManager.AssetLoadPathType.MyPageBackGroundRandomSelectIcon; + _imageSelection.AddItem(id, null, isSelectable: true, () => true, Toolbox.ResourcesManager.GetAssetTypePath(id, type), Toolbox.ResourcesManager.GetAssetTypePath(id, type, isfetch: true), isDisplaySprite: false, string.Empty, null, delegate + { + }, delegate + { + UpdateAllButton(); + }, delegate(GameObject g) + { + StartCoroutine(PushedAnimation(g)); + }); + } + + private IEnumerator PushedAnimation(GameObject obj) + { + TweenScale scl = obj.GetComponent(); + if ((bool)scl) + { + scl.PlayForward(); + while (Input.GetMouseButton(0)) + { + yield return null; + } + scl.PlayReverse(); + } + } + + private void OnClickAllOffButton() + { + if (_imageSelection.GetSelectedList().Count > 0) + { + _imageSelection.SelectCancelAll(); + } + else + { + _imageSelection.SelectAll(); + } + UpdateAllButton(); + } + + private void UpdateAllButton() + { + SystemText systemText = Data.SystemText; + if (_imageSelection.GetSelectedList().Count > 0) + { + _labelButton.text = systemText.Get("Card_0259"); + } + else + { + _labelButton.text = systemText.Get("Card_0260"); + } + } +} diff --git a/SVSim.BattleEngine/Engine/Wizard/MyPageSettingUpdateTask.cs b/SVSim.BattleEngine/Engine/Wizard/MyPageSettingUpdateTask.cs new file mode 100644 index 0000000..12c10d1 --- /dev/null +++ b/SVSim.BattleEngine/Engine/Wizard/MyPageSettingUpdateTask.cs @@ -0,0 +1,29 @@ +using System.Collections.Generic; + +namespace Wizard; + +public class MyPageSettingUpdateTask : BaseTask +{ + public class TaskParam : BaseParam + { + public int select_type; + + public string mypage_id; + + public string[] mypage_id_list; + } + + public MyPageSettingUpdateTask() + { + base.type = ApiType.Type.MyPageSettingUpdate; + } + + public void SetParameter(MyPageDetail.BGType type, string id, List randomList) + { + TaskParam taskParam = new TaskParam(); + taskParam.select_type = (int)type; + taskParam.mypage_id = id; + taskParam.mypage_id_list = randomList.ToArray(); + base.Params = taskParam; + } +} diff --git a/SVSim.BattleEngine/Engine/Wizard/MyRotationAbilityDetailDialog.cs b/SVSim.BattleEngine/Engine/Wizard/MyRotationAbilityDetailDialog.cs new file mode 100644 index 0000000..dd20da3 --- /dev/null +++ b/SVSim.BattleEngine/Engine/Wizard/MyRotationAbilityDetailDialog.cs @@ -0,0 +1,50 @@ +using System.Collections.Generic; +using UnityEngine; + +namespace Wizard; + +public class MyRotationAbilityDetailDialog : MonoBehaviour +{ + [SerializeField] + private FlexibleGrid _grid; + + [SerializeField] + private MyRotationAbilityDetailDialogItem _itemOriginal; + + [SerializeField] + private GameObject _lineOriginal; + + public static DialogBase Create(List abilityGroupList) + { + DialogBase dialogBase = UIManager.GetInstance().CreateDialogClose(); + dialogBase.SetTitleLabel(Data.SystemText.Get("MyRotation_ID_11")); + GameObject gameObject = Object.Instantiate(Resources.Load("UI/layoutParts/MyRotation/MyRotationAbilityDetailDialog")) as GameObject; + dialogBase.SetObj(gameObject); + dialogBase.SetSize(DialogBase.Size.M); + dialogBase.SetButtonLayout(DialogBase.ButtonLayout.CloseBtn); + gameObject.GetComponent().Initialize(abilityGroupList); + return dialogBase; + } + + private void Initialize(List abilityGroupList) + { + _itemOriginal.gameObject.SetActive(value: false); + _lineOriginal.SetActive(value: false); + bool flag = true; + foreach (MyRotationAbilityGroup abilityGroup in abilityGroupList) + { + if (abilityGroup.AbilityList.Count != 0) + { + if (!flag) + { + NGUITools.AddChild(_grid.gameObject, _lineOriginal).SetActive(value: true); + } + GameObject obj = NGUITools.AddChild(_grid.gameObject, _itemOriginal.gameObject); + obj.SetActive(value: true); + obj.GetComponent().Initialize(abilityGroup); + flag = false; + } + } + _grid.Reposition(); + } +} diff --git a/SVSim.BattleEngine/Engine/Wizard/MyRotationAbilityDetailDialogItem.cs b/SVSim.BattleEngine/Engine/Wizard/MyRotationAbilityDetailDialogItem.cs new file mode 100644 index 0000000..07e3024 --- /dev/null +++ b/SVSim.BattleEngine/Engine/Wizard/MyRotationAbilityDetailDialogItem.cs @@ -0,0 +1,29 @@ +using UnityEngine; + +namespace Wizard; + +public class MyRotationAbilityDetailDialogItem : MonoBehaviour +{ + [SerializeField] + private UILabel _headerLabel; + + [SerializeField] + private GameObject _abilityOriginal; + + [SerializeField] + private UIGrid _grid; + + public void Initialize(MyRotationAbilityGroup group) + { + _headerLabel.text = Data.SystemText.Get("MyRotation_ID_12", group.StartPackNumber.ToString(), group.LastPackNumber.ToString(), group.StartPackShortName, group.LastPackShortName); + _abilityOriginal.SetActive(value: false); + foreach (MyRotationInfo.MyRotationBonus ability in group.AbilityList) + { + GameObject obj = NGUITools.AddChild(_grid.gameObject, _abilityOriginal); + obj.GetComponentInChildren().spriteName = ability.IconName; + obj.GetComponentInChildren().text = ability.AbilityDesc; + obj.SetActive(value: true); + } + _grid.Reposition(); + } +} diff --git a/SVSim.BattleEngine/Engine/Wizard/PracticeInfoTask.cs b/SVSim.BattleEngine/Engine/Wizard/PracticeInfoTask.cs new file mode 100644 index 0000000..f002fe3 --- /dev/null +++ b/SVSim.BattleEngine/Engine/Wizard/PracticeInfoTask.cs @@ -0,0 +1,20 @@ +namespace Wizard; + +public class PracticeInfoTask : BaseTask +{ + public PracticeInfoTask() + { + base.type = ApiType.Type.PracticeInfo; + } + + protected override int Parse() + { + int num = base.Parse(); + if (num != 1) + { + return num; + } + Data.PracticeDataMgr = new PracticeDataMgr(base.ResponseData["data"]); + return num; + } +} diff --git a/SVSim.BattleEngine/Engine/Wizard/PracticePuzzleInfoTask.cs b/SVSim.BattleEngine/Engine/Wizard/PracticePuzzleInfoTask.cs new file mode 100644 index 0000000..763c59e --- /dev/null +++ b/SVSim.BattleEngine/Engine/Wizard/PracticePuzzleInfoTask.cs @@ -0,0 +1,29 @@ +using System.Collections.Generic; +using LitJson; + +namespace Wizard; + +public class PracticePuzzleInfoTask : BaseTask +{ + public List PuzzleDataList { get; private set; } = new List(); + + public PracticePuzzleInfoTask() + { + base.type = ApiType.Type.PracticePuzzleInfo; + } + + protected override int Parse() + { + int num = base.Parse(); + if (num != 1) + { + return num; + } + JsonData jsonData = base.ResponseData["data"]; + for (int i = 0; i < jsonData.Count; i++) + { + PuzzleDataList.Add(new PracticePuzzleData(jsonData[i])); + } + return num; + } +} diff --git a/SVSim.BattleEngine/Engine/Wizard/PracticePuzzleMissionDialog.cs b/SVSim.BattleEngine/Engine/Wizard/PracticePuzzleMissionDialog.cs new file mode 100644 index 0000000..e341fac --- /dev/null +++ b/SVSim.BattleEngine/Engine/Wizard/PracticePuzzleMissionDialog.cs @@ -0,0 +1,43 @@ +using System.Collections.Generic; +using UnityEngine; + +namespace Wizard; + +public class PracticePuzzleMissionDialog : MonoBehaviour +{ + [SerializeField] + private SimpleScrollViewUI _simpleScrollView; + + [SerializeField] + private ResourceHandler _resourceHandler; + + [SerializeField] + private GameObject _missionNotExist; + + private List _missionList; + + public static void Create(List missionList, GameObject prefab) + { + DialogBase dialogBase = UIManager.GetInstance().CreateDialogClose(); + dialogBase.SetSize(DialogBase.Size.M); + dialogBase.SetTitleLabel(Data.SystemText.Get("Mission_0003")); + dialogBase.SetButtonLayout(DialogBase.ButtonLayout.CloseBtn); + PracticePuzzleMissionDialog component = Object.Instantiate(prefab).GetComponent(); + dialogBase.SetObj(component.gameObject); + component.Initialize(missionList); + } + + private void Initialize(List missionList) + { + _missionList = missionList; + _missionNotExist.SetActive(missionList.Count == 0); + _simpleScrollView.CreateScrollView(missionList.Count, UpdateMissionPlate); + } + + private void UpdateMissionPlate(int index, GameObject plateObject) + { + PracticePuzzleMissionData mission = _missionList[index]; + plateObject.GetComponent().width = 800; + plateObject.GetComponent().SetPracticePuzzleMission(mission, _resourceHandler, canChangeMissions: false, index != _missionList.Count - 1, displayChange: false); + } +} diff --git a/SVSim.BattleEngine/Engine/Wizard/PracticePuzzleMissionListTask.cs b/SVSim.BattleEngine/Engine/Wizard/PracticePuzzleMissionListTask.cs new file mode 100644 index 0000000..fbae5a6 --- /dev/null +++ b/SVSim.BattleEngine/Engine/Wizard/PracticePuzzleMissionListTask.cs @@ -0,0 +1,30 @@ +using System.Collections.Generic; +using LitJson; + +namespace Wizard; + +public class PracticePuzzleMissionListTask : BaseTask +{ + public List MissionData { get; private set; } + + public PracticePuzzleMissionListTask() + { + base.type = ApiType.Type.PracticePuzzleMissionList; + } + + protected override int Parse() + { + int num = base.Parse(); + if (num != 1) + { + return num; + } + MissionData = new List(); + JsonData jsonData = base.ResponseData["data"]; + for (int i = 0; i < jsonData.Count; i++) + { + MissionData.Add(new PracticePuzzleMissionData(jsonData[i])); + } + return num; + } +} diff --git a/SVSim.BattleEngine/Engine/Wizard/PracticePuzzlePlate.cs b/SVSim.BattleEngine/Engine/Wizard/PracticePuzzlePlate.cs new file mode 100644 index 0000000..2d6bd42 --- /dev/null +++ b/SVSim.BattleEngine/Engine/Wizard/PracticePuzzlePlate.cs @@ -0,0 +1,64 @@ +using System; +using Cute; +using UnityEngine; + +namespace Wizard; + +public class PracticePuzzlePlate : MonoBehaviour +{ + [SerializeField] + private UILabel _title; + + [SerializeField] + private UIButton _button; + + [SerializeField] + private UILabel _clearCountLabel; + + [SerializeField] + private UITexture _plateTexture; + + [SerializeField] + private GameObject _selectSprite; + + [SerializeField] + private GameObject _alreadyClear; + + [SerializeField] + private TweenAlpha _selectSpriteTween; + + [SerializeField] + private GameObject _missionTarget; + + public PracticePuzzleData PuzzleData { get; private set; } + + public void UpdateView(PracticePuzzleData data, Action onSelect, bool isSelected) + { + PuzzleData = data; + _title.text = data.Title; + _clearCountLabel.text = $"{data.CurrentClearCount}/{data.MaxClearCount}"; + _alreadyClear.gameObject.SetActive(data.IsClear); + _clearCountLabel.gameObject.SetActive(!data.IsClear); + _missionTarget.SetActive(data.IsMissionTarget); + _plateTexture.mainTexture = Toolbox.ResourcesManager.LoadObject(GetPlateTexturePath(data, isFetch: true)); + UpdateSelectSpriteVisible(isSelected); + UIEventListener.Get(_button.gameObject).onClick = delegate + { + onSelect.Call(data); + }; + } + + public static string GetPlateTexturePath(PracticePuzzleData data, bool isFetch) + { + return Toolbox.ResourcesManager.GetAssetTypePath(data.GroupdId.ToString(), ResourcesManager.AssetLoadPathType.PracticePuzzleThumbnail, isFetch); + } + + public void UpdateSelectSpriteVisible(bool visible) + { + _selectSprite.SetActive(visible); + if (visible) + { + _selectSpriteTween.PlayPingPong(isIncreaseAlpha: false); + } + } +} diff --git a/SVSim.BattleEngine/Engine/Wizard/PracticeStartTask.cs b/SVSim.BattleEngine/Engine/Wizard/PracticeStartTask.cs new file mode 100644 index 0000000..578602e --- /dev/null +++ b/SVSim.BattleEngine/Engine/Wizard/PracticeStartTask.cs @@ -0,0 +1,24 @@ +namespace Wizard; + +public class PracticeStartTask : BaseTask +{ + public PracticeStartTask() + { + base.type = ApiType.Type.PracticeStart; + } + + protected override int Parse() + { + DataMgr dataMgr = GameMgr.GetIns().GetDataMgr(); + int num = base.Parse(); + if (num != 1) + { + return num; + } + if (base.ResponseData["data"].Keys.Contains("mission_parameter")) + { + dataMgr.SetMissionNecessaryInformation(base.ResponseData["data"]["mission_parameter"]); + } + return num; + } +} diff --git a/SVSim.BattleEngine/Engine/Wizard/QrCamera.cs b/SVSim.BattleEngine/Engine/Wizard/QrCamera.cs new file mode 100644 index 0000000..d24e7b9 --- /dev/null +++ b/SVSim.BattleEngine/Engine/Wizard/QrCamera.cs @@ -0,0 +1,320 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using System.IO; +using Cute; +using SFB; +using UnityEngine; + +namespace Wizard; + +public class QrCamera : MonoBehaviour +{ + private enum Mode + { + None, + Camera, + CameraRoll + } + + [SerializeField] + private GameObject _cameraRoot; + + [SerializeField] + private UITexture _halfTransparentTexture; + + [SerializeField] + private UITexture _backGroundTexture; + + [SerializeField] + private UITexture _cameraTexture; + + [SerializeField] + private UISprite _blueFrameTexture; + + [SerializeField] + private UITexture _cameraRollTexture; + + private string _qrCodeCameraText; + + [SerializeField] + private UIButton _backButton; + + [SerializeField] + private UILabel _descriptionTextLabel; + + private WebCamTexture _webCamTexture; + + private Action _qrScanSuccessee; + + private Action _qrScanFailed; + + private GameObject _qrCameraObject; + + private const float DESCRIPTION_TEXT_OFFSET = 30f; + + private ScreenOrientation _preScreenOrientation = ScreenOrientation.LandscapeLeft; + + private List _resourcePathList = new List(); + + private const string HALF_TRANSPARENT_TEXTURE_PATH = "512black_82transparent"; + + private bool loadCameraRollImageCalled; + + private CardMaster.CardMasterId _cardMasterId = CardMaster.CardMasterId.Default; + + private bool webCameraSetSuccess; + + private Mode _currentMode; + + public UIButton backButton + { + get + { + return _backButton; + } + private set + { + _backButton = value; + } + } + + private void Awake() + { + _cameraRoot.gameObject.SetActive(value: false); + } + + public void SetCallBacks(Action qrScanSuccessee, Action qrScanFailed) + { + _qrScanSuccessee = qrScanSuccessee; + _qrScanFailed = qrScanFailed; + } + + public IEnumerator StartQRCamera(GameObject qrCameraObject, CardMaster.CardMasterId cardMasterId, Action onComplete, Action onFailed) + { + SetupWebCam(); + _cardMasterId = cardMasterId; + if (!webCameraSetSuccess) + { + onFailed.Call(); + yield break; + } + _cameraRoot.gameObject.SetActive(value: true); + _qrCameraObject = qrCameraObject; + _preScreenOrientation = Screen.orientation; + if (_preScreenOrientation == ScreenOrientation.LandscapeRight) + { + Vector3 localScale = _cameraTexture.transform.localScale; + localScale.x = 0f - localScale.x; + localScale.y = 0f - localScale.y; + _cameraTexture.transform.localScale = localScale; + } + _currentMode = Mode.Camera; + StartCoroutine(PlayCamera()); + onComplete.Call(); + } + + public void StartGetQRCodeFromImageFile(GameObject qrCameraObject, CardMaster.CardMasterId cardMasterId) + { + _cameraRollTexture.gameObject.SetActive(value: true); + _cardMasterId = cardMasterId; + _qrCameraObject = qrCameraObject; + _currentMode = Mode.CameraRoll; + ExtensionFilter[] extensions = new ExtensionFilter[1] + { + new ExtensionFilter("Image Files", "png", "jpg", "jpeg") + }; + string[] array = StandaloneFileBrowser.OpenFilePanel(Data.SystemText.Get("Card_0271"), "", extensions, multiselect: false); + if (array.Length != 0 && !string.IsNullOrEmpty(array[0])) + { + LoadCameraRollImage(array[0]); + } + else + { + UnityEngine.Object.Destroy(_qrCameraObject); + } + } + + public void StopQRCamera() + { + _cameraRoot.gameObject.SetActive(value: false); + _currentMode = Mode.None; + Toolbox.ResourcesManager.RemoveAssetGroup(_resourcePathList); + _resourcePathList.Clear(); + StopCamera(); + } + + private void Update() + { + if (_currentMode != Mode.Camera || !(_webCamTexture != null) || !_webCamTexture.isPlaying) + { + return; + } + if (_preScreenOrientation != Screen.orientation) + { + ChangeCameraTextrueDirection(); + } + _qrCodeCameraText = QRCodeUtility.DecodeContentText(_webCamTexture); + if (!string.IsNullOrEmpty(_qrCodeCameraText)) + { + StopCamera(); + if (QRCodeUtility.SetDeckFromQRCodeText(_qrCodeCameraText, _cardMasterId)) + { + _qrScanSuccessee.Call(); + } + else + { + _qrScanFailed.Call(Data.SystemText.Get("Card_0267")); + } + UnityEngine.Object.Destroy(_qrCameraObject); + } + } + + private void ChangeCameraTextrueDirection() + { + switch (Screen.orientation) + { + case ScreenOrientation.LandscapeLeft: + { + _preScreenOrientation = Screen.orientation; + Vector3 localScale2 = _cameraTexture.transform.localScale; + localScale2.x = 0f - localScale2.x; + localScale2.y = 0f - localScale2.y; + _cameraTexture.transform.localScale = localScale2; + break; + } + case ScreenOrientation.LandscapeRight: + { + _preScreenOrientation = Screen.orientation; + Vector3 localScale = _cameraTexture.transform.localScale; + localScale.x = 0f - localScale.x; + localScale.y = 0f - localScale.y; + _cameraTexture.transform.localScale = localScale; + break; + } + } + } + + private void SetupWebCam() + { + ResourcesManager resMgr = Toolbox.ResourcesManager; + _resourcePathList.Add(resMgr.GetAssetTypePath("512black_82transparent", ResourcesManager.AssetLoadPathType.UiOtherTexture)); + UIManager.GetInstance().StartCoroutine(Toolbox.ResourcesManager.LoadAssetGroupAsync(_resourcePathList, delegate + { + _halfTransparentTexture.mainTexture = resMgr.LoadObject(resMgr.GetAssetTypePath("512black_82transparent", ResourcesManager.AssetLoadPathType.UiOtherTexture, isfetch: true)) as Texture; + })); + WebCamDevice[] devices = WebCamTexture.devices; + if (devices != null && devices.Length != 0) + { + float num = (float)Screen.width / (float)Screen.height; + if (num != 1.7777778f) + { + float aspectRatio = _cameraTexture.aspectRatio; + float num2 = ((num < 1.7777778f) ? 1f : (num / aspectRatio)); + float num3 = ((num < 1.7777778f) ? (aspectRatio / num) : 1f); + _halfTransparentTexture.SetDimensions(Mathf.CeilToInt((float)_halfTransparentTexture.width * num2), Mathf.CeilToInt((float)_halfTransparentTexture.height * num3)); + _backGroundTexture.SetDimensions(Mathf.CeilToInt(_halfTransparentTexture.width), Mathf.CeilToInt(_halfTransparentTexture.height)); + } + _webCamTexture = new WebCamTexture(devices[0].name, Screen.width, Screen.height, 30); + webCameraSetSuccess = true; + } + else + { + webCameraSetSuccess = false; + } + } + + private IEnumerator PlayCamera() + { + if (!(_webCamTexture == null) && !_webCamTexture.isPlaying) + { + _halfTransparentTexture.ResizeCollider(); + _backGroundTexture.ResizeCollider(); + _cameraTexture.mainTexture = _webCamTexture; + _descriptionTextLabel.gameObject.SetActive(value: false); + _blueFrameTexture.gameObject.SetActive(value: false); + _cameraTexture.gameObject.SetActive(value: false); + _halfTransparentTexture.gameObject.SetActive(value: false); + _webCamTexture.Play(); + while (_webCamTexture.width <= 16 && _webCamTexture.height <= 16) + { + yield return null; + } + float num = (float)_halfTransparentTexture.width / (float)_halfTransparentTexture.height; + float num2 = (float)_webCamTexture.width / (float)_webCamTexture.height; + if (num > num2) + { + _cameraTexture.SetDimensions(Mathf.CeilToInt((float)_halfTransparentTexture.height / (float)_webCamTexture.height * (float)_webCamTexture.width), _halfTransparentTexture.height); + } + else if (Mathf.Approximately(num, num2)) + { + _cameraTexture.SetDimensions(_halfTransparentTexture.width, _halfTransparentTexture.height); + } + else + { + _cameraTexture.SetDimensions(_halfTransparentTexture.width, Mathf.CeilToInt((float)_halfTransparentTexture.width / (float)_webCamTexture.width * (float)_webCamTexture.height)); + } + _cameraTexture.SetDimensions(Mathf.CeilToInt((float)_cameraTexture.width * 0.8f), Mathf.CeilToInt((float)_cameraTexture.height * 0.8f)); + int num3 = Mathf.FloorToInt((float)Mathf.Min(_halfTransparentTexture.width, _halfTransparentTexture.height) * 0.5f); + _blueFrameTexture.SetDimensions(num3, num3); + _blueFrameTexture.gameObject.SetActive(value: true); + Vector3 localPosition = _descriptionTextLabel.transform.localPosition; + localPosition.y = (float)num3 * 0.5f; + localPosition.y += 30f; + _descriptionTextLabel.transform.localPosition = localPosition; + _descriptionTextLabel.gameObject.SetActive(value: true); + float num4 = (float)Screen.width / (float)Screen.height; + Rect uvRect = default(Rect); + if (num4 > 1f) + { + uvRect.height = 1.359375f; + uvRect.width = uvRect.height * num4; + uvRect.x = (1f - uvRect.width) * 0.5f; + uvRect.y = (1f - uvRect.height) * 0.5f; + } + else + { + uvRect.width = 1.359375f; + uvRect.height = uvRect.width / num4; + uvRect.x = (1f - uvRect.width) * 0.5f; + uvRect.y = (1f - uvRect.height) * 0.5f; + } + _halfTransparentTexture.uvRect = uvRect; + _halfTransparentTexture.gameObject.SetActive(value: true); + yield return null; + _cameraTexture.gameObject.SetActive(value: true); + } + } + + private void StopCamera() + { + if (!(_webCamTexture == null) && _webCamTexture.isPlaying) + { + _webCamTexture.Stop(); + } + } + + private void LoadCameraRollImage(string path) + { + if (!loadCameraRollImageCalled) + { + loadCameraRollImageCalled = true; + byte[] data = File.ReadAllBytes(path); + Texture2D texture2D = new Texture2D(2, 2); + texture2D.LoadImage(data); + _qrCodeCameraText = QRCodeUtility.DecodeContentText(texture2D.GetPixels32(), texture2D.width, texture2D.height, isFromCamera: false); + bool flag = false; + if (!string.IsNullOrEmpty(_qrCodeCameraText) && QRCodeUtility.SetDeckFromQRCodeText(_qrCodeCameraText, _cardMasterId)) + { + _qrScanSuccessee.Call(); + flag = true; + } + if (!flag) + { + string arg = ((!string.IsNullOrEmpty(_qrCodeCameraText)) ? Data.SystemText.Get("Card_0267") : Data.SystemText.Get("Card_0268")); + _qrScanFailed.Call(arg); + } + UnityEngine.Object.Destroy(_qrCameraObject); + } + } +} diff --git a/SVSim.BattleEngine/Engine/Wizard/RefundWarningDialog.cs b/SVSim.BattleEngine/Engine/Wizard/RefundWarningDialog.cs new file mode 100644 index 0000000..0b908b1 --- /dev/null +++ b/SVSim.BattleEngine/Engine/Wizard/RefundWarningDialog.cs @@ -0,0 +1,54 @@ +using System; +using Cute; + +namespace Wizard; + +public class RefundWarningDialog +{ + private const int PANEL_DEPTH = 25; + + public static void Start(PaymentBase.RefundWarningType warningType, Action onFinish) + { + if (warningType == PaymentBase.RefundWarningType.NONE) + { + onFinish.Call(); + return; + } + SystemText systemText = Data.SystemText; + DialogBase dialogBase = UIManager.GetInstance().CreateDialogClose(); + dialogBase.SetPanelDepth(25); + if (warningType == PaymentBase.RefundWarningType.WARNING) + { + dialogBase.SetButtonLayout(DialogBase.ButtonLayout.BlueBtn_CancelBtn); + dialogBase.SetTitleLabel(systemText.Get("Shop_0215")); + dialogBase.SetText(systemText.Get("Shop_0216")); + dialogBase.SetButtonText(systemText.Get("Dia_BuyCrystal_004_Button")); + dialogBase.onPushButton1 = delegate + { + onFinish.Call(); + }; + dialogBase.onPushButton2 = delegate + { + OnPaymentCancel(); + }; + dialogBase.onCloseWithoutSelect = delegate + { + OnPaymentCancel(); + }; + } + else + { + dialogBase.SetButtonLayout(DialogBase.ButtonLayout.OkBtn); + dialogBase.SetTitleLabel(systemText.Get("Shop_0218")); + dialogBase.SetText(systemText.Get("Shop_0217")); + dialogBase.OnClose = delegate + { + OnPaymentCancel(); + }; + } + } + + private static void OnPaymentCancel() + { + } +} diff --git a/SVSim.BattleEngine/Engine/Wizard/RegionCodeUpdateTask.cs b/SVSim.BattleEngine/Engine/Wizard/RegionCodeUpdateTask.cs new file mode 100644 index 0000000..8cc376b --- /dev/null +++ b/SVSim.BattleEngine/Engine/Wizard/RegionCodeUpdateTask.cs @@ -0,0 +1,28 @@ +namespace Wizard; + +public class RegionCodeUpdateTask : BaseTask +{ + public class RegionCodeUpdateTaskParam : BaseParam + { + public int initialize_flag; + } + + public RegionCodeUpdateTask() + { + base.type = ApiType.Type.RegionCodeUpdate; + } + + public void SetParameter(int initialize_flag) + { + RegionCodeUpdateTaskParam regionCodeUpdateTaskParam = new RegionCodeUpdateTaskParam(); + regionCodeUpdateTaskParam.initialize_flag = initialize_flag; + base.Params = regionCodeUpdateTaskParam; + } + + protected override int Parse() + { + int result = base.Parse(); + _ = 1; + return result; + } +} diff --git a/SVSim.BattleEngine/Engine/Wizard/ReplayDialog.cs b/SVSim.BattleEngine/Engine/Wizard/ReplayDialog.cs new file mode 100644 index 0000000..909ed24 --- /dev/null +++ b/SVSim.BattleEngine/Engine/Wizard/ReplayDialog.cs @@ -0,0 +1,167 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using Cute; +using UnityEngine; + +namespace Wizard; + +public class ReplayDialog : MonoBehaviour +{ + [SerializeField] + private GameObject _replayDialogContent; + + [SerializeField] + private GameObject _noReplayLabel; + + [SerializeField] + private UIWrapContent _wrapContent; + + [SerializeField] + private UIScrollView _scrollView; + + public Action OnClickReplayButton; + + private List _initTextures = new List(); + + private List _loadedTextures = new List(); + + private LoadQueue _loadQueue = new LoadQueue(); + + private List _items; + + public static void Create() + { + GameObject gameObject = UnityEngine.Object.Instantiate(UIManager.GetInstance().ReplayDialogPrefab); + ReplayDialog script = gameObject.GetComponent(); + DialogBase dialog = UIManager.GetInstance().CreateDialogClose(); + dialog.SetSize(DialogBase.Size.XL); + dialog.SetTitleLabel(Data.SystemText.Get("OtherTop_0033")); + dialog.SetObj(gameObject); + dialog.SetButtonLayout(DialogBase.ButtonLayout.CloseBtn); + dialog.SetDisp(inDisp: false); + script.SetupContents(Data.ReplayInfo.Items, delegate + { + dialog.SetDisp(inDisp: true); + script.OnClickReplayButton = delegate + { + dialog.Close(); + }; + }); + } + + public void SetupContents(List items, Action onLoaded) + { + _items = items; + _wrapContent.onInitializeItem = OnInitializeItem; + _noReplayLabel.SetActive(items.Count == 0); + _wrapContent.minIndex = -(items.Count - 1); + _wrapContent.maxIndex = 0; + int num = (int)(_scrollView.panel.height / (float)_wrapContent.itemSize) + 1; + bool active = num <= items.Count; + num = Math.Min(num, items.Count); + for (int i = 0; i < num; i++) + { + string emblemTexturePath = GetEmblemTexturePath(_items[i], isfetch: false); + string countryTexturePath = GetCountryTexturePath(_items[i], isfetch: false); + if (!_initTextures.Contains(emblemTexturePath)) + { + _initTextures.Add(emblemTexturePath); + } + if (!string.IsNullOrEmpty(countryTexturePath) && !_initTextures.Contains(countryTexturePath)) + { + _initTextures.Add(countryTexturePath); + } + } + List list = new List(); + for (int j = num; j < items.Count; j++) + { + string emblemTexturePath2 = GetEmblemTexturePath(_items[j], isfetch: false); + string countryTexturePath2 = GetCountryTexturePath(_items[j], isfetch: false); + if (!_initTextures.Contains(emblemTexturePath2) && !list.Contains(emblemTexturePath2)) + { + list.Add(emblemTexturePath2); + } + if (!string.IsNullOrEmpty(countryTexturePath2) && !_initTextures.Contains(countryTexturePath2) && !list.Contains(countryTexturePath2)) + { + list.Add(countryTexturePath2); + } + } + for (int k = 0; k < list.Count; k++) + { + string path = list[k]; + _loadQueue.AddToLast(path, new List { path }, null, delegate + { + _loadedTextures.Add(path); + }); + } + if (num == 1) + { + GameObject gameObject = AddContent(_scrollView.gameObject); + StartCoroutine(gameObject.GetComponent().Setup(_items[0], _loadedTextures)); + } + else + { + for (int num2 = 0; num2 < num; num2++) + { + AddContent(_wrapContent.gameObject); + } + } + _scrollView.ResetPosition(); + _scrollView.enabled = active; + _scrollView.verticalScrollBar.gameObject.SetActive(active); + StartCoroutine(Toolbox.ResourcesManager.LoadAssetGroupAsync(_initTextures, delegate + { + _loadedTextures.AddRange(_initTextures); + _loadQueue.StartLoad(); + onLoaded.Call(); + })); + } + + private void OnInitializeItem(GameObject go, int wrapIndex, int realIndex) + { + ReplayInfoItem item = _items[-realIndex]; + StartCoroutine(go.GetComponent().Setup(item, _loadedTextures)); + } + + private string GetEmblemTexturePath(ReplayInfoItem item, bool isfetch) + { + return Toolbox.ResourcesManager.GetAssetTypePath(item.OpponentEmblemId, ResourcesManager.AssetLoadPathType.Emblem_S, isfetch); + } + + private string GetCountryTexturePath(ReplayInfoItem item, bool isfetch) + { + if (string.IsNullOrEmpty(item.OpponentCountryCode)) + { + return ""; + } + return Toolbox.ResourcesManager.GetAssetTypePath(item.OpponentCountryCode, ResourcesManager.AssetLoadPathType.Country_S, isfetch); + } + + private void OnDestroy() + { + UIManager.GetInstance().StartCoroutine(UnloadTextures()); + } + + private IEnumerator UnloadTextures() + { + _loadQueue.Clear(); + while (_loadQueue.IsClearing) + { + yield return null; + } + Toolbox.ResourcesManager.RemoveAssetGroup(_loadedTextures); + } + + private GameObject AddContent(GameObject gameObject) + { + GameObject obj = NGUITools.AddChild(gameObject, _replayDialogContent); + ReplayDialogContent component = obj.GetComponent(); + component.GetComponent().scrollView = _scrollView; + component.OnClickReplayButton = delegate + { + OnClickReplayButton.Call(); + }; + return obj; + } +} diff --git a/SVSim.BattleEngine/Engine/Wizard/ReplayInfoTask.cs b/SVSim.BattleEngine/Engine/Wizard/ReplayInfoTask.cs new file mode 100644 index 0000000..9bce7a9 --- /dev/null +++ b/SVSim.BattleEngine/Engine/Wizard/ReplayInfoTask.cs @@ -0,0 +1,54 @@ +using System.Collections.Generic; +using LitJson; + +namespace Wizard; + +public class ReplayInfoTask : BaseTask +{ + public class ReplayInfoTaskParam : BaseParam + { + } + + public ReplayInfoTask() + { + base.type = ApiType.Type.ReplayInfo; + } + + public void SetParameter() + { + ReplayInfoTaskParam replayInfoTaskParam = new ReplayInfoTaskParam(); + base.Params = replayInfoTaskParam; + } + + protected override int Parse() + { + int num = base.Parse(); + if (num != 1) + { + return num; + } + List list = new List(); + JsonData jsonData = base.ResponseData["data"]["replay_list"]; + for (int i = 0; i < jsonData.Count; i++) + { + list.Add(new ReplayInfoItem(jsonData[i])); + } + Data.ReplayInfo.Items = list; + if (base.ResponseData["data"].Keys.Contains("feature_maintenance_list")) + { + List list2 = new List(); + for (int j = 0; j < base.ResponseData["data"]["feature_maintenance_list"].Count; j++) + { + list2.Add((NetworkDefine.MAINTENANCE_TYPE)base.ResponseData["data"]["feature_maintenance_list"][j].ToInt()); + } + Data.UpdateMaintenance(new List + { + NetworkDefine.MAINTENANCE_TYPE.REPLAY_ALL, + NetworkDefine.MAINTENANCE_TYPE.NEWREPLAY_ALL, + NetworkDefine.MAINTENANCE_TYPE.NEWREPLAY_EXCLUDE_ROTATION, + NetworkDefine.MAINTENANCE_TYPE.NEWREPLAY_RECORD + }, list2); + } + return num; + } +} diff --git a/SVSim.BattleEngine/Engine/Wizard/RoomTwoPickApiVariation.cs b/SVSim.BattleEngine/Engine/Wizard/RoomTwoPickApiVariation.cs new file mode 100644 index 0000000..f129863 --- /dev/null +++ b/SVSim.BattleEngine/Engine/Wizard/RoomTwoPickApiVariation.cs @@ -0,0 +1,299 @@ +using System.Collections.Generic; +using Wizard.RoomMatch; + +namespace Wizard; + +public static class RoomTwoPickApiVariation +{ + public enum VariationType + { + DoMatching, + Finish, + ResetDeck, + BeginCreateDeck, + SelectClass, + SelectCardSet + } + + private static readonly Dictionary NormalApiTypes = new Dictionary + { + { + VariationType.DoMatching, + ApiType.Type.OpenRoomBattle2PickBattleDoMatching + }, + { + VariationType.Finish, + ApiType.Type.OpenRoom2PickMatchFinish + }, + { + VariationType.ResetDeck, + ApiType.Type.OpenRoom2PickBattleDeckReset + }, + { + VariationType.BeginCreateDeck, + ApiType.Type.OpenRoom2PickBattleBeginCreateDeck + }, + { + VariationType.SelectClass, + ApiType.Type.OpenRoom2PickBattleSelectClass + }, + { + VariationType.SelectCardSet, + ApiType.Type.OpenRoom2PickBattleSelectCard + } + }; + + private static readonly Dictionary MultiApiTypes = new Dictionary + { + { + VariationType.DoMatching, + ApiType.Type.OpenRoomBattle2PickMultiBattleDoMatching + }, + { + VariationType.Finish, + ApiType.Type.OpenRoom2PickMultiBattleMatchFinish + }, + { + VariationType.ResetDeck, + ApiType.Type.OpenRoom2PickMultiBattleDeckReset + }, + { + VariationType.BeginCreateDeck, + ApiType.Type.OpenRoom2PickMultiBattleBeginCreateDeck + }, + { + VariationType.SelectClass, + ApiType.Type.OpenRoom2PickMultiBattleSelectClass + }, + { + VariationType.SelectCardSet, + ApiType.Type.OpenRoom2PickMultiBattleSelectCard + } + }; + + private static readonly Dictionary BackdraftApiTypes = new Dictionary + { + { + VariationType.DoMatching, + ApiType.Type.OpenRoomBattle2PickDraftBattleDoMatching + }, + { + VariationType.Finish, + ApiType.Type.OpenRoom2PickDraftMatchFinish + }, + { + VariationType.ResetDeck, + ApiType.Type.OpenRoom2PickDraftBattleDeckReset + }, + { + VariationType.BeginCreateDeck, + ApiType.Type.OpenRoom2PickDraftBattleBeginCreateDeck + }, + { + VariationType.SelectClass, + ApiType.Type.OpenRoom2PickDraftBattleSelectClass + }, + { + VariationType.SelectCardSet, + ApiType.Type.OpenRoom2PickDraftBattleSelectCard + } + }; + + private static readonly Dictionary CubeApiTypes = new Dictionary + { + { + VariationType.DoMatching, + ApiType.Type.OpenRoom2PickCubeBattleDoMatching + }, + { + VariationType.Finish, + ApiType.Type.OpenRoom2PickCubeBattleFinish + }, + { + VariationType.ResetDeck, + ApiType.Type.OpenRoom2PickCubeBattleResetDeck + }, + { + VariationType.BeginCreateDeck, + ApiType.Type.OpenRoom2PickCubeBattleBeginCreateDeck + }, + { + VariationType.SelectClass, + ApiType.Type.OpenRoom2PickCubeBattleSelectClass + }, + { + VariationType.SelectCardSet, + ApiType.Type.OpenRoom2PickCubeBattleSelectCardSet + } + }; + + private static readonly Dictionary MultiCubeApiTypes = new Dictionary + { + { + VariationType.DoMatching, + ApiType.Type.OpenRoom2PickCubeMultiBattleDoMatching + }, + { + VariationType.Finish, + ApiType.Type.OpenRoom2PickCubeMultiBattleFinish + }, + { + VariationType.ResetDeck, + ApiType.Type.OpenRoom2PickCubeMultiBattleResetDeck + }, + { + VariationType.BeginCreateDeck, + ApiType.Type.OpenRoom2PickCubeMultiBattleBeginCreateDeck + }, + { + VariationType.SelectClass, + ApiType.Type.OpenRoom2PickCubeMultiBattleSelectClass + }, + { + VariationType.SelectCardSet, + ApiType.Type.OpenRoom2PickCubeMultiBattleSelectCardSet + } + }; + + private static readonly Dictionary BackDraftCubeApiTypes = new Dictionary + { + { + VariationType.DoMatching, + ApiType.Type.OpenRoomBattle2PickCubeDraftBattleDoMatching + }, + { + VariationType.Finish, + ApiType.Type.OpenRoom2PickCubeDraftMatchFinish + }, + { + VariationType.ResetDeck, + ApiType.Type.OpenRoom2PickCubeDraftBattleDeckReset + }, + { + VariationType.BeginCreateDeck, + ApiType.Type.OpenRoom2PickCubeDraftBattleBeginCreateDeck + }, + { + VariationType.SelectClass, + ApiType.Type.OpenRoom2PickCubeDraftBattleSelectClass + }, + { + VariationType.SelectCardSet, + ApiType.Type.OpenRoom2PickCubeDraftBattleSelectCard + } + }; + + private static readonly Dictionary ChaosApiTypes = new Dictionary + { + { + VariationType.DoMatching, + ApiType.Type.OpenRoom2PickChaosBattleDoMatching + }, + { + VariationType.Finish, + ApiType.Type.OpenRoom2PickChaosBattleFinish + }, + { + VariationType.ResetDeck, + ApiType.Type.OpenRoom2PickChaosBattleResetDeck + }, + { + VariationType.BeginCreateDeck, + ApiType.Type.OpenRoom2PickChaosBattleBeginCreateDeck + }, + { + VariationType.SelectClass, + ApiType.Type.OpenRoom2PickChaosBattleSelectClass + }, + { + VariationType.SelectCardSet, + ApiType.Type.OpenRoom2PickChaosBattleSelectCardSet + } + }; + + private static readonly Dictionary MultiChaosApiTypes = new Dictionary + { + { + VariationType.DoMatching, + ApiType.Type.OpenRoom2PickChaosMultiBattleDoMatching + }, + { + VariationType.Finish, + ApiType.Type.OpenRoom2PickChaosMultiBattleFinish + }, + { + VariationType.ResetDeck, + ApiType.Type.OpenRoom2PickChaosMultiBattleResetDeck + }, + { + VariationType.BeginCreateDeck, + ApiType.Type.OpenRoom2PickChaosMultiBattleBeginCreateDeck + }, + { + VariationType.SelectClass, + ApiType.Type.OpenRoom2PickChaosMultiBattleSelectClass + }, + { + VariationType.SelectCardSet, + ApiType.Type.OpenRoom2PickChaosMultiBattleSelectCardSet + } + }; + + private static readonly Dictionary BackdraftChaosApiTypes = new Dictionary + { + { + VariationType.DoMatching, + ApiType.Type.OpenRoomBattle2PickChaosDraftBattleDoMatching + }, + { + VariationType.Finish, + ApiType.Type.OpenRoom2PickChaosDraftMatchFinish + }, + { + VariationType.ResetDeck, + ApiType.Type.OpenRoom2PickChaosDraftBattleDeckReset + }, + { + VariationType.BeginCreateDeck, + ApiType.Type.OpenRoom2PickChaosDraftBattleBeginCreateDeck + }, + { + VariationType.SelectClass, + ApiType.Type.OpenRoom2PickChaosDraftBattleSelectClass + }, + { + VariationType.SelectCardSet, + ApiType.Type.OpenRoom2PickChaosDraftBattleSelectCard + } + }; + + public static ApiType.Type GetApiType(TwoPickFormat twoPickFormat, RoomConnectController.BattleRule rule, VariationType type) + { + Dictionary dictionary = NormalApiTypes; + switch (twoPickFormat) + { + case TwoPickFormat.Backdraft: + dictionary = BackdraftApiTypes; + break; + case TwoPickFormat.BackdraftCube: + dictionary = BackDraftCubeApiTypes; + break; + case TwoPickFormat.BackdraftChaos: + dictionary = BackdraftChaosApiTypes; + break; + case TwoPickFormat.Cube: + dictionary = ((rule != RoomConnectController.BattleRule.Bo3 && rule != RoomConnectController.BattleRule.Bo5) ? CubeApiTypes : MultiCubeApiTypes); + break; + case TwoPickFormat.Chaos: + dictionary = ((rule != RoomConnectController.BattleRule.Bo3 && rule != RoomConnectController.BattleRule.Bo5) ? ChaosApiTypes : MultiChaosApiTypes); + break; + default: + if (rule == RoomConnectController.BattleRule.Bo3 || rule == RoomConnectController.BattleRule.Bo5) + { + dictionary = MultiApiTypes; + } + break; + } + return dictionary[type]; + } +} diff --git a/SVSim.BattleEngine/Engine/Wizard/SealedFinishTask.cs b/SVSim.BattleEngine/Engine/Wizard/SealedFinishTask.cs new file mode 100644 index 0000000..8b6e610 --- /dev/null +++ b/SVSim.BattleEngine/Engine/Wizard/SealedFinishTask.cs @@ -0,0 +1,26 @@ +using LitJson; + +namespace Wizard; + +public class SealedFinishTask : BaseTask +{ + public SealedFinishTask() + { + base.type = ApiType.Type.ArenaSealedFinish; + } + + protected override int Parse() + { + int num = base.Parse(); + if (num != 1) + { + return num; + } + JsonData jsonData = base.ResponseData["data"]; + SealedData sealedData = Data.ArenaData.SealedData; + sealedData.SetRewardCardCandidates(jsonData); + sealedData.SetRewardInfo(jsonData); + sealedData.UpdateHaveUserGoodsNum(jsonData); + return num; + } +} diff --git a/SVSim.BattleEngine/Engine/Wizard/SealedGetMaintCardListTask.cs b/SVSim.BattleEngine/Engine/Wizard/SealedGetMaintCardListTask.cs new file mode 100644 index 0000000..428198e --- /dev/null +++ b/SVSim.BattleEngine/Engine/Wizard/SealedGetMaintCardListTask.cs @@ -0,0 +1,33 @@ +using LitJson; + +namespace Wizard; + +public class SealedGetMaintCardListTask : BaseTask +{ + public SealedGetMaintCardListTask() + { + base.type = ApiType.Type.ArenaSealedGetMaintCardList; + } + + protected override int Parse() + { + int num = base.Parse(); + if (num != 1) + { + return num; + } + JsonData jsonData = base.ResponseData["data"]["maintenance_card_list"]; + int count = jsonData.Count; + int[] array = ((count > 0) ? new int[count * 3] : null); + int num2 = 0; + for (int i = 0; i < count; i++) + { + int num3 = jsonData[i]["card_id"].ToInt(); + array[num2++] = num3; + array[num2++] = SealedData.ConvertToSealedCardId(num3, isPhantomCard: false); + array[num2++] = SealedData.ConvertToSealedCardId(num3, isPhantomCard: true); + } + GameMgr.GetIns().GetDataMgr().SetMaintenanceCardIds(array); + return num; + } +} diff --git a/SVSim.BattleEngine/Engine/Wizard/SealedRetireTask.cs b/SVSim.BattleEngine/Engine/Wizard/SealedRetireTask.cs new file mode 100644 index 0000000..f04dea6 --- /dev/null +++ b/SVSim.BattleEngine/Engine/Wizard/SealedRetireTask.cs @@ -0,0 +1,27 @@ +using LitJson; + +namespace Wizard; + +public class SealedRetireTask : BaseTask +{ + public SealedRetireTask() + { + base.type = ApiType.Type.ArenaSealedRetire; + } + + protected override int Parse() + { + int num = base.Parse(); + if (num != 1) + { + return num; + } + JsonData jsonData = base.ResponseData["data"]; + SealedData sealedData = Data.ArenaData.SealedData; + sealedData.SetRetired(isRetired: true); + sealedData.SetRewardCardCandidates(jsonData); + sealedData.SetRewardInfo(jsonData); + sealedData.UpdateHaveUserGoodsNum(jsonData); + return num; + } +} diff --git a/SVSim.BattleEngine/Engine/Wizard/SealedSelectClassTask.cs b/SVSim.BattleEngine/Engine/Wizard/SealedSelectClassTask.cs new file mode 100644 index 0000000..8d610c0 --- /dev/null +++ b/SVSim.BattleEngine/Engine/Wizard/SealedSelectClassTask.cs @@ -0,0 +1,41 @@ +using LitJson; + +namespace Wizard; + +public class SealedSelectClassTask : BaseTask +{ + public class Param : BaseParam + { + public int class_id; + + public Param(int classId) + { + class_id = classId; + } + } + + public SealedSelectClassTask(int classId) + { + base.type = ApiType.Type.ArenaSealedSelectClass; + base.Params = new Param(classId); + } + + protected override int Parse() + { + int num = base.Parse(); + if (num != 1) + { + return num; + } + JsonData jsonData = base.ResponseData["data"]; + SealedData sealedData = Data.ArenaData.SealedData; + sealedData.UpdateHaveUserGoodsNum(jsonData); + sealedData.SetSelectedClassId((base.Params as Param).class_id); + sealedData.SetGachaCardInfo(jsonData); + sealedData.SetGachaSupplyInfo(jsonData); + sealedData.SetSealedCardInfo(jsonData, isRegisterSealedCard: true); + sealedData.SetDeckCompleted(jsonData); + sealedData.SetIsSpecialEffect(jsonData); + return num; + } +} diff --git a/SVSim.BattleEngine/Engine/Wizard/SealedSelectPhantomCardTask.cs b/SVSim.BattleEngine/Engine/Wizard/SealedSelectPhantomCardTask.cs new file mode 100644 index 0000000..ccd1ac7 --- /dev/null +++ b/SVSim.BattleEngine/Engine/Wizard/SealedSelectPhantomCardTask.cs @@ -0,0 +1,39 @@ +using LitJson; + +namespace Wizard; + +public class SealedSelectPhantomCardTask : BaseTask +{ + public class Param : BaseParam + { + public int select_card_id; + + public bool is_retire; + + public Param(int selectCardId, bool isRetire) + { + select_card_id = selectCardId; + is_retire = isRetire; + } + } + + public SealedSelectPhantomCardTask(int selectCardId) + { + base.type = ApiType.Type.ArenaSealedSelectPhantomCard; + base.Params = new Param(selectCardId, Data.ArenaData.SealedData.IsRetired.Value); + } + + protected override int Parse() + { + int num = base.Parse(); + if (num != 1) + { + return num; + } + JsonData jsonData = base.ResponseData["data"]; + SealedData sealedData = Data.ArenaData.SealedData; + sealedData.SetRewardInfo(jsonData); + sealedData.UpdateHaveUserGoodsNum(jsonData); + return num; + } +} diff --git a/SVSim.BattleEngine/Engine/Wizard/SealedTopTask.cs b/SVSim.BattleEngine/Engine/Wizard/SealedTopTask.cs new file mode 100644 index 0000000..a8d12fd --- /dev/null +++ b/SVSim.BattleEngine/Engine/Wizard/SealedTopTask.cs @@ -0,0 +1,28 @@ +using LitJson; + +namespace Wizard; + +public class SealedTopTask : BaseTask +{ + public SealedTopTask() + { + base.type = ApiType.Type.ArenaSealedTop; + } + + protected override int Parse() + { + int num = base.Parse(); + if (num != 1) + { + return num; + } + JsonData jsonData = base.ResponseData["data"]; + SealedData sealedData = Data.ArenaData.SealedData; + sealedData.SetEntryInfo(jsonData); + sealedData.SetClassInfo(jsonData); + sealedData.SetSealedCardInfo(jsonData, isRegisterSealedCard: true); + sealedData.SetDeckCompleted(jsonData); + sealedData.SetBattleResultInfo(jsonData); + return num; + } +} diff --git a/SVSim.BattleEngine/Engine/Wizard/SealedUpdateDeckTask.cs b/SVSim.BattleEngine/Engine/Wizard/SealedUpdateDeckTask.cs new file mode 100644 index 0000000..ecfa5df --- /dev/null +++ b/SVSim.BattleEngine/Engine/Wizard/SealedUpdateDeckTask.cs @@ -0,0 +1,64 @@ +using System.Collections.Generic; +using LitJson; + +namespace Wizard; + +public class SealedUpdateDeckTask : BaseTask +{ + private enum eArrayIndex + { + AcquiredCard, + PhantomCard, + Max + } + + public class Param : BaseParam + { + public int[][] card_id_array; + + public Param(int[][] cardIdArray) + { + card_id_array = cardIdArray; + } + } + + public SealedUpdateDeckTask(List cardList) + { + base.type = ApiType.Type.ArenaSealedUpdateDeck; + List list = new List(); + List list2 = new List(); + SealedData sealedData = Data.ArenaData.SealedData; + for (int i = 0; i < cardList.Count; i++) + { + SealedCardInfo sealedCardInfo = sealedData.GetSealedCardInfo(cardList[i]); + int originalCardId = sealedCardInfo.OriginalCardId; + if (!sealedCardInfo.IsPhantom) + { + list.Add(originalCardId); + } + else + { + list2.Add(originalCardId); + } + } + base.Params = new Param(new int[2][] + { + list.ToArray(), + list2.ToArray() + }); + } + + protected override int Parse() + { + int num = base.Parse(); + if (num != 1) + { + return num; + } + JsonData jsonData = base.ResponseData["data"]; + SealedData sealedData = Data.ArenaData.SealedData; + sealedData.SetSealedCardInfo(jsonData, isRegisterSealedCard: false); + sealedData.SetDeckCompleted(jsonData); + return num; + } +} diff --git a/SVSim.BattleEngine/Engine/Wizard/SelectRandomSkinButton.cs b/SVSim.BattleEngine/Engine/Wizard/SelectRandomSkinButton.cs new file mode 100644 index 0000000..17899ef --- /dev/null +++ b/SVSim.BattleEngine/Engine/Wizard/SelectRandomSkinButton.cs @@ -0,0 +1,55 @@ +using System; +using Cute; +using UnityEngine; + +namespace Wizard; + +public class SelectRandomSkinButton : MonoBehaviour +{ + [SerializeField] + private UITexture _texture; + + [SerializeField] + private UIButton _button; + + private bool _isSelectStatus; + + public void Initialize(int skinId, bool isSelect, Action onClick, Action onDragStart, Action onDrag) + { + string assetTypePath = Toolbox.ResourcesManager.GetAssetTypePath(skinId.ToString(), ResourcesManager.AssetLoadPathType.ClassCharaButton, isfetch: true); + _texture.mainTexture = Toolbox.ResourcesManager.LoadObject(assetTypePath) as Texture; + SetSelectStatus(isSelect); + UIEventListener.Get(_button.gameObject).onClick = delegate + { + bool flag = !_isSelectStatus; + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_COMMON_BUTTON); + SetSelectStatus(flag); + onClick(skinId, flag); + }; + UIEventListener.Get(_button.gameObject).onDragStart = delegate(GameObject g) + { + onDragStart(g); + }; + UIEventListener.Get(_button.gameObject).onDrag = delegate(GameObject g, Vector2 d) + { + onDrag(g, d); + }; + } + + public void SetSelectStatus(bool isSelect) + { + _isSelectStatus = isSelect; + SetButtonGray(!isSelect); + } + + private void SetButtonGray(bool isGray) + { + Color color = (isGray ? LabelDefine.TEXT_COLOR_BUTTON_DISABLE : ((Color32)Color.white)); + _texture.color = color; + _button.hover = color; + _button.pressed = color; + _button.defaultColor = color; + _button.disabledColor = color; + _button.UpdateColor(instant: true); + } +} diff --git a/SVSim.BattleEngine/Engine/Wizard/SelectRandomSkinDialog.cs b/SVSim.BattleEngine/Engine/Wizard/SelectRandomSkinDialog.cs new file mode 100644 index 0000000..ab58670 --- /dev/null +++ b/SVSim.BattleEngine/Engine/Wizard/SelectRandomSkinDialog.cs @@ -0,0 +1,280 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using System.Linq; +using Cute; +using UnityEngine; + +namespace Wizard; + +public class SelectRandomSkinDialog : MonoBehaviour +{ + private const int ITEM_NUM_PAR_PAGE = 21; + + private const float FLICK_MARGIN = 70f; + + [SerializeField] + private UIGrid _itemGrid; + + [SerializeField] + private GameObject _skinButtonItemOriginal; + + [SerializeField] + private UIButton _btnAllOff; + + [SerializeField] + private UILabel _labelButton; + + [SerializeField] + private UIButton _btnPrevPage; + + [SerializeField] + private UIButton _btnNextPage; + + [SerializeField] + private BoxCollider _flickCollider; + + [SerializeField] + private UIPageIndicator _indicator; + + private int _currentPageIndex; + + private int _lastPageIndex = 1; + + private bool _flickStart; + + protected List _loadedResourceList = new List(); + + private DialogBase _dialog; + + private List _usableSkinIdList; + + private List _selecteSkinIdList; + + private List _skinButtonList; + + private bool IsFirstPage => _currentPageIndex <= 1; + + private bool IsLastPage => _currentPageIndex >= _lastPageIndex; + + public static DialogBase Create(List usableSkinIdList, List selectedSkinIdList, Action> onClickOk) + { + SelectRandomSkinDialog component = (UnityEngine.Object.Instantiate(Resources.Load("UI/layoutParts/Dialog/SelectRandomSkinDialog")) as GameObject).GetComponent(); + component.CreateDialog(onClickOk); + component.Initialize(usableSkinIdList, selectedSkinIdList); + return component._dialog; + } + + private void CreateDialog(Action> onClickOk) + { + _dialog = UIManager.GetInstance().CreateDialogClose(); + _dialog.SetSize(DialogBase.Size.XL); + _dialog.SetTitleLabel(Data.SystemText.Get("Card_0258")); + _dialog.SetButtonLayout(DialogBase.ButtonLayout.OkBtn); + _dialog.SetButtonDelegate(delegate + { + _selecteSkinIdList.Sort(); + onClickOk.Call(_selecteSkinIdList); + }); + _dialog.SetObj(base.gameObject); + } + + private void Initialize(List usableSkinIdList, List selectedSkinIdList) + { + UIManager.GetInstance().createInSceneCenterLoading(); + StartCoroutine(LoadResources(usableSkinIdList, delegate + { + GenerateSkinButtons(usableSkinIdList, selectedSkinIdList); + InitializePage(usableSkinIdList); + ShowPage(1); + UIManager.GetInstance().closeInSceneCenterLoading(); + })); + } + + private IEnumerator LoadResources(List usableSkinIdList, Action onFinish) + { + List skinButtonPathList = new List(); + for (int i = 0; i < usableSkinIdList.Count; i++) + { + string path = usableSkinIdList[i].ToString(); + string assetTypePath = Toolbox.ResourcesManager.GetAssetTypePath(path, ResourcesManager.AssetLoadPathType.ClassCharaButton); + skinButtonPathList.Add(assetTypePath); + } + yield return StartCoroutine(Toolbox.ResourcesManager.LoadAssetGroupAsync(skinButtonPathList, null)); + _loadedResourceList.AddRange(skinButtonPathList); + onFinish.Call(); + } + + private void OnDestroy() + { + if (_loadedResourceList.Count > 0) + { + Toolbox.ResourcesManager.RemoveAssetGroup(_loadedResourceList); + _loadedResourceList.Clear(); + } + } + + private void GenerateSkinButtons(List usableSkinIdList, List selectedSkinIdList) + { + _usableSkinIdList = usableSkinIdList; + _selecteSkinIdList = new List(selectedSkinIdList); + _skinButtonList = new List(); + List list = new List(); + selectedSkinIdList.Sort(); + list.AddRange(selectedSkinIdList); + List list2 = usableSkinIdList.Except(selectedSkinIdList).ToList(); + list2.Sort(); + list.AddRange(list2); + for (int i = 0; i < list.Count; i++) + { + SelectRandomSkinButton component = NGUITools.AddChild(_itemGrid.gameObject, _skinButtonItemOriginal.gameObject).GetComponent(); + int skinId = list[i]; + component.Initialize(skinId, _selecteSkinIdList.Contains(skinId), delegate(int id, bool status) + { + if (status) + { + _selecteSkinIdList.Add(skinId); + } + else + { + _selecteSkinIdList.Remove(skinId); + } + UpdateAllButton(); + }, OnDragStart, OnDrag); + _skinButtonList.Add(component); + } + } + + private void InitializePage(List usableSkinList) + { + _lastPageIndex = (usableSkinList.Count - 1) / 21 + 1; + _currentPageIndex = 1; + _indicator.Init(_lastPageIndex); + if (_lastPageIndex > 1) + { + _flickCollider.gameObject.SetActive(value: true); + UIEventListener uIEventListener = UIEventListener.Get(_flickCollider.gameObject); + uIEventListener.onDragStart = (UIEventListener.VoidDelegate)Delegate.Combine(uIEventListener.onDragStart, new UIEventListener.VoidDelegate(OnDragStart)); + UIEventListener uIEventListener2 = UIEventListener.Get(_flickCollider.gameObject); + uIEventListener2.onDrag = (UIEventListener.VectorDelegate)Delegate.Combine(uIEventListener2.onDrag, new UIEventListener.VectorDelegate(OnDrag)); + _btnPrevPage.gameObject.SetActive(value: true); + _btnNextPage.gameObject.SetActive(value: true); + UIEventListener uIEventListener3 = UIEventListener.Get(_btnPrevPage.gameObject); + uIEventListener3.onClick = (UIEventListener.VoidDelegate)Delegate.Combine(uIEventListener3.onClick, (UIEventListener.VoidDelegate)delegate + { + ShowPrevPage(); + }); + UIEventListener uIEventListener4 = UIEventListener.Get(_btnNextPage.gameObject); + uIEventListener4.onClick = (UIEventListener.VoidDelegate)Delegate.Combine(uIEventListener4.onClick, (UIEventListener.VoidDelegate)delegate + { + ShowNextPage(); + }); + } + _btnAllOff.onClick.Clear(); + _btnAllOff.onClick.Add(new EventDelegate(delegate + { + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_COMMON_BUTTON); + OnClickAllOffButton(); + })); + UpdateAllButton(); + } + + private void UpdateAllButton() + { + SystemText systemText = Data.SystemText; + if (_selecteSkinIdList.Count > 0) + { + _labelButton.text = systemText.Get("Card_0259"); + UIManager.SetObjectToGrey(_dialog.button1.gameObject, b: false); + } + else + { + _labelButton.text = systemText.Get("Card_0260"); + UIManager.SetObjectToGrey(_dialog.button1.gameObject, b: true); + } + } + + private void OnClickAllOffButton() + { + if (_selecteSkinIdList.Count > 0) + { + _selecteSkinIdList.Clear(); + for (int i = 0; i < _skinButtonList.Count; i++) + { + _skinButtonList[i].SetSelectStatus(isSelect: false); + } + } + else + { + _selecteSkinIdList.AddRange(_usableSkinIdList); + for (int j = 0; j < _skinButtonList.Count; j++) + { + _skinButtonList[j].SetSelectStatus(isSelect: true); + } + } + UpdateAllButton(); + } + + private void ShowPage(int pageIndex) + { + _currentPageIndex = pageIndex; + for (int i = 0; i < _skinButtonList.Count; i++) + { + _skinButtonList[i].gameObject.SetActive(value: false); + } + int num = (_currentPageIndex - 1) * 21; + int num2 = Mathf.Min(num + 21, _skinButtonList.Count); + for (int j = num; j < num2; j++) + { + _skinButtonList[j].gameObject.SetActive(value: true); + } + _itemGrid.Reposition(); + _btnPrevPage.gameObject.SetActive(!IsFirstPage); + _btnNextPage.gameObject.SetActive(!IsLastPage); + _indicator.UpdateIndicator(_currentPageIndex); + } + + private void ShowPrevPage() + { + if (!IsFirstPage) + { + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_SLIDE_BTN); + ShowPage(_currentPageIndex - 1); + } + } + + private void ShowNextPage() + { + if (!IsLastPage) + { + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_SLIDE_BTN); + ShowPage(_currentPageIndex + 1); + } + } + + private void OnDragStart(GameObject obj) + { + _flickStart = true; + } + + private void OnDrag(GameObject obj, Vector2 dir) + { + if (_flickStart) + { + if (_lastPageIndex <= 1) + { + _flickStart = false; + } + else if (dir.x >= 70f) + { + _flickStart = false; + ShowPrevPage(); + } + else if (dir.x <= -70f) + { + _flickStart = false; + ShowNextPage(); + } + } + } +} diff --git a/SVSim.BattleEngine/Engine/Wizard/SmallResourceSelectDialog.cs b/SVSim.BattleEngine/Engine/Wizard/SmallResourceSelectDialog.cs new file mode 100644 index 0000000..ff021da --- /dev/null +++ b/SVSim.BattleEngine/Engine/Wizard/SmallResourceSelectDialog.cs @@ -0,0 +1,119 @@ +using System; +using Cute; +using UnityEngine; + +namespace Wizard; + +public class SmallResourceSelectDialog : MonoBehaviour +{ + [SerializeField] + private UILabel _downloadSizeLabel; + + [SerializeField] + private UIToggle _useSmallResource; + + [SerializeField] + private UILabel _noticeLabel; + + private bool _isTitle; + + private Action _onFinish; + + private bool _isFirstCallUseSmallResourceToggleChange = true; + + public static void Create(Action onFinish, Action onCancel, bool isTitle) + { + SystemText systemText = Data.SystemText; + DialogBase dialogBase = UIManager.GetInstance().CreateDialogClose(); + dialogBase.SetTitleLabel(systemText.Get(isTitle ? "OtherTop_0017" : "MyPage_0088")); + dialogBase.SetSize(DialogBase.Size.M); + dialogBase.SetButtonLayout(DialogBase.ButtonLayout.BlueBtn_CancelBtn); + dialogBase.SetButtonText(systemText.Get("Common_0004")); + dialogBase.SetPanelDepth(2000); + GameObject gameObject = UnityEngine.Object.Instantiate(Resources.Load("Prefab/UI/SmallResourceSelectDialog")) as GameObject; + dialogBase.SetObj(gameObject); + SmallResourceSelectDialog selectDialog = gameObject.GetComponent(); + dialogBase.onPushButton1 = delegate + { + selectDialog.OnSelectOk(); + }; + dialogBase.onPushButton2 = delegate + { + onCancel.Call(); + }; + dialogBase.onCloseWithoutSelect = delegate + { + onCancel.Call(); + }; + selectDialog.Initialize(isTitle, onFinish); + } + + private void Initialize(bool isTitle, Action onFinish) + { + _isTitle = isTitle; + _onFinish = onFinish; + } + + private void Start() + { + float totalStrageUseSize = Toolbox.AssetManager.GetTotalStrageUseSize(isNormalResource: true); + float totalStrageUseSize2 = Toolbox.AssetManager.GetTotalStrageUseSize(isNormalResource: false); + string suffixByDigit = AssetManager.GetSuffixByDigit(totalStrageUseSize); + string suffixByDigit2 = AssetManager.GetSuffixByDigit(totalStrageUseSize2); + _downloadSizeLabel.text = Data.SystemText.Get("Title_0052", suffixByDigit, suffixByDigit2); + _useSmallResource.value = PlayerPrefsCache.Instance.GetValue(PlayerPrefsWrapper.SMALL_RESOURCE_STATUS) == 2; + _noticeLabel.text = Data.SystemText.Get(_isTitle ? "Title_0054" : "Title_0058"); + _useSmallResource.onChange.Add(new EventDelegate(delegate + { + OnClickUseSmallResource(); + })); + } + + private void OnClickUseSmallResource() + { + if (!_isFirstCallUseSmallResourceToggleChange) + { + GameMgr.GetIns().GetSoundMgr().PlaySe(_useSmallResource.value ? Se.TYPE.SYS_TOGGLE_ON : Se.TYPE.SYS_TOGGLE_OFF); + } + _isFirstCallUseSmallResourceToggleChange = false; + } + + private void OnSelectOk() + { + int value = PlayerPrefsCache.Instance.GetValue(PlayerPrefsWrapper.SMALL_RESOURCE_STATUS); + bool num = PlayerPrefsCache.Instance.GetValue(PlayerPrefsWrapper.SMALL_RESOURCE_STATUS) == 2; + bool value2 = _useSmallResource.value; + if (num == value2) + { + if (value == 0) + { + DecideResourceType(_useSmallResource.value); + } + _onFinish.Call(); + return; + } + if (_isTitle) + { + DecideResourceType(_useSmallResource.value); + _onFinish.Call(); + return; + } + DialogBase dialogBase = UIManager.GetInstance().CreateDialogClose(); + string text = Data.SystemText.Get(value2 ? "System_0062" : "System_0061"); + dialogBase.SetText(Data.SystemText.Get("MyPage_0089", text)); + dialogBase.SetButtonLayout(DialogBase.ButtonLayout.BlueBtn_CancelBtn); + dialogBase.onPushButton1 = delegate + { + DecideResourceType(_useSmallResource.value); + }; + dialogBase.OnClose = delegate + { + _onFinish.Call(); + }; + } + + private void DecideResourceType(bool isSmall) + { + PlayerPrefsCache.Instance.SetValue(PlayerPrefsWrapper.SMALL_RESOURCE_STATUS, (!isSmall) ? 1 : 2); + } +} diff --git a/SVSim.BattleEngine/Engine/Wizard/SpecialCrystalTaskInfo.cs b/SVSim.BattleEngine/Engine/Wizard/SpecialCrystalTaskInfo.cs new file mode 100644 index 0000000..9831931 --- /dev/null +++ b/SVSim.BattleEngine/Engine/Wizard/SpecialCrystalTaskInfo.cs @@ -0,0 +1,20 @@ +namespace Wizard; + +public class SpecialCrystalTaskInfo : BaseTask +{ + public SpecialCrystalTaskInfo() + { + base.type = ApiType.Type.SpecialCrystalInfo; + } + + protected override int Parse() + { + int num = base.Parse(); + if (num != 1) + { + return num; + } + Data.Load.data._userCrystalCount.ParseSpecialCrystal(base.ResponseData); + return num; + } +} diff --git a/SVSim.BattleEngine/Engine/Wizard/SpringPanelWithUpdate.cs b/SVSim.BattleEngine/Engine/Wizard/SpringPanelWithUpdate.cs new file mode 100644 index 0000000..ed627b4 --- /dev/null +++ b/SVSim.BattleEngine/Engine/Wizard/SpringPanelWithUpdate.cs @@ -0,0 +1,31 @@ +using System; +using Cute; +using UnityEngine; + +namespace Wizard; + +public class SpringPanelWithUpdate : SpringPanel +{ + public Action onUpdate; + + public static SpringPanelWithUpdate Begin(GameObject go, Vector3 pos, float strength, Action onUpdate) + { + SpringPanelWithUpdate springPanelWithUpdate = go.GetComponent(); + if (springPanelWithUpdate == null) + { + springPanelWithUpdate = go.AddComponent(); + } + springPanelWithUpdate.target = pos; + springPanelWithUpdate.strength = strength; + springPanelWithUpdate.onFinished = null; + springPanelWithUpdate.onUpdate = onUpdate; + springPanelWithUpdate.enabled = true; + return springPanelWithUpdate; + } + + protected override void AdvanceTowardsPosition() + { + base.AdvanceTowardsPosition(); + onUpdate.Call(); + } +} diff --git a/SVSim.BattleEngine/Engine/Wizard/StoryLeaderSelectTask.cs b/SVSim.BattleEngine/Engine/Wizard/StoryLeaderSelectTask.cs new file mode 100644 index 0000000..955df45 --- /dev/null +++ b/SVSim.BattleEngine/Engine/Wizard/StoryLeaderSelectTask.cs @@ -0,0 +1,64 @@ +using System; +using LitJson; +using Wizard.Story; + +namespace Wizard; + +public class StoryLeaderSelectTask : BaseTask +{ + public class StoryLeaderSelectTaskParam : BaseParam + { + public int section_id; + + public StoryLeaderSelectTaskParam(int sectionId) + { + section_id = sectionId; + } + } + + public StoryLeaderSelectTask(SelectedStoryInfo storyInfo) + { + base.type = GetApiType(storyInfo.StoryApiType); + base.Params = new StoryLeaderSelectTaskParam(storyInfo.SectionId); + } + + private static ApiType.Type GetApiType(StoryApiType storyType) + { + return storyType switch + { + StoryApiType.MainStory => ApiType.Type.MainStoryLeaderSelect, + StoryApiType.LimitedStory => ApiType.Type.LimitedStoryLeaderSelect, + StoryApiType.EventStory => ApiType.Type.EventStoryLeaderSelect, + _ => throw new NotImplementedException(), + }; + } + + protected override int Parse() + { + int num = base.Parse(); + if (num != 1) + { + return num; + } + Data.StoryLeaderSelect.DataList.Clear(); + JsonData jsonData = base.ResponseData["data"]; + JsonData jsonData2 = jsonData["leader_list"]; + for (int i = 0; i < jsonData2.Count; i++) + { + StoryLeaderSelectData storyLeaderSelectData = new StoryLeaderSelectData(); + storyLeaderSelectData.CharaId = jsonData2[i]["chara_id"].ToInt(); + storyLeaderSelectData.IsFinished = jsonData2[i]["is_finished"].ToBoolean(); + storyLeaderSelectData.CurrentChapter = jsonData2[i]["current_chapter"].ToString(); + Data.StoryLeaderSelect.DataList.Add(storyLeaderSelectData); + } + if (jsonData.Keys.Contains("leader_count")) + { + Data.StoryLeaderSelect.LeaderCount = jsonData["leader_count"].ToInt(); + } + else + { + Data.StoryLeaderSelect.LeaderCount = 8; + } + return num; + } +} diff --git a/SVSim.BattleEngine/Engine/Wizard/TournamentCell.cs b/SVSim.BattleEngine/Engine/Wizard/TournamentCell.cs new file mode 100644 index 0000000..4870a20 --- /dev/null +++ b/SVSim.BattleEngine/Engine/Wizard/TournamentCell.cs @@ -0,0 +1,178 @@ +using Cute; +using UnityEngine; + +namespace Wizard; + +public class TournamentCell : MonoBehaviour +{ + [SerializeField] + private UITexture _emblemTexture; + + [SerializeField] + private UILabel _nameLabel; + + [SerializeField] + private GameObject _activePlate; + + [SerializeField] + private GameObject _winPlate; + + [SerializeField] + private GameObject _losePlate; + + [SerializeField] + private GameObject _loseByDefaultPlate; + + [SerializeField] + private GameObject _championPlate; + + [SerializeField] + private GameObject _youMark; + + [SerializeField] + private UISprite _lineDownSprite; + + [SerializeField] + private UISprite _lineUpSprite; + + [SerializeField] + private Transform _leftConnectorTransform; + + [SerializeField] + private Transform _rightConnectorTransform; + + [SerializeField] + private UILabel _isFinalMatchResetLabel; + + private Transform _lineEndTransform; + + private const string DEFAULT_LINE_SPRITE_NAME = "Line_tournament"; + + private const string ACTIVE_LINE_SPRITE_NAME = "Line_tournament_active"; + + private const string PRE_EXTRA_LINE_SPRITE_NAME = "Line_tournament_Final"; + + private const string WIN_PRE_EXTRA_LINE_SPRITE_NAME = "Line_win_tournament_Final"; + + private const string WIN_LINE_SPRITE_NAME = "Line_win_tournament"; + + public TournamentCellData Data { get; private set; } + + public Transform LeftConnectorTransform => _leftConnectorTransform; + + public Transform RightConnectorTransform => _rightConnectorTransform; + + public void Setup(TournamentCellData data) + { + Data = data; + _nameLabel.gameObject.SetActive(data.Name != string.Empty); + _nameLabel.text = data.Name; + _emblemTexture.gameObject.SetActive(data.EmblemId > 0); + _emblemTexture.mainTexture = Toolbox.ResourcesManager.LoadObject(Data.GetEmblemPath()) as Texture; + _isFinalMatchResetLabel.gameObject.SetActive(data.IsFinalMatchReset); + SetupState(); + SetupLineVisible(); + SetYouMarkVisible(isVisible: false); + } + + private void SetupState() + { + TournamentCellData.CellState state = Data.State; + _activePlate.SetActive(state == TournamentCellData.CellState.Active); + _winPlate.SetActive(state == TournamentCellData.CellState.Win); + _losePlate.SetActive(state == TournamentCellData.CellState.Lose); + _loseByDefaultPlate.SetActive(state == TournamentCellData.CellState.LoseByDefault); + _championPlate.SetActive(Data.IsChampion); + switch (state) + { + case TournamentCellData.CellState.Blank: + case TournamentCellData.CellState.LoseByDefault: + _emblemTexture.gameObject.SetActive(value: false); + _nameLabel.gameObject.SetActive(value: false); + break; + case TournamentCellData.CellState.Lose: + { + UIManager.SetObjectToGrey(base.gameObject, b: true); + UISprite lineSprite = GetLineSprite(); + if (lineSprite != null) + { + lineSprite.color = Color.white; + } + break; + } + } + } + + private void SetupLineVisible() + { + UISprite lineSprite = GetLineSprite(); + _lineDownSprite.gameObject.SetActive(lineSprite == _lineDownSprite); + _lineUpSprite.gameObject.SetActive(lineSprite == _lineUpSprite); + if (!(lineSprite == null)) + { + string spriteName = "Line_tournament"; + if (Data.State == TournamentCellData.CellState.Active) + { + spriteName = "Line_tournament_active"; + } + else if (Data.IsPreExtra) + { + spriteName = ((Data.State == TournamentCellData.CellState.Win) ? "Line_win_tournament_Final" : "Line_tournament_Final"); + } + else if (Data.State == TournamentCellData.CellState.Win) + { + spriteName = "Line_win_tournament"; + } + lineSprite.spriteName = spriteName; + } + } + + private UISprite GetLineSprite() + { + if (Data.IsTerminal) + { + return null; + } + if (Data.Line != TournamentCellData.LineType.Down) + { + return _lineUpSprite; + } + return _lineDownSprite; + } + + public void SetLineEndTransform(Transform lineEndTransform) + { + _lineEndTransform = lineEndTransform; + } + + public void UpdateLine() + { + UISprite lineSprite = GetLineSprite(); + if (!(lineSprite == null)) + { + Vector3 localPosition = _rightConnectorTransform.localPosition; + Vector3 vector; + if (Data.IsPreExtra) + { + vector = (localPosition + base.transform.InverseTransformPoint(_lineEndTransform.position)) * 0.5f; + vector.x += 48f; + } + else + { + vector = base.transform.InverseTransformPoint(_lineEndTransform.position); + } + lineSprite.transform.localPosition = (localPosition + vector) * 0.5f; + lineSprite.width = (int)(vector.x - localPosition.x); + lineSprite.height = (int)(Mathf.Abs(vector.y - localPosition.y) + 14f); + } + } + + public void SetYouMarkVisible(bool isVisible) + { + _youMark.SetActive(isVisible); + if (isVisible) + { + _youMark.GetComponent().color = LabelDefine.TEXT_COLOR_NORMAL; + } + } +} diff --git a/SVSim.BattleEngine/Engine/Wizard/TournamentCellData.cs b/SVSim.BattleEngine/Engine/Wizard/TournamentCellData.cs new file mode 100644 index 0000000..f9027c4 --- /dev/null +++ b/SVSim.BattleEngine/Engine/Wizard/TournamentCellData.cs @@ -0,0 +1,57 @@ +using System.Collections.Generic; +using Cute; + +namespace Wizard; + +public class TournamentCellData +{ + public enum CellState + { + Blank, + Unresolved, + Active, + Win, + Lose, + LoseByDefault + } + + public enum LineType + { + Down, + Up + } + + public CellState State; + + public LineType Line; + + public bool IsChampion; + + public bool IsTerminal; + + public bool IsPreExtra; + + public long EmblemId; + + public string Name; + + public TournamentCellData Parent; + + public TournamentCellData[] Children; + + public TournamentRoundData Round; + + public int ViewerId; + + public bool IsFinalMatchReset; + + public string GetEmblemPath() + { + return Toolbox.ResourcesManager.GetAssetTypePath(EmblemId.ToString(), ResourcesManager.AssetLoadPathType.Emblem_S, isfetch: true); + } + + public void CollectResourcePath(ref List resourceList) + { + resourceList.Add(Toolbox.ResourcesManager.GetAssetTypePath(EmblemId.ToString(), ResourcesManager.AssetLoadPathType.Emblem_S)); + } +} diff --git a/SVSim.BattleEngine/Engine/Wizard/TournamentController.cs b/SVSim.BattleEngine/Engine/Wizard/TournamentController.cs new file mode 100644 index 0000000..368fc29 --- /dev/null +++ b/SVSim.BattleEngine/Engine/Wizard/TournamentController.cs @@ -0,0 +1,715 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using System.Linq; +using UnityEngine; + +namespace Wizard; + +public class TournamentController : MonoBehaviour +{ + [SerializeField] + private GameObject _tournamentRoot; + + [SerializeField] + private Transform _roundsRoot; + + [SerializeField] + private GameObject _originalRound; + + [SerializeField] + private UIDragMultiScrollView _dragMultiScrollView; + + [SerializeField] + private UIButton _prevButton; + + [SerializeField] + private UIButton _nextButton; + + [SerializeField] + private UIPanel _panel; + + [SerializeField] + private UISprite _leftCurtainSprite; + + [SerializeField] + private UISprite _rightCurtainSprite; + + [SerializeField] + private Transform _scrollBarRoot; + + [SerializeField] + private GameObject _originalScrollBarObj; + + [SerializeField] + private UIGrid _radioIconGrid; + + [SerializeField] + private GameObject _originalRadioIconObj; + + private List _rounds; + + private bool _isChangeableSelectRound = true; + + private int _selectRoundIndex; + + private (float, float)[][] _cellPosBank; + + private SpringPanelWithUpdate _currentSpring; + + private List _radioIcons; + + private const float ROUND_OFFSET_X = -16f; + + private const float ROUND_WIDTH = 240f; + + private const float PARENT_CELL_INTERVAL = 200f; + + private const float CHANGE_SELECT_ROUND_DRAG_THRESHOLD_X = 45.5f; + + private const float CHANGE_SELECT_ROUND_DRAG_NG_THRESHOLD_Y = 16.25f; + + private const float CHANGE_SELECT_ROUND_DURATION = 0.15f; + + private const float CURTAIN_ALPHA_MAX = 0.5f; + + private void Start() + { + _originalRound.SetActive(value: false); + UIEventListener uIEventListener = UIEventListener.Get(_dragMultiScrollView.gameObject); + uIEventListener.onDrag = (UIEventListener.VectorDelegate)Delegate.Combine(uIEventListener.onDrag, new UIEventListener.VectorDelegate(OnDrag)); + _prevButton.onClick.Add(new EventDelegate(ChangeSelectRoundToPrevious)); + _nextButton.onClick.Add(new EventDelegate(ChangeSelectRoundToNext)); + } + + public IEnumerator Setup(TournamentData data, TournamentCellData currentCell, GatheringInfo info, bool isVisible) + { + int count = data.Rounds.Count; + _rounds = new List(count); + _radioIcons = new List(count); + _originalRound.SetActive(value: true); + _originalRadioIconObj.SetActive(value: true); + _originalScrollBarObj.SetActive(value: true); + Vector3 localPosition = _originalScrollBarObj.transform.localPosition; + int currentRound = 0; + for (int i = 0; i < count; i++) + { + TournamentRoundData tournamentRoundData = data.Rounds[i]; + TournamentRound component = NGUITools.AddChild(_roundsRoot.gameObject, _originalRound).GetComponent(); + UIScrollBar component2 = NGUITools.AddChild(_scrollBarRoot.gameObject, _originalScrollBarObj).GetComponent(); + component2.transform.localPosition = localPosition; + component.ScrollView.verticalScrollBar = component2; + component.ScrollBarPanel = component2.GetComponent(); + component.ScrollBarCollider = component2.backgroundWidget.GetComponent(); + component.Setup(tournamentRoundData, info); + component.transform.localPosition = new Vector3(240f * (float)i, 0f, 0f); + _dragMultiScrollView.AddScrollView(component.ScrollView); + _rounds.Add(component); + _radioIcons.Add(NGUITools.AddChild(_radioIconGrid.gameObject, _originalRadioIconObj).GetComponent()); + if (currentCell != null && tournamentRoundData.Cells.Contains(currentCell)) + { + currentRound = i; + } + } + _originalRound.SetActive(value: false); + _originalRadioIconObj.SetActive(value: false); + _originalScrollBarObj.SetActive(value: false); + _radioIconGrid.Reposition(); + _cellPosBank = new(float, float)[_rounds.Count][]; + for (int j = 0; j < _cellPosBank.Length; j++) + { + (float, float)[] array = new(float, float)[_rounds[j].Cells.Count]; + for (int k = 0; k < array.Length; k++) + { + array[k] = (0f, 0f); + } + _cellPosBank[j] = array; + } + _dragMultiScrollView.OnPressCallback = OnPressScrollView; + _dragMultiScrollView.OnScrollCallback = OnScrollWheel; + if (count > 0) + { + _rounds[0].ScrollView.onMomentumMove = OnMomentumMove; + } + _panel.alpha = 0f; + yield return null; + AppendScrollBarEvent(); + foreach (TournamentRound round in _rounds) + { + round.SetCellEnable(isEnabled: true); + } + SetupCellLineEnd(); + PropagateScrollValue(currentRound); + ChangeSelectRoundIndex(currentRound, isImmediate: true, isPlaySe: false); + ChangeFocusCellImmediate(currentCell); + RestrictWithinBounds(isImmediate: true); + SetVisible(isVisible); + if (isVisible && currentCell != null && currentCell.ViewerId == PlayerStaticData.UserViewerID) + { + TournamentCell tournamentCell = GetTournamentCell(currentCell); + if (tournamentCell != null) + { + tournamentCell.SetYouMarkVisible(isVisible: true); + } + } + yield return null; + _panel.alpha = 1f; + } + + private void OnDrag(GameObject obj, Vector2 delta) + { + if (!(delta.y > 16.25f) && !(delta.y < -16.25f)) + { + if (delta.x > 45.5f) + { + ChangeSelectRoundToPrevious(); + } + else if (delta.x < -45.5f) + { + ChangeSelectRoundToNext(); + } + } + } + + private void ChangeSelectRoundToPrevious() + { + if (_isChangeableSelectRound && _selectRoundIndex > 0) + { + ChangeSelectRoundIndex(_selectRoundIndex - 1); + } + } + + private void ChangeSelectRoundToNext() + { + if (_isChangeableSelectRound && _selectRoundIndex < _rounds.Count - 1) + { + ChangeSelectRoundIndex(_selectRoundIndex + 1); + } + } + + private void ChangeSelectRoundIndex(int index, bool isImmediate = false, bool isPlaySe = true) + { + if (!_isChangeableSelectRound) + { + return; + } + SetupCellPosition(index); + Vector3 vector = new Vector3((float)(-index) * 240f + -16f, 0f, 0f); + if (isImmediate) + { + _roundsRoot.localPosition = vector; + ApplyCellPosition(1f); + UpdateCellLine(); + UpdateWatchPosition(); + UpdateRoundAlpha(_selectRoundIndex, index, 1f); + UpdateCurtainAlpha(_selectRoundIndex, index, 1f); + UpdateScrollViewBounds(); + _panel.SetDirty(); + } + else + { + _isChangeableSelectRound = false; + AdjustCellPositionToFocusCell(index); + UpdateRoundWatchEnable(-1); + int beforeIndex = _selectRoundIndex; + TweenPosition tweenPosition = TweenPositionWithUpdate.Begin(_roundsRoot.gameObject, 0.15f, vector, delegate(float factor) + { + ApplyCellPosition(factor); + UpdateCellLine(); + UpdateWatchPosition(); + UpdateRoundAlpha(beforeIndex, index, factor); + UpdateCurtainAlpha(beforeIndex, index, factor); + UpdateScrollViewBounds(); + RestrictWithinBounds(isImmediate: true); + _panel.SetDirty(); + }); + tweenPosition.method = UITweener.Method.EaseOut; + tweenPosition.onFinished.Add(new EventDelegate(delegate + { + _isChangeableSelectRound = true; + RestrictWithinBounds(isImmediate: false); + })); + } + _selectRoundIndex = index; + UpdateRoundWatchEnable(index); + ChangeScrollBarController(); + UpdateRadioIcon(); + UpdateArrowButton(); + if (isPlaySe) + { + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_SLIDE_BTN); + } + } + + private void ChangeFocusCellImmediate(TournamentCellData focusCell) + { + if (focusCell != null) + { + TournamentRound tournamentRound = _rounds[_selectRoundIndex]; + TournamentCell tournamentCell = tournamentRound.Cells.FirstOrDefault((TournamentCell c) => c != null && c.Data == focusCell); + if (!(tournamentCell == null)) + { + Transform transform = tournamentRound.ScrollView.panel.transform; + Vector3 relative = -transform.transform.InverseTransformPoint(tournamentCell.transform.position); + relative.x = transform.localPosition.x; + tournamentRound.ScrollView.MoveRelative(relative); + PropagateScrollValue(_selectRoundIndex); + } + } + } + + private void UpdateRadioIcon() + { + int i = 0; + for (int count = _radioIcons.Count; i < count; i++) + { + _radioIcons[i].spriteName = ((i == _selectRoundIndex) ? "carousel_marker_on" : "carousel_marker_off"); + } + } + + private void UpdateArrowButton() + { + _prevButton.gameObject.SetActive(_selectRoundIndex > 0); + _nextButton.gameObject.SetActive(_selectRoundIndex < _rounds.Count - 1); + } + + private void SetupCellPosition(int selectRoundIndex) + { + for (int i = 0; i < _rounds.Count; i++) + { + TournamentRound tournamentRound = _rounds[i]; + for (int j = 0; j < tournamentRound.Cells.Count; j++) + { + _cellPosBank[i][j].Item1 = tournamentRound.Cells[j].transform.localPosition.y; + } + } + int num = 0; + float num2 = 200f; + for (int num3 = selectRoundIndex + 1; num3 >= selectRoundIndex - 1; num3--) + { + if (num3 < _rounds.Count && num3 >= 0) + { + num = num3; + TournamentRound tournamentRound2 = _rounds[num3]; + for (int k = 0; k < tournamentRound2.Cells.Count; k++) + { + _cellPosBank[num3][k].Item2 = -200f * (float)k; + } + break; + } + } + float num4 = num2 * 0.5f; + for (int num5 = num - 1; num5 >= 0; num5--) + { + TournamentRound tournamentRound3 = _rounds[num5]; + TournamentRound tournamentRound4 = _rounds[num5 + 1]; + if (tournamentRound4.Data.IsExtraRound) + { + for (int l = 0; l < tournamentRound3.Cells.Count; l++) + { + _cellPosBank[num5][l].Item2 = _cellPosBank[num5 + 1][l].Item2; + } + } + else + { + num2 *= 0.5f; + num4 = num2 * 0.5f; + for (int m = 0; m < tournamentRound3.Cells.Count; m++) + { + TournamentCell childCell = tournamentRound3.Cells[m]; + int childIndex; + int parentCellIndex = GetParentCellIndex(childCell, tournamentRound4, out childIndex); + float item = _cellPosBank[num5 + 1][parentCellIndex].Item2; + _cellPosBank[num5][m].Item2 = item + num4 - num2 * (float)childIndex; + } + } + } + for (int n = num + 1; n < _rounds.Count; n++) + { + TournamentRound tournamentRound5 = _rounds[n]; + TournamentRound childRound = _rounds[n - 1]; + if (tournamentRound5.Data.IsExtraRound) + { + for (int num6 = 0; num6 < tournamentRound5.Cells.Count; num6++) + { + _cellPosBank[n][num6].Item2 = _cellPosBank[n - 1][num6].Item2; + } + continue; + } + float num7 = 0f; + for (int num8 = 0; num8 < tournamentRound5.Cells.Count; num8++) + { + TournamentCell parentCell = tournamentRound5.Cells[num8]; + int childCellIndex = GetChildCellIndex(parentCell, childRound); + if (childCellIndex >= 0) + { + num7 = (_cellPosBank[n][num8].Item2 = (_cellPosBank[n - 1][childCellIndex].Item2 + _cellPosBank[n - 1][childCellIndex + 1].Item2) * 0.5f); + } + else + { + _cellPosBank[n][num8].Item2 = num7 - 200f; + } + } + } + } + + private int GetParentCellIndex(TournamentCell childCell, TournamentRound parentRound, out int childIndex) + { + TournamentCellData data = childCell.Data; + List cells = parentRound.Cells; + for (int i = 0; i < cells.Count; i++) + { + TournamentCellData data2 = cells[i].Data; + if (data2.Children == null) + { + continue; + } + for (int j = 0; j < data2.Children.Length; j++) + { + if (data2.Children[j] == data) + { + childIndex = j; + return i; + } + } + } + childIndex = -1; + return -1; + } + + private int GetChildCellIndex(TournamentCell parentCell, TournamentRound childRound) + { + TournamentCellData data = parentCell.Data; + List cells = childRound.Cells; + for (int i = 0; i < cells.Count; i++) + { + if (cells[i].Data.Parent == data) + { + return i; + } + } + return -1; + } + + private void AdjustCellPositionToFocusCell(int selectRoundIndex) + { + int num = selectRoundIndex - _selectRoundIndex; + if (num < -1 || num > 1 || num == 0) + { + return; + } + TournamentRound tournamentRound = _rounds[_selectRoundIndex]; + float y = tournamentRound.ScrollView.panel.clipOffset.y; + int num2 = -1; + float num3 = float.MaxValue; + for (int i = 0; i < tournamentRound.Cells.Count; i++) + { + float num4 = Mathf.Abs(tournamentRound.Cells[i].transform.localPosition.y - y); + if (!(num4 > num3)) + { + num3 = num4; + num2 = i; + } + } + (float, float) tuple = _cellPosBank[_selectRoundIndex][num2]; + float item = tuple.Item1; + float item2 = tuple.Item2; + float num5 = item - item2; + int j = 0; + for (int count = _rounds.Count; j < count; j++) + { + int k = 0; + for (int count2 = _rounds[j].Cells.Count; k < count2; k++) + { + _cellPosBank[j][k].Item2 += num5; + } + } + } + + private void ApplyCellPosition(float factor) + { + int i = 0; + for (int count = _rounds.Count; i < count; i++) + { + TournamentRound tournamentRound = _rounds[i]; + int j = 0; + for (int count2 = tournamentRound.Cells.Count; j < count2; j++) + { + TournamentCell tournamentCell = tournamentRound.Cells[j]; + (float, float) tuple = _cellPosBank[i][j]; + UIUtil.SetLocalPositionY(tournamentCell.transform, Mathf.Lerp(tuple.Item1, tuple.Item2, factor)); + } + } + } + + private void UpdateWatchPosition() + { + foreach (TournamentRound round in _rounds) + { + round.UpdateWatchPosition(); + } + } + + private void UpdateRoundAlpha(int beforeIndex, int afterIndex, float factor) + { + int i = 0; + for (int count = _rounds.Count; i < count; i++) + { + TournamentRound tournamentRound = _rounds[i]; + float a = CalcRoundAlpha(i - beforeIndex); + float b = CalcRoundAlpha(i - afterIndex); + tournamentRound.ScrollView.panel.alpha = Mathf.Lerp(a, b, factor); + a = CalcWatchAlpha(i - beforeIndex); + b = CalcWatchAlpha(i - afterIndex); + tournamentRound.SetWatchAlpha(Mathf.Lerp(a, b, factor)); + } + static float CalcRoundAlpha(int indexDiff) + { + return Mathf.Max(0f, Mathf.Min(1f, 2f - (float)Mathf.Abs(indexDiff))); + } + static float CalcWatchAlpha(int indexDiff) + { + return Mathf.Max(0f, Mathf.Min(1f, 1f - (float)Mathf.Abs(indexDiff))); + } + } + + private void UpdateRoundWatchEnable(int selectRoundIndex) + { + for (int i = 0; i < _rounds.Count; i++) + { + _rounds[i].SetWatchEnable(i == selectRoundIndex); + } + } + + private void UpdateCurtainAlpha(int beforeIndex, int afterIndex, float factor) + { + float a = ((beforeIndex <= 0) ? 0f : 0.5f); + float b = ((afterIndex <= 0) ? 0f : 0.5f); + _leftCurtainSprite.alpha = Mathf.Lerp(a, b, factor); + int num = _rounds.Count - 1; + float a2 = ((beforeIndex >= num) ? 0f : 0.5f); + float b2 = ((afterIndex >= num) ? 0f : 0.5f); + _rightCurtainSprite.alpha = Mathf.Lerp(a2, b2, factor); + } + + private void UpdateCellLine() + { + int i = 0; + for (int count = _rounds.Count; i < count; i++) + { + List cells = _rounds[i].Cells; + int j = 0; + for (int count2 = cells.Count; j < count2; j++) + { + cells[j].UpdateLine(); + } + } + } + + private void SetupCellLineEnd() + { + int i = 0; + for (int num = _rounds.Count - 1; i < num; i++) + { + List cells = _rounds[i].Cells; + List cells2 = _rounds[i + 1].Cells; + int j = 0; + for (int count = cells.Count; j < count; j++) + { + TournamentCell cell = cells[j]; + if (cell.Data.IsPreExtra) + { + cell.SetLineEndTransform(cells.Find((TournamentCell c) => c != cell).RightConnectorTransform); + continue; + } + TournamentCellData parentCellData = cell.Data.Parent; + TournamentCell tournamentCell = cells2.Find((TournamentCell c) => c != null && c.Data == parentCellData); + if (tournamentCell != null) + { + cell.SetLineEndTransform(tournamentCell.LeftConnectorTransform); + } + } + } + } + + private void UpdateScrollViewBounds() + { + foreach (TournamentRound round in _rounds) + { + round.ScrollView.NeedsCalculateBounds = true; + } + } + + private void ChangeScrollBarController() + { + int scrollTargetRoundIndex = GetScrollTargetRoundIndex(); + int i = 0; + for (int count = _rounds.Count; i < count; i++) + { + _rounds[i].SetScrollBarEnable(i == scrollTargetRoundIndex); + } + } + + private int GetScrollTargetRoundIndex() + { + return Mathf.Max(0, _selectRoundIndex - 1); + } + + private void AppendScrollBarEvent() + { + foreach (TournamentRound round in _rounds) + { + UIEventListener uIEventListener = UIEventListener.Get(round.ScrollView.verticalScrollBar.backgroundWidget.gameObject); + uIEventListener.onPress = (UIEventListener.BoolDelegate)Delegate.Combine(uIEventListener.onPress, new UIEventListener.BoolDelegate(OnPressScrollBar)); + uIEventListener.onDrag = (UIEventListener.VectorDelegate)Delegate.Combine(uIEventListener.onDrag, new UIEventListener.VectorDelegate(OnDragScrollBar)); + } + } + + private void OnPressScrollBar(GameObject go, bool isPressed) + { + PropagateScrollValue(GetRoundIndexByScrollBar(go.GetComponentInParent())); + } + + private void OnDragScrollBar(GameObject go, Vector2 delta) + { + PropagateScrollValue(GetRoundIndexByScrollBar(go.GetComponentInParent())); + } + + private int GetRoundIndexByScrollBar(UIScrollBar scrollBar) + { + int i = 0; + for (int count = _rounds.Count; i < count; i++) + { + if (!(_rounds[i].ScrollView.verticalScrollBar != scrollBar)) + { + return i; + } + } + return -1; + } + + private void PropagateScrollValue(int roundIndex) + { + TournamentRound tournamentRound = _rounds[roundIndex]; + UIScrollView scrollView = tournamentRound.ScrollView; + Vector3 localPosition = scrollView.transform.localPosition; + Vector2 clipOffset = scrollView.panel.clipOffset; + Vector3 currentMomentum = scrollView.currentMomentum; + foreach (TournamentRound round in _rounds) + { + if (!(round == tournamentRound)) + { + UIScrollView scrollView2 = round.ScrollView; + scrollView2.transform.localPosition = localPosition; + scrollView2.panel.clipOffset = clipOffset; + scrollView2.panel.SetDirty(); + scrollView2.currentMomentum = currentMomentum; + } + } + } + + private void OnPressScrollView(bool isPressed) + { + if (!isPressed) + { + RestrictWithinBounds(isImmediate: false); + } + } + + private void OnScrollWheel(float delta) + { + RestrictWithinBounds(isImmediate: false); + } + + private void OnMomentumMove() + { + RestrictWithinBounds(isImmediate: false); + } + + private void RestrictWithinBounds(bool isImmediate) + { + int targetIndex = GetScrollTargetRoundIndex(); + UIScrollView scrollView = _rounds[targetIndex].ScrollView; + Bounds bounds = scrollView.bounds; + for (int i = Mathf.Max(0, _selectRoundIndex - 1); i <= Mathf.Min(_selectRoundIndex + 1, _rounds.Count - 1); i++) + { + Bounds bounds2 = _rounds[i].ScrollView.bounds; + if (bounds2.min.y < bounds.min.y) + { + Vector3 min = bounds.min; + min.y = bounds2.min.y; + bounds.min = min; + } + if (bounds2.max.y > bounds.max.y) + { + Vector3 max = bounds.max; + max.y = bounds2.max.y; + bounds.max = max; + } + } + Vector3 vector = scrollView.panel.CalculateConstrainOffset(bounds.min, bounds.max); + vector.x = 0f; + if (!(vector.sqrMagnitude > 0.1f)) + { + return; + } + if (isImmediate) + { + scrollView.MoveRelative(vector); + scrollView.currentMomentum = Vector3.zero; + scrollView.CurrentScroll = 0f; + PropagateScrollValue(targetIndex); + return; + } + Vector3 pos = scrollView.transform.localPosition + vector; + pos.x = Mathf.Round(pos.x); + pos.y = Mathf.Round(pos.y); + StopSpring(); + SpringPanelWithUpdate springPanelWithUpdate = SpringPanelWithUpdate.Begin(scrollView.gameObject, pos, 8f, delegate + { + PropagateScrollValue(targetIndex); + }); + springPanelWithUpdate.onUpdate = delegate + { + PropagateScrollValue(targetIndex); + }; + _currentSpring = springPanelWithUpdate; + } + + private void StopSpring() + { + if (_currentSpring == null) + { + return; + } + if (!_currentSpring.enabled) + { + _currentSpring = null; + return; + } + if (_currentSpring.onFinished != null) + { + _currentSpring.onFinished(); + } + _currentSpring.enabled = false; + _currentSpring = null; + } + + public void SetVisible(bool isVisible) + { + _tournamentRoot.SetActive(isVisible); + } + + private TournamentCell GetTournamentCell(TournamentCellData cellData) + { + foreach (TournamentRound round in _rounds) + { + TournamentCell tournamentCell = round.Cells.FirstOrDefault((TournamentCell cell) => cell.Data == cellData); + if (tournamentCell != null) + { + return tournamentCell; + } + } + return null; + } +} diff --git a/SVSim.BattleEngine/Engine/Wizard/TournamentData.cs b/SVSim.BattleEngine/Engine/Wizard/TournamentData.cs new file mode 100644 index 0000000..ab3bd05 --- /dev/null +++ b/SVSim.BattleEngine/Engine/Wizard/TournamentData.cs @@ -0,0 +1,16 @@ +using System.Collections.Generic; + +namespace Wizard; + +public class TournamentData +{ + public List Rounds; + + public void CollectResourcePath(ref List resourceList) + { + foreach (TournamentRoundData round in Rounds) + { + round.CollectResourcePath(ref resourceList); + } + } +} diff --git a/SVSim.BattleEngine/Engine/Wizard/TournamentRound.cs b/SVSim.BattleEngine/Engine/Wizard/TournamentRound.cs new file mode 100644 index 0000000..b36318f --- /dev/null +++ b/SVSim.BattleEngine/Engine/Wizard/TournamentRound.cs @@ -0,0 +1,119 @@ +using System; +using System.Collections.Generic; +using UnityEngine; + +namespace Wizard; + +public class TournamentRound : MonoBehaviour +{ + [SerializeField] + private UILabel _nameLabel; + + [SerializeField] + private UIScrollView _scrollView; + + [SerializeField] + private GameObject _originalCell; + + [SerializeField] + private GameObject _originalWatch; + + [NonSerialized] + public List Cells; + + [NonSerialized] + public List Watchs; + + public TournamentRoundData Data { get; private set; } + + public UIScrollView ScrollView => _scrollView; + + public UIPanel ScrollBarPanel { private get; set; } + + public BoxCollider ScrollBarCollider { private get; set; } + + private void Start() + { + _originalCell.SetActive(value: false); + } + + public void Setup(TournamentRoundData data, GatheringInfo info) + { + Data = data; + _nameLabel.text = GetName(data); + Cells = new List(data.Cells.Count); + _originalCell.SetActive(value: true); + foreach (TournamentCellData cell in data.Cells) + { + TournamentCell component = NGUITools.AddChild(_scrollView.gameObject, _originalCell).GetComponent(); + component.Setup(cell); + Cells.Add(component); + } + _originalCell.SetActive(value: false); + Watchs = new List(data.Watchs.Count); + _originalWatch.SetActive(value: true); + foreach (TournamentWatchData watch in data.Watchs) + { + TournamentWatch component2 = NGUITools.AddChild(_scrollView.gameObject, _originalWatch).GetComponent(); + component2.Setup(watch, Cells, info); + Watchs.Add(component2); + } + _originalWatch.SetActive(value: false); + SetCellEnable(isEnabled: false); + } + + private string GetName(TournamentRoundData data) + { + return string.Format(Wizard.Data.SystemText.Get("Gathering_Tournament_0003"), data.RoundNo); + } + + public void SetCellEnable(bool isEnabled) + { + foreach (TournamentCell cell in Cells) + { + cell.gameObject.SetActive(isEnabled); + } + } + + public void SetScrollBarEnable(bool isEnabled) + { + ScrollBarPanel.alpha = (isEnabled ? 1f : 0f); + ScrollBarCollider.enabled = isEnabled; + } + + public void SetWatchAlpha(float alpha) + { + if (Watchs == null) + { + return; + } + foreach (TournamentWatch watch in Watchs) + { + watch.SetAlpha(alpha); + } + } + + public void SetWatchEnable(bool isEnabled) + { + if (Watchs == null) + { + return; + } + foreach (TournamentWatch watch in Watchs) + { + watch.SetEnable(isEnabled); + } + } + + public void UpdateWatchPosition() + { + if (Watchs == null) + { + return; + } + foreach (TournamentWatch watch in Watchs) + { + watch.UpdatePosition(); + } + } +} diff --git a/SVSim.BattleEngine/Engine/Wizard/TournamentRoundData.cs b/SVSim.BattleEngine/Engine/Wizard/TournamentRoundData.cs new file mode 100644 index 0000000..7300c05 --- /dev/null +++ b/SVSim.BattleEngine/Engine/Wizard/TournamentRoundData.cs @@ -0,0 +1,22 @@ +using System.Collections.Generic; + +namespace Wizard; + +public class TournamentRoundData +{ + public int RoundNo; + + public List Cells; + + public List Watchs; + + public bool IsExtraRound; + + public void CollectResourcePath(ref List resourceList) + { + foreach (TournamentCellData cell in Cells) + { + cell?.CollectResourcePath(ref resourceList); + } + } +} diff --git a/SVSim.BattleEngine/Engine/Wizard/TournamentWatch.cs b/SVSim.BattleEngine/Engine/Wizard/TournamentWatch.cs new file mode 100644 index 0000000..574c068 --- /dev/null +++ b/SVSim.BattleEngine/Engine/Wizard/TournamentWatch.cs @@ -0,0 +1,58 @@ +using System.Collections.Generic; +using System.Linq; +using UnityEngine; +using Wizard.RoomMatch; + +namespace Wizard; + +public class TournamentWatch : MonoBehaviour +{ + [SerializeField] + private UIButton _watchButton; + + [SerializeField] + private UIPanel _panel; + + [SerializeField] + private BoxCollider _collider; + + private Transform _cellTransform0; + + private Transform _cellTransform1; + + private BattleParameter _battleParameter; + + public TournamentWatchData Data { get; private set; } + + public void Setup(TournamentWatchData data, List roundCells, GatheringInfo info) + { + Data = data; + _cellTransform0 = roundCells.FirstOrDefault((TournamentCell c) => c.Data.ViewerId == data.ViewerId0).transform; + _cellTransform1 = roundCells.FirstOrDefault((TournamentCell c) => c.Data.ViewerId == data.ViewerId1).transform; + _watchButton.onClick.Add(new EventDelegate(Watch)); + _battleParameter = info.Rule.BattleParameterInstance; + } + + public void SetEnable(bool isEnabled) + { + _collider.enabled = isEnabled; + } + + public void SetAlpha(float alpha) + { + _panel.alpha = alpha; + } + + public void UpdatePosition() + { + base.transform.localPosition = (_cellTransform0.localPosition + _cellTransform1.localPosition) * 0.5f; + } + + public void Watch() + { + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_BTN_DECIDE); + RoomConnectController.InitializeParameter initializeParameter = new RoomConnectController.InitializeParameter(RoomConnectController.PositionMode.WATCHER, _battleParameter, Data.RoomId.ToString()); + initializeParameter.IsGathering = true; + UIManager.GetInstance().StartCoroutine(GatheringUtility.JoinRoom(initializeParameter, "")); + } +} diff --git a/SVSim.BattleEngine/Engine/Wizard/TournamentWatchData.cs b/SVSim.BattleEngine/Engine/Wizard/TournamentWatchData.cs new file mode 100644 index 0000000..e7c8ace --- /dev/null +++ b/SVSim.BattleEngine/Engine/Wizard/TournamentWatchData.cs @@ -0,0 +1,10 @@ +namespace Wizard; + +public class TournamentWatchData +{ + public int RoomId; + + public int ViewerId0; + + public int ViewerId1; +} diff --git a/SVSim.BattleEngine/Engine/Wizard/TutorialUpdateTask.cs b/SVSim.BattleEngine/Engine/Wizard/TutorialUpdateTask.cs new file mode 100644 index 0000000..803f63e --- /dev/null +++ b/SVSim.BattleEngine/Engine/Wizard/TutorialUpdateTask.cs @@ -0,0 +1,36 @@ +namespace Wizard; + +public class TutorialUpdateTask : BaseTask +{ + public class TutorialUpdateTaskParam : BaseParam + { + public int tutorial_step; + + public int is_skip; + } + + public TutorialUpdateTask() + { + base.type = ApiType.Type.TutorialUpdate; + } + + public void SetParameter(int tutorial_step, bool isSkip) + { + TutorialUpdateTaskParam tutorialUpdateTaskParam = new TutorialUpdateTaskParam(); + tutorialUpdateTaskParam.tutorial_step = tutorial_step; + tutorialUpdateTaskParam.is_skip = (isSkip ? 1 : 0); + base.Params = tutorialUpdateTaskParam; + } + + protected override int Parse() + { + int num = base.Parse(); + if (num != 1) + { + return num; + } + Data.UserTutorial = new UserTutorial(); + Data.Load.data._userTutorial.Update(base.ResponseData["data"]); + return num; + } +} diff --git a/SVSim.BattleEngine/Engine/Wizard/UIDragMultiScrollView.cs b/SVSim.BattleEngine/Engine/Wizard/UIDragMultiScrollView.cs new file mode 100644 index 0000000..1c7530d --- /dev/null +++ b/SVSim.BattleEngine/Engine/Wizard/UIDragMultiScrollView.cs @@ -0,0 +1,83 @@ +using System; +using System.Collections.Generic; +using Cute; +using UnityEngine; + +namespace Wizard; + +[AddComponentMenu("NGUI/Interaction/Drag Multi Scroll View (wizard)")] +public class UIDragMultiScrollView : MonoBehaviour +{ + [SerializeField] + private List _scrollViewList; + + public Action OnPressCallback { private get; set; } + + public Action OnScrollCallback { private get; set; } + + public void AddScrollView(UIScrollView scrollView) + { + if (!_scrollViewList.Contains(scrollView)) + { + _scrollViewList.Add(scrollView); + } + } + + public void RemoveScrollView(UIScrollView scrollView) + { + if (_scrollViewList.Contains(scrollView)) + { + _scrollViewList.Remove(scrollView); + } + } + + public void OnPress(bool pressed) + { + if (!NGUITools.GetActive(this) || _scrollViewList.Count == 0) + { + return; + } + foreach (UIScrollView scrollView in _scrollViewList) + { + scrollView.Press(pressed); + } + OnPressCallback.Call(pressed); + } + + public void OnDrag(Vector2 delta) + { + if (!NGUITools.GetActive(this) || _scrollViewList.Count == 0) + { + return; + } + foreach (UIScrollView scrollView in _scrollViewList) + { + scrollView.Drag(); + } + } + + public void OnScroll(float delta) + { + if (!NGUITools.GetActive(this) || _scrollViewList.Count == 0) + { + return; + } + foreach (UIScrollView scrollView in _scrollViewList) + { + scrollView.Scroll(delta); + } + OnScrollCallback.Call(delta); + } + + public void OnPan(Vector2 delta) + { + if (!NGUITools.GetActive(this) || _scrollViewList.Count == 0) + { + return; + } + foreach (UIScrollView scrollView in _scrollViewList) + { + scrollView.OnPan(delta); + } + } +} diff --git a/SVSim.BattleEngine/Engine/Wizard/UserListView.cs b/SVSim.BattleEngine/Engine/Wizard/UserListView.cs new file mode 100644 index 0000000..f93b1d8 --- /dev/null +++ b/SVSim.BattleEngine/Engine/Wizard/UserListView.cs @@ -0,0 +1,132 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using System.Linq; +using Cute; +using UnityEngine; + +namespace Wizard; + +public class UserListView : MonoBehaviour +{ + [SerializeField] + private SimpleScrollViewUI _scrollView; + + [SerializeField] + private UIPanel _panel; + + private List _userList; + + private string _actionButtonLabel; + + private Dictionary> _loadQueueDict = new Dictionary>(); + + private LoadQueue _loadQueue = new LoadQueue(); + + private List _loadedResourceList = new List(); + + public Action PlateCustomize { get; set; } + + public int PanelDepth + { + set + { + _panel.depth = value; + } + } + + public Action OnSelect { get; set; } + + public DialogBase Dialog { get; private set; } + + public static UserListView CreateDialog(GameObject prefab, List userList, Action actionButtonEvent, string actionButtonLabel) + { + DialogBase dialogBase = UIManager.GetInstance().CreateDialogClose(); + UserListView component = UnityEngine.Object.Instantiate(prefab).GetComponent(); + dialogBase.SetObj(component.gameObject); + dialogBase.SetSize(DialogBase.Size.M); + dialogBase.SetButtonLayout(DialogBase.ButtonLayout.CloseBtn); + component.Initialize(dialogBase, userList, actionButtonEvent, actionButtonLabel); + return component; + } + + public static UserListView CreateView(GameObject prefab, GameObject parent, List userList, Action actionButtonEvent, string actionButtonLabel) + { + UserListView component = NGUITools.AddChild(parent, prefab).GetComponent(); + component.Initialize(null, userList, actionButtonEvent, actionButtonLabel); + return component; + } + + private void Initialize(DialogBase dialog, List userList, Action actionButton, string actionButtonLabel) + { + _actionButtonLabel = actionButtonLabel; + _userList = userList; + OnSelect = actionButton; + Dialog = dialog; + UIManager.GetInstance().createInSceneCenterLoading(); + StartCoroutine(LoadFriendUserImages(userList, delegate + { + _scrollView.CreateScrollView(userList.Count, InitializeInviteFriendPlate); + UIManager.GetInstance().closeInSceneCenterLoading(); + })); + } + + private void OnDestroy() + { + UnloadImages(); + } + + private void UnloadImages() + { + if (_loadedResourceList.Count > 0) + { + Toolbox.ResourcesManager.RemoveAssetGroup(_loadedResourceList); + _loadedResourceList.Clear(); + } + } + + private void InitializeInviteFriendPlate(int index, GameObject plateObject) + { + UserListViewPlate component = plateObject.GetComponent(); + component.Initialize(_userList[index], _actionButtonLabel); + component.SetUnderLine(index < _userList.Count - 1); + component.OnAction = delegate(UserInfoBase userInfo) + { + OnSelect.Call(userInfo); + }; + PlateCustomize.Call(component, _userList[index]); + } + + private IEnumerator LoadFriendUserImages(List userList, Action callBack = null) + { + List loadPathList = new List(); + List list = new List(); + _loadQueueDict.Clear(); + for (int i = 0; i < userList.Count; i++) + { + List list2 = new List(userList[i].GetUserAssetPathList().Except(list).Except(_loadedResourceList)); + if (i < _scrollView.ScrollObjectNum) + { + loadPathList.AddRange(list2); + } + else + { + string text = i.ToString(); + _loadQueueDict.Add(text, list2); + LoadQueue.Callback onEnd = delegate(string id) + { + _loadedResourceList.AddRange(_loadQueueDict[id]); + }; + _loadQueue.AddToLast(text, list2, null, onEnd); + } + list.AddRange(list2); + } + if (loadPathList.Count > 0) + { + yield return StartCoroutine(Toolbox.ResourcesManager.LoadAssetGroupAsync(loadPathList, null)); + _loadedResourceList.AddRange(loadPathList); + } + _loadQueue.StartLoad(); + callBack.Call(); + } +} diff --git a/SVSim.BattleEngine/Engine/Wizard/UserListViewPlate.cs b/SVSim.BattleEngine/Engine/Wizard/UserListViewPlate.cs new file mode 100644 index 0000000..7d640d7 --- /dev/null +++ b/SVSim.BattleEngine/Engine/Wizard/UserListViewPlate.cs @@ -0,0 +1,43 @@ +using System; +using Cute; +using UnityEngine; + +namespace Wizard; + +public class UserListViewPlate : UserPlateBase +{ + [SerializeField] + private UIButton _actionButton; + + [SerializeField] + private UILabel _actionButtonLabel; + + [SerializeField] + private GameObject _underLine; + + public Action OnAction { get; set; } + + public void Initialize(UserInfoBase userInfo, string actionButtonLabel) + { + InitializeBase(userInfo); + _actionButtonLabel.text = actionButtonLabel; + _actionButton.onClick.Clear(); + _actionButton.onClick.Add(new EventDelegate(delegate + { + OnAction.Call(userInfo); + })); + } + + public void SetUnderLine(bool visible) + { + if (_underLine != null) + { + _underLine.SetActive(visible); + } + } + + public void SetButtonVisible(bool visible) + { + _actionButton.gameObject.SetActive(visible); + } +} diff --git a/SVSim.BattleEngine/Engine/Wizard/UserPlateBase.cs b/SVSim.BattleEngine/Engine/Wizard/UserPlateBase.cs new file mode 100644 index 0000000..3b2e526 --- /dev/null +++ b/SVSim.BattleEngine/Engine/Wizard/UserPlateBase.cs @@ -0,0 +1,35 @@ +using UnityEngine; + +namespace Wizard; + +public class UserPlateBase : MonoBehaviour +{ + [SerializeField] + private UITexture _textureEmblem; + + [SerializeField] + private UITexture _textureCountry; + + [SerializeField] + private UITexture _textureRank; + + [SerializeField] + private UILabel _labelMemberName; + + [SerializeField] + private UITexture _textureDegree; + + protected void InitializeBase(UserInfoBase userInfo) + { + InitializeSimplePlate(userInfo); + } + + public void InitializeSimplePlate(UserInfoBase userInfo) + { + _textureEmblem.mainTexture = userInfo.GetUserEmblemTexture(); + _textureRank.mainTexture = userInfo.GetUserRankTexture(); + userInfo.InitializeDegreeTexture(_textureDegree); + _textureCountry.mainTexture = userInfo.GetUserCountryTexture(); + _labelMemberName.text = userInfo.Name; + } +} diff --git a/SVSim.BattleEngine/Engine/Wizard/UserRegionUpdater.cs b/SVSim.BattleEngine/Engine/Wizard/UserRegionUpdater.cs new file mode 100644 index 0000000..459329a --- /dev/null +++ b/SVSim.BattleEngine/Engine/Wizard/UserRegionUpdater.cs @@ -0,0 +1,51 @@ +using System; +using Cute; + +namespace Wizard; + +public class UserRegionUpdater +{ + private enum UpdateRegionType + { + CURRENT, + INSTALL + } + + private RegionCodeUpdateTask _regionUpdateTask; + + private UpdateRegionType _updateType = UpdateRegionType.INSTALL; + + private bool _isUpdateRegion; + + public UserRegionUpdater() + { + _regionUpdateTask = new RegionCodeUpdateTask(); + } + + public void UpDateRegion(Action callback) + { + string value = PlayerPrefsWrapper.GetValue(PlayerPrefsWrapper.INSTALL_REGION_CODE); + string currentRegionStr = PlayerPrefsWrapper.GetValue(PlayerPrefsWrapper.CURRENT_REGION_CODE); + if (string.IsNullOrEmpty(value) && !string.IsNullOrEmpty(currentRegionStr)) + { + _isUpdateRegion = true; + _updateType = UpdateRegionType.INSTALL; + } + else if (!string.IsNullOrEmpty(currentRegionStr) && value != currentRegionStr) + { + _isUpdateRegion = true; + _updateType = UpdateRegionType.CURRENT; + } + if (!_isUpdateRegion) + { + callback(); + return; + } + _regionUpdateTask.SetParameter((int)_updateType); + UIManager.GetInstance().StartCoroutine(Toolbox.NetworkManager.Connect(_regionUpdateTask, delegate + { + PlayerPrefsWrapper.SetValue(PlayerPrefsWrapper.INSTALL_REGION_CODE, currentRegionStr); + callback(); + }, BaseTask.OnRequestFailed, BaseTask.OnFailedErrorCode)); + } +} diff --git a/SVSim.BattleEngine/Shim/GodObjects/GodObjects.cs b/SVSim.BattleEngine/Shim/GodObjects/GodObjects.cs index f22a37e..5a55353 100644 --- a/SVSim.BattleEngine/Shim/GodObjects/GodObjects.cs +++ b/SVSim.BattleEngine/Shim/GodObjects/GodObjects.cs @@ -15,21 +15,7 @@ public class EffectMgr { public enum EffectType { - NONE, - CMN_CARD_ACCELERATE_1, CMN_CARD_CRYSTALLIZE_1, CMN_CARD_SELECT_3, - CMN_CARD_SET_1, CMN_CARD_SET_2, CMN_CARD_SET_3, - CMN_CARD_TARGET_1, CMN_CARD_TARGET_2, - CMN_CRAFT_CARD_1, CMN_CRAFT_CARD_2, CMN_CRAFT_ICON_1, - CMN_CRAFT_SPLASH_1, CMN_CRAFT_SPLASH_2, CMN_CRAFT_SPLASH_3, CMN_CRAFT_SPLASH_4, - CMN_CRAFT_TRACK_1, CMN_FRAME_BTN_1, CMN_FRAME_BTN_2, - CMN_GACHA_CURSOR_1, CMN_GACHA_OPEN_2, CMN_GACHA_OPEN_3, CMN_GACHA_OPEN_4, - CMN_INPUT_DRAG_1, CMN_INPUT_TOUCH_1, CMN_INPUT_TOUCH_2, - CMN_RESULT_BACK_1, CMN_RESULT_BACK_2, CMN_RESULT_BACK_3, - CMN_RESULT_FAILED_1, CMN_RESULT_GAUGE_1, CMN_RESULT_GAUGE_2, - CMN_RESULT_LVUP_1, CMN_RESULT_MATCH_1, CMN_RESULT_ORB_1, CMN_RESULT_ORB_2, - CMN_RESULT_RANKDOWN_1, CMN_RESULT_RANKUP_1, CMN_RESULT_TIERUP_1, - CMN_START_CARD_1, CMN_START_VS_1, CMN_START_VS_ST2, - CMN_UI_TURN_1, CMN_UI_TURN_5, CMN_UI_TURN_6, CMN_CLASS_APPEAR_1, + NONE, CMN_INPUT_TOUCH_1, CMN_INPUT_TOUCH_2, CMN_INPUT_DRAG_1, CMN_CARD_MOVE_1, CMN_CARD_MOVE_2, CMN_CARD_DRAW_2, CMN_CARD_DRAW_4, CMN_CARD_RETURN_1, CMN_CARD_SET_1, CMN_CARD_SET_2, CMN_CARD_SET_3, CMN_CARD_SET_4, CMN_CARD_ACCELERATE_1, CMN_CARD_CRYSTALLIZE_1, CMN_CARD_RARE_1, CMN_CARD_ATTACK_1, CMN_CARD_LANDING_1, CMN_CARD_TARGET_1, CMN_CARD_TARGET_2, CMN_CARD_TARGET_3, CMN_CARD_TARGET_4, CMN_CARD_SELECT_3, CMN_CARD_DAMAGE_1, CMN_CARD_DAMAGE_3, CMN_CARD_EVO_4, CMN_CLASS_APPEAR_1, CMN_CLASS_DESTROY_1, CMN_CLASS_DECKOUT_1, CMN_UI_COST_1, CMN_UI_COST_2, CMN_UI_COST_3, CMN_UI_COST_4, CMN_UI_EP_2, CMN_UI_EP_3, CMN_UI_EP_4, CMN_UI_EP_5, CMN_UI_EP_6, CMN_UI_TURN_1, CMN_UI_TURN_4, CMN_UI_TURN_5, CMN_UI_TURN_6, CMN_UI_YOURTURN_3, CMN_UI_TARGET_3, CMN_START_VS_1, CMN_START_VS_ST2, CMN_START_CARD_1, CMN_FRAME_BTN_1, CMN_FRAME_BTN_2, CMN_UI_HEROSKILL_1, CMN_UI_HEROSKILL_2, CMN_RESULT_TITLE_1, CMN_RESULT_TITLE_2, CMN_RESULT_TITLE_3, CMN_RESULT_LVUP_1, CMN_RESULT_RANKUP_1, CMN_RESULT_RANKDOWN_1, CMN_RESULT_TIERUP_1, CMN_RESULT_MATCH_1, CMN_RESULT_FAILED_1, CMN_RESULT_ORB_1, CMN_RESULT_ORB_2, CMN_RESULT_GAUGE_1, CMN_RESULT_GAUGE_2, CMN_RESULT_BACK_1, CMN_RESULT_BACK_2, CMN_RESULT_BACK_3, CMN_FIELD_SET_1, CMN_FIELD_SET_2, CMN_FIELD_SET_3, CMN_FIELD_SET_4, CMN_FIELD_SET_5, CMN_FIELD_SET_6, CMN_FIELD_SET_7, CMN_FIELD_SET_8, CMN_FIELD_SET_9, CMN_FIELD_SET_10, CMN_FIELD_SET_20, CMN_FIELD_SET_21, CMN_FIELD_SET_22, CMN_FIELD_SET_23, CMN_FIELD_SET_30, CMN_FIELD_SET_31, CMN_FIELD_SET_32, CMN_FIELD_SET_33, CMN_FIELD_SET_34, CMN_FIELD_SET_41, CMN_FIELD_SET_42, CMN_FIELD_SET_43, CMN_FIELD_SET_51, CMN_FIELD_SET_52, CMN_FIELD_SET_61, CMN_FIELD_SET_62, CMN_FIELD_SET_71, CMN_FIELD_SET_72, CMN_FIELD_SET_74, CMN_FIELD_SET_76, CMN_FIELD_SET_1001, CMN_FIELD_SET_1002, CMN_FIELD_SET_1003, CMN_FIELD_SET_1004, CMN_FIELD_SET_1005, CMN_FIELD_SET_1006, CMN_FIELD_SET_1007, CMN_FIELD_SET_1008, CMN_FIELD_SET_1009, CMN_FIELD_SET_1010, CMN_FIELD_SET_1011, CMN_FIELD_SET_1012, CMN_FIELD_TAP_1_1, CMN_FIELD_TAP_1_2, CMN_FIELD_TAP_2_1, CMN_FIELD_TAP_3_1, CMN_FIELD_TAP_3_2, CMN_FIELD_TAP_4_1, CMN_FIELD_TAP_4_2, CMN_FIELD_TAP_5_1, CMN_FIELD_TAP_6_1, CMN_FIELD_TAP_6_2, CMN_FIELD_TAP_7_1, CMN_FIELD_TAP_8_1, CMN_FIELD_TAP_9_1, CMN_FIELD_TAP_10_1, CMN_FIELD_TAP_10_2, CMN_FIELD_TAP_20_1, CMN_FIELD_TAP_20_2, CMN_FIELD_TAP_21_1, CMN_FIELD_TAP_21_2, CMN_FIELD_TAP_22_1, CMN_FIELD_TAP_23_1, CMN_FIELD_TAP_23_2, CMN_FIELD_TAP_30_1, CMN_FIELD_TAP_31_1, CMN_FIELD_TAP_31_2, CMN_FIELD_TAP_32_1, CMN_FIELD_TAP_33_1, CMN_FIELD_TAP_33_2, CMN_FIELD_TAP_34_1, CMN_FIELD_TAP_41_1, CMN_FIELD_TAP_42_1, CMN_FIELD_TAP_43_1, CMN_FIELD_TAP_51_1, CMN_FIELD_TAP_52_1, CMN_FIELD_TAP_61_1, CMN_FIELD_TAP_61_2, CMN_FIELD_TAP_62_1, CMN_FIELD_TAP_71_1, CMN_FIELD_TAP_72_1, CMN_FIELD_TAP_74_1, CMN_FIELD_TAP_76_1, CMN_FIELD_TAP_1001_1, CMN_FIELD_TAP_1002_1, CMN_FIELD_TAP_1003_1, CMN_FIELD_TAP_1004_1, CMN_FIELD_TAP_1005_1, CMN_FIELD_TAP_1006_1, CMN_FIELD_TAP_1007_1, CMN_FIELD_TAP_1007_2, CMN_FIELD_TAP_1008_1, CMN_FIELD_TAP_1009_1, CMN_FIELD_TAP_1010_1, CMN_FIELD_TAP_1011_1, CMN_FIELD_TAP_1012_1, CMN_MYPAGE_EVO_1, CMN_GACHA_CURSOR_1, CMN_GACHA_OPEN_2, CMN_GACHA_OPEN_3, CMN_GACHA_OPEN_4, CMN_TUTORIAL_DRAG_1, CMN_TUTORIAL_DRAG_2, CMN_TUTORIAL_TAP_1, CMN_TUTORIAL_TAP_2, CMN_TUTORIAL_NICE_1, CMN_CRAFT_CARD_1, CMN_CRAFT_CARD_2, CMN_CRAFT_ICON_1, CMN_CRAFT_TRACK_1, CMN_CRAFT_SPLASH_1, CMN_CRAFT_SPLASH_2, CMN_CRAFT_SPLASH_3, CMN_CRAFT_SPLASH_4, CMN_ENDING_IN_1, CMN_ENDING_LOGO_1, CMN_ENDING_LOGO_2, CMN_ENDING_TEXT_1, CMN_PROLOGUE_NAME_1, CMN_ARENA_ARCANE_1, CMN_ARENA_ARCANE_2, CMN_ARENA_FRAME_1, CMN_ARENA_FRAME_2, CMN_ARENA_FRAME_3, CMN_ARENA_CLASS_1, CMN_ARENA_CLASS_2, CMN_ARENA_DECIDE_1, CMN_ARENA_DECIDE_2, CMN_ARENA_DECIDE_3, CMN_ARENA_DECK_1, CMN_MAP_CHAPTER_1, CMN_MAP_MAPICON_CLEARED, CMN_MAP_MAPICON_NOTCLEARED, CMN_MAP_PLAYERICON, CMN_EMBLEM_GET_1, CMN_FRAME_CHOICE_1, CMN_FRAME_CHOICE_2, CMN_FRAME_CHOICE_3, CMN_FRAME_FUSION, CMN_FRAME_HEROSKILL_1, STT_ACT_PLAY_1, STT_ACT_GUARD_1, STT_ACT_FLAG_1, STT_ACT_REFLECTION_1, STT_LOOP_GUARD_1, STT_LOOP_UP_1, STT_LOOP_DOWN_1, STT_LOOP_SNEAK_1, STT_LOOP_REDUCTION_1, STT_LOOP_PROTECTION_1, STT_LOOP_PROTECTION_2, STT_LOOP_SKILL_INVINCIBLE_1, STT_LOOP_HOLD_4, STT_LOOP_BUFFER_1, STT_LOOP_SPELLCHARGE_1, STT_LOOP_UNATTACKED_1, STT_LOOP_UNSELECTED_1, STT_LOOP_HEAVENLYAEGIS_1, MAX, } public enum MoveType { NONE, DIRECT, DIRECT_HAND, DIRECT_LEADER } public enum TargetType { NONE, NONE_WAIT, SINGLE, SINGLE_ONLY_OPPONENT, AREA_ALL, AREA_OPPONENT, AREA_SELF } diff --git a/SVSim.BattleEngine/Shim/UnityEngine/UnityShim.cs b/SVSim.BattleEngine/Shim/UnityEngine/UnityShim.cs index bf0d627..2aeab31 100644 --- a/SVSim.BattleEngine/Shim/UnityEngine/UnityShim.cs +++ b/SVSim.BattleEngine/Shim/UnityEngine/UnityShim.cs @@ -193,11 +193,26 @@ namespace UnityEngine public class ScriptableObject : Object { } // ---- rendering / physics / audio (pure no-op presentation) ---- - public class Renderer : Component { public Material material { get; set; } public Material[] materials { get; set; } public bool enabled { get; set; } } + public class Renderer : Component + { + public Material material { get; set; } + public Material[] materials { get; set; } + public Material sharedMaterial { get; set; } + public Material[] sharedMaterials { get; set; } + public bool enabled { get; set; } + public bool isVisible => false; + public int sortingOrder { get; set; } + public string sortingLayerName { get; set; } + public int sortingLayerID { get; set; } + public Bounds bounds => default; + public ShadowCastingMode shadowCastingMode { get; set; } + public bool receiveShadows { get; set; } + } + public enum ShadowCastingMode { Off, On, TwoSided, ShadowsOnly } public class MeshRenderer : Renderer { } - public class SkinnedMeshRenderer : Renderer { } - public class SpriteRenderer : Renderer { public Sprite sprite { get; set; } } - public class MeshFilter : Component { public Mesh mesh { get; set; } } + public class SkinnedMeshRenderer : Renderer { public Mesh sharedMesh { get; set; } public Transform rootBone { get; set; } public Transform[] bones { get; set; } } + public class SpriteRenderer : Renderer { public Sprite sprite { get; set; } public Color color { get; set; } } + public class MeshFilter : Component { public Mesh mesh { get; set; } public Mesh sharedMesh { get; set; } } public class ParticleSystem : Component { public void Play() { } public void Play(bool withChildren) { }