summaryrefslogtreecommitdiff
path: root/src/char
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-04-05 00:23:18 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-04-05 00:23:18 +0000
commit075bc5af11d62a9c4265942501836422194cbb6e (patch)
tree72af610618969a17795a5474861ebeb2fed12797 /src/char
parent9ff9d769fa51c9ca4c85482d51eacb27522e9fe1 (diff)
downloadhercules-075bc5af11d62a9c4265942501836422194cbb6e.tar.gz
hercules-075bc5af11d62a9c4265942501836422194cbb6e.tar.bz2
hercules-075bc5af11d62a9c4265942501836422194cbb6e.tar.xz
hercules-075bc5af11d62a9c4265942501836422194cbb6e.zip
- Added inter config connection_ping_interval which specifies interval in hours at which mysql_ping's must be done on all connection handles to keep the mysql connection alive. Defaults to 0 (disabled)
- Removed login sql handle from the map server as it isn't used for anything. - Made the login sql handle on the char-sql server be used only when gm_read_method 1 is enabled. - Small fixes to npc_enable, added BL_NPC handling on status_get_sc. - Added a path_search check in map_random_dir, so that the random direction picked up doesn't goes through walls and all that. - Some changes to close-confine, status start will fail when the source is not found or it doesn't has sc-data. - pc_setoption no longer changes the character's class when mounting/dismounting, it only changes the view-class. - The peco-crash-fix from the char servers is still needed. This packet must be wrong! We likely need to sniff it. - Modified the char-txt server to modify the class of mounted characters to their non-mounted version. Added an upgrade_svn file to handle the class update on the sql tables. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5902 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/char')
-rw-r--r--src/char/char.c34
1 files changed, 26 insertions, 8 deletions
diff --git a/src/char/char.c b/src/char/char.c
index c50dbe126..8afd7c5af 100644
--- a/src/char/char.c
+++ b/src/char/char.c
@@ -565,6 +565,31 @@ int mmo_char_fromstr(char *str, struct mmo_charstatus *p, struct global_reg *reg
p->account_id = tmp_int[1];
p->char_num = tmp_int[2];
p->class_ = tmp_int[3];
+ //Temporal fix until all chars are reverted from peco-flying-class to
+ //normal classes. [Skotlex]
+ switch (p->class_) {
+ case 13: //Job_Knight2
+ p->class_ = 7;
+ break;
+ case 21: //Job_Crusader2
+ p->class_ = 14;
+ break;
+ case 4014: //Job_Lord_Knight2
+ p->class_ = 4008;
+ break;
+ case 4022: //Job_Paladin2
+ p->class_ = 4015;
+ break;
+ case 4036: //Job_Baby_Knight2
+ p->class_ = 4030;
+ break;
+ case 4044: //Job_Baby_Crusader2
+ p->class_ = 4037;
+ break;
+ case 4048: //Job_Star_Gladiator2
+ p->class_ = 4047;
+ break;
+ }
p->base_level = tmp_int[4];
p->job_level = tmp_int[5];
p->base_exp = tmp_uint[0];
@@ -1645,14 +1670,7 @@ int mmo_char_send006b(int fd, struct char_session_data *sd) {
WFIFOW(fd,j+50) = DEFAULT_WALK_SPEED; // p->speed;
WFIFOW(fd,j+52) = p->class_;
WFIFOW(fd,j+54) = p->hair;
-
- // pecopeco knights/crusaders crash fix
- if (p->class_ == 13 || p->class_ == 21 ||
- p->class_ == 4014 || p->class_ == 4022 ||
- p->class_ == 4036 || p->class_ == 4044)
- WFIFOW(fd,j+56) = 0;
- else WFIFOW(fd,j+56) = p->weapon;
-
+ WFIFOW(fd,j+56) = p->option&0x20?0:p->weapon; //When the weapon is sent and your option is riding, the client crashes on login!?
WFIFOW(fd,j+58) = p->base_level;
WFIFOW(fd,j+60) = (p->skill_point>SHRT_MAX)? SHRT_MAX : p->skill_point;
WFIFOW(fd,j+62) = p->head_bottom;