diff options
Diffstat (limited to 'src/map/storage.cpp')
-rw-r--r-- | src/map/storage.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/map/storage.cpp b/src/map/storage.cpp index 54398f3..cab3f0f 100644 --- a/src/map/storage.cpp +++ b/src/map/storage.cpp @@ -186,11 +186,15 @@ int storage_storageadd(dumb_ptr<map_session_data> sd, IOff0 index, int amount) if (amount < 1 || amount > sd->status.inventory[index].amount) return 0; - if (bool(itemdb_search(sd->status.inventory[index].nameid)->mode & ItemMode::NO_STORAGE)) + OMATCH_BEGIN_SOME (sdidn, sd->inventory_data[index]) { - clif_displaymessage(sd->sess, "This item can't be stored."_s); - return 0; + if (bool(sdidn->mode & ItemMode::NO_STORAGE)) + { + clif_displaymessage(sd->sess, "This item can't be stored."_s); + return 0; + } } + OMATCH_END (); // log_tostorage(sd, index, 0); if (storage_additem(sd, stor, &sd->status.inventory[index], amount) == 0) |