mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-11-15 20:23:47 +00:00
Added: CREATE_TIME and SERIAL properties to items in database.xml
--HG-- branch : item_group
This commit is contained in:
parent
ad347d09c8
commit
de949a60a9
4 changed files with 91 additions and 13 deletions
|
@ -37,6 +37,10 @@
|
|||
type="I10" />
|
||||
<leaf name="QUANTITY"
|
||||
type="I10" />
|
||||
<leaf name="CREATE_TIME"
|
||||
type="I32" />
|
||||
<leaf name="SERIAL"
|
||||
type="I32" />
|
||||
<leaf name="USER_COLOR"
|
||||
type="I3" />
|
||||
<leaf name="LOCKED"
|
||||
|
@ -79,6 +83,10 @@
|
|||
type="I10" />
|
||||
<leaf name="QUANTITY"
|
||||
type="I10" />
|
||||
<leaf name="CREATE_TIME"
|
||||
type="I32" />
|
||||
<leaf name="SERIAL"
|
||||
type="I32" />
|
||||
<leaf name="USER_COLOR"
|
||||
type="I3" />
|
||||
<leaf name="LOCKED"
|
||||
|
@ -130,6 +138,10 @@
|
|||
type="I10" />
|
||||
<leaf name="QUANTITY"
|
||||
type="I10" />
|
||||
<leaf name="CREATE_TIME"
|
||||
type="I32" />
|
||||
<leaf name="SERIAL"
|
||||
type="I32" />
|
||||
<leaf name="USER_COLOR"
|
||||
type="I3" />
|
||||
<!-- No LOCKED state -->
|
||||
|
@ -168,6 +180,10 @@
|
|||
type="I10" />
|
||||
<leaf name="QUANTITY"
|
||||
type="I10" />
|
||||
<leaf name="CREATE_TIME"
|
||||
type="I32" />
|
||||
<leaf name="SERIAL"
|
||||
type="I32" />
|
||||
<leaf name="USER_COLOR"
|
||||
type="I3" />
|
||||
<leaf name="WEIGHT"
|
||||
|
@ -223,6 +239,10 @@
|
|||
type="I10" />
|
||||
<leaf name="QUANTITY"
|
||||
type="I10" />
|
||||
<leaf name="CREATE_TIME"
|
||||
type="I32" />
|
||||
<leaf name="SERIAL"
|
||||
type="I32" />
|
||||
<leaf name="USER_COLOR"
|
||||
type="I3" />
|
||||
<leaf name="LOCKED"
|
||||
|
@ -278,6 +298,10 @@
|
|||
type="I10" />
|
||||
<leaf name="QUANTITY"
|
||||
type="I10" />
|
||||
<leaf name="CREATE_TIME"
|
||||
type="I32" />
|
||||
<leaf name="SERIAL"
|
||||
type="I32" />
|
||||
<leaf name="USER_COLOR"
|
||||
type="I3" />
|
||||
<!-- <leaf name="LOCKED" type="I10"/> No longer needed -->
|
||||
|
@ -309,6 +333,10 @@
|
|||
type="I10" />
|
||||
<leaf name="QUANTITY"
|
||||
type="I10" />
|
||||
<leaf name="CREATE_TIME"
|
||||
type="I32" />
|
||||
<leaf name="SERIAL"
|
||||
type="I32" />
|
||||
<leaf name="USER_COLOR"
|
||||
type="I3" />
|
||||
<!-- <leaf name="LOCKED" type="I10"/> No longer needed -->
|
||||
|
@ -352,6 +380,10 @@
|
|||
type="I10" />
|
||||
<leaf name="QUANTITY"
|
||||
type="I10" />
|
||||
<leaf name="CREATE_TIME"
|
||||
type="I32" />
|
||||
<leaf name="SERIAL"
|
||||
type="I32" />
|
||||
<!-- No LOCKED state -->
|
||||
<leaf name="USER_COLOR"
|
||||
type="I3" />
|
||||
|
|
|
@ -334,6 +334,8 @@
|
|||
<leaf name="SHEET" type="I32"/>
|
||||
<leaf name="QUALITY" type="I10"/>
|
||||
<leaf name="QUANTITY" type="I10"/>
|
||||
<leaf name="CREATE_TIME" type="I32" />
|
||||
<leaf name="SERIAL" type="I32" />
|
||||
<leaf name="USER_COLOR" type="I3"/>
|
||||
<leaf name="LOCKED" type="I10"/>
|
||||
<leaf name="WEIGHT" type="I16"/>
|
||||
|
@ -375,6 +377,10 @@
|
|||
type="I10" />
|
||||
<leaf name="QUANTITY"
|
||||
type="I10" />
|
||||
<leaf name="CREATE_TIME"
|
||||
type="I32" />
|
||||
<leaf name="SERIAL"
|
||||
type="I32" />
|
||||
<leaf name="USER_COLOR"
|
||||
type="I3" />
|
||||
<!-- <leaf name="LOCKED" type="I10"/> No longer needed -->
|
||||
|
@ -407,6 +413,10 @@
|
|||
type="I10" />
|
||||
<leaf name="QUANTITY"
|
||||
type="I10" />
|
||||
<leaf name="CREATE_TIME"
|
||||
type="I32" />
|
||||
<leaf name="SERIAL"
|
||||
type="I32" />
|
||||
<leaf name="USER_COLOR"
|
||||
type="I3" />
|
||||
<!-- <leaf name="LOCKED" type="I10"/> No longer needed -->
|
||||
|
@ -457,6 +467,10 @@
|
|||
type="I10" />
|
||||
<leaf name="QUANTITY"
|
||||
type="I10" />
|
||||
<leaf name="CREATE_TIME"
|
||||
type="I32" />
|
||||
<leaf name="SERIAL"
|
||||
type="I32" />
|
||||
<leaf name="USER_COLOR"
|
||||
type="I3" />
|
||||
<leaf name="LOCKED"
|
||||
|
@ -502,6 +516,10 @@
|
|||
type="I10" />
|
||||
<leaf name="QUANTITY"
|
||||
type="I10" />
|
||||
<leaf name="CREATE_TIME"
|
||||
type="I32" />
|
||||
<leaf name="SERIAL"
|
||||
type="I32" />
|
||||
<leaf name="USER_COLOR"
|
||||
type="I3" />
|
||||
<leaf name="LOCKED"
|
||||
|
@ -555,6 +573,10 @@
|
|||
<!-- for forage progress, max QL409 x10 -->
|
||||
<leaf name="QUANTITY"
|
||||
type="I12" />
|
||||
<leaf name="CREATE_TIME"
|
||||
type="I32" />
|
||||
<leaf name="SERIAL"
|
||||
type="I32" />
|
||||
<!-- for forage progress, max x409 x10 -->
|
||||
<leaf name="USER_COLOR"
|
||||
type="I3" />
|
||||
|
@ -596,6 +618,10 @@
|
|||
type="I10" />
|
||||
<leaf name="QUANTITY"
|
||||
type="I10" />
|
||||
<leaf name="CREATE_TIME"
|
||||
type="I32" />
|
||||
<leaf name="SERIAL"
|
||||
type="I32" />
|
||||
<leaf name="USER_COLOR"
|
||||
type="I3" />
|
||||
<leaf name="WEIGHT"
|
||||
|
@ -653,6 +679,10 @@
|
|||
type="I10" />
|
||||
<leaf name="QUANTITY"
|
||||
type="I10" />
|
||||
<leaf name="CREATE_TIME"
|
||||
type="I32" />
|
||||
<leaf name="SERIAL"
|
||||
type="I32" />
|
||||
<leaf name="USER_COLOR"
|
||||
type="I3" />
|
||||
<leaf name="LOCKED"
|
||||
|
@ -860,6 +890,10 @@
|
|||
<leaf name="QUANTITY"
|
||||
type="I10" />
|
||||
<!-- No LOCKED state -->
|
||||
<leaf name="CREATE_TIME"
|
||||
type="I32" />
|
||||
<leaf name="SERIAL"
|
||||
type="I32" />
|
||||
<leaf name="USER_COLOR"
|
||||
type="I3" />
|
||||
<leaf name="WEIGHT"
|
||||
|
@ -1133,6 +1167,10 @@
|
|||
type="I10" />
|
||||
<leaf name="QUANTITY"
|
||||
type="I10" />
|
||||
<leaf name="CREATE_TIME"
|
||||
type="I32" />
|
||||
<leaf name="SERIAL"
|
||||
type="I32" />
|
||||
<leaf name="USER_COLOR"
|
||||
type="I3" />
|
||||
<leaf name="LOCKED"
|
||||
|
|
|
@ -98,7 +98,7 @@ namespace INVENTORIES
|
|||
"", // player_room
|
||||
"" // unknown
|
||||
};
|
||||
|
||||
|
||||
|
||||
//
|
||||
const char *CInventoryCategoryForCharacter::InventoryStr [CInventoryCategoryForCharacter::NbInventoryIds] =
|
||||
|
@ -122,7 +122,7 @@ namespace INVENTORIES
|
|||
const char *InfoVersionStr = "INFO_VERSION";
|
||||
|
||||
const char *CItemSlot::ItemPropStr [NbItemPropId] =
|
||||
{ "SHEET", "QUALITY", "QUANTITY", "USER_COLOR", "LOCKED", "WEIGHT", "NAMEID", "ENCHANT", "RM_CLASS_TYPE", "RM_FABER_STAT_TYPE", "PRICE", "RESALE_FLAG", "PREREQUISIT_VALID", "WORNED" };
|
||||
{ "SHEET", "QUALITY", "QUANTITY", "USER_COLOR", "CREATE_TIME", "SERIAL", "LOCKED", "WEIGHT", "NAMEID", "ENCHANT", "RM_CLASS_TYPE", "RM_FABER_STAT_TYPE", "PRICE", "RESALE_FLAG", "PREREQUISIT_VALID", "WORNED" };
|
||||
const uint CItemSlot::DataBitSize [NbItemPropId] =
|
||||
{ 32, 10, 10, 3, 10, 16, 32, 10, 3, 5, 32, 2, 1, 1 };
|
||||
{ 32, 10, 10, 3, 32, 32, 10, 16, 32, 10, 3, 5, 32, 2, 1, 1 };
|
||||
}
|
||||
|
|
|
@ -112,6 +112,17 @@ namespace INVENTORIES
|
|||
return _RawId < other._RawId;
|
||||
}
|
||||
|
||||
uint32 getCreateTime() const
|
||||
{
|
||||
return _CreateTime;
|
||||
}
|
||||
|
||||
uint32 getSerialNumber() const
|
||||
{
|
||||
return _SerialNumber;
|
||||
}
|
||||
|
||||
|
||||
private:
|
||||
union
|
||||
{
|
||||
|
@ -255,6 +266,8 @@ namespace INVENTORIES
|
|||
Quality,
|
||||
Quantity,
|
||||
UserColor,
|
||||
CreateTime,
|
||||
Serial,
|
||||
Locked,
|
||||
Weight,
|
||||
NameId,
|
||||
|
@ -354,8 +367,8 @@ namespace INVENTORIES
|
|||
bms.serial( _SlotIndex, CInventoryCategoryTemplate::SlotBitSize );
|
||||
|
||||
uint i;
|
||||
// SHEET, QUALITY, QUANTITY and USER_COLOR never require compression
|
||||
for (i = 0; i < 4; ++i)
|
||||
// SHEET, QUALITY, QUANTITY, USER_COLOR, CREATE_TIME and SERIAL never require compression
|
||||
for (i = 0; i < 6; ++i)
|
||||
bms.serial((uint32&)_ItemProp[i], DataBitSize[i]);
|
||||
|
||||
// For all other the compression is simple the first bit indicates if the value is zero
|
||||
|
@ -412,18 +425,13 @@ private:
|
|||
|
||||
struct COneProp
|
||||
{
|
||||
union
|
||||
{
|
||||
TItemPropId ItemPropId;
|
||||
uint32 ItemPropIdUint32;
|
||||
};
|
||||
|
||||
TItemPropId ItemPropId;
|
||||
sint32 ItemPropValue;
|
||||
|
||||
void serial( NLMISC::CBitMemStream& bms )
|
||||
{
|
||||
bms.serial((uint32&)ItemPropIdUint32, NbBitsForItemPropId);
|
||||
bms.serial((uint32&)ItemPropValue, CItemSlot::DataBitSize[ItemPropId]);
|
||||
bms.serial( (uint32&)ItemPropId, NbBitsForItemPropId );
|
||||
bms.serial( (uint32&)ItemPropValue, CItemSlot::DataBitSize[ItemPropId] );
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue