Jump to content

Item_instance Convert (Trinity to mangos)


Recommended Posts

Hello guys,

i just need some help. I started writing a db-converter from TDB to mangos (YTDB).

It works, so i get no errors or other stuff, you can also login successfully to the mangos-realmd and load your characters, but they wont have any item in the inventory.

I also took a look into the character_inventory after login with one of the converted chars.... all entries of this char are deleted, but i don't know why.

At my first try he delete the whole character_inventory table when i started the mangosd.exe, but this was because i forget to convert the item_instance table.

This leads to my general question of this post.

Is there an up to date description of the data field in item_instance? I guess that he didn't convert this table as it should be done.

This is trinity's one

This mango's one

as you see in TDB there is an extra column for each data, in mangos i have to create the data text my own, but todays database is a bit different from the entry in the wiki, so it would be awesome if someone can tell me how the data-field is made up.

Just one example from a the data-field of an item which was created by the core

2 1191182336 3 1396 1065353216 0 1 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 25 25 0 0 

What is the second value? (119....)

I really hope someone has a clue how to solve this problem :)



Link to comment
Share on other sites

There are not many people who knows how this data blob's actually work, and they should be "extracted" in my opinion. I could do it i think. But i do not want my work to be a waste, and therefore it will be a low priority thing, because you can never be sure your patch gets into master. And since nobody really needs to change it we do not change it. But if you check out "oregoncore" they recently extracted a datablob in their characters table, so you might be able to get some useful info there ;)

EDIT: A question to the developers. Why was this made like this from the beginning? It's just stupid isnt it?

Link to comment
Share on other sites

EDIT: A question to the developers. Why was this made like this from the beginning? It's just stupid isnt it?
It's just way simplier to load/store whole array in DB as string than write more code to store each field in it's own field :)


1191182336 OBJECT_FIELD_GUID (highpart)



1065353216 OBJECT_FIELD_SCALE_X (it's float (this value is 1.0f))


1 ITEM_FIELD_OWNER (lowpart)

0 ITEM_FIELD_OWNER (highpart)





0 0 1 0 0 ITEM_FIELD_SPELL_CHARGES (5*uint32)


0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ITEM_FIELD_ENCHANTMENT_1_1 to ITEM_FIELD_ENCHANTMENT_12_3







source: UpdateFields.h

Link to comment
Share on other sites

I know that the data blobs from the characters table were removed some time ago - commit d65cf5b9f99

As far as I know loading a blob field from the database is also faster than loading many fields.

So I think removing the blob from item can be reasonable if you manage to drop some of the fields

Aint those things precached? I mean increasing the server startup time by a half second would 100% be worth it

Link to comment
Share on other sites


first of all thanks for your help, it just came a little bit to late, i ve already find out myself how the data field is build, even the difference beetween containers and items.

My personal view is to drop the field and seperate the data, as it is done with trinity db.

Ofc it is faster to load one blob instead of 14 columns, but thats no argument. The DMS isnt the bottleneck at all, therefore its easier to deal with separeted data in corescripts.

would be nice if someone could split the data

Link to comment
Share on other sites


  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use