Fixed a bug where people could switch classes and still be registered in olympiad.

Contributed by Sahar.
This commit is contained in:
MobiusDevelopment
2019-10-13 00:03:39 +00:00
parent 033f81a4a6
commit 695a2dd7f0
15 changed files with 91 additions and 0 deletions

View File

@@ -24,6 +24,7 @@ import org.l2jmobius.gameserver.model.actor.Creature;
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
import org.l2jmobius.gameserver.model.effects.AbstractEffect;
import org.l2jmobius.gameserver.model.items.instance.ItemInstance;
import org.l2jmobius.gameserver.model.olympiad.OlympiadManager;
import org.l2jmobius.gameserver.model.skills.Skill;
import org.l2jmobius.gameserver.network.SystemMessageId;
import org.l2jmobius.gameserver.network.serverpackets.AcquireSkillList;
@@ -67,6 +68,11 @@ public class ClassChange extends AbstractEffect
return;
}
if (OlympiadManager.getInstance().isRegisteredInComp(player))
{
OlympiadManager.getInstance().unRegisterNoble(player);
}
final Skill identifyCrisis = SkillData.getInstance().getSkill(IDENTITY_CRISIS_SKILL_ID, 1);
if (identifyCrisis != null)
{