This is a read only copy without any forum functionality of the old Modcraft forum.
If there is anything that you would like to have removed, message me on Discord via Kaev#5208.
Big thanks to Alastor for making this copy!

Menu

Author Topic: [SOLVED] Action Bar Saving  (Read 2374 times)

XxXGenesisXxX

  • Contributors
  • Model Change Addict
  • *****
  • Posts: 204
    • View Profile
[SOLVED] Action Bar Saving
« on: November 22, 2012, 06:38:00 pm »
Summary: Spells not saving to the action bar on ArcEmu.

Ok, so basically my custom spells are not saving to the the Character table (action1, action2 columns) like they should be. After a series of testing with Ascathos, it appears that is adhering to the SQL 65535 limitation.

I ran a test where I put 2 blizzards spells into my action bar. The spell ID 65510 into my action bar and I also put the spell ID 65541 into the action bar. I logged out, and upon logging in only the 65510 was saved. Another test I did, I cloned a custom spell of mine ID 85000 to the new ID of 8. The 85000 will not save to the action bar, but the ID of 8 will, even though the spell is identical.

I ran another test where I manually put the 85000 spell ID into the action1 column of my Character table (yes the character knew the spell). It did not appear upon logging in.

Ascahos and myself ended up searching through the core to find some reference to the saving of the Action Bars. Although in all the player.cpp/.h section where it saves spells, skills, achievements, auras etc... It only had a tiny reference to the Action Bars and no mention of saving it. Even though it is capable of saving spells under the ID of 65535.

Another less relevant thing that I found interesting, the action structure is done in 3 parts, ID, Type and Misc. Now the type is said in the core to define the difference between Macro, Spell and Item, but I can't find in the Database where it saves that difference like it does in Trinity.

So I am confused lol. Anyone have any idea to the cause of this? Perhaps a solution?
« Last Edit: November 22, 2012, 10:00:56 pm by Admin »

schlumpf

  • Administrator
  • Creator of Worlds
  • *****
  • Posts: 2967
    • View Profile
Re: Action Bar Saving
« Reply #1 on: November 22, 2012, 08:05:58 pm »
You answered your own question in the second sentence:
Quote
it appears that is adhering to the SQL 65535 limitation.

Change the table layout then, if there is a limit to the length.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

Ascathos

  • Moderators
  • Creator of Worlds
  • *****
  • Posts: 1129
    • View Profile
Re: Action Bar Saving
« Reply #2 on: November 22, 2012, 08:38:22 pm »
That's the problem; the table itself seems to somehow limit itself. Every value in itself that is over this value is not properly saved or loaded up by either client or servercore. There is no reference to it in the server core which even led us to post the issue on here.

Neither Long Text nor VarChar oder Blobs work here.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

XxXGenesisXxX

  • Contributors
  • Model Change Addict
  • *****
  • Posts: 204
    • View Profile
Re: Action Bar Saving
« Reply #3 on: November 22, 2012, 09:21:35 pm »
Also when I said it adheres to it, I more meant it can't read or write it. I can manually put 65536+ into the db, but it won't have an error. But it won't load in-game either, it will just reset to 0.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

schlumpf

  • Administrator
  • Creator of Worlds
  • *****
  • Posts: 2967
    • View Profile
Re: Action Bar Saving
« Reply #4 on: November 22, 2012, 09:45:03 pm »
https://github.com/arcemu/arcemu/blob/m ... .cpp#L3072
Code: [Select]
m_specs[s].mActions[Counter].Action = (uint16)atol(start);It will never go over 0xFFFF = 65535. That's just not possible. If you add spell 65536 to your action bar, you add spell 1. There is no way to add 65536.

Also, the client can't take spells on action bars that are higher than 65535.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

schlumpf

  • Administrator
  • Creator of Worlds
  • *****
  • Posts: 2967
    • View Profile
Re: Action Bar Saving
« Reply #5 on: November 22, 2012, 09:50:55 pm »
On a side note, ArcEmu still is a horrible piece of shit. And I have only looked at saving of action bars.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

XxXGenesisXxX

  • Contributors
  • Model Change Addict
  • *****
  • Posts: 204
    • View Profile
Re: Action Bar Saving
« Reply #6 on: November 22, 2012, 10:00:26 pm »
Ahhk, thanks for the reply schlumpf. Guess I'm gonna have to move the ID's to lower values.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »