diff options
author | Lance <Lance@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-03-19 04:36:53 +0000 |
---|---|---|
committer | Lance <Lance@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-03-19 04:36:53 +0000 |
commit | 28134ba1f33aea49a797f8e3be4aeaae80944231 (patch) | |
tree | 251fb85a5173d74476266ad0540b5d1a2d89c231 /src/map/mob.c | |
parent | 06985798ef8ed35f2ef1d6e52d292ba6b3add99a (diff) | |
download | hercules-28134ba1f33aea49a797f8e3be4aeaae80944231.tar.gz hercules-28134ba1f33aea49a797f8e3be4aeaae80944231.tar.bz2 hercules-28134ba1f33aea49a797f8e3be4aeaae80944231.tar.xz hercules-28134ba1f33aea49a797f8e3be4aeaae80944231.zip |
* Recoded getmobdata script function. Fixed mob_damage typo sd -> mvp_sd. Cleanep up confusing indentation in clif.c.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5661 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/mob.c')
-rw-r--r-- | src/map/mob.c | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/src/map/mob.c b/src/map/mob.c index 24806b374..23d29b7a1 100644 --- a/src/map/mob.c +++ b/src/map/mob.c @@ -2296,7 +2296,6 @@ int mob_damage(struct block_list *src,struct mob_data *md,int damage,int type) set_var(NULL, buffer, (void *)(int)src->type);
sprintf(buffer, "%s::OnDamage", md->nd->exname);
npc_event_do(buffer);
- return 0;
}
if(src->type == BL_PC) {
sd = (struct map_session_data *)src;
@@ -2847,21 +2846,21 @@ int mob_damage(struct block_list *src,struct mob_data *md,int damage,int type) npc_event(mvp_sd,md->npc_event,0);
} else if (mvp_sd) {
-//lordalfa
- pc_setglobalreg(mvp_sd,"killedrid",(md->class_));
- if(sd->state.event_kill_mob){
- if (script_config.event_script_type == 0) {
- struct npc_data *npc;
- if ((npc = npc_name2id(script_config.kill_mob_event_name))) {
- run_script(npc->u.scr.script,0,mvp_sd->bl.id,npc->bl.id); // PCKillNPC [Lance]
- ShowStatus("Event '"CL_WHITE"%s"CL_RESET"' executed.\n",script_config.kill_mob_event_name);
+ //lordalfa
+ pc_setglobalreg(mvp_sd,"killedrid",(md->class_));
+ if(mvp_sd->state.event_kill_mob){
+ if (script_config.event_script_type == 0) {
+ struct npc_data *npc;
+ if ((npc = npc_name2id(script_config.kill_mob_event_name))) {
+ run_script(npc->u.scr.script,0,mvp_sd->bl.id,npc->bl.id); // PCKillNPC [Lance]
+ ShowStatus("Event '"CL_WHITE"%s"CL_RESET"' executed.\n",script_config.kill_mob_event_name);
+ }
+ } else {
+ ShowStatus("%d '"CL_WHITE"%s"CL_RESET"' events executed.\n",
+ npc_event_doall_id(script_config.kill_mob_event_name, mvp_sd->bl.id), script_config.kill_mob_event_name);
}
- } else {
- ShowStatus("%d '"CL_WHITE"%s"CL_RESET"' events executed.\n",
- npc_event_doall_id(script_config.kill_mob_event_name, mvp_sd->bl.id), script_config.kill_mob_event_name);
}
}
-}
//[lordalfa]
(battle_config.mob_clear_delay) ? clif_clearchar_delay(tick+battle_config.mob_clear_delay,&md->bl,1) : clif_clearchar_area(&md->bl,1);
// clif_clearchar_area(&md->bl,1); //eh? Why send the same packet twice? [Skotlex]
|