summaryrefslogtreecommitdiff
path: root/src/map/pc.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/pc.c')
-rw-r--r--src/map/pc.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/map/pc.c b/src/map/pc.c
index 7d2deaa01..ee1fcd7da 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -1293,6 +1293,7 @@ bool pc_authok(struct map_session_data *sd, int login_id2, time_t expiration_tim
VECTOR_INIT(sd->script_queues);
VECTOR_INIT(sd->storage.item); // initialize storage item vector.
+ VECTOR_INIT(sd->hatEffectId);
sd->state.dialog = 0;
@@ -4901,11 +4902,6 @@ int pc_isUseitem(struct map_session_data *sd,int n)
return 0; // You cannot use this item while sitting.
}
- if (sd->state.storage_flag != STORAGE_FLAG_CLOSED && item->type != IT_CASH) {
- clif->messagecolor_self(sd->fd, COLOR_RED, msg_sd(sd,1475));
- return 0; // You cannot use this item while storage is open.
- }
-
switch( nameid ) { // TODO: Is there no better way to handle this, other than hardcoding item IDs?
case ITEMID_ANODYNE:
if (map_flag_gvg2(sd->bl.m)) {
@@ -5123,6 +5119,11 @@ int pc_useitem(struct map_session_data *sd,int n) {
return 0;
}
+ if (battle_config.storage_use_item == 1 && sd->state.storage_flag != STORAGE_FLAG_CLOSED) {
+ clif->messagecolor_self(sd->fd, COLOR_RED, msg_sd(sd, 1475));
+ return 0; // You cannot use this item while storage is open.
+ }
+
if( sd->status.inventory[n].nameid <= 0 || sd->status.inventory[n].amount <= 0 )
return 0;