From 115522e1fd1ff5292fd2703641415f76a1c2b66f Mon Sep 17 00:00:00 2001 From: Lemongrass3110 Date: Mon, 6 Feb 2023 23:21:36 +0100 Subject: [PATCH] Fixed some warnings related to dynamic NPCs Fixes #7417 Thanks to @idk-whoami and everyone else who reported it. --- src/map/npc.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/map/npc.cpp b/src/map/npc.cpp index 24d69476a7..de9c0868a0 100644 --- a/src/map/npc.cpp +++ b/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; }