diff --git a/code/ryzom/client/src/interface_v3/dbctrl_sheet.cpp b/code/ryzom/client/src/interface_v3/dbctrl_sheet.cpp index 92e65ac9d..46fea9593 100644 --- a/code/ryzom/client/src/interface_v3/dbctrl_sheet.cpp +++ b/code/ryzom/client/src/interface_v3/dbctrl_sheet.cpp @@ -4046,7 +4046,6 @@ void CDBCtrlSheet::setItemPrice(sint32 price) node->setValue32(price); } - // *************************************************************************** sint32 CDBCtrlSheet::getItemResaleFlag() const { @@ -4071,6 +4070,54 @@ void CDBCtrlSheet::setItemResaleFlag(sint32 rf) node->setValue32(rf); } +// *************************************************************************** +sint32 CDBCtrlSheet::getItemCreateTime() const +{ + CCDBNodeLeaf *node = getItemCreateTimePtr(); + if (!node) return 0; + return node->getValue32(); +} + +// *************************************************************************** +CCDBNodeLeaf *CDBCtrlSheet::getItemCreateTimePtr() const +{ + CCDBNodeBranch *root = getRootBranch(); + if (!root) return NULL; + return dynamic_cast(root->getNode(ICDBNode::CTextId("CREATE_TIME"), false)); +} + +// *************************************************************************** +void CDBCtrlSheet::setItemCreateTime(sint32 ct) +{ + CCDBNodeLeaf *node = getItemCreateTimePtr(); + if (!node) return; + node->setValue32(ct); +} + +// *************************************************************************** +sint32 CDBCtrlSheet::getItemSerial() const +{ + CCDBNodeLeaf *node = getItemSerialPtr(); + if (!node) return 0; + return node->getValue32(); +} + +// *************************************************************************** +CCDBNodeLeaf *CDBCtrlSheet::getItemSerialPtr() const +{ + CCDBNodeBranch *root = getRootBranch(); + if (!root) return NULL; + return dynamic_cast(root->getNode(ICDBNode::CTextId("SERIAL"), false)); +} + +// *************************************************************************** +void CDBCtrlSheet::setItemSerial(sint32 rf) +{ + CCDBNodeLeaf *node = getItemSerialPtr(); + if (!node) return; + node->setValue32(rf); +} + // *************************************************************************** bool CDBCtrlSheet::getLockedByOwner() const { diff --git a/code/ryzom/client/src/interface_v3/dbctrl_sheet.h b/code/ryzom/client/src/interface_v3/dbctrl_sheet.h index 8c697d660..ad1bc49a9 100644 --- a/code/ryzom/client/src/interface_v3/dbctrl_sheet.h +++ b/code/ryzom/client/src/interface_v3/dbctrl_sheet.h @@ -514,6 +514,18 @@ public: // set item RESALE_FLAG void setItemResaleFlag(sint32 rf); + //get item CREATE_TIME. 0 if no DB + sint32 getItemCreateTime() const; + NLMISC::CCDBNodeLeaf *getItemCreateTimePtr() const; + // set item CREATE_TIME + void setItemCreateTime(sint32 ct); + + //get item SERIAL. 0 if no DB + sint32 getItemSerial() const; + NLMISC::CCDBNodeLeaf *getItemSerialPtr() const; + // set item CREATE_TIME + void setItemSerial(sint32 serial); + // get item locked by owner bool getLockedByOwner() const;