Fixed Death Knight shield inconsistencies between Goddess and Essence.
This commit is contained in:
@@ -20,8 +20,6 @@ import java.util.Set;
|
||||
|
||||
import org.l2jmobius.Config;
|
||||
import org.l2jmobius.commons.network.PacketWriter;
|
||||
import org.l2jmobius.gameserver.data.xml.CategoryData;
|
||||
import org.l2jmobius.gameserver.enums.CategoryType;
|
||||
import org.l2jmobius.gameserver.instancemanager.CastleManager;
|
||||
import org.l2jmobius.gameserver.instancemanager.CursedWeaponsManager;
|
||||
import org.l2jmobius.gameserver.instancemanager.RankManager;
|
||||
@@ -134,16 +132,8 @@ public class CharInfo implements IClientOutgoingPacket
|
||||
packet.writeC(_player.getAppearance().isFemale() ? 1 : 0); // Confirmed
|
||||
packet.writeD(_player.isDeathKnight() && _player.isSubClassActive() ? 0 : _player.getBaseTemplate().getClassId().getRootClassId().getId());
|
||||
|
||||
final boolean isDeathKnightClass = CategoryData.getInstance().isInCategory(CategoryType.DEATH_KNIGHT_ALL_CLASS, _player.getClassId().getId());
|
||||
for (int slot : getPaperdollOrder())
|
||||
{
|
||||
// Left hand items do not show on Death Knight characters.
|
||||
if ((slot == Inventory.PAPERDOLL_LHAND) && isDeathKnightClass)
|
||||
{
|
||||
packet.writeD(0);
|
||||
continue;
|
||||
}
|
||||
|
||||
packet.writeD(_player.getInventory().getPaperdollItemDisplayId(slot)); // Confirmed
|
||||
}
|
||||
|
||||
@@ -158,13 +148,6 @@ public class CharInfo implements IClientOutgoingPacket
|
||||
|
||||
for (int slot : getPaperdollOrderVisualId())
|
||||
{
|
||||
// Left hand items do not show on Death Knight characters.
|
||||
if ((slot == Inventory.PAPERDOLL_LHAND) && isDeathKnightClass)
|
||||
{
|
||||
packet.writeD(0);
|
||||
continue;
|
||||
}
|
||||
|
||||
packet.writeD(_player.getInventory().getPaperdollItemVisualId(slot));
|
||||
}
|
||||
|
||||
|
@@ -26,7 +26,9 @@ import org.l2jmobius.commons.util.Chronos;
|
||||
import org.l2jmobius.gameserver.ai.CtrlEvent;
|
||||
import org.l2jmobius.gameserver.ai.CtrlIntention;
|
||||
import org.l2jmobius.gameserver.ai.NextAction;
|
||||
import org.l2jmobius.gameserver.data.xml.CategoryData;
|
||||
import org.l2jmobius.gameserver.data.xml.VariationData;
|
||||
import org.l2jmobius.gameserver.enums.CategoryType;
|
||||
import org.l2jmobius.gameserver.enums.ItemSkillType;
|
||||
import org.l2jmobius.gameserver.enums.PrivateStoreType;
|
||||
import org.l2jmobius.gameserver.handler.AdminCommandHandler;
|
||||
@@ -42,6 +44,7 @@ import org.l2jmobius.gameserver.model.item.EtcItem;
|
||||
import org.l2jmobius.gameserver.model.item.ItemTemplate;
|
||||
import org.l2jmobius.gameserver.model.item.instance.Item;
|
||||
import org.l2jmobius.gameserver.model.item.type.ActionType;
|
||||
import org.l2jmobius.gameserver.model.item.type.ArmorType;
|
||||
import org.l2jmobius.gameserver.model.zone.ZoneId;
|
||||
import org.l2jmobius.gameserver.network.GameClient;
|
||||
import org.l2jmobius.gameserver.network.PacketLogger;
|
||||
@@ -205,6 +208,14 @@ public class UseItem implements IClientIncomingPacket
|
||||
player.sendPacket(SystemMessageId.YOU_DO_NOT_MEET_THE_REQUIRED_CONDITION_TO_EQUIP_THAT_ITEM);
|
||||
return;
|
||||
}
|
||||
|
||||
// Prevent equip shields for Death Knight players.
|
||||
if (item.isArmor() && (item.getArmorItem().getItemType() == ArmorType.SHIELD) && CategoryData.getInstance().isInCategory(CategoryType.DEATH_KNIGHT_ALL_CLASS, player.getClassId().getId()))
|
||||
{
|
||||
player.sendPacket(SystemMessageId.YOU_DO_NOT_MEET_THE_REQUIRED_CONDITION_TO_EQUIP_THAT_ITEM);
|
||||
return;
|
||||
}
|
||||
|
||||
// Prevent players to equip weapon while wearing combat flag
|
||||
// Don't allow weapon/shield equipment if a cursed weapon is equipped.
|
||||
if ((item.getItem().getBodyPart() == ItemTemplate.SLOT_LR_HAND) || (item.getItem().getBodyPart() == ItemTemplate.SLOT_L_HAND) || (item.getItem().getBodyPart() == ItemTemplate.SLOT_R_HAND))
|
||||
|
@@ -20,8 +20,6 @@ import java.util.Set;
|
||||
|
||||
import org.l2jmobius.Config;
|
||||
import org.l2jmobius.commons.network.PacketWriter;
|
||||
import org.l2jmobius.gameserver.data.xml.CategoryData;
|
||||
import org.l2jmobius.gameserver.enums.CategoryType;
|
||||
import org.l2jmobius.gameserver.instancemanager.CastleManager;
|
||||
import org.l2jmobius.gameserver.instancemanager.CursedWeaponsManager;
|
||||
import org.l2jmobius.gameserver.instancemanager.RankManager;
|
||||
@@ -134,16 +132,8 @@ public class CharInfo implements IClientOutgoingPacket
|
||||
packet.writeC(_player.getAppearance().isFemale() ? 1 : 0); // Confirmed
|
||||
packet.writeD(_player.getBaseTemplate().getClassId().getRootClassId().getId());
|
||||
|
||||
final boolean isDeathKnightClass = CategoryData.getInstance().isInCategory(CategoryType.DEATH_KNIGHT_ALL_CLASS, _player.getClassId().getId());
|
||||
for (int slot : getPaperdollOrder())
|
||||
{
|
||||
// Left hand items do not show on Death Knight characters.
|
||||
if ((slot == Inventory.PAPERDOLL_LHAND) && isDeathKnightClass)
|
||||
{
|
||||
packet.writeD(0);
|
||||
continue;
|
||||
}
|
||||
|
||||
packet.writeD(_player.getInventory().getPaperdollItemDisplayId(slot)); // Confirmed
|
||||
}
|
||||
|
||||
@@ -158,13 +148,6 @@ public class CharInfo implements IClientOutgoingPacket
|
||||
|
||||
for (int slot : getPaperdollOrderVisualId())
|
||||
{
|
||||
// Left hand items do not show on Death Knight characters.
|
||||
if ((slot == Inventory.PAPERDOLL_LHAND) && isDeathKnightClass)
|
||||
{
|
||||
packet.writeD(0);
|
||||
continue;
|
||||
}
|
||||
|
||||
packet.writeD(_player.getInventory().getPaperdollItemVisualId(slot));
|
||||
}
|
||||
|
||||
|
@@ -26,7 +26,9 @@ import org.l2jmobius.commons.util.Chronos;
|
||||
import org.l2jmobius.gameserver.ai.CtrlEvent;
|
||||
import org.l2jmobius.gameserver.ai.CtrlIntention;
|
||||
import org.l2jmobius.gameserver.ai.NextAction;
|
||||
import org.l2jmobius.gameserver.data.xml.CategoryData;
|
||||
import org.l2jmobius.gameserver.data.xml.VariationData;
|
||||
import org.l2jmobius.gameserver.enums.CategoryType;
|
||||
import org.l2jmobius.gameserver.enums.ItemSkillType;
|
||||
import org.l2jmobius.gameserver.enums.PrivateStoreType;
|
||||
import org.l2jmobius.gameserver.enums.Race;
|
||||
@@ -43,6 +45,7 @@ import org.l2jmobius.gameserver.model.item.EtcItem;
|
||||
import org.l2jmobius.gameserver.model.item.ItemTemplate;
|
||||
import org.l2jmobius.gameserver.model.item.instance.Item;
|
||||
import org.l2jmobius.gameserver.model.item.type.ActionType;
|
||||
import org.l2jmobius.gameserver.model.item.type.ArmorType;
|
||||
import org.l2jmobius.gameserver.model.item.type.WeaponType;
|
||||
import org.l2jmobius.gameserver.model.zone.ZoneId;
|
||||
import org.l2jmobius.gameserver.network.GameClient;
|
||||
@@ -208,6 +211,13 @@ public class UseItem implements IClientIncomingPacket
|
||||
return;
|
||||
}
|
||||
|
||||
// Prevent equip shields for Death Knight players.
|
||||
if (item.isArmor() && (item.getArmorItem().getItemType() == ArmorType.SHIELD) && CategoryData.getInstance().isInCategory(CategoryType.DEATH_KNIGHT_ALL_CLASS, player.getClassId().getId()))
|
||||
{
|
||||
player.sendPacket(SystemMessageId.YOU_DO_NOT_MEET_THE_REQUIRED_CONDITION_TO_EQUIP_THAT_ITEM);
|
||||
return;
|
||||
}
|
||||
|
||||
// Prevent equip pistols for non Sylph players.
|
||||
if (item.isWeapon() && (item.getWeaponItem().getItemType() == WeaponType.PISTOLS) && (player.getRace() != Race.SYLPH))
|
||||
{
|
||||
|
@@ -20,8 +20,6 @@ import java.util.Set;
|
||||
|
||||
import org.l2jmobius.Config;
|
||||
import org.l2jmobius.commons.network.PacketWriter;
|
||||
import org.l2jmobius.gameserver.data.xml.CategoryData;
|
||||
import org.l2jmobius.gameserver.enums.CategoryType;
|
||||
import org.l2jmobius.gameserver.instancemanager.CastleManager;
|
||||
import org.l2jmobius.gameserver.instancemanager.CursedWeaponsManager;
|
||||
import org.l2jmobius.gameserver.instancemanager.RankManager;
|
||||
@@ -134,16 +132,8 @@ public class CharInfo implements IClientOutgoingPacket
|
||||
packet.writeC(_player.getAppearance().isFemale() ? 1 : 0); // Confirmed
|
||||
packet.writeD(_player.getBaseTemplate().getClassId().getRootClassId().getId());
|
||||
|
||||
final boolean isDeathKnightClass = CategoryData.getInstance().isInCategory(CategoryType.DEATH_KNIGHT_ALL_CLASS, _player.getClassId().getId());
|
||||
for (int slot : getPaperdollOrder())
|
||||
{
|
||||
// Left hand items do not show on Death Knight characters.
|
||||
if ((slot == Inventory.PAPERDOLL_LHAND) && isDeathKnightClass)
|
||||
{
|
||||
packet.writeD(0);
|
||||
continue;
|
||||
}
|
||||
|
||||
packet.writeD(_player.getInventory().getPaperdollItemDisplayId(slot)); // Confirmed
|
||||
}
|
||||
|
||||
@@ -158,13 +148,6 @@ public class CharInfo implements IClientOutgoingPacket
|
||||
|
||||
for (int slot : getPaperdollOrderVisualId())
|
||||
{
|
||||
// Left hand items do not show on Death Knight characters.
|
||||
if ((slot == Inventory.PAPERDOLL_LHAND) && isDeathKnightClass)
|
||||
{
|
||||
packet.writeD(0);
|
||||
continue;
|
||||
}
|
||||
|
||||
packet.writeD(_player.getInventory().getPaperdollItemVisualId(slot));
|
||||
}
|
||||
|
||||
|
@@ -26,7 +26,9 @@ import org.l2jmobius.commons.util.Chronos;
|
||||
import org.l2jmobius.gameserver.ai.CtrlEvent;
|
||||
import org.l2jmobius.gameserver.ai.CtrlIntention;
|
||||
import org.l2jmobius.gameserver.ai.NextAction;
|
||||
import org.l2jmobius.gameserver.data.xml.CategoryData;
|
||||
import org.l2jmobius.gameserver.data.xml.VariationData;
|
||||
import org.l2jmobius.gameserver.enums.CategoryType;
|
||||
import org.l2jmobius.gameserver.enums.ItemSkillType;
|
||||
import org.l2jmobius.gameserver.enums.PrivateStoreType;
|
||||
import org.l2jmobius.gameserver.enums.Race;
|
||||
@@ -43,6 +45,7 @@ import org.l2jmobius.gameserver.model.item.EtcItem;
|
||||
import org.l2jmobius.gameserver.model.item.ItemTemplate;
|
||||
import org.l2jmobius.gameserver.model.item.instance.Item;
|
||||
import org.l2jmobius.gameserver.model.item.type.ActionType;
|
||||
import org.l2jmobius.gameserver.model.item.type.ArmorType;
|
||||
import org.l2jmobius.gameserver.model.item.type.WeaponType;
|
||||
import org.l2jmobius.gameserver.model.zone.ZoneId;
|
||||
import org.l2jmobius.gameserver.network.GameClient;
|
||||
@@ -208,6 +211,13 @@ public class UseItem implements IClientIncomingPacket
|
||||
return;
|
||||
}
|
||||
|
||||
// Prevent equip shields for Death Knight players.
|
||||
if (item.isArmor() && (item.getArmorItem().getItemType() == ArmorType.SHIELD) && CategoryData.getInstance().isInCategory(CategoryType.DEATH_KNIGHT_ALL_CLASS, player.getClassId().getId()))
|
||||
{
|
||||
player.sendPacket(SystemMessageId.YOU_DO_NOT_MEET_THE_REQUIRED_CONDITION_TO_EQUIP_THAT_ITEM);
|
||||
return;
|
||||
}
|
||||
|
||||
// Prevent equip pistols for non Sylph players.
|
||||
if (item.isWeapon() && (item.getWeaponItem().getItemType() == WeaponType.PISTOLS) && (player.getRace() != Race.SYLPH))
|
||||
{
|
||||
|
@@ -20,8 +20,6 @@ import java.util.Set;
|
||||
|
||||
import org.l2jmobius.Config;
|
||||
import org.l2jmobius.commons.network.PacketWriter;
|
||||
import org.l2jmobius.gameserver.data.xml.CategoryData;
|
||||
import org.l2jmobius.gameserver.enums.CategoryType;
|
||||
import org.l2jmobius.gameserver.instancemanager.CastleManager;
|
||||
import org.l2jmobius.gameserver.instancemanager.CursedWeaponsManager;
|
||||
import org.l2jmobius.gameserver.instancemanager.RankManager;
|
||||
@@ -134,16 +132,8 @@ public class CharInfo implements IClientOutgoingPacket
|
||||
packet.writeC(_player.getAppearance().isFemale() ? 1 : 0); // Confirmed
|
||||
packet.writeD(_player.getBaseTemplate().getClassId().getRootClassId().getId());
|
||||
|
||||
final boolean isDeathKnightClass = CategoryData.getInstance().isInCategory(CategoryType.DEATH_KNIGHT_ALL_CLASS, _player.getClassId().getId());
|
||||
for (int slot : getPaperdollOrder())
|
||||
{
|
||||
// Left hand items do not show on Death Knight characters.
|
||||
if ((slot == Inventory.PAPERDOLL_LHAND) && isDeathKnightClass)
|
||||
{
|
||||
packet.writeD(0);
|
||||
continue;
|
||||
}
|
||||
|
||||
packet.writeD(_player.getInventory().getPaperdollItemDisplayId(slot)); // Confirmed
|
||||
}
|
||||
|
||||
@@ -158,13 +148,6 @@ public class CharInfo implements IClientOutgoingPacket
|
||||
|
||||
for (int slot : getPaperdollOrderVisualId())
|
||||
{
|
||||
// Left hand items do not show on Death Knight characters.
|
||||
if ((slot == Inventory.PAPERDOLL_LHAND) && isDeathKnightClass)
|
||||
{
|
||||
packet.writeD(0);
|
||||
continue;
|
||||
}
|
||||
|
||||
packet.writeD(_player.getInventory().getPaperdollItemVisualId(slot));
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user