Ensure that all actions are compared to fixed point in time (ie. world update start) (#18910)

- Actions will not be dependent on processing moment
- Increased GameObjects cooldown resolution to milliseconds, fixes arming time of traps to be exactly one second and not something from range (1000, 1999)
- Created GameTime namespace and UpdateTime class and moved there some code out of world

(cherrypicked from 7567cafec8)
This commit is contained in:
xinef1
2017-03-02 02:19:25 +01:00
committed by Shauren
parent 98180ecdc1
commit 60663d1374
42 changed files with 486 additions and 182 deletions

View File

@@ -21,6 +21,7 @@
#include "Config.h"
#include "Containers.h"
#include "DatabaseEnv.h"
#include "GameTime.h"
#include "Item.h"
#include "Log.h"
#include "World.h"
@@ -486,7 +487,7 @@ void AuctionHouseBot::Rebuild(bool all)
for (AuctionHouseObject::AuctionEntryMap::const_iterator itr = auctionHouse->GetAuctionsBegin(); itr != auctionHouse->GetAuctionsEnd(); ++itr)
if (!itr->second->owner || sAuctionBotConfig->IsBotChar(itr->second->owner)) // ahbot auction
if (all || itr->second->bid == 0) // expire now auction if no bid or forced
itr->second->expire_time = sWorld->GetGameTime();
itr->second->expire_time = GameTime::GetGameTime();
}
}