summaryrefslogtreecommitdiffstats
path: root/src/Wanted.cpp
diff options
context:
space:
mode:
authoraap <aap@papnet.eu>2019-06-27 09:45:59 +0200
committerGitHub <noreply@github.com>2019-06-27 09:45:59 +0200
commitf6443ea1083f2eeb5ee781a756e84a5ac91362bf (patch)
tree51f7be43866d53b1bce9278bcb56ab9a956f7fc2 /src/Wanted.cpp
parentyet more CStreaming (diff)
parentReverted Pad.cpp to previous state. (diff)
downloadre3-f6443ea1083f2eeb5ee781a756e84a5ac91362bf.tar
re3-f6443ea1083f2eeb5ee781a756e84a5ac91362bf.tar.gz
re3-f6443ea1083f2eeb5ee781a756e84a5ac91362bf.tar.bz2
re3-f6443ea1083f2eeb5ee781a756e84a5ac91362bf.tar.lz
re3-f6443ea1083f2eeb5ee781a756e84a5ac91362bf.tar.xz
re3-f6443ea1083f2eeb5ee781a756e84a5ac91362bf.tar.zst
re3-f6443ea1083f2eeb5ee781a756e84a5ac91362bf.zip
Diffstat (limited to 'src/Wanted.cpp')
-rw-r--r--src/Wanted.cpp33
1 files changed, 33 insertions, 0 deletions
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