Sphereserver / Source-X

Ultima Online server emulator
Apache License 2.0
53 stars 40 forks source link

Error setting more1/more2 Value on a spellbook (may affect other variable assignation) #1221

Closed Jhobean closed 2 months ago

Jhobean commented 3 months ago

We noticed some spellbook was loosing spell on them on reboot. After some test, it appear , on some situation, when we set some value in more1/more2 it's not correctly set on the variable.

Bug seem to occur internatly on server side. here the method to test it.

.add i_spellbook
.xmore1 0c0000100

(Should add 3 spells Agility+mana drain+Recall) Spell are added correctly and you can see it. But internally on the object m_itSpellbook.m_spells1 the value is not the good one.

.show more1 (you get 0100 instead of 0c0000100 )

If you reboot the server, book will be fix and mana drain+Recall will be remove (Normal situation)

I tought maybe the variable was set over is maximum value but if we set .xmore1 0FFFFFFFF All work like expected!!!

AtillaG1 commented 3 months ago

just putting it out here, maybe it can help with something. I think this problem has been touched or maybe created somewhere in these two links.

1) https://github.com/Sphereserver/Source-X/commit/fb36db1f0bac5c6a15cbcc94b5f51943eacbe529 2) https://github.com/Sphereserver/Source-X/issues/784

Jhobean commented 2 months ago

Fix on dev branch thx