WhatsApp Discord
Source 5.2 BASE - Source Mu - Mu Server Files
 

Noticias:

SMF - Just Installed!

Menú principal

Source 5.2 BASE

Publicado por Dakosmu, Dic 22, 2025, 08:44 AM

Tema anterior - Siguiente tema

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

Dakosmu

Source 5.2 BASE

Un amigo me pidió compartir esto con todos ustedes.

El código fuente base 5.2 (Source) aún requiere mucho trabajo para estar completamente terminado, pero es un excelente punto de partida para desarrolladores.

CAPTURAS DE PANTALLA









CLIENT / SERVER SOURCE LINKS

Descarga por Mega: Regístrate para ver el enlace

Descarga por Mediafire: Regístrate para ver el enlace

Apoya el canal de YouTube suscribiéndote: Regístrate para ver el enlace
Bon Dia

Dakosmu

Source 5.2 BASE
Citar

void CGMItemMng::OpenFile(char* FileName)
{
   char filename[256];
   sprintf_s(filename, ".\\Data\\Local\\%s\\ItemList.xml", g_strSelectedML.c_str());
   pugi::xml_document file;
   pugi::xml_parse_result res = file.load_file(filename);

   if (res.status != pugi::status_ok)
   {
      return;
   }

   

   pugi::xml_node ItemList = file.child("ItemList");
   int index = 0;
   for (pugi::xml_node Section = ItemList.child("Section"); Section; Section = Section.next_sibling())
   {
      for (pugi::xml_node Item = Section.child("Item"); Item; Item = Item.next_sibling())
      {
         

         
         Script_Item info ;

         std::string text_name = Item.attribute("Name").as_string();
         strcpy_s(info.Name, text_name.c_str());
         info.Type = Section.attribute("Index").as_int();
         info.m_byItemSlot = Item.attribute("Slot").as_int();
         info.Index = Item.attribute("Index").as_int();
         info.m_wSkillIndex = Item.attribute("SkillIndex").as_int();
         info.TwoHand = Item.attribute("TwoHand").as_int();
         info.Width = Item.attribute("Width").as_int();
         info.Height = Item.attribute("Height").as_int();
         info.Drop = Item.attribute("Drop").as_int();
         info.PowerATTK = Item.attribute("CombatPower").as_int();
         info.RequireLevel = Item.attribute("ReqLevel").as_int();
         info.DamageMin = Item.attribute("DamageMin").as_int();
         info.DamageMax = Item.attribute("DamageMax").as_int();
         info.WeaponSpeed = Item.attribute("AttackSpeed").as_int();
         info.Durability = Item.attribute("Durability").as_int();
         info.MagicDur = Item.attribute("MagicDurability").as_int();
         info.MagicPower = Item.attribute("MagicPower").as_int();
         info.RequireStrength = Item.attribute("ReqStrength").as_int();
         info.RequireDexterity = Item.attribute("ReqDexterity").as_int();
         info.RequireEnergy = Item.attribute("ReqEnergy").as_int();
         info.RequireVitality = Item.attribute("ReqVitality").as_int();
         info.RequireCharisma = Item.attribute("ReqCommand").as_int();
         info.AttType = Item.attribute("SetAttrib").as_int();
         info.RequireClass[0] = Item.attribute("DarkWizard").as_int();
         info.RequireClass[1] = Item.attribute("DarkKnight").as_int();
         info.RequireClass[2] = Item.attribute("FairyElf").as_int();
         info.RequireClass[3] = Item.attribute("MagicGladiator").as_int();
         info.RequireClass[4] = Item.attribute("DarkLord").as_int();
         info.RequireClass[5] = Item.attribute("Summoner").as_int();
         info.RequireClass[6] = Item.attribute("RageFighter").as_int();
         info.RequireClass[7] = Item.attribute("GrowLancer").as_int();
         info.RequireClass[8] = Item.attribute("RuneWizard").as_int();
         info.RequireClass[9] = Item.attribute("Slayer").as_int();
         info.RequireClass[10] = Item.attribute("GunCrusher").as_int();
         info.RequireClass[11] = Item.attribute("LightWizard").as_int();
         info.RequireClass[12] = Item.attribute("LemuriaMage").as_int();
         info.RequireClass[13] = Item.attribute("IllusionKnight").as_int();
         info.RequireClass[14] = Item.attribute("DarkWizard").as_int();
     
         info.Type = Item.attribute("Type").as_int();
         info.Drop = Item.attribute("Dump").as_int();
         info.Trade = Item.attribute("Transaction").as_int();
         info.StorePersonal = Item.attribute("PersonalStore").as_int();
         info.WhareHouse = Item.attribute("StoreWarehouse").as_int();
         info.SellNpc = Item.attribute("SellToNPC").as_int();
         info.Expensive = Item.attribute("ExpensiveItem").as_int();
         info.Repair = Item.attribute("Repair").as_int();
         info.Kind1 = Item.attribute("KindA").as_int();
         info.Kind2 = Item.attribute("KindB").as_int();
         info.Overlap = Item.attribute("Overlap").as_int();
         info.MasteryGrade = Item.attribute("MasteryGrade").as_int();

         std::string ModelPath = Item.attribute("ModelPath").as_string();
         strcpy_s(info.ModelPath, ModelPath.c_str());
         std::string ModelFile = Item.attribute("ModelFile").as_string();
         strcpy_s(info.ModelFile, ModelFile.c_str());
         ItemMemory[index] = info;
      }
     

     
   }

   return;
}
Modified the item loading method to directly use the latest item files from IGC-Network. Thanks to IGC.ItemList.xml
Bon Dia

Dakosmu

void SetLargeRand() // OK
{
   //seed = std::mt19937(std::random_device());
   //dist = std::uniform_int_distribution<int>(0, 2147483647);
   // 如果 seed 和 dist 是局部变量
   std::random_device rd;
   std::mt19937 seed(rd());  // 直接构造
   std::uniform_int_distribution<int> dist(0, 2147483647);
}
Bon Dia

Dakosmu



Data hosted with ♥ by Pastebin.com - Download Raw - See Original
void CItemManager::CGItemMoveRecv(PMSG_ITEM_MOVE_RECV* lpMsg, int aIndex) // OK
{
    LPOBJ lpObj = &gObj[aIndex];
 
    if (gObjIsConnectedGP(aIndex) == 0)
    {
        return;
    }
 
    PMSG_ITEM_MOVE_SEND pMsg;
 
    pMsg.header.setE(0x24, sizeof(pMsg));
 
    pMsg.SubCode = 0xFF;
 
    pMsg.Index = lpMsg->TargetSlot;
 
    memset(pMsg.ItemInfo, 0xFF, sizeof(pMsg.ItemInfo));
 
    if (lpObj->DieRegen != 0)
    {
        DataSend(aIndex, (BYTE*)&pMsg, pMsg.header.size);
        return;
    }
 
    if (lpMsg->SourceFlag == REQUEST_EQUIPMENT_TRADE || lpMsg->TargetFlag == REQUEST_EQUIPMENT_TRADE) // Trade
    {
        if (lpObj->Interface.use == 0 || lpObj->Interface.type != INTERFACE_TRADE || lpObj->Interface.state == 0 || OBJECT_RANGE(lpObj->TargetNumber) == 0)
        {
            DataSend(aIndex, (BYTE*)&pMsg, pMsg.header.size);
            return;
        }
    }
 
    if (lpMsg->SourceFlag == REQUEST_EQUIPMENT_STORAGE || lpMsg->TargetFlag == REQUEST_EQUIPMENT_STORAGE) // Warehouse
    {
        if (lpObj->Interface.use == 0 || lpObj->Interface.type != INTERFACE_WAREHOUSE || lpObj->Interface.state == 0 || lpObj->LoadWarehouse == 0 || lpObj->WarehouseLock == 1)
        {
            DataSend(aIndex, (BYTE*)&pMsg, pMsg.header.size);
            return;
        }
    }
 
    if (lpMsg->SourceFlag == REQUEST_EQUIPMENT_CHAOS_MIX || (lpMsg->SourceFlag >= REQUEST_EQUIPMENT_ELPIS_MIX && lpMsg->SourceFlag <= 20) || lpMsg->TargetFlag == REQUEST_EQUIPMENT_CHAOS_MIX || (lpMsg->TargetFlag >= REQUEST_EQUIPMENT_ELPIS_MIX && lpMsg->TargetFlag <= 20)) // Chaos Box
    {
        if (lpObj->Interface.use == 0 || lpObj->Interface.type != INTERFACE_CHAOS_BOX || lpObj->ChaosLock != 0)
        {
            DataSend(aIndex, (BYTE*)&pMsg, pMsg.header.size);
            return;
        }
    }
 
    if (lpMsg->SourceFlag == REQUEST_EQUIPMENT_MYSHOP || lpMsg->TargetFlag == REQUEST_EQUIPMENT_MYSHOP) // Personal Shop
    {
        if (lpObj->PShopOpen != 0 || lpObj->PShopTransaction != 0)
        {
            DataSend(aIndex, (BYTE*)&pMsg, pMsg.header.size);
            return;
        }
    }
 
    if (lpMsg->SourceFlag == REQUEST_EQUIPMENT_TRAINER_MIX || lpMsg->TargetFlag == REQUEST_EQUIPMENT_TRAINER_MIX) // Trainer
    {
        if (lpObj->Interface.use == INTERFACE_NONE || lpObj->Interface.type != INTERFACE_TRAINER || lpObj->ChaosLock != 0)
        {
            DataSend(aIndex, (BYTE*)&pMsg, pMsg.header.size);
            return;
        }
    }
 
    switch (lpMsg->SourceFlag)
    {
    case REQUEST_EQUIPMENT_INVENTORY:
    {
        if (lpMsg->TargetFlag == REQUEST_EQUIPMENT_INVENTORY) // -> Inventory
        {
            if ((pMsg.SubCode = this->MoveItemToInventoryFromInventory(lpObj, lpMsg->SourceSlot, lpMsg->TargetSlot, lpMsg->TargetFlag)) != 0xFF)
            {
                this->ItemByteConvert(pMsg.ItemInfo, lpObj->Inventory[lpMsg->TargetSlot]);
            }
        }
        else if (lpMsg->TargetFlag == REQUEST_EQUIPMENT_TRADE) // -> Trade
        {
            if ((pMsg.SubCode = this->MoveItemToTradeFromInventory(lpObj, lpMsg->SourceSlot, lpMsg->TargetSlot, lpMsg->TargetFlag)) != 0xFF)
            {
                this->ItemByteConvert(pMsg.ItemInfo, lpObj->Trade[lpMsg->TargetSlot]);
            }
        }
        else if (lpMsg->TargetFlag == REQUEST_EQUIPMENT_STORAGE) // -> Warehouse
        {
            if ((pMsg.SubCode = this->MoveItemToWarehouseFromInventory(lpObj, lpMsg->SourceSlot, lpMsg->TargetSlot, lpMsg->TargetFlag)) != 0xFF)
            {
                this->ItemByteConvert(pMsg.ItemInfo, lpObj->Warehouse[lpMsg->TargetSlot]);
            }
        }
        if ((lpMsg->TargetFlag == REQUEST_EQUIPMENT_CHAOS_MIX || (lpMsg->TargetFlag >= REQUEST_EQUIPMENT_TRAINER_MIX && lpMsg->TargetFlag <= 20))) // -> Chaos Box
        {
            if ((pMsg.SubCode = this->MoveItemToChaosBoxFromInventory(lpObj, lpMsg->SourceSlot, lpMsg->TargetSlot, lpMsg->TargetFlag)) != 0xFF)
            {
                this->ItemByteConvert(pMsg.ItemInfo, lpObj->ChaosBox[lpMsg->TargetSlot]);
            }
        }
        else if (lpMsg->TargetFlag == REQUEST_EQUIPMENT_MYSHOP) // -> Personal Shop
        {
            if ((pMsg.SubCode = this->MoveItemToPersonalShopFromInventory(lpObj, lpMsg->SourceSlot, lpMsg->TargetSlot, lpMsg->TargetFlag)) != 0xFF)
            {
                this->ItemByteConvert(pMsg.ItemInfo, lpObj->Inventory[lpMsg->TargetSlot]);
            }
        }
        else if (lpMsg->TargetFlag == 23) // Inventory -> MixExpansion Inventory
        {
#ifdef CHAOS_MACHINE_EXTENSION
            if ((pMsg.SubCode = this->MoveItemToMixExpansionFromInventory(lpObj, lpMsg->SourceSlot, lpMsg->TargetSlot, lpMsg->TargetFlag)) != 0xFF)
            {
                this->ItemByteConvert(pMsg.ItemInfo, lpObj->InventoryMix[lpMsg->TargetSlot]);
            }
#endif // CHAOS_MACHINE_EXTENSION
        }
    }
    break;
    case REQUEST_EQUIPMENT_TRADE:
    {
        if (lpMsg->TargetFlag == REQUEST_EQUIPMENT_INVENTORY) // Trade -> Inventory
        {
            if ((pMsg.SubCode = this->MoveItemToInventoryFromTrade(lpObj, lpMsg->SourceSlot, lpMsg->TargetSlot, lpMsg->TargetFlag)) != 0xFF)
            {
                this->ItemByteConvert(pMsg.ItemInfo, lpObj->Inventory[lpMsg->TargetSlot]);
            }
        }
        else if (lpMsg->TargetFlag == REQUEST_EQUIPMENT_TRADE) // Trade -> Trade
        {
            if ((pMsg.SubCode = this->MoveItemToTradeFromTrade(lpObj, lpMsg->SourceSlot, lpMsg->TargetSlot, lpMsg->TargetFlag)) != 0xFF)
            {
                this->ItemByteConvert(pMsg.ItemInfo, lpObj->Trade[lpMsg->TargetSlot]);
            }
        }
        else if (lpMsg->TargetFlag == 21) // Trade -> Event Inventory
        {
            if ((pMsg.SubCode = this->MoveItemToEventInventoryFromTrade(lpObj, lpMsg->SourceSlot, lpMsg->TargetSlot, lpMsg->TargetFlag)) != 0xFF)
            {
#if(GAMESERVER_UPDATE>=802)
                this->ItemByteConvert(pMsg.ItemInfo, lpObj->EventInventory[lpMsg->TargetSlot]);
#endif
            }
        }
    }
    break;
    case REQUEST_EQUIPMENT_STORAGE:
    {
        if (lpMsg->TargetFlag == REQUEST_EQUIPMENT_INVENTORY) // Warehouse -> Inventory
        {
            if ((pMsg.SubCode = this->MoveItemToInventoryFromWarehouse(lpObj, lpMsg->SourceSlot, lpMsg->TargetSlot, lpMsg->TargetFlag)) != 0xFF)
            {
                this->ItemByteConvert(pMsg.ItemInfo, lpObj->Inventory[lpMsg->TargetSlot]);
            }
        }
        else if (lpMsg->TargetFlag == REQUEST_EQUIPMENT_STORAGE) // Warehouse -> Warehouse
        {
            if ((pMsg.SubCode = this->MoveItemToWarehouseFromWarehouse(lpObj, lpMsg->SourceSlot, lpMsg->TargetSlot, lpMsg->TargetFlag)) != 0xFF)
            {
                this->ItemByteConvert(pMsg.ItemInfo, lpObj->Warehouse[lpMsg->TargetSlot]);
            }
        }
    }
    break;
    case REQUEST_EQUIPMENT_MYSHOP:
    {
        if (lpMsg->TargetFlag == REQUEST_EQUIPMENT_INVENTORY) // Personal Shop -> Inventory
        {
            if ((pMsg.SubCode = this->MoveItemToInventoryFromPersonalShop(lpObj, lpMsg->SourceSlot, lpMsg->TargetSlot, lpMsg->TargetFlag)) != 0xFF)
            {
                this->ItemByteConvert(pMsg.ItemInfo, lpObj->Inventory[lpMsg->TargetSlot]);
            }
        }
        else if (lpMsg->TargetFlag == REQUEST_EQUIPMENT_MYSHOP) // Personal Shop -> Personal Shop
        {
            if ((pMsg.SubCode = this->MoveItemToPersonalShopFromPersonalShop(lpObj, lpMsg->SourceSlot, lpMsg->TargetSlot, lpMsg->TargetFlag)) != 0xFF)
            {
                this->ItemByteConvert(pMsg.ItemInfo, lpObj->Inventory[lpMsg->TargetSlot]);
            }
        }
    }
    break;
    case 21:
    {
        if (lpMsg->TargetFlag == 1) // Event Inventory -> Trade
        {
            if ((pMsg.SubCode = this->MoveItemToTradeFromEventInventory(lpObj, lpMsg->SourceSlot, lpMsg->TargetSlot, lpMsg->TargetFlag)) != 0xFF)
            {
#if(GAMESERVER_UPDATE>=802)
                this->ItemByteConvert(pMsg.ItemInfo, lpObj->Trade[lpMsg->TargetSlot]);
#endif
            }
        }
        else if (lpMsg->TargetFlag == 21) // Event Inventory -> Event Inventory
        {
            if ((pMsg.SubCode = this->MoveItemToEventInventoryFromEventInventory(lpObj, lpMsg->SourceSlot, lpMsg->TargetSlot, lpMsg->TargetFlag)) != 0xFF)
            {
#if(GAMESERVER_UPDATE>=802)
                this->ItemByteConvert(pMsg.ItemInfo, lpObj->EventInventory[lpMsg->TargetSlot]);
#endif
            }
        }
    }
    break;
    case 22:
        if (lpMsg->TargetFlag == 22) // Muun Inventory -> Muun Inventory
        {
            if ((pMsg.SubCode = this->MoveItemToMuunInventoryFromMuunInventory(lpObj, lpMsg->SourceSlot, lpMsg->TargetSlot, lpMsg->TargetFlag)) != 0xFF)
            {
#if(GAMESERVER_UPDATE>=802)
                this->ItemByteConvert(pMsg.ItemInfo, lpObj->MuunInventory[lpMsg->TargetSlot]);
#endif
            }
        }
        break;
    case 23:
    {
#ifdef CHAOS_MACHINE_EXTENSION
        if (lpMsg->SourceFlag == 23 && lpMsg->TargetFlag == REQUEST_EQUIPMENT_INVENTORY) // Inventory -> MixExpansion Inventory
        {
            if ((pMsg.SubCode = this->MoveItemToInventoryFromMixExpansion(lpObj, lpMsg->SourceSlot, lpMsg->TargetSlot, lpMsg->TargetFlag)) != 0xFF)
            {
                this->ItemByteConvert(pMsg.ItemInfo, lpObj->Inventory[lpMsg->TargetSlot]);
            }
        }
#endif // CHAOS_MACHINE_EXTENSION
    }
    break;
    default:
    {
        if ((lpMsg->SourceFlag == REQUEST_EQUIPMENT_CHAOS_MIX || (lpMsg->SourceFlag >= REQUEST_EQUIPMENT_TRAINER_MIX && lpMsg->SourceFlag <= 20))) //-- Chaos Box ->
        {
            if (lpMsg->TargetFlag == REQUEST_EQUIPMENT_INVENTORY) // Chaos Box -> Inventory
            {
                if ((pMsg.SubCode = this->MoveItemToInventoryFromChaosBox(lpObj, lpMsg->SourceSlot, lpMsg->TargetSlot, lpMsg->TargetFlag)) != 0xFF)
                {
                    this->ItemByteConvert(pMsg.ItemInfo, lpObj->Inventory[lpMsg->TargetSlot]);
                }
            }
            else if ((lpMsg->TargetFlag == REQUEST_EQUIPMENT_CHAOS_MIX || (lpMsg->TargetFlag >= 5 && lpMsg->TargetFlag <= 20))) // Chaos Box -> Chaos Box
            {
                if ((pMsg.SubCode = this->MoveItemToChaosBoxFromChaosBox(lpObj, lpMsg->SourceSlot, lpMsg->TargetSlot, lpMsg->TargetFlag)) != 0xFF)
                {
                    this->ItemByteConvert(pMsg.ItemInfo, lpObj->ChaosBox[lpMsg->TargetSlot]);
                }
            }
        }
    }
    break;
    }
 
    DataSend(aIndex, (BYTE*)&pMsg, pMsg.header.size);
 
    if (pMsg.SubCode == 0xFF && lpMsg->SourceFlag == REQUEST_EQUIPMENT_INVENTORY && lpMsg->TargetFlag == REQUEST_EQUIPMENT_INVENTORY)
    {
        if (lpObj->Inventory[lpMsg->SourceSlot].IsItem() != 0)
        {
            this->GCItemDurSend(lpObj->Index, lpMsg->SourceSlot, (BYTE)lpObj->Inventory[lpMsg->SourceSlot].m_Durability, 0);
        }
    }
 
    if (pMsg.SubCode != 0xFF && lpMsg->TargetFlag == REQUEST_EQUIPMENT_INVENTORY)
    {
        if (lpObj->Inventory[lpMsg->TargetSlot].m_IsPeriodicItem != 0)
        {
            gCashShop.GCCashShopPeriodicItemSend(aIndex, lpObj->Inventory[lpMsg->TargetSlot].m_Index, lpMsg->TargetSlot, lpObj->Inventory[lpMsg->TargetSlot].m_PeriodicItemTime);
        }
    }
 
    // Update Viewport Items
    if (pMsg.SubCode != 0xFF && lpMsg->SourceFlag == REQUEST_EQUIPMENT_INVENTORY && lpMsg->TargetFlag == REQUEST_EQUIPMENT_INVENTORY)
    {
       
        if (lpMsg->SourceSlot < MAX_EQUIPMENT_INDEX || lpMsg->TargetSlot < MAX_EQUIPMENT_INDEX)
        {
            gObjViewportListProtocolCreate(lpObj);
        }
    }
}
 
Bon Dia

Dakosmu

void CGMItemMng::OpenFile(char* FileName)
{
   char filename[256];
   sprintf_s(filename, ".\\Data\\Local\\%s\\ItemList.xml", g_strSelectedML.c_str());
   pugi::xml_document file;
   pugi::xml_parse_result res = file.load_file(filename);

   if (res.status != pugi::status_ok)
   {
      return;
   }

   

   pugi::xml_node ItemList = file.child("ItemList");
   int index = 0;
   for (pugi::xml_node Section = ItemList.child("Section"); Section; Section = Section.next_sibling())
   {
      for (pugi::xml_node Item = Section.child("Item"); Item; Item = Item.next_sibling())
      {
         

         
         Script_Item info ;

         std::string text_name = Item.attribute("Name").as_string();
         strcpy_s(info.Name, text_name.c_str());
         info.Type = Section.attribute("Index").as_int();
         info.m_byItemSlot = Item.attribute("Slot").as_int();
         info.Index = Item.attribute("Index").as_int();
         info.m_wSkillIndex = Item.attribute("SkillIndex").as_int();
         info.TwoHand = Item.attribute("TwoHand").as_int();
         info.Width = Item.attribute("Width").as_int();
         info.Height = Item.attribute("Height").as_int();
         info.Drop = Item.attribute("Drop").as_int();
         info.PowerATTK = Item.attribute("CombatPower").as_int();
         info.RequireLevel = Item.attribute("ReqLevel").as_int();
         info.DamageMin = Item.attribute("DamageMin").as_int();
         info.DamageMax = Item.attribute("DamageMax").as_int();
         info.WeaponSpeed = Item.attribute("AttackSpeed").as_int();
         info.Durability = Item.attribute("Durability").as_int();
         info.MagicDur = Item.attribute("MagicDurability").as_int();
         info.MagicPower = Item.attribute("MagicPower").as_int();
         info.RequireStrength = Item.attribute("ReqStrength").as_int();
         info.RequireDexterity = Item.attribute("ReqDexterity").as_int();
         info.RequireEnergy = Item.attribute("ReqEnergy").as_int();
         info.RequireVitality = Item.attribute("ReqVitality").as_int();
         info.RequireCharisma = Item.attribute("ReqCommand").as_int();
         info.AttType = Item.attribute("SetAttrib").as_int();
         info.RequireClass[0] = Item.attribute("DarkWizard").as_int();
         info.RequireClass[1] = Item.attribute("DarkKnight").as_int();
         info.RequireClass[2] = Item.attribute("FairyElf").as_int();
         info.RequireClass[3] = Item.attribute("MagicGladiator").as_int();
         info.RequireClass[4] = Item.attribute("DarkLord").as_int();
         info.RequireClass[5] = Item.attribute("Summoner").as_int();
         info.RequireClass[6] = Item.attribute("RageFighter").as_int();
         info.RequireClass[7] = Item.attribute("GrowLancer").as_int();
         info.RequireClass[8] = Item.attribute("RuneWizard").as_int();
         info.RequireClass[9] = Item.attribute("Slayer").as_int();
         info.RequireClass[10] = Item.attribute("GunCrusher").as_int();
         info.RequireClass[11] = Item.attribute("LightWizard").as_int();
         info.RequireClass[12] = Item.attribute("LemuriaMage").as_int();
         info.RequireClass[13] = Item.attribute("IllusionKnight").as_int();
         info.RequireClass[14] = Item.attribute("DarkWizard").as_int();
     
         info.Type = Item.attribute("Type").as_int();
         info.Drop = Item.attribute("Dump").as_int();
         info.Trade = Item.attribute("Transaction").as_int();
         info.StorePersonal = Item.attribute("PersonalStore").as_int();
         info.WhareHouse = Item.attribute("StoreWarehouse").as_int();
         info.SellNpc = Item.attribute("SellToNPC").as_int();
         info.Expensive = Item.attribute("ExpensiveItem").as_int();
         info.Repair = Item.attribute("Repair").as_int();
         info.Kind1 = Item.attribute("KindA").as_int();
         info.Kind2 = Item.attribute("KindB").as_int();
         info.Overlap = Item.attribute("Overlap").as_int();
         info.MasteryGrade = Item.attribute("MasteryGrade").as_int();

         std::string ModelPath = Item.attribute("ModelPath").as_string();
         strcpy_s(info.ModelPath, ModelPath.c_str());
         std::string ModelFile = Item.attribute("ModelFile").as_string();
         strcpy_s(info.ModelFile, ModelFile.c_str());
         ItemMemory[index] = info;
      }
     

     
   }

   return;
}
Modified the item loading method to directly use the latest item files from IGC-Network. Thanks to IGC.ItemList.xml
Bon Dia

straiker23

Saludos hermano, podrías los próximos fixes pasarlos como lo hacías con la roxgaming explicativa.

Dakosmu

FIX RenderItemToolip IN ACIENT ITEMS

Regístrate para ver el enlace



FIND

if (option1 != 0xFF)

REMPLACE FOR IT

if (option1 != 0xFF || option2 != 0xFF)
Bon Dia

Dakosmu


MuServer/Data/Util/ResetTable.txt


Pega esto: 0
//Index MinReset   MaxReset   Level_AL0   Level_AL1   Level_AL2   Level_AL3   Money_AL0   Money_AL1   Money_AL2   Money_AL3  Bless  Soul  Life  Creation  Guardian  Gemstone  Harmony  Chaos  LowerStone  HigherStone
1      0          4001       400         400         400         400         2030630     2030630     2030630     2030630    0     0    0    0         *         *         *        *      *           *
end

1
//Index   Point_AL0   Point_AL1   Point_AL2   Point_AL3   ItemBag_AL0   ItemBag_AL1   ItemBag_AL2   ItemBag_AL3
1         5000        5000        5000        5000        *             *             *             *
end
Bon Dia

Dakosmu

void CItemManager::UpdateInventoryViewport(int aIndex, int slot) // OK
{
if (INVENTORY_WEAR_RANGE(slot) == 0)
{
return;
}

if (slot == 10 || slot == 11)
{
if (gSkillManager.SkillChangeUse(aIndex) != 0)
{
gObjViewportListProtocolCreate(&gObj[aIndex]);
gObjectManager.CharacterUpdateMapEffect(&gObj[aIndex]);
}
}

gObjectManager.CharacterMakePreviewCharSet(aIndex);

this->GCItemChangeSend(aIndex, slot);

// Update level/glow
gObjViewportListProtocolCreate(&gObj[aIndex]);
}
Bon Dia

Dakosmu

void CItemManager::UpdateInventoryViewport(int aIndex, int slot) // OK
{
if (INVENTORY_WEAR_RANGE(slot) == 0)
{
return;
}

if (slot == 10 || slot == 11)
{
if (gSkillManager.SkillChangeUse(aIndex) != 0)
{
gObjViewportListProtocolCreate(&gObj[aIndex]);
gObjectManager.CharacterUpdateMapEffect(&gObj[aIndex]);
}
}

gObjectManager.CharacterMakePreviewCharSet(aIndex);

this->GCItemChangeSend(aIndex, slot);

//Send equipped item level/glow to nearby players without full viewport rebuild
this->GCItemEquipmentSend(aIndex);
}
Bon Dia

Dakosmu

config CAMERA ANGLE, POSITION, DISTANCE, FOV, RATIO IN FILE.INI



Create in DATA

WorldName

second

create CAP.INI

COPY AND PASTE THIS INSIDE CAP.INI

[CAMERA ANGLE]
Angle X=30.000000
Angle Y=45.000000
Angle Z=0.000000

[CAMERA POSITION]
Position X=0.000000
Position Y=150.000000
Position Z=80.000000

[CAMERA DISTANCE]
Distance=120.000000
Z_Distance=60.000000

[CAMERA FOV]
FOV=60.000000
FOV1=45.000000
FOV2=75.000000
FOV3=60.000000
FOV4=60.000000
FOV5=60.000000
FOV6=60.000000
FOV7=60.000000
FOV8=60.000000
FOV9=60.000000

[CAMERA RATIO]
Ratio=1.333333   ; 4:3

//•    1.333333 → relación 4:3 (pantallas antiguas).
//•    1.777777 → relación 16:9 (pantallas modernas).
//•    2.333333 → relación 21:9 (ultrawide).


THE LAST

COPY AND PASTE CAP.INI IN WorldName
Bon Dia

Dakosmu

fix map effect


find
if (this->currentMap == WD_0LORENCIA || this->currentMap == WD_2DEVIAS || this->currentMap == WD_3NORIA)

remplace for

if (this->currentMap == WD_0LORENCIA || this->currentMap == WD_2DEVIAS || this->currentMap == WD_3NORIA)
      {
         //sprintf(FileName, "%s\\leaf01.jpg", WorldName);
         sprintf(FileName, (currentMap == 0 || currentMap == 3 || currentMap == 63) ? "%s\\leaf01.tga" : "%s\\leaf01.jpg", WorldName);
         LoadBitmap(FileName, BITMAP_LEAF1, GL_NEAREST_MIPMAP_NEAREST, GL_CLAMP_TO_EDGE, false);
      }
Bon Dia

Dakosmu

staba revisando el Codigo por que estoy limpiando el cliente y me doy cuenta que faltan algunas bmd y Texturas para agregar en el codigo

   gmClientModels->AccessModel(MODEL_POTION + 55, "Data\\Item\\", "roboxgreen");
   gmClientModels->AccessModel(MODEL_POTION + 56, "Data\\Item\\", "roboxred");
   gmClientModels->AccessModel(MODEL_POTION + 57, "Data\\Item\\", "roboxpurple");

Para que pueda toda las cajas xD Aun falta mucho por revisar pero es un aporte pequeño .. ! ^^ Suerte a todos  aplausos    VIVA @takumi12    grin2
Bon Dia

Dakosmu

Fix: Ocultar Skills Pasivas del Dark Spirit en el Macro (Helper)

Este fix evita que las habilidades pasivas del Dark Spirit (Cuervo) del Dark Lord aparezcan en la lista de selección de habilidades del Macro/Helper, ya que estas son pasivas y el sistema ya tiene sus propias opciones de configuración para el espíritu.

Archivo: NewUIMacroMain.cpp

1. Agregar función auxiliar (Blacklist) Primero, busca la función LoadSkillList y añade este bloque de código justo arriba de ella para definir qué skills queremos bloquear:

static bool IsBlockedMacroSkill(int skill) { switch (skill) { case 120: // Dark Spirit Passive 1 case 121: // Dark Spirit Passive 2 case 122: // Dark Spirit Passive 3 case 123: // Dark Spirit Passive 4 return true; default: return false; } }
2. Actualizar el filtro de habilidades

Dentro de la función SEASON3B::CNewUIMacroMain::LoadSkillList(int sType), busca la siguiente línea de condición:

Código antiguo: if (Magic_Icon && (Magic_Icon < 67 || Magic_Icon > 72))
Reemplázala por este código completo:

if (Magic_Icon && (Magic_Icon < 67 || Magic_Icon > 72) && !IsBlockedMacroSkill(Magic_Icon))
Razón del Fix
  • Limpieza Visual: Estas habilidades son pasivas y no se pueden "lanzar" manualmente, por lo que verlas en la lista de macros es innecesario.
  • Evitar Confusión: El Helper ya posee configuraciones dedicadas para el comportamiento del Dark Spirit. Exponer estas skills en la interfaz de usuario solo confunde al jugador.
  • Optimización: Al usar la función IsBlockedMacroSkill, puedes agregar fácilmente más IDs de skills en el futuro si necesitas ocultar otras habilidades pasivas.
Bon Dia

Dakosmu

#14
Regístrate para ver el enlace

void SEASON3B::CNewUIItemEnduranceInfo::runtime_render_fps(float x, float y, float RenderSizeX)
{
    unicode::t_char szDebugText[128];

    // Se mantiene el fondo pero se asegura que cubra el espacio necesario
    RenderImageF(IMAGE_BACK_FADED_R2, x, y, RenderSizeX, 15.0, 0.0, 0.0, 130.f, 126.0);

    g_pRenderText->SetFont(g_hFontBold);
    g_pRenderText->SetBgColor(0, 0, 0, 0);
    g_pRenderText->SetTextColor(CLRDW_GOLD);

    // Renderizado de FPS en una posición inicial
    unicode::_sprintf(szDebugText, "FPS: %.0f", FPS);
    g_pRenderText->RenderFont(x + 5, y, szDebugText, 0, 15.0, RT3_SORT_LEFT);

    // Renderizado de RTT con mayor separación (ajustado de 100 a +65 respecto a FPS)
    unicode::_sprintf(szDebugText, "RTT: %d ms", gsteady_clock->get_ping_time());
    g_pRenderText->RenderFont(x + 70, y, szDebugText, 0, 15.0, RT3_SORT_LEFT);
}




OTRO EJEMPLO

void SEASON3B::CNewUIItemEnduranceInfo::runtime_render_fps(float x, float y, float RenderSizeX)
{
unicode::t_char szDebugText[128];

// Dibujar el fondo oscuro con un ancho suficiente (RenderSizeX)
RenderImageF(IMAGE_BACK_FADED_R2, x, y, RenderSizeX, 15.0, 0.0, 0.0, 130.f, 126.0);

g_pRenderText->SetFont(g_hFontBold);
g_pRenderText->SetBgColor(0, 0, 0, 0);
g_pRenderText->SetTextColor(CLRDW_GOLD);

// Renderizado de FPS: Alineado a la izquierda con un pequeño margen de 5px
unicode::_sprintf(szDebugText, "FPS: %.0f", FPS);
g_pRenderText->RenderFont(x + 5, y, szDebugText, 45, 15.0, RT3_SORT_LEFT);

// Renderizado de RTT: Se incrementa la separación (x + 60) para evitar que se pisen
unicode::_sprintf(szDebugText, "RTT: %d ms", gsteady_clock->get_ping_time());
g_pRenderText->RenderFont(x + 60, y, szDebugText, 60, 15.0, RT3_SORT_LEFT);
}


SEGUNDO EJEMPLO

void SEASON3B::CNewUIItemEnduranceInfo::runtime_render_fps(float x, float y, float RenderSizeX)
{
unicode::t_char szDebugText[128];

// Renderizar fondo
RenderImageF(IMAGE_BACK_FADED_R2, x, y, RenderSizeX, 15.0, 0.0, 0.0, 130.f, 126.0);

g_pRenderText->SetFont(g_hFontBold);
g_pRenderText->SetBgColor(0, 0, 0, 0);

// Renderizar FPS (Color Dorado)
g_pRenderText->SetTextColor(CLRDW_GOLD);
unicode::_sprintf(szDebugText, "FPS: %.0f", FPS);
g_pRenderText->RenderFont(x + 5, y, szDebugText, 50, 15.0, RT3_SORT_CENTER);

// Lógica de color para RTT (Ping)
int iPing = gsteady_clock->get_ping_time();
if (iPing >= 200) {
g_pRenderText->SetTextColor(CLRDW_RED);
} else if (iPing >= 100) {
g_pRenderText->SetTextColor(CLRDW_ORANGE);
} else {
g_pRenderText->SetTextColor(CLRDW_WHITE);
}

// Renderizar RTT con separación suficiente para que no se peguen
unicode::_sprintf(szDebugText, "RTT: %d ms", iPing);
g_pRenderText->RenderFont(x + 55, y, szDebugText, 70, 15.0, RT3_SORT_CENTER);
}
Bon Dia

🡱 🡳
Real Time Web Analytics