The Battle for Wesnoth  1.13.10+dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Public Member Functions | Private Attributes | Friends | List of all members
advance_unit_params Struct Reference

advances the unit at loc if it has enough experience, maximum 20 times. More...

#include <advancement.hpp>

Public Member Functions

 advance_unit_params (const map_location &loc)
 
advance_unit_paramsai_advancements (const ai::unit_advancements_aspect &value)
 
advance_unit_paramsforce_dialog (bool value)
 
advance_unit_paramsfire_events (bool value)
 
advance_unit_paramsanimate (bool value)
 

Private Attributes

map_location loc_
 
const
ai::unit_advancements_aspect
ai_advancements_
 
bool force_dialog_
 
bool fire_events_
 
bool animate_
 

Friends

void advance_unit_at (const advance_unit_params &)
 

Detailed Description

advances the unit at loc if it has enough experience, maximum 20 times.

if the unit is on the currently active side, and that side is controlled by a human, a dialog pops up. if we are in a non mp game, and the side is controlled by a human then a dialog is shown too. if the side is controlled by an ai, and if ai_advancement is passed, then ai_advancement will be used. otherwise a random decision will be taken.

this method is currently not used by unstore_unit, if we want to do that we'd need to allow more arguments (animate, fire_events).

Definition at line 40 of file advancement.hpp.

Constructor & Destructor Documentation

advance_unit_params::advance_unit_params ( const map_location loc)
inline

Definition at line 42 of file advancement.hpp.

Member Function Documentation

advance_unit_params& advance_unit_params::ai_advancements ( const ai::unit_advancements_aspect value)
inline

Definition at line 43 of file advancement.hpp.

References ai_advancements_.

advance_unit_params& advance_unit_params::animate ( bool  value)
inline

Definition at line 46 of file advancement.hpp.

References animate_.

Referenced by intf_advance_unit().

advance_unit_params& advance_unit_params::fire_events ( bool  value)
inline

Definition at line 45 of file advancement.hpp.

References fire_events_.

Referenced by intf_advance_unit().

advance_unit_params& advance_unit_params::force_dialog ( bool  value)
inline

Definition at line 44 of file advancement.hpp.

References force_dialog_.

Friends And Related Function Documentation

void advance_unit_at ( const advance_unit_params )
friend

Definition at line 240 of file advancement.cpp.

Member Data Documentation

const ai::unit_advancements_aspect* advance_unit_params::ai_advancements_
private

Definition at line 50 of file advancement.hpp.

Referenced by advance_unit_at(), and ai_advancements().

bool advance_unit_params::animate_
private

Definition at line 53 of file advancement.hpp.

Referenced by advance_unit_at(), and animate().

bool advance_unit_params::fire_events_
private

Definition at line 52 of file advancement.hpp.

Referenced by advance_unit_at(), and fire_events().

bool advance_unit_params::force_dialog_
private

Definition at line 51 of file advancement.hpp.

Referenced by advance_unit_at(), and force_dialog().

map_location advance_unit_params::loc_
private

Definition at line 49 of file advancement.hpp.

Referenced by advance_unit_at().


The documentation for this struct was generated from the following file: