summaryrefslogtreecommitdiff
path: root/src/map/npc.c
diff options
context:
space:
mode:
authorshennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-08-22 20:33:06 +0000
committershennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-08-22 20:33:06 +0000
commit082687fc204c7b40bf676ad710c2488048571b73 (patch)
tree59b356c4d4cc86122ef42c46d9500ddeb93ba6bc /src/map/npc.c
parenta31d779891778d76d1c0fac3544e6dd1627da98a (diff)
downloadhercules-082687fc204c7b40bf676ad710c2488048571b73.tar.gz
hercules-082687fc204c7b40bf676ad710c2488048571b73.tar.bz2
hercules-082687fc204c7b40bf676ad710c2488048571b73.tar.xz
hercules-082687fc204c7b40bf676ad710c2488048571b73.zip
Major cleanup all over the place, made possible by mkbu95's scan-build report he provided us with.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16687 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/npc.c')
-rw-r--r--src/map/npc.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/map/npc.c b/src/map/npc.c
index d5c7c021a..97b41e033 100644
--- a/src/map/npc.c
+++ b/src/map/npc.c
@@ -814,14 +814,13 @@ int npc_event(struct map_session_data* sd, const char* eventname, int ontouch)
int npc_touch_areanpc_sub(struct block_list *bl, va_list ap)
{
struct map_session_data *sd;
- int pc_id,npc_id;
+ int pc_id;
char *name;
nullpo_ret(bl);
nullpo_ret((sd = map_id2sd(bl->id)));
pc_id = va_arg(ap,int);
- npc_id = va_arg(ap,int);
name = va_arg(ap,char*);
if( pc_ishiding(sd) )
@@ -854,7 +853,7 @@ int npc_touchnext_areanpc(struct map_session_data* sd, bool leavemap)
nd->touching_id = sd->touching_id = 0;
snprintf(name, ARRAYLENGTH(name), "%s::%s", nd->exname, script_config.ontouch_name);
- map_forcountinarea(npc_touch_areanpc_sub,nd->bl.m,nd->bl.x - xs,nd->bl.y - ys,nd->bl.x + xs,nd->bl.y + ys,1,BL_PC,sd->bl.id,nd->bl.id,name);
+ map_forcountinarea(npc_touch_areanpc_sub,nd->bl.m,nd->bl.x - xs,nd->bl.y - ys,nd->bl.x + xs,nd->bl.y + ys,1,BL_PC,sd->bl.id,name);
}
return 0;
}
@@ -1649,11 +1648,10 @@ int npc_selllist(struct map_session_data* sd, int n, unsigned short* item_list)
// delete items
for( i = 0; i < n; i++ )
{
- int nameid, amount, idx;
+ int amount, idx;
idx = item_list[i*2]-2;
amount = item_list[i*2+1];
- nameid = sd->status.inventory[idx].nameid;
if( sd->inventory_data[idx]->type == IT_PETEGG && sd->status.inventory[idx].card[0] == CARD0_PET )
{