diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/game/AuctionHouseBot.cpp | 59 | ||||
-rw-r--r-- | src/game/AuctionHouseBot.h | 3 | ||||
-rw-r--r-- | src/trinitycore/Main.cpp | 2 | ||||
-rw-r--r-- | src/trinitycore/trinitycore.conf.dist | 17 |
4 files changed, 76 insertions, 5 deletions
diff --git a/src/game/AuctionHouseBot.cpp b/src/game/AuctionHouseBot.cpp index 873396406f3..861e822322c 100644 --- a/src/game/AuctionHouseBot.cpp +++ b/src/game/AuctionHouseBot.cpp @@ -19,6 +19,9 @@ AuctionHouseBot::AuctionHouseBot() Vendor_Items = false; Loot_Items = false; Other_Items = false; + Vendor_TGs = false; + Loot_TGs = false; + Other_TGs = false; No_Bind = false; Bind_When_Picked_Up = false; @@ -776,6 +779,9 @@ void AuctionHouseBot::Initialize() Vendor_Items = sConfig.GetBoolDefault("AuctionHouseBot.VendorItems", false); Loot_Items = sConfig.GetBoolDefault("AuctionHouseBot.LootItems", true); Other_Items = sConfig.GetBoolDefault("AuctionHouseBot.OtherItems", false); + Vendor_TGs = sConfig.GetBoolDefault("AuctionHouseBot.VendorTradeGoods", false); + Loot_TGs = sConfig.GetBoolDefault("AuctionHouseBot.LootTradeGoods", true); + Other_TGs = sConfig.GetBoolDefault("AuctionHouseBot.OtherTradeGoods", false); No_Bind = sConfig.GetBoolDefault("AuctionHouseBot.No_Bind", true); Bind_When_Picked_Up = sConfig.GetBoolDefault("AuctionHouseBot.Bind_When_Picked_Up", false); @@ -929,7 +935,7 @@ void AuctionHouseBot::Initialize() if ((prototype->Quality < 0) || (prototype->Quality > 6)) continue; - if (Vendor_Items == 0) + if ((Vendor_Items == 0) && !(prototype->Class == ITEM_CLASS_TRADE_GOODS)) { bool isVendorItem = false; @@ -943,7 +949,21 @@ void AuctionHouseBot::Initialize() continue; } - if (Loot_Items == 0) + if ((Vendor_TGs == 0) && (prototype->Class == ITEM_CLASS_TRADE_GOODS)) + { + bool isVendorTG = false; + + for (unsigned int i = 0; (i < npcItems.size()) && (!isVendorTG); i++) + { + if (itemID == npcItems[i]) + isVendorTG = true; + } + + if (isVendorTG) + continue; + } + + if ((Loot_Items == 0) && !(prototype->Class == ITEM_CLASS_TRADE_GOODS)) { bool isLootItem = false; @@ -957,7 +977,21 @@ void AuctionHouseBot::Initialize() continue; } - if (Other_Items == 0) + if ((Loot_TGs == 0) && (prototype->Class == ITEM_CLASS_TRADE_GOODS)) + { + bool isLootTG = false; + + for (unsigned int i = 0; (i < lootItems.size()) && (!isLootTG); i++) + { + if (itemID == lootItems[i]) + isLootTG = true; + } + + if (isLootTG) + continue; + } + + if ((Other_Items == 0) && !(prototype->Class == ITEM_CLASS_TRADE_GOODS)) { bool isVendorItem = false; bool isLootItem = false; @@ -976,6 +1010,25 @@ void AuctionHouseBot::Initialize() continue; } + if ((Other_TGs == 0) && (prototype->Class == ITEM_CLASS_TRADE_GOODS)) + { + bool isVendorTG = false; + bool isLootTG = false; + + for (unsigned int i = 0; (i < npcItems.size()) && (!isVendorTG); i++) + { + if (itemID == npcItems[i]) + isVendorTG = true; + } + for (unsigned int i = 0; (i < lootItems.size()) && (!isLootTG); i++) + { + if (itemID == lootItems[i]) + isLootTG = true; + } + if ((!isLootTG) && (!isVendorTG)) + continue; + } + //TODO:Make list of items and create a vector // Disable PTR/Beta/Unused items if ((DisableBeta_PTR_Unused) && ((prototype->ItemId == 21878) || (prototype->ItemId == 27774) || (prototype->ItemId == 27811) || (prototype->ItemId == 28117) || (prototype->ItemId == 28112))) diff --git a/src/game/AuctionHouseBot.h b/src/game/AuctionHouseBot.h index 65003f91803..f306d1b5422 100644 --- a/src/game/AuctionHouseBot.h +++ b/src/game/AuctionHouseBot.h @@ -925,6 +925,9 @@ private: bool Vendor_Items; bool Loot_Items; bool Other_Items; + bool Vendor_TGs; + bool Loot_TGs; + bool Other_TGs; bool No_Bind; bool Bind_When_Picked_Up; diff --git a/src/trinitycore/Main.cpp b/src/trinitycore/Main.cpp index e744f74c5a1..1005e0d838a 100644 --- a/src/trinitycore/Main.cpp +++ b/src/trinitycore/Main.cpp @@ -40,7 +40,7 @@ // Format is YYYYMMDDRR where RR is the change in the conf file // for that day. #ifndef _TRINITY_CORE_CONFVER -# define _TRINITY_CORE_CONFVER 2009081701 +# define _TRINITY_CORE_CONFVER 2009081702 #endif //_TRINITY_CORE_CONFVER #ifdef WIN32 diff --git a/src/trinitycore/trinitycore.conf.dist b/src/trinitycore/trinitycore.conf.dist index 2f77ec2873a..2f59ebd0304 100644 --- a/src/trinitycore/trinitycore.conf.dist +++ b/src/trinitycore/trinitycore.conf.dist @@ -1,7 +1,7 @@ ########################################## # Trinity Core worldd configuration file # ########################################## -ConfVersion=2009081701 +ConfVersion=2009081702 ################################################################################################################### # CONNECTIONS AND DIRECTORIES @@ -1556,14 +1556,26 @@ AuctionHouseBot.ItemsPerCycle = 200 # Include items that can be bought from vendors. # Default 0 (False) # +# AuctionHouseBot.VendorTradeGoods +# Include Trade Goods that can be bought from vendors. +# Default 0 (False) +# # AuctionHouseBot.LootItems # Include items that can be looted or fished for. # Default 1 (True) # +# AuctionHouseBot.LootTradeGoods +# Include Trade Goods that can be looted or fished for. +# Default 1 (True) +# # AuctionHouseBot.OtherItems # Include misc. items. # Default 0 (False) # +# AuctionHouseBot.OtherTradeGoods +# Include misc. Trade Goods. +# Default 0 (False) +# # AuctionHouseBot.Bonding_types # Indicates which bonding types to allow seller to put up for auction # No_Bind @@ -1623,8 +1635,11 @@ AuctionHouseBot.ItemsPerCycle = 200 ################################################################################################################### AuctionHouseBot.VendorItems = 0 +AuctionHouseBot.VendorTradeGoods = 0 AuctionHouseBot.LootItems = 1 +AuctionHouseBot.LootTradeGoods = 1 AuctionHouseBot.OtherItems = 0 +AuctionHouseBot.OtherTradeGoods = 0 AuctionHouseBot.No_Bind = 1 AuctionHouseBot.Bind_When_Picked_Up = 0 AuctionHouseBot.Bind_When_Equipped = 1 |