diff options
author | Lance <Lance@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-06-29 08:47:14 +0000 |
---|---|---|
committer | Lance <Lance@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-06-29 08:47:14 +0000 |
commit | b098c36a440f8052ab3c548420920bad92c7d872 (patch) | |
tree | c6a8382322944e6951ea748ecb870230274d5632 /src/map/npc.c | |
parent | 19ae14bb0f371886508be6d51c1b851e03ba65e1 (diff) | |
download | hercules-b098c36a440f8052ab3c548420920bad92c7d872.tar.gz hercules-b098c36a440f8052ab3c548420920bad92c7d872.tar.bz2 hercules-b098c36a440f8052ab3c548420920bad92c7d872.tar.xz hercules-b098c36a440f8052ab3c548420920bad92c7d872.zip |
* [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
Diffstat (limited to 'src/map/npc.c')
-rw-r--r-- | src/map/npc.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/map/npc.c b/src/map/npc.c index 6f3fe5f00..a81a63b23 100644 --- a/src/map/npc.c +++ b/src/map/npc.c @@ -818,7 +818,7 @@ int npc_event_sub(struct map_session_data *sd, struct event_data *ev, const unsi return 0;
}
- sd->npc_pos=run_script(ev->nd->u.scr.script,ev->pos,sd->bl.id,ev->nd->bl.id);
+ run_script(ev->nd->u.scr.script,ev->pos,sd->bl.id,ev->nd->bl.id);
return 0;
}
@@ -1108,7 +1108,7 @@ int npc_click(struct map_session_data *sd,struct block_list *bl) npc_event_dequeue(sd);
break;
case SCRIPT:
- sd->npc_pos=run_script(nd->u.scr.script,0,sd->bl.id,nd->bl.id);
+ run_script(nd->u.scr.script,0,sd->bl.id,nd->bl.id);
break;
}
@@ -1129,14 +1129,12 @@ int npc_scriptcont(struct map_session_data *sd,int id) }
if(id != fake_nd->bl.id) { // Not item script
- struct npc_data *nd;
- if ((nd = npc_checknear(sd,map_id2bl(id))) == NULL){
+ if ((npc_checknear(sd,map_id2bl(id))) == NULL){
ShowWarning("npc_scriptcont: failed npc_checknear test.\n");
return 1;
}
- sd->npc_pos=run_script(nd->u.scr.script,sd->npc_pos,sd->bl.id,id);
- } else // Item script, continue execution...
- sd->npc_pos=run_script(sd->npc_scriptroot,sd->npc_pos,sd->bl.id,id);
+ }
+ run_script_main(sd->st);
return 0;
}
|