diff options
Diffstat (limited to 'src/map/trade.c')
-rw-r--r-- | src/map/trade.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/src/map/trade.c b/src/map/trade.c index e804ad7..8880629 100644 --- a/src/map/trade.c +++ b/src/map/trade.c @@ -62,8 +62,6 @@ void trade_traderequest(struct map_session_data *sd,int target_id) void trade_tradeack(struct map_session_data *sd,int type) { struct map_session_data *target_sd; - struct storage *stor; - nullpo_retv(sd); if((target_sd = map_id2sd(sd->trade_partner)) != NULL){ @@ -81,13 +79,10 @@ void trade_tradeack(struct map_session_data *sd,int type) npc_event_dequeue(target_sd); //close STORAGE window if it's open. It protects from spooffing packets [Lupus] - nullpo_retv(stor=account2storage2(sd->status.account_id)); - if(stor->storage_status == 1) { - if (sd->state.storage_flag) //is it Guild Storage or Common - storage_guild_storageclose(sd); - else - storage_storageclose(sd); - }//END OF STORAGE CLOSE + if (sd->state.storage_flag == 1) + storage_storageclose(sd); + else if (sd->state.storage_flag == 2) + storage_guild_storageclose(sd); } } |