feat(covenant): P3 - grant RenownRewards on covenant renown level-up
The covenant renown LEVEL is already a renown-reputation handled by TC's ReputationMgr and synced to the client by the standard reputation packets, so the only covenant-specific gap was granting the per-level rewards. - Add the RenownRewards.db2 store (Meta 0x30AFBCF8, ParentIndex=CovenantID) and a DB2Manager (covenantId, level) -> rewards map (GetRenownRewards). - Track the highest renown level whose rewards were granted, per covenant (Player::m_renownRewardsGranted), persisted to a new character_covenant_renown table and loaded at login, so each level's rewards are granted exactly once. - Player::ReputationChanged now grants rewards for every renown level crossed when a covenant renown reputation increases; a login catch-up (UpdateAllRenownRewards, run in-world after SendInitialPacketsAfterAddToMap) grants anything earned before this feature existed. UpdateRenownRewards is guarded on IsInWorld() so nothing is granted mid-load. - GrantRenownReward grants item / spell / title / mount via the existing Player + CollectionMgr APIs. The cosmetic-collection fields RenownRewards also carries (TransmogID/TransmogSetID/TransmogIllusionID, GarrFollowerID, QuestID) are documented as follow-ups rather than half-implemented.
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
|
||||
DROP TABLE IF EXISTS `character_covenant_renown`;
|
||||
CREATE TABLE `character_covenant_renown` (
|
||||
`guid` bigint unsigned NOT NULL DEFAULT '0',
|
||||
`covenantId` int unsigned NOT NULL DEFAULT '0',
|
||||
`grantedLevel` int unsigned NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`guid`,`covenantId`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='Highest covenant renown level whose rewards were granted';
|
||||
Reference in New Issue
Block a user