mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-20 01:15:35 +01:00
Revert "Core/AuctionHouse: use DisableMgr to disable specific items (#19289)"
This reverts commit f6d3a5b9b9.
This commit is contained in:
1
sql/updates/world/3.3.5/2019_03_12_01_world.sql
Normal file
1
sql/updates/world/3.3.5/2019_03_12_01_world.sql
Normal file
@@ -0,0 +1 @@
|
||||
DELETE FROM `disables` WHERE `sourceType` = 9;
|
||||
@@ -147,12 +147,7 @@ void AuctionBotConfig::GetConfigFromFile()
|
||||
SetConfigMax(CONFIG_AHBOT_NEUTRAL_ITEM_AMOUNT_RATIO, "AuctionHouseBot.Neutral.Items.Amount.Ratio", 100, 10000);
|
||||
|
||||
SetAHBotIncludes(sConfigMgr->GetStringDefault("AuctionHouseBot.forceIncludeItems", ""));
|
||||
std::string ahBotExcludes = sConfigMgr->GetStringDefault("AuctionHouseBot.forceExcludeItems", "");
|
||||
if (!ahBotExcludes.empty())
|
||||
{
|
||||
TC_LOG_WARN("server.loading", "AuctionHouseBot.forceExcludeItems will be deleted soon. Please, use `disables` table instead with `sourceType`=9, `flags`=2 and `entry`=<item id>.");
|
||||
SetAHBotExcludes(ahBotExcludes);
|
||||
}
|
||||
SetAHBotExcludes(sConfigMgr->GetStringDefault("AuctionHouseBot.forceExcludeItems", ""));
|
||||
|
||||
SetConfig(CONFIG_AHBOT_BUYER_ALLIANCE_ENABLED, "AuctionHouseBot.Buyer.Alliance.Enabled", false);
|
||||
SetConfig(CONFIG_AHBOT_BUYER_HORDE_ENABLED, "AuctionHouseBot.Buyer.Horde.Enabled", false);
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
#include "Containers.h"
|
||||
#include "DatabaseEnv.h"
|
||||
#include "DBCStores.h"
|
||||
#include "DisableMgr.h"
|
||||
#include "GameTime.h"
|
||||
#include "Item.h"
|
||||
#include "Log.h"
|
||||
@@ -63,6 +62,7 @@ bool AuctionBotSeller::Initialize()
|
||||
}
|
||||
|
||||
TC_LOG_DEBUG("ahbot", "Forced Inclusion %u items", (uint32)includeItems.size());
|
||||
TC_LOG_DEBUG("ahbot", "Forced Exclusion %u items", (uint32)excludeItems.size());
|
||||
|
||||
TC_LOG_DEBUG("ahbot", "Loading npc vendor items for filter..");
|
||||
CreatureTemplateContainer const& creatures = sObjectMgr->GetCreatureTemplates();
|
||||
@@ -120,9 +120,6 @@ bool AuctionBotSeller::Initialize()
|
||||
if (excludeItems.count(itemId))
|
||||
continue;
|
||||
|
||||
if (DisableMgr::IsDisabledFor(DISABLE_TYPE_ITEM, itemId, nullptr, ITEM_DISABLE_AUCTIONHOUSE_BOT))
|
||||
continue;
|
||||
|
||||
// forced include filter
|
||||
if (includeItems.count(itemId))
|
||||
{
|
||||
|
||||
@@ -47,7 +47,7 @@ namespace
|
||||
|
||||
DisableMap m_DisableMap;
|
||||
|
||||
uint8 MAX_DISABLE_TYPES = 10;
|
||||
uint8 MAX_DISABLE_TYPES = 9;
|
||||
}
|
||||
|
||||
void LoadDisables()
|
||||
@@ -256,20 +256,6 @@ void LoadDisables()
|
||||
}
|
||||
break;
|
||||
}
|
||||
case DISABLE_TYPE_ITEM:
|
||||
{
|
||||
if (!sObjectMgr->GetItemTemplate(entry))
|
||||
{
|
||||
TC_LOG_ERROR("sql.sql", "Item entry %u from `disables` doesn't exist in item_template, skipped.", entry);
|
||||
continue;
|
||||
}
|
||||
if (!flags || flags > MAX_ITEM_DISABLE_TYPE)
|
||||
{
|
||||
TC_LOG_ERROR("sql.sql", "Disable flags for item %u are invalid, skipped.", entry);
|
||||
continue;
|
||||
}
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@@ -410,7 +396,6 @@ bool IsDisabledFor(DisableType type, uint32 entry, WorldObject const* ref, uint8
|
||||
case DISABLE_TYPE_MMAP:
|
||||
return true;
|
||||
case DISABLE_TYPE_VMAP:
|
||||
case DISABLE_TYPE_ITEM:
|
||||
return (flags & itr->second.flags) != 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -33,8 +33,7 @@ enum DisableType
|
||||
DISABLE_TYPE_OUTDOORPVP = 5,
|
||||
DISABLE_TYPE_VMAP = 6,
|
||||
DISABLE_TYPE_MMAP = 7,
|
||||
DISABLE_TYPE_LFG_MAP = 8,
|
||||
DISABLE_TYPE_ITEM = 9
|
||||
DISABLE_TYPE_LFG_MAP = 8
|
||||
};
|
||||
|
||||
enum SpellDisableTypes
|
||||
@@ -55,18 +54,6 @@ enum SpellDisableTypes
|
||||
SPELL_DISABLE_BATTLEGROUNDS),
|
||||
};
|
||||
|
||||
enum ItemDisableTypes
|
||||
{
|
||||
ITEM_DISABLE_AUCTIONHOUSE = 0x01,
|
||||
ITEM_DISABLE_AUCTIONHOUSE_BOT = 0x02,
|
||||
/* @todo
|
||||
ITEM_DISABLE_VENDOR = 0x04,
|
||||
ITEM_DISABLE_QUEST = 0x08,
|
||||
ITEM_DISABLE_DROP = 0x10,
|
||||
*/
|
||||
MAX_ITEM_DISABLE_TYPE = ( ITEM_DISABLE_AUCTIONHOUSE | ITEM_DISABLE_AUCTIONHOUSE_BOT /*| ITEM_DISABLE_VENDOR | ITEM_DISABLE_QUEST | ITEM_DISABLE_DROP*/)
|
||||
};
|
||||
|
||||
enum MMapDisableTypes
|
||||
{
|
||||
MMAP_DISABLE_PATHFINDING = 0x0
|
||||
|
||||
@@ -23,7 +23,6 @@
|
||||
#include "Creature.h"
|
||||
#include "DatabaseEnv.h"
|
||||
#include "DBCStructure.h"
|
||||
#include "DisableMgr.h"
|
||||
#include "GameTime.h"
|
||||
#include "Item.h"
|
||||
#include "Language.h"
|
||||
@@ -209,12 +208,6 @@ void WorldSession::HandleAuctionSellItem(WorldPacket& recvData)
|
||||
if (itemEntry == 0)
|
||||
itemEntry = item->GetTemplate()->ItemId;
|
||||
|
||||
if (DisableMgr::IsDisabledFor(DISABLE_TYPE_ITEM, itemEntry, nullptr, ITEM_DISABLE_AUCTIONHOUSE))
|
||||
{
|
||||
SendAuctionCommandResult(0, AUCTION_SELL_ITEM, ERR_AUCTION_DATABASE_ERROR);
|
||||
return;
|
||||
}
|
||||
|
||||
if (sAuctionMgr->GetAItem(item->GetGUID().GetCounter()) || !item->CanBeTraded() || item->IsNotEmptyBag() ||
|
||||
(item->GetTemplate()->Flags & ITEM_FLAG_CONJURED) || item->GetUInt32Value(ITEM_FIELD_DURATION) ||
|
||||
item->GetCount() < count[i] || itemEntry != item->GetTemplate()->ItemId)
|
||||
|
||||
@@ -3646,6 +3646,16 @@ AuctionHouseBot.Class.Container.ItemLevel.Max = 0
|
||||
|
||||
AuctionHouseBot.forceIncludeItems = ""
|
||||
|
||||
#
|
||||
# AuctionHouseBot.forceExcludeItems
|
||||
# Description: Exclude these items even if they would pass the filters
|
||||
# List of ids with delimiter ','
|
||||
# Example: "21878,27774,27811,28117,28122,43949" (this removes old items)
|
||||
# Default: ""
|
||||
#
|
||||
|
||||
AuctionHouseBot.forceExcludeItems = "6343,6345,6376"
|
||||
|
||||
#
|
||||
# AuctionHouseBot.Class.RandomStackRatio.*
|
||||
# Description: Used to determine how often a stack of the class will be single or randomly-size stacked when posted
|
||||
|
||||
Reference in New Issue
Block a user