19 using GroupNumberType = uchar;
21 using RaiderCountType = uchar;
23 using FailureCountType = uchar;
25 using CallbackCallCountType = uint64;
27 using DurationType = int;
29 using ActorIDCollection = ::std::unordered_set<::ActorUniqueID>;
31 using PickSpawnPointCallback = ::std::function<bool(uint64,
::Vec3&)>;
33 using SpawnGroupCallback = ::std::function<bool(uint64,
::Vec3, uchar, ::std::unordered_set<::ActorUniqueID>&)>;
35 using DoesActorExistCallback = ::std::function<bool(
::ActorUniqueID const&)>;
37 using ApplyHeroOfTheVillageCallback = ::std::function<void(
::ActorUniqueID const&)>;
39 using ActorRemovedFromRaidCallback = ::std::function<void(
::ActorUniqueID const&)>;
41 using IsVillageDefeatedCallback = ::std::function<bool()>;
43 using NotificationCallback = ::std::function<void(
::Raid const&)>;
45 using RaiderHealthCallback = ::std::function<float(
::ActorUniqueID const&)>;
47 enum class RaidState :
int {
49 PickingSpawnPoint = 1,
57 enum class RaidStatus :
int {
66 ::ll::TypedStorage<4, 4, ::Raid::RaidState> mCurrentRaidState;
67 ::ll::TypedStorage<4, 4, ::Raid::RaidStatus> mRaidStatus;
68 ::ll::TypedStorage<1, 1, uchar> mCurrentGroupNumber;
69 ::ll::TypedStorage<1, 1, uchar> mNumGroupsInRaid;
70 ::ll::TypedStorage<8, 8, ::Tick> mGameTick;
71 ::ll::TypedStorage<8, 8, ::Tick> mTicksInState;
72 ::ll::TypedStorage<4, 4, int> mRaidPreparationTime;
73 ::ll::TypedStorage<4, 4, int const> mGroupCompleteDelay;
74 ::ll::TypedStorage<4, 4, int> mTicksUntilGroupComplete;
75 ::ll::TypedStorage<4, 4, int const> mLocationHelpDelay;
76 ::ll::TypedStorage<4, 4, int> mTicksUntilLocationHelp;
77 ::ll::TypedStorage<4, 4, int const> mFinishedDelay;
78 ::ll::TypedStorage<4, 12, ::Vec3> mCurrentGroupSpawnPoint;
79 ::ll::TypedStorage<8, 64, ::std::unordered_set<::ActorUniqueID>> mRaiders;
80 ::ll::TypedStorage<1, 1, uchar> mNumRaidersSpawnedInCurrentGroup;
81 ::ll::TypedStorage<4, 4, float> mCurrentGroupTotalMaxHealth;
82 ::ll::TypedStorage<1, 1, uchar const> mAllowedSpawnFailures;
83 ::ll::TypedStorage<1, 1, uchar> mSpawnFailures;
84 ::ll::TypedStorage<8, 64, ::std::unordered_set<::ActorUniqueID>> mHeroesOfTheVillage;
85 ::ll::TypedStorage<8, 64, ::std::function<bool(uint64,
::Vec3&)>
const> mPickSpawnPointCallback;
87 TypedStorage<8, 64, ::std::function<bool(uint64,
::Vec3, uchar, ::std::unordered_set<::ActorUniqueID>&)>
const>
89 ::ll::TypedStorage<8, 64, ::std::function<bool(
::ActorUniqueID const&)>
const> mDoesActorExistCallback;
90 ::ll::TypedStorage<8, 64, ::std::function<bool()>
const> mIsVillageDefeatedCallback;
91 ::ll::TypedStorage<8, 64, ::std::function<void(
::Raid const&)>> mOnSpawnPointChosenCallback;
92 ::ll::TypedStorage<8, 64, ::std::function<void(
::Raid const&)>> mOnGroupSpawnedCallback;
93 ::ll::TypedStorage<8, 64, ::std::function<void(
::Raid const&)>> mOnAwardRewardsCallback;
94 ::ll::TypedStorage<8, 64, ::std::function<void(
::Raid const&)>> mOnHelpLocateRaidersCallback;
95 ::ll::TypedStorage<8, 64, ::std::function<void(
::Raid const&)>> mOnVillageDefeatedCallback;
96 ::ll::TypedStorage<8, 64, ::std::function<void(
::ActorUniqueID const&)>> mApplyHeroOfTheVillageCallback;
97 ::ll::TypedStorage<8, 64, ::std::function<void(
::ActorUniqueID const&)>> mOnActorRemovedFromRaidCallback;
98 ::ll::TypedStorage<8, 64, ::std::function<float(
::ActorUniqueID const&)>> mGetRaiderHealthCallback;
109 int raidPreparationTime,
110 int groupCompleteDelayInTicks,
111 int locationHelpDelayInTicks,
112 int finishedDelayInTicks,
113 ::SharedTypes::Legacy::Difficulty difficulty,
114 uchar allowedSpawnFailures,
115 ::std::function<
bool(uint64,
::Vec3&)>&& pickSpawnPointCallback,
116 ::std::function<
bool(uint64,
::Vec3, uchar, ::std::unordered_set<::ActorUniqueID>&)>&& spawnGroupCallback,
117 ::std::function<
bool(
::ActorUniqueID const&)>&& doesActorExistCallback,
118 ::std::function<
bool()>&& isVillageDefeatedCallback
121 MCAPI
float _calcBossBarUsingHealth()
const;
123 MCAPI
float _calcBossBarUsingMobs()
const;
125 MCAPI
float _getTotalRaiderHealth()
const;
127 MCAPI
void _tickGroupInPlay();
131 MCAPI
float getBossBarFilledFraction()
const;
135 MCAPI
void tick(
::Tick tick);
143 MCAPI static ::Vec3
const& INVALID_SPAWN_POINT();
150 int raidPreparationTime,
151 int groupCompleteDelayInTicks,
152 int locationHelpDelayInTicks,
153 int finishedDelayInTicks,
154 ::SharedTypes::Legacy::Difficulty difficulty,
155 uchar allowedSpawnFailures,
156 ::std::function<
bool(uint64,
::Vec3&)>&& pickSpawnPointCallback,
157 ::std::function<
bool(uint64,
::Vec3, uchar, ::std::unordered_set<::ActorUniqueID>&)>&& spawnGroupCallback,
158 ::std::function<
bool(
::ActorUniqueID const&)>&& doesActorExistCallback,
159 ::std::function<
bool()>&& isVillageDefeatedCallback