mirror of
https://github.com/NathanHandley/mod-ah-bot-plus.git
synced 2026-01-13 01:08:37 +00:00
Compare commits
3 Commits
5561885b8b
...
55a403133e
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
55a403133e | ||
|
|
9bd64af3a9 | ||
|
|
dcb615212d |
@@ -45,7 +45,7 @@ The AuctionHouseBot module adds the following in-game commands (for GMs only):
|
||||
## Buying Bot Behavior
|
||||
|
||||
1. **Determining Items to Buy:** Every minute the buyer bot will select (BuyCandidatesPerBuyCycle) items currently up for auction which are listed by players as potential purchase items.
|
||||
2. **Price Willing to Pay:** The buyer bot will use the same item price calculation the seller bot uses, including the random +/- 25%, and that calculated price is then multiplied by (AcceptablePriceModifier) which then becomes the price the buyer will be willing to spend.
|
||||
2. **Price Willing to Pay:** The buyer bot will use the same item price calculation the seller bot uses, including the random +/- 25% (configurable), and that calculated price is then multiplied by (AcceptablePriceModifier) which then becomes the price the buyer will be willing to spend.
|
||||
3. **Buying it:** If the price calculated is higher than the buy out price, then the bot will buy it out. If not, it will test to see if it has been bidded on by a bot and if not, if the bid price is below the price it is willing to pay. If so, it will bid (outbid, so just over current bid).
|
||||
|
||||
The above behavior is replicated on each enabled auction house. If left to default settings, 1 item in each auction house will attempt to be bought from, if the price calculation seems favorable. Note that any item buy attempt, even items above buying price, consumes a buy candidate. That means that too many overpriced items can drown out potential sales.
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -68,8 +68,11 @@ AuctionHouseBot::AuctionHouseBot() :
|
||||
DisabledRecipeProducedItemFilterEnabled(false),
|
||||
ListedItemLevelRestrictedEnabled(false),
|
||||
ListedItemLevelRestrictedUseCraftedItemForCalculation(true),
|
||||
ListedItemLevelMax(999),
|
||||
ListedItemLevelMin(0),
|
||||
ListedItemLevelMax(999),
|
||||
ListedItemUseOrEquipRestrictedEnabled(false),
|
||||
ListedItemUseOrEquipRestrictMinLevel(0),
|
||||
ListedItemUseOrEquipRestrictMaxLevel(999),
|
||||
RandomStackRatioConsumable(1),
|
||||
RandomStackRatioContainer(1),
|
||||
RandomStackRatioWeapon(1),
|
||||
@@ -728,6 +731,29 @@ void AuctionHouseBot::PopulateItemCandidatesAndProportions()
|
||||
}
|
||||
}
|
||||
|
||||
// If there is a use/equip level exception, honor it
|
||||
if (ListedItemUseOrEquipRestrictedEnabled == true)
|
||||
{
|
||||
// Only test if it's not an exception
|
||||
if (ListedItemUseOrEquipExceptionItems.find(itr->second.ItemId) == ListedItemUseOrEquipExceptionItems.end())
|
||||
{
|
||||
uint32 useOrEquipLevelCompare = itr->second.RequiredLevel;
|
||||
|
||||
if (useOrEquipLevelCompare > 0 && useOrEquipLevelCompare < ListedItemUseOrEquipRestrictMinLevel)
|
||||
{
|
||||
if (debug_Out_Filters)
|
||||
LOG_ERROR("module", "AuctionHouseBot: Item {} disabled since item use or equip level is lower than EquipItemUseOrEquipLevelRestrict.MinItemLevel", itr->second.ItemId);
|
||||
continue;
|
||||
}
|
||||
if (useOrEquipLevelCompare > 0 && useOrEquipLevelCompare > ListedItemUseOrEquipRestrictMaxLevel)
|
||||
{
|
||||
if (debug_Out_Filters)
|
||||
LOG_ERROR("module", "AuctionHouseBot: Item {} disabled since item use or equip level is higher than EquipItemUseOrEquipLevelRestrict.MaxItemLevel", itr->second.ItemId);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Disabled items by Id
|
||||
if (DisabledItems.find(itr->second.ItemId) != DisabledItems.end())
|
||||
{
|
||||
@@ -824,7 +850,8 @@ void AuctionHouseBot::PopulateItemCandidatesAndProportions()
|
||||
itr->second.Name1.find("]") != std::string::npos ||
|
||||
itr->second.Name1.find("D'Sak") != std::string::npos ||
|
||||
itr->second.Name1.find("(") != std::string::npos ||
|
||||
itr->second.Name1.find("OLD") != std::string::npos))
|
||||
itr->second.Name1.find("OLD") != std::string::npos ||
|
||||
itr->second.Name1.find("PVP") != std::string::npos))
|
||||
{
|
||||
if (debug_Out_Filters)
|
||||
LOG_ERROR("module", "AuctionHouseBot: Item {} disabled item with a temp or unused item name", itr->second.ItemId);
|
||||
@@ -850,22 +877,6 @@ void AuctionHouseBot::PopulateItemCandidatesAndProportions()
|
||||
continue;
|
||||
}
|
||||
|
||||
// Disable common weapons
|
||||
if (itr->second.Quality == ITEM_QUALITY_NORMAL && itr->second.Class == ITEM_CLASS_WEAPON)
|
||||
{
|
||||
if (debug_Out_Filters)
|
||||
LOG_ERROR("module", "AuctionHouseBot: Item {} disabled common weapon", itr->second.ItemId);
|
||||
continue;
|
||||
}
|
||||
|
||||
// Disable common armor
|
||||
if (itr->second.Quality == ITEM_QUALITY_NORMAL && itr->second.Class == ITEM_CLASS_ARMOR)
|
||||
{
|
||||
if (debug_Out_Filters)
|
||||
LOG_ERROR("module", "AuctionHouseBot: Item {} disabled common non-misc armor", itr->second.ItemId);
|
||||
continue;
|
||||
}
|
||||
|
||||
// Store the item ID
|
||||
ItemCandidatesByItemClassAndQuality[itr->second.Class][itr->second.Quality].push_back(itr->second.ItemId);
|
||||
}
|
||||
@@ -2048,6 +2059,13 @@ void AuctionHouseBot::InitializeConfiguration()
|
||||
ListedItemIDExceptionItems.clear();
|
||||
ParseNumberListToSet(ListedItemIDExceptionItems, sConfigMgr->GetOption<std::string>("AuctionHouseBot.ListedItemIDRestrict.ExceptionItemIDs", ""), "ListedItemIDRestrict.ExceptionItemIDs");
|
||||
|
||||
// Equip or use restrictions
|
||||
ListedItemUseOrEquipRestrictedEnabled = sConfigMgr->GetOption<bool>("AuctionHouseBot.EquipItemUseOrEquipLevelRestrict.Enabled", false);
|
||||
ListedItemUseOrEquipRestrictMinLevel = sConfigMgr->GetOption("AuctionHouseBot.EquipItemUseOrEquipLevelRestrict.MinLevel", 0);
|
||||
ListedItemUseOrEquipRestrictMaxLevel = sConfigMgr->GetOption("AuctionHouseBot.EquipItemUseOrEquipLevelRestrict.MaxLevel", 999);
|
||||
ListedItemUseOrEquipExceptionItems.clear();
|
||||
ParseNumberListToSet(ListedItemUseOrEquipExceptionItems, sConfigMgr->GetOption<std::string>("AuctionHouseBot.EquipItemUseOrEquipLevelRestrict.ExceptionItemIDs", ""), "EquipItemUseOrEquipLevelRestrict.ExceptionItemIDs");
|
||||
|
||||
// Disabled Items
|
||||
DisabledItemTextFilter = sConfigMgr->GetOption<bool>("AuctionHouseBot.DisabledItemTextFilter", true);
|
||||
DisabledRecipeProducedItemFilterEnabled = sConfigMgr->GetOption<bool>("AuctionHouseBot.DisabledRecipeProducedItemFilterEnabled", false);
|
||||
|
||||
@@ -159,9 +159,13 @@ private:
|
||||
std::set<uint32> DisabledItems;
|
||||
bool ListedItemLevelRestrictedEnabled;
|
||||
bool ListedItemLevelRestrictedUseCraftedItemForCalculation;
|
||||
uint32 ListedItemLevelMax;
|
||||
uint32 ListedItemLevelMin;
|
||||
uint32 ListedItemLevelMax;
|
||||
std::set<uint32> ListedItemLevelExceptionItems;
|
||||
bool ListedItemUseOrEquipRestrictedEnabled;
|
||||
uint32 ListedItemUseOrEquipRestrictMinLevel;
|
||||
uint32 ListedItemUseOrEquipRestrictMaxLevel;
|
||||
std::set<uint32> ListedItemUseOrEquipExceptionItems;
|
||||
uint32 RandomStackRatioConsumable;
|
||||
uint32 RandomStackRatioContainer;
|
||||
uint32 RandomStackRatioWeapon;
|
||||
|
||||
Reference in New Issue
Block a user