LeviLamina
Loading...
Searching...
No Matches
RaidBossComponent.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/legacy/ActorUniqueID.h"
7#include "mc/safety/RedactableString.h"
8#include "mc/world/actor/ai/util/BossBarColor.h"
9#include "mc/world/actor/ai/util/BossEventUpdateType.h"
10#include "mc/world/phys/AABB.h"
11
12// auto generated forward declare list
13// clang-format off
14class Actor;
15class Mob;
16class Player;
17class Raid;
18class Village;
19// clang-format on
20
21class RaidBossComponent {
22public:
23 // member variables
24 // NOLINTBEGIN
25 ::ll::TypedStorage<8, 16, ::std::weak_ptr<::Village>> mVillage;
26 ::ll::TypedStorage<8, 8, ::ActorUniqueID> mOwnerID;
27 ::ll::TypedStorage<8, 72, ::Bedrock::Safety::RedactableString> mName;
28 ::ll::TypedStorage<8, 32, ::std::string> mProgress;
29 ::ll::TypedStorage<4, 4, int> mPlayersRegistered;
30 ::ll::TypedStorage<1, 1, bool> mWaveStarted;
31 ::ll::TypedStorage<1, 1, bool> mRaidInProgress;
32 ::ll::TypedStorage<1, 1, bool> mHealthBarVisible;
33 ::ll::TypedStorage<4, 4, float> mHealthPercent;
34 ::ll::TypedStorage<4, 24, ::AABB> mBossBarVisibleBounds;
35 ::ll::TypedStorage<8, 8, ::std::chrono::steady_clock::time_point> mLastPlayerUpdate;
36 // NOLINTEND
37
38public:
39 // prevent constructor by default
40 RaidBossComponent& operator=(RaidBossComponent const&);
41
42public:
43 // member functions
44 // NOLINTBEGIN
45 MCAPI RaidBossComponent();
46
47 MCAPI RaidBossComponent(::RaidBossComponent const&);
48
49 MCAPI void _broadcastBossEvent(::BossEventUpdateType type, ::Actor& owner);
50
51 MCAPI void _handleRegisterPlayers(::Actor& owner);
52
53 MCAPI void _sendBossEvent(::BossEventUpdateType type, ::Player& player);
54
55 MCFOLD ::BossBarColor getColor();
56
57 MCAPI float getHealthPercent();
58
59 MCAPI ::Bedrock::Safety::RedactableString getName();
60
61 MCFOLD ::ActorUniqueID getOwnerUniqueID();
62
63 MCFOLD bool getRaidInProgress();
64
65 MCFOLD ::std::shared_ptr<::Village> getVillage();
66
67 MCFOLD bool getWaveStarted();
68
69 MCAPI void initialize(::ActorUniqueID ownerID);
70
71 MCAPI bool isWithinRange(::Mob const& player);
72
73 MCAPI void registerPlayer(::Player* player);
74
75 MCAPI void removeBossBar(::Actor& owner);
76
77 MCAPI void resendRaidBossEventData(::Player& player);
78
79 MCAPI void sendRegistryMessages(::Actor& owner);
80
81 MCFOLD void setVillage(::std::weak_ptr<::Village> village);
82
83 MCFOLD void setWaveStarted(bool val);
84
85 MCAPI void setupBossBarInfo(::Actor& owner, ::Village* village);
86
87 MCAPI bool tryRemoveBoss(::Actor& owner, ::Player& player);
88
89 MCAPI void unRegisterPlayer(::Player* player);
90
91 MCAPI void updateBossBarStats(::Actor& owner, ::Raid const& raid);
92
93 MCAPI void updateHealthBarVisible(bool visible, ::Actor& owner);
94
95 MCAPI ~RaidBossComponent();
96 // NOLINTEND
97
98public:
99 // constructor thunks
100 // NOLINTBEGIN
101 MCAPI void* $ctor();
102
103 MCAPI void* $ctor(::RaidBossComponent const&);
104 // NOLINTEND
105
106public:
107 // destructor thunk
108 // NOLINTBEGIN
109 MCAPI void $dtor();
110 // NOLINTEND
111};
Definition Actor.h:125
Definition Mob.h:57
Definition Player.h:137
Definition Raid.h:17
Definition Village.h:34
Definition ActorUniqueID.h:10