Skip to content
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

Support itemids up to ~2 billion #5141

Merged
merged 32 commits into from Aug 8, 2020
Merged

Conversation

vstumpf
Copy link
Member

@vstumpf vstumpf commented Jun 24, 2020

  • Addressed Issue(s):

If anyone knows the issue number, pls comment

  • Server Mode:

Both

  • Description of Pull Request:

I've been working on this for a year and a half pls no hate
item ids are now uint32

ty @aleos89 for helping

@vstumpf vstumpf changed the title Support itemids up to ~2 million Support itemids up to ~2 billion Jun 24, 2020
@lgtm-com
Copy link

@lgtm-com lgtm-com bot commented Jun 24, 2020

This pull request introduces 2 alerts when merging d98d205b5e946fa825727019e9e8755de391b8f6 into d35e289 - view on LGTM.com

new alerts:

  • 2 for Comparison result is always the same

@sader1992
Copy link
Contributor

@sader1992 sader1992 commented Jun 24, 2020

I think with this the max storage etc is now 682 ? (struct size with 682 65509)

@Badarosk0
Copy link

@Badarosk0 Badarosk0 commented Jun 25, 2020

With this PR will it be possible to create items with larger IDs? for example:

100052,Enchant_Stone_Box19,Costume Enchantment Stone Box 19,2,10,,10,,,,0,0xFFFFFFFF,63,2,,,1,,,{ getgroupitem(IG_Enchant_Stone_Box19); },{},{}

I applied and the items cannot be created.

Another problem I noticed is that the HP and SP in the char is now 1/1.

@ecdarreola
Copy link

@ecdarreola ecdarreola commented Jun 25, 2020

n the char is now 1/1.

Unable to reproduce for the high ITEM ID not tradeable. (See below)
image

image
As for the HP, its also working fine.
image

@vstumpf
Copy link
Member Author

@vstumpf vstumpf commented Jun 25, 2020

Sorry, I should have said that this is only for clients that support it (ones that support 32bit item ids)
That means these clients:
PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114

@Badarosk0
Copy link

@Badarosk0 Badarosk0 commented Jun 25, 2020

Weird. I just downloaded the clean rAthena and applied it. I also applied the 2 sql upgrade files. I'm using 2020-04-01.

src/map/script.cpp Show resolved Hide resolved
@lgtm-com
Copy link

@lgtm-com lgtm-com bot commented Jun 25, 2020

This pull request introduces 2 alerts when merging 1f0fc488e45a0e63c999fcfac20f91f911205a10 into c14f05b - view on LGTM.com

new alerts:

  • 2 for Comparison result is always the same

@Badarosk0
Copy link

@Badarosk0 Badarosk0 commented Jun 25, 2020

There are 2 warnings after compilation:

Warning C4244 '=': conversion from 'unsigned long' to 'short', possible loss of data char-server trunk\src\char\int_auction.cpp line 250

Warning C4146 unary minus operator applied to unsigned type, result still unsigned map-server trunk\src\map\script.cpp line 7901

@qwerty7vp
Copy link
Contributor

@qwerty7vp qwerty7vp commented Jun 25, 2020

Unable to reproduce for the high ITEM ID not tradeable. (See below)
As for the HP, its also working fine.

confirmed that I can trade
and HP SP worked fine

@Badarosk0
Copy link

@Badarosk0 Badarosk0 commented Jun 25, 2020

It worked now, for some reason the rA is like PRERE as a default now and I didn't notice.
It's working now.

src/config/renewal.hpp Outdated Show resolved Hide resolved
Copy link

@ecdarreola ecdarreola left a comment

Also, under script.cpp (makeitem)

The line
image

causes a warning below.:

image

}

for (i = 0; i < MAX_ITEM_RDM_OPT; i++) {
Sql_GetData(sql_handle, 15 + MAX_SLOTS + i*3, &data, NULL);
item->option[i].id = atoi(data);
item->option[i].id = strtoul(data, NULL, 10);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This causes a warning upon compiling. (possible loss of data)

image

Copy link
Member Author

@vstumpf vstumpf Jun 25, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting, this shouldn't have been changed, since random option IDs haven't changed.
I'll fix

@Badarosk0
Copy link

@Badarosk0 Badarosk0 commented Jun 25, 2020

Also, under script.cpp (makeitem)

The line
image

causes a warning below.:

image

i can confirm this.

@lgtm-com
Copy link

@lgtm-com lgtm-com bot commented Jun 25, 2020

This pull request fixes 1 alert when merging 0c93af0f57f38ec4f1225a3a451e5a5e7deb5d11 into 9e79d59 - view on LGTM.com

fixed alerts:

  • 1 for Comparison result is always the same

@@ -7942,7 +7940,7 @@ BUILDIN_FUNC(makeitem2) {
nameid = UNKNOWN_ITEM_ID;
}
else
nameid = script_getnum(st, 2);
nameid = script_getnum64(st, 2);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

possible loss of data from int64 to uint32.

Copy link
Member Author

@vstumpf vstumpf Jun 26, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤦 dont know why i changed this

Copy link
Contributor

@aleos89 aleos89 left a comment

Another note: all the script commands will have to be adjusted to something like nameid = static_cast<uint32>(script_getnum64(st, X)); since script_getnum is int.

@@ -6,6 +6,7 @@

#include "../common/cbasetypes.hpp" // uint16, uint32
#include "../common/timer.hpp" // ShowWarning, ShowStatus
#include "../common/mmo.hpp"
Copy link
Contributor

@aleos89 aleos89 Jun 25, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't needed anymore.

src/map/log.hpp Show resolved Hide resolved
@vstumpf
Copy link
Member Author

@vstumpf vstumpf commented Jul 19, 2020

Sorry about that @Badarosk0, I must have merged something incorrectly. It should be fixed now!

@lgtm-com
Copy link

@lgtm-com lgtm-com bot commented Jul 19, 2020

This pull request fixes 1 alert when merging f8227e3 into 9000948 - view on LGTM.com

fixed alerts:

  • 1 for Comparison result is always the same

@Forte22
Copy link

@Forte22 Forte22 commented Jul 20, 2020

Do you have a rough idea how much longer this PR could take to get pushed to master?

@Badarosk0
Copy link

@Badarosk0 Badarosk0 commented Jul 20, 2020

Do you have a rough idea how much longer this PR could take to get pushed to master?

I believe that the more people who test and submit problems here, the faster it will be.

@hsiaonaiwen
Copy link

@hsiaonaiwen hsiaonaiwen commented Aug 4, 2020

Is using a taming item capturing pet working fine?

@Badarosk0
Copy link

@Badarosk0 Badarosk0 commented Aug 4, 2020

Is using a taming item capturing pet working fine?

work fine for me

@lgtm-com
Copy link

@lgtm-com lgtm-com bot commented Aug 7, 2020

This pull request fixes 1 alert when merging 386f8ef into 53e7f59 - view on LGTM.com

fixed alerts:

  • 1 for Comparison result is always the same

@lgtm-com
Copy link

@lgtm-com lgtm-com bot commented Aug 7, 2020

This pull request fixes 1 alert when merging 1646094 into 53e7f59 - view on LGTM.com

fixed alerts:

  • 1 for Comparison result is always the same

Copy link
Contributor

@aleos89 aleos89 left a comment

Looking great! Just a couple things I spotted after a run-through.

src/map/script.cpp Outdated Show resolved Hide resolved
src/map/skill.cpp Outdated Show resolved Hide resolved
aleos89
aleos89 approved these changes Aug 7, 2020
src/map/script.cpp Outdated Show resolved Hide resolved
@lgtm-com
Copy link

@lgtm-com lgtm-com bot commented Aug 7, 2020

This pull request fixes 1 alert when merging a404cda into c86a5a4 - view on LGTM.com

fixed alerts:

  • 1 for Comparison result is always the same

Should give better performance during migration
Added missing newline at end of file
Should match the naming schema
@lgtm-com
Copy link

@lgtm-com lgtm-com bot commented Aug 8, 2020

This pull request fixes 1 alert when merging 3078847 into fd148a6 - view on LGTM.com

fixed alerts:

  • 1 for Comparison result is always the same

@Lemongrass3110 Lemongrass3110 merged commit 3776bfb into rathena:master Aug 8, 2020
4 checks passed
SeravySensei added a commit to SeravySensei/rathena that referenced this issue Aug 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.