generated from Jaysyn/ModuleTemplate
41 lines
1.3 KiB
Plaintext
41 lines
1.3 KiB
Plaintext
//::///////////////////////////////////////////////
|
|
//:: Name corpse_death
|
|
//:: FileName
|
|
//::
|
|
//:://////////////////////////////////////////////
|
|
/*
|
|
Responds to the ondeath event of the placeable.
|
|
Gives back items to our owner and destroys it.
|
|
*/
|
|
//:://////////////////////////////////////////////
|
|
//:: Created By: Alexandre Brunel
|
|
//:: Created On: 21/04/2003
|
|
//:://////////////////////////////////////////////
|
|
#include "corpse_lib"
|
|
void main()
|
|
{
|
|
//WriteTimestampedLogEntry("CorpseDestruction: "+GetTag(GetLocalObject(OBJECT_SELF,"LinkedTo")));
|
|
AssignCommand(GetLocalObject(OBJECT_SELF,CorpseCreatureCorpse),SetIsDestroyable(TRUE));
|
|
|
|
object item = GetFirstItemInInventory();
|
|
|
|
/*while(GetIsObjectValid(item))
|
|
{
|
|
object linked = GetLocalObject(item,CorpseOriginalObject);
|
|
|
|
if(GetIsObjectValid(linked))
|
|
{
|
|
SetPlotFlag(linked,FALSE);
|
|
DestroyObject(item);
|
|
DeleteLocalObject(item,CorpseOriginalObject);
|
|
}
|
|
item = GetNextItemInInventory();
|
|
}*/
|
|
//GetItemsInInventory(GetLocalObject(OBJECT_SELF,CorpseCreatureCorpse));
|
|
DestroyObject(GetPickableCorpse());
|
|
SetCommandable(TRUE);
|
|
AssignCommand(GetLocalObject(OBJECT_SELF,CorpseCreatureCorpse),giveBackItems(OBJECT_SELF,TRUE,TRUE));
|
|
giveBackItems(GetLocalObject(OBJECT_SELF,CorpseCreatureCorpse),TRUE,TRUE);
|
|
|
|
}
|