summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-03-17 14:09:54 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-03-17 14:09:54 +0000
commitb719a7594246a5716926dd0b7df6ab8adb97424d (patch)
treebe0e26e7aca1e7e4a8ea0ef3669cdf2b9b4bc457 /src
parentc7b72fc94094e863763ecb3c4d8e818953925a2b (diff)
downloadhercules-b719a7594246a5716926dd0b7df6ab8adb97424d.tar.gz
hercules-b719a7594246a5716926dd0b7df6ab8adb97424d.tar.bz2
hercules-b719a7594246a5716926dd0b7df6ab8adb97424d.tar.xz
hercules-b719a7594246a5716926dd0b7df6ab8adb97424d.zip
- Fixed handling of the char_gm_read config for packet 0x2af7 (reloadgmdb)
- Added battle_config debuff_on_logout which removes Asura's SP regen delay and Strip-Equip effects on logout when set to yes (default). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5644 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src')
-rw-r--r--src/char/char.c2
-rw-r--r--src/char_sql/char.c16
-rw-r--r--src/map/battle.c5
-rw-r--r--src/map/battle.h2
-rw-r--r--src/map/chrif.c2
-rw-r--r--src/map/map.c20
6 files changed, 27 insertions, 20 deletions
diff --git a/src/char/char.c b/src/char/char.c
index ba97a4139..6f6ece4d2 100644
--- a/src/char/char.c
+++ b/src/char/char.c
@@ -2429,7 +2429,7 @@ int parse_frommap(int fd) {
// request from map-server to reload GM accounts. Transmission to login-server (by Yor)
case 0x2af7:
if (login_fd > 0) { // don't send request if no login-server
- WFIFOHEAD(login_fd, 2);
+ WFIFOHEAD(login_fd, 2);
WFIFOW(login_fd,0) = 0x2709;
WFIFOSET(login_fd, 2);
// printf("char : request from map-server to reload GM accounts -> login-server.\n");
diff --git a/src/char_sql/char.c b/src/char_sql/char.c
index 058ab1f2b..33a6c8f6a 100644
--- a/src/char_sql/char.c
+++ b/src/char_sql/char.c
@@ -2254,19 +2254,17 @@ int parse_frommap(int fd) {
// map-server alive packet
case 0x2718:
- if (RFIFOREST(fd) < 2)
- return 0;
RFIFOSKIP(fd,2);
break;
case 0x2af7:
- if(char_gm_read)
- {
- RFIFOSKIP(fd,2);
- if (login_fd > 0) { // don't send request if no login-server
- WFIFOW(login_fd,0) = 0x2709;
- WFIFOSET(login_fd, 2);
- }
+ RFIFOSKIP(fd,2);
+ if(char_gm_read) //Re-read gm accounts.
+ read_gm_account();
+ //Send to login request to reload gm accounts.
+ else if (login_fd > 0) { // don't send request if no login-server
+ WFIFOW(login_fd,0) = 0x2709;
+ WFIFOSET(login_fd, 2);
}
break;
diff --git a/src/map/battle.c b/src/map/battle.c
index 6de02dc23..ace030d10 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -3990,6 +3990,8 @@ static const struct battle_data_short {
{ "ignore_items_gender", &battle_config.ignore_items_gender}, // [Lupus]
{ "copyskill_restrict", &battle_config.copyskill_restrict}, // [Aru]
{ "berserk_cancels_buffs", &battle_config.berserk_cancels_buffs}, // [Aru]
+
+ { "debuff_on_logout", &battle_config.debuff_on_logout},
{ "monster_ai", &battle_config.mob_ai},
{ "dynamic_mobs", &battle_config.dynamic_mobs},
{ "mob_remove_damaged", &battle_config.mob_remove_damaged},
@@ -4391,6 +4393,9 @@ void battle_set_defaults() {
battle_config.who_display_aid = 0;
battle_config.display_hallucination = 1;
battle_config.ignore_items_gender = 1;
+ battle_config.copyskill_restrict = 2;
+ battle_config.berserk_cancels_buffs = 1;
+ battle_config.debuff_on_logout = 1;
battle_config.use_statpoint_table = 1;
battle_config.mob_ai = 0;
battle_config.dynamic_mobs = 1; // use Dynamic Mobs [Wizputer]
diff --git a/src/map/battle.h b/src/map/battle.h
index 6ad232e37..0f92c3160 100644
--- a/src/map/battle.h
+++ b/src/map/battle.h
@@ -385,7 +385,7 @@ extern struct Battle_Config {
unsigned short copyskill_restrict; // [Aru]
unsigned short berserk_cancels_buffs; // [Aru]
-
+ unsigned short debuff_on_logout; // Removes a few "official" negative Scs on logout. [Skotlex]
unsigned short mob_ai; //Configures various mob_ai settings to make them smarter or dumber(official). [Skotlex]
unsigned short dynamic_mobs; // Dynamic Mobs [Wizputer] - battle_athena flag implemented by [random]
unsigned short mob_remove_damaged; // Dynamic Mobs - Remove mobs even if damaged [Wizputer]
diff --git a/src/map/chrif.c b/src/map/chrif.c
index 4a37e1f1a..06b1946cc 100644
--- a/src/map/chrif.c
+++ b/src/map/chrif.c
@@ -1079,7 +1079,7 @@ int chrif_reloadGMdb(void)
{
chrif_check(-1);
- WFIFOHEAD(char_fd, 2);
+ WFIFOHEAD(char_fd, 2);
WFIFOW(char_fd,0) = 0x2af7;
WFIFOSET(char_fd, 2);
diff --git a/src/map/map.c b/src/map/map.c
index 92bddc3c5..9c9e99d5f 100644
--- a/src/map/map.c
+++ b/src/map/map.c
@@ -1575,14 +1575,18 @@ int map_quit(struct map_session_data *sd) {
status_change_end(&sd->bl,SC_BERSERK,-1);
if(sd->sc.data[SC_TRICKDEAD].timer!=-1)
status_change_end(&sd->bl,SC_TRICKDEAD,-1);
- if(sd->sc.data[SC_STRIPWEAPON].timer!=-1)
- status_change_end(&sd->bl,SC_STRIPWEAPON,-1);
- if(sd->sc.data[SC_STRIPARMOR].timer!=-1)
- status_change_end(&sd->bl,SC_STRIPARMOR,-1);
- if(sd->sc.data[SC_STRIPSHIELD].timer!=-1)
- status_change_end(&sd->bl,SC_STRIPSHIELD,-1);
- if(sd->sc.data[SC_STRIPHELM].timer!=-1)
- status_change_end(&sd->bl,SC_STRIPHELM,-1);
+ if (battle_config.debuff_on_logout) {
+ if(sd->sc.data[SC_STRIPWEAPON].timer!=-1)
+ status_change_end(&sd->bl,SC_STRIPWEAPON,-1);
+ if(sd->sc.data[SC_STRIPARMOR].timer!=-1)
+ status_change_end(&sd->bl,SC_STRIPARMOR,-1);
+ if(sd->sc.data[SC_STRIPSHIELD].timer!=-1)
+ status_change_end(&sd->bl,SC_STRIPSHIELD,-1);
+ if(sd->sc.data[SC_STRIPHELM].timer!=-1)
+ status_change_end(&sd->bl,SC_STRIPHELM,-1);
+ if(sd->sc.data[SC_EXTREMITYFIST].timer!=-1)
+ status_change_end(&sd->bl,SC_EXTREMITYFIST,-1);
+ }
}
skill_clear_unitgroup(&sd->bl); // スキルユニットグル?プの削除