summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcelest <celest@54d463be-8e91-2dee-dedb-b68131a5f0ec>2005-01-05 07:04:22 +0000
committercelest <celest@54d463be-8e91-2dee-dedb-b68131a5f0ec>2005-01-05 07:04:22 +0000
commit8e87d2d3248835de4a3677fa16c8abf31e36e570 (patch)
tree06e7f070863e2eeab7b3af9d434a3632045d454c
parentdc28241d3c6716fed00b78d9a6977f89c4644178 (diff)
downloadhercules-8e87d2d3248835de4a3677fa16c8abf31e36e570.tar.gz
hercules-8e87d2d3248835de4a3677fa16c8abf31e36e570.tar.bz2
hercules-8e87d2d3248835de4a3677fa16c8abf31e36e570.tar.xz
hercules-8e87d2d3248835de4a3677fa16c8abf31e36e570.zip
* Fixed skill_require_db reading somehow getting corrupted if weapons usable for the skill is more than 20
* Fixed @killmonster crashing the server with summoned monsters git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/branches/stable@908 54d463be-8e91-2dee-dedb-b68131a5f0ec
-rw-r--r--Changelog.txt9
-rw-r--r--src/map/battle.c7
-rw-r--r--src/map/battle.h1
-rw-r--r--src/map/map.h2
-rw-r--r--src/map/mob.c2
-rw-r--r--src/map/pc.c15
6 files changed, 32 insertions, 4 deletions
diff --git a/Changelog.txt b/Changelog.txt
index cf884e282..070276a29 100644
--- a/Changelog.txt
+++ b/Changelog.txt
@@ -1,8 +1,17 @@
Date Added
+01/05
+ * Fixed skill_require_db reading somehow getting corrupted if weapons usable
+ for the skill is more than 20, thus causing the skills to fail everytime
+ [celest]
+ * Fixed @killmonster crashing the server with summoned monsters, thanks to
+ Alex14 [celest]
+ * Added double_connection_system to battle_athena (not completed yet) [celest]
+
01/04
* Fixed GM Command Logging (Not sure why TXT logging still isn't working properly :( ) [Codemaster] [SVN 907]
* Fixed one of Lupus' additions to the item_db [Codemaster] [SVN 907]
* Fixed Seismic Weapon Skill (it 100% didn't break target's weapon at 4 level of the skill) [Lupus]
+
01/02
* Re-fixed map-server crashing if an empty line is in skill_castnodex.txt,
thanks to Alex14 for pointing it out (SVN 899) [celest]
diff --git a/src/map/battle.c b/src/map/battle.c
index 60e038fd0..f82e60cd2 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -5325,7 +5325,8 @@ static const struct {
{ "motd_type", &battle_config.motd_type}, // [celest]
{ "allow_atcommand_when_mute", &battle_config.allow_atcommand_when_mute}, // [celest]
{ "finding_ore_rate", &battle_config.finding_ore_rate}, // [celest]
- { "exp_calc_type", &battle_config.exp_calc_type}, // [celest]
+ { "exp_calc_type", &battle_config.exp_calc_type}, // [celest]
+ { "double_login_system", &battle_config.double_login_system}, // [celest]
//SQL-only options start
#ifndef TXT_ONLY
@@ -5586,6 +5587,7 @@ void battle_set_defaults() {
battle_config.castrate_dex_scale = 150;
battle_config.area_size = 14;
battle_config.exp_calc_type = 1;
+ battle_config.double_login_system = 0;
//SQL-only options start
#ifndef TXT_ONLY
@@ -5723,6 +5725,9 @@ void battle_validate_conf() {
if (battle_config.vending_max_value > 10000000 || battle_config.vending_max_value<=0) // Lupus & Kobra_k88
battle_config.vending_max_value = 10000000;
+ if (battle_config.double_login_system < 0)
+ battle_config.double_login_system = 0;
+
}
/*==========================================
diff --git a/src/map/battle.h b/src/map/battle.h
index 021346294..29b537080 100644
--- a/src/map/battle.h
+++ b/src/map/battle.h
@@ -357,6 +357,7 @@ extern struct Battle_Config {
int allow_atcommand_when_mute; // [celest]
int finding_ore_rate; // orn
int exp_calc_type;
+ int double_login_system;
#ifndef TXT_ONLY /* SQL-only options */
int mail_system; // [Valaris]
diff --git a/src/map/map.h b/src/map/map.h
index 812785f13..7f3fa5d71 100644
--- a/src/map/map.h
+++ b/src/map/map.h
@@ -16,7 +16,7 @@
#define LIFETIME_FLOORITEM 60
#define DAMAGELOG_SIZE 30
#define LOOTITEM_SIZE 10
-#define MAX_SKILL_LEVEL 10
+#define MAX_SKILL_LEVEL 20
#define MAX_STATUSCHANGE 210
#define MAX_SKILLUNITGROUP 32
#define MAX_MOBSKILLUNITGROUP 8
diff --git a/src/map/mob.c b/src/map/mob.c
index 4f80c23bb..21ec6c585 100644
--- a/src/map/mob.c
+++ b/src/map/mob.c
@@ -2298,7 +2298,7 @@ int mob_damage(struct block_list *src,struct mob_data *md,int damage,int type)
mobskill_use_id(md,&md->bl,skillidx);//自爆詠唱開始
md->state.special_mob_ai++;
}
- if (md->master_id==src->id)
+ if (src && md->master_id==src->id)
md->target_dir=map_calc_dir(src,md->bl.x,md->bl.y)+1;
}
diff --git a/src/map/pc.c b/src/map/pc.c
index 8f2ce5654..adc2d68da 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -720,8 +720,14 @@ int pc_authok(int id, int login_id2, time_t connect_until_time, struct mmo_chars
sd = map_id2sd(id);
nullpo_retr(1, sd);
+ // check if double login occured
+ if(sd->new_fd){
+ // 2重login状態だったので、両方落す
+ clif_authfail_fd(sd->fd,2); // same id
+ clif_authfail_fd(sd->new_fd,8); // same id
+ return 1;
+ }
sd->login_id2 = login_id2;
-
memcpy(&sd->status, st, sizeof(*st));
if (sd->status.sex != sd->sex) {
@@ -945,6 +951,13 @@ int pc_authfail(int id) {
if (sd == NULL)
return 1;
+ if(sd->new_fd){
+ // 2重login状態だったので、新しい接続のみ落す
+ clif_authfail_fd(sd->new_fd,0);
+ sd->new_fd=0;
+ return 0;
+ }
+
clif_authfail_fd(sd->fd, 0);
return 0;