summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKenpachi Developer <Kenpachi.Developer@gmx.de>2020-06-22 05:12:32 +0200
committerKenpachi Developer <Kenpachi.Developer@gmx.de>2020-06-22 05:12:32 +0200
commit2669d54e37bb231866479efd177808ec6ab3eab8 (patch)
treec5416cd0fac9d632870f6c6176643a779b841785
parentafdb49e3bd8dc186626c9defe50af5b6dceb9519 (diff)
downloadhercules-2669d54e37bb231866479efd177808ec6ab3eab8.tar.gz
hercules-2669d54e37bb231866479efd177808ec6ab3eab8.tar.bz2
hercules-2669d54e37bb231866479efd177808ec6ab3eab8.tar.xz
hercules-2669d54e37bb231866479efd177808ec6ab3eab8.zip
Send pet's intimacy data only in pet_set_intimate()
-rw-r--r--src/map/pc.c4
-rw-r--r--src/map/pet.c4
-rw-r--r--src/map/script.c1
3 files changed, 3 insertions, 6 deletions
diff --git a/src/map/pc.c b/src/map/pc.c
index ca8e35073..ad669c0c8 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -8148,10 +8148,8 @@ static int pc_dead(struct map_session_data *sd, struct block_list *src)
if (sd->status.pet_id > 0 && sd->pd != NULL) {
struct pet_data *pd = sd->pd;
- if (map->list[sd->bl.m].flag.noexppenalty == 0) {
+ if (map->list[sd->bl.m].flag.noexppenalty == 0)
pet->set_intimate(pd, pd->pet.intimate - pd->petDB->die);
- clif->send_petdata(sd, sd->pd, 1, pd->pet.intimate);
- }
if (sd->pd != NULL && sd->pd->target_id != 0) // Unlock all targets.
pet->unlocktarget(sd->pd);
diff --git a/src/map/pet.c b/src/map/pet.c
index c6656047c..5b2a95446 100644
--- a/src/map/pet.c
+++ b/src/map/pet.c
@@ -158,6 +158,8 @@ static void pet_set_intimate(struct pet_data *pd, int value)
pet_stop_attack(pd);
unit->remove_map(&pd->bl, CLR_OUTSIGHT, ALC_MARK);
}
+ } else {
+ clif->send_petdata(sd, pd, 1, pd->pet.intimate);
}
status_calc_pc(sd, SCO_NONE);
@@ -350,7 +352,6 @@ static int pet_hungry(int tid, int64 tick, int id, intptr_t data)
return 0;
status_calc_pet(pd, SCO_NONE);
- clif->send_petdata(sd, pd, 1, pd->pet.intimate);
if (pd->petDB->starving_delay > 0)
interval = pd->petDB->starving_delay;
@@ -989,7 +990,6 @@ static int pet_food(struct map_session_data *sd, struct pet_data *pd)
status_calc_pet(pd, SCO_NONE);
pet->set_hunger(pd, pd->pet.hungry + pd->petDB->fullness);
clif->send_petdata(sd, pd, 2, pd->pet.hungry);
- clif->send_petdata(sd, pd, 1, pd->pet.intimate);
clif->pet_food(sd, pd->petDB->FoodID, 1);
return 0;
diff --git a/src/map/script.c b/src/map/script.c
index 743a1779a..d501818d9 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -20629,7 +20629,6 @@ static BUILDIN(setunitdata)
break;
case UDT_INTIMACY:
pet->set_intimate(pd, val);
- clif->send_petdata(pd->msd, pd, 1, pd->pet.intimate);
break;
case UDT_HUNGER:
pet->set_hunger(pd, val);