diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-06-08 19:35:18 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-06-08 19:35:18 +0300 |
commit | 93e5a6fbfba642e4e3ff85dcf7bc3c02bada5649 (patch) | |
tree | 3561909ed91fb58b03a7d5bd815fcff91bfe5e30 /src/being/being.cpp | |
parent | 8685a2564a96c6819fc0854891293747232fe02a (diff) | |
download | manaverse-93e5a6fbfba642e4e3ff85dcf7bc3c02bada5649.tar.gz manaverse-93e5a6fbfba642e4e3ff85dcf7bc3c02bada5649.tar.bz2 manaverse-93e5a6fbfba642e4e3ff85dcf7bc3c02bada5649.tar.xz manaverse-93e5a6fbfba642e4e3ff85dcf7bc3c02bada5649.zip |
Add setWeaponId into Being class.
Diffstat (limited to 'src/being/being.cpp')
-rw-r--r-- | src/being/being.cpp | 8 |
1 files changed, 8 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, |