From b098c36a440f8052ab3c548420920bad92c7d872 Mon Sep 17 00:00:00 2001 From: Lance Date: Thu, 29 Jun 2006 08:47:14 +0000 Subject: * [Fixed] - Scripting system screwing up script position after mixing timers with menus. - NPC attached AI mobs display as alive when dead. - View data not updating after buildin_unitdeadsit. [Improved] - NPCE_LOADMAP to execute after all (area) objects are sent to the player. - Simplified scripting system. sd will now use pointer to the script state itself. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7388 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/pc.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'src/map/pc.c') diff --git a/src/map/pc.c b/src/map/pc.c index fc7e5c7a8..ac3a054f2 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -4679,8 +4679,13 @@ int pc_dead(struct map_session_data *sd,struct block_list *src) pc_setglobalreg(sd,"PC_DIE_COUNTER",++sd->die_counter); - if (sd->state.event_death && (!src || src->type != BL_PC)) - pc_setglobalreg(sd, "killerrid", 0); + if (sd->state.event_death){ + if(!src) + pc_setglobalreg(sd, "killerrid", 0); + else + pc_setglobalreg(sd,"killerrid",src->id); + npc_script_event(sd,NPCE_DIE); + } if (src) switch (src->type) { @@ -4705,10 +4710,6 @@ int pc_dead(struct map_session_data *sd,struct block_list *src) case BL_PC: { struct map_session_data *ssd = (struct map_session_data *)src; - if (sd->state.event_death){ - pc_setglobalreg(sd,"killerrid",(ssd->status.account_id)); - npc_script_event(sd,NPCE_DIE); - } if (ssd->state.event_kill_pc) { pc_setglobalreg(ssd, "killedrid", sd->bl.id); npc_script_event(ssd, NPCE_KILLPC); -- cgit v1.2.3-60-g2f50