Bladeren bron

- Applied Toms's suggested corrections to homun code.
- Corrected Cannibalize/Marine Sphere ignoring the selected summon spot.
- Fixed looting pets ignoring the item pick-up priority of other players.
- Should have fixed a signess warning in login txt.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@7828 54d463be-8e91-2dee-dedb-b68131a5f0ec

skotlex 19 jaren geleden
bovenliggende
commit
9a745cdd3c
6 gewijzigde bestanden met toevoegingen van 18 en 13 verwijderingen
  1. 7 0
      Changelog-Trunk.txt
  2. 1 1
      src/login/login.c
  3. 5 9
      src/map/atcommand.c
  4. 1 0
      src/map/pc.c
  5. 3 2
      src/map/pet.c
  6. 1 1
      src/map/skill.c

+ 7 - 0
Changelog-Trunk.txt

@@ -3,6 +3,13 @@ Date	Added
 AS OF SVN REV. 5091, WE ARE NOW USING TRUNK.  ALL UNTESTED BUGFIXES/FEATURES GO INTO TRUNK.
 IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
 
+2006/07/22
+	* Applied Toms's suggested corrections to homun code. [Skotlex]
+	* Corrected Cannibalize/Marine Sphere ignoring the selected summon spot.
+	  [Skotlex]
+	* Fixed looting pets ignoring the item pick-up priority of other players.
+	  [Skotlex]
+	* Should have fixed a signess warning in login txt. [Skotlex]
 2006/07/21
 	* Added blocking of @me when muted or in berserk status. [Skotlex]
 	* Corrected the @follow timer not being deleted on logout. [Skotlex]

+ 1 - 1
src/login/login.c

@@ -1407,7 +1407,7 @@ static int online_db_setoffline(DBKey key, void* data, va_list ap) {
 // Packet parsing for char-servers
 //--------------------------------
 int parse_fromchar(int fd) {
-	unsigned int i;
+	int i;
 	int j, id;
 	unsigned char *p = (unsigned char *) &session[fd]->client_addr.sin_addr;
 	char ip[16];

+ 5 - 9
src/map/atcommand.c

@@ -9523,16 +9523,12 @@ int atcommand_homlevel(
 		return 1 ;
 
 	level = atoi(message);
-	if ( ( level + sd->homunculus.level ) > MAX_LEVEL )
-		level = MAX_LEVEL - sd->homunculus.level ;
-	if (level >= 1) {
-		for (i = 1; i <= level ; i++){
-			sd->homunculus.exp += sd->hd->exp_next;
-			merc_hom_levelup(sd->hd) ;
-		}
-		clif_misceffect2(&sd->hd->bl,568) ;
-	}
 	
+	for (i = 1; i <= level && sd->hd->exp_next; i++){
+		sd->homunculus.exp += sd->hd->exp_next;
+		merc_hom_levelup(sd->hd);
+	}
+	clif_misceffect2(&sd->hd->bl,568);
 	return 0;
 }
 

+ 1 - 0
src/map/pc.c

@@ -4758,6 +4758,7 @@ int pc_dead(struct map_session_data *sd,struct block_list *src)
 	if(sd->status.hom_id > 0 && sd->hd)	//orn
 	{
 		sd->homunculus.vaporize = 1;
+		clif_hominfo(sd,0);
 		merc_stop_walking(sd->hd, 1) ;
 		merc_stop_attack(sd->hd) ;
 		merc_hom_delete(sd->hd,0);

+ 3 - 2
src/map/pet.c

@@ -1034,8 +1034,9 @@ static int pet_ai_sub_hard_lootsearch(struct block_list *bl,va_list ap)
 
 	sd_id = fitem->first_get_id;
 
-	if(bl->m == pd->bl.m && unit_can_reach_bl(&pd->bl,bl, pd->db->range2, 1, NULL, NULL)
-		&& rand()%1000<1000/(++(*itc)))
+	if(bl->m == pd->bl.m && (!sd_id || sd_id == pd->msd->bl.id) &&
+		unit_can_reach_bl(&pd->bl,bl, pd->db->range2, 1, NULL, NULL) &&
+		rand()%1000<1000/(++(*itc)))
 		pd->target_id=bl->id;
 	return 0;
 }

+ 1 - 1
src/map/skill.c

@@ -6212,7 +6212,7 @@ int skill_castend_pos2 (struct block_list *src, int x, int y, int skillid, int s
 			struct mob_data *md;
 
 			// Correct info, don't change any of this! [celest]
-			md = mob_once_spawn_sub(src, src->m, -1, -1, sd->status.name,class_,"");
+			md = mob_once_spawn_sub(src, src->m, x, y, sd->status.name,class_,"");
 			if (md) {
 				md->master_id = src->id;
 				md->special_state.ai = skillid==AM_SPHEREMINE?2:3;