diff options
Diffstat (limited to 'src/being')
-rw-r--r-- | src/being/being.cpp | 8 | ||||
-rw-r--r-- | src/being/being.h | 2 |
2 files changed, 10 insertions, 0 deletions
diff --git a/src/being/being.cpp b/src/being/being.cpp index 18535ab9e..7cd645b17 100644 --- a/src/being/being.cpp +++ b/src/being/being.cpp @@ -2604,6 +2604,14 @@ void Being::setSprite(const unsigned int slot, beingEquipmentWindow->updateBeing(this); } +void Being::setWeaponId(const int id) restrict2 +{ + if (id == 0) + mEquippedWeapon = nullptr; + else + mEquippedWeapon = &ItemDB::get(id); +} + void Being::setTempSprite(const unsigned int slot, const int id, std::string color, diff --git a/src/being/being.h b/src/being/being.h index bb9951f56..7e3ec2b55 100644 --- a/src/being/being.h +++ b/src/being/being.h @@ -326,6 +326,8 @@ class Being notfinal : public ActorSprite, const IsWeapon isWeapon, const int *const cards) restrict2; + void setWeaponId(const int id) restrict2; + void setTempSprite(const unsigned int slot, const int id, std::string color, |