WhatsApp Discord
[Main 5.2] Icon Skill Position | Pegasus - Source Mu - Mu Server Files
 

Noticias:

SMF - Just Installed!

Menú principal

[Main 5.2] Icon Skill Position | Pegasus

Publicado por Dakosmu, Nov 29, 2025, 05:53 AM

Tema anterior - Siguiente tema

0 Miembros y 1 Visitante están viendo este tema.

Dakosmu

FIX: ICON SKILL POSITION | Pegasus

Regístrate para ver el enlace
✨ FIX: ICON SKILL POSITION ✨
Corrected Skill Icon Rendering and Position Display
-------------------------------------------------------

📋 Description:
This fix resolves issues with skill icon positioning and rendering in the skill list window. It properly handles pet commands and regular skills, preventing display errors and missing icons.

⭐ Features:
  • Correct Icon Positioning - Skills display in proper slots
  • Pet Command Support - Handles pet skills separately from hero skills
  • MuHelper Compatibility - Works correctly with MuHelper system
  • Validation Fix - Proper skill type checking before rendering
  • Crash Prevention - Prevents errors from invalid skill references

✨ What This Fixes:
  • Skill icons appearing in wrong positions
  • Missing skill icons in skill list
  • Pet command skills not displaying correctly
  • MuHelper skill icon issues
  • Crashes from invalid skill type validation

💡 The Problem:
The original code validated skills before checking if they were pet commands, causing pet skills to fail validation and not display properly. This fix reorders the logic to handle pet commands correctly.


(Preview of corrected skill icon positions)

⚙️ SOURCE CODE (Reply/Like to Unlock)

[spoiler=Hiden]
COMPATIBLE WITH PUBLIC RELEASE


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


📄 File: NewUIMainFrameWindow.cpp


Find:
Código (cpp) [Seleccionar]
void SEASON3B::CNewUISkillList::RenderSkillIcon(int iIndex, float x, float y, float width, float height, int TypeMuHelper)


Locate this section:
Código (cpp) [Seleccionar]
WORD bySkillType = (TypeMuHelper == 1) ? iIndex : CharacterAttribute->Skill[iIndex];
    if (bySkillType == 0 || !gSkillManager.FindHeroSkill((ActionSkillType)bySkillType))
    {
        return;
    }
    if (iIndex >= AT_PET_COMMAND_DEFAULT)
    {
        bySkillType = iIndex;
    }


Replace with:
Código (cpp) [Seleccionar]
WORD bySkillType = (TypeMuHelper == 1) ? iIndex : CharacterAttribute->Skill[iIndex];
    if (iIndex >= AT_PET_COMMAND_DEFAULT)
    {
        bySkillType = iIndex;
    }
    else
    {
        bySkillType = (TypeMuHelper == 1) ? iIndex : CharacterAttribute->Skill[iIndex];
    }
    if (bySkillType == 0)
    {
        return;
    }
    if (bySkillType < AT_PET_COMMAND_DEFAULT)
    {
        if (!gSkillManager.FindHeroSkill((ActionSkillType)bySkillType))
        {
            return;
        }
    }
[/spoiler]


-------------------------------------------------------


🔨 What Changed:


Before:
  • Gets skill type
  • Validates ALL skills (including pet commands) - ❌ FAILS for pet commands
  • Sets pet command skill type
  • Returns invalid skills

After:
  • Gets skill type
  • Checks if it's a pet command FIRST
  • Sets appropriate skill type based on command type
  • Returns if skill is 0 (empty)
  • Only validates hero skills, skips validation for pet commands ✅

🧠 Technical Explanation:


The key issue was that gSkillManager.FindHeroSkill() was being called on pet commands before they were properly identified. Pet commands have indices >= AT_PET_COMMAND_DEFAULT and don't exist in the hero skill list, so the validation would fail.


The fix:
  • First checks if the index is a pet command
  • Separates validation logic for hero skills vs pet commands
  • Only validates hero skills through the skill manager
  • Allows pet commands to bypass hero skill validation

✅ Testing:
After implementation, verify the following:
  • Open your skill window [K]
  • Check that all skill icons display in correct positions
  • Test with pet commands (if you have them)
  • Use skills with MuHelper active
  • Verify no crashes occur when switching skills
  • Check that empty skill slots display correctly

-------------------------------------------------------


🏆 Benefits:


✅ Proper Icon Display - All skills show in correct positions
✅ Pet Command Support - Pet skills work correctly
✅ Crash Prevention - No more errors from invalid validation
✅ MuHelper Compatible - Works seamlessly with automation


This is a critical fix for proper skill display functionality!


-------------------------------------------------------


✅ This fix is provided FREE to the community


Use it, test it, improve your client with it. Real developers share solutions.


🤝 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 | Regístrate para ver el enlace | Regístrate para ver el enlace
Phanh: Discord: phanhxinh_97 | Regístrate para ver el enlace




"Quality fixes for quality clients. That's what we do."
- Zytrous & Phanh | PegasusXElev8Games Team
Bon Dia

🡱 🡳
Real Time Web Analytics