Jump to content

Block Alignment Update System by Map


Recommended Posts

M2 Download Center

This is the hidden content, please
( Internal )

 

I saw this guy looking hasta .. it provides money for shit, so I wanted to paint a small tutorial sucks these functions.

 

[File: Src/game/src/service.h]

#define ENABLE_PROTECT_ALIGNMENT
#ifdef ENABLE_PROTECT_ALIGNMENT
	#define IS_MAPINDEX_PROTECT_ALIGN(map)		(200==(map)||201==(map)||(202)==(map))
#endif

[File: Src/game/src/char_battle.cpp]

//1.) Search:

						if (g_iUseLocale && pkKiller->GetParty())
						{
							FPartyAlignmentCompute f(-20000, pkKiller->GetX(), pkKiller->GetY());
							pkKiller->GetParty()->ForEachOnlineMember(f);

							if (f.m_iCount == 0)
								pkKiller->UpdateAlignment(-20000);

//2.) Delete and replaced with this:

						if (g_iUseLocale && pkKiller->GetParty())
						{
#ifdef ENABLE_PROTECT_ALIGNMENT
							if (IS_MAPINDEX_PROTECT_ALIGN(GetMapIndex()))	{	return;	}	
#endif
							FPartyAlignmentCompute f(-20000, pkKiller->GetX(), pkKiller->GetY());
							pkKiller->GetParty()->ForEachOnlineMember(f);

							if (f.m_iCount == 0)
								pkKiller->UpdateAlignment(-20000);

[File: Src/game/src/char.cpp]

//1.) Search:

UpdateAlignment(5 * (dwPlayedTime / 60000));

//2.) Delete and replaced with this:

#ifdef ENABLE_PROTECT_ALIGNMENT
			if (IS_MAPINDEX_PROTECT_ALIGN(GetMapIndex()))	{	return;	}
#endif	
				UpdateAlignment(5 * (dwPlayedTime / 60000));

 

PS: I have not tested this, I just wrote. But in principle it should work.

 

 

------------------- EDIT:

Fcking shit or you can make that easy:

[File: Src/game/src/char_battle.cpp]

void CHARACTER::UpdateAlignment(int iAmount)
{
#ifdef ENABLE_PROTECT_ALIGNMENT
	if (IS_MAPINDEX_PROTECT_ALIGN(GetMapIndex()))	{	return;	}	
#endif
		bool bShow = false;
		if (m_iAlignment == m_iRealAlignment)
			bShow = true;
		int i = m_iAlignment / 10;
		m_iRealAlignment = MINMAX(-200000, m_iRealAlignment + iAmount, 200000);
		if (bShow)
		{
			m_iAlignment = m_iRealAlignment;
			if (i != m_iAlignment / 10)
				UpdatePacket();
		}
}

 

  • Metin2 Dev 1
  • Good 1
  • Love 5
Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

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.