diff options
author | Brian <runningnak3d@gmail.com> | 2010-03-26 13:07:24 -0600 |
---|---|---|
committer | Brian <runningnak3d@gmail.com> | 2010-03-26 13:07:24 -0600 |
commit | ec72846da42e47f4dfdd593137291ea5f9755de9 (patch) | |
tree | a531a86ba5335b0b979b7edf16483812c02f8b46 | |
parent | cd372966af061258f64035ba40f7aca561b3f083 (diff) |
* Check for incorrect settings for AHbot
* Patch by click
--HG--
branch : trunk
-rw-r--r-- | src/game/AuctionHouseBot.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/game/AuctionHouseBot.cpp b/src/game/AuctionHouseBot.cpp index df3d7d8dbc1..9c3d1afdc6c 100644 --- a/src/game/AuctionHouseBot.cpp +++ b/src/game/AuctionHouseBot.cpp @@ -823,6 +823,20 @@ void AuctionHouseBot::Initialize() } LoadValues(&NeutralConfig); + // + // check if the AHBot account/GUID in the config actually exists + // + + if ((AHBplayerAccount != 0) || (AHBplayerGUID != 0)) + { + QueryResult_AutoPtr result = CharacterDatabase.PQuery("SELECT 1 FROM characters WHERE account = %u AND guid = %u", AHBplayerAccount, AHBplayerGUID); + if (!result) + { + sLog.outError("AuctionHouseBot: The account/GUID-information set for your AHBot is incorrect (account: %u guid: %u)", AHBplayerAccount, AHBplayerGUID); + return; + } + } + if (AHBSeller) { QueryResult_AutoPtr results = QueryResult_AutoPtr(NULL); |