summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorcodemaster <codemaster@54d463be-8e91-2dee-dedb-b68131a5f0ec>2004-11-06 16:36:21 +0000
committercodemaster <codemaster@54d463be-8e91-2dee-dedb-b68131a5f0ec>2004-11-06 16:36:21 +0000
commit191e45bc7fd698707a8e19b67245398188b8880f (patch)
treed1c4cdd52fa4ba77a3997e5c67d17f38e8bd01fc /src
parent67702ced9c99ae2b52f237a789bfbfbd535b0b48 (diff)
downloadhercules-191e45bc7fd698707a8e19b67245398188b8880f.tar.gz
hercules-191e45bc7fd698707a8e19b67245398188b8880f.tar.bz2
hercules-191e45bc7fd698707a8e19b67245398188b8880f.tar.xz
hercules-191e45bc7fd698707a8e19b67245398188b8880f.zip
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/athena@24 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src')
-rw-r--r--src/map/clif.c8
-rw-r--r--src/map/mob.c4
2 files changed, 6 insertions, 6 deletions
diff --git a/src/map/clif.c b/src/map/clif.c
index ecd165ac4..d33cbe2a6 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -1147,14 +1147,14 @@ static int clif_mob0078(struct mob_data *md, unsigned char *buf)
WBUFB(buf,45)=mob_get_sex(md->class);
}
- if (md->class >= 1285 && md->class <= 1287) { // Added guardian emblems [Valaris]
+ if (md->class >= 1285 && md->class <= 1287 && md->guild_id) { // Added guardian emblems [Valaris]
struct guild *g;
struct guild_castle *gc=guild_mapname2gc(map[md->bl.m].name);
if (gc && gc->guild_id > 0) {
g=guild_search(gc->guild_id);
if (g) {
- WBUFL(buf,26)=gc->guild_id;
WBUFL(buf,22)=g->emblem_id;
+ WBUFL(buf,26)=gc->guild_id;
}
}
} // End addition
@@ -1201,7 +1201,7 @@ static int clif_mob007b(struct mob_data *md, unsigned char *buf) {
} else
WBUFL(buf,22)=gettick();
- if(md->class >= 1285 && md->class <= 1287) { // Added guardian emblems [Valaris]
+ if(md->class >= 1285 && md->class <= 1287 && md->guild_id) { // Added guardian emblems [Valaris]
struct guild *g;
struct guild_castle *gc=guild_mapname2gc(map[md->bl.m].name);
if(gc && gc->guild_id > 0){
@@ -7551,7 +7551,7 @@ void clif_parse_GetCharNameRequest(int fd, struct map_session_data *sd, int cmd)
nullpo_retv(md);
memcpy(WFIFOP(fd,6), md->name, 24);
- if (md->class >= 1285 && md->class <= 1288) {
+ if (md->class >= 1285 && md->class <= 1288 && md->guild_id) {
struct guild *g;
struct guild_castle *gc = guild_mapname2gc(map[md->bl.m].name);
if (gc && gc->guild_id > 0 && (g = guild_search(gc->guild_id)) != NULL) {
diff --git a/src/map/mob.c b/src/map/mob.c
index 0d26676b8..a74ee534e 100644
--- a/src/map/mob.c
+++ b/src/map/mob.c
@@ -1078,9 +1078,9 @@ int mob_can_reach(struct mob_data *md,struct block_list *bl,int range)
nullpo_retr(0, sd=(struct map_session_data *)bl);
if(!gc)
return 0;
- if(gc && sd && sd->status.guild_id && sd->status.guild_id>0) {
+ if(gc && sd && sd->status.guild_id) {
g=guild_search(sd->status.guild_id); // don't attack guild members [Valaris]
- if(g && g->guild_id > 0 && g->guild_id == gc->guild_id)
+ if(g && g->guild_id == gc->guild_id)
return 0;
if(g && gc && guild_isallied(g,gc))
return 0;