diff options
author | ultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2010-11-26 14:03:41 +0000 |
---|---|---|
committer | ultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2010-11-26 14:03:41 +0000 |
commit | bcb429dd6c87d5069b8c0b4c4c8f18f05303380f (patch) | |
tree | bab0b342329c4d1d0ac614b398d83fa0babb708b /src/map/pc.c | |
parent | 6abf2948ef3d1d303013d5a1a0dc29e346a4965a (diff) | |
download | hercules-bcb429dd6c87d5069b8c0b4c4c8f18f05303380f.tar.gz hercules-bcb429dd6c87d5069b8c0b4c4c8f18f05303380f.tar.bz2 hercules-bcb429dd6c87d5069b8c0b4c4c8f18f05303380f.tar.xz hercules-bcb429dd6c87d5069b8c0b4c4c8f18f05303380f.zip |
Changed 'killerrid' and 'killedrid' from player vars to player params (bugreport:3249).
Now stored in player session data, so they don't get saved on logout anymore.
Added sql upgrade script 'upgrade_svn14507.sql' to remove the now unused player variables.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14507 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/pc.c')
-rw-r--r-- | src/map/pc.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/map/pc.c b/src/map/pc.c index 28ead8086..27ebf2e36 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -5613,7 +5613,7 @@ int pc_dead(struct map_session_data *sd,struct block_list *src) } pc_setglobalreg(sd,"PC_DIE_COUNTER",sd->die_counter+1); - pc_setglobalreg(sd,"killerrid",src?src->id:0); + pc_setparam(sd, SP_KILLERRID, src?src->id:0); if( sd->state.bg_id ) { struct battleground_data *bg; @@ -5667,7 +5667,7 @@ int pc_dead(struct map_session_data *sd,struct block_list *src) if (src && src->type == BL_PC) { struct map_session_data *ssd = (struct map_session_data *)src; - pc_setglobalreg(ssd, "killedrid", sd->bl.id); + pc_setparam(ssd, SP_KILLEDRID, sd->bl.id); npc_script_event(ssd, NPCE_KILLPC); if (battle_config.pk_mode&2) { @@ -5923,6 +5923,8 @@ int pc_readparam(struct map_session_data* sd,int type) case SP_KARMA: val = sd->status.karma; break; case SP_MANNER: val = sd->status.manner; break; case SP_FAME: val = sd->status.fame; break; + case SP_KILLERRID: val = sd->killerrid; break; + case SP_KILLEDRID: val = sd->killedrid; break; } return val; @@ -6043,6 +6045,12 @@ int pc_setparam(struct map_session_data *sd,int type,int val) case SP_FAME: sd->status.fame = val; break; + case SP_KILLERRID: + sd->killerrid = val; + return 1; + case SP_KILLEDRID: + sd->killedrid = val; + return 1; default: ShowError("pc_setparam: Attempted to set unknown parameter '%d'.\n", type); return 0; |