summaryrefslogtreecommitdiff
path: root/src/map/clif.cpp
diff options
context:
space:
mode:
authorHello TMW <hello@themanaworld.org>2024-04-06 01:14:30 +0000
committerHello TMW <hello@themanaworld.org>2024-04-06 01:14:30 +0000
commit90754fd121ffaec886c415689031f9ef01ae4972 (patch)
tree047f645931fdb0715afe784b8bc445743a78a371 /src/map/clif.cpp
parente42f76d0b0f4d2ec3a9008979267311f5246fb22 (diff)
parentebf078b9fa81142834dc45e22ea661a61c50d17b (diff)
downloadtmwa-90754fd121ffaec886c415689031f9ef01ae4972.tar.gz
tmwa-90754fd121ffaec886c415689031f9ef01ae4972.tar.bz2
tmwa-90754fd121ffaec886c415689031f9ef01ae4972.tar.xz
tmwa-90754fd121ffaec886c415689031f9ef01ae4972.zip
Merge branch tmwa:master into masterHEADmaster
Diffstat (limited to 'src/map/clif.cpp')
-rw-r--r--src/map/clif.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/map/clif.cpp b/src/map/clif.cpp
index 0eb2b8c..9edf2af 100644
--- a/src/map/clif.cpp
+++ b/src/map/clif.cpp
@@ -3762,7 +3762,7 @@ RecvResult clif_parse_LoadEndAck(Session *s, dumb_ptr<map_session_data> sd)
clif_equiplist(sd);
clif_initialstatus(sd);
clif_changeoption(sd);
- clif_changelook(sd, LOOK::WEAPON, static_cast<uint16_t>(ItemLook::NONE));
+ clif_changelook(sd, LOOK::WEAPON, static_cast<uint16_t>(ItemLook::W_FIST));
clif_updatestatus(sd, SP::MAXWEIGHT);
clif_updatestatus(sd, SP::WEIGHT);
npc_event_doall_l(stringish<ScriptLabel>("OnPCLoginEvent"_s), sd->bl_id, nullptr);
@@ -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;