Page 1 of 1
Lock Hotbar at Server
Posted: Tue Nov 28, 2017 1:34 pm
by John Adams
I can’t believe it’s been so long I have to ask questions
Can a server admin “lock” a hotbar so the player can’t change the items? Say I want hotbar1 to always be 12 specific things, unchangeable.
I know the Lock stuff is generally client side... so maybe it’s not possible without a custom UI.
Re: Lock Hotbar at Server
Posted: Tue Nov 28, 2017 4:30 pm
by tyrbo
Looking at the code, I think the server just maintains the saved hotbar state, and the client looks like it maintains it's own internal state. So when you move something on your hotbar, it sends a packet to the server to update it server-side. The server doesn't send anything back in response.
You could try hooking into the incoming client packet (OP_QuickbarUpdateMsg), and whenever someone updates the hotbar you're interested in, ignore the change and re-send the hotbars.
I'm not sure if the client will even take the hotbar packet again. It's only sent once (from what I can see), so that might not even work.
Re: Lock Hotbar at Server
Posted: Wed Nov 29, 2017 8:40 am
by John Adams
Right on, thanks for the reply. I kinda figured it was client-side, mostly. I imagine it could be handled (maybe) via a custom UI, but in the 14 years of EQ2 I have enjoyed, I have never been brave enough to handle customizing a UI
It's probably not as hard as I predict, I just lack the attention span to learn heh.
Re: Lock Hotbar at Server
Posted: Wed Nov 29, 2017 11:18 am
by tyrbo
Well, like I said, it might be possible. If you can just re-send the initial hotbar packet, you could set the hotbar to whatever you want any time you want.
Come to think of it, it surely accepts that packet (or some similar one, at least), because you used to be able to possess your pet and it would replace your entire hotbar with their abilities.
For an easy test, you could wire up the /test command to call ClientPacketFunctions::SendQuickBarInit with your client. You could log in, open your SQL editor and change your hotbars in the database. Calling the /test command would then (hopefully) update your hotbars to reflect the change you made in the database.
Re: Lock Hotbar at Server
Posted: Wed Nov 29, 2017 8:09 pm
by Cynnar
Customizing the UI isn't bad once you start messing around with it. The editor that is in the install folder of the game is a buggy mess. I have learned to do my editing in notepad++ and use the editor for viewing, and an initial creating something.
It has been some time since I have messed with the UI, so I will need to look at it again this weekend to refresh my memory if you want to go that route.
Re: Lock Hotbar at Server
Posted: Wed Nov 29, 2017 8:16 pm
by tyrbo
The only issue with relying on a UI mod is enforcing it. If that's not super important, then it might be a good fit.
Re: Lock Hotbar at Server
Posted: Wed Nov 29, 2017 9:44 pm
by Cynnar
That is true. It would be hard to force someone to use a custom UI. Even if it's added in with some other changes, a person could disable it with a little poking around.