- Joined
- Apr 25, 2010
- Messages
- 479
- Reaction score
- 49
GabrielSin your packet is so off (like most sources) so if you're asking for the last byte in your SpawnPlayer it is in your rings.
The current structure (of v83 at least) is like so:
PHP:CUser.EncodeCoupleInfo(mplew, pUser); CUser.EncodeFriendshipInfo(mplew, pUser); CUser.EncodeMarriageInfo(mplew, pUser); CUser.EncodeNewYearCardInfo(mplew, pUser); int mask = 0; if (pUser.getCharacterData().characterStat.nJob >= 2200) { mask |= 0x2; } else if (pUser.getCharacterData().characterStat.nJob == 132) { mask |= 0x1; }/* else {//v95 mask |= 0x4; }*/ mplew.write(mask);// nBerserk and GetDragon masks mplew.write(pUser.getTeam());
So, replace:
Code:} else { mplew.writeInt(0); }
with:
Code:} else { mplew.writeShort(0); } mplew.write(0); mplew.write(chr.getTeam());
and that should be the proper bytes.
Code:
Collections.sort(rings);
if (rings.size() > 0) {
mplew.write(0);
for (MapleRing ring : rings) {
if (ring != null) {
mplew.write(1);
mplew.writeInt(ring.getRingId());
mplew.writeInt(0);
mplew.writeInt(ring.getPartnerRingId());
mplew.writeInt(0);
mplew.writeInt(ring.getItemId());
}
}
mplew.writeShort(0);
} else {
mplew.writeShort(0);
}
mplew.write(0);
mplew.write(chr.getTeam());
return mplew.getPacket();
}