Jump to content

Recommended Posts

  • Honorable Member

M2 Download Center

This is the hidden content, please
( Internal )
This is the hidden content, please
( GitHub )

This is the hidden content, please

  • Reversed from 22.2.7.0 Official Binary

 

 

Edited by Mali
  • Metin2 Dev 231
  • Eyes 4
  • Dislove 1
  • Angry 1
  • Sad 1
  • Cry 2
  • Smile Tear 1
  • Confused 1
  • Scream 1
  • Good 64
  • Love 12
  • Love 128

 

Link to comment
https://metin2.dev/topic/26582-official-party-member-on-minimap-reversed/
Share on other sites

  • Honorable Member

Thanks for sharing, as always!
You could also check the position realtime while the player is in range so it updates faster.

fd9f73513d76c3345150fd5e24b8ee9f.gif

/// 1. @ UserInterface/PythonMiniMap.cpp
// Search @ void CPythonMiniMap::RenderAtlas
				const auto& PartyInfo = it->second;
				__GlobalPositionToAtlasPosition(PartyInfo->lX - m_dwAtlasBaseX, PartyInfo->lY - m_dwAtlasBaseY, &PartyInfo->fScreenX, &PartyInfo->fScreenY);

// Replace with
				long xPos = PartyInfo->lX;
				long yPos = PartyInfo->lY;

				CInstanceBase* pkInst = CPythonCharacterManager::Instance().GetInstancePtrByName(pPartyMemberInfo->strName.c_str());
				if (pkInst)
				{
					TPixelPosition kInstPos;
					pkInst->NEW_GetPixelPosition(&kInstPos);
					xPos = kInstPos.x + m_dwAtlasBaseX;
					yPos = kInstPos.y + m_dwAtlasBaseY;

				}

				__GlobalPositionToAtlasPosition(xPos - m_dwAtlasBaseX, yPos - m_dwAtlasBaseY, &PartyInfo->fScreenX, &PartyInfo->fScreenY);

 

Edited by Metin2 Dev
Core X - External 2 Internal
  • Metin2 Dev 2
  • Good 3
  • Love 2
  • Love 7
  • Honorable Member

giphy.gif giphy.gif
The images have a humorous purpose, please do not take this seriously.

Edited by Metin2 Dev
Core X - External 2 Internal
  • Metin2 Dev 1
  • Lmao 30

GhwYizE.gif

  • Honorable Member

New Icon From Owsap:

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

Edited by Metin2 Dev
Core X - External 2 Internal
  • Metin2 Dev 6
  • Confused 1
  • Good 1
  • Love 2
  • Love 7

 

Thank you! :D

In PythonMiniMap.cpp there are 2 of these:

	m_AtlasMarkInfoVectorIterator = m_AtlasWarpInfoVector.begin();
	while (m_AtlasMarkInfoVectorIterator != m_AtlasWarpInfoVector.end())
	{
		...
	}

 

Should I add this under both of them or only one? If one which one? first or second? thanks

#if defined(__BL_PARTY_POSITION__)
	for (const auto& PartyInfo : mAtlasPartyPlayerMark)
	{
		const float fffx = static_cast<float>(PartyInfo.second->lX) - static_cast<float>(m_dwAtlasBaseX);
		const float fffy = static_cast<float>(PartyInfo.second->lY) - static_cast<float>(m_dwAtlasBaseY);

		if (fffx - fCheckWidth / 2 < fRealX && fffx + fCheckWidth > fRealX &&
			fffy - fCheckWidth / 2 < fRealY && fffy + fCheckHeight > fRealY)
		{
			rReturnString = PartyInfo.second->sName;
			*pReturnPosX = fffx;
			*pReturnPosY = fffy;
			*pdwTextColor = CInstanceBase::GetIndexedNameColor(CInstanceBase::NAMECOLOR_PARTY);
			return true;
		}
	}
#endif

 

  • 3 weeks later...
On 4/17/2021 at 10:47 PM, Owsap said:

Thanks for sharing, as always!
You could also check the position realtime while the player is in range so it updates faster.

fd9f73513d76c3345150fd5e24b8ee9f.gif


/// 1. @ UserInterface/PythonMiniMap.cpp
// Search @ void CPythonMiniMap::RenderAtlas
				const auto& PartyInfo = it->second;
				__GlobalPositionToAtlasPosition(PartyInfo->lX - m_dwAtlasBaseX, PartyInfo->lY - m_dwAtlasBaseY, &PartyInfo->fScreenX, &PartyInfo->fScreenY);

// Replace with
				long xPos = PartyInfo->lX;
				long yPos = PartyInfo->lY;

				CInstanceBase* pkInst = CPythonCharacterManager::Instance().GetInstancePtrByName(pPartyMemberInfo->strName.c_str());
				if (pkInst)
				{
					TPixelPosition kInstPos;
					pkInst->NEW_GetPixelPosition(&kInstPos);
					xPos = kInstPos.x + m_dwAtlasBaseX;
					yPos = kInstPos.y + m_dwAtlasBaseY;

				}

				__GlobalPositionToAtlasPosition(xPos - m_dwAtlasBaseX, yPos - m_dwAtlasBaseY, &PartyInfo->fScreenX, &PartyInfo->fScreenY);

 

don't work, can u please fix it?

Edited by Metin2 Dev
Core X - External 2 Internal
  • 3 weeks later...
  • 7 months later...
On 4/17/2021 at 8:45 PM, Mali said:

 

If you have a bug, comment section below.

Hello Mali, I just noticed a weird bug. It all works perfectly, but in some maps when you go far the mark in the minimap of your party members disappear completely.

For example, in village 1 even when you go really far it is all okay, but in some others maps when you go far this happens:

caagHhS.gif


I thought it was a bug for the maps in core99 because i tried another map in the same core99 and had this bug too, then i tried again another map in the core99 but this time that map did not have this problem. Do you have any ideas?

 

Here for example everything is okay

Spoiler

iRHhD8J.gifDnGcu71.gif

 

Edited by Metin2 Dev
Core X - External 2 Internal
  • 1 month later...
On 4/18/2021 at 2:56 PM, Cripplez said:

Thank you! :D

In PythonMiniMap.cpp there are 2 of these:

	m_AtlasMarkInfoVectorIterator = m_AtlasWarpInfoVector.begin();
	while (m_AtlasMarkInfoVectorIterator != m_AtlasWarpInfoVector.end())
	{
		...
	}

 

Should I add this under both of them or only one? If one which one? first or second? thanks

#if defined(__BL_PARTY_POSITION__)
	for (const auto& PartyInfo : mAtlasPartyPlayerMark)
	{
		const float fffx = static_cast<float>(PartyInfo.second->lX) - static_cast<float>(m_dwAtlasBaseX);
		const float fffy = static_cast<float>(PartyInfo.second->lY) - static_cast<float>(m_dwAtlasBaseY);

		if (fffx - fCheckWidth / 2 < fRealX && fffx + fCheckWidth > fRealX &&
			fffy - fCheckWidth / 2 < fRealY && fffy + fCheckHeight > fRealY)
		{
			rReturnString = PartyInfo.second->sName;
			*pReturnPosX = fffx;
			*pReturnPosY = fffy;
			*pdwTextColor = CInstanceBase::GetIndexedNameColor(CInstanceBase::NAMECOLOR_PARTY);
			return true;
		}
	}
#endif

 

Hello, what about this ? where do we put this part ?

“𝓐𝓵𝓵 𝔀𝓮 𝓱𝓪𝓿𝓮 𝓽𝓸 𝓭𝓮𝓬𝓲𝓭𝓮 𝓲𝓼 𝔀𝓱𝓪𝓽 𝓽𝓸 𝓭𝓸 𝔀𝓲𝓽𝓱 𝓽𝓱𝓮 𝓽𝓲𝓶𝓮 𝓽𝓱𝓪𝓽 𝓲𝓼 𝓰𝓲𝓿𝓮𝓷 𝓾𝓼.” ~ 𝓖𝓪𝓷𝓭𝓪𝓵𝓯 𝓽𝓱𝓮 𝓖𝓻𝓮𝔂

  • Honorable Member
1 hour ago, Jimmermania said:

Hello, what about this ? where do we put this part ?

use your brain

this btw:

Spoiler
	m_AtlasMarkInfoVectorIterator = m_AtlasWarpInfoVector.begin();
	while (m_AtlasMarkInfoVectorIterator != m_AtlasWarpInfoVector.end())
	{
		TAtlasMarkInfo & rAtlasMarkInfo = *m_AtlasMarkInfoVectorIterator;
		if (rAtlasMarkInfo.m_fX-fCheckWidth/2<fRealX && rAtlasMarkInfo.m_fX+fCheckWidth>fRealX && 
			rAtlasMarkInfo.m_fY-fCheckWidth/2<fRealY && rAtlasMarkInfo.m_fY+fCheckHeight>fRealY)
		{
			rReturnString = rAtlasMarkInfo.m_strText;
			*pReturnPosX = rAtlasMarkInfo.m_fX;
			*pReturnPosY = rAtlasMarkInfo.m_fY;
			*pdwTextColor = CInstanceBase::GetIndexedNameColor(CInstanceBase::NAMECOLOR_WARP);//m_MarkTypeToColorMap[rAtlasMarkInfo.m_byType];
			return true;
		}
		++m_AtlasMarkInfoVectorIterator;
	}

 

 

Edited by Mali
btw
  • Lmao 1
  • Love 1

 

  • 9 months later...
  • Premium
On 5/9/2021 at 6:36 AM, Ulthar said:

thanks for sharing!

Its not working for me...

everything builded without any error.

syserr clean

Any help please?

I tried to add it again... I dont know how is it working now, but its working. xD
thanks for the post ofc, have a nice day, Mali. I loveyousomuch♥

Edited by Ulthar
  • Love 1

Ulthar

  • 2 months later...
  • 1 month later...

Hi, added it, everything works except one thing. The party leader can't see the party members on the map if they go too far away, but the party members can see each other and the leader as well, no matter how far they go. Any thoughts on how to fix that? 

3 hours ago, bl1nd3r said:

Hi, added it, everything works except one thing. The party leader can't see the party members on the map if they go too far away, but the party members can see each other and the leader as well, no matter how far they go. Any thoughts on how to fix that? 

Edit: The actual problem is that everyone in the party can see the party leader, no matter where he is, but the party leader can see other members only if they're close. Also, members can see each other only if they're close to each other. 

The function GetPartyMemberPosition returns 0 for x and 0 for y once I get a bit far. This of course happens every 3 seconds once it updates. 

 

So I guess it's either a problem with this function:
 

bool CPythonPlayer::GetPartyMemberPosition(DWORD dwPID, D3DXVECTOR2* v2Position)
{
	std::map<DWORD, TPartyMemberInfo>::const_iterator it = m_PartyMemberMap.find(dwPID);
	if (it == m_PartyMemberMap.end())
		return false;

	v2Position->x = it->second.lX;
	v2Position->y = it->second.lY;
	return true;
}

Or the problem is server side, but I can't seem to figure it out. 

Edited by bl1nd3r

Can it be because the version that is posted here : 

This is the hidden content, please
 is not the latest? Cause the code these guys have been posting here doesn't match with the code inside the resource. The github url is no longer valid. I can't find the icon either.

  • Metin2 Dev 21
  • Love 4
  • Former Staff
57 minutes ago, bl1nd3r said:

Can it be because the version that is posted here : 

This is the hidden content, please
 is not the latest? Cause the code these guys have been posting here doesn't match with the code inside the resource. The github url is no longer valid. I can't find the icon either.

The archive on metin2.download is up to date, @ Mali sent me a new version on February 15th.

  • Love 1
  • Love 1
14 minutes ago, ASIKOO said:

The archive on metin2.download is up to date, @ Mali sent me a new version on February 15th.

Shouldn't it include the new icon and the code for it then? Since it did in the past. 

  • Former Staff
11 minutes ago, bl1nd3r said:

Shouldn't it include the new icon and the code for it then? Since it did in the past. 

 

Below are all the old versions that have been uploaded to metin2.download. I'll let you check for yourself.

https://www.mediafire.com/file/af3rgxzfe19eakn/Official_Party_Member_On_Minimap.zip/file
9 minutes ago, ASIKOO said:

 

Below are all the old versions that have been uploaded to metin2.download. I'll let you check for yourself.

https://www.mediafire.com/file/af3rgxzfe19eakn/Official_Party_Member_On_Minimap.zip/file

Thanks, yup, the whole code is there in the latest version that you sent from that archive, but the icon is missing ? .

1 hour ago, bl1nd3r said:

Thanks, yup, the whole code is there in the latest version that you sent from that archive, but the icon is missing ? .

Nevermind, I'm blind, the icon is there, in the archive you shared. But I was right with the other thing, the archive uploaded here: 

This is the hidden content, please
 is not complete ? .

  • Metin2 Dev 22
  • Eyes 1
  • Facepalm 1
  • Good 1
  • Love 4

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.