diff options
author | Haru <haru@dotalux.com> | 2013-09-25 01:18:31 +0200 |
---|---|---|
committer | Haru <haru@dotalux.com> | 2013-09-25 01:19:19 +0200 |
commit | 66979ef89363c03e3cc02d63feb5248836daff4e (patch) | |
tree | 121d8cf0ef1299ca5cb00ca66a2a261156889560 /src/map/script.c | |
parent | a67007e744f44a74746e0b658160ddc8179d2c0a (diff) | |
download | hercules-66979ef89363c03e3cc02d63feb5248836daff4e.tar.gz hercules-66979ef89363c03e3cc02d63feb5248836daff4e.tar.bz2 hercules-66979ef89363c03e3cc02d63feb5248836daff4e.tar.xz hercules-66979ef89363c03e3cc02d63feb5248836daff4e.zip |
Renamed local variables that would conflict with a rename of iTimer to timer
Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'src/map/script.c')
-rw-r--r-- | src/map/script.c | 29 |
1 files changed, 13 insertions, 16 deletions
diff --git a/src/map/script.c b/src/map/script.c index 86d69658c..fcf10f972 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -8150,10 +8150,9 @@ BUILDIN(savepoint) /*========================================== * GetTimeTick(0: System Tick, 1: Time Second Tick) *------------------------------------------*/ -BUILDIN(gettimetick) /* Asgard Version */ -{ +BUILDIN(gettimetick) { /* Asgard Version */ int type; - time_t timer; + time_t clock; struct tm *t; type=script_getnum(st,2); @@ -8166,8 +8165,8 @@ BUILDIN(gettimetick) /* Asgard Version */ break; case 1: //type 1:(Second Ticks: 0-86399, 00:00:00-23:59:59) - time(&timer); - t=localtime(&timer); + time(&clock); + t=localtime(&clock); script_pushint(st,((t->tm_hour)*3600+(t->tm_min)*60+t->tm_sec)); break; case 0: @@ -8185,16 +8184,15 @@ BUILDIN(gettimetick) /* Asgard Version */ * 4: WeekDay 5: MonthDay 6: Month * 7: Year *------------------------------------------*/ -BUILDIN(gettime) /* Asgard Version */ -{ +BUILDIN(gettime) { /* Asgard Version */ int type; - time_t timer; + time_t clock; struct tm *t; type=script_getnum(st,2); - time(&timer); - t=localtime(&timer); + time(&clock); + t=localtime(&clock); switch(type){ case 1://Sec(0~59) @@ -9715,19 +9713,18 @@ BUILDIN(getstatus) return true; } - switch( type ) - { + switch( type ) { case 1: script_pushint(st, sd->sc.data[id]->val1); break; case 2: script_pushint(st, sd->sc.data[id]->val2); break; case 3: script_pushint(st, sd->sc.data[id]->val3); break; case 4: script_pushint(st, sd->sc.data[id]->val4); break; case 5: { - struct TimerData* timer = (struct TimerData*)iTimer->get_timer(sd->sc.data[id]->timer); + struct TimerData* td = (struct TimerData*)iTimer->get_timer(sd->sc.data[id]->timer); - if( timer ) - {// return the amount of time remaining - script_pushint(st, timer->tick - iTimer->gettick()); + if( td ) { + // return the amount of time remaining + script_pushint(st, td->tick - iTimer->gettick()); } } break; |