Преглед изворни кода

Follow up to r17013, exit loop if found a warp near the player.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@17023 54d463be-8e91-2dee-dedb-b68131a5f0ec
momacabu пре 12 година
родитељ
комит
97018a0b98
1 измењених фајлова са 3 додато и 1 уклоњено
  1. 3 1
      src/map/npc.c

+ 3 - 1
src/map/npc.c

@@ -932,6 +932,7 @@ int npc_touch_areanpc(struct map_session_data* sd, int m, int x, int y)
 						break; // hidden chars cannot use warps
 					pc_setpos(sd,map[m].npc[j]->u.warp.mapindex,map[m].npc[j]->u.warp.x,map[m].npc[j]->u.warp.y,CLR_OUTSIGHT);
 					found_warp = 1;
+					break;
 				}
 			}
 
@@ -1424,7 +1425,8 @@ int npc_cashshop_buy(struct map_session_data *sd, int nameid, int amount, int po
 	if( (double)nd->u.shop.shop_item[i].value * amount > INT_MAX )
 	{
 		ShowWarning("npc_cashshop_buy: Item '%s' (%d) price overflow attempt!\n", item->name, nameid);
-		ShowDebug("(NPC:'%s' (%s,%d,%d), player:'%s' (%d/%d), value:%d, amount:%d)\n", nd->exname, map[nd->bl.m].name, nd->bl.x, nd->bl.y, sd->status.name, sd->status.account_id, sd->status.char_id, nd->u.shop.shop_item[i].value, amount);
+		ShowDebug("(NPC:'%s' (%s,%d,%d), player:'%s' (%d/%d), value:%d, amount:%d)\n",
+					nd->exname, map[nd->bl.m].name, nd->bl.x, nd->bl.y, sd->status.name, sd->status.account_id, sd->status.char_id, nd->u.shop.shop_item[i].value, amount);
 		return 5;
 	}