summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2020-05-03 21:35:49 +0200
committerGitHub <noreply@github.com>2020-05-03 21:35:49 +0200
commit21fd90c8c066a59dd41bb8a2c85e85b72ea6b9d6 (patch)
treebc5690ee69f74b4cbf25342b69955d6e7bad2cce /src/map
parent5f47379d6f5bba08a41be2a4a2604d36d3bce37a (diff)
parentc6baa02f18075da2abffe532ce0c87483c36ad9d (diff)
downloadhercules-21fd90c8c066a59dd41bb8a2c85e85b72ea6b9d6.tar.gz
hercules-21fd90c8c066a59dd41bb8a2c85e85b72ea6b9d6.tar.bz2
hercules-21fd90c8c066a59dd41bb8a2c85e85b72ea6b9d6.tar.xz
hercules-21fd90c8c066a59dd41bb8a2c85e85b72ea6b9d6.zip
Merge pull request #2690 from Kenpachi2k13/operator_use_fix
Fix usage of *= operator
Diffstat (limited to 'src/map')
-rw-r--r--src/map/map.c8
-rw-r--r--src/map/mob.c4
-rw-r--r--src/map/pc.c4
-rw-r--r--src/map/pet.c4
-rw-r--r--src/map/skill.c2
5 files changed, 11 insertions, 11 deletions
diff --git a/src/map/map.c b/src/map/map.c
index b2c9c77c3..40e66e4df 100644
--- a/src/map/map.c
+++ b/src/map/map.c
@@ -1713,9 +1713,9 @@ static bool map_closest_freecell(int16 m, const struct block_list *bl, int16 *x,
tx = *x + dx;
ty = *y + dy;
if (unit_is_dir_or_opposite(dir, UNIT_DIR_SOUTHWEST))
- tx *= costrange / MOVE_COST;
+ tx = tx * costrange / MOVE_COST;
if (unit_is_dir_or_opposite(dir, UNIT_DIR_NORTHWEST))
- ty *= costrange / MOVE_COST;
+ ty = ty * costrange / MOVE_COST;
if (!map->count_oncell(m, tx, ty, type, flag) && map->getcell(m, bl, tx, ty, CELL_CHKPASS)) {
*x = tx;
*y = ty;
@@ -1724,9 +1724,9 @@ static bool map_closest_freecell(int16 m, const struct block_list *bl, int16 *x,
tx = *x + dx;
ty = *y + dy;
if (unit_is_dir_or_opposite(dir, UNIT_DIR_NORTHWEST))
- tx *= costrange / MOVE_COST;
+ tx = tx * costrange / MOVE_COST;
if (unit_is_dir_or_opposite(dir, UNIT_DIR_SOUTHWEST))
- ty *= costrange / MOVE_COST;
+ ty = ty * costrange / MOVE_COST;
if (!map->count_oncell(m, tx, ty, type, flag) && map->getcell(m, bl, tx, ty, CELL_CHKPASS)) {
*x = tx;
*y = ty;
diff --git a/src/map/mob.c b/src/map/mob.c
index a5db4f0fd..f36d626a3 100644
--- a/src/map/mob.c
+++ b/src/map/mob.c
@@ -3910,8 +3910,8 @@ static int mob_clone_spawn(struct map_session_data *sd, int16 m, int16 x, int16
}
}
- mob_skills[i].permillage *= battle_config.mob_skill_rate / 100;
- mob_skills[i].delay *= battle_config.mob_skill_delay / 100;
+ mob_skills[i].permillage = mob_skills[i].permillage * battle_config.mob_skill_rate / 100;
+ mob_skills[i].delay = mob_skills[i].delay * battle_config.mob_skill_delay / 100;
db->maxskill = ++i;
}
diff --git a/src/map/pc.c b/src/map/pc.c
index d8bae7b87..a8ed4430e 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -8325,7 +8325,7 @@ static int pc_dead(struct map_session_data *sd, struct block_list *src)
base_penalty *= 2;
if (sd->status.mod_death != 100)
- base_penalty *= sd->status.mod_death / 100;
+ base_penalty = base_penalty * sd->status.mod_death / 100;
sd->status.base_exp -= min(sd->status.base_exp, base_penalty);
clif->updatestatus(sd, SP_BASEEXP);
@@ -8350,7 +8350,7 @@ static int pc_dead(struct map_session_data *sd, struct block_list *src)
job_penalty *= 2;
if (sd->status.mod_death != 100)
- job_penalty *= sd->status.mod_death / 100;
+ job_penalty = job_penalty * sd->status.mod_death / 100;
sd->status.job_exp -= min(sd->status.job_exp, job_penalty);
clif->updatestatus(sd, SP_JOBEXP);
diff --git a/src/map/pet.c b/src/map/pet.c
index 620779765..83946953d 100644
--- a/src/map/pet.c
+++ b/src/map/pet.c
@@ -323,7 +323,7 @@ static int pet_hungry(int tid, int64 tick, int id, intptr_t data)
}
clif->send_petdata(sd, pd, 2, pd->pet.hungry);
- interval *= battle_config.pet_hungry_delay_rate / 100;
+ interval = interval * battle_config.pet_hungry_delay_rate / 100;
pd->pet_hungry_timer = timer->add(tick + max(interval, 1), pet->hungry, sd->bl.id, 0);
return 0;
@@ -944,7 +944,7 @@ static int pet_food(struct map_session_data *sd, struct pet_data *pd)
else
intimacy += pd->petDB->r_hungry / 2; // Increase intimacy by 50% of FeedIncrement.
- intimacy *= battle_config.pet_friendly_rate / 100;
+ intimacy = intimacy * battle_config.pet_friendly_rate / 100;
pet->set_intimate(pd, pd->pet.intimate + intimacy);
if (pd->pet.intimate == PET_INTIMACY_NONE) {
diff --git a/src/map/skill.c b/src/map/skill.c
index cc769108e..1222cf940 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -7383,7 +7383,7 @@ static int skill_castend_nodamage_id(struct block_list *src, struct block_list *
int rate = 100 * (100 - (tstatus->int_ / 2 + tstatus->vit / 3 + tstatus->luk / 10));
int duration = skill->get_time2(skill_id, skill_lv);
- duration *= (100 - (tstatus->int_ + tstatus->vit) / 2) / 100;
+ duration = duration * (100 - (tstatus->int_ + tstatus->vit) / 2) / 100;
status->change_start(src, bl, SC_BLIND, rate, 1, 0, 0, 0, duration, SCFLAG_NONE);
}