Whats going on everyone, I've been working on a v.28 odin source for pure nostalgia.
I have gotten login pretty much done.
I can enter the game, and getCharInfo seems to work correctly.
I spawn, but the game crashes. I figure its something to do with addCharLook or Buffstats.
What I'm asking pretty much is how do i go about updating this.
I have ida, I've looked at the structure and figured that the userPoolEnterField is
.
So here is the packet:
when I remove this if statement.
and have it as just,
I can get ingame and spawn, but it throws an error which points to the statement saying
that PlayerLoggedInHandler is null.
I have tried messing with this packet for about a week with no progress.
Can someone give me any sort of insight on reading the structure with the v28 idb cause
I'm stumped but determined, thanks ~!
I have gotten login pretty much done.
I can enter the game, and getCharInfo seems to work correctly.
I spawn, but the game crashes. I figure its something to do with addCharLook or Buffstats.
What I'm asking pretty much is how do i go about updating this.
I have ida, I've looked at the structure and figured that the userPoolEnterField is
Code:
0x50
So here is the packet:
Code:
public static MaplePacket spawnPlayerMapobject(MapleCharacter chr) {
MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
mplew.write(0x50);
mplew.writeInt(chr.getId());
mplew.writeMapleAsciiString(chr.getName());
int buffmask = 0;
Integer buffvalue = null;
if (chr.getBuffedValue(MapleBuffStat.DARKSIGHT) != null && !chr.isHidden()) {
buffmask |= MapleBuffStat.DARKSIGHT.getValue();
}
if (chr.getBuffedValue(MapleBuffStat.COMBO) != null) {
buffmask |= MapleBuffStat.COMBO.getValue();
buffvalue = Integer.valueOf(chr.getBuffedValue(MapleBuffStat.COMBO).intValue());
}
if (chr.getBuffedValue(MapleBuffStat.SHADOWPARTNER) != null) {
buffmask |= MapleBuffStat.SHADOWPARTNER.getValue();
}
if (buffvalue != null) {
mplew.write(buffvalue.byteValue());
}
addCharLook(mplew, chr, true);
mplew.writeInt(0); // [10/28/2014 8:25:40 PM] Justin: IncMaxMemberNumCost
mplew.writeInt(chr.getItemEffect()); // TODO: Fix Chocolate Hearts (This is Cash Effect not Hearts)
mplew.writeInt(chr.getChair());
mplew.writeShort(chr.getPosition().x);
mplew.writeShort(chr.getPosition().y);
mplew.write(chr.getStance());
mplew.writeShort(0); // FH
// Pets
if (chr.getPet(0) != null) {
mplew.write(1);
MaplePet pet = chr.getPet(0);
mplew.writeInt(pet.getItemId());
mplew.writeMapleAsciiString(pet.getName());
mplew.writeLong(pet.getUniqueId());
mplew.writeShort(pet.getPos().x);
mplew.writeShort(pet.getPos().y);
mplew.write(pet.getStance());
mplew.writeShort(pet.getFh());
} else {
mplew.write(0);
}
// Mini Game & Interaction Boxes
if (chr.getPlayerShop() != null && chr.getPlayerShop().isOwner(chr)) {
addShopBox(mplew, chr.getPlayerShop());
} else if ((MapleMiniGame) chr.getInteraction() != null) {
addAnnounceBox(mplew, chr.getInteraction());
} else {
mplew.write(0);
}
// Rings
List<MapleRing> rings = getRing(chr);
mplew.write(rings.size());
for (MapleRing ring : rings) {
mplew.writeInt(ring.getRingId());
mplew.writeInt(0);
mplew.writeInt(ring.getPartnerRingId());
mplew.writeInt(0);
mplew.writeInt(ring.getItemId());
}
return mplew.getPacket();
}
when I remove this if statement.
Code:
if (buffvalue != null) {
mplew.write(buffvalue.byteValue());
}
Code:
mplew.write(buffvalue.byteValue());
that PlayerLoggedInHandler is null.
I have tried messing with this packet for about a week with no progress.
Can someone give me any sort of insight on reading the structure with the v28 idb cause
I'm stumped but determined, thanks ~!