Jump to content

Recommended Posts

Hello,

when i compiling the source i become this error. i used freebsd 12.1 and i dont understand the problem

https://metin2.download/picture/r3F9504x09DVmF8K988YXgTtGTP6KMUj/.gif

https://metin2.download/picture/r3F9504x09DVmF8K988YXgTtGTP6KMUj/.gif

i try NULL to nullptr but still same error when i try NULL to 0 gamecore

 

Pls help me or say me how i can fix that.

Edited by Metin2 Dev
Core X - External 2 Internal
Link to comment
Share on other sites

struct FCFight
{
	LPCHARACTER pkLeaver;
	DWORD stateType;
	FCombatFight(LPCHARACTER ch, DWORD state) : pkLeaver(ch), stateType(state) {}

	void operator() (LPENTITY ent)
	{
		if (ent->IsType(ENTITY_CHARACTER))
		{
			LPCHARACTER ch = static_cast<LPCHARACTER>(ent);
			if (ch && ch->IsPC())
			{
				switch (stateType)
				{
					case C_FIGHT_ADD:
					{
						TargetInfo * pInfo = CTargetManager::instance().GetTargetInfo(ch->GetPlayerID(), COMBAT_FIGHT_INDEX, pkLeaver->GetVID());
						if (!pInfo)
							CTargetManager::Instance().CreateTarget(ch->GetPlayerID(), C_ZONE_INDEX_TARGET, pkLeaver->GetName(), C_FIGHT_INDEX,pkLeaver->GetVID(), NULL, ch->GetMapIndex(), "1");
					}
					break;

					case C_FIGHT_REMOVE:
						CTargetManager::instance().DeleteTarget(ch->GetPlayerID(), C_FIGHT_INDEX, pkLeaver->GetName());
						break;
				}
			}
		}
	}
};

 

Link to comment
Share on other sites

  • Developer
15 minutes ago, Bizzy said:

struct FCFight
{
	LPCHARACTER pkLeaver;
	DWORD stateType;
	FCombatFight(LPCHARACTER ch, DWORD state) : pkLeaver(ch), stateType(state) {}

	void operator() (LPENTITY ent)
	{
		if (ent->IsType(ENTITY_CHARACTER))
		{
			LPCHARACTER ch = static_cast<LPCHARACTER>(ent);
			if (ch && ch->IsPC())
			{
				switch (stateType)
				{
					case C_FIGHT_ADD:
					{
						TargetInfo * pInfo = CTargetManager::instance().GetTargetInfo(ch->GetPlayerID(), COMBAT_FIGHT_INDEX, pkLeaver->GetVID());
						if (!pInfo)
							CTargetManager::Instance().CreateTarget(ch->GetPlayerID(), C_ZONE_INDEX_TARGET, pkLeaver->GetName(), C_FIGHT_INDEX,pkLeaver->GetVID(), NULL, ch->GetMapIndex(), "1");
					}
					break;

					case C_FIGHT_REMOVE:
						CTargetManager::instance().DeleteTarget(ch->GetPlayerID(), C_FIGHT_INDEX, pkLeaver->GetName());
						break;
				}
			}
		}
	}
};

 

When he told you to show us the function...he meant the function that generates the error.......

The fix that @WeedHexprovided should work, If I remember correctly there are multiple occurrences in char_item.cpp

  • Love 1

r

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

Announcements



×
×
  • 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.