From e02e0c5cba6e83986da6fdce9c69a9201f9a271f Mon Sep 17 00:00:00 2001 From: L0ne_W0lf Date: Tue, 9 Sep 2008 17:33:10 +0000 Subject: Enabled WoE SE to be run independently of WoE. Let's see how long it is before something blows up, or Ultramage pulls out his hair while cursing my existence. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13202 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/atcommand.c | 40 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 39 insertions(+), 1 deletion(-) (limited to 'src/map/atcommand.c') diff --git a/src/map/atcommand.c b/src/map/atcommand.c index f734b76da..26d53acbe 100644 --- a/src/map/atcommand.c +++ b/src/map/atcommand.c @@ -3802,6 +3802,24 @@ int atcommand_agitstart(const int fd, struct map_session_data* sd, const char* c return 0; } +/*========================================== + * + *------------------------------------------*/ +int atcommand_agitstart2(const int fd, struct map_session_data* sd, const char* command, const char* message) +{ + nullpo_retr(-1, sd); + if (agit2_flag == 1) { + clif_displaymessage(fd, msg_txt(404)); // "War of Emperium SE is currently in progress." + return -1; + } + + agit2_flag = 1; + guild_agit2_start(); + clif_displaymessage(fd, msg_txt(403)); // "War of Emperium SE has been initiated." + + return 0; +} + /*========================================== * *------------------------------------------*/ @@ -3820,6 +3838,24 @@ int atcommand_agitend(const int fd, struct map_session_data* sd, const char* com return 0; } +/*========================================== + * + *------------------------------------------*/ +int atcommand_agitend2(const int fd, struct map_session_data* sd, const char* command, const char* message) +{ + nullpo_retr(-1, sd); + if (agit2_flag == 0) { + clif_displaymessage(fd, msg_txt(406)); // "War of Emperium SE is currently not in progress." + return -1; + } + + agit2_flag = 0; + guild_agit2_end(); + clif_displaymessage(fd, msg_txt(405)); // "War of Emperium SE has been ended." + + return 0; +} + /*========================================== * @mapexit - shuts down the map server *------------------------------------------*/ @@ -8086,7 +8122,7 @@ int atcommand_main(const int fd, struct map_session_data* sd, const char* comman intif_announce(atcmd_output, strlen(atcmd_output) + 1, 0xFE000000, 0); // Chat logging type 'M' / Main Chat - if( log_config.chat&1 || (log_config.chat&32 && !(agit_flag && log_config.chat&64)) ) + if( log_config.chat&1 || (log_config.chat&32 && !((agit_flag || agit2_flag) && log_config.chat&64)) ) log_chat("M", 0, sd->status.char_id, sd->status.account_id, mapindex_id2name(sd->mapindex), sd->bl.x, sd->bl.y, NULL, message); } @@ -8506,6 +8542,8 @@ AtCommandInfo atcommand_info[] = { { "allowks", 6, atcommand_allowks }, { "cash", 60, atcommand_cash }, { "points", 60, atcommand_cash }, + { "agitstart2", 60, atcommand_agitstart2 }, + { "agitend2", 60, atcommand_agitend2 }, }; -- cgit v1.2.3-60-g2f50