Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

[Tutorial] How to fix not spawning NPCs and Quest errors using released sources

[emoji848]
Legend
Joined
Dec 3, 2011
Messages
2,232
Reaction score
1,518
So first of all, sorry for the delay, I wanted to investigate on this way earlier.
As promised here I took a look at why there are problems around monsters (spawning / quests) in the latest released source codes for Visual Studio 2013 by Aesir and St34lth4ng3l.

I found out that the appearing errors root from an empty map of monsters which was obviously supposed to hold monster information. Investigating on the empty map I found out that the places where it gets loaded in the initialization of the servers are just commented out, LOL. It looks like someone skipped the place where this compiler issue was thrown for the moment even though it was relevant :v

How to fix it

Masang uses their strange wrapper for maps sometimes and there is a mismatch between the parameter list of CMonsterDBAccess::GetAllMonsters and the monster map in CFieldIOCP.

You will need to edit:
  • FieldIOCP.cpp
  • FieldIOCP.h

FieldIOCP.cpp
Around to line 898:

Replace:

Code:
//CMonsterDBAccess MonsterDBAccess;
//MonsterDBAccess.GetAllMonsters(&*m_mapMonsterInfo, &m_mapItemInfo, MONSTER_LOAD_TYPE_SIZE_FOR_CLIENT, &(g_pFieldGlobal->m_Localization));

with:

Code:
CMonsterDBAccess MonsterDBAccess;
MonsterDBAccess.GetAllMonsters(m_mapMonsterInfo, &m_mapItemInfo, MONSTER_LOAD_TYPE_SIZE_FOR_CLIENT, &(g_pFieldGlobal->m_Localization));

this enables the loading of the monster information again.

FieldIOCP.h
Now to fix the parameter mismatching, declare the ez_map as map which does not effect any dependent code luckily. So replace around line 403:

Code:
ez_map<int, MONSTER_INFO>		m_mapMonsterInfo;

with:

Code:
map<int, MONSTER_INFO>		m_mapMonsterInfo;

And here you go:

Monsters
Future - [Tutorial] How to fix not spawning NPCs and Quest errors using released sources - RaGEZONE Forums


Future - [Tutorial] How to fix not spawning NPCs and Quest errors using released sources - RaGEZONE Forums


Quests
Future - [Tutorial] How to fix not spawning NPCs and Quest errors using released sources - RaGEZONE Forums


Files
I attached the required files here:

View attachment Fixed mob files.zip

If this helped you, don't hesitate dropping a like for the efforts I put in fixing this ;)
Have a nice day :)
 

Attachments

You must be registered for see attachments list
Last edited:
Junior Spellweaver
Joined
May 9, 2014
Messages
119
Reaction score
11
So first of all, sorry for the delay, I wanted to investigate on this way earlier.
As promised here I took a look at why there are problems around monsters (spawning / quests) in the latest released source codes for Visual Studio 2013 by @Aesir and @St34lth4ng3l.

I found out that the appearing errors root from an empty map of monsters which was obviously supposed to hold monster information. Investigating on the empty map I found out that the places where it gets loaded in the initialization of the servers are just commented out, LOL. It looks like someone skipped the place where this compiler issue was thrown for the moment even though it was relevant :v

How to fix it

Masang uses their strange wrapper for maps sometimes and there is a mismatch between the parameter list of CMonsterDBAccess::GetAllMonsters and the monster map in CFieldIOCP.

You will need to edit:
  • FieldIOCP.h
  • FieldIOCP.cpp

FieldIOCP.h
Around to line 898:

Replace:

Code:
//CMonsterDBAccess MonsterDBAccess;
//MonsterDBAccess.GetAllMonsters(&*m_mapMonsterInfo, &m_mapItemInfo, MONSTER_LOAD_TYPE_SIZE_FOR_CLIENT, &(g_pFieldGlobal->m_Localization));

with:

Code:
CMonsterDBAccess MonsterDBAccess;
MonsterDBAccess.GetAllMonsters(m_mapMonsterInfo, &m_mapItemInfo, MONSTER_LOAD_TYPE_SIZE_FOR_CLIENT, &(g_pFieldGlobal->m_Localization));

this enables the loading of the monster information again.

FieldIOCP.cpp
Now to fix the parameter mismatching, declare the ez_map as map which does not effect any dependent code luckily. So replace around line 403:

Code:
ez_map<int, MONSTER_INFO>        m_mapMonsterInfo;

with:

Code:
map<int, MONSTER_INFO>        m_mapMonsterInfo;

And here you go:

Monsters
Future - [Tutorial] How to fix not spawning NPCs and Quest errors using released sources - RaGEZONE Forums


Future - [Tutorial] How to fix not spawning NPCs and Quest errors using released sources - RaGEZONE Forums


Quests
Future - [Tutorial] How to fix not spawning NPCs and Quest errors using released sources - RaGEZONE Forums


Files
I attached the required files here:

View attachment 156261

If this helped you, don't hesitate dropping a like for the efforts I put in fixing this ;)
Have a nice day :)





with due respectthe first to say FieldIOCP.his FieldIOCP.cppand the second is FieldIOCP.h
 
[emoji848]
Legend
Joined
Dec 3, 2011
Messages
2,232
Reaction score
1,518
with due respectthe first to say FieldIOCP.his FieldIOCP.cppand the second is FieldIOCP.h

After meditating about your post for 2 weeks I found out what you meant. Yeah .cpp and .h file was indeed flipped in my tutorial.
Changed now, thx
 
Back
Top