From 37116aad3b2c128bae5b7f1ef4d1bc3cb8608f57 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Sun, 21 Oct 2012 10:18:07 +0000 Subject: Support the Item::Unrestricted flag, client allows to sell unrestricted items anywhere. --- src/game/base/game.cc | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/game/base') diff --git a/src/game/base/game.cc b/src/game/base/game.cc index c87c9b6..b6cacde 100644 --- a/src/game/base/game.cc +++ b/src/game/base/game.cc @@ -515,6 +515,7 @@ void Game::func_give(core::Player *player, const std::string &args) item = player->control()->inventory()->find(weapon); if (!item) { item = new core::Item(weapon); + item->set_flag(core::Item::Unrestricted); player->control()->inventory()->add(item); } else { assert(item->info() == weapon); @@ -524,6 +525,7 @@ void Game::func_give(core::Player *player, const std::string &args) for (int n = 0; n < amount; n++) { item = new core::Item(weapon); item->set_flag(core::Item::Unique); + item->set_flag(core::Item::Unrestricted); item->set_amount(1); player->control()->inventory()->add(item); } @@ -1991,6 +1993,7 @@ bool Game::load_zone(core::Zone *zone) if (!weapon->stackable()) { item->set_flag(core::Item::Unique); } + item->set_flag(core::Item::Unrestricted); inventory->add(item); } } else { -- cgit v1.2.3