Initial Upload

Initial Upload
This commit is contained in:
Jaysyn904
2023-09-21 21:20:34 -04:00
parent d3f23f8b3c
commit 94990edc60
5734 changed files with 6324648 additions and 0 deletions

View File

@@ -0,0 +1,30 @@
/* This is the function that does most of the storage work. Basically there's
and array of slots for each chest and they are flagged as occupied (an item is
stored there, or unoccupied and they don't hold an item, so there's a parallel
database variable int set up to coincide with the actual stored campaign object.
I had to do this because there was no way to keep track of the objects in the
database without actually recreating them oddly enough. This works though,
when a new object is placed in a container it searches for an unflagged spot to
store the item in the database and if it finds one it only does a single database
write which is alot more computer friendly than doing a dump of the entire invo
at once. */
#include "her_persist_inc"
void main()
{
object oItem = GetInventoryDisturbItem();
object oPC = GetLastDisturbed();
//SpeakString(GetName(oPC));
if(GetInventoryDisturbType() == INVENTORY_DISTURB_TYPE_ADDED && oPC != OBJECT_INVALID)
{
AddItem(oItem, OBJECT_SELF);
//SpeakString("Adding Item");
}
if(GetInventoryDisturbType() == INVENTORY_DISTURB_TYPE_REMOVED && oPC != OBJECT_INVALID)
{
DelItem(oItem, OBJECT_SELF);
//SpeakString("Deleting Item");
}
}