diff options
author | celest <celest@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2005-04-06 09:00:18 +0000 |
---|---|---|
committer | celest <celest@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2005-04-06 09:00:18 +0000 |
commit | b1a8b920af2b39f546cd3408af893741fc94e12b (patch) | |
tree | df3f463a7b0b48bec7d366e7564461f1e224ad27 /src/map/pc.c | |
parent | cb2bb1dc2f9b4efc8925542c6162adcedac9c0b1 (diff) | |
download | hercules-b1a8b920af2b39f546cd3408af893741fc94e12b.tar.gz hercules-b1a8b920af2b39f546cd3408af893741fc94e12b.tar.bz2 hercules-b1a8b920af2b39f546cd3408af893741fc94e12b.tar.xz hercules-b1a8b920af2b39f546cd3408af893741fc94e12b.zip |
* Skip partner checking when calculating status with Marionette Control on
* Fixed plagiarised skills become unuseable after saving character
* Fixed double skill fail messages for stone curse
* Added modulus by zero check to rand()
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/branches/stable@1419 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/pc.c')
-rw-r--r-- | src/map/pc.c | 28 |
1 files changed, 17 insertions, 11 deletions
diff --git a/src/map/pc.c b/src/map/pc.c index 16931043b..12441cff0 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -365,7 +365,6 @@ static int pc_walktoxy_sub(struct map_session_data *); */ int pc_makesavestatus(struct map_session_data *sd) { - int i; nullpo_retr(0, sd); // 秒フ色は色?弊害が多いので保存?象にはしない @@ -397,16 +396,6 @@ int pc_makesavestatus(struct map_session_data *sd) if(battle_config.muting_players && sd->status.manner > 0) sd->status.manner = 0; - // Make sure all the skills are in the correct condition - // before persisting to the backend.. [MouseJstr] - for(i=0;i<MAX_SKILL;i++){ - if(sd->status.skill[i].flag == 13){ - sd->status.skill[i].id=0; - sd->status.skill[i].lv=0; - sd->status.skill[i].flag=0; - } - } - return 0; } @@ -1019,6 +1008,21 @@ int pc_calc_skilltree(struct map_session_data *sd) return 0; } +// Make sure all the skills are in the correct condition +// before persisting to the backend.. [MouseJstr] +int pc_clean_skilltree(struct map_session_data *sd) { + int i; + for (i = 0; i < MAX_SKILL; i++){ + if (sd->status.skill[i].flag == 13){ + sd->status.skill[i].id = 0; + sd->status.skill[i].lv = 0; + sd->status.skill[i].flag = 0; + } + } + + return 0; +} + int pc_calc_skilltree_normalize_job(int c, struct map_session_data *sd) { //if((battle_config.skillup_limit) && ((c >= 0 && c < 23) || (c >= 4001 && c < 4023) || (c >= 4023 && c < 4045))) { if (battle_config.skillup_limit && c >= 0 && c < 23) { @@ -3007,6 +3011,7 @@ int pc_setpos(struct map_session_data *sd,char *mapname_org,int x,int y,int clrt sd->bl.x=x; sd->bl.y=y; sd->state.waitingdisconnect=1; + pc_clean_skilltree(sd); pc_makesavestatus(sd); if(sd->status.pet_id > 0 && sd->pd) intif_save_petdata(sd->status.account_id,&sd->pet); @@ -3052,6 +3057,7 @@ int pc_setpos(struct map_session_data *sd,char *mapname_org,int x,int y,int clrt sd->petDB = NULL; if(battle_config.pet_status_support) status_calc_pc(sd,2); + pc_clean_skilltree(sd); pc_makesavestatus(sd); chrif_save(sd); storage_storage_save(sd); |