diff --git a/SoloKing/Asset/Blueprint/SceneObj/Portal/PortalDoor.uasset b/SoloKing/Asset/Blueprint/SceneObj/Portal/PortalDoor.uasset index 2ed02cd4..ebaa1af1 100644 Binary files a/SoloKing/Asset/Blueprint/SceneObj/Portal/PortalDoor.uasset and b/SoloKing/Asset/Blueprint/SceneObj/Portal/PortalDoor.uasset differ diff --git a/SoloKing/Asset/Blueprint/SceneObj/Start/BP_ActorStart.uasset b/SoloKing/Asset/Blueprint/SceneObj/Start/BP_ActorStart.uasset index 427bb9c0..3fb90182 100644 Binary files a/SoloKing/Asset/Blueprint/SceneObj/Start/BP_ActorStart.uasset and b/SoloKing/Asset/Blueprint/SceneObj/Start/BP_ActorStart.uasset differ diff --git a/SoloKing/Asset/Blueprint/UGCGameMode.uasset b/SoloKing/Asset/Blueprint/UGCGameMode.uasset index 5b7f3a2f..4dbc6271 100644 Binary files a/SoloKing/Asset/Blueprint/UGCGameMode.uasset and b/SoloKing/Asset/Blueprint/UGCGameMode.uasset differ diff --git a/SoloKing/Asset/Blueprint/UGCGameState.uasset b/SoloKing/Asset/Blueprint/UGCGameState.uasset index 2d95e840..21706b7c 100644 Binary files a/SoloKing/Asset/Blueprint/UGCGameState.uasset and b/SoloKing/Asset/Blueprint/UGCGameState.uasset differ diff --git a/SoloKing/Asset/Blueprint/UGCLevelDirector.uasset b/SoloKing/Asset/Blueprint/UGCLevelDirector.uasset index ffda446c..ec970147 100644 Binary files a/SoloKing/Asset/Blueprint/UGCLevelDirector.uasset and b/SoloKing/Asset/Blueprint/UGCLevelDirector.uasset differ diff --git a/SoloKing/Asset/Blueprint/UGCPlayerController.uasset b/SoloKing/Asset/Blueprint/UGCPlayerController.uasset index 21959878..a6a9e287 100644 Binary files a/SoloKing/Asset/Blueprint/UGCPlayerController.uasset and b/SoloKing/Asset/Blueprint/UGCPlayerController.uasset differ diff --git a/SoloKing/Asset/Blueprint/UGCPlayerPawn.uasset b/SoloKing/Asset/Blueprint/UGCPlayerPawn.uasset index 85132cdd..f3df8dc2 100644 Binary files a/SoloKing/Asset/Blueprint/UGCPlayerPawn.uasset and b/SoloKing/Asset/Blueprint/UGCPlayerPawn.uasset differ diff --git a/SoloKing/Asset/Blueprint/UGCPlayerStartManager.uasset b/SoloKing/Asset/Blueprint/UGCPlayerStartManager.uasset index d16d7176..48947b11 100644 Binary files a/SoloKing/Asset/Blueprint/UGCPlayerStartManager.uasset and b/SoloKing/Asset/Blueprint/UGCPlayerStartManager.uasset differ diff --git a/SoloKing/Asset/Blueprint/UGCPlayerState.uasset b/SoloKing/Asset/Blueprint/UGCPlayerState.uasset index e3b38f26..594a0653 100644 Binary files a/SoloKing/Asset/Blueprint/UGCPlayerState.uasset and b/SoloKing/Asset/Blueprint/UGCPlayerState.uasset differ diff --git a/SoloKing/Asset/Levels/Map_DBL.umap b/SoloKing/Asset/Levels/Map_DBL.umap index e3141916..d0065fb3 100644 Binary files a/SoloKing/Asset/Levels/Map_DBL.umap and b/SoloKing/Asset/Levels/Map_DBL.umap differ diff --git a/SoloKing/Asset/Levels/Map_DC.umap b/SoloKing/Asset/Levels/Map_DC.umap index 5a227261..2b6e2242 100644 Binary files a/SoloKing/Asset/Levels/Map_DC.umap and b/SoloKing/Asset/Levels/Map_DC.umap differ diff --git a/SoloKing/Asset/Levels/Map_HDDJ.umap b/SoloKing/Asset/Levels/Map_HDDJ.umap index 93c53416..9736a903 100644 Binary files a/SoloKing/Asset/Levels/Map_HDDJ.umap and b/SoloKing/Asset/Levels/Map_HDDJ.umap differ diff --git a/SoloKing/Asset/Levels/Map_JCK.umap b/SoloKing/Asset/Levels/Map_JCK.umap index 1a8fe2c8..4542cb85 100644 Binary files a/SoloKing/Asset/Levels/Map_JCK.umap and b/SoloKing/Asset/Levels/Map_JCK.umap differ diff --git a/SoloKing/Asset/Levels/Map_NewYear.umap b/SoloKing/Asset/Levels/Map_NewYear.umap index 82b6fe09..612fd6d2 100644 Binary files a/SoloKing/Asset/Levels/Map_NewYear.umap and b/SoloKing/Asset/Levels/Map_NewYear.umap differ diff --git a/SoloKing/Asset/Levels/Map_SCL.umap b/SoloKing/Asset/Levels/Map_SCL.umap index 181c826f..615fc6da 100644 Binary files a/SoloKing/Asset/Levels/Map_SCL.umap and b/SoloKing/Asset/Levels/Map_SCL.umap differ diff --git a/SoloKing/Asset/Levels/Map_SLXLC.umap b/SoloKing/Asset/Levels/Map_SLXLC.umap index aecf7a2e..27289f46 100644 Binary files a/SoloKing/Asset/Levels/Map_SLXLC.umap and b/SoloKing/Asset/Levels/Map_SLXLC.umap differ diff --git a/SoloKing/Asset/Levels/Map_SMDJ.umap b/SoloKing/Asset/Levels/Map_SMDJ.umap index f2651e10..42818bb8 100644 Binary files a/SoloKing/Asset/Levels/Map_SMDJ.umap and b/SoloKing/Asset/Levels/Map_SMDJ.umap differ diff --git a/SoloKing/Asset/UGCLayout_BP.uasset b/SoloKing/Asset/UGCLayout_BP.uasset index fdc2a56f..f7669e41 100644 Binary files a/SoloKing/Asset/UGCLayout_BP.uasset and b/SoloKing/Asset/UGCLayout_BP.uasset differ diff --git a/SoloKing/Asset/UI/Child/WB_PlayerInfoItem.uasset b/SoloKing/Asset/UI/Child/WB_PlayerInfoItem.uasset deleted file mode 100644 index 8f9f429a..00000000 Binary files a/SoloKing/Asset/UI/Child/WB_PlayerInfoItem.uasset and /dev/null differ diff --git a/SoloKing/Asset/UI/Child/WB_PlayerInfoItem_Small.uasset b/SoloKing/Asset/UI/Child/WB_PlayerInfoItem_Small.uasset deleted file mode 100644 index 1b5ea8d2..00000000 Binary files a/SoloKing/Asset/UI/Child/WB_PlayerInfoItem_Small.uasset and /dev/null differ diff --git a/SoloKing/Asset/UI/CompetitionSeason/WB_ShowRankInheritance.uasset b/SoloKing/Asset/UI/CompetitionSeason/WB_ShowRankInheritance.uasset index 26d56aa7..2adcfa3e 100644 Binary files a/SoloKing/Asset/UI/CompetitionSeason/WB_ShowRankInheritance.uasset and b/SoloKing/Asset/UI/CompetitionSeason/WB_ShowRankInheritance.uasset differ diff --git a/SoloKing/Asset/UI/CompetitionSeason/WB_ShowVS.uasset b/SoloKing/Asset/UI/CompetitionSeason/WB_ShowVS.uasset index 09da6b7b..013d1059 100644 Binary files a/SoloKing/Asset/UI/CompetitionSeason/WB_ShowVS.uasset and b/SoloKing/Asset/UI/CompetitionSeason/WB_ShowVS.uasset differ diff --git a/SoloKing/Asset/UI/CompetitionSeason/WB_ShowVSPlayerInfo.uasset b/SoloKing/Asset/UI/CompetitionSeason/WB_ShowVSPlayerInfo.uasset index 6324871f..de8068c4 100644 Binary files a/SoloKing/Asset/UI/CompetitionSeason/WB_ShowVSPlayerInfo.uasset and b/SoloKing/Asset/UI/CompetitionSeason/WB_ShowVSPlayerInfo.uasset differ diff --git a/SoloKing/Asset/UI/GameEnd/WB_GameEnd.uasset b/SoloKing/Asset/UI/GameEnd/WB_GameEnd.uasset index 02b9c3cf..f19c8734 100644 Binary files a/SoloKing/Asset/UI/GameEnd/WB_GameEnd.uasset and b/SoloKing/Asset/UI/GameEnd/WB_GameEnd.uasset differ diff --git a/SoloKing/Asset/UI/GameEnd/WB_GameEnd_PlayerInfo.uasset b/SoloKing/Asset/UI/GameEnd/WB_GameEnd_PlayerInfo.uasset index 5e00c542..a4799230 100644 Binary files a/SoloKing/Asset/UI/GameEnd/WB_GameEnd_PlayerInfo.uasset and b/SoloKing/Asset/UI/GameEnd/WB_GameEnd_PlayerInfo.uasset differ diff --git a/SoloKing/Asset/UI/GameRecord/WB_GameRecord.uasset b/SoloKing/Asset/UI/GameRecord/WB_GameRecord.uasset index 48796030..b855cd95 100644 Binary files a/SoloKing/Asset/UI/GameRecord/WB_GameRecord.uasset and b/SoloKing/Asset/UI/GameRecord/WB_GameRecord.uasset differ diff --git a/SoloKing/Asset/UI/GameRecord/WB_Historical_Season.uasset b/SoloKing/Asset/UI/GameRecord/WB_Historical_Season.uasset index d0d4569c..44086e24 100644 Binary files a/SoloKing/Asset/UI/GameRecord/WB_Historical_Season.uasset and b/SoloKing/Asset/UI/GameRecord/WB_Historical_Season.uasset differ diff --git a/SoloKing/Asset/UI/GameRecord/WB_RecordItem.uasset b/SoloKing/Asset/UI/GameRecord/WB_RecordItem.uasset index 4bc820a4..b4dbe98b 100644 Binary files a/SoloKing/Asset/UI/GameRecord/WB_RecordItem.uasset and b/SoloKing/Asset/UI/GameRecord/WB_RecordItem.uasset differ diff --git a/SoloKing/Asset/UI/GameRecord/WB_RecordType.uasset b/SoloKing/Asset/UI/GameRecord/WB_RecordType.uasset index 804348be..9af79aa2 100644 Binary files a/SoloKing/Asset/UI/GameRecord/WB_RecordType.uasset and b/SoloKing/Asset/UI/GameRecord/WB_RecordType.uasset differ diff --git a/SoloKing/Asset/UI/GameRecord/WB_RoundInfoItem.uasset b/SoloKing/Asset/UI/GameRecord/WB_RoundInfoItem.uasset index a053a31a..3ea04105 100644 Binary files a/SoloKing/Asset/UI/GameRecord/WB_RoundInfoItem.uasset and b/SoloKing/Asset/UI/GameRecord/WB_RoundInfoItem.uasset differ diff --git a/SoloKing/Asset/UI/GameRecord/WB_SortType.uasset b/SoloKing/Asset/UI/GameRecord/WB_SortType.uasset index 4eaf786f..644bf084 100644 Binary files a/SoloKing/Asset/UI/GameRecord/WB_SortType.uasset and b/SoloKing/Asset/UI/GameRecord/WB_SortType.uasset differ diff --git a/SoloKing/Asset/UI/GameRecord/WB_WeaponProficiency.uasset b/SoloKing/Asset/UI/GameRecord/WB_WeaponProficiency.uasset index e29d233b..701eea61 100644 Binary files a/SoloKing/Asset/UI/GameRecord/WB_WeaponProficiency.uasset and b/SoloKing/Asset/UI/GameRecord/WB_WeaponProficiency.uasset differ diff --git a/SoloKing/Asset/UI/GameRecord/WB_WeaponProficiencyPanel.uasset b/SoloKing/Asset/UI/GameRecord/WB_WeaponProficiencyPanel.uasset index 4b87c1f7..f069e0ef 100644 Binary files a/SoloKing/Asset/UI/GameRecord/WB_WeaponProficiencyPanel.uasset and b/SoloKing/Asset/UI/GameRecord/WB_WeaponProficiencyPanel.uasset differ diff --git a/SoloKing/Asset/UI/GameRecord/WB_WeaponProficiencyTop.uasset b/SoloKing/Asset/UI/GameRecord/WB_WeaponProficiencyTop.uasset index 92419cf1..e7db18a7 100644 Binary files a/SoloKing/Asset/UI/GameRecord/WB_WeaponProficiencyTop.uasset and b/SoloKing/Asset/UI/GameRecord/WB_WeaponProficiencyTop.uasset differ diff --git a/SoloKing/Asset/UI/InTest/WB_InTest_Side.uasset b/SoloKing/Asset/UI/InTest/WB_InTest_Side.uasset index b06cd816..9da761e4 100644 Binary files a/SoloKing/Asset/UI/InTest/WB_InTest_Side.uasset and b/SoloKing/Asset/UI/InTest/WB_InTest_Side.uasset differ diff --git a/SoloKing/Asset/UI/InTest/WB_TestButtonItem.uasset b/SoloKing/Asset/UI/InTest/WB_TestButtonItem.uasset index c2e7a2e0..87e6efe4 100644 Binary files a/SoloKing/Asset/UI/InTest/WB_TestButtonItem.uasset and b/SoloKing/Asset/UI/InTest/WB_TestButtonItem.uasset differ diff --git a/SoloKing/Asset/UI/SecondaryConfirmation/WB_SecondaryConfirmation.uasset b/SoloKing/Asset/UI/SecondaryConfirmation/WB_SecondaryConfirmation.uasset deleted file mode 100644 index b9447447..00000000 Binary files a/SoloKing/Asset/UI/SecondaryConfirmation/WB_SecondaryConfirmation.uasset and /dev/null differ diff --git a/SoloKing/Asset/UI/SecondaryConfirmation/WB_SecondaryConfirmation_Strip.uasset b/SoloKing/Asset/UI/SecondaryConfirmation/WB_SecondaryConfirmation_Strip.uasset deleted file mode 100644 index 000e649a..00000000 Binary files a/SoloKing/Asset/UI/SecondaryConfirmation/WB_SecondaryConfirmation_Strip.uasset and /dev/null differ diff --git a/SoloKing/Asset/UI/SelectGameMode/WB_ModeType.uasset b/SoloKing/Asset/UI/SelectGameMode/WB_ModeType.uasset index 24f69ab0..1c8cf037 100644 Binary files a/SoloKing/Asset/UI/SelectGameMode/WB_ModeType.uasset and b/SoloKing/Asset/UI/SelectGameMode/WB_ModeType.uasset differ diff --git a/SoloKing/Asset/UI/SelectGameMode/WB_SelectGameMode.uasset b/SoloKing/Asset/UI/SelectGameMode/WB_SelectGameMode.uasset index f1018642..7d44b0a8 100644 Binary files a/SoloKing/Asset/UI/SelectGameMode/WB_SelectGameMode.uasset and b/SoloKing/Asset/UI/SelectGameMode/WB_SelectGameMode.uasset differ diff --git a/SoloKing/Asset/UI/SelectWeapons/Child/WB_AllWeapon_Item.uasset b/SoloKing/Asset/UI/SelectWeapons/Child/WB_AllWeapon_Item.uasset index b4b7d6fc..dcf36222 100644 Binary files a/SoloKing/Asset/UI/SelectWeapons/Child/WB_AllWeapon_Item.uasset and b/SoloKing/Asset/UI/SelectWeapons/Child/WB_AllWeapon_Item.uasset differ diff --git a/SoloKing/Asset/UI/SelectWeapons/Child/WB_AllWeapon_ItemHadSelect.uasset b/SoloKing/Asset/UI/SelectWeapons/Child/WB_AllWeapon_ItemHadSelect.uasset index b1ecb33b..21b43404 100644 Binary files a/SoloKing/Asset/UI/SelectWeapons/Child/WB_AllWeapon_ItemHadSelect.uasset and b/SoloKing/Asset/UI/SelectWeapons/Child/WB_AllWeapon_ItemHadSelect.uasset differ diff --git a/SoloKing/Asset/UI/SelectWeapons/Child/WB_AllWeapon_Type.uasset b/SoloKing/Asset/UI/SelectWeapons/Child/WB_AllWeapon_Type.uasset index 2d3e51e5..b631fb61 100644 Binary files a/SoloKing/Asset/UI/SelectWeapons/Child/WB_AllWeapon_Type.uasset and b/SoloKing/Asset/UI/SelectWeapons/Child/WB_AllWeapon_Type.uasset differ diff --git a/SoloKing/Asset/UI/SelectWeapons/Child/WB_SelectWeaponDefenceItem.uasset b/SoloKing/Asset/UI/SelectWeapons/Child/WB_SelectWeaponDefenceItem.uasset index d10a0d46..1c4abb0c 100644 Binary files a/SoloKing/Asset/UI/SelectWeapons/Child/WB_SelectWeaponDefenceItem.uasset and b/SoloKing/Asset/UI/SelectWeapons/Child/WB_SelectWeaponDefenceItem.uasset differ diff --git a/SoloKing/Asset/UI/SelectWeapons/Child/WB_SelectWeaponItem.uasset b/SoloKing/Asset/UI/SelectWeapons/Child/WB_SelectWeaponItem.uasset index 377d03ea..e043a5b6 100644 Binary files a/SoloKing/Asset/UI/SelectWeapons/Child/WB_SelectWeaponItem.uasset and b/SoloKing/Asset/UI/SelectWeapons/Child/WB_SelectWeaponItem.uasset differ diff --git a/SoloKing/Asset/UI/SelectWeapons/Child/WB_SelectWeaponItems.uasset b/SoloKing/Asset/UI/SelectWeapons/Child/WB_SelectWeaponItems.uasset index 7cac0c04..c8a2927a 100644 Binary files a/SoloKing/Asset/UI/SelectWeapons/Child/WB_SelectWeaponItems.uasset and b/SoloKing/Asset/UI/SelectWeapons/Child/WB_SelectWeaponItems.uasset differ diff --git a/SoloKing/Asset/UI/SelectWeapons/Child/WB_SelectWeaponOtherItem.uasset b/SoloKing/Asset/UI/SelectWeapons/Child/WB_SelectWeaponOtherItem.uasset index cbc274c8..374f765c 100644 Binary files a/SoloKing/Asset/UI/SelectWeapons/Child/WB_SelectWeaponOtherItem.uasset and b/SoloKing/Asset/UI/SelectWeapons/Child/WB_SelectWeaponOtherItem.uasset differ diff --git a/SoloKing/Asset/UI/SelectWeapons/Child/WB_SelectWeaponPartItem.uasset b/SoloKing/Asset/UI/SelectWeapons/Child/WB_SelectWeaponPartItem.uasset index 4cf2ad7b..83c5704b 100644 Binary files a/SoloKing/Asset/UI/SelectWeapons/Child/WB_SelectWeaponPartItem.uasset and b/SoloKing/Asset/UI/SelectWeapons/Child/WB_SelectWeaponPartItem.uasset differ diff --git a/SoloKing/Asset/UI/SelectWeapons/Child/WB_Spectator_SelectWeaponItem.uasset b/SoloKing/Asset/UI/SelectWeapons/Child/WB_Spectator_SelectWeaponItem.uasset index c404f866..5381170e 100644 Binary files a/SoloKing/Asset/UI/SelectWeapons/Child/WB_Spectator_SelectWeaponItem.uasset and b/SoloKing/Asset/UI/SelectWeapons/Child/WB_Spectator_SelectWeaponItem.uasset differ diff --git a/SoloKing/Asset/UI/SelectWeapons/Item/WB_OtherPartItem.uasset b/SoloKing/Asset/UI/SelectWeapons/Item/WB_OtherPartItem.uasset index 919129cc..af963c78 100644 Binary files a/SoloKing/Asset/UI/SelectWeapons/Item/WB_OtherPartItem.uasset and b/SoloKing/Asset/UI/SelectWeapons/Item/WB_OtherPartItem.uasset differ diff --git a/SoloKing/Asset/UI/SelectWeapons/Item/WB_WeaponItem.uasset b/SoloKing/Asset/UI/SelectWeapons/Item/WB_WeaponItem.uasset index 613850ef..a319f7b9 100644 Binary files a/SoloKing/Asset/UI/SelectWeapons/Item/WB_WeaponItem.uasset and b/SoloKing/Asset/UI/SelectWeapons/Item/WB_WeaponItem.uasset differ diff --git a/SoloKing/Asset/UI/SelectWeapons/Item/WB_WeaponPartItem.uasset b/SoloKing/Asset/UI/SelectWeapons/Item/WB_WeaponPartItem.uasset index 26b488a0..cbfa8dc5 100644 Binary files a/SoloKing/Asset/UI/SelectWeapons/Item/WB_WeaponPartItem.uasset and b/SoloKing/Asset/UI/SelectWeapons/Item/WB_WeaponPartItem.uasset differ diff --git a/SoloKing/Asset/UI/SelectWeapons/Item/WB_WeaponSelectItem.uasset b/SoloKing/Asset/UI/SelectWeapons/Item/WB_WeaponSelectItem.uasset index d79ff2dc..b097f479 100644 Binary files a/SoloKing/Asset/UI/SelectWeapons/Item/WB_WeaponSelectItem.uasset and b/SoloKing/Asset/UI/SelectWeapons/Item/WB_WeaponSelectItem.uasset differ diff --git a/SoloKing/Asset/UI/SelectWeapons/SaveCustomWeaponItem/WB_SaveOtherWeaponItem.uasset b/SoloKing/Asset/UI/SelectWeapons/SaveCustomWeaponItem/WB_SaveOtherWeaponItem.uasset index e6aa2578..cfb62c0a 100644 Binary files a/SoloKing/Asset/UI/SelectWeapons/SaveCustomWeaponItem/WB_SaveOtherWeaponItem.uasset and b/SoloKing/Asset/UI/SelectWeapons/SaveCustomWeaponItem/WB_SaveOtherWeaponItem.uasset differ diff --git a/SoloKing/Asset/UI/SelectWeapons/SaveCustomWeaponItem/WB_SaveWeaponItem.uasset b/SoloKing/Asset/UI/SelectWeapons/SaveCustomWeaponItem/WB_SaveWeaponItem.uasset index d05784a3..de66b81c 100644 Binary files a/SoloKing/Asset/UI/SelectWeapons/SaveCustomWeaponItem/WB_SaveWeaponItem.uasset and b/SoloKing/Asset/UI/SelectWeapons/SaveCustomWeaponItem/WB_SaveWeaponItem.uasset differ diff --git a/SoloKing/Asset/UI/SelectWeapons/SaveCustomWeaponItem/WB_SelectSaveWeapon.uasset b/SoloKing/Asset/UI/SelectWeapons/SaveCustomWeaponItem/WB_SelectSaveWeapon.uasset index de130188..4272849e 100644 Binary files a/SoloKing/Asset/UI/SelectWeapons/SaveCustomWeaponItem/WB_SelectSaveWeapon.uasset and b/SoloKing/Asset/UI/SelectWeapons/SaveCustomWeaponItem/WB_SelectSaveWeapon.uasset differ diff --git a/SoloKing/Asset/UI/SelectWeapons/SaveCustomWeaponItem/WB_WeaponType.uasset b/SoloKing/Asset/UI/SelectWeapons/SaveCustomWeaponItem/WB_WeaponType.uasset index 95e0f644..bc800a3c 100644 Binary files a/SoloKing/Asset/UI/SelectWeapons/SaveCustomWeaponItem/WB_WeaponType.uasset and b/SoloKing/Asset/UI/SelectWeapons/SaveCustomWeaponItem/WB_WeaponType.uasset differ diff --git a/SoloKing/Asset/UI/SelectWeapons/SelectDisableChild/WB_Disables.uasset b/SoloKing/Asset/UI/SelectWeapons/SelectDisableChild/WB_Disables.uasset index 0d2fb83d..8d31b521 100644 Binary files a/SoloKing/Asset/UI/SelectWeapons/SelectDisableChild/WB_Disables.uasset and b/SoloKing/Asset/UI/SelectWeapons/SelectDisableChild/WB_Disables.uasset differ diff --git a/SoloKing/Asset/UI/SelectWeapons/SelectDisableChild/WB_SelectDisableChild.uasset b/SoloKing/Asset/UI/SelectWeapons/SelectDisableChild/WB_SelectDisableChild.uasset index 2847a5fb..93f2dc4d 100644 Binary files a/SoloKing/Asset/UI/SelectWeapons/SelectDisableChild/WB_SelectDisableChild.uasset and b/SoloKing/Asset/UI/SelectWeapons/SelectDisableChild/WB_SelectDisableChild.uasset differ diff --git a/SoloKing/Asset/UI/SelectWeapons/SelectDisableChild/WB_ShowDisable.uasset b/SoloKing/Asset/UI/SelectWeapons/SelectDisableChild/WB_ShowDisable.uasset index c37a4a36..bc1d8476 100644 Binary files a/SoloKing/Asset/UI/SelectWeapons/SelectDisableChild/WB_ShowDisable.uasset and b/SoloKing/Asset/UI/SelectWeapons/SelectDisableChild/WB_ShowDisable.uasset differ diff --git a/SoloKing/Asset/UI/SelectWeapons/WB_CustomWeapon.uasset b/SoloKing/Asset/UI/SelectWeapons/WB_CustomWeapon.uasset index 3e2438d8..7901c25f 100644 Binary files a/SoloKing/Asset/UI/SelectWeapons/WB_CustomWeapon.uasset and b/SoloKing/Asset/UI/SelectWeapons/WB_CustomWeapon.uasset differ diff --git a/SoloKing/Asset/UI/SelectWeapons/WB_CustomWeapon_New.uasset b/SoloKing/Asset/UI/SelectWeapons/WB_CustomWeapon_New.uasset index 1dab5f3c..457f5a45 100644 Binary files a/SoloKing/Asset/UI/SelectWeapons/WB_CustomWeapon_New.uasset and b/SoloKing/Asset/UI/SelectWeapons/WB_CustomWeapon_New.uasset differ diff --git a/SoloKing/Asset/UI/SelectWeapons/WB_ReselectWeaponBtn.uasset b/SoloKing/Asset/UI/SelectWeapons/WB_ReselectWeaponBtn.uasset index 38ab6403..76f33960 100644 Binary files a/SoloKing/Asset/UI/SelectWeapons/WB_ReselectWeaponBtn.uasset and b/SoloKing/Asset/UI/SelectWeapons/WB_ReselectWeaponBtn.uasset differ diff --git a/SoloKing/Asset/UI/SelectWeapons/WB_SelectAllWeapon.uasset b/SoloKing/Asset/UI/SelectWeapons/WB_SelectAllWeapon.uasset index bcbfc98f..97094af6 100644 Binary files a/SoloKing/Asset/UI/SelectWeapons/WB_SelectAllWeapon.uasset and b/SoloKing/Asset/UI/SelectWeapons/WB_SelectAllWeapon.uasset differ diff --git a/SoloKing/Asset/UI/SelectWeapons/WB_SelectWeapons.uasset b/SoloKing/Asset/UI/SelectWeapons/WB_SelectWeapons.uasset index 0433271e..607d6849 100644 Binary files a/SoloKing/Asset/UI/SelectWeapons/WB_SelectWeapons.uasset and b/SoloKing/Asset/UI/SelectWeapons/WB_SelectWeapons.uasset differ diff --git a/SoloKing/Asset/UI/SelectWeapons/WB_SpectatorSelectWeapon.uasset b/SoloKing/Asset/UI/SelectWeapons/WB_SpectatorSelectWeapon.uasset index a776663a..8b997eef 100644 Binary files a/SoloKing/Asset/UI/SelectWeapons/WB_SpectatorSelectWeapon.uasset and b/SoloKing/Asset/UI/SelectWeapons/WB_SpectatorSelectWeapon.uasset differ diff --git a/SoloKing/Asset/UI/SelectWeapons/WB_WeaponSelect_New.uasset b/SoloKing/Asset/UI/SelectWeapons/WB_WeaponSelect_New.uasset index a8eaa020..c7a37904 100644 Binary files a/SoloKing/Asset/UI/SelectWeapons/WB_WeaponSelect_New.uasset and b/SoloKing/Asset/UI/SelectWeapons/WB_WeaponSelect_New.uasset differ diff --git a/SoloKing/Asset/UI/SelectWeapons/WeaponConfiguration/WB_WeaponConfigPartItem.uasset b/SoloKing/Asset/UI/SelectWeapons/WeaponConfiguration/WB_WeaponConfigPartItem.uasset index 80cd6476..a3378ae7 100644 Binary files a/SoloKing/Asset/UI/SelectWeapons/WeaponConfiguration/WB_WeaponConfigPartItem.uasset and b/SoloKing/Asset/UI/SelectWeapons/WeaponConfiguration/WB_WeaponConfigPartItem.uasset differ diff --git a/SoloKing/Asset/UI/SelectWeapons/WeaponConfiguration/WB_WeaponConfiguration.uasset b/SoloKing/Asset/UI/SelectWeapons/WeaponConfiguration/WB_WeaponConfiguration.uasset index 41d861ef..2054e593 100644 Binary files a/SoloKing/Asset/UI/SelectWeapons/WeaponConfiguration/WB_WeaponConfiguration.uasset and b/SoloKing/Asset/UI/SelectWeapons/WeaponConfiguration/WB_WeaponConfiguration.uasset differ diff --git a/SoloKing/Asset/UI/Tip/WB_SecondaryConfirmationNotice.uasset b/SoloKing/Asset/UI/Tip/WB_SecondaryConfirmationNotice.uasset index 443c104d..a2c57023 100644 Binary files a/SoloKing/Asset/UI/Tip/WB_SecondaryConfirmationNotice.uasset and b/SoloKing/Asset/UI/Tip/WB_SecondaryConfirmationNotice.uasset differ diff --git a/SoloKing/Asset/UI/Tip/WB_TipSlidingTackle.uasset b/SoloKing/Asset/UI/Tip/WB_TipSlidingTackle.uasset index 4d6a9cab..d2b2f3aa 100644 Binary files a/SoloKing/Asset/UI/Tip/WB_TipSlidingTackle.uasset and b/SoloKing/Asset/UI/Tip/WB_TipSlidingTackle.uasset differ diff --git a/SoloKing/Asset/UI/Tool/Child/WB_PlayerInfoItem.uasset b/SoloKing/Asset/UI/Tool/Child/WB_PlayerInfoItem.uasset new file mode 100644 index 00000000..22eb7b3e Binary files /dev/null and b/SoloKing/Asset/UI/Tool/Child/WB_PlayerInfoItem.uasset differ diff --git a/SoloKing/Asset/UI/Tool/Child/WB_RankItem.uasset b/SoloKing/Asset/UI/Tool/Child/WB_RankItem.uasset deleted file mode 100644 index 16a07f7b..00000000 Binary files a/SoloKing/Asset/UI/Tool/Child/WB_RankItem.uasset and /dev/null differ diff --git a/SoloKing/Asset/UI/Tool/Child/WB_SelectMapItem.uasset b/SoloKing/Asset/UI/Tool/Child/WB_SelectMapItem.uasset index 7d70f338..f938ae3e 100644 Binary files a/SoloKing/Asset/UI/Tool/Child/WB_SelectMapItem.uasset and b/SoloKing/Asset/UI/Tool/Child/WB_SelectMapItem.uasset differ diff --git a/SoloKing/Asset/UI/Tool/WB_SelectPartButton.uasset b/SoloKing/Asset/UI/Tool/Child/WB_SelectPartButton.uasset similarity index 72% rename from SoloKing/Asset/UI/Tool/WB_SelectPartButton.uasset rename to SoloKing/Asset/UI/Tool/Child/WB_SelectPartButton.uasset index 66a535c8..2133c837 100644 Binary files a/SoloKing/Asset/UI/Tool/WB_SelectPartButton.uasset and b/SoloKing/Asset/UI/Tool/Child/WB_SelectPartButton.uasset differ diff --git a/SoloKing/Asset/UI/Tool/WB_SelectPartItem.uasset b/SoloKing/Asset/UI/Tool/Child/WB_SelectPartItem.uasset similarity index 71% rename from SoloKing/Asset/UI/Tool/WB_SelectPartItem.uasset rename to SoloKing/Asset/UI/Tool/Child/WB_SelectPartItem.uasset index b7fa6eca..6714bb45 100644 Binary files a/SoloKing/Asset/UI/Tool/WB_SelectPartItem.uasset and b/SoloKing/Asset/UI/Tool/Child/WB_SelectPartItem.uasset differ diff --git a/SoloKing/Asset/UI/Tool/Title/WB_Title1.uasset b/SoloKing/Asset/UI/Tool/Title/WB_Title1.uasset index b6525019..cc8d25a5 100644 Binary files a/SoloKing/Asset/UI/Tool/Title/WB_Title1.uasset and b/SoloKing/Asset/UI/Tool/Title/WB_Title1.uasset differ diff --git a/SoloKing/Asset/UI/Tool/Title/WB_Title1_2.uasset b/SoloKing/Asset/UI/Tool/Title/WB_Title1_2.uasset index b807ef7f..c6ce2b1a 100644 Binary files a/SoloKing/Asset/UI/Tool/Title/WB_Title1_2.uasset and b/SoloKing/Asset/UI/Tool/Title/WB_Title1_2.uasset differ diff --git a/SoloKing/Asset/UI/Tool/Title/WB_Title2.uasset b/SoloKing/Asset/UI/Tool/Title/WB_Title2.uasset index 491996c9..e25e6053 100644 Binary files a/SoloKing/Asset/UI/Tool/Title/WB_Title2.uasset and b/SoloKing/Asset/UI/Tool/Title/WB_Title2.uasset differ diff --git a/SoloKing/Asset/UI/Tool/Title/WB_Title2_2.uasset b/SoloKing/Asset/UI/Tool/Title/WB_Title2_2.uasset index 8cb7db5f..c75698b6 100644 Binary files a/SoloKing/Asset/UI/Tool/Title/WB_Title2_2.uasset and b/SoloKing/Asset/UI/Tool/Title/WB_Title2_2.uasset differ diff --git a/SoloKing/Asset/UI/Tool/WB_CountDownButton.uasset b/SoloKing/Asset/UI/Tool/WB_CountDownButton.uasset deleted file mode 100644 index c8f48f17..00000000 Binary files a/SoloKing/Asset/UI/Tool/WB_CountDownButton.uasset and /dev/null differ diff --git a/SoloKing/Asset/UI/Tool/WB_DamageTextButton.uasset b/SoloKing/Asset/UI/Tool/WB_DamageTextButton.uasset index 77bb473d..3a582077 100644 Binary files a/SoloKing/Asset/UI/Tool/WB_DamageTextButton.uasset and b/SoloKing/Asset/UI/Tool/WB_DamageTextButton.uasset differ diff --git a/SoloKing/Asset/UI/Tool/WB_FaceNotice.uasset b/SoloKing/Asset/UI/Tool/WB_FaceNotice.uasset deleted file mode 100644 index 55b630fb..00000000 Binary files a/SoloKing/Asset/UI/Tool/WB_FaceNotice.uasset and /dev/null differ diff --git a/SoloKing/Asset/UI/Tool/WB_PID.uasset b/SoloKing/Asset/UI/Tool/WB_PID.uasset index af4db5f3..2c51347f 100644 Binary files a/SoloKing/Asset/UI/Tool/WB_PID.uasset and b/SoloKing/Asset/UI/Tool/WB_PID.uasset differ diff --git a/SoloKing/Asset/UI/WB_PlayerInfo.uasset b/SoloKing/Asset/UI/Tool/WB_PlayerInfo.uasset similarity index 62% rename from SoloKing/Asset/UI/WB_PlayerInfo.uasset rename to SoloKing/Asset/UI/Tool/WB_PlayerInfo.uasset index c58af986..61886d2f 100644 Binary files a/SoloKing/Asset/UI/WB_PlayerInfo.uasset and b/SoloKing/Asset/UI/Tool/WB_PlayerInfo.uasset differ diff --git a/SoloKing/Asset/UI/Tool/WB_Rank.uasset b/SoloKing/Asset/UI/Tool/WB_Rank.uasset deleted file mode 100644 index b5bea9da..00000000 Binary files a/SoloKing/Asset/UI/Tool/WB_Rank.uasset and /dev/null differ diff --git a/SoloKing/Asset/UI/Tool/WB_RankingListBtn1.uasset b/SoloKing/Asset/UI/Tool/WB_RankingListBtn1.uasset index 0a96c16b..f2405f7f 100644 Binary files a/SoloKing/Asset/UI/Tool/WB_RankingListBtn1.uasset and b/SoloKing/Asset/UI/Tool/WB_RankingListBtn1.uasset differ diff --git a/SoloKing/Asset/UI/Round/WB_RoundEnd.uasset b/SoloKing/Asset/UI/Tool/WB_RoundEnd.uasset similarity index 74% rename from SoloKing/Asset/UI/Round/WB_RoundEnd.uasset rename to SoloKing/Asset/UI/Tool/WB_RoundEnd.uasset index bca04440..93575172 100644 Binary files a/SoloKing/Asset/UI/Round/WB_RoundEnd.uasset and b/SoloKing/Asset/UI/Tool/WB_RoundEnd.uasset differ diff --git a/SoloKing/Asset/UI/Tool/WB_SelectMap.uasset b/SoloKing/Asset/UI/Tool/WB_SelectMap.uasset index a5a6c0d9..75578ba7 100644 Binary files a/SoloKing/Asset/UI/Tool/WB_SelectMap.uasset and b/SoloKing/Asset/UI/Tool/WB_SelectMap.uasset differ diff --git a/SoloKing/Asset/UI/Tool/WB_SelectParts.uasset b/SoloKing/Asset/UI/Tool/WB_SelectParts.uasset index 58c108b7..9415389e 100644 Binary files a/SoloKing/Asset/UI/Tool/WB_SelectParts.uasset and b/SoloKing/Asset/UI/Tool/WB_SelectParts.uasset differ diff --git a/SoloKing/Asset/UI/Tool/WB_SettingButton.uasset b/SoloKing/Asset/UI/Tool/WB_SettingButton.uasset index 3591c29e..e6d17e80 100644 Binary files a/SoloKing/Asset/UI/Tool/WB_SettingButton.uasset and b/SoloKing/Asset/UI/Tool/WB_SettingButton.uasset differ diff --git a/SoloKing/Asset/UI/Tool/WB_ShovelButton.uasset b/SoloKing/Asset/UI/Tool/WB_ShovelButton.uasset index 3cf51c95..23645187 100644 Binary files a/SoloKing/Asset/UI/Tool/WB_ShovelButton.uasset and b/SoloKing/Asset/UI/Tool/WB_ShovelButton.uasset differ diff --git a/SoloKing/Asset/UI/TwoConfirm/WB_SecondaryConfirmation.uasset b/SoloKing/Asset/UI/TwoConfirm/WB_SecondaryConfirmation.uasset new file mode 100644 index 00000000..70dbffcc Binary files /dev/null and b/SoloKing/Asset/UI/TwoConfirm/WB_SecondaryConfirmation.uasset differ diff --git a/SoloKing/Asset/UI/TwoConfirm/WB_SecondaryConfirmation_Strip.uasset b/SoloKing/Asset/UI/TwoConfirm/WB_SecondaryConfirmation_Strip.uasset new file mode 100644 index 00000000..294905a0 Binary files /dev/null and b/SoloKing/Asset/UI/TwoConfirm/WB_SecondaryConfirmation_Strip.uasset differ diff --git a/SoloKing/Asset/UI/WB_Main.uasset b/SoloKing/Asset/UI/WB_Main.uasset index 6631715c..f332d045 100644 Binary files a/SoloKing/Asset/UI/WB_Main.uasset and b/SoloKing/Asset/UI/WB_Main.uasset differ diff --git a/SoloKing/Asset/UI/WB_PlayerInfo_Small.uasset b/SoloKing/Asset/UI/WB_PlayerInfo_Small.uasset deleted file mode 100644 index 68a6d580..00000000 Binary files a/SoloKing/Asset/UI/WB_PlayerInfo_Small.uasset and /dev/null differ diff --git a/SoloKing/Asset/UMGTemplate/General_AvatarFrame_UIBP.uasset b/SoloKing/Asset/UMGTemplate/General_AvatarFrame_UIBP.uasset index 9eade332..6a02d424 100644 Binary files a/SoloKing/Asset/UMGTemplate/General_AvatarFrame_UIBP.uasset and b/SoloKing/Asset/UMGTemplate/General_AvatarFrame_UIBP.uasset differ diff --git a/SoloKing/Asset/UMGTemplate/General_CheckBoxButton.uasset b/SoloKing/Asset/UMGTemplate/General_CheckBoxButton.uasset index e74d7ba5..8784e16c 100644 Binary files a/SoloKing/Asset/UMGTemplate/General_CheckBoxButton.uasset and b/SoloKing/Asset/UMGTemplate/General_CheckBoxButton.uasset differ diff --git a/SoloKing/Asset/UMGTemplate/General_GameFailure_UIBP.uasset b/SoloKing/Asset/UMGTemplate/General_GameFailure_UIBP.uasset index f25280f0..83da199b 100644 Binary files a/SoloKing/Asset/UMGTemplate/General_GameFailure_UIBP.uasset and b/SoloKing/Asset/UMGTemplate/General_GameFailure_UIBP.uasset differ diff --git a/SoloKing/Asset/UMGTemplate/General_GameTopBlueTips_UIBP.uasset b/SoloKing/Asset/UMGTemplate/General_GameTopBlueTips_UIBP.uasset index d4e8d132..e63a1aae 100644 Binary files a/SoloKing/Asset/UMGTemplate/General_GameTopBlueTips_UIBP.uasset and b/SoloKing/Asset/UMGTemplate/General_GameTopBlueTips_UIBP.uasset differ diff --git a/SoloKing/Asset/UMGTemplate/General_GameTopRedTips_UIBP.uasset b/SoloKing/Asset/UMGTemplate/General_GameTopRedTips_UIBP.uasset index 5d048424..b894640d 100644 Binary files a/SoloKing/Asset/UMGTemplate/General_GameTopRedTips_UIBP.uasset and b/SoloKing/Asset/UMGTemplate/General_GameTopRedTips_UIBP.uasset differ diff --git a/SoloKing/Asset/UMGTemplate/General_GameVictory_UIBP.uasset b/SoloKing/Asset/UMGTemplate/General_GameVictory_UIBP.uasset index 26a87259..c84771de 100644 Binary files a/SoloKing/Asset/UMGTemplate/General_GameVictory_UIBP.uasset and b/SoloKing/Asset/UMGTemplate/General_GameVictory_UIBP.uasset differ diff --git a/SoloKing/Asset/UMGTemplate/General_Ingame_BloodVolButton.uasset b/SoloKing/Asset/UMGTemplate/General_Ingame_BloodVolButton.uasset index 7dd4f70c..77f9fdf9 100644 Binary files a/SoloKing/Asset/UMGTemplate/General_Ingame_BloodVolButton.uasset and b/SoloKing/Asset/UMGTemplate/General_Ingame_BloodVolButton.uasset differ diff --git a/SoloKing/Asset/UMGTemplate/General_Ingame_RingButton.uasset b/SoloKing/Asset/UMGTemplate/General_Ingame_RingButton.uasset index 30942dd9..21f9328d 100644 Binary files a/SoloKing/Asset/UMGTemplate/General_Ingame_RingButton.uasset and b/SoloKing/Asset/UMGTemplate/General_Ingame_RingButton.uasset differ diff --git a/SoloKing/Asset/UMGTemplate/General_Ingame_SquareButton.uasset b/SoloKing/Asset/UMGTemplate/General_Ingame_SquareButton.uasset index 827d2d25..74bf17a5 100644 Binary files a/SoloKing/Asset/UMGTemplate/General_Ingame_SquareButton.uasset and b/SoloKing/Asset/UMGTemplate/General_Ingame_SquareButton.uasset differ diff --git a/SoloKing/Asset/UMGTemplate/General_NoticeLeftKillTips_UIBP.uasset b/SoloKing/Asset/UMGTemplate/General_NoticeLeftKillTips_UIBP.uasset index 1f16fc66..a7dff374 100644 Binary files a/SoloKing/Asset/UMGTemplate/General_NoticeLeftKillTips_UIBP.uasset and b/SoloKing/Asset/UMGTemplate/General_NoticeLeftKillTips_UIBP.uasset differ diff --git a/SoloKing/Asset/UMGTemplate/General_NoticeTopTips_UIBP.uasset b/SoloKing/Asset/UMGTemplate/General_NoticeTopTips_UIBP.uasset index d0ed2fbd..63a1ab65 100644 Binary files a/SoloKing/Asset/UMGTemplate/General_NoticeTopTips_UIBP.uasset and b/SoloKing/Asset/UMGTemplate/General_NoticeTopTips_UIBP.uasset differ diff --git a/SoloKing/Asset/UMGTemplate/General_Player_infoBar_UIBP.uasset b/SoloKing/Asset/UMGTemplate/General_Player_infoBar_UIBP.uasset index a196fdaa..fb639e41 100644 Binary files a/SoloKing/Asset/UMGTemplate/General_Player_infoBar_UIBP.uasset and b/SoloKing/Asset/UMGTemplate/General_Player_infoBar_UIBP.uasset differ diff --git a/SoloKing/Asset/UMGTemplate/General_SecondLevelButton_1.uasset b/SoloKing/Asset/UMGTemplate/General_SecondLevelButton_1.uasset index 574cc693..36468b97 100644 Binary files a/SoloKing/Asset/UMGTemplate/General_SecondLevelButton_1.uasset and b/SoloKing/Asset/UMGTemplate/General_SecondLevelButton_1.uasset differ diff --git a/SoloKing/Asset/UMGTemplate/General_SecondLevelButton_2.uasset b/SoloKing/Asset/UMGTemplate/General_SecondLevelButton_2.uasset index ffa0c105..e2f8f5d8 100644 Binary files a/SoloKing/Asset/UMGTemplate/General_SecondLevelButton_2.uasset and b/SoloKing/Asset/UMGTemplate/General_SecondLevelButton_2.uasset differ diff --git a/SoloKing/Asset/UMGTemplate/General_SecondLevelButton_3.uasset b/SoloKing/Asset/UMGTemplate/General_SecondLevelButton_3.uasset index 3db14151..ae2627e6 100644 Binary files a/SoloKing/Asset/UMGTemplate/General_SecondLevelButton_3.uasset and b/SoloKing/Asset/UMGTemplate/General_SecondLevelButton_3.uasset differ diff --git a/SoloKing/Asset/UMGTemplate/General_Shop/General_Currency_UIBP.uasset b/SoloKing/Asset/UMGTemplate/General_Shop/General_Currency_UIBP.uasset index c52937d9..50cc6eb9 100644 Binary files a/SoloKing/Asset/UMGTemplate/General_Shop/General_Currency_UIBP.uasset and b/SoloKing/Asset/UMGTemplate/General_Shop/General_Currency_UIBP.uasset differ diff --git a/SoloKing/Asset/UMGTemplate/General_Shop/General_ShopItem_UIBP.uasset b/SoloKing/Asset/UMGTemplate/General_Shop/General_ShopItem_UIBP.uasset index f714cd65..860988b2 100644 Binary files a/SoloKing/Asset/UMGTemplate/General_Shop/General_ShopItem_UIBP.uasset and b/SoloKing/Asset/UMGTemplate/General_Shop/General_ShopItem_UIBP.uasset differ diff --git a/SoloKing/Asset/UMGTemplate/General_Shop/General_ShopMain_UIBP.uasset b/SoloKing/Asset/UMGTemplate/General_Shop/General_ShopMain_UIBP.uasset index c969c444..b6caf610 100644 Binary files a/SoloKing/Asset/UMGTemplate/General_Shop/General_ShopMain_UIBP.uasset and b/SoloKing/Asset/UMGTemplate/General_Shop/General_ShopMain_UIBP.uasset differ diff --git a/SoloKing/Asset/UMGTemplate/General_Shop/General_ShopPlay_UIBP.uasset b/SoloKing/Asset/UMGTemplate/General_Shop/General_ShopPlay_UIBP.uasset index b0b3660f..ca68c2d7 100644 Binary files a/SoloKing/Asset/UMGTemplate/General_Shop/General_ShopPlay_UIBP.uasset and b/SoloKing/Asset/UMGTemplate/General_Shop/General_ShopPlay_UIBP.uasset differ diff --git a/SoloKing/Asset/UMGTemplate/General_Shop/General_ShopPreviewItem_UIBP.uasset b/SoloKing/Asset/UMGTemplate/General_Shop/General_ShopPreviewItem_UIBP.uasset index e4b8660f..cdf38268 100644 Binary files a/SoloKing/Asset/UMGTemplate/General_Shop/General_ShopPreviewItem_UIBP.uasset and b/SoloKing/Asset/UMGTemplate/General_Shop/General_ShopPreviewItem_UIBP.uasset differ diff --git a/SoloKing/Asset/UMGTemplate/General_SlideModeButton.uasset b/SoloKing/Asset/UMGTemplate/General_SlideModeButton.uasset index a3d29b6c..83f8c7d3 100644 Binary files a/SoloKing/Asset/UMGTemplate/General_SlideModeButton.uasset and b/SoloKing/Asset/UMGTemplate/General_SlideModeButton.uasset differ diff --git a/SoloKing/Asset/UMGTemplate/General_SwitchButton.uasset b/SoloKing/Asset/UMGTemplate/General_SwitchButton.uasset index 61e7481d..4151fa83 100644 Binary files a/SoloKing/Asset/UMGTemplate/General_SwitchButton.uasset and b/SoloKing/Asset/UMGTemplate/General_SwitchButton.uasset differ diff --git a/SoloKing/Asset/UMGTemplate/General_TMode_Discard_UIBP.uasset b/SoloKing/Asset/UMGTemplate/General_TMode_Discard_UIBP.uasset index e555d718..1d2999e4 100644 Binary files a/SoloKing/Asset/UMGTemplate/General_TMode_Discard_UIBP.uasset and b/SoloKing/Asset/UMGTemplate/General_TMode_Discard_UIBP.uasset differ diff --git a/SoloKing/Asset/UMGTemplate/General_Team_ScoreBoard_UIBP.uasset b/SoloKing/Asset/UMGTemplate/General_Team_ScoreBoard_UIBP.uasset index 2fd850c5..d0345f0d 100644 Binary files a/SoloKing/Asset/UMGTemplate/General_Team_ScoreBoard_UIBP.uasset and b/SoloKing/Asset/UMGTemplate/General_Team_ScoreBoard_UIBP.uasset differ diff --git a/SoloKing/Asset/UMGTemplate/Peekaboo/Peekaboo_EditLocation.uasset b/SoloKing/Asset/UMGTemplate/Peekaboo/Peekaboo_EditLocation.uasset index ea2e56dc..fdb7fbd8 100644 Binary files a/SoloKing/Asset/UMGTemplate/Peekaboo/Peekaboo_EditLocation.uasset and b/SoloKing/Asset/UMGTemplate/Peekaboo/Peekaboo_EditLocation.uasset differ diff --git a/SoloKing/Asset/UMGTemplate/Peekaboo/Peekaboo_ItemSelect.uasset b/SoloKing/Asset/UMGTemplate/Peekaboo/Peekaboo_ItemSelect.uasset index d0cbc3b6..97bd34ce 100644 Binary files a/SoloKing/Asset/UMGTemplate/Peekaboo/Peekaboo_ItemSelect.uasset and b/SoloKing/Asset/UMGTemplate/Peekaboo/Peekaboo_ItemSelect.uasset differ diff --git a/SoloKing/Asset/UMGTemplate/Peekaboo/Peekaboo_ItemSelect_UIBP.uasset b/SoloKing/Asset/UMGTemplate/Peekaboo/Peekaboo_ItemSelect_UIBP.uasset index 54dde1d9..417ea210 100644 Binary files a/SoloKing/Asset/UMGTemplate/Peekaboo/Peekaboo_ItemSelect_UIBP.uasset and b/SoloKing/Asset/UMGTemplate/Peekaboo/Peekaboo_ItemSelect_UIBP.uasset differ diff --git a/SoloKing/Asset/UMGTemplate/Peekaboo/Peekaboo_Main_UIBP.uasset b/SoloKing/Asset/UMGTemplate/Peekaboo/Peekaboo_Main_UIBP.uasset index 1655e2d5..0b9a42a0 100644 Binary files a/SoloKing/Asset/UMGTemplate/Peekaboo/Peekaboo_Main_UIBP.uasset and b/SoloKing/Asset/UMGTemplate/Peekaboo/Peekaboo_Main_UIBP.uasset differ diff --git a/SoloKing/Asset/UMGTemplate/Peekaboo/Peekaboo_Playerlist_UIBP.uasset b/SoloKing/Asset/UMGTemplate/Peekaboo/Peekaboo_Playerlist_UIBP.uasset index 0bf50c30..a5810e42 100644 Binary files a/SoloKing/Asset/UMGTemplate/Peekaboo/Peekaboo_Playerlist_UIBP.uasset and b/SoloKing/Asset/UMGTemplate/Peekaboo/Peekaboo_Playerlist_UIBP.uasset differ diff --git a/SoloKing/Asset/UMGTemplate/Peekaboo/Peekaboo_PropsItem.uasset b/SoloKing/Asset/UMGTemplate/Peekaboo/Peekaboo_PropsItem.uasset index 9e7a02ac..87deba5a 100644 Binary files a/SoloKing/Asset/UMGTemplate/Peekaboo/Peekaboo_PropsItem.uasset and b/SoloKing/Asset/UMGTemplate/Peekaboo/Peekaboo_PropsItem.uasset differ diff --git a/SoloKing/Asset/UMGTemplate/Peekaboo/Peekaboo_Props_UIBP.uasset b/SoloKing/Asset/UMGTemplate/Peekaboo/Peekaboo_Props_UIBP.uasset index 459e8d42..f1204b59 100644 Binary files a/SoloKing/Asset/UMGTemplate/Peekaboo/Peekaboo_Props_UIBP.uasset and b/SoloKing/Asset/UMGTemplate/Peekaboo/Peekaboo_Props_UIBP.uasset differ diff --git a/SoloKing/Asset/UMGTemplate/Peekaboo/Peekaboo_Settlement_UIBP.uasset b/SoloKing/Asset/UMGTemplate/Peekaboo/Peekaboo_Settlement_UIBP.uasset index 95922e7f..2a8b40c9 100644 Binary files a/SoloKing/Asset/UMGTemplate/Peekaboo/Peekaboo_Settlement_UIBP.uasset and b/SoloKing/Asset/UMGTemplate/Peekaboo/Peekaboo_Settlement_UIBP.uasset differ diff --git a/SoloKing/Asset/UMGTemplate/ReuseList2.uasset b/SoloKing/Asset/UMGTemplate/ReuseList2.uasset index d82e61bf..b3410f8a 100644 Binary files a/SoloKing/Asset/UMGTemplate/ReuseList2.uasset and b/SoloKing/Asset/UMGTemplate/ReuseList2.uasset differ diff --git a/SoloKing/Asset/UMGTemplate/Settlement/Common_RankTitleInfo_UIBP.uasset b/SoloKing/Asset/UMGTemplate/Settlement/Common_RankTitleInfo_UIBP.uasset index 68f6d2ca..d73c44c6 100644 Binary files a/SoloKing/Asset/UMGTemplate/Settlement/Common_RankTitleInfo_UIBP.uasset and b/SoloKing/Asset/UMGTemplate/Settlement/Common_RankTitleInfo_UIBP.uasset differ diff --git a/SoloKing/Asset/UMGTemplate/Settlement/General_BattleDataList_UIBP.uasset b/SoloKing/Asset/UMGTemplate/Settlement/General_BattleDataList_UIBP.uasset index 9df83108..52de6427 100644 Binary files a/SoloKing/Asset/UMGTemplate/Settlement/General_BattleDataList_UIBP.uasset and b/SoloKing/Asset/UMGTemplate/Settlement/General_BattleDataList_UIBP.uasset differ diff --git a/SoloKing/Asset/UMGTemplate/Settlement/General_BattleDetail_UIBP.uasset b/SoloKing/Asset/UMGTemplate/Settlement/General_BattleDetail_UIBP.uasset index e44aa233..a041de47 100644 Binary files a/SoloKing/Asset/UMGTemplate/Settlement/General_BattleDetail_UIBP.uasset and b/SoloKing/Asset/UMGTemplate/Settlement/General_BattleDetail_UIBP.uasset differ diff --git a/SoloKing/Asset/UMGTemplate/Settlement/General_ListDataBG_UIBP.uasset b/SoloKing/Asset/UMGTemplate/Settlement/General_ListDataBG_UIBP.uasset index 4b110ad4..272827b3 100644 Binary files a/SoloKing/Asset/UMGTemplate/Settlement/General_ListDataBG_UIBP.uasset and b/SoloKing/Asset/UMGTemplate/Settlement/General_ListDataBG_UIBP.uasset differ diff --git a/SoloKing/Asset/UMGTemplate/Settlement/General_Team_ModeList_UIBP.uasset b/SoloKing/Asset/UMGTemplate/Settlement/General_Team_ModeList_UIBP.uasset index e47379d0..ea01e82a 100644 Binary files a/SoloKing/Asset/UMGTemplate/Settlement/General_Team_ModeList_UIBP.uasset and b/SoloKing/Asset/UMGTemplate/Settlement/General_Team_ModeList_UIBP.uasset differ diff --git a/SoloKing/Asset/UMGTemplate/Settlement/General_Team_ModeMain_UIBP.uasset b/SoloKing/Asset/UMGTemplate/Settlement/General_Team_ModeMain_UIBP.uasset index 28fad123..e5078a36 100644 Binary files a/SoloKing/Asset/UMGTemplate/Settlement/General_Team_ModeMain_UIBP.uasset and b/SoloKing/Asset/UMGTemplate/Settlement/General_Team_ModeMain_UIBP.uasset differ diff --git a/SoloKing/Asset/UMGTemplate/Settlement/General_TitleBattleDetail_UIBP.uasset b/SoloKing/Asset/UMGTemplate/Settlement/General_TitleBattleDetail_UIBP.uasset index e9e99f30..aea64fec 100644 Binary files a/SoloKing/Asset/UMGTemplate/Settlement/General_TitleBattleDetail_UIBP.uasset and b/SoloKing/Asset/UMGTemplate/Settlement/General_TitleBattleDetail_UIBP.uasset differ diff --git a/SoloKing/Asset/UMGTemplate/Settlement/General_TopBG_UIBP.uasset b/SoloKing/Asset/UMGTemplate/Settlement/General_TopBG_UIBP.uasset index b439a84f..1cccf433 100644 Binary files a/SoloKing/Asset/UMGTemplate/Settlement/General_TopBG_UIBP.uasset and b/SoloKing/Asset/UMGTemplate/Settlement/General_TopBG_UIBP.uasset differ diff --git a/SoloKing/Asset/UMGTemplate/UGC_DragDropTextBox.uasset b/SoloKing/Asset/UMGTemplate/UGC_DragDropTextBox.uasset index 444d3885..0092ae59 100644 Binary files a/SoloKing/Asset/UMGTemplate/UGC_DragDropTextBox.uasset and b/SoloKing/Asset/UMGTemplate/UGC_DragDropTextBox.uasset differ diff --git a/SoloKing/ExtendResource/RankingList/OfficialPackage/Asset/Common/UIBP/Common_PopupsBg_Medium_UIBP.uasset b/SoloKing/ExtendResource/RankingList/OfficialPackage/Asset/Common/UIBP/Common_PopupsBg_Medium_UIBP.uasset index 0049dc41..28208e8a 100644 Binary files a/SoloKing/ExtendResource/RankingList/OfficialPackage/Asset/Common/UIBP/Common_PopupsBg_Medium_UIBP.uasset and b/SoloKing/ExtendResource/RankingList/OfficialPackage/Asset/Common/UIBP/Common_PopupsBg_Medium_UIBP.uasset differ diff --git a/SoloKing/ExtendResource/RankingList/OfficialPackage/Asset/Common/UIBP/Common_PopupsBg_Small_UIBP.uasset b/SoloKing/ExtendResource/RankingList/OfficialPackage/Asset/Common/UIBP/Common_PopupsBg_Small_UIBP.uasset index 4d2f642a..07ef706f 100644 Binary files a/SoloKing/ExtendResource/RankingList/OfficialPackage/Asset/Common/UIBP/Common_PopupsBg_Small_UIBP.uasset and b/SoloKing/ExtendResource/RankingList/OfficialPackage/Asset/Common/UIBP/Common_PopupsBg_Small_UIBP.uasset differ diff --git a/SoloKing/ExtendResource/RankingList/OfficialPackage/Asset/RankingList/Arts_UI/UIBP/Item/UGC_RankingList_ButTab_UIBP.uasset b/SoloKing/ExtendResource/RankingList/OfficialPackage/Asset/RankingList/Arts_UI/UIBP/Item/UGC_RankingList_ButTab_UIBP.uasset index b0d0d193..ee2b37ae 100644 Binary files a/SoloKing/ExtendResource/RankingList/OfficialPackage/Asset/RankingList/Arts_UI/UIBP/Item/UGC_RankingList_ButTab_UIBP.uasset and b/SoloKing/ExtendResource/RankingList/OfficialPackage/Asset/RankingList/Arts_UI/UIBP/Item/UGC_RankingList_ButTab_UIBP.uasset differ diff --git a/SoloKing/ExtendResource/RankingList/OfficialPackage/Asset/RankingList/Arts_UI/UIBP/Item/UGC_RankingList_Explanation_UIBP.uasset b/SoloKing/ExtendResource/RankingList/OfficialPackage/Asset/RankingList/Arts_UI/UIBP/Item/UGC_RankingList_Explanation_UIBP.uasset index 2cd1530c..9f203689 100644 Binary files a/SoloKing/ExtendResource/RankingList/OfficialPackage/Asset/RankingList/Arts_UI/UIBP/Item/UGC_RankingList_Explanation_UIBP.uasset and b/SoloKing/ExtendResource/RankingList/OfficialPackage/Asset/RankingList/Arts_UI/UIBP/Item/UGC_RankingList_Explanation_UIBP.uasset differ diff --git a/SoloKing/ExtendResource/RankingList/OfficialPackage/Asset/RankingList/Arts_UI/UIBP/Item/UGC_RankingList_Get_FX_UIBP.uasset b/SoloKing/ExtendResource/RankingList/OfficialPackage/Asset/RankingList/Arts_UI/UIBP/Item/UGC_RankingList_Get_FX_UIBP.uasset index 4a0a5c86..ac2fc9cb 100644 Binary files a/SoloKing/ExtendResource/RankingList/OfficialPackage/Asset/RankingList/Arts_UI/UIBP/Item/UGC_RankingList_Get_FX_UIBP.uasset and b/SoloKing/ExtendResource/RankingList/OfficialPackage/Asset/RankingList/Arts_UI/UIBP/Item/UGC_RankingList_Get_FX_UIBP.uasset differ diff --git a/SoloKing/ExtendResource/RankingList/OfficialPackage/Asset/RankingList/Arts_UI/UIBP/Item/UGC_RankingList_Item_Style1_UIBP.uasset b/SoloKing/ExtendResource/RankingList/OfficialPackage/Asset/RankingList/Arts_UI/UIBP/Item/UGC_RankingList_Item_Style1_UIBP.uasset index 3b852ab2..67562dea 100644 Binary files a/SoloKing/ExtendResource/RankingList/OfficialPackage/Asset/RankingList/Arts_UI/UIBP/Item/UGC_RankingList_Item_Style1_UIBP.uasset and b/SoloKing/ExtendResource/RankingList/OfficialPackage/Asset/RankingList/Arts_UI/UIBP/Item/UGC_RankingList_Item_Style1_UIBP.uasset differ diff --git a/SoloKing/ExtendResource/RankingList/OfficialPackage/Asset/RankingList/Arts_UI/UIBP/Item/UGC_RankingList_PopupsBG_UIBP.uasset b/SoloKing/ExtendResource/RankingList/OfficialPackage/Asset/RankingList/Arts_UI/UIBP/Item/UGC_RankingList_PopupsBG_UIBP.uasset index 1abd74d7..34a8008b 100644 Binary files a/SoloKing/ExtendResource/RankingList/OfficialPackage/Asset/RankingList/Arts_UI/UIBP/Item/UGC_RankingList_PopupsBG_UIBP.uasset and b/SoloKing/ExtendResource/RankingList/OfficialPackage/Asset/RankingList/Arts_UI/UIBP/Item/UGC_RankingList_PopupsBG_UIBP.uasset differ diff --git a/SoloKing/ExtendResource/RankingList/OfficialPackage/Asset/RankingList/Arts_UI/UIBP/Item/UGC_RankingList_Tips_UIBP.uasset b/SoloKing/ExtendResource/RankingList/OfficialPackage/Asset/RankingList/Arts_UI/UIBP/Item/UGC_RankingList_Tips_UIBP.uasset index 7241b04e..0437552b 100644 Binary files a/SoloKing/ExtendResource/RankingList/OfficialPackage/Asset/RankingList/Arts_UI/UIBP/Item/UGC_RankingList_Tips_UIBP.uasset and b/SoloKing/ExtendResource/RankingList/OfficialPackage/Asset/RankingList/Arts_UI/UIBP/Item/UGC_RankingList_Tips_UIBP.uasset differ diff --git a/SoloKing/ExtendResource/RankingList/OfficialPackage/Asset/RankingList/Arts_UI/UIBP/UGC_RankingList_But_UIBP.uasset b/SoloKing/ExtendResource/RankingList/OfficialPackage/Asset/RankingList/Arts_UI/UIBP/UGC_RankingList_But_UIBP.uasset index 27f6c49f..60bbc4fe 100644 Binary files a/SoloKing/ExtendResource/RankingList/OfficialPackage/Asset/RankingList/Arts_UI/UIBP/UGC_RankingList_But_UIBP.uasset and b/SoloKing/ExtendResource/RankingList/OfficialPackage/Asset/RankingList/Arts_UI/UIBP/UGC_RankingList_But_UIBP.uasset differ diff --git a/SoloKing/ExtendResource/RankingList/OfficialPackage/Asset/RankingList/Arts_UI/UIBP/UGC_RankingList_IngameBut_UIBP.uasset b/SoloKing/ExtendResource/RankingList/OfficialPackage/Asset/RankingList/Arts_UI/UIBP/UGC_RankingList_IngameBut_UIBP.uasset index 0a3572ab..da0971eb 100644 Binary files a/SoloKing/ExtendResource/RankingList/OfficialPackage/Asset/RankingList/Arts_UI/UIBP/UGC_RankingList_IngameBut_UIBP.uasset and b/SoloKing/ExtendResource/RankingList/OfficialPackage/Asset/RankingList/Arts_UI/UIBP/UGC_RankingList_IngameBut_UIBP.uasset differ diff --git a/SoloKing/ExtendResource/RankingList/OfficialPackage/Asset/RankingList/Arts_UI/UIBP/UGC_RankingList_ItemGet_UIBP.uasset b/SoloKing/ExtendResource/RankingList/OfficialPackage/Asset/RankingList/Arts_UI/UIBP/UGC_RankingList_ItemGet_UIBP.uasset index 62f5c00a..e535c277 100644 Binary files a/SoloKing/ExtendResource/RankingList/OfficialPackage/Asset/RankingList/Arts_UI/UIBP/UGC_RankingList_ItemGet_UIBP.uasset and b/SoloKing/ExtendResource/RankingList/OfficialPackage/Asset/RankingList/Arts_UI/UIBP/UGC_RankingList_ItemGet_UIBP.uasset differ diff --git a/SoloKing/ExtendResource/RankingList/OfficialPackage/Asset/RankingList/Arts_UI/UIBP/UGC_RankingList_Main_UIBP.uasset b/SoloKing/ExtendResource/RankingList/OfficialPackage/Asset/RankingList/Arts_UI/UIBP/UGC_RankingList_Main_UIBP.uasset index d8aa7e2d..ea0ece03 100644 Binary files a/SoloKing/ExtendResource/RankingList/OfficialPackage/Asset/RankingList/Arts_UI/UIBP/UGC_RankingList_Main_UIBP.uasset and b/SoloKing/ExtendResource/RankingList/OfficialPackage/Asset/RankingList/Arts_UI/UIBP/UGC_RankingList_Main_UIBP.uasset differ diff --git a/SoloKing/ExtendResource/RankingList/OfficialPackage/Asset/RankingList/Arts_UI/UIBP/UGC_RankingList_Set_Popup_UIBP.uasset b/SoloKing/ExtendResource/RankingList/OfficialPackage/Asset/RankingList/Arts_UI/UIBP/UGC_RankingList_Set_Popup_UIBP.uasset index 8397077e..6d59759c 100644 Binary files a/SoloKing/ExtendResource/RankingList/OfficialPackage/Asset/RankingList/Arts_UI/UIBP/UGC_RankingList_Set_Popup_UIBP.uasset and b/SoloKing/ExtendResource/RankingList/OfficialPackage/Asset/RankingList/Arts_UI/UIBP/UGC_RankingList_Set_Popup_UIBP.uasset differ diff --git a/SoloKing/ExtendResource/RankingList/OfficialPackage/Asset/RankingList/Blueprint/BP_Placeholder.uasset b/SoloKing/ExtendResource/RankingList/OfficialPackage/Asset/RankingList/Blueprint/BP_Placeholder.uasset index 503c937f..cfa88ac1 100644 Binary files a/SoloKing/ExtendResource/RankingList/OfficialPackage/Asset/RankingList/Blueprint/BP_Placeholder.uasset and b/SoloKing/ExtendResource/RankingList/OfficialPackage/Asset/RankingList/Blueprint/BP_Placeholder.uasset differ diff --git a/SoloKing/ExtendResource/RankingList/OfficialPackage/Asset/RankingList/Blueprint/RankingListActor.uasset b/SoloKing/ExtendResource/RankingList/OfficialPackage/Asset/RankingList/Blueprint/RankingListActor.uasset index d2e39ffc..9059c1e9 100644 Binary files a/SoloKing/ExtendResource/RankingList/OfficialPackage/Asset/RankingList/Blueprint/RankingListActor.uasset and b/SoloKing/ExtendResource/RankingList/OfficialPackage/Asset/RankingList/Blueprint/RankingListActor.uasset differ diff --git a/SoloKing/ExtendResource/RankingList/OfficialPackage/Asset/RankingList/Blueprint/RankingListComponent.uasset b/SoloKing/ExtendResource/RankingList/OfficialPackage/Asset/RankingList/Blueprint/RankingListComponent.uasset index 4e7e5be5..8649d96b 100644 Binary files a/SoloKing/ExtendResource/RankingList/OfficialPackage/Asset/RankingList/Blueprint/RankingListComponent.uasset and b/SoloKing/ExtendResource/RankingList/OfficialPackage/Asset/RankingList/Blueprint/RankingListComponent.uasset differ diff --git a/SoloKing/ExtendResource/RankingList/OfficialPackage/Asset/RankingList/Blueprint/WBP_RankingListBtn.uasset b/SoloKing/ExtendResource/RankingList/OfficialPackage/Asset/RankingList/Blueprint/WBP_RankingListBtn.uasset index 72a2485c..39af319b 100644 Binary files a/SoloKing/ExtendResource/RankingList/OfficialPackage/Asset/RankingList/Blueprint/WBP_RankingListBtn.uasset and b/SoloKing/ExtendResource/RankingList/OfficialPackage/Asset/RankingList/Blueprint/WBP_RankingListBtn.uasset differ diff --git a/SoloKing/Script/Blueprint/UGCGameState.lua b/SoloKing/Script/Blueprint/UGCGameState.lua index eb66c421..a252492b 100644 --- a/SoloKing/Script/Blueprint/UGCGameState.lua +++ b/SoloKing/Script/Blueprint/UGCGameState.lua @@ -1,6 +1,5 @@ ---@class UGCGameState_C:BP_UGCGameState_C ---@field WrapperClass UClass ----@field ShootWeaponClass UClass --Edit Below-- UGCGameSystem.UGCRequire('Script.Common.ue_enum_custom') require('Script.Global.Global'); @@ -149,7 +148,7 @@ function UGCGameState:LoadMap(Name) if v.MapName == Name then self.MapIndex = i; DOREPONCE(self, "MapIndex"); - break; + break ; end end UGCLogSystem.Log("[UGCGameState:LoadMap] 加载 %s", Name) @@ -157,7 +156,7 @@ function UGCGameState:LoadMap(Name) end function UGCGameState:OnRep_LoadMapName() - if self.LoadMapName == nil then return; end + if self.LoadMapName == nil then return ; end UGCLogSystem.Log("[UGCGameState:OnRep_LoadMapName] LoadMapName = %s", self.LoadMapName); UGCEventSystem.SendEvent(EventTypes.OnMapLoaded, self.LoadMapName); table.func(MiniManager, "OnMapLoadComplete") @@ -175,9 +174,7 @@ function UGCGameState:LoadRandomMap(InIndex) else self.MapIndex = InIndex; end - local MapNames = {}; - table.insert(MapNames, LevelTable.LevelInfo[self.MapIndex].MapName); - LevelStreamTool.LoadStreamLevels(MapNames, { Object = self, Func = self.LoadMapFinish }, false); + LevelStreamTool.LoadStreamLevels({ LevelTable.LevelInfo[self.MapIndex].MapName }, { Object = self, Func = self.LoadMapFinish }, false); DOREPONCE(self, "MapIndex"); else -- 发送 RPC 到服务器 @@ -186,7 +183,7 @@ function UGCGameState:LoadRandomMap(InIndex) end function UGCGameState:OnRep_MapIndex() - if self.MapIndex == 0 then return; end + if self.MapIndex == 0 then return ; end UGCLogSystem.Log("[UGCGameState:OnRep_MapIndex] 开始加载小地图 MapIndex = %d", self.MapIndex); -- 加载小地图 self:LoadMinimap(self.MapIndex); @@ -198,10 +195,10 @@ function UGCGameState:UnloadMap() local MapNames = {}; table.insert(MapNames, LevelTable.LevelInfo[self.MapIndex].MapName) LevelStreamTool.UnLoadStreamLevels(MapNames, { Object = self, Func = self.UnLoadMapFinish }, false); - self.MapIndex = 0; + self.MapIndex = 0; self.LoadMapName = nil; -- 重置 ClientAlready - self.bInitOnce = false; + self.bInitOnce = false; DOREPONCE(self, "MapIndex"); end end @@ -303,6 +300,12 @@ function UGCGameState:CheckServerTime(InPlayerKey, InTime) end end +function UGCGameState:CheckClientTime(InTime) + self.ServerTimeDiff = InTime - UE.GetCurrentTime(); + UGCLogSystem.Log("[UGCGameState:CheckClientTime] self.ServerTimeDiff = %f", self.ServerTimeDiff); + self:OnClientAlready(LocalPlayerKey); +end + function UGCGameState:OnRep_ServerTime() -- 接收到之后就立刻发送 RPC 到服务器,或者也可以等一会 if self.ServerTime == 1 then @@ -321,12 +324,6 @@ function UGCGameState:OnRep_ServerTime() end end -function UGCGameState:CheckClientTime(InTime) - self.ServerTimeDiff = InTime - UE.GetCurrentTime(); - UGCLogSystem.Log("[UGCGameState:CheckClientTime] self.ServerTimeDiff = %f", self.ServerTimeDiff); - self:OnClientAlready(LocalPlayerKey); -end - UGCGameState.bInitOnce = {}; function UGCGameState:OnClientAlready(PlayerKey) @@ -344,8 +341,14 @@ function UGCGameState:OnClientAlready(PlayerKey) table.func(MiniManager, "OnClientAlready"); local PC = UGCGameSystem.GetPlayerControllerByPlayerKey(PlayerKey); if PC and UE.IsValid(PC) and (not PC:IsPureSpectator()) then + UGCLogSystem.Log("[UGCGameState:OnClientAlready] 发送 10 局游戏") PC:SendLast10Games(); + + UGCLogSystem.Log("[UGCGameState:OnClientAlready] 发送武器数据") PC:SendSelectWeapons(); + -- 发送武器配件数据 + UGCLogSystem.Log("[UGCGameState:OnClientAlready] 发送 Parts") + PC:SendWeaponParts(); end end @@ -370,24 +373,13 @@ function UGCGameState:GetServerTime() return UE.GetCurrentTime(); else if self.ServerTimeDiff == 0 then - return nil; + return 0; else return self.ServerTimeDiff + UE.GetCurrentTime(); end end end ---- 提前重置操作 -function UGCGameState:BeforeReset(InTime) - for i, Pawn in pairs(UGCGameSystem.GetAllPlayerPawn()) do - if Pawn and UE.IsValid(Pawn) then - if Pawn then Pawn:K2_DestroyActor(); end - UE.RespawnPlayer(d, InTime); - end - end - self:ResetKill(); -end - function UGCGameState:ResetKill() -- 重置其他的 for i, v in pairs(UGCGameSystem.GetAllPlayerController(false)) do v:ResetGame(); end @@ -408,35 +400,8 @@ function UGCGameState:ResetGame() end end ------------------------------------------ 界面 UI ----------------------------------------- ---- 显示 UI ----@param InUIType EUIType ----@param IsShow boolean -function UGCGameState:ShowUIByType(InUIType, IsShow, ...) - if IsServer then - UnrealNetwork.CallUnrealRPC_Multicast(self, "ShowUIByType", InUIType, IsShow, ...); - else - if IsShow then - WidgetManager:ShowPanel(InUIType, false, ...); - else - WidgetManager:ClosePanel(InUIType); - end - end -end - ----------------------------------------- 场景物品 ----------------------------------------- ----@type BP_ResourceBase_C -UGCGameState.ResourceActor = nil; - ---- 加载资源类,服务器,客户端都需要加载一次 ----@return BP_ResourceBase_C -function UGCGameState:LoadResource() - if self.ResourceActor == nil then self.ResourceActor = UE.FindActorByClass(ObjectPath.BP_ResourceBase); end - UGCLogSystem.Log("[UGCGameState:LoadResource] %s", UGCGameSystem.GetUGCResourcesFullPath('Asset/Blueprint/UGCPlayerPawn.UGCPlayerPawn_C')) - return self.ResourceActor; -end - -- 清除场景上的 Wrappers function UGCGameState:ClearWrappers() local InTable = {}; @@ -446,31 +411,7 @@ function UGCGameState:ClearWrappers() for i, v in pairs(InTable) do v:K2_DestroyActor(); end end ------------------------------------------ BUFF ----------------------------------------- - ----@type AActor -UGCGameState.MapCenterActor = nil; - ---- 获取中心点 ----@return AActor -function UGCGameState:GetCenterPointLocation() - if self.MapCenterActor ~= nil then return self.MapCenterActor:K2_GetActorLocation() end - local CenterActors = {}; - UE.FindActorsByClass(ObjectPath.BP_ActorStart, CenterActors, function(InIndex, InActor) - return InActor:ActorHasTag("MapCenter"); - end); - UGCLogSystem.LogTree(string.format("[UGCGameState:GetCenterPointLocation] CenterActors ="), CenterActors) - self.MapCenterActor = CenterActors[1]; - if self.MapCenterActor ~= nil then - return self.MapCenterActor:K2_GetActorLocation(); - end - return nil; -end - ----------------------------------------- 武器 ----------------------------------------- ---- 获取武器基类 ----@return UClass 武器基类 -function UGCGameState:GetShootWeaponClass() return self.ShootWeaponClass; end ---@return UClass function UGCGameState:GetWrapperClass() return self.WrapperClass; end diff --git a/SoloKing/Script/Blueprint/UGCPlayerController.lua b/SoloKing/Script/Blueprint/UGCPlayerController.lua index 7147f221..b720bb8b 100644 --- a/SoloKing/Script/Blueprint/UGCPlayerController.lua +++ b/SoloKing/Script/Blueprint/UGCPlayerController.lua @@ -106,7 +106,6 @@ function UGCPlayerController:OnRespawnPawn() else -- if GlobalMiniMode.ModeType ~= GameModeConfig.EGameModeType.DefaultMode then UGCLogSystem.Log("[UGCPlayerController:OnRespawnPawn] 显示按钮") - --WidgetManager:ShowPanel(WidgetConfig.EUIType.ShowCustomSelectWeaponBtn, false); WidgetManager:GetPanel(WidgetConfig.EUIType.Main, function(Widget) table.func(Widget, "ShowCustomSelectWeaponBtn", true); end) @@ -158,8 +157,7 @@ function UGCPlayerController:SetEnableShovel(IsEnable) if self.PlayerEnableShovel == IsEnable then return ; end self.PlayerEnableShovel = IsEnable; - local PS = UGCGameSystem.GetPlayerStateByPlayerKey(self.PlayerKey) - PS:SetEnableShovel(self.PlayerEnableShovel); + ArchiveTable[self.PlayerKey].PlayerEnableShovel = IsEnable; local Pawn = UGCGameSystem.GetPlayerPawnByPlayerKey(self.PlayerKey); if Pawn and UE.IsValid(Pawn) and Pawn:IsAlive() then UGCLogSystem.Log("[UGCPlayerController:SetEnableShovel] 是否可以滑铲 %s", tostring(GameState.EnableShovel)); @@ -302,18 +300,18 @@ function UGCPlayerController:SendArchive(Index, Total, Archive, Friend) if ArchiveTable[self.PlayerKey] == nil then ArchiveTable[self.PlayerKey] = {}; end if ArchiveTable[self.PlayerKey].Last10Games == nil then ArchiveTable[self.PlayerKey].Last10Games = {}; end ArchiveTable[self.PlayerKey].Last10Games[Index] = Archive; - + WidgetManager:GetPanel(WidgetConfig.EUIType.GameRecord, function(Widget) Widget:AddLastGameItem(Index, Archive, Friend); end) - + self:CloseLastGameTimer(); UGCEventSystem.SetTimer(self, function() -- 验证是否完全,不完全发送数据 local Success, List = self:CheckArchiveDataComplete(Total); if not Success then self:ResendArchive(List); end end, 3); - + -- 判断是否完整 if self:CheckArchiveDataComplete(Total) then -- 数据完整 @@ -343,7 +341,8 @@ UGCPlayerController.OneSendWeaponCount = 10; function UGCPlayerController:SendSelectWeapons() if table.isEmpty(ArchiveTable[self.PlayerKey]) then return end if table.isEmpty(ArchiveTable[self.PlayerKey].SelectWeapons) then return end - + + UGCLogSystem.Log("[UGCPlayerController:SendSelectWeapons] 执行") UGCEventSystem.SetTimer(self, function() self.SendSelectWeaponsTimer = UGCEventSystem.SetTimerLoop(self, function() self:SendWeapons(); @@ -370,7 +369,6 @@ function UGCPlayerController:SendWeapons(Total, InList) Num = Num + 1; if Num > self.OneSendWeaponCount then break ; end end - for WeaponId, v in pairs(InList) do self.SelectWeapons[WeaponId] = nil; end @@ -396,11 +394,79 @@ function UGCPlayerController:SendWeapons(Total, InList) for Weapon, List in pairs(InList) do ArchiveTable[self.PlayerKey].SelectWeapons[Weapon] = List; end + UGCLogSystem.Log("[UGCPlayerController:SendWeapons] 执行 Total = %d", Total); if Total == table.getCount(ArchiveTable[self.PlayerKey].SelectWeapons) or Total == -1 then - UGCLogSystem.Log("[UGCPlayerController:SendWeapons] 执行") UGCEventSystem.SendEvent(EventTypes.AllSelectWeaponsAlready, ArchiveTable[self.PlayerKey].SelectWeapons); end end end -return UGCPlayerController; \ No newline at end of file +--- 一次发送武器配件数量的rpc有多少个 +UGCPlayerController.OneSendWeaponPartsCount = 20; +UGCPlayerController.SendPartsTimer = nil; +--- 正在发送的 IDs +UGCPlayerController.InSendWeaponIds = {}; + +-- 发送武器配件信息 +function UGCPlayerController:SendWeaponParts(InList) + if table.isEmpty(ArchiveTable[self.PlayerKey]) then return; end + local Weapons = ArchiveTable[self.PlayerKey].Weapons; + if table.isEmpty(Weapons) then return; end + if table.isEmpty(self.InSendWeaponIds) then self.InSendWeaponIds = {}; end + if table.isEmpty(InList) then + for WeaponID, Parts in pairs(Weapons) do + table.insert(self.InSendWeaponIds, WeaponID); + end + else + for i, v in pairs(InList) do + table.insert(self.InSendWeaponIds, i > 10000 and i or v); + end + end + if table.isEmpty(self.InSendWeaponIds) then return self:CloseWeaponPartsTimer(); end + self.SendPartsTimer = UGCEventSystem.SetTimerLoop(self, function() + self:SendPartsRPC(); + end, 0.5) +end + +function UGCPlayerController:CloseWeaponPartsTimer() + if self.SendPartsTimer ~= nil then + UGCEventSystem.StopTimer(self.SendPartsTimer); + self.SendPartsTimer = nil; + end +end + +-- 发送配件 RPC +function UGCPlayerController:SendPartsRPC(InTotal, InList) + if IsServer then + -- 开始发送 + local Weapons = ArchiveTable[self.PlayerKey].Weapons; + local Count = table.getCount(self.InSendWeaponIds); + local SendTable = {}; + if Count <= self.OneSendWeaponPartsCount then + for i, WeaponID in pairs(self.InSendWeaponIds) do + SendTable[WeaponID] = Weapons[WeaponID] or {}; + end + self.InSendWeaponIds = {}; + self:CloseWeaponPartsTimer(); + else + for i = 1, self.OneSendWeaponPartsCount do + local WeaponID = self.InSendWeaponIds[1]; + SendTable[WeaponID] = Weapons[WeaponID] or {}; + table.remove(self.InSendWeaponIds, 1); + end + end + UnrealNetwork.CallUnrealRPC(self, self, "SendPartsRPC", InTotal or table.getCount(SendTable), SendTable); + else + if table.isEmpty(ArchiveTable[self.PlayerKey]) then ArchiveTable[self.PlayerKey] = {}; end + if table.isEmpty(ArchiveTable[self.PlayerKey].Weapons) then ArchiveTable[self.PlayerKey].Weapons = {}; end + for WeaponID, Parts in pairs(InList) do + ArchiveTable[self.PlayerKey].Weapons[WeaponID] = Parts; + end + -- 查看是否完全了 + if table.getCount(ArchiveTable[self.PlayerKey].Weapons) == InTotal or InTotal == -1 then + -- 更新存档武器 + end + end +end + +return UGCPlayerController; diff --git a/SoloKing/Script/Blueprint/UGCPlayerPawn.lua b/SoloKing/Script/Blueprint/UGCPlayerPawn.lua index e60e74ee..f42716d8 100644 --- a/SoloKing/Script/Blueprint/UGCPlayerPawn.lua +++ b/SoloKing/Script/Blueprint/UGCPlayerPawn.lua @@ -34,7 +34,7 @@ end --end function UGCPlayerPawn:GetAvailableServerRPCs() - return "ReplacePartId" + return "UpdateWeaponParts" end function UGCPlayerPawn:ReceivePossessed(NewController) @@ -147,19 +147,6 @@ function UGCPlayerPawn:AddInitItems(Weapons) end end ----@return EFillBulletType -function UGCPlayerPawn:GetInfiniteType() - local Type = self.PlayerState:GetInfiniteType(); - UGCLogSystem.Log("[UGCPlayerPawn:GetInfiniteType] Type = %s", tostring(Type)) - return Type -end - ----@param InType EFillBulletType -function UGCPlayerPawn:SetInfiniteType(InType) - UGCLogSystem.Log("[UGCPlayerPawn:SetInfiniteType] 执行 InType = %s", tostring(InType)) - self.PlayerState:SetInfiniteType(InType); -end - --- ---@param slot ESurviveWeaponPropSlot ---@overload fun(slot:ESurviveWeaponPropSlot) OnEquipWeapon @@ -168,12 +155,9 @@ function UGCPlayerPawn:OnEquipWeapon(slot) --if slot == ESurviveWeaponPropSlot.SWPS_HandProp then -- UGCLogSystem.Log("[UGCPlayerPawn:OnEquipWeapon] 切换成拳头") --end - local Weapon = UGCWeaponManagerSystem.GetWeaponBySlot(self, slot); - UGCEventSystem.SendEvent(EventTypes.PlayerChangeWeapon, self, slot, Weapon); + UGCEventSystem.SendEvent(EventTypes.PlayerChangeWeapon, self, slot, UGCWeaponManagerSystem.GetWeaponBySlot(self, slot)); end -UGCPlayerPawn.CurrBulletNum = -1; - --- 当玩家获取武器之后执行 ---@param Weapon ASTExtraShootWeapon function UGCPlayerPawn:OnPostGetWeapon(Weapon) @@ -194,6 +178,100 @@ function UGCPlayerPawn:OnPostGetWeapon(Weapon) end end +--- 玩家是否有近战武器 +function UGCPlayerPawn:IsPawnHasMeleeWeapon(WeaponID, Count) + local HadCount = 0; + local AllDatas = UGCBackPackSystem.GetAllItemData(self); + for i, Info in pairs(AllDatas) do + if Info.ItemID == WeaponID then + HadCount = HadCount + Info.Count; + end + end + if Count == HadCount then return true; end + return false, Count; +end + +--- 检查玩家是否在 Slot 上有武器 +function UGCPlayerPawn:IsPawnHasShootWeapon(WeaponID, Slot) + if Slot then + local Weapon = UGCWeaponManagerSystem.GetWeaponBySlot(self, Slot); + if Weapon and UE.IsValid(Weapon) then + if Weapon:GetWeaponItemID() == WeaponID then + return true; + end + end + else + for i, Enum in pairs(ShootWeaponEnums) do + local Weapon = UGCWeaponManagerSystem.GetWeaponBySlot(self, Enum) + if Weapon and UE.IsValid(Weapon) then + if Weapon:GetWeaponItemID() == WeaponID then + return true; + end + end + end + end + return false; +end + +UGCPlayerPawn.CheckSlotWeaponsTimer = nil; + +function UGCPlayerPawn:CloseCheckSlotWeaponsTimer() + if self.CheckSlotWeaponsTimer then + UGCEventSystem.StopTimer(self.CheckSlotWeaponsTimer); + self.CheckSlotWeaponsTimer = nil; + end +end + +---@type table 插槽武器 +UGCPlayerPawn.SlotWeapons = {}; + +---@param Weapons table 插槽武器 +function UGCPlayerPawn:UpdateSlotWeapons(Weapons) + self.SlotWeapons = TableHelper.DeepCopyTable(Weapons); + for i = 0, ESurviveWeaponPropSlot.SWPS_Max do + if self.SlotWeapons[i] then + self:CheckHasSlotWeapon(i, self.SlotWeapons[i]); + end + end + self:CheckSlotWeapons(); + +end + +--- 通过插槽检查武器,需要先配置好之后再启动,该方法仅限两把武器,如果只有一把武器,SlotWeapons的第一个值必须为 SWPS_MainShootWeapon1 +function UGCPlayerPawn:CheckSlotWeapons() + if table.isEmpty(self.SlotWeapons) then return self:CloseCheckSlotWeaponsTimer(); end + UGCLogSystem.Log("[UGCPlayerPawn:CheckSlotWeapons] 开始检测是否添加") + self.CheckSlotWeaponsTimer = UGCEventSystem.SetTimerLoop(self, function() + for i = 0, ESurviveWeaponPropSlot.SWPS_Max do + if self.SlotWeapons[i] then + self:CheckHasSlotWeapon(i, self.SlotWeapons[i]); + end + end + end, 1); +end + +---@param Slot ESurviveWeaponPropSlot +---@param WeaponID int32 +function UGCPlayerPawn:CheckHasSlotWeapon(Slot, WeaponID) + if Slot == nil then return ; end + if self.SlotWeapons[Slot] == nil then self.SlotWeapons[Slot] = WeaponID; end + local Weapon = UGCWeaponManagerSystem.GetWeaponBySlot(self, Slot); + if Weapon == nil or not UE.IsValid(Weapon) then + ItemTool.AddWeaponItem(self, WeaponID, 1, true, EFillBulletType.ClipInfinite); + return ; + end + local SlotWeaponID = Weapon:GetWeaponItemID(); + if SlotWeaponID == WeaponID then + self.SlotWeapons[Slot] = nil; + return ; + end + local DefineID = Weapon:GetItemDefineID(); + ItemTool.RemoveWeapon(self, Weapon); + ItemTool.AddWeaponItem(self, WeaponID, 1, true, EFillBulletType.ClipInfinite); +end + +UGCPlayerPawn.CurrBulletNum = -1; + function UGCPlayerPawn:OnBulletNumChanged(Weapon) local BulletCount = Weapon.CurBulletNumInClip; if self.CurrBulletNum == -1 then self.CurrBulletNum = BulletCount; end @@ -212,51 +290,70 @@ function UGCPlayerPawn:ReplacePartId(InPartId, InType) -- 移除当前 local Weapon = UGCWeaponManagerSystem.GetCurrentWeapon(self); if Weapon == nil or (not UE.IsValid(Weapon)) then - UGCLogSystem.Log("[UGCPlayerPawn:ReplacePartId] 不存在武器 或 武器无效"); - return ; + return UGCLogSystem.Log("[UGCPlayerPawn:ReplacePartId] 不存在武器 或 武器无效"); end - local ItemID = Weapon:GetWeaponItemID(); - if table.isEmpty(WeaponSuits[ItemID]) then - UGCLogSystem.Log("[UGCPlayerPawn:ReplacePartId] 武器不是 射击武器") - return ; + return UGCLogSystem.Log("[UGCPlayerPawn:ReplacePartId] 武器不是 射击武器") end -- 找到类型 if InType == nil then InType = WeaponParts[InPartId].Type end - - local DefineID = ItemTool.GetDefineIDBySocketType(Weapon, ItemTool.GetWeaponAttachmentSocketType(InType)); - if DefineID then UGCBackPackSystem.DropItemByInstanceID(self, DefineID.InstanceID, 1, true); end - if InPartId ~= 0 then - ItemTool.AddItem(self, InPartId, 1); - UGCLogSystem.Log("[UGCPlayerPawn:ReplacePartId] 添加一次配件") - end - - -- 查看一下当前是什么武器 + local SocketType = ItemTool.GetWeaponAttachmentSocketType(InType); + local DefineID = ItemTool.GetDefineIDBySocketType(Weapon, SocketType); + if DefineID then ItemTool.RemoveItemByDefineID(self, DefineID); end if InPartId ~= 0 then + UGCGunSystem.CreateAndAddGunAttachment(Weapon, InPartId); + UGCLogSystem.Log("[UGCPlayerPawn:ReplacePartId] 添加配件: %d", InPartId); -- 检查武器上是否有这个配件 - local SocketType = ItemTool.GetWeaponAttachmentSocketType(InType) - -- 检查上面是否存在 local PartDefineID = ItemTool.GetDefineIDBySocketType(Weapon, SocketType); if PartDefineID == nil or PartDefineID.TypeSpecificID ~= InPartId then - local Times = 10; - repeat - local bSuccess = UGCBackPackSystem.AddItem(self, InPartId, 1); - Times = Times - 1; - until bSuccess or Times <= 0; - if Times <= 0 then - UGCLogSystem.Log("[UGCPlayerPawn:ReplacePartId] 还是没添加上去"); - -- 输出所有已经安装过的配件 - local ItemIds = ItemTool.GetWeaponParts(Weapon); - UGCLogSystem.LogTree(string.format("[UGCPlayerPawn:ReplacePartId] ItemIds ="), ItemIds); - end - UGCLogSystem.Log("[UGCPlayerPawn:ReplacePartId] 再次添加配件"); -- 这里已经有问题了 + UGCGunSystem.CreateAndAddGunAttachment(Weapon, InPartId); + local ItemIds = ItemTool.GetWeaponParts(Weapon); + UGCLogSystem.LogTree(string.format("[UGCPlayerPawn:ReplacePartId] ItemIds ="), ItemIds); end end - local PS = UGCGameSystem.GetPlayerStateByPlayerKey(self.PlayerKey); - table.func(PS, "UpdateWeaponAttachment", self, Weapon); + if ArchiveTable[self.PlayerKey].Weapons == nil then ArchiveTable[self.PlayerKey].Weapons = {}; end + ArchiveTable[self.PlayerKey].Weapons[ItemID] = ItemTool.GetWeaponParts(Weapon); +end + +--- 更新武器配件 +function UGCPlayerPawn:UpdateWeaponParts(WeaponID, WeaponParts) + ArchiveTable[self.PlayerKey].Weapons[WeaponID] = WeaponParts; + + local Weapons = {}; + for i, Enum in pairs(AllWeaponEnums) do + local Weapon = UGCWeaponManagerSystem.GetWeaponBySlot(self, Enum); + if Weapon and UE.IsValid(Weapon) then + if Weapon:GetWeaponItemID() == WeaponID then + table.insert(Weapons, Weapon); + end + end + end + -- + for i, Weapon in pairs(Weapons) do + local HadSet = false; + if Weapon and UE.IsValid(Weapon) then + local CurrWeaponID = Weapon:GetWeaponItemID(); + if CurrWeaponID == WeaponID then + -- 直接设置 Parts + ItemTool.SetWeaponParts(Weapon, WeaponParts); + HadSet = true; + end + end + if not HadSet then + UGCLogSystem.LogError("[UGCPlayerPawn:UpdateWeaponParts] 当前武器跟设置的武器不相同,检查一下, WeaponID : %d", WeaponID); + end + end +end + +--- 发送 RPC 进行再次同步 +function UGCPlayerPawn:UpdateEnterWeapons(Index, Weapons) + if table.isEmpty(ArchiveTable[self.PlayerKey]) then ArchiveTable[self.PlayerKey] = {}; end + if table.isEmpty(ArchiveTable[self.PlayerKey].EnterWeapons) then ArchiveTable[self.PlayerKey].EnterWeapons = {}; end + ArchiveTable[self.PlayerKey].EnterWeapons[Index] = Weapons; + UGCEventSystem.SendEvent(EventTypes.UpdateEnterWeapons); end --- 处理飘字 客户端触发 diff --git a/SoloKing/Script/Blueprint/UGCPlayerState.lua b/SoloKing/Script/Blueprint/UGCPlayerState.lua index b76b4cf1..357ee3b1 100644 --- a/SoloKing/Script/Blueprint/UGCPlayerState.lua +++ b/SoloKing/Script/Blueprint/UGCPlayerState.lua @@ -8,26 +8,8 @@ UGCPlayerState.WeaponInfiniteType = 0; -- self.SuperClass.ReceiveBeginPlay(self); --end ---function UGCPlayerState:ReceiveTick(DeltaTime) --- self.SuperClass.ReceiveTick(self, DeltaTime); ---end - ---[[ -function UGCPlayerState:ReceiveEndPlay() - self.SuperClass.ReceiveEndPlay(self); -end ---]] - ----@param InType EFillBulletType -function UGCPlayerState:SetInfiniteType(InType) - self.WeaponInfiniteType = InType; -end - -function UGCPlayerState:GetInfiniteType() return self.WeaponInfiniteType; end - --- 重置击杀数 function UGCPlayerState:ResetKillNum() - -- 重置击杀数 self.Kills = 0; self.KillPlayerNum = 0; DOREPONCE(self, "Kills") @@ -38,30 +20,8 @@ function UGCPlayerState:ResetGame() self:ResetKillNum(); end ---- 操作是一旦使用了换装备的按钮,就会调用该函数,之后玩家添加的时候就会使用该配置 ----@param InWeapon ASTExtraWeapon -function UGCPlayerState:UpdateWeaponAttachment(Pawn, InWeapon) - -- 获取玩家的缓存 - UGCLogSystem.Log("[UGCPlayerState:UpdateWeaponAttachment] 执行") - if ArchiveTable[self.PlayerKey].Weapons == nil then ArchiveTable[self.PlayerKey].Weapons = {}; end - local ItemId = InWeapon:GetWeaponItemID(); - local Weapon = UGCWeaponManagerSystem.GetCurrentWeapon(Pawn); - local Parts = ItemTool.GetWeaponParts(Weapon); - ArchiveTable[self.PlayerKey].Weapons[ItemId] = Parts; -end - -function UGCPlayerState:SetEnableShovel(IsEnable) - ArchiveTable[self.PlayerKey].PlayerEnableShovel = IsEnable; -end - function UGCPlayerState:OnBestRank(Score) self.UGCPlayerInfo.MatchRank = Score; end ---[[ -function UGCPlayerState:GetAvailableServerRPCs() - return -end ---]] - return UGCPlayerState; \ No newline at end of file diff --git a/SoloKing/Script/Global/Config/WeaponSelectionCombinationConfig.lua b/SoloKing/Script/Global/Config/WeaponSelectionCombinationConfig.lua index f86403f0..9ed44ea7 100644 --- a/SoloKing/Script/Global/Config/WeaponSelectionCombinationConfig.lua +++ b/SoloKing/Script/Global/Config/WeaponSelectionCombinationConfig.lua @@ -1,70 +1,71 @@ -WeaponSelectionCombinationConfig = WeaponSelectionCombinationConfig or {} -WeaponSelectionCombinationConfig.ECombinationType = { - Combination1 = 1; -- 进攻方武器 - Combination2 = 2; -- 防守方武器 +WeaponSelectionCombinationConfig = WeaponSelectionCombinationConfig or {}; + +WeaponSelectionCombinationConfig.ECombinationType = { + ESurviveWeaponPropSlot.SWPS_MainShootWeapon1, + ESurviveWeaponPropSlot.SWPS_MainShootWeapon2, + ESurviveWeaponPropSlot.SWPS_SubShootWeapon, + ESurviveWeaponPropSlot.SWPS_MeleeWeapon, } -WeaponSelectionCombinationConfig.WeaponCombinationList = { - - Weapon = { - {102003, 102003, 106011, 108004}, - {101004, 101004, 106011, 108004}, - {107008, 102003, 106011, 108004}, - {104005, 103007, 106011, 108004}, - {102003, 103012, 106011, 108004}, - }, - OtherParts = { - -- 背包 - {ItemID = 501003, Count = 1}, - -- 各种倍镜 新加法多出的配件加不进去要额外AddItem - {ItemID = 203001, Count = 1}, {ItemID = 203002, Count = 1}, {ItemID = 203003, Count = 1}, {ItemID = 203004, Count = 1}, {ItemID = 203005, Count = 1}, {ItemID = 203014, Count = 1}, {ItemID = 203015, Count = 1}, {ItemID = 203030, Count = 1}, - -- 近战武器、投掷武器等 - {ItemID = 108004, Count = 1}, {ItemID = 602004, Count = 1}, {ItemID = 602003, Count = 1}, {ItemID = 602002, Count = 1}, {ItemID = 602001, Count = 1}, - -- 护具 - {ItemID = 502003, Count = 1}, {ItemID = 503003, Count = 1}, - -- 恢复类药物 - {ItemID = 601006, Count = 1}, {ItemID = 601003, Count = 1}, {ItemID = 601004, Count = 6}, {ItemID = 601005, Count = 1}, - - }, +WeaponSelectionCombinationConfig.WeaponCombinationList = { + Weapon = { + { 102003, 102003, 106011, 108004 }, -- 第一个配置将会被替换成之前的武器 + { 101004, 101004, 106011, 108004 }, + { 107008, 102003, 106011, 108004 }, + { 104005, 103007, 106011, 108004 }, + { 102003, 103012, 106011, 108004 }, + }, + OtherParts = { + -- 背包 + --{ ItemID = 501003, Count = 1 }, + ---- 各种倍镜 新加法多出的配件加不进去要额外AddItem + --{ ItemID = 203001, Count = 1 }, { ItemID = 203002, Count = 1 }, { ItemID = 203003, Count = 1 }, { ItemID = 203004, Count = 1 }, { ItemID = 203005, Count = 1 }, { ItemID = 203014, Count = 1 }, { ItemID = 203015, Count = 1 }, { ItemID = 203030, Count = 1 }, + ---- 近战武器、投掷武器等 + --{ ItemID = 108004, Count = 1 }, { ItemID = 602004, Count = 1 }, { ItemID = 602003, Count = 1 }, { ItemID = 602002, Count = 1 }, { ItemID = 602001, Count = 1 }, + ---- 护具 + --{ ItemID = 502003, Count = 1 }, { ItemID = 503003, Count = 1 }, + ---- 恢复类药物 + --{ ItemID = 601006, Count = 1 }, { ItemID = 601003, Count = 1 }, { ItemID = 601004, Count = 6 }, { ItemID = 601005, Count = 1 }, + }, } -- 各种倍镜 -WeaponSelectionCombinationConfig.MagnifyingGlass = { - {ItemID = 203001, Count = 1}, {ItemID = 203002, Count = 1}, {ItemID = 203003, Count = 1}, {ItemID = 203004, Count = 1}, {ItemID = 203005, Count = 1}, {ItemID = 203014, Count = 1}, {ItemID = 203015, Count = 1}, -} +--WeaponSelectionCombinationConfig.MagnifyingGlass = { +-- { ItemID = 203001, Count = 1 }, { ItemID = 203002, Count = 1 }, { ItemID = 203003, Count = 1 }, { ItemID = 203004, Count = 1 }, { ItemID = 203005, Count = 1 }, { ItemID = 203014, Count = 1 }, { ItemID = 203015, Count = 1 }, +--} -- 玩家可自定义搭配的武器 -WeaponSelectionCombinationConfig.PlayerCustomWeapon = { - { - TypeName = "自动枪"; - WeaponIDs = { - 101001, 101003, 101004, 101005, 101006, 101007, 101008, 101009, 101010, 101011, 101012, 101013, - 102001, 102002, 102003, 102004, 102005, 102105, 102007, 102008, - 105001, 105002, 105003, 105010, 105012, - }; - }, - { - TypeName = "狙击"; - WeaponIDs = { - 103001, 103002, 103003, 103008, 103011, 103012, 103015, - 103004, 103005, 103006, 103007, 103009, 103010, 103013, 103014, 103100, - }; - }, - { - TypeName = "霰弹枪"; - WeaponIDs = { 104001, 104002, 104003, 104004, 104005, 104100, }; - }, +WeaponSelectionCombinationConfig.PlayerCustomWeapon = { + { + TypeName = "自动枪"; + WeaponIDs = { + 101001, 101003, 101004, 101005, 101006, 101007, 101008, 101009, 101010, 101011, 101012, 101013, + 102001, 102002, 102003, 102004, 102005, 102105, 102007, 102008, + 105001, 105002, 105003, 105010, 105012, + }; + }, + { + TypeName = "狙击"; + WeaponIDs = { + 103001, 103002, 103003, 103008, 103011, 103012, 103015, + 103004, 103005, 103006, 103007, 103009, 103010, 103013, 103014, 103100, + }; + }, + { + TypeName = "霰弹枪"; + WeaponIDs = { 104001, 104002, 104003, 104004, 104005, 104100, }; + }, + + { + TypeName = "其他"; + WeaponIDs = { 107001, 107002, 107006, 107008, }; + }, +}; - { - TypeName = "其他"; - WeaponIDs = { 107001, 107002, 107006, 107008, }; - }, -} - -WeaponSelectionCombinationConfig.PlayerCustomSubWeapon = { - 106001, 106002, 106003, 106004, 106005, 106006, 106008, 106010, 106011, -} +WeaponSelectionCombinationConfig.PlayerCustomSubWeapon = { + 106001, 106002, 106003, 106004, 106005, 106006, 106008, 106010, 106011, +}; WeaponSelectionCombinationConfig.PlayerCustomMeleeWeapon = { - 108001, 108002, 108003, 108004, -} \ No newline at end of file + 108001, 108002, 108003, 108004, +}; diff --git a/SoloKing/Script/Global/DefaultSettings.lua b/SoloKing/Script/Global/DefaultSettings.lua index 8bfd0938..803c8f63 100644 --- a/SoloKing/Script/Global/DefaultSettings.lua +++ b/SoloKing/Script/Global/DefaultSettings.lua @@ -17,4 +17,4 @@ DefaultSettings.PlayerInitEquipment = { }; -------------------------------- UI -------------------------------- DefaultSettings.ShowFaceNoticeTime = 25; -DefaultSettings.CurrentSeason = 1; --- 当前赛季,跟在页面编辑中的段位管理->赛季配置里面最大的赛季一致 +DefaultSettings.CurrentSeason = 2; --- 当前赛季,跟在页面编辑中的段位管理->赛季配置里面最大的赛季一致 diff --git a/SoloKing/Script/Global/EventTypes.lua b/SoloKing/Script/Global/EventTypes.lua index 952ab0a8..685ab688 100644 --- a/SoloKing/Script/Global/EventTypes.lua +++ b/SoloKing/Script/Global/EventTypes.lua @@ -38,4 +38,5 @@ EventTypes = EventTypes or { UpdateSelectModes = CountTable(); -- 更新玩家就绪 AllLastGamesAlready = CountTable(); -- 所有存档数据准备就绪 AllSelectWeaponsAlready = CountTable(); -- 所有存档数据准备就绪 + UpdateEnterWeapons = CountTable(); -- 所有存档数据准备就绪 } diff --git a/SoloKing/Script/Global/Mini/MiniGameConfig.lua b/SoloKing/Script/Global/Mini/MiniGameConfig.lua index b2cde4ee..c212b7d2 100644 --- a/SoloKing/Script/Global/Mini/MiniGameConfig.lua +++ b/SoloKing/Script/Global/Mini/MiniGameConfig.lua @@ -48,12 +48,12 @@ MiniGameConfig = MiniGameConfig or { MapName = { ['Map_SLXLC'] = 1, ['Map_SMDJ'] = 1, - ['Map_HDDJ'] = 2, - ['Map_JCK'] = 2, - ['Map_DBL'] = 2, - ['Map_SCL'] = 2, - --['Map_NewYear'] = 2, - --['Map_DC'] = 2, + ['Map_HDDJ'] = 1, + ['Map_JCK'] = 1, + ['Map_DBL'] = 1, + ['Map_SCL'] = 1, + ['Map_NewYear'] = 2, + ['Map_DC'] = 2, }, ShowName = "单挑王", -- 显示名称 }, diff --git a/SoloKing/Script/Global/Mini/Script/Mini_Solo.lua b/SoloKing/Script/Global/Mini/Script/Mini_Solo.lua index dc832c33..1b11dd32 100644 --- a/SoloKing/Script/Global/Mini/Script/Mini_Solo.lua +++ b/SoloKing/Script/Global/Mini/Script/Mini_Solo.lua @@ -35,7 +35,6 @@ Mini_Solo.Disables = {}; Mini_Solo.RankScores = {}; Mini_Solo.DeadCount = 0; Mini_Solo.CurrTimeCount = 0; -- 可以直接拿到的倒计时 -Mini_Solo.AddScore = {}; Mini_Solo.TotalKDA = {}; --- 模式 Mini_Solo.ModeType = nil; @@ -170,18 +169,13 @@ function Mini_Solo:OnPrepareEnd() if self.ModeType == GameModeConfig.EGameModeType.DefaultMode then -- 记录一下玩家选择的 for PlayerKey, List in pairs(self.SelectWeapons) do - for i, WeaponId in pairs(List) do - self:AddSelectWeaponsArchive(PlayerKey, WeaponId, 1, 1); - end + for i, WeaponId in pairs(List) do self:AddSelectWeaponsArchive(PlayerKey, WeaponId, 1, 1); end end - -- 出来 if table.isEmpty(self.SelectWeapons) then -- 直接匹配所有的枪械,然后选择局数个 if table.isEmpty(WeaponIdTable) then GetWeaponIdTable() end - for i = 1, self.TotalRoundTimes do - table.insert(self.SelectWeapons, WeaponIdTable[i]); - end + for i = 1, self.TotalRoundTimes do table.insert(self.SelectWeapons, WeaponIdTable[i]); end else if table.getCount(self.SelectWeapons) == 1 then -- 选择他选择的所有枪械 @@ -212,8 +206,8 @@ function Mini_Solo:OnPrepareEnd() --- 保存一下当前选择的武器 for PlayerKey, Info in pairs(UE.GetAccountInfo()) do local Config = self.SelectWeapons[PlayerKey] + -- 保存一下选择的武器 if Config then - -- 保存一下选择的武器 ArchiveTable[PlayerKey].LastSelectWeapons = TableHelper.DeepCopyTable(Config); end end @@ -251,9 +245,7 @@ function Mini_Solo:OnPrepareEnd() if not table.isEmpty(PlayerWeapons[Keys[1]]) then for i = 1, CountNum do for c = 1, #Keys do - if PlayerWeapons[Keys[c]][i] then - table.insert(AddWeapons, PlayerWeapons[Keys[c]][i]); - end + if PlayerWeapons[Keys[c]][i] then table.insert(AddWeapons, PlayerWeapons[Keys[c]][i]); end end end end @@ -302,9 +294,7 @@ function Mini_Solo:OnPrepareEnd() for PlayerKey, Table in pairs(self.Disables) do local PC = UGCGameSystem.GetPlayerControllerByPlayerKey(PlayerKey); ArchiveTable[PC.PlayerKey].Disables = {}; - for Type, Enable in pairs(Table) do - ArchiveTable[PC.PlayerKey].Disables[Type] = Enable; - end + for Type, Enable in pairs(Table) do ArchiveTable[PC.PlayerKey].Disables[Type] = Enable; end for Type, Enable in pairs(Table) do if Enable then DisTable[Type] = (DisTable[Type] or 0) + 1; end @@ -338,9 +328,7 @@ function Mini_Solo:OnPrepareEnd() -- 开始执行 if Type == EDisableType.Grenade then for i, v in pairs(DelayWeapons) do - if v[1] == '手榴弹' or v[1] == '燃烧瓶' then - v[2] = 0; - end + if v[1] == '手榴弹' or v[1] == '燃烧瓶' then v[2] = 0; end end elseif Type == EDisableType.SmokeBomb then for i, v in pairs(DelayWeapons) do @@ -379,8 +367,8 @@ function Mini_Solo:OnCountTime(InTime) elseif InTime == self.SelectMapTime - 1 then -- 切换过去 WidgetManager:GetPanel(WidgetConfig.EUIType.AllWeapon, function(Widget) - Widget:SetSelectMapEnable(false); - Widget:SwitchSelectMap(); + table.func(Widget, "SetSelectMapEnable", false); + table.func(Widget, "SwitchSelectMap"); end) end @@ -470,18 +458,19 @@ function Mini_Solo:OnTimeExhausted(InState) self.RoundWinner = self:CheckTimeExhausted(); end - local Loser = nil; UGCLogSystem.Log("[Mini_Solo:OnTimeExhausted] 执行 RoundWinner = %s", tostring(self.RoundWinner)); if self.RoundWinner ~= nil then + local Loser = nil; for i, v in pairs(UE.GetAccountInfo()) do if self.RoundWinner ~= i then Loser = i; end end + local WeaponID = self.CurrWeaponItem[self.RoundWinner] or ItemTool.GetFirstWeaponID(self.RoundWinner); table.insert(self.RoundWinners, { Winner = self.RoundWinner, Time = UE.GetServerTime() - self.RoundStartTime, -- 拿到对方的枪械 - Weapon = self.CurrWeaponItem[self.RoundWinner], + Weapon = WeaponID, Score = { Winner = self.RoundDeadTimes[Loser] or 0, -- 这个是阵亡数,需要反过来 Loser = self.RoundDeadTimes[self.RoundWinner] or 0, @@ -489,13 +478,16 @@ function Mini_Solo:OnTimeExhausted(InState) }); if self:IsFormalMode() then - self:AddSelectWeaponsArchive(self.RoundWinner, self.CurrWeaponItem[self.RoundWinner], 3, 1); + self:AddSelectWeaponsArchive(self.RoundWinner, WeaponID, 3, 1); end else local Weapon = nil; - for i, v in pairs(self.CurrWeaponItem) do - Weapon = v; - break ; + for i, v in pairs(UGCGameSystem.GetAllPlayerPawn()) do + local CurWeapon = UGCWeaponManagerSystem.GetCurrentWeapon(v); + if CurWeapon then + Weapon = CurWeapon:GetWeaponItemID(); + break ; + end end -- 判断此时是什么情况 local DeadTimes = 0; @@ -584,7 +576,7 @@ function Mini_Solo:CheckTimeExhausted_Damage() end function Mini_Solo:SelectMapName(MapIndex) - if DefaultSettings.EnableTest then return "Map_SLXLC" end + if DefaultSettings.EnableTest then return "Map_JCK" end -- 过滤掉没有开放的 if not table.isEmpty(self.PlayerSelectMaps) then for PlayerKey, MapName in pairs(self.PlayerSelectMaps) do @@ -626,9 +618,7 @@ function Mini_Solo:SelectMapName(MapIndex) end local MapList = {}; - for PlayerKey, MapName in pairs(self.PlayerSelectMaps) do - MapList[MapName] = (MapList[MapName] or 0) + 1; - end + for PlayerKey, MapName in pairs(self.PlayerSelectMaps) do MapList[MapName] = (MapList[MapName] or 0) + 1; end local Maps = {}; for i, v in pairs(MapList) do table.insert(Maps, { @@ -673,26 +663,14 @@ Mini_Solo.LiveInfo = { {}, {} }; function Mini_Solo:HandlePlayerRank(GameWinner) if self.HadAddWinTimes then return ; end self.HadAddWinTimes = true; - + self.GameWinner = GameWinner; UGCLogSystem.Log("[Mini_Solo:HandlePlayerRank] GameWinner = %s", tostring(GameWinner)); - self.GameWinner = GameWinner; - local Scores = {}; - local TechScores = {}; + local Scores = {}; for PlayerKey, ArchiveData in pairs(UE.GetArchiveData()) do - if ArchiveData then - Scores[PlayerKey] = ArchiveData.Score or DefaultSettings.RankScore; - TechScores[PlayerKey] = ArchiveData.TechScore or DefaultSettings.RankScore; - else - Scores[PlayerKey] = DefaultSettings.RankScore; - TechScores[PlayerKey] = DefaultSettings.RankScore; - end - ArchiveTable[PlayerKey].TechScore = ArchiveTable[PlayerKey].TechScore or DefaultSettings.RankScore; - + Scores[PlayerKey] = ArchiveData == nil and DefaultSettings.RankScore or ArchiveData.Score; if self.GameWinner then - if self.GameWinner ~= PlayerKey and PlayerKey > 0 then - self.GameLoser = PlayerKey; - end + if self.GameWinner ~= PlayerKey and PlayerKey > 0 then self.GameLoser = PlayerKey; end end end @@ -702,26 +680,17 @@ function Mini_Solo:HandlePlayerRank(GameWinner) Diff = Scores[self.GameWinner] - Scores[self.GameLoser]; end - local TechDiff = 0; - if self.GameLoser ~= nil and self.GameWinner ~= nil and TechScores[self.GameLoser] ~= nil and TechScores[self.GameWinner] ~= nil then - TechDiff = TechScores[self.GameWinner] - TechScores[self.GameLoser]; - end - -- 计算两边比分 local ScoreDiff = 0; local RoundScores = {}; for i, v in pairs(self.RoundWinners) do - if v.Winner then - RoundScores[v.Winner] = (RoundScores[v.Winner] or 0) + 1; - end + if v.Winner then RoundScores[v.Winner] = (RoundScores[v.Winner] or 0) + 1; end end UGCLogSystem.Log("[Mini_Solo:HandlePlayerRank] GameLoser = %s", tostring(self.GameLoser)); - -- 补偿 20 分 - local Add, TechAdd, AddHide = 0, 0, 0; - -- 判断当前是什么状态,如果是初始直接进入的那么就不加分 if self.GameWinner then + local Add, AddHide = 0, 0; -- 计算技术分 local LobbyTeamPlayerKeys = UGCTeamSystem.GetLobbyTeamKeysByPlayerKey(self.GameWinner); for i, v in pairs(LobbyTeamPlayerKeys) do @@ -749,10 +718,9 @@ function Mini_Solo:HandlePlayerRank(GameWinner) Add = Add + OtherAdd; end - TechAdd = self.AddFunc(TechDiff, TechScores[self.GameWinner], false); --- 扣除隐藏分 - local HideScore = ArchiveTable[self.GameWinner].HideScore; - if Add > 0 and (HideScore ~= nil and HideScore ~= 0) then + local HideScore = ArchiveTable[self.GameWinner].HideScore or 0; + if Add > 0 and (HideScore ~= 0) then if HideScore > 0 then if HideScore > Add then AddHide = Add; @@ -772,10 +740,6 @@ function Mini_Solo:HandlePlayerRank(GameWinner) ArchiveTable[self.GameWinner].Score = (ArchiveTable[self.GameWinner].Score or DefaultSettings.RankScore) + Add; self:OnPostPlayerRank(self.GameWinner, true); - if not self.IsLobbyTeam then - ArchiveTable[self.GameWinner].TechScore = ArchiveTable[self.GameWinner].TechScore + TechAdd; - end - UGCLogSystem.Log("[Mini_Solo:HandlePlayerRank] GameWinner TechScore = %d", ArchiveTable[self.GameWinner].TechScore); end -- 发送 RPC @@ -785,23 +749,20 @@ function Mini_Solo:HandlePlayerRank(GameWinner) Add = Add, -- 最终分数,要获取应该减去的分 = Add - AddHide AddHide = AddHide, -- 添加的隐藏分 HideScore = ArchiveTable[self.GameWinner].HideScore, - TechScore = ArchiveTable[self.GameWinner].TechScore, }; if self.GameLoser then - local Reduce, ReduceHide, TechReduce = 0, 0, 0; + local Reduce, ReduceHide = 0, 0; -- 判断当前是什么状态,如果是初始直接进入的那么就不加分 if self:IsFormalMode() then - Reduce = self.ReduceFunc(Diff, Scores[self.GameLoser]); - TechReduce = self.ReduceFunc(TechDiff, TechScores[self.GameLoser]); + Reduce = self.ReduceFunc(Diff, Scores[self.GameLoser]); UGCLogSystem.Log("[Mini_Solo:HandlePlayerRank] ScoreDiff = %d, Reduce = %d", ScoreDiff, Reduce); if ScoreDiff > 0 and Reduce ~= 0 and (RoundScores[self.GameWinner] ~= nil and RoundScores[self.GameWinner] >= 4) then -- 那么扣分上少扣一部分 local AddVal = math.floor(math.abs(Reduce) / 10 * (4 - ScoreDiff)); UGCLogSystem.Log("[Mini_Solo:HandlePlayerRank] 额外多加分:%d", AddVal); - Reduce = AddVal + Reduce; - TechReduce = AddVal + TechReduce; + Reduce = AddVal + Reduce; if Reduce > -5 then Reduce = -5; end end @@ -831,9 +792,6 @@ function Mini_Solo:HandlePlayerRank(GameWinner) ArchiveTable[self.GameLoser].Score = (ArchiveTable[self.GameLoser].Score or DefaultSettings.RankScore) + Reduce; end self:OnPostPlayerRank(self.GameLoser, false); - if not self.IsLobbyTeam then - ArchiveTable[self.GameLoser].TechScore = ArchiveTable[self.GameLoser].TechScore + TechReduce; - end end self.RankScores[2] = { @@ -842,7 +800,6 @@ function Mini_Solo:HandlePlayerRank(GameWinner) Add = Reduce, AddHide = ReduceHide, HideScore = ArchiveTable[self.GameLoser].HideScore, - TechScore = ArchiveTable[self.GameLoser].TechScore, }; end @@ -899,15 +856,20 @@ function Mini_Solo:HandlePlayerRank(GameWinner) "SelectWeapons", "Last10Games", "NoSelectMaps", + "EnterWeapons", + "EnterWeaponIndex", }); + UGCLogSystem.Log("[Mini_Solo:HandlePlayerRank] 发送"); + UGCLogSystem.LogTree(string.format("[Mini_Solo:HandlePlayerRank] PlayerSelectedWeapons ="), self.PlayerSelectedWeapons); for i, PC in pairs(UGCGameSystem.GetAllPlayerController(false)) do - if self.PlayerSelectedWeapons[PC.PlayerKey] then - local WeaponList = {}; - for WeaponID, List in pairs(ArchiveTable[PC.PlayerKey].SelectWeapons) do - WeaponList[WeaponID] = TableHelper.DeepCopyTable(List); + -- 再次发送数据 + if not table.isEmpty(self.PlayerSelectedWeapons[PC.PlayerKey]) then + local List = {}; + for WeaponID, v in pairs(self.PlayerSelectedWeapons[PC.PlayerKey]) do + List[WeaponID] = TableHelper.DeepCopyTable(ArchiveTable[PC.PlayerKey].SelectWeapons[WeaponID]); end - PC:SendWeapons(-1, WeaponList); + PC:SendWeapons(-1, List); end end end @@ -927,7 +889,6 @@ function Mini_Solo:OnPostPlayerRank(PlayerKey, IsWin) --- 1:积分;2:技术分 --local UID = UE.GetPlayerUID(PlayerKey); --PC.RankingListComponent:Server_UpdateRankListScore(PC, UID, 1, ArchiveTable[PlayerKey].Score); - --PC.RankingListComponent:Server_UpdateRankListScore(PC, UID, 2, ArchiveTable[PlayerKey].TechScore); if not self.IsLobbyTeam then for i = 1, 2 do @@ -1000,7 +961,7 @@ function Mini_Solo:OnPawnInit(Pawn, InitArmor, InitMedication) -- 说明此时拿取第一把枪即可 CurrWeaponId = self.SelectWeapons[1]; else - CurrWeaponId = self.CurrWeaponItem[Pawn.PlayerKey]; + CurrWeaponId = self.CurrWeaponItem[Pawn.PlayerKey] or ItemTool.GetFirstWeaponID(Pawn.PlayerKey); end UGCLogSystem.Log("[Mini_Solo:OnPawnInit] CurrWeaponId = %d", CurrWeaponId); @@ -1099,7 +1060,7 @@ function Mini_Solo:OnPlayerDead(InPlayerKey, InCauserKey) self.RoundWinner = WinnerPlayerKey; UGCLogSystem.Log("[Mini_Solo:OnPlayerDead] InCauserKey = %d, State = %s", InCauserKey, TableHelper.printEnum(MiniGameState, self.State)); self.bRoundEnd = true; - local WeaponId = self.CurrWeaponItem[WinnerPlayerKey]; + local WeaponId = self.CurrWeaponItem[WinnerPlayerKey] or ItemTool.GetFirstWeaponID(WinnerPlayerKey); -- 检查一下是否超过一半 table.insert(self.RoundWinners, { Winner = self.RoundWinner, @@ -1197,18 +1158,19 @@ function Mini_Solo:OnPlayerLeave(InPlayerKey) for i, v in pairs(PlayerKeys) do self.GameWinner = i; end -- 查看哪个玩家已经够局数了 if self.State == MiniGameState.ROUND_GAMING then + local WeaponID = self.CurrWeaponItem[self.GameWinner] or ItemTool.GetFirstWeaponID(self.GameWinner) table.insert(self.RoundWinners, { Winner = self.GameWinner, Time = UE.GetServerTime() - self.RoundStartTime, -- 拿到对方的枪械 - Weapon = self.CurrWeaponItem[self.GameWinner], + Weapon = WeaponID, Score = { Winner = self.RoundDeadTimes[InPlayerKey] or 0, -- 这个是阵亡数,需要反过来 Loser = self.RoundDeadTimes[self.GameWinner] or 0, }, }); if self:IsFormalMode() then - self:AddSelectWeaponsArchive(self.RoundWinner, self.CurrWeaponItem[self.GameWinner], 3, 1) + self:AddSelectWeaponsArchive(self.RoundWinner, WeaponID, 3, 1) end self:DOREPONCE("RoundWinners"); end @@ -1313,7 +1275,7 @@ function Mini_Solo:InsertLastGame(PlayerKey, OtherKey) WinTable[PlayerKey] or 0, -- MyScore 3 WinTable[OtherKey] or 0, -- EnemyScore 4 self.RankScores[IsWin and 1 or 2].Current or 0, -- Score 5 - self.RankScores[IsWin and 1 or 2].Add or 0, -- AddScore 6 + self.RankScores[IsWin and 1 or 2].Add or 0, -- Add Score 6 self.TotalKDA[PlayerKey].Kill or 0, -- Kill 7 self.TotalKDA[PlayerKey].Dead or 0, -- Dead 8 WinRoundTable, -- GameInfo 9 @@ -1445,27 +1407,35 @@ function Mini_Solo:OnRoundFormalStart() if WeaponId then table.remove(self.SelectWeapons, 1); for i, v in pairs(UGCGameSystem.GetAllPlayerController(false)) do - self.CurrWeaponItem[v.PlayerKey] = WeaponId; - HadChanged = true; - if self.PlayerSelectedWeapons[v.PlayerKey] == nil then self.PlayerSelectedWeapons[v.PlayerKey] = {}; end - self.PlayerSelectedWeapons[v.PlayerKey][WeaponId] = 1; - self:AddSelectWeaponsArchive(v.PlayerKey, WeaponId, 2, 1); + local PlayerKey = v.PlayerKey; + self.CurrWeaponItem[PlayerKey] = WeaponId; + HadChanged = true; + if self.PlayerSelectedWeapons[PlayerKey] == nil then self.PlayerSelectedWeapons[PlayerKey] = {}; end + self.PlayerSelectedWeapons[PlayerKey][WeaponId] = 1; + self:AddSelectWeaponsArchive(PlayerKey, WeaponId, 2, 1); + -- 玩家直接添加武器 + self:PlayerAddWeapon(PlayerKey, self.CurrWeaponItem[PlayerKey]); end end -- 移除对应的东西 self:DOREPONCE("SelectWeapons"); UGCLogSystem.LogTree(string.format("[Mini_Solo:OnRoundFormalStart] SelectWeapons End"), self.SelectWeapons) else + UGCLogSystem.Log("[Mini_Solo:OnRoundFormalStart] 娱乐模式") + UGCLogSystem.LogTree(string.format("[Mini_Solo:OnRoundFormalStart] self.EnterWeaponItem ="), self.EnterWeaponItem) -- 去读取一下,否则就用默认的枪械 for i, PC in pairs(UGCGameSystem.GetAllPlayerController(false)) do - if self.CurrWeaponItem[PC.PlayerKey] == nil then - local LastWeapon = ArchiveTable[PC.PlayerKey].LastWeapon; - if LastWeapon then - self.CurrWeaponItem[PC.PlayerKey] = LastWeapon; - else - self.CurrWeaponItem[PC.PlayerKey] = self.DefaultWeapon; - end - HadChanged = true; + local PlayerKey = PC.PlayerKey; + if table.isEmpty(self.EnterWeaponItem[PlayerKey]) then + local EnterWeapons = ArchiveTable[PlayerKey].EnterWeapons or WeaponSelectionCombinationConfig.WeaponCombinationList.Weapon; + local EnterWeaponIndex = ArchiveTable[PlayerKey].EnterWeaponIndex or 1; + self.EnterWeaponItem[PlayerKey] = EnterWeapons[EnterWeaponIndex]; + HadChanged = true; + end + UGCLogSystem.LogTree(string.format("[Mini_Solo:OnRoundFormalStart] EnterWeaponItem ="), self.EnterWeaponItem[PlayerKey]) + local Pawn = UGCGameSystem.GetPlayerPawnByPlayerKey(PlayerKey); + if Pawn and UE.IsValid(Pawn) then + Pawn:UpdateSlotWeapons(self.EnterWeaponItem[PlayerKey]); end end end @@ -1474,14 +1444,6 @@ function Mini_Solo:OnRoundFormalStart() self:DOREPONCE("CurrWeaponItem") end - -- 随机选一把枪 - for i, v in pairs(UGCGameSystem.GetAllPlayerController(false)) do - local PlayerKey = v.PlayerKey; - if self.CurrWeaponItem[PlayerKey] then - self:PlayerAddWeapon(PlayerKey, self.CurrWeaponItem[PlayerKey]); - end - end - self.RoundDamages = {}; PoisonManager:Toggle(true); if self.CheckPlayerExistHandler ~= nil then @@ -1501,6 +1463,15 @@ function Mini_Solo:OnRoundFormalStart() UE.ClearSceneObjects(); end +--- 娱乐模式下玩家获取武器 +---@param PlayerKey PlayerKey +---@param Index int32|nil +function Mini_Solo:GetPlayerEnterWeapons(PlayerKey, Index) + local Weapons = ItemTool.GetPlayerEnterWeapons(PlayerKey, Index); + self.EnterWeaponItem[PlayerKey] = TableHelper.DeepCopyTable(Weapons); + return Weapons; +end + --- 检测玩家是否存在 function Mini_Solo:CheckPlayerExist(dt, st) -- 说明此时走了正常逻辑 @@ -1538,21 +1509,28 @@ function Mini_Solo:AllPawnsAddOutline() end end +---@param Pawn UGCPlayerPawn_C +---@param Controller UGCPlayerController_C function Mini_Solo:OnPlayerPossessed(Pawn, Controller) -- 清空玩家身上的武器 - UGCLogSystem.Log("[Mini_Solo:OnPlayerPossessed] 执行") - UGCLogSystem.LogTree(string.format("[Mini_Solo:OnPlayerPossessed] CurrWeaponItem"), self.CurrWeaponItem) - if table.isEmpty(self.CurrWeaponItem) then - return ; - end - UGCLogSystem.Log("[Mini_Solo:OnPlayerPossessed] 开始准备添加武器") - - if self.CurrWeaponItem[Pawn.PlayerKey] ~= nil then + if self.ModeType == GameModeConfig.EGameModeType.DefaultMode then + UGCLogSystem.LogTree(string.format("[Mini_Solo:OnPlayerPossessed] CurrWeaponItem"), self.CurrWeaponItem) + if table.isEmpty(self.CurrWeaponItem) then return ; end + UGCLogSystem.Log("[Mini_Solo:OnPlayerPossessed] 开始准备添加武器") + if self.CurrWeaponItem[Pawn.PlayerKey] ~= nil then + UGCEventSystem.SetTimer(Pawn, function() + UGCLogSystem.Log("[Mini_Solo:OnPlayerPossessed] 开始添加武器") + local Weapon = ItemTool.GetPlayerFirstWeapon(Pawn); + if Weapon == nil or not UE.IsValid(Weapon) or Weapon:GetWeaponItemID() ~= self.CurrWeaponItem[Pawn.PlayerKey] then + self:PlayerAddWeapon(Pawn.PlayerKey, self.CurrWeaponItem[Pawn.PlayerKey]); + end + end, 1); + end + else + UGCLogSystem.LogTree(string.format("[Mini_Solo:OnPlayerPossessed] EnterWeaponItem ="), self.EnterWeaponItem); + if table.isEmpty(self.EnterWeaponItem) then return ; end UGCEventSystem.SetTimer(Pawn, function() - local Weapon = ItemTool.GetPlayerFirstWeapon(Pawn); - if Weapon == nil or not UE.IsValid(Weapon) or Weapon:GetWeaponItemID() ~= self.CurrWeaponItem[Pawn.PlayerKey] then - self:PlayerAddWeapon(Pawn.PlayerKey, self.CurrWeaponItem[Pawn.PlayerKey]); - end + Pawn:UpdateSlotWeapons(self.EnterWeaponItem[Pawn.PlayerKey]); end, 1); end end @@ -1978,6 +1956,9 @@ function Mini_Solo:OnRep_PlayerSelectModes() end end +--- 娱乐模式武器数据 +Mini_Solo.EnterWeaponItem = {}; + --- 选择模式,一个玩家只能选一次 function Mini_Solo:SelectMode(InPlayerKey, InModeType) UGCLogSystem.Log("[Mini_Solo:SelectMode] 执行,PlayerKey = %s,ModeType = %s", tostring(InPlayerKey), tostring(InModeType)); @@ -1992,15 +1973,18 @@ function Mini_Solo:SelectMode(InPlayerKey, InModeType) self:DOREPONCE("ModeType"); self:ResetMiniGameTimes(); + UGCLogSystem.Log("[Mini_Solo:SelectMode] 执行") -- 拿到之前的武器,并赋值 for i, PC in pairs(UGCGameSystem.GetAllPlayerController(false)) do - if ArchiveTable[PC.PlayerKey].LastWeapon then - self.CurrWeaponItem[PC.PlayerKey] = ArchiveTable[PC.PlayerKey].LastWeapon; - end + local PlayerKey = PC.PlayerKey; + self:GetPlayerEnterWeapons(PlayerKey, ArchiveTable[PlayerKey].EnterWeaponIndex); end - if self.CurrTimeCount ~= nil and self.CurrTimeCount > self.SelectMapTime then - UGCLogSystem.Log("[Mini_Solo:SelectMode] self.CurrTimeCount = %s", tostring(self.CurrTimeCount)); + UGCLogSystem.LogTree(string.format("[Mini_Solo:SelectMode] EnterWeaponItem ="), self.EnterWeaponItem) + + UGCLogSystem.Log("[Mini_Solo:SelectMode] self.SelectMapTime = %s", tostring(self.SelectMapTime)); + if self.CurrTimeCount ~= nil and self.CurrTimeCount > GameStateTimes.GangUp.SelectMapTime then + UGCLogSystem.Log("[Mini_Solo:SelectMode] self.CurrTimeCount = %s", tostring(self.CurrTimeCount), tostring(self.SelectMapTime)); MiniManager:UpdateInternalCount(GameStateTimes.GangUp.SelectMapTime); end end @@ -2025,6 +2009,7 @@ end Mini_Solo.PlayerSelectedWeapons = {}; +---@deprecated function Mini_Solo:PlayerSelectWeapon(PlayerKey, WeaponID) -- 给玩家添加上去 self.CurrWeaponItem[PlayerKey] = WeaponID; @@ -2037,6 +2022,32 @@ function Mini_Solo:PlayerSelectWeapon(PlayerKey, WeaponID) ArchiveTable[PlayerKey].LastWeapon = WeaponID; end +--- 玩家选择多个武器,此处是配置,并不是设置 +function Mini_Solo:PlayerSelectWeapons(PlayerKey, SaveIndex, Weapons) + -- 保存EnterWeapons + if table.isEmpty(ArchiveTable[PlayerKey].EnterWeapons) then ArchiveTable[PlayerKey].EnterWeapons = {}; end + ArchiveTable[PlayerKey].EnterWeapons[SaveIndex] = Weapons; + UGCLogSystem.LogTree(string.format("[Mini_Solo:PlayerSelectWeapons] Weapons ="), Weapons) + self.EnterWeaponItem[PlayerKey] = TableHelper.DeepCopyTable(Weapons); + local Pawn = UGCGameSystem.GetPlayerPawnByPlayerKey(PlayerKey); + if Pawn and UE.IsValid(Pawn) then + Pawn:UpdateSlotWeapons(Weapons); + local PC = UGCGameSystem.GetPlayerControllerByPlayerKey(PlayerKey); + UnrealNetwork.CallUnrealRPC(PC, Pawn, "UpdateEnterWeapons", SaveIndex, Weapons); + end +end + +--- 选择武器索引 +function Mini_Solo:SelectWeaponIndex(PlayerKey, WeaponIndex) + if self.ModeType == GameModeConfig.EGameModeType.DefaultMode then return ; end + ArchiveTable[PlayerKey].EnterWeaponIndex = WeaponIndex; + local Pawn = UGCGameSystem.GetPlayerPawnByPlayerKey(PlayerKey); + -- 玩家拾取该武器 + if Pawn then + Pawn:UpdateSlotWeapons(self:GetPlayerEnterWeapons(PlayerKey, WeaponIndex)); + end +end + Mini_Solo.AlreadyPlayers = {}; function Mini_Solo:OnPlayerAlready(PlayerKey) @@ -2062,7 +2073,7 @@ function Mini_Solo:ShowRankInheritanceUI() if ArchiveTable[LocalPlayerKey].IsNewSeason then -- 读取之前数据 local Seasons = ArchiveTable[LocalPlayerKey].Seasons - if table.isEmpty(Seasons) then return; end + if table.isEmpty(Seasons) then return ; end UGCLogSystem.LogTree(string.format("[Mini_Solo:ShowRankInheritanceUI] Seasons ="), Seasons) -- 获取上一赛季 local LastSeason, LastRankScore = -1, 0; @@ -2080,18 +2091,4 @@ function Mini_Solo:ShowRankInheritanceUI() end end -function Mini_Solo:Test_Season(PlayerKey) - ArchiveTable[PlayerKey].Score = 3500; - ArchiveTable[PlayerKey].Seasons = { - [0] = { - 0, - { 2521, 0, }, - { 6, 6 }, - { 14, 0 } - }, - } - ArchiveTable[PlayerKey].CurSeason = 1; - -end - return Mini_Solo; diff --git a/SoloKing/Script/Global/Table/ObjectPath.lua b/SoloKing/Script/Global/Table/ObjectPath.lua index b9fc45f2..2bc11745 100644 --- a/SoloKing/Script/Global/Table/ObjectPath.lua +++ b/SoloKing/Script/Global/Table/ObjectPath.lua @@ -5,16 +5,14 @@ ObjectPath = {}; ObjectPath.ActorClassPath = { UGCGameSystem.GetUGCResourcesFullPath('Asset/Blueprint/UGCPlayerPawn.UGCPlayerPawn_C'), UGCGameSystem.GetUGCResourcesFullPath('Asset/Blueprint/SceneObj/Start/BP_ActorStart.BP_ActorStart_C'), - }; if not UE_SERVER then ObjectPath.ClientClassPath = { ------------------------------------------UI类------------------------------------------ - UGCGameSystem.GetUGCResourcesFullPath('Asset/UI/Child/WB_PlayerInfoItem.WB_PlayerInfoItem_C'), - UGCGameSystem.GetUGCResourcesFullPath('Asset/UI/Child/WB_PlayerInfoItem_Small.WB_PlayerInfoItem_Small_C'), - UGCGameSystem.GetUGCResourcesFullPath('Asset/UI/Tool/WB_SelectPartItem.WB_SelectPartItem_C'), - UGCGameSystem.GetUGCResourcesFullPath('Asset/UI/Tool/WB_SelectPartButton.WB_SelectPartButton_C'), + --- UGCGameSystem.GetUGCResourcesFullPath('Asset/UI/Tool/Child/WB_PlayerInfoItem.WB_PlayerInfoItem_C'), + UGCGameSystem.GetUGCResourcesFullPath('Asset/UI/Tool/Child/WB_SelectPartItem.WB_SelectPartItem_C'), + UGCGameSystem.GetUGCResourcesFullPath('Asset/UI/Tool/Child/WB_SelectPartButton.WB_SelectPartButton_C'), UGCGameSystem.GetUGCResourcesFullPath('Asset/UI/SelectWeapons/Child/WB_AllWeapon_Type.WB_AllWeapon_Type_C'), UGCGameSystem.GetUGCResourcesFullPath('Asset/UI/SelectWeapons/Child/WB_AllWeapon_Item.WB_AllWeapon_Item_C'), @@ -22,21 +20,11 @@ if not UE_SERVER then }; end ---- 需要加载 Object 的类 ---ObjectPath.ActorObjectPath = { --- '/Game/Arts_Effect/ParticleSystems/Share/P_AH6_baozha_01.P_AH6_baozha_01' ---} - function ObjectPath.Init() ObjectPath.LoadClass(ObjectPath.ActorClassPath) if not UE_SERVER then ObjectPath.LoadClass(ObjectPath.ClientClassPath) end - --for i, v in pairs(ObjectPath.ActorObjectPath) do - -- local dot_num = string.find(v, '%.'); - -- local val = string.sub(v, dot_num + 1, string.len(v)); - -- UE.AsyncLoadObject(v, function(TargetObject) ObjectPath[val] = TargetObject; end); - --end end function ObjectPath.LoadClass(InTable) @@ -63,9 +51,7 @@ function ObjectPath.AddFunc(InClassName, Func) if ObjectPath[InClassName] then Func(ObjectPath[InClassName]); else - if ObjectPath.WaitFuncs[InClassName] == nil then - ObjectPath.WaitFuncs[InClassName] = {}; - end + if ObjectPath.WaitFuncs[InClassName] == nil then ObjectPath.WaitFuncs[InClassName] = {}; end table.insert(ObjectPath.WaitFuncs[InClassName], Func); UGCLogSystem.LogTree(string.format("[ObjectPath.AddFunc] ObjectPath.WaitFuncs ="), ObjectPath.WaitFuncs) end diff --git a/SoloKing/Script/Global/Tool/ItemTool.lua b/SoloKing/Script/Global/Tool/ItemTool.lua index 582c4a5f..268317d3 100644 --- a/SoloKing/Script/Global/Tool/ItemTool.lua +++ b/SoloKing/Script/Global/Tool/ItemTool.lua @@ -65,21 +65,18 @@ function ItemTool.SetWeaponInfiniteById(InPawn, InWeaponId, FillBulletType, IsEn for i, Weapon in pairs(Weapons) do ItemTool.SetWeaponInfinite(InPawn, Weapon, FillBulletType, IsEnable); end - table.func(InPawn, "SetInfiniteType", FillBulletType) else if WeaponAmmoIdMap[InWeaponId] and FillBulletType > 0 then UGCBackPackSystem.AddItem(InPawn, WeaponAmmoIdMap[InWeaponId], FillBulletType); end end - --ItemTool.SetAllWeaponInfinite(InPawn, EFillBulletType.Fill, IsEnable); end end --- 找到玩家身上的一把枪械或者近战武器这些 ---@param InPawn UGCPlayerPawn_C 玩家 ----@param IsForce bool 是否强制找到一把枪,默认都是强制 ---@return ASTExtraWeapon -function ItemTool.GetPlayerFirstWeapon(InPawn, IsForce) +function ItemTool.GetPlayerFirstWeapon(InPawn) for i, v in pairs(ShootWeaponEnums) do local Weapon = UGCWeaponManagerSystem.GetWeaponBySlot(InPawn, v); if UE.IsValid(Weapon) then return Weapon; end @@ -87,100 +84,6 @@ function ItemTool.GetPlayerFirstWeapon(InPawn, IsForce) return nil; end ----@param InPawn UGCPlayerPawn_C 玩家 ----@param IsForce bool 是否强制要删除一个武器,默认是第一把武器 -function ItemTool.DropCurrentWeapon(InPawn, IsForce) - if not UE.IsValid(InPawn) then return end - local Weapon = ItemTool.GetPlayerFirstWeapon(InPawn, IsForce); - if not UE.IsValid(Weapon) then return end - local WeaponId = Weapon:GetWeaponItemID(); - local Parts = ItemTool.GetWeaponParts(Weapon) - if not table.isEmpty(Parts) then - for i, v in pairs(Parts) do - UGCBackPackSystem.DropItem(InPawn, v, 1, true); - end - end - UGCBackPackSystem.DropItem(InPawn, WeaponId, 1, true); - ItemTool.DropBullets(InPawn, WeaponId) -end - -function ItemTool.DropBullets(InPawn, InWeaponId) - local AllItems = UGCBackPackSystem.GetAllItemData(InPawn) - local AmmoType = WeaponAmmoIdMap[InWeaponId]; - for i, v in pairs(AllItems) do - if AmmoType == v.ItemID then - UGCBackPackSystem.DropItem(InPawn, v.ItemID, v.Count, true); - end - end -end - ----@param InPawn UGCPlayerPawn_C -function ItemTool.DropMeleeWeapon(InPawn, IsAll) - local Weapon = UGCWeaponManagerSystem.GetWeaponBySlot(InPawn, ESurviveWeaponPropSlot.SWPS_MeleeWeapon) - if not UE.IsValid(Weapon) then return end - UGCBackPackSystem.DropItem(InPawn, Weapon:GetWeaponItemID(), 1, true); - if not IsAll then return end - -- 掉落 - local AllItems = UGCBackPackSystem.GetAllItemData(InPawn) - if table.isEmpty(AllItems) then return end - for i, v in pairs(AllItems) do - if GetWeaponIdType(v.ItemID) then UGCBackPackSystem.DropItem(InPawn, v.ItemID, v.Count, true); end - end -end - ----@param InPawn UGCPlayerPawn_C ----@param InWeaponId int32 -function ItemTool.ReplaceSameTypeWeapon(InPawn, InWeaponId) - UGCPawnSystem.LeavePawnState(InPawn, EPawnState.GunReload); - local NextWeaponIdType = GetWeaponIdType(InWeaponId) - for i, v in pairs(ShootWeaponEnums) do - local Weapon = UGCWeaponManagerSystem.GetWeaponBySlot(InPawn, v); - if UE.IsValid(Weapon) then - local WeaponId = Weapon:GetWeaponID() - local IdType = GetWeaponIdType(WeaponId); - if NextWeaponIdType == IdType then - ItemTool.ClearWeapon(InPawn, Weapon); - ItemTool.AddWeaponItem(InPawn, InWeaponId, 1, true, InPawn:GetInfiniteType()) - return - end - end - end -end - ----@param InPawn UGCPlayerPawn_C 玩家 ----@param InWeaponId int32 武器 ID ----@param IsDestroy bool 是否销毁 ----@param bPart bool 是否要移除配件 -function ItemTool.DropWeaponById(InPawn, InWeaponId, IsDestroy, bPart, all) - -- 检查是否有配件,如果有配件,也一并掉到地上 - local Weapons = ItemTool.GetWeaponsById(InPawn, InWeaponId); - for i, Weapon in pairs(Weapons) do - if UE.IsValid(Weapon) then - ItemTool.DropWeaponByWeapon(Weapon, IsDestroy, bPart); - if not all then return ; end - end - end -end - ---- 掉落武器和配件 ----@param InWeapon ASTExtraWeapon ----@param IsDestroy bool ----@param bPart bool -function ItemTool.DropWeaponByWeapon(InWeapon, IsDestroy, bPart) - local Pawn = InWeapon:GetOwnerPawn(); - if not UE.IsValid(Pawn) then return ; end - local Id = InWeapon:GetWeaponItemID(); - local Parts = ItemTool.GetWeaponParts(InWeapon); - if table.isEmpty(Parts) or not bPart then - UGCBackPackSystem.DropItem(Pawn, Id, 1, IsDestroy); - return ; - end - for i, v in pairs(Parts) do - UGCBackPackSystem.DropItem(Pawn, v, 1, IsDestroy); - end - UGCBackPackSystem.DropItem(Pawn, Id, 1, IsDestroy); -end - ---@param InPawn UGCPlayerPawn_C 玩家 ---@param InWeaponId int32 武器 ID ---@return ASTExtraShootWeapon* 射击武器 @@ -205,65 +108,30 @@ end function ItemTool.AddWeaponItem(InPawn, InWeaponId, InCount, bAppend, FillBulletType) if not UE.IsValid(InPawn) then return end local bHadAdd = false; - repeat bHadAdd = UGCBackPackSystem.AddItem(InPawn, InWeaponId, InCount) until bHadAdd; + local Times = 10; + repeat + bHadAdd = UGCBackPackSystem.AddItem(InPawn, InWeaponId, InCount) + Times = Times - 1; + until bHadAdd or Times <= 0; + local Weapon = ItemTool.GetLastWeapon(InPawn, InWeaponId); if not bAppend then return Weapon end - ItemTool.AddWeaponParts(InPawn, InWeaponId, bAppend); - if FillBulletType ~= nil then - ItemTool.SetWeaponInfinite(InPawn, Weapon, InPawn:GetInfiniteType(), true); - end + -- 获取 Parts + + ItemTool.SetWeaponParts(Weapon, ItemTool.GetWeaponIdParts(InPawn.PlayerKey, InWeaponId)); + ItemTool.SetWeaponInfinite(InPawn, Weapon, EFillBulletType.ClipInfinite, true); + ItemTool.SetWeaponInfinite(InPawn, Weapon, EFillBulletType.Fill, true); return Weapon; end ---- 替换当前的武器 ----@param InPawn UGCPlayerPawn_C 玩家 ----@param InWeaponId int32 武器 ID -function ItemTool.ReplaceCurrentWeapon(InPawn, InWeaponId) - UGCPawnSystem.LeavePawnState(InPawn, EPawnState.GunReload); - ItemTool.DropCurrentWeapon(InPawn, true); - ItemTool.DropMeleeWeapon(InPawn, true); - UGCLogSystem.Log("[ItemTool.ReplaceCurrentWeapon] 执行 InWeaponId = %s", tostring(InWeaponId)); - ItemTool.AddWeaponItem(InPawn, InWeaponId, 1, true, InPawn:GetInfiniteType()); -end - ----100000 - 199999 武器 ----200000 - 299999 配件 ----300000 - 399999 子弹 ----400000 - 499999 衣服 ----500000 - 599999 背包 / 护甲 / 头盔等 ----600000 - 699999 补给品、投掷物等 ----700000 - 799999 降落伞 ----800000 - 899999 头盔、护甲皮肤 ---- >= 8300000 自定义物品 ---- 清除玩家身上所有的武器和配件 ----@param InPawn UGCPlayerPawn_C 玩家 ----@param bWeapon bool 是否移除武器 ----@param bPart bool 是否移除配件 ----@param bCustomItem bool 是否移除自定义物品 ----@param bRecruit bool 是否移除补给品 -function ItemTool.ClearAllWeaponsAndProp(InPawn, bWeapon, bPart, bBullet, bCustomItem, bRecruit) - local AllItem = UGCBackPackSystem.GetAllItemData(InPawn); - local func = function(v) - if v == nil then return true end - return v - end - bWeapon = func(bWeapon); - bPart = func(bPart); - bBullet = func(bBullet); - bCustomItem = func(bCustomItem); - bRecruit = func(bRecruit); - if AllItem then - for Index, Item in pairs(AllItem) do - if (bWeapon and Item.ItemID >= 100000 and Item.ItemID < 200000) -- 武器 - or (bPart and Item.ItemID >= 200000 and Item.ItemID < 300000) -- 配件 - or (bBullet and Item.ItemID >= 300000 and Item.ItemID < 400000) -- 子弹等 - or (bCustomItem and Item.ItemID >= 8300000) -- 自定义的东西 - or (bRecruit and Item.ItemID > 500000 and Item.ItemID < 700000) -- 补给品 - then - UGCBackPackSystem.DropItem(InPawn, Item.ItemID, Item.Count, true) - end - end +function ItemTool.GetWeaponIdParts(PlayerKey, InWeaponId) + if WeaponSuits[InWeaponId] == nil then return; end + if table.isEmpty(WeaponSuits[InWeaponId][EWeaponPartType.Best]) then return; end + local Parts = nil; + if ArchiveTable[PlayerKey] and not table.isEmpty(ArchiveTable[PlayerKey].Weapons) then + Parts = ArchiveTable[PlayerKey].Weapons[InWeaponId]; end + return Parts or WeaponSuits[InWeaponId][EWeaponPartType.Best][1]; end --- 移除玩家身上所有的武器 @@ -277,19 +145,6 @@ function ItemTool.ClearAllWeapon(InPawn) end end ---- 清除玩家手里的武器,如果 bHandTo1 表示如果手里没武器,那么清空第一把主武器 ----@param InPawn UGCPlayerPawn_C ----@param bHandTo1 bool 是否当玩家手里没武器的时候清空第一把武器? -function ItemTool.ClearCurrentWeapon(InPawn, bHandTo1) - local Weapon = UGCWeaponManagerSystem.GetCurrentWeapon(InPawn) - if Weapon == nil and bHandTo1 then - Weapon = UGCWeaponManagerSystem.GetWeaponBySlot(InPawn, ESurviveWeaponPropSlot.SWPS_MainShootWeapon1); - if Weapon == nil then return end - end - - ItemTool.ClearWeapon(InPawn, Weapon); -end - ---@param Weapon ASTExtraWeapon ---@param InPawn UGCPlayerPawn_C ---@return table @@ -311,48 +166,10 @@ function ItemTool.GetWeaponPartsDefineIDs(InPawn, Weapon) return InstanceIds, CustomList; end -function ItemTool.ClearWeaponById(InPawn, InWeaponId) - -end - ---@param Weapon ASTExtraWeapon ---@param InPawn UGCPlayerPawn_C function ItemTool.ClearWeapon(InPawn, Weapon) - local BackComp = UGCBackPackSystem.GetBackpackComponent(InPawn); - local InstanceIds = ItemTool.GetWeaponPartsDefineIDs(InPawn, Weapon); - UGCLogSystem.Log("[ItemTool.ClearWeapon] 开始移除") - for i, v in pairs(InstanceIds) do - local bDrop = BackComp:DropItem(v, 1, EBattleItemDropReason.Force); - if not bDrop then - UGCLogSystem.Log("[ItemTool.ClearWeapon] 移除配件失败,Weapon Id = %d, Part Id = %d", Weapon:GetWeaponItemID(), v.TypeSpecificID); - end - end - -- 寻找当前的武器子弹,再清除这些子弹 - local WeaponInstanceID = Weapon:GetItemDefineID().InstanceID - -- 找到子弹 - local AmmoId = WeaponAmmoIdMap[Weapon:GetWeaponItemID()]; - UGCLogSystem.Log("[ItemTool.ClearWeapon] 移除 武器 %d", Weapon:GetWeaponItemID()) - UGCBackPackSystem.DropItemByInstanceID(InPawn, WeaponInstanceID, 1, true); - - if type(AmmoId) ~= 'number' then return ; end - local Count = BackComp:GetItemCount(AmmoId) - if Count > 0 then - UGCBackPackSystem.DropItem(InPawn, AmmoId, Count, true); - UGCLogSystem.Log("[ItemTool.ClearWeapon] 移除 %d 子弹 %d 个", AmmoId, Count) - end -end - ---- 清空背包中的所有配件和子弹 -function ItemTool.OnlyClearParts(InPawn) - local Comp = UGCBackPackSystem.GetBackpackComponent(InPawn) - local AllData = UGCBackPackSystem.GetAllItemData(InPawn) - for i, v in pairs(AllData) do - if GetCustomItemType(v.ItemID) == ECustomItemType.Bullet or - GetCustomItemType(v.ItemID) == ECustomItemType.Part - then - UGCBackPackSystem.DropItemByInstanceID(InPawn, v.InstanceID, v.Count, true); - end - end + return ItemTool.RemoveWeapon(InPawn, Weapon); end --- 获取武器的所有配件 @@ -361,22 +178,19 @@ end function ItemTool.GetWeaponParts(InWeapon) local Table = {}; if ItemTool.IsShootWeapon(InWeapon) then - if InWeapon.AttachedAttachmentID then - for i, v in pairs(InWeapon.AttachedAttachmentID) do - if not table.hasValue(Table, v) then Table[#Table + 1] = v; end - end - end + local List = UGCGunSystem.GetWeaponAllAttachmentIDList(InWeapon); + for i, v in pairs(List) do table.insert(Table, v.TypeSpecificID); end end return Table; end ---- 获取最合适的武器配件 -function ItemTool.GetNearlyWeaponParts(ItemId, PlayerKey) - if ArchiveTable[PlayerKey] and ArchiveTable[PlayerKey].Weapons and ArchiveTable[PlayerKey].Weapons[ItemId] then - return ArchiveTable[PlayerKey].Weapons[ItemId]; - end - if WeaponSuits[ItemId] and WeaponSuits[ItemId][EWeaponPartType.Best] then return WeaponSuits[ItemId][EWeaponPartType.Best][1] end - return nil; +--- 射击武器类 +ItemTool.ShootWeaponClass = nil; +--- 获取武器基类 +---@return UClass 武器基类 +function ItemTool.GetShootWeaponClass() + if ItemTool.ShootWeaponClass == nil then ItemTool.ShootWeaponClass = UE.GetClassByName("STExtraShootWeapon"); end + return ItemTool.ShootWeaponClass; end --- 是否是射击枪械类 @@ -384,24 +198,7 @@ end ---@return bool 是否是射击枪械类 function ItemTool.IsShootWeapon(InWeapon) if InWeapon == nil then return false end - return UE.IsA(InWeapon, UGCGameSystem.GameState:GetShootWeaponClass()); -end - ----@param InPawn UGCPlayerPawn_C 玩家 ----@param IsAll bool 是否所有武器都需要 Reload,如果不是,默认手中拿的或者第一把枪 -function ItemTool.Reload(InPawn, IsAll) - if UGCGameSystem.IsServer() then - for i, v in pairs(ShootWeaponEnums) do - local Weapon = UGCWeaponManagerSystem.GetWeaponBySlot(InPawn, v); - if UE.IsValid(Weapon) and ItemTool.IsShootWeapon(Weapon) then - Weapon:StartReload(); - if not IsAll then return end - end - end - else - local Weapon = UGCWeaponManagerSystem.GetCurrentWeapon(InPawn) - if UE.IsValid(Weapon) and ItemTool.IsShootWeapon(Weapon) then Weapon:Reload(); end - end + return UE.IsA(InWeapon, ItemTool.GetShootWeaponClass()); end ---@param InPawn UGCPlayerPawn_C @@ -442,7 +239,7 @@ function ItemTool.AddItem(InPawn, InItemId, InCount, ...) BackpackComponent:PickupItem(ItemDefineID, ItemInfo, EBattleItemPickupReason.Initial) local Params = { ... }; - if table.isEmpty(Params) then return; end + if table.isEmpty(Params) then return ; end -- 添加配件,验证是否有配件 local FillBulletType = nil; if WeaponSuits[InItemId] ~= nil then @@ -730,25 +527,23 @@ end ---@param InType EWeaponAttachmentSocketType ---@return FItemDefineID function ItemTool.GetDefineIDBySocketType(Weapon, InType) - local DefineId = Weapon:GetWeaponAttachmentIDBySocketType(InType) - if DefineId.bValidItem and DefineId.bValidInstance then - return DefineId; - end - return nil; + return UGCGunSystem.GetWeaponAttachmentIDBySocketType(Weapon, InType); end function ItemTool.AddRangeItems(InPawn, Begin, End) for i = Begin, End do if UGCItemSystem.IsUGCItem(i) then - local Times = 10; - local bSucces = false; + local Times = 10; + local bSuccess = false; repeat - bSucces = UGCBackPackSystem.AddItem(InPawn, i, 1); - until bSucces or Times <= 0; + bSuccess = UGCBackPackSystem.AddItem(InPawn, i, 1); + until bSuccess or Times <= 0; end end end +---@param InWeapon ASTExtraShootWeapon +---@param PartId int32 function ItemTool.WeaponAddPart(InWeapon, PartId) UGCGunSystem.CreateAndAddGunAttachment(InWeapon, PartId); end @@ -766,10 +561,9 @@ end function ItemTool.GetWeaponPartList(Weapon) local Parts = {}; if Weapon and UE.IsValid(Weapon) and ItemTool.IsShootWeapon(Weapon) then - local SocketTypes = UGCGunSystem.GetAvailableWeaponAttachmentSocketTypeList(Weapon); - for i, v in pairs(SocketTypes) do - local ItemDefineID = UGCGunSystem.GetWeaponAttachmentIDBySocketType(Weapon, v); - if ItemDefineID and ItemDefineID.bValidItem and ItemDefineID.bValidInstance then + local ItemDefineIDs = UGCGunSystem.GetWeaponAllAttachmentIDList(Weapon); + for i, ItemDefineID in pairs(ItemDefineIDs) do + if ItemDefineID.bValidItem and ItemDefineID.bValidInstance then table.insert(Parts, ItemDefineID.TypeSpecificID); end end @@ -781,3 +575,161 @@ function ItemTool.GetCurrWeaponPartList(Pawn) local Weapon = UGCWeaponManagerSystem.GetCurrentWeapon(Pawn); return ItemTool.GetWeaponPartList(Weapon); end + +--- 武器明确指定使用这些配件 +---@param InWeapon ASTExtraShootWeapon +---@param Parts table +function ItemTool.SetWeaponParts(InWeapon, Parts) + if not ItemTool.IsShootWeapon(InWeapon) then return ; end + ItemTool.RemoveAllParts(InWeapon); + if table.isEmpty(Parts) then return ; end + for i, v in pairs(Parts) do + ItemTool.WeaponAddPart(InWeapon, v); + end + local Pawn = InWeapon:GetOwnerPawn(); + if Pawn and UE.IsValid(Pawn) then + ItemTool.SetWeaponInfinite(Pawn, InWeapon, EFillBulletType.Fill, true); + end +end + +---@param InWeapon ASTExtraShootWeapon +function ItemTool.GetAllPartTypes(InWeapon) + local WeaponID = InWeapon:GetWeaponItemID(); + local Parts = {}; + if table.isEmpty(WeaponSuits[WeaponID]) then return Parts; end + for PartType, v in pairs(WeaponSuits[WeaponID]) do + if PartType ~= 0 then + table.insert(Parts, PartType); + end + end + return Parts; +end + +---@param InWeapon ASTExtraShootWeapon +function ItemTool.RemoveAllParts(InWeapon) + -- 检查是否有配件 + local PartTypes = ItemTool.GetAllPartTypes(InWeapon); + if table.isEmpty(PartTypes) then return ; end + UGCLogSystem.LogTree(string.format("[ItemTool.RemoveAllParts] PartTypes ="), PartTypes) + local Pawn = InWeapon:GetOwnerPawn(); + local WeaponID = InWeapon:GetWeaponItemID(); + local BackComp = UGCBackPackSystem.GetBackpackComponent(Pawn); + for i, PartType in pairs(PartTypes) do + local SocketType = ItemTool.GetWeaponAttachmentSocketType(PartType); + UGCLogSystem.Log("[ItemTool.RemoveAllParts] SocketType = " .. SocketType); + local DefineID = UGCGunSystem.GetWeaponAttachmentIDBySocketType(InWeapon, SocketType); + -- 移除 + UGCLogSystem.Log("[ItemTool.RemoveAllParts] 开始移除"); + local bDrop = BackComp:DropItem(DefineID, 1, EBattleItemDropReason.Force); + if not bDrop then + UGCLogSystem.Log("[ItemTool.RemoveAllParts] 移除配件失败,WeaponID = %d, PartID = %d", WeaponID, DefineID.TypeSpecificID); + end + end +end + +---@return ASTExtraShootWeapon +function ItemTool.GetLocalPawnCurrWeapon() + local Pawn = UE.GetLocalPawn(); + if UE.IsValidPawn(Pawn) then + return UGCWeaponManagerSystem.GetCurrentWeapon(Pawn); + end + return nil; +end + +function ItemTool.GetLocalPawnCurrWeaponID() + return ItemTool.GetCurrWeaponID(UE.GetLocalPawn()); +end + +function ItemTool.GetCurrWeaponID(InPawn) + if UE.IsValidPawn(InPawn) then + local Weapon = UGCWeaponManagerSystem.GetCurrentWeapon(InPawn); + if Weapon and UE.IsValid(Weapon) then return Weapon:GetWeaponItemID() end + end + return -1; +end + +function ItemTool.RemoveItemByDefineID(Pawn, DefineID) + local BackComp = UGCBackPackSystem.GetBackpackComponent(Pawn); + if BackComp then + return BackComp:DropItem(DefineID, 1, EBattleItemDropReason.Force); + end + return false; +end + +---@param Pawn UGCPlayerPawn_C +---@param Weapon ASTExtraShootWeapon +function ItemTool.RemoveWeapon(Pawn, Weapon) + local DefineID = Weapon:GetItemDefineID(); + if ItemTool.IsShootWeapon(Weapon) then + local SocketList = UGCGunSystem.GetWeaponAllAttachmentIDList(Weapon); + for i, v in pairs(SocketList) do + ItemTool.RemoveItemByDefineID(Pawn, v); + end + -- 删除子弹 + ItemTool.RemoveAllBullets(Pawn); + end + ItemTool.RemoveItemByDefineID(Pawn, DefineID); +end + +---@param Pawn UGCPlayerPawn_C +---@param WeaponID int32 +function ItemTool.RemoveBullet(Pawn, WeaponID) + local AmmoID = WeaponAmmoIdMap[WeaponID] + if AmmoID == nil then return; end + local AllData = UGCBackPackSystem.GetAllItemData(Pawn); + for i, v in pairs(AllData) do + if v.ItemID == AmmoID then + UGCBackPackSystem.DropItemByInstanceID(Pawn, v.InstanceID, v.Count, true); + end + end +end + +---@param ItemID int32 +function ItemTool.IsBullet(ItemID) + return ItemID // 100000 == 3; +end + +---@param Pawn UGCPlayerPawn_C +function ItemTool.RemoveAllBullets(Pawn) + local AllData = UGCBackPackSystem.GetAllItemData(Pawn); + for i, v in pairs(AllData) do + if ItemTool.IsBullet(v.ItemID) then + UGCBackPackSystem.DropItemByInstanceID(Pawn, v.InstanceID, v.Count, true); + end + end +end + +---@param Pawn UGCPlayerPawn_C +---@param Slot ESurviveWeaponPropSlot +---@param WeaponID int32 +function ItemTool.AddWeaponInSlot(Pawn, Slot, WeaponID) + local Weapon = ItemTool.AddWeaponItem(Pawn, WeaponID, 1, true, EFillBulletType.ClipInfinite); + UGCWeaponManagerSystem.SwitchWeaponBySlot(Pawn, Slot, false); +end + +function ItemTool.GetPlayerEnterWeapons(PlayerKey, Index) + if Index == nil then Index = 1; end + local Pawn = UGCGameSystem.GetPlayerPawnByPlayerKey(PlayerKey); + local SlotWeapons = nil; + if not table.isEmpty(ArchiveTable[PlayerKey].EnterWeapons) then + SlotWeapons = ArchiveTable[PlayerKey].EnterWeapons[Index]; + end + SlotWeapons = SlotWeapons or WeaponSelectionCombinationConfig.WeaponCombinationList.Weapon[Index]; + local Weapons = {}; + for i, v in pairs(SlotWeapons) do + Weapons[WeaponSelectionCombinationConfig.ECombinationType[i]] = v; + end + return Weapons; +end + +function ItemTool.GetFirstWeaponID(PlayerKey) + local Pawn = UGCGameSystem.GetPlayerPawnByPlayerKey(PlayerKey) + if Pawn and UE.IsValid(Pawn) then + local Weapon = ItemTool.GetPlayerFirstWeapon(Pawn); + if Weapon and UE.IsValid(Weapon) then + return Weapon:GetWeaponItemID(); + end + end + return nil; +end + diff --git a/SoloKing/Script/Global/Tool/TableTool.lua b/SoloKing/Script/Global/Tool/TableTool.lua index 105fc68b..0062251e 100644 --- a/SoloKing/Script/Global/Tool/TableTool.lua +++ b/SoloKing/Script/Global/Tool/TableTool.lua @@ -7,7 +7,7 @@ function table.random(t, o) if table.isEmpty(t) then return nil; end local c = table.getCount(t) if c == 1 then - if o then return t[0], 0; end + if o then for i, v in pairs(t) do return v; end end return t[1], 1; else local r = math.random(o and 0 or 1, c) @@ -259,6 +259,7 @@ function table.GetMaxValue(t) return Res end +--- 执行函数,并进行错误处理,一些重要操作都需要使用该操作 ---@generic T, U ---@param t T ---@param f string |fun(t: T, ...:U):any? @@ -266,10 +267,17 @@ end function table.func(t, f, ...) if t ~= nil then if type(f) == 'function' then - return f(t, ...); + local vars = { pcall(f, t, ...) } + if vars[1] then + table.remove(vars, 1); + return table.unpackTable(vars); + else + -- 进行错误处理 + local err = vars[2]; + print("Warning: [LuaException] LuaPCallFailed: CallLuaUFunction Failed: " .. err .. '\nstack trackback:\n\n') + end elseif type(f) == 'string' then if t[f] ~= nil then - --print(string.format('[table.func] 执行')) return table.func(t, t[f], ...); end end diff --git a/SoloKing/Script/Global/Tool/UETool.lua b/SoloKing/Script/Global/Tool/UETool.lua index 51645c55..4f91944a 100644 --- a/SoloKing/Script/Global/Tool/UETool.lua +++ b/SoloKing/Script/Global/Tool/UETool.lua @@ -108,45 +108,52 @@ end ---@field PlayerEnableShovel bool 玩家是否可以滑铲 ---@field SeasonInfo table 补分用 ---@field NoSelectMaps table 未选中的地图 +---@field EnterWeaponIndex int32 娱乐模式武器选择索引 +---@field EnterWeapons table 娱乐模式武器 ---@return SoloKingArchiveData function UE.InitArchiveData() return { - TotalGameTimes = 0; -- 经典模式游玩次数,同步 - GameTimes = 0, -- 游玩次数(包含所有模式)不同步 - Weapons = {}, -- 武器配件 不同步 - Score = DefaultSettings.RankScore, -- 默认 2000分 同步 - WinTimes = 0, -- 一共获胜次数 不同步 - GameWinTimes = 0, -- 经典模式获胜次数 同步 + TotalGameTimes = 0; -- 经典模式游玩次数,同步 + GameTimes = 0, -- 游玩次数(包含所有模式)不同步 + Weapons = {}, -- 武器配件 不同步 + Score = DefaultSettings.RankScore, -- 默认 2000分 同步 + WinTimes = 0, -- 一共获胜次数 不同步 + GameWinTimes = 0, -- 经典模式获胜次数 同步 - Kill = 0, -- 总击杀数 同步 - Dead = 0, -- 总死亡数 同步 + Kill = 0, -- 总击杀数 同步 + Dead = 0, -- 总死亡数 同步 - HideScore = 0, -- 隐藏分 同步 + HideScore = 0, -- 隐藏分 同步 - Disables = {}; + Disables = {}; -- 最后十局战绩 - Last10Games = {}, -- 历史十局 同步 + Last10Games = {}, -- 历史十局 同步 - CurSeason = 0; -- 默认赛季 不同步 + CurSeason = 0; -- 默认赛季 不同步 --- 赛季信息 - Seasons = {}; -- 历史赛季 同步 - IsNewSeason = false; -- 是否是新的赛季,在游戏结束的时候 同步 - Friends = {}; -- 玩家对战过的玩家 同步 - SeasonInfo = {}, -- 赛季信息,现在使用第1槽 + Seasons = {}; -- 历史赛季 同步 + IsNewSeason = false; -- 是否是新的赛季,在游戏结束的时候 同步 + Friends = {}; -- 玩家对战过的玩家 同步 + SeasonInfo = {}, -- 赛季信息,现在使用第1槽 - sw_version = 1; -- 选择武器的版本 不同步 - SelectWeapons = {}; -- 玩家选择过的武器以及胜率 同步 - NoSelectMaps = {}; + sw_version = 1; -- 选择武器的版本 不同步 + SelectWeapons = {}; -- 玩家选择过的武器以及胜率 同步 + NoSelectMaps = {}; -- 没有选择的地图 + EnterWeaponIndex = nil; -- 娱乐模式的之前选择的 Index + EnterWeapons = {}; -- 娱乐模式保存的武器 }; end -UE.ValidRepNames = { - "TotalGameTimes", - "Score", -}; +--- 获取本地 Archive Data +function UE.GetLocalArchiveData(Name) + if ArchiveTable[LocalPlayerKey] and ArchiveTable[LocalPlayerKey][Name] then + return ArchiveTable[LocalPlayerKey][Name]; + end + return nil; +end function UE.MakeSelectWeapon(InList) if InList[7] then @@ -766,11 +773,6 @@ function UE.RespawnAllPlayer(InTime) end end --- 防止鞭尸 -function UE.ClearWeapons(InPawn) - ItemTool.ClearAllWeapon(InPawn); -end - function UE.HasPlayer(InPlayerKey) return UE.GetAccountInfo(InPlayerKey) ~= nil; end @@ -861,7 +863,11 @@ end function UE.OnCloseDS() --停止检测DS连接 if NetUtil then NetUtil.StopCheckDSActive(); end - --忽略DS链接报错 if BattleResult then BattleResult.IgnoreDSError = true; end -end \ No newline at end of file +end + +---@return UGCPlayerPawn_C +function UE.GetLocalPawn() + return UGCGameSystem.GetPlayerPawnByPlayerKey(LocalPlayerKey); +end diff --git a/SoloKing/Script/Global/WidgetManager/WidgetConfig.lua b/SoloKing/Script/Global/WidgetManager/WidgetConfig.lua index 1589eaca..26c16472 100644 --- a/SoloKing/Script/Global/WidgetManager/WidgetConfig.lua +++ b/SoloKing/Script/Global/WidgetManager/WidgetConfig.lua @@ -4,26 +4,26 @@ WidgetConfig = WidgetConfig or {} -- UI 类型 WidgetConfig.EUIType = { - Default = 0, - AllWeapon = 1, - Main = 2, - FaceNotice = 3, + Default = 0, + AllWeapon = 1, + Main = 2, + FaceNotice = 3, -- Tips1 = 4, - GameEnd = 5, - AllWeapon_Spectator = 9, + GameEnd = 5, + AllWeapon_Spectator = 9, - CustomSelectWeapon = 10, + CustomSelectWeapon = 10, --ShowCustomSelectWeaponBtn = 11, - GameRecord = 12, - ShowRankInheritance = 13, - RankingListBtn = 14, + GameRecord = 12, + ShowRankInheritance = 13, + RankingListBtn = 14, - ShowPK = 1001, - TipSlidingTackle = 1002, - SelectWeaponNew = 1003, - SecondaryConfirmation = 1004, - WeaponConfiguration = 1005, -} + ShowPK = 1001, + TipSlidingTackle = 1002, + SelectWeaponNew = 1003, + TwoConfirm = 1004, + WeaponConfiguration = 1005, +}; if not UE_SERVER then --- 直接加载 @@ -169,83 +169,82 @@ if not UE_SERVER then ---@return table key: int32 value: HUDConfigStruct WidgetConfig.HUDConfig = { - [WidgetConfig.EUIType.Main] = { + [WidgetConfig.EUIType.Main] = { Path = UGCGameSystem.GetUGCResourcesFullPath('Asset/UI/WB_Main.WB_Main_C'), -- 是否仅显示一次 bShowOnce = true, Layer = WidgetConfig.EUILayerGroup.Low, bAddToTouch = true; }, - [WidgetConfig.EUIType.GameEnd] = { + [WidgetConfig.EUIType.GameEnd] = { Path = UGCGameSystem.GetUGCResourcesFullPath('Asset/UI/GameEnd/WB_GameEnd.WB_GameEnd_C'), -- 是否仅显示一次 bShowOnce = false, Layer = WidgetConfig.EUILayerGroup.Up + 1, }, - [WidgetConfig.EUIType.AllWeapon] = { + [WidgetConfig.EUIType.AllWeapon] = { Path = UGCGameSystem.GetUGCResourcesFullPath('Asset/UI/SelectWeapons/WB_SelectAllWeapon.WB_SelectAllWeapon_C'), -- 是否仅显示一次 bShowOnce = true, Layer = WidgetConfig.EUILayerGroup.MainUI, }, - [WidgetConfig.EUIType.AllWeapon_Spectator] = { + [WidgetConfig.EUIType.AllWeapon_Spectator] = { Path = UGCGameSystem.GetUGCResourcesFullPath('Asset/UI/SelectWeapons/WB_SpectatorSelectWeapon.WB_SpectatorSelectWeapon_C'), -- 是否仅显示一次 bShowOnce = true, Layer = WidgetConfig.EUILayerGroup.OverSpector, }, - [WidgetConfig.EUIType.CustomSelectWeapon] = { + [WidgetConfig.EUIType.CustomSelectWeapon] = { Path = UGCGameSystem.GetUGCResourcesFullPath('Asset/UI/SelectWeapons/WB_CustomWeapon_New.WB_CustomWeapon_New_C'), -- 是否仅显示一次 bShowOnce = false, Layer = WidgetConfig.EUILayerGroup.Medium, }, - [WidgetConfig.EUIType.SelectWeaponNew] = { + [WidgetConfig.EUIType.SelectWeaponNew] = { Path = UGCGameSystem.GetUGCResourcesFullPath('Asset/UI/SelectWeapons/WB_WeaponSelect_New.WB_WeaponSelect_New_C'), -- 是否仅显示一次 bShowOnce = false, Layer = WidgetConfig.EUILayerGroup.MainUI, }, - [WidgetConfig.EUIType.SecondaryConfirmation] = { - Widget = UGCGameSystem.GetUGCResourcesFullPath('Asset/UI/SecondaryConfirmation/WB_SecondaryConfirmation.WB_SecondaryConfirmation_C'), - Layer = WidgetConfig.EUILayerGroup.Notice, + [WidgetConfig.EUIType.TwoConfirm] = { + Path = UGCGameSystem.GetUGCResourcesFullPath('Asset/UI/TwoConfirm/WB_SecondaryConfirmation.WB_SecondaryConfirmation_C'), + Layer = WidgetConfig.EUILayerGroup.Notice, ShowOnce = false, }, - - - [WidgetConfig.EUIType.GameRecord] = { + + [WidgetConfig.EUIType.GameRecord] = { Path = UGCGameSystem.GetUGCResourcesFullPath('Asset/UI/GameRecord/WB_GameRecord.WB_GameRecord_C'), -- 是否仅显示一次 bShowOnce = false, Layer = WidgetConfig.EUILayerGroup.HigherSpector, }, - [WidgetConfig.EUIType.ShowRankInheritance] = { + [WidgetConfig.EUIType.ShowRankInheritance] = { Path = UGCGameSystem.GetUGCResourcesFullPath('Asset/UI/CompetitionSeason/WB_ShowRankInheritance.WB_ShowRankInheritance_C'), -- 是否仅显示一次 bShowOnce = true, Layer = WidgetConfig.EUILayerGroup.MainUI + 1, }, - [WidgetConfig.EUIType.ShowPK] = { + [WidgetConfig.EUIType.ShowPK] = { Path = UGCGameSystem.GetUGCResourcesFullPath('Asset/UI/CompetitionSeason/WB_ShowVSPlayerInfo.WB_ShowVSPlayerInfo_C'), -- 是否仅显示一次 bShowOnce = true, Layer = WidgetConfig.EUILayerGroup.High, }, - [WidgetConfig.EUIType.TipSlidingTackle] = { + [WidgetConfig.EUIType.TipSlidingTackle] = { Path = UGCGameSystem.GetUGCResourcesFullPath('Asset/UI/Tip/WB_TipSlidingTackle.WB_TipSlidingTackle_C'), -- 是否仅显示一次 bShowOnce = true, Layer = WidgetConfig.EUILayerGroup.High, }, - [WidgetConfig.EUIType.RankingListBtn] = { + [WidgetConfig.EUIType.RankingListBtn] = { Path = UGCGameSystem.GetUGCResourcesFullPath('ExtendResource/RankingList/OfficialPackage/Asset/RankingList/Blueprint/WBP_RankingListBtn.WBP_RankingListBtn_C'), -- 是否仅显示一次 bShowOnce = false, Layer = WidgetConfig.EUILayerGroup.High, }, - [WidgetConfig.EUIType.WeaponConfiguration] = { + [WidgetConfig.EUIType.WeaponConfiguration] = { Path = UGCGameSystem.GetUGCResourcesFullPath('Asset/UI/SelectWeapons/WeaponConfiguration/WB_WeaponConfiguration.WB_WeaponConfiguration_C'), -- 是否仅显示一次 bShowOnce = false, diff --git a/SoloKing/Script/Global/WidgetManager/WidgetManager.lua b/SoloKing/Script/Global/WidgetManager/WidgetManager.lua index 3b7157e7..bc78d48a 100644 --- a/SoloKing/Script/Global/WidgetManager/WidgetManager.lua +++ b/SoloKing/Script/Global/WidgetManager/WidgetManager.lua @@ -66,9 +66,10 @@ function WidgetManager:LoadUI(UIType, Func, Params) UGCLogSystem.LogTree(string.format("[WidgetManager:LoadUI] Params ="), Params) if self.AllPanel[UIType] ~= nil and UE.IsValid(self.AllPanel[UIType]) then if Func then Func(self.AllPanel[UIType], table.unpackTable(Params)); end + UGCLogSystem.Log("[WidgetManager:LoadUI] 222") return self.AllPanel[UIType]; end - + UGCLogSystem.Log("[WidgetManager:LoadUI] 111") -- 检查是否正在创建过程中 if WidgetConfig.HUDConfig[UIType].HadLoad then -- 先存放一下 @@ -77,16 +78,20 @@ function WidgetManager:LoadUI(UIType, Func, Params) Func = Func, Params = Params, }); + UGCLogSystem.Log("[WidgetManager:LoadUI] 333") return ; end + UGCLogSystem.Log("[WidgetManager:LoadUI] 444") local UIPathName = Config.Path; if WidgetConfig.DirectLoad[UIType] then if LocalIsGlobalSpectator and WidgetConfig.SpectorConfig[UIType] then local Class = UE.LoadClass(Config.Path) + UGCLogSystem.Log("[WidgetManager:LoadUI] 555") return self:LoadPanelInternal(UIType, Class, Func, Params) else local Class = UE.LoadClass(Config.Path) + UGCLogSystem.Log("[WidgetManager:LoadUI] 666") return self:LoadPanelInternal(UIType, Class, Func, Params) end else @@ -95,6 +100,7 @@ function WidgetManager:LoadUI(UIType, Func, Params) end); WidgetConfig.HUDConfig[UIType].HadLoad = true; end + UGCLogSystem.Log("[WidgetManager:LoadUI] 777") return nil; end diff --git a/SoloKing/Script/UI/Child/WB_PlayerInfoItem_Small.lua b/SoloKing/Script/UI/Child/WB_PlayerInfoItem_Small.lua deleted file mode 100644 index 7db89ebe..00000000 --- a/SoloKing/Script/UI/Child/WB_PlayerInfoItem_Small.lua +++ /dev/null @@ -1,121 +0,0 @@ ----@class WB_PlayerInfoItem_Small_C:UUserWidget ----@field Button_AddFri UButton ----@field Image_HeadIcon UImage ----@field Image_No UImage ----@field Image_WeaponIcon UImage ----@field Overlay_Damage UOverlay ----@field Overlay_MVP UOverlay ----@field TextBlock_BodySize UTextBlock ----@field TextBlock_Damage UTextBlock ----@field TextBlock_KDA UTextBlock ----@field TextBlock_No UTextBlock ----@field TextBlock_PlayerName UTextBlock ----@field TextBlock_Weapon UTextBlock ----@field WidgetSwitcher_0 UWidgetSwitcher ----@field WidgetSwitcher_IsSelf UWidgetSwitcher ---Edit Below-- ----@type WB_PlayerInfoItem_Small_C -local WB_PlayerInfoItem_Small = { bInitDoOnce = false; }; - -WB_PlayerInfoItem_Small.PlayerKey = 0; - -function WB_PlayerInfoItem_Small:Construct() - self:LuaInit(); -end - -function WB_PlayerInfoItem_Small:LuaInit() - if self.bInitDoOnce then return ; end - self.Button_AddFri.OnClicked:Add(self.OnClickAddFriend, self) - UITool.EnableButtonScroll(self.Button_AddFri) - self.bInitDoOnce = true; -end - ---function WB_PlayerInfoItem_Small:SetAsTitle() --- self:SetIsMVP(false); --- self:IsSelf(false); --- ---end - -function WB_PlayerInfoItem_Small:SetIsMVP(IsMVP) - if IsMVP then - if not self.IsGaming then - self.Overlay_MVP:SetVisibility(ESlateVisibility.SelfHitTestInvisible); - end - end -end - -function WB_PlayerInfoItem_Small:IsSelf(IsSelf) - if IsSelf then - if not self.IsGaming then - self.Button_AddFri:SetVisibility(ESlateVisibility.Hidden); - end - - self.WidgetSwitcher_IsSelf:SetActiveWidgetIndex(1) - else - self.WidgetSwitcher_IsSelf:SetActiveWidgetIndex(0) - end -end - -function WB_PlayerInfoItem_Small:OnClickAddFriend() - ---@type PlayerAccountInfo - local AccountInfo = UE.GetAccountInfo(self.PlayerKey); - UGCLogSystem.LogTree(string.format("[WB_PlayerInfoItem_Small:OnClickAddFriend] AccountInfo ="), AccountInfo) - if AccountInfo then - UGCGameSystem.AddFriend(AccountInfo.UID); - end -end - -WB_PlayerInfoItem_Small.IsGaming = false; - -function WB_PlayerInfoItem_Small:SetInGaming() - self.Overlay_MVP:SetVisibility(ESlateVisibility.Collapsed); - self.Button_AddFri:SetVisibility(ESlateVisibility.Collapsed); - self.IsGaming = true; -end - -function WB_PlayerInfoItem_Small:SetRoundInfo(Index, RoundInfo) - UGCLogSystem.LogTree(string.format("[WB_PlayerInfoItem_Small:SetRoundInfo] RoundInfo ="), RoundInfo) - self.TextBlock_No:SetText(tostring(Index)); - - if RoundInfo.Time then - if RoundInfo.Time > 100 then - self.TextBlock_Damage:SetText(string.format('%0.0f', RoundInfo.Time)); - else - self.TextBlock_Damage:SetText(string.format('%0.1f', RoundInfo.Time)); - end - end - self:IsSelf(PlayerKey == LocalPlayerKey); - - if RoundInfo.Weapon then - local WeaponInfo = UGCItemSystem.GetItemData(RoundInfo.Weapon); - self.TextBlock_Weapon:SetText(WeaponInfo.ItemName); - UE.AsyncLoadObject_Cached(WeaponInfo.ItemWhiteIcon_n, function(TargetObject) - self.Image_WeaponIcon:SetBrushFromTexture(TargetObject); - end) - end - - local PlayerKey = RoundInfo.Winner; - if PlayerKey then - ---@type PlayerAccountInfo - local Info = UE.GetAccountInfo(PlayerKey); - if Info then - self.TextBlock_PlayerName:SetText(Info.PlayerName); - UITool.DownloadImage(Info.IconURL, function(Texture) - self.Image_HeadIcon:SetBrushFromTextureDynamic(Texture); - end); - end - else - self.Image_HeadIcon:SetVisibility(ESlateVisibility.Hidden); - self.TextBlock_PlayerName:SetText("--"); - end -end - --- function WB_PlayerInfoItem_Small_Small:Tick(MyGeometry, InDeltaTime) - --- end - --- function WB_PlayerInfoItem_Small_Small:Destruct() - --- end - -return WB_PlayerInfoItem_Small; \ No newline at end of file diff --git a/SoloKing/Script/UI/GameEnd/WB_GameEnd.lua b/SoloKing/Script/UI/GameEnd/WB_GameEnd.lua index 6edae417..3f737d71 100644 --- a/SoloKing/Script/UI/GameEnd/WB_GameEnd.lua +++ b/SoloKing/Script/UI/GameEnd/WB_GameEnd.lua @@ -109,7 +109,7 @@ function WB_GameEnd:LuaInit() --self.WB_RankingListBtn:SetVisibility(ESlateVisibility.Visible); end --self.WB_RankingListBtn:LuaInit(); - UITool.BindButtonClicked(self.Button_367, self.OnClickSelectMode, self) + --UITool.BindButtonClicked(self.Button_367, self.OnClickSelectMode, self) end function WB_GameEnd:OnClickSelectMode() diff --git a/SoloKing/Script/UI/GameRecord/WB_WeaponProficiencyPanel.lua b/SoloKing/Script/UI/GameRecord/WB_WeaponProficiencyPanel.lua index 136d31a5..079590c4 100644 --- a/SoloKing/Script/UI/GameRecord/WB_WeaponProficiencyPanel.lua +++ b/SoloKing/Script/UI/GameRecord/WB_WeaponProficiencyPanel.lua @@ -198,6 +198,8 @@ function WB_WeaponProficiencyPanel:UpdateRepSelectWeapons(InList) if table.isEmpty(InList) then return ; end local SelectWeapons = {}; + --UGCLogSystem.Log("[WB_WeaponProficiencyPanel:UpdateRepSelectWeapons] InList = " .. InList); + UGCLogSystem.LogTree(string.format("[WB_WeaponProficiencyPanel:UpdateRepSelectWeapons] InList ="), InList); for WeaponID, List in pairs(InList) do SelectWeapons[WeaponID] = UE.MakeSelectWeapon(List); end @@ -207,8 +209,8 @@ function WB_WeaponProficiencyPanel:UpdateRepSelectWeapons(InList) for WeaponID, v in pairs(WeaponTable) do if SelectWeapons[WeaponID] then local UseCount = SelectWeapons[WeaponID].UseCount or 0; - local HeavyHit = (SelectWeapons[WeaponID].HeavyHit or 0); - local ShootCount = (SelectWeapons[WeaponID].ShootCount or 0); + local HeavyHit = SelectWeapons[WeaponID].HeavyHit or 0; + local ShootCount = SelectWeapons[WeaponID].ShootCount or 0; AllWeaponInfo[WeaponID] = { [EWeaponProficiencyType.MatchNumber] = UseCount, [EWeaponProficiencyType.WinRate] = (SelectWeapons[WeaponID].WinCount or 0) / (UseCount == 0 and 1 or UseCount), @@ -216,6 +218,7 @@ function WB_WeaponProficiencyPanel:UpdateRepSelectWeapons(InList) [EWeaponProficiencyType.CriticalHitRate] = HeavyHit / (ShootCount == 0 and 1 or ShootCount), [EWeaponProficiencyType.AllDamage] = SelectWeapons[WeaponID].TotalDamage or 0, }; + -- 计算熟练度的方法 AllWeaponInfo[WeaponID][EWeaponProficiencyType.Proficiency] = WeaponProficiencyCalculation(AllWeaponInfo[WeaponID]); else diff --git a/SoloKing/Script/UI/SecondaryConfirmation/WB_SecondaryConfirmation.lua b/SoloKing/Script/UI/SecondaryConfirmation/WB_SecondaryConfirmation.lua deleted file mode 100644 index 47097289..00000000 --- a/SoloKing/Script/UI/SecondaryConfirmation/WB_SecondaryConfirmation.lua +++ /dev/null @@ -1,89 +0,0 @@ ----@class WB_SecondaryConfirmation_C:UUserWidget ----@field ShowAnim UWidgetAnimation ----@field Button_Cancellation UButton ----@field Button_Confirm UButton ----@field TextBlock_Cancellation UTextBlock ----@field TextBlock_Confirm UTextBlock ----@field TextBlock_ShowInfo UTextBlock ---Edit Below-- -local WB_SecondaryConfirmation = { - bInitDoOnce = false; - bIsShowing = false; -}; - - -function WB_SecondaryConfirmation:Construct() - WidgetLibrary.BindButtonClicked(self.Button_Cancellation, self.ClickCancellation, self) - WidgetLibrary.BindButtonClicked(self.Button_Confirm, self.ClickConfirm, self) -end - - -function WB_SecondaryConfirmation:OnShowPanel() - self.bIsShowing = true - self:PlayAnimation(self.ShowAnim, 0, 1, EUMGSequencePlayMode.Forward, 1); -end - -function WB_SecondaryConfirmation:SetTextInfo(TextInfo, CancellationText, ConfirmText) - self.TextBlock_ShowInfo:SetText(TextInfo) - if CancellationText then - self.TextBlock_Cancellation:SetText(CancellationText) - end - if ConfirmText then - self.TextBlock_Confirm:SetText(ConfirmText) - end -end - -function WB_SecondaryConfirmation:BindCancellationCallBack(InCancellationCallBackFunc, InCancellationCallBackObj) - self.CancellationCallBackFunc = InCancellationCallBackFunc - self.CancellationCallBackObj = InCancellationCallBackObj -end - -function WB_SecondaryConfirmation:BindConfirmCallBack(InConfirmCallBackFunc, InConfirmCallBackObj) - self.ConfirmCallBackFunc = InConfirmCallBackFunc - self.ConfirmCallBackObj = InConfirmCallBackObj -end - -function WB_SecondaryConfirmation:Reset() - self.bIsShowing = false - self:BindCancellationCallBack() - self:BindConfirmCallBack() - self.TextBlock_Cancellation:SetText("取消") - self.TextBlock_Confirm:SetText("确认") - WidgetManager:ClosePanel(WidgetConfig.EUIType.SecondaryConfirmation) -end - -function WB_SecondaryConfirmation:ClickCancellation() - if not self.bIsShowing then return end - SoundSystem.PlaySound(SoundSystem.ESound.Click) - if self.CancellationCallBackFunc then - if self.CancellationCallBackObj then - self.CancellationCallBackFunc(self.CancellationCallBackObj) - else - self.CancellationCallBackFunc() - end - end - self:Reset() -end - -function WB_SecondaryConfirmation:ClickConfirm() - if not self.bIsShowing then return end - SoundSystem.PlaySound(SoundSystem.ESound.Click) - if self.ConfirmCallBackFunc then - if self.ConfirmCallBackObj then - self.ConfirmCallBackFunc(self.ConfirmCallBackObj) - else - self.ConfirmCallBackFunc() - end - end - self:Reset() -end - --- function WB_SecondaryConfirmation:Tick(MyGeometry, InDeltaTime) - --- end - --- function WB_SecondaryConfirmation:Destruct() - --- end - -return WB_SecondaryConfirmation; \ No newline at end of file diff --git a/SoloKing/Script/UI/SelectWeapons/Item/WB_WeaponItem.lua b/SoloKing/Script/UI/SelectWeapons/Item/WB_WeaponItem.lua index 506180d5..7a9ffad6 100644 --- a/SoloKing/Script/UI/SelectWeapons/Item/WB_WeaponItem.lua +++ b/SoloKing/Script/UI/SelectWeapons/Item/WB_WeaponItem.lua @@ -21,49 +21,49 @@ end -- end function WB_WeaponItem:LuaInit() - if self.bInitDoOnce then return end - self.bInitDoOnce = true - -- 在这里修改 存档中的武器配件存档修改同步后触发 CustomWeaponParts = {[WeaponID] = {PartID, PartID, PartID, ...}, ...} - -- UGCEventSystem.AddListener(ArchiveDataConfig.GetParamNotifyEvent(ArchiveDataConfig.EArchiveType.CustomWeaponParts), self.SetWeaponID, self) + if self.bInitDoOnce then return end + self.bInitDoOnce = true + -- 在这里修改 存档中的武器配件存档修改同步后触发 CustomWeaponParts = {[WeaponID] = {PartID, PartID, PartID, ...}, ...} + -- UGCEventSystem.AddListener(ArchiveDataConfig.GetParamNotifyEvent(ArchiveDataConfig.EArchiveType.CustomWeaponParts), self.SetWeaponID, self) end - - function WB_WeaponItem:SetWeaponID(WeaponID) - self:LuaInit() - if WeaponID ~= nil and self.WeaponID ~= WeaponID then - self.WeaponID = WeaponID - end - local Parts = MyWeaponSystem.GetWeaponBastParts(self.WeaponID) - -- 在这里修改 获取存档中的武器配件存档 CustomWeaponParts = {[WeaponID] = {PartID, PartID, PartID, ...}, ...} - -- local CustomWeaponParts = ArchiveDataConfig.GetPlayerArchiveDataFromType(UGCSystemLibrary.GetLocalPlayerKey(), ArchiveDataConfig.EArchiveType.CustomWeaponParts) - local CustomWeaponParts = nil - - if CustomWeaponParts and CustomWeaponParts[self.WeaponID] then - Parts = CustomWeaponParts[self.WeaponID] - UGCLogSystem.LogTree("[WB_WeaponItem_SetWeaponID] Parts:", Parts) - end - if Parts then - for i = 1, self.HorizontalBox_Part:GetChildrenCount() do - local Item = self.HorizontalBox_Part:GetChildAt(i - 1) - if Parts[i] then - Item:SetVisibility(ESlateVisibility.SelfHitTestInvisible) - Item:SetItemID(Parts[i]) - else - Item:SetVisibility(ESlateVisibility.Collapsed) - end - end - end - MyWeaponSystem.AsyncLoadItemBigIconToBrush(self.WeaponID, self.Image_WeaponIcon) - self.TextBlock_WeaponName:SetText(MyWeaponSystem.GetItemName(self.WeaponID)) + self:LuaInit() + if WeaponID ~= nil and self.WeaponID ~= WeaponID then + self.WeaponID = WeaponID + end + local Parts = MyWeaponSystem.GetWeaponBastParts(self.WeaponID) + local PartList = UE.GetLocalArchiveData("Weapons") + local CustomWeaponParts = nil; + if PartList then + CustomWeaponParts = PartList[self.WeaponID]; + end + + if CustomWeaponParts and CustomWeaponParts[self.WeaponID] then + Parts = CustomWeaponParts[self.WeaponID] + UGCLogSystem.LogTree("[WB_WeaponItem_SetWeaponID] Parts:", Parts) + end + if Parts then + for i = 1, self.HorizontalBox_Part:GetChildrenCount() do + local Item = self.HorizontalBox_Part:GetChildAt(i - 1) + if Parts[i] then + Item:SetVisibility(ESlateVisibility.SelfHitTestInvisible) + Item:SetItemID(Parts[i]) + else + Item:SetVisibility(ESlateVisibility.Collapsed) + end + end + end + MyWeaponSystem.AsyncLoadItemBigIconToBrush(self.WeaponID, self.Image_WeaponIcon) + self.TextBlock_WeaponName:SetText(MyWeaponSystem.GetItemName(self.WeaponID)) end function WB_WeaponItem:SetVisWeaponInfo(IsVis) - if IsVis then - self.CanvasPanel_WeaponInfo:SetVisibility(ESlateVisibility.HitTestInvisible) - else - self.CanvasPanel_WeaponInfo:SetVisibility(ESlateVisibility.Hidden) - end + if IsVis then + self.CanvasPanel_WeaponInfo:SetVisibility(ESlateVisibility.HitTestInvisible) + else + self.CanvasPanel_WeaponInfo:SetVisibility(ESlateVisibility.Hidden) + end end return WB_WeaponItem; \ No newline at end of file diff --git a/SoloKing/Script/UI/SelectWeapons/Item/WB_WeaponSelectItem.lua b/SoloKing/Script/UI/SelectWeapons/Item/WB_WeaponSelectItem.lua index 286010e2..93629861 100644 --- a/SoloKing/Script/UI/SelectWeapons/Item/WB_WeaponSelectItem.lua +++ b/SoloKing/Script/UI/SelectWeapons/Item/WB_WeaponSelectItem.lua @@ -6,10 +6,10 @@ ---@field WeaponInfo2 UWB_WeaponItem_C --Edit Below-- local WB_WeaponSelectItem = { - bInitDoOnce = false; - bIsSelect = false; - ItemID = 0; - Weapons = nil; + bInitDoOnce = false; + bIsSelect = false; + ItemID = 0; + Weapons = nil; }; @@ -27,93 +27,93 @@ end -- end function WB_WeaponSelectItem:LuaInit() - if self.bInitDoOnce then - return; - end - self.bInitDoOnce = true; - WidgetLibrary.BindButtonClicked(self.Button_Select, self.SelectWeaponCombination, self) - -- 在这里修改 这里加双武器武器配置存档修改的监听 - -- UGCEventSystem.AddListener(ArchiveDataConfig.GetParamNotifyEvent(ArchiveDataConfig.EArchiveType.WeaponCombs), self.UpdateWeaponComb, self) - - self.Button_Select:SetTouchMethod(EButtonTouchMethod.PreciseTap) + if self.bInitDoOnce then return; end + self.bInitDoOnce = true; + WidgetLibrary.BindButtonClicked(self.Button_Select, self.SelectWeaponCombination, self) + -- 在这里修改 这里加双武器武器配置存档修改的监听 + -- UGCEventSystem.AddListener(ArchiveDataConfig.GetParamNotifyEvent(ArchiveDataConfig.EArchiveType.WeaponCombs), self.UpdateWeaponComb, self) + + self.Button_Select:SetTouchMethod(EButtonTouchMethod.PreciseTap) end function WB_WeaponSelectItem:Init(InCombinationIndex) - self:LuaInit() - - self.CombinationIndex = InCombinationIndex - self.TextBlock_TextName:SetText("配置" .. self.CombinationIndex) - - -- 在这里修改 这里获取存档中双武器配置 结构为 {[组合索引] = {WeaponID1, WeaponID2 }, ... } 预制5个组合 - -- local SavedWeaponComb = ArchiveDataConfig.GetPlayerArchiveDataFromType(UGCSystemLibrary.GetLocalPlayerKey(), ArchiveDataConfig.EArchiveType.WeaponCombs) - local SavedWeaponComb = nil - - local CombinationList = WeaponSelectionCombinationConfig.WeaponCombinationList.Weapon - - if SavedWeaponComb and SavedWeaponComb[self.CombinationIndex] then - self:UpdateWeapons(SavedWeaponComb[self.CombinationIndex]) - elseif CombinationList and CombinationList[self.CombinationIndex] then - self:UpdateWeapons(CombinationList[self.CombinationIndex]) - end - + self:LuaInit() + + self.CombinationIndex = InCombinationIndex + UGCLogSystem.Log("[WB_WeaponSelectItem:Init] InCombinationIndex = " .. InCombinationIndex); + self.TextBlock_TextName:SetText("配置" .. self.CombinationIndex) + + local SavedWeaponComb = nil + if ArchiveTable[LocalPlayerKey] and not table.isEmpty(ArchiveTable[LocalPlayerKey].EnterWeapons) then + SavedWeaponComb = ArchiveTable[LocalPlayerKey].EnterWeapons; + end + + local CombinationList = WeaponSelectionCombinationConfig.WeaponCombinationList.Weapon; + + if SavedWeaponComb and SavedWeaponComb[self.CombinationIndex] then + self:UpdateWeapons(SavedWeaponComb[self.CombinationIndex]) + elseif CombinationList and CombinationList[self.CombinationIndex] then + self:UpdateWeapons(CombinationList[self.CombinationIndex]); + end end function WB_WeaponSelectItem:UpdateWeaponComb() - -- 在这里修改 这里获取存档中双武器配置 结构为 {[组合索引] = {WeaponID1, WeaponID2 }, ... } 预制5个组合 - -- local WeaponComb = ArchiveDataConfig.GetPlayerArchiveDataFromType(UGCSystemLibrary.GetLocalPlayerKey(), ArchiveDataConfig.EArchiveType.WeaponCombs) - local WeaponComb = nil - - - - if WeaponComb and WeaponComb[self.CombinationIndex] then - local TargetWeaponComb = WeaponComb[self.CombinationIndex] - if self.Weapons == nil or TargetWeaponComb[1] ~= self.Weapons[1] or TargetWeaponComb[2] ~= self.Weapons[2] then - self:UpdateWeapons(TargetWeaponComb) - end - end + local EnterWeapons = UE.GetLocalArchiveData("EnterWeapons"); + local Weapons = TableHelper.DeepCopyTable(WeaponSelectionCombinationConfig.WeaponCombinationList.Weapon); + if EnterWeapons then + for i, v in pairs(Weapons) do + if EnterWeapons[i] then Weapons[i] = EnterWeapons[i]; end + end + end + if Weapons and Weapons[self.CombinationIndex] then + local TargetWeaponComb = Weapons[self.CombinationIndex] + if self.Weapons == nil or TargetWeaponComb[1] ~= self.Weapons[1] or TargetWeaponComb[2] ~= self.Weapons[2] then + self:UpdateWeapons(TargetWeaponComb) + end + end end function WB_WeaponSelectItem:UpdateWeapons(InWeapons) - self.Weapons = table.DeepCopy(InWeapons) - if self.Weapons then - self.WeaponInfo1:SetWeaponID(self.Weapons[1]) - if self.Weapons[2] then - self.WeaponInfo2:SetWeaponID(self.Weapons[2]) - self.WeaponInfo2:SetVisWeaponInfo(true) - else - self.WeaponInfo2:SetVisWeaponInfo(false) - end - self:SetVisibility(ESlateVisibility.SelfHitTestInvisible) - else - self:SetVisibility(ESlateVisibility.Collapsed) - end + self.Weapons = table.DeepCopy(InWeapons) + if self.Weapons then + self.WeaponInfo1:SetWeaponID(self.Weapons[1]) + if self.Weapons[2] then + self.WeaponInfo2:SetWeaponID(self.Weapons[2]) + self.WeaponInfo2:SetVisWeaponInfo(true) + else + self.WeaponInfo2:SetVisWeaponInfo(false) + end + self:SetVisibility(ESlateVisibility.SelfHitTestInvisible) + else + self:SetVisibility(ESlateVisibility.Collapsed) + end end function WB_WeaponSelectItem:GetCombinationIndex() - return self.CombinationIndex + return self.CombinationIndex end function WB_WeaponSelectItem:SelectWeaponCombination() - if self.SelectCallBackFunc then - if self.SelectCallBackObj then - self.SelectCallBackFunc(self.SelectCallBackObj, self:GetCombinationIndex()) - else - self.SelectCallBackFunc(self:GetCombinationIndex()) - end - end + if self.SelectCallBackFunc then + if self.SelectCallBackObj then + self.SelectCallBackFunc(self.SelectCallBackObj, self:GetCombinationIndex()) + else + self.SelectCallBackFunc(self:GetCombinationIndex()) + end + end end function WB_WeaponSelectItem:BindSelectCallBack(InFunc, InObj) - self.SelectCallBackFunc = InFunc - self.SelectCallBackObj = InObj + self.SelectCallBackFunc = InFunc + self.SelectCallBackObj = InObj end function WB_WeaponSelectItem:SetSelect(IsSelect) - if IsSelect then - self.Image_IsSelect:SetVisibility(ESlateVisibility.SelfHitTestInvisible) - else - self.Image_IsSelect:SetVisibility(ESlateVisibility.Collapsed) - end + if IsSelect then + self.Image_IsSelect:SetVisibility(ESlateVisibility.SelfHitTestInvisible) + else + self.Image_IsSelect:SetVisibility(ESlateVisibility.Collapsed) + end end return WB_WeaponSelectItem; \ No newline at end of file diff --git a/SoloKing/Script/UI/SelectWeapons/WB_CustomWeapon_New.lua b/SoloKing/Script/UI/SelectWeapons/WB_CustomWeapon_New.lua index 31fc6870..3d051411 100644 --- a/SoloKing/Script/UI/SelectWeapons/WB_CustomWeapon_New.lua +++ b/SoloKing/Script/UI/SelectWeapons/WB_CustomWeapon_New.lua @@ -26,9 +26,7 @@ function WB_CustomWeapon_New:Construct() end function WB_CustomWeapon_New:LuaInit() - if self.bInitDoOnce then - return ; - end + if self.bInitDoOnce then return ; end self.bInitDoOnce = true; UGCLogSystem.Log("[WB_CustomWeapon_LuaInit]") @@ -36,7 +34,7 @@ function WB_CustomWeapon_New:LuaInit() -- 按键初始化 --WidgetLibrary.BindButtonClicked(self.NewButton_Reset, self.ResetWeaponComb, self) WidgetLibrary.BindButtonClicked(self.NewButton_Save, self.SaveWeaponComb, self) - WidgetLibrary.BindButtonClicked(self.NewButton_Close, self.ClickClose, self) + --WidgetLibrary.BindButtonClicked(self.NewButton_Close, self.ClickClose, self) WidgetLibrary.BindButtonClicked(self.NewButton_SelectParts, self.OnClickSetParts, self) -- 初始化Item @@ -52,9 +50,6 @@ function WB_CustomWeapon_New:OnShowPanel(ProgrammeIndex) end function WB_CustomWeapon_New:InitItem() - local LocalPC = UGCSystemLibrary.GetLocalPlayerController() - - -- 武器类型中最大可选择的的武器数量 local MaxSelectItemCount = 0 @@ -75,7 +70,7 @@ function WB_CustomWeapon_New:InitItem() -- 初始化武器类型 local WeaponTypeItem = nil if self.HorizontalBox_WeaponType:GetChildrenCount() < i then - WeaponTypeItem = UserWidget.NewWidgetObjectBP(LocalPC, self:GetWeaponTypeItemClass()); + WeaponTypeItem = UserWidget.NewWidgetObjectBP(LocalPlayerController, self:GetWeaponTypeItemClass()); self.HorizontalBox_WeaponType:AddChild(WeaponTypeItem) -- 设置对齐方式 local TargetHorizontalBoxSlot = WidgetLayoutLibrary.SlotAsHorizontalBoxSlot(WeaponTypeItem) @@ -88,7 +83,6 @@ function WB_CustomWeapon_New:InitItem() end -- 初始化武器槽UI - self.WeaponSocketItems = { self.SaveWeaponItem1, self.SaveWeaponItem2, @@ -106,7 +100,7 @@ function WB_CustomWeapon_New:InitItem() for i = 1, MaxSelectItemCount do local Item = nil; if self.UniformGridPanel_SelectWeapon:GetChildrenCount() < i then - Item = UserWidget.NewWidgetObjectBP(LocalPC, self:GetSelectSaveWeaponItemClass()); + Item = UserWidget.NewWidgetObjectBP(LocalPlayerController, self:GetSelectSaveWeaponItemClass()); self.UniformGridPanel_SelectWeapon:AddChild(Item) local TargetUniformGridSlot = WidgetLayoutLibrary.SlotAsUniformGridSlot(Item) -- 居中 @@ -142,8 +136,6 @@ end --- 设置配置ID function WB_CustomWeapon_New:SetProgrammeIndex(InProgrammeIndex) self.ProgrammeIndex = InProgrammeIndex - -- 在这里修改 这里获取存档中双武器配置 结构为 CombinationType为 {[CombinationType] = {[组合索引] = {WeaponID1, WeaponID2 },}, } - -- local SavedWeaponComb = ArchiveDataConfig.GetPlayerArchiveDataFromType(UGCSystemLibrary.GetLocalPlayerKey(), ArchiveDataConfig.EArchiveType.WeaponCombs) local SavedWeaponComb = nil if SavedWeaponComb and SavedWeaponComb[self.ProgrammeIndex] then @@ -155,7 +147,7 @@ function WB_CustomWeapon_New:SetProgrammeIndex(InProgrammeIndex) end end for i = #self.WeaponComb, 1, -1 do - self:SetSelectWeapon(i, self.WeaponComb[i], (i == 1)) + self:SetSelectWeapon(i, self.WeaponComb[i], (i == 1)); end end @@ -264,8 +256,6 @@ function WB_CustomWeapon_New:SetSelectWeapon(SocketID, WeaponID, bUpdateSelectWe break end end - - elseif self.SelectWeaponSocketID == 3 then -- 设置插槽页签 self.WidgetSwitcher_WeaponSocket_Type:SetActiveWidgetIndex(1) @@ -320,19 +310,29 @@ function WB_CustomWeapon_New:SaveWeaponComb() PartsComb[v:GetWeaponID()] = v:GetAllParts() end UGCLogSystem.LogTree("[WB_CustomWeapon_SaveWeaponComb]WeaponComb:", WeaponComb) - GameState:SendMiniGameRPC("PlayerSelectWeapons", LocalPlayerKey, WeaponComb); + GameState:SendMiniGameRPC("PlayerSelectWeapons", LocalPlayerKey, self.ProgrammeIndex, WeaponComb); -- 关闭UI self:CloseSelf() + -- 通知父类 + ArchiveTable[LocalPlayerKey].EnterWeapons[self.ProgrammeIndex] = TableHelper.DeepCopyTable(WeaponComb); + UGCEventSystem.SendEvent(EventTypes.UpdateEnterWeapons); end function WB_CustomWeapon_New:ClickClose() + UGCLogSystem.Log("[WB_CustomWeapon_New:ClickClose] 执行") if self.IsChange then - local SecondaryConfirmationWidget = WidgetManager:GetPanel(WidgetConfig.EUIType.SecondaryConfirmation) - SecondaryConfirmationWidget:SetTextInfo("该配置还未保存,是否保存后关闭页面?", "关闭", "保存") - SecondaryConfirmationWidget:BindCancellationCallBack(self.CloseSelf, self) - SecondaryConfirmationWidget:BindConfirmCallBack(self.SaveWeaponComb, self) - WidgetManager:ShowPanel(WidgetConfig.EUIType.SecondaryConfirmation, false) + UGCLogSystem.Log("[WB_CustomWeapon_New:ClickClose] 关闭界面进行二次确认") + WidgetManager:ShowPanel(WidgetConfig.EUIType.TwoConfirm, false) + WidgetManager:GetPanel(WidgetConfig.EUIType.TwoConfirm, function(Widget1) + Widget1:SetTextInfo("该配置还未保存,是否保存后关闭页面?", "关闭", "保存"); + UGCLogSystem.Log("[WB_CustomWeapon_New:ClickClose] 111") + Widget1:BindCancellationCallBack(self.CloseSelf, self); + UGCLogSystem.Log("[WB_CustomWeapon_New:ClickClose] 222") + Widget1:BindConfirmCallBack(self.SaveWeaponComb, self); + UGCLogSystem.Log("[WB_CustomWeapon_New:ClickClose] 333") + end); else + UGCLogSystem.Log("[WB_CustomWeapon_New:ClickClose] 关闭自身") self:CloseSelf() end end @@ -348,6 +348,10 @@ function WB_CustomWeapon_New:OnClickSetParts() if WeaponSocketItem then local WeaponID = WeaponSocketItem:GetWeaponID() if WeaponID then + UGCLogSystem.Log("[WB_CustomWeapon_New:OnClickSetParts] WeaponID = ", tostring(WeaponID)); + WidgetManager:GetPanel(WidgetConfig.EUIType.WeaponConfiguration, function(Widget) + Widget:SetWeaponID(WeaponID); + end) WidgetManager:ShowPanel(WidgetConfig.EUIType.WeaponConfiguration, true, WeaponID); end end diff --git a/SoloKing/Script/UI/SelectWeapons/WB_ReselectWeaponBtn.lua b/SoloKing/Script/UI/SelectWeapons/WB_ReselectWeaponBtn.lua index 49b12beb..65580e1b 100644 --- a/SoloKing/Script/UI/SelectWeapons/WB_ReselectWeaponBtn.lua +++ b/SoloKing/Script/UI/SelectWeapons/WB_ReselectWeaponBtn.lua @@ -73,7 +73,7 @@ function WB_ReselectWeaponBtn:ClickBtn() if GlobalModeType == GameModeConfig.EGameModeType.DefaultMode then WidgetManager:ShowPanel(WidgetConfig.EUIType.WeaponConfiguration) else - WidgetManager:ShowPanel(WidgetConfig.EUIType.SelectWeaponNew) + WidgetManager:ShowPanel(WidgetConfig.EUIType.SelectWeaponNew, false); end end diff --git a/SoloKing/Script/UI/SelectWeapons/WB_WeaponSelect_New.lua b/SoloKing/Script/UI/SelectWeapons/WB_WeaponSelect_New.lua index c5d0bed9..5a5537d9 100644 --- a/SoloKing/Script/UI/SelectWeapons/WB_WeaponSelect_New.lua +++ b/SoloKing/Script/UI/SelectWeapons/WB_WeaponSelect_New.lua @@ -6,127 +6,136 @@ ---@field UniformGridPanel_OtherParts UUniformGridPanel --Edit Below-- local WB_WeaponSelect_New = { - bInitDoOnce = false; - CombinationType = 1; - ShowTime = 0; - SelectWeaponIndex = 1; - OtherPartsItemColNum = 6; - - SelectTime = 15; + bInitDoOnce = false; + CombinationType = 1; + ShowTime = 0; + SelectWeaponIndex = 1; + OtherPartsItemColNum = 6; + + SelectTime = 15; }; function WB_WeaponSelect_New:Construct() - WidgetLibrary.BindButtonClicked(self.Button_Select, self.SelectWeapon, self) - self:UpdateWeaponCombination() - -- 判断是否可以修改配置 - WidgetLibrary.BindButtonClicked(self.Button_Custom, self.CustomWeaponComb, self) + WidgetLibrary.BindButtonClicked(self.Button_Select, self.SelectWeapon, self) + UGCEventSystem.AddListener(EventTypes.UpdateArchiveData, self.LoadArchiveTable, self); + UGCEventSystem.AddListener(EventTypes.UpdateEnterWeapons, self.LoadArchiveTable, self); + self:LoadArchiveTable(); + -- 判断是否可以修改配置 + WidgetLibrary.BindButtonClicked(self.Button_Custom, self.CustomWeaponComb, self) +end +function WB_WeaponSelect_New:LoadArchiveTable() + local EnterWeapons = UE.GetLocalArchiveData("EnterWeapons"); + if EnterWeapons then + for Index, Config in pairs(EnterWeapons) do + WeaponSelectionCombinationConfig.WeaponCombinationList.Weapon[Index] = Config; + end + end + self:UpdateWeaponCombination(); end function WB_WeaponSelect_New:OnShowPanel() - if self.SelectTimeHandle then - UGCEventSystem.StopTimer(self.SelectTimeHandle) - end - self.ShowTime = self.SelectTime - self.TextBlock_Time:SetText(self.ShowTime) - self.SelectTimeHandle = UGCEventSystem.SetTimerLoop(self, self.SelectTimeClock, 1) + if self.SelectTimeHandle then + UGCEventSystem.StopTimer(self.SelectTimeHandle) + end + self.ShowTime = self.SelectTime + self.TextBlock_Time:SetText(self.ShowTime) + self.SelectTimeHandle = UGCEventSystem.SetTimerLoop(self, self.SelectTimeClock, 1) end function WB_WeaponSelect_New:SelectTimeClock() - self.ShowTime = self.ShowTime - 1 - if self.ShowTime <= 0 then - UGCEventSystem.StopTimer(self.SelectTimeHandle) - self.SelectTimeHandle = nil - WidgetManager:ClosePanel(WidgetConfig.EUIType.SelectWeaponNew) - else - self.TextBlock_Time:SetText(self.ShowTime) - end + self.ShowTime = self.ShowTime - 1 + if self.ShowTime <= 0 then + UGCEventSystem.StopTimer(self.SelectTimeHandle) + self.SelectTimeHandle = nil + WidgetManager:ClosePanel(WidgetConfig.EUIType.SelectWeaponNew) + else + self.TextBlock_Time:SetText(self.ShowTime) + end end function WB_WeaponSelect_New:GetWeaponItemClass() - if self.ItemClass == nil then - self.ItemClass = UE.LoadClass(UGCGameSystem.GetUGCResourcesFullPath('Asset/UI/SelectWeapons/Item/WB_WeaponSelectItem.WB_WeaponSelectItem_C')) - end - return self.ItemClass + if self.ItemClass == nil then + self.ItemClass = UE.LoadClass(UGCGameSystem.GetUGCResourcesFullPath('Asset/UI/SelectWeapons/Item/WB_WeaponSelectItem.WB_WeaponSelectItem_C')) + end + return self.ItemClass end function WB_WeaponSelect_New:GetOtherPartItemClass() - if self.OtherItemClass == nil then - self.OtherItemClass = UE.LoadClass(UGCGameSystem.GetUGCResourcesFullPath('Asset/UI/SelectWeapons/Item/WB_OtherPartItem.WB_OtherPartItem_C')) - end - return self.OtherItemClass + if self.OtherItemClass == nil then + self.OtherItemClass = UE.LoadClass(UGCGameSystem.GetUGCResourcesFullPath('Asset/UI/SelectWeapons/Item/WB_OtherPartItem.WB_OtherPartItem_C')) + end + return self.OtherItemClass end - - - function WB_WeaponSelect_New:UpdateWeaponCombination() - local WeaponCombinationInfo = WeaponSelectionCombinationConfig.WeaponCombinationList - for i = 1, self.ScrollBox_Weapons:GetChildrenCount() do - local Item = self.ScrollBox_Weapons:GetChildAt(i - 1) - Item:Init(i) - end - for i = self.ScrollBox_Weapons:GetChildrenCount() + 1, #WeaponCombinationInfo.Weapon do - local Item = UserWidget.NewWidgetObjectBP(UGCSystemLibrary.GetLocalPlayerController(), self:GetWeaponItemClass()); - if Item then - self.ScrollBox_Weapons:AddChild(Item) - Item:Init(i) - Item:BindSelectCallBack(self.SelectWeaponItem, self) - end - end - - for i = #WeaponCombinationInfo.Weapon, self.ScrollBox_Weapons:GetChildrenCount() - 1 do - local Item = self.ScrollBox_Weapons:GetChildAt(i) - Item:SetVisibility(ESlateVisibility.Collapsed) - end - - for i, ItemInfo in pairs(WeaponCombinationInfo.OtherParts) do - local Item - if self.UniformGridPanel_OtherParts:GetChildrenCount() < i then - Item = UserWidget.NewWidgetObjectBP(UGCSystemLibrary.GetLocalPlayerController(), self:GetOtherPartItemClass()); - self.UniformGridPanel_OtherParts:AddChild(Item) - local TargetUniformGridSlot = WidgetLayoutLibrary.SlotAsUniformGridSlot(Item) - -- 居中 - TargetUniformGridSlot:SetVerticalAlignment(EVerticalAlignment.VAlign_Center) - TargetUniformGridSlot:SetHorizontalAlignment(EHorizontalAlignment.HAlign_Center) - -- 设置索引 - TargetUniformGridSlot:SetColumn((i - 1) % self.OtherPartsItemColNum) - TargetUniformGridSlot:SetRow((i - 1) // self.OtherPartsItemColNum) - else - Item = self.UniformGridPanel_OtherParts:GetChildAt(i - 1) - Item:SetVisibility(ESlateVisibility.HitTestInvisible) - end - Item:SetItemID(ItemInfo.ItemID, ItemInfo.Count) - end - - for i = #WeaponCombinationInfo.OtherParts, self.UniformGridPanel_OtherParts:GetChildrenCount() - 1 do - local Item = self.UniformGridPanel_OtherParts:GetChildAt(i) - Item:SetVisibility(ESlateVisibility.Collapsed) - end - - - self:SelectWeaponItem(1) - + local WeaponCombinationInfo = WeaponSelectionCombinationConfig.WeaponCombinationList + for i = 1, self.ScrollBox_Weapons:GetChildrenCount() do + local Item = self.ScrollBox_Weapons:GetChildAt(i - 1) + Item:Init(i) + Item:BindSelectCallBack(self.SelectWeaponItem, self); + end + -- 针对多余添加 + for i = self.ScrollBox_Weapons:GetChildrenCount() + 1, #WeaponCombinationInfo.Weapon do + local Item = UserWidget.NewWidgetObjectBP(LocalPlayerController, self:GetWeaponItemClass()); + if Item then + self.ScrollBox_Weapons:AddChild(Item) + Item:Init(i) + Item:BindSelectCallBack(self.SelectWeaponItem, self) + end + end + + --for i = #WeaponCombinationInfo.Weapon, self.ScrollBox_Weapons:GetChildrenCount() - 1 do + -- local Item = self.ScrollBox_Weapons:GetChildAt(i) + -- Item:SetVisibility(ESlateVisibility.Collapsed) + --end + + for i, ItemInfo in pairs(WeaponCombinationInfo.OtherParts) do + local Item + if self.UniformGridPanel_OtherParts:GetChildrenCount() < i then + Item = UserWidget.NewWidgetObjectBP(LocalPlayerController, self:GetOtherPartItemClass()); + self.UniformGridPanel_OtherParts:AddChild(Item) + local TargetUniformGridSlot = WidgetLayoutLibrary.SlotAsUniformGridSlot(Item) + -- 居中 + TargetUniformGridSlot:SetVerticalAlignment(EVerticalAlignment.VAlign_Center) + TargetUniformGridSlot:SetHorizontalAlignment(EHorizontalAlignment.HAlign_Center) + -- 设置索引 + TargetUniformGridSlot:SetColumn((i - 1) % self.OtherPartsItemColNum) + TargetUniformGridSlot:SetRow((i - 1) // self.OtherPartsItemColNum) + else + Item = self.UniformGridPanel_OtherParts:GetChildAt(i - 1) + Item:SetVisibility(ESlateVisibility.HitTestInvisible) + end + if Item then + Item:SetItemID(ItemInfo.ItemID, ItemInfo.Count); + end + end + + for i = #WeaponCombinationInfo.OtherParts, self.UniformGridPanel_OtherParts:GetChildrenCount() - 1 do + local Item = self.UniformGridPanel_OtherParts:GetChildAt(i) + Item:SetVisibility(ESlateVisibility.Collapsed) + end + + -- 获取 EnterWeaponIndex + self:SelectWeaponItem(UE.GetLocalArchiveData("EnterWeaponIndex") or 1); end function WB_WeaponSelect_New:SelectWeaponItem(InIndex) - self.SelectWeaponIndex = InIndex - for i = 1, self.ScrollBox_Weapons:GetChildrenCount() do - local Item = self.ScrollBox_Weapons:GetChildAt(i - 1) - Item:SetSelect(Item:GetCombinationIndex() == InIndex) - end + self.SelectWeaponIndex = InIndex; + for i = 1, self.ScrollBox_Weapons:GetChildrenCount() do + local Item = self.ScrollBox_Weapons:GetChildAt(i - 1) + Item:SetSelect(Item:GetCombinationIndex() == InIndex) + end end function WB_WeaponSelect_New:SelectWeapon() - -- 在这里修改 发送RPC选择武器配置的索引 - -- UGCSendRPCSystem.ActorRPCNotify(nil, UGCGameSystem.GameState, "PlayerSelectWeaponIndex", UGCSystemLibrary.GetLocalPlayerKey(), self.SelectWeaponIndex) - - WidgetManager:ClosePanel(WidgetConfig.EUIType.SelectWeaponNew) + GameState:SendMiniGameRPC("SelectWeaponIndex", LocalPlayerKey, self.SelectWeaponIndex); + WidgetManager:ClosePanel(WidgetConfig.EUIType.SelectWeaponNew) end function WB_WeaponSelect_New:CustomWeaponComb() - WidgetManager:ShowPanel(WidgetConfig.EUIType.CustomSelectWeapon, false, self.SelectWeaponIndex) - WidgetManager:ClosePanel(WidgetConfig.EUIType.SelectWeaponNew) + WidgetManager:ShowPanel(WidgetConfig.EUIType.CustomSelectWeapon, false, self.SelectWeaponIndex) + WidgetManager:ClosePanel(WidgetConfig.EUIType.SelectWeaponNew) end -- function WB_WeaponSelect_New:Tick(MyGeometry, InDeltaTime) diff --git a/SoloKing/Script/UI/SelectWeapons/WeaponConfiguration/WB_WeaponConfiguration.lua b/SoloKing/Script/UI/SelectWeapons/WeaponConfiguration/WB_WeaponConfiguration.lua index 0aba07eb..82f3aa7d 100644 --- a/SoloKing/Script/UI/SelectWeapons/WeaponConfiguration/WB_WeaponConfiguration.lua +++ b/SoloKing/Script/UI/SelectWeapons/WeaponConfiguration/WB_WeaponConfiguration.lua @@ -11,6 +11,7 @@ ---@field PartItem_SubTelescope UWB_WeaponConfigPartItem_C ---@field PartItem_Telescope UWB_WeaponConfigPartItem_C ---@field ScrollBox_SelectParts UScrollBox +---@field TextBlock_Parts UTextBlock ---@field TextBlock_WeaponName UTextBlock --Edit Below-- local WB_WeaponConfiguration = { @@ -31,13 +32,7 @@ end -- end function WB_WeaponConfiguration:OnShowPanel(WeaponID) - UGCLogSystem.Log("[WB_WeaponConfiguration_OnShowPanel]") - if WeaponID then - self:SetWeaponID(WeaponID) - else - -- 拿取本地玩家的武器 - self:SetWeaponID(ItemTool.GetLocalPawnCurrWeaponID()); - end + UGCLogSystem.Log("[WB_WeaponConfiguration_OnShowPanel] WeaponI = %s", tostring(WeaponID)); end function WB_WeaponConfiguration:LuaInit() @@ -55,7 +50,6 @@ function WB_WeaponConfiguration:LuaInit() [EWeaponPartType.SubTelescope] = self.PartItem_SubTelescope, } - -- 在这里修改 这里是经典模式,新的回合武器改变后发送的通知 这个绑定的事件有问题需要替换 UGCEventSystem.AddListener(EventTypes.PlayerChangeWeapon, self.OnPlayerChangeWeapon, self) -- 设置配件类型 @@ -80,11 +74,13 @@ end function WB_WeaponConfiguration:ClickSave() local WeaponParts = self:GetAllParts() local WeaponID = self.WeaponID - -- 在这里修改 发送RPC到DS设置配件 - local Pawn = UGCGameSystem.GetPlayerPawnByPlayerKey(LocalPlayerKey); + local Pawn = UGCGameSystem.GetPlayerPawnByPlayerKey(LocalPlayerKey); if UE.IsValidPawn(Pawn) then -- 发送 RPC UnrealNetwork.CallUnrealRPC(LocalPlayerController, Pawn, "UpdateWeaponParts", WeaponID, WeaponParts); + + UGCLogSystem.Log("[WB_WeaponConfiguration:ClickSave] 发送RPC WeaponID = %s", tostring(WeaponID)); + UGCLogSystem.LogTree(string.format("[WB_WeaponConfiguration:ClickSave] WeaponParts ="), WeaponParts); end -- 关闭该UI self:CloseSelf() @@ -95,44 +91,46 @@ function WB_WeaponConfiguration:GetWeaponID() end function WB_WeaponConfiguration:SetWeaponID(WeaponID) - if self.WeaponID ~= WeaponID then - self.WeaponID = WeaponID - local WeaponParts = MyWeaponSystem.GetWeaponBastParts(self.WeaponID) - - if ArchiveTable[LocalPlayerKey] and not table.isEmpty(ArchiveTable[LocalPlayerKey].Weapons) then - WeaponParts = ArchiveTable[LocalPlayerKey].Weapons[self.WeaponID]; - end - - UGCLogSystem.LogTree("[WB_WeaponConfiguration_SetWeaponID]", WeaponParts) - - local WeaponPartsMap = MyWeaponSystem.PartListToPartMap(WeaponParts) - local UpdateSelectPartsOnce = false - if WeaponSuits[WeaponID] then - for i, v in pairs(WeaponSuits[WeaponID]) do - if WeaponPartsMap[i] == nil then WeaponPartsMap[i] = 0 end - end - end - - for PartType, Item in pairs(self.PartTypeToPartItem) do - local ItemID = WeaponPartsMap[PartType] - Item:SetItemID(ItemID) - --UGCLogSystem.Log("[WB_WeaponConfiguration_SetWeaponID] ItemID:" .. tostring(ItemID)) - -- 设置当前默认选择的Part - if ItemID and not UpdateSelectPartsOnce then - UpdateSelectPartsOnce = true - self:SetSelectPartType(PartType) - end - end - - if not UpdateSelectPartsOnce then - self:SetSelectPartType(nil) - end - - --MyWeaponSystem.AsyncLoadItemBigIconToBrush(self.WeaponID, self.Image_WeaponIcon) - MyWeaponSystem.AsyncLoadItemWhiteIconToBrush(self.WeaponID, self.Image_WeaponIcon) - - self.TextBlock_WeaponName:SetText(MyWeaponSystem.GetItemName(self.WeaponID)) + UGCLogSystem.Log("[WB_WeaponConfiguration:SetWeaponID] WeaponID = %s", tostring(WeaponID)); + self.WeaponID = WeaponID + local WeaponParts = MyWeaponSystem.GetWeaponBastParts(self.WeaponID) + + local Parts = nil; + if not table.isEmpty(ArchiveTable[LocalPlayerKey]) and not table.isEmpty(ArchiveTable[LocalPlayerKey].Weapons) then + Parts = ArchiveTable[LocalPlayerKey].Weapons[self.WeaponID]; end + + if not table.isEmpty(Parts) then WeaponParts = Parts; end + UGCLogSystem.Log("[WB_WeaponConfiguration:SetWeaponID] 输出 WeaponParts") + table.printTable(WeaponParts); + --UGCLogSystem.LogTree("[WB_WeaponConfiguration_SetWeaponID]", WeaponParts) + + local WeaponPartsMap = MyWeaponSystem.PartListToPartMap(WeaponParts) + local UpdateSelectPartsOnce = false + if WeaponSuits[WeaponID] then + for i, v in pairs(WeaponSuits[WeaponID]) do + if WeaponPartsMap[i] == nil then WeaponPartsMap[i] = 0 end + end + end + + for PartType, Item in pairs(self.PartTypeToPartItem) do + local ItemID = WeaponPartsMap[PartType] + Item:SetItemID(ItemID) + -- 设置当前默认选择的Part + if ItemID and not UpdateSelectPartsOnce then + UpdateSelectPartsOnce = true + self:SetSelectPartType(PartType) + end + end + + if not UpdateSelectPartsOnce then + self:SetSelectPartType(nil) + end + + --MyWeaponSystem.AsyncLoadItemBigIconToBrush(self.WeaponID, self.Image_WeaponIcon) + MyWeaponSystem.AsyncLoadItemWhiteIconToBrush(self.WeaponID, self.Image_WeaponIcon) + + self.TextBlock_WeaponName:SetText(MyWeaponSystem.GetItemName(self.WeaponID)) end function WB_WeaponConfiguration:ClickPart(PartID, PartType) @@ -149,6 +147,15 @@ function WB_WeaponConfiguration:SetSelectPartType(InPartType) if self.PartTypeToPartItem[InPartType] then ItemID = self.PartTypeToPartItem[InPartType]:GetItemID() end + + local Info = WeaponTypeName[InPartType] + UGCLogSystem.LogTree(string.format("[WB_WeaponConfiguration:SetSelectPartType] Info ="), Info) + if Info then + self.TextBlock_Parts:SetText('配件:' .. Info.Chinese); + else + self.TextBlock_Parts:SetText('可装配配件'); + end + local Parts = MyWeaponSystem.GetWeaponCanUsePartFromPartType(self.WeaponID, InPartType) UGCLogSystem.LogTree("[WB_WeaponConfiguration_SetSelectPartType]", Parts) for i = 1, self.ScrollBox_SelectParts:GetChildrenCount() do @@ -197,15 +204,17 @@ end function WB_WeaponConfiguration:UpdateCurrWeapon(WeaponIDs) UGCLogSystem.LogTree("[WB_WeaponConfiguration_UpdateCurrWeapon]", WeaponIDs) - -- 在这里修改,刷新武器显示 if WeaponIDs[LocalPlayerKey] then - self:SetWeaponID(WeaponIDs[1]) + self:SetWeaponID(WeaponIDs[LocalPlayerKey]); end end +---@param Weapon ASTExtraShootWeapon function WB_WeaponConfiguration:OnPlayerChangeWeapon(InPawn, Slot, Weapon) - UGCLogSystem.Log("[WB_WeaponConfiguration:OnPlayerChangeWeapon] 玩家改变武器") - self:SetWeaponID(WeaponId); + UGCLogSystem.Log("[WB_WeaponConfiguration:OnPlayerChangeWeapon] 玩家改变武器, Slot = %s", tostring(Slot)); + if Weapon and Weapon then + self:SetWeaponID(Weapon:GetWeaponItemID()); + end end return WB_WeaponConfiguration; \ No newline at end of file diff --git a/SoloKing/Script/UI/Child/WB_PlayerInfoItem.lua b/SoloKing/Script/UI/Tool/Child/WB_PlayerInfoItem.lua similarity index 100% rename from SoloKing/Script/UI/Child/WB_PlayerInfoItem.lua rename to SoloKing/Script/UI/Tool/Child/WB_PlayerInfoItem.lua diff --git a/SoloKing/Script/UI/Tool/Child/WB_RankItem.lua b/SoloKing/Script/UI/Tool/Child/WB_RankItem.lua deleted file mode 100644 index d83a1ba0..00000000 --- a/SoloKing/Script/UI/Tool/Child/WB_RankItem.lua +++ /dev/null @@ -1,20 +0,0 @@ ----@class WB_RankItem_C:UUserWidget ----@field ScrollBox_Items UScrollBox ---Edit Below-- -local WB_RankItem = { bInitDoOnce = false } - ---[==[ Construct -function WB_RankItem:Construct() - -end --- Construct ]==] - --- function WB_RankItem:Tick(MyGeometry, InDeltaTime) - --- end - --- function WB_RankItem:Destruct() - --- end - -return WB_RankItem \ No newline at end of file diff --git a/SoloKing/Script/UI/Tool/WB_SelectPartButton.lua b/SoloKing/Script/UI/Tool/Child/WB_SelectPartButton.lua similarity index 100% rename from SoloKing/Script/UI/Tool/WB_SelectPartButton.lua rename to SoloKing/Script/UI/Tool/Child/WB_SelectPartButton.lua diff --git a/SoloKing/Script/UI/Tool/WB_SelectPartItem.lua b/SoloKing/Script/UI/Tool/Child/WB_SelectPartItem.lua similarity index 100% rename from SoloKing/Script/UI/Tool/WB_SelectPartItem.lua rename to SoloKing/Script/UI/Tool/Child/WB_SelectPartItem.lua diff --git a/SoloKing/Script/UI/Tool/WB_CountDownButton.lua b/SoloKing/Script/UI/Tool/WB_CountDownButton.lua deleted file mode 100644 index a2be465a..00000000 --- a/SoloKing/Script/UI/Tool/WB_CountDownButton.lua +++ /dev/null @@ -1,69 +0,0 @@ ----@class WB_CountDownButton_C:UUserWidget ----@field Button_Main UButton ----@field Image_CountDown UImage ----@field Image_Icon UImage ----@field Overlay_CountDown UOverlay ----@field TextBlock_CountDown UTextBlock ---Edit Below-- ----@type WB_CountDownButton_C -local WB_CountDownButton = { bInitDoOnce = false; }; - -WB_CountDownButton.Func = nil; -WB_CountDownButton.CountDownTimer = nil; -WB_CountDownButton.CountDownTime = 0; -WB_CountDownButton.ConstCountDownTime = 0; -WB_CountDownButton.CountDownIntervalTime = 0.3; - -function WB_CountDownButton:Construct() - self:LuaInit(); -end - -function WB_CountDownButton:LuaInit() - if self.bInitDoOnce then return ; end - self.bInitDoOnce = true; - - UITool.BindButtonClicked(self.Button_Main, self.OnClickMain, self) -end - -function WB_CountDownButton:OnClickMain() - if self.Func ~= nil then - self.Func() - self.Button_Main:SetIsEnabled(false); - self.Overlay_CountDown:SetVisibility(ESlateVisibility.SelfHitTestInvisible); - end -end - --- function WB_CountDownButton:Tick(MyGeometry, InDeltaTime) - --- end - --- function WB_CountDownButton:Destruct() - --- end - ----@param InFunc fun() -function WB_CountDownButton:SetFunc(InFunc) - self.Func = InFunc; -end - ----@param InTime float -function WB_CountDownButton:SetTime(InTime) - if InTime == nil then return end - self.ConstCountDownTime = InTime; - self.CountDownTime = InTime; - if self.CountDownTimer ~= nil then - UGCEventSystem.StopTimer(self.CountDownTimer); - self.CountDownTimer = nil; - end - self.CountDownTimer = UGCEventSystem.SetTimer(self, function() - self.CountDownTime = self.CountDownTime - self.CountDownIntervalTime; - local Time = math.floor(self.CountDownTime); - if Time <= 0 then - UGCEventSystem.StopTimer(self.CountDownTimer); - self.CountDownTimer = nil; - self.Button_Main:SetIsEnabled(true); - end - end, self.CountDownIntervalTime) -end - -return WB_CountDownButton; \ No newline at end of file diff --git a/SoloKing/Script/UI/Tool/WB_FaceNotice.lua b/SoloKing/Script/UI/Tool/WB_FaceNotice.lua deleted file mode 100644 index a6883dac..00000000 --- a/SoloKing/Script/UI/Tool/WB_FaceNotice.lua +++ /dev/null @@ -1,67 +0,0 @@ ----@class WB_FaceNotice_C:UUserWidget ----@field Button_close UButton ----@field Button_left UButton ----@field Button_right UButton ----@field CanvasPanel_IPX UCanvasPanel ----@field CheckBox_select UCheckBox ----@field HorizontalBox_Paging UHorizontalBox ----@field WidgetSwitcher_page UWidgetSwitcher ---Edit Below-- ----@type WB_FaceNotice_C -local WB_FaceNotice = { - bInitDoOnce = true; - SelectColor = { R = 1., G = 0.51, B = 0.14, A = 1. }; - NotSelectColor = { R = 1., G = 1., B = 1., A = 1. }; -}; - -function WB_FaceNotice:Construct() - self.Button_close.OnClicked:Add(self.CloseGuide, self) - self.Button_left.OnClicked:Add(self.LastGuide, self) - self.Button_right.OnClicked:Add(self.NextGuide, self) - - UGCEventSystem.SetTimer(self, function() - self:CloseGuide(); - end, DefaultSettings.ShowFaceNoticeTime); -end - -function WB_FaceNotice:CloseGuide() - UGCLogSystem.Log("[WB_FaceNotice:CloseGuide] 执行") - WidgetManager:ClosePanel(WidgetConfig.EUIType.FaceNotice) - self:SetVisibility(ESlateVisibility.Collapsed); -end -function WB_FaceNotice:LastGuide() - self:UpdateIndex(self:GetNowIndex() - 1) -end -function WB_FaceNotice:NextGuide() - self:UpdateIndex(self:GetNowIndex() + 1) -end -function WB_FaceNotice:GetNowIndex() - return self.WidgetSwitcher_page:GetActiveWidgetIndex() -end -function WB_FaceNotice:UpdateIndex(NewIndex) - if NewIndex >= self.WidgetSwitcher_page:GetChildrenCount() then - NewIndex = 0 - elseif NewIndex < 0 then - NewIndex = self.WidgetSwitcher_page:GetChildrenCount() - 1 - end - self.WidgetSwitcher_page:SetActiveWidgetIndex(NewIndex) - UITool.ForeachAllChildren(self.HorizontalBox_Paging, function(index, Widget) - if (index - 1) == NewIndex then - Widget:SetColorAndOpacity(self.SelectColor) - else - Widget:SetColorAndOpacity(self.NotSelectColor) - end - end); -end --- function WB_FaceNotice:Tick(MyGeometry, InDeltaTime) --- end --- function WB_FaceNotice:Destruct() --- end - -function WB_FaceNotice:OnClosePanel(...) - --- 显示一下选择武器 - if self.bInitDoOnce then - self.bInitDoOnce = false; - end -end -return WB_FaceNotice; \ No newline at end of file diff --git a/SoloKing/Script/UI/WB_PlayerInfo.lua b/SoloKing/Script/UI/Tool/WB_PlayerInfo.lua similarity index 100% rename from SoloKing/Script/UI/WB_PlayerInfo.lua rename to SoloKing/Script/UI/Tool/WB_PlayerInfo.lua diff --git a/SoloKing/Script/UI/Tool/WB_RankingListBtn1.lua b/SoloKing/Script/UI/Tool/WB_RankingListBtn1.lua index c2b70a7f..c845bd81 100644 --- a/SoloKing/Script/UI/Tool/WB_RankingListBtn1.lua +++ b/SoloKing/Script/UI/Tool/WB_RankingListBtn1.lua @@ -1,4 +1,4 @@ ----@class WB_RankingListBtn_C:UUserWidget +---@class WB_RankingListBtn1_C:UUserWidget ---@field Button_RankBut UButton ---@field Image_Bg_Default UImage --Edit Below-- diff --git a/SoloKing/Script/UI/Round/WB_RoundEnd.lua b/SoloKing/Script/UI/Tool/WB_RoundEnd.lua similarity index 100% rename from SoloKing/Script/UI/Round/WB_RoundEnd.lua rename to SoloKing/Script/UI/Tool/WB_RoundEnd.lua diff --git a/SoloKing/Script/UI/TwoConfirm/WB_SecondaryConfirmation.lua b/SoloKing/Script/UI/TwoConfirm/WB_SecondaryConfirmation.lua new file mode 100644 index 00000000..0a29754f --- /dev/null +++ b/SoloKing/Script/UI/TwoConfirm/WB_SecondaryConfirmation.lua @@ -0,0 +1,88 @@ +---@class WB_SecondaryConfirmation_C:UUserWidget +---@field ShowAnim UWidgetAnimation +---@field Button_Cancellation UButton +---@field Button_Confirm UButton +---@field TextBlock_Cancellation UTextBlock +---@field TextBlock_Confirm UTextBlock +---@field TextBlock_ShowInfo UTextBlock +--Edit Below-- +local WB_SecondaryConfirmation = { + bInitDoOnce = false; + bIsShowing = false; +}; + +function WB_SecondaryConfirmation:Construct() + WidgetLibrary.BindButtonClicked(self.Button_Cancellation, self.ClickCancellation, self) + WidgetLibrary.BindButtonClicked(self.Button_Confirm, self.ClickConfirm, self) +end + +function WB_SecondaryConfirmation:OnShowPanel() + UGCLogSystem.Log("[WB_SecondaryConfirmation:OnShowPanel] 执行") + self.bIsShowing = true + self:PlayAnimation(self.ShowAnim, 0, 1, EUMGSequencePlayMode.Forward, 1); +end + +function WB_SecondaryConfirmation:SetTextInfo(TextInfo, CancellationText, ConfirmText) + self.TextBlock_ShowInfo:SetText(TextInfo) + if CancellationText then + self.TextBlock_Cancellation:SetText(CancellationText) + end + if ConfirmText then + self.TextBlock_Confirm:SetText(ConfirmText) + end +end + +function WB_SecondaryConfirmation:BindCancellationCallBack(InCancellationCallBackFunc, InCancellationCallBackObj) + self.CancellationCallBackFunc = InCancellationCallBackFunc + self.CancellationCallBackObj = InCancellationCallBackObj +end + +function WB_SecondaryConfirmation:BindConfirmCallBack(InConfirmCallBackFunc, InConfirmCallBackObj) + self.ConfirmCallBackFunc = InConfirmCallBackFunc + self.ConfirmCallBackObj = InConfirmCallBackObj +end + +function WB_SecondaryConfirmation:Reset() + self.bIsShowing = false + self:BindCancellationCallBack() + self:BindConfirmCallBack() + self.TextBlock_Cancellation:SetText("取消") + self.TextBlock_Confirm:SetText("确认") + WidgetManager:ClosePanel(WidgetConfig.EUIType.TwoConfirm) +end + +function WB_SecondaryConfirmation:ClickCancellation() + if not self.bIsShowing then return end + SoundSystem.PlaySound(SoundSystem.ESound.Click) + if self.CancellationCallBackFunc then + if self.CancellationCallBackObj then + self.CancellationCallBackFunc(self.CancellationCallBackObj) + else + self.CancellationCallBackFunc() + end + end + self:Reset() +end + +function WB_SecondaryConfirmation:ClickConfirm() + if not self.bIsShowing then return end + SoundSystem.PlaySound(SoundSystem.ESound.Click) + if self.ConfirmCallBackFunc then + if self.ConfirmCallBackObj then + self.ConfirmCallBackFunc(self.ConfirmCallBackObj) + else + self.ConfirmCallBackFunc() + end + end + self:Reset() +end + +-- function WB_SecondaryConfirmation:Tick(MyGeometry, InDeltaTime) + +-- end + +-- function WB_SecondaryConfirmation:Destruct() + +-- end + +return WB_SecondaryConfirmation; \ No newline at end of file diff --git a/SoloKing/Script/UI/SecondaryConfirmation/WB_SecondaryConfirmation_Strip.lua b/SoloKing/Script/UI/TwoConfirm/WB_SecondaryConfirmation_Strip.lua similarity index 100% rename from SoloKing/Script/UI/SecondaryConfirmation/WB_SecondaryConfirmation_Strip.lua rename to SoloKing/Script/UI/TwoConfirm/WB_SecondaryConfirmation_Strip.lua diff --git a/SoloKing/Script/UI/WB_Main.lua b/SoloKing/Script/UI/WB_Main.lua index 8686da4b..b267dcdf 100644 --- a/SoloKing/Script/UI/WB_Main.lua +++ b/SoloKing/Script/UI/WB_Main.lua @@ -13,7 +13,6 @@ ---@field WB_DamageTextButton UWB_DamageTextButton_C ---@field WB_InTest_Side UWB_InTest_Side_C ---@field WB_PID UWB_PID_C ----@field WB_PlayerInfo_Small UWB_PlayerInfo_Small_C ---@field WB_ReselectWeaponBtn UWB_ReselectWeaponBtn_C ---@field WB_RoundEnd UWB_RoundEnd_C ---@field WB_SelectParts UWB_SelectParts_C @@ -94,7 +93,6 @@ function WB_Main:LuaInit() -- 观战玩家 if LocalIsGlobalSpectator then self.WB_DamageTextButton:SetVisibility(ESlateVisibility.Collapsed); - --self.WB_SelectParts:SetVisibility(ESlateVisibility.Collapsed); self.WidgetSwitcher_Title:SetActiveWidgetIndex(1); else self.WidgetSwitcher_Title:SetActiveWidgetIndex(0); @@ -142,23 +140,6 @@ function WB_Main:OnClickCustomTest() self.IsTestShow = not self.IsTestShow; end -WB_Main.IsShowScore = false; - -function WB_Main:OnShowScore() - -- 如果显示的话 - if self.WB_PlayerInfo_Small:IsVisible() then - self:PlayAnimation(self.ShowScore, 0, 1, EUMGSequencePlayMode.Reverse, 1); - else - self:PlayAnimation(self.ShowScore, 0, 1, EUMGSequencePlayMode.Forward, 1); - -- 过一段时间自动关闭 - UGCEventSystem.SetTimer(self, function() - if self.WB_PlayerInfo_Small:IsVisible() then - self:OnShowScore(); - end - end, 5); - end -end - function WB_Main:OnGameStart() UGCLogSystem.Log("[WB_Main:OnGameStart] 执行") end diff --git a/SoloKing/Script/UI/WB_PlayerInfo_Small.lua b/SoloKing/Script/UI/WB_PlayerInfo_Small.lua deleted file mode 100644 index 71a7996b..00000000 --- a/SoloKing/Script/UI/WB_PlayerInfo_Small.lua +++ /dev/null @@ -1,68 +0,0 @@ ----@class WB_PlayerInfo_Small_C:UUserWidget ----@field HorizontalBox_Title UHorizontalBox ----@field Overlay_MVP UOverlay ----@field Overlay_Tile_AddFriend UOverlay ----@field ScrollBox_Items UScrollBox ----@field Spacer_Button USpacer ----@field TextBlock_0 UTextBlock ----@field TextBlock_BodySize UTextBlock ----@field TextBlock_Damage UTextBlock ----@field TextBlock_KDA UTextBlock ----@field TextBlock_PlayerName UTextBlock ---Edit Below-- ----@type WB_PlayerInfo_Small_C -local WB_PlayerInfo_Small = { bInitDoOnce = false; }; - -function WB_PlayerInfo_Small:Construct() - self:LuaInit(); -end - -WB_PlayerInfo_Small.HeadIcons = {}; - -function WB_PlayerInfo_Small:LuaInit() - if self.bInitDoOnce then return ; end - self.bInitDoOnce = true; - - UITool.ForeachAllChildren(self.ScrollBox_Items, function(index, Widget) - Widget:LuaInit(); - Widget:SetVisibility(ESlateVisibility.Collapsed); - end) - UGCEventSystem.AddListener(EventTypes.UpdateRoundWinners, self.OnUpdateRoundWinners, self); - self.bInitDoOnce = true; -end - -function WB_PlayerInfo_Small:SetInGaming() - self:LuaInit(); - self.Spacer_Button:SetVisibility(ESlateVisibility.Collapsed); - self.Overlay_MVP:SetVisibility(ESlateVisibility.Collapsed); - --self.Overlay_Tile_AddFriend:SetVisibility(ESlateVisibility.Collapsed); - - for i = 1, self.ScrollBox_Items:GetChildrenCount() do - local Item = self.ScrollBox_Items:GetChildAt(i - 1); - Item:SetInGaming(); - end -end - --- function WB_PlayerInfo_Small:Tick(MyGeometry, InDeltaTime) - --- end - --- function WB_PlayerInfo_Small:Destruct() - --- end - -function WB_PlayerInfo_Small:OnUpdateRoundWinners(Rounds) - UGCLogSystem.LogTree(string.format("[WB_PlayerInfo_Small:OnUpdateRoundWinners] Rounds ="), Rounds) - local RoundCount = table.getCount(Rounds); - UITool.ForeachAllChildren(self.ScrollBox_Items, function(index, Widget) - local RoundInfo = Rounds[index]; - if RoundInfo ~= nil then - Widget:SetRoundInfo(index, RoundInfo); - Widget:SetVisibility(ESlateVisibility.SelfHitTestInvisible); - else - Widget:SetVisibility(ESlateVisibility.Collapsed); - end - end); -end - -return WB_PlayerInfo_Small; \ No newline at end of file diff --git a/SoloKing/Script/gamemode/Action_PlayerLogin.lua b/SoloKing/Script/gamemode/Action_PlayerLogin.lua index 4eba0f39..43f3e82c 100644 --- a/SoloKing/Script/gamemode/Action_PlayerLogin.lua +++ b/SoloKing/Script/gamemode/Action_PlayerLogin.lua @@ -155,6 +155,11 @@ function Action_PlayerLogin:Execute(...) UGCLogSystem.Log("[Action_PlayerLogin:Execute] RankScore = %s", tostring(UGCRankSystem.GetUGCRank(self.PlayerKey))); + --ArchiveTable[self.PlayerKey].EnterWeapons = { + -- { 101001, 101004, 106011, 108004, }, + --}; + --ArchiveTable[self.PlayerKey].EnterWeaponIndex = 2; + GameState:HandleArchiveData(nil, { "GameTimes", "TotalGameTimes", diff --git a/SoloKing/SoloKing.ugcproj b/SoloKing/SoloKing.ugcproj index 7cb7e451..630857cd 100644 --- a/SoloKing/SoloKing.ugcproj +++ b/SoloKing/SoloKing.ugcproj @@ -7,7 +7,7 @@ ProjectShortPath=/SoloKing/ StartMapName=/SoloKing/UGCmap MapMode=0 bIsBigWorld=0 -Version=1.30.21.13232 +Version=1.30.21.13234 UpdateVersion=5 GameModePath=/SoloKing/Asset/Blueprint/UGCGameMode.UGCGameMode_C DefaultLevelDirectorPath=/Asset/Blueprint/UGCLevelDirector.UGCLevelDirector_C @@ -53,13 +53,13 @@ SwitchesInMaps=((Key="r.Mobile.EnableIBL",Value=0),(Key="s.StreamableDelegateLim PlayBindingArray=[] [JobOption] -LastJobId=600043800 -LastWindowsJobId=600026723 -LastAndroidJobId=600026723 -LastIOSJobId=600026723 -PakOnly=1 -LastSkipBake=True -LastTargetPlatform=LinuxServer+WindowsNoEditor+Android_ETC2+IOS+OpenHarmony_ETC2 +LastJobId=-1 +LastWindowsJobId=-1 +LastAndroidJobId=-1 +LastIOSJobId=-1 +PakOnly=0 +LastSkipBake=False +LastTargetPlatform=LinuxServer [UGCUploadOption] PlatformIndex=0 @@ -68,7 +68,7 @@ TargetPlatform=LinuxServer+WindowsNoEditor+Android_ETC2+IOS+OpenHarmony_ETC2 [DebugSettings] bRoomOB=0 -TeamPlayers=3,0; +TeamPlayers=2,0; [MultiModeSetting_0] bDefaultMode=1