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

Fixing "Locked" Classes


balliztik1
 Share

Recommended Posts

The lock feature on classes allows a user to keep players from picking certain classes. However, there is a bug to this. In the new character menu, the class number isn't used to determine what stats appear; the ListIndex property of the combo box is. If a class is locked, it won't appear in the combo box. This means that all classes AFTER that class are thrown off. The fix is to simply swap out the Private Sub cmbClass_Click() with this one:

```
Private Sub cmbClass_Click()
    Dim i As Byte

    For i = 0 To Max_Classes
        If Trim(Class(i).Name) = cmbClass.List(cmbClass.ListIndex) Then
            Exit For
        End If
    Next

    lblHP.Caption = STR(Class(i).HP)
    lblMP.Caption = STR(Class(i).MP)
    lblSP.Caption = STR(Class(i).SP)

    lblSTR.Caption = STR(Class(i).STR)
    lblDEF.Caption = STR(Class(i).DEF)
    lblSPEED.Caption = STR(Class(i).speed)
    lblMAGI.Caption = STR(Class(i).MAGI)

    lblClassDesc.Caption = Class(i).desc
End Sub

```
Link to comment
Share on other sites

  • 5 weeks later...
  • 4 months later...
@Neth:

> I tried this update on my client and it didn't work.
> Did it on a fresh client too. The code that you tell us to replace with the one up there is the same exact one with no changes to it.

Psst. That's probably because Eclipse now uses the one I wrote. This was written for older versions. Obviously, as it works its way into the source code, it will become obsolete. Locking this up since it's in Eclipse now. It's also been in the SVN version for a while, too.
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...