Explorar o código

Fixed some warnings related to dynamic NPCs

Fixes #7417

Thanks to @idk-whoami and everyone else who reported it.
Lemongrass3110 %!s(int64=2) %!d(string=hai) anos
pai
achega
115522e1fd
Modificáronse 1 ficheiros con 3 adicións e 3 borrados
  1. 3 3
      src/map/npc.cpp

+ 3 - 3
src/map/npc.cpp

@@ -5810,13 +5810,13 @@ TIMER_FUNC(npc_dynamicnpc_removal_timer){
 		if( sd->npc_id == nd->bl.id || sd->npc_shopid == nd->bl.id ){
 			// Retry later
 			nd->dynamicnpc.last_interaction = gettick();
-			nd->dynamicnpc.removal_tid = add_timer( nd->dynamicnpc.last_interaction + battle_config.feature_dynamicnpc_timeout, npc_dynamicnpc_removal_timer, nd->bl.id, NULL );
+			nd->dynamicnpc.removal_tid = add_timer( nd->dynamicnpc.last_interaction + battle_config.feature_dynamicnpc_timeout, npc_dynamicnpc_removal_timer, nd->bl.id, (intptr_t)nullptr );
 			return 0;
 		}
 
 		// Last interaction is not long enough in the past
 		if( DIFF_TICK( gettick(), nd->dynamicnpc.last_interaction ) < battle_config.feature_dynamicnpc_timeout ){
-			nd->dynamicnpc.removal_tid = add_timer( nd->dynamicnpc.last_interaction + DIFF_TICK( gettick(), nd->dynamicnpc.last_interaction ), npc_dynamicnpc_removal_timer, nd->bl.id, NULL );
+			nd->dynamicnpc.removal_tid = add_timer( nd->dynamicnpc.last_interaction + DIFF_TICK( gettick(), nd->dynamicnpc.last_interaction ), npc_dynamicnpc_removal_timer, nd->bl.id, (intptr_t)nullptr );
 			return 0;
 		}
 
@@ -5874,7 +5874,7 @@ struct npc_data* npc_duplicate_npc_for_player( struct npc_data& nd, map_session_
 	}
 
 	dnd->dynamicnpc.last_interaction = gettick();
-	dnd->dynamicnpc.removal_tid = add_timer( dnd->dynamicnpc.last_interaction + battle_config.feature_dynamicnpc_timeout, npc_dynamicnpc_removal_timer, dnd->bl.id, NULL );
+	dnd->dynamicnpc.removal_tid = add_timer( dnd->dynamicnpc.last_interaction + battle_config.feature_dynamicnpc_timeout, npc_dynamicnpc_removal_timer, dnd->bl.id, (intptr_t)nullptr );
 
 	return dnd;
 }