aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sql/updates/world/2012_09_20_00_world_creature_loot_template.sql5
1 files changed, 5 insertions, 0 deletions
diff --git a/sql/updates/world/2012_09_20_00_world_creature_loot_template.sql b/sql/updates/world/2012_09_20_00_world_creature_loot_template.sql
new file mode 100644
index 00000000000..8463b064bf9
--- /dev/null
+++ b/sql/updates/world/2012_09_20_00_world_creature_loot_template.sql
@@ -0,0 +1,5 @@
+SET @exists = (SELECT 1 FROM `creature_loot_template` WHERE `entry`=100002);
+DELETE FROM `creature_loot_template` WHERE `entry`=100002 AND @exists = 1;
+DELETE FROM `creature_loot_template` WHERE `mincountOrRef`=-35069 AND @exists = 1;
+INSERT INTO `creature_loot_template`(`entry`,`item`,`ChanceOrQuestChance`,`lootmode`,`groupid`,`mincountOrRef`,`maxcount`) SELECT `entry`,1,100,1,0,-35069,2 FROM `creature_template` WHERE `lootid` = 100002 AND @exists = 1; -- 2 selection from reference
+UPDATE `creature_template` SET `lootid`=`entry` WHERE `lootid` = 100002 AND @exists = 1;