From d69fed7aeabc87e6dce914f33a815df9928f4e4c Mon Sep 17 00:00:00 2001 From: VuNgocHaiC7 Date: Thu, 29 Jan 2026 14:23:24 +0700 Subject: [PATCH] fix conflig use item --- .../Scripts/Network/CSNetwork/GameSession.cs | 10 ++++++++++ .../Scripts/UI/Dialogs/AUIDialog.cs | 17 +++++++++++++++++ .../Scripts/UI/GamePlay/CdlgQuickBar.cs | 2 -- 3 files changed, 27 insertions(+), 2 deletions(-) diff --git a/Assets/PerfectWorld/Scripts/Network/CSNetwork/GameSession.cs b/Assets/PerfectWorld/Scripts/Network/CSNetwork/GameSession.cs index 19c4aa0236..f57fa096e7 100644 --- a/Assets/PerfectWorld/Scripts/Network/CSNetwork/GameSession.cs +++ b/Assets/PerfectWorld/Scripts/Network/CSNetwork/GameSession.cs @@ -474,6 +474,13 @@ namespace CSNetwork SendProtocol(gamedatasendRequest); } + public void c2s_SendCmdUseItemWithTarget(byte byPackage, byte bySlot, int tid, byte byPVPMask) + { + gamedatasend gamedatasend = new gamedatasend(); + gamedatasend.Data = C2SCommandFactory.CreateUseItemWithTarget(byPackage, bySlot, tid, byPVPMask); + SendProtocol(gamedatasend); + } + public void RequestOwnItemInfoAsync( byte byPackage, byte bySlot, @@ -957,6 +964,9 @@ namespace CSNetwork case CommandID.SET_COOLDOWN: EC_ManMessage.PostMessage(EC_MsgDef.MSG_HST_SETCOOLTIME, MANAGER_INDEX.MAN_PLAYER, 0, pDataBuf, pCmdHeader); break; + case CommandID.HOST_USE_ITEM: + EC_ManMessage.PostMessage(EC_MsgDef.MSG_HST_USEITEM, MANAGER_INDEX.MAN_PLAYER, 0, pDataBuf, pCmdHeader); + break; case CommandID.COMBO_SKILL_PREPARE: EC_ManMessage.PostMessage(EC_MsgDef.MSG_HST_COMBO_SKILL_PREPARE, MANAGER_INDEX.MAN_PLAYER, 0, pDataBuf, pCmdHeader, dwDataSize); break; diff --git a/Assets/PerfectWorld/Scripts/UI/Dialogs/AUIDialog.cs b/Assets/PerfectWorld/Scripts/UI/Dialogs/AUIDialog.cs index f5e0b49440..baff19441b 100644 --- a/Assets/PerfectWorld/Scripts/UI/Dialogs/AUIDialog.cs +++ b/Assets/PerfectWorld/Scripts/UI/Dialogs/AUIDialog.cs @@ -15,6 +15,8 @@ namespace BrewMonster.UI protected AUIManager m_pAUIManager = null; string m_szName; + private bool m_bUpdateRenderTarget = false; + public virtual void Show(bool value) { gameObject.SetActive(value); @@ -140,5 +142,20 @@ namespace BrewMonster.UI /// Override in dialogs that support attribute-point reset (e.g. DlgCharacter). No-op by default. public virtual void ResetPoints() { } + + public virtual void UpdateRenderTarget() + { + m_bUpdateRenderTarget = true; + } + + public bool NeedRenderTargetUpdate() + { + return m_bUpdateRenderTarget; + } + + public void ResetRenderTargetFlag() + { + m_bUpdateRenderTarget = false; + } } } diff --git a/Assets/PerfectWorld/Scripts/UI/GamePlay/CdlgQuickBar.cs b/Assets/PerfectWorld/Scripts/UI/GamePlay/CdlgQuickBar.cs index 9e837f4b49..3b92b20ddb 100644 --- a/Assets/PerfectWorld/Scripts/UI/GamePlay/CdlgQuickBar.cs +++ b/Assets/PerfectWorld/Scripts/UI/GamePlay/CdlgQuickBar.cs @@ -228,7 +228,6 @@ namespace BrewMonster if (pItem != null) { - slotIndex++; string itemIcon = pItem.GetIconFile(); GetGameUIMan().SetCover(pCell, itemIcon, EC_GAMEUI_ICONS.ICONS_INVENTORY); } @@ -315,7 +314,6 @@ namespace BrewMonster pClock.SetColor(new Color32(0, 0, 0, 128)); } - slotIndex++; string cmdIcon = pSC.GetIconFile(); GetGameUIMan().SetCover(pCell, cmdIcon, EC_GAMEUI_ICONS.ICONS_ACTION); }