From e96f41fafafff988ac27aed09f2459acc4ba78ff Mon Sep 17 00:00:00 2001 From: skotlex Date: Wed, 10 May 2006 14:38:12 +0000 Subject: - Moved the OPTION defines from map.h to status.h (where they belong) - Added back SC_XMAS to status.c (how was it... lost?) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6550 54d463be-8e91-2dee-dedb-b68131a5f0ec --- Changelog-Trunk.txt | 2 ++ src/login_sql/login.c | 78 +++++++++++++++++++++++++-------------------------- src/map/map.h | 19 ------------- src/map/status.c | 2 ++ src/map/status.h | 19 +++++++++++++ 5 files changed, 62 insertions(+), 58 deletions(-) diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt index db5560227..2020d69cd 100644 --- a/Changelog-Trunk.txt +++ b/Changelog-Trunk.txt @@ -4,6 +4,8 @@ AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK. 2006/05/10 + * Added back SC_XMAS to status.c, it got lost sometime during all the + previous reworkings. [Skotlex] * Changed wedding costumes to use setoption rather than changebase. [Skotlex] * Modified setoption so that flag 1 or no flag adds an option, and flag 0 diff --git a/src/login_sql/login.c b/src/login_sql/login.c index a5b9b089b..7a40808ab 100644 --- a/src/login_sql/login.c +++ b/src/login_sql/login.c @@ -1571,45 +1571,45 @@ int parse_login(int fd) { server_num=0; for(i = 0; i < MAX_SERVERS; i++) { if (server_fd[i] >= 0) { - // Andvanced subnet check [LuzZza] - if((subnet_char_ip = lan_subnetcheck((long *)p))) - WFIFOL(fd,47+server_num*32) = subnet_char_ip; - else - WFIFOL(fd,47+server_num*32) = server[i].ip; - WFIFOW(fd,47+server_num*32+4) = server[i].port; - memcpy(WFIFOP(fd,47+server_num*32+6), server[i].name, 20); - WFIFOW(fd,47+server_num*32+26) = server[i].users; - WFIFOW(fd,47+server_num*32+28) = server[i].maintenance; - WFIFOW(fd,47+server_num*32+30) = server[i].new_; - server_num++; - } - } - // if at least 1 char-server - if (server_num > 0) { - WFIFOW(fd,0)=0x69; - WFIFOW(fd,2)=47+32*server_num; - WFIFOL(fd,4)=account.login_id1; - WFIFOL(fd,8)=account.account_id; - WFIFOL(fd,12)=account.login_id2; - WFIFOL(fd,16)=0; - memcpy(WFIFOP(fd,20),account.lastlogin,24); - WFIFOB(fd,46)=account.sex; - WFIFOSET(fd,47+32*server_num); - if(auth_fifo_pos>=AUTH_FIFO_SIZE) - auth_fifo_pos=0; - auth_fifo[auth_fifo_pos].account_id=account.account_id; - auth_fifo[auth_fifo_pos].login_id1=account.login_id1; - auth_fifo[auth_fifo_pos].login_id2=account.login_id2; - auth_fifo[auth_fifo_pos].sex=account.sex; - auth_fifo[auth_fifo_pos].delflag=0; - auth_fifo[auth_fifo_pos].ip = session[fd]->client_addr.sin_addr.s_addr; - auth_fifo_pos++; - } else { - WFIFOW(fd,0) = 0x81; - WFIFOB(fd,2) = 1; // 01 = Server closed - WFIFOSET(fd,3); - } - } + // Andvanced subnet check [LuzZza] + if((subnet_char_ip = lan_subnetcheck((long *)p))) + WFIFOL(fd,47+server_num*32) = subnet_char_ip; + else + WFIFOL(fd,47+server_num*32) = server[i].ip; + WFIFOW(fd,47+server_num*32+4) = server[i].port; + memcpy(WFIFOP(fd,47+server_num*32+6), server[i].name, 20); + WFIFOW(fd,47+server_num*32+26) = server[i].users; + WFIFOW(fd,47+server_num*32+28) = server[i].maintenance; + WFIFOW(fd,47+server_num*32+30) = server[i].new_; + server_num++; + } + } + // if at least 1 char-server + if (server_num > 0) { + WFIFOW(fd,0)=0x69; + WFIFOW(fd,2)=47+32*server_num; + WFIFOL(fd,4)=account.login_id1; + WFIFOL(fd,8)=account.account_id; + WFIFOL(fd,12)=account.login_id2; + WFIFOL(fd,16)=0; + memcpy(WFIFOP(fd,20),account.lastlogin,24); + WFIFOB(fd,46)=account.sex; + WFIFOSET(fd,47+32*server_num); + if(auth_fifo_pos>=AUTH_FIFO_SIZE) + auth_fifo_pos=0; + auth_fifo[auth_fifo_pos].account_id=account.account_id; + auth_fifo[auth_fifo_pos].login_id1=account.login_id1; + auth_fifo[auth_fifo_pos].login_id2=account.login_id2; + auth_fifo[auth_fifo_pos].sex=account.sex; + auth_fifo[auth_fifo_pos].delflag=0; + auth_fifo[auth_fifo_pos].ip = session[fd]->client_addr.sin_addr.s_addr; + auth_fifo_pos++; + } else { + WFIFOW(fd,0) = 0x81; + WFIFOB(fd,2) = 1; // 01 = Server closed + WFIFOSET(fd,3); + } + } } else { char tmp_sql[512]; char error[64]; diff --git a/src/map/map.h b/src/map/map.h index 44b29af42..18e159163 100644 --- a/src/map/map.h +++ b/src/map/map.h @@ -238,25 +238,6 @@ enum { #define DEFAULT_AUTOSAVE_INTERVAL 60*1000 -#define OPTION_SIGHT 0x0001 -#define OPTION_HIDE 0x0002 -#define OPTION_CLOAK 0x0004 -#define OPTION_CART1 0x0008 -#define OPTION_FALCON 0x0010 -#define OPTION_RIDING 0x0020 -#define OPTION_INVISIBLE 0x0040 -#define OPTION_CART2 0x0080 -#define OPTION_CART3 0x0100 -#define OPTION_CART4 0x0200 -#define OPTION_CART5 0x0400 -#define OPTION_ORCISH 0x0800 -#define OPTION_WEDDING 0x1000 -#define OPTION_RUWACH 0x2000 -#define OPTION_CHASEWALK 0x4000 -#define OPTION_FLYING 0x8000 -//TODO: Get these Missing options... -#define OPTION_SIGHTTRASHER 0x0001 - //Specifies maps where players may hit each other #define map_flag_vs(m) (map[m].flag.pvp || map[m].flag.gvg_dungeon || map[m].flag.gvg || (agit_flag && map[m].flag.gvg_castle)) //Specifies maps that have special GvG/WoE restrictions diff --git a/src/map/status.c b/src/map/status.c index 6afc10bb0..0fb0ba64b 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -4130,6 +4130,7 @@ int status_change_start(struct block_list *bl,int type,int rate,int val1,int val break; case SC_WEDDING: //結婚用(結婚衣裳になって?くのが?いとか) + case SC_XMAS: { struct view_data *vd = status_get_viewdata(bl); if (vd) { @@ -5016,6 +5017,7 @@ int status_change_end( struct block_list* bl , int type,int tid ) break; case SC_WEDDING: //結婚用(結婚衣裳になって?くのが?いとか) + case SC_XMAS: { struct view_data *vd = status_get_viewdata(bl); if (vd) { diff --git a/src/map/status.h b/src/map/status.h index d4a7168ad..5caf42a79 100644 --- a/src/map/status.h +++ b/src/map/status.h @@ -441,6 +441,25 @@ enum { #define OPT3_AURASHIELD 0x800 //Assumptio #define OPT3_HEAT 0x1000 //Warmth Skills +#define OPTION_SIGHT 0x0001 +#define OPTION_HIDE 0x0002 +#define OPTION_CLOAK 0x0004 +#define OPTION_CART1 0x0008 +#define OPTION_FALCON 0x0010 +#define OPTION_RIDING 0x0020 +#define OPTION_INVISIBLE 0x0040 +#define OPTION_CART2 0x0080 +#define OPTION_CART3 0x0100 +#define OPTION_CART4 0x0200 +#define OPTION_CART5 0x0400 +#define OPTION_ORCISH 0x0800 +#define OPTION_WEDDING 0x1000 +#define OPTION_RUWACH 0x2000 +#define OPTION_CHASEWALK 0x4000 +#define OPTION_FLYING 0x8000 +//TODO: Get these Missing options... +#define OPTION_SIGHTTRASHER 0x0001 + // パラメータ所得系 battle.c より移動 int status_get_class(struct block_list *bl); int status_get_lv(struct block_list *bl); -- cgit v1.2.3-70-g09d2