From 45bc21e5c90a2d6f1bab812c07ba9b8a98e9e109 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Sun, 22 Nov 2020 02:05:54 +0800 Subject: [PATCH] Show characteristic buffs of item in icon, fix forge enhancement, kaetemi/ryzomclassic#203 --- .../gamedev/interfaces_v3/bot_chat_v4.xml | 8 +- .../gamedev/interfaces_v3/local_database.xml | 8 ++ .../gamedev/interfaces_v3/login_widgets.xml | 3 +- .../data/gamedev/interfaces_v3/phrase.xml | 12 ++- .../data/gamedev/interfaces_v3/widgets.xml | 12 ++- .../client/src/interface_v3/dbctrl_sheet.cpp | 83 ++++++++++++++++++- ryzom/client/src/interface_v3/dbctrl_sheet.h | 18 +++- .../client/src/interface_v3/obs_huge_list.cpp | 8 ++ ryzom/client/src/interface_v3/obs_huge_list.h | 3 + ryzom/common/src/game_share/inventories.cpp | 4 +- ryzom/common/src/game_share/inventories.h | 2 +- .../game_item_manager/guild_inv.cpp | 2 +- .../game_item_manager/player_inventory.cpp | 2 +- 13 files changed, 146 insertions(+), 19 deletions(-) diff --git a/ryzom/client/data/gamedev/interfaces_v3/bot_chat_v4.xml b/ryzom/client/data/gamedev/interfaces_v3/bot_chat_v4.xml index efca1e889..82ae4fb0b 100644 --- a/ryzom/client/data/gamedev/interfaces_v3/bot_chat_v4.xml +++ b/ryzom/client/data/gamedev/interfaces_v3/bot_chat_v4.xml @@ -299,7 +299,8 @@ - + + @@ -314,7 +315,8 @@ - + + @@ -532,6 +534,7 @@ + @@ -539,6 +542,7 @@ + diff --git a/ryzom/client/data/gamedev/interfaces_v3/local_database.xml b/ryzom/client/data/gamedev/interfaces_v3/local_database.xml index e9568abb6..71d702400 100644 --- a/ryzom/client/data/gamedev/interfaces_v3/local_database.xml +++ b/ryzom/client/data/gamedev/interfaces_v3/local_database.xml @@ -25,6 +25,7 @@ + @@ -50,6 +51,7 @@ + @@ -83,6 +85,7 @@ + @@ -107,6 +110,7 @@ + @@ -141,6 +145,7 @@ + @@ -175,6 +180,7 @@ + @@ -194,6 +200,7 @@ + @@ -223,6 +230,7 @@ + diff --git a/ryzom/client/data/gamedev/interfaces_v3/login_widgets.xml b/ryzom/client/data/gamedev/interfaces_v3/login_widgets.xml index d80d16fdc..9812b88fd 100644 --- a/ryzom/client/data/gamedev/interfaces_v3/login_widgets.xml +++ b/ryzom/client/data/gamedev/interfaces_v3/login_widgets.xml @@ -908,7 +908,8 @@ - + + diff --git a/ryzom/client/data/gamedev/interfaces_v3/phrase.xml b/ryzom/client/data/gamedev/interfaces_v3/phrase.xml index 187ef65c6..355d3abaa 100644 --- a/ryzom/client/data/gamedev/interfaces_v3/phrase.xml +++ b/ryzom/client/data/gamedev/interfaces_v3/phrase.xml @@ -500,14 +500,16 @@ - + + @@ -520,7 +522,8 @@ - + + @@ -529,7 +532,8 @@ - + + diff --git a/ryzom/client/data/gamedev/interfaces_v3/widgets.xml b/ryzom/client/data/gamedev/interfaces_v3/widgets.xml index 0ea99eea7..2190c88c1 100644 --- a/ryzom/client/data/gamedev/interfaces_v3/widgets.xml +++ b/ryzom/client/data/gamedev/interfaces_v3/widgets.xml @@ -627,7 +627,8 @@ - + + @@ -897,7 +898,8 @@ - + + @@ -1141,7 +1143,8 @@ - + + @@ -1165,7 +1168,8 @@ - + + diff --git a/ryzom/client/src/interface_v3/dbctrl_sheet.cpp b/ryzom/client/src/interface_v3/dbctrl_sheet.cpp index af28ec185..792c0706b 100644 --- a/ryzom/client/src/interface_v3/dbctrl_sheet.cpp +++ b/ryzom/client/src/interface_v3/dbctrl_sheet.cpp @@ -568,10 +568,12 @@ CCtrlDraggable(param) _ItemRMFaberStatType= NULL; _NotifyAnimEndTime = 0; +#ifdef RYZOM_FORGE _HpBuffIcon = "ico_heal.tga"; _SapBuffIcon = "ico_sap.tga"; _StaBuffIcon = "ico_stamina.tga"; _FocusBuffIcon = "ico_focus.tga"; +#endif _RegenText = NULL; _RegenTextValue = 0; @@ -672,6 +674,7 @@ bool CDBCtrlSheet::parse(xmlNodePtr cur, CInterfaceGroup * parentGroup) prop = (char*) xmlGetProp( cur, (xmlChar*)"slot" ); if(prop) _DrawSlot= CInterfaceElement::convertBool(prop); +#ifdef RYZOM_FORGE // _HpBuffIcon = "ico_heal.tga"; prop = (char*) xmlGetProp( cur, (xmlChar*)"hp_buff_icon" ); @@ -688,6 +691,7 @@ bool CDBCtrlSheet::parse(xmlNodePtr cur, CInterfaceGroup * parentGroup) _FocusBuffIcon = "ico_focus.tga"; prop = (char*) xmlGetProp( cur, (xmlChar*)"focus_buff_icon" ); if (prop) _FocusBuffIcon = string((const char *)prop); +#endif updateActualType(); // Init size for Type @@ -1109,6 +1113,24 @@ void CDBCtrlSheet::updateIconSize() } } +void CDBCtrlSheet::updateCharacBuffs() +{ + CViewRenderer &rVR = *CViewRenderer::getInstance(); + uint8 characBuffs = getItemCharacBuffs(); + + _BuffIcons.clear(); + if (characBuffs & (1 << CHARACTERISTICS::constitution)) _BuffIcons.push_back(SBuffIcon(rVR.getTextureIdFromName("ico_heal.tga"))); + if (characBuffs & (1 << CHARACTERISTICS::intelligence)) _BuffIcons.push_back(SBuffIcon(rVR.getTextureIdFromName("ico_sap.tga"))); + if (characBuffs & (1 << CHARACTERISTICS::strength)) _BuffIcons.push_back(SBuffIcon(rVR.getTextureIdFromName("ico_stamina.tga"))); + if (characBuffs & (1 << CHARACTERISTICS::dexterity)) _BuffIcons.push_back(SBuffIcon(rVR.getTextureIdFromName("ico_focus.tga"))); + + // update sizes + for(uint i = 0; i < _BuffIcons.size(); ++i) + { + rVR.getTextureSizeFromId(_BuffIcons[i].TextureId, _BuffIcons[i].IconW, _BuffIcons[i].IconH); + } +} + #ifdef RYZOM_FORGE // *************************************************************************** void CDBCtrlSheet::clearIconBuffs() @@ -1160,6 +1182,7 @@ void CDBCtrlSheet::infoReceived() } } +#if 0 // buff icons { CViewRenderer &rVR = *CViewRenderer::getInstance(); @@ -1175,6 +1198,7 @@ void CDBCtrlSheet::infoReceived() rVR.getTextureSizeFromId(_BuffIcons[i].TextureId, _BuffIcons[i].IconW, _BuffIcons[i].IconH); } } +#endif } #endif @@ -1346,6 +1370,9 @@ void CDBCtrlSheet::setupItem () // Special Item requirement updateItemCharacRequirement(_LastSheetId); + // Update buff icons + updateCharacBuffs(); + #ifdef RYZOM_FORGE // update item info markers _ItemInfoChanged = true; @@ -2433,11 +2460,11 @@ void CDBCtrlSheet::drawSheet (sint32 x, sint32 y, bool draging, bool showSelecti hIcon = hArea; } rVR.drawRotFlipBitmap (_RenderLayer+1, xIcon, yIcon, wIcon, hIcon, 0, false, _BuffIcons[i].TextureId, fastMulRGB(curSheetColor, _BuffIcons[i].Color)); - xIcon += wIcon; + xIcon += wIcon / 2; // move up the row for 3rd/4th icon if (i % 3 == 1) { xIcon = x; - yIcon += hIcon; + yIcon += hIcon / 2; } } } @@ -3251,6 +3278,8 @@ void CDBCtrlSheet::swapSheet(CDBCtrlSheet *other) // swap the other props only if the DB exist in the 2 version. else no-op swapDBProps(_UserColor, other->_UserColor); + swapDBProps(getItemCharacBuffsPtr(), other->getItemCharacBuffsPtr()); + swapDBProps(getItemAccessPtr(), other->getItemAccessPtr()); swapDBProps(getItemLockedPtr(), other->getItemLockedPtr()); swapDBProps(getItemWeightPtr(), other->getItemWeightPtr()); swapDBProps(getItemInfoVersionPtr(), other->getItemInfoVersionPtr()); @@ -3922,6 +3951,10 @@ void CDBCtrlSheet::copyAspect(CDBCtrlSheet *dest) // copy color for items sint col = getItemColor(); if (col != -1) dest->setItemColor(col); + // copy charac buffs + dest->setItemCharacBuffs(getItemCharacBuffs()); + // copy access + dest->setItemAccess(getItemAccess()); // copy weight dest->setItemWeight(getItemWeight()); // copy nameId @@ -4616,6 +4649,52 @@ void CDBCtrlSheet::setItemPrerequisitValid(bool prv) node->setValueBool(prv); } +// *************************************************************************** +uint8 CDBCtrlSheet::getItemCharacBuffs() const +{ + CCDBNodeLeaf *node = getItemCharacBuffsPtr(); + return (node ? (uint8)node->getValue8() : 0); +} + +// *************************************************************************** +CCDBNodeLeaf *CDBCtrlSheet::getItemCharacBuffsPtr() const +{ + CCDBNodeBranch *root = getRootBranch(); + if (!root) return NULL; + return dynamic_cast(root->getNode(ICDBNode::CTextId("CHARAC_BUFFS"), false)); +} + +// *************************************************************************** +void CDBCtrlSheet::setItemCharacBuffs(uint8 val) +{ + CCDBNodeLeaf *node = getItemCharacBuffsPtr(); + if (!node) return; + node->setValue8((sint8)val); +} + +// *************************************************************************** +uint8 CDBCtrlSheet::getItemAccess() const // TODO: Guild grade & proper default +{ + CCDBNodeLeaf *node = getItemAccessPtr(); + return (node ? (uint8)node->getValue8() : 0); +} + +// *************************************************************************** +CCDBNodeLeaf *CDBCtrlSheet::getItemAccessPtr() const +{ + CCDBNodeBranch *root = getRootBranch(); + if (!root) return NULL; + return dynamic_cast(root->getNode(ICDBNode::CTextId("ACCESS"), false)); +} + +// *************************************************************************** +void CDBCtrlSheet::setItemAccess(uint8 val) +{ + CCDBNodeLeaf *node = getItemAccessPtr(); + if (!node) return; + node->setValue8((sint8)val); +} + // *************************************************************************** void CDBCtrlSheet::initArmourColors() { diff --git a/ryzom/client/src/interface_v3/dbctrl_sheet.h b/ryzom/client/src/interface_v3/dbctrl_sheet.h index d023d41af..0f56fee9d 100644 --- a/ryzom/client/src/interface_v3/dbctrl_sheet.h +++ b/ryzom/client/src/interface_v3/dbctrl_sheet.h @@ -581,7 +581,7 @@ public: // set item FABER_STAT_TYPE void setItemRMFaberStatType(sint32 fss); - // get item PREREQUISIT_VALID. true of no DB + // get item PREREQUISIT_VALID. true if no DB bool getItemPrerequisitValid() const; NLMISC::CCDBNodeLeaf *getItemPrerequisitValidPtr() const; // set item PREREQUISIT_VALID @@ -592,6 +592,18 @@ public: // set item color (if possible) void setItemColor(sint32 val) {if(_UserColor) _UserColor->setValue32(val);} + // get item CHARAC_BUFFS. 0 if no DB + uint8 getItemCharacBuffs() const; + NLMISC::CCDBNodeLeaf *getItemCharacBuffsPtr() const; + // set item CHARAC_BUFFS + void setItemCharacBuffs(uint8 val); + + // get item ACCESS. 0 if no DB + uint8 getItemAccess() const; // TODO: Guild grade & proper default + NLMISC::CCDBNodeLeaf *getItemAccessPtr() const; + // set item CHARAC_BUFFS + void setItemAccess(uint8 val); + // Get the Actual item name. Localized version of SheetId, or given by server through NAMEID. std::string getItemActualName() const; @@ -616,6 +628,8 @@ public: // start notify anim (at the end of regen usually) void startNotifyAnim(); + void updateCharacBuffs(); + #ifdef RYZOM_FORGE // callback from info waiter void infoReceived(); @@ -682,10 +696,12 @@ protected: sint32 _DispOverBmpId; // Over Icon sint32 _DispOver2BmpId; // Over Icon N0 2 for bricks / items. Useful for items when _DispOverBmpId is used to paint user color on the item. +#ifdef RYZOM_FORGE std::string _HpBuffIcon; std::string _SapBuffIcon; std::string _StaBuffIcon; std::string _FocusBuffIcon; +#endif // texture ids to show struct SBuffIcon diff --git a/ryzom/client/src/interface_v3/obs_huge_list.cpp b/ryzom/client/src/interface_v3/obs_huge_list.cpp index bdf82e98d..53ca45dad 100644 --- a/ryzom/client/src/interface_v3/obs_huge_list.cpp +++ b/ryzom/client/src/interface_v3/obs_huge_list.cpp @@ -169,6 +169,7 @@ bool CHugeListObs::init() _Items[k].Weight = NLGUI::CDBManager::getInstance()->getDbProp(toString((dbPath + ":%d:WEIGHT").c_str(), (int) k), false); _Items[k].NameId = NLGUI::CDBManager::getInstance()->getDbProp(toString((dbPath + ":%d:NAMEID").c_str(), (int) k), false); _Items[k].UserColor = NLGUI::CDBManager::getInstance()->getDbProp(toString((dbPath + ":%d:USER_COLOR").c_str(), (int) k), false); + _Items[k].CharacBuffs = NLGUI::CDBManager::getInstance()->getDbProp(toString((dbPath + ":%d:CHARAC_BUFFS").c_str(), (int) k), false); _Items[k].Enchant = NLGUI::CDBManager::getInstance()->getDbProp(toString((dbPath + ":%d:ENCHANT").c_str(), (int) k), false); _Items[k].RMClassType = NLGUI::CDBManager::getInstance()->getDbProp(toString((dbPath + ":%d:RM_CLASS_TYPE").c_str(), (int) k), false); _Items[k].RMFaberStatType = NLGUI::CDBManager::getInstance()->getDbProp(toString((dbPath + ":%d:RM_FABER_STAT_TYPE").c_str(), (int) k), false); @@ -200,6 +201,7 @@ bool CHugeListObs::init() _Items[k].Weight = NLGUI::CDBManager::getInstance()->getDbProp(toString((dbPath + ":%d:WEIGHT").c_str(), (int) k), false); _Items[k].NameId = NLGUI::CDBManager::getInstance()->getDbProp(toString((dbPath + ":%d:NAMEID").c_str(), (int) k), false); _Items[k].UserColor = NLGUI::CDBManager::getInstance()->getDbProp(toString((dbPath + ":%d:USER_COLOR").c_str(), (int) k), false); + _Items[k].CharacBuffs = NLGUI::CDBManager::getInstance()->getDbProp(toString((dbPath + ":%d:CHARAC_BUFFS").c_str(), (int) k), false); _Items[k].Enchant = NLGUI::CDBManager::getInstance()->getDbProp(toString((dbPath + ":%d:ENCHANT").c_str(), (int) k), false); _Items[k].RMClassType = NLGUI::CDBManager::getInstance()->getDbProp(toString((dbPath + ":%d:RM_CLASS_TYPE").c_str(), (int) k), false); _Items[k].RMFaberStatType = NLGUI::CDBManager::getInstance()->getDbProp(toString((dbPath + ":%d:RM_FABER_STAT_TYPE").c_str(), (int) k), false); @@ -391,6 +393,7 @@ void CHugeListObs::update(ICDBNode * /* node */) page.Items[k].Weight= (uint16) _Items[k].Weight->getValue16(); page.Items[k].NameId= (uint32) _Items[k].NameId->getValue32(); page.Items[k].UserColor = _Items[k].UserColor->getValue32(); + page.Items[k].CharacBuffs = _Items[k].CharacBuffs->getValue32(); page.Items[k].Enchant = _Items[k].Enchant->getValue32(); page.Items[k].RMClassType = _Items[k].RMClassType->getValue32(); page.Items[k].RMFaberStatType = _Items[k].RMFaberStatType->getValue32(); @@ -429,6 +432,7 @@ void CHugeListObs::update(ICDBNode * /* node */) page.Items[k].Weight= (uint16) _Items[k].Weight->getValue16(); page.Items[k].NameId= (uint32) _Items[k].NameId->getValue32(); page.Items[k].UserColor = _Items[k].UserColor->getValue32(); + page.Items[k].CharacBuffs = _Items[k].CharacBuffs->getValue32(); page.Items[k].Enchant = _Items[k].Enchant->getValue32(); page.Items[k].RMClassType = _Items[k].RMClassType->getValue32(); page.Items[k].RMFaberStatType = _Items[k].RMFaberStatType->getValue32(); @@ -584,6 +588,8 @@ void CHugeListObs::updateUIItemPage(uint index) if (leaf) leaf->setValue32(currItem.NameId); leaf = NLGUI::CDBManager::getInstance()->getDbProp(dbPath + toString(k + index * TRADE_PAGE_NUM_ITEMS) + ":USER_COLOR", false); if (leaf) leaf->setValue32(currItem.UserColor); + leaf = NLGUI::CDBManager::getInstance()->getDbProp(dbPath + toString(k + index * TRADE_PAGE_NUM_ITEMS) + ":CHARAC_BUFFS", false); + if (leaf) leaf->setValue32(currItem.CharacBuffs); leaf = NLGUI::CDBManager::getInstance()->getDbProp(dbPath + toString(k + index * TRADE_PAGE_NUM_ITEMS) + ":ENCHANT", false); if (leaf) leaf->setValue32(currItem.Enchant); leaf = NLGUI::CDBManager::getInstance()->getDbProp(dbPath + toString(k + index * TRADE_PAGE_NUM_ITEMS) + ":RM_CLASS_TYPE", false); @@ -627,6 +633,8 @@ void CHugeListObs::updateUIItemPage(uint index) if (leaf) leaf->setValue32(currItem.NameId); leaf = NLGUI::CDBManager::getInstance()->getDbProp(dbPath + toString(k + index * TRADE_PAGE_NUM_ITEMS) + ":USER_COLOR", false); if (leaf) leaf->setValue32(currItem.UserColor); + leaf = NLGUI::CDBManager::getInstance()->getDbProp(dbPath + toString(k + index * TRADE_PAGE_NUM_ITEMS) + ":CHARAC_BUFFS", false); + if (leaf) leaf->setValue32(currItem.CharacBuffs); leaf = NLGUI::CDBManager::getInstance()->getDbProp(dbPath + toString(k + index * TRADE_PAGE_NUM_ITEMS) + ":ENCHANT", false); if (leaf) leaf->setValue32(currItem.Enchant); leaf = NLGUI::CDBManager::getInstance()->getDbProp(dbPath + toString(k + index * TRADE_PAGE_NUM_ITEMS) + ":RM_CLASS", false); diff --git a/ryzom/client/src/interface_v3/obs_huge_list.h b/ryzom/client/src/interface_v3/obs_huge_list.h index 7b69d61d2..9e212c7bb 100644 --- a/ryzom/client/src/interface_v3/obs_huge_list.h +++ b/ryzom/client/src/interface_v3/obs_huge_list.h @@ -143,6 +143,7 @@ private: NLMISC::CCDBNodeLeaf *NameId; NLMISC::CCDBNodeLeaf *InfoVersion; NLMISC::CCDBNodeLeaf *UserColor; + NLMISC::CCDBNodeLeaf *CharacBuffs; NLMISC::CCDBNodeLeaf *Enchant; NLMISC::CCDBNodeLeaf *RMClassType; NLMISC::CCDBNodeLeaf *RMFaberStatType; @@ -172,6 +173,7 @@ private: NameId(NULL), InfoVersion(NULL), UserColor(NULL), + CharacBuffs(NULL), Enchant(NULL), RMClassType(NULL), RMFaberStatType(NULL), @@ -233,6 +235,7 @@ private: uint32 NameId; // Valid for items uint32 InfoVersion; // Valid for items sint32 UserColor; // Valid for items + uint32 CharacBuffs; // Valid for items uint32 Enchant; uint32 RMClassType; uint32 RMFaberStatType; diff --git a/ryzom/common/src/game_share/inventories.cpp b/ryzom/common/src/game_share/inventories.cpp index e7de9ca27..c3ead9fc0 100644 --- a/ryzom/common/src/game_share/inventories.cpp +++ b/ryzom/common/src/game_share/inventories.cpp @@ -122,8 +122,8 @@ namespace INVENTORIES const char *InfoVersionStr = "INFO_VERSION"; const char *CItemSlot::ItemPropStr [NbItemPropId] = - { "SHEET", "QUALITY", "QUANTITY", "USER_COLOR", "BUFFS", "LOCKED", "ACCESS", "WEIGHT", "NAMEID", "ENCHANT", "RM_CLASS_TYPE", "RM_FABER_STAT_TYPE", "PREREQUISIT_VALID", "PRICE", "RESALE_FLAG", "WORNED" }; + { "SHEET", "QUALITY", "QUANTITY", "USER_COLOR", "CHARAC_BUFFS", "LOCKED", "ACCESS", "WEIGHT", "NAMEID", "ENCHANT", "RM_CLASS_TYPE", "RM_FABER_STAT_TYPE", "PREREQUISIT_VALID", "PRICE", "RESALE_FLAG", "WORNED" }; const uint CItemSlot::DataBitSize [NbItemPropId] = - { 32, 10, 10, 3, 8, 10, 2, 16, 32, 10, 3, 5, 1, 32, 2, 1, }; + { 32, 10, 10, 3, 8, 10, 2, 16, 32, 10, 3, 5, 1, 32, 2, 1, }; } diff --git a/ryzom/common/src/game_share/inventories.h b/ryzom/common/src/game_share/inventories.h index 8ff5861b6..c2b98f28c 100644 --- a/ryzom/common/src/game_share/inventories.h +++ b/ryzom/common/src/game_share/inventories.h @@ -266,7 +266,7 @@ namespace INVENTORIES Quality, Quantity, UserColor, - Buffs, + CharacBuffs, Locked, Access, Weight, diff --git a/ryzom/server/src/entities_game_service/game_item_manager/guild_inv.cpp b/ryzom/server/src/entities_game_service/game_item_manager/guild_inv.cpp index 4d131acb2..01d94b94f 100644 --- a/ryzom/server/src/entities_game_service/game_item_manager/guild_inv.cpp +++ b/ryzom/server/src/entities_game_service/game_item_manager/guild_inv.cpp @@ -137,7 +137,7 @@ void CGuildInventoryView::updateClientSlot(uint32 slot) itemSlot.setItemProp( INVENTORIES::Quality, item->quality() ); itemSlot.setItemProp( INVENTORIES::Quantity, item->getStackSize() ); itemSlot.setItemProp( INVENTORIES::UserColor, item->color() ); - itemSlot.setItemProp( INVENTORIES::Buffs, item->buffFlags() ); + itemSlot.setItemProp( INVENTORIES::CharacBuffs, item->buffFlags() ); itemSlot.setItemProp( INVENTORIES::Locked, 0 ); itemSlot.setItemProp( INVENTORIES::Access, item->getAccessGrade() ); itemSlot.setItemProp( INVENTORIES::Weight, item->weight() / 10 ); diff --git a/ryzom/server/src/entities_game_service/game_item_manager/player_inventory.cpp b/ryzom/server/src/entities_game_service/game_item_manager/player_inventory.cpp index 38812d67c..ec4dcfd4f 100644 --- a/ryzom/server/src/entities_game_service/game_item_manager/player_inventory.cpp +++ b/ryzom/server/src/entities_game_service/game_item_manager/player_inventory.cpp @@ -1087,7 +1087,7 @@ void CCharacterInvView::updateClientSlot(uint32 slot, const CGameItemPtr item) itemSlot.setItemProp( INVENTORIES::Quality, item->quality() ); itemSlot.setItemProp( INVENTORIES::Quantity, item->getStackSize() ); itemSlot.setItemProp( INVENTORIES::UserColor, item->color() ); - itemSlot.setItemProp( INVENTORIES::Buffs, item->buffFlags() ); + itemSlot.setItemProp( INVENTORIES::CharacBuffs, item->buffFlags() ); itemSlot.setItemProp( INVENTORIES::Locked, item->getLockCount() ); itemSlot.setItemProp( INVENTORIES::Access, 0 ); // don't care here itemSlot.setItemProp( INVENTORIES::Weight, item->weight() / 10 );