Jump to content

Getting monster race client


Recommended Posts

Hi,

I'm using this function to get monsters type

DWORD CPythonNonPlayer::GetMonsterRaceFlag(DWORD dwVnum)
{
	const CPythonNonPlayer::TMobTable * c_pTable = GetTable(dwVnum);
	if (!c_pTable)
	{
		return 0;
	}

	return c_pTable->dwRaceFlag;
}

it works perfectly when the monster only have one type eg. ANIMAL, DEVIL, ATT_ELEC etc

but whenever the mob have more than one type (eg, ANIMAL, ATT_ELEC) it always returns 0

What am I missing ?

Link to comment
Share on other sites

  • 1 year later...
  • 1 year later...
  • Honorable Member

This is due to the dump_proto only reading one value although you have more values separated with a delimiter so you have to make sure you have the right delimiter.
If your mob_proto.txt has for example:

ANIMAL,ZODIAC

You have to make sure your dump_proto is reading the symboly ,
And if your dump_proto for example has:

ANIMAL|ZODIAC

Then the delimiter you should be using is |
Here is an example.

/// 1. @ dump_proto/ItemCSVReader.cpp
// Search @ int get_Mob_RaceFlag_Value
	string* arInputString = StringSplit(inputString, "|"); // 프로토 정보 내용을 단어별로 쪼갠 배열.

// Replace with
	string* arInputString = StringSplit(inputString, ","); // 프로토 정보 내용을 단어별로 쪼갠 배열.

 

Edited by Owsap
  • Love 1
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. 13

      Metin2 Closed Beta Content (2003-2004)

    2. 0

      PRESENTATION PAGE [OLDGODSMT2 RELEASE]

    3. 25

      [SRC] Metin2 on LINUX - The Old Metin2 Project

    4. 2

      United/Club/Midgard serverfiles?

    5. 13

      Metin2 Closed Beta Content (2003-2004)

    6. 13

      Metin2 Closed Beta Content (2003-2004)

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