Implement global loot system Fixes #619

This should allow us to emulate lives global tables

The options available to filter tables are min_level, max_level, race,
rare, raid, race, class, bodytype, and zone.

race, class, bodytype, and zone are a pipe | separated list of IDs
This commit is contained in:
Michael Cook (mackal)
2018-02-10 22:15:21 -05:00
parent 0b97db9fd2
commit c5e4bb08f4
23 changed files with 372 additions and 27 deletions
+1
View File
@@ -372,6 +372,7 @@
9116|2017_12_16_GroundSpawn_Respawn_Timer.sql|SHOW COLUMNS FROM `ground_spawns` WHERE Field = 'respawn_timer' AND Type = 'int(11) unsigned'|empty|
9117|2018_02_01_NPC_Spells_Min_Max_HP.sql|SHOW COLUMNS FROM `npc_spells_entries` LIKE 'min_hp'|empty|
9118|2018_02_04_Charm_Stats.sql|SHOW COLUMNS FROM `npc_types` LIKE 'charm_ac'|empty|
9119|2018_02_10_GlobalLoot.sql|SHOW TABLES LIKE 'global_loot'|empty|
# Upgrade conditions:
# This won't be needed after this system is implemented, but it is used database that are not
@@ -0,0 +1,19 @@
ALTER TABLE `npc_types` ADD `skip_global_loot` TINYINT DEFAULT '0';
ALTER TABLE `npc_types` ADD `rare_spawn` TINYINT DEFAULT '0';
CREATE TABLE global_loot (
id INT NOT NULL AUTO_INCREMENT,
description varchar(255),
loottable_id INT NOT NULL,
enabled TINYINT NOT NULL DEFAULT 1,
min_level INT NOT NULL DEFAULT 0,
max_level INT NOT NULL DEFAULT 0,
rare TINYINT NULL,
raid TINYINT NULL,
race MEDIUMTEXT NULL,
class MEDIUMTEXT NULL,
bodytype MEDIUMTEXT NULL,
zone MEDIUMTEXT NULL,
PRIMARY KEY (id)
);