diff options
-rw-r--r-- | db/produce_db.txt | 2 | ||||
-rw-r--r-- | db/skill_nocast_db.txt | 1 | ||||
-rw-r--r-- | src/map/npc.c | 14 |
3 files changed, 9 insertions, 8 deletions
diff --git a/db/produce_db.txt b/db/produce_db.txt index b4defc84b..a36b79f70 100644 --- a/db/produce_db.txt +++ b/db/produce_db.txt @@ -1,4 +1,4 @@ -// Blacksmith and Alchemist Produce Database +// Item Produce Database // // Structure of Database: // ProduceItemID,ItemLV,RequireSkill,RequireSkillLv,MaterialID1,MaterialAmount1,...... diff --git a/db/skill_nocast_db.txt b/db/skill_nocast_db.txt index 246093e49..a1cf830b3 100644 --- a/db/skill_nocast_db.txt +++ b/db/skill_nocast_db.txt @@ -17,7 +17,6 @@ // 512 = Cannot be used in zone 5 maps // 1024 = Cannot be used in zone 6 maps // 2048 = Cannot be used in zone 7 maps - // // Example: // 8,6 = Endure cannot be used in PvP and GvG maps (2+4) diff --git a/src/map/npc.c b/src/map/npc.c index 79747dbf3..0f0c09e62 100644 --- a/src/map/npc.c +++ b/src/map/npc.c @@ -710,8 +710,9 @@ int npc_event(struct map_session_data* sd, const char* eventname, int mob_kill) *------------------------------------------*/ int npc_touch_areanpc(struct map_session_data* sd, int m, int x, int y) { - int i,f=1; int xs,ys; + int f = 1; + int i; nullpo_retr(1, sd); @@ -720,8 +721,8 @@ int npc_touch_areanpc(struct map_session_data* sd, int m, int x, int y) for(i=0;i<map[m].npc_num;i++) { - if (map[m].npc[i]->sc.option&OPTION_INVISIBLE) { // 無効化されている - f=0; + if (map[m].npc[i]->sc.option&OPTION_INVISIBLE) { + f=0; // a npc was found, but it is disabled; don't print warning continue; } @@ -741,9 +742,10 @@ int npc_touch_areanpc(struct map_session_data* sd, int m, int x, int y) && y >= map[m].npc[i]->bl.y-ys && y <= map[m].npc[i]->bl.y+ys ) break; } - if (i==map[m].npc_num) { - if (f) - ShowError("npc_touch_areanpc : some bug \n"); + if( i == map[m].npc_num ) + { + if( f == 1 ) // no npc found + ShowError("npc_touch_areanpc : stray NPC cell on coordinates '%s',%d,%d\n", map[m].name, x, y); return 1; } switch(map[m].npc[i]->subtype) { |