Update to Auth Glitch fix: moved unit_free_pc back to where it was and updated it so unit_free_pc just tells the script to end(not hard delete). (bugreport:1214)

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12481 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
Kevin 2008-04-04 22:10:04 +00:00
parent f6a6d34640
commit 41cccac36c
4 changed files with 10 additions and 8 deletions

View File

@ -4,6 +4,9 @@ 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. IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
2008/04/04 2008/04/04
* Update to Auth Glitch fix: moved unit_free_pc back to where it was
- and updated it so unit_free_pc just tells the script to end
- (not hard delete). (r12481) [Kevin]
* Updated mob_db.sql to latest. * Updated mob_db.sql to latest.
* Fixed a little bug in Kevin's commit (r12473) [Toms] * Fixed a little bug in Kevin's commit (r12473) [Toms]
* Bug fixes for Auth Glitch and Map server crash through script warp when * Bug fixes for Auth Glitch and Map server crash through script warp when

View File

@ -400,9 +400,6 @@ int chrif_changemapserverack(int account_id, int login_id1, int login_id2, int c
} else } else
clif_changemapserver(node->sd, map_index, x, y, ntohl(ip), ntohs(port)); clif_changemapserver(node->sd, map_index, x, y, ntohl(ip), ntohs(port));
//Free session data from this map server [Kevin]
unit_free_pc(node->sd);
//Player has been saved already, remove him from memory. [Skotlex] //Player has been saved already, remove him from memory. [Skotlex]
chrif_auth_delete(account_id, char_id, ST_MAPCHANGE); chrif_auth_delete(account_id, char_id, ST_MAPCHANGE);

View File

@ -3595,6 +3595,9 @@ int pc_setpos(struct map_session_data* sd, unsigned short mapindex, int x, int y
chrif_save(sd,2); chrif_save(sd,2);
chrif_changemapserver(sd, ip, (short)port); chrif_changemapserver(sd, ip, (short)port);
//Free session data from this map server [Kevin]
unit_free_pc(node->sd);
return 0; return 0;
} }

View File

@ -1838,12 +1838,11 @@ int unit_free(struct block_list *bl, int clrtype)
sd->regstr = NULL; sd->regstr = NULL;
sd->regstr_num = 0; sd->regstr_num = 0;
} }
//Tell the script to end, not delete it, it will free itself when necessary [Kevin]
if (sd->st) { if (sd->st) {
if (sd->st->stack) sd->st->rid = 0;
script_free_stack (sd->st->stack); sd->st->state = 2;
aFree(sd->st);
sd->st = NULL;
sd->npc_id = 0;
} }
} else if( bl->type == BL_PET ) { } else if( bl->type == BL_PET ) {
struct pet_data *pd = (struct pet_data*)bl; struct pet_data *pd = (struct pet_data*)bl;