Use this keyword to reference the skill in method applyEffectScope.

This commit is contained in:
MobiusDevelopment
2019-04-08 21:43:07 +00:00
parent a18f4b5108
commit d2a48ed40d
11 changed files with 55 additions and 55 deletions

View File

@@ -1229,26 +1229,26 @@ public final class Skill implements IIdentifiable
{ {
if (effect.isInstant()) if (effect.isInstant())
{ {
if (applyInstantEffects && effect.calcSuccess(info.getEffector(), info.getEffected(), info.getSkill())) if (applyInstantEffects && effect.calcSuccess(info.getEffector(), info.getEffected(), this))
{ {
effect.instant(info.getEffector(), info.getEffected(), info.getSkill(), info.getItem()); effect.instant(info.getEffector(), info.getEffected(), this, info.getItem());
} }
} }
else if (addContinuousEffects) else if (addContinuousEffects)
{ {
if (applyInstantEffects) if (applyInstantEffects)
{ {
effect.continuousInstant(info.getEffector(), info.getEffected(), info.getSkill(), info.getItem()); effect.continuousInstant(info.getEffector(), info.getEffected(), this, info.getItem());
} }
if (effect.canStart(info.getEffector(), info.getEffected(), info.getSkill())) if (effect.canStart(info.getEffector(), info.getEffected(), this))
{ {
info.addEffect(effect); info.addEffect(effect);
} }
// tempfix for hp/mp regeneration // tempfix for hp/mp regeneration
// TODO: Find where regen stops and make a proper fix // TODO: Find where regen stops and make a proper fix
if (info.getEffected().isPlayer() && !info.getSkill().isBad()) if (info.getEffected().isPlayer() && !isBad())
{ {
info.getEffected().getActingPlayer().getStatus().startHpMpRegeneration(); info.getEffected().getActingPlayer().getStatus().startHpMpRegeneration();
} }

View File

@@ -1229,26 +1229,26 @@ public final class Skill implements IIdentifiable
{ {
if (effect.isInstant()) if (effect.isInstant())
{ {
if (applyInstantEffects && effect.calcSuccess(info.getEffector(), info.getEffected(), info.getSkill())) if (applyInstantEffects && effect.calcSuccess(info.getEffector(), info.getEffected(), this))
{ {
effect.instant(info.getEffector(), info.getEffected(), info.getSkill(), info.getItem()); effect.instant(info.getEffector(), info.getEffected(), this, info.getItem());
} }
} }
else if (addContinuousEffects) else if (addContinuousEffects)
{ {
if (applyInstantEffects) if (applyInstantEffects)
{ {
effect.continuousInstant(info.getEffector(), info.getEffected(), info.getSkill(), info.getItem()); effect.continuousInstant(info.getEffector(), info.getEffected(), this, info.getItem());
} }
if (effect.canStart(info.getEffector(), info.getEffected(), info.getSkill())) if (effect.canStart(info.getEffector(), info.getEffected(), this))
{ {
info.addEffect(effect); info.addEffect(effect);
} }
// tempfix for hp/mp regeneration // tempfix for hp/mp regeneration
// TODO: Find where regen stops and make a proper fix // TODO: Find where regen stops and make a proper fix
if (info.getEffected().isPlayer() && !info.getSkill().isBad()) if (info.getEffected().isPlayer() && !isBad())
{ {
info.getEffected().getActingPlayer().getStatus().startHpMpRegeneration(); info.getEffected().getActingPlayer().getStatus().startHpMpRegeneration();
} }

View File

@@ -1229,26 +1229,26 @@ public final class Skill implements IIdentifiable
{ {
if (effect.isInstant()) if (effect.isInstant())
{ {
if (applyInstantEffects && effect.calcSuccess(info.getEffector(), info.getEffected(), info.getSkill())) if (applyInstantEffects && effect.calcSuccess(info.getEffector(), info.getEffected(), this))
{ {
effect.instant(info.getEffector(), info.getEffected(), info.getSkill(), info.getItem()); effect.instant(info.getEffector(), info.getEffected(), this, info.getItem());
} }
} }
else if (addContinuousEffects) else if (addContinuousEffects)
{ {
if (applyInstantEffects) if (applyInstantEffects)
{ {
effect.continuousInstant(info.getEffector(), info.getEffected(), info.getSkill(), info.getItem()); effect.continuousInstant(info.getEffector(), info.getEffected(), this, info.getItem());
} }
if (effect.canStart(info.getEffector(), info.getEffected(), info.getSkill())) if (effect.canStart(info.getEffector(), info.getEffected(), this))
{ {
info.addEffect(effect); info.addEffect(effect);
} }
// tempfix for hp/mp regeneration // tempfix for hp/mp regeneration
// TODO: Find where regen stops and make a proper fix // TODO: Find where regen stops and make a proper fix
if (info.getEffected().isPlayer() && !info.getSkill().isBad()) if (info.getEffected().isPlayer() && !isBad())
{ {
info.getEffected().getActingPlayer().getStatus().startHpMpRegeneration(); info.getEffected().getActingPlayer().getStatus().startHpMpRegeneration();
} }

View File

@@ -1229,26 +1229,26 @@ public final class Skill implements IIdentifiable
{ {
if (effect.isInstant()) if (effect.isInstant())
{ {
if (applyInstantEffects && effect.calcSuccess(info.getEffector(), info.getEffected(), info.getSkill())) if (applyInstantEffects && effect.calcSuccess(info.getEffector(), info.getEffected(), this))
{ {
effect.instant(info.getEffector(), info.getEffected(), info.getSkill(), info.getItem()); effect.instant(info.getEffector(), info.getEffected(), this, info.getItem());
} }
} }
else if (addContinuousEffects) else if (addContinuousEffects)
{ {
if (applyInstantEffects) if (applyInstantEffects)
{ {
effect.continuousInstant(info.getEffector(), info.getEffected(), info.getSkill(), info.getItem()); effect.continuousInstant(info.getEffector(), info.getEffected(), this, info.getItem());
} }
if (effect.canStart(info.getEffector(), info.getEffected(), info.getSkill())) if (effect.canStart(info.getEffector(), info.getEffected(), this))
{ {
info.addEffect(effect); info.addEffect(effect);
} }
// tempfix for hp/mp regeneration // tempfix for hp/mp regeneration
// TODO: Find where regen stops and make a proper fix // TODO: Find where regen stops and make a proper fix
if (info.getEffected().isPlayer() && !info.getSkill().isBad()) if (info.getEffected().isPlayer() && !isBad())
{ {
info.getEffected().getActingPlayer().getStatus().startHpMpRegeneration(); info.getEffected().getActingPlayer().getStatus().startHpMpRegeneration();
} }

View File

@@ -1229,26 +1229,26 @@ public final class Skill implements IIdentifiable
{ {
if (effect.isInstant()) if (effect.isInstant())
{ {
if (applyInstantEffects && effect.calcSuccess(info.getEffector(), info.getEffected(), info.getSkill())) if (applyInstantEffects && effect.calcSuccess(info.getEffector(), info.getEffected(), this))
{ {
effect.instant(info.getEffector(), info.getEffected(), info.getSkill(), info.getItem()); effect.instant(info.getEffector(), info.getEffected(), this, info.getItem());
} }
} }
else if (addContinuousEffects) else if (addContinuousEffects)
{ {
if (applyInstantEffects) if (applyInstantEffects)
{ {
effect.continuousInstant(info.getEffector(), info.getEffected(), info.getSkill(), info.getItem()); effect.continuousInstant(info.getEffector(), info.getEffected(), this, info.getItem());
} }
if (effect.canStart(info.getEffector(), info.getEffected(), info.getSkill())) if (effect.canStart(info.getEffector(), info.getEffected(), this))
{ {
info.addEffect(effect); info.addEffect(effect);
} }
// tempfix for hp/mp regeneration // tempfix for hp/mp regeneration
// TODO: Find where regen stops and make a proper fix // TODO: Find where regen stops and make a proper fix
if (info.getEffected().isPlayer() && !info.getSkill().isBad()) if (info.getEffected().isPlayer() && !isBad())
{ {
info.getEffected().getActingPlayer().getStatus().startHpMpRegeneration(); info.getEffected().getActingPlayer().getStatus().startHpMpRegeneration();
} }

View File

@@ -1229,26 +1229,26 @@ public final class Skill implements IIdentifiable
{ {
if (effect.isInstant()) if (effect.isInstant())
{ {
if (applyInstantEffects && effect.calcSuccess(info.getEffector(), info.getEffected(), info.getSkill())) if (applyInstantEffects && effect.calcSuccess(info.getEffector(), info.getEffected(), this))
{ {
effect.instant(info.getEffector(), info.getEffected(), info.getSkill(), info.getItem()); effect.instant(info.getEffector(), info.getEffected(), this, info.getItem());
} }
} }
else if (addContinuousEffects) else if (addContinuousEffects)
{ {
if (applyInstantEffects) if (applyInstantEffects)
{ {
effect.continuousInstant(info.getEffector(), info.getEffected(), info.getSkill(), info.getItem()); effect.continuousInstant(info.getEffector(), info.getEffected(), this, info.getItem());
} }
if (effect.canStart(info.getEffector(), info.getEffected(), info.getSkill())) if (effect.canStart(info.getEffector(), info.getEffected(), this))
{ {
info.addEffect(effect); info.addEffect(effect);
} }
// tempfix for hp/mp regeneration // tempfix for hp/mp regeneration
// TODO: Find where regen stops and make a proper fix // TODO: Find where regen stops and make a proper fix
if (info.getEffected().isPlayer() && !info.getSkill().isBad()) if (info.getEffected().isPlayer() && !isBad())
{ {
info.getEffected().getActingPlayer().getStatus().startHpMpRegeneration(); info.getEffected().getActingPlayer().getStatus().startHpMpRegeneration();
} }

View File

@@ -1229,26 +1229,26 @@ public final class Skill implements IIdentifiable
{ {
if (effect.isInstant()) if (effect.isInstant())
{ {
if (applyInstantEffects && effect.calcSuccess(info.getEffector(), info.getEffected(), info.getSkill())) if (applyInstantEffects && effect.calcSuccess(info.getEffector(), info.getEffected(), this))
{ {
effect.instant(info.getEffector(), info.getEffected(), info.getSkill(), info.getItem()); effect.instant(info.getEffector(), info.getEffected(), this, info.getItem());
} }
} }
else if (addContinuousEffects) else if (addContinuousEffects)
{ {
if (applyInstantEffects) if (applyInstantEffects)
{ {
effect.continuousInstant(info.getEffector(), info.getEffected(), info.getSkill(), info.getItem()); effect.continuousInstant(info.getEffector(), info.getEffected(), this, info.getItem());
} }
if (effect.canStart(info.getEffector(), info.getEffected(), info.getSkill())) if (effect.canStart(info.getEffector(), info.getEffected(), this))
{ {
info.addEffect(effect); info.addEffect(effect);
} }
// tempfix for hp/mp regeneration // tempfix for hp/mp regeneration
// TODO: Find where regen stops and make a proper fix // TODO: Find where regen stops and make a proper fix
if (info.getEffected().isPlayer() && !info.getSkill().isBad()) if (info.getEffected().isPlayer() && !isBad())
{ {
info.getEffected().getActingPlayer().getStatus().startHpMpRegeneration(); info.getEffected().getActingPlayer().getStatus().startHpMpRegeneration();
} }

View File

@@ -1229,26 +1229,26 @@ public final class Skill implements IIdentifiable
{ {
if (effect.isInstant()) if (effect.isInstant())
{ {
if (applyInstantEffects && effect.calcSuccess(info.getEffector(), info.getEffected(), info.getSkill())) if (applyInstantEffects && effect.calcSuccess(info.getEffector(), info.getEffected(), this))
{ {
effect.instant(info.getEffector(), info.getEffected(), info.getSkill(), info.getItem()); effect.instant(info.getEffector(), info.getEffected(), this, info.getItem());
} }
} }
else if (addContinuousEffects) else if (addContinuousEffects)
{ {
if (applyInstantEffects) if (applyInstantEffects)
{ {
effect.continuousInstant(info.getEffector(), info.getEffected(), info.getSkill(), info.getItem()); effect.continuousInstant(info.getEffector(), info.getEffected(), this, info.getItem());
} }
if (effect.canStart(info.getEffector(), info.getEffected(), info.getSkill())) if (effect.canStart(info.getEffector(), info.getEffected(), this))
{ {
info.addEffect(effect); info.addEffect(effect);
} }
// tempfix for hp/mp regeneration // tempfix for hp/mp regeneration
// TODO: Find where regen stops and make a proper fix // TODO: Find where regen stops and make a proper fix
if (info.getEffected().isPlayer() && !info.getSkill().isBad()) if (info.getEffected().isPlayer() && !isBad())
{ {
info.getEffected().getActingPlayer().getStatus().startHpMpRegeneration(); info.getEffected().getActingPlayer().getStatus().startHpMpRegeneration();
} }

View File

@@ -1229,26 +1229,26 @@ public final class Skill implements IIdentifiable
{ {
if (effect.isInstant()) if (effect.isInstant())
{ {
if (applyInstantEffects && effect.calcSuccess(info.getEffector(), info.getEffected(), info.getSkill())) if (applyInstantEffects && effect.calcSuccess(info.getEffector(), info.getEffected(), this))
{ {
effect.instant(info.getEffector(), info.getEffected(), info.getSkill(), info.getItem()); effect.instant(info.getEffector(), info.getEffected(), this, info.getItem());
} }
} }
else if (addContinuousEffects) else if (addContinuousEffects)
{ {
if (applyInstantEffects) if (applyInstantEffects)
{ {
effect.continuousInstant(info.getEffector(), info.getEffected(), info.getSkill(), info.getItem()); effect.continuousInstant(info.getEffector(), info.getEffected(), this, info.getItem());
} }
if (effect.canStart(info.getEffector(), info.getEffected(), info.getSkill())) if (effect.canStart(info.getEffector(), info.getEffected(), this))
{ {
info.addEffect(effect); info.addEffect(effect);
} }
// tempfix for hp/mp regeneration // tempfix for hp/mp regeneration
// TODO: Find where regen stops and make a proper fix // TODO: Find where regen stops and make a proper fix
if (info.getEffected().isPlayer() && !info.getSkill().isBad()) if (info.getEffected().isPlayer() && !isBad())
{ {
info.getEffected().getActingPlayer().getStatus().startHpMpRegeneration(); info.getEffected().getActingPlayer().getStatus().startHpMpRegeneration();
} }

View File

@@ -1229,26 +1229,26 @@ public final class Skill implements IIdentifiable
{ {
if (effect.isInstant()) if (effect.isInstant())
{ {
if (applyInstantEffects && effect.calcSuccess(info.getEffector(), info.getEffected(), info.getSkill())) if (applyInstantEffects && effect.calcSuccess(info.getEffector(), info.getEffected(), this))
{ {
effect.instant(info.getEffector(), info.getEffected(), info.getSkill(), info.getItem()); effect.instant(info.getEffector(), info.getEffected(), this, info.getItem());
} }
} }
else if (addContinuousEffects) else if (addContinuousEffects)
{ {
if (applyInstantEffects) if (applyInstantEffects)
{ {
effect.continuousInstant(info.getEffector(), info.getEffected(), info.getSkill(), info.getItem()); effect.continuousInstant(info.getEffector(), info.getEffected(), this, info.getItem());
} }
if (effect.canStart(info.getEffector(), info.getEffected(), info.getSkill())) if (effect.canStart(info.getEffector(), info.getEffected(), this))
{ {
info.addEffect(effect); info.addEffect(effect);
} }
// tempfix for hp/mp regeneration // tempfix for hp/mp regeneration
// TODO: Find where regen stops and make a proper fix // TODO: Find where regen stops and make a proper fix
if (info.getEffected().isPlayer() && !info.getSkill().isBad()) if (info.getEffected().isPlayer() && !isBad())
{ {
info.getEffected().getActingPlayer().getStatus().startHpMpRegeneration(); info.getEffected().getActingPlayer().getStatus().startHpMpRegeneration();
} }

View File

@@ -1229,26 +1229,26 @@ public final class Skill implements IIdentifiable
{ {
if (effect.isInstant()) if (effect.isInstant())
{ {
if (applyInstantEffects && effect.calcSuccess(info.getEffector(), info.getEffected(), info.getSkill())) if (applyInstantEffects && effect.calcSuccess(info.getEffector(), info.getEffected(), this))
{ {
effect.instant(info.getEffector(), info.getEffected(), info.getSkill(), info.getItem()); effect.instant(info.getEffector(), info.getEffected(), this, info.getItem());
} }
} }
else if (addContinuousEffects) else if (addContinuousEffects)
{ {
if (applyInstantEffects) if (applyInstantEffects)
{ {
effect.continuousInstant(info.getEffector(), info.getEffected(), info.getSkill(), info.getItem()); effect.continuousInstant(info.getEffector(), info.getEffected(), this, info.getItem());
} }
if (effect.canStart(info.getEffector(), info.getEffected(), info.getSkill())) if (effect.canStart(info.getEffector(), info.getEffected(), this))
{ {
info.addEffect(effect); info.addEffect(effect);
} }
// tempfix for hp/mp regeneration // tempfix for hp/mp regeneration
// TODO: Find where regen stops and make a proper fix // TODO: Find where regen stops and make a proper fix
if (info.getEffected().isPlayer() && !info.getSkill().isBad()) if (info.getEffected().isPlayer() && !isBad())
{ {
info.getEffected().getActingPlayer().getStatus().startHpMpRegeneration(); info.getEffected().getActingPlayer().getStatus().startHpMpRegeneration();
} }