diff options
| author | n0n4m3 <none@none> | 2009-12-23 08:04:10 +0100 |
|---|---|---|
| committer | n0n4m3 <none@none> | 2009-12-23 08:04:10 +0100 |
| commit | 3fe0bc52541d8cdf4fa992d9b8b3101cde5848f0 (patch) | |
| tree | be5871dc19f69f4555d9ffa7c57e5d964b8e60e0 /src/game/AuctionHouseBot.cpp | |
| parent | 7ea2510980d4b1c96f0341e9c8b9d5784862dc72 (diff) | |
Replaced time(NULL) on sGameTime.GetGameTime() this is used for better performance.
Original Timer.h divided into 2 parts. Shared project has no need to know about GameTime Singleton.
2 Identical structures with different types are now replaced with one generic templated structure and 2 typedefs.
--HG--
branch : trunk
Diffstat (limited to 'src/game/AuctionHouseBot.cpp')
| -rw-r--r-- | src/game/AuctionHouseBot.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/game/AuctionHouseBot.cpp b/src/game/AuctionHouseBot.cpp index 6b86f9de306..556fb88a88f 100644 --- a/src/game/AuctionHouseBot.cpp +++ b/src/game/AuctionHouseBot.cpp @@ -1,6 +1,7 @@ #include "ObjectMgr.h" #include "AuctionHouseMgr.h" #include "AuctionHouseBot.h" +#include "TimeMgr.h" #include <vector> #include "Policies/SingletonImp.h" @@ -89,9 +90,9 @@ AuctionHouseBot::AuctionHouseBot() //End Filters - _lastrun_a = time(NULL); - _lastrun_h = time(NULL); - _lastrun_n = time(NULL); + _lastrun_a = sGameTime.GetGameTime(); + _lastrun_h = sGameTime.GetGameTime(); + _lastrun_n = sGameTime.GetGameTime(); AllianceConfig = AHBConfig(2); HordeConfig = AHBConfig(6); @@ -419,7 +420,7 @@ void AuctionHouseBot::addNewAuctions(Player *AHBplayer, AHBConfig *config) auctionEntry->bidder = 0; auctionEntry->bid = 0; auctionEntry->deposit = dep; - auctionEntry->expire_time = (time_t) etime + time(NULL); + auctionEntry->expire_time = (time_t) etime + sGameTime.GetGameTime(); auctionEntry->auctionHouseEntry = ahEntry; item->SaveToDB(); item->RemoveFromUpdateQueueOf(AHBplayer); @@ -695,7 +696,7 @@ void AuctionHouseBot::addNewAuctionBuyerBotBid(Player *AHBplayer, AHBConfig *con void AuctionHouseBot::Update() { - time_t _newrun = time(NULL); + time_t _newrun = sGameTime.GetGameTime(); if ((!AHBSeller) && (!AHBBuyer)) return; @@ -1506,7 +1507,7 @@ void AuctionHouseBot::Commands(uint32 command, uint32 ahMapID, uint32 col, char* { if (itr->second->owner == AHBplayerGUID) { - itr->second->expire_time = sWorld.GetGameTime(); + itr->second->expire_time = sGameTime.GetGameTime(); uint32 id = itr->second->Id; uint32 expire_time = itr->second->expire_time; CharacterDatabase.PExecute("UPDATE auctionhouse SET time = '%u' WHERE id = '%u'", expire_time, id); |
