Quote:
Originally Posted by InfamousNoone
I edited my inital post a bit, StepPacket(sizeof(WORD) * 2) just steps over the size/type of the packet think of whats going on in the sense of reading from a stream.
|
Correct me if I am wrong, 'cause I am not sure what ReadPacket() returns nor am I too familiar with C++.
But what that block of code basically does is read the NPC packet, and get the NPC ID, X, Y, and Interaction(not sure what that is =p) from the packet. Then if it can take the bytes of the packet, then it takes each char of the packet and puts it into the array of szName. If ReadPacket() returns false, it will read npc.ini for the name using the NPC ID retrieved from the packet. And if none is found, it returns "NPC_ERROR". If the name is found, it is put into szName.