Jelajahi Sumber

minor code improvement, moved some "hidden" configs to config/Core.h

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@15329 54d463be-8e91-2dee-dedb-b68131a5f0ec
shennetsind 13 tahun lalu
induk
melakukan
6e0b7ee4c0
4 mengubah file dengan 23 tambahan dan 23 penghapusan
  1. 5 10
      src/map/clif.c
  2. 18 0
      src/map/config/Core.h
  3. 0 11
      src/map/map.h
  4. 0 2
      src/map/status.h

+ 5 - 10
src/map/clif.c

@@ -3766,18 +3766,13 @@ static void clif_getareachar_pc(struct map_session_data* sd,struct map_session_d
 	struct block_list *d_bl;
 	int i;
 
-	if(dstsd->chatID)
-	{
-		struct chat_data *cd;
-		cd=(struct chat_data*)map_id2bl(dstsd->chatID);
-		if(cd && cd->usersd[0]==dstsd)
+	if( dstsd->chatID ) {
+		struct chat_data *cd = NULL;
+		if( (cd = (struct chat_data*)map_id2bl(dstsd->chatID)) && cd->usersd[0]==dstsd)
 			clif_dispchat(cd,sd->fd);
-	}
-
-	if( dstsd->state.vending )
+	} else if( dstsd->state.vending )
 		clif_showvendingboard(&dstsd->bl,dstsd->message,sd->fd);
-
-	if( dstsd->state.buyingstore )
+	else if( dstsd->state.buyingstore )
 		clif_buyingstore_entry_single(sd, dstsd);
 
 	if(dstsd->spiritball > 0)

+ 18 - 0
src/map/config/Core.h

@@ -5,6 +5,24 @@
  * For detailed guidance on these check http://rathena.org/wiki/SRC/map/config/
  **/
 
+/**
+ * Max Refine available to your server
+ * Raising this limit requires edits to /db/refine_db.txt
+ **/
+#define MAX_REFINE 20
+
+//Uncomment to enable the Cell Stack Limit mod.
+//It's only config is the battle_config cell_stack_limit.
+//Only chars affected are those defined in BL_CHAR (mobs and players currently)
+//#define CELL_NOSTACK
+
+//Uncomment to enable circular area checks.
+//By default, all range checks in Aegis are of Square shapes, so a weapon range
+//  of 10 allows you to attack from anywhere within a 21x21 area.
+//Enabling this changes such checks to circular checks, which is more realistic,
+//  but is not the official behaviour.
+//#define CIRCULAR_AREA
+
 /**
  * No settings past this point
  **/

+ 0 - 11
src/map/map.h

@@ -27,17 +27,6 @@ enum E_MAPSERVER_ST
 	MAPSERVER_ST_LAST
 };
 
-//Uncomment to enable the Cell Stack Limit mod.
-//It's only config is the battle_config cell_stack_limit.
-//Only chars affected are those defined in BL_CHAR (mobs and players currently)
-//#define CELL_NOSTACK
-
-//Uncomment to enable circular area checks.
-//By default, all range checks in Aegis are of Square shapes, so a weapon range
-//  of 10 allows you to attack from anywhere within a 21x21 area.
-//Enabling this changes such checks to circular checks, which is more realistic,
-//  but is not the official behaviour.
-//#define CIRCULAR_AREA
 
 #define MAX_NPC_PER_MAP 512
 #define BLOCK_SIZE 8

+ 0 - 2
src/map/status.h

@@ -11,8 +11,6 @@ struct homun_data;
 struct mercenary_data;
 struct status_change;
 
-//Use this to refer the max refinery level [Skotlex]
-#define MAX_REFINE 20
 #define MAX_REFINE_BONUS 5
 
 extern unsigned long StatusChangeFlagTable[];