1 Attachment(s)
[Tutorial] How to fix not spawning NPCs and Quest errors using released sources
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
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
http://i84.servimg.com/u/f84/14/11/12/87/atm00012.jpg
http://i84.servimg.com/u/f84/14/11/12/87/atm00010.jpg
Quests
http://i84.servimg.com/u/f84/14/11/12/87/atm00011.jpg
Files
I attached the required files here:
Attachment 156261
If this helped you, don't hesitate dropping a like for the efforts I put in fixing this ;)
Have a nice day :)
Re: [Tutorial] How to fix not spawning NPCs and Quest errors using released sources
Thanks for the tutorial, yeah i just saw that one with Debug loading and thought it's the same, so i just commented it out. Going to update my uploaded sources here.
Re: [Tutorial] How to fix not spawning NPCs and Quest errors using released sources
Quote:
Originally Posted by
Future
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
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
http://i84.servimg.com/u/f84/14/11/12/87/atm00012.jpg
http://i84.servimg.com/u/f84/14/11/12/87/atm00010.jpg
Quests
http://i84.servimg.com/u/f84/14/11/12/87/atm00011.jpg
Files
I attached the required files here:
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
Re: [Tutorial] How to fix not spawning NPCs and Quest errors using released sources
Quote:
Originally Posted by
Afk Roy Osorio
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