opendarkeden / server

42 stars 32 forks source link

UpdateVampireWeapon #113

Closed Supacek closed 1 year ago

Supacek commented 1 year ago

Stmt::EQ real Query Error Stmt [UPDATE VampireWeaponObject SET ObjectID=10552, ItemType=2, OwnerID= 'bunny', Storage=1, StorageID=0, X=11, Y=0, OptionType='', Durability=13000, Grade=4, EnchantLevel=-98 WHERE ItemID=5] Out of range value for column 'EnchantLevel' at row 1

database Problem in Colums.. maybe problems in all rest of the Enchantlevel tables?

Supacek commented 1 year ago

why is there -98 ??

tiancaiamao commented 1 year ago

https://github.com/opendarkeden/server/blob/1361037a54177758e08cf3c81305eafa3a966c76/src/server/gameserver/item/VampireWeapon.cpp#L162

Just change the database column from unsigned to signed should work:

`EnchantLevel` smallint unsigned NOT NULL DEFAULT '0',
Supacek commented 1 year ago

[UPDATE VampireWeaponObject SET ObjectID=43343, ItemType=0, OwnerID= 'Karukene', Storage=1, StorageID=0, X=11, Y=0, OptionType='11', Durability=7000, Grade=5, EnchantLevel=4294967210 WHERE ItemID=8635] Out of range value for column 'EnchantLevel' at row 1

tiancaiamao commented 1 year ago

EnchantLevel=4294967210

How could this happen? it seems this value overflows.

Supacek commented 1 year ago

i rly dont know im runing Opendarkeden as my server and some errors just show up in some time... i dont know how this number can be that big...:D btw i will like if u can help with the packets its rly annoyinig watching those wrong weapons in hands and stuff aronud that :-) btw u can hit me in Supacek#2400 discord