From fafa59ab2a2d0da7eb14fc4a37fd05bc3f37e461 Mon Sep 17 00:00:00 2001 From: Jaka Kranjc Date: Sun, 29 Aug 2010 10:28:35 +0200 Subject: [PATCH] NumCreatureVsParty* triggers take the party size into account --- gemrb/core/GameScript/Triggers.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gemrb/core/GameScript/Triggers.cpp b/gemrb/core/GameScript/Triggers.cpp index 6b81e770b..bb0b25f7a 100644 --- a/gemrb/core/GameScript/Triggers.cpp +++ b/gemrb/core/GameScript/Triggers.cpp @@ -2527,6 +2527,7 @@ int GameScript::NumCreatureVsParty(Scriptable* Sender, Trigger* parameters) } parameters->objectParameter->objectFields[0]=EA_EVILCUTOFF; int value = GetObjectCount(Sender, parameters->objectParameter); + value -= core->GetGame()->GetPartySize(true); return value == parameters->int0Parameter; } @@ -2537,6 +2538,7 @@ int GameScript::NumCreatureVsPartyGT(Scriptable* Sender, Trigger* parameters) } parameters->objectParameter->objectFields[0]=EA_EVILCUTOFF; int value = GetObjectCount(Sender, parameters->objectParameter); + value -= core->GetGame()->GetPartySize(true); return value > parameters->int0Parameter; } @@ -2547,6 +2549,7 @@ int GameScript::NumCreatureVsPartyLT(Scriptable* Sender, Trigger* parameters) } parameters->objectParameter->objectFields[0]=EA_EVILCUTOFF; int value = GetObjectCount(Sender, parameters->objectParameter); + value -= core->GetGame()->GetPartySize(true); return value < parameters->int0Parameter; } -- 2.11.4.GIT