Added new sql changes for advancement

This commit is contained in:
2024-12-02 23:56:22 -05:00
parent 3093ab3280
commit 6115459150
2 changed files with 84 additions and 81 deletions

View File

@@ -1,79 +1,80 @@
-- Used for tracking group instance data for mythic runs
DROP TABLE IF EXISTS mp_group_data;
CREATE TABLE mp_group_data (
groupId INT UNSIGNED NOT NULL DEFAULT '0',
difficulty INT UNSIGNED,
mapId INT UNSIGNED,
instanceId INT UNSIGNED,
instanceTimer INT UNSIGNED,
deaths INT UNSIGNED,
groupId INT UNSIGNED NOT NULL DEFAULT '0',
difficulty INT UNSIGNED,
mapId INT UNSIGNED,
instanceId INT UNSIGNED,
instanceTimer INT UNSIGNED,
deaths INT UNSIGNED,
PRIMARY KEY (groupId)
);
-- Used for tracking current instance data for players
DROP TABLE IF EXISTS mp_player_instance_data;
CREATE TABLE mp_player_instance_data(
guid INT UNSIGNED NOT NULL DEFAULT '0',
difficulty INT UNSIGNED NOT NULL DEFAULT '3',
mapId INT UNSIGNED NOT NULL,
instanceId INT UNSIGNED,
deaths INT UNSIGNED NOT NULL,
CREATE TABLE mp_player_instance_data (
guid INT UNSIGNED NOT NULL DEFAULT '0',
difficulty INT UNSIGNED NOT NULL DEFAULT '3',
mapId INT UNSIGNED NOT NULL,
instanceId INT UNSIGNED,
deaths INT UNSIGNED NOT NULL,
PRIMARY KEY (guid, mapId, instanceId)
);
-- Used for tracking player deaths to specific creatures in mythic runs
DROP TABLE IF EXISTS mp_player_death_stats;
CREATE TABLE mp_player_death_stats(
guid INT UNSIGNED NOT NULL DEFAULT '0',
creatureEntry INT UNSIGNED NOT NULL,
difficulty TINYINT UNSIGNED NOT NULL DEFAULT '0'
numDeaths INT UNSIGNED NOT NULL DEFAULT '0',
lastUpdated TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (guid, creatureEntry, difficulty)
CREATE TABLE mp_player_death_stats (
guid INT UNSIGNED NOT NULL DEFAULT '0',
creatureEntry INT UNSIGNED NOT NULL,
difficulty TINYINT UNSIGNED NOT NULL DEFAULT '0',
numDeaths INT UNSIGNED NOT NULL DEFAULT '0',
lastUpdated TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (guid, creatureEntry, difficulty)
);
--- Used for tracking player runs in mythic dungeons
-- Used for tracking player runs in mythic dungeons
DROP TABLE IF EXISTS mp_player_runs;
CREATE TABLE mp_player_runs(
runId INT UNSIGNED AUTO_INCREMENT,
guid INT UNSIGNED NOT NULL DEFAULT '0',
difficulty INT UNSIGNED NOT NULL DEFAULT '3',
mapId INT UNSIGNED,
groupDeaths INT UNSIGNED,
personalDeaths INT UNSIGNED,
completeTime INT UNSIGNED,
botCount TINYINT UNSIGNED DEFAULT '0',
CREATE TABLE mp_player_runs (
runId INT UNSIGNED AUTO_INCREMENT,
guid INT UNSIGNED NOT NULL DEFAULT '0',
difficulty INT UNSIGNED NOT NULL DEFAULT '3',
mapId INT UNSIGNED,
groupDeaths INT UNSIGNED,
personalDeaths INT UNSIGNED,
completeTime INT UNSIGNED,
botCount TINYINT UNSIGNED DEFAULT '0',
PRIMARY KEY (runId),
INDEX idx_guid (guid),
INDEX idx_mapId (mapId)
);
--- Used for tracking player stats in mythic dungeons
-- Used for tracking player stats in mythic dungeons
DROP TABLE IF EXISTS mp_player_stats;
CREATE TABLE mp_player_stats (
guid INT UNSIGNED NOT NULL DEFAULT '0',
mapId INT UNSIGNED NOT NULL DEFAULT '0',
difficulty TINYINT UNSIGNED NOT NULL DEFAULT '0',
deaths INT UNSIGNED DEFAULT '0',
runs INT UNSIGNED DEFAULT '0',
completions INT UNSIGNED DEFAULT '0',
totalTime INT UNSIGNED DEFAULT '0',
bestTime INT UNSIGNED DEFAULT '0',
guid INT UNSIGNED NOT NULL DEFAULT '0',
mapId INT UNSIGNED NOT NULL DEFAULT '0',
difficulty TINYINT UNSIGNED NOT NULL DEFAULT '0',
deaths INT UNSIGNED DEFAULT '0',
runs INT UNSIGNED DEFAULT '0',
completions INT UNSIGNED DEFAULT '0',
totalTime INT UNSIGNED DEFAULT '0',
bestTime INT UNSIGNED DEFAULT '0',
PRIMARY KEY (guid, mapId, difficulty)
);
--- Used to enable custom stat upgrads from materials and drops in mythic dungeons
-- Used to enable custom stat upgrades from materials and drops in mythic dungeons
DROP TABLE IF EXISTS mp_player_stat_upgrades;
CREATE TABLE mp_player_stat_upgrades
(
guid INT UNSIGNED NOT NULL,
statTypeId INT UNSIGNED NOT NULL,
bonus Float NOT NULL,
upgradeRank INT UNSIGNED NOT NULL,
materialSpent INT UNSIGNED NOT NULL DEFAULT '0',
diceSpent INT UNSIGNED NOT NULL DEFAULT '0',
CREATE TABLE mp_player_stat_upgrades (
guid INT UNSIGNED NOT NULL,
advancementId INT UNSIGNED NOT NULL,
bonus FLOAT NOT NULL,
upgradeRank INT UNSIGNED NOT NULL,
diceSpent INT UNSIGNED NOT NULL DEFAULT '0',
PRIMARY KEY (guid, statTypeId)
PRIMARY KEY (guid, advancementId)
);

View File

@@ -1,45 +1,47 @@
--- Used to track upgrade ranks for stat improvements and min/max values
-- Used to track upgrade ranks for stat improvements and min/max values
DROP TABLE IF EXISTS mp_stat_upgrade_ranks;
CREATE TABLE mp_stat_upgrade_ranks
(
upgradeRank INT UNSIGNED NOT NULL,
statTypeId INT UNSIGNED NOT NULL,
materialId1 INT UNSIGNED NOT NULL,
materialId2 INT UNSIGNED NOT NULL,
materialId3 INT UNSIGNED NOT NULL,
materialCost INT UNSIGNED NOT NULL,
materialCost2 INT UNSIGNED NOT NULL,
materialCost3 INT UNSIGNED NOT NULL,
minIncrease1 INT UNSIGNED NOT NULL,
maxIncrease1 INT UNSIGNED NOT NULL,
minIncrease2 INT UNSIGNED NOT NULL,
maxIncrease2 INT UNSIGNED NOT NULL,
minIncrease3 INT UNSIGNED NOT NULL,
maxIncrease3 INT UNSIGNED NOT NULL,
chanceCost1 INT UNSIGNED NOT NULL,
chanceCost2 INT UNSIGNED NOT NULL,
chanceCost3 INT UNSIGNED NOT NULL,
CREATE TABLE mp_stat_upgrade_ranks (
upgradeRank INT UNSIGNED NOT NULL,
advancementId INT UNSIGNED NOT NULL,
materialId1 INT UNSIGNED NOT NULL,
materialId2 INT UNSIGNED NOT NULL,
materialId3 INT UNSIGNED NOT NULL,
materialCost1 INT UNSIGNED NOT NULL,
materialCost2 INT UNSIGNED NOT NULL,
materialCost3 INT UNSIGNED NOT NULL,
minIncrease1 INT UNSIGNED NOT NULL,
maxIncrease1 INT UNSIGNED NOT NULL,
minIncrease2 INT UNSIGNED NOT NULL,
maxIncrease2 INT UNSIGNED NOT NULL,
minIncrease3 INT UNSIGNED NOT NULL,
maxIncrease3 INT UNSIGNED NOT NULL,
chanceCost1 INT UNSIGNED NOT NULL,
chanceCost2 INT UNSIGNED NOT NULL,
chanceCost3 INT UNSIGNED NOT NULL,
PRIMARY KEY (upgradeRank, statTypeId)
PRIMARY KEY (upgradeRank, advancementId)
);
-- Used to allocate trade materials based on slot upgrades
DROP TABLE IF EXISTS mp_material_types;
CREATE TABLE mp_material_types
(
materialId INT UNSIGNED NOT NULL,
entry INT UNSIGNED NOT NULL,
name VARCHAR(255) NOT NULL,
CREATE TABLE mp_material_types (
materialId INT UNSIGNED NOT NULL,
entry INT UNSIGNED NOT NULL,
name VARCHAR(255) NOT NULL,
PRIMARY KEY (materialId, entry)
);
-- Description: Scale factors for Mythic+ dungeons used to normalize dungeon difficulty across expansions.
DROP TABLE IF EXISTS mp_scale_factors;
CREATE TABLE IF NOT EXISTS mp_scale_factors (
mapId SMALLINT PRIMARY KEY,
dmg_bonus INT,
spell_bonus INT,
hp_bonus INT,
difficulty INT,
max INT
CREATE TABLE mp_scale_factors (
mapId SMALLINT NOT NULL,
dmg_bonus INT DEFAULT '100',
spell_bonus INT DEFAULT '100',
hp_bonus INT DEFAULT '100',
difficulty INT DEFAULT '100',
max INT DEFAULT '100',
PRIMARY KEY (mapId)
);