feat. Move awards to database and enable races/classes (#27)

* feat. Move awards to database and enable races/classes

* feat. Allow multiple records in the table

* feat. Check that the values in the register are greater than zero
This commit is contained in:
Walter Pagani 2023-07-19 07:17:47 -03:00 committed by GitHub
parent 5961c1bd12
commit 8e4aef41dc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 162 additions and 266 deletions

0
data/.gitkeep Normal file
View file

0
data/sql/.gitkeep Normal file
View file

View file

@ -0,0 +1,4 @@
SET @ENTRY:=60000;
DELETE FROM `acore_string` WHERE `entry` BETWEEN @ENTRY+0 AND @ENTRY+1;
INSERT INTO `acore_string` (`entry`, `content_default`, `locale_koKR`, `locale_frFR`, `locale_deDE`, `locale_zhCN`, `locale_zhTW`, `locale_esES`, `locale_esMX`, `locale_ruRU`) VALUES
(@ENTRY+0, 'This server is running the |cff4CFF00CongratsOnLevel |rmodule.', '', '', '', '', '', 'Este servidor está ejecutando el módulo |cff4CFF00CongratsOnLevel|r', 'Este servidor está ejecutando el módulo |cff4CFF00CongratsOnLevel|r', '');

View file

@ -0,0 +1,20 @@
CREATE TABLE IF NOT EXISTS `mod_congrats_on_level_items` (
`level` tinyint unsigned NOT NULL DEFAULT '0',
`money` int unsigned NOT NULL DEFAULT '0',
`spell` int unsigned NOT NULL DEFAULT '0',
`itemId1` int unsigned NOT NULL DEFAULT '0',
`itemId2` int unsigned NOT NULL DEFAULT '0',
`race` tinyint unsigned NOT NULL DEFAULT '0',
`class` tinyint unsigned NOT NULL DEFAULT '0'
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
DELETE FROM `mod_congrats_on_level_items`;
INSERT INTO `mod_congrats_on_level_items` (`level`, `money`, `spell`, `itemId1`, `itemId2`, `race`, `class`) VALUES
(10, 1, 20217, 3419, 45063, 0, 0),
(20, 10, 48161, 5433, 38578, 0, 0),
(30, 15, 48469, 18231, 46780, 0, 0),
(40, 20, 20217, 31945, 49704, 0, 0),
(50, 25, 48161, 11382, 32542, 0, 0),
(60, 30, 48469, 37863, 33219, 0, 0),
(70, 35, 48161, 9360, 54212, 0, 0),
(80, 100, 20217, 9361, 40110, 0, 0);