Duel allocation (#2734)

* Duels are now dynamically created and no longer statically consumes memory.
* Removed max number of duel at once.
* Updated duel modules for multi-thread and safer management.
* Remove various statically allocated tab.
* Removed duplicate code for npc_movenpc.
* Fix few warnings.
Thanks for suggestions from @anacondaqq.
This commit is contained in:
lighta
2017-12-27 19:39:45 -05:00
committed by Aleos
parent ae69e50626
commit 716f6c0f29
10 changed files with 174 additions and 124 deletions

View File

@@ -2720,7 +2720,7 @@ int map_addmobtolist(unsigned short m, struct spawn_data *spawn)
if( i < MAX_MOB_LIST_PER_MAP )
{
map[m].moblist[i] = spawn;
return i;
return static_cast<int>(i);
}
return -1;
}