-
Notifications
You must be signed in to change notification settings - Fork 490
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement creature group based selection of creature ids.
- Loading branch information
Showing
5 changed files
with
197 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
DROP PROCEDURE IF EXISTS add_migration; | ||
delimiter ?? | ||
CREATE PROCEDURE `add_migration`() | ||
BEGIN | ||
DECLARE v INT DEFAULT 1; | ||
SET v = (SELECT COUNT(*) FROM `migrations` WHERE `id`='20230904190328'); | ||
IF v=0 THEN | ||
INSERT INTO `migrations` VALUES ('20230904190328'); | ||
-- Add your query below. | ||
|
||
|
||
-- Add table to allow limiting number of times a creature id is selected in group. | ||
CREATE TABLE IF NOT EXISTS `creature_groups_entry_limit` ( | ||
`leader_guid` int(11) unsigned NOT NULL, | ||
`creature_id` int(11) unsigned NOT NULL, | ||
`min_count` int(11) unsigned NOT NULL DEFAULT '0', | ||
`max_count` int(11) unsigned NOT NULL DEFAULT '1', | ||
PRIMARY KEY (`leader_guid`,`creature_id`) | ||
) ENGINE=MyISAM; | ||
|
||
-- End of migration. | ||
END IF; | ||
END?? | ||
delimiter ; | ||
CALL add_migration(); | ||
DROP PROCEDURE IF EXISTS add_migration; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters