mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2026-04-09 17:26:58 +00:00
feat: implement character and property reputation system
- Added ICharacterReputation and IPropertyReputationContribution interfaces for managing character and property reputations. - Implemented MySQL and SQLite database methods for getting and setting character reputations. - Created migration scripts for character and property reputation tables in both MySQL and SQLite. - Updated CharacterComponent to retrieve and set character reputation. - Enhanced PropertyManagementComponent to manage property reputation and contributions. - Added methods for handling reputation contributions and decay. - Introduced CharacterReputationMigration to migrate existing character reputations from XML to the database.
This commit is contained in:
4
migrations/dlu/mysql/27_character_reputation.sql
Normal file
4
migrations/dlu/mysql/27_character_reputation.sql
Normal file
@@ -0,0 +1,4 @@
|
||||
CREATE TABLE IF NOT EXISTS character_reputation (
|
||||
character_id BIGINT NOT NULL PRIMARY KEY,
|
||||
reputation BIGINT NOT NULL DEFAULT 0
|
||||
);
|
||||
7
migrations/dlu/mysql/28_property_reputation.sql
Normal file
7
migrations/dlu/mysql/28_property_reputation.sql
Normal file
@@ -0,0 +1,7 @@
|
||||
CREATE TABLE IF NOT EXISTS property_reputation_contribution (
|
||||
property_id BIGINT NOT NULL,
|
||||
player_id BIGINT NOT NULL,
|
||||
contribution_date DATE NOT NULL,
|
||||
reputation_gained INT UNSIGNED NOT NULL DEFAULT 0,
|
||||
PRIMARY KEY (property_id, player_id, contribution_date)
|
||||
);
|
||||
4
migrations/dlu/sqlite/10_character_reputation.sql
Normal file
4
migrations/dlu/sqlite/10_character_reputation.sql
Normal file
@@ -0,0 +1,4 @@
|
||||
CREATE TABLE IF NOT EXISTS character_reputation (
|
||||
character_id BIGINT NOT NULL PRIMARY KEY,
|
||||
reputation BIGINT NOT NULL DEFAULT 0
|
||||
);
|
||||
7
migrations/dlu/sqlite/11_property_reputation.sql
Normal file
7
migrations/dlu/sqlite/11_property_reputation.sql
Normal file
@@ -0,0 +1,7 @@
|
||||
CREATE TABLE IF NOT EXISTS property_reputation_contribution (
|
||||
property_id BIGINT NOT NULL,
|
||||
player_id BIGINT NOT NULL,
|
||||
contribution_date DATE NOT NULL,
|
||||
reputation_gained INTEGER NOT NULL DEFAULT 0,
|
||||
PRIMARY KEY (property_id, player_id, contribution_date)
|
||||
);
|
||||
Reference in New Issue
Block a user