summaryrefslogtreecommitdiff
path: root/src/being/being.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-06-08 19:35:18 +0300
committerAndrei Karas <akaras@inbox.ru>2016-06-08 19:35:18 +0300
commit93e5a6fbfba642e4e3ff85dcf7bc3c02bada5649 (patch)
tree3561909ed91fb58b03a7d5bd815fcff91bfe5e30 /src/being/being.cpp
parent8685a2564a96c6819fc0854891293747232fe02a (diff)
downloadManaVerse-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.cpp8
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,