From c0f6e377705c402ea43ea6231016b48ddd09f146 Mon Sep 17 00:00:00 2001 From: Wanne Date: Fri, 30 Aug 2013 20:40:20 +0000 Subject: [PATCH] - LUA Script Bugfix (by silversurfer) o Added missing ProfileID parameter when calling the LUA method: CheckFact( fact, profileID ) git-svn-id: https://ja2svn.mooo.com/source/ja2_v1.13_data@1746 4f8fa57e-7814-0410-bad4-adc449f26b7c --- gamedir/Data-1.13/Scripts/ExplosionControl.lua | 2 +- gamedir/Data-1.13/Scripts/Overhead.lua | 4 ++-- gamedir/Data-UB/Scripts/ExplosionControl.lua | 2 +- gamedir/Data/Scripts/ExplosionControl.lua | 2 +- gamedir/Data/Scripts/Overhead.lua | 4 ++-- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/gamedir/Data-1.13/Scripts/ExplosionControl.lua b/gamedir/Data-1.13/Scripts/ExplosionControl.lua index 82b7af6d0..659643c5c 100644 --- a/gamedir/Data-1.13/Scripts/ExplosionControl.lua +++ b/gamedir/Data-1.13/Scripts/ExplosionControl.lua @@ -283,7 +283,7 @@ if ActionID == 23 then SetNoiseGridno(ubProfil,sGridNo) SetNoiseVolume(ubProfil,6) SetAlertStatus(ubProfil,StatusAlert.STATUS_GREEN) - if ( not CheckAction(ubProfil) == ActionType.AI_ACTION_GET_CLOSER ) or CheckFact (Facts.FACT_MUSEUM_ALARM_WENT_OFF) == false then + if ( not CheckAction(ubProfil) == ActionType.AI_ACTION_GET_CLOSER ) or CheckFact (Facts.FACT_MUSEUM_ALARM_WENT_OFF, 0) == false then CancelAIAction( ubProfil) SetNextAction(ubProfil , ActionType.AI_ACTION_GET_CLOSER ) SetNextActionData(ubProfil , sGridNo) diff --git a/gamedir/Data-1.13/Scripts/Overhead.lua b/gamedir/Data-1.13/Scripts/Overhead.lua index 3b60b0c9c..ef4380e06 100644 --- a/gamedir/Data-1.13/Scripts/Overhead.lua +++ b/gamedir/Data-1.13/Scripts/Overhead.lua @@ -261,7 +261,7 @@ function HandleAtNewGridNo( ProfileId ) -- Kingping expecting visit from player (Sector D5) -- The fact has to be TRUE. If FALSE then Kingpin attack the player. - if ( CheckFact( 98 ) == false ) then + if ( CheckFact( 98, ProfileId ) == false ) then if ( NPCInRoomRange( ProfileId, 30, 39 ) == true and gWorldSectorX == 5 and gWorldSectorY == SectorY.MAP_ROW_D and gWorldSectorZ == 0 )then for iLoop = GetTacticalStatusFirstID(Team.CIV_TEAM),GetTacticalStatusLastID(Team.CIV_TEAM) do @@ -317,7 +317,7 @@ function HandleAtNewGridNo( ProfileId ) -- Drassen stuff for John & Mary elseif ( CheckQuest(Quests.QUEST_ESCORT_TOURISTS) == pQuest.QUESTINPROGRESS and ProfileIdsSectorX == 13 and ProfileIdsSectorY == SectorY.MAP_ROW_B and ProfileIdbSectorZ == 0 ) then - if ( CheckFact( Facts.FACT_JOHN_ALIVE ) == true ) then + if ( CheckFact( Facts.FACT_JOHN_ALIVE, 0 ) == true ) then HandleJohnArrival( nil ) else HandleMaryArrival( nil ) diff --git a/gamedir/Data-UB/Scripts/ExplosionControl.lua b/gamedir/Data-UB/Scripts/ExplosionControl.lua index 36deed14b..30ac8c370 100644 --- a/gamedir/Data-UB/Scripts/ExplosionControl.lua +++ b/gamedir/Data-UB/Scripts/ExplosionControl.lua @@ -283,7 +283,7 @@ if ActionID == 23 then SetNoiseGridno(ubProfil,sGridNo) SetNoiseVolume(ubProfil,6) SetAlertStatus(ubProfil,StatusAlert.STATUS_GREEN) - if ( not CheckAction(ubProfil) == ActionType.AI_ACTION_GET_CLOSER ) or CheckFact (Facts.FACT_MUSEUM_ALARM_WENT_OFF) == false then + if ( not CheckAction(ubProfil) == ActionType.AI_ACTION_GET_CLOSER ) or CheckFact (Facts.FACT_MUSEUM_ALARM_WENT_OFF, 0) == false then CancelAIAction( ubProfil) SetNextAction(ubProfil , ActionType.AI_ACTION_GET_CLOSER ) SetNextActionData(ubProfil , sGridNo) diff --git a/gamedir/Data/Scripts/ExplosionControl.lua b/gamedir/Data/Scripts/ExplosionControl.lua index 82b7af6d0..659643c5c 100644 --- a/gamedir/Data/Scripts/ExplosionControl.lua +++ b/gamedir/Data/Scripts/ExplosionControl.lua @@ -283,7 +283,7 @@ if ActionID == 23 then SetNoiseGridno(ubProfil,sGridNo) SetNoiseVolume(ubProfil,6) SetAlertStatus(ubProfil,StatusAlert.STATUS_GREEN) - if ( not CheckAction(ubProfil) == ActionType.AI_ACTION_GET_CLOSER ) or CheckFact (Facts.FACT_MUSEUM_ALARM_WENT_OFF) == false then + if ( not CheckAction(ubProfil) == ActionType.AI_ACTION_GET_CLOSER ) or CheckFact (Facts.FACT_MUSEUM_ALARM_WENT_OFF, 0) == false then CancelAIAction( ubProfil) SetNextAction(ubProfil , ActionType.AI_ACTION_GET_CLOSER ) SetNextActionData(ubProfil , sGridNo) diff --git a/gamedir/Data/Scripts/Overhead.lua b/gamedir/Data/Scripts/Overhead.lua index 3b60b0c9c..ef4380e06 100644 --- a/gamedir/Data/Scripts/Overhead.lua +++ b/gamedir/Data/Scripts/Overhead.lua @@ -261,7 +261,7 @@ function HandleAtNewGridNo( ProfileId ) -- Kingping expecting visit from player (Sector D5) -- The fact has to be TRUE. If FALSE then Kingpin attack the player. - if ( CheckFact( 98 ) == false ) then + if ( CheckFact( 98, ProfileId ) == false ) then if ( NPCInRoomRange( ProfileId, 30, 39 ) == true and gWorldSectorX == 5 and gWorldSectorY == SectorY.MAP_ROW_D and gWorldSectorZ == 0 )then for iLoop = GetTacticalStatusFirstID(Team.CIV_TEAM),GetTacticalStatusLastID(Team.CIV_TEAM) do @@ -317,7 +317,7 @@ function HandleAtNewGridNo( ProfileId ) -- Drassen stuff for John & Mary elseif ( CheckQuest(Quests.QUEST_ESCORT_TOURISTS) == pQuest.QUESTINPROGRESS and ProfileIdsSectorX == 13 and ProfileIdsSectorY == SectorY.MAP_ROW_B and ProfileIdbSectorZ == 0 ) then - if ( CheckFact( Facts.FACT_JOHN_ALIVE ) == true ) then + if ( CheckFact( Facts.FACT_JOHN_ALIVE, 0 ) == true ) then HandleJohnArrival( nil ) else HandleMaryArrival( nil )