Payback 0.0.1
CK Graduation Project
로딩중...
검색중...
일치하는것 없음
UWeaponLoadoutComponent 클래스 참조

#include <WeaponLoadoutComponent.h>

UWeaponLoadoutComponent에 대한 상속 다이어그램 :
Inheritance graph
UWeaponLoadoutComponent에 대한 협력 다이어그램:
Collaboration graph

Public 멤버 함수

 UWeaponLoadoutComponent ()
 
bool EquipWeapon (const FGameplayTag &WeaponTag)
 
bool SwapWeapon (const FGameplayTag &WeaponTag)
 
void UnequipCurrent ()
 
void ResetSkillCooldowns ()
 
UAudioEmitterComponent * GetWeaponAudioTagComponent ()
 
FORCEINLINE FGameplayTag GetCurrentWeaponTag () const
 
FORCEINLINE UWeaponDefinition * GetCurrentDefinition () const
 

Public 속성

FOnWeaponChanged OnWeaponChanged
 

Protected 멤버 함수

virtual void BeginPlay () override
 
virtual void EndPlay (const EEndPlayReason::Type EndPlayReason) override
 

Protected 속성

TArray< TObjectPtr< UWeaponDefinition > > WeaponDefinitions
 

Private 멤버 함수

bool ApplyWeapon (const FGameplayTag &WeaponTag, bool bActivateSwapInSkill)
 
bool ApplyStatBaseline (UWeaponDefinition *Definition)
 
UWeaponDefinition * FindWeaponDefinition (const FGameplayTag &WeaponTag) const
 
void GrantAbilitiesFromDefinition (UWeaponDefinition *Definition)
 
void ApplyVisualData (UWeaponDefinition *Definition)
 
void ApplyAudioData (UWeaponDefinition *Definition)
 
void ClearAudioData ()
 
void ActivateSwapInSkill (UWeaponDefinition *Definition, FGameplayAbilitySpecHandle SwapInSkillHandle)
 
UAbilitySystemComponent * GetASC () const
 
FGameplayAbilitySpecHandle GrantSwapInSkill (UWeaponDefinition *Definition)
 

Private 속성

TObjectPtr< UWeaponDefinition > CurrentDefinition = nullptr
 
FGameplayTag CurrentWeaponTag
 
FGrantedHandles GrantedHandles
 
TWeakObjectPtr< UAbilitySystemComponent > CachedASC
 
TWeakObjectPtr< UAudioEmitterComponent > CachedWeaponAudioTagComponent
 

생성자 & 소멸자 문서화

◆ UWeaponLoadoutComponent()

UWeaponLoadoutComponent::UWeaponLoadoutComponent ( )
24{
25 PrimaryComponentTick.bCanEverTick = false;
26
27}

멤버 함수 문서화

◆ ActivateSwapInSkill()

void UWeaponLoadoutComponent::ActivateSwapInSkill ( UWeaponDefinition *  Definition,
FGameplayAbilitySpecHandle  SwapInSkillHandle 
)
private
320{
321 if (Definition == nullptr || SwapInSkillHandle.IsValid() == false)
322 {
323 return;
324 }
325
326 if (UAbilitySystemComponent* ASC = GetASC())
327 {
328 if (ASC->TryActivateAbility(SwapInSkillHandle) == false)
329 {
330 LOG_WARNING(LogCKAbility, "SwapInSkill 발동 실패: %s", *Definition->WeaponTag.ToString());
331 }
332 }
333}
#define LOG_WARNING(Category, Format,...)
Definition CK_UE.h:40
FGameplayTag WeaponTag
Definition WeaponDefinition.h:86
UAbilitySystemComponent * GetASC() const
Definition WeaponLoadoutComponent.cpp:388

다음을 참조함 : GetASC(), LOG_WARNING, UWeaponDefinition::WeaponTag.

다음에 의해서 참조됨 : ApplyWeapon().

이 함수 내부에서 호출하는 함수들에 대한 그래프입니다.:
이 함수를 호출하는 함수들에 대한 그래프입니다.:

◆ ApplyAudioData()

void UWeaponLoadoutComponent::ApplyAudioData ( UWeaponDefinition *  Definition)
private
336{
338 if (AudioTagComponent == nullptr)
339 {
340 return;
341 }
342
343 if (Definition == nullptr || Definition->AudioData == nullptr)
344 {
345 AudioTagComponent->SetAudioData(nullptr);
346 return;
347 }
348
349 AudioTagComponent->SetAudioData(Definition->AudioData);
350}
Definition AudioEmitterComponent.h:16
void SetAudioData(UAudioData *InAudioData)
Definition AudioEmitterComponent.cpp:17
TObjectPtr< UAudioData > AudioData
Definition WeaponDefinition.h:97
UAudioEmitterComponent * GetWeaponAudioTagComponent()
Definition WeaponLoadoutComponent.cpp:360

다음을 참조함 : UWeaponDefinition::AudioData, GetWeaponAudioTagComponent(), UAudioEmitterComponent::SetAudioData().

다음에 의해서 참조됨 : ApplyWeapon().

이 함수 내부에서 호출하는 함수들에 대한 그래프입니다.:
이 함수를 호출하는 함수들에 대한 그래프입니다.:

◆ ApplyStatBaseline()

bool UWeaponLoadoutComponent::ApplyStatBaseline ( UWeaponDefinition *  Definition)
private
157{
158 if (Definition == nullptr || Definition->AbilityData.StatBaselineEffect == nullptr)
159 {
160 return false;
161 }
162
163 UAbilitySystemComponent* ASC = GetASC();
164 if (ASC == nullptr)
165 {
166 return false;
167 }
168
169 FGameplayEffectContextHandle Ctx = ASC->MakeEffectContext();
170 Ctx.AddSourceObject(Definition);
171
172 const FGameplayEffectSpecHandle SpecHandle = ASC->MakeOutgoingSpec(Definition->AbilityData.StatBaselineEffect, /*Level=*/ 1.f, Ctx);
173
174 if (SpecHandle.IsValid() == false || SpecHandle.Data.IsValid() == false)
175 {
176 return false;
177 }
178
179 const FWeaponTableRow* Row = nullptr;
180 if (Definition->WeaponStatRow.IsNull() == false)
181 {
182 Row = Definition->WeaponStatRow.GetRow<FWeaponTableRow>(TEXT("WeaponStatContext"));
183 if (Row == nullptr)
184 {
185 LOG_WARNING(LogCKAbility, "WeaponStatRow 조회 실패: %s", *Definition->WeaponStatRow.RowName.ToString());
186 }
187 }
188
189 SpecHandle.Data->SetSetByCallerMagnitude(TAG_DATA_STAT_ATTACK, Row ? Row->Weapon_Attack : 0.0f);
190 SpecHandle.Data->SetSetByCallerMagnitude(TAG_DATA_STAT_ATTACK_SPEED, Row ? Row->Weapon_Attack_Speed : 0.0f);
191 SpecHandle.Data->SetSetByCallerMagnitude(TAG_DATA_STAT_CRITICAL, Row ? Row->Weapon_Critical : 0.0f);
192 SpecHandle.Data->SetSetByCallerMagnitude(TAG_DATA_STAT_CRITICAL_DMG, Row ? Row->Weapon_Critical_Dmg : 0.0f);
193
194 const FActiveGameplayEffectHandle Handle = GrantedHandles.ApplyEffectSpecToSelf(ASC, *SpecHandle.Data.Get());
195
196 return Handle.IsValid();
197}
FDataTableRowHandle WeaponStatRow
Definition WeaponDefinition.h:100
FWeaponAbilityData AbilityData
Definition WeaponDefinition.h:94
FGrantedHandles GrantedHandles
Definition WeaponLoadoutComponent.h:84
FActiveGameplayEffectHandle ApplyEffectSpecToSelf(UAbilitySystemComponent *ASC, const FGameplayEffectSpec &Spec)
Definition GrantedHandles.cpp:22
TSubclassOf< UGameplayEffect > StatBaselineEffect
Definition WeaponDefinition.h:49
Definition WeaponTable.h:12
float Weapon_Critical_Dmg
Definition WeaponTable.h:32
float Weapon_Attack
Definition WeaponTable.h:23
float Weapon_Critical
Definition WeaponTable.h:29
float Weapon_Attack_Speed
Definition WeaponTable.h:26

다음을 참조함 : UWeaponDefinition::AbilityData, FGrantedHandles::ApplyEffectSpecToSelf(), GetASC(), GrantedHandles, LOG_WARNING, FWeaponAbilityData::StatBaselineEffect, FWeaponTableRow::Weapon_Attack, FWeaponTableRow::Weapon_Attack_Speed, FWeaponTableRow::Weapon_Critical, FWeaponTableRow::Weapon_Critical_Dmg, UWeaponDefinition::WeaponStatRow.

다음에 의해서 참조됨 : ApplyWeapon().

이 함수 내부에서 호출하는 함수들에 대한 그래프입니다.:
이 함수를 호출하는 함수들에 대한 그래프입니다.:

◆ ApplyVisualData()

void UWeaponLoadoutComponent::ApplyVisualData ( UWeaponDefinition *  Definition)
private
275{
276 if (Definition == nullptr)
277 {
278 return;
279 }
280
281 AMainPlayerCharacter* Character = Cast<AMainPlayerCharacter>(GetOwner());
282 if (Character == nullptr)
283 {
284 return;
285 }
286
287 USkeletalMeshComponent* MeshComp = Character->GetMesh();
288 if (MeshComp == nullptr)
289 {
290 return;
291 }
292
293 if (Definition->VisualData.WeaponAnimLayerClass != nullptr)
294 {
295 MeshComp->LinkAnimClassLayers(Definition->VisualData.WeaponAnimLayerClass.Get());
296 }
297 else
298 {
299 MeshComp->LinkAnimClassLayers(nullptr);
300 }
301
302 if (USkeletalMeshComponent* WeaponComp = Character->GetWeaponMeshComponent())
303 {
304 if (Definition->VisualData.WeaponMesh != nullptr)
305 {
306 WeaponComp->SetSkeletalMeshAsset(Definition->VisualData.WeaponMesh.Get());
307 WeaponComp->AttachToComponent(MeshComp, FAttachmentTransformRules::SnapToTargetNotIncludingScale, Definition->VisualData.WeaponSocketName);
308 WeaponComp->SetHiddenInGame(false);
309 WeaponComp->SetRelativeTransform(Definition->VisualData.WeaponOffset);
310 }
311 else
312 {
313 WeaponComp->SetSkeletalMeshAsset(nullptr);
314 WeaponComp->SetHiddenInGame(true);
315 }
316 }
317}
Definition MainPlayerCharacter.h:43
FORCEINLINE USkeletalMeshComponent * GetWeaponMeshComponent() const
Definition MainPlayerCharacter.h:108
FWeaponVisualData VisualData
Definition WeaponDefinition.h:90
TObjectPtr< USkeletalMesh > WeaponMesh
Definition WeaponDefinition.h:32
FName WeaponSocketName
Definition WeaponDefinition.h:36
TSubclassOf< UAnimInstance > WeaponAnimLayerClass
Definition WeaponDefinition.h:28
FTransform WeaponOffset
Definition WeaponDefinition.h:39

다음을 참조함 : AMainPlayerCharacter::GetWeaponMeshComponent(), UWeaponDefinition::VisualData, FWeaponVisualData::WeaponAnimLayerClass, FWeaponVisualData::WeaponMesh, FWeaponVisualData::WeaponOffset, FWeaponVisualData::WeaponSocketName.

다음에 의해서 참조됨 : ApplyWeapon().

이 함수 내부에서 호출하는 함수들에 대한 그래프입니다.:
이 함수를 호출하는 함수들에 대한 그래프입니다.:

◆ ApplyWeapon()

bool UWeaponLoadoutComponent::ApplyWeapon ( const FGameplayTag &  WeaponTag,
bool  bActivateSwapInSkill 
)
private
59{
60 if (WeaponTag.IsValid() == false)
61 {
62 LOG_WARNING(LogCKAbility, "유효하지 않은 WeaponTag 로 EquipWeapon 호출");
63 return false;
64 }
65
66 // 동일 무기 재장착은 빠른 리턴
67 if (WeaponTag == CurrentWeaponTag)
68 {
69 return true;
70 }
71
72 UAbilitySystemComponent* ASC = GetASC();
73 if (ASC == nullptr)
74 {
75 LOG_ERROR(LogCKAbility, "ASC 를 찾을 수 없어 EquipWeapon 중단");
76 return false;
77 }
78
79 UWeaponDefinition* NewDef = FindWeaponDefinition(WeaponTag);
80 if (NewDef == nullptr)
81 {
82 LOG_ERROR(LogCKAbility, "등록되지 않은 WeaponDefinition입니다: %s", *WeaponTag.ToString());
83 return false;
84 }
85
86 const FGameplayTag PreviousTag = CurrentWeaponTag;
87
88 // 기존 무기 해제 (GrantedHandles 일괄 회수 + 쿨다운 리셋).
90
91 // 새 무기 적용.
92 CurrentDefinition = NewDef;
93 CurrentWeaponTag = WeaponTag;
94
95 // GE 모디파이어의 TargetTags 조건은 스펙 생성 시점의 태그를 캡처한다.
96 // 이후 적용될 GE 들이 무기를 인식하려면 여기서 먼저 태그를 올려야 한다.
97 ASC->AddLooseGameplayTag(CurrentWeaponTag);
98
99 if (ApplyStatBaseline(NewDef) == false)
100 {
101 LOG_WARNING(LogCKAbility, "Baseline GE 적용 실패 - 스탯 미반영 상태로 진행");
102 }
103
105 const FGameplayAbilitySpecHandle SwapInSkillHandle = GrantSwapInSkill(NewDef);
106 ApplyAudioData(NewDef);
107 ApplyVisualData(NewDef);
108
109 if (bActivateSwapInSkill)
110 {
111 ActivateSwapInSkill(NewDef, SwapInSkillHandle);
112 }
113
114 LOG_INFO(LogCKAbility, "무기 적용 완료: %s -> %s", *PreviousTag.ToString(), *CurrentWeaponTag.ToString());
115
116 OnWeaponChanged.Broadcast(PreviousTag, CurrentWeaponTag);
117
118 return true;
119}
#define LOG_ERROR(Category, Format,...)
Definition CK_UE.h:41
#define LOG_INFO(Category, Format,...)
Definition CK_UE.h:39
Definition WeaponDefinition.h:77
void ApplyAudioData(UWeaponDefinition *Definition)
Definition WeaponLoadoutComponent.cpp:335
void ActivateSwapInSkill(UWeaponDefinition *Definition, FGameplayAbilitySpecHandle SwapInSkillHandle)
Definition WeaponLoadoutComponent.cpp:319
UWeaponDefinition * FindWeaponDefinition(const FGameplayTag &WeaponTag) const
Definition WeaponLoadoutComponent.cpp:122
FGameplayAbilitySpecHandle GrantSwapInSkill(UWeaponDefinition *Definition)
Definition WeaponLoadoutComponent.cpp:236
bool ApplyStatBaseline(UWeaponDefinition *Definition)
Definition WeaponLoadoutComponent.cpp:156
void UnequipCurrent()
Definition WeaponLoadoutComponent.cpp:135
TObjectPtr< UWeaponDefinition > CurrentDefinition
Definition WeaponLoadoutComponent.h:76
FGameplayTag CurrentWeaponTag
Definition WeaponLoadoutComponent.h:79
FOnWeaponChanged OnWeaponChanged
Definition WeaponLoadoutComponent.h:36
void ApplyVisualData(UWeaponDefinition *Definition)
Definition WeaponLoadoutComponent.cpp:274
void GrantAbilitiesFromDefinition(UWeaponDefinition *Definition)
Definition WeaponLoadoutComponent.cpp:200

다음을 참조함 : ActivateSwapInSkill(), ApplyAudioData(), ApplyStatBaseline(), ApplyVisualData(), CurrentDefinition, CurrentWeaponTag, FindWeaponDefinition(), GetASC(), GrantAbilitiesFromDefinition(), GrantSwapInSkill(), LOG_ERROR, LOG_INFO, LOG_WARNING, OnWeaponChanged, UnequipCurrent().

다음에 의해서 참조됨 : EquipWeapon(), SwapWeapon().

이 함수 내부에서 호출하는 함수들에 대한 그래프입니다.:
이 함수를 호출하는 함수들에 대한 그래프입니다.:

◆ BeginPlay()

void UWeaponLoadoutComponent::BeginPlay ( )
overrideprotectedvirtual
30{
31 Super::BeginPlay();
32
33 // ASC 가 BeginPlay 시점에 준비되지 않은 예외처리
34 CachedASC = GetASC();
36}
TWeakObjectPtr< UAbilitySystemComponent > CachedASC
Definition WeaponLoadoutComponent.h:87
TWeakObjectPtr< UAudioEmitterComponent > CachedWeaponAudioTagComponent
Definition WeaponLoadoutComponent.h:90

다음을 참조함 : CachedASC, CachedWeaponAudioTagComponent, GetASC(), GetWeaponAudioTagComponent().

이 함수 내부에서 호출하는 함수들에 대한 그래프입니다.:

◆ ClearAudioData()

void UWeaponLoadoutComponent::ClearAudioData ( )
private
353{
354 if (UAudioEmitterComponent* AudioTagComponent = GetWeaponAudioTagComponent())
355 {
356 AudioTagComponent->SetAudioData(nullptr);
357 }
358}

다음을 참조함 : GetWeaponAudioTagComponent().

다음에 의해서 참조됨 : UnequipCurrent().

이 함수 내부에서 호출하는 함수들에 대한 그래프입니다.:
이 함수를 호출하는 함수들에 대한 그래프입니다.:

◆ EndPlay()

void UWeaponLoadoutComponent::EndPlay ( const EEndPlayReason::Type  EndPlayReason)
overrideprotectedvirtual
39{
40 // 풀에 회수되는 Pawn(IObjectPoolingInterface) 대비 명시적 정리.
42
43 Super::EndPlay(EndPlayReason);
44}

다음을 참조함 : UnequipCurrent().

이 함수 내부에서 호출하는 함수들에 대한 그래프입니다.:

◆ EquipWeapon()

bool UWeaponLoadoutComponent::EquipWeapon ( const FGameplayTag &  WeaponTag)
47{
48 return ApplyWeapon(WeaponTag, false);
49}
bool ApplyWeapon(const FGameplayTag &WeaponTag, bool bActivateSwapInSkill)
Definition WeaponLoadoutComponent.cpp:58

다음을 참조함 : ApplyWeapon().

다음에 의해서 참조됨 : UPlayerManagementSubsystem::ApplyWeapon().

이 함수 내부에서 호출하는 함수들에 대한 그래프입니다.:
이 함수를 호출하는 함수들에 대한 그래프입니다.:

◆ FindWeaponDefinition()

UWeaponDefinition * UWeaponLoadoutComponent::FindWeaponDefinition ( const FGameplayTag &  WeaponTag) const
private
123{
124 for (UWeaponDefinition* Definition : WeaponDefinitions)
125 {
126 if (Definition && Definition->WeaponTag == WeaponTag)
127 {
128 return Definition;
129 }
130 }
131
132 return nullptr;
133}
TArray< TObjectPtr< UWeaponDefinition > > WeaponDefinitions
Definition WeaponLoadoutComponent.h:54

다음을 참조함 : WeaponDefinitions.

다음에 의해서 참조됨 : ApplyWeapon().

이 함수를 호출하는 함수들에 대한 그래프입니다.:

◆ GetASC()

UAbilitySystemComponent * UWeaponLoadoutComponent::GetASC ( ) const
private
389{
390 if (CachedASC.IsValid())
391 {
392 return CachedASC.Get();
393 }
394
395 if (IAbilitySystemInterface* AsInterface = Cast<IAbilitySystemInterface>(GetOwner()))
396 {
397 return AsInterface->GetAbilitySystemComponent();
398 }
399
400 return nullptr;
401}

다음을 참조함 : CachedASC.

다음에 의해서 참조됨 : ActivateSwapInSkill(), ApplyStatBaseline(), ApplyWeapon(), BeginPlay(), GrantAbilitiesFromDefinition(), GrantSwapInSkill(), ResetSkillCooldowns(), UnequipCurrent().

이 함수를 호출하는 함수들에 대한 그래프입니다.:

◆ GetCurrentDefinition()

FORCEINLINE UWeaponDefinition * UWeaponLoadoutComponent::GetCurrentDefinition ( ) const
inline

◆ GetCurrentWeaponTag()

FORCEINLINE FGameplayTag UWeaponLoadoutComponent::GetCurrentWeaponTag ( ) const
inline
40 {
41 return CurrentWeaponTag;
42 }

◆ GetWeaponAudioTagComponent()

UAudioEmitterComponent * UWeaponLoadoutComponent::GetWeaponAudioTagComponent ( )
361{
362 if (CachedWeaponAudioTagComponent.IsValid())
363 {
365 }
366
367 AActor* OwnerActor = GetOwner();
368 if (OwnerActor == nullptr)
369 {
370 return nullptr;
371 }
372
373 TArray<UAudioEmitterComponent*> AudioTagComponents;
374 OwnerActor->GetComponents<UAudioEmitterComponent>(AudioTagComponents);
375
376 for (UAudioEmitterComponent* AudioTagComponent : AudioTagComponents)
377 {
378 if (AudioTagComponent && AudioTagComponent->ComponentHasTag(WeaponAudioTagComponentTag))
379 {
380 CachedWeaponAudioTagComponent = AudioTagComponent;
381 return AudioTagComponent;
382 }
383 }
384
385 return nullptr;
386}

다음을 참조함 : CachedWeaponAudioTagComponent.

다음에 의해서 참조됨 : ApplyAudioData(), BeginPlay(), ClearAudioData().

이 함수를 호출하는 함수들에 대한 그래프입니다.:

◆ GrantAbilitiesFromDefinition()

void UWeaponLoadoutComponent::GrantAbilitiesFromDefinition ( UWeaponDefinition *  Definition)
private
201{
202 if (Definition == nullptr)
203 {
204 return;
205 }
206
207 UAbilitySystemComponent* ASC = GetASC();
208 if (ASC == nullptr)
209 {
210 return;
211 }
212
214
215 for (const TPair<FGameplayTag, TSubclassOf<UGameplayAbility>>& Pair : Definition->AbilityData.InputAbilityMap)
216 {
217 const FGameplayTag& InputTag = Pair.Key;
218 const TSubclassOf<UGameplayAbility>& AbilityClass = Pair.Value;
219
220 if (InputTag.IsValid() == false || AbilityClass == nullptr)
221 {
222 LOG_WARNING(LogCKAbility, "InputAbilityMap 잘못된 엔트리. 스킵.");
223 continue;
224 }
225
226 FGameplayAbilitySpec Spec(AbilityClass, /*Level=*/ 1, /*InputID=*/ INDEX_NONE, /*SourceObject=*/ Definition);
227
228 // InputTag 는 DynamicAbilityTags 에 저장해 입력 라우터가 조회할 수 있도록 한다.
229 Spec.GetDynamicSpecSourceTags().AddTag(InputTag);
230
231 GrantedHandles.GiveAbility(ASC, Spec);
232 }
233}
TArray< FGameplayAbilitySpecHandle > AbilitySpecHandles
Definition GrantedHandles.h:29
FGameplayAbilitySpecHandle GiveAbility(UAbilitySystemComponent *ASC, const FGameplayAbilitySpec &Spec)
Definition GrantedHandles.cpp:7
TMap< FGameplayTag, TSubclassOf< UGA_Base > > InputAbilityMap
Definition WeaponDefinition.h:52

다음을 참조함 : UWeaponDefinition::AbilityData, FGrantedHandles::AbilitySpecHandles, GetASC(), FGrantedHandles::GiveAbility(), GrantedHandles, FWeaponAbilityData::InputAbilityMap, LOG_WARNING.

다음에 의해서 참조됨 : ApplyWeapon().

이 함수 내부에서 호출하는 함수들에 대한 그래프입니다.:
이 함수를 호출하는 함수들에 대한 그래프입니다.:

◆ GrantSwapInSkill()

FGameplayAbilitySpecHandle UWeaponLoadoutComponent::GrantSwapInSkill ( UWeaponDefinition *  Definition)
private
237{
238 if (Definition == nullptr || Definition->AbilityData.SwapInSkill == nullptr)
239 {
240 return FGameplayAbilitySpecHandle();
241 }
242
243 UAbilitySystemComponent* ASC = GetASC();
244 if (ASC == nullptr)
245 {
246 return FGameplayAbilitySpecHandle();
247 }
248
249 FGameplayAbilitySpec Spec(Definition->AbilityData.SwapInSkill, 1, INDEX_NONE, Definition);
250 return GrantedHandles.GiveAbility(ASC, Spec);
251}
TSubclassOf< UGA_Base > SwapInSkill
Definition WeaponDefinition.h:55

다음을 참조함 : UWeaponDefinition::AbilityData, GetASC(), FGrantedHandles::GiveAbility(), GrantedHandles, FWeaponAbilityData::SwapInSkill.

다음에 의해서 참조됨 : ApplyWeapon().

이 함수 내부에서 호출하는 함수들에 대한 그래프입니다.:
이 함수를 호출하는 함수들에 대한 그래프입니다.:

◆ ResetSkillCooldowns()

void UWeaponLoadoutComponent::ResetSkillCooldowns ( )
255{
256 UAbilitySystemComponent* ASC = GetASC();
257 if (ASC == nullptr)
258 {
259 return;
260 }
261
262 const FGameplayTag CooldownRoot = FGameplayTag::RequestGameplayTag(TEXT("Cooldown.Skill"), /*ErrorIfNotFound=*/ false);
263 if (CooldownRoot.IsValid() == false)
264 {
265 return;
266 }
267
268 FGameplayTagContainer CooldownTags;
269 CooldownTags.AddTag(CooldownRoot);
270 ASC->RemoveActiveEffectsWithGrantedTags(CooldownTags);
271}

다음을 참조함 : GetASC().

다음에 의해서 참조됨 : UnequipCurrent().

이 함수 내부에서 호출하는 함수들에 대한 그래프입니다.:
이 함수를 호출하는 함수들에 대한 그래프입니다.:

◆ SwapWeapon()

bool UWeaponLoadoutComponent::SwapWeapon ( const FGameplayTag &  WeaponTag)
53{
54 return ApplyWeapon(WeaponTag, true);
55}

다음을 참조함 : ApplyWeapon().

다음에 의해서 참조됨 : UPlayerManagementSubsystem::ApplyWeapon().

이 함수 내부에서 호출하는 함수들에 대한 그래프입니다.:
이 함수를 호출하는 함수들에 대한 그래프입니다.:

◆ UnequipCurrent()

void UWeaponLoadoutComponent::UnequipCurrent ( )
136{
137 UAbilitySystemComponent* ASC = GetASC();
138
139 if (ASC && CurrentWeaponTag.IsValid())
140 {
141 ASC->RemoveLooseGameplayTag(CurrentWeaponTag);
142 }
143
144 // 부여한 어빌리티/GE 일괄 회수.
146
147 // 정책: 잔여 쿨다운 리셋. (자기가 부여한 핸들과는 별도의 책임)
150
151 CurrentDefinition = nullptr;
152 CurrentWeaponTag = FGameplayTag::EmptyTag;
153}
void ResetSkillCooldowns()
Definition WeaponLoadoutComponent.cpp:254
void ClearAudioData()
Definition WeaponLoadoutComponent.cpp:352
void TakeFromAbilitySystem(UAbilitySystemComponent *ASC)
Definition GrantedHandles.cpp:37

다음을 참조함 : ClearAudioData(), CurrentDefinition, CurrentWeaponTag, GetASC(), GrantedHandles, ResetSkillCooldowns(), FGrantedHandles::TakeFromAbilitySystem().

다음에 의해서 참조됨 : ApplyWeapon(), EndPlay().

이 함수 내부에서 호출하는 함수들에 대한 그래프입니다.:
이 함수를 호출하는 함수들에 대한 그래프입니다.:

멤버 데이터 문서화

◆ CachedASC

TWeakObjectPtr<UAbilitySystemComponent> UWeaponLoadoutComponent::CachedASC
private

다음에 의해서 참조됨 : BeginPlay(), GetASC().

◆ CachedWeaponAudioTagComponent

TWeakObjectPtr<UAudioEmitterComponent> UWeaponLoadoutComponent::CachedWeaponAudioTagComponent
private

다음에 의해서 참조됨 : BeginPlay(), GetWeaponAudioTagComponent().

◆ CurrentDefinition

TObjectPtr<UWeaponDefinition> UWeaponLoadoutComponent::CurrentDefinition = nullptr
private

다음에 의해서 참조됨 : ApplyWeapon(), UnequipCurrent().

◆ CurrentWeaponTag

FGameplayTag UWeaponLoadoutComponent::CurrentWeaponTag
private

다음에 의해서 참조됨 : ApplyWeapon(), UnequipCurrent().

◆ GrantedHandles

FGrantedHandles UWeaponLoadoutComponent::GrantedHandles
private

◆ OnWeaponChanged

FOnWeaponChanged UWeaponLoadoutComponent::OnWeaponChanged

다음에 의해서 참조됨 : ApplyWeapon(), USituationSubsystem::EnsureWeaponBinding().

◆ WeaponDefinitions

TArray<TObjectPtr<UWeaponDefinition> > UWeaponLoadoutComponent::WeaponDefinitions
protected

다음에 의해서 참조됨 : FindWeaponDefinition().


이 클래스에 대한 문서화 페이지는 다음의 파일들로부터 생성되었습니다.: