From 4636e328857eef6e1426a215483cbd83b3004525 Mon Sep 17 00:00:00 2001 From: Nimetu Date: Tue, 28 May 2019 21:50:41 +0300 Subject: [PATCH] Fixed: Add missing properties to trade/mission item db --HG-- branch : feature-item-icon-buffs --- .../client/src/interface_v3/obs_huge_list.cpp | 19 ++++++++++++++++++- .../client/src/interface_v3/obs_huge_list.h | 6 ++++++ 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/code/ryzom/client/src/interface_v3/obs_huge_list.cpp b/code/ryzom/client/src/interface_v3/obs_huge_list.cpp index 76506ed57..03c2d973a 100644 --- a/code/ryzom/client/src/interface_v3/obs_huge_list.cpp +++ b/code/ryzom/client/src/interface_v3/obs_huge_list.cpp @@ -161,6 +161,8 @@ bool CHugeListObs::init() case Trading: _Items[k].SlotType = NLGUI::CDBManager::getInstance()->getDbProp(toString((dbPath + ":%d:SLOT_TYPE").c_str(), (int) k), false); _Items[k].Quality = NLGUI::CDBManager::getInstance()->getDbProp(toString((dbPath + ":%d:QUALITY").c_str(), (int) k), false); + _Items[k].Serial = NLGUI::CDBManager::getInstance()->getDbProp(toString((dbPath + ":%d:SERIAL").c_str(), (int) k), false); + _Items[k].CreateTime = NLGUI::CDBManager::getInstance()->getDbProp(toString((dbPath + ":%d:CREATE_TIME").c_str(), (int) k), false); _Items[k].SheetIDOrSkill = NLGUI::CDBManager::getInstance()->getDbProp(toString((dbPath + ":%d:SHEET").c_str(), (int) k), false); _Items[k].Price = NLGUI::CDBManager::getInstance()->getDbProp(toString((dbPath + ":%d:PRICE").c_str(), (int) k), false); _Items[k].Weight = NLGUI::CDBManager::getInstance()->getDbProp(toString((dbPath + ":%d:WEIGHT").c_str(), (int) k), false); @@ -181,6 +183,7 @@ bool CHugeListObs::init() if ((_Items[k].SlotType == NULL) || (_Items[k].Quality == NULL) || (_Items[k].SheetIDOrSkill == NULL) || (_Items[k].Price == NULL) || (_Items[k].Weight==NULL) || (_Items[k].InfoVersion==NULL) || (_Items[k].UserColor==NULL) || (_Items[k].NameId==NULL) || (_Items[k].Quantity==NULL) || + (_Items[k].Serial == NULL) || (_Items[k].CreateTime == NULL) || (_Items[k].PriceRetire==NULL) || (_Items[k].SellerType==NULL) || (_Items[k].ResaleTimeLeft==NULL) || (_Items[k].VendorNameId==NULL) || (_Items[k].Enchant ==NULL) || (_Items[k].RMClassType == NULL) || (_Items[k].RMFaberStatType == NULL) || (_Items[k].PrerequisitValid == NULL) || @@ -191,6 +194,8 @@ bool CHugeListObs::init() case ItemForMissions: _Items[k].SlotType = NLGUI::CDBManager::getInstance()->getDbProp(toString((dbPath + ":%d:SLOT_TYPE").c_str(), (int) k), false); _Items[k].Quality = NLGUI::CDBManager::getInstance()->getDbProp(toString((dbPath + ":%d:QUALITY").c_str(), (int) k), false); + _Items[k].Serial = NLGUI::CDBManager::getInstance()->getDbProp(toString((dbPath + ":%d:SERIAL").c_str(), (int) k), false); + _Items[k].CreateTime = NLGUI::CDBManager::getInstance()->getDbProp(toString((dbPath + ":%d:CREATE_TIME").c_str(), (int) k), false); _Items[k].SheetIDOrSkill = NLGUI::CDBManager::getInstance()->getDbProp(toString((dbPath + ":%d:SHEET").c_str(), (int) k), false); _Items[k].LogicTextID = NLGUI::CDBManager::getInstance()->getDbProp(toString((dbPath + ":%d:LOGIC_TEXT_ID").c_str(), (int) k), false); _Items[k].DescTextID = NLGUI::CDBManager::getInstance()->getDbProp(toString((dbPath + ":%d:DESC_TEXT_ID").c_str(), (int) k), false); @@ -205,7 +210,7 @@ bool CHugeListObs::init() (_Items[k].LogicTextID == NULL) || (_Items[k].DescTextID == NULL) || (_Items[k].Weight==NULL) || (_Items[k].InfoVersion==NULL) || (_Items[k].UserColor==NULL) || (_Items[k].Enchant ==NULL) || (_Items[k].RMClassType == NULL) || (_Items[k].RMFaberStatType == NULL) || - (_Items[k].NameId==NULL) + (_Items[k].NameId==NULL) || (_Items[k].Serial == NULL) || (_Items[k].CreateTime == NULL) ) return false; break; @@ -383,6 +388,8 @@ void CHugeListObs::update(ICDBNode * /* node */) { page.Items[k].SlotType = (TRADE_SLOT_TYPE::TTradeSlotType) _Items[k].SlotType->getValue32(); page.Items[k].Quality = (uint16) _Items[k].Quality->getValue16(); + page.Items[k].Serial = (uint32) _Items[k].Serial->getValue32(); + page.Items[k].CreateTime = (uint32) _Items[k].CreateTime->getValue32(); page.Items[k].SheetIDOrSkill = (uint32) _Items[k].SheetIDOrSkill->getValue32(); page.Items[k].Price = (uint32) _Items[k].Price->getValue32(); page.Items[k].Weight= (uint16) _Items[k].Weight->getValue16(); @@ -420,6 +427,8 @@ void CHugeListObs::update(ICDBNode * /* node */) case ItemForMissions: page.Items[k].SlotType = (TRADE_SLOT_TYPE::TTradeSlotType) _Items[k].SlotType->getValue32(); page.Items[k].Quality = (uint16) _Items[k].Quality->getValue16(); + page.Items[k].Serial = (uint32) _Items[k].Serial->getValue32(); + page.Items[k].CreateTime = (uint32) _Items[k].CreateTime->getValue32(); page.Items[k].SheetIDOrSkill = (uint32) _Items[k].SheetIDOrSkill->getValue32(); page.Items[k].LogicTextID = (uint32) _Items[k].LogicTextID->getValue32(); page.Items[k].DescTextID = (uint32) _Items[k].DescTextID->getValue32(); @@ -569,6 +578,10 @@ void CHugeListObs::updateUIItemPage(uint index) case Trading: leaf = NLGUI::CDBManager::getInstance()->getDbProp(dbPath + toString(k + index * TRADE_PAGE_NUM_ITEMS) + ":QUALITY", false); if (leaf) leaf->setValue32(currItem.Quality); + leaf = NLGUI::CDBManager::getInstance()->getDbProp(dbPath + toString(k + index * TRADE_PAGE_NUM_ITEMS) + ":SERIAL", false); + if (leaf) leaf->setValue32(currItem.Serial); + leaf = NLGUI::CDBManager::getInstance()->getDbProp(dbPath + toString(k + index * TRADE_PAGE_NUM_ITEMS) + ":CREATE_TIME", false); + if (leaf) leaf->setValue32(currItem.CreateTime); leaf = NLGUI::CDBManager::getInstance()->getDbProp(dbPath + toString(k + index * TRADE_PAGE_NUM_ITEMS) + ":SLOT_TYPE", false); if (leaf) leaf->setValue32(currItem.SlotType); leaf = NLGUI::CDBManager::getInstance()->getDbProp(dbPath + toString(k + index * TRADE_PAGE_NUM_ITEMS) + ":SHEET", false); @@ -610,6 +623,10 @@ void CHugeListObs::updateUIItemPage(uint index) case ItemForMissions: leaf = NLGUI::CDBManager::getInstance()->getDbProp(dbPath + toString(k + index * TRADE_PAGE_NUM_ITEMS) + ":QUALITY", false); if (leaf) leaf->setValue32(currItem.Quality); + leaf = NLGUI::CDBManager::getInstance()->getDbProp(dbPath + toString(k + index * TRADE_PAGE_NUM_ITEMS) + ":SERIAL", false); + if (leaf) leaf->setValue32(currItem.Serial); + leaf = NLGUI::CDBManager::getInstance()->getDbProp(dbPath + toString(k + index * TRADE_PAGE_NUM_ITEMS) + ":CREATE_TIME", false); + if (leaf) leaf->setValue32(currItem.CreateTime); leaf = NLGUI::CDBManager::getInstance()->getDbProp(dbPath + toString(k + index * TRADE_PAGE_NUM_ITEMS) + ":SLOT_TYPE", false); if (leaf) leaf->setValue32(currItem.SlotType); leaf = NLGUI::CDBManager::getInstance()->getDbProp(dbPath + toString(k + index * TRADE_PAGE_NUM_ITEMS) + ":SHEET", false); diff --git a/code/ryzom/client/src/interface_v3/obs_huge_list.h b/code/ryzom/client/src/interface_v3/obs_huge_list.h index 64ef38252..480d31540 100644 --- a/code/ryzom/client/src/interface_v3/obs_huge_list.h +++ b/code/ryzom/client/src/interface_v3/obs_huge_list.h @@ -124,6 +124,8 @@ private: // NLMISC::CCDBNodeLeaf *SlotType; NLMISC::CCDBNodeLeaf *Quality; + NLMISC::CCDBNodeLeaf *Serial; + NLMISC::CCDBNodeLeaf *CreateTime; NLMISC::CCDBNodeLeaf *SheetIDOrSkill; // NLMISC::CCDBNodeLeaf *LogicTextID; // valid if the item is to be obtained for a mission @@ -157,6 +159,8 @@ private: GuildName(NULL), SlotType(NULL), Quality(NULL), + Serial(NULL), + CreateTime(NULL), SheetIDOrSkill(NULL), LogicTextID(NULL), DescTextID(NULL), @@ -216,6 +220,8 @@ private: TRADE_SLOT_TYPE::TTradeSlotType SlotType; uint16 Quality; + uint32 Serial; + uint32 CreateTime; uint32 SheetIDOrSkill; uint32 LogicTextID; // Valid if the item is to be obtained as a mission reward uint32 DescTextID; // Valid if the item is to be obtained as a mission reward