Jelajahi Sumber

- 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

skotlex 19 tahun lalu
induk
melakukan
9ddea7953a
5 mengubah file dengan 62 tambahan dan 58 penghapusan
  1. 2 0
      Changelog-Trunk.txt
  2. 39 39
      src/login_sql/login.c
  3. 0 19
      src/map/map.h
  4. 2 0
      src/map/status.c
  5. 19 0
      src/map/status.h

+ 2 - 0
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

+ 39 - 39
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];

+ 0 - 19
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

+ 2 - 0
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) {

+ 19 - 0
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);