blueboy / portal

This portal repo is for development purposes only
http://github.com/blueboy/portal
GNU General Public License v2.0
27 stars 24 forks source link

Combat Delay is not remembered #9

Closed kennumen closed 12 years ago

kennumen commented 12 years ago

Combat Delay is not remembered and defaults to 1 for the tank, 2 for DPS, 3 for healers. When you set "combat delay 0" and log off/on the bots, it resets to 1, 2, or 3 - not to 0 like it should. I suspect this is a conflict between auto follow distance (which I presume resets the values) and the storing/loading of the combat values from the SQL database. Frankly, it's debatable whether auto follow should take precedence, but I feel not. When the auto follow values are used, they are (or should be) saved to the database - if manual settings are chosen to override those values, those should be saved and used from then on. The user can always reset to auto follow, after all.

Spent a few hours looking into this already, lead to some tweaking of the load/save code, but haven't found where the values are reset to 1, 2, 3. Will check into myself if the issue stays open, may not have the time for the next few days - feel free to leave this open or assigned as you wish.

blueboy commented 12 years ago

I have a fix for this and will be pushing it shortly.

Several problems were found in handling database requests. I have checked this out and delays applied to bots using

[botname] combat delay < 1 - 10 >

are now remembered the next time the bots log on.

There maybe further issues with the code that I haven't checked (e.g. if you decide to change the bot's combat orders) If you can check this out I would be grateful. If the problem is solved, we can then put this one to bed too.

@EDIT: I have now pushed the fix to the 'new-ai' branch

kennumen commented 12 years ago

Nice tweak + fix. As far as I can tell Combat Delay is working as intended.