@Override public boolean decode(final byte[] rawDatas) { final ByteBuffer bb = ByteBuffer.wrap(rawDatas); this.m_eventId = bb.getLong(); this.m_invitedId = bb.getLong(); final byte[] tInvitedName = new byte[bb.get()]; bb.get(tInvitedName); this.m_invitedName = StringUtils.fromUTF8(tInvitedName); this.m_result = bb.get(); return true; }
public final void unserialise(final byte[] data) { final ByteBuffer bb = ByteBuffer.wrap(data); this.m_id = bb.getInt(); this.m_isChallengeGoal = (bb.get() == 1); try { final byte[] targetPosition = new byte[bb.getInt()]; bb.get(targetPosition); this.m_targetPosition = new String(targetPosition, "UTF-8").intern(); this.m_isCountDownJauge = (bb.get() == 1); this.m_jaugeMaxValue = bb.getInt(); final byte[] jaugeVarName = new byte[bb.getInt()]; bb.get(jaugeVarName); this.m_jaugeVarName = new String(jaugeVarName, "UTF-8").intern(); } catch (UnsupportedEncodingException e) { ScenarioBinaryStorable.m_logger.error((Object) "Exception", (Throwable) e); } }
public final void unserialise(final byte[] data) { final ByteBuffer bb = ByteBuffer.wrap(data); this.m_id = bb.getInt(); this.m_order = bb.get(); this.m_gfx = bb.getInt(); final byte[] cdata = new byte[bb.getInt()]; bb.get(cdata); try { this.m_criterion = new String(cdata, "UTF-8").intern(); } catch (UnsupportedEncodingException e) { ScenarioBinaryStorable.m_logger.error((Object) "Exception", (Throwable) e); } this.m_success = (bb.get() == 1); this.m_itemId = bb.getInt(); this.m_itemQty = bb.getShort(); this.m_xp = bb.getInt(); this.m_kama = bb.getInt(); this.m_guildPoints = bb.getInt(); }