Cleanup related to setActiveClass boolean removal.
This commit is contained in:
parent
df4a4e1321
commit
975cb74d11
@ -13415,18 +13415,16 @@ public class PlayerInstance extends Playable
|
||||
|
||||
/**
|
||||
* Changes the character's class based on the given class index. <BR>
|
||||
* <BR>
|
||||
* An index of zero specifies the character's original (base) class, while indexes 1-3 specifies the character's sub-classes respectively.
|
||||
* @param classIndex the class index
|
||||
* @return true, if successful
|
||||
*/
|
||||
public synchronized boolean setActiveClass(int classIndex)
|
||||
public synchronized void setActiveClass(int classIndex)
|
||||
{
|
||||
if (isInCombat() || (getAI().getIntention() == CtrlIntention.AI_INTENTION_ATTACK))
|
||||
{
|
||||
sendMessage("Impossible switch class if in combat");
|
||||
sendPacket(ActionFailed.STATIC_PACKET);
|
||||
return false;
|
||||
return;
|
||||
}
|
||||
|
||||
// Delete a force buff upon class change.
|
||||
@ -13451,7 +13449,7 @@ public class PlayerInstance extends Playable
|
||||
catch (Exception e)
|
||||
{
|
||||
LOGGER.info("Could not switch " + getName() + "'s sub class to class index " + classIndex + ": " + e);
|
||||
return false;
|
||||
return;
|
||||
}
|
||||
}
|
||||
_classIndex = classIndex;
|
||||
@ -13623,8 +13621,6 @@ public class PlayerInstance extends Playable
|
||||
{
|
||||
getClan().broadcastToOnlineMembers(new PledgeShowMemberListUpdate(this));
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -10457,13 +10457,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
|
||||
@ -10471,7 +10470,7 @@ public class PlayerInstance extends Playable
|
||||
// Cannot switch or change subclasses while transformed
|
||||
if (_transformation != null)
|
||||
{
|
||||
return false;
|
||||
return;
|
||||
}
|
||||
|
||||
// Remove active item skills before saving char to database
|
||||
@ -10521,7 +10520,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;
|
||||
@ -10617,7 +10616,6 @@ public class PlayerInstance extends Playable
|
||||
ClassMasterInstance.showQuestionMark(this);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
finally
|
||||
{
|
||||
|
@ -10335,13 +10335,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
|
||||
@ -10349,7 +10348,7 @@ public class PlayerInstance extends Playable
|
||||
// Cannot switch or change subclasses while transformed
|
||||
if (_transformation != null)
|
||||
{
|
||||
return false;
|
||||
return;
|
||||
}
|
||||
|
||||
// Remove active item skills before saving char to database
|
||||
@ -10399,7 +10398,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;
|
||||
@ -10495,7 +10494,6 @@ public class PlayerInstance extends Playable
|
||||
ClassMasterInstance.showQuestionMark(this);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
finally
|
||||
{
|
||||
|
@ -9935,7 +9935,6 @@ public class PlayerInstance extends Playable
|
||||
sendPacket(new ExStorageMaxCount(this));
|
||||
|
||||
EventDispatcher.getInstance().notifyEventAsync(new OnPlayerSubChange(this), this);
|
||||
return;
|
||||
}
|
||||
finally
|
||||
{
|
||||
|
@ -9942,7 +9942,6 @@ public class PlayerInstance extends Playable
|
||||
sendPacket(new ExStorageMaxCount(this));
|
||||
|
||||
EventDispatcher.getInstance().notifyEventAsync(new OnPlayerSubChange(this), this);
|
||||
return;
|
||||
}
|
||||
finally
|
||||
{
|
||||
|
@ -9927,7 +9927,6 @@ public class PlayerInstance extends Playable
|
||||
sendPacket(new ExStorageMaxCount(this));
|
||||
|
||||
EventDispatcher.getInstance().notifyEventAsync(new OnPlayerSubChange(this), this);
|
||||
return;
|
||||
}
|
||||
finally
|
||||
{
|
||||
|
@ -9954,7 +9954,6 @@ public class PlayerInstance extends Playable
|
||||
sendPacket(new ExStorageMaxCount(this));
|
||||
|
||||
EventDispatcher.getInstance().notifyEventAsync(new OnPlayerSubChange(this), this);
|
||||
return;
|
||||
}
|
||||
finally
|
||||
{
|
||||
|
@ -9954,7 +9954,6 @@ public class PlayerInstance extends Playable
|
||||
sendPacket(new ExStorageMaxCount(this));
|
||||
|
||||
EventDispatcher.getInstance().notifyEventAsync(new OnPlayerSubChange(this), this);
|
||||
return;
|
||||
}
|
||||
finally
|
||||
{
|
||||
|
@ -9848,7 +9848,6 @@ public class PlayerInstance extends Playable
|
||||
sendPacket(new ExStorageMaxCount(this));
|
||||
|
||||
EventDispatcher.getInstance().notifyEventAsync(new OnPlayerSubChange(this), this);
|
||||
return;
|
||||
}
|
||||
finally
|
||||
{
|
||||
|
@ -9942,7 +9942,6 @@ public class PlayerInstance extends Playable
|
||||
sendPacket(new ExStorageMaxCount(this));
|
||||
|
||||
EventDispatcher.getInstance().notifyEventAsync(new OnPlayerSubChange(this), this);
|
||||
return;
|
||||
}
|
||||
finally
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user