aboutsummaryrefslogtreecommitdiff
path: root/src/shared/Database
diff options
context:
space:
mode:
authormegamage <none@none>2009-02-13 19:50:20 -0600
committermegamage <none@none>2009-02-13 19:50:20 -0600
commita72c0d223d41bcea12a320b0f6b021b0367aef43 (patch)
tree8b1b4d71a39fe28d8a4dda8b42292d4f2ea5a94a /src/shared/Database
parent468132696af25b8192320635970f53cc447297e7 (diff)
[7266] Use DBC data for auction cut/deposit percents and location (auiction house id in fact).
More auction related code refactoring, Move auction related code from ObjectMgr to AuctionHouseMgr. Author: VladimirMangos --HG-- branch : trunk
Diffstat (limited to 'src/shared/Database')
-rw-r--r--src/shared/Database/DBCStores.cpp4
-rw-r--r--src/shared/Database/DBCStores.h1
-rw-r--r--src/shared/Database/DBCStructure.h10
-rw-r--r--src/shared/Database/DBCfmt.cpp1
4 files changed, 15 insertions, 1 deletions
diff --git a/src/shared/Database/DBCStores.cpp b/src/shared/Database/DBCStores.cpp
index 9a5605060fb..b4fb79f2dd0 100644
--- a/src/shared/Database/DBCStores.cpp
+++ b/src/shared/Database/DBCStores.cpp
@@ -39,6 +39,7 @@ static AreaFlagByMapID sAreaFlagByMapID; // for instances wit
DBCStorage <AchievementEntry> sAchievementStore(Achievementfmt);
DBCStorage <AchievementCriteriaEntry> sAchievementCriteriaStore(AchievementCriteriafmt);
DBCStorage <AreaTriggerEntry> sAreaTriggerStore(AreaTriggerEntryfmt);
+DBCStorage <AuctionHouseEntry> sAuctionHouseStore(AuctionHouseEntryfmt);
DBCStorage <BankBagSlotPricesEntry> sBankBagSlotPricesStore(BankBagSlotPricesEntryfmt);
DBCStorage <BattlemasterListEntry> sBattlemasterListStore(BattlemasterListEntryfmt);
DBCStorage <BarberShopStyleEntry> sBarberShopStyleStore(BarberShopStyleEntryfmt);
@@ -193,7 +194,7 @@ void LoadDBCStores(const std::string& dataPath)
{
std::string dbcPath = dataPath+"dbc/";
- const uint32 DBCFilesCount = 70;
+ const uint32 DBCFilesCount = 71;
barGoLink bar( DBCFilesCount );
@@ -220,6 +221,7 @@ void LoadDBCStores(const std::string& dataPath)
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sAchievementCriteriaStore, dbcPath,"Achievement_Criteria.dbc");
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sAreaTriggerStore, dbcPath,"AreaTrigger.dbc");
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sAreaGroupStore, dbcPath,"AreaGroup.dbc");
+ LoadDBC(availableDbcLocales,bar,bad_dbc_files,sAuctionHouseStore, dbcPath,"AuctionHouse.dbc");
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sBankBagSlotPricesStore, dbcPath,"BankBagSlotPrices.dbc");
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sBattlemasterListStore, dbcPath,"BattlemasterList.dbc");
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sBarberShopStyleStore, dbcPath,"BarberShopStyle.dbc");
diff --git a/src/shared/Database/DBCStores.h b/src/shared/Database/DBCStores.h
index dbe5e9d3bf4..6aec6db3bed 100644
--- a/src/shared/Database/DBCStores.h
+++ b/src/shared/Database/DBCStores.h
@@ -137,6 +137,7 @@ extern DBCStorage <AchievementCriteriaEntry> sAchievementCriteriaStore;
extern DBCStorage <AreaTableEntry> sAreaStore;// recommend access using functions
extern DBCStorage <AreaGroupEntry> sAreaGroupStore;
extern DBCStorage <AreaTriggerEntry> sAreaTriggerStore;
+extern DBCStorage <AuctionHouseEntry> sAuctionHouseStore;
extern DBCStorage <BankBagSlotPricesEntry> sBankBagSlotPricesStore;
extern DBCStorage <BarberShopStyleEntry> sBarberShopStyleStore;
extern DBCStorage <BattlemasterListEntry> sBattlemasterListStore;
diff --git a/src/shared/Database/DBCStructure.h b/src/shared/Database/DBCStructure.h
index d041f8fa3b2..ea14a587d8e 100644
--- a/src/shared/Database/DBCStructure.h
+++ b/src/shared/Database/DBCStructure.h
@@ -514,6 +514,16 @@ struct AreaTriggerEntry
float box_orientation; // 9 m_box_yaw
};
+struct AuctionHouseEntry
+{
+ uint32 houseId; // 0 index
+ uint32 faction; // 1 id of faction.dbc for player factions associated with city
+ uint32 depositPercent; // 2 1/3 from real
+ uint32 cutPercent; // 3
+ //char* name[16]; // 4-19
+ // 20 string flag, unused
+};
+
struct BankBagSlotPricesEntry
{
uint32 ID;
diff --git a/src/shared/Database/DBCfmt.cpp b/src/shared/Database/DBCfmt.cpp
index 643e1828448..050e750cbca 100644
--- a/src/shared/Database/DBCfmt.cpp
+++ b/src/shared/Database/DBCfmt.cpp
@@ -23,6 +23,7 @@ const char AchievementCriteriafmt[]="niiiiiiiixxxxxxxxxxxxxxxxxiixix";
const char AreaTableEntryfmt[]="iiinixxxxxissssssssssssssssxixxxxxxx";
const char AreaGroupEntryfmt[]="niiiiiii";
const char AreaTriggerEntryfmt[]="niffffffff";
+const char AuctionHouseEntryfmt[]="niiixxxxxxxxxxxxxxxxx";
const char BankBagSlotPricesEntryfmt[]="ni";
const char BarberShopStyleEntryfmt[]="nixxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxiii";
const char BattlemasterListEntryfmt[]="niiiiiiiiiiiixxxssssssssssssssssxx";