summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Changelog-Trunk.txt8
-rw-r--r--src/char/char.c2
-rw-r--r--src/char_sql/char.c2
-rw-r--r--src/login/login.c1
-rw-r--r--src/login_sql/login.c1
-rw-r--r--src/map/clif.c12
-rw-r--r--src/map/mob.c6
7 files changed, 24 insertions, 8 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt
index 970efe763..6b0094744 100644
--- a/Changelog-Trunk.txt
+++ b/Changelog-Trunk.txt
@@ -4,6 +4,14 @@ 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/07/19
+ * Corrected Trim chars to block 'enter', as explained by the Ultra mage.
+ [Skotlex]
+ * When the client passes account version 0, the login server will set it to
+ 1 now. [Skotlex]
+ * Corrected the HP bar scaling when HP is above Short Max. It should
+ display fine for any HP value now. [Skotlex]
+ * Added a check when the mob's adelay is shorter than the amotion, in which
+ case the adelay will be changed to the amotion value. [Skotlex]
* Some minor mapflag changes. [MasterOfMuppets]
2006/07/18
* Added atcommand @partyoption, lets you alter the party item-distribution
diff --git a/src/char/char.c b/src/char/char.c
index e3562946a..2c9f5e321 100644
--- a/src/char/char.c
+++ b/src/char/char.c
@@ -82,7 +82,7 @@ int subnet_count = 0;
int name_ignoring_case = 0; // Allow or not identical name for characters but with a different case by [Yor]
int char_name_option = 0; // Option to know which letters/symbols are authorised in the name of a character (0: all, 1: only those in char_name_letters, 2: all EXCEPT those in char_name_letters) by [Yor]
//The following are characters that are trimmed regardless because they cause confusion and problems on the servers. [Skotlex]
-#define TRIM_CHARS "\032\t\n\013 "
+#define TRIM_CHARS "\032\t\x0A\x0D "
char char_name_letters[1024] = ""; // list of letters/symbols authorised (or not) in a character name. by [Yor]
int log_char = 1; // loggin char or not [devil]
diff --git a/src/char_sql/char.c b/src/char_sql/char.c
index 2a3259f7d..dac4b9541 100644
--- a/src/char_sql/char.c
+++ b/src/char_sql/char.c
@@ -90,7 +90,7 @@ int name_ignoring_case = 0; // Allow or not identical name for characters but wi
int char_name_option = 0; // Option to know which letters/symbols are authorised in the name of a character (0: all, 1: only those in char_name_letters, 2: all EXCEPT those in char_name_letters) by [Yor]
char char_name_letters[1024] = ""; // list of letters/symbols used to authorise or not a name of a character. by [Yor]
//The following are characters that are trimmed regardless because they cause confusion and problems on the servers. [Skotlex]
-#define TRIM_CHARS "\032\t\n\013 "
+#define TRIM_CHARS "\032\t\x0A\x0D "
int char_per_account = 0; //Maximum charas per account (default unlimited) [Sirius]
int log_char = 1; // loggin char or not [devil]
diff --git a/src/login/login.c b/src/login/login.c
index b15ab5f1e..70ac933b4 100644
--- a/src/login/login.c
+++ b/src/login/login.c
@@ -3114,6 +3114,7 @@ int parse_login(int fd) {
}
account.version = RFIFOL(fd, 2); //for exe version check [Sirius]
+ if (!account.version) account.version = 1; //Force some version...
memcpy(account.userid,RFIFOP(fd,6),NAME_LENGTH);
account.userid[23] = '\0';
remove_control_chars((unsigned char *)account.userid);
diff --git a/src/login_sql/login.c b/src/login_sql/login.c
index 9be95051a..059611979 100644
--- a/src/login_sql/login.c
+++ b/src/login_sql/login.c
@@ -1569,6 +1569,7 @@ int parse_login(int fd) {
}
account.version = RFIFOL(fd, 2);
+ if (!account.version) account.version = 1; //Force some version...
memcpy(account.userid,RFIFOP(fd, 6),NAME_LENGTH);
account.userid[23] = '\0';
memcpy(account.passwd,RFIFOP(fd, 30),NAME_LENGTH);
diff --git a/src/map/clif.c b/src/map/clif.c
index 3953b356c..2d925bfdc 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -6121,8 +6121,8 @@ int clif_party_hp(struct map_session_data *sd)
WBUFW(buf,0)=0x106;
WBUFL(buf,2)=sd->status.account_id;
if (sd->battle_status.max_hp > SHRT_MAX) { //To correctly display the %hp bar. [Skotlex]
- WBUFW(buf,6) = 10000*sd->battle_status.hp/sd->battle_status.max_hp;
- WBUFW(buf,8) = 10000;
+ WBUFW(buf,6) = sd->battle_status.hp/(sd->battle_status.max_hp/100);
+ WBUFW(buf,8) = 100;
} else {
WBUFW(buf,6) = sd->battle_status.hp;
WBUFW(buf,8) = sd->battle_status.max_hp;
@@ -6141,8 +6141,8 @@ static void clif_hpmeter_single(int fd, struct map_session_data *sd)
WFIFOW(fd,0) = 0x106;
WFIFOL(fd,2) = sd->status.account_id;
if (sd->battle_status.max_hp > SHRT_MAX) { //To correctly display the %hp bar. [Skotlex]
- WFIFOW(fd,6) = 10000*sd->battle_status.hp/sd->battle_status.max_hp;
- WFIFOW(fd,8) = 10000;
+ WFIFOW(fd,6) = 100*sd->battle_status.hp/(sd->battle_status.max_hp/100);
+ WFIFOW(fd,8) = 100;
} else {
WFIFOW(fd,6) = sd->battle_status.hp;
WFIFOW(fd,8) = sd->battle_status.max_hp;
@@ -6171,8 +6171,8 @@ int clif_hpmeter(struct map_session_data *sd)
WBUFW(buf,0) = 0x106;
WBUFL(buf,2) = sd->status.account_id;
if (sd->battle_status.max_hp > SHRT_MAX) { //To correctly display the %hp bar. [Skotlex]
- WBUFW(buf,6) = 10000*sd->battle_status.hp/sd->battle_status.max_hp;
- WBUFW(buf,8) = 10000;
+ WBUFW(buf,6) = 100*sd->battle_status.hp/(sd->battle_status.max_hp/100);
+ WBUFW(buf,8) = 100;
} else {
WBUFW(buf,6) = sd->battle_status.hp;
WBUFW(buf,8) = sd->battle_status.max_hp;
diff --git a/src/map/mob.c b/src/map/mob.c
index 8db078e27..8c8f59f4a 100644
--- a/src/map/mob.c
+++ b/src/map/mob.c
@@ -3225,6 +3225,9 @@ static int mob_readdb(void)
status->adelay=atoi(str[27]);
status->amotion=atoi(str[28]);
status->dmotion=atoi(str[29]);
+ //If the attack animation is longer than the delay, the client crops the attack animation!
+ if (status->adelay < status->amotion)
+ status->adelay = status->amotion;
if(battle_config.monster_damage_delay_rate != 100)
status->dmotion = status->dmotion*battle_config.monster_damage_delay_rate/100;
@@ -3904,6 +3907,9 @@ static int mob_read_sqldb(void)
status->adelay = TO_INT(27);
status->amotion = TO_INT(28);
status->dmotion = TO_INT(29);
+ //If the attack animation is longer than the delay, the client crops the attack animation!
+ if (status->adelay < status->amotion)
+ status->adelay = status->amotion;
if(battle_config.monster_damage_delay_rate != 100)
status->dmotion = status->dmotion*battle_config.monster_damage_delay_rate/100;