struct PACKET_ZC_ADD_QUEST {
short PacketType;
struct QUEST_MISSION_RECORD {
unsigned long questID;
unsigned char show; // Optimizing Compiler sometimes makes this 4 byte long. So be WARNED! (current state, 1 byte)
time_t startTime; // Mission start time. Not really used, parser just read it.
time_t time;
short mobCount; // Max 3. used only LOBYTE. Donno why. Bug???
struct MISSION_MOB_RECORD {
usnigned long mobID;
short mobHunt;
char mobName[24];
} mission_mobs[3]; // Max only 3
} mission_data;
}
struct PACKET_ZC_ALL_QUEST_MISSION {
short PacketType;
short PacketLength;
int questMissionNum;
struct QUEST_MISSION_RECORD {
unsigned long questID;
unsigned char show;
time_t time;
short mobCount; // Max 3
struct MISSION_MOB_RECORD {
usnigned long mobID;
short mobHunt;
char mobName[24];
} mission_mobs[3]; // Max only 3
} mission_data[questMissionNum]; // Actually, Client read this data one by one, unless PacketLength end.
}
mmm... can't fit what i dump (iRO::Valkyrie) to this struct:
seems like <QUEST_MISSION_RECORD::show> comes as 4-bytes, while counter name does not seem to be as little as 24 bytes.
different protocol implementations?
Last edited by obsc on 11 Sep 2009, 09:43, edited 2 times in total.
short PacketType; int Type; <-- Here
short PacketLength;
i failed understanding what you pointed at (to be more precise: where did these 3 lines - especially red middle one - come from), but it's not like my understanding decides anything )
as long as it would work the same way or better - i'm ok with not understanding something )
struct PACKET_ZC_UPDATE_MISSION_HUNT {
short PacketType;
short PacketLen;
short updateMissionNum;
struct UPDATE_MISSION_RECORD {
unsigned long questID;
usnigned long mobID;
short mobHunt;
} update_missions[updateMissionNum]; // Actually, Client determinate this value by PacketLength
};
You see the "show: 00 00 00 00" ??? that's Because sometimes MS VC++ optimizer, optimize in memory structures for effective use. that's why, some "char"s can get extra 3 bytes.