Update place holder item drop object

This commit is contained in:
HungDK
2025-10-09 17:04:07 +07:00
parent 8286c01879
commit 7a000797ec
6 changed files with 21 additions and 42 deletions
+8
View File
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="UserContentModel">
<attachedFolders />
<explicitIncludes />
<explicitExcludes />
</component>
</project>
@@ -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))
{
@@ -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)
@@ -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();
+6 -39
View File
@@ -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
+1 -2
View File
@@ -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>();
pickupItem pickupScript = pickupItem.Instance;
if (pickupScript != null)
{
pickupScript.OnPickupSuccess(tid);