Addtionnal check in npc_touch_areanpc for npc_click (#5386)

Added a check in npc_touch_areanpc (only) to avoid a warning from npc_click
This commit is contained in:
Atemo 2020-09-09 15:12:27 +02:00 committed by GitHub
parent 08adc45ba9
commit e1761aff6c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1142,8 +1142,8 @@ int npc_touch_areanpc(struct map_session_data* sd, int16 m, int16 x, int16 y, st
if (npc_ontouch_event(sd, nd) > 0 && npc_ontouch2_event(sd, nd) > 0) { // failed to run OnTouch event, so just click the npc
if (!util::vector_exists(sd->areanpc, nd->bl.id))
sd->areanpc.push_back(nd->bl.id);
npc_click(sd, nd);
if (sd->npc_id == 0)
npc_click(sd, nd);
}
break;
}