diff options
author | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-11-13 19:15:03 +0000 |
---|---|---|
committer | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-11-13 19:15:03 +0000 |
commit | e89f2a34a9dccf3146ecc22a3b570936fe4aab6a (patch) | |
tree | b56b80e0b73a428f15bd2845e3d69f795382e570 /src/map/pc.c | |
parent | 18282ae649b0c2d54deaba32132171cbf56a1868 (diff) | |
download | hercules-e89f2a34a9dccf3146ecc22a3b570936fe4aab6a.tar.gz hercules-e89f2a34a9dccf3146ecc22a3b570936fe4aab6a.tar.bz2 hercules-e89f2a34a9dccf3146ecc22a3b570936fe4aab6a.tar.xz hercules-e89f2a34a9dccf3146ecc22a3b570936fe4aab6a.zip |
- HP Conversion will fail when used at max SP. It should not display any errors to the client.
- Modified yet again the login procedure. The initial status_calc_pc is invoked when the variable registries arrive, but the initial LoadEndAck will not be parsed until the registries have arrived. In the rare case this happens, pc_reg_received will take care of invoking the LoadEndAck function itself.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9208 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/pc.c')
-rw-r--r-- | src/map/pc.c | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/src/map/pc.c b/src/map/pc.c index e1a3555a0..8f7548dc0 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -593,7 +593,6 @@ int pc_authok(struct map_session_data *sd, int login_id2, time_t connect_until_t } else sd->class_ = i; //Initializations to null/0 unneeded since map_session_data was filled with 0 upon allocation. - // 基本的な初期化 sd->state.connect_new = 1; sd->followtimer = -1; // [MouseJstr] @@ -706,9 +705,6 @@ int pc_authok(struct map_session_data *sd, int login_id2, time_t connect_until_t sd->state.event_disconnect = 1; sd->state.event_kill_mob = 1; - status_calc_pc(sd,1); - - sd->state.auth = 1; { //Add IP field unsigned char *ip = (unsigned char *) &session[sd->fd]->client_addr.sin_addr; if (pc_isGM(sd)) @@ -818,8 +814,6 @@ int pc_reg_received(struct map_session_data *sd) sd->change_level = pc_readglobalreg(sd,"jobchange_level"); sd->die_counter = pc_readglobalreg(sd,"PC_DIE_COUNTER"); - if (!sd->die_counter && (sd->class_&MAPID_UPPERMASK) == MAPID_SUPER_NOVICE) - status_calc_pc(sd, 0); //Check +10 to all stats bonus. chrif_scdata_request(sd->status.account_id, sd->status.char_id); if (pc_checkskill(sd, TK_MISSION)) { @@ -848,7 +842,6 @@ int pc_reg_received(struct map_session_data *sd) if (i < sd->status.skill[sd->cloneskill_id].lv) sd->status.skill[sd->cloneskill_id].lv = i; sd->status.skill[sd->cloneskill_id].flag = 13; //cloneskill flag - clif_skillinfoblock(sd); } } @@ -871,8 +864,18 @@ int pc_reg_received(struct map_session_data *sd) sd->state.event_joblvup = 1; sd->state.event_loadmap = 1; } + //Weird... maybe registries were reloaded? + if (sd->state.auth) + return 0; - return 0; + status_calc_pc(sd,1); + sd->state.auth = 1; + if (!sd->state.connect_new && sd->fd) + { //Character already loaded map! Gotta trigger LoadEndAck manually. + sd->state.connect_new = 1; + clif_parse_LoadEndAck(sd->fd, sd); + } + return 1; } static int pc_calc_skillpoint(struct map_session_data* sd) |