Left hand items do not show on Death Knight characters.
This commit is contained in:
@@ -41,9 +41,10 @@ import org.l2jmobius.gameserver.taskmanager.AutoUseTaskManager;
|
||||
*/
|
||||
public class ClassChange extends AbstractEffect
|
||||
{
|
||||
private final int _index;
|
||||
private static final int IDENTITY_CRISIS_SKILL_ID = 1570;
|
||||
|
||||
private final int _index;
|
||||
|
||||
public ClassChange(StatSet params)
|
||||
{
|
||||
_index = params.getInt("index", 0);
|
||||
|
@@ -26,9 +26,7 @@ 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;
|
||||
@@ -45,7 +43,6 @@ 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;
|
||||
@@ -211,13 +208,6 @@ 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,6 +20,8 @@ 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;
|
||||
@@ -132,8 +134,16 @@ 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
|
||||
}
|
||||
|
||||
@@ -148,6 +158,13 @@ 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