2021-12-05 17:54:36 +00:00
|
|
|
#ifndef CHARACTERCOMPONENT_H
|
|
|
|
#define CHARACTERCOMPONENT_H
|
|
|
|
|
|
|
|
#include "dCommonVars.h"
|
|
|
|
#include "RakNetTypes.h"
|
|
|
|
#include "Character.h"
|
|
|
|
#include "Component.h"
|
2022-05-09 00:57:36 +00:00
|
|
|
#include "Item.h"
|
2021-12-05 17:54:36 +00:00
|
|
|
#include <string>
|
|
|
|
#include "CDMissionsTable.h"
|
|
|
|
#include "tinyxml2.h"
|
2023-03-04 07:16:37 +00:00
|
|
|
#include "eReplicaComponentType.h"
|
2023-11-22 02:05:15 +00:00
|
|
|
#include <array>
|
2024-02-04 14:29:05 +00:00
|
|
|
#include "Loot.h"
|
2021-12-05 17:54:36 +00:00
|
|
|
|
2023-05-02 22:39:21 +00:00
|
|
|
enum class eGameActivity : uint32_t;
|
|
|
|
|
2021-12-05 17:54:36 +00:00
|
|
|
/**
|
|
|
|
* The statistics that can be achieved per zone
|
|
|
|
*/
|
|
|
|
struct ZoneStatistics {
|
2022-07-28 13:39:57 +00:00
|
|
|
uint64_t m_AchievementsCollected;
|
2022-07-30 03:41:14 +00:00
|
|
|
int64_t m_BricksCollected;
|
2022-07-28 13:39:57 +00:00
|
|
|
uint64_t m_CoinsCollected;
|
|
|
|
uint64_t m_EnemiesSmashed;
|
|
|
|
uint64_t m_QuickBuildsCompleted;
|
2021-12-05 17:54:36 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The IDs of each of the possible statistics
|
|
|
|
*/
|
|
|
|
enum StatisticID {
|
2022-07-28 13:39:57 +00:00
|
|
|
CurrencyCollected = 1,
|
|
|
|
BricksCollected,
|
|
|
|
SmashablesSmashed,
|
|
|
|
QuickBuildsCompleted,
|
|
|
|
EnemiesSmashed,
|
|
|
|
RocketsUsed,
|
|
|
|
MissionsCompleted,
|
|
|
|
PetsTamed,
|
|
|
|
ImaginationPowerUpsCollected,
|
|
|
|
LifePowerUpsCollected,
|
|
|
|
ArmorPowerUpsCollected,
|
|
|
|
MetersTraveled,
|
|
|
|
TimesSmashed,
|
|
|
|
TotalDamageTaken,
|
|
|
|
TotalDamageHealed,
|
|
|
|
TotalArmorRepaired,
|
|
|
|
TotalImaginationRestored,
|
|
|
|
TotalImaginationUsed,
|
|
|
|
DistanceDriven,
|
|
|
|
TimeAirborneInCar,
|
|
|
|
RacingImaginationPowerUpsCollected,
|
|
|
|
RacingImaginationCratesSmashed,
|
|
|
|
RacingCarBoostsActivated,
|
|
|
|
RacingTimesWrecked,
|
|
|
|
RacingSmashablesSmashed,
|
|
|
|
RacesFinished,
|
|
|
|
FirstPlaceRaceFinishes,
|
2021-12-05 17:54:36 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Represents a character, including their rockets and stats
|
|
|
|
*/
|
2024-01-24 05:13:23 +00:00
|
|
|
class CharacterComponent final : public Component {
|
2021-12-05 17:54:36 +00:00
|
|
|
public:
|
2024-01-24 05:13:23 +00:00
|
|
|
static constexpr eReplicaComponentType ComponentType = eReplicaComponentType::CHARACTER;
|
2022-07-28 13:39:57 +00:00
|
|
|
|
2024-02-04 14:29:05 +00:00
|
|
|
CharacterComponent(Entity* parent, Character* character, const SystemAddress& systemAddress);
|
2022-07-28 13:39:57 +00:00
|
|
|
~CharacterComponent() override;
|
|
|
|
|
|
|
|
void LoadFromXml(tinyxml2::XMLDocument* doc) override;
|
2021-12-05 17:54:36 +00:00
|
|
|
void UpdateXml(tinyxml2::XMLDocument* doc) override;
|
|
|
|
|
2024-02-27 07:25:44 +00:00
|
|
|
void Serialize(RakNet::BitStream& outBitStream, bool bIsInitialUpdate) override;
|
2021-12-05 17:54:36 +00:00
|
|
|
|
2022-07-28 13:39:57 +00:00
|
|
|
/**
|
|
|
|
* Updates the rocket configuration using a LOT string separated by commas
|
|
|
|
* @param config the rocket config to use
|
|
|
|
*/
|
2021-12-05 17:54:36 +00:00
|
|
|
void SetLastRocketConfig(std::u16string config);
|
|
|
|
|
2022-05-09 00:57:36 +00:00
|
|
|
/**
|
|
|
|
* Find a player's rocket
|
|
|
|
* @param player the entity that triggered the event
|
|
|
|
* @return rocket
|
|
|
|
*/
|
|
|
|
Item* GetRocket(Entity* player);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Equip a player's rocket
|
|
|
|
* @param player the entity that triggered the event
|
|
|
|
* @return rocket
|
|
|
|
*/
|
|
|
|
Item* RocketEquip(Entity* player);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Find a player's rocket and unequip it
|
|
|
|
* @param player the entity that triggered the event
|
|
|
|
*/
|
|
|
|
void RocketUnEquip(Entity* player);
|
|
|
|
|
2022-07-28 13:39:57 +00:00
|
|
|
/**
|
|
|
|
* Gets the universe score of the entity
|
|
|
|
* @return the universe score of the entity
|
|
|
|
*/
|
2021-12-05 17:54:36 +00:00
|
|
|
const int64_t GetUScore() const { return m_Uscore; }
|
|
|
|
|
2022-07-28 13:39:57 +00:00
|
|
|
/**
|
|
|
|
* Sets the universe score for this entity
|
|
|
|
* @param uscore the universe score to set
|
|
|
|
*/
|
2021-12-05 17:54:36 +00:00
|
|
|
void SetUScore(int64_t uscore) { m_Uscore = uscore; }
|
|
|
|
|
2022-07-28 13:39:57 +00:00
|
|
|
/**
|
|
|
|
* Gets the current activity that the character is partaking in, see ScriptedActivityComponent for more details
|
|
|
|
* @return the current activity that the character is partaking in
|
|
|
|
*/
|
2023-05-02 22:39:21 +00:00
|
|
|
const eGameActivity GetCurrentActivity() const { return m_CurrentActivity; }
|
2021-12-05 17:54:36 +00:00
|
|
|
|
2022-07-28 13:39:57 +00:00
|
|
|
/**
|
|
|
|
* Set the current activity of the character, see ScriptedActivityComponent for more details
|
|
|
|
* @param currentActivity the activity to set
|
|
|
|
*/
|
2023-05-02 22:39:21 +00:00
|
|
|
void SetCurrentActivity(eGameActivity currentActivity) { m_CurrentActivity = currentActivity; m_DirtyCurrentActivity = true; }
|
2021-12-05 17:54:36 +00:00
|
|
|
|
2022-07-28 13:39:57 +00:00
|
|
|
/**
|
|
|
|
* Gets if the entity is currently racing
|
|
|
|
* @return whether the entity is currently racing
|
|
|
|
*/
|
2021-12-05 17:54:36 +00:00
|
|
|
const bool GetIsRacing() const { return m_IsRacing; }
|
|
|
|
|
2022-07-28 13:39:57 +00:00
|
|
|
/**
|
|
|
|
* Sets the state of whether the character is racing
|
|
|
|
* @param isRacing whether the character is racing
|
|
|
|
*/
|
2021-12-05 17:54:36 +00:00
|
|
|
void SetIsRacing(bool isRacing) { m_IsRacing = isRacing; }
|
|
|
|
|
2022-07-28 13:39:57 +00:00
|
|
|
/**
|
|
|
|
* Gets whether this character has PvP enabled, allowing combat between players
|
|
|
|
* @return
|
|
|
|
*/
|
2021-12-05 17:54:36 +00:00
|
|
|
bool GetPvpEnabled() const;
|
|
|
|
|
2022-07-28 13:39:57 +00:00
|
|
|
/**
|
|
|
|
* Returns the characters lifetime reputation
|
|
|
|
* @return The lifetime reputation of this character.
|
|
|
|
*/
|
|
|
|
int64_t GetReputation() { return m_Reputation; };
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Sets the lifetime reputation of the character to newValue
|
|
|
|
* @param newValue the value to set reputation to
|
|
|
|
*/
|
|
|
|
void SetReputation(int64_t newValue) { m_Reputation = newValue; };
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Sets the current value of PvP combat being enabled
|
|
|
|
* @param value whether to enable PvP combat
|
|
|
|
*/
|
2021-12-05 17:54:36 +00:00
|
|
|
void SetPvpEnabled(bool value);
|
|
|
|
|
2022-07-28 13:39:57 +00:00
|
|
|
/**
|
|
|
|
* Gets the object ID of the rocket that was last used, allowing it to be rendered on launch pads
|
|
|
|
* @return the object ID of the rocket that was last used, if available
|
|
|
|
*/
|
2021-12-05 17:54:36 +00:00
|
|
|
LWOOBJID GetLastRocketItemID() const { return m_LastRocketItemID; }
|
|
|
|
|
2022-07-28 13:39:57 +00:00
|
|
|
/**
|
|
|
|
* Sets the object ID of the last used rocket
|
|
|
|
* @param lastRocketItemID the object ID of the last used rocket
|
|
|
|
*/
|
2021-12-05 17:54:36 +00:00
|
|
|
void SetLastRocketItemID(LWOOBJID lastRocketItemID) { m_LastRocketItemID = lastRocketItemID; }
|
|
|
|
|
2022-07-28 13:39:57 +00:00
|
|
|
/**
|
|
|
|
* Gets the name of this character
|
|
|
|
* @return the name of this character
|
|
|
|
*/
|
2021-12-05 17:54:36 +00:00
|
|
|
std::string GetName() const { return m_Character->GetName(); }
|
|
|
|
|
2022-07-28 13:39:57 +00:00
|
|
|
/**
|
|
|
|
* Sets the GM level of the character, should be called in the entity. Here it's set for serialization
|
|
|
|
* @param gmlevel the gm level to set
|
|
|
|
*/
|
2023-03-24 23:16:45 +00:00
|
|
|
void SetGMLevel(eGameMasterLevel gmlevel);
|
2021-12-05 17:54:36 +00:00
|
|
|
|
2022-07-28 13:39:57 +00:00
|
|
|
/**
|
|
|
|
* Initializes the player statistics from the string stored in the XML
|
|
|
|
* @param statisticsString the string to parse
|
|
|
|
*/
|
2021-12-05 17:54:36 +00:00
|
|
|
void InitializeStatisticsFromString(const std::string& statisticsString);
|
|
|
|
|
2022-07-28 13:39:57 +00:00
|
|
|
/**
|
|
|
|
* Initializes all the statistics with empty stats when there's no stats available up until that point
|
|
|
|
*/
|
2021-12-05 17:54:36 +00:00
|
|
|
void InitializeEmptyStatistics();
|
|
|
|
|
2022-07-28 13:39:57 +00:00
|
|
|
/**
|
|
|
|
* Turns character statistics into a stats string
|
|
|
|
* @return the statistics of the character as a string, in order, split by semicolon (;)
|
|
|
|
*/
|
2021-12-05 17:54:36 +00:00
|
|
|
std::string StatisticsToString() const;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Updates the statistics for when a user completes a mission
|
|
|
|
* @param mission the mission info to track
|
|
|
|
*/
|
2022-07-28 13:39:57 +00:00
|
|
|
void TrackMissionCompletion(bool isAchievement);
|
2021-12-05 17:54:36 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Handles statistics related to collecting heart flags and imagination bricks
|
|
|
|
* @param lot the lot of the object that was collected
|
|
|
|
*/
|
|
|
|
void TrackLOTCollection(LOT lot);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Handles a change in health and updates the statistics
|
|
|
|
* @param health the health delta
|
|
|
|
*/
|
|
|
|
void TrackHealthDelta(int32_t health);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Handles a change in imagination and updates the statistics
|
|
|
|
* @param imagination the imagination delta
|
|
|
|
*/
|
|
|
|
void TrackImaginationDelta(int32_t imagination);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Handles a change in armor and updates the statistics
|
|
|
|
* @param armor the armor delta
|
|
|
|
*/
|
|
|
|
void TrackArmorDelta(int32_t armor);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Handles completing a rebuild by updating the statistics
|
|
|
|
*/
|
2023-12-29 04:24:30 +00:00
|
|
|
void TrackQuickBuildComplete();
|
2021-12-05 17:54:36 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Tracks a player completing the race, also updates stats
|
|
|
|
* @param won whether the player won the race
|
|
|
|
*/
|
|
|
|
void TrackRaceCompleted(bool won);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Tracks an updated position for a player
|
|
|
|
*/
|
|
|
|
void TrackPositionUpdate(const NiPoint3& newPosition);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Handles a zone statistic update
|
|
|
|
* @param zoneID the zone that the stat belongs to
|
|
|
|
* @param name the name of the stat
|
|
|
|
* @param value the delta update for the stat
|
|
|
|
*/
|
|
|
|
void HandleZoneStatisticsUpdate(LWOMAPID zoneID, const std::u16string& name, int32_t value);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Allows one to generically update a statistic
|
|
|
|
* @param updateID the 1-indexed ID of the statistic in the order of definition below
|
|
|
|
* @param updateValue the value to update the statistic with
|
|
|
|
*/
|
|
|
|
void UpdatePlayerStatistic(StatisticID updateID, uint64_t updateValue = 1);
|
|
|
|
|
2022-07-28 13:39:57 +00:00
|
|
|
/**
|
|
|
|
* Add a venture vision effect to the player minimap.
|
|
|
|
*/
|
|
|
|
void AddVentureVisionEffect(std::string ventureVisionType);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Remove a venture vision effect from the player minimap.
|
|
|
|
* When an effect hits 0 active effects, it is deactivated.
|
|
|
|
*/
|
|
|
|
void RemoveVentureVisionEffect(std::string ventureVisionType);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Update the client minimap to reveal the specified factions
|
|
|
|
*/
|
|
|
|
void UpdateClientMinimap(bool showFaction, std::string ventureVisionType) const;
|
|
|
|
|
2023-08-04 02:44:03 +00:00
|
|
|
void SetCurrentInteracting(LWOOBJID objectID) {m_CurrentInteracting = objectID;};
|
|
|
|
|
|
|
|
LWOOBJID GetCurrentInteracting() {return m_CurrentInteracting;};
|
|
|
|
|
2024-01-12 17:39:51 +00:00
|
|
|
/**
|
|
|
|
* Sends a player to another zone with an optional clone ID
|
|
|
|
*
|
|
|
|
* @param zoneId zoneID for the new instance.
|
|
|
|
* @param cloneId cloneID for the new instance.
|
|
|
|
*/
|
|
|
|
void SendToZone(LWOMAPID zoneId, LWOCLONEID cloneId = 0) const;
|
|
|
|
|
2024-02-04 14:29:05 +00:00
|
|
|
const SystemAddress& GetSystemAddress() const;
|
|
|
|
|
|
|
|
const NiPoint3& GetRespawnPosition() const { return m_respawnPos; };
|
|
|
|
|
|
|
|
void SetRespawnPos(const NiPoint3& position);
|
|
|
|
|
|
|
|
const NiQuaternion& GetRespawnRotation() const { return m_respawnRot; };
|
|
|
|
|
|
|
|
void SetRespawnRot(const NiQuaternion& rotation);
|
|
|
|
|
|
|
|
std::map<LWOOBJID, Loot::Info>& GetDroppedLoot() { return m_DroppedLoot; };
|
|
|
|
|
|
|
|
uint64_t GetDroppedCoins() const { return m_DroppedCoins; };
|
|
|
|
|
|
|
|
void SetDroppedCoins(const uint64_t value) { m_DroppedCoins = value; };
|
|
|
|
|
2022-07-28 13:39:57 +00:00
|
|
|
/**
|
|
|
|
* Character info regarding this character, including clothing styles, etc.
|
|
|
|
*/
|
|
|
|
Character* m_Character;
|
2021-12-11 02:02:02 +00:00
|
|
|
private:
|
2022-07-28 13:39:57 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The map of active venture vision effects
|
|
|
|
*/
|
|
|
|
std::map<std::string, uint32_t> m_ActiveVentureVisionEffects;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Whether this character is racing
|
|
|
|
*/
|
2021-12-05 17:54:36 +00:00
|
|
|
bool m_IsRacing;
|
|
|
|
|
2022-07-28 13:39:57 +00:00
|
|
|
/**
|
|
|
|
* Possessible type, used by the shooting gallery
|
|
|
|
*/
|
2021-12-05 17:54:36 +00:00
|
|
|
uint8_t m_PossessableType = 1;
|
|
|
|
|
2022-07-28 13:39:57 +00:00
|
|
|
/**
|
|
|
|
* Universe score of the entity
|
|
|
|
*/
|
2021-12-05 17:54:36 +00:00
|
|
|
int64_t m_Uscore;
|
|
|
|
|
2022-07-28 13:39:57 +00:00
|
|
|
/**
|
|
|
|
* The lifetime reputation earned by the entity
|
|
|
|
*/
|
|
|
|
int64_t m_Reputation;
|
2022-04-01 01:18:13 +00:00
|
|
|
|
2022-07-28 13:39:57 +00:00
|
|
|
/**
|
|
|
|
* Whether the character is landing by rocket
|
|
|
|
*/
|
2021-12-05 17:54:36 +00:00
|
|
|
bool m_IsLanding;
|
|
|
|
|
2022-07-28 13:39:57 +00:00
|
|
|
/**
|
|
|
|
* The configuration of the last used rocket, essentially a string of LOTs separated by commas
|
|
|
|
*/
|
2021-12-05 17:54:36 +00:00
|
|
|
std::u16string m_LastRocketConfig;
|
|
|
|
|
2022-07-28 13:39:57 +00:00
|
|
|
/**
|
|
|
|
* Whether the GM info has been changed
|
|
|
|
*/
|
2021-12-05 17:54:36 +00:00
|
|
|
bool m_DirtyGMInfo = false;
|
|
|
|
|
2022-07-28 13:39:57 +00:00
|
|
|
/**
|
|
|
|
* Whether PvP is enabled for this entity
|
|
|
|
*/
|
2021-12-05 17:54:36 +00:00
|
|
|
bool m_PvpEnabled;
|
|
|
|
|
2022-07-28 13:39:57 +00:00
|
|
|
/**
|
|
|
|
* Whether this entity is a GM
|
|
|
|
*/
|
2021-12-05 17:54:36 +00:00
|
|
|
bool m_IsGM;
|
|
|
|
|
2022-07-28 13:39:57 +00:00
|
|
|
/**
|
|
|
|
* The current GM level of this character (anything > 0 counts as a GM)
|
|
|
|
*/
|
2023-03-24 23:16:45 +00:00
|
|
|
eGameMasterLevel m_GMLevel;
|
2021-12-05 17:54:36 +00:00
|
|
|
|
2022-07-28 13:39:57 +00:00
|
|
|
/**
|
|
|
|
* Whether the character has HF enabled
|
|
|
|
*/
|
2021-12-05 17:54:36 +00:00
|
|
|
bool m_EditorEnabled;
|
|
|
|
|
2022-07-28 13:39:57 +00:00
|
|
|
/**
|
|
|
|
* The level of the character in HF
|
|
|
|
*/
|
2023-03-24 23:16:45 +00:00
|
|
|
eGameMasterLevel m_EditorLevel;
|
2021-12-05 17:54:36 +00:00
|
|
|
|
2022-07-28 13:39:57 +00:00
|
|
|
/**
|
|
|
|
* Whether the currently active activity has been changed
|
|
|
|
*/
|
2021-12-05 17:54:36 +00:00
|
|
|
bool m_DirtyCurrentActivity = false;
|
|
|
|
|
2022-07-28 13:39:57 +00:00
|
|
|
/**
|
|
|
|
* The ID of the curently active activity
|
|
|
|
*/
|
2023-05-02 22:39:21 +00:00
|
|
|
eGameActivity m_CurrentActivity;
|
2021-12-05 17:54:36 +00:00
|
|
|
|
2022-07-28 13:39:57 +00:00
|
|
|
/**
|
|
|
|
* Whether the social info has been changed
|
|
|
|
*/
|
2021-12-05 17:54:36 +00:00
|
|
|
bool m_DirtySocialInfo = false;
|
|
|
|
|
2022-07-28 13:39:57 +00:00
|
|
|
/**
|
|
|
|
* The guild this character is in
|
|
|
|
*/
|
2021-12-05 17:54:36 +00:00
|
|
|
LWOOBJID m_GuildID;
|
|
|
|
|
2022-07-28 13:39:57 +00:00
|
|
|
/**
|
|
|
|
* The name of the guild this character is in
|
|
|
|
*/
|
2021-12-05 17:54:36 +00:00
|
|
|
std::u16string m_GuildName;
|
|
|
|
|
2022-07-28 13:39:57 +00:00
|
|
|
/**
|
|
|
|
* Whether this character is a lego club member
|
|
|
|
*/
|
2021-12-05 17:54:36 +00:00
|
|
|
bool m_IsLEGOClubMember;
|
|
|
|
|
2022-07-28 13:39:57 +00:00
|
|
|
/**
|
|
|
|
* The country code that the character is from
|
|
|
|
*/
|
2021-12-05 17:54:36 +00:00
|
|
|
int m_CountryCode;
|
|
|
|
|
2022-07-28 13:39:57 +00:00
|
|
|
/**
|
|
|
|
* Returns whether the landing animation is enabled for a certain zone
|
|
|
|
* @param zoneID the zone to check for
|
|
|
|
* @return whether the landing animation is enabled for that zone
|
|
|
|
*/
|
2021-12-05 17:54:36 +00:00
|
|
|
bool LandingAnimDisabled(int zoneID);
|
|
|
|
|
2022-07-28 13:39:57 +00:00
|
|
|
/**
|
|
|
|
* Returns the statistics for a certain statistics ID, from a statistics string
|
|
|
|
* @param split the statistics string to look in
|
|
|
|
* @param index the statistics ID in the string
|
|
|
|
* @return the integer value of this statistic, parsed from the string
|
|
|
|
*/
|
2021-12-05 17:54:36 +00:00
|
|
|
static uint64_t GetStatisticFromSplit(std::vector<std::string> split, uint32_t index);
|
|
|
|
|
2022-07-28 13:39:57 +00:00
|
|
|
/**
|
|
|
|
* Gets all the statistics for a certain map, if it doesn't exist, it creates empty stats
|
|
|
|
* @param mapID the ID of the zone to get statistics for
|
|
|
|
* @return the statistics for the zone
|
|
|
|
*/
|
2021-12-05 17:54:36 +00:00
|
|
|
ZoneStatistics& GetZoneStatisticsForMap(const LWOMAPID mapID);
|
|
|
|
|
2022-07-28 13:39:57 +00:00
|
|
|
/**
|
|
|
|
* The last time we saved this character, used to update the total time played
|
|
|
|
*/
|
|
|
|
time_t m_LastUpdateTimestamp;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The total time the character has played, in MS
|
|
|
|
*/
|
|
|
|
uint64_t m_TotalTimePlayed;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The total amount of currency collected by this character
|
|
|
|
*/
|
|
|
|
uint64_t m_CurrencyCollected;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The total amount of bricks collected by this character
|
|
|
|
*/
|
2022-07-30 03:41:14 +00:00
|
|
|
int64_t m_BricksCollected;
|
2022-07-28 13:39:57 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The total amount of entities smashed by this character
|
|
|
|
*/
|
|
|
|
uint64_t m_SmashablesSmashed;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The total amount of quickbuilds completed by this character
|
|
|
|
*/
|
|
|
|
uint64_t m_QuickBuildsCompleted;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The total amount of enemies killd by this character
|
|
|
|
*/
|
|
|
|
uint64_t m_EnemiesSmashed;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The total amount of rockets used by this character
|
|
|
|
*/
|
|
|
|
uint64_t m_RocketsUsed;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The total amount of missions completed by this character
|
|
|
|
*/
|
|
|
|
uint64_t m_MissionsCompleted;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The total number of pets tamed by this character
|
|
|
|
*/
|
|
|
|
uint64_t m_PetsTamed;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The total amount of imagination powerups collected by this character, this includes the ones in racing
|
|
|
|
*/
|
|
|
|
uint64_t m_ImaginationPowerUpsCollected;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The total amount of life powerups collected (note: not the total amount of life gained)
|
|
|
|
*/
|
|
|
|
uint64_t m_LifePowerUpsCollected;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The total amount of armor powerups collected (note: not the total amount of armor gained)
|
|
|
|
*/
|
|
|
|
uint64_t m_ArmorPowerUpsCollected;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Total amount of meters traveled by this character
|
|
|
|
*/
|
|
|
|
uint64_t m_MetersTraveled;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Total amount of times this character was smashed, either by other entities or by going out of bounds
|
|
|
|
*/
|
|
|
|
uint64_t m_TimesSmashed;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The total amount of damage inflicted on this character
|
|
|
|
*/
|
|
|
|
uint64_t m_TotalDamageTaken;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The total amount of damage healed by this character (excludes armor polish, etc)
|
|
|
|
*/
|
|
|
|
uint64_t m_TotalDamageHealed;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Total amount of armor repaired by this character
|
|
|
|
*/
|
|
|
|
uint64_t m_TotalArmorRepaired;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Total amount of imagination resored by this character
|
|
|
|
*/
|
|
|
|
uint64_t m_TotalImaginationRestored;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Total amount of imagination used by this character
|
|
|
|
*/
|
|
|
|
uint64_t m_TotalImaginationUsed;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Amount of distance driven, mutually exclusively tracked to meters travelled based on whether the charcter
|
|
|
|
* is currently driving
|
|
|
|
*/
|
|
|
|
uint64_t m_DistanceDriven;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Time airborne in a car, currently untracked.
|
|
|
|
* Honestly, who even cares about this.
|
|
|
|
*/
|
|
|
|
uint64_t m_TimeAirborneInCar;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Amount of imagination powerups found on racing tracks being collected, generally triggered by scripts
|
|
|
|
*/
|
|
|
|
uint64_t m_RacingImaginationPowerUpsCollected;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Total amount of racing imagination crates smashed, generally tracked by scripts
|
|
|
|
*/
|
|
|
|
uint64_t m_RacingImaginationCratesSmashed;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The amount of times this character triggered a car boost
|
|
|
|
*/
|
|
|
|
uint64_t m_RacingCarBoostsActivated;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The amount of times a car of this character was wrecked
|
|
|
|
*/
|
|
|
|
uint64_t m_RacingTimesWrecked;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The amount of entities smashed by the character while driving
|
|
|
|
*/
|
|
|
|
uint64_t m_RacingSmashablesSmashed;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The total amount of races completed by this character
|
|
|
|
*/
|
|
|
|
uint64_t m_RacesFinished;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The total amount of races won by this character
|
|
|
|
*/
|
|
|
|
uint64_t m_FirstPlaceRaceFinishes;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Special stats which are tracked per zone
|
|
|
|
*/
|
|
|
|
std::map<LWOMAPID, ZoneStatistics> m_ZoneStatistics{};
|
2021-12-05 17:54:36 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* ID of the last rocket used
|
|
|
|
*/
|
|
|
|
LWOOBJID m_LastRocketItemID = LWOOBJID_EMPTY;
|
2023-08-04 02:44:03 +00:00
|
|
|
|
|
|
|
LWOOBJID m_CurrentInteracting = LWOOBJID_EMPTY;
|
2023-11-22 02:05:15 +00:00
|
|
|
|
|
|
|
std::array<uint64_t, 4> m_ClaimCodes{};
|
|
|
|
|
|
|
|
void AwardClaimCodes();
|
2024-02-04 14:29:05 +00:00
|
|
|
|
|
|
|
SystemAddress m_SystemAddress;
|
|
|
|
|
|
|
|
NiPoint3 m_respawnPos;
|
|
|
|
|
|
|
|
NiQuaternion m_respawnRot;
|
|
|
|
|
|
|
|
std::map<LWOOBJID, Loot::Info> m_DroppedLoot;
|
|
|
|
|
|
|
|
uint64_t m_DroppedCoins = 0;
|
2021-12-05 17:54:36 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // CHARACTERCOMPONENT_H
|