Removed trailing whitespaces and CRLFs
[getmangos.git] / sql / updates / 0.6 / 2469_skinning_loot_template.sql
blob0db557ced25055c8040283062435cbce9ce7ce2a
1 DROP TABLE IF EXISTS `skinning_loot_template`;
2 CREATE TABLE `skinning_loot_template` (
3   `entry` int(11) unsigned NOT NULL default '0',
4   `item` int(11) unsigned NOT NULL default '0',
5   `chance` float NOT NULL default '100',
6   `questchance` float NOT NULL default '0',
7   PRIMARY KEY  (`entry`,`item`)
8 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Loot System';
10 DROP TABLE IF EXISTS `skinning_loot_template_alternative`;
11 CREATE TABLE `skinning_loot_template_alternative` (
12   `item` int(11) unsigned NOT NULL default '0',
13   `item2` int(11) unsigned NOT NULL default '0',
14   PRIMARY KEY  (`item`)
15 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Loot System';
17 update `creature_template` set `skinloot` =
18 case `type`
19   when 2 then 100001  #CREATURE_TYPE_DRAGON
20   when 1 then         #CREATURE_TYPE_BEAST
21     case `family`
22       when 7  then 0       #CREATURE_FAMILY_CARRION_BIRD
23       when 26 then 0       #CREATURE_FAMILY_OWL
24       when 21 then 100002  #CREATURE_FAMILY_TURTLE
25       else if (`minlevel` > 48, 100003,
26            if (`minlevel` > 36, 100004,
27            if (`minlevel` > 25, 100005,
28            if (`minlevel` > 15, 100006,
29            if (`minlevel` >  3, 100007,
30                                 100008 )))))
31     end
32   else 0
33 end;
35 insert into `skinning_loot_template` values
36   (100001, 8165,100, 0),
37   (100002, 8167,100, 0),
38   (100003, 8170,100, 0),
39   (100004, 4304,100, 0),
40   (100005, 4234,100, 0),
41   (100006, 2319,100, 0),
42   (100007, 2318,100, 0),
43   (100008, 2934,100, 0);
45 insert into `skinning_loot_template_alternative` values
46   (8170,8171),
47   (4304,8169),
48   (4234,8235),
49   (2319,4232),
50   (2318, 783);