Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2012-10-21 10:18:07 +0000
committerStijn Buys <ingar@osirion.org>2012-10-21 10:18:07 +0000
commit37116aad3b2c128bae5b7f1ef4d1bc3cb8608f57 (patch)
treea7377905f52eaa41b6cc38a94db96fb9f8706246 /src/game/base
parentdb69f96fbf5ac5321bdcb1e86ff07d1e35de9fec (diff)
Support the Item::Unrestricted flag, client allows to sell unrestricted items anywhere.
Diffstat (limited to 'src/game/base')
-rw-r--r--src/game/base/game.cc3
1 files changed, 3 insertions, 0 deletions
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 {