Skip to content
LeviMC
English
AutoLightDark
LeviLamina
Loading...
Searching...
No Matches
MeleeAttackBaseGoal.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/world/actor/ActorCategory.h"
8#include "mc/world/actor/ActorDefinitionTrigger.h"
9#include "mc/world/actor/TempEPtr.h"
10#include "mc/world/actor/ai/goal/BaseGoal.h"
11
12// auto generated forward declare list
13// clang-format off
14class Actor;
15class Mob;
17class Path;
18struct GoalId;
19namespace SharedTypes::v1_26_40 { struct MeleeAttackBaseGoalDefinition; }
20// clang-format on
21
22class MeleeAttackBaseGoal : public ::BaseGoal {
23public:
24 // MeleeAttackBaseGoal inner types declare
25 // clang-format off
26 struct NavigationSettings;
27 // clang-format on
28
29 // MeleeAttackBaseGoal inner types define
31 public:
32 // NavigationSettings inner types define
34
35 public:
36 // member variables
37 // NOLINTBEGIN
38 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::Path>> mPath;
39 ::ll::TypedStorage<4, 4, int> mMinPathTicks;
40 ::ll::TypedStorage<4, 4, int> mMaxPathTicks;
41 ::ll::TypedStorage<4, 4, int> mPathFailTickIncrease;
42 ::ll::TypedStorage<4, 4, int> mInnerBoundaryTickIncrease;
43 ::ll::TypedStorage<4, 4, int> mOuterBoundaryTickIncrease;
44 ::ll::TypedStorage<4, 4, int> mTicksToRecalculatePath;
45 ::ll::TypedStorage<4, 4, float> mPathInnerBoundarySq;
46 ::ll::TypedStorage<4, 4, float> mPathOuterBoundarySq;
47 ::ll::TypedStorage<4, 4, float> mSpeedMultiplier;
48 ::ll::TypedStorage<1, 1, bool> mRequireCompletePath;
49 ::ll::TypedStorage<1, 1, bool> mTrackTarget;
50 ::ll::TypedStorage<1, 1, bool> mHijackMountNavigation;
51 // NOLINTEND
52 };
53
54public:
55 // member variables
56 // NOLINTBEGIN
57 ::ll::TypedStorage<8, 48, ::MeleeAttackBaseGoal::NavigationSettings> mNavigation;
58 ::ll::TypedStorage<8, 8, ::Mob&> mMob;
59 ::ll::TypedStorage<8, 40, ::TempEPtr<::Actor>> mTarget;
60 ::ll::TypedStorage<4, 12, ::Vec3> mLastCachedTargetPosition;
61 ::ll::TypedStorage<4, 4, ::ActorCategory> mAttackTypes;
62 ::ll::TypedStorage<8, 104, ::ActorDefinitionTrigger> mOnAttack;
63 ::ll::TypedStorage<8, 104, ::ActorDefinitionTrigger> mOnKill;
64 ::ll::TypedStorage<4, 4, float> mMeleeFov;
65 ::ll::TypedStorage<4, 4, float> mMaxRotationX;
66 ::ll::TypedStorage<4, 4, float> mMaxHeadRotationY;
67 ::ll::TypedStorage<4, 4, int> mRandomStopInterval;
68 ::ll::TypedStorage<4, 4, int> mAttackTicks;
69 ::ll::TypedStorage<4, 4, int> mCooldownTicks;
70 ::ll::TypedStorage<1, 1, bool> mAttackOnce;
71 ::ll::TypedStorage<1, 1, bool> mHasAttacked;
72 ::ll::TypedStorage<1, 1, bool> mSetPersistent;
73 ::ll::TypedStorage<1, 1, bool> mCanSpreadOnFire;
74 ::ll::TypedStorage<1, 1, bool> mCheckTargetInsideAABB;
75 // NOLINTEND
76
77public:
78 // prevent constructor by default
79 MeleeAttackBaseGoal& operator=(MeleeAttackBaseGoal const&);
80 MeleeAttackBaseGoal(MeleeAttackBaseGoal const&);
81 MeleeAttackBaseGoal();
82
83public:
84 // virtual functions
85 // NOLINTBEGIN
86 virtual ~MeleeAttackBaseGoal() /*override*/;
87
88 virtual bool canUse() /*override*/;
89
90 virtual bool canContinueToUse() /*override*/;
91
92 virtual void start() /*override*/;
93
94 virtual void stop() /*override*/;
95
96 virtual void tick() = 0;
97
98 virtual int getAttackTicksResetValue() const;
99 // NOLINTEND
100
101public:
102 // member functions
103 // NOLINTBEGIN
104 MCNAPI MeleeAttackBaseGoal(::Mob& mob, ::std::string name, ::GoalId const& goalId);
105
106 MCNAPI void _attemptAttackTarget(::Actor& target, bool canReachTarget, bool hasLineOfSight);
107
108 MCNAPI void _attemptMoveToTargetPosition(::Actor const& target, bool canReachTarget, float targetDistanceSq);
109
110 MCNAPI ::Mob& _getNavigatingMob() const;
111
112 MCNAPI ::NavigationComponent* _getNavigationComponent() const;
113
114 MCNAPI bool _isNavigationDoneOrStuck() const;
115
117 // NOLINTEND
118
119public:
120 // constructor thunks
121 // NOLINTBEGIN
122 MCNAPI void* $ctor(::Mob& mob, ::std::string name, ::GoalId const& goalId);
123 // NOLINTEND
124
125public:
126 // destructor thunk
127 // NOLINTBEGIN
128 MCNAPI void $dtor();
129 // NOLINTEND
130
131public:
132 // virtual function thunks
133 // NOLINTBEGIN
134 MCNAPI bool $canUse();
135
136 MCNAPI bool $canContinueToUse();
137
138 MCNAPI void $start();
139
140 MCNAPI void $stop();
141
142 MCNAPI int $getAttackTicksResetValue() const;
143
144
145 // NOLINTEND
146
147public:
148 // vftables
149 // NOLINTBEGIN
150 MCNAPI static void** $vftable();
151 // NOLINTEND
152};
Definition Actor.h:116
Definition BaseGoal.h:12
MCAPI bool $canUse()
MCAPI bool _isNavigationDoneOrStuck() const
MCAPI void _attemptMoveToTargetPosition(::Actor const &target, bool canReachTarget, float targetDistanceSq)
MCAPI MeleeAttackBaseGoal(::Mob &mob, ::std::string name, ::GoalId const &goalId)
MCAPI int $getAttackTicksResetValue() const
static MCAPI void ** $vftable()
MCAPI void * $ctor(::Mob &mob, ::std::string name, ::GoalId const &goalId)
MCAPI::NavigationComponent * _getNavigationComponent() const
MCAPI void $start()
MCAPI void $dtor()
MCAPI void _attemptAttackTarget(::Actor &target, bool canReachTarget, bool hasLineOfSight)
MCAPI::Mob & _getNavigatingMob() const
MCAPI bool $canContinueToUse()
MCAPI bool _targetPositionPutsMobInSun()
MCAPI void $stop()
Definition Mob.h:58
Definition NavigationComponent.h:18
Definition Path.h:16
Definition GoalId.h:5
Definition MeleeAttackBaseGoal.h:30
Definition MeleeAttackBaseGoalDefinition.h:15