Skip to content
Snippets Groups Projects
Commit 1747900f authored by UnAfraid's avatar UnAfraid
Browse files

DP-Part of L2J/L2J_Server@f8142137e506c8dbd345ba65eb094a1b7bad4f37

parent 989a0f06
No related branches found
No related tags found
No related merge requests found
...@@ -147,6 +147,12 @@ public class AdminAdmin implements IAdminCommandHandler ...@@ -147,6 +147,12 @@ public class AdminAdmin implements IAdminCommandHandler
activeChar.sendMessage("This player has already claimed the hero status."); activeChar.sendMessage("This player has already claimed the hero status.");
return false; return false;
} }
if (!Hero.getInstance().isUnclaimedHero(target.getObjectId()))
{
activeChar.sendMessage("This player cannot claim the hero status.");
return false;
}
Hero.getInstance().claimHero(target); Hero.getInstance().claimHero(target);
} }
else if (command.startsWith("admin_diet")) else if (command.startsWith("admin_diet"))
......
...@@ -343,7 +343,7 @@ public class OlympiadManagerLink implements IBypassHandler ...@@ -343,7 +343,7 @@ public class OlympiadManagerLink implements IBypassHandler
activeChar.sendPacket(new ExHeroList()); activeChar.sendPacket(new ExHeroList());
break; break;
case 5: // Hero Certification case 5: // Hero Certification
if (!Hero.getInstance().isHero(activeChar.getObjectId())) if (Hero.getInstance().isUnclaimedHero(activeChar.getObjectId()))
{ {
Hero.getInstance().claimHero(activeChar); Hero.getInstance().claimHero(activeChar);
reply.setFile(activeChar.getHtmlPrefix(), Olympiad.OLYMPIAD_HTML_PATH + "hero_receive.htm"); reply.setFile(activeChar.getHtmlPrefix(), Olympiad.OLYMPIAD_HTML_PATH + "hero_receive.htm");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment