Left hand items do not show on Death Knight characters.
This commit is contained in:
@@ -25,8 +25,6 @@ import org.l2jmobius.gameserver.model.actor.Creature;
|
|||||||
import org.l2jmobius.gameserver.model.actor.Player;
|
import org.l2jmobius.gameserver.model.actor.Player;
|
||||||
import org.l2jmobius.gameserver.model.effects.AbstractEffect;
|
import org.l2jmobius.gameserver.model.effects.AbstractEffect;
|
||||||
import org.l2jmobius.gameserver.model.item.instance.Item;
|
import org.l2jmobius.gameserver.model.item.instance.Item;
|
||||||
import org.l2jmobius.gameserver.model.item.type.ArmorType;
|
|
||||||
import org.l2jmobius.gameserver.model.itemcontainer.Inventory;
|
|
||||||
import org.l2jmobius.gameserver.model.olympiad.OlympiadManager;
|
import org.l2jmobius.gameserver.model.olympiad.OlympiadManager;
|
||||||
import org.l2jmobius.gameserver.model.skill.Skill;
|
import org.l2jmobius.gameserver.model.skill.Skill;
|
||||||
import org.l2jmobius.gameserver.network.SystemMessageId;
|
import org.l2jmobius.gameserver.network.SystemMessageId;
|
||||||
@@ -159,17 +157,9 @@ public class ClassChange extends AbstractEffect
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Death Knight adjustments.
|
// Fix Death Knight model animation.
|
||||||
if (player.isDeathKnight())
|
if (player.isDeathKnight())
|
||||||
{
|
{
|
||||||
// Unequip shield.
|
|
||||||
final Item lhand = player.getInventory().getPaperdollItem(Inventory.PAPERDOLL_LHAND);
|
|
||||||
if ((lhand != null) && lhand.isArmor() && (lhand.getItemType() == ArmorType.SHIELD))
|
|
||||||
{
|
|
||||||
player.disarmShield();
|
|
||||||
}
|
|
||||||
|
|
||||||
// Fix Death Knight model animation.
|
|
||||||
player.transform(101, false);
|
player.transform(101, false);
|
||||||
ThreadPool.schedule(() -> player.stopTransformation(false), 50);
|
ThreadPool.schedule(() -> player.stopTransformation(false), 50);
|
||||||
}
|
}
|
||||||
|
@@ -26,9 +26,7 @@ import org.l2jmobius.commons.util.Chronos;
|
|||||||
import org.l2jmobius.gameserver.ai.CtrlEvent;
|
import org.l2jmobius.gameserver.ai.CtrlEvent;
|
||||||
import org.l2jmobius.gameserver.ai.CtrlIntention;
|
import org.l2jmobius.gameserver.ai.CtrlIntention;
|
||||||
import org.l2jmobius.gameserver.ai.NextAction;
|
import org.l2jmobius.gameserver.ai.NextAction;
|
||||||
import org.l2jmobius.gameserver.data.xml.CategoryData;
|
|
||||||
import org.l2jmobius.gameserver.data.xml.VariationData;
|
import org.l2jmobius.gameserver.data.xml.VariationData;
|
||||||
import org.l2jmobius.gameserver.enums.CategoryType;
|
|
||||||
import org.l2jmobius.gameserver.enums.ItemSkillType;
|
import org.l2jmobius.gameserver.enums.ItemSkillType;
|
||||||
import org.l2jmobius.gameserver.enums.PrivateStoreType;
|
import org.l2jmobius.gameserver.enums.PrivateStoreType;
|
||||||
import org.l2jmobius.gameserver.handler.AdminCommandHandler;
|
import org.l2jmobius.gameserver.handler.AdminCommandHandler;
|
||||||
@@ -44,7 +42,6 @@ import org.l2jmobius.gameserver.model.item.EtcItem;
|
|||||||
import org.l2jmobius.gameserver.model.item.ItemTemplate;
|
import org.l2jmobius.gameserver.model.item.ItemTemplate;
|
||||||
import org.l2jmobius.gameserver.model.item.instance.Item;
|
import org.l2jmobius.gameserver.model.item.instance.Item;
|
||||||
import org.l2jmobius.gameserver.model.item.type.ActionType;
|
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.model.zone.ZoneId;
|
||||||
import org.l2jmobius.gameserver.network.GameClient;
|
import org.l2jmobius.gameserver.network.GameClient;
|
||||||
import org.l2jmobius.gameserver.network.PacketLogger;
|
import org.l2jmobius.gameserver.network.PacketLogger;
|
||||||
@@ -208,14 +205,6 @@ public class UseItem implements IClientIncomingPacket
|
|||||||
player.sendPacket(SystemMessageId.YOU_DO_NOT_MEET_THE_REQUIRED_CONDITION_TO_EQUIP_THAT_ITEM);
|
player.sendPacket(SystemMessageId.YOU_DO_NOT_MEET_THE_REQUIRED_CONDITION_TO_EQUIP_THAT_ITEM);
|
||||||
return;
|
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
|
// Prevent players to equip weapon while wearing combat flag
|
||||||
// Don't allow weapon/shield equipment if a cursed weapon is equipped.
|
// 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))
|
if ((item.getItem().getBodyPart() == ItemTemplate.SLOT_LR_HAND) || (item.getItem().getBodyPart() == ItemTemplate.SLOT_L_HAND) || (item.getItem().getBodyPart() == ItemTemplate.SLOT_R_HAND))
|
||||||
|
@@ -20,6 +20,8 @@ import java.util.Set;
|
|||||||
|
|
||||||
import org.l2jmobius.Config;
|
import org.l2jmobius.Config;
|
||||||
import org.l2jmobius.commons.network.PacketWriter;
|
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.CastleManager;
|
||||||
import org.l2jmobius.gameserver.instancemanager.CursedWeaponsManager;
|
import org.l2jmobius.gameserver.instancemanager.CursedWeaponsManager;
|
||||||
import org.l2jmobius.gameserver.instancemanager.RankManager;
|
import org.l2jmobius.gameserver.instancemanager.RankManager;
|
||||||
@@ -132,8 +134,16 @@ public class CharInfo implements IClientOutgoingPacket
|
|||||||
packet.writeC(_player.getAppearance().isFemale() ? 1 : 0); // Confirmed
|
packet.writeC(_player.getAppearance().isFemale() ? 1 : 0); // Confirmed
|
||||||
packet.writeD(_player.isDeathKnight() && _player.isSubClassActive() ? 0 : _player.getBaseTemplate().getClassId().getRootClassId().getId());
|
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())
|
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
|
packet.writeD(_player.getInventory().getPaperdollItemDisplayId(slot)); // Confirmed
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -148,6 +158,13 @@ public class CharInfo implements IClientOutgoingPacket
|
|||||||
|
|
||||||
for (int slot : getPaperdollOrderVisualId())
|
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));
|
packet.writeD(_player.getInventory().getPaperdollItemVisualId(slot));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -41,9 +41,10 @@ import org.l2jmobius.gameserver.taskmanager.AutoUseTaskManager;
|
|||||||
*/
|
*/
|
||||||
public class ClassChange extends AbstractEffect
|
public class ClassChange extends AbstractEffect
|
||||||
{
|
{
|
||||||
private final int _index;
|
|
||||||
private static final int IDENTITY_CRISIS_SKILL_ID = 1570;
|
private static final int IDENTITY_CRISIS_SKILL_ID = 1570;
|
||||||
|
|
||||||
|
private final int _index;
|
||||||
|
|
||||||
public ClassChange(StatSet params)
|
public ClassChange(StatSet params)
|
||||||
{
|
{
|
||||||
_index = params.getInt("index", 0);
|
_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.CtrlEvent;
|
||||||
import org.l2jmobius.gameserver.ai.CtrlIntention;
|
import org.l2jmobius.gameserver.ai.CtrlIntention;
|
||||||
import org.l2jmobius.gameserver.ai.NextAction;
|
import org.l2jmobius.gameserver.ai.NextAction;
|
||||||
import org.l2jmobius.gameserver.data.xml.CategoryData;
|
|
||||||
import org.l2jmobius.gameserver.data.xml.VariationData;
|
import org.l2jmobius.gameserver.data.xml.VariationData;
|
||||||
import org.l2jmobius.gameserver.enums.CategoryType;
|
|
||||||
import org.l2jmobius.gameserver.enums.ItemSkillType;
|
import org.l2jmobius.gameserver.enums.ItemSkillType;
|
||||||
import org.l2jmobius.gameserver.enums.PrivateStoreType;
|
import org.l2jmobius.gameserver.enums.PrivateStoreType;
|
||||||
import org.l2jmobius.gameserver.handler.AdminCommandHandler;
|
import org.l2jmobius.gameserver.handler.AdminCommandHandler;
|
||||||
@@ -44,7 +42,6 @@ import org.l2jmobius.gameserver.model.item.EtcItem;
|
|||||||
import org.l2jmobius.gameserver.model.item.ItemTemplate;
|
import org.l2jmobius.gameserver.model.item.ItemTemplate;
|
||||||
import org.l2jmobius.gameserver.model.item.instance.Item;
|
import org.l2jmobius.gameserver.model.item.instance.Item;
|
||||||
import org.l2jmobius.gameserver.model.item.type.ActionType;
|
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.model.zone.ZoneId;
|
||||||
import org.l2jmobius.gameserver.network.GameClient;
|
import org.l2jmobius.gameserver.network.GameClient;
|
||||||
import org.l2jmobius.gameserver.network.PacketLogger;
|
import org.l2jmobius.gameserver.network.PacketLogger;
|
||||||
@@ -208,14 +205,6 @@ public class UseItem implements IClientIncomingPacket
|
|||||||
player.sendPacket(SystemMessageId.YOU_DO_NOT_MEET_THE_REQUIRED_CONDITION_TO_EQUIP_THAT_ITEM);
|
player.sendPacket(SystemMessageId.YOU_DO_NOT_MEET_THE_REQUIRED_CONDITION_TO_EQUIP_THAT_ITEM);
|
||||||
return;
|
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
|
// Prevent players to equip weapon while wearing combat flag
|
||||||
// Don't allow weapon/shield equipment if a cursed weapon is equipped.
|
// 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))
|
if ((item.getItem().getBodyPart() == ItemTemplate.SLOT_LR_HAND) || (item.getItem().getBodyPart() == ItemTemplate.SLOT_L_HAND) || (item.getItem().getBodyPart() == ItemTemplate.SLOT_R_HAND))
|
||||||
|
@@ -20,6 +20,8 @@ import java.util.Set;
|
|||||||
|
|
||||||
import org.l2jmobius.Config;
|
import org.l2jmobius.Config;
|
||||||
import org.l2jmobius.commons.network.PacketWriter;
|
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.CastleManager;
|
||||||
import org.l2jmobius.gameserver.instancemanager.CursedWeaponsManager;
|
import org.l2jmobius.gameserver.instancemanager.CursedWeaponsManager;
|
||||||
import org.l2jmobius.gameserver.instancemanager.RankManager;
|
import org.l2jmobius.gameserver.instancemanager.RankManager;
|
||||||
@@ -132,8 +134,16 @@ public class CharInfo implements IClientOutgoingPacket
|
|||||||
packet.writeC(_player.getAppearance().isFemale() ? 1 : 0); // Confirmed
|
packet.writeC(_player.getAppearance().isFemale() ? 1 : 0); // Confirmed
|
||||||
packet.writeD(_player.getBaseTemplate().getClassId().getRootClassId().getId());
|
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())
|
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
|
packet.writeD(_player.getInventory().getPaperdollItemDisplayId(slot)); // Confirmed
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -148,6 +158,13 @@ public class CharInfo implements IClientOutgoingPacket
|
|||||||
|
|
||||||
for (int slot : getPaperdollOrderVisualId())
|
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));
|
packet.writeD(_player.getInventory().getPaperdollItemVisualId(slot));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -41,9 +41,10 @@ import org.l2jmobius.gameserver.taskmanager.AutoUseTaskManager;
|
|||||||
*/
|
*/
|
||||||
public class ClassChange extends AbstractEffect
|
public class ClassChange extends AbstractEffect
|
||||||
{
|
{
|
||||||
private final int _index;
|
|
||||||
private static final int IDENTITY_CRISIS_SKILL_ID = 1570;
|
private static final int IDENTITY_CRISIS_SKILL_ID = 1570;
|
||||||
|
|
||||||
|
private final int _index;
|
||||||
|
|
||||||
public ClassChange(StatSet params)
|
public ClassChange(StatSet params)
|
||||||
{
|
{
|
||||||
_index = params.getInt("index", 0);
|
_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.CtrlEvent;
|
||||||
import org.l2jmobius.gameserver.ai.CtrlIntention;
|
import org.l2jmobius.gameserver.ai.CtrlIntention;
|
||||||
import org.l2jmobius.gameserver.ai.NextAction;
|
import org.l2jmobius.gameserver.ai.NextAction;
|
||||||
import org.l2jmobius.gameserver.data.xml.CategoryData;
|
|
||||||
import org.l2jmobius.gameserver.data.xml.VariationData;
|
import org.l2jmobius.gameserver.data.xml.VariationData;
|
||||||
import org.l2jmobius.gameserver.enums.CategoryType;
|
|
||||||
import org.l2jmobius.gameserver.enums.ItemSkillType;
|
import org.l2jmobius.gameserver.enums.ItemSkillType;
|
||||||
import org.l2jmobius.gameserver.enums.PrivateStoreType;
|
import org.l2jmobius.gameserver.enums.PrivateStoreType;
|
||||||
import org.l2jmobius.gameserver.enums.Race;
|
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.ItemTemplate;
|
||||||
import org.l2jmobius.gameserver.model.item.instance.Item;
|
import org.l2jmobius.gameserver.model.item.instance.Item;
|
||||||
import org.l2jmobius.gameserver.model.item.type.ActionType;
|
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.item.type.WeaponType;
|
||||||
import org.l2jmobius.gameserver.model.zone.ZoneId;
|
import org.l2jmobius.gameserver.model.zone.ZoneId;
|
||||||
import org.l2jmobius.gameserver.network.GameClient;
|
import org.l2jmobius.gameserver.network.GameClient;
|
||||||
@@ -211,13 +208,6 @@ public class UseItem implements IClientIncomingPacket
|
|||||||
return;
|
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.
|
// Prevent equip pistols for non Sylph players.
|
||||||
if (item.isWeapon() && (item.getWeaponItem().getItemType() == WeaponType.PISTOLS) && (player.getRace() != Race.SYLPH))
|
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.Config;
|
||||||
import org.l2jmobius.commons.network.PacketWriter;
|
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.CastleManager;
|
||||||
import org.l2jmobius.gameserver.instancemanager.CursedWeaponsManager;
|
import org.l2jmobius.gameserver.instancemanager.CursedWeaponsManager;
|
||||||
import org.l2jmobius.gameserver.instancemanager.RankManager;
|
import org.l2jmobius.gameserver.instancemanager.RankManager;
|
||||||
@@ -132,8 +134,16 @@ public class CharInfo implements IClientOutgoingPacket
|
|||||||
packet.writeC(_player.getAppearance().isFemale() ? 1 : 0); // Confirmed
|
packet.writeC(_player.getAppearance().isFemale() ? 1 : 0); // Confirmed
|
||||||
packet.writeD(_player.getBaseTemplate().getClassId().getRootClassId().getId());
|
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())
|
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
|
packet.writeD(_player.getInventory().getPaperdollItemDisplayId(slot)); // Confirmed
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -148,6 +158,13 @@ public class CharInfo implements IClientOutgoingPacket
|
|||||||
|
|
||||||
for (int slot : getPaperdollOrderVisualId())
|
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));
|
packet.writeD(_player.getInventory().getPaperdollItemVisualId(slot));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -41,9 +41,10 @@ import org.l2jmobius.gameserver.taskmanager.AutoUseTaskManager;
|
|||||||
*/
|
*/
|
||||||
public class ClassChange extends AbstractEffect
|
public class ClassChange extends AbstractEffect
|
||||||
{
|
{
|
||||||
private final int _index;
|
|
||||||
private static final int IDENTITY_CRISIS_SKILL_ID = 1570;
|
private static final int IDENTITY_CRISIS_SKILL_ID = 1570;
|
||||||
|
|
||||||
|
private final int _index;
|
||||||
|
|
||||||
public ClassChange(StatSet params)
|
public ClassChange(StatSet params)
|
||||||
{
|
{
|
||||||
_index = params.getInt("index", 0);
|
_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.CtrlEvent;
|
||||||
import org.l2jmobius.gameserver.ai.CtrlIntention;
|
import org.l2jmobius.gameserver.ai.CtrlIntention;
|
||||||
import org.l2jmobius.gameserver.ai.NextAction;
|
import org.l2jmobius.gameserver.ai.NextAction;
|
||||||
import org.l2jmobius.gameserver.data.xml.CategoryData;
|
|
||||||
import org.l2jmobius.gameserver.data.xml.VariationData;
|
import org.l2jmobius.gameserver.data.xml.VariationData;
|
||||||
import org.l2jmobius.gameserver.enums.CategoryType;
|
|
||||||
import org.l2jmobius.gameserver.enums.ItemSkillType;
|
import org.l2jmobius.gameserver.enums.ItemSkillType;
|
||||||
import org.l2jmobius.gameserver.enums.PrivateStoreType;
|
import org.l2jmobius.gameserver.enums.PrivateStoreType;
|
||||||
import org.l2jmobius.gameserver.enums.Race;
|
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.ItemTemplate;
|
||||||
import org.l2jmobius.gameserver.model.item.instance.Item;
|
import org.l2jmobius.gameserver.model.item.instance.Item;
|
||||||
import org.l2jmobius.gameserver.model.item.type.ActionType;
|
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.item.type.WeaponType;
|
||||||
import org.l2jmobius.gameserver.model.zone.ZoneId;
|
import org.l2jmobius.gameserver.model.zone.ZoneId;
|
||||||
import org.l2jmobius.gameserver.network.GameClient;
|
import org.l2jmobius.gameserver.network.GameClient;
|
||||||
@@ -211,13 +208,6 @@ public class UseItem implements IClientIncomingPacket
|
|||||||
return;
|
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.
|
// Prevent equip pistols for non Sylph players.
|
||||||
if (item.isWeapon() && (item.getWeaponItem().getItemType() == WeaponType.PISTOLS) && (player.getRace() != Race.SYLPH))
|
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.Config;
|
||||||
import org.l2jmobius.commons.network.PacketWriter;
|
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.CastleManager;
|
||||||
import org.l2jmobius.gameserver.instancemanager.CursedWeaponsManager;
|
import org.l2jmobius.gameserver.instancemanager.CursedWeaponsManager;
|
||||||
import org.l2jmobius.gameserver.instancemanager.RankManager;
|
import org.l2jmobius.gameserver.instancemanager.RankManager;
|
||||||
@@ -132,8 +134,16 @@ public class CharInfo implements IClientOutgoingPacket
|
|||||||
packet.writeC(_player.getAppearance().isFemale() ? 1 : 0); // Confirmed
|
packet.writeC(_player.getAppearance().isFemale() ? 1 : 0); // Confirmed
|
||||||
packet.writeD(_player.getBaseTemplate().getClassId().getRootClassId().getId());
|
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())
|
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
|
packet.writeD(_player.getInventory().getPaperdollItemDisplayId(slot)); // Confirmed
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -148,6 +158,13 @@ public class CharInfo implements IClientOutgoingPacket
|
|||||||
|
|
||||||
for (int slot : getPaperdollOrderVisualId())
|
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));
|
packet.writeD(_player.getInventory().getPaperdollItemVisualId(slot));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user