Skip to content

Commit 4481584

Browse files
Mervandelitwostars
andauthored
CUIItemUpgrade implementation (anvil UI) (#417)
* UIItemUpgrade: Item upgrade process completed * UIItemUpgrade: Animation loop refactored * CUIItemUpgrade: Refactored behaviour like 1299 Client * Refactored IsSlotCompatible function * CUIItemupgrade Header updated * Merge branch 'master' of https://github.com/Mervandeli/KnightOnline * resolved conflicts * Right click behavior added * minor updates * IsSlotCompatible updated * minor review changes applied * Some reviews solved * other reviews and ui close problem solved * ItemCount handled outside render * Upgrade scroll slot and ItemUpgrade slot seperated * Removed Unnecessary functions * UI elements handled on load * Fixed before commit problem * Removed deleteiconskill function and defined magic numbers * Removed deleteiconskill from header * SetupIconarea used in other functions * Upgradearea rightclick behavior fixed * Fixed some reviews * text ids added text_resource.h and MsgRecv_ItemUpgrade updated * orher reviews and icon move bug fixed * Update RestoreInventoryFromBackup logic and rename to UpdateInventory * last countable item updateinventory problem fixed * Parent class changed N3UIWndBase to N3UIBase * Other reviews solved * Refactored handle functions * Move Icon poblem fixed * Removed some functions * Countable Items problem fixed * GetWndDistrict updated and Using member reduced * Countable icons moving like original 1299 client * ReceiveMessage updated * Minor update * Reduced class members * Used N3_VERIFY_UI_COMPONENT method for Success and Fail UI * Minor update * UIItemUpgrade.cpp error fix * Update UIItemUpgrade.cpp Remove unintended empty statement in UIItemUpgrade.cpp * Cleanup pass to knock out low hanging fruit * Add e_ItemEffect2, fix check * Tidy up MsgRecv_ObjectEvent() * Add __IconItemSkill::IsStackable() helper * Minor cleanup * IsTrina method removed and Consumable item check added * SetVisibleWithNoSound updated and SetVisible method added * SetVisibleWithNoSound updated * Removed Open method * CleanArea method removed * Fix: Reset m_pSelectedItem when associated item is freed to prevent invalid pointer access * ShowItemCount removed and Countable labels logic moved to render * UIMsgBoxOkCancel added * Include untracked files missed in last commit * Fix missing delete in MsgRecv_ItemUpgrade * Resolve conflicts * untrack submodules * deps/db-modules removed * Fix errors * merge master * merge master * Fix errors * Minor update * Fix slot errors * Formatter pass * Add to WarFare/CMakeLists.txt * Restore forward declaration * This branch is implemented, disable lint checker for next one * Address detected clang-tidy issues * clang-tidy warning fixes * Fix stack split error * run clang-format * Merge branch 'master' into itemupgrade Conflicts: src/Client/WarFare/GameDef.h src/Client/WarFare/IconItemSkill.h * Update e_ItemUpgradeResult naming in tests as well * Remove redundant and nonsense definitions * Rename for consistency * Use 'requirement' consistently instead of 'material' * GetWndDistrict(): Be explicit to indicate how this works As-is there's no indication of what this method actually does; it isn't clear that the cursor position is fetched for this. From the outside it looks like it serves a completely different role than it actually does. So we'll be explicit; that way it's clear that it's fetching the district for the given cursor position. * We don't really need a helper for this At least, not implemented at this level - and then it would need to be more flexible. ... for effectively 2 lines of code. * Move icon creation helper to __IconItemSkill * Consistent free logic delete() is legally allowed to pass nullptr. It's a no-op. We don't need to constantly be checking for this. * Rename GetItemFromInv() -> CopyInventoryItems() This is more explicit in what it does. Typically many UIs move icons around rather than copy (and are named as such; ItemMoveFromInvToThis). 'Get' is not very specific. * Fix mem leaks in CopyInventoryItems() + HandleInventoryIconRightClick() * Use int8_t for consistency * Separate item being dragged from tooltip item This ensures it's correct for the right frame and isn't unintentionally influenced between frames, e.g. when dragging over the top of another icon. Also fix bugs caused by implicit copies; we should just explicitly clone these as needed, rather than this though. * Consistently block item interactions during an upgrade * Always allocate item for drag, refactor packet handling Rather than have iffy logic having to constantly try and figure out if it's a copy (to free) or a reference (to absolutely not free, but restore), we just always allocate a copy regardless. Additionally, we refactor packet handling to modify the inventory and then just reload the inventory state. This is simpler than trying to update 2 states (which it wasn't even doing, so they were easily out of state, especially with stack size changes). Finally, remove MouseProc() - this logic is redundant. It's handled by UIMSG_ICON_DOWN already. * Remove drag-specific stack hackery, modify on drag instead (and consequently when restoring) * Restore MouseProc(), remove UIMSG_ICON_DOWN implementation At this level, MouseProc() can trigger a little more generously, at least when we indicate work has been done (UI_MOUSEPROC_DONESOMETHING). This allows things to act a little smoother as it still behaves when dragged outside the UI. * Req items should show a stack size of 0 in the inventory when in use * Don't allow upgrade slot items to be moved * __IconItemSkill: Add Clone() and block implicit copy behaviour It's unclear what exactly we want to copy here; we might want the icon, we might not. Implicit copy behaviour by default would copy the pointer rather than allocate a new instance, and then it wouldn't be clear which parent it should be assigned to. To be very clear about what we want, we explicitly add Clone() to fully clone the entire thing. Anything else can be handled manually, but it should be rare. * Revert GetUVRect() changes for now Don't want to touch tools. Too much of a hassle with clang-tidy for now. Really need to go over tools with clang-tidy so this is not an issue. * Remove redundant CreateIcon() call * Refactor to be slightly more sensible/checked * Sort requirement items in the client Fix sort order to be consistent with official; this should be descending, not ascending * These are used now * These are signed * Be consistent * This is no longer used * Restore official behaviour for single stack req items Officially this will act as a 'move' and only show up in the requirement list. Since we're just cloning, to simulate this, we just selectively hide/show the icon as appropriate. * Only enforce upgrade UI item changes when visible * Right-clicks should explicitly handle behaviour based on slot * Ensure items are reset consistently after upgrades On successful upgrades, on the next assignment, it should reset. When it burns, we shouldn't bother preserving the slot position as this item is deleted already, and it just blocks us from adding another. Also make this consistent across right-clicks and left-clicks. --------- Co-authored-by: twostars <i.am.twostars@gmail.com>
1 parent 48b8440 commit 4481584

21 files changed

+1626
-77
lines changed

src/Client/WarFare/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,8 @@ set(WARFARE_SCENE_INGAME_UI_SOURCES
8989
UIInn.h
9090
UIInventory.cpp
9191
UIInventory.h
92+
UIItemUpgrade.cpp
93+
UIItemUpgrade.h
9294
UIKnightsOperation.cpp
9395
UIKnightsOperation.h
9496
UILevelGuide.cpp

src/Client/WarFare/GameDef.h

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -382,15 +382,20 @@ enum e_PlugPosition : int8_t
382382

383383
enum e_ItemAttrib : int8_t
384384
{
385-
ITEM_ATTRIB_GENERAL = 0,
386-
ITEM_ATTRIB_MAGIC = 1,
387-
ITEM_ATTRIB_LAIR = 2,
388-
ITEM_ATTRIB_CRAFT = 3,
389-
ITEM_ATTRIB_UNIQUE = 4,
390-
ITEM_ATTRIB_UPGRADE = 5,
391-
ITEM_ATTRIB_UNIQUE_REVERSE = 11,
392-
ITEM_ATTRIB_UPGRADE_REVERSE = 12,
393-
ITEM_ATTRIB_UNKNOWN = -1
385+
ITEM_ATTRIB_GENERAL = 0,
386+
ITEM_ATTRIB_MAGIC = 1,
387+
ITEM_ATTRIB_LAIR = 2,
388+
ITEM_ATTRIB_CRAFT = 3,
389+
ITEM_ATTRIB_UNIQUE = 4,
390+
ITEM_ATTRIB_UPGRADE = 5,
391+
ITEM_ATTRIB_UNKNOWN = -1
392+
};
393+
394+
enum e_ItemEffect2 : uint8_t
395+
{
396+
ITEM_EFFECT2_RING_UPGRADE_REQ = 253,
397+
ITEM_EFFECT2_RENTAL_SCROLL = 254,
398+
ITEM_EFFECT2_ITEM_UPGRADE_REQ = 255
394399
};
395400

396401
enum e_ItemGrade : uint8_t

src/Client/WarFare/GameProcMain.cpp

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@
5252
#include "UIQuestTalk.h"
5353
#include "UIDead.h"
5454
#include "UIUpgradeSelect.h"
55+
#include "UIItemUpgrade.h"
5556
#include "UILevelGuide.h"
5657
#include "UIMsgBoxOkCancel.h"
5758

@@ -139,6 +140,7 @@ CGameProcMain::CGameProcMain() // r기본 생성자.. 각 변수의 역활
139140
m_pUIQuestTalk = new CUIQuestTalk();
140141
m_pUIDead = new CUIDead();
141142
m_pUIUpgradeSelect = new CUIUpgradeSelect();
143+
m_pUIItemUpgrade = new CUIItemUpgrade();
142144
m_pUILevelGuide = new CUILevelGuide();
143145

144146
m_pSubProcPerTrade = new CSubProcPerTrade();
@@ -189,6 +191,7 @@ CGameProcMain::~CGameProcMain()
189191
delete m_pUIQuestTalk;
190192
delete m_pUIDead;
191193
delete m_pUIUpgradeSelect;
194+
delete m_pUIItemUpgrade;
192195
delete m_pUILevelGuide;
193196

194197
delete m_pSubProcPerTrade;
@@ -242,6 +245,7 @@ void CGameProcMain::ReleaseUIs()
242245
m_pUIInn->Release();
243246
m_pUICreateClanName->Release();
244247
m_pUIUpgradeSelect->Release();
248+
m_pUIItemUpgrade->Release();
245249
m_pUILevelGuide->Release();
246250

247251
CN3UIBase::DestroyTooltip();
@@ -4221,6 +4225,14 @@ void CGameProcMain::InitUI()
42214225
m_pUIUpgradeSelect->SetState(UI_STATE_COMMON_NONE);
42224226
m_pUIUpgradeSelect->SetStyle(m_pUIUpgradeSelect->GetStyle() | UISTYLE_USER_MOVE_HIDE | UISTYLE_SHOW_ME_ALONE);
42234227

4228+
m_pUIItemUpgrade->Init(s_pUIMgr);
4229+
m_pUIItemUpgrade->LoadFromFile(pTbl->szItemUpgrade);
4230+
m_pUIItemUpgrade->SetVisibleWithNoSound(false);
4231+
rc = m_pUIItemUpgrade->GetRegion();
4232+
m_pUIItemUpgrade->SetPos(iW - (rc.right - rc.left), 10);
4233+
m_pUIItemUpgrade->SetState(UI_STATE_COMMON_NONE);
4234+
m_pUIItemUpgrade->SetStyle(UISTYLE_USER_MOVE_HIDE | UISTYLE_SHOW_ME_ALONE);
4235+
42244236
//ui level guide
42254237
m_pUILevelGuide->Init(s_pUIMgr);
42264238
m_pUILevelGuide->LoadFromFile(pTbl->szLvlGuide);
@@ -5778,6 +5790,15 @@ void CGameProcMain::MsgRecv_ObjectEvent(Packet& pkt)
57785790
}
57795791
break;
57805792

5793+
case OBJECT_TYPE_ANVIL:
5794+
{
5795+
/*
5796+
if (iResult == 0) // anvil object failed animation
5797+
if (iResult == 1) // anvil object succeeded animation
5798+
*/
5799+
}
5800+
break;
5801+
57815802
default:
57825803
__ASSERT(0, "Unknown Object Event");
57835804
}
@@ -8001,14 +8022,12 @@ void CGameProcMain::MsgRecv_ItemUpgrade(Packet& pkt)
80018022
}
80028023
break;
80038024

8004-
// NOLINTNEXTLINE(bugprone-branch-clone)
80058025
case ITEM_UPGRADE_PROCESS:
8006-
#if 0 // TODO
80078026
if (m_pUIItemUpgrade != nullptr)
80088027
m_pUIItemUpgrade->MsgRecv_ItemUpgrade(pkt);
8009-
#endif
80108028
break;
80118029

8030+
// NOLINTNEXTLINE(bugprone-branch-clone)
80128031
case ITEM_UPGRADE_ACCESSORIES:
80138032
#if 0 // TODO
80148033
if (m_pUIRingUpgrade != nullptr)

src/Client/WarFare/GameProcMain.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ class CGameProcMain : public CGameProcedure
6464
class CUITradeBBSEditDlg* m_pUITradeBBSEdit; // 상거래 게시물 설명
6565

6666
class CUIUpgradeSelect* m_pUIUpgradeSelect;
67+
class CUIItemUpgrade* m_pUIItemUpgrade;
6768
class CUILevelGuide* m_pUILevelGuide;
6869

6970
class CN3Shape* m_pTargetSymbol; // 플레이어가 타겟으로 잡은 캐릭터의 위치위에 그리면 된다..

src/Client/WarFare/IconItemSkill.cpp

Lines changed: 49 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,17 @@
11
#include "StdAfx.h"
22
#include "IconItemSkill.h"
33
#include "GameDef.h"
4+
#include "N3UIIcon.h"
5+
#include "N3UIWndBase.h"
46

57
__IconItemSkill::__IconItemSkill()
68
{
9+
pUIIcon = nullptr;
710
pItemBasic = nullptr;
811
pItemExt = nullptr;
912
iCount = 0;
1013
iDurability = 0;
1114
pSkill = nullptr;
12-
pUIIcon = nullptr;
1315
}
1416

1517
int __IconItemSkill::GetItemID() const
@@ -55,3 +57,49 @@ int __IconItemSkill::GetSellPrice(bool bHasPremium /*= false*/) const
5557

5658
return iSellPrice;
5759
}
60+
61+
bool __IconItemSkill::IsStackable() const
62+
{
63+
if (pItemBasic == nullptr)
64+
return false;
65+
66+
return pItemBasic->byContable == UIITEM_TYPE_COUNTABLE || pItemBasic->byContable == UIITEM_TYPE_COUNTABLE_SMALL;
67+
}
68+
69+
void __IconItemSkill::CreateIcon(const std::string& szFN, CN3UIBase* pParent, uint32_t dwStyle, float fUVAspect)
70+
{
71+
szIconFN = szFN;
72+
73+
delete pUIIcon;
74+
pUIIcon = new CN3UIIcon();
75+
pUIIcon->Init(pParent);
76+
77+
pUIIcon->SetTex(szFN);
78+
pUIIcon->SetUVRect(0, 0, fUVAspect, fUVAspect);
79+
pUIIcon->SetStyle(dwStyle);
80+
pUIIcon->SetVisible(true);
81+
}
82+
83+
__IconItemSkill* __IconItemSkill::Clone(CN3UIBase* pParent)
84+
{
85+
__IconItemSkill* spItemNew = new __IconItemSkill();
86+
87+
spItemNew->szIconFN = szIconFN;
88+
spItemNew->pItemBasic = pItemBasic;
89+
spItemNew->pItemExt = pItemExt;
90+
spItemNew->pSkill = pSkill;
91+
spItemNew->iCount = iCount;
92+
spItemNew->iDurability = iDurability;
93+
94+
if (pUIIcon != nullptr)
95+
{
96+
spItemNew->pUIIcon = new CN3UIIcon();
97+
spItemNew->pUIIcon->Init(pParent);
98+
spItemNew->pUIIcon->SetTex(szIconFN);
99+
spItemNew->pUIIcon->SetUVRect(*pUIIcon->GetUVRect());
100+
spItemNew->pUIIcon->SetStyle(pUIIcon->GetStyle());
101+
spItemNew->pUIIcon->SetVisible(pUIIcon->IsVisible());
102+
}
103+
104+
return spItemNew;
105+
}

src/Client/WarFare/IconItemSkill.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,12 @@
33

44
#pragma once
55

6+
#include <N3Base/N3UIDef.h>
7+
68
#include <cstdint>
79
#include <string>
810

11+
class CN3UIBase;
912
class CN3UIIcon;
1013
struct __TABLE_ITEM_BASIC;
1114
struct __TABLE_ITEM_EXT;
@@ -29,9 +32,14 @@ struct __IconItemSkill
2932
};
3033

3134
__IconItemSkill();
35+
__IconItemSkill(const __IconItemSkill& src) = delete;
3236
int GetItemID() const;
3337
int GetBuyPrice() const;
3438
int GetSellPrice(bool bHasPremium = false) const;
39+
bool IsStackable() const;
40+
void CreateIcon(const std::string& szFN, CN3UIBase* pParent, uint32_t dwStyle = UISTYLE_ICON_ITEM | UISTYLE_ICON_CERTIFICATION_NEED,
41+
float fUVAspect = 45.0f / 64.0f);
42+
__IconItemSkill* Clone(CN3UIBase* pParent);
3543
};
3644

3745
#endif // CLIENT_WARFARE_ICONITEMSKILL_H

src/Client/WarFare/N3UIWndBase.h

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -34,17 +34,20 @@ enum e_UIWND : uint8_t
3434
// District Info..
3535
enum e_UIWND_DISTRICT : uint8_t
3636
{
37-
UIWND_DISTRICT_INVENTORY_SLOT = 0, // Slot district of Inventory Wnd..
38-
UIWND_DISTRICT_INVENTORY_INV, // Inv district of Inventory Wnd..
39-
UIWND_DISTRICT_TRADE_NPC, // Transaction district of Transaction Wnd of Npc..
40-
UIWND_DISTRICT_PER_TRADE_MY, // My Transaction district of Per Transaction Wnd..
41-
UIWND_DISTRICT_PER_TRADE_OTHER, // Other Transaction district of Per Transaction Wnd..
42-
UIWND_DISTRICT_DROPITEM, // Dropitem district of Drop item wnd..
43-
UIWND_DISTRICT_SKILL_TREE, // Skillicon district of Skill icon wnd..
44-
UIWND_DISTRICT_SKILL_HOTKEY, // Skillicon district of Hotkey icon wnd..
45-
UIWND_DISTRICT_TRADE_MY, // Npc 와의 거래에서 내 영역..
46-
UIWND_DISTRICT_PER_TRADE_INV, // Inv District of Per Trade Wnd ..
47-
UIWND_DISTRICT_UNKNOWN, // District Unknown..
37+
UIWND_DISTRICT_INVENTORY_SLOT = 0, // Slot district of Inventory Wnd..
38+
UIWND_DISTRICT_INVENTORY_INV, // Inv district of Inventory Wnd..
39+
UIWND_DISTRICT_TRADE_NPC, // Transaction district of Transaction Wnd of Npc..
40+
UIWND_DISTRICT_PER_TRADE_MY, // My Transaction district of Per Transaction Wnd..
41+
UIWND_DISTRICT_PER_TRADE_OTHER, // Other Transaction district of Per Transaction Wnd..
42+
UIWND_DISTRICT_DROPITEM, // Dropitem district of Drop item wnd..
43+
UIWND_DISTRICT_SKILL_TREE, // Skillicon district of Skill icon wnd..
44+
UIWND_DISTRICT_SKILL_HOTKEY, // Skillicon district of Hotkey icon wnd..
45+
UIWND_DISTRICT_TRADE_MY, // Npc 와의 거래에서 내 영역..
46+
UIWND_DISTRICT_PER_TRADE_INV, // Inv District of Per Trade Wnd ..
47+
UIWND_DISTRICT_UPGRADE_INV, // Upgrade Inv
48+
UIWND_DISTRICT_UPGRADE_SLOT, // Upgrade material slot
49+
UIWND_DISTRICT_UPGRADE_RESULT_SLOT, // Upgrade result slot
50+
UIWND_DISTRICT_UNKNOWN, // District Unknown..
4851
};
4952

5053
enum e_UIIconState : uint8_t

src/Client/WarFare/UIImageTooltipDlg.cpp

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -916,9 +916,7 @@ void CUIImageTooltipDlg::CalcTooltipStringNumAndWriteImpl(__IconItemSkill* spIte
916916
std::string szReduce;
917917
if (spItem->pItemExt->siNeedStrength < 0)
918918
{
919-
if (spItem->pItemExt->byMagicOrRare == ITEM_ATTRIB_UNIQUE || spItem->pItemExt->byMagicOrRare == ITEM_ATTRIB_UPGRADE
920-
|| spItem->pItemExt->byMagicOrRare == ITEM_ATTRIB_UNIQUE_REVERSE
921-
|| spItem->pItemExt->byMagicOrRare == ITEM_ATTRIB_UPGRADE_REVERSE)
919+
if (spItem->pItemExt->byMagicOrRare == ITEM_ATTRIB_UNIQUE || spItem->pItemExt->byMagicOrRare == ITEM_ATTRIB_UPGRADE)
922920
szReduce = fmt::format_text_resource(IDS_TOOLTIP_REDUCE);
923921
}
924922

@@ -943,9 +941,7 @@ void CUIImageTooltipDlg::CalcTooltipStringNumAndWriteImpl(__IconItemSkill* spIte
943941
std::string szReduce;
944942
if (spItem->pItemExt->siNeedStamina < 0)
945943
{
946-
if (spItem->pItemExt->byMagicOrRare == ITEM_ATTRIB_UNIQUE || spItem->pItemExt->byMagicOrRare == ITEM_ATTRIB_UPGRADE
947-
|| spItem->pItemExt->byMagicOrRare == ITEM_ATTRIB_UNIQUE_REVERSE
948-
|| spItem->pItemExt->byMagicOrRare == ITEM_ATTRIB_UPGRADE_REVERSE)
944+
if (spItem->pItemExt->byMagicOrRare == ITEM_ATTRIB_UNIQUE || spItem->pItemExt->byMagicOrRare == ITEM_ATTRIB_UPGRADE)
949945
szReduce = fmt::format_text_resource(IDS_TOOLTIP_REDUCE);
950946
}
951947

@@ -970,9 +966,7 @@ void CUIImageTooltipDlg::CalcTooltipStringNumAndWriteImpl(__IconItemSkill* spIte
970966
std::string szReduce;
971967
if (spItem->pItemExt->siNeedDexterity < 0)
972968
{
973-
if (spItem->pItemExt->byMagicOrRare == ITEM_ATTRIB_UNIQUE || spItem->pItemExt->byMagicOrRare == ITEM_ATTRIB_UPGRADE
974-
|| spItem->pItemExt->byMagicOrRare == ITEM_ATTRIB_UNIQUE_REVERSE
975-
|| spItem->pItemExt->byMagicOrRare == ITEM_ATTRIB_UPGRADE_REVERSE)
969+
if (spItem->pItemExt->byMagicOrRare == ITEM_ATTRIB_UNIQUE || spItem->pItemExt->byMagicOrRare == ITEM_ATTRIB_UPGRADE)
976970
szReduce = fmt::format_text_resource(IDS_TOOLTIP_REDUCE);
977971
}
978972

@@ -997,9 +991,7 @@ void CUIImageTooltipDlg::CalcTooltipStringNumAndWriteImpl(__IconItemSkill* spIte
997991
std::string szReduce;
998992
if (spItem->pItemExt->siNeedInteli < 0)
999993
{
1000-
if (spItem->pItemExt->byMagicOrRare == ITEM_ATTRIB_UNIQUE || spItem->pItemExt->byMagicOrRare == ITEM_ATTRIB_UPGRADE
1001-
|| spItem->pItemExt->byMagicOrRare == ITEM_ATTRIB_UNIQUE_REVERSE
1002-
|| spItem->pItemExt->byMagicOrRare == ITEM_ATTRIB_UPGRADE_REVERSE)
994+
if (spItem->pItemExt->byMagicOrRare == ITEM_ATTRIB_UNIQUE || spItem->pItemExt->byMagicOrRare == ITEM_ATTRIB_UPGRADE)
1003995
szReduce = fmt::format_text_resource(IDS_TOOLTIP_REDUCE);
1004996
}
1005997

@@ -1024,9 +1016,7 @@ void CUIImageTooltipDlg::CalcTooltipStringNumAndWriteImpl(__IconItemSkill* spIte
10241016
std::string szReduce;
10251017
if (spItem->pItemExt->siNeedMagicAttack < 0)
10261018
{
1027-
if (spItem->pItemExt->byMagicOrRare == ITEM_ATTRIB_UNIQUE || spItem->pItemExt->byMagicOrRare == ITEM_ATTRIB_UPGRADE
1028-
|| spItem->pItemExt->byMagicOrRare == ITEM_ATTRIB_UNIQUE_REVERSE
1029-
|| spItem->pItemExt->byMagicOrRare == ITEM_ATTRIB_UPGRADE_REVERSE)
1019+
if (spItem->pItemExt->byMagicOrRare == ITEM_ATTRIB_UNIQUE || spItem->pItemExt->byMagicOrRare == ITEM_ATTRIB_UPGRADE)
10301020
szReduce = fmt::format_text_resource(IDS_TOOLTIP_REDUCE);
10311021
}
10321022

0 commit comments

Comments
 (0)