Jump to content

stop mob collision with rank pawn


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
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
Link to comment
Share on other sites

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
Link to comment
Share on other sites

  • 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
Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

Announcements



  • Similar Content

  • Activity

    1. 4

      Feeding game source to LLM

    2. 0

      Quest 6/7 Problem

    3. 5

      Effect weapons

    4. 0

      [C++] Fix Core Downer Using Negative Number in GM Codes

    5. 3

      Crystal Metinstone

    6. 4

      Feeding game source to LLM

    7. 113

      Ulthar SF V2 (TMP4 Base)

    8. 4

      Feeding game source to LLM

  • Recently Browsing

    • No registered users viewing this page.
×
×
  • 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.