summaryrefslogtreecommitdiff
path: root/src/map/npc.c
diff options
context:
space:
mode:
authorultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-11-17 20:51:25 +0000
committerultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-11-17 20:51:25 +0000
commit462883b7cb02a2f229d0c53afd179163725d50de (patch)
tree977bd95af592ab70b87a37342da5873ca8251d1f /src/map/npc.c
parent3bb42dda4732f3288155725bd26da76822c10021 (diff)
downloadhercules-462883b7cb02a2f229d0c53afd179163725d50de.tar.gz
hercules-462883b7cb02a2f229d0c53afd179163725d50de.tar.bz2
hercules-462883b7cb02a2f229d0c53afd179163725d50de.tar.xz
hercules-462883b7cb02a2f229d0c53afd179163725d50de.zip
Removed battle_config.error_log as console_silent already handles this
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11751 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/npc.c')
-rw-r--r--src/map/npc.c35
1 files changed, 12 insertions, 23 deletions
diff --git a/src/map/npc.c b/src/map/npc.c
index f1482df4d..f90bce158 100644
--- a/src/map/npc.c
+++ b/src/map/npc.c
@@ -408,8 +408,7 @@ int npc_timerevent(int tid, unsigned int tick, int id, int data)
if (ted->rid) {
sd = map_id2sd(ted->rid);
if (!sd) {
- if(battle_config.error_log)
- ShowError("npc_timerevent: Attached player not found.\n");
+ ShowError("npc_timerevent: Attached player not found.\n");
ers_free(timer_event_ers, ted);
return 0;
}
@@ -474,8 +473,7 @@ int npc_timerevent_start(struct npc_data* nd, int rid)
//Try to attach timer to this player.
sd = map_id2sd(nd->u.scr.rid);
if (!sd) {
- if(battle_config.error_log)
- ShowError("npc_timerevent_start: Attached player not found!\n");
+ ShowError("npc_timerevent_start: Attached player not found!\n");
return 1;
}
}
@@ -517,8 +515,7 @@ int npc_timerevent_stop(struct npc_data* nd)
if (nd->u.scr.rid) {
sd = map_id2sd(nd->u.scr.rid);
if (!sd) {
- if(battle_config.error_log)
- ShowError("npc_timerevent_stop: Attached player not found!\n");
+ ShowError("npc_timerevent_stop: Attached player not found!\n");
return 1;
}
}
@@ -617,8 +614,7 @@ int npc_settimerevent_tick(struct npc_data* nd, int newtimer)
if (nd->u.scr.rid) {
sd = map_id2sd(nd->u.scr.rid);
if (!sd) {
- if(battle_config.error_log)
- ShowError("npc_settimerevent_tick: Attached player not found!\n");
+ ShowError("npc_settimerevent_tick: Attached player not found!\n");
return 1;
}
flag= sd->npc_timer_id != -1 ;
@@ -643,8 +639,7 @@ int npc_event_sub(struct map_session_data* sd, struct event_data* ev, const char
if( i < MAX_EVENTQUEUE )
safestrncpy(sd->eventqueue[i],eventname,50); //Event enqueued.
else
- if( battle_config.error_log )
- ShowWarning("npc_event: event queue is full !\n");
+ ShowWarning("npc_event: event queue is full !\n");
return 1;
}
@@ -687,8 +682,7 @@ int npc_event(struct map_session_data* sd, const char* eventname, int mob_kill)
return 0;
}
} else {
- if (battle_config.error_log)
- ShowError("npc_event: event not found [%s]\n", eventname);
+ ShowError("npc_event: event not found [%s]\n", eventname);
return 0;
}
}
@@ -748,10 +742,8 @@ int npc_touch_areanpc(struct map_session_data* sd, int m, int x, int y)
break;
}
if (i==map[m].npc_num) {
- if (f) {
- if (battle_config.error_log)
- ShowError("npc_touch_areanpc : some bug \n");
- }
+ if (f)
+ ShowError("npc_touch_areanpc : some bug \n");
return 1;
}
switch(map[m].npc[i]->bl.subtype) {
@@ -946,8 +938,7 @@ int npc_click(struct map_session_data* sd, struct npc_data* nd)
nullpo_retr(1, sd);
if (sd->npc_id != 0) {
- if (battle_config.error_log)
- ShowError("npc_click: npc_id != 0\n");
+ ShowError("npc_click: npc_id != 0\n");
return 1;
}
@@ -1010,8 +1001,7 @@ int npc_buysellsel(struct map_session_data* sd, int id, int type)
return 1;
if (nd->bl.subtype!=SHOP) {
- if (battle_config.error_log)
- ShowError("no such shop npc : %d\n",id);
+ ShowError("no such shop npc : %d\n",id);
if (sd->npc_id == id)
sd->npc_id=0;
return 1;
@@ -2674,8 +2664,7 @@ int npc_script_event(struct map_session_data* sd, int type)
if (type < 0 || type >= NPCE_MAX)
return 0;
if (!sd) {
- if (battle_config.error_log)
- ShowError("npc_script_event: NULL sd. Event Type %d\n", type);
+ ShowError("npc_script_event: NULL sd. Event Type %d\n", type);
return 0;
}
if (script_event[type].nd) {
@@ -2789,7 +2778,7 @@ int npc_reload(void)
if (map[m].moblist[i]) aFree(map[m].moblist[i]);
memset (map[m].moblist, 0, sizeof(map[m].moblist));
}
- if (map[m].npc_num > 0 && battle_config.error_log)
+ if (map[m].npc_num > 0)
ShowWarning("npc_reload: %d npcs weren't removed at map %s!\n", map[m].npc_num, map[m].name);
}
mob_clear_spawninfo();