summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLance <Lance@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-04-18 11:43:18 +0000
committerLance <Lance@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-04-18 11:43:18 +0000
commit7a94e21772f03458e42edcf1d4dcd733c9c858ce (patch)
tree9996c26719fd228c0389bba3b6734471101bf77c /src
parenta899340d9059d43fd850d161136582998e8bc07e (diff)
downloadhercules-7a94e21772f03458e42edcf1d4dcd733c9c858ce.tar.gz
hercules-7a94e21772f03458e42edcf1d4dcd733c9c858ce.tar.bz2
hercules-7a94e21772f03458e42edcf1d4dcd733c9c858ce.tar.xz
hercules-7a94e21772f03458e42edcf1d4dcd733c9c858ce.zip
Modifying st->oid is dangerous. Using sd->state.using_fake_npc as identifier instead.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6152 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src')
-rw-r--r--src/map/script.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/map/script.c b/src/map/script.c
index 8d5d66087..cc0483c5c 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -10872,7 +10872,6 @@ int run_script_main(struct script_state *st)
if(st->oid && st->rid && (bl = map_id2bl(st->oid))){
if(bl->type == BL_PC){
clif_sendfakenpc(((TBL_PC *)bl),dummy_npc_id);
- st->oid = dummy_npc_id;
} else if(bl->type == BL_NPC){
if(npc_checknear(((TBL_PC *)bl), bl->id))
clif_sendfakenpc(((struct map_session_data *)bl),st->oid);
@@ -10975,7 +10974,7 @@ int run_script_main(struct script_state *st)
{
struct map_session_data *sd=map_id2sd(st->rid);
st->pos=-1;
- if(sd && sd->npc_id==st->oid){
+ if(sd && (sd->npc_id==st->oid || sd->state.using_fake_npc)){
if(sd->state.using_fake_npc){
clif_clearchar_id(sd->npc_id, 0, sd->fd);
sd->state.using_fake_npc = 0;