-
Notifications
You must be signed in to change notification settings - Fork 772
Storage item list packet size fix and minor clif.c fixes #2424
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
src/map/clif.c
Outdated
| int i = 0; | ||
| struct item_data *id; | ||
|
|
||
| #define STORAGE_ITEMS_MAX_ITERATION 500 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
probably better on the fly calculate max possible items per packet for current packet version?
and move this define to one of headers?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That would be better to calculate for each packer version indeed, the reason i did not put the define in header is because i want to keep the scope of the define for this function only.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will rewrite the function to be more flexible.
|
@4144 Please check the new code, i have not tested it yet, but i will test it and rebase the branch tomorrow after my work shift ~ |
4144
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you also fix storage names?
Current code strip last byte from name
need use name len: NAME_LENGTH + 1
Is not NAME_LENGTH = (23 + 1), it should be enough to use it? no? or the client doesn't require null-terminator anymore? |
|
ah sorry, issue was in ZC_INVENTORY_START, but i thinked in clif_storageItems |
|
i will fix ZC_INVENTORY_START by self |
|
Okay splendid! |
- The maximum packetsize is now decided during compile time depending on client version which fixes an issue started with clients supporting int32 as itemid where packet size would underflow - The function now have a single loop that is easier to read and understand Signed-off-by: Ibrahim Zidan <[email protected]>
zero/negatvie length values Signed-off-by: Ibrahim Zidan <[email protected]>
2fcb173 to
5c0cdbb
Compare
|
@4144 Fixed some minor issues and rebased, please check he new code. |
Signed-off-by: Ibrahim Zidan <[email protected]>
5c0cdbb to
112b19d
Compare
Pull Request Prelude
Changes Proposed
Issues addressed:
None