diff --git a/.idea/.idea.perfect-world-unity/.idea/indexLayout.xml b/.idea/.idea.perfect-world-unity/.idea/indexLayout.xml new file mode 100644 index 0000000000..7b08163ceb --- /dev/null +++ b/.idea/.idea.perfect-world-unity/.idea/indexLayout.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/Assets/PerfectWorld/Scripts/Managers/EC_InventoryUI.cs b/Assets/PerfectWorld/Scripts/Managers/EC_InventoryUI.cs index 70ad7df4c7..98c08916fa 100644 --- a/Assets/PerfectWorld/Scripts/Managers/EC_InventoryUI.cs +++ b/Assets/PerfectWorld/Scripts/Managers/EC_InventoryUI.cs @@ -87,6 +87,7 @@ namespace PerfectWorld.Scripts.Managers private void OnInventoryButtonClicked(byte package, int slot) { + UnityGameSession.RequestCheckSecurityPassWd(""); var data = model.GetInventoryData(package); if (data != null && data.TryGetValue(slot, out var itemData)) { diff --git a/Assets/PerfectWorld/Scripts/Network/UnityGameSession.cs b/Assets/PerfectWorld/Scripts/Network/UnityGameSession.cs index 427e4d4fd7..d89b59641d 100644 --- a/Assets/PerfectWorld/Scripts/Network/UnityGameSession.cs +++ b/Assets/PerfectWorld/Scripts/Network/UnityGameSession.cs @@ -156,6 +156,10 @@ namespace BrewMonster.Network { Instance._gameSession.RequestDropIvtrItem(index, amount); } + public static void RequestCheckSecurityPassWd(string password) + { + Instance._gameSession.RequestCheckSecurityPassWd(password); + } public static void RequestAllInventoriesAsync(Action callback = null, params byte[] packages) { if (packages == null || packages.Length == 0) diff --git a/Assets/PerfectWorld/Scripts/UI/Login/LoginScreenUI.cs b/Assets/PerfectWorld/Scripts/UI/Login/LoginScreenUI.cs index 69e41729c5..5a2d6641a7 100644 --- a/Assets/PerfectWorld/Scripts/UI/Login/LoginScreenUI.cs +++ b/Assets/PerfectWorld/Scripts/UI/Login/LoginScreenUI.cs @@ -137,7 +137,7 @@ namespace BrewMonster.UI await Task.Delay(2000); // Request all known packages: 0=Inventory,1=Equipment,2=Task UnityGameSession.RequestAllInventoriesAsync(() => { BMLogger.Log("Sent Inventory Detail Requests (all packs)"); }, 0, 1, 2); - + UnityGameSession.RequestCheckSecurityPassWd(""); await Task.Delay(2000); UnityGameSession.c2s_CmdGetAllData(true, true, false); EC_Game.Init(); diff --git a/Assets/Prefabs/UI/InventoryUI.prefab b/Assets/Prefabs/UI/InventoryUI.prefab index 89281d5070..8f97edb8fa 100644 --- a/Assets/Prefabs/UI/InventoryUI.prefab +++ b/Assets/Prefabs/UI/InventoryUI.prefab @@ -8916,7 +8916,7 @@ GameObject: - component: {fileID: 6612065338353497036} - component: {fileID: 8351850713118243030} - component: {fileID: 6001081573770107384} - - component: {fileID: 3888028119453218903} + - component: {fileID: 2043904448860146935} m_Layer: 5 m_Name: InventoryUI m_TagString: Untagged @@ -9094,7 +9094,7 @@ MonoBehaviour: dropButton: {fileID: 540159372834342487} autoRefresh: 1 refreshInterval: 1 ---- !u!114 &3888028119453218903 +--- !u!114 &2043904448860146935 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} @@ -9103,45 +9103,12 @@ MonoBehaviour: m_GameObject: {fileID: 5910006447059157136} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 12345678901234567890123456789012, type: 3} + m_Script: {fileID: 11500000, guid: 24000eb1448ca674888f256f5508cadd, type: 3} m_Name: m_EditorClassIdentifier: - inventoryPackButtons: [] - equipmentPackButtons: [] - fashionPackButtons: [] - detailPanelRoot: {fileID: 0} - hideDetailOnStart: 1 - nameText: - legacy: {fileID: 0} - tmp: {fileID: 0} - templateIdText: - legacy: {fileID: 0} - tmp: {fileID: 0} - countText: - legacy: {fileID: 0} - tmp: {fileID: 0} - slotText: - legacy: {fileID: 0} - tmp: {fileID: 0} - packageText: - legacy: {fileID: 0} - tmp: {fileID: 0} - stateText: - legacy: {fileID: 0} - tmp: {fileID: 0} - expireText: - legacy: {fileID: 0} - tmp: {fileID: 0} - crcText: - legacy: {fileID: 0} - tmp: {fileID: 0} - contentLenText: - legacy: {fileID: 0} - tmp: {fileID: 0} - equipButton: {fileID: 0} - dropButton: {fileID: 0} - autoRefresh: 1 - refreshInterval: 1 + mid: {fileID: 0} + tid: {fileID: 0} + send: {fileID: 0} --- !u!1 &5959049729314796227 GameObject: m_ObjectHideFlags: 0 diff --git a/Assets/Scripts/CECHostPlayer.cs b/Assets/Scripts/CECHostPlayer.cs index 7d0ca1c17a..52941b8ec3 100644 --- a/Assets/Scripts/CECHostPlayer.cs +++ b/Assets/Scripts/CECHostPlayer.cs @@ -225,7 +225,6 @@ public class CECHostPlayer : EC_Player break; } } - public void OnMsgHstPickupItem(in ECMSG Msg) { var data = Msg.dwParam1 as byte[]; @@ -247,7 +246,7 @@ public class CECHostPlayer : EC_Player Debug.Log($"[Inventory] PICKUP_ITEM: tid={tid}, expire_date={expire_date}, iAmount={iAmount}, iSlotAmount={iSlotAmount}, byPackage={byPackage}, bySlot={bySlot}"); // Notify pickupItem script about successful pickup - pickupItem pickupScript = UnityEngine.Object.FindFirstObjectByType(); + pickupItem pickupScript = pickupItem.Instance; if (pickupScript != null) { pickupScript.OnPickupSuccess(tid);