ko4life-net / ko

Open source development of the game Knight Online. This is a reversed engineered old version of the game aiming to replicate the nostalgic experience we all once had <3
MIT License
52 stars 21 forks source link

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

Closed srmeier closed 1 year ago

srmeier commented 1 year ago

Your checklist for this pull request

🚨Please review the guidelines for contributing to this repository.

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!

UTengine commented 11 months ago

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 commented 11 months ago

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