Jump to content

Recommended Posts

M2 Download Center

This is the hidden content, please
( Internal )

Hey,

 

Today i will show you how can you stop the collision while a player is Invisible (GM Command or Ninja Stealth Skill).

 

Code:

File: InstanceBaseBattle.cpp
  
Find:
	BOOL CInstanceBase::CheckAdvancing()

Search for:
	if (rkActorSelf.TestActorCollision(rkActorEach))

For those who use Marty Source:
	-

	Add above:
		CInstanceBase * pkInstBase = CPythonCharacterManager::Instance().GetInstancePtr(rkActorEach.GetVirtualID());

		if (pkInstBase)
		{
			if (pkInstBase->HasAffect(AFFECT_INVISIBILITY) && !__MainCanSeeHiddenThing() ||
				pkInstBase->HasAffect(AFFECT_EUNHYEONG) && !__MainCanSeeHiddenThing())
				continue;
		}

Otherwise:
	Add above:
		CInstanceBase * pkInstBase = CPythonCharacterManager::Instance().GetInstancePtr(rkActorEach.GetVirtualID());

		if (pkInstBase)
		{
			if (pkInstBase->HasAffect(AFFECT_INVISIBILITY) || pkInstBase->HasAffect(AFFECT_EUNHYEONG))
				continue;
		}

 

For those who don't have the HasAffect function:

File: InstanceBaseEffect.cpp

Add the function somewhere:
	int CInstanceBase::HasAffect(DWORD dwIndex)
	{
		if (dwIndex >= AFFECT_NUM)
			return 0;

		return m_adwCRCAffectEffect[dwIndex];
	}

File: InstanceBase.h

Search for:
	void __ClearAffects();

Add above:
	int	HasAffect(DWORD dwIndex);

 

  • Metin2 Dev 15
  • Good 7
  • Love 1
  • Love 12
Link to comment
https://metin2.dev/topic/24510-stealth-invisible-ninja-gm-collision/
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

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.