Correctly adding (pushing_back) objects.
This commit is contained in:
parent
1d609f12d5
commit
fd230e87e9
2 changed files with 8 additions and 7 deletions
|
@ -8,9 +8,10 @@
|
|||
namespace character {
|
||||
using characteristic::Characteristic;
|
||||
|
||||
void BillyObjects::add_object(const billyObject &object, CharacterSheet &sheet) noexcept {
|
||||
void BillyObjects::push_object(const billyObject &object, CharacterSheet &sheet) noexcept {
|
||||
if (end_object < 3) {
|
||||
objects.at(end_object) = object;
|
||||
++end_object;
|
||||
|
||||
auto &local_habilete = static_cast<Characteristic &>(sheet.habilete);
|
||||
auto &local_adresse = static_cast<Characteristic &>(sheet.adresse);
|
||||
|
@ -20,7 +21,7 @@ namespace character {
|
|||
std::visit(overloaded{
|
||||
[&](const weapons &arg) {
|
||||
++sheet.nb_weapons;
|
||||
change_carac_weapon(sheet, arg, local_habilete, local_adresse, local_endurance, plus);
|
||||
change_carac_weapon(arg, sheet, local_habilete, local_adresse, local_endurance, plus);
|
||||
},
|
||||
[&](const equipments &arg) {
|
||||
++sheet.nb_equipments;
|
||||
|
@ -101,8 +102,8 @@ namespace character {
|
|||
}
|
||||
}
|
||||
|
||||
void BillyObjects::change_carac_weapon(CharacterSheet &sheet,
|
||||
const weapons &arg,
|
||||
void BillyObjects::change_carac_weapon(const weapons &arg,
|
||||
CharacterSheet &sheet,
|
||||
Characteristic &localHabilete,
|
||||
Characteristic &localAdresse,
|
||||
Characteristic &localEndurance,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue