diff options
| author | Shauren <shauren.trinity@gmail.com> | 2025-06-27 15:29:30 +0200 |
|---|---|---|
| committer | Shauren <shauren.trinity@gmail.com> | 2025-06-27 15:29:30 +0200 |
| commit | 60400d25f5fff2dabd4aa74bbdbc0d2370360a35 (patch) | |
| tree | 54f2ae7ecfdbe1387d6d6e39a4168a9385b1f230 /src/server/game/DataStores | |
| parent | e0f3291eab271cb7dc5f39abfc7e2a4744be6ee0 (diff) | |
Core/Players: Implemented PlayerDataElementAccount, PlayerDataElementCharacter, PlayerDataFlagAccount and PlayerDataFlagCharacter
Diffstat (limited to 'src/server/game/DataStores')
| -rw-r--r-- | src/server/game/DataStores/DB2LoadInfo.h | 48 | ||||
| -rw-r--r-- | src/server/game/DataStores/DB2Stores.cpp | 8 | ||||
| -rw-r--r-- | src/server/game/DataStores/DB2Stores.h | 4 | ||||
| -rw-r--r-- | src/server/game/DataStores/DB2Structure.h | 32 | ||||
| -rw-r--r-- | src/server/game/DataStores/DBCEnums.h | 18 |
5 files changed, 106 insertions, 4 deletions
diff --git a/src/server/game/DataStores/DB2LoadInfo.h b/src/server/game/DataStores/DB2LoadInfo.h index f14f8a85f97..926c5095f0a 100644 --- a/src/server/game/DataStores/DB2LoadInfo.h +++ b/src/server/game/DataStores/DB2LoadInfo.h @@ -4363,6 +4363,54 @@ struct PlayerConditionLoadInfo static constexpr DB2LoadInfo Instance{ Fields, 162, &PlayerConditionMeta::Instance, HOTFIX_SEL_PLAYER_CONDITION }; }; +struct PlayerDataElementAccountLoadInfo +{ + static constexpr DB2FieldMeta Fields[3] = + { + { .IsSigned = false, .Type = FT_INT, .Name = "ID" }, + { .IsSigned = true, .Type = FT_INT, .Name = "StorageIndex" }, + { .IsSigned = true, .Type = FT_INT, .Name = "Type" }, + }; + + static constexpr DB2LoadInfo Instance{ Fields, 3, &PlayerDataElementAccountMeta::Instance, HOTFIX_SEL_PLAYER_DATA_ELEMENT_ACCOUNT }; +}; + +struct PlayerDataElementCharacterLoadInfo +{ + static constexpr DB2FieldMeta Fields[3] = + { + { .IsSigned = false, .Type = FT_INT, .Name = "ID" }, + { .IsSigned = true, .Type = FT_INT, .Name = "StorageIndex" }, + { .IsSigned = true, .Type = FT_INT, .Name = "Type" }, + }; + + static constexpr DB2LoadInfo Instance{ Fields, 3, &PlayerDataElementCharacterMeta::Instance, HOTFIX_SEL_PLAYER_DATA_ELEMENT_CHARACTER }; +}; + +struct PlayerDataFlagAccountLoadInfo +{ + static constexpr DB2FieldMeta Fields[3] = + { + { .IsSigned = false, .Type = FT_INT, .Name = "ID" }, + { .IsSigned = true, .Type = FT_INT, .Name = "StorageIndex" }, + { .IsSigned = true, .Type = FT_INT, .Name = "Unknown1107" }, + }; + + static constexpr DB2LoadInfo Instance{ Fields, 3, &PlayerDataFlagAccountMeta::Instance, HOTFIX_SEL_PLAYER_DATA_FLAG_ACCOUNT }; +}; + +struct PlayerDataFlagCharacterLoadInfo +{ + static constexpr DB2FieldMeta Fields[3] = + { + { .IsSigned = false, .Type = FT_INT, .Name = "ID" }, + { .IsSigned = true, .Type = FT_INT, .Name = "StorageIndex" }, + { .IsSigned = true, .Type = FT_INT, .Name = "Unknown1107" }, + }; + + static constexpr DB2LoadInfo Instance{ Fields, 3, &PlayerDataFlagCharacterMeta::Instance, HOTFIX_SEL_PLAYER_DATA_FLAG_CHARACTER }; +}; + struct PowerDisplayLoadInfo { static constexpr DB2FieldMeta Fields[6] = diff --git a/src/server/game/DataStores/DB2Stores.cpp b/src/server/game/DataStores/DB2Stores.cpp index 7195afe57c7..521fbcfb8cc 100644 --- a/src/server/game/DataStores/DB2Stores.cpp +++ b/src/server/game/DataStores/DB2Stores.cpp @@ -258,6 +258,10 @@ DB2Storage<PerksActivityEntry> sPerksActivityStore("PerksActivi DB2Storage<PhaseEntry> sPhaseStore("Phase.db2", &PhaseLoadInfo::Instance); DB2Storage<PhaseXPhaseGroupEntry> sPhaseXPhaseGroupStore("PhaseXPhaseGroup.db2", &PhaseXPhaseGroupLoadInfo::Instance); DB2Storage<PlayerConditionEntry> sPlayerConditionStore("PlayerCondition.db2", &PlayerConditionLoadInfo::Instance); +DB2Storage<PlayerDataElementAccountEntry> sPlayerDataElementAccountStore("PlayerDataElementAccount.db2", &PlayerDataElementAccountLoadInfo::Instance); +DB2Storage<PlayerDataElementCharacterEntry> sPlayerDataElementCharacterStore("PlayerDataElementCharacter.db2", &PlayerDataElementCharacterLoadInfo::Instance); +DB2Storage<PlayerDataFlagAccountEntry> sPlayerDataFlagAccountStore("PlayerDataFlagAccount.db2", &PlayerDataFlagAccountLoadInfo::Instance); +DB2Storage<PlayerDataFlagCharacterEntry> sPlayerDataFlagCharacterStore("PlayerDataFlagCharacter.db2", &PlayerDataFlagCharacterLoadInfo::Instance); DB2Storage<PowerDisplayEntry> sPowerDisplayStore("PowerDisplay.db2", &PowerDisplayLoadInfo::Instance); DB2Storage<PowerTypeEntry> sPowerTypeStore("PowerType.db2", &PowerTypeLoadInfo::Instance); DB2Storage<PrestigeLevelInfoEntry> sPrestigeLevelInfoStore("PrestigeLevelInfo.db2", &PrestigeLevelInfoLoadInfo::Instance); @@ -880,6 +884,10 @@ uint32 DB2Manager::LoadStores(std::string const& dataPath, LocaleConstant defaul LOAD_DB2(sPhaseStore); LOAD_DB2(sPhaseXPhaseGroupStore); LOAD_DB2(sPlayerConditionStore); + LOAD_DB2(sPlayerDataElementAccountStore); + LOAD_DB2(sPlayerDataElementCharacterStore); + LOAD_DB2(sPlayerDataFlagAccountStore); + LOAD_DB2(sPlayerDataFlagCharacterStore); LOAD_DB2(sPowerDisplayStore); LOAD_DB2(sPowerTypeStore); LOAD_DB2(sPrestigeLevelInfoStore); diff --git a/src/server/game/DataStores/DB2Stores.h b/src/server/game/DataStores/DB2Stores.h index 80c077822e1..b90d247c83a 100644 --- a/src/server/game/DataStores/DB2Stores.h +++ b/src/server/game/DataStores/DB2Stores.h @@ -199,6 +199,10 @@ TC_GAME_API extern DB2Storage<ParagonReputationEntry> sParagonRepu TC_GAME_API extern DB2Storage<PerksActivityEntry> sPerksActivityStore; TC_GAME_API extern DB2Storage<PhaseEntry> sPhaseStore; TC_GAME_API extern DB2Storage<PlayerConditionEntry> sPlayerConditionStore; +TC_GAME_API extern DB2Storage<PlayerDataElementAccountEntry> sPlayerDataElementAccountStore; +TC_GAME_API extern DB2Storage<PlayerDataElementCharacterEntry> sPlayerDataElementCharacterStore; +TC_GAME_API extern DB2Storage<PlayerDataFlagAccountEntry> sPlayerDataFlagAccountStore; +TC_GAME_API extern DB2Storage<PlayerDataFlagCharacterEntry> sPlayerDataFlagCharacterStore; TC_GAME_API extern DB2Storage<PowerDisplayEntry> sPowerDisplayStore; TC_GAME_API extern DB2Storage<PowerTypeEntry> sPowerTypeStore; TC_GAME_API extern DB2Storage<PVPStatEntry> sPVPStatStore; diff --git a/src/server/game/DataStores/DB2Structure.h b/src/server/game/DataStores/DB2Structure.h index bb9a5e55c43..3fe06f40106 100644 --- a/src/server/game/DataStores/DB2Structure.h +++ b/src/server/game/DataStores/DB2Structure.h @@ -3242,6 +3242,38 @@ struct PlayerConditionEntry std::array<uint16, 4> TraitNodeEntryMaxRank; }; +struct PlayerDataElementAccountEntry +{ + uint32 ID; + int32 StorageIndex; + int32 Type; + + PlayerDataElementType GetType() const { return static_cast<PlayerDataElementType>(Type); } +}; + +struct PlayerDataElementCharacterEntry +{ + uint32 ID; + int32 StorageIndex; + int32 Type; + + PlayerDataElementType GetType() const { return static_cast<PlayerDataElementType>(Type); } +}; + +struct PlayerDataFlagAccountEntry +{ + uint32 ID; + int32 StorageIndex; + int32 Unknown1107; +}; + +struct PlayerDataFlagCharacterEntry +{ + uint32 ID; + int32 StorageIndex; + int32 Unknown1107; +}; + struct PowerDisplayEntry { uint32 ID; diff --git a/src/server/game/DataStores/DBCEnums.h b/src/server/game/DataStores/DBCEnums.h index 951ca42004e..518f6ed81df 100644 --- a/src/server/game/DataStores/DBCEnums.h +++ b/src/server/game/DataStores/DBCEnums.h @@ -1829,8 +1829,8 @@ enum class ModifierTreeType : int32 PlayerWeaponHighWatermarkAboveOrEqual = 375, /*NYI*/ PlayerHeadHighWatermarkAboveOrEqual = 376, /*NYI*/ PlayerHasDisplayedCurrencyLessThan = 377, /*NYI*/ // Player has {CurrencyTypes} less than {#Amount} (value visible in ui is taken into account, not raw value) - PlayerDataFlagAccountIsSet = 378, /*NYI*/ // Player {PlayerDataFlagAccount} is set - PlayerDataFlagCharacterIsSet = 379, /*NYI*/ // Player {PlayerDataFlagCharacter} is set + PlayerDataFlagAccountIsSet = 378, // Player {PlayerDataFlagAccount} is set + PlayerDataFlagCharacterIsSet = 379, // Player {PlayerDataFlagCharacter} is set PlayerIsOnMapWithExpansion = 380, // Player is on map that has {ExpansionID} PlayerHasCompletedQuestOnAccount = 382, /*NYI*/ // Player has previously completed quest "{QuestV2}" on account @@ -1841,12 +1841,16 @@ enum class ModifierTreeType : int32 PlayerIsInSoloRBG = 387, /*NYI*/ // Player is in solo RBG (BG Blitz) PlayerHasCompletedCampaign = 388, /*NYI*/ // Player has completed campaign "{Campaign}" TargetCreatureClassificationEqual = 389, // Creature classification is {CreatureClassification} - PlayerDataElementCharacterEqual = 390, /*NYI*/ // Player {PlayerDataElementCharacter} is greater than {#Amount} - PlayerDataElementAccountEqual = 391, /*NYI*/ // Player {PlayerDataElementAccount} is greater than {#Amount} + PlayerDataElementCharacterBetween = 390, // Player {PlayerDataElementCharacter} is between {#Amount} and {#Amount2} + PlayerDataElementAccountBetween = 391, // Player {PlayerDataElementAccount} is between {#Amount} and {#Amount2} PlayerHasCompletedQuestOrIsReadyToTurnIn = 392, // Player has previously completed quest "{QuestV2}" or is ready to turn it in PlayerTitle = 393, // Player is currently using "{ChrTitles}" title + PlayerWeeklyCurrencyIsRelOpFromMax = 397, /*NYI*/ // Player weekly {CurrencyTypes} is {RelOp} {#Amount} from currency weekly limit + PlayerIsInGuild = 404, // Player is in a guild + + PlayerAvgItemLevelRelOp = 415, /*NYI*/ // Player average item level {AvgItemLevelCategory} is {RelOp} {#Amount} }; enum class ModifierTreeOperator : int8 @@ -1942,6 +1946,12 @@ enum class PlayerConditionLfgStatus : uint8 GearDiff = 8 }; +enum class PlayerDataElementType : int32 +{ + Int64 = 0, + Float = 1 +}; + enum class PlayerInteractionType : int32 { None = 0, |
