Browse Source

- Fixed a compilation problem with the pid plugin
- Some minor cleanups

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@10322 54d463be-8e91-2dee-dedb-b68131a5f0ec

ultramage 18 năm trước cách đây
mục cha
commit
150f7d0b56
7 tập tin đã thay đổi với 10 bổ sung15 xóa
  1. 2 2
      src/char/char.c
  2. 1 1
      src/char_sql/char.c
  3. 1 1
      src/map/atcommand.c
  4. 1 1
      src/map/battle.c
  5. 2 2
      src/map/map.h
  6. 0 2
      src/plugins/Makefile
  7. 3 6
      src/plugins/pid.c

+ 2 - 2
src/char/char.c

@@ -62,7 +62,7 @@ uint16 login_port = 6900;
 char char_ip_str[128];
 uint32 char_ip;
 char bind_ip_str[128];
-uint32 bind_ip;
+uint32 bind_ip = INADDR_ANY;
 uint16 char_port = 6121;
 int char_maintenance;
 int char_new;
@@ -4310,7 +4310,7 @@ int do_init(int argc, char **argv)
 
 	set_defaultparse(parse_char);
 
-	char_fd = make_listen_bind(bind_ip?bind_ip:INADDR_ANY,char_port);
+	char_fd = make_listen_bind(bind_ip, char_port);
 
 	add_timer_func_list(check_connect_login_server, "check_connect_login_server");
 	add_timer_func_list(send_users_tologin, "send_users_tologin");

+ 1 - 1
src/char_sql/char.c

@@ -4161,7 +4161,7 @@ int do_init(int argc, char **argv)
 
 	//Read map indexes
 	mapindex_init();
-	start_point.map = mapindex_name2id("new_zone01.gat");
+	start_point.map = mapindex_name2id("new_zone01");
 	
 	char_config_read((argc < 2) ? CHAR_CONF_NAME : argv[1]);
 	char_lan_config_read((argc > 3) ? argv[3] : LAN_CONF_NAME);

+ 1 - 1
src/map/atcommand.c

@@ -5245,7 +5245,7 @@ int atcommand_reloadstatusdb(const int fd, struct map_session_data* sd, const ch
 	return 0;
 }
 /*==========================================
- * @reloadpcdb - reloads exp.txt skill_tree.txt attr_fix.txt 
+ * @reloadpcdb - reloads exp.txt skill_tree.txt attr_fix.txt statpoint.txt
  *------------------------------------------
  */
 int atcommand_reloadpcdb(const int fd, struct map_session_data* sd, const char* command, const char* message)

+ 1 - 1
src/map/battle.c

@@ -4080,7 +4080,7 @@ void battle_set_defaults() {
 	battle_config.pc_luk_sc_def = 300;
 	battle_config.mob_luk_sc_def = 300;
 	battle_config.pc_max_sc_def = 100;
-	battle_config.mob_max_sc_def = 50;
+	battle_config.mob_max_sc_def = 100;
 	battle_config.sg_miracle_skill_ratio=1;
 	battle_config.sg_angel_skill_ratio=1;
 	battle_config.sg_miracle_skill_duration=3600000;

+ 2 - 2
src/map/map.h

@@ -229,12 +229,12 @@ enum {
 	ELE_MAX
 };
 
-enum {
+enum auto_trigger_flag {
 	ATF_SELF=0x01,
 	ATF_TARGET=0x02,
 	ATF_SHORT=0x04,
 	ATF_LONG=0x08
-} auto_trigger_flag;
+};
 
 struct block_list {
 	struct block_list *next,*prev;

+ 0 - 2
src/plugins/Makefile

@@ -14,13 +14,11 @@ txt sql all: $(PLUGINS)
 
 %.$(PLUGINEXT): %.c
 	$(CC) $(CFLAGS) -shared -o ../../plugins/$@ $<
-	@touch $@
 
 sig.$(PLUGINEXT): sig.c
 	$(CC) $(CFLAGS) -shared -o ../../plugins/$@ $< \
 	../common/obj/showmsg.o ../common/obj/utils.o \
 	../common/obj/minimalloc.o
-	@touch $@
 
 gui.$(PLUGINEXT): ../../plugins/gui.conf
 upnp.$(PLUGINEXT): ../../plugins/upnp.conf

+ 3 - 6
src/plugins/pid.c

@@ -2,13 +2,10 @@
 #include <stdio.h>
 #include <string.h>
 
-#ifndef _WIN32
-	#include <unistd.h>
-#endif
-#ifdef MINGW
-	#include <process.h>
-	#include <io.h>
+#if !defined _WIN32 || defined MINGW
+	#include <unistd.h> // getpid(), unlink()
 #else
+	#include <windows.h>
 	#define getpid GetCurrentProcessId
 #endif