Bladeren bron

Pets should mimic master's walk speed (#3303)

* Pets should have the same walk speed as their master.
* Corrected homunculus speed check to use the proper battle config.
Aleos 6 jaren geleden
bovenliggende
commit
042b88623b
2 gewijzigde bestanden met toevoegingen van 3 en 1 verwijderingen
  1. 1 1
      src/map/homunculus.cpp
  2. 2 0
      src/map/status.cpp

+ 1 - 1
src/map/homunculus.cpp

@@ -1096,7 +1096,7 @@ bool hom_call(struct map_session_data *sd)
 		clif_hominfo(sd,hd,1);
 		clif_hominfo(sd,hd,0); // send this x2. dunno why, but kRO does that [blackhole89]
 		clif_homskillinfoblock(sd);
-		if (battle_config.slaves_inherit_speed&1)
+		if (battle_config.hom_setting&HOMSET_COPY_SPEED)
 			status_calc_bl(&hd->bl, SCB_SPEED);
 		hom_save(hd);
 	} else

+ 2 - 0
src/map/status.cpp

@@ -4965,6 +4965,8 @@ void status_calc_bl_main(struct block_list *bl, /*enum scb_flag*/int flag)
 		if( bl->type&BL_PC && !(sd && sd->state.permanent_speed) && status->speed < battle_config.max_walk_speed )
 			status->speed = battle_config.max_walk_speed;
 
+		if( bl->type&BL_PET && ((TBL_PET*)bl)->master)
+			status->speed = status_get_speed(&((TBL_PET*)bl)->master->bl);
 		if( bl->type&BL_HOM && battle_config.hom_setting&HOMSET_COPY_SPEED && ((TBL_HOM*)bl)->master)
 			status->speed = status_get_speed(&((TBL_HOM*)bl)->master->bl);
 		if( bl->type&BL_MER && ((TBL_MER*)bl)->master)