summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-11-10 16:17:13 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-11-10 16:17:13 +0000
commit0ce48c125084fdbbcdd2b2cd0fd35e8cb6a7c48c (patch)
treed8f6cb763f61951fc26e7c2a2bdb93c18040beda /src/map
parent971a38ee78040cb50519df3b8db46d5553193939 (diff)
downloadhercules-0ce48c125084fdbbcdd2b2cd0fd35e8cb6a7c48c.tar.gz
hercules-0ce48c125084fdbbcdd2b2cd0fd35e8cb6a7c48c.tar.bz2
hercules-0ce48c125084fdbbcdd2b2cd0fd35e8cb6a7c48c.tar.xz
hercules-0ce48c125084fdbbcdd2b2cd0fd35e8cb6a7c48c.zip
- AL_TELEPORT now fails when used on top of Land Protector.
- Some minor cleanings in pc_setpos, it may (or not) help fix that homunc-caused "map_addblock" error message. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9192 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map')
-rw-r--r--src/map/pc.c9
-rw-r--r--src/map/skill.c4
2 files changed, 8 insertions, 5 deletions
diff --git a/src/map/pc.c b/src/map/pc.c
index 5c55c5c26..d3eec5935 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -3350,10 +3350,9 @@ int pc_setpos(struct map_session_data *sd,unsigned short mapindex,int x,int y,in
intif_save_petdata(sd->status.account_id,&sd->pd->pet);
unit_remove_map(&sd->pd->bl, clrtype);
}
- if(sd->status.hom_id > 0 && sd->hd) { //orn
- intif_homunculus_requestsave(sd->status.account_id, &sd->hd->homunculus);
+ if(merc_is_hom_active(sd->hd)) //Hom is auto-saved in chrif_save
unit_remove_map(&sd->hd->bl, clrtype);
- }
+
chrif_save(sd,2);
chrif_changemapserver(sd, mapindex, x, y, ip, (short)port);
return 0;
@@ -3385,7 +3384,7 @@ int pc_setpos(struct map_session_data *sd,unsigned short mapindex,int x,int y,in
unit_remove_map(&sd->bl, clrtype);
if(sd->status.pet_id > 0 && sd->pd)
unit_remove_map(&sd->pd->bl, clrtype);
- if(sd->status.hom_id > 0 && sd->hd) //orn
+ if(merc_is_hom_active(sd->hd))
unit_remove_map(&sd->hd->bl, clrtype);
clif_changemap(sd,map[m].index,x,y); // [MouseJstr]
} else if(sd->state.auth)
@@ -3411,7 +3410,7 @@ int pc_setpos(struct map_session_data *sd,unsigned short mapindex,int x,int y,in
sd->pd->ud.dir = sd->ud.dir;
}
- if(sd->status.hom_id > 0 && merc_is_hom_active(sd->hd)) { //orn
+ if(merc_is_hom_active(sd->hd)) { //orn
sd->hd->bl.m = m;
sd->hd->bl.x = sd->hd->ud.to_x = x;
sd->hd->bl.y = sd->hd->ud.to_y = y;
diff --git a/src/map/skill.c b/src/map/skill.c
index 3e10a6780..03ed2f235 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -4334,6 +4334,10 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in
break;
case AL_TELEPORT:
+ //Should fail when used on top of Land Protector [Skotlex]
+ if (map_getcell(bl->m, bl->x, bl->y, CELL_CHKLANDPROTECTOR))
+ break;
+
if(sd) {
if (map[bl->m].flag.noteleport) {
clif_skill_teleportmessage(sd,0);