Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Hotbar Fix


Robert Buice
 Share

Recommended Posts

Hi, I just added Robin's Hotbar Fix to my client, yet I've done something wrong, it seems.

Before I move on, this fix is supposed to make the spells' cooldowns properly line up regardless of where they are in the skills tab, right?

If not, then how do I fix that?

If yes, then what have I done wrong? Here is the code I changed:

```
Public Sub SendHotbarUse(ByVal Slot As Long)
Dim Buffer As clsBuffer, x As Long

    ' If debug mode, handle error then exit out
    If Options.Debug = 1 Then On Error GoTo errorhandler

    ' check if spell
    If Hotbar(Slot).sType = 2 Then ' spell
        For x = 1 To MAX_PLAYER_SPELLS
            ' is the spell matching the hotbar?
            If PlayerSpells(x) = Hotbar(Slot).Slot Then
                ' found it, cast it
                CastSpell x
                Exit Sub
            End If
        Next
        ' can't find the spell, exit out
        Exit Sub
    End If

    Set Buffer = New clsBuffer
    Buffer.WriteLong CHotbarUse
    Buffer.WriteLong Slot
    SendData Buffer.ToArray()
    Set Buffer = Nothing

    ' Error handler
    Exit Sub
errorhandler:
    HandleError "SendHotbarUse", "modClientTCP", Err.Number, Err.Description, Err.Source, Err.HelpContext
    Err.Clear
    Exit Sub
End Sub
```
Thank you for any and all help, and I apologize for my stupidity in not knowing how to properly insert code.
Link to comment
Share on other sites

@Rotflturion:

> I have found a graphical bug with the hotbar.
>
> Basically, when You have a cool-down time on a spell, it should display the gray 'unavailable' graphic for the time of cool-down over the hotbar spell icon, right?
>
> The thing what it does, is it loads the position from the spell INVENTORY window, instead of hotbar.
>
> **Example, to make it clear:**
> You got [Fire] under hotbar 1, and [Water] under hotbar 2
> AND
> You got [Fire] in the first inventory square, and [Water] in second
> THEN
> If You cast water, it displays the cool-down icon correctly, over the water hotkey
>
> ![](http://img155.imageshack.us/img155/4631/correctx.png)
>
> **BUT.**
>
> Let's say You change the position in Your spell inventory to:
> First square [Water], second square [Fire].
> THEN
> If You cast [water], the gray spell cooldown icon is showing over the [Fire] hotbar, instead of over [Water].
>
> ![](http://img813.imageshack.us/img813/6935/incorrect.png)
>
> If You move the Water spell let's say one square down in the spell inventory, then it doesn't display the cooldown icon on the hotbar at all.
>
> I have added Robin's hotbar fix I found in the source tutorials, yet this graphical bug was NOT fixed by it.

That's the error.
Link to comment
Share on other sites

It fixes the fact the hotbar doesn't work… I don't quite remember what was wrong with it. I think it only works for the first and second spells because they were there by default. Any new ones won't be cast when pressing the shortcut key until you add the fix.
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...