5#include "CoreMinimal.h"
7#include "GameFramework/GameState.h"
8#include "GameFramework/PlayerState.h"
20#include "ProjectXPlayerState.generated.h"
24class UGlobalAmmoComponent;
32class UTelekenesisComponent;
35class UAfflictionComponent;
40 GENERATED_USTRUCT_BODY()
46 ProjectileClass = NULL;
47 Origin = FVector_NetQuantize(0, 0, 0);
49 DamageModifier = 1.0f;
52 FAuthWeaponTicket(TSubclassOf<class UWeaponInstanceRanged> InWeapon, TSubclassOf<class AActor> InProjectileClass,
const FVector_NetQuantize InOrigin, int8 InNumUses,
float InDamageModifier)
55 ProjectileClass = InProjectileClass;
58 DamageModifier = InDamageModifier;
69 FVector_NetQuantize Origin = FVector_NetQuantize(0, 0, 0);
74 float DamageModifier = 1.0f;
80 GENERATED_USTRUCT_BODY()
92 PlayerClass = InPlayerClass;
102 float TimeUsed = 0.f;
109 return TimeUsed > Other.TimeUsed;
133USTRUCT(Blueprintable)
136 GENERATED_USTRUCT_BODY()
139 GraffitiMaterial = NULL;
144 UPROPERTY(BlueprintReadOnly)
145 UMaterialInstance* GraffitiMaterial = NULL;
146 UPROPERTY(BlueprintReadOnly)
147 UMaterialInstance* Border = NULL;
148 UPROPERTY(BlueprintReadOnly)
152USTRUCT(Blueprintable)
155 GENERATED_USTRUCT_BODY()
159 UPROPERTY(BlueprintReadOnly, Category =
"Message")
162 UPROPERTY(BlueprintReadOnly, Category = "Message")
165 UPROPERTY(BlueprintReadOnly, Category = "Message")
166 TWeakObjectPtr<AActor> SquadOrderActor =
nullptr;
170USTRUCT(Blueprintable)
173 GENERATED_USTRUCT_BODY()
176 UPROPERTY(BlueprintReadOnly, Category =
"Squad")
177 TWeakObjectPtr<AActor> SquadOrderActor =
nullptr;
179 UPROPERTY(BlueprintReadOnly, Category = "
Squad")
184 SquadOrderActor =
nullptr;
202 GENERATED_USTRUCT_BODY()
205 uint16 NumTimesKilledByPlayer = 0;
206 uint16 NumTimesKilledPlayer = 0;
239 GENERATED_UCLASS_BODY()
244 if (GetXP() != Other.
GetXP())
246 return GetXP() > Other.
GetXP();
251 return GetKills() > Other.
GetKills();
269 virtual void EndPlay(
const EEndPlayReason::Type EndPlayReason)
override;
270 virtual void BeginPlay()
override;
275 virtual void OverrideWith(APlayerState* PlayerState)
override;
276 virtual void CopyProperties(APlayerState* PlayerState)
override;
281 virtual APlayerState* GetOwnedPlayerState()
const override;
286 virtual void MatchEnded()
override;
291 std::string GetNakamaUserId()
const;
293 bool IsNakamaUserIdValid()
const;
296 int32 SetTeam(int32 NewTeam) override;
298 FORCEINLINE virtual int32 GetTeam()
const override {
return Team; }
300 UFUNCTION(BlueprintCallable, BlueprintAuthorityOnly, Category = PlayerState)
301 virtual void ModifyLevel(int32 Delta);
302 UFUNCTION(BlueprintCallable, BlueprintAuthorityOnly, Category = PlayerState)
303 virtual void ModifyKills(
AProjectXPlayerState* Killed, TSubclassOf<class UProjectXDamageType> DamageType);
304 UFUNCTION(BlueprintCallable, BlueprintAuthorityOnly, Category = PlayerState)
305 virtual void ModifyDeployablesDestructed(
ADeployable* DeployableDestructed, TSubclassOf<class UProjectXDamageType> DamageType);
306 UFUNCTION(BlueprintCallable, BlueprintAuthorityOnly, Category = PlayerState)
308 UFUNCTION(BlueprintCallable, BlueprintAuthorityOnly, Category = PlayerState)
309 virtual void ModifyAssists(int32 Delta, APlayerState* PlayerState,
float MaxHealth,
float Damage);
310 UFUNCTION(BlueprintCallable, BlueprintAuthorityOnly, Category = PlayerState)
311 virtual void ModifyTeamKills(int32 Delta);
312 UFUNCTION(BlueprintCallable, BlueprintAuthorityOnly, Category = PlayerState)
313 virtual void ModifyXP(
EXPEventType Type, APlayerState* TargetState, UObject* Object,
float Alpha = 1.0f,
const TSubclassOf<UExperienceEvent> ExpereienceEventOverride = NULL);
314 UFUNCTION(BlueprintCallable, BlueprintAuthorityOnly, Category = PlayerState)
315 virtual void ModifyUltimateCharge(int32 Delta);
317 UFUNCTION(BlueprintCallable, Category = PlayerState)
318 virtual void BroadcastReviveTimeReceived(
float ReviveStartTime);
319 void ModifyCurrency(int32 Delta);
320 UFUNCTION(BlueprintCallable, Category = PlayerState)
322 UFUNCTION(BlueprintCallable)
323 virtual bool GetIsSpawningOnReviveBeacon()
const;
324 UFUNCTION(
Server, Reliable)
326 UFUNCTION(Client, Reliable)
328 UFUNCTION(Client, Reliable)
329 virtual
void Client_RequestSpawnTarget();
330 UFUNCTION(BlueprintCallable, Category = PlayerState)
332 UFUNCTION(
Server, Reliable)
334 UFUNCTION(BlueprintCallable, Client, Reliable)
336 UFUNCTION(Client, Reliable)
339 virtual
bool IsValidMessage(const FString& Message, const
bool bDisplayErrors = false);
340 virtual FString FormatMessage(const FString& Message);
341 virtual FString FilterMatureLanaguage(const FString& SourceString);
342 virtual
void DecrementChatSpamMessageCount();
344 UFUNCTION(
Server, Reliable)
345 virtual
void Server_PickupItem(int32 PickUpID, AActor* OverlappedActor);
347 void SpawnWorldPickup(TSubclassOf<
APickup> PickupClass, const FVector SpawnLocation, const FVector ExpectedLandingPosition);
349 UFUNCTION(NetMulticast, Reliable)
352 UFUNCTION(NetMulticast, Reliable)
353 void MultiCast_DestroyPickup(int32 PickupID);
355 UFUNCTION(NetMulticast, Reliable)
356 void MultiCast_SpawnContextObject(const FVector_NetQuantize SpawnLocation,
AProjectXPlayerState* SendingPlayerState);
358 UFUNCTION(BlueprintPure, Category = PlayerState)
359 FORCEINLINE int32 GetUnpackedPing()
const {
return GetPing() * 4; }
360 UFUNCTION(BlueprintPure, Category = PlayerState)
361 FORCEINLINE FString GetPingString()
const {
return FString::FromInt(GetUnpackedPing()); }
363 UFUNCTION(BlueprintPure, Category = PlayerState)
364 FORCEINLINE int32 GetLevel()
const {
return Level; }
365 UFUNCTION(BlueprintPure, Category = PlayerState)
366 FORCEINLINE FString GetLevelString()
const {
return FString::FromInt(GetLevel()); }
368 UFUNCTION(BlueprintPure, Category = PlayerState)
370 UFUNCTION(BlueprintPure, Category = PlayerState)
371 FORCEINLINE FString GetEliminationsString()
const {
return FString::FromInt(GetEliminations()); }
372 UFUNCTION(BlueprintPure, Category = PlayerState)
373 FORCEINLINE int32 GetKills()
const {
return Kills; }
374 UFUNCTION(BlueprintPure, Category = PlayerState)
375 FORCEINLINE FString GetKillsString()
const {
return FString::FromInt(GetKills()); }
377 UFUNCTION(BlueprintPure, Category = PlayerState)
378 FORCEINLINE int32 GetDeaths()
const {
return Deaths; }
379 UFUNCTION(BlueprintPure, Category = PlayerState)
380 FORCEINLINE FString GetDeathsString()
const {
return FString::FromInt(GetDeaths()); }
382 UFUNCTION(BlueprintPure, Category = PlayerState)
383 FORCEINLINE int32 GetAssists()
const {
return Assists; }
384 UFUNCTION(BlueprintPure, Category = PlayerState)
385 FORCEINLINE FString GetAssistsString()
const {
return FString::FromInt(GetAssists()); }
387 UFUNCTION(BlueprintPure, Category = PlayerState)
388 FORCEINLINE int32 GetTeamKills()
const {
return TeamKills; }
389 UFUNCTION(BlueprintPure, Category = PlayerState)
390 FORCEINLINE FString GetTeamKillsString()
const {
return FString::FromInt(GetTeamKills()); }
391 UFUNCTION(BlueprintPure, Category = PlayerState)
392 FORCEINLINE
bool IsReady()
const {
return bReady;}
393 UFUNCTION(BlueprintPure, Category = PlayerState)
394 FORCEINLINE
float GetXP()
const {
return GameXP; }
397 UFUNCTION(BlueprintPure, Category = PlayerState)
398 FORCEINLINE
float GetGameXPFromMultiplier()
const {
return GameXPFromMultiplier; }
399 UFUNCTION(BlueprintPure, Category = PlayerState)
400 FORCEINLINE FString GetXPString()
const {
return FString::FromInt(int32(GetXP())); }
401 UFUNCTION(BlueprintPure, Category = PlayerState)
402 FORCEINLINE
bool IsMatchBonusAvailable()
const {
return bMatchBonusIsAvailable;}
403 UFUNCTION(BlueprintPure, Category = PlayerState)
404 FORCEINLINE
bool IsTeamChangeOnCoolDown()
const {
return !bCanChangeTeam; }
405 UFUNCTION(BlueprintPure, Category = PlayerState)
406 FORCEINLINE
int GetUltimateCharge()
const {
return UltimateCharge; }
407 UFUNCTION(BlueprintPure, Category = PlayerState)
408 FORCEINLINE FString GetUltimateChargeString()
const {
return FString::FromInt(UltimateCharge); }
409 UFUNCTION(BlueprintPure, Category = PlayerState)
410 FORCEINLINE
bool IsUltimateCharged()
const {
return UltimateCharge >= MaxUltimateCharge;}
411 UFUNCTION(BlueprintPure, Category = PlayerState)
412 FORCEINLINE
int GetMaxUltimateCharge()
const {
return MaxUltimateCharge;}
413 UFUNCTION(BlueprintPure, Category = PlayerState)
415 UFUNCTION(BlueprintPure, Category = PlayerState)
416 const FEquips& GetPlayerEquips()
const;
418 UFUNCTION(BlueprintPure, Category = PlayerState)
419 float GetExpMulitplier()
const{
return EXPMultiplier;}
424 UFUNCTION(BlueprintPure, Category = PlayerState)
425 bool IsLocalPlayerState()
const;
426 UFUNCTION(BlueprintPure, Category = PlayerState)
427 virtual FString GetPlayerID()
const;
428 UFUNCTION(BlueprintPure, Category = PlayerState)
430 UFUNCTION(BlueprintPure, Category = PlayerState)
431 UTexture2D* GetAvatarImage()
const {
return AvatarReference; }
432 UFUNCTION(BlueprintPure,Category = PlayerState)
433 UAnimMontage* GetTaunt(uint8 TauntNumber) {
return TauntMontages.Contains(TauntNumber) ? TauntMontages[TauntNumber] : NULL; }
436 virtual
bool CanRestartPlayer();
439 void OnStatsLoaded();
440 UFUNCTION(BlueprintCallable)
441 void MutePlayerText(APlayerState* Player,
bool bToggle);
443 UFUNCTION(BlueprintCallable, Category = PlayerState)
448 UFUNCTION(BlueprintCallable, Category = PlayerState)
449 float GetNextRespawnTime()
const {
return NextRespawnTime; }
451 UFUNCTION(BlueprintCallable, Category = PlayerState)
452 float GetTimeUntilRespawn()
const {
return (GetWorld() && GetWorld()->GetGameState()) ? FMath::Max(0.f, NextRespawnTime - GetWorld()->GetGameState()->GetServerWorldTimeSeconds()) : MAX_FLT; }
455 void SetNextRespawnTime(
float NewRespawnTime);
459 virtual
void DestroyInvalidDeployables(
bool bForce = false);
462 virtual
void UpdatePlayerPerkUsage(APawn* InPawn);
465 void OnEquipsLoaded(
bool bSuccess);
466 void LoadMatchBonusAvailable();
468 UFUNCTION(BlueprintCallable, Category = PlayerState)
470 UFUNCTION(BlueprintCallable, Category = PlayerState)
475 UFUNCTION(BlueprintCallable, Category = PlayerState)
476 FORCEINLINE UGlobalAmmoComponent* GetGlobalAmmoComponent()
const {
return GlobalAmmoComponent; }
479 virtual bool AddAuthenticatedTicket(
const int32 TicketID,
const FAuthWeaponTicket& Ticket);
481 virtual bool ConsumeAuthenticatedTicket(
const int32 TicketID, TSubclassOf<class UWeaponInstanceRanged>
Weapon, TSubclassOf<AProjectile>& ProjectileClass,
float& DamageModifier);
483 virtual void OnTicketExpired(
const int32 TicketID);
485 UFUNCTION(
Server, Reliable)
486 void Server_ProcessProjectileHit(const uint8 ShotID, const int32& ProjectileID, const FHitResult& HitResult, TSubclassOf<class
UWeaponInstanceRanged>
Weapon, const TArray<FVector_NetQuantize>& FlightPath, UTelekenesisComponent* TelekenesisComponent =
nullptr, const FRotator& CustomRotation = FRotator::ZeroRotator);
488 UFUNCTION(
Server, Reliable)
489 void Server_ProcessExplosiveProjectileHit(const int32& ProjectileID, const FHitResult& HitResult, TSubclassOf<class
UWeaponInstanceRanged>
Weapon, const TArray<FVector_NetQuantize>& FlightPath, const TArray<AActor*>& RadialDamagedActors);
490 static
float ValidateFlightPath(UObject* const WorldContextObject, const TArray<FVector_NetQuantize>& FlightPath, AActor* HitActor = NULL);
491 static
float GetFlightPathDistance(const TArray<FVector_NetQuantize>& FlightPath);
493 UFUNCTION(BlueprintCallable, Category = PlayerState)
496 UFUNCTION(BlueprintPure, Category = PlayerState, meta = (WorldContext = "WorldContextObject", CallableWithoutWorldContext))
497 static APlayerState* GetPlayerStateByName(const UObject* WorldContextObject, const FString& Name);
499 UFUNCTION(BlueprintPure, Category = PlayerState, meta = (WorldContext = "WorldContextObject", CallableWithoutWorldContext))
500 static
AProjectXPlayerState* GetPlayerStateByID(const UObject* WorldContextObject, const FString& ID);
503 UFUNCTION(BlueprintPure, Category = PlayerState, meta = (WorldContext = "WorldContextObject", CallableWithoutWorldContext))
504 static
AProjectXPlayerState* GetPlayerStateByPlayerID(const UObject* WorldContextObject, int32 ID);
505 UFUNCTION(BlueprintPure, Category = PlayerState, meta = (WorldContext = "WorldContextObject", CallableWithoutWorldContext))
506 static
AProjectXPlayerState* GetPlayerStateByNakamaPlayerID(const UObject* WorldContextObject, const FString& ID);
508 UFUNCTION(BlueprintPure, Category = ClassUsage)
510 UFUNCTION(BlueprintPure, Category = ClassUsage)
511 static
float GetTimeFromUsage(const
FPlayerClassUsage& ClassUsage) {
return ClassUsage.TimeUsed; }
512 UFUNCTION(BlueprintPure, Category = ClassUsage)
513 static int32 GetSpawnCountFromUsage(const
FPlayerClassUsage& ClassUsage) {
return ClassUsage.Spawned; }
514 UFUNCTION(BlueprintPure, Category =
"Base Control")
516 UFUNCTION(BlueprintPure, Category = "Base Control")
517 virtual
bool HasSpawnTarget() const;
518 UFUNCTION(BlueprintPure,Category = Loadouts)
519 bool HasLoadedCosmetics()
const {
return bLoadedCosmetics;}
521 UFUNCTION(BlueprintCallable,Category =
"Player")
522 bool GetKillExplosion(TSoftObjectPtr<UParticleSystem>& Particle, TSoftObjectPtr<USoundCue>& Sound);
526 virtual
void StartTeamChangeCoolDown();
528 UFUNCTION(BlueprintPure)
529 float GetTeamSwitchingCoolDownRemaining() const;
531 void SetAvatar(UTexture2D* NewAvatar);
532 UFUNCTION(BlueprintCallable)
533 void PlayTaunt(uint8 TauntID);
535 void OnItemEquipped(
ECosmeticType Type, const FString& ShortCode, const FString& EquipCode);
536 UFUNCTION(
Server,Reliable,WithValidation)
537 void Server_Reliable_UpdateSessionLockedCosmetics(uint16 CosmeticIDNumber);
539 virtual
void OnRep_UniqueId() override;
542 void UpdatePassiveUltimateCharge();
547 virtual void AddHealingDone(
const float HealedAmount);
548 virtual void AddRepairingDone(
const float RepairedAmount, UClass*
const TargetClassRepaired);
549 virtual void ActivateHealBufferCheck();
550 virtual void DeactivateHealBufferCheck();
551 virtual void ActivateRepairBufferCheck();
552 virtual void DeactivateRepairBufferCheck();
553 virtual void ToggleReviveBeacon(
bool bActivate);
555 virtual
void UltimateFinished();
558 virtual
void SetReadyStatus(
bool bNewReadyStatus);
559 void SetCanChangeTeams(
bool bNewCanChangeTeams);
560 void SpawnActorOnProjectileHit(const
AProjectile* HitProjectile, const FHitResult& HitResult, const FRotator& CustomRotator = FRotator::ZeroRotator);
562 void SetSquadLeader(
bool const InSquadLeader);
564 void SetCurrentSquadOrder(
FSquadOrder const InSquadOrder);
565 FVector GetReviveBeaconSpawnLocation() {
return ReviveBeaconSpawnLocation; }
566 UFUNCTION(BlueprintCallable, Category =
"Squad")
567 bool IsSquadLeader() {
return bSquadLeader; }
569 UFUNCTION(BlueprintCallable, Category =
"Squad")
575 UFUNCTION(BlueprintCallable, Category =
"Spawn")
576 void PlayAnnouncerSpawnSound();
580 UFUNCTION(Client, Unreliable)
581 void Client_PlayAnnouncer(const FString& VoiceToPlay);
583 UFUNCTION(
Server, Reliable, WithValidation)
584 void Server_UpdateStat(
EStatNames StatToUpdate, int32 Value, UObject* InObject , const
EStatUpdateBehaviour& StatUpdateBehaviour , int32 InDebugMapType , const FString& InDebugMapName );
586 UFUNCTION(Client, Reliable)
589 UFUNCTION(BlueprintCallable,
Server, Reliable, WithValidation, Category = "PlayerState")
592 UFUNCTION(Client, Reliable)
593 void Client_QueryAchievements();
595 float UltChargeMultiplier = 1.0f;
596 static TArray<FString> MessageHistory;
598 UPROPERTY(BlueprintAssignable, Category = PlayerState)
599 FPlayerStatsChangedSignature OnPlayerStatsChanged;
600 UPROPERTY(BlueprintAssignable, Category = PlayerState)
601 FXPChangedSignature OnXPChanged;
602 UPROPERTY(BlueprintAssignable, Category = PlayerState)
603 FPlayerCurrencyGainedSignature OnUltimateChargeChanged;
604 UPROPERTY(BlueprintAssignable, Category = PlayerState)
605 FXPChangedSignature OnTotalXPChanged;
606 UPROPERTY(BlueprintAssignable, Category = PlayerState)
607 FPlayerCurrencyGainedSignature OnCurrencyGained;
608 UPROPERTY(BlueprintAssignable, Category = PlayerState)
609 FScoreChangedSignature OnPlayerScoreChanged;
610 UPROPERTY(BlueprintAssignable, Category = PlayerState)
611 FPlayerLevelChangedSignature OnPlayerLevelChanged;
612 UPROPERTY(BlueprintAssignable, Category = PlayerState)
613 FExperienceEventSignature OnExpGained;
614 UPROPERTY(BlueprintAssignable, Category = PlayerState)
615 FClassEventSignature OnPlayerClassChanged;
616 UPROPERTY(BlueprintAssignable, Category = PlayerState)
617 FReviveTimerReceived OnReviveTimerReceived;
618 UPROPERTY(BlueprintAssignable, Category = PlayerState)
619 FPlayerStateObjectChangedSignature OnPlayerStateNextRespawnTimeChanged;
620 UPROPERTY(BlueprintAssignable)
621 FPlayerChangedTeamSignature OnPlayerChangedTeam;
622 UPROPERTY(BlueprintAssignable)
623 FSpawnTargetChangedSignature OnSpawnPointChanged;
624 UPROPERTY(BlueprintAssignable)
625 FTeamChangeCoolDownSignature OnTeamChangeCoolDownStart;
626 UPROPERTY(BlueprintAssignable)
627 FTeamChangeCoolDownSignature OnTeamChangeCoolDownFinish;
628 UPROPERTY(BlueprintAssignable)
629 FAvatarUpdatedSignature OnAvatarChangeDelegateEvent;
630 UPROPERTY(BlueprintAssignable, Category = PlayerState)
631 FCurrencyChangedSignature OnCurrencyUpdated;
632 UPROPERTY(BlueprintAssignable)
633 FMessageReceivedSignature OnMessageReceieved;
634 UPROPERTY(BlueprintAssignable)
635 FOnSquadLeaderChanged OnSquadLeaderChanged;
636 UPROPERTY(BlueprintAssignable)
637 FQuickChatMessageReceivedSignature OnQuickChatMessageReceived;
638 UPROPERTY(BlueprintAssignable)
639 FUltimateTriggeredSignature OnUltimateTriggered;
640 UPROPERTY(BlueprintAssignable)
641 FUltimateUsedSignature OnUltimateUsed;
642 UPROPERTY(BlueprintAssignable)
643 FOnCosmeticsUpdatedSignature OnCosmeticsUpdated;
644 UPROPERTY(BlueprintAssignable)
645 FPlayerKillSignature OnPlayerKillEvent;
646 UPROPERTY(BlueprintAssignable)
647 FOnEquipsUpdatedSignature OnEquipsUpdated;
648 UPROPERTY(BlueprintAssignable, Category = PlayerState)
649 FPlayerStatsChangedSignature OnGameXPFromMultiplierReceived;
650 UPROPERTY(BlueprintAssignable, Category = PlayerState)
651 FPLayerStateReadyChangedSignature OnPlayerStateReadyEvent;
652 UPROPERTY(BlueprintAssignable, Category = PlayerState)
653 FPlayerStatsChangedSignature OnPlayerProgressionRewardedEvent;
657 virtual
void OnRep_Kills(uint16 LastKills);
659 virtual
void OnRep_Deaths(uint16 LastDeaths);
661 virtual
void OnRep_Assists(uint16 LastAssists);
662 virtual
void OnRep_Score() override;
664 virtual
void OnRep_GameXP(uint16 LastXP);
666 virtual
void OnRep_Level(uint16 PreviousLevel);
668 virtual
void OnRep_UltimateCharge();
670 virtual
void OnRep_PlayerClass();
672 virtual
void OnRep_Team();
674 virtual
void OnRep_CanSwitchTeams();
676 virtual
void OnRep_SquadLeader();
678 virtual
void OnRep_NextRespawnTime();
680 virtual
void OnRep_Ready();
682 virtual
void OnPlayerStateRemovedFromGameState(APlayerState* RemovedPlayerState);
684 virtual
void DoHealBonusXPBufferCheck();
686 virtual
void DoRepairBonusXPBufferCheck();
687 UFUNCTION(BlueprintCallable)
688 void LoadGeneralCosmetics(
ECosmeticType Type, const
FEquips& LoadingEquips,const FString& EquipCode);
689 void LoadCosmeticMaterialAsset(TSoftObjectPtr<UMaterialInstance> AssetPointer, FDelegateMaterialInstanceSignature Callback);
690 void LoadPlayerPerk();
691 UFUNCTION(
Server, Reliable)
692 void Server_SendNakamaUserId(const FString& InNakamaUserId);
693 UFUNCTION(
Server, Reliable)
694 void Server_Reliable_ToggleReviveBeacon(
bool bActive);
695 UFUNCTION(
Server, Reliable)
696 void Server_Reliable_PlayTaunt(uint8 TauntID);
697 UFUNCTION(NetMulticast,UnReliable)
698 void Multicast_Unreliable_PlayTaunt(uint8 TauntID);
699 UFUNCTION(NetMulticast, Reliable)
700 void Multicast_Reliable_EquipCosmeticItem(
ECosmeticType Type, uint16 ShortCodeIndex, uint16 EquipCodeIndex);
701 UFUNCTION(
Server,Reliable)
702 void Server_Reliable_EquipItem(
ECosmeticType Type, uint16 ShortCodeIndex, uint16 EquipCodeIndex);
703 UFUNCTION(Client, Reliable)
704 void Client_Reliable_SendGameXPFromMultiplier(uint16 BonusEXP);
707 UPROPERTY(ReplicatedUsing = OnRep_Kills)
709 UPROPERTY(ReplicatedUsing = OnRep_Deaths)
711 UPROPERTY(ReplicatedUsing = OnRep_Assists)
713 UPROPERTY(ReplicatedUsing = OnRep_Level)
715 UPROPERTY(ReplicatedUsing = OnRep_GameXP)
717 UPROPERTY(ReplicatedUsing = OnRep_UltimateCharge)
718 uint16 UltimateCharge = 0;
719 UPROPERTY(ReplicatedUsing = OnRep_Team)
721 UPROPERTY(ReplicatedUsing = OnRep_CanSwitchTeams)
722 bool bCanChangeTeam = true;
723 UPROPERTY(ReplicatedUsing = OnRep_PlayerClass)
725 UPROPERTY(ReplicatedUsing = OnRep_SquadLeader)
726 bool bSquadLeader = false;
727 UPROPERTY(Replicated)
729 UPROPERTY(ReplicatedUsing = OnRep_NextRespawnTime)
730 float NextRespawnTime = 0.f;
731 UPROPERTY(ReplicatedUsing = OnRep_Ready)
733 UPROPERTY(BlueprintReadOnly, Replicated, meta = (AllowPrivateAccess = true))
734 bool bIsAdmin = false;
735 UPROPERTY(Replicated)
741 TWeakObjectPtr<AActor> SpawnTarget = NULL;
747 float SpawnWorldTime = -1.f;
753 UPROPERTY(EditDefaultsOnly)
755 TMap<uint8,UAnimMontage*> TauntMontages;
757 UTexture2D* AvatarReference = NULL;
759 UGlobalAmmoComponent* GlobalAmmoComponent = NULL;
762 UPROPERTY(EditDefaultsOnly, Category =
Team)
763 float TeamSwitchCoolDownDuration = 0.0f;
765 UPROPERTY(EditDefaultsOnly, Category = Ultimate)
766 int32 MaxUltimateCharge = 2;
768 UPROPERTY(EditDefaultsOnly, Category = "Bonus XP Events")
769 float HealBonusBufferCheckTime = 2.0f;
771 UPROPERTY(EditDefaultsOnly, Category = "Bonus XP Events")
772 float HealBonusThreshold = 2.0f;
774 UPROPERTY(EditDefaultsOnly, Category = "Bonus XP Events")
775 float RepairBonusBufferCheckTime = 2.0f;
777 UPROPERTY(EditDefaultsOnly, Category = "Bonus XP Events")
778 float RepairBonusThreshold = 300.f;
780 bool bUsedUltimate = false;
783 uint16 GameXPFromMultiplier = 0;
784 float EXPMultiplier = 1.0f;
785 bool bMatchBonusIsAvailable = false;
788 uint16 TeamKills = 0;
789 FTimerHandle TeamSwitchTimer;
790 FTimerHandle ChatSpamTimer;
791 uint8 ChatSpamMessageCount;
794 uint32 LastKillerID = 0;
796 float HealBonusXPBuffer = 0.f;
797 FTimerHandle HealBonusXPCheckTimerHandle;
799 TMap<UClass*,
float> RepairBonusXPBuffer = TMap<UClass*,
float>();
800 FTimerHandle RepairBonusXPCheckTimerHandle;
804 FString EnemyDeployableDestroyed = "VO_EquipementDestroyed_Enemy";
806 FString KilledLitEnemy = "VO_TheyWereLit";
810 FString QuadKill = "VO_QuadKill";
811 FString QuintKill = "VO_QuintKill";
813 FString BecomeNemesis = "VO_Nemesis";
814 FString AquiredNemesis = "VO_Nemesis_Recieve";
815 FString NemesisKilled = "VO_NemesisPayback";
816 FString PayBack = "VO_Payback";
819 FString Death = "VO_Death";
822 FString EngineerClassID = "Engineer";
826 FString SniperClassID = "Sniper";
829 FString Sniper = "VO_SpawnSniper";
831 FString Engineer = "VO_SpawnEngineer";
834 FString NakamaUserId = "b297c970-8355-4768-9f41-6b03ccd8a938";
836 bool bLoadedCosmetics = false;
837 FVector ReviveBeaconSpawnLocation = FVector::ZeroVector;
841#define COPY_PROPERTY(p, v) \
ECosmeticType
Definition: CosmeticAssetBase.h:21
EXPEventType
Definition: PlayerStats.h:13
EStatUpdateBehaviour
Definition: PlayerStats.h:142
EStatNames
Definition: PlayerStats.h:86
EAchievementData
Definition: ProjectXGameInstance.h:191
DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FScoreChangedSignature, float, Score)
DECLARE_DYNAMIC_MULTICAST_DELEGATE_TwoParams(FXPChangedSignature, float, XP, float, Delta)
DECLARE_DYNAMIC_MULTICAST_DELEGATE_ThreeParams(FExperienceEventSignature, const UExperienceEvent *, Event, const int, Value, const APlayerState *, B)
DECLARE_DYNAMIC_MULTICAST_DELEGATE(FPlayerLevelChangedSignature)
DECLARE_DELEGATE_OneParam(FDelegateMaterialInstanceSignature, UMaterialInstance *)
EMessageType
Definition: ProjectXPlayerState.h:118
Definition: Deployable.h:47
Definition: PickupReviveBeacon.h:48
Definition: ProjectXCharacter.h:128
Definition: ProjectXPlayerState.h:238
bool operator>(const AProjectXPlayerState &Other) const
Definition: ProjectXPlayerState.h:242
FORCEINLINE TWeakObjectPtr< ADecalActor > GetGraffiti() const
Definition: ProjectXPlayerState.h:422
FORCEINLINE int32 GetUnpackedPing() const
Definition: ProjectXPlayerState.h:359
FORCEINLINE int32 GetKills() const
Definition: ProjectXPlayerState.h:373
FORCEINLINE int32 GetDeaths() const
Definition: ProjectXPlayerState.h:378
const FGeneralEquips & GetGeneralEquips() const
Definition: ProjectXPlayerState.h:417
FORCEINLINE int32 GetEliminations() const
Definition: ProjectXPlayerState.h:369
void UpdateGraffiti(TWeakObjectPtr< ADecalActor > NewGraffiti)
Definition: ProjectXPlayerState.h:423
const FString & GetNakamaUserIdAsString() const
Definition: ProjectXPlayerState.h:292
virtual void SetExpMultiplier(float NewMultiplier)
Definition: ProjectXPlayerState.h:420
void SetMaxUltimateCharge(uint16 NewMaxUltimateCharage)
Definition: ProjectXPlayerState.h:421
FORCEINLINE float GetXP() const
Definition: ProjectXPlayerState.h:394
Definition: Projectile.h:18
Definition: OwnedInterface.h:20
Definition: ReactsToMatchEvents.h:16
Definition: SpawnTargetInterface.h:18
Definition: TeamInterface.h:26
Definition: BroadcastMessageExperienceEvent.h:12
Definition: CosmeticAssetBase.h:265
Definition: ExperienceEvent.h:18
Definition: PlayerProgressionManager.h:76
Definition: WeaponInstance.h:220
Definition: WeaponInstanceRanged.h:27
Definition: ProjectXPlayerState.h:39
FAuthWeaponTicket(TSubclassOf< class UWeaponInstanceRanged > InWeapon, TSubclassOf< class AActor > InProjectileClass, const FVector_NetQuantize InOrigin, int8 InNumUses, float InDamageModifier)
Definition: ProjectXPlayerState.h:52
FAuthWeaponTicket()
Definition: ProjectXPlayerState.h:43
Definition: CosmeticsManager.h:105
Definition: ProjectXPlayerState.h:135
Definition: ProjectXPlayerState.h:201
Definition: ProjectXPlayerState.h:79
FPlayerClassUsage()
Definition: ProjectXPlayerState.h:83
FPlayerClassUsage(TSubclassOf< AProjectXCharacter > InPlayerClass)
Definition: ProjectXPlayerState.h:90
static FPlayerClassUsage InvalidEntry
Definition: ProjectXPlayerState.h:113
Definition: PlayerStructs.h:64
Definition: ProjectXPlayerState.h:154
Definition: ProjectXPlayerState.h:172
bool IsValid()
Definition: ProjectXPlayerState.h:188
Definition: ProjectXGameState.h:121