WAGE: Simplify armor check

This commit is contained in:
eientei 2022-08-15 00:23:14 +12:00 committed by Filippos Karapetis
parent 63d29ae809
commit ac15210b27

View File

@ -495,16 +495,7 @@ void WageEngine::takeObj(Obj *obj) {
_world->move(obj, _world->_player);
int type = _world->_player->wearObjIfPossible(obj);
if (type == Chr::HEAD_ARMOR) {
snprintf(buf, 256, "You are now wearing the %s.", obj->_name.c_str());
appendText(buf);
} else if (type == Chr::BODY_ARMOR) {
snprintf(buf, 256, "You are now wearing the %s.", obj->_name.c_str());
appendText(buf);
} else if (type == Chr::SHIELD_ARMOR) {
snprintf(buf, 256, "You are now wearing the %s.", obj->_name.c_str());
appendText(buf);
} else if (type == Chr::MAGIC_ARMOR) {
if (type == Chr::BODY_ARMOR || type == Chr::SHIELD_ARMOR || type == Chr::MAGIC_ARMOR) {
snprintf(buf, 256, "You are now wearing the %s.", obj->_name.c_str());
appendText(buf);
} else {