Decompile 2 functions in Source/Client/Mode/GameMode.cpp, Source/Client/Mode/GameModeHandlers.cpp, ...

Batch #17805 by eAthena: 0 byte-identical, 2 confirmed by peer review.

- fn_21414 CGameMode::GetActiveSkillEffectTimeText: logic confirmed by peer review
- fn_17182 IntToSignedString: logic confirmed by peer review

Peer-reviewed-by: Yommy, alisonrag, cremane
Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes).
This commit is contained in:
ragnarok-clanker 2026-11-12 03:52:07 +00:00
commit 85c0acbfb9
2 changed files with 5 additions and 3 deletions

View file

@ -619,9 +619,10 @@ std::string CGameMode::GetActiveSkillEffectTimeText(int skillId, int* activeSkil
output = buffer;
}
int secondsPerMinute = 60;
const int remainder = remainingSeconds - hours * 3600;
const int minutes = remainder / 60;
const int seconds = remainder % 60;
const int minutes = remainder / secondsPerMinute;
const int seconds = remainder % secondsPerMinute;
if (minutes != 0) {
std::sprintf(buffer, " %d %s", minutes, LookupMessage(MSI_MINUTE));
output = output + buffer;

View file

@ -117,7 +117,8 @@ std::string IntToSignedString(int value, bool grouped, bool showPlus) {
std::string text;
const bool negative = value < 0;
for (std::size_t i = 0; i < digits.size(); ++i) {
if ((digits.size() - i) % 3 == 0) {
std::size_t remaining = digits.size() - i;
if (remaining % 3 == 0) {
text += std::string(",");
}
text += digits.at(i);