Page 1 of 1

Item 'Weight'

Posted: Thu Jan 29, 2009 1:27 pm
by John Adams
LE,

I looked in the code for how World determines an items 'weight', and saw a struct comment that says "num/10", which is correct according to SOE live data. Something that weighs 2 has a value of 20, and a storage box for instance with a weight of 100 in live terms is 1000. The raw data is right, but I am finding moving this to the World DB, our tinyint(3) isn't cutting it.

I have a slew of database updates to apply, so don't bother altering the table just yet. The question is, if I stuff a 1000 into an items "weight" field, will World know what to do with that? I don't think weight is a consideration currently, but wanted to know how you want the data. I can have the data loadter adjust this to num/10 if we need to.

Re: Item 'Weight'

Posted: Thu Jan 29, 2009 2:12 pm
by LethalEncounter
Ahh good catch! Nah just leave it like SOE has it. The reason it is /10 is so that you can have decimal numbers in a smaller value (int16 is 2 bytes while float is 4 bytes).