- @storage/@gstorage will no longer work if you have a trade or a storage opened already.

- Cleaned up a bit @gstorage
- Added a bunch of npc functions required to properly handle moving the NPC cells when an npc is moved from it's previous location.
- Added npc_setcells to handle setting down the NPC cells of ontouch npcs.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9990 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
skotlex
2007-03-11 20:02:42 +00:00
parent 03b226591b
commit ddfc677c99
5 changed files with 107 additions and 44 deletions

View File

@@ -10895,7 +10895,6 @@ BUILDIN_FUNC(movenpc)
TBL_NPC *nd = NULL;
const char *npc;
int x,y;
short m;
npc = conv_str(st,& (st->stack->stack_data[st->start+2]));
x = conv_num(st,& (st->stack->stack_data[st->start+3]));
@@ -10904,17 +10903,7 @@ BUILDIN_FUNC(movenpc)
if ((nd = npc_name2id(npc)) == NULL)
return -1;
if ((m=nd->bl.m) < 0 || nd->bl.prev == NULL)
return -1; //Not on a map.
if (x < 0) x = 0;
else if (x >= map[m].xs) x = map[m].xs-1;
if (y < 0) y = 0;
else if (y >= map[m].ys) y = map[m].ys-1;
map_foreachinrange(clif_outsight, &nd->bl, AREA_SIZE, BL_PC, &nd->bl);
map_moveblock(&nd->bl, x, y, gettick());
map_foreachinrange(clif_insight, &nd->bl, AREA_SIZE, BL_PC, &nd->bl);
npc_movenpc(nd, x, y);
return 0;
}