diff options
author | celest <celest@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2005-02-18 07:07:25 +0000 |
---|---|---|
committer | celest <celest@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2005-02-18 07:07:25 +0000 |
commit | aa52f1d90449e970bd5972db00ef29f77eaa39d7 (patch) | |
tree | a391d053cd9063a34bb090f6839d2233e01aece5 /src/map/pc.c | |
parent | 797d05f77b8ab4cdfd67fda7aa44126fecc0da21 (diff) | |
download | hercules-aa52f1d90449e970bd5972db00ef29f77eaa39d7.tar.gz hercules-aa52f1d90449e970bd5972db00ef29f77eaa39d7.tar.bz2 hercules-aa52f1d90449e970bd5972db00ef29f77eaa39d7.tar.xz hercules-aa52f1d90449e970bd5972db00ef29f77eaa39d7.zip |
* Added bAddRace2
* Added mob_race2_db.txt
* Updated description for backup_txt in char_athena.conf a bit
* Added some suggestions by Poki#3
* Use the event names from script_athena.conf to check whenever a player event trigger is being read/set
* Removed an unused save/bank.txt
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/branches/stable@1131 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/pc.c')
-rw-r--r-- | src/map/pc.c | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/src/map/pc.c b/src/map/pc.c index 2bb6ddf5d..cd2d9bb64 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -809,9 +809,9 @@ int pc_authok(int id, int login_id2, time_t connect_until_time, struct mmo_chars // Automated script events if (script_config.event_requires_trigger) { - sd->state.event_death = pc_readglobalreg(sd,"PCDieEvent"); - sd->state.event_kill = pc_readglobalreg(sd,"PCKillEvent"); - sd->state.event_disconnect = pc_readglobalreg(sd,"PCLogoffEvent"); + sd->state.event_death = pc_readglobalreg(sd, script_config.die_event_name); + sd->state.event_kill = pc_readglobalreg(sd, script_config.kill_event_name); + sd->state.event_disconnect = pc_readglobalreg(sd, script_config.logout_event_name); // if script triggers are not required } else { sd->state.event_death = 1; @@ -1839,6 +1839,14 @@ int pc_bonus2(struct map_session_data *sd,int type,int type2,int val) sd->hp_loss_rate = val; } break; + case SP_ADDRACE2: + if (type2 > 0 && type2 < MAX_MOB_RACE_DB) + break; + if(sd->state.lr_flag != 2) + sd->addrace2[type2] += val; + else + sd->addrace2_[type2] += val; + break; default: if(battle_config.error_log) @@ -5560,11 +5568,11 @@ int pc_setglobalreg(struct map_session_data *sd,char *reg,int val) if(strcmp(reg,"PC_DIE_COUNTER") == 0 && sd->die_counter != val){ sd->die_counter = val; status_calc_pc(sd,0); - } else if(strcmp(reg,"PCDieEvent") == 0){ + } else if(strcmp(reg,script_config.die_event_name) == 0){ sd->state.event_death = val; - } else if(strcmp(reg,"PCKillEvent") == 0){ + } else if(strcmp(reg,script_config.kill_event_name) == 0){ sd->state.event_kill = val; - } else if(strcmp(reg,"PCLogoutEvent") == 0){ + } else if(strcmp(reg,script_config.logout_event_name) == 0){ sd->state.event_disconnect = val; } |