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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



  • Activity

    1. 1

      Loading index and waypoint files like GF

    2. 3

      HWID ban

    3. 0

      Auth problem

    4. 2

      Starting a metin2 server on a VPS ?

    5. 3

      Client afk in background - Effects started to fun faster

    6. 28

      Horse Appearance via Database

    7. 0

      [INTERNATIONAL] Kuragari2 Middleschool - ONLINE

  • Recently Browsing

    No registered users viewing this page.

Shoutbox

Shoutbox

Chatroom Rules

 

Join our Discord

A request for help = Shoutbox Ban

Be respectful & Respect the rules

 

×
×
  • 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.