No need for setActiveClass to return boolean.

This commit is contained in:
MobiusDevelopment
2019-11-07 15:11:33 +00:00
parent b764d444df
commit 38d932ec9d
7 changed files with 35 additions and 42 deletions

View File

@@ -9696,13 +9696,12 @@ public class PlayerInstance extends Playable
* An index of zero specifies the character's original (base) class, while indexes 1-3 specifies the character's sub-classes respectively.<br>
* <font color="00FF00"/>WARNING: Use only on subclase change</font>
* @param classIndex
* @return
*/
public boolean setActiveClass(int classIndex)
public void setActiveClass(int classIndex)
{
if (!_subclassLock.tryLock())
{
return false;
return;
}
try
@@ -9710,7 +9709,7 @@ public class PlayerInstance extends Playable
// Cannot switch or change subclasses while transformed
if (isTransformed())
{
return false;
return;
}
// Remove active item skills before saving char to database
@@ -9765,7 +9764,7 @@ public class PlayerInstance extends Playable
catch (Exception e)
{
LOGGER.log(Level.WARNING, "Could not switch " + getName() + "'s sub class to class index " + classIndex + ": " + e.getMessage(), e);
return false;
return;
}
}
_classIndex = classIndex;
@@ -9849,7 +9848,7 @@ public class PlayerInstance extends Playable
sendPacket(new ExStorageMaxCount(this));
EventDispatcher.getInstance().notifyEventAsync(new OnPlayerSubChange(this), this);
return true;
return;
}
finally
{