Do not increase souls when player is transformed.

Thanks to Iris.
This commit is contained in:
MobiusDevelopment 2022-10-04 22:03:49 +00:00
parent 690b8d70e4
commit 28db841ba3
4 changed files with 24 additions and 4 deletions

View File

@ -11388,6 +11388,11 @@ public class Player extends Playable
*/
public void increaseSouls(int count, SoulType type)
{
if (isTransformed() || hasAbnormalType(AbnormalType.KAMAEL_TRANSFORM))
{
return;
}
final int newCount = getChargedSouls(type) + count;
_souls.put(type, newCount);
final SystemMessage sm = new SystemMessage(SystemMessageId.YOUR_SOUL_COUNT_HAS_INCREASED_BY_S1_IT_IS_NOW_AT_S2);
@ -11397,7 +11402,7 @@ public class Player extends Playable
restartSoulTask();
sendPacket(new EtcStatusUpdate(this));
if ((getRace() == Race.KAMAEL) && (newCount >= 100) && !isTransformed())
if ((getRace() == Race.KAMAEL) && (newCount >= 100))
{
if (type == SoulType.LIGHT)
{

View File

@ -11580,6 +11580,11 @@ public class Player extends Playable
*/
public void increaseSouls(int count, SoulType type)
{
if (isTransformed() || hasAbnormalType(AbnormalType.KAMAEL_TRANSFORM))
{
return;
}
final int newCount = getChargedSouls(type) + count;
_souls.put(type, newCount);
final SystemMessage sm = new SystemMessage(SystemMessageId.YOUR_SOUL_COUNT_HAS_INCREASED_BY_S1_IT_IS_NOW_AT_S2);
@ -11589,7 +11594,7 @@ public class Player extends Playable
restartSoulTask();
sendPacket(new EtcStatusUpdate(this));
if ((getRace() == Race.KAMAEL) && (newCount >= 100) && !isTransformed())
if ((getRace() == Race.KAMAEL) && (newCount >= 100))
{
if (type == SoulType.LIGHT)
{

View File

@ -11636,6 +11636,11 @@ public class Player extends Playable
*/
public void increaseSouls(int count, SoulType type)
{
if (isTransformed() || hasAbnormalType(AbnormalType.KAMAEL_TRANSFORM))
{
return;
}
final int newCount = getChargedSouls(type) + count;
_souls.put(type, newCount);
final SystemMessage sm = new SystemMessage(SystemMessageId.YOUR_SOUL_COUNT_HAS_INCREASED_BY_S1_IT_IS_NOW_AT_S2);
@ -11645,7 +11650,7 @@ public class Player extends Playable
restartSoulTask();
sendPacket(new EtcStatusUpdate(this));
if ((getRace() == Race.KAMAEL) && (newCount >= 100) && !isTransformed())
if ((getRace() == Race.KAMAEL) && (newCount >= 100))
{
if (type == SoulType.LIGHT)
{

View File

@ -11857,6 +11857,11 @@ public class Player extends Playable
*/
public void increaseSouls(int count, SoulType type)
{
if (isTransformed() || hasAbnormalType(AbnormalType.KAMAEL_TRANSFORM))
{
return;
}
final int newCount = getChargedSouls(type) + count;
_souls.put(type, newCount);
final SystemMessage sm = new SystemMessage(SystemMessageId.YOUR_SOUL_COUNT_HAS_INCREASED_BY_S1_IT_IS_NOW_AT_S2);
@ -11866,7 +11871,7 @@ public class Player extends Playable
restartSoulTask();
sendPacket(new EtcStatusUpdate(this));
if ((getRace() == Race.KAMAEL) && (newCount >= 100) && !isTransformed())
if ((getRace() == Race.KAMAEL) && (newCount >= 100))
{
if (type == SoulType.LIGHT)
{