summaryrefslogtreecommitdiff
path: root/src/map/npc.c
diff options
context:
space:
mode:
authoramber <amber@54d463be-8e91-2dee-dedb-b68131a5f0ec>2004-11-17 04:48:11 +0000
committeramber <amber@54d463be-8e91-2dee-dedb-b68131a5f0ec>2004-11-17 04:48:11 +0000
commit9e7f07a4a5ccfb7e1862fbb58c32e928ab9c35e8 (patch)
tree079392aca9c0a6c79a0b6405c80ecc3aef353634 /src/map/npc.c
parent4db5fdac1ee37f1dd2d2d28fbcaca577e112b953 (diff)
downloadhercules-9e7f07a4a5ccfb7e1862fbb58c32e928ab9c35e8.tar.gz
hercules-9e7f07a4a5ccfb7e1862fbb58c32e928ab9c35e8.tar.bz2
hercules-9e7f07a4a5ccfb7e1862fbb58c32e928ab9c35e8.tar.xz
hercules-9e7f07a4a5ccfb7e1862fbb58c32e928ab9c35e8.zip
Compiler fixes and scripting timer event fixes
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/athena@228 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/npc.c')
-rw-r--r--src/map/npc.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/map/npc.c b/src/map/npc.c
index 283b28e66..72daea571 100644
--- a/src/map/npc.c
+++ b/src/map/npc.c
@@ -392,16 +392,29 @@ int npc_event_do_clock(int tid,unsigned int tick,int id,int data)
time_t timer;
struct tm *t;
char buf[64];
+ char *day;
int c=0;
time(&timer);
t=localtime(&timer);
+
+ switch (t->tm_wday) {
+ case 0: day = "Sun"; break;
+ case 1: day = "Mon"; break;
+ case 2: day = "Tue"; break;
+ case 3: day = "Wed"; break;
+ case 4: day = "Thu"; break;
+ case 5: day = "Fri"; break;
+ case 6: day = "Sat"; break;
+ }
if (t->tm_min != ev_tm_b.tm_min ) {
sprintf(buf,"OnMinute%02d",t->tm_min);
c+=npc_event_doall(buf);
sprintf(buf,"OnClock%02d%02d",t->tm_hour,t->tm_min);
c+=npc_event_doall(buf);
+ sprintf(buf,"On%s%02d%02d",day,t->tm_hour,t->tm_min);
+ c+=npc_event_doall(buf);
}
if (t->tm_hour!= ev_tm_b.tm_hour) {
sprintf(buf,"OnHour%02d",t->tm_hour);