summaryrefslogtreecommitdiff
path: root/src/map/script.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-12-22 15:38:30 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-12-22 15:38:30 +0000
commit5f2901fbbb6d4f7deafa6f1a6638ca7f1d4dce87 (patch)
treee7a97e0f0c6fe330ceaafd5e74af71c04e8c27cf /src/map/script.c
parenta65e4681cd29db1d0936523cc8ff5646dc7dca5b (diff)
downloadhercules-5f2901fbbb6d4f7deafa6f1a6638ca7f1d4dce87.tar.gz
hercules-5f2901fbbb6d4f7deafa6f1a6638ca7f1d4dce87.tar.bz2
hercules-5f2901fbbb6d4f7deafa6f1a6638ca7f1d4dce87.tar.xz
hercules-5f2901fbbb6d4f7deafa6f1a6638ca7f1d4dce87.zip
- Simplified the global function "getJobName"
- Simplified function agitcheck so it isn't crash prone. Now it takes no arguments, and will return whether WoE is on or not. - Updated bundled scripts as required for this change. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9559 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/script.c')
-rw-r--r--src/map/script.c21
1 files changed, 4 insertions, 17 deletions
diff --git a/src/map/script.c b/src/map/script.c
index 8357c094d..919c22917 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -3806,7 +3806,7 @@ struct script_function buildin_func[] = {
{buildin_maprespawnguildid,"maprespawnguildid","sii"},
{buildin_agitstart,"agitstart",""}, // <Agit>
{buildin_agitend,"agitend",""},
- {buildin_agitcheck,"agitcheck","i"}, // <Agitcheck>
+ {buildin_agitcheck,"agitcheck",""}, // <Agitcheck>
{buildin_flagemblem,"flagemblem","i"}, // Flag Emblem
{buildin_getcastlename,"getcastlename","s"},
{buildin_getcastledata,"getcastledata","si*"},
@@ -8790,28 +8790,15 @@ int buildin_agitend(struct script_state *st)
return 0;
}
/*==========================================
- * agitcheck 1; // choice script
- * if(@agit_flag == 1) goto agit;
- * if(agitcheck(0) == 1) goto agit;
+ * Returns whether woe is on or off. // choice script
*------------------------------------------
*/
int buildin_agitcheck(struct script_state *st)
{
- struct map_session_data *sd;
- int cond;
-
- cond=conv_num(st,& (st->stack->stack_data[st->start+2]));
-
- if(cond == 0) {
- if (agit_flag==1) push_val(st->stack,C_INT,1);
- if (agit_flag==0) push_val(st->stack,C_INT,0);
- } else {
- sd=script_rid2sd(st);
- if (agit_flag==1) pc_setreg(sd,add_str("@agit_flag"),1);
- if (agit_flag==0) pc_setreg(sd,add_str("@agit_flag"),0);
- }
+ push_val(st->stack,C_INT,agit_flag);
return 0;
}
+
int buildin_flagemblem(struct script_state *st)
{
int g_id=conv_num(st,& (st->stack->stack_data[st->start+2]));