Jump to content

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
https://metin2.dev/topic/18675-getting-monster-race-client/
Share on other sites

  • Active Member

In my mob_proto, just i have one RACE_FLAG Value in my Column.

Let's see:

dYOgcab.jpg

 

Don't use more than 1 race_flag to Mobs.

 

 

Edited by Metin2 Dev
Core X - External 2 Internal

Buy a new system? 
My systems:  https://payhip.com/Pisti95

with the recent updates for the official, they started using more than one race-flag. and it's fine server-side, if you used 2 flags, server-side will be fine and it will read the 2 flags. I want to do the same client side.

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

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.