Jump to content

Recommended Posts

  • Developer
2 hours ago, Wandererr said:

Hello , I have some problem, I set up the drop in mysql, did the reload, no syserr, can see the changes, but the mob doesnt drop the item I want, despite the drop rate 100% 

any idea?

What's the drop scale in length.h? If that's 1000 then you have to set 1000 as prob to have 100%.

 

Keep in mind that neither m2 default config really use the prob you set directly. My system keep use the same code ymir use for default setting files. So the drop rate gets change by the level delta (difference of level from your and mob level).

As far as i Remember kill and level groups don't elaborate that much the drop rate keeping it closer to the one you set.

My youtube channel  on which you can see my works here

In length.h its the basic u gave , the 1000, in the table also 1000, spawned 100 mob and none of them droped the only item was given. I also deleted the serverside txt's content 

The mob was wild dog(101), and my level was between 1 and 10, and nothing dropped

Edited by Wandererr
19 hours ago, Ikarus_ said:

Double check the installation steps

Thanks for you replies 🙂

 

I added it from 0 , also the tables, now working, and I think I know what was wrong. error-1273-unknown-collation-utf8mb4-0900-ai-ci got that error when tried to add the sql-s, so I changed it to utf8mb4_"something"_ci, second time I changed it to "utf8mb4_unicode_ci", now working perfectly

 

Edited by Wandererr
On 10/19/2024 at 6:01 PM, Wandererr said:

Thanks for you replies 🙂

 

I added it from 0 , also the tables, now working, and I think I know what was wrong. error-1273-unknown-collation-utf8mb4-0900-ai-ci got that error when tried to add the sql-s, so I changed it to utf8mb4_"something"_ci, second time I changed it to "utf8mb4_unicode_ci", now working perfectly

 

Just use latin1 swedish_ci..


*** LITTLE UPDATE ***

If you are using this fix for target info by @ Intel CLICK.
So here is the modified code..
 

mob_drop_manager.cpp
#ifdef ENABLE_TARGET_INFO_SYSTEM
void MOB_DROP_MANAGER::MakeDropInfoItems(LPCHARACTER pkChar, LPCHARACTER pkKiller, std::vector<std::pair<int, int>>& items)
{
	if (!pkChar || !pkKiller)
		return;

	ITEM_MANAGER& rItemManager = ITEM_MANAGER::instance();
	DWORD dwMobVnum = pkChar->GetRaceNum();

	// common drop
	{
		BYTE bRank = pkChar->GetMobRank();
		COMMON_DROP_MAP::iterator it = m_commonDropMap.find(bRank);

		if (it != m_commonDropMap.end())
		{
			COMMON_DROP_VEC& rVec = it->second;
			for (auto& rDropInfo : rVec)
			{
				if (rDropInfo.iLevelStart > pkKiller->GetLevel() || rDropInfo.iLevelEnd < pkKiller->GetLevel())
					continue;

				TItemTable* table = rItemManager.GetTable(rDropInfo.dwItemVnum);
				if (!table)
					continue;

				items.push_back(std::make_pair(rDropInfo.dwItemVnum, 1));
			}
		}
	}

	// default drop
	{
		DEFAULT_DROP_MAP::iterator it = m_defaultDropMap.find(dwMobVnum);
		if (it != m_defaultDropMap.end())
		{
			DEFAULT_DROP_VEC& rVec = it->second;
			for (auto& rDropInfo : rVec)
			{
				items.push_back(std::make_pair(rDropInfo.dwItemVnum, rDropInfo.iCount));
			}
		}
	}

	// mob drop kill
	{
		MOB_DROP_GROUP_KILL_MAP_VNUM::iterator it = m_dropGroupKillMap.find(dwMobVnum);
		if (it != m_dropGroupKillMap.end())
		{
			MOB_DROP_GROUP_KILL_MAP_ID& rGroupMap = it->second;
			for (auto& groupPair : rGroupMap)
			{
				MobDropKillGroupInfo& rGroupInfo = groupPair.second;
				if (rGroupInfo.IsEmpty())
					continue;

				for (auto& rDropInfo : rGroupInfo.itemVector)
				{
					items.push_back(std::make_pair(rDropInfo.dwItemVnum, rDropInfo.iCount));
				}
			}
		}
	}

	// mob drop level
	{
		MOB_DROP_GROUP_LEVEL_MAP_VNUM::iterator it = m_dropGroupLevelMap.find(dwMobVnum);
		if (it != m_dropGroupLevelMap.end())
		{
			MOB_DROP_LEVEL_ID_MAP& rMapID = it->second;
			for (auto& idPair : rMapID)
			{
				MobDropLevelGroupInfo& rGroupInfo = idPair.second;
				if (pkKiller->GetLevel() < rGroupInfo.iLevelStart || pkKiller->GetLevel() > rGroupInfo.iLevelEnd)
					continue;

				for (auto& rDropInfo : rGroupInfo.itemVector)
				{
					items.push_back(std::make_pair(rDropInfo.dwItemVnum, rDropInfo.iCount));
				}
			}
		}
	}
}
#endif
mob_drop_manager.h
#ifdef ENABLE_TARGET_INFO_SYSTEM
    void MakeDropInfoItems(LPCHARACTER pkChar, LPCHARACTER pkKiller, std::vector<std::pair<int, int>>& items);
#endif
  • 7 months later...

Don't use any images from : imgur, turkmmop, freakgamers, inforge, hizliresim... Or your content will be deleted without notice...
Use : https://metin2.download/media/add/

Please use https://metin2.download/ when uploading files smaller than 100MB, otherwise the approval will take longer due to manual upload.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • 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.