diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-09-20 14:10:11 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-09-20 14:10:11 +0300 |
commit | 2f8076f6c51cd969da927d12d6cd89a46899322e (patch) | |
tree | 5455a5751377f5123f4ac9164a627a7c829a06ad /src/being | |
parent | ca7de6f8ca1277318d0f4a445b50942870df926f (diff) | |
download | manaverse-2f8076f6c51cd969da927d12d6cd89a46899322e.tar.gz manaverse-2f8076f6c51cd969da927d12d6cd89a46899322e.tar.bz2 manaverse-2f8076f6c51cd969da927d12d6cd89a46899322e.tar.xz manaverse-2f8076f6c51cd969da927d12d6cd89a46899322e.zip |
Add mercenary actor type. Use it for now in samw way with monster type.
Diffstat (limited to 'src/being')
-rw-r--r-- | src/being/actortype.h | 3 | ||||
-rw-r--r-- | src/being/being.cpp | 5 |
2 files changed, 5 insertions, 3 deletions
diff --git a/src/being/actortype.h b/src/being/actortype.h index b45961c8a..f92ce9e82 100644 --- a/src/being/actortype.h +++ b/src/being/actortype.h @@ -33,7 +33,8 @@ namespace ActorType FloorItem, Portal, LocalPet, - Avatar + Avatar, + Mercenary }; } // namespace ActorType diff --git a/src/being/being.cpp b/src/being/being.cpp index 3bb1f9fd5..f52371d78 100644 --- a/src/being/being.cpp +++ b/src/being/being.cpp @@ -292,7 +292,7 @@ void Being::setSubtype(const uint16_t subtype, const uint8_t look) mSubType = subtype; mLook = look; - if (mType == ActorType::Monster) + if (mType == ActorType::Monster || mType == ActorType::Mercenary) { mInfo = MonsterDB::get(mSubType); if (mInfo) @@ -544,7 +544,7 @@ void Being::takeDamage(Being *const attacker, const int amount, color = &userPalette->getColor(UserPalette::MISS); } } - else if (mType == ActorType::Monster) + else if (mType == ActorType::Monster || mType == ActorType::Mercenary) { if (attacker == localPlayer) { @@ -2909,6 +2909,7 @@ std::string Being::loadComment(const std::string &name, case ActorType::Portal: case ActorType::LocalPet: case ActorType::Avatar: + case ActorType::Mercenary: default: return ""; } |