LoT_PRC8/_module/nss/pgs_chest_close.nss
Jaysyn904 ec287507a1 Initial upload
Initial upload.
2023-09-25 21:32:17 -04:00

32 lines
1.1 KiB
Plaintext

//::///////////////////////////////////////////////
//:: Name: pgs_chest_close
//:: Copyright (c) 2001 Bioware Corp.
//:://////////////////////////////////////////////
/*
OnClose event for guild storage chests.
*/
//:://////////////////////////////////////////////
//:: Created By: Samius Maximus
//:: Created On:
//:://////////////////////////////////////////////
#include "inc_gsystem_terr"
void main()
{
object oStorage = GetLocalObject (OBJECT_SELF, "Temp_Storage_Creature");
object oChest = GetLocalObject (OBJECT_SELF, "Temp_Storage_Chest");
//--------------------------------------------
//Save the storage creature for persistency.
//--------------------------------------------
SetTerritoryStorageCreature (oStorage, GetPGSStorageTerritory (oChest));
//--------------------------------------------
//Destroy storage creature & unique placeable.
//--------------------------------------------
DeleteLocalInt (oChest, "Currently_In_Use");
DeleteLocalInt (oChest, "Item_Count");
DestroyObject (oStorage);
DestroyObject (OBJECT_SELF);
}