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

Adding an extra string argument to match what is expected by the formatted string #175

Merged
merged 3 commits into from Jan 8, 2023

Conversation

srmeier
Copy link
Contributor

@srmeier srmeier commented Jan 7, 2023

Your checklist for this pull request

🚨Please review the guidelines for contributing to this repository.

  • Make sure you are requesting to pull a topic/feature/bugfix branch (right side). Don't request your master!
  • Make sure you are making a pull request against the canary branch (left side). Also you should start your branch off our canary.
  • Check the commit's or even all commits' message styles matches our requested structure.
  • Check your code additions will fail neither code linting checks nor unit test.

Description

Adding an extra string argument to match what is expected by the formatted string. I am not sure what should go here so added an empty string for now. I came across this issue when hovering over items in a chest dropped by a monster.

issue-2

💔Thank you!

Copy link
Member

@stevewgr stevewgr left a comment

Choose a reason for hiding this comment

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

Good catch and thanks for the PR!
However, note that there are multiple instances of this if you check Texts.tbl:
image

Also see my comment below.

src/game/UIImageTooltipDlg.cpp Show resolved Hide resolved
@srmeier srmeier requested a review from stevewgr January 8, 2023 02:20
Copy link
Member

@stevewgr stevewgr left a comment

Choose a reason for hiding this comment

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

As per my comment here: #175 (comment)

This PR LGTM. Thank you!

@stevewgr stevewgr merged commit 6f9023d into ko4life-net:master Jan 8, 2023
@srmeier srmeier deleted the adjust-dex-req-txt branch January 8, 2023 02:46
@UTengine
Copy link
Contributor

This is bad.....
Literally everytime you guys are allowed to break the game and when I add code that behaves different but gets the job done it's denied. This is not progress but its decline I'm sorry to tell you.
It's only adding an empty string now to not trigger a game crash.
It's still doing value + + and then checking if value is ... but at that point this is only done to check if the tooltip text should be red or white. Before the adding empty string like one line above it check directly if the itemext has a negative value :
v126 = spItem->pItemExt;
if it does use a boolean marker maybe? to add the string (reduced) to the %s.
Note the value + + is only to check there if we have enough dex/hp/str/int to equip the item! to color it red or white!
Also before any of these check if item is unique or upgradeable.
if ( v127 == 4 || v127 == 5 ) 5
ITEM_ATTRIB_UNIQUE = 4,
ITEM_ATTRIB_UPGRADE = 5,
At this rate it will be a clstrPEEP because it applies to scrolls and everything else if we copy pasta this to every field.
#define IDS_TOOLTIP_NEEDRANK 4542 needs to be 4545 and expects a %s
sprintf(szBuff, szStr.c_str(), spItem->pItemBasic->byNeedRank + spItem->pItemExt->siNeedRank);

thats two ints without std::to_string() conversion.
Or you switch between reading the TBL or a predefined source as an alternate suggestion, to only read from the tbl texts if it has negative so then it always expects an extra field anyway. It's getting a bit offtopic now for me and confusing to me, but I still stand correct on solving basic stuff teleporting selling npc looting database everything because everything will stay untested like this. Use your reversing skills for bigger stuff, leave the strings xD

@UTengine
Copy link
Contributor

UTengine commented Sep 29, 2023

ps: i screwed up on the IDS resource # I'm exhausted having to crosscheck 10 different source builds but either way we are still supplying ints to strings or vica versa.
also the caret position is PLEEP annoying me because it actually makes it so that when you enter the game the chat edit field is already activated and u cant press asd imagine someone loading into cz getting 1 hit spike cuz he has PLEEP slow pc.
There's so much to learn even from 10xx client look at the flick of orcs wrist he don't even need to yell anymore there's coil whine 🗡️ Leave it running for 8 hours because you forgot to close it activate it's window and it's still running.
Also since the windowmode skill icons are cut out on the top right, but nobody knows because nobody can cast skills see where I'm going with my rant? Also if you move just outside of the window border it will still capture camera movement >.>
image
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants