Jump to content
The forums will be going offline for an extended maintenance period at 1400hrs GMT on 19th June 2025. The number of hours for this downtime is intentionally not advertised due to the nature of these upgrades. ×
  • 0

About storage


LordAioria

Question


  • Group:  Members
  • Topic Count:  7
  • Topics Per Day:  0.00
  • Content Count:  17
  • Reputation:   0
  • Joined:  12/31/11
  • Last Seen:  

I have updated to create a new custom storage:

int storage_storageopen(struct map_session_data *sd)
{
struct special_storage_data *spStorage;

nullpo_ret(sd);
ShowError("storage_storageopen %d\n",sd->state.storage_flag);
if(sd->state.storage_flag)
{
 return 1; //Already open?
}

if( !pc_can_give_items(sd) )
  { //check is this GM level is allowed to put items to storage
 clif_displaymessage(sd->fd, msg_txt(246));
 return 1;
}
// Test IF is a special storage.
if (sd->specialStorage != 0)
{
 spStorage = special2SpecialStorage(sd->specialStorage, sd->typeStorage);
 spStorage->storage_status = 1;
 sd->state.storage_flag = 1;
 chrif_save(sd, 0);
 storage_sortitem(spStorage->items, ARRAYLENGTH(spStorage->items));
 clif_storagelist(sd, spStorage->items, ARRAYLENGTH(spStorage->items));
 clif_updatestorageamount(sd, spStorage->storage_amount, MAX_STORAGE); 
}
else
{
 sd->state.storage_flag = 1;
 storage_sortitem(sd->status.storage.items, ARRAYLENGTH(sd->status.storage.items));
 clif_storagelist(sd, sd->status.storage.items, ARRAYLENGTH(sd->status.storage.items));
 clif_updatestorageamount(sd, sd->status.storage.storage_amount, MAX_STORAGE);
}
return 0;
}

The thing is that i can see that the storage is opened and it shows the items that i have in spStorage->items ... but there are some problems :

* I cannot close the storage

* If user 1 opens this special storage , and another char tries to open this storage at the same time .... is allowed ... i don't understand why ....

My objective is to have a custom storage in another table ... for example custom_storage ....

Could you help me please?

Link to comment
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...