/** * For copyright information see the LICENSE document. */ /** * Auto-generated by PacketCodeGen, on 2012-09-28 */ package com.gamerevision.gwlpr.actions.gameserver.stoc; import com.realityshard.shardlet.utils.GenericAction; import java.nio.BufferOverflowException; import java.nio.ByteBuffer; import java.nio.ByteOrder; /** * This is an automatically generated ShardletAction. * It resembles the packet template that has been * parsed from our packet templates xml. * * This is used to add a hero to the pull down menu in * the party window. * * @author GWLPR Template Updater */ public final class P103_HeroUpdateAction extends GenericAction { private short heroID; private byte level; private byte primaryProf; private byte secondaryProf; private int nPCFile; private int modelFile; private byte data7; private byte isDisabled; public short getHeader() { return 103; } public void setHeroID(short newValue) { heroID = newValue; } public void setLevel(byte newValue) { level = newValue; } public void setPrimaryProf(byte newValue) { primaryProf = newValue; } public void setSecondaryProf(byte newValue) { secondaryProf = newValue; } public void setNPCFile(int newValue) { nPCFile = newValue; } public void setModelFile(int newValue) { modelFile = newValue; } public void setData7(byte newValue) { data7 = newValue; } public void setisDisabled(byte newValue) { isDisabled = newValue; } private int getSize() { return 17; } @Override public boolean serialize() { int size = getSize(); if (size == 0) { return false; } ByteBuffer buffer = ByteBuffer.allocate(size).order(ByteOrder.LITTLE_ENDIAN); try { buffer.putShort(getHeader()); buffer.putShort(heroID); buffer.put(level); buffer.put(primaryProf); buffer.put(secondaryProf); buffer.putInt(nPCFile); buffer.putInt(modelFile); buffer.put(data7); buffer.put(isDisabled); } catch (BufferOverflowException e) { return false; } setBuffer(buffer); return true; } }