diff options
Diffstat (limited to 'src/map/clif.cpp')
-rw-r--r-- | src/map/clif.cpp | 31 |
1 files changed, 25 insertions, 6 deletions
diff --git a/src/map/clif.cpp b/src/map/clif.cpp index 9edf2af..4d36f17 100644 --- a/src/map/clif.cpp +++ b/src/map/clif.cpp @@ -3865,6 +3865,12 @@ RecvResult clif_parse_WalkToXY(Session *s, dumb_ptr<map_session_data> sd) if (bool(sd->opt1) && sd->opt1 != (Opt1::_stone6)) return rv; + if (sd->sc_data[StatusChange::SC_CANTMOVE].timer) + { + pc_stop_walking(sd, 1); // this is a little hack since client is a bit bugged and still moves several tiles and then gets reset to the position where status was triggered with this it only moves 1 pixel or so and gets set back + return rv; + } + if (sd->invincible_timer) pc_delinvincibletimer(sd); @@ -4617,11 +4623,18 @@ 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)) + + OMATCH_BEGIN_SOME (sdidn, sd->inventory_data[fixed.ioff2.unshift()]) { - clif_displaymessage(sd->sess, "This item can't be dropped."_s); - return rv; + GmLevel gmlvl = pc_isGM(sd); + if (bool(sdidn->mode & ItemMode::NO_DROP) && gmlvl.get_all_bits() < 60) + { + clif_displaymessage(sd->sess, "This item can't be dropped."_s); + return rv; + } } + OMATCH_END (); + if (sd->npc_id || sd->opt1 != Opt1::ZERO) { @@ -4901,11 +4914,17 @@ 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)) + OMATCH_BEGIN_SOME (sdidn, sd->inventory_data[fixed.zeny_or_ioff2.unshift()]) { - clif_displaymessage(sd->sess, "This item can't be traded."_s); - return rv; + GmLevel gmlvl = pc_isGM(sd); + if (bool(sdidn->mode & ItemMode::NO_TRADE) && gmlvl.get_all_bits() < 60) + { + clif_displaymessage(sd->sess, "This item can't be traded."_s); + return rv; + } } + OMATCH_END (); + trade_tradeadditem(sd, fixed.zeny_or_ioff2, fixed.amount); return rv; |