Solo usuarios registrados pueden comentar y agradecer, Logueate o Registrate

Autor Topic: [Main 5.2] Fix quick stat point allocation display in the Character | Pegasus  (Visto 822 veces)

0 Miembros and 1 Guest are viewing this topic.

Offline Zytrous Posteado: November 26, 2025, 11:20:37 PM

  • 0 puntos por ventas
  • *
  • Rank: Principiante
  • Posts: 26
  • Gracias recibida: 1244
  • ph

🎯 FIX: QUICK STAT POINT ALLOCATION DISPLAY 🎯
Enhanced Character Window with Input Box for Stat Points
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

📋 Description:
This fix adds a custom input dialog box to the Character Window stat allocation system, allowing players to input the exact number of points they want to add instead of clicking multiple times.

✨ Features:
- Input Box System - Enter exact amount of points to allocate
- Smart Validation - Prevents over-allocation and invalid inputs
- User-Friendly Interface - Clean, modern dialog window
- Window Conflict Prevention - Automatically closes when other windows are opened
- Min/Max Protection - Ensures valid point values (1 to available points)
- All Stats Supported - STR, AGI, VIT, ENE, CMD

🎯 What This Fixes:
- Removes tedious clicking for bulk stat allocation
- Adds proper input validation
- Prevents conflicts with other open windows
- Improves user experience significantly

💻 How It Works:
1. Click on any stat button (+) in Character Window
2. Dialog box appears with input field
3. Enter the number of points you want to add
4. Click "Add Point" to confirm or "Cancel" to close
5. Points are allocated instantly


(Preview of the enhanced stat allocation system)

🔒 SOURCE CODE (Reply/Like to Unlock)
Spoiler for Hiden:
COMPATIBLE WITH PUBLIC RELEASE

⚠️ IMPORTANT: Backup your files before making any changes!

📄 Step 1: CBInterface.cpp

Find:
Code: [Select]
void Interface::DrawCongDiem()

Replace all with:


━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

📄 Step 2: NewUICharacterInfoWindow.cpp

Find:
Code: [Select]
bool SEASON3B::CNewUICharacterInfoWindow::BtnProcess()

Locate this section:
Code: [Select]
if (CharacterAttribute->PrintPlayer.ViewPoint > 0)
{
int iBaseClass = gCharacterManager.GetBaseClass(Hero->Class);
int iCount = 0;
if (iBaseClass == CLASS_DARK_LORD)
{
iCount = 5;
}
else
{
iCount = 4;
}
for (int i = 0; i < iCount; ++i)
{
if (m_BtnStat[i].UpdateMouseEvent() == true)
{
SendRequestAddPoint(i);
return true;
}
}
}

Replace with:



━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

📝 Key Features Explained:

1. Input Validation:
- Minimum value: 1 point
- Maximum value: Available stat points
- Numbers only (no letters or special characters)
- Automatic correction if invalid value entered

2. Window Conflict Prevention:
The system automatically closes the stat allocation dialog when any of these windows are opened:
- Shop, Trade, Warehouse, Chaos Box
- Guild, Party, Quest windows
- NPC dialogs and interactions
- Cash Shop, Inventory expansions
- And many more...

3. Smart Allocation:
- Click any stat (+) button
- Enter desired amount
- System validates against available points
- Instant allocation on confirmation

✅ Testing:
After implementation, test the following:
1. Open Character Window [C]
2. Click on any stat (+) button (STR, AGI, VIT, ENE, or CMD)
3. Dialog box should appear
4. Enter a number and verify validation works
5. Test with values below 1, above max points, and valid ranges
6. Confirm points are allocated correctly

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

💬 Benefits:

✅ Massive time saver for players - No more clicking 1000+ times to allocate points
✅ Professional UX - Modern input dialog system
✅ Safe & Validated - Prevents errors and exploits
✅ Clean Integration - Works seamlessly with existing UI

This is a quality-of-life improvement that your players will absolutely love!

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

✅ This code is provided FREE to the community

Use it, modify it, improve your server with it. Real developers share knowledge.

💬 Support:
If you encounter any issues or need help with implementation, feel free to contact us.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

💻 CUSTOM CODING SERVICES AVAILABLE
We offer coding projects of any kind, any time!
Need custom features, systems, or modifications? Contact us for professional MU development services.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

📞 Contact Us
Zytrous: Discord: Zytrous#2671 | WhatsApp | Facebook
Phanh: Discord: phanhxinh_97



"Quality fixes for quality servers. That's how it should be."
- Zytrous & Phanh | PegasusXElev8Games Team




Offline bigrealtk92 #1 Posteado: November 27, 2025, 01:15:44 AM

  • 0 puntos por ventas
  • *
  • Rank: Destacado
  • Posts: 81
  • Gracias recibida: 19
  • vn
share đăng kí tài khoản trong game với bạn!


Online Malkom99 #2 Posteado: November 27, 2025, 06:31:38 PM

  • 0 puntos por ventas
  • *
  • Rank: Dedicado
  • Posts: 44
  • Gracias recibida: 217
  • br
numbers static  in interface point static.. can you fix it.. for all dynamic interface move + numer move


Offline zhangjianle865 #3 Posteado: November 28, 2025, 12:30:33 AM

  • 0 puntos por ventas
  • *
  • Rank: Experto
  • Posts: 156
  • Gracias recibida: 176
  • ca

Offline zhangjianle865 #4 Posteado: November 28, 2025, 12:31:57 AM

  • 0 puntos por ventas
  • *
  • Rank: Experto
  • Posts: 156
  • Gracias recibida: 176
  • ca
numbers static  in interface point static.. can you fix it.. for all dynamic interface move + numer move


//可移动输入框
bool CNewUIBCustomMenuInfo::RenderInputBox2(float PosX, float PosY, float W, float H, char* TextSet, CUITextInputBox*& Input, UIOPTIONS UiOption, int MaxChar, bool isPass)
{
   if (!Input)
   {
      Input = new CUITextInputBox;
      Input->Init(g_hWnd, W, H, MaxChar, isPass);
      Input->SetPosition(PosX, PosY);
      Input->SetTextColor(255, 255, 230, 230);
      Input->SetBackColor(0, 0, 0, 25);
      Input->SetFont(g_hFont);
      Input->SetState(UISTATE_NORMAL);
      Input->SetOption(UiOption);
      Input->SetText(TextSet);
   }
   else
   {
      // 关键修改:每次渲染时都更新位置
      Input->SetPosition(PosX, PosY);

      Input->Render();
      if (SEASON3B::CheckMouseIn(PosX - 3, PosY - 2.5, W + 6, H + 5) == 1)
      {
         if (GetKeyState(VK_LBUTTON) & 0x8000)
         {
            Input->GiveFocus(1);
         }
      }
      return  1;
   }
   return 0;
}

This is something I wrote myself; I'm not sure if it's suitable for you. It can move with the window.


Offline Evangelio #5 Posteado: November 28, 2025, 02:30:38 PM | Modificado: November 28, 2025, 02:32:14 PM by Evangelio

  • 0 puntos por ventas
  • *
  • Rank: Puto amo
  • Posts: 274
  • Gracias recibida: 2264
  • ar

Offline Toast #6 Posteado: November 28, 2025, 06:17:37 PM | Modificado: November 28, 2025, 06:19:55 PM by Toast

  • 0 puntos por ventas
  • *
  • Rank: Principiante
  • Posts: 2
  • Gracias recibida: 19
  • gb
Interface fixed and logic adjustment, plug and play for the public source.
PS: disabled interface move



Spoiler for Hiden:
File:CBInterface.cpp
Find
Code: [Select]
void Interface::DrawCongDiem()

Replace


Spoiler for Hiden:
File: NewUIBCustomMenu.cpp
Find
Code: [Select]
bool CNewUIBCustomMenuInfo::gDrawWindowCustom(float* StartX, float* StartY, float CuaSoW, float CuaSoH, int eNumWindow, LPCSTR Text, ...)

Replace






Solo usuarios registrados pueden comentar y agradecer, Logueate o Registrate


 

Related Topics

  Subject / Started by Replies Last post
1 Replies
5861 Views
Last post January 17, 2020, 09:30:37 PM
by PRONEXUS
4 Replies
1577 Views
Last post March 14, 2021, 07:04:47 AM
by choosemu
8 Replies
1088 Views
Last post November 25, 2025, 07:12:05 PM
by Evangelio
4 Replies
825 Views
Last post November 24, 2025, 10:49:14 AM
by z0lik
2 Replies
454 Views
Last post November 27, 2025, 05:47:41 PM
by Malkom99