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

"Reduced" item stat check and hover over details needs to be implemented #177

Open
srmeier opened this issue Jan 8, 2023 · 1 comment
Open
Labels
official_feature Feature that exists in the official game that needs implementing

Comments

@srmeier
Copy link
Contributor

srmeier commented Jan 8, 2023

Description

Currently the reduce amounts for KO items is not implemented. For the moment we are filling these reduce quantities with empty strings when the player hovers over an item (see PR #175).

Screenshots

image

Files

  • UIImageTooltipDlg.cpp

Tasks

We need to recreate the check they have here:

      ::_LoadStringFromResource(4538, &szStr);  // Required Dexterity : %d %s
      if ( CUIImageTooltipDlg::SetTooltipTextColor(
             v111[26],
             (unsigned __int8)spItem->pItemBasic->byNeedDexterity + spItem->pItemExt->siNeedDexterity) )
      {
        CN3UIString::SetColor((_DWORD *)this->m_pStr[iIndex], this->m_CWhite);
      }
      else
      {
        CN3UIString::SetColor((_DWORD *)this->m_pStr[iIndex], this->m_CRed);
      }
      v126 = spItem->pItemExt;
      v127 = v126->byMagicOrRare;
      if ( v127 == 4 || v127 == 5 )
      {
        if ( v126->siNeedStrength < 0
          || v126->siNeedStamina < 0
          || v126->siNeedDexterity < 0
          || SLOWORD(v126->siNeedInteli) < 0
          || v126->siNeedInteli < 0 )
        {
          std::string::ctor(v271, &v264);
          LOBYTE(v281) = 13;
          ::_LoadStringFromResource(4554, v271);// (Reduce)
          szReduce = exception::what((exception *)v271);
          iRequiredDex_1 = (unsigned __int8)spItem->pItemBasic->byNeedDexterity + spItem->pItemExt->siNeedDexterity;
          szFmtStr = exception::what((exception *)&szStr);
          sprintf(szBuff, szFmtStr, iRequiredDex_1, szReduce);
          LOBYTE(v281) = 1;
          v129 = v271;
        }
        else
        {
          str::string::equalOperator(v270, &EmptyString, &v264);
          LOBYTE(v281) = 14;
          szEmptyStr = exception::what((exception *)v270);
          iRequiredDex = (unsigned __int8)spItem->pItemBasic->byNeedDexterity + spItem->pItemExt->siNeedDexterity;
          szFmtStr_1 = exception::what((exception *)&szStr);
          sprintf(szBuff, szFmtStr_1, iRequiredDex, szEmptyStr);
          LOBYTE(v281) = 1;
          v129 = v270;
        }
@srmeier srmeier added the official_feature Feature that exists in the official game that needs implementing label Jan 8, 2023
@stevewgr
Copy link
Member

stevewgr commented Jan 8, 2023

Nice! Thanks for creating this one. It's also worth mentioning that this is somewhat related to Anvil and items upgrading in general. In the official client there is a scroll called Reduce something that one can use to upgrade in order to reduce the item level requirements.
Similarly with Unique Items, before one can upgrade a unique item, Elemental Scroll is required to be used to get it from no level to +1:
image

The checks there simply check if the siNeed* variables are less than zero, and if they do, if it's true, then append (Reudce) to item level require tooltip.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
official_feature Feature that exists in the official game that needs implementing
Projects
Status: Backlog
Development

No branches or pull requests

2 participants