diff options
author | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-12-20 00:44:52 +0000 |
---|---|---|
committer | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-12-20 00:44:52 +0000 |
commit | 797848cc6647ae1dd682fae3749b7adf80a5fa21 (patch) | |
tree | 0aeb4f683f4c8adfbf1a529e5c2ac3bb5e3f2405 /src/map/script.c | |
parent | 8e4eaa86391a730bb4e8f4e256e59073dfbf9756 (diff) | |
download | hercules-797848cc6647ae1dd682fae3749b7adf80a5fa21.tar.gz hercules-797848cc6647ae1dd682fae3749b7adf80a5fa21.tar.bz2 hercules-797848cc6647ae1dd682fae3749b7adf80a5fa21.tar.xz hercules-797848cc6647ae1dd682fae3749b7adf80a5fa21.zip |
- Fixed SC_STRIPWEAPON failing on two-handed weapons.
- Minor changes.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9529 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/script.c')
-rw-r--r-- | src/map/script.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/map/script.c b/src/map/script.c index dca64002c..3edcbaf92 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -7204,6 +7204,14 @@ int buildin_getnpctimer(struct script_state *st) nd=npc_name2id(conv_str(st,& (st->stack->stack_data[st->start+3]))); else nd=(struct npc_data *)map_id2bl(st->oid); + + if (!nd || nd->bl.type != BL_NPC) + { + push_val(st->stack,C_INT,0); + if (battle_config.error_log) + ShowError("getnpctimer: Invalid NPC\n"); + return 1; + } switch(type){ case 0: val=npc_gettimerevent_tick(nd); break; |