Skip to content

Commit

Permalink
Merge pull request #389 from GrognardsFromHell/Fear_of_Ghosts_quest_fix
Browse files Browse the repository at this point in the history
Fear of ghosts quest fix
  • Loading branch information
doug1234 authored Apr 30, 2020
2 parents bbf82e8 + 63a1518 commit 5a458eb
Show file tree
Hide file tree
Showing 3 changed files with 1,168 additions and 2 deletions.
8 changes: 6 additions & 2 deletions TemplePlus/combat.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -833,16 +833,20 @@ void LegacyCombatSystem::EndTurn()
auto shouldRemove = critterSys.IsDeadNullDestroyed(combatant) || (combatantObj->GetFlags() & OF_OFF);
// Added in Temple+ : Remove AIs that aren't in combat mode
if (!shouldRemove && combatantObj->IsNPC() && !party.IsInParty(combatant) && !combatSys.IsBrawlInProgress()){
/*auto aifs = AIFS_NONE;
auto aifs = AIFS_NONE;
aiSys.GetAiFightStatus(combatant, &aifs, nullptr);
if (aifs == AIFS_NONE){
shouldRemove = true;
}*/
}

/* Undoing the fear of ghosts hack, instead I'm going to change the script to let you just talk to the ghosts...
* if there are other critters with OF_INVULNERABLE this may have to be revisited.
// Changing this to accomodate the Ghost from Fear of Ghosts quest... hope I don't regret it xD
auto critterFlags = critterSys.GetCritterFlags(combatant);
if (!(critterFlags & OCF_COMBAT_MODE_ACTIVE)) {
shouldRemove = true;
}
*/
}
if (shouldRemove) {
static auto removeFromInitiative = temple::GetRef<int(__cdecl)(objHndl)>(0x100DF530);
Expand Down
Binary file modified tpdata/co8fixes.dat
Binary file not shown.
Loading

0 comments on commit 5a458eb

Please sign in to comment.