Jump to content
  • 0

Defining MAX_ITEMID beyond USHRT_MAX


TheKingDino

Question


  • Group:  Members
  • Topic Count:  13
  • Topics Per Day:  0.01
  • Content Count:  68
  • Reputation:   7
  • Joined:  02/21/19
  • Last Seen:  

Must we use the macro constant of USHRT_MAX or is LONG_MAX an option? Has anyone messed with this? I simply ask because a lot of new item IDs are unfortunately beyond the 61k limit. They are unnecessarily so, but I'm trying to keep them aligned with the IDs I find on Divine Pride.

 

///Maximum allowed Item ID (range: 1 ~ 65,534)
#define MAX_ITEMID USHRT_MAX

Located in map/itemdb.hpp

Edited by TheKingDino
  • Upvote 1
Link to comment
Share on other sites

10 answers to this question

Recommended Posts

  • 0

  • Group:  Developer
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  141
  • Reputation:   45
  • Joined:  08/14/12
  • Last Seen:  

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  7
  • Topics Per Day:  0.00
  • Content Count:  35
  • Reputation:   24
  • Joined:  10/17/13
  • Last Seen:  

going to find out
image.png.52700d63f38a21404942b074973c0615.png

^ no errors pogU

image.png.400f033dc309f7137678271a47be021f.png

^ it do let me create a item 310126
image.png.53e97f89d53123774fb7d68a7273fe47.png
 

i created the same script of ygg and it works but i cant make show on client tho

 

nevermore it works LMAO

image.png.0e60f8ed60cb9982aa29f7ea8a42ec6f.png

  • Upvote 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  13
  • Topics Per Day:  0.01
  • Content Count:  68
  • Reputation:   7
  • Joined:  02/21/19
  • Last Seen:  

Awesome. If this works then why are we sticking to the 61k limitation when 6 digit Item IDs have been out for quite a while now?

I'm confused.

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  7
  • Topics Per Day:  0.00
  • Content Count:  35
  • Reputation:   24
  • Joined:  10/17/13
  • Last Seen:  

i have no idea...

@Aleos ?

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  13
  • Topics Per Day:  0.01
  • Content Count:  68
  • Reputation:   7
  • Joined:  02/21/19
  • Last Seen:  

If any developers or people with more knowledge know the answer to this. It'd be very appreciated!

I've currently made this change to my personal server. It runs just fine and I'm able to add 6-digit IDs now. I will let anyone know if I run into any issues.

Edited by TheKingDino
Link to comment
Share on other sites

  • 0

  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10013
  • Reputation:   2346
  • Joined:  10/28/11
  • Last Seen:  

emulator doesnt support it or somewhere doesnt

packets doent support it

etc...

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  17
  • Topics Per Day:  0.00
  • Content Count:  81
  • Reputation:   12
  • Joined:  06/22/13
  • Last Seen:  

On 5/15/2020 at 12:50 AM, HaureN said:

nevermore it works LMAO

image.png.0e60f8ed60cb9982aa29f7ea8a42ec6f.png

How did you made it work? Mine's unknown item.

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  7
  • Topics Per Day:  0.00
  • Content Count:  35
  • Reputation:   24
  • Joined:  10/17/13
  • Last Seen:  

thats not a real thing, i mean its not a unknown item but its a "placeholder" in other words once it get the packet cap it start over, in the end of the day its not working yet

you are the best @nitrous

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  13
  • Topics Per Day:  0.01
  • Content Count:  68
  • Reputation:   7
  • Joined:  02/21/19
  • Last Seen:  

On 5/17/2020 at 4:25 AM, Emistry said:

emulator doesnt support it or somewhere doesnt

packets doent support it

etc...

Really? It's worked fine for me. Did you even test it before saying this?

And even if this is the case what is going to be our answer to the continuous introduction of new items that use item IDs far beyond 65k.

Link to comment
Share on other sites

  • 0

  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10013
  • Reputation:   2346
  • Joined:  10/28/11
  • Last Seen:  

2 hours ago, TheKingDino said:

Really? It's worked fine for me. Did you even test it before saying this?

Read the date? reply are made on May .. and the PR came out after that?

You're probably hoping that editing that one line would help you solve your issue, but the truth is more work are required to implement the support for above 65k IDs.

and what is the answer? Nitrous already posted that. Implement the PR and help test for the result.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...