Files
Viano-Core/sql/updates/0.5/1704_item_template.sql
T
Neo2003 9b1c0e006f [svn] * Proper SVN structure
--HG--
branch : trunk
2008-10-02 16:23:55 -05:00

10 lines
326 B
SQL

ALTER TABLE `item_template` ADD COLUMN `BuyCount` TINYINT(3) UNSIGNED NOT NULL DEFAULT 1 AFTER `Flags`;
ALTER TABLE `npc_vendor` DROP COLUMN `buycount`;
UPDATE `item_template`
SET `BuyCount` = (`BuyPrice` DIV (`SellPrice` * 4)) WHERE `SellPrice` > 0;
UPDATE `item_template`
SET `BuyCount` = 1 WHERE `BuyCount` = 0;