Cleaned up map storage type (#3384)
* Fixes #3369, fixes #3370, and fixes #3382. * Converted maps storage container back to static array. * Converted mapflag storage containers to unordered_map. * Removed a lot of redundancy and recursive lookups. * Fixed a couple short-circuit checks to help with performance. * Fixed multiple instance creation/destruction issues. * Fixed PK Mode attempting to set PvP on flags that are already active. * Getting MF_RESTRICTED will return the map's zone value instead of the state. * Converted mapflag macros to inline functions. Thanks to @teededung, @lelouch22, @mazvi, @Lemongrass3110, and @cydh!
This commit is contained in:
@@ -490,18 +490,16 @@ static void script_reportsrc(struct script_state *st)
|
||||
if( bl == NULL )
|
||||
return;
|
||||
|
||||
struct map_data *mapdata = map_getmapdata(bl->m);
|
||||
|
||||
switch( bl->type ) {
|
||||
case BL_NPC:
|
||||
if( bl->m >= 0 )
|
||||
ShowDebug("Source (NPC): %s at %s (%d,%d)\n", ((struct npc_data *)bl)->name, mapdata->name, bl->x, bl->y);
|
||||
ShowDebug("Source (NPC): %s at %s (%d,%d)\n", ((struct npc_data *)bl)->name, map_mapid2mapname(bl->m), bl->x, bl->y);
|
||||
else
|
||||
ShowDebug("Source (NPC): %s (invisible/not on a map)\n", ((struct npc_data *)bl)->name);
|
||||
break;
|
||||
default:
|
||||
if( bl->m >= 0 )
|
||||
ShowDebug("Source (Non-NPC type %d): name %s at %s (%d,%d)\n", bl->type, status_get_name(bl), mapdata->name, bl->x, bl->y);
|
||||
ShowDebug("Source (Non-NPC type %d): name %s at %s (%d,%d)\n", bl->type, status_get_name(bl), map_mapid2mapname(bl->m), bl->x, bl->y);
|
||||
else
|
||||
ShowDebug("Source (Non-NPC type %d): name %s (invisible/not on a map)\n", bl->type, status_get_name(bl));
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user