mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-19 19:09:05 +00:00
Remove now useless parameter
This commit is contained in:
parent
2ec0c400f6
commit
36a23666a9
@ -907,7 +907,7 @@ battle_context_unit_stats::battle_context_unit_stats(const unit &u, const map_lo
|
||||
int damage_multiplier = 100;
|
||||
|
||||
// Time of day bonus.
|
||||
damage_multiplier += combat_modifier(units, u_loc, u.alignment(), u.is_fearless());
|
||||
damage_multiplier += combat_modifier(u_loc, u.alignment(), u.is_fearless());
|
||||
|
||||
// Leadership bonus.
|
||||
int leader_bonus = 0;
|
||||
@ -1971,7 +1971,7 @@ void advance_unit(map_location loc, const std::string &advance_to)
|
||||
game_events::fire("post_advance",loc);
|
||||
}
|
||||
|
||||
int combat_modifier(const unit_map& /*units*/, const map_location &loc,
|
||||
int combat_modifier(const map_location &loc,
|
||||
unit_type::ALIGNMENT alignment, bool is_fearless)
|
||||
{
|
||||
const time_of_day &tod = resources::tod_manager->time_of_day_at(loc);
|
||||
|
@ -314,7 +314,7 @@ map_location under_leadership(const unit_map& units,
|
||||
* Returns the amount that a unit's damage should be multiplied by
|
||||
* due to the current time of day.
|
||||
*/
|
||||
int combat_modifier(const unit_map &units, const map_location &loc,
|
||||
int combat_modifier(const map_location &loc,
|
||||
unit_type::ALIGNMENT alignment, bool is_fearless);
|
||||
|
||||
/** Records information to be able to undo a movement. */
|
||||
|
@ -605,7 +605,7 @@ private:
|
||||
loc = &u_call->get_location();
|
||||
}
|
||||
|
||||
return variant(combat_modifier(*resources::units, *loc, un.alignment(), un.is_fearless()));
|
||||
return variant(combat_modifier(*loc, un.alignment(), un.is_fearless()));
|
||||
}
|
||||
|
||||
const formula_ai& ai_;
|
||||
|
@ -208,7 +208,7 @@ void battle_prediction_pane::get_unit_strings(const battle_context_unit_stats& s
|
||||
}
|
||||
|
||||
// Time of day modifier.
|
||||
int tod_modifier = combat_modifier(*resources::units, u_loc, u.alignment(), u.is_fearless());
|
||||
int tod_modifier = combat_modifier(u_loc, u.alignment(), u.is_fearless());
|
||||
if(tod_modifier != 0) {
|
||||
left_strings.push_back(_("Time of day"));
|
||||
str.str("");
|
||||
|
@ -194,7 +194,7 @@ report generate_report(TYPE type,
|
||||
case UNIT_ALIGNMENT: {
|
||||
const std::string &align = unit_type::alignment_description(u->alignment(), u->gender());
|
||||
const std::string &align_id = unit_type::alignment_id(u->alignment());
|
||||
int cm = combat_modifier(units, displayed_unit_hex, u->alignment(), u->is_fearless());
|
||||
int cm = combat_modifier(displayed_unit_hex, u->alignment(), u->is_fearless());
|
||||
|
||||
str << align << " (" << signed_percent(cm) << ")";
|
||||
tooltip << _("Alignement: ")
|
||||
@ -342,7 +342,7 @@ report generate_report(TYPE type,
|
||||
int damage_multiplier = 100;
|
||||
|
||||
// Time of day bonus.
|
||||
int tod_bonus = combat_modifier(units, displayed_unit_hex, u->alignment(), u->is_fearless());
|
||||
int tod_bonus = combat_modifier(displayed_unit_hex, u->alignment(), u->is_fearless());
|
||||
damage_multiplier += tod_bonus;
|
||||
|
||||
// Leadership bonus.
|
||||
|
Loading…
x
Reference in New Issue
Block a user