summaryrefslogtreecommitdiff
path: root/src/map/script.c
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2013-12-11 15:01:00 +0100
committerHaru <haru@dotalux.com>2013-12-11 15:03:52 +0100
commit68d6c8bc110bbecd39c47b0e00445b8b4b5eb278 (patch)
tree98804fe393e6559399e5ff0c86a73026c889a1f8 /src/map/script.c
parent27cf11151de917892b22794c1aa798620a484850 (diff)
downloadhercules-68d6c8bc110bbecd39c47b0e00445b8b4b5eb278.tar.gz
hercules-68d6c8bc110bbecd39c47b0e00445b8b4b5eb278.tar.bz2
hercules-68d6c8bc110bbecd39c47b0e00445b8b4b5eb278.tar.xz
hercules-68d6c8bc110bbecd39c47b0e00445b8b4b5eb278.zip
Corrected some local 'mapindex' variables shadowing the global one
Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'src/map/script.c')
-rw-r--r--src/map/script.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/map/script.c b/src/map/script.c
index 1da6fb1c2..008298fa3 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -10506,7 +10506,7 @@ BUILDIN(setmapflagnosave) {
m = map->mapname2mapid(str);
map_index = mapindex->name2id(str2);
- if(m >= 0 && mapindex) {
+ if(m >= 0 && map_index) {
map->list[m].flag.nosave=1;
map->list[m].save.map=map_index;
map->list[m].save.x=x;
@@ -15839,13 +15839,13 @@ BUILDIN(readbook)
BUILDIN(questinfo)
{
struct npc_data *nd = map->id2nd(st->oid);
- int quest, icon, job, color = 0;
+ int quest_id, icon, job, color = 0;
struct questinfo qi;
if( nd == NULL || nd->bl.m == -1 )
return true;
- quest = script_getnum(st, 2);
+ quest_id = script_getnum(st, 2);
icon = script_getnum(st, 3);
#if PACKETVER >= 20120410
@@ -15858,7 +15858,7 @@ BUILDIN(questinfo)
icon = icon + 1;
#endif
- qi.quest_id = quest;
+ qi.quest_id = quest_id;
qi.icon = (unsigned char)icon;
qi.nd = nd;
@@ -16502,11 +16502,11 @@ BUILDIN(has_instance) {
}
int buildin_instance_warpall_sub(struct block_list *bl,va_list ap) {
struct map_session_data *sd = ((TBL_PC*)bl);
- int mapindex = va_arg(ap,int);
+ int map_index = va_arg(ap,int);
int x = va_arg(ap,int);
int y = va_arg(ap,int);
- pc->setpos(sd,mapindex,x,y,CLR_TELEPORT);
+ pc->setpos(sd,map_index,x,y,CLR_TELEPORT);
return 0;
}
@@ -16515,7 +16515,7 @@ BUILDIN(instance_warpall) {
int instance_id = -1;
const char *mapn;
int x, y;
- int mapindex;
+ int map_index;
mapn = script_getstr(st,2);
x = script_getnum(st,3);
@@ -16531,9 +16531,9 @@ BUILDIN(instance_warpall) {
if( (m = map->mapname2mapid(mapn)) < 0 || (map->list[m].flag.src4instance && (m = instance->mapid2imapid(m, instance_id)) < 0) )
return true;
- mapindex = map_id2index(m);
+ map_index = map_id2index(m);
- map->foreachininstance(script->buildin_instance_warpall_sub, instance_id, BL_PC,mapindex,x,y);
+ map->foreachininstance(script->buildin_instance_warpall_sub, instance_id, BL_PC,map_index,x,y);
return true;
}