summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/map/pc.c5
-rw-r--r--src/map/status.c24
2 files changed, 19 insertions, 10 deletions
diff --git a/src/map/pc.c b/src/map/pc.c
index a37af8273..a69d63e29 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -777,8 +777,11 @@ int pc_set_hate_mob(struct map_session_data *sd, int pos, struct block_list *bl)
int class_;
if (!sd || !bl || pos < 0 || pos > 2)
return 0;
- if (sd->hate_mob[pos] != -1) //Can't change hate targets.
+ if (sd->hate_mob[pos] != -1)
+ { //Can't change hate targets.
+ clif_hate_mob(sd,pos,sd->hate_mob[pos]); //Display current
return 0;
+ }
class_ = status_get_class(bl);
if (!pcdb_checkid(class_)) {
diff --git a/src/map/status.c b/src/map/status.c
index 73bddae64..7ce75dac2 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -2341,20 +2341,26 @@ int status_calc_homunculus(struct homun_data *hd, int first)
status->int_ = hom->int_ / 10;
status->luk = hom->luk / 10;
- status->def_ele = hd->homunculusDB->element ; //[orn]
- status->ele_lv = 1;
- status->race = hd->homunculusDB->race ; //[orn]
- status->size = hd->homunculusDB->size ; //[orn]
- status->rhw.range = 1 + status->size; //[orn]
- status->mode = MD_CANMOVE|MD_CANATTACK|MD_ASSIST|MD_AGGRESSIVE|MD_CASTSENSOR; //[orn]
- status->speed = DEFAULT_WALK_SPEED;
+ if (first) { //[orn]
+ status->def_ele = hd->homunculusDB->element;
+ status->ele_lv = 1;
+ status->race = hd->homunculusDB->race ;
+ status->size = hd->homunculusDB->size ;
+ status->rhw.range = 1 + status->size;
+ status->mode = MD_CANMOVE|MD_CANATTACK|MD_ASSIST|MD_AGGRESSIVE|MD_CASTSENSOR;
+ if (battle_config.slaves_inherit_speed && sd)
+ status->speed = status_get_speed(&sd->bl);
+ else
+ status->speed = DEFAULT_WALK_SPEED;
+ status->hp = 1;
+ status->sp = 1;
+ }
skill = hom->level/10 + status->vit/5;
status->def = cap_value(skill, 0, 99);
+
skill = hom->level/10 + status->int_/5;
status->mdef = cap_value(skill, 0, 99);
- status->hp = 1;
- status->sp = 1;
status->max_hp = hom->max_hp ;
status->max_sp = hom->max_sp ;