Jump to content

Denizeri24

Member
  • Posts

    188
  • Joined

  • Last visited

  • Feedback

    0%

Posts posted by Denizeri24

  1. 1 hour ago, Abel(Tiger) said:

    If you use the code from the leaked Rubinum source, it does not mean you have solved the problem. Also, if you use modern coding techniques from C++ new standards, it does not mean all the code will fix itself. Your vector is still sorted, and the pointer in the map is still pointing to the old vector position.

    Add this code after the std::sort, and you will be surprised:

     

    	for (auto it = m_map_itemTableByVnum.begin(); it != m_map_itemTableByVnum.end(); ++it)
    	{
    		DWORD key = it->first;               // Access the key
    		TItemTable* value = it->second;      // Access the value
    		
    		if(value->dwVnum != key)
    		{
    			sys_err("Map Key %u --- Value vnum %u", key, value->dwVnum);
    		}
    	}

     

    I dont any use code from rubinum source, I using mainline source (razuning v2 from turkmmo). I just clear unnecessary from this function.

  2. bool CClientManager::InitializeItemTable()
    {
    	std::map<int32_t, const char *> localMap;
    	cCsvTable nameData;
    
    	if (!nameData.Load("item_names.txt", '\t'))
    	{
    		fmt::fprintf(stderr, "item_names.txt couldn't be loaded or its format is incorrect.\n");
    		return false; // There's no reason to continue without names for us (i dont like korean)
    	}
    
    	nameData.Next(); // skip the description
    
    	while (nameData.Next())
    	{
    		localMap[static_cast<int32_t>(std::strtol(nameData.AsStringByIndex(0), nullptr, 0))] = nameData.AsStringByIndex(1);
    	}
    
    	cCsvTable data;
    
    	if (!data.Load("item_proto.txt", '\t'))
    	{
    		fmt::fprintf(stderr, "item_proto.txt couldn't be loaded or the format is incorrect \n");
    		return false;
    	}
    
    	data.Next(); // skip first row (descriptions)
    	m_vec_itemTable.resize(data.m_File.GetRowCount() - 1); // set the size of the vector
    	memset(&m_vec_itemTable[0], 0, sizeof(TItemTable) * m_vec_itemTable.size()); // zero initialize
    	auto item_table = &m_vec_itemTable[0];
    
    	for (; data.Next(); ++item_table)
    	{
    		if (!Set_Proto_Item_Table(item_table, data, localMap))
    		{
    			fmt::fprintf(stderr, "Invalid item table. VNUM: %u\n", item_table->dwVnum);
    		}
    
    		m_map_itemTableByVnum.emplace(item_table->dwVnum, item_table);
    	}
    
    	std::sort(std::execution::par, m_vec_itemTable.begin(), m_vec_itemTable.end(), FCompareVnum());
    	data.Destroy();
    	nameData.Destroy();
    	return true;
    }

    There's zero initialization here. So I don't think your fix is needed..

    • Lmao 1
  3. 10 hours ago, Draveniou1 said:

    you go in locale_inc.h

    seaarch

    #define ENABLE_COSTUME_SYSTEM

    change with

    #ifdef DISABLE_SYSTEM
    	#define ENABLE_COSTUME_SYSTEM
    #endif

     

    if you have another system  add in #ifdef DISABLE_SYSTEM and your system disabled

    if the system exists on the server it does the same in the service.h game source

    rk4iYGt.jpg

    • kekw 2
  4. 18 minutes ago, xXIntelXx said:

    Usually the default GNU-Makefile from their github (branch master) is fine, just select the same compiler as the game to not have undefined references to basic_string and what not.

    Also side note, gcc13 on freebsd 13.0/13.1 32bit from packages is utterly broken (at least on the latest ISOs I've tried)

    gcc13 is devel version, so thats normal. my files give cores sometimes too with clang-devel hehe

  5. Granny, Miles and SpeedTree libraries are licensed and cannot be used without a license. Additional libraries of the Miles library, such as the MP3 decoder, are also licensed separately.

     

    All GR2 models used in the game are licensed by Ymir. But I don't think Gameforge will bother with you unless your server reaches a lot of people (like rubinum / aeldra)

    • Metin2 Dev 1
  6. 2 hours ago, TAUMP said:
    p.bHPPercent = MINMAX(0, ((int64_t)m_pkChrTarget->GetHP() * 100) / m_pkChrTarget->GetMaxHP(), 100);
    
    p.bHPPercent = MINMAX(0, (((int64_t)GetHP()) * 100) / GetMaxHP(), 100);
    

    This is enough, Dear Peter.
     

    p.bHPPercent = MINMAX(0, (((int64_t)GetHP()) * 100) / GetMaxHP(), 100);
    
    p.bHPPercent = std::minmax<uint8_t>((GetHP() * 100) / GetMaxHP(), 100).first;

    This is enough, Dear TAUMP.

    • Cry 1
    • Lmao 1
  7. Yes, I checked and it doesn't really work. I never noticed..

    i think this bonus does not affect the chance of an item drop chance, but the amount of an item count. If it worked correctly, when the item dropped, it would have dropped 2 pieces instead of 1 piece, or 10 pieces instead of 5 pieces;

     

    for my fix;

    search " void CHARACTER::Reward " in char_battle.cpp
    
    
    search again " if (ITEM_MANAGER::instance().CreateDropItem(this, pkAttacker, s_vec_item)) "
    
    add after " item = s_vec_item[0]; " this;
    
    if (pkAttacker->GetPoint(POINT_ITEM_DROP_BONUS) >= number(1, 100) && item->IsStackable())
    {
    	item->SetCount(item->GetCount() * 2);
    }

     

    TetGPQ8.jpg

     

     

    NOTE : I just made the fix now, I don't know if there will be a problem..

×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.