Jump to content

Stealth / Invisible (Ninja / GM) Collision


Recommended Posts

  • Bronze

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 11
  • Good 6
  • Love 1
  • Love 10
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.