Forráskód Böngészése

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
Atemo 4 éve
szülő
commit
e1761aff6c
1 módosított fájl, 2 hozzáadás és 2 törlés
  1. 2 2
      src/map/npc.cpp

+ 2 - 2
src/map/npc.cpp

@@ -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;
 	}