Jump to content

Recommended Posts

Hello, i'm trying to stop the collision for mobs with rank Pawn

for example like this but instead of race vnum using the rank of the mob


#ifdef ENABLE_PETS_WITHOUT_COLLISIONS
    if (rVictim.GetRace()>=34001 && rVictim.GetRace()<=34119)
        return FALSE;
#endif

something like this could be made?

    if (rVictim.GetMobRank() =< 1)
        return FALSE;

Link to comment
https://metin2.dev/topic/28063-stop-mob-collision-with-rank-pawn/
Share on other sites

  • Honorable Member
	const CPythonNonPlayer::TMobTable* pkMobTable = CPythonNonPlayer::instance().GetTable(rVictim.GetRace());
	if (pkMobTable && pkMobTable->bRank == CPythonNonPlayer::MOB_RANK_PAWN)
		return false;

You also need to include PythonNonPlayer.h

#include "../UserInterface/PythonNonPlayer.h"

 

Edited by Owsap
  • Love 1
2 hours ago, Owsap said:
	const CPythonNonPlayer::TMobTable* pkMobTable = CPythonNonPlayer::instance().GetTable(rVictim.GetRace());
	if (pkMobTable && pkMobTable->bRank == CPythonNonPlayer::MOB_RANK_PAWN)
		return false;

You also need to include PythonNonPlayer.h

#include "../UserInterface/PythonNonPlayer.h"

 

Thank you for the answer ? I included it but i have this prolem:
OoOWTJf.png

 

In my binary files i searched for MOB_RANK_PAWN but there isn't, only in server source.
In the binary the rank of mob i think are only here in PythonNonPlayerModule.cpp
3vChmRX.png

Edited by Metin2 Dev
Core X - External 2 Internal
  • Honorable Member
24 minutes ago, Cripplez said:

Thank you for the answer ? I included it but i have this prolem:
OoOWTJf.png

 

In my binary files i searched for MOB_RANK_PAWN but there isn't, only in server source.
In the binary the rank of mob i think are only here in PythonNonPlayerModule.cpp
3vChmRX.png

Just replace CPythonNonPlayer::MOB_RANK_PAWN with 0.

Edited by Metin2 Dev
Core X - External 2 Internal
10 minutes ago, Owsap said:

Just replace CPythonNonPlayer::MOB_RANK_PAWN with 0.

I tried replacing it with 0 but when i compile i get this errors ?
dzc3rAT.png

Edited by Metin2 Dev
Core X - External 2 Internal

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.