Added: Missing properties to item CItemImage

--HG--
branch : feature-item-icon-buffs
hg/atys
Nimetu 6 years ago
parent 9fc1987631
commit efaadfe121

@ -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<CCDBNodeLeaf *>(branch->getNode(ICDBNode::CTextId("SHEET"), false));
Quality = dynamic_cast<CCDBNodeLeaf *>(branch->getNode(ICDBNode::CTextId("QUALITY"), false));
Quantity = dynamic_cast<CCDBNodeLeaf *>(branch->getNode(ICDBNode::CTextId("QUANTITY"), false));
CreateTime = dynamic_cast<CCDBNodeLeaf *>(branch->getNode(ICDBNode::CTextId("CREATE_TIME"), false));
Serial = dynamic_cast<CCDBNodeLeaf *>(branch->getNode(ICDBNode::CTextId("SERIAL"), false));
UserColor = dynamic_cast<CCDBNodeLeaf *>(branch->getNode(ICDBNode::CTextId("USER_COLOR"), false));
Price = dynamic_cast<CCDBNodeLeaf *>(branch->getNode(ICDBNode::CTextId("PRICE"), false));
Weight = dynamic_cast<CCDBNodeLeaf *>(branch->getNode(ICDBNode::CTextId("WEIGHT"), false));
@ -149,7 +153,7 @@ void CItemImage::build(CCDBNodeBranch *branch)
ResaleFlag = dynamic_cast<CCDBNodeLeaf *>(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);
}
// *************************************************************************************************

@ -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); }

Loading…
Cancel
Save