white 1 Posted June 11 Share Posted June 11 Hello metin2devs, as you probably already know weapons/armors etc. retrieved by the Client have a limitation on the vnum (up to 65.535). So I thought about posting my solution to this maybe someone will need it.. Server Side service.h //Add #define __VNUM_EXTEND__ char.h //Search for -> WORD parts[PART_MAX_NUM]; //Replace with: #ifdef __VNUM_EXTEND__ DWORD parts[PART_MAX_NUM]; #else WORD parts[PART_MAX_NUM]; #endif //Search for -> void SetPart(BYTE bPartPos, WORD wVal); //Replace with: #ifdef __VNUM_EXTEND__ void SetPart(BYTE bPartPos, DWORD wVal); #else void SetPart(BYTE bPartPos, WORD wVal); #endif //Search for -> WORD GetPart(BYTE bPartPos) const; //Replace with: #ifdef __VNUM_EXTEND__ DWORD GetPart(BYTE bPartPos) const; #else WORD GetPart(BYTE bPartPos) const; #endif //Search for -> WORD GetOriginalPart(BYTE bPartPos) const; //Replace with: #ifdef __VNUM_EXTEND__ DWORD GetOriginalPart(BYTE bPartPos) const; #else WORD GetOriginalPart(BYTE bPartPos) const; #endif char.cpp //Search for: void CHARACTER::SetPart(BYTE bPartPos, WORD wVal) { assert(bPartPos < PART_MAX_NUM); m_pointsInstant.parts[bPartPos] = wVal; } //Replace with: #ifdef __VNUM_EXTEND__ void CHARACTER::SetPart(BYTE bPartPos, DWORD wVal) { assert(bPartPos < PART_MAX_NUM); m_pointsInstant.parts[bPartPos] = wVal; } #else void CHARACTER::SetPart(BYTE bPartPos, WORD wVal) { assert(bPartPos < PART_MAX_NUM); m_pointsInstant.parts[bPartPos] = wVal; } #endif //Search for: WORD CHARACTER::GetPart(BYTE bPartPos) const { assert(bPartPos < PART_MAX_NUM); return m_pointsInstant.parts[bPartPos]; } //Replace with: DWORD CHARACTER::GetPart(BYTE bPartPos) const { assert(bPartPos < PART_MAX_NUM); return m_pointsInstant.parts[bPartPos]; } #else WORD CHARACTER::GetPart(BYTE bPartPos) const { assert(bPartPos < PART_MAX_NUM); return m_pointsInstant.parts[bPartPos]; } #endif //Search for: WORD CHARACTER::GetOriginalPart(BYTE bPartPos) const { switch (bPartPos) { case PART_MAIN: if (!IsPC()) return GetPart(PART_MAIN); else return m_pointsInstant.bBasePart; case PART_HAIR: return GetPart(PART_HAIR); default: return 0; } } //Replace with: #ifdef __VNUM_EXTEND__ DWORD CHARACTER::GetOriginalPart(BYTE bPartPos) const { switch (bPartPos) { case PART_MAIN: if (!IsPC()) // Return the current part as it is if it is not a PC return GetPart(PART_MAIN); else return m_pointsInstant.bBasePart; case PART_HAIR: return GetPart(PART_HAIR); default: return 0; } } #else WORD CHARACTER::GetOriginalPart(BYTE bPartPos) const { switch (bPartPos) { case PART_MAIN: if (!IsPC()) return GetPart(PART_MAIN); else return m_pointsInstant.bBasePart; case PART_HAIR: return GetPart(PART_HAIR); default: return 0; } } #endif packet.h //Search for -> WORD awPart[CHR_EQUIPPART_NUM]; //Replace with: #ifdef __VNUM_EXTEND__ DWORD awPart[CHR_EQUIPPART_NUM]; #else WORD awPart[CHR_EQUIPPART_NUM]; #endif Client Side Locale_inc.h //Add #define __VNUM_EXTEND__ packet.h //Search for -> WORD awPart[CHR_EQUIPPART_NUM]; //Replace with: #ifdef __VNUM_EXTEND__ DWORD awPart[CHR_EQUIPPART_NUM]; #else WORD awPart[CHR_EQUIPPART_NUM]; #endif Link to comment Share on other sites More sharing options...
white 1 Posted June 12 Author Share Posted June 12 I forgot to add in packet.h (Client/Server Side): Spoiler //Find TPacketGCCharacterAdditionalInfo; //Replace this -> WORD awPart[CHR_EQUIPPART_NUM]; //With this: DWORD awPart[CHR_EQUIPPART_NUM]; Link to comment Share on other sites More sharing options...
Recommended Posts