Changed: CREATE_TIME and SERIAL properties to items in EGS code

--HG--
branch : compatibility-develop
This commit is contained in:
Nuno Gonçalves 2017-04-07 02:49:12 +02:00
parent d33d0ffdc5
commit 79e916f61d
3 changed files with 282 additions and 12 deletions

View file

@ -1198,6 +1198,14 @@ void CBankAccessor_PLR::TEXCHANGE::TGIVE::TArray::init(ICDBStructNode *parent, u
nlassert(node != NULL);
_QUANTITY = node;
node = parent->getNode( ICDBStructNode::CTextId("CREATE_TIME"), false );
nlassert(node != NULL);
_CREATE_TIME = node;
node = parent->getNode( ICDBStructNode::CTextId("SERIAL"), false );
nlassert(node != NULL);
_SERIAL = node;
node = parent->getNode( ICDBStructNode::CTextId("USER_COLOR"), false );
nlassert(node != NULL);
_USER_COLOR = node;
@ -1277,6 +1285,14 @@ void CBankAccessor_PLR::TEXCHANGE::TRECEIVE::TArray::init(ICDBStructNode *parent
nlassert(node != NULL);
_QUANTITY = node;
node = parent->getNode( ICDBStructNode::CTextId("CREATE_TIME"), false );
nlassert(node != NULL);
_CREATE_TIME = node;
node = parent->getNode( ICDBStructNode::CTextId("SERIAL"), false );
nlassert(node != NULL);
_SERIAL = node;
node = parent->getNode( ICDBStructNode::CTextId("USER_COLOR"), false );
nlassert(node != NULL);
_USER_COLOR = node;
@ -1484,6 +1500,14 @@ void CBankAccessor_PLR::TINVENTORY::TTEMP::TArray::init(ICDBStructNode *parent,
nlassert(node != NULL);
_QUANTITY = node;
node = parent->getNode( ICDBStructNode::CTextId("CREATE_TIME"), false );
nlassert(node != NULL);
_CREATE_TIME = node;
node = parent->getNode( ICDBStructNode::CTextId("SERIAL"), false );
nlassert(node != NULL);
_SERIAL = node;
node = parent->getNode( ICDBStructNode::CTextId("USER_COLOR"), false );
nlassert(node != NULL);
_USER_COLOR = node;
@ -1574,6 +1598,14 @@ void CBankAccessor_PLR::TINVENTORY::TSHARE::TArray::init(ICDBStructNode *parent,
nlassert(node != NULL);
_QUANTITY = node;
node = parent->getNode( ICDBStructNode::CTextId("CREATE_TIME"), false );
nlassert(node != NULL);
_CREATE_TIME = node;
node = parent->getNode( ICDBStructNode::CTextId("SERIAL"), false );
nlassert(node != NULL);
_SERIAL = node;
node = parent->getNode( ICDBStructNode::CTextId("USER_COLOR"), false );
nlassert(node != NULL);
_USER_COLOR = node;
@ -2126,6 +2158,14 @@ void CBankAccessor_PLR::TTRADING::TArray::init(ICDBStructNode *parent, uint inde
nlassert(node != NULL);
_QUANTITY = node;
node = parent->getNode( ICDBStructNode::CTextId("CREATE_TIME"), false );
nlassert(node != NULL);
_CREATE_TIME = node;
node = parent->getNode( ICDBStructNode::CTextId("SERIAL"), false );
nlassert(node != NULL);
_SERIAL = node;
node = parent->getNode( ICDBStructNode::CTextId("USER_COLOR"), false );
nlassert(node != NULL);
_USER_COLOR = node;
@ -3140,11 +3180,11 @@ void CBankAccessor_PLR::TPACK_ANIMAL::TBEAST::init(ICDBStructNode *parent, uint
nlassert(node != NULL);
_DESPAWN = node;
// WARNING: let the value to true, else it'll corrupt backups
node = parent->getNode( ICDBStructNode::CTextId("NAME"), true );
nlassert(node != NULL);
_NAME = node;
// branch init
}

View file

@ -956,6 +956,8 @@ inline void _getProp(const CCDBSynchronised &db, ICDBStructNode *node, NLMISC::C
void setIS_INVISIBLE(CCDBSynchronised &dbGroup, bool value, bool forceSending = false)
{
_setProp(dbGroup, _IS_INVISIBLE, value, forceSending);
}
@ -1313,8 +1315,7 @@ inline void _getProp(const CCDBSynchronised &db, ICDBStructNode *node, NLMISC::C
{
return _DODGE;
}
TBRICK_TICK_RANGE &getBRICK_TICK_RANGE()
TBRICK_TICK_RANGE &getBRICK_TICK_RANGE()
{
return _BRICK_TICK_RANGE;
}
@ -2781,6 +2782,8 @@ inline void _getProp(const CCDBSynchronised &db, ICDBStructNode *node, NLMISC::C
ICDBStructNode *_SHEET;
ICDBStructNode *_QUALITY;
ICDBStructNode *_QUANTITY;
ICDBStructNode *_CREATE_TIME;
ICDBStructNode *_SERIAL;
ICDBStructNode *_USER_COLOR;
ICDBStructNode *_WEIGHT;
ICDBStructNode *_NAMEID;
@ -2867,6 +2870,46 @@ inline void _getProp(const CCDBSynchronised &db, ICDBStructNode *node, NLMISC::C
return _QUANTITY;
}
void setCREATE_TIME(CCDBSynchronised &dbGroup, uint32 value, bool forceSending = false)
{
_setProp(dbGroup, _CREATE_TIME, value, forceSending);
}
uint32 getCREATE_TIME(const CCDBSynchronised &dbGroup)
{
uint32 value;
_getProp(dbGroup, _CREATE_TIME, value);
return value;
}
ICDBStructNode *getCREATE_TIMECDBNode()
{
return _CREATE_TIME;
}
void setSERIAL(CCDBSynchronised &dbGroup, uint32 value, bool forceSending = false)
{
_setProp(dbGroup, _SERIAL, value, forceSending);
}
uint32 getSERIAL(const CCDBSynchronised &dbGroup)
{
uint32 value;
_getProp(dbGroup, _SERIAL, value);
return value;
}
ICDBStructNode *getSERIALCDBNode()
{
return _SERIAL;
}
void setUSER_COLOR(CCDBSynchronised &dbGroup, uint8 value, bool forceSending = false)
{
@ -3080,6 +3123,8 @@ inline void _getProp(const CCDBSynchronised &db, ICDBStructNode *node, NLMISC::C
ICDBStructNode *_SHEET;
ICDBStructNode *_QUALITY;
ICDBStructNode *_QUANTITY;
ICDBStructNode *_CREATE_TIME;
ICDBStructNode *_SERIAL;
ICDBStructNode *_USER_COLOR;
ICDBStructNode *_WEIGHT;
ICDBStructNode *_NAMEID;
@ -3166,6 +3211,46 @@ inline void _getProp(const CCDBSynchronised &db, ICDBStructNode *node, NLMISC::C
return _QUANTITY;
}
void setCREATE_TIME(CCDBSynchronised &dbGroup, uint32 value, bool forceSending = false)
{
_setProp(dbGroup, _CREATE_TIME, value, forceSending);
}
uint32 getCREATE_TIME(const CCDBSynchronised &dbGroup)
{
uint32 value;
_getProp(dbGroup, _CREATE_TIME, value);
return value;
}
ICDBStructNode *getCREATE_TIMECDBNode()
{
return _CREATE_TIME;
}
void setSERIAL(CCDBSynchronised &dbGroup, uint32 value, bool forceSending = false)
{
_setProp(dbGroup, _SERIAL, value, forceSending);
}
uint32 getSERIAL(const CCDBSynchronised &dbGroup)
{
uint32 value;
_getProp(dbGroup, _SERIAL, value);
return value;
}
ICDBStructNode *getSERIALCDBNode()
{
return _SERIAL;
}
void setUSER_COLOR(CCDBSynchronised &dbGroup, uint8 value, bool forceSending = false)
{
@ -3471,6 +3556,8 @@ inline void _getProp(const CCDBSynchronised &db, ICDBStructNode *node, NLMISC::C
void setMONEY(CCDBSynchronised &dbGroup, uint64 value, bool forceSending = false)
{
_setProp(dbGroup, _MONEY, value, forceSending);
}
@ -3710,6 +3797,8 @@ inline void _getProp(const CCDBSynchronised &db, ICDBStructNode *node, NLMISC::C
ICDBStructNode *_SHEET;
ICDBStructNode *_QUALITY;
ICDBStructNode *_QUANTITY;
ICDBStructNode *_CREATE_TIME;
ICDBStructNode *_SERIAL;
ICDBStructNode *_USER_COLOR;
ICDBStructNode *_WEIGHT;
ICDBStructNode *_NAMEID;
@ -3796,6 +3885,46 @@ inline void _getProp(const CCDBSynchronised &db, ICDBStructNode *node, NLMISC::C
return _QUANTITY;
}
void setCREATE_TIME(CCDBSynchronised &dbGroup, uint32 value, bool forceSending = false)
{
_setProp(dbGroup, _CREATE_TIME, value, forceSending);
}
uint32 getCREATE_TIME(const CCDBSynchronised &dbGroup)
{
uint32 value;
_getProp(dbGroup, _CREATE_TIME, value);
return value;
}
ICDBStructNode *getCREATE_TIMECDBNode()
{
return _CREATE_TIME;
}
void setSERIAL(CCDBSynchronised &dbGroup, uint32 value, bool forceSending = false)
{
_setProp(dbGroup, _SERIAL, value, forceSending);
}
uint32 getSERIAL(const CCDBSynchronised &dbGroup)
{
uint32 value;
_getProp(dbGroup, _SERIAL, value);
return value;
}
ICDBStructNode *getSERIALCDBNode()
{
return _SERIAL;
}
void setUSER_COLOR(CCDBSynchronised &dbGroup, uint8 value, bool forceSending = false)
{
@ -4051,6 +4180,8 @@ inline void _getProp(const CCDBSynchronised &db, ICDBStructNode *node, NLMISC::C
ICDBStructNode *_SHEET;
ICDBStructNode *_QUALITY;
ICDBStructNode *_QUANTITY;
ICDBStructNode *_CREATE_TIME;
ICDBStructNode *_SERIAL;
ICDBStructNode *_USER_COLOR;
ICDBStructNode *_WEIGHT;
ICDBStructNode *_NAMEID;
@ -4140,6 +4271,46 @@ inline void _getProp(const CCDBSynchronised &db, ICDBStructNode *node, NLMISC::C
return _QUANTITY;
}
void setCREATE_TIME(CCDBSynchronised &dbGroup, uint32 value, bool forceSending = false)
{
_setProp(dbGroup, _CREATE_TIME, value, forceSending);
}
uint32 getCREATE_TIME(const CCDBSynchronised &dbGroup)
{
uint32 value;
_getProp(dbGroup, _CREATE_TIME, value);
return value;
}
ICDBStructNode *getCREATE_TIMECDBNode()
{
return _CREATE_TIME;
}
void setSERIAL(CCDBSynchronised &dbGroup, uint32 value, bool forceSending = false)
{
_setProp(dbGroup, _SERIAL, value, forceSending);
}
uint32 getSERIAL(const CCDBSynchronised &dbGroup)
{
uint32 value;
_getProp(dbGroup, _SERIAL, value);
return value;
}
ICDBStructNode *getSERIALCDBNode()
{
return _SERIAL;
}
void setUSER_COLOR(CCDBSynchronised &dbGroup, uint8 value, bool forceSending = false)
{
@ -4572,6 +4743,8 @@ inline void _getProp(const CCDBSynchronised &db, ICDBStructNode *node, NLMISC::C
void setMONEY(CCDBSynchronised &dbGroup, uint64 value, bool forceSending = false)
{
_setProp(dbGroup, _MONEY, value, forceSending);
}
@ -4587,8 +4760,10 @@ inline void _getProp(const CCDBSynchronised &db, ICDBStructNode *node, NLMISC::C
{
return _MONEY;
}
};
private:
ICDBStructNode *_BranchNode;
@ -4610,8 +4785,11 @@ inline void _getProp(const CCDBSynchronised &db, ICDBStructNode *node, NLMISC::C
return _BranchNode;
}
void setMONEY(CCDBSynchronised &dbGroup, uint64 value, bool forceSending = false)
{
_setProp(dbGroup, _MONEY, value, forceSending);
}
@ -5687,6 +5865,8 @@ inline void _getProp(const CCDBSynchronised &db, ICDBStructNode *node, NLMISC::C
ICDBStructNode *_SHEET;
ICDBStructNode *_QUALITY;
ICDBStructNode *_QUANTITY;
ICDBStructNode *_CREATE_TIME;
ICDBStructNode *_SERIAL;
ICDBStructNode *_USER_COLOR;
ICDBStructNode *_WEIGHT;
ICDBStructNode *_NAMEID;
@ -5785,6 +5965,46 @@ inline void _getProp(const CCDBSynchronised &db, ICDBStructNode *node, NLMISC::C
return _QUANTITY;
}
void setCREATE_TIME(CCDBSynchronised &dbGroup, uint32 value, bool forceSending = false)
{
_setProp(dbGroup, _CREATE_TIME, value, forceSending);
}
uint32 getCREATE_TIME(const CCDBSynchronised &dbGroup)
{
uint32 value;
_getProp(dbGroup, _CREATE_TIME, value);
return value;
}
ICDBStructNode *getCREATE_TIMECDBNode()
{
return _CREATE_TIME;
}
void setSERIAL(CCDBSynchronised &dbGroup, uint32 value, bool forceSending = false)
{
_setProp(dbGroup, _SERIAL, value, forceSending);
}
uint32 getSERIAL(const CCDBSynchronised &dbGroup)
{
uint32 value;
_getProp(dbGroup, _SERIAL, value);
return value;
}
ICDBStructNode *getSERIALCDBNode()
{
return _SERIAL;
}
void setUSER_COLOR(CCDBSynchronised &dbGroup, uint8 value, bool forceSending = false)
{
@ -6005,6 +6225,8 @@ inline void _getProp(const CCDBSynchronised &db, ICDBStructNode *node, NLMISC::C
void setMONEY_SHEET(CCDBSynchronised &dbGroup, NLMISC::CSheetId value, bool forceSending = false)
{
_setProp(dbGroup, _MONEY_SHEET, value, forceSending);
}
@ -8862,6 +9084,7 @@ inline void _getProp(const CCDBSynchronised &db, ICDBStructNode *node, NLMISC::C
ICDBStructNode *_DESPAWN;
ICDBStructNode *_NAME;
public:
void init(ICDBStructNode *parent, uint index);
@ -9052,6 +9275,8 @@ inline void _getProp(const CCDBSynchronised &db, ICDBStructNode *node, NLMISC::C
void setNAME(CCDBSynchronised &dbGroup, uint32 value, bool forceSending = false)
{
_setProp(dbGroup, _NAME, value, forceSending);
}
@ -9067,6 +9292,7 @@ inline void _getProp(const CCDBSynchronised &db, ICDBStructNode *node, NLMISC::C
{
return _NAME;
}
};

View file

@ -1072,11 +1072,15 @@ void CCharacterInvView::updateClientSlot(uint32 slot, const CGameItemPtr item)
resaleFlag = BOTCHATTYPE::ResaleKOLockedByOwner;
}
const INVENTORIES::TItemId &itemId = item->getItemId();
INVENTORIES::CItemSlot itemSlot( slot );
itemSlot.setItemProp( INVENTORIES::Sheet, item->getSheetId().asInt() );
itemSlot.setItemProp( INVENTORIES::Quality, item->quality() );
itemSlot.setItemProp( INVENTORIES::Quantity, item->getStackSize() );
itemSlot.setItemProp( INVENTORIES::UserColor, item->color() );
itemSlot.setItemProp( INVENTORIES::CreateTime, itemId.getCreateTime() );
itemSlot.setItemProp( INVENTORIES::Serial, itemId.getSerialNumber() );
itemSlot.setItemProp( INVENTORIES::Locked, item->getLockCount() );
itemSlot.setItemProp( INVENTORIES::Weight, item->weight() / 10 );
itemSlot.setItemProp( INVENTORIES::NameId, item->sendNameId(getCharacter()) );