[Main 5.2] Fix Jewel Bug | Pegasus New - Source Mu - Mu Server Files
 

Noticias:

SMF - Just Installed!

Menú principal

[Main 5.2] Fix Jewel Bug | Pegasus New

Publicado por Dakosmu, Nov 22, 2025, 04:43 AM

Tema anterior - Siguiente tema

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

Dakosmu

FREE CODE RELEASE - CUSTOM JEWEL FIX | Pegasus

Since the main thread was removed, here's the solution for the community

What This Does:
This code fix resolves issues with Custom Jewel application on specific items, particularly wings and custom items. It prevents jewels from being applied to incompatible equipment slots.

What's Fixed:
  • Prevents jewel application on invalid wing items (index 7-11, 62-72)
  • Proper validation for weapon slots (EnableSlotWeapon)
  • Proper validation for armor slots (EnableSlotArmor)
  • Proper validation for wing slots (EnableSlotWing)
  • Custom wing compatibility check

Implementation

Important: Backup your files before making changes!

  • Step 1: Locate these functions in your GameServer source:
BOOL CCustomJewel::CheckCustomJewelByItem(int ItemIndex)
BOOL CCustomJewel::CheckCustomJewelApplyItem(int ItemIndex,int TargetItemIndex)

  • Step 2: Replace them with the code below:

Code Fix (C++)
BOOL CCustomJewel::CheckCustomJewelByItem(int ItemIndex) // OK
{
    if(this->GetInfoByItem(ItemIndex) != 0)
    {
        return 1;
    }
    return 0;
}

BOOL CCustomJewel::CheckCustomJewelApplyItem(int ItemIndex,int TargetItemIndex) // OK
{
    CUSTOM_JEWEL_INFO* lpInfo = this->GetInfoByItem(ItemIndex);
   
    if(lpInfo == 0)
    {
        return 0;
    }
   
    // Block jewel application on specific wing items (index 7-11, items 62-72)
    if((TargetItemIndex/MAX_ITEM_TYPE) >= 7 && (TargetItemIndex / MAX_ITEM_TYPE) <= 11 &&
       (TargetItemIndex%MAX_ITEM_TYPE) >= 62 && (TargetItemIndex%MAX_ITEM_TYPE) <= 72)
    {
        return 0;
    }
   
    // Validate target item is a valid equipment piece
    if(TargetItemIndex > BConverITEM(12,6) &&
       (TargetItemIndex < BConverITEM(12,36) || TargetItemIndex > BConverITEM(12,43)) &&
       TargetItemIndex != BConverITEM(12,49) &&
       TargetItemIndex != BConverITEM(12,50) &&
       (TargetItemIndex < BConverITEM(12,262) || TargetItemIndex > BConverITEM(12,265)) &&
       TargetItemIndex != BConverITEM(13,30) &&
       gCustomWing.CheckCustomWingByItem(TargetItemIndex) == 0)
    {
        return 0;
    }
   
    // Check weapon slot permission
    if(lpInfo->EnableSlotWeapon == 0 &&
       (TargetItemIndex >= BConverITEM(0,0) && TargetItemIndex < BConverITEM(6,0)))
    {
        return 0;
    }
   
    // Check armor slot permission
    if(lpInfo->EnableSlotArmor == 0 &&
       (TargetItemIndex >= BConverITEM(6,0) && TargetItemIndex < BConverITEM(12,0)))
    {
        return 0;
    }
   
    // Check wing slot permission
    if(lpInfo->EnableSlotWing == 0 &&
       ((TargetItemIndex >= BConverITEM(12,0) && TargetItemIndex <= BConverITEM(12,6)) ||
        (TargetItemIndex >= BConverITEM(12,36) && TargetItemIndex <= BConverITEM(12,43)) ||
        TargetItemIndex == BConverITEM(12,49) ||
        TargetItemIndex == BConverITEM(12,50) ||
        (TargetItemIndex >= BConverITEM(12,262) && TargetItemIndex <= BConverITEM(12,265)) ||
        TargetItemIndex == BConverITEM(13,30) ||
        gCustomWing.CheckCustomWingByItem(TargetItemIndex) != 0))
    {
        return 0;
    }
   
    return 1;
}

Testing
After implementation, test the following:
  • Try applying jewels to weapons (should work if EnableSlotWeapon = 1)
  • Try applying jewels to armor (should work if EnableSlotArmor = 1)
  • Try applying jewels to wings (should work if EnableSlotWing = 1)
  • Verify jewels cannot be applied to invalid items

Final Thoughts:
Citar"What a waste of effort supporting those kids." - Indeed, but the real community appreciates quality work. This is for those who truly value development and aren't afraid to learn.

This code is provided FREE to the community because real developers support each other, not take down threads out of jealousy or ignorance.

IMPORTANT NOTICE

CitarThis might be our last post here since our main thread was not welcome to progress here.

If you want more fixes, quality content, and professional support, feel free to contact us directly through our official channels.

We appreciate those who valued our work. To the rest - good luck.

BYE!

Official Contact & Support
For future fixes, custom development, and premium support:

Zytrous: Discord: Zytrous#2671 | Regístrate para ver el enlace | Regístrate para ver el enlace

Official Discord Server: Regístrate para ver el enlace

"Quality doesn't beg for attention. It simply moves on to those who appreciate it."
- Zytrous & Phanh | PegasusXElev8Games Team
Bon Dia

🡱 🡳
Real Time Web Analytics