Index: java/com/l2jserver/gameserver/network/clientpackets/UseItem.java
===================================================================
--- java/com/l2jserver/gameserver/network/clientpackets/UseItem.java (revision 4167)
+++ java/com/l2jserver/gameserver/network/clientpackets/UseItem.java (working copy)
@@ -97,6 +97,14 @@
if (activeChar.getActiveTradeList() != null)
activeChar.cancelActiveTrade();
+
+ int weaponGrade = activeChar.getActiveWeaponItem().getCrystalType();
+ int armorGrade = activeChar.getActiveChestArmorItem().getCrystalType();
+ if (activeChar.isInOlympiadMode() && (weaponGrade == L2Item.CRYSTAL_A || armorGrade == L2Item.CRYSTAL_A))
+ {
+ activeChar.sendMessage("You cannot use A grade equipment at the Grand Olympiad games.");
+ return;
+ }
// NOTE: disabled due to deadlocks
// synchronized (activeChar.getInventory())
Index: java/com/l2jserver/gameserver/model/olympiad/Olympiad.java
===================================================================
--- java/com/l2jserver/gameserver/model/olympiad/Olympiad.java (revision 4167)
+++ java/com/l2jserver/gameserver/model/olympiad/Olympiad.java (working copy)
@@ -50,6 +50,7 @@
import com.l2jserver.gameserver.network.serverpackets.NpcHtmlMessage;
import com.l2jserver.gameserver.network.serverpackets.SystemMessage;
import com.l2jserver.gameserver.templates.StatsSet;
+import com.l2jserver.gameserver.templates.item.L2Item;
import com.l2jserver.util.L2FastList;
import javolution.util.FastMap;
@@ -482,6 +483,14 @@
* return false; }
*/
+ int weaponGrade = noble.getActiveWeaponItem().getCrystalType();
+ int armorGrade = noble.getActiveChestArmorItem().getCrystalType();
+ if (weaponGrade == L2Item.CRYSTAL_A || armorGrade == L2Item.CRYSTAL_A)
+ {
+ noble.sendMessage("You cannot join the grand olympiad games using A grade equipment.");
+ return false;
+ }
+
if (!_inCompPeriod)
{
sm = new SystemMessage(SystemMessageId.THE_OLYMPIAD_GAME_IS_NOT_CURRENTLY_IN_PROGRESS);