<!--quoteo(post=222008:date=Nov 18 2007, 06:13 AM:name=Pieter Boelen)--><div class='quotetop'>QUOTE(Pieter Boelen @ Nov 18 2007, 06:13 AM) [snapback]222008[/snapback]</div><div class='quotemain'><!--quotec-->But the whole monk looting isn't supposed to be done through the corpsemode at all. It's supposed to happen through the dialog. That is why the corpsemode was disabled for the cursed monks. That is how CouchcaptainCharles had originally intended it.<!--QuoteEnd--></div><!--QuoteEEnd-->
But that is not how it is working now, is it!
I'll just put the section of "LAi_events.c" I made changes to here. One thing I don't understand is why there are references to Corpsemode 3 when there no longer is a Corpsemode 3.
<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1--> //SCREWFACE : if a permanent crewmember is killed, his corpse disapear immediatly (don't remove that unless that will cause a bug)
//if(CORPSEMODE == 3 && !LAi_DoCORPEMODE(chr)) // NK persist original corpse 05-07-19 //GO Add Test for Quest that doesn't work with CORPSEMODE=3 // Petros out comment Screwfaces disappearing crewmembers
if(CORPSEMODE == 3 && !CheckAttribute(chr, "corpse")) // NK persist original corpse 05-07-19 // Petros re-insert Kell's original code
{
LAi_GenerateFantomFromMe(chr);
SetCharacterTask_Stay(chr);
//PopCharacterTask(GetCharacter(sti(chr.index)));
LAi_Stunned_MakeCorpse(chr);
LAi_SetImmortal(chr, true);
}
else
{
LAi_CharacterLogoff(chr);
PostEvent("LAi_event_Character_Dead", floatret(CORPSEMODE != 0, 500, 10000), "i", chr); // ccc jul05 corpse, time chg from 10000. NK change to 500. Make part of corpsemode != 3. //Petros re-insert Kell's original code
//if(CORPSEMODE == 0) PostEvent("LAi_event_Character_Dead", 10000, "i", chr); // PB: Original code if CORPSEMODE off
//else PostEvent("LAi_event_Character_Dead", 500, "i", chr); // ccc jul05 corpse, time chg from 10000. NK change to 500. Make part of corpsemode != 3.
}
// NK do this in DeadEvent below: 05-07-13 - LAi_GenerateFantomFromMe(chr);
LAi_group_CheckGroupQuest(chr);
}else{
LAi_CharacterLogoff(chr);
if(!LAi_IsBoardingProcess())
{
PostEvent("LAi_event_GameOver", 5000, "s", "land");
}else{
PostEvent("LAi_event_GameOver", 5000, "s", "boarding");
}
}
LanguageCloseFile(tmpNameFileID);
}
#event_handler("LAi_event_Character_Dead", "LAi_Character_Dead_Event");
void LAi_Character_Dead_Event() // should never be run when CORPSEMODE == 3. NK 05-07-19
{
int tmpNameFileID = LanguageOpenFile("characters_names.txt");
int tmpLangFileID = LanguageOpenFile("interface_strings.txt");
aref chr = GetEventData();
// changed by MAXIMUS 12.10.2006 -->
bool bLoc = false;
ref lcn;
if(CheckAttribute(chr,"location") ) bLoc = true;
if(bLoc) lcn = &Locations[FindLocation(chr.location)]; // determines where you are
// changed by MAXIMUS 12.10.2006 <--
// TIH --> changed behavior Sep2'06
bool DissolveBody = true;
if(CORPSEMODE == 1) DissolveBody = false;
if(bAbordageStarted && AUTOLOOT_BOARDINGS) DissolveBody = false;
// changed by MAXIMUS 12.10.2006 -->
if(bLoc)
{
if(CheckAttribute(lcn, "id.label") && lcn.id.label == LanguageConvertString(tmpLangFileID,"Abbey of the Maltese order")) DissolveBody = true; // TIH for maltese knight abbey
}
// changed by MAXIMUS 12.10.2006 <--
if (DissolveBody)
{
// this removes the current body
// we don't do this when we are leaving dead bodies around, like for AUTOLOOT_BOARDINGS, or CORPSEMODE 1
// if CORPSEMODE is 2, a new body is created below as a lootable corpse, so it appears to 'stay'
CharacterExitFromLocation(chr);
}
else
{
// we wont be clearing the old body nor making a new body, so we need to keep this one around
// however we set it as a neutral entity so that the warning indicator will go out when all enemies are dead
LAi_group_MoveCharacter(chr, LAI_GROUP_CORPSES);
LAI_group_SetRelationWithAllStock(LAI_GROUP_CORPSES, LAI_GROUP_NEITRAL);
LAi_CharacterLogoff(chr);
}
// TIH <--
// original chr body disappears, put 'if(chr.name != "The late")' in front to keep corpses lying around after looting
// ccc jul05 corpse for looting
if (!CheckAttribute(chr, "name")) // LDH added to prevent errors on dead captains
{
Trace("Warning: Invalid character in LAi_CharacterDeadEvent(), ignored");
LanguageCloseFile(tmpLangFileID);
LanguageCloseFile(tmpNameFileID);
return;
}
if(chr.name != XI_ConvertString("The late") && CORPSEMODE != 3) // do not generate a corpse from a corpse
{
bool GenerateCorpse = true;
if(chr.sex == "monkey") GenerateCorpse = false; // No corpses for monkeys
if(chr.name==LanguageConvertString(tmpNameFileID,"Crewmember")) GenerateCorpse = true; // No corpses for permanent crewmembers (Screwface) // Petros change to true to loot crewmembers
if(CheckAttribute(chr,"chr_ai.type") && chr.chr_ai.type == "Building") GenerateCorpse = false; // No corpses for buildings (ccc building kit Jan06)
if(bAbordageStarted && AUTOLOOT_BOARDINGS) GenerateCorpse = false; // PB: No corpses during boardings - Instead automatic looting (at LDH's request)
if(CORPSEMODE != 2) GenerateCorpse = false; // TIH only corpsemode 2 makes a lootable corpse Sep2'06
// LDH 27Sep06 added CheckAttribute
// changed by MAXIMUS 12.10.2006 -->
if(bLoc)
{
if(CheckAttribute(lcn, "id.label") && lcn.id.label == LanguageConvertString(tmpLangFileID,"Abbey of the Maltese order")) GenerateCorpse = true; // TIH for maltese knight abbey
}
// changed by MAXIMUS 12.10.2006 <--<!--c2--></div><!--ec2-->