summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/map/guild.c4
-rw-r--r--src/map/script.c21
2 files changed, 5 insertions, 20 deletions
diff --git a/src/map/guild.c b/src/map/guild.c
index a5db3664a..60643eede 100644
--- a/src/map/guild.c
+++ b/src/map/guild.c
@@ -1898,8 +1898,7 @@ int guild_agit_break(struct mob_data *md)
{ // Run One NPC_Event[OnAgitBreak]
char *evname;
- nullpo_retr(0, md);
-
+ if(!agit_flag) return 0; // Agit already End
evname=(char *)aMallocA((strlen(md->npc_event) + 1)*sizeof(char));
strcpy(evname,md->npc_event);
@@ -1908,7 +1907,6 @@ int guild_agit_break(struct mob_data *md)
// But Script will be stop, so nothing...
// Maybe will be changed in the futher..
// int c = npc_event_do(evname);
- if(!agit_flag) return 0; // Agit already End
add_timer(gettick()+battle_config.gvg_eliminate_time,guild_gvg_eliminate_timer,md->bl.m,(int)evname);
return 0;
}
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]));