@Override
public boolean read(L2GameClient client, PacketReader packet)
{
int _id = packet.readD();
String _name = packet.readS();
String _desc = packet.readS();
String _acronym = packet.readS();
int icon = packet.readC();
int count = packet.readC();
if (count > MAX_MACRO_LENGTH)
{
count = MAX_MACRO_LENGTH;
}
final List<MacroCmd> commands = new ArrayList<>(count);
for (int i = 0; i < count; i++)
{
int entry = packet.readC();
int type = packet.readC(); // 1 = skill, 3 = action, 4 = shortcut
int d1 = packet.readD(); // skill or page number for shortcuts
int d2 = packet.readC();
String command = packet.readS();
_commandsLenght += command.length();
commands.add(new MacroCmd(entry, MacroType.values()[(type < 1) || (type > 6) ? 0 : type], d1, d2, command));
}
_macro = new Macro(_id, icon, _name, _desc, _acronym, commands);
return true;
}