LeviLamina
Loading...
Searching...
No Matches
Raid.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/core/math/Vec3.h"
7#include "mc/deps/shared_types/legacy/Difficulty.h"
8#include "mc/legacy/ActorUniqueID.h"
9#include "mc/world/level/Tick.h"
10
11// auto generated forward declare list
12// clang-format off
13class Actor;
14class CompoundTag;
15// clang-format on
16
17class Raid {
18public:
19 // Raid inner types define
20 enum class RaidState : int {
21 PreparingGroup = 0,
22 PickingSpawnPoint = 1,
23 SpawningGroup = 2,
24 GroupInPlay = 3,
25 AwardingRewards = 4,
26 Finished = 5,
27 Stopped = 6,
28 };
29
30 enum class RaidStatus : int {
31 Ongoing = 0,
32 Victory = 1,
33 Defeat = 2,
34 };
35
36 using ActorIDCollection = ::std::unordered_set<::ActorUniqueID>;
37
38 using ActorRemovedFromRaidCallback = ::std::function<void(::ActorUniqueID const&)>;
39
40 using ApplyHeroOfTheVillageCallback = ::std::function<void(::ActorUniqueID const&)>;
41
42 using CallbackCallCountType = uint64;
43
44 using DoesActorExistCallback = ::std::function<bool(::ActorUniqueID const&)>;
45
46 using DurationType = int;
47
48 using FailureCountType = uchar;
49
50 using GroupNumberType = uchar;
51
52 using IsVillageDefeatedCallback = ::std::function<bool()>;
53
54 using NotificationCallback = ::std::function<void(::Raid const&)>;
55
56 using PickSpawnPointCallback = ::std::function<bool(uint64, ::Vec3&)>;
57
58 using RaiderCountType = uchar;
59
60 using RaiderHealthCallback = ::std::function<float(::ActorUniqueID const&)>;
61
62 using SpawnGroupCallback = ::std::function<bool(uint64, ::Vec3, uchar, ::std::unordered_set<::ActorUniqueID>&)>;
63
64public:
65 // member variables
66 // NOLINTBEGIN
67 ::ll::TypedStorage<4, 4, ::Raid::RaidState> mCurrentRaidState;
68 ::ll::TypedStorage<4, 4, ::Raid::RaidStatus> mRaidStatus;
69 ::ll::TypedStorage<1, 1, uchar> mCurrentGroupNumber;
70 ::ll::TypedStorage<1, 1, uchar> mNumGroupsInRaid;
71 ::ll::TypedStorage<8, 8, ::Tick> mGameTick;
72 ::ll::TypedStorage<8, 8, ::Tick> mTicksInState;
73 ::ll::TypedStorage<4, 4, int> mRaidPreparationTime;
74 ::ll::TypedStorage<4, 4, int const> mGroupCompleteDelay;
75 ::ll::TypedStorage<4, 4, int> mTicksUntilGroupComplete;
76 ::ll::TypedStorage<4, 4, int const> mLocationHelpDelay;
77 ::ll::TypedStorage<4, 4, int> mTicksUntilLocationHelp;
78 ::ll::TypedStorage<4, 4, int const> mFinishedDelay;
79 ::ll::TypedStorage<4, 12, ::Vec3> mCurrentGroupSpawnPoint;
80 ::ll::TypedStorage<8, 64, ::std::unordered_set<::ActorUniqueID>> mRaiders;
81 ::ll::TypedStorage<1, 1, uchar> mNumRaidersSpawnedInCurrentGroup;
82 ::ll::TypedStorage<4, 4, float> mCurrentGroupTotalMaxHealth;
83 ::ll::TypedStorage<1, 1, uchar const> mAllowedSpawnFailures;
84 ::ll::TypedStorage<1, 1, uchar> mSpawnFailures;
85 ::ll::TypedStorage<8, 64, ::std::unordered_set<::ActorUniqueID>> mHeroesOfTheVillage;
86 ::ll::TypedStorage<8, 64, ::std::function<bool(uint64, ::Vec3&)> const> mPickSpawnPointCallback;
87 ::ll::
88 TypedStorage<8, 64, ::std::function<bool(uint64, ::Vec3, uchar, ::std::unordered_set<::ActorUniqueID>&)> const>
89 mSpawnGroupCallback;
90 ::ll::TypedStorage<8, 64, ::std::function<bool(::ActorUniqueID const&)> const> mDoesActorExistCallback;
91 ::ll::TypedStorage<8, 64, ::std::function<bool()> const> mIsVillageDefeatedCallback;
92 ::ll::TypedStorage<8, 64, ::std::function<void(::Raid const&)>> mOnSpawnPointChosenCallback;
93 ::ll::TypedStorage<8, 64, ::std::function<void(::Raid const&)>> mOnGroupSpawnedCallback;
94 ::ll::TypedStorage<8, 64, ::std::function<void(::Raid const&)>> mOnAwardRewardsCallback;
95 ::ll::TypedStorage<8, 64, ::std::function<void(::Raid const&)>> mOnHelpLocateRaidersCallback;
96 ::ll::TypedStorage<8, 64, ::std::function<void(::Raid const&)>> mOnVillageDefeatedCallback;
97 ::ll::TypedStorage<8, 64, ::std::function<void(::ActorUniqueID const&)>> mApplyHeroOfTheVillageCallback;
98 ::ll::TypedStorage<8, 64, ::std::function<void(::ActorUniqueID const&)>> mOnActorRemovedFromRaidCallback;
99 ::ll::TypedStorage<8, 64, ::std::function<float(::ActorUniqueID const&)>> mGetRaiderHealthCallback;
100 // NOLINTEND
101
102public:
103 // prevent constructor by default
104 Raid();
105
106public:
107 // member functions
108 // NOLINTBEGIN
109 MCAPI Raid(
110 int raidPreparationTime,
111 int groupCompleteDelayInTicks,
112 int locationHelpDelayInTicks,
113 int finishedDelayInTicks,
114 ::SharedTypes::Legacy::Difficulty difficulty,
115 uchar allowedSpawnFailures,
116 ::std::function<bool(uint64, ::Vec3&)>&& pickSpawnPointCallback,
117 ::std::function<bool(uint64, ::Vec3, uchar, ::std::unordered_set<::ActorUniqueID>&)>&& spawnGroupCallback,
118 ::std::function<bool(::ActorUniqueID const&)>&& doesActorExistCallback,
119 ::std::function<bool()>&& isVillageDefeatedCallback
120 );
121
122 MCAPI void _tickAwardingRewards();
123
124 MCAPI void _tickGroupInPlay();
125
126 MCAPI void _tickSpawningGroup();
127
128 MCAPI void addAdditionalSaveData(::CompoundTag& tag) const;
129
130 MCAPI void addPlayerToHeroList(::Actor const& actor);
131
132 MCAPI void addRaider(::ActorUniqueID const& actor, float maxHealth);
133
134 MCAPI void appendDebugInfo(::std::string& infoString) const;
135
136 MCAPI float getBossBarFilledFraction() const;
137
138 MCFOLD uint64 getRemainingRaiders() const;
139
140 MCAPI bool isRaider(::ActorUniqueID actor) const;
141
142 MCAPI void readAdditionalSaveData(::CompoundTag const& tag);
143
144 MCAPI void tick(::Tick tick);
145
146 MCAPI ~Raid();
147 // NOLINTEND
148
149public:
150 // constructor thunks
151 // NOLINTBEGIN
152 MCAPI void* $ctor(
153 int raidPreparationTime,
154 int groupCompleteDelayInTicks,
155 int locationHelpDelayInTicks,
156 int finishedDelayInTicks,
157 ::SharedTypes::Legacy::Difficulty difficulty,
158 uchar allowedSpawnFailures,
159 ::std::function<bool(uint64, ::Vec3&)>&& pickSpawnPointCallback,
160 ::std::function<bool(uint64, ::Vec3, uchar, ::std::unordered_set<::ActorUniqueID>&)>&& spawnGroupCallback,
161 ::std::function<bool(::ActorUniqueID const&)>&& doesActorExistCallback,
162 ::std::function<bool()>&& isVillageDefeatedCallback
163 );
164 // NOLINTEND
165
166public:
167 // destructor thunk
168 // NOLINTBEGIN
169 MCAPI void $dtor();
170 // NOLINTEND
171};
Definition Actor.h:125
Definition CompoundTag.h:23
Definition Vec3.h:10
Definition ActorUniqueID.h:10
Definition Tick.h:5