Fixed: Add missing properties to trade/mission item db

--HG--
branch : feature-item-icon-buffs
Nimetu 6 years ago
parent efaadfe121
commit 4636e32885

@ -161,6 +161,8 @@ bool CHugeListObs::init()
case Trading: case Trading:
_Items[k].SlotType = NLGUI::CDBManager::getInstance()->getDbProp(toString((dbPath + ":%d:SLOT_TYPE").c_str(), (int) k), false); _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].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].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].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); _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) || 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].Price == NULL) || (_Items[k].Weight==NULL) || (_Items[k].InfoVersion==NULL) ||
(_Items[k].UserColor==NULL) || (_Items[k].NameId==NULL) || (_Items[k].Quantity==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].PriceRetire==NULL) || (_Items[k].SellerType==NULL) || (_Items[k].ResaleTimeLeft==NULL) ||
(_Items[k].VendorNameId==NULL) || (_Items[k].Enchant ==NULL) || (_Items[k].RMClassType == NULL) || (_Items[k].VendorNameId==NULL) || (_Items[k].Enchant ==NULL) || (_Items[k].RMClassType == NULL) ||
(_Items[k].RMFaberStatType == NULL) || (_Items[k].PrerequisitValid == NULL) || (_Items[k].RMFaberStatType == NULL) || (_Items[k].PrerequisitValid == NULL) ||
@ -191,6 +194,8 @@ bool CHugeListObs::init()
case ItemForMissions: case ItemForMissions:
_Items[k].SlotType = NLGUI::CDBManager::getInstance()->getDbProp(toString((dbPath + ":%d:SLOT_TYPE").c_str(), (int) k), false); _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].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].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].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); _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].LogicTextID == NULL) || (_Items[k].DescTextID == NULL) ||
(_Items[k].Weight==NULL) || (_Items[k].InfoVersion==NULL) || (_Items[k].UserColor==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].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; return false;
break; 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].SlotType = (TRADE_SLOT_TYPE::TTradeSlotType) _Items[k].SlotType->getValue32();
page.Items[k].Quality = (uint16) _Items[k].Quality->getValue16(); 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].SheetIDOrSkill = (uint32) _Items[k].SheetIDOrSkill->getValue32();
page.Items[k].Price = (uint32) _Items[k].Price->getValue32(); page.Items[k].Price = (uint32) _Items[k].Price->getValue32();
page.Items[k].Weight= (uint16) _Items[k].Weight->getValue16(); page.Items[k].Weight= (uint16) _Items[k].Weight->getValue16();
@ -420,6 +427,8 @@ void CHugeListObs::update(ICDBNode * /* node */)
case ItemForMissions: case ItemForMissions:
page.Items[k].SlotType = (TRADE_SLOT_TYPE::TTradeSlotType) _Items[k].SlotType->getValue32(); page.Items[k].SlotType = (TRADE_SLOT_TYPE::TTradeSlotType) _Items[k].SlotType->getValue32();
page.Items[k].Quality = (uint16) _Items[k].Quality->getValue16(); 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].SheetIDOrSkill = (uint32) _Items[k].SheetIDOrSkill->getValue32();
page.Items[k].LogicTextID = (uint32) _Items[k].LogicTextID->getValue32(); page.Items[k].LogicTextID = (uint32) _Items[k].LogicTextID->getValue32();
page.Items[k].DescTextID = (uint32) _Items[k].DescTextID->getValue32(); page.Items[k].DescTextID = (uint32) _Items[k].DescTextID->getValue32();
@ -569,6 +578,10 @@ void CHugeListObs::updateUIItemPage(uint index)
case Trading: case Trading:
leaf = NLGUI::CDBManager::getInstance()->getDbProp(dbPath + toString(k + index * TRADE_PAGE_NUM_ITEMS) + ":QUALITY", false); leaf = NLGUI::CDBManager::getInstance()->getDbProp(dbPath + toString(k + index * TRADE_PAGE_NUM_ITEMS) + ":QUALITY", false);
if (leaf) leaf->setValue32(currItem.Quality); 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); leaf = NLGUI::CDBManager::getInstance()->getDbProp(dbPath + toString(k + index * TRADE_PAGE_NUM_ITEMS) + ":SLOT_TYPE", false);
if (leaf) leaf->setValue32(currItem.SlotType); if (leaf) leaf->setValue32(currItem.SlotType);
leaf = NLGUI::CDBManager::getInstance()->getDbProp(dbPath + toString(k + index * TRADE_PAGE_NUM_ITEMS) + ":SHEET", false); 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: case ItemForMissions:
leaf = NLGUI::CDBManager::getInstance()->getDbProp(dbPath + toString(k + index * TRADE_PAGE_NUM_ITEMS) + ":QUALITY", false); leaf = NLGUI::CDBManager::getInstance()->getDbProp(dbPath + toString(k + index * TRADE_PAGE_NUM_ITEMS) + ":QUALITY", false);
if (leaf) leaf->setValue32(currItem.Quality); 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); leaf = NLGUI::CDBManager::getInstance()->getDbProp(dbPath + toString(k + index * TRADE_PAGE_NUM_ITEMS) + ":SLOT_TYPE", false);
if (leaf) leaf->setValue32(currItem.SlotType); if (leaf) leaf->setValue32(currItem.SlotType);
leaf = NLGUI::CDBManager::getInstance()->getDbProp(dbPath + toString(k + index * TRADE_PAGE_NUM_ITEMS) + ":SHEET", false); leaf = NLGUI::CDBManager::getInstance()->getDbProp(dbPath + toString(k + index * TRADE_PAGE_NUM_ITEMS) + ":SHEET", false);

@ -124,6 +124,8 @@ private:
// //
NLMISC::CCDBNodeLeaf *SlotType; NLMISC::CCDBNodeLeaf *SlotType;
NLMISC::CCDBNodeLeaf *Quality; NLMISC::CCDBNodeLeaf *Quality;
NLMISC::CCDBNodeLeaf *Serial;
NLMISC::CCDBNodeLeaf *CreateTime;
NLMISC::CCDBNodeLeaf *SheetIDOrSkill; NLMISC::CCDBNodeLeaf *SheetIDOrSkill;
// //
NLMISC::CCDBNodeLeaf *LogicTextID; // valid if the item is to be obtained for a mission NLMISC::CCDBNodeLeaf *LogicTextID; // valid if the item is to be obtained for a mission
@ -157,6 +159,8 @@ private:
GuildName(NULL), GuildName(NULL),
SlotType(NULL), SlotType(NULL),
Quality(NULL), Quality(NULL),
Serial(NULL),
CreateTime(NULL),
SheetIDOrSkill(NULL), SheetIDOrSkill(NULL),
LogicTextID(NULL), LogicTextID(NULL),
DescTextID(NULL), DescTextID(NULL),
@ -216,6 +220,8 @@ private:
TRADE_SLOT_TYPE::TTradeSlotType SlotType; TRADE_SLOT_TYPE::TTradeSlotType SlotType;
uint16 Quality; uint16 Quality;
uint32 Serial;
uint32 CreateTime;
uint32 SheetIDOrSkill; uint32 SheetIDOrSkill;
uint32 LogicTextID; // Valid if the item is to be obtained as a mission reward 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 uint32 DescTextID; // Valid if the item is to be obtained as a mission reward

Loading…
Cancel
Save