Ceremony of Chaos addition and cleanup.
This commit is contained in:
parent
593e36fc3a
commit
b5f6abccb9
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- Ceremony of Chaos - Arena 1 -->
|
||||
<instance id="224" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/instance.xsd">
|
||||
<time empty="0" />
|
||||
<time duration="10" empty="5" />
|
||||
<misc isPvP="true" />
|
||||
<locations>
|
||||
<enter type="FIXED">
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- Ceremony of Chaos - Arena 2 -->
|
||||
<instance id="225" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/instance.xsd">
|
||||
<time empty="0" />
|
||||
<time duration="10" empty="5" />
|
||||
<misc isPvP="true" />
|
||||
<locations>
|
||||
<enter type="FIXED">
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- Ceremony of Chaos - Arena 3 -->
|
||||
<instance id="226" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/instance.xsd">
|
||||
<time empty="0" />
|
||||
<time duration="10" empty="5" />
|
||||
<misc isPvP="true" />
|
||||
<locations>
|
||||
<enter type="FIXED">
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- Ceremony of Chaos - Arena 4 -->
|
||||
<instance id="227" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/instance.xsd">
|
||||
<time empty="0" />
|
||||
<time duration="10" empty="5" />
|
||||
<misc isPvP="true" />
|
||||
<locations>
|
||||
<enter type="FIXED">
|
||||
|
1114
L2J_Mobius_01.0_Ertheia/dist/game/data/scripts/instances/CeremonyOfChaos/CeremonyOfChaos.java
vendored
Normal file
1114
L2J_Mobius_01.0_Ertheia/dist/game/data/scripts/instances/CeremonyOfChaos/CeremonyOfChaos.java
vendored
Normal file
File diff suppressed because it is too large
Load Diff
@ -243,7 +243,6 @@ import org.l2jmobius.gameserver.model.olympiad.OlympiadGameManager;
|
||||
import org.l2jmobius.gameserver.model.olympiad.OlympiadGameTask;
|
||||
import org.l2jmobius.gameserver.model.olympiad.OlympiadManager;
|
||||
import org.l2jmobius.gameserver.model.punishment.PunishmentAffect;
|
||||
import org.l2jmobius.gameserver.model.punishment.PunishmentTask;
|
||||
import org.l2jmobius.gameserver.model.punishment.PunishmentType;
|
||||
import org.l2jmobius.gameserver.model.quest.Quest;
|
||||
import org.l2jmobius.gameserver.model.quest.QuestState;
|
||||
@ -13517,21 +13516,6 @@ public class PlayerInstance extends Playable
|
||||
getVariables().set(PlayerVariables.WORLD_CHAT_VARIABLE_NAME, timesUsed);
|
||||
}
|
||||
|
||||
public void prohibiteCeremonyOfChaos()
|
||||
{
|
||||
if (!PunishmentManager.getInstance().hasPunishment(getObjectId(), PunishmentAffect.CHARACTER, PunishmentType.COC_BAN))
|
||||
{
|
||||
PunishmentManager.getInstance().startPunishment(new PunishmentTask(getObjectId(), PunishmentAffect.CHARACTER, PunishmentType.COC_BAN, 0, "", getClass().getSimpleName()));
|
||||
final int penalties = getVariables().getInt(PlayerVariables.CEREMONY_OF_CHAOS_PROHIBITED_PENALTIES, 0);
|
||||
getVariables().set(PlayerVariables.CEREMONY_OF_CHAOS_PROHIBITED_PENALTIES, penalties + 1);
|
||||
}
|
||||
}
|
||||
|
||||
public boolean isCeremonyOfChaosProhibited()
|
||||
{
|
||||
return PunishmentManager.getInstance().hasPunishment(getObjectId(), PunishmentAffect.CHARACTER, PunishmentType.COC_BAN) || (getVariables().getInt(PlayerVariables.CEREMONY_OF_CHAOS_PROHIBITED_PENALTIES, 0) >= 30);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Side of the player.
|
||||
*/
|
||||
|
@ -24,8 +24,7 @@ public enum PunishmentType
|
||||
BAN,
|
||||
CHAT_BAN,
|
||||
PARTY_BAN,
|
||||
JAIL,
|
||||
COC_BAN;
|
||||
JAIL;
|
||||
|
||||
public static PunishmentType getByName(String name)
|
||||
{
|
||||
|
@ -20,9 +20,6 @@ import java.sql.Connection;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
@ -30,7 +27,6 @@ import java.util.logging.Logger;
|
||||
import org.l2jmobius.commons.database.DatabaseFactory;
|
||||
import org.l2jmobius.gameserver.model.World;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
import org.l2jmobius.gameserver.util.Util;
|
||||
|
||||
/**
|
||||
* @author UnAfraid
|
||||
@ -49,8 +45,7 @@ public class PlayerVariables extends AbstractVariables
|
||||
public static final String HAIR_ACCESSORY_VARIABLE_NAME = "HAIR_ACCESSORY_ENABLED";
|
||||
public static final String WORLD_CHAT_VARIABLE_NAME = "WORLD_CHAT_USED";
|
||||
public static final String VITALITY_ITEMS_USED_VARIABLE_NAME = "VITALITY_ITEMS_USED";
|
||||
private static final String DAILY_MISSION_REWARDS = "DAILY_MISSION_REWARDS";
|
||||
public static final String CEREMONY_OF_CHAOS_PROHIBITED_PENALTIES = "CEREMONY_OF_CHAOS_PENALTIES";
|
||||
public static final String CEREMONY_OF_CHAOS_SCORE = "CEREMONY_OF_CHAOS_SCORE";
|
||||
public static final String CEREMONY_OF_CHAOS_MARKS = "CEREMONY_OF_CHAOS_MARKS";
|
||||
public static final String ABILITY_POINTS_MAIN_CLASS = "ABILITY_POINTS";
|
||||
public static final String ABILITY_POINTS_DUAL_CLASS = "ABILITY_POINTS_DUAL_CLASS";
|
||||
@ -170,75 +165,4 @@ public class PlayerVariables extends AbstractVariables
|
||||
{
|
||||
return World.getInstance().getPlayer(_objectId);
|
||||
}
|
||||
|
||||
public void addhdf4fReward(int rewardId)
|
||||
{
|
||||
String result = getString(DAILY_MISSION_REWARDS, "");
|
||||
if (result.isEmpty())
|
||||
{
|
||||
result = Integer.toString(rewardId);
|
||||
}
|
||||
else
|
||||
{
|
||||
result += "," + rewardId;
|
||||
}
|
||||
set(DAILY_MISSION_REWARDS, result);
|
||||
}
|
||||
|
||||
public void removehdf4fReward(int rewardId)
|
||||
{
|
||||
String result = "";
|
||||
final String data = getString(DAILY_MISSION_REWARDS, "");
|
||||
for (String s : data.split(","))
|
||||
{
|
||||
if (s.equals(Integer.toString(rewardId)))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
if (result.isEmpty())
|
||||
{
|
||||
result = s;
|
||||
}
|
||||
else
|
||||
{
|
||||
result += "," + s;
|
||||
}
|
||||
}
|
||||
set(DAILY_MISSION_REWARDS, result);
|
||||
}
|
||||
|
||||
public boolean hashdf4fReward(int rewardId)
|
||||
{
|
||||
final String data = getString(DAILY_MISSION_REWARDS, "");
|
||||
for (String s : data.split(","))
|
||||
{
|
||||
if (s.equals(Integer.toString(rewardId)))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public List<Integer> gethdf4fRewards()
|
||||
{
|
||||
List<Integer> rewards = null;
|
||||
final String data = getString(DAILY_MISSION_REWARDS, "");
|
||||
if (!data.isEmpty())
|
||||
{
|
||||
for (String s : getString(DAILY_MISSION_REWARDS, "").split(","))
|
||||
{
|
||||
if (Util.isDigit(s))
|
||||
{
|
||||
final int rewardId = Integer.parseInt(s);
|
||||
if (rewards == null)
|
||||
{
|
||||
rewards = new ArrayList<>();
|
||||
}
|
||||
rewards.add(rewardId);
|
||||
}
|
||||
}
|
||||
}
|
||||
return rewards != null ? rewards : Collections.emptyList();
|
||||
}
|
||||
}
|
||||
|
@ -47,6 +47,7 @@ import org.l2jmobius.gameserver.network.clientpackets.awakening.RequestCallToCha
|
||||
import org.l2jmobius.gameserver.network.clientpackets.ceremonyofchaos.RequestCancelCuriousHouse;
|
||||
import org.l2jmobius.gameserver.network.clientpackets.ceremonyofchaos.RequestCuriousHouseHtml;
|
||||
import org.l2jmobius.gameserver.network.clientpackets.ceremonyofchaos.RequestJoinCuriousHouse;
|
||||
import org.l2jmobius.gameserver.network.clientpackets.ceremonyofchaos.RequestLeaveCuriousHouse;
|
||||
import org.l2jmobius.gameserver.network.clientpackets.commission.RequestCommissionBuyInfo;
|
||||
import org.l2jmobius.gameserver.network.clientpackets.commission.RequestCommissionBuyItem;
|
||||
import org.l2jmobius.gameserver.network.clientpackets.commission.RequestCommissionCancel;
|
||||
@ -276,7 +277,7 @@ public enum ExIncomingPackets implements IIncomingPackets<GameClient>
|
||||
REQUEST_IN_ZONE_WAITING_TIME(0xBA, RequestInzoneWaitingTime::new, ConnectionState.IN_GAME),
|
||||
REQUEST_JOIN_CURIOUS_HOUSE(0xBB, RequestJoinCuriousHouse::new, ConnectionState.IN_GAME),
|
||||
REQUEST_CANCEL_CURIOUS_HOUSE(0xBC, RequestCancelCuriousHouse::new, ConnectionState.IN_GAME),
|
||||
REQUEST_LEAVE_CURIOUS_HOUSE(0xBD, null, ConnectionState.IN_GAME),
|
||||
REQUEST_LEAVE_CURIOUS_HOUSE(0xBD, RequestLeaveCuriousHouse::new, ConnectionState.IN_GAME),
|
||||
REQUEST_OBSERVING_LIST_CURIOUS_HOUSE(0xBE, null, ConnectionState.IN_GAME),
|
||||
REQUEST_OBSERVING_CURIOUS_HOUSE(0xBF, null, ConnectionState.IN_GAME),
|
||||
REQUEST_LEAVE_OBSERVING_CURIOUS_HOUSE(0xC0, null, ConnectionState.IN_GAME),
|
||||
|
@ -27,6 +27,7 @@ import org.l2jmobius.gameserver.handler.AdminCommandHandler;
|
||||
import org.l2jmobius.gameserver.handler.BypassHandler;
|
||||
import org.l2jmobius.gameserver.handler.CommunityBoardHandler;
|
||||
import org.l2jmobius.gameserver.handler.IBypassHandler;
|
||||
import org.l2jmobius.gameserver.instancemanager.QuestManager;
|
||||
import org.l2jmobius.gameserver.model.World;
|
||||
import org.l2jmobius.gameserver.model.WorldObject;
|
||||
import org.l2jmobius.gameserver.model.actor.Creature;
|
||||
@ -39,6 +40,7 @@ import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerBypass
|
||||
import org.l2jmobius.gameserver.model.events.returns.TerminateReturn;
|
||||
import org.l2jmobius.gameserver.model.items.instance.ItemInstance;
|
||||
import org.l2jmobius.gameserver.model.olympiad.Hero;
|
||||
import org.l2jmobius.gameserver.model.quest.Quest;
|
||||
import org.l2jmobius.gameserver.network.Disconnection;
|
||||
import org.l2jmobius.gameserver.network.GameClient;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.ActionFailed;
|
||||
@ -259,6 +261,15 @@ public class RequestBypassToServer implements IClientIncomingPacket
|
||||
final int multisellId = Integer.parseInt(_command.substring(10).trim());
|
||||
MultisellData.getInstance().separateAndSend(multisellId, player, null, false);
|
||||
}
|
||||
else if (_command.equals("pledgegame?command=apply"))
|
||||
{
|
||||
final Quest quest = QuestManager.getInstance().getQuest("CeremonyOfChaos");
|
||||
if (quest != null)
|
||||
{
|
||||
quest.notifyEvent("RegisterPlayer", null, player);
|
||||
}
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
final IBypassHandler handler = BypassHandler.getInstance().getHandler(_command);
|
||||
|
@ -17,19 +17,20 @@
|
||||
package org.l2jmobius.gameserver.network.clientpackets.ceremonyofchaos;
|
||||
|
||||
import org.l2jmobius.commons.network.PacketReader;
|
||||
import org.l2jmobius.gameserver.instancemanager.QuestManager;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
import org.l2jmobius.gameserver.model.quest.Quest;
|
||||
import org.l2jmobius.gameserver.network.GameClient;
|
||||
import org.l2jmobius.gameserver.network.clientpackets.IClientIncomingPacket;
|
||||
|
||||
/**
|
||||
* @author Sdw
|
||||
* @author Mobius
|
||||
*/
|
||||
public class RequestCancelCuriousHouse implements IClientIncomingPacket
|
||||
{
|
||||
@Override
|
||||
public boolean read(GameClient client, PacketReader packet)
|
||||
{
|
||||
// Nothing to read
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -42,15 +43,10 @@ public class RequestCancelCuriousHouse implements IClientIncomingPacket
|
||||
return;
|
||||
}
|
||||
|
||||
// if (CeremonyOfChaosManager.getInstance().unregisterPlayer(player))
|
||||
// {
|
||||
// player.sendPacket(SystemMessageId.YOU_HAVE_BEEN_TAKEN_OFF_THE_WAIT_LIST_YOU_MAY_ONLY_ENTER_THE_WAIT_LIST_ON_MON_THURS_EVERY_QUARTER_OF_AN_HOUR_FOR_5_MINUTES_BETWEEN_20_00_AND_23_40_IF_YOU_CANCEL_REGISTRATION_OR_CHOOSE_TO_FORFEIT_AFTER_ENTERING_A_MATCH_30_TIMES_OR_MORE_DURING_A_CYCLE_YOU_MUST_WAIT_UNTIL_THE_NEXT_CYCLE_TO_PARTICIPATE_IN_THE_CEREMONY_OF_CHAOS_UPON_ENTERING_THE_ARENA_ALL_BUFFS_EXCLUDING_VITALITY_BUFFS_ARE_REMOVED);
|
||||
// player.sendPacket(ExCuriousHouseState.IDLE_PACKET);
|
||||
//
|
||||
// if (CeremonyOfChaosManager.getInstance().getState() == CeremonyOfChaosState.PREPARING_FOR_TELEPORT)
|
||||
// {
|
||||
// player.prohibiteCeremonyOfChaos();
|
||||
// }
|
||||
// }
|
||||
final Quest quest = QuestManager.getInstance().getQuest("CeremonyOfChaos");
|
||||
if (quest != null)
|
||||
{
|
||||
quest.notifyEvent("UnregisterPlayer", null, player);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -17,19 +17,20 @@
|
||||
package org.l2jmobius.gameserver.network.clientpackets.ceremonyofchaos;
|
||||
|
||||
import org.l2jmobius.commons.network.PacketReader;
|
||||
import org.l2jmobius.gameserver.instancemanager.QuestManager;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
import org.l2jmobius.gameserver.model.quest.Quest;
|
||||
import org.l2jmobius.gameserver.network.GameClient;
|
||||
import org.l2jmobius.gameserver.network.clientpackets.IClientIncomingPacket;
|
||||
|
||||
/**
|
||||
* @author Sdw
|
||||
* @author Mobius
|
||||
*/
|
||||
public class RequestCuriousHouseHtml implements IClientIncomingPacket
|
||||
{
|
||||
@Override
|
||||
public boolean read(GameClient client, PacketReader packet)
|
||||
{
|
||||
// Nothing to read
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -42,21 +43,10 @@ public class RequestCuriousHouseHtml implements IClientIncomingPacket
|
||||
return;
|
||||
}
|
||||
|
||||
// if (CeremonyOfChaosManager.getInstance().getState() != CeremonyOfChaosState.REGISTRATION)
|
||||
// {
|
||||
// return;
|
||||
// }
|
||||
// else if (CeremonyOfChaosManager.getInstance().isRegistered(player))
|
||||
// {
|
||||
// player.sendPacket(SystemMessageId.YOU_ARE_ON_THE_WAITING_LIST_FOR_THE_CEREMONY_OF_CHAOS);
|
||||
// return;
|
||||
// }
|
||||
//
|
||||
// if (CeremonyOfChaosManager.getInstance().canRegister(player, true))
|
||||
// {
|
||||
// final NpcHtmlMessage message = new NpcHtmlMessage(0);
|
||||
// message.setFile(player, "data/html/CeremonyOfChaos/invite.htm");
|
||||
// player.sendPacket(message);
|
||||
// }
|
||||
final Quest quest = QuestManager.getInstance().getQuest("CeremonyOfChaos");
|
||||
if (quest != null)
|
||||
{
|
||||
quest.notifyEvent("RequestCuriousHouseHtml", null, player);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -17,19 +17,20 @@
|
||||
package org.l2jmobius.gameserver.network.clientpackets.ceremonyofchaos;
|
||||
|
||||
import org.l2jmobius.commons.network.PacketReader;
|
||||
import org.l2jmobius.gameserver.instancemanager.QuestManager;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
import org.l2jmobius.gameserver.model.quest.Quest;
|
||||
import org.l2jmobius.gameserver.network.GameClient;
|
||||
import org.l2jmobius.gameserver.network.clientpackets.IClientIncomingPacket;
|
||||
|
||||
/**
|
||||
* @author Sdw
|
||||
* @author Mobius
|
||||
*/
|
||||
public class RequestJoinCuriousHouse implements IClientIncomingPacket
|
||||
{
|
||||
@Override
|
||||
public boolean read(GameClient client, PacketReader packet)
|
||||
{
|
||||
// Nothing to read
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -42,25 +43,10 @@ public class RequestJoinCuriousHouse implements IClientIncomingPacket
|
||||
return;
|
||||
}
|
||||
|
||||
// if (CeremonyOfChaosManager.getInstance().getState() != CeremonyOfChaosState.REGISTRATION)
|
||||
// {
|
||||
// return;
|
||||
// }
|
||||
// else if (CeremonyOfChaosManager.getInstance().isRegistered(player))
|
||||
// {
|
||||
// player.sendPacket(SystemMessageId.YOU_ARE_ON_THE_WAITING_LIST_FOR_THE_CEREMONY_OF_CHAOS);
|
||||
// return;
|
||||
// }
|
||||
//
|
||||
// if (CeremonyOfChaosManager.getInstance().registerPlayer(player))
|
||||
// {
|
||||
// player.sendPacket(SystemMessageId.YOU_ARE_NOW_ON_THE_WAITING_LIST_YOU_WILL_AUTOMATICALLY_BE_TELEPORTED_WHEN_THE_TOURNAMENT_STARTS_AND_WILL_BE_REMOVED_FROM_THE_WAITING_LIST_IF_YOU_LOG_OUT_IF_YOU_CANCEL_REGISTRATION_WITHIN_THE_LAST_MINUTE_OF_ENTERING_THE_ARENA_AFTER_SIGNING_UP_30_TIMES_OR_MORE_OR_FORFEIT_AFTER_ENTERING_THE_ARENA_30_TIMES_OR_MORE_DURING_A_CYCLE_YOU_BECOME_INELIGIBLE_FOR_PARTICIPATION_IN_THE_CEREMONY_OF_CHAOS_UNTIL_THE_NEXT_CYCLE_ALL_THE_BUFFS_EXCEPT_THE_VITALITY_BUFF_WILL_BE_REMOVED_ONCE_YOU_ENTER_THE_ARENAS);
|
||||
// player.sendPacket(SystemMessageId.EXCEPT_THE_VITALITY_BUFF_ALL_BUFFS_INCLUDING_ART_OF_SEDUCTION_WILL_BE_DELETED);
|
||||
// player.sendPacket(ExCuriousHouseState.PREPARE_PACKET);
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// player.sendPacket(SystemMessageId.THERE_ARE_TOO_MANY_CHALLENGERS_YOU_CANNOT_PARTICIPATE_NOW);
|
||||
// }
|
||||
final Quest quest = QuestManager.getInstance().getQuest("CeremonyOfChaos");
|
||||
if (quest != null)
|
||||
{
|
||||
quest.notifyEvent("RegisterPlayer", null, player);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,52 @@
|
||||
/*
|
||||
* This file is part of the L2J Mobius project.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package org.l2jmobius.gameserver.network.clientpackets.ceremonyofchaos;
|
||||
|
||||
import org.l2jmobius.commons.network.PacketReader;
|
||||
import org.l2jmobius.gameserver.instancemanager.QuestManager;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
import org.l2jmobius.gameserver.model.quest.Quest;
|
||||
import org.l2jmobius.gameserver.network.GameClient;
|
||||
import org.l2jmobius.gameserver.network.clientpackets.IClientIncomingPacket;
|
||||
|
||||
/**
|
||||
* @author Mobius
|
||||
*/
|
||||
public class RequestLeaveCuriousHouse implements IClientIncomingPacket
|
||||
{
|
||||
@Override
|
||||
public boolean read(GameClient client, PacketReader packet)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run(GameClient client)
|
||||
{
|
||||
final PlayerInstance player = client.getPlayer();
|
||||
if (player == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
final Quest quest = QuestManager.getInstance().getQuest("CeremonyOfChaos");
|
||||
if (quest != null)
|
||||
{
|
||||
quest.notifyEvent("RequestQuit", null, player);
|
||||
}
|
||||
}
|
||||
}
|
@ -47,10 +47,11 @@ public class ExCuriousHouseMemberList implements IClientOutgoingPacket
|
||||
packet.writeD(_id);
|
||||
packet.writeD(_maxPlayers);
|
||||
packet.writeD(_players.size());
|
||||
int pos = 0;
|
||||
for (PlayerInstance player : _players)
|
||||
{
|
||||
packet.writeD(player.getObjectId());
|
||||
packet.writeD(0x00); // cocPlayer.getPosition
|
||||
packet.writeD(pos++);
|
||||
packet.writeD(player.getMaxHp());
|
||||
packet.writeD(player.getMaxCp());
|
||||
packet.writeD((int) player.getCurrentHp());
|
||||
|
@ -21,6 +21,7 @@ import java.util.Collection;
|
||||
import org.l2jmobius.commons.network.PacketWriter;
|
||||
import org.l2jmobius.gameserver.enums.CeremonyOfChaosResult;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
import org.l2jmobius.gameserver.model.variables.PlayerVariables;
|
||||
import org.l2jmobius.gameserver.network.OutgoingPackets;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.IClientOutgoingPacket;
|
||||
|
||||
@ -31,11 +32,13 @@ public class ExCuriousHouseResult implements IClientOutgoingPacket
|
||||
{
|
||||
private final CeremonyOfChaosResult _result;
|
||||
private final Collection<PlayerInstance> _players;
|
||||
private final int _time;
|
||||
|
||||
public ExCuriousHouseResult(CeremonyOfChaosResult result, Collection<PlayerInstance> players)
|
||||
public ExCuriousHouseResult(CeremonyOfChaosResult result, Collection<PlayerInstance> players, int time)
|
||||
{
|
||||
_result = result;
|
||||
_players = players;
|
||||
_time = time;
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -44,15 +47,16 @@ public class ExCuriousHouseResult implements IClientOutgoingPacket
|
||||
OutgoingPackets.EX_CURIOUS_HOUSE_RESULT.writeId(packet);
|
||||
packet.writeD(0); // _event.getId()
|
||||
packet.writeH(_result.ordinal());
|
||||
packet.writeD(_players.size()); // CeremonyOfChaosManager.getInstance().getMaxPlayersInArena()
|
||||
packet.writeD(18); // max players
|
||||
packet.writeD(_players.size());
|
||||
int pos = 0;
|
||||
for (PlayerInstance player : _players)
|
||||
{
|
||||
packet.writeD(player.getObjectId());
|
||||
packet.writeD(0x00); // cocPlayer.getPosition
|
||||
packet.writeD(pos++); // position
|
||||
packet.writeD(player.getClassId().getId());
|
||||
packet.writeD(0x00); // getLifeTime
|
||||
packet.writeD(0x00); // getScore
|
||||
packet.writeD(_time); // getLifeTime
|
||||
packet.writeD(player.getVariables().getInt(PlayerVariables.CEREMONY_OF_CHAOS_SCORE, 0));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- Ceremony of Chaos - Arena 1 -->
|
||||
<instance id="224" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/instance.xsd">
|
||||
<time empty="0" />
|
||||
<time duration="10" empty="5" />
|
||||
<misc isPvP="true" />
|
||||
<locations>
|
||||
<enter type="FIXED">
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- Ceremony of Chaos - Arena 2 -->
|
||||
<instance id="225" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/instance.xsd">
|
||||
<time empty="0" />
|
||||
<time duration="10" empty="5" />
|
||||
<misc isPvP="true" />
|
||||
<locations>
|
||||
<enter type="FIXED">
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- Ceremony of Chaos - Arena 3 -->
|
||||
<instance id="226" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/instance.xsd">
|
||||
<time empty="0" />
|
||||
<time duration="10" empty="5" />
|
||||
<misc isPvP="true" />
|
||||
<locations>
|
||||
<enter type="FIXED">
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- Ceremony of Chaos - Arena 4 -->
|
||||
<instance id="227" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/instance.xsd">
|
||||
<time empty="0" />
|
||||
<time duration="10" empty="5" />
|
||||
<misc isPvP="true" />
|
||||
<locations>
|
||||
<enter type="FIXED">
|
||||
|
1114
L2J_Mobius_02.5_Underground/dist/game/data/scripts/instances/CeremonyOfChaos/CeremonyOfChaos.java
vendored
Normal file
1114
L2J_Mobius_02.5_Underground/dist/game/data/scripts/instances/CeremonyOfChaos/CeremonyOfChaos.java
vendored
Normal file
File diff suppressed because it is too large
Load Diff
@ -245,7 +245,6 @@ import org.l2jmobius.gameserver.model.olympiad.OlympiadGameManager;
|
||||
import org.l2jmobius.gameserver.model.olympiad.OlympiadGameTask;
|
||||
import org.l2jmobius.gameserver.model.olympiad.OlympiadManager;
|
||||
import org.l2jmobius.gameserver.model.punishment.PunishmentAffect;
|
||||
import org.l2jmobius.gameserver.model.punishment.PunishmentTask;
|
||||
import org.l2jmobius.gameserver.model.punishment.PunishmentType;
|
||||
import org.l2jmobius.gameserver.model.quest.Quest;
|
||||
import org.l2jmobius.gameserver.model.quest.QuestState;
|
||||
@ -13520,21 +13519,6 @@ public class PlayerInstance extends Playable
|
||||
getVariables().set(PlayerVariables.WORLD_CHAT_VARIABLE_NAME, timesUsed);
|
||||
}
|
||||
|
||||
public void prohibiteCeremonyOfChaos()
|
||||
{
|
||||
if (!PunishmentManager.getInstance().hasPunishment(getObjectId(), PunishmentAffect.CHARACTER, PunishmentType.COC_BAN))
|
||||
{
|
||||
PunishmentManager.getInstance().startPunishment(new PunishmentTask(getObjectId(), PunishmentAffect.CHARACTER, PunishmentType.COC_BAN, 0, "", getClass().getSimpleName()));
|
||||
final int penalties = getVariables().getInt(PlayerVariables.CEREMONY_OF_CHAOS_PROHIBITED_PENALTIES, 0);
|
||||
getVariables().set(PlayerVariables.CEREMONY_OF_CHAOS_PROHIBITED_PENALTIES, penalties + 1);
|
||||
}
|
||||
}
|
||||
|
||||
public boolean isCeremonyOfChaosProhibited()
|
||||
{
|
||||
return PunishmentManager.getInstance().hasPunishment(getObjectId(), PunishmentAffect.CHARACTER, PunishmentType.COC_BAN) || (getVariables().getInt(PlayerVariables.CEREMONY_OF_CHAOS_PROHIBITED_PENALTIES, 0) >= 30);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Side of the player.
|
||||
*/
|
||||
|
@ -24,8 +24,7 @@ public enum PunishmentType
|
||||
BAN,
|
||||
CHAT_BAN,
|
||||
PARTY_BAN,
|
||||
JAIL,
|
||||
COC_BAN;
|
||||
JAIL;
|
||||
|
||||
public static PunishmentType getByName(String name)
|
||||
{
|
||||
|
@ -52,7 +52,7 @@ public class PlayerVariables extends AbstractVariables
|
||||
public static final String ATTENDANCE_DATE = "ATTENDANCE_DATE";
|
||||
public static final String ATTENDANCE_INDEX = "ATTENDANCE_INDEX";
|
||||
private static final String DAILY_MISSION_REWARDS = "DAILY_MISSION_REWARDS";
|
||||
public static final String CEREMONY_OF_CHAOS_PROHIBITED_PENALTIES = "CEREMONY_OF_CHAOS_PENALTIES";
|
||||
public static final String CEREMONY_OF_CHAOS_SCORE = "CEREMONY_OF_CHAOS_SCORE";
|
||||
public static final String CEREMONY_OF_CHAOS_MARKS = "CEREMONY_OF_CHAOS_MARKS";
|
||||
public static final String ABILITY_POINTS_MAIN_CLASS = "ABILITY_POINTS";
|
||||
public static final String ABILITY_POINTS_DUAL_CLASS = "ABILITY_POINTS_DUAL_CLASS";
|
||||
|
@ -49,6 +49,7 @@ import org.l2jmobius.gameserver.network.clientpackets.awakening.RequestCallToCha
|
||||
import org.l2jmobius.gameserver.network.clientpackets.ceremonyofchaos.RequestCancelCuriousHouse;
|
||||
import org.l2jmobius.gameserver.network.clientpackets.ceremonyofchaos.RequestCuriousHouseHtml;
|
||||
import org.l2jmobius.gameserver.network.clientpackets.ceremonyofchaos.RequestJoinCuriousHouse;
|
||||
import org.l2jmobius.gameserver.network.clientpackets.ceremonyofchaos.RequestLeaveCuriousHouse;
|
||||
import org.l2jmobius.gameserver.network.clientpackets.commission.RequestCommissionBuyInfo;
|
||||
import org.l2jmobius.gameserver.network.clientpackets.commission.RequestCommissionBuyItem;
|
||||
import org.l2jmobius.gameserver.network.clientpackets.commission.RequestCommissionCancel;
|
||||
@ -284,7 +285,7 @@ public enum ExIncomingPackets implements IIncomingPackets<GameClient>
|
||||
REQUEST_IN_ZONE_WAITING_TIME(0xBA, RequestInzoneWaitingTime::new, ConnectionState.IN_GAME),
|
||||
REQUEST_JOIN_CURIOUS_HOUSE(0xBB, RequestJoinCuriousHouse::new, ConnectionState.IN_GAME),
|
||||
REQUEST_CANCEL_CURIOUS_HOUSE(0xBC, RequestCancelCuriousHouse::new, ConnectionState.IN_GAME),
|
||||
REQUEST_LEAVE_CURIOUS_HOUSE(0xBD, null, ConnectionState.IN_GAME),
|
||||
REQUEST_LEAVE_CURIOUS_HOUSE(0xBD, RequestLeaveCuriousHouse::new, ConnectionState.IN_GAME),
|
||||
REQUEST_OBSERVING_LIST_CURIOUS_HOUSE(0xBE, null, ConnectionState.IN_GAME),
|
||||
REQUEST_OBSERVING_CURIOUS_HOUSE(0xBF, null, ConnectionState.IN_GAME),
|
||||
REQUEST_LEAVE_OBSERVING_CURIOUS_HOUSE(0xC0, null, ConnectionState.IN_GAME),
|
||||
|
@ -27,6 +27,7 @@ import org.l2jmobius.gameserver.handler.AdminCommandHandler;
|
||||
import org.l2jmobius.gameserver.handler.BypassHandler;
|
||||
import org.l2jmobius.gameserver.handler.CommunityBoardHandler;
|
||||
import org.l2jmobius.gameserver.handler.IBypassHandler;
|
||||
import org.l2jmobius.gameserver.instancemanager.QuestManager;
|
||||
import org.l2jmobius.gameserver.model.World;
|
||||
import org.l2jmobius.gameserver.model.WorldObject;
|
||||
import org.l2jmobius.gameserver.model.actor.Creature;
|
||||
@ -39,6 +40,7 @@ import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerBypass
|
||||
import org.l2jmobius.gameserver.model.events.returns.TerminateReturn;
|
||||
import org.l2jmobius.gameserver.model.items.instance.ItemInstance;
|
||||
import org.l2jmobius.gameserver.model.olympiad.Hero;
|
||||
import org.l2jmobius.gameserver.model.quest.Quest;
|
||||
import org.l2jmobius.gameserver.network.Disconnection;
|
||||
import org.l2jmobius.gameserver.network.GameClient;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.ActionFailed;
|
||||
@ -259,6 +261,15 @@ public class RequestBypassToServer implements IClientIncomingPacket
|
||||
final int multisellId = Integer.parseInt(_command.substring(10).trim());
|
||||
MultisellData.getInstance().separateAndSend(multisellId, player, null, false);
|
||||
}
|
||||
else if (_command.equals("pledgegame?command=apply"))
|
||||
{
|
||||
final Quest quest = QuestManager.getInstance().getQuest("CeremonyOfChaos");
|
||||
if (quest != null)
|
||||
{
|
||||
quest.notifyEvent("RegisterPlayer", null, player);
|
||||
}
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
final IBypassHandler handler = BypassHandler.getInstance().getHandler(_command);
|
||||
|
@ -17,19 +17,20 @@
|
||||
package org.l2jmobius.gameserver.network.clientpackets.ceremonyofchaos;
|
||||
|
||||
import org.l2jmobius.commons.network.PacketReader;
|
||||
import org.l2jmobius.gameserver.instancemanager.QuestManager;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
import org.l2jmobius.gameserver.model.quest.Quest;
|
||||
import org.l2jmobius.gameserver.network.GameClient;
|
||||
import org.l2jmobius.gameserver.network.clientpackets.IClientIncomingPacket;
|
||||
|
||||
/**
|
||||
* @author Sdw
|
||||
* @author Mobius
|
||||
*/
|
||||
public class RequestCancelCuriousHouse implements IClientIncomingPacket
|
||||
{
|
||||
@Override
|
||||
public boolean read(GameClient client, PacketReader packet)
|
||||
{
|
||||
// Nothing to read
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -42,15 +43,10 @@ public class RequestCancelCuriousHouse implements IClientIncomingPacket
|
||||
return;
|
||||
}
|
||||
|
||||
// if (CeremonyOfChaosManager.getInstance().unregisterPlayer(player))
|
||||
// {
|
||||
// player.sendPacket(SystemMessageId.YOU_HAVE_BEEN_TAKEN_OFF_THE_WAIT_LIST_YOU_MAY_ONLY_ENTER_THE_WAIT_LIST_ON_MON_THURS_EVERY_QUARTER_OF_AN_HOUR_FOR_5_MINUTES_BETWEEN_20_00_AND_23_40_IF_YOU_CANCEL_REGISTRATION_OR_CHOOSE_TO_FORFEIT_AFTER_ENTERING_A_MATCH_30_TIMES_OR_MORE_DURING_A_CYCLE_YOU_MUST_WAIT_UNTIL_THE_NEXT_CYCLE_TO_PARTICIPATE_IN_THE_CEREMONY_OF_CHAOS_UPON_ENTERING_THE_ARENA_ALL_BUFFS_EXCLUDING_VITALITY_BUFFS_ARE_REMOVED);
|
||||
// player.sendPacket(ExCuriousHouseState.IDLE_PACKET);
|
||||
//
|
||||
// if (CeremonyOfChaosManager.getInstance().getState() == CeremonyOfChaosState.PREPARING_FOR_TELEPORT)
|
||||
// {
|
||||
// player.prohibiteCeremonyOfChaos();
|
||||
// }
|
||||
// }
|
||||
final Quest quest = QuestManager.getInstance().getQuest("CeremonyOfChaos");
|
||||
if (quest != null)
|
||||
{
|
||||
quest.notifyEvent("UnregisterPlayer", null, player);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -17,19 +17,20 @@
|
||||
package org.l2jmobius.gameserver.network.clientpackets.ceremonyofchaos;
|
||||
|
||||
import org.l2jmobius.commons.network.PacketReader;
|
||||
import org.l2jmobius.gameserver.instancemanager.QuestManager;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
import org.l2jmobius.gameserver.model.quest.Quest;
|
||||
import org.l2jmobius.gameserver.network.GameClient;
|
||||
import org.l2jmobius.gameserver.network.clientpackets.IClientIncomingPacket;
|
||||
|
||||
/**
|
||||
* @author Sdw
|
||||
* @author Mobius
|
||||
*/
|
||||
public class RequestCuriousHouseHtml implements IClientIncomingPacket
|
||||
{
|
||||
@Override
|
||||
public boolean read(GameClient client, PacketReader packet)
|
||||
{
|
||||
// Nothing to read
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -42,21 +43,10 @@ public class RequestCuriousHouseHtml implements IClientIncomingPacket
|
||||
return;
|
||||
}
|
||||
|
||||
// if (CeremonyOfChaosManager.getInstance().getState() != CeremonyOfChaosState.REGISTRATION)
|
||||
// {
|
||||
// return;
|
||||
// }
|
||||
// else if (CeremonyOfChaosManager.getInstance().isRegistered(player))
|
||||
// {
|
||||
// player.sendPacket(SystemMessageId.YOU_ARE_ON_THE_WAITING_LIST_FOR_THE_CEREMONY_OF_CHAOS);
|
||||
// return;
|
||||
// }
|
||||
//
|
||||
// if (CeremonyOfChaosManager.getInstance().canRegister(player, true))
|
||||
// {
|
||||
// final NpcHtmlMessage message = new NpcHtmlMessage(0);
|
||||
// message.setFile(player, "data/html/CeremonyOfChaos/invite.htm");
|
||||
// player.sendPacket(message);
|
||||
// }
|
||||
final Quest quest = QuestManager.getInstance().getQuest("CeremonyOfChaos");
|
||||
if (quest != null)
|
||||
{
|
||||
quest.notifyEvent("RequestCuriousHouseHtml", null, player);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -17,19 +17,20 @@
|
||||
package org.l2jmobius.gameserver.network.clientpackets.ceremonyofchaos;
|
||||
|
||||
import org.l2jmobius.commons.network.PacketReader;
|
||||
import org.l2jmobius.gameserver.instancemanager.QuestManager;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
import org.l2jmobius.gameserver.model.quest.Quest;
|
||||
import org.l2jmobius.gameserver.network.GameClient;
|
||||
import org.l2jmobius.gameserver.network.clientpackets.IClientIncomingPacket;
|
||||
|
||||
/**
|
||||
* @author Sdw
|
||||
* @author Mobius
|
||||
*/
|
||||
public class RequestJoinCuriousHouse implements IClientIncomingPacket
|
||||
{
|
||||
@Override
|
||||
public boolean read(GameClient client, PacketReader packet)
|
||||
{
|
||||
// Nothing to read
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -42,25 +43,10 @@ public class RequestJoinCuriousHouse implements IClientIncomingPacket
|
||||
return;
|
||||
}
|
||||
|
||||
// if (CeremonyOfChaosManager.getInstance().getState() != CeremonyOfChaosState.REGISTRATION)
|
||||
// {
|
||||
// return;
|
||||
// }
|
||||
// else if (CeremonyOfChaosManager.getInstance().isRegistered(player))
|
||||
// {
|
||||
// player.sendPacket(SystemMessageId.YOU_ARE_ON_THE_WAITING_LIST_FOR_THE_CEREMONY_OF_CHAOS);
|
||||
// return;
|
||||
// }
|
||||
//
|
||||
// if (CeremonyOfChaosManager.getInstance().registerPlayer(player))
|
||||
// {
|
||||
// player.sendPacket(SystemMessageId.YOU_ARE_NOW_ON_THE_WAITING_LIST_YOU_WILL_AUTOMATICALLY_BE_TELEPORTED_WHEN_THE_TOURNAMENT_STARTS_AND_WILL_BE_REMOVED_FROM_THE_WAITING_LIST_IF_YOU_LOG_OUT_IF_YOU_CANCEL_REGISTRATION_WITHIN_THE_LAST_MINUTE_OF_ENTERING_THE_ARENA_AFTER_SIGNING_UP_30_TIMES_OR_MORE_OR_FORFEIT_AFTER_ENTERING_THE_ARENA_30_TIMES_OR_MORE_DURING_A_CYCLE_YOU_BECOME_INELIGIBLE_FOR_PARTICIPATION_IN_THE_CEREMONY_OF_CHAOS_UNTIL_THE_NEXT_CYCLE_ALL_THE_BUFFS_EXCEPT_THE_VITALITY_BUFF_WILL_BE_REMOVED_ONCE_YOU_ENTER_THE_ARENAS);
|
||||
// player.sendPacket(SystemMessageId.EXCEPT_THE_VITALITY_BUFF_ALL_BUFFS_INCLUDING_ART_OF_SEDUCTION_WILL_BE_DELETED);
|
||||
// player.sendPacket(ExCuriousHouseState.PREPARE_PACKET);
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// player.sendPacket(SystemMessageId.THERE_ARE_TOO_MANY_CHALLENGERS_YOU_CANNOT_PARTICIPATE_NOW);
|
||||
// }
|
||||
final Quest quest = QuestManager.getInstance().getQuest("CeremonyOfChaos");
|
||||
if (quest != null)
|
||||
{
|
||||
quest.notifyEvent("RegisterPlayer", null, player);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,52 @@
|
||||
/*
|
||||
* This file is part of the L2J Mobius project.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package org.l2jmobius.gameserver.network.clientpackets.ceremonyofchaos;
|
||||
|
||||
import org.l2jmobius.commons.network.PacketReader;
|
||||
import org.l2jmobius.gameserver.instancemanager.QuestManager;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
import org.l2jmobius.gameserver.model.quest.Quest;
|
||||
import org.l2jmobius.gameserver.network.GameClient;
|
||||
import org.l2jmobius.gameserver.network.clientpackets.IClientIncomingPacket;
|
||||
|
||||
/**
|
||||
* @author Mobius
|
||||
*/
|
||||
public class RequestLeaveCuriousHouse implements IClientIncomingPacket
|
||||
{
|
||||
@Override
|
||||
public boolean read(GameClient client, PacketReader packet)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run(GameClient client)
|
||||
{
|
||||
final PlayerInstance player = client.getPlayer();
|
||||
if (player == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
final Quest quest = QuestManager.getInstance().getQuest("CeremonyOfChaos");
|
||||
if (quest != null)
|
||||
{
|
||||
quest.notifyEvent("RequestQuit", null, player);
|
||||
}
|
||||
}
|
||||
}
|
@ -47,10 +47,11 @@ public class ExCuriousHouseMemberList implements IClientOutgoingPacket
|
||||
packet.writeD(_id);
|
||||
packet.writeD(_maxPlayers);
|
||||
packet.writeD(_players.size());
|
||||
int pos = 0;
|
||||
for (PlayerInstance player : _players)
|
||||
{
|
||||
packet.writeD(player.getObjectId());
|
||||
packet.writeD(0x00); // cocPlayer.getPosition
|
||||
packet.writeD(pos++);
|
||||
packet.writeD(player.getMaxHp());
|
||||
packet.writeD(player.getMaxCp());
|
||||
packet.writeD((int) player.getCurrentHp());
|
||||
|
@ -21,6 +21,7 @@ import java.util.Collection;
|
||||
import org.l2jmobius.commons.network.PacketWriter;
|
||||
import org.l2jmobius.gameserver.enums.CeremonyOfChaosResult;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
import org.l2jmobius.gameserver.model.variables.PlayerVariables;
|
||||
import org.l2jmobius.gameserver.network.OutgoingPackets;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.IClientOutgoingPacket;
|
||||
|
||||
@ -31,11 +32,13 @@ public class ExCuriousHouseResult implements IClientOutgoingPacket
|
||||
{
|
||||
private final CeremonyOfChaosResult _result;
|
||||
private final Collection<PlayerInstance> _players;
|
||||
private final int _time;
|
||||
|
||||
public ExCuriousHouseResult(CeremonyOfChaosResult result, Collection<PlayerInstance> players)
|
||||
public ExCuriousHouseResult(CeremonyOfChaosResult result, Collection<PlayerInstance> players, int time)
|
||||
{
|
||||
_result = result;
|
||||
_players = players;
|
||||
_time = time;
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -44,15 +47,16 @@ public class ExCuriousHouseResult implements IClientOutgoingPacket
|
||||
OutgoingPackets.EX_CURIOUS_HOUSE_RESULT.writeId(packet);
|
||||
packet.writeD(0); // _event.getId()
|
||||
packet.writeH(_result.ordinal());
|
||||
packet.writeD(_players.size()); // CeremonyOfChaosManager.getInstance().getMaxPlayersInArena()
|
||||
packet.writeD(18); // max players
|
||||
packet.writeD(_players.size());
|
||||
int pos = 0;
|
||||
for (PlayerInstance player : _players)
|
||||
{
|
||||
packet.writeD(player.getObjectId());
|
||||
packet.writeD(0x00); // cocPlayer.getPosition
|
||||
packet.writeD(pos++); // position
|
||||
packet.writeD(player.getClassId().getId());
|
||||
packet.writeD(0x00); // getLifeTime
|
||||
packet.writeD(0x00); // getScore
|
||||
packet.writeD(_time); // getLifeTime
|
||||
packet.writeD(player.getVariables().getInt(PlayerVariables.CEREMONY_OF_CHAOS_SCORE, 0));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- Ceremony of Chaos - Arena 1 -->
|
||||
<instance id="224" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/instance.xsd">
|
||||
<time empty="0" />
|
||||
<time duration="10" empty="5" />
|
||||
<misc isPvP="true" />
|
||||
<locations>
|
||||
<enter type="FIXED">
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- Ceremony of Chaos - Arena 2 -->
|
||||
<instance id="225" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/instance.xsd">
|
||||
<time empty="0" />
|
||||
<time duration="10" empty="5" />
|
||||
<misc isPvP="true" />
|
||||
<locations>
|
||||
<enter type="FIXED">
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- Ceremony of Chaos - Arena 3 -->
|
||||
<instance id="226" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/instance.xsd">
|
||||
<time empty="0" />
|
||||
<time duration="10" empty="5" />
|
||||
<misc isPvP="true" />
|
||||
<locations>
|
||||
<enter type="FIXED">
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- Ceremony of Chaos - Arena 4 -->
|
||||
<instance id="227" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/instance.xsd">
|
||||
<time empty="0" />
|
||||
<time duration="10" empty="5" />
|
||||
<misc isPvP="true" />
|
||||
<locations>
|
||||
<enter type="FIXED">
|
||||
|
1114
L2J_Mobius_03.0_Helios/dist/game/data/scripts/instances/CeremonyOfChaos/CeremonyOfChaos.java
vendored
Normal file
1114
L2J_Mobius_03.0_Helios/dist/game/data/scripts/instances/CeremonyOfChaos/CeremonyOfChaos.java
vendored
Normal file
File diff suppressed because it is too large
Load Diff
@ -246,7 +246,6 @@ import org.l2jmobius.gameserver.model.olympiad.OlympiadGameManager;
|
||||
import org.l2jmobius.gameserver.model.olympiad.OlympiadGameTask;
|
||||
import org.l2jmobius.gameserver.model.olympiad.OlympiadManager;
|
||||
import org.l2jmobius.gameserver.model.punishment.PunishmentAffect;
|
||||
import org.l2jmobius.gameserver.model.punishment.PunishmentTask;
|
||||
import org.l2jmobius.gameserver.model.punishment.PunishmentType;
|
||||
import org.l2jmobius.gameserver.model.quest.Quest;
|
||||
import org.l2jmobius.gameserver.model.quest.QuestState;
|
||||
@ -13523,21 +13522,6 @@ public class PlayerInstance extends Playable
|
||||
getVariables().set(PlayerVariables.WORLD_CHAT_VARIABLE_NAME, timesUsed);
|
||||
}
|
||||
|
||||
public void prohibiteCeremonyOfChaos()
|
||||
{
|
||||
if (!PunishmentManager.getInstance().hasPunishment(getObjectId(), PunishmentAffect.CHARACTER, PunishmentType.COC_BAN))
|
||||
{
|
||||
PunishmentManager.getInstance().startPunishment(new PunishmentTask(getObjectId(), PunishmentAffect.CHARACTER, PunishmentType.COC_BAN, 0, "", getClass().getSimpleName()));
|
||||
final int penalties = getVariables().getInt(PlayerVariables.CEREMONY_OF_CHAOS_PROHIBITED_PENALTIES, 0);
|
||||
getVariables().set(PlayerVariables.CEREMONY_OF_CHAOS_PROHIBITED_PENALTIES, penalties + 1);
|
||||
}
|
||||
}
|
||||
|
||||
public boolean isCeremonyOfChaosProhibited()
|
||||
{
|
||||
return PunishmentManager.getInstance().hasPunishment(getObjectId(), PunishmentAffect.CHARACTER, PunishmentType.COC_BAN) || (getVariables().getInt(PlayerVariables.CEREMONY_OF_CHAOS_PROHIBITED_PENALTIES, 0) >= 30);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Side of the player.
|
||||
*/
|
||||
|
@ -24,8 +24,7 @@ public enum PunishmentType
|
||||
BAN,
|
||||
CHAT_BAN,
|
||||
PARTY_BAN,
|
||||
JAIL,
|
||||
COC_BAN;
|
||||
JAIL;
|
||||
|
||||
public static PunishmentType getByName(String name)
|
||||
{
|
||||
|
@ -52,7 +52,7 @@ public class PlayerVariables extends AbstractVariables
|
||||
public static final String ATTENDANCE_DATE = "ATTENDANCE_DATE";
|
||||
public static final String ATTENDANCE_INDEX = "ATTENDANCE_INDEX";
|
||||
private static final String DAILY_MISSION_REWARDS = "DAILY_MISSION_REWARDS";
|
||||
public static final String CEREMONY_OF_CHAOS_PROHIBITED_PENALTIES = "CEREMONY_OF_CHAOS_PENALTIES";
|
||||
public static final String CEREMONY_OF_CHAOS_SCORE = "CEREMONY_OF_CHAOS_SCORE";
|
||||
public static final String CEREMONY_OF_CHAOS_MARKS = "CEREMONY_OF_CHAOS_MARKS";
|
||||
public static final String ABILITY_POINTS_MAIN_CLASS = "ABILITY_POINTS";
|
||||
public static final String ABILITY_POINTS_DUAL_CLASS = "ABILITY_POINTS_DUAL_CLASS";
|
||||
|
@ -49,6 +49,7 @@ import org.l2jmobius.gameserver.network.clientpackets.awakening.RequestCallToCha
|
||||
import org.l2jmobius.gameserver.network.clientpackets.ceremonyofchaos.RequestCancelCuriousHouse;
|
||||
import org.l2jmobius.gameserver.network.clientpackets.ceremonyofchaos.RequestCuriousHouseHtml;
|
||||
import org.l2jmobius.gameserver.network.clientpackets.ceremonyofchaos.RequestJoinCuriousHouse;
|
||||
import org.l2jmobius.gameserver.network.clientpackets.ceremonyofchaos.RequestLeaveCuriousHouse;
|
||||
import org.l2jmobius.gameserver.network.clientpackets.commission.RequestCommissionBuyInfo;
|
||||
import org.l2jmobius.gameserver.network.clientpackets.commission.RequestCommissionBuyItem;
|
||||
import org.l2jmobius.gameserver.network.clientpackets.commission.RequestCommissionCancel;
|
||||
@ -285,7 +286,7 @@ public enum ExIncomingPackets implements IIncomingPackets<GameClient>
|
||||
REQUEST_IN_ZONE_WAITING_TIME(0xBA, RequestInzoneWaitingTime::new, ConnectionState.IN_GAME),
|
||||
REQUEST_JOIN_CURIOUS_HOUSE(0xBB, RequestJoinCuriousHouse::new, ConnectionState.IN_GAME),
|
||||
REQUEST_CANCEL_CURIOUS_HOUSE(0xBC, RequestCancelCuriousHouse::new, ConnectionState.IN_GAME),
|
||||
REQUEST_LEAVE_CURIOUS_HOUSE(0xBD, null, ConnectionState.IN_GAME),
|
||||
REQUEST_LEAVE_CURIOUS_HOUSE(0xBD, RequestLeaveCuriousHouse::new, ConnectionState.IN_GAME),
|
||||
REQUEST_OBSERVING_LIST_CURIOUS_HOUSE(0xBE, null, ConnectionState.IN_GAME),
|
||||
REQUEST_OBSERVING_CURIOUS_HOUSE(0xBF, null, ConnectionState.IN_GAME),
|
||||
REQUEST_LEAVE_OBSERVING_CURIOUS_HOUSE(0xC0, null, ConnectionState.IN_GAME),
|
||||
|
@ -27,6 +27,7 @@ import org.l2jmobius.gameserver.handler.AdminCommandHandler;
|
||||
import org.l2jmobius.gameserver.handler.BypassHandler;
|
||||
import org.l2jmobius.gameserver.handler.CommunityBoardHandler;
|
||||
import org.l2jmobius.gameserver.handler.IBypassHandler;
|
||||
import org.l2jmobius.gameserver.instancemanager.QuestManager;
|
||||
import org.l2jmobius.gameserver.model.World;
|
||||
import org.l2jmobius.gameserver.model.WorldObject;
|
||||
import org.l2jmobius.gameserver.model.actor.Creature;
|
||||
@ -39,6 +40,7 @@ import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerBypass
|
||||
import org.l2jmobius.gameserver.model.events.returns.TerminateReturn;
|
||||
import org.l2jmobius.gameserver.model.items.instance.ItemInstance;
|
||||
import org.l2jmobius.gameserver.model.olympiad.Hero;
|
||||
import org.l2jmobius.gameserver.model.quest.Quest;
|
||||
import org.l2jmobius.gameserver.network.Disconnection;
|
||||
import org.l2jmobius.gameserver.network.GameClient;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.ActionFailed;
|
||||
@ -259,6 +261,15 @@ public class RequestBypassToServer implements IClientIncomingPacket
|
||||
final int multisellId = Integer.parseInt(_command.substring(10).trim());
|
||||
MultisellData.getInstance().separateAndSend(multisellId, player, null, false);
|
||||
}
|
||||
else if (_command.equals("pledgegame?command=apply"))
|
||||
{
|
||||
final Quest quest = QuestManager.getInstance().getQuest("CeremonyOfChaos");
|
||||
if (quest != null)
|
||||
{
|
||||
quest.notifyEvent("RegisterPlayer", null, player);
|
||||
}
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
final IBypassHandler handler = BypassHandler.getInstance().getHandler(_command);
|
||||
|
@ -17,19 +17,20 @@
|
||||
package org.l2jmobius.gameserver.network.clientpackets.ceremonyofchaos;
|
||||
|
||||
import org.l2jmobius.commons.network.PacketReader;
|
||||
import org.l2jmobius.gameserver.instancemanager.QuestManager;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
import org.l2jmobius.gameserver.model.quest.Quest;
|
||||
import org.l2jmobius.gameserver.network.GameClient;
|
||||
import org.l2jmobius.gameserver.network.clientpackets.IClientIncomingPacket;
|
||||
|
||||
/**
|
||||
* @author Sdw
|
||||
* @author Mobius
|
||||
*/
|
||||
public class RequestCancelCuriousHouse implements IClientIncomingPacket
|
||||
{
|
||||
@Override
|
||||
public boolean read(GameClient client, PacketReader packet)
|
||||
{
|
||||
// Nothing to read
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -42,15 +43,10 @@ public class RequestCancelCuriousHouse implements IClientIncomingPacket
|
||||
return;
|
||||
}
|
||||
|
||||
// if (CeremonyOfChaosManager.getInstance().unregisterPlayer(player))
|
||||
// {
|
||||
// player.sendPacket(SystemMessageId.YOU_HAVE_BEEN_TAKEN_OFF_THE_WAIT_LIST_YOU_MAY_ONLY_ENTER_THE_WAIT_LIST_ON_MON_THURS_EVERY_QUARTER_OF_AN_HOUR_FOR_5_MINUTES_BETWEEN_20_00_AND_23_40_IF_YOU_CANCEL_REGISTRATION_OR_CHOOSE_TO_FORFEIT_AFTER_ENTERING_A_MATCH_30_TIMES_OR_MORE_DURING_A_CYCLE_YOU_MUST_WAIT_UNTIL_THE_NEXT_CYCLE_TO_PARTICIPATE_IN_THE_CEREMONY_OF_CHAOS_UPON_ENTERING_THE_ARENA_ALL_BUFFS_EXCLUDING_VITALITY_BUFFS_ARE_REMOVED);
|
||||
// player.sendPacket(ExCuriousHouseState.IDLE_PACKET);
|
||||
//
|
||||
// if (CeremonyOfChaosManager.getInstance().getState() == CeremonyOfChaosState.PREPARING_FOR_TELEPORT)
|
||||
// {
|
||||
// player.prohibiteCeremonyOfChaos();
|
||||
// }
|
||||
// }
|
||||
final Quest quest = QuestManager.getInstance().getQuest("CeremonyOfChaos");
|
||||
if (quest != null)
|
||||
{
|
||||
quest.notifyEvent("UnregisterPlayer", null, player);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -17,19 +17,20 @@
|
||||
package org.l2jmobius.gameserver.network.clientpackets.ceremonyofchaos;
|
||||
|
||||
import org.l2jmobius.commons.network.PacketReader;
|
||||
import org.l2jmobius.gameserver.instancemanager.QuestManager;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
import org.l2jmobius.gameserver.model.quest.Quest;
|
||||
import org.l2jmobius.gameserver.network.GameClient;
|
||||
import org.l2jmobius.gameserver.network.clientpackets.IClientIncomingPacket;
|
||||
|
||||
/**
|
||||
* @author Sdw
|
||||
* @author Mobius
|
||||
*/
|
||||
public class RequestCuriousHouseHtml implements IClientIncomingPacket
|
||||
{
|
||||
@Override
|
||||
public boolean read(GameClient client, PacketReader packet)
|
||||
{
|
||||
// Nothing to read
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -42,21 +43,10 @@ public class RequestCuriousHouseHtml implements IClientIncomingPacket
|
||||
return;
|
||||
}
|
||||
|
||||
// if (CeremonyOfChaosManager.getInstance().getState() != CeremonyOfChaosState.REGISTRATION)
|
||||
// {
|
||||
// return;
|
||||
// }
|
||||
// else if (CeremonyOfChaosManager.getInstance().isRegistered(player))
|
||||
// {
|
||||
// player.sendPacket(SystemMessageId.YOU_ARE_ON_THE_WAITING_LIST_FOR_THE_CEREMONY_OF_CHAOS);
|
||||
// return;
|
||||
// }
|
||||
//
|
||||
// if (CeremonyOfChaosManager.getInstance().canRegister(player, true))
|
||||
// {
|
||||
// final NpcHtmlMessage message = new NpcHtmlMessage(0);
|
||||
// message.setFile(player, "data/html/CeremonyOfChaos/invite.htm");
|
||||
// player.sendPacket(message);
|
||||
// }
|
||||
final Quest quest = QuestManager.getInstance().getQuest("CeremonyOfChaos");
|
||||
if (quest != null)
|
||||
{
|
||||
quest.notifyEvent("RequestCuriousHouseHtml", null, player);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -17,19 +17,20 @@
|
||||
package org.l2jmobius.gameserver.network.clientpackets.ceremonyofchaos;
|
||||
|
||||
import org.l2jmobius.commons.network.PacketReader;
|
||||
import org.l2jmobius.gameserver.instancemanager.QuestManager;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
import org.l2jmobius.gameserver.model.quest.Quest;
|
||||
import org.l2jmobius.gameserver.network.GameClient;
|
||||
import org.l2jmobius.gameserver.network.clientpackets.IClientIncomingPacket;
|
||||
|
||||
/**
|
||||
* @author Sdw
|
||||
* @author Mobius
|
||||
*/
|
||||
public class RequestJoinCuriousHouse implements IClientIncomingPacket
|
||||
{
|
||||
@Override
|
||||
public boolean read(GameClient client, PacketReader packet)
|
||||
{
|
||||
// Nothing to read
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -42,25 +43,10 @@ public class RequestJoinCuriousHouse implements IClientIncomingPacket
|
||||
return;
|
||||
}
|
||||
|
||||
// if (CeremonyOfChaosManager.getInstance().getState() != CeremonyOfChaosState.REGISTRATION)
|
||||
// {
|
||||
// return;
|
||||
// }
|
||||
// else if (CeremonyOfChaosManager.getInstance().isRegistered(player))
|
||||
// {
|
||||
// player.sendPacket(SystemMessageId.YOU_ARE_ON_THE_WAITING_LIST_FOR_THE_CEREMONY_OF_CHAOS);
|
||||
// return;
|
||||
// }
|
||||
//
|
||||
// if (CeremonyOfChaosManager.getInstance().registerPlayer(player))
|
||||
// {
|
||||
// player.sendPacket(SystemMessageId.YOU_ARE_NOW_ON_THE_WAITING_LIST_YOU_WILL_AUTOMATICALLY_BE_TELEPORTED_WHEN_THE_TOURNAMENT_STARTS_AND_WILL_BE_REMOVED_FROM_THE_WAITING_LIST_IF_YOU_LOG_OUT_IF_YOU_CANCEL_REGISTRATION_WITHIN_THE_LAST_MINUTE_OF_ENTERING_THE_ARENA_AFTER_SIGNING_UP_30_TIMES_OR_MORE_OR_FORFEIT_AFTER_ENTERING_THE_ARENA_30_TIMES_OR_MORE_DURING_A_CYCLE_YOU_BECOME_INELIGIBLE_FOR_PARTICIPATION_IN_THE_CEREMONY_OF_CHAOS_UNTIL_THE_NEXT_CYCLE_ALL_THE_BUFFS_EXCEPT_THE_VITALITY_BUFF_WILL_BE_REMOVED_ONCE_YOU_ENTER_THE_ARENAS);
|
||||
// player.sendPacket(SystemMessageId.EXCEPT_THE_VITALITY_BUFF_ALL_BUFFS_INCLUDING_ART_OF_SEDUCTION_WILL_BE_DELETED);
|
||||
// player.sendPacket(ExCuriousHouseState.PREPARE_PACKET);
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// player.sendPacket(SystemMessageId.THERE_ARE_TOO_MANY_CHALLENGERS_YOU_CANNOT_PARTICIPATE_NOW);
|
||||
// }
|
||||
final Quest quest = QuestManager.getInstance().getQuest("CeremonyOfChaos");
|
||||
if (quest != null)
|
||||
{
|
||||
quest.notifyEvent("RegisterPlayer", null, player);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,52 @@
|
||||
/*
|
||||
* This file is part of the L2J Mobius project.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package org.l2jmobius.gameserver.network.clientpackets.ceremonyofchaos;
|
||||
|
||||
import org.l2jmobius.commons.network.PacketReader;
|
||||
import org.l2jmobius.gameserver.instancemanager.QuestManager;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
import org.l2jmobius.gameserver.model.quest.Quest;
|
||||
import org.l2jmobius.gameserver.network.GameClient;
|
||||
import org.l2jmobius.gameserver.network.clientpackets.IClientIncomingPacket;
|
||||
|
||||
/**
|
||||
* @author Mobius
|
||||
*/
|
||||
public class RequestLeaveCuriousHouse implements IClientIncomingPacket
|
||||
{
|
||||
@Override
|
||||
public boolean read(GameClient client, PacketReader packet)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run(GameClient client)
|
||||
{
|
||||
final PlayerInstance player = client.getPlayer();
|
||||
if (player == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
final Quest quest = QuestManager.getInstance().getQuest("CeremonyOfChaos");
|
||||
if (quest != null)
|
||||
{
|
||||
quest.notifyEvent("RequestQuit", null, player);
|
||||
}
|
||||
}
|
||||
}
|
@ -47,10 +47,11 @@ public class ExCuriousHouseMemberList implements IClientOutgoingPacket
|
||||
packet.writeD(_id);
|
||||
packet.writeD(_maxPlayers);
|
||||
packet.writeD(_players.size());
|
||||
int pos = 0;
|
||||
for (PlayerInstance player : _players)
|
||||
{
|
||||
packet.writeD(player.getObjectId());
|
||||
packet.writeD(0x00); // cocPlayer.getPosition
|
||||
packet.writeD(pos++);
|
||||
packet.writeD(player.getMaxHp());
|
||||
packet.writeD(player.getMaxCp());
|
||||
packet.writeD((int) player.getCurrentHp());
|
||||
|
@ -21,6 +21,7 @@ import java.util.Collection;
|
||||
import org.l2jmobius.commons.network.PacketWriter;
|
||||
import org.l2jmobius.gameserver.enums.CeremonyOfChaosResult;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
import org.l2jmobius.gameserver.model.variables.PlayerVariables;
|
||||
import org.l2jmobius.gameserver.network.OutgoingPackets;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.IClientOutgoingPacket;
|
||||
|
||||
@ -31,11 +32,13 @@ public class ExCuriousHouseResult implements IClientOutgoingPacket
|
||||
{
|
||||
private final CeremonyOfChaosResult _result;
|
||||
private final Collection<PlayerInstance> _players;
|
||||
private final int _time;
|
||||
|
||||
public ExCuriousHouseResult(CeremonyOfChaosResult result, Collection<PlayerInstance> players)
|
||||
public ExCuriousHouseResult(CeremonyOfChaosResult result, Collection<PlayerInstance> players, int time)
|
||||
{
|
||||
_result = result;
|
||||
_players = players;
|
||||
_time = time;
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -44,15 +47,16 @@ public class ExCuriousHouseResult implements IClientOutgoingPacket
|
||||
OutgoingPackets.EX_CURIOUS_HOUSE_RESULT.writeId(packet);
|
||||
packet.writeD(0); // _event.getId()
|
||||
packet.writeH(_result.ordinal());
|
||||
packet.writeD(_players.size()); // CeremonyOfChaosManager.getInstance().getMaxPlayersInArena()
|
||||
packet.writeD(18); // max players
|
||||
packet.writeD(_players.size());
|
||||
int pos = 0;
|
||||
for (PlayerInstance player : _players)
|
||||
{
|
||||
packet.writeD(player.getObjectId());
|
||||
packet.writeD(0x00); // cocPlayer.getPosition
|
||||
packet.writeD(pos++); // position
|
||||
packet.writeD(player.getClassId().getId());
|
||||
packet.writeD(0x00); // getLifeTime
|
||||
packet.writeD(0x00); // getScore
|
||||
packet.writeD(_time); // getLifeTime
|
||||
packet.writeD(player.getVariables().getInt(PlayerVariables.CEREMONY_OF_CHAOS_SCORE, 0));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- Ceremony of Chaos - Arena 1 -->
|
||||
<instance id="224" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/instance.xsd">
|
||||
<time empty="0" />
|
||||
<time duration="10" empty="5" />
|
||||
<misc isPvP="true" />
|
||||
<locations>
|
||||
<enter type="FIXED">
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- Ceremony of Chaos - Arena 2 -->
|
||||
<instance id="225" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/instance.xsd">
|
||||
<time empty="0" />
|
||||
<time duration="10" empty="5" />
|
||||
<misc isPvP="true" />
|
||||
<locations>
|
||||
<enter type="FIXED">
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- Ceremony of Chaos - Arena 3 -->
|
||||
<instance id="226" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/instance.xsd">
|
||||
<time empty="0" />
|
||||
<time duration="10" empty="5" />
|
||||
<misc isPvP="true" />
|
||||
<locations>
|
||||
<enter type="FIXED">
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- Ceremony of Chaos - Arena 4 -->
|
||||
<instance id="227" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/instance.xsd">
|
||||
<time empty="0" />
|
||||
<time duration="10" empty="5" />
|
||||
<misc isPvP="true" />
|
||||
<locations>
|
||||
<enter type="FIXED">
|
||||
|
1114
L2J_Mobius_04.0_GrandCrusade/dist/game/data/scripts/instances/CeremonyOfChaos/CeremonyOfChaos.java
vendored
Normal file
1114
L2J_Mobius_04.0_GrandCrusade/dist/game/data/scripts/instances/CeremonyOfChaos/CeremonyOfChaos.java
vendored
Normal file
File diff suppressed because it is too large
Load Diff
@ -248,7 +248,6 @@ import org.l2jmobius.gameserver.model.olympiad.OlympiadGameManager;
|
||||
import org.l2jmobius.gameserver.model.olympiad.OlympiadGameTask;
|
||||
import org.l2jmobius.gameserver.model.olympiad.OlympiadManager;
|
||||
import org.l2jmobius.gameserver.model.punishment.PunishmentAffect;
|
||||
import org.l2jmobius.gameserver.model.punishment.PunishmentTask;
|
||||
import org.l2jmobius.gameserver.model.punishment.PunishmentType;
|
||||
import org.l2jmobius.gameserver.model.quest.Quest;
|
||||
import org.l2jmobius.gameserver.model.quest.QuestState;
|
||||
@ -13495,21 +13494,6 @@ public class PlayerInstance extends Playable
|
||||
getVariables().set(PlayerVariables.WORLD_CHAT_VARIABLE_NAME, timesUsed);
|
||||
}
|
||||
|
||||
public void prohibiteCeremonyOfChaos()
|
||||
{
|
||||
if (!PunishmentManager.getInstance().hasPunishment(getObjectId(), PunishmentAffect.CHARACTER, PunishmentType.COC_BAN))
|
||||
{
|
||||
PunishmentManager.getInstance().startPunishment(new PunishmentTask(getObjectId(), PunishmentAffect.CHARACTER, PunishmentType.COC_BAN, 0, "", getClass().getSimpleName()));
|
||||
final int penalties = getVariables().getInt(PlayerVariables.CEREMONY_OF_CHAOS_PROHIBITED_PENALTIES, 0);
|
||||
getVariables().set(PlayerVariables.CEREMONY_OF_CHAOS_PROHIBITED_PENALTIES, penalties + 1);
|
||||
}
|
||||
}
|
||||
|
||||
public boolean isCeremonyOfChaosProhibited()
|
||||
{
|
||||
return PunishmentManager.getInstance().hasPunishment(getObjectId(), PunishmentAffect.CHARACTER, PunishmentType.COC_BAN) || (getVariables().getInt(PlayerVariables.CEREMONY_OF_CHAOS_PROHIBITED_PENALTIES, 0) >= 30);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Side of the player.
|
||||
*/
|
||||
|
@ -24,8 +24,7 @@ public enum PunishmentType
|
||||
BAN,
|
||||
CHAT_BAN,
|
||||
PARTY_BAN,
|
||||
JAIL,
|
||||
COC_BAN;
|
||||
JAIL;
|
||||
|
||||
public static PunishmentType getByName(String name)
|
||||
{
|
||||
|
@ -52,7 +52,7 @@ public class PlayerVariables extends AbstractVariables
|
||||
public static final String ATTENDANCE_DATE = "ATTENDANCE_DATE";
|
||||
public static final String ATTENDANCE_INDEX = "ATTENDANCE_INDEX";
|
||||
private static final String DAILY_MISSION_REWARDS = "DAILY_MISSION_REWARDS";
|
||||
public static final String CEREMONY_OF_CHAOS_PROHIBITED_PENALTIES = "CEREMONY_OF_CHAOS_PENALTIES";
|
||||
public static final String CEREMONY_OF_CHAOS_SCORE = "CEREMONY_OF_CHAOS_SCORE";
|
||||
public static final String CEREMONY_OF_CHAOS_MARKS = "CEREMONY_OF_CHAOS_MARKS";
|
||||
public static final String ABILITY_POINTS_MAIN_CLASS = "ABILITY_POINTS";
|
||||
public static final String ABILITY_POINTS_DUAL_CLASS = "ABILITY_POINTS_DUAL_CLASS";
|
||||
|
@ -49,6 +49,7 @@ import org.l2jmobius.gameserver.network.clientpackets.awakening.RequestCallToCha
|
||||
import org.l2jmobius.gameserver.network.clientpackets.ceremonyofchaos.RequestCancelCuriousHouse;
|
||||
import org.l2jmobius.gameserver.network.clientpackets.ceremonyofchaos.RequestCuriousHouseHtml;
|
||||
import org.l2jmobius.gameserver.network.clientpackets.ceremonyofchaos.RequestJoinCuriousHouse;
|
||||
import org.l2jmobius.gameserver.network.clientpackets.ceremonyofchaos.RequestLeaveCuriousHouse;
|
||||
import org.l2jmobius.gameserver.network.clientpackets.commission.RequestCommissionBuyInfo;
|
||||
import org.l2jmobius.gameserver.network.clientpackets.commission.RequestCommissionBuyItem;
|
||||
import org.l2jmobius.gameserver.network.clientpackets.commission.RequestCommissionCancel;
|
||||
@ -292,7 +293,7 @@ public enum ExIncomingPackets implements IIncomingPackets<GameClient>
|
||||
REQUEST_IN_ZONE_WAITING_TIME(0xBA, RequestInzoneWaitingTime::new, ConnectionState.IN_GAME),
|
||||
REQUEST_JOIN_CURIOUS_HOUSE(0xBB, RequestJoinCuriousHouse::new, ConnectionState.IN_GAME),
|
||||
REQUEST_CANCEL_CURIOUS_HOUSE(0xBC, RequestCancelCuriousHouse::new, ConnectionState.IN_GAME),
|
||||
REQUEST_LEAVE_CURIOUS_HOUSE(0xBD, null, ConnectionState.IN_GAME),
|
||||
REQUEST_LEAVE_CURIOUS_HOUSE(0xBD, RequestLeaveCuriousHouse::new, ConnectionState.IN_GAME),
|
||||
REQUEST_OBSERVING_LIST_CURIOUS_HOUSE(0xBE, null, ConnectionState.IN_GAME),
|
||||
REQUEST_OBSERVING_CURIOUS_HOUSE(0xBF, null, ConnectionState.IN_GAME),
|
||||
REQUEST_LEAVE_OBSERVING_CURIOUS_HOUSE(0xC0, null, ConnectionState.IN_GAME),
|
||||
|
@ -27,6 +27,7 @@ import org.l2jmobius.gameserver.handler.AdminCommandHandler;
|
||||
import org.l2jmobius.gameserver.handler.BypassHandler;
|
||||
import org.l2jmobius.gameserver.handler.CommunityBoardHandler;
|
||||
import org.l2jmobius.gameserver.handler.IBypassHandler;
|
||||
import org.l2jmobius.gameserver.instancemanager.QuestManager;
|
||||
import org.l2jmobius.gameserver.model.World;
|
||||
import org.l2jmobius.gameserver.model.WorldObject;
|
||||
import org.l2jmobius.gameserver.model.actor.Creature;
|
||||
@ -39,6 +40,7 @@ import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerBypass
|
||||
import org.l2jmobius.gameserver.model.events.returns.TerminateReturn;
|
||||
import org.l2jmobius.gameserver.model.items.instance.ItemInstance;
|
||||
import org.l2jmobius.gameserver.model.olympiad.Hero;
|
||||
import org.l2jmobius.gameserver.model.quest.Quest;
|
||||
import org.l2jmobius.gameserver.network.Disconnection;
|
||||
import org.l2jmobius.gameserver.network.GameClient;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.ActionFailed;
|
||||
@ -259,6 +261,15 @@ public class RequestBypassToServer implements IClientIncomingPacket
|
||||
final int multisellId = Integer.parseInt(_command.substring(10).trim());
|
||||
MultisellData.getInstance().separateAndSend(multisellId, player, null, false);
|
||||
}
|
||||
else if (_command.equals("pledgegame?command=apply"))
|
||||
{
|
||||
final Quest quest = QuestManager.getInstance().getQuest("CeremonyOfChaos");
|
||||
if (quest != null)
|
||||
{
|
||||
quest.notifyEvent("RegisterPlayer", null, player);
|
||||
}
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
final IBypassHandler handler = BypassHandler.getInstance().getHandler(_command);
|
||||
|
@ -17,19 +17,20 @@
|
||||
package org.l2jmobius.gameserver.network.clientpackets.ceremonyofchaos;
|
||||
|
||||
import org.l2jmobius.commons.network.PacketReader;
|
||||
import org.l2jmobius.gameserver.instancemanager.QuestManager;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
import org.l2jmobius.gameserver.model.quest.Quest;
|
||||
import org.l2jmobius.gameserver.network.GameClient;
|
||||
import org.l2jmobius.gameserver.network.clientpackets.IClientIncomingPacket;
|
||||
|
||||
/**
|
||||
* @author Sdw
|
||||
* @author Mobius
|
||||
*/
|
||||
public class RequestCancelCuriousHouse implements IClientIncomingPacket
|
||||
{
|
||||
@Override
|
||||
public boolean read(GameClient client, PacketReader packet)
|
||||
{
|
||||
// Nothing to read
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -42,15 +43,10 @@ public class RequestCancelCuriousHouse implements IClientIncomingPacket
|
||||
return;
|
||||
}
|
||||
|
||||
// if (CeremonyOfChaosManager.getInstance().unregisterPlayer(player))
|
||||
// {
|
||||
// player.sendPacket(SystemMessageId.YOU_HAVE_BEEN_TAKEN_OFF_THE_WAIT_LIST_YOU_MAY_ONLY_ENTER_THE_WAIT_LIST_ON_MON_THURS_EVERY_QUARTER_OF_AN_HOUR_FOR_5_MINUTES_BETWEEN_20_00_AND_23_40_IF_YOU_CANCEL_REGISTRATION_OR_CHOOSE_TO_FORFEIT_AFTER_ENTERING_A_MATCH_30_TIMES_OR_MORE_DURING_A_CYCLE_YOU_MUST_WAIT_UNTIL_THE_NEXT_CYCLE_TO_PARTICIPATE_IN_THE_CEREMONY_OF_CHAOS_UPON_ENTERING_THE_ARENA_ALL_BUFFS_EXCLUDING_VITALITY_BUFFS_ARE_REMOVED);
|
||||
// player.sendPacket(ExCuriousHouseState.IDLE_PACKET);
|
||||
//
|
||||
// if (CeremonyOfChaosManager.getInstance().getState() == CeremonyOfChaosState.PREPARING_FOR_TELEPORT)
|
||||
// {
|
||||
// player.prohibiteCeremonyOfChaos();
|
||||
// }
|
||||
// }
|
||||
final Quest quest = QuestManager.getInstance().getQuest("CeremonyOfChaos");
|
||||
if (quest != null)
|
||||
{
|
||||
quest.notifyEvent("UnregisterPlayer", null, player);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -17,19 +17,20 @@
|
||||
package org.l2jmobius.gameserver.network.clientpackets.ceremonyofchaos;
|
||||
|
||||
import org.l2jmobius.commons.network.PacketReader;
|
||||
import org.l2jmobius.gameserver.instancemanager.QuestManager;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
import org.l2jmobius.gameserver.model.quest.Quest;
|
||||
import org.l2jmobius.gameserver.network.GameClient;
|
||||
import org.l2jmobius.gameserver.network.clientpackets.IClientIncomingPacket;
|
||||
|
||||
/**
|
||||
* @author Sdw
|
||||
* @author Mobius
|
||||
*/
|
||||
public class RequestCuriousHouseHtml implements IClientIncomingPacket
|
||||
{
|
||||
@Override
|
||||
public boolean read(GameClient client, PacketReader packet)
|
||||
{
|
||||
// Nothing to read
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -42,21 +43,10 @@ public class RequestCuriousHouseHtml implements IClientIncomingPacket
|
||||
return;
|
||||
}
|
||||
|
||||
// if (CeremonyOfChaosManager.getInstance().getState() != CeremonyOfChaosState.REGISTRATION)
|
||||
// {
|
||||
// return;
|
||||
// }
|
||||
// else if (CeremonyOfChaosManager.getInstance().isRegistered(player))
|
||||
// {
|
||||
// player.sendPacket(SystemMessageId.YOU_ARE_ON_THE_WAITING_LIST_FOR_THE_CEREMONY_OF_CHAOS);
|
||||
// return;
|
||||
// }
|
||||
//
|
||||
// if (CeremonyOfChaosManager.getInstance().canRegister(player, true))
|
||||
// {
|
||||
// final NpcHtmlMessage message = new NpcHtmlMessage(0);
|
||||
// message.setFile(player, "data/html/CeremonyOfChaos/invite.htm");
|
||||
// player.sendPacket(message);
|
||||
// }
|
||||
final Quest quest = QuestManager.getInstance().getQuest("CeremonyOfChaos");
|
||||
if (quest != null)
|
||||
{
|
||||
quest.notifyEvent("RequestCuriousHouseHtml", null, player);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -17,19 +17,20 @@
|
||||
package org.l2jmobius.gameserver.network.clientpackets.ceremonyofchaos;
|
||||
|
||||
import org.l2jmobius.commons.network.PacketReader;
|
||||
import org.l2jmobius.gameserver.instancemanager.QuestManager;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
import org.l2jmobius.gameserver.model.quest.Quest;
|
||||
import org.l2jmobius.gameserver.network.GameClient;
|
||||
import org.l2jmobius.gameserver.network.clientpackets.IClientIncomingPacket;
|
||||
|
||||
/**
|
||||
* @author Sdw
|
||||
* @author Mobius
|
||||
*/
|
||||
public class RequestJoinCuriousHouse implements IClientIncomingPacket
|
||||
{
|
||||
@Override
|
||||
public boolean read(GameClient client, PacketReader packet)
|
||||
{
|
||||
// Nothing to read
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -42,25 +43,10 @@ public class RequestJoinCuriousHouse implements IClientIncomingPacket
|
||||
return;
|
||||
}
|
||||
|
||||
// if (CeremonyOfChaosManager.getInstance().getState() != CeremonyOfChaosState.REGISTRATION)
|
||||
// {
|
||||
// return;
|
||||
// }
|
||||
// else if (CeremonyOfChaosManager.getInstance().isRegistered(player))
|
||||
// {
|
||||
// player.sendPacket(SystemMessageId.YOU_ARE_ON_THE_WAITING_LIST_FOR_THE_CEREMONY_OF_CHAOS);
|
||||
// return;
|
||||
// }
|
||||
//
|
||||
// if (CeremonyOfChaosManager.getInstance().registerPlayer(player))
|
||||
// {
|
||||
// player.sendPacket(SystemMessageId.YOU_ARE_NOW_ON_THE_WAITING_LIST_YOU_WILL_AUTOMATICALLY_BE_TELEPORTED_WHEN_THE_TOURNAMENT_STARTS_AND_WILL_BE_REMOVED_FROM_THE_WAITING_LIST_IF_YOU_LOG_OUT_IF_YOU_CANCEL_REGISTRATION_WITHIN_THE_LAST_MINUTE_OF_ENTERING_THE_ARENA_AFTER_SIGNING_UP_30_TIMES_OR_MORE_OR_FORFEIT_AFTER_ENTERING_THE_ARENA_30_TIMES_OR_MORE_DURING_A_CYCLE_YOU_BECOME_INELIGIBLE_FOR_PARTICIPATION_IN_THE_CEREMONY_OF_CHAOS_UNTIL_THE_NEXT_CYCLE_ALL_THE_BUFFS_EXCEPT_THE_VITALITY_BUFF_WILL_BE_REMOVED_ONCE_YOU_ENTER_THE_ARENAS);
|
||||
// player.sendPacket(SystemMessageId.EXCEPT_THE_VITALITY_BUFF_ALL_BUFFS_INCLUDING_ART_OF_SEDUCTION_WILL_BE_DELETED);
|
||||
// player.sendPacket(ExCuriousHouseState.PREPARE_PACKET);
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// player.sendPacket(SystemMessageId.THERE_ARE_TOO_MANY_CHALLENGERS_YOU_CANNOT_PARTICIPATE_NOW);
|
||||
// }
|
||||
final Quest quest = QuestManager.getInstance().getQuest("CeremonyOfChaos");
|
||||
if (quest != null)
|
||||
{
|
||||
quest.notifyEvent("RegisterPlayer", null, player);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,52 @@
|
||||
/*
|
||||
* This file is part of the L2J Mobius project.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package org.l2jmobius.gameserver.network.clientpackets.ceremonyofchaos;
|
||||
|
||||
import org.l2jmobius.commons.network.PacketReader;
|
||||
import org.l2jmobius.gameserver.instancemanager.QuestManager;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
import org.l2jmobius.gameserver.model.quest.Quest;
|
||||
import org.l2jmobius.gameserver.network.GameClient;
|
||||
import org.l2jmobius.gameserver.network.clientpackets.IClientIncomingPacket;
|
||||
|
||||
/**
|
||||
* @author Mobius
|
||||
*/
|
||||
public class RequestLeaveCuriousHouse implements IClientIncomingPacket
|
||||
{
|
||||
@Override
|
||||
public boolean read(GameClient client, PacketReader packet)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run(GameClient client)
|
||||
{
|
||||
final PlayerInstance player = client.getPlayer();
|
||||
if (player == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
final Quest quest = QuestManager.getInstance().getQuest("CeremonyOfChaos");
|
||||
if (quest != null)
|
||||
{
|
||||
quest.notifyEvent("RequestQuit", null, player);
|
||||
}
|
||||
}
|
||||
}
|
@ -47,10 +47,11 @@ public class ExCuriousHouseMemberList implements IClientOutgoingPacket
|
||||
packet.writeD(_id);
|
||||
packet.writeD(_maxPlayers);
|
||||
packet.writeD(_players.size());
|
||||
int pos = 0;
|
||||
for (PlayerInstance player : _players)
|
||||
{
|
||||
packet.writeD(player.getObjectId());
|
||||
packet.writeD(0x00); // cocPlayer.getPosition
|
||||
packet.writeD(pos++);
|
||||
packet.writeD(player.getMaxHp());
|
||||
packet.writeD(player.getMaxCp());
|
||||
packet.writeD((int) player.getCurrentHp());
|
||||
|
@ -21,6 +21,7 @@ import java.util.Collection;
|
||||
import org.l2jmobius.commons.network.PacketWriter;
|
||||
import org.l2jmobius.gameserver.enums.CeremonyOfChaosResult;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
import org.l2jmobius.gameserver.model.variables.PlayerVariables;
|
||||
import org.l2jmobius.gameserver.network.OutgoingPackets;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.IClientOutgoingPacket;
|
||||
|
||||
@ -31,11 +32,13 @@ public class ExCuriousHouseResult implements IClientOutgoingPacket
|
||||
{
|
||||
private final CeremonyOfChaosResult _result;
|
||||
private final Collection<PlayerInstance> _players;
|
||||
private final int _time;
|
||||
|
||||
public ExCuriousHouseResult(CeremonyOfChaosResult result, Collection<PlayerInstance> players)
|
||||
public ExCuriousHouseResult(CeremonyOfChaosResult result, Collection<PlayerInstance> players, int time)
|
||||
{
|
||||
_result = result;
|
||||
_players = players;
|
||||
_time = time;
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -44,15 +47,16 @@ public class ExCuriousHouseResult implements IClientOutgoingPacket
|
||||
OutgoingPackets.EX_CURIOUS_HOUSE_RESULT.writeId(packet);
|
||||
packet.writeD(0); // _event.getId()
|
||||
packet.writeH(_result.ordinal());
|
||||
packet.writeD(_players.size()); // CeremonyOfChaosManager.getInstance().getMaxPlayersInArena()
|
||||
packet.writeD(18); // max players
|
||||
packet.writeD(_players.size());
|
||||
int pos = 0;
|
||||
for (PlayerInstance player : _players)
|
||||
{
|
||||
packet.writeD(player.getObjectId());
|
||||
packet.writeD(0x00); // cocPlayer.getPosition
|
||||
packet.writeD(pos++); // position
|
||||
packet.writeD(player.getClassId().getId());
|
||||
packet.writeD(0x00); // getLifeTime
|
||||
packet.writeD(0x00); // getScore
|
||||
packet.writeD(_time); // getLifeTime
|
||||
packet.writeD(player.getVariables().getInt(PlayerVariables.CEREMONY_OF_CHAOS_SCORE, 0));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- Ceremony of Chaos - Arena 1 -->
|
||||
<instance id="224" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/instance.xsd">
|
||||
<time empty="0" />
|
||||
<time duration="10" empty="5" />
|
||||
<misc isPvP="true" />
|
||||
<locations>
|
||||
<enter type="FIXED">
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- Ceremony of Chaos - Arena 2 -->
|
||||
<instance id="225" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/instance.xsd">
|
||||
<time empty="0" />
|
||||
<time duration="10" empty="5" />
|
||||
<misc isPvP="true" />
|
||||
<locations>
|
||||
<enter type="FIXED">
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- Ceremony of Chaos - Arena 3 -->
|
||||
<instance id="226" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/instance.xsd">
|
||||
<time empty="0" />
|
||||
<time duration="10" empty="5" />
|
||||
<misc isPvP="true" />
|
||||
<locations>
|
||||
<enter type="FIXED">
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- Ceremony of Chaos - Arena 4 -->
|
||||
<instance id="227" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/instance.xsd">
|
||||
<time empty="0" />
|
||||
<time duration="10" empty="5" />
|
||||
<misc isPvP="true" />
|
||||
<locations>
|
||||
<enter type="FIXED">
|
||||
|
1114
L2J_Mobius_05.0_Salvation/dist/game/data/scripts/instances/CeremonyOfChaos/CeremonyOfChaos.java
vendored
Normal file
1114
L2J_Mobius_05.0_Salvation/dist/game/data/scripts/instances/CeremonyOfChaos/CeremonyOfChaos.java
vendored
Normal file
File diff suppressed because it is too large
Load Diff
@ -247,7 +247,6 @@ import org.l2jmobius.gameserver.model.olympiad.OlympiadGameManager;
|
||||
import org.l2jmobius.gameserver.model.olympiad.OlympiadGameTask;
|
||||
import org.l2jmobius.gameserver.model.olympiad.OlympiadManager;
|
||||
import org.l2jmobius.gameserver.model.punishment.PunishmentAffect;
|
||||
import org.l2jmobius.gameserver.model.punishment.PunishmentTask;
|
||||
import org.l2jmobius.gameserver.model.punishment.PunishmentType;
|
||||
import org.l2jmobius.gameserver.model.quest.Quest;
|
||||
import org.l2jmobius.gameserver.model.quest.QuestState;
|
||||
@ -13485,21 +13484,6 @@ public class PlayerInstance extends Playable
|
||||
getVariables().set(PlayerVariables.WORLD_CHAT_VARIABLE_NAME, timesUsed);
|
||||
}
|
||||
|
||||
public void prohibiteCeremonyOfChaos()
|
||||
{
|
||||
if (!PunishmentManager.getInstance().hasPunishment(getObjectId(), PunishmentAffect.CHARACTER, PunishmentType.COC_BAN))
|
||||
{
|
||||
PunishmentManager.getInstance().startPunishment(new PunishmentTask(getObjectId(), PunishmentAffect.CHARACTER, PunishmentType.COC_BAN, 0, "", getClass().getSimpleName()));
|
||||
final int penalties = getVariables().getInt(PlayerVariables.CEREMONY_OF_CHAOS_PROHIBITED_PENALTIES, 0);
|
||||
getVariables().set(PlayerVariables.CEREMONY_OF_CHAOS_PROHIBITED_PENALTIES, penalties + 1);
|
||||
}
|
||||
}
|
||||
|
||||
public boolean isCeremonyOfChaosProhibited()
|
||||
{
|
||||
return PunishmentManager.getInstance().hasPunishment(getObjectId(), PunishmentAffect.CHARACTER, PunishmentType.COC_BAN) || (getVariables().getInt(PlayerVariables.CEREMONY_OF_CHAOS_PROHIBITED_PENALTIES, 0) >= 30);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Side of the player.
|
||||
*/
|
||||
|
@ -24,8 +24,7 @@ public enum PunishmentType
|
||||
BAN,
|
||||
CHAT_BAN,
|
||||
PARTY_BAN,
|
||||
JAIL,
|
||||
COC_BAN;
|
||||
JAIL;
|
||||
|
||||
public static PunishmentType getByName(String name)
|
||||
{
|
||||
|
@ -52,7 +52,7 @@ public class PlayerVariables extends AbstractVariables
|
||||
public static final String ATTENDANCE_DATE = "ATTENDANCE_DATE";
|
||||
public static final String ATTENDANCE_INDEX = "ATTENDANCE_INDEX";
|
||||
private static final String DAILY_MISSION_REWARDS = "DAILY_MISSION_REWARDS";
|
||||
public static final String CEREMONY_OF_CHAOS_PROHIBITED_PENALTIES = "CEREMONY_OF_CHAOS_PENALTIES";
|
||||
public static final String CEREMONY_OF_CHAOS_SCORE = "CEREMONY_OF_CHAOS_SCORE";
|
||||
public static final String CEREMONY_OF_CHAOS_MARKS = "CEREMONY_OF_CHAOS_MARKS";
|
||||
public static final String ABILITY_POINTS_MAIN_CLASS = "ABILITY_POINTS";
|
||||
public static final String ABILITY_POINTS_DUAL_CLASS = "ABILITY_POINTS_DUAL_CLASS";
|
||||
|
@ -49,6 +49,7 @@ import org.l2jmobius.gameserver.network.clientpackets.awakening.RequestCallToCha
|
||||
import org.l2jmobius.gameserver.network.clientpackets.ceremonyofchaos.RequestCancelCuriousHouse;
|
||||
import org.l2jmobius.gameserver.network.clientpackets.ceremonyofchaos.RequestCuriousHouseHtml;
|
||||
import org.l2jmobius.gameserver.network.clientpackets.ceremonyofchaos.RequestJoinCuriousHouse;
|
||||
import org.l2jmobius.gameserver.network.clientpackets.ceremonyofchaos.RequestLeaveCuriousHouse;
|
||||
import org.l2jmobius.gameserver.network.clientpackets.commission.RequestCommissionBuyInfo;
|
||||
import org.l2jmobius.gameserver.network.clientpackets.commission.RequestCommissionBuyItem;
|
||||
import org.l2jmobius.gameserver.network.clientpackets.commission.RequestCommissionCancel;
|
||||
@ -298,7 +299,7 @@ public enum ExIncomingPackets implements IIncomingPackets<GameClient>
|
||||
REQUEST_IN_ZONE_WAITING_TIME(0xBA, RequestInzoneWaitingTime::new, ConnectionState.IN_GAME),
|
||||
REQUEST_JOIN_CURIOUS_HOUSE(0xBB, RequestJoinCuriousHouse::new, ConnectionState.IN_GAME),
|
||||
REQUEST_CANCEL_CURIOUS_HOUSE(0xBC, RequestCancelCuriousHouse::new, ConnectionState.IN_GAME),
|
||||
REQUEST_LEAVE_CURIOUS_HOUSE(0xBD, null, ConnectionState.IN_GAME),
|
||||
REQUEST_LEAVE_CURIOUS_HOUSE(0xBD, RequestLeaveCuriousHouse::new, ConnectionState.IN_GAME),
|
||||
REQUEST_OBSERVING_LIST_CURIOUS_HOUSE(0xBE, null, ConnectionState.IN_GAME),
|
||||
REQUEST_OBSERVING_CURIOUS_HOUSE(0xBF, null, ConnectionState.IN_GAME),
|
||||
REQUEST_LEAVE_OBSERVING_CURIOUS_HOUSE(0xC0, null, ConnectionState.IN_GAME),
|
||||
|
@ -27,6 +27,7 @@ import org.l2jmobius.gameserver.handler.AdminCommandHandler;
|
||||
import org.l2jmobius.gameserver.handler.BypassHandler;
|
||||
import org.l2jmobius.gameserver.handler.CommunityBoardHandler;
|
||||
import org.l2jmobius.gameserver.handler.IBypassHandler;
|
||||
import org.l2jmobius.gameserver.instancemanager.QuestManager;
|
||||
import org.l2jmobius.gameserver.model.World;
|
||||
import org.l2jmobius.gameserver.model.WorldObject;
|
||||
import org.l2jmobius.gameserver.model.actor.Creature;
|
||||
@ -39,6 +40,7 @@ import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerBypass
|
||||
import org.l2jmobius.gameserver.model.events.returns.TerminateReturn;
|
||||
import org.l2jmobius.gameserver.model.items.instance.ItemInstance;
|
||||
import org.l2jmobius.gameserver.model.olympiad.Hero;
|
||||
import org.l2jmobius.gameserver.model.quest.Quest;
|
||||
import org.l2jmobius.gameserver.network.Disconnection;
|
||||
import org.l2jmobius.gameserver.network.GameClient;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.ActionFailed;
|
||||
@ -259,6 +261,15 @@ public class RequestBypassToServer implements IClientIncomingPacket
|
||||
final int multisellId = Integer.parseInt(_command.substring(10).trim());
|
||||
MultisellData.getInstance().separateAndSend(multisellId, player, null, false);
|
||||
}
|
||||
else if (_command.equals("pledgegame?command=apply"))
|
||||
{
|
||||
final Quest quest = QuestManager.getInstance().getQuest("CeremonyOfChaos");
|
||||
if (quest != null)
|
||||
{
|
||||
quest.notifyEvent("RegisterPlayer", null, player);
|
||||
}
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
final IBypassHandler handler = BypassHandler.getInstance().getHandler(_command);
|
||||
|
@ -17,19 +17,20 @@
|
||||
package org.l2jmobius.gameserver.network.clientpackets.ceremonyofchaos;
|
||||
|
||||
import org.l2jmobius.commons.network.PacketReader;
|
||||
import org.l2jmobius.gameserver.instancemanager.QuestManager;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
import org.l2jmobius.gameserver.model.quest.Quest;
|
||||
import org.l2jmobius.gameserver.network.GameClient;
|
||||
import org.l2jmobius.gameserver.network.clientpackets.IClientIncomingPacket;
|
||||
|
||||
/**
|
||||
* @author Sdw
|
||||
* @author Mobius
|
||||
*/
|
||||
public class RequestCancelCuriousHouse implements IClientIncomingPacket
|
||||
{
|
||||
@Override
|
||||
public boolean read(GameClient client, PacketReader packet)
|
||||
{
|
||||
// Nothing to read
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -42,15 +43,10 @@ public class RequestCancelCuriousHouse implements IClientIncomingPacket
|
||||
return;
|
||||
}
|
||||
|
||||
// if (CeremonyOfChaosManager.getInstance().unregisterPlayer(player))
|
||||
// {
|
||||
// player.sendPacket(SystemMessageId.YOU_HAVE_BEEN_TAKEN_OFF_THE_WAIT_LIST_YOU_MAY_ONLY_ENTER_THE_WAIT_LIST_ON_MON_THURS_EVERY_QUARTER_OF_AN_HR_FOR_5_MIN_BETWEEN_20_00_AND_23_40_IF_YOU_CANCEL_REGISTRATION_OR_CHOOSE_TO_FORFEIT_AFTER_ENTERING_A_MATCH_30_TIMES_OR_MORE_DURING_A_CYCLE_YOU_MUST_WAIT_UNTIL_THE_NEXT_CYCLE_TO_PARTICIPATE_IN_THE_CEREMONY_OF_CHAOS_UPON_ENTERING_THE_ARENA_ALL_BUFFS_EXCLUDING_VITALITY_BUFFS_ARE_REMOVED);
|
||||
// player.sendPacket(ExCuriousHouseState.IDLE_PACKET);
|
||||
//
|
||||
// if (CeremonyOfChaosManager.getInstance().getState() == CeremonyOfChaosState.PREPARING_FOR_TELEPORT)
|
||||
// {
|
||||
// player.prohibiteCeremonyOfChaos();
|
||||
// }
|
||||
// }
|
||||
final Quest quest = QuestManager.getInstance().getQuest("CeremonyOfChaos");
|
||||
if (quest != null)
|
||||
{
|
||||
quest.notifyEvent("UnregisterPlayer", null, player);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -17,19 +17,20 @@
|
||||
package org.l2jmobius.gameserver.network.clientpackets.ceremonyofchaos;
|
||||
|
||||
import org.l2jmobius.commons.network.PacketReader;
|
||||
import org.l2jmobius.gameserver.instancemanager.QuestManager;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
import org.l2jmobius.gameserver.model.quest.Quest;
|
||||
import org.l2jmobius.gameserver.network.GameClient;
|
||||
import org.l2jmobius.gameserver.network.clientpackets.IClientIncomingPacket;
|
||||
|
||||
/**
|
||||
* @author Sdw
|
||||
* @author Mobius
|
||||
*/
|
||||
public class RequestCuriousHouseHtml implements IClientIncomingPacket
|
||||
{
|
||||
@Override
|
||||
public boolean read(GameClient client, PacketReader packet)
|
||||
{
|
||||
// Nothing to read
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -42,21 +43,10 @@ public class RequestCuriousHouseHtml implements IClientIncomingPacket
|
||||
return;
|
||||
}
|
||||
|
||||
// if (CeremonyOfChaosManager.getInstance().getState() != CeremonyOfChaosState.REGISTRATION)
|
||||
// {
|
||||
// return;
|
||||
// }
|
||||
// else if (CeremonyOfChaosManager.getInstance().isRegistered(player))
|
||||
// {
|
||||
// player.sendPacket(SystemMessageId.YOU_ARE_ON_THE_WAITING_LIST_FOR_THE_CEREMONY_OF_CHAOS);
|
||||
// return;
|
||||
// }
|
||||
//
|
||||
// if (CeremonyOfChaosManager.getInstance().canRegister(player, true))
|
||||
// {
|
||||
// final NpcHtmlMessage message = new NpcHtmlMessage(0);
|
||||
// message.setFile(player, "data/html/CeremonyOfChaos/invite.htm");
|
||||
// player.sendPacket(message);
|
||||
// }
|
||||
final Quest quest = QuestManager.getInstance().getQuest("CeremonyOfChaos");
|
||||
if (quest != null)
|
||||
{
|
||||
quest.notifyEvent("RequestCuriousHouseHtml", null, player);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -17,19 +17,20 @@
|
||||
package org.l2jmobius.gameserver.network.clientpackets.ceremonyofchaos;
|
||||
|
||||
import org.l2jmobius.commons.network.PacketReader;
|
||||
import org.l2jmobius.gameserver.instancemanager.QuestManager;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
import org.l2jmobius.gameserver.model.quest.Quest;
|
||||
import org.l2jmobius.gameserver.network.GameClient;
|
||||
import org.l2jmobius.gameserver.network.clientpackets.IClientIncomingPacket;
|
||||
|
||||
/**
|
||||
* @author Sdw
|
||||
* @author Mobius
|
||||
*/
|
||||
public class RequestJoinCuriousHouse implements IClientIncomingPacket
|
||||
{
|
||||
@Override
|
||||
public boolean read(GameClient client, PacketReader packet)
|
||||
{
|
||||
// Nothing to read
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -42,25 +43,10 @@ public class RequestJoinCuriousHouse implements IClientIncomingPacket
|
||||
return;
|
||||
}
|
||||
|
||||
// if (CeremonyOfChaosManager.getInstance().getState() != CeremonyOfChaosState.REGISTRATION)
|
||||
// {
|
||||
// return;
|
||||
// }
|
||||
// else if (CeremonyOfChaosManager.getInstance().isRegistered(player))
|
||||
// {
|
||||
// player.sendPacket(SystemMessageId.YOU_ARE_ON_THE_WAITING_LIST_FOR_THE_CEREMONY_OF_CHAOS);
|
||||
// return;
|
||||
// }
|
||||
//
|
||||
// if (CeremonyOfChaosManager.getInstance().registerPlayer(player))
|
||||
// {
|
||||
// player.sendPacket(SystemMessageId.YOU_ARE_NOW_ON_THE_WAITING_LIST_YOU_WILL_AUTOMATICALLY_BE_TELEPORTED_WHEN_THE_TOURNAMENT_STARTS_AND_WILL_BE_REMOVED_FROM_THE_WAITING_LIST_IF_YOU_LOG_OUT_IF_YOU_CANCEL_REGISTRATION_WITHIN_THE_LAST_MIN_OF_ENTERING_THE_ARENA_AFTER_SIGNING_UP_30_TIMES_OR_MORE_OR_FORFEIT_AFTER_ENTERING_THE_ARENA_30_TIMES_OR_MORE_DURING_A_CYCLE_YOU_BECOME_INELIGIBLE_FOR_PARTICIPATION_IN_THE_CEREMONY_OF_CHAOS_UNTIL_THE_NEXT_CYCLE_ALL_THE_BUFFS_EXCEPT_THE_VITALITY_BUFF_WILL_BE_REMOVED_ONCE_YOU_ENTER_THE_ARENAS);
|
||||
// player.sendPacket(SystemMessageId.EXCEPT_THE_VITALITY_BUFF_ALL_BUFFS_INCLUDING_ART_OF_SEDUCTION_WILL_BE_DELETED);
|
||||
// player.sendPacket(ExCuriousHouseState.PREPARE_PACKET);
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// player.sendPacket(SystemMessageId.THERE_ARE_TOO_MANY_CHALLENGERS_YOU_CANNOT_PARTICIPATE_NOW);
|
||||
// }
|
||||
final Quest quest = QuestManager.getInstance().getQuest("CeremonyOfChaos");
|
||||
if (quest != null)
|
||||
{
|
||||
quest.notifyEvent("RegisterPlayer", null, player);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,52 @@
|
||||
/*
|
||||
* This file is part of the L2J Mobius project.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package org.l2jmobius.gameserver.network.clientpackets.ceremonyofchaos;
|
||||
|
||||
import org.l2jmobius.commons.network.PacketReader;
|
||||
import org.l2jmobius.gameserver.instancemanager.QuestManager;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
import org.l2jmobius.gameserver.model.quest.Quest;
|
||||
import org.l2jmobius.gameserver.network.GameClient;
|
||||
import org.l2jmobius.gameserver.network.clientpackets.IClientIncomingPacket;
|
||||
|
||||
/**
|
||||
* @author Mobius
|
||||
*/
|
||||
public class RequestLeaveCuriousHouse implements IClientIncomingPacket
|
||||
{
|
||||
@Override
|
||||
public boolean read(GameClient client, PacketReader packet)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run(GameClient client)
|
||||
{
|
||||
final PlayerInstance player = client.getPlayer();
|
||||
if (player == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
final Quest quest = QuestManager.getInstance().getQuest("CeremonyOfChaos");
|
||||
if (quest != null)
|
||||
{
|
||||
quest.notifyEvent("RequestQuit", null, player);
|
||||
}
|
||||
}
|
||||
}
|
@ -47,10 +47,11 @@ public class ExCuriousHouseMemberList implements IClientOutgoingPacket
|
||||
packet.writeD(_id);
|
||||
packet.writeD(_maxPlayers);
|
||||
packet.writeD(_players.size());
|
||||
int pos = 0;
|
||||
for (PlayerInstance player : _players)
|
||||
{
|
||||
packet.writeD(player.getObjectId());
|
||||
packet.writeD(0x00); // cocPlayer.getPosition
|
||||
packet.writeD(pos++);
|
||||
packet.writeD(player.getMaxHp());
|
||||
packet.writeD(player.getMaxCp());
|
||||
packet.writeD((int) player.getCurrentHp());
|
||||
|
@ -21,6 +21,7 @@ import java.util.Collection;
|
||||
import org.l2jmobius.commons.network.PacketWriter;
|
||||
import org.l2jmobius.gameserver.enums.CeremonyOfChaosResult;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
import org.l2jmobius.gameserver.model.variables.PlayerVariables;
|
||||
import org.l2jmobius.gameserver.network.OutgoingPackets;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.IClientOutgoingPacket;
|
||||
|
||||
@ -31,11 +32,13 @@ public class ExCuriousHouseResult implements IClientOutgoingPacket
|
||||
{
|
||||
private final CeremonyOfChaosResult _result;
|
||||
private final Collection<PlayerInstance> _players;
|
||||
private final int _time;
|
||||
|
||||
public ExCuriousHouseResult(CeremonyOfChaosResult result, Collection<PlayerInstance> players)
|
||||
public ExCuriousHouseResult(CeremonyOfChaosResult result, Collection<PlayerInstance> players, int time)
|
||||
{
|
||||
_result = result;
|
||||
_players = players;
|
||||
_time = time;
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -44,15 +47,16 @@ public class ExCuriousHouseResult implements IClientOutgoingPacket
|
||||
OutgoingPackets.EX_CURIOUS_HOUSE_RESULT.writeId(packet);
|
||||
packet.writeD(0); // _event.getId()
|
||||
packet.writeH(_result.ordinal());
|
||||
packet.writeD(_players.size()); // CeremonyOfChaosManager.getInstance().getMaxPlayersInArena()
|
||||
packet.writeD(18); // max players
|
||||
packet.writeD(_players.size());
|
||||
int pos = 0;
|
||||
for (PlayerInstance player : _players)
|
||||
{
|
||||
packet.writeD(player.getObjectId());
|
||||
packet.writeD(0x00); // cocPlayer.getPosition
|
||||
packet.writeD(pos++); // position
|
||||
packet.writeD(player.getClassId().getId());
|
||||
packet.writeD(0x00); // getLifeTime
|
||||
packet.writeD(0x00); // getScore
|
||||
packet.writeD(_time); // getLifeTime
|
||||
packet.writeD(player.getVariables().getInt(PlayerVariables.CEREMONY_OF_CHAOS_SCORE, 0));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- Ceremony of Chaos - Arena 1 -->
|
||||
<instance id="224" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/instance.xsd">
|
||||
<time empty="0" />
|
||||
<time duration="10" empty="5" />
|
||||
<misc isPvP="true" />
|
||||
<locations>
|
||||
<enter type="FIXED">
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- Ceremony of Chaos - Arena 2 -->
|
||||
<instance id="225" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/instance.xsd">
|
||||
<time empty="0" />
|
||||
<time duration="10" empty="5" />
|
||||
<misc isPvP="true" />
|
||||
<locations>
|
||||
<enter type="FIXED">
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- Ceremony of Chaos - Arena 3 -->
|
||||
<instance id="226" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/instance.xsd">
|
||||
<time empty="0" />
|
||||
<time duration="10" empty="5" />
|
||||
<misc isPvP="true" />
|
||||
<locations>
|
||||
<enter type="FIXED">
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- Ceremony of Chaos - Arena 4 -->
|
||||
<instance id="227" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/instance.xsd">
|
||||
<time empty="0" />
|
||||
<time duration="10" empty="5" />
|
||||
<misc isPvP="true" />
|
||||
<locations>
|
||||
<enter type="FIXED">
|
||||
|
1114
L2J_Mobius_05.5_EtinasFate/dist/game/data/scripts/instances/CeremonyOfChaos/CeremonyOfChaos.java
vendored
Normal file
1114
L2J_Mobius_05.5_EtinasFate/dist/game/data/scripts/instances/CeremonyOfChaos/CeremonyOfChaos.java
vendored
Normal file
File diff suppressed because it is too large
Load Diff
@ -247,7 +247,6 @@ import org.l2jmobius.gameserver.model.olympiad.OlympiadGameManager;
|
||||
import org.l2jmobius.gameserver.model.olympiad.OlympiadGameTask;
|
||||
import org.l2jmobius.gameserver.model.olympiad.OlympiadManager;
|
||||
import org.l2jmobius.gameserver.model.punishment.PunishmentAffect;
|
||||
import org.l2jmobius.gameserver.model.punishment.PunishmentTask;
|
||||
import org.l2jmobius.gameserver.model.punishment.PunishmentType;
|
||||
import org.l2jmobius.gameserver.model.quest.Quest;
|
||||
import org.l2jmobius.gameserver.model.quest.QuestState;
|
||||
@ -13488,21 +13487,6 @@ public class PlayerInstance extends Playable
|
||||
getVariables().set(PlayerVariables.WORLD_CHAT_VARIABLE_NAME, timesUsed);
|
||||
}
|
||||
|
||||
public void prohibiteCeremonyOfChaos()
|
||||
{
|
||||
if (!PunishmentManager.getInstance().hasPunishment(getObjectId(), PunishmentAffect.CHARACTER, PunishmentType.COC_BAN))
|
||||
{
|
||||
PunishmentManager.getInstance().startPunishment(new PunishmentTask(getObjectId(), PunishmentAffect.CHARACTER, PunishmentType.COC_BAN, 0, "", getClass().getSimpleName()));
|
||||
final int penalties = getVariables().getInt(PlayerVariables.CEREMONY_OF_CHAOS_PROHIBITED_PENALTIES, 0);
|
||||
getVariables().set(PlayerVariables.CEREMONY_OF_CHAOS_PROHIBITED_PENALTIES, penalties + 1);
|
||||
}
|
||||
}
|
||||
|
||||
public boolean isCeremonyOfChaosProhibited()
|
||||
{
|
||||
return PunishmentManager.getInstance().hasPunishment(getObjectId(), PunishmentAffect.CHARACTER, PunishmentType.COC_BAN) || (getVariables().getInt(PlayerVariables.CEREMONY_OF_CHAOS_PROHIBITED_PENALTIES, 0) >= 30);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Side of the player.
|
||||
*/
|
||||
|
@ -24,8 +24,7 @@ public enum PunishmentType
|
||||
BAN,
|
||||
CHAT_BAN,
|
||||
PARTY_BAN,
|
||||
JAIL,
|
||||
COC_BAN;
|
||||
JAIL;
|
||||
|
||||
public static PunishmentType getByName(String name)
|
||||
{
|
||||
|
@ -52,7 +52,7 @@ public class PlayerVariables extends AbstractVariables
|
||||
public static final String ATTENDANCE_DATE = "ATTENDANCE_DATE";
|
||||
public static final String ATTENDANCE_INDEX = "ATTENDANCE_INDEX";
|
||||
private static final String DAILY_MISSION_REWARDS = "DAILY_MISSION_REWARDS";
|
||||
public static final String CEREMONY_OF_CHAOS_PROHIBITED_PENALTIES = "CEREMONY_OF_CHAOS_PENALTIES";
|
||||
public static final String CEREMONY_OF_CHAOS_SCORE = "CEREMONY_OF_CHAOS_SCORE";
|
||||
public static final String CEREMONY_OF_CHAOS_MARKS = "CEREMONY_OF_CHAOS_MARKS";
|
||||
public static final String ABILITY_POINTS_MAIN_CLASS = "ABILITY_POINTS";
|
||||
public static final String ABILITY_POINTS_DUAL_CLASS = "ABILITY_POINTS_DUAL_CLASS";
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user