aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChaz Brown <iamparadox@netscape.net>2009-08-17 11:37:05 -0400
committerChaz Brown <iamparadox@netscape.net>2009-08-17 11:37:05 -0400
commitd0cd451f4ffc96b8273efaf25633f604e67b174f (patch)
tree90eab05b1031bfb0d64f5296dc440d21d1841f69
parent5047eb7a6265d2bf496ef22d7c9a6b30fa21d466 (diff)
New Filters added to AHBot, moved into AI section for VS
--HG-- branch : trunk
-rw-r--r--README.AHBOT6
-rw-r--r--src/game/AuctionHouseBot.cpp59
-rw-r--r--src/game/AuctionHouseBot.h3
-rw-r--r--src/trinitycore/Main.cpp2
-rw-r--r--src/trinitycore/trinitycore.conf.dist17
-rw-r--r--win/VC90/game.vcproj26
6 files changed, 95 insertions, 18 deletions
diff --git a/README.AHBOT b/README.AHBOT
index cec48b8bcc6..9f0099725da 100644
--- a/README.AHBOT
+++ b/README.AHBOT
@@ -39,8 +39,11 @@ AuctionHouseBot.ItemsPerCycle determines how many items are added each time AHBo
#These are the Filters For filtering certain items/trade goods from the AH
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
@@ -58,8 +61,11 @@ AuctionHouseBot.DisableDuration = 0
AuctionHouseBot.DisableBOP_Or_Quest_NoReqLevel = 0
AuctionHouseBot.VendorItems is a boolean value (0 or 1) that indicates whether to include Vendor only items
+AuctionHouseBot.VendorTradeGoods is a boolean value (0 or 1) that indicates whether to include Vendor only Trade Goods
AuctionHouseBot.LootItems is a boolean value (0 or 1) that indicates whether to include Loot/Fish/Skin/etc. only items
+AuctionHouseBot.LootTradeGoods is a boolean value (0 or 1) that indicates whether to include Loot/Fish/Skin/etc. only Trade Goods
AuctionHouseBot.OtherItems is a boolean value (0 or 1) that indicates whether to include Other items not covered by the first 2
+AuctionHouseBot.OtherTradeGoods is a boolean value (0 or 1) that indicates whether to include Other Trade Goods not covered by the first 2
AuctionHouseBot.No_Bind is a boolean value (0 or 1) that indicates whether to include items with a bonding of 0
AuctionHouseBot.Bind_When_Picked_Up = is a boolean value (0 or 1) that indicates whether to include items with a bonding of 1
AuctionHouseBot.Bind_When_Equipped = is a boolean value (0 or 1) that indicates whether to include items with a bonding of 2
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
diff --git a/win/VC90/game.vcproj b/win/VC90/game.vcproj
index 8c9b0895208..0d9ad6ab5ec 100644
--- a/win/VC90/game.vcproj
+++ b/win/VC90/game.vcproj
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
- Version="9,00"
+ Version="9.00"
Name="game"
ProjectGUID="{1DC6C4DA-A028-41F3-877D-D5400C594F88}"
RootNamespace="game"
@@ -1334,18 +1334,6 @@
RelativePath="..\..\src\game\ZoneScript.h"
>
</File>
- <Filter
- Name="AuctionHouseBot"
- >
- <File
- RelativePath="..\..\src\game\AuctionHouseBot.cpp"
- >
- </File>
- <File
- RelativePath="..\..\src\game\AuctionHouseBot.h"
- >
- </File>
- </Filter>
</Filter>
<Filter
Name="Server"
@@ -1622,6 +1610,18 @@
RelativePath="..\..\src\game\UnitAI.h"
>
</File>
+ <Filter
+ Name="AuctionHouseBot"
+ >
+ <File
+ RelativePath="..\..\src\game\AuctionHouseBot.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\src\game\AuctionHouseBot.h"
+ >
+ </File>
+ </Filter>
</Filter>
<Filter
Name="OutdoorPvP"