From 69ac8bcd7acb44a9c6dbd06680e7d90935363467 Mon Sep 17 00:00:00 2001 From: _AG Date: Wed, 26 Jun 2019 23:31:12 +0200 Subject: Update Wanted.cpp Fix #36. --- src/Wanted.cpp | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) (limited to 'src/Wanted.cpp') diff --git a/src/Wanted.cpp b/src/Wanted.cpp index 36bc4f03..ece68e64 100644 --- a/src/Wanted.cpp +++ b/src/Wanted.cpp @@ -1,3 +1,36 @@ #include "common.h" #include "patcher.h" #include "Wanted.h" + +bool CWanted::AreSwatRequired() +{ + return m_nWantedLevel >= 4; +} + +bool CWanted::AreFbiRequired() +{ + return m_nWantedLevel >= 5; +} + +bool CWanted::AreArmyRequired() +{ + return m_nWantedLevel >= 6; +} + +int CWanted::NumOfHelisRequired() +{ + if (m_IsIgnoredByCops) + return 0; + + // Return value is number of helicopters, no need to name them. + switch (m_nWantedLevel) { + case WANTEDLEVEL_3: + case WANTEDLEVEL_4: + return 1; + case WANTEDLEVEL_5: + case WANTEDLEVEL_6: + return 2; + default: + return 0; + }; +} \ No newline at end of file -- cgit v1.2.3