Forráskód Böngészése

- 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://svn.code.sf.net/p/rathena/svn/trunk@9192 54d463be-8e91-2dee-dedb-b68131a5f0ec

skotlex 18 éve
szülő
commit
2de16acdeb
3 módosított fájl, 11 hozzáadás és 5 törlés
  1. 3 0
      Changelog-Trunk.txt
  2. 4 5
      src/map/pc.c
  3. 4 0
      src/map/skill.c

+ 3 - 0
Changelog-Trunk.txt

@@ -4,6 +4,9 @@ AS OF SVN REV. 5091, WE ARE NOW USING TRUNK.  ALL UNTESTED BUGFIXES/FEATURES GO
 IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
 
 2006/11/10
+	* AL_TELEPORT now fails when used on top of Land Protector. [Skotlex]
+	* Some minor cleanings in pc_setpos, it may (or not) help fix that
+	  homunc-caused "map_addblock" error message. [Skotlex]
 	* Corrected fog of wall, so that the deleted/doubled-duration effects are
 	  calculated on a cell-by-cell basis. [Skotlex]
 	* Updated Land Protector: It will now delete/block effects of ALL ground

+ 4 - 5
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;

+ 4 - 0
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);