载入中...
搜索中...
未找到
CombatTarget.h
浏览该文件的文档.
1#pragma once
2#include "common/Export.h"
3
6#include "common/Result.h"
7#include "common/SubjectRef.h"
8
9#include <cstdint>
10#include <map>
11#include <optional>
12#include <string>
13#include <vector>
14
15namespace eve::combat {
16
20 double score = 0.0;
21 double x = 0.0;
22 double y = 0.0;
23 double z = 0.0;
24};
25
29 std::optional<SubjectRef> target;
30 bool hardLock = false;
31};
32
40public:
42 [[nodiscard]] Result<void> registerOwner(SubjectRef owner);
44 [[nodiscard]] Result<void> unregisterOwner(SubjectRef owner);
46 [[nodiscard]] Result<CombatLockState> softLock(SubjectRef owner,
47 const std::vector<CombatTargetCandidate>& candidates);
49 [[nodiscard]] Result<CombatLockState> hardLock(SubjectRef owner, SubjectRef target);
51 [[nodiscard]] Result<CombatLockState> cycle(SubjectRef owner,
52 const std::vector<CombatTargetCandidate>& candidates);
54 [[nodiscard]] Result<CombatLockState> clear(SubjectRef owner);
56 [[nodiscard]] Result<void> forgetTarget(SubjectRef target);
58 [[nodiscard]] Result<CombatLockState> state(SubjectRef owner) const;
59
60private:
61 std::map<std::string, CombatLockState, std::less<>> locks_;
62};
63
64} // namespace eve::combat
LogicalId target
#define EVENGINE_API_BACKENDS
Definition Export.h:108
Move-only, checked operation results for the common layer.
Stable reference to a runtime gameplay subject.
Move-only operation result carrying either a value or Status.
Definition Result.h:155
Strong, domain-neutral reference to a runtime subject.
Definition SubjectRef.h:26
Owner-thread lock-on authority.
Owning lock-on state for one fighter.
std::optional< SubjectRef > target
Candidate scored by an external sensing/query adapter.