Expanded the poor "npc_touch_areanpc : some bug" with info about which cell exactly caused the problem.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12024 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
parent
825d214242
commit
a4007e12d4
@ -1,4 +1,4 @@
|
|||||||
// Blacksmith and Alchemist Produce Database
|
// Item Produce Database
|
||||||
//
|
//
|
||||||
// Structure of Database:
|
// Structure of Database:
|
||||||
// ProduceItemID,ItemLV,RequireSkill,RequireSkillLv,MaterialID1,MaterialAmount1,......
|
// ProduceItemID,ItemLV,RequireSkill,RequireSkillLv,MaterialID1,MaterialAmount1,......
|
||||||
|
@ -17,7 +17,6 @@
|
|||||||
// 512 = Cannot be used in zone 5 maps
|
// 512 = Cannot be used in zone 5 maps
|
||||||
// 1024 = Cannot be used in zone 6 maps
|
// 1024 = Cannot be used in zone 6 maps
|
||||||
// 2048 = Cannot be used in zone 7 maps
|
// 2048 = Cannot be used in zone 7 maps
|
||||||
|
|
||||||
//
|
//
|
||||||
// Example:
|
// Example:
|
||||||
// 8,6 = Endure cannot be used in PvP and GvG maps (2+4)
|
// 8,6 = Endure cannot be used in PvP and GvG maps (2+4)
|
||||||
|
@ -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 npc_touch_areanpc(struct map_session_data* sd, int m, int x, int y)
|
||||||
{
|
{
|
||||||
int i,f=1;
|
|
||||||
int xs,ys;
|
int xs,ys;
|
||||||
|
int f = 1;
|
||||||
|
int i;
|
||||||
|
|
||||||
nullpo_retr(1, sd);
|
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++)
|
for(i=0;i<map[m].npc_num;i++)
|
||||||
{
|
{
|
||||||
if (map[m].npc[i]->sc.option&OPTION_INVISIBLE) { // 無効化されている
|
if (map[m].npc[i]->sc.option&OPTION_INVISIBLE) {
|
||||||
f=0;
|
f=0; // a npc was found, but it is disabled; don't print warning
|
||||||
continue;
|
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 )
|
&& y >= map[m].npc[i]->bl.y-ys && y <= map[m].npc[i]->bl.y+ys )
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (i==map[m].npc_num) {
|
if( i == map[m].npc_num )
|
||||||
if (f)
|
{
|
||||||
ShowError("npc_touch_areanpc : some bug \n");
|
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;
|
return 1;
|
||||||
}
|
}
|
||||||
switch(map[m].npc[i]->subtype) {
|
switch(map[m].npc[i]->subtype) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user