summaryrefslogtreecommitdiff
path: root/src/map/pc.c
diff options
context:
space:
mode:
authorLance <Lance@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-03-17 16:47:21 +0000
committerLance <Lance@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-03-17 16:47:21 +0000
commitec70ae22a2125ec3b71c2318a92746c0214efeb4 (patch)
tree95da958eff529b00b9972e693872cd6010c31f18 /src/map/pc.c
parent0985a47e31a4979020a87e8cb1768f6b99cf6cbf (diff)
downloadhercules-ec70ae22a2125ec3b71c2318a92746c0214efeb4.tar.gz
hercules-ec70ae22a2125ec3b71c2318a92746c0214efeb4.tar.bz2
hercules-ec70ae22a2125ec3b71c2318a92746c0214efeb4.tar.xz
hercules-ec70ae22a2125ec3b71c2318a92746c0214efeb4.zip
* Fixed misleading and inaccurately documented events and added a missing flag.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5649 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/pc.c')
-rw-r--r--src/map/pc.c25
1 files changed, 15 insertions, 10 deletions
diff --git a/src/map/pc.c b/src/map/pc.c
index 5673e91dc..2a47ab2ae 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -803,8 +803,9 @@ int pc_authok(struct map_session_data *sd, int login_id2, time_t connect_until_t
sd->die_counter=-1;
//Until the reg values arrive, set them to not require trigger...
sd->state.event_death = 1;
- sd->state.event_kill = 1;
+ sd->state.event_kill_pc = 1;
sd->state.event_disconnect = 1;
+ sd->state.event_kill_mob = 1;
if (night_flag) {
char tmpstr[1024];
@@ -927,13 +928,15 @@ int pc_reg_received(struct map_session_data *sd)
// Automated script events
if (script_config.event_requires_trigger) {
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_kill_pc = pc_readglobalreg(sd, script_config.kill_pc_event_name);
+ sd->state.event_kill_mob = pc_readglobalreg(sd, script_config.kill_mob_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;
- sd->state.event_kill = 1;
+ sd->state.event_kill_pc = 1;
sd->state.event_disconnect = 1;
+ sd->state.event_kill_mob = 1;
}
if (script_config.event_script_type == 0) {
@@ -5328,16 +5331,16 @@ int pc_damage(struct block_list *src,struct map_session_data *sd,int damage)
if (ssd) {
if (sd->state.event_death)
pc_setglobalreg(sd,"killerrid",(ssd->status.account_id));
- if (ssd->state.event_kill) {
+ if (ssd->state.event_kill_pc) {
if (script_config.event_script_type == 0) {
struct npc_data *npc;
- if ((npc = npc_name2id(script_config.kill_event_name))) {
- run_script(npc->u.scr.script,0,sd->bl.id,npc->bl.id); // PCKillNPC
- ShowStatus("Event '"CL_WHITE"%s"CL_RESET"' executed.\n", script_config.kill_event_name);
+ if ((npc = npc_name2id(script_config.kill_pc_event_name))) {
+ run_script(npc->u.scr.script,0,sd->bl.id,npc->bl.id); // PCKillPC [Lance]
+ ShowStatus("Event '"CL_WHITE"%s"CL_RESET"' executed.\n", script_config.kill_pc_event_name);
}
} else {
ShowStatus("%d '"CL_WHITE"%s"CL_RESET"' events executed.\n",
- npc_event_doall_id(script_config.kill_event_name, sd->bl.id), script_config.kill_event_name);
+ npc_event_doall_id(script_config.kill_pc_event_name, sd->bl.id), script_config.kill_pc_event_name);
}
}
if (battle_config.pk_mode && ssd->status.manner >= 0 && battle_config.manner_system) {
@@ -6541,8 +6544,10 @@ int pc_setregistry(struct map_session_data *sd,char *reg,int val,int type) {
// status_calc_pc(sd,0); //I doubt this is needed....
} else if(strcmp(reg,script_config.die_event_name) == 0){
sd->state.event_death = val;
- } else if(strcmp(reg,script_config.kill_event_name) == 0){
- sd->state.event_kill = val;
+ } else if(strcmp(reg,script_config.kill_pc_event_name) == 0){
+ sd->state.event_kill_pc = val;
+ } else if(strcmp(reg,script_config.kill_mob_event_name) == 0){
+ sd->state.event_kill_mob = val;
} else if(strcmp(reg,script_config.logout_event_name) == 0){
sd->state.event_disconnect = val;
}