Addition of OlympiadEnabled configuration.

This commit is contained in:
MobiusDevelopment
2022-09-25 12:04:21 +00:00
parent cf32747997
commit 629cfae635
189 changed files with 1184 additions and 376 deletions

View File

@@ -16,6 +16,7 @@
*/
package ai.others.MonumentOfHeroes;
import org.l2jmobius.Config;
import org.l2jmobius.commons.util.CommonUtil;
import org.l2jmobius.gameserver.model.actor.Npc;
import org.l2jmobius.gameserver.model.actor.Player;
@@ -57,8 +58,11 @@ public class MonumentOfHeroes extends AbstractNpcAI
private MonumentOfHeroes()
{
addStartNpc(MONUMENTS);
addTalkId(MONUMENTS);
if (Config.OLYMPIAD_ENABLED)
{
addStartNpc(MONUMENTS);
addTalkId(MONUMENTS);
}
}
@Override

View File

@@ -16,6 +16,7 @@
*/
package handlers.usercommandhandlers;
import org.l2jmobius.Config;
import org.l2jmobius.gameserver.handler.IUserCommandHandler;
import org.l2jmobius.gameserver.model.WorldObject;
import org.l2jmobius.gameserver.model.actor.Player;
@@ -37,6 +38,12 @@ public class OlympiadStat implements IUserCommandHandler
@Override
public boolean useUserCommand(int id, Player player)
{
if (!Config.OLYMPIAD_ENABLED)
{
player.sendPacket(SystemMessageId.THE_GRAND_OLYMPIAD_GAMES_ARE_NOT_CURRENTLY_IN_PROGRESS);
return false;
}
if (id != COMMAND_IDS[0])
{
return false;