Jump to content

Stealth / Invisible (Ninja / GM) Collision


Recommended Posts

M2 Download Center

Download Here ( 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);

 

  • Love 4
Link to post
  • ASIKOO changed the title to Stealth / Invisible (Ninja / GM) Collision

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

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.