diff options
author | Led Mitz <smoothshifter@tuta.io> | 2023-04-03 01:58:15 +0000 |
---|---|---|
committer | Led Mitz <smoothshifter@tuta.io> | 2023-04-03 01:58:15 +0000 |
commit | 4887981f15cdae7f19d06471c54e6754e74e6567 (patch) | |
tree | 520bcb4e917054af845d79c070cd775ce48a6150 /src/map/clif.cpp | |
parent | 74ad8e7c214e6ba60fbbeb0f316373e0420460be (diff) | |
parent | 7980f4d21956314e284448f7dcedd58f9c23b355 (diff) | |
download | tmwa-4887981f15cdae7f19d06471c54e6754e74e6567.tar.gz tmwa-4887981f15cdae7f19d06471c54e6754e74e6567.tar.bz2 tmwa-4887981f15cdae7f19d06471c54e6754e74e6567.tar.xz tmwa-4887981f15cdae7f19d06471c54e6754e74e6567.zip |
Merge branch 'item_mode' into 'master'
Item mode
See merge request legacy/tmwa!246
Diffstat (limited to 'src/map/clif.cpp')
-rw-r--r-- | src/map/clif.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/map/clif.cpp b/src/map/clif.cpp index 0eb2b8c..e81a510 100644 --- a/src/map/clif.cpp +++ b/src/map/clif.cpp @@ -4617,6 +4617,11 @@ RecvResult clif_parse_DropItem(Session *s, dumb_ptr<map_session_data> sd) clif_displaymessage(sd->sess, "Can't drop items here."_s); return rv; } + if (bool(itemdb_search(sd->status.inventory[fixed.ioff2.unshift()].nameid)->mode & ItemMode::NO_DROP)) + { + clif_displaymessage(sd->sess, "This item can't be dropped."_s); + return rv; + } if (sd->npc_id || sd->opt1 != Opt1::ZERO) { @@ -4895,6 +4900,12 @@ RecvResult clif_parse_TradeAddItem(Session *s, dumb_ptr<map_session_data> sd) if (fixed.zeny_or_ioff2.index != 0 && !fixed.zeny_or_ioff2.ok()) return RecvResult::Error; + if (fixed.zeny_or_ioff2.ok()) + if (bool(itemdb_search(sd->status.inventory[fixed.zeny_or_ioff2.unshift()].nameid)->mode & ItemMode::NO_TRADE)) + { + clif_displaymessage(sd->sess, "This item can't be traded."_s); + return rv; + } trade_tradeadditem(sd, fixed.zeny_or_ioff2, fixed.amount); return rv; |