From efaadfe12118c0a9629f07edbb377d4ec37be688 Mon Sep 17 00:00:00 2001 From: Nimetu Date: Thu, 23 May 2019 14:40:18 +0300 Subject: [PATCH] Added: Missing properties to item CItemImage --HG-- branch : feature-item-icon-buffs --- code/ryzom/client/src/interface_v3/inventory_manager.cpp | 6 +++++- code/ryzom/client/src/interface_v3/inventory_manager.h | 6 ++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/code/ryzom/client/src/interface_v3/inventory_manager.cpp b/code/ryzom/client/src/interface_v3/inventory_manager.cpp index e4ce2b6e9..139d45370 100644 --- a/code/ryzom/client/src/interface_v3/inventory_manager.cpp +++ b/code/ryzom/client/src/interface_v3/inventory_manager.cpp @@ -127,6 +127,8 @@ CItemImage::CItemImage() Sheet = NULL; Quality = NULL; Quantity = NULL; + CreateTime = NULL; + Serial = NULL; UserColor = NULL; Price = NULL; Weight= NULL; @@ -141,6 +143,8 @@ void CItemImage::build(CCDBNodeBranch *branch) Sheet = dynamic_cast(branch->getNode(ICDBNode::CTextId("SHEET"), false)); Quality = dynamic_cast(branch->getNode(ICDBNode::CTextId("QUALITY"), false)); Quantity = dynamic_cast(branch->getNode(ICDBNode::CTextId("QUANTITY"), false)); + CreateTime = dynamic_cast(branch->getNode(ICDBNode::CTextId("CREATE_TIME"), false)); + Serial = dynamic_cast(branch->getNode(ICDBNode::CTextId("SERIAL"), false)); UserColor = dynamic_cast(branch->getNode(ICDBNode::CTextId("USER_COLOR"), false)); Price = dynamic_cast(branch->getNode(ICDBNode::CTextId("PRICE"), false)); Weight = dynamic_cast(branch->getNode(ICDBNode::CTextId("WEIGHT"), false)); @@ -149,7 +153,7 @@ void CItemImage::build(CCDBNodeBranch *branch) ResaleFlag = dynamic_cast(branch->getNode(ICDBNode::CTextId("RESALE_FLAG"), false)); // Should always have at least those one:(ie all but Price) - nlassert(Sheet && Quality && Quantity && UserColor && Weight && NameId && InfoVersion); + nlassert(Sheet && Quality && Quantity && CreateTime && Serial && UserColor && Weight && NameId && InfoVersion); } // ************************************************************************************************* diff --git a/code/ryzom/client/src/interface_v3/inventory_manager.h b/code/ryzom/client/src/interface_v3/inventory_manager.h index 0fa6fd2ee..f33277fc4 100644 --- a/code/ryzom/client/src/interface_v3/inventory_manager.h +++ b/code/ryzom/client/src/interface_v3/inventory_manager.h @@ -60,6 +60,8 @@ public: NLMISC::CCDBNodeLeaf *Sheet; NLMISC::CCDBNodeLeaf *Quality; NLMISC::CCDBNodeLeaf *Quantity; + NLMISC::CCDBNodeLeaf *CreateTime; + NLMISC::CCDBNodeLeaf *Serial; NLMISC::CCDBNodeLeaf *UserColor; NLMISC::CCDBNodeLeaf *Price; NLMISC::CCDBNodeLeaf *Weight; @@ -76,6 +78,8 @@ public: uint32 getSheetID() const { return (uint32) (Sheet ? Sheet->getValue32() : 0); } uint16 getQuality() const { return (uint16) (Quality ? Quality->getValue16() : 0); } uint16 getQuantity() const { return (uint16) (Quantity ? Quantity->getValue16() : 0); } + uint32 getCreateTime() const { return (uint32) (CreateTime ? CreateTime->getValue32() : 0); } + uint32 getSerial() const { return (uint32) (Serial ? Serial->getValue32() : 0); } uint8 getUserColor() const { return (uint8) (UserColor ? UserColor->getValue16() : 0); } uint32 getPrice() const { return (uint32) (Price ? Price->getValue32() : 0); } uint32 getWeight() const { return (uint32) (Weight ? Weight->getValue32() : 0); } @@ -87,6 +91,8 @@ public: void setSheetID(uint32 si) { if (Sheet) Sheet->setValue32((sint32) si); } void setQuality(uint16 quality) { if (Quality) Quality->setValue16((sint16) quality); } void setQuantity(uint16 quantity) { if (Quantity) Quantity->setValue16((sint16) quantity); } + void setCreateTime(uint32 create_time) { if (CreateTime) CreateTime->setValue32((sint32) create_time); } + void setSerial(uint32 serial) { if (Serial) Serial->setValue32((sint32) serial); } void setUserColor(uint8 uc) { if (UserColor) UserColor->setValue8((sint8) uc); } void setPrice(uint32 price) { if (Price) Price->setValue32((sint32) price); } void setWeight(uint32 wgt) { if (Weight) Weight->setValue32((sint32) wgt); }