[11744] Include spell_loot_template in ahbot loot filter

Also skip item=0 cases from loot tables.

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
NeatElves 2011-07-19 07:09:49 +04:00 committed by VladimirMangos
parent 3e0cacbdaf
commit d1d4973f95
2 changed files with 15 additions and 10 deletions

View file

@ -912,21 +912,26 @@ bool AuctionBotSeller::Initialize()
sLog.outString("Loading loot items for filter..");
if (QueryResult* result = WorldDatabase.PQuery(
"SELECT `item` FROM `creature_loot_template` UNION "
"SELECT `item` FROM `disenchant_loot_template` UNION "
"SELECT `item` FROM `fishing_loot_template` UNION "
"SELECT `item` FROM `gameobject_loot_template` UNION "
"SELECT `item` FROM `item_loot_template` UNION "
"SELECT `item` FROM `milling_loot_template` UNION "
"SELECT `item` FROM `pickpocketing_loot_template` UNION "
"SELECT `item` FROM `prospecting_loot_template` UNION "
"SELECT `item` FROM `skinning_loot_template`"))
"SELECT item FROM creature_loot_template UNION "
"SELECT item FROM disenchant_loot_template UNION "
"SELECT item FROM fishing_loot_template UNION "
"SELECT item FROM gameobject_loot_template UNION "
"SELECT item FROM item_loot_template UNION "
"SELECT item FROM milling_loot_template UNION "
"SELECT item FROM pickpocketing_loot_template UNION "
"SELECT item FROM prospecting_loot_template UNION "
"SELECT item FROM spell_loot_template"))
{
BarGoLink bar(result->GetRowCount());
do
{
bar.step();
Field* fields = result->Fetch();
uint32 entry = fields[0].GetUInt32();
if (!entry)
continue;
lootItems.push_back(fields[0].GetUInt32());
} while (result->NextRow());
delete result;

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "11743"
#define REVISION_NR "11744"
#endif // __REVISION_NR_H__