- 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://svn.code.sf.net/p/rathena/svn/trunk@6550 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
skotlex 2006-05-10 14:38:12 +00:00
parent b6f88c5242
commit 9ddea7953a
5 changed files with 62 additions and 58 deletions

View File

@ -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. IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
2006/05/10 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. * Changed wedding costumes to use setoption rather than changebase.
[Skotlex] [Skotlex]
* Modified setoption so that flag 1 or no flag adds an option, and flag 0 * Modified setoption so that flag 1 or no flag adds an option, and flag 0

View File

@ -1571,45 +1571,45 @@ int parse_login(int fd) {
server_num=0; server_num=0;
for(i = 0; i < MAX_SERVERS; i++) { for(i = 0; i < MAX_SERVERS; i++) {
if (server_fd[i] >= 0) { if (server_fd[i] >= 0) {
// Andvanced subnet check [LuzZza] // Andvanced subnet check [LuzZza]
if((subnet_char_ip = lan_subnetcheck((long *)p))) if((subnet_char_ip = lan_subnetcheck((long *)p)))
WFIFOL(fd,47+server_num*32) = subnet_char_ip; WFIFOL(fd,47+server_num*32) = subnet_char_ip;
else else
WFIFOL(fd,47+server_num*32) = server[i].ip; WFIFOL(fd,47+server_num*32) = server[i].ip;
WFIFOW(fd,47+server_num*32+4) = server[i].port; WFIFOW(fd,47+server_num*32+4) = server[i].port;
memcpy(WFIFOP(fd,47+server_num*32+6), server[i].name, 20); 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+26) = server[i].users;
WFIFOW(fd,47+server_num*32+28) = server[i].maintenance; WFIFOW(fd,47+server_num*32+28) = server[i].maintenance;
WFIFOW(fd,47+server_num*32+30) = server[i].new_; WFIFOW(fd,47+server_num*32+30) = server[i].new_;
server_num++; server_num++;
} }
} }
// if at least 1 char-server // if at least 1 char-server
if (server_num > 0) { if (server_num > 0) {
WFIFOW(fd,0)=0x69; WFIFOW(fd,0)=0x69;
WFIFOW(fd,2)=47+32*server_num; WFIFOW(fd,2)=47+32*server_num;
WFIFOL(fd,4)=account.login_id1; WFIFOL(fd,4)=account.login_id1;
WFIFOL(fd,8)=account.account_id; WFIFOL(fd,8)=account.account_id;
WFIFOL(fd,12)=account.login_id2; WFIFOL(fd,12)=account.login_id2;
WFIFOL(fd,16)=0; WFIFOL(fd,16)=0;
memcpy(WFIFOP(fd,20),account.lastlogin,24); memcpy(WFIFOP(fd,20),account.lastlogin,24);
WFIFOB(fd,46)=account.sex; WFIFOB(fd,46)=account.sex;
WFIFOSET(fd,47+32*server_num); WFIFOSET(fd,47+32*server_num);
if(auth_fifo_pos>=AUTH_FIFO_SIZE) if(auth_fifo_pos>=AUTH_FIFO_SIZE)
auth_fifo_pos=0; auth_fifo_pos=0;
auth_fifo[auth_fifo_pos].account_id=account.account_id; 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_id1=account.login_id1;
auth_fifo[auth_fifo_pos].login_id2=account.login_id2; auth_fifo[auth_fifo_pos].login_id2=account.login_id2;
auth_fifo[auth_fifo_pos].sex=account.sex; auth_fifo[auth_fifo_pos].sex=account.sex;
auth_fifo[auth_fifo_pos].delflag=0; auth_fifo[auth_fifo_pos].delflag=0;
auth_fifo[auth_fifo_pos].ip = session[fd]->client_addr.sin_addr.s_addr; auth_fifo[auth_fifo_pos].ip = session[fd]->client_addr.sin_addr.s_addr;
auth_fifo_pos++; auth_fifo_pos++;
} else { } else {
WFIFOW(fd,0) = 0x81; WFIFOW(fd,0) = 0x81;
WFIFOB(fd,2) = 1; // 01 = Server closed WFIFOB(fd,2) = 1; // 01 = Server closed
WFIFOSET(fd,3); WFIFOSET(fd,3);
} }
} }
} else { } else {
char tmp_sql[512]; char tmp_sql[512];
char error[64]; char error[64];

View File

@ -238,25 +238,6 @@ enum {
#define DEFAULT_AUTOSAVE_INTERVAL 60*1000 #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 //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)) #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 //Specifies maps that have special GvG/WoE restrictions

View File

@ -4130,6 +4130,7 @@ int status_change_start(struct block_list *bl,int type,int rate,int val1,int val
break; break;
case SC_WEDDING: //結婚用(結婚衣裳になって?くのが?いとか) case SC_WEDDING: //結婚用(結婚衣裳になって?くのが?いとか)
case SC_XMAS:
{ {
struct view_data *vd = status_get_viewdata(bl); struct view_data *vd = status_get_viewdata(bl);
if (vd) { if (vd) {
@ -5016,6 +5017,7 @@ int status_change_end( struct block_list* bl , int type,int tid )
break; break;
case SC_WEDDING: //結婚用(結婚衣裳になって?くのが?いとか) case SC_WEDDING: //結婚用(結婚衣裳になって?くのが?いとか)
case SC_XMAS:
{ {
struct view_data *vd = status_get_viewdata(bl); struct view_data *vd = status_get_viewdata(bl);
if (vd) { if (vd) {

View File

@ -441,6 +441,25 @@ enum {
#define OPT3_AURASHIELD 0x800 //Assumptio #define OPT3_AURASHIELD 0x800 //Assumptio
#define OPT3_HEAT 0x1000 //Warmth Skills #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 より移動 // パラメータ所得系 battle.c より移動
int status_get_class(struct block_list *bl); int status_get_class(struct block_list *bl);
int status_get_lv(struct block_list *bl); int status_get_lv(struct block_list *bl);