Files
HeroesStone_PRC8/_module/nss/dm_paa_destroy.nss
Jaysyn904 1eefc84201 Initial Commit
Initial Commit.
2025-09-14 15:40:46 -04:00

26 lines
628 B
Plaintext

//------------------------------------------------------------------
// dm_paa_destroy destroy selected placeable (and contents)
//
// 12/02/2009 Malishara: added
//------------------------------------------------------------------
void DestroyContents(object oObject)
{ object oItem = GetFirstItemInInventory(oObject);
while (GetIsObjectValid(oItem))
{ DestroyObject(oItem);
oItem = GetNextItemInInventory(oObject);
}
}
void main()
{
object oTarget = GetLocalObject(OBJECT_SELF, "DM_PAA_oTarget");
if (GetHasInventory(oTarget))
{ DestroyContents(oTarget); }
DestroyObject(oTarget);
}