generated from Jaysyn/ModuleTemplate
46 lines
1.4 KiB
Plaintext
46 lines
1.4 KiB
Plaintext
//::///////////////////////////////////////////////
|
|
//:: corpse_leave
|
|
//:: FileName
|
|
//:: Copyright (c) 2001 Bioware Corp.
|
|
//:://////////////////////////////////////////////
|
|
/*
|
|
Responds to the onleave event of the module.
|
|
*/
|
|
//:://////////////////////////////////////////////
|
|
//:: Created By: Alexandre Brunel
|
|
//:: Created On: 24/04/2003
|
|
//:://////////////////////////////////////////////
|
|
#include "corpse_lib"
|
|
void main()
|
|
{
|
|
object pc = GetExitingObject();
|
|
|
|
object corpse = GetLocalObject(pc,CorpsePCCorpse);
|
|
|
|
if(GetIsObjectValid(corpse))
|
|
{
|
|
/*DestroyEquipment(corpse);
|
|
AssignCommand(GetOriginalCorpse(corpse),giveBackItems(corpse,TRUE,FALSE,TRUE));
|
|
AssignCommand(corpse,SetIsDestroyable(TRUE));*/
|
|
string PCID = GetLocalString(pc,CorpsePCID);
|
|
string dataBase = GetDataBaseName();
|
|
|
|
/*int size = GetStringArraySize(CorpseDeadPCLeftArray);
|
|
|
|
SetStringInArray(CorpseDeadPCLeftArray,PCID,size);*/
|
|
//object corpse2 = GetOriginalCorpse(corpse);
|
|
AssignCommand(pc,giveBackItems(corpse,FALSE));
|
|
SetLocalString_Corpse(corpse,CorpseDeadPCLeftID,PCID);
|
|
|
|
SetLocalObject(OBJECT_SELF,PCID,corpse);
|
|
StoreCampaignObject(dataBase,PCID,corpse,pc);
|
|
SetCampaignLocation(dataBase,PCID+"Location",GetLocation(corpse),pc);
|
|
|
|
DeleteLocalObject(pc,CorpsePCCorpse);
|
|
DeleteLocalObject(corpse,CorpsePCCorpse);
|
|
|
|
}
|
|
|
|
|
|
}
|