diff options
author | Lance <Lance@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-05-14 13:08:26 +0000 |
---|---|---|
committer | Lance <Lance@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-05-14 13:08:26 +0000 |
commit | 5aaade5da584a6b5935fc7c11016d373c2ea27b7 (patch) | |
tree | 9feae64c7816df585c70ad6d8b16fec08426d487 /src/map/clif.c | |
parent | 3b800b8ffa7b6d2a21e4c66d830871a8cf51eaf1 (diff) | |
download | hercules-5aaade5da584a6b5935fc7c11016d373c2ea27b7.tar.gz hercules-5aaade5da584a6b5935fc7c11016d373c2ea27b7.tar.bz2 hercules-5aaade5da584a6b5935fc7c11016d373c2ea27b7.tar.xz hercules-5aaade5da584a6b5935fc7c11016d373c2ea27b7.zip |
@_@ this is getting more confusing...
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6586 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/clif.c')
-rw-r--r-- | src/map/clif.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/map/clif.c b/src/map/clif.c index 6ce6c6e59..c8610caf3 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -1822,14 +1822,14 @@ void clif_sendfakenpc(struct map_session_data *sd, int npcid) { int clif_scriptmenu(struct map_session_data *sd, int npcid, char *mes) {
int fd;
int slen = strlen(mes) + 8;
- struct block_list *bl = map_id2bl(npcid);
+ struct block_list *bl = NULL;
WFIFOHEAD(fd, slen);
nullpo_retr(0, sd);
- if (!sd->state.using_fake_npc && (bl->type == BL_PC || bl->m!=sd->bl.m ||
+ if (!sd->state.using_fake_npc && (npcid == fake_npc_id || ((bl = map_id2bl(npcid)) && (bl->m!=sd->bl.m ||
bl->x<sd->bl.x-AREA_SIZE-1 || bl->x>sd->bl.x+AREA_SIZE+1 ||
- bl->y<sd->bl.y-AREA_SIZE-1 || bl->y>sd->bl.y+AREA_SIZE+1))
+ bl->y<sd->bl.y-AREA_SIZE-1 || bl->y>sd->bl.y+AREA_SIZE+1))))
clif_sendfakenpc(sd, npcid);
fd=sd->fd;
@@ -1848,13 +1848,13 @@ int clif_scriptmenu(struct map_session_data *sd, int npcid, char *mes) { */
int clif_scriptinput(struct map_session_data *sd, int npcid) {
int fd;
- struct block_list *bl = map_id2bl(npcid);
+ struct block_list *bl = NULL;
nullpo_retr(0, sd);
- if (!sd->state.using_fake_npc && (bl->type == BL_PC || bl->m!=sd->bl.m ||
+ if (!sd->state.using_fake_npc && (npcid == fake_npc_id || ((bl = map_id2bl(npcid)) && (bl->m!=sd->bl.m ||
bl->x<sd->bl.x-AREA_SIZE-1 || bl->x>sd->bl.x+AREA_SIZE+1 ||
- bl->y<sd->bl.y-AREA_SIZE-1 || bl->y>sd->bl.y+AREA_SIZE+1))
+ bl->y<sd->bl.y-AREA_SIZE-1 || bl->y>sd->bl.y+AREA_SIZE+1))))
clif_sendfakenpc(sd, npcid);
fd=sd->fd;
@@ -1872,13 +1872,13 @@ int clif_scriptinput(struct map_session_data *sd, int npcid) { */
int clif_scriptinputstr(struct map_session_data *sd, int npcid) {
int fd;
- struct block_list *bl = map_id2bl(npcid);
+ struct block_list *bl = NULL;
nullpo_retr(0, sd);
- if (!sd->state.using_fake_npc && (bl->type == BL_PC || bl->m!=sd->bl.m ||
+ if (!sd->state.using_fake_npc && (npcid == fake_npc_id || ((bl = map_id2bl(npcid)) && (bl->m!=sd->bl.m ||
bl->x<sd->bl.x-AREA_SIZE-1 || bl->x>sd->bl.x+AREA_SIZE+1 ||
- bl->y<sd->bl.y-AREA_SIZE-1 || bl->y>sd->bl.y+AREA_SIZE+1))
+ bl->y<sd->bl.y-AREA_SIZE-1 || bl->y>sd->bl.y+AREA_SIZE+1))))
clif_sendfakenpc(sd, npcid);
fd=sd->fd;
|