mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-02-06 20:37:45 +00:00
Revert "feat(core): Ensure that all actions are compared to fixed point in time (#1236) (#1458)" (#1471)
This reverts commit 51b8773528.
This commit is contained in:
@@ -11,7 +11,6 @@
|
||||
#include "WorldPacket.h"
|
||||
#include "GameObject.h"
|
||||
#include "ObjectMgr.h"
|
||||
#include "GameTime.h"
|
||||
#include "Vehicle.h"
|
||||
#include "Transport.h"
|
||||
#include "WorldSession.h"
|
||||
@@ -128,7 +127,7 @@ void BattlegroundIC::PostUpdateImpl(uint32 diff)
|
||||
{
|
||||
// Check if creature respawn time is properly saved
|
||||
RespawnMap::iterator itr = respawnMap.find(catapult->GetGUIDLow());
|
||||
if (itr == respawnMap.end() || GameTime::GetGameTime() < itr->second)
|
||||
if (itr == respawnMap.end() || time(NULL) < itr->second)
|
||||
continue;
|
||||
|
||||
catapult->Relocate(BG_IC_DocksVehiclesCatapults[j].GetPositionX(), BG_IC_DocksVehiclesCatapults[j].GetPositionY(), BG_IC_DocksVehiclesCatapults[j].GetPositionZ(), BG_IC_DocksVehiclesCatapults[j].GetOrientation());
|
||||
@@ -146,7 +145,7 @@ void BattlegroundIC::PostUpdateImpl(uint32 diff)
|
||||
{
|
||||
// Check if creature respawn time is properly saved
|
||||
RespawnMap::iterator itr = respawnMap.find(glaiveThrower->GetGUIDLow());
|
||||
if (itr == respawnMap.end() || GameTime::GetGameTime() < itr->second)
|
||||
if (itr == respawnMap.end() || time(NULL) < itr->second)
|
||||
continue;
|
||||
|
||||
glaiveThrower->Relocate(BG_IC_DocksVehiclesGlaives[j].GetPositionX(), BG_IC_DocksVehiclesGlaives[j].GetPositionY(), BG_IC_DocksVehiclesGlaives[j].GetPositionZ(), BG_IC_DocksVehiclesGlaives[j].GetOrientation());
|
||||
@@ -175,7 +174,7 @@ void BattlegroundIC::PostUpdateImpl(uint32 diff)
|
||||
{
|
||||
// Check if creature respawn time is properly saved
|
||||
RespawnMap::iterator itr = respawnMap.find(siege->GetGUIDLow());
|
||||
if (itr == respawnMap.end() || GameTime::GetGameTime() < itr->second)
|
||||
if (itr == respawnMap.end() || time(NULL) < itr->second)
|
||||
continue;
|
||||
|
||||
siege->Relocate(BG_IC_WorkshopVehicles[4].GetPositionX(), BG_IC_WorkshopVehicles[4].GetPositionY(), BG_IC_WorkshopVehicles[4].GetPositionZ(), BG_IC_WorkshopVehicles[4].GetOrientation());
|
||||
@@ -193,7 +192,7 @@ void BattlegroundIC::PostUpdateImpl(uint32 diff)
|
||||
{
|
||||
// Check if creature respawn time is properly saved
|
||||
RespawnMap::iterator itr = respawnMap.find(demolisher->GetGUIDLow());
|
||||
if (itr == respawnMap.end() || GameTime::GetGameTime() < itr->second)
|
||||
if (itr == respawnMap.end() || time(NULL) < itr->second)
|
||||
continue;
|
||||
|
||||
demolisher->Relocate(BG_IC_WorkshopVehicles[u].GetPositionX(), BG_IC_WorkshopVehicles[u].GetPositionY(), BG_IC_WorkshopVehicles[u].GetPositionZ(), BG_IC_WorkshopVehicles[u].GetOrientation());
|
||||
@@ -521,7 +520,7 @@ void BattlegroundIC::HandleKillUnit(Creature* unit, Player* killer)
|
||||
// Xinef: Add to respawn list
|
||||
if (entry == NPC_DEMOLISHER || entry == NPC_SIEGE_ENGINE_H || entry == NPC_SIEGE_ENGINE_A ||
|
||||
entry == NPC_GLAIVE_THROWER_A || entry == NPC_GLAIVE_THROWER_H || entry == NPC_CATAPULT)
|
||||
respawnMap[unit->GetGUIDLow()] = GameTime::GetGameTime() + VEHICLE_RESPAWN_TIME;
|
||||
respawnMap[unit->GetGUIDLow()] = time(NULL) + VEHICLE_RESPAWN_TIME;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -868,7 +867,7 @@ void BattlegroundIC::HandleCapturedNodes(ICNodePoint* nodePoint, bool recapture)
|
||||
if (!siegeVehicle->IsVehicleInUse())
|
||||
Unit::Kill(siegeEngine, siegeEngine);
|
||||
|
||||
respawnMap[siegeEngine->GetGUIDLow()] = GameTime::GetGameTime() + VEHICLE_RESPAWN_TIME;
|
||||
respawnMap[siegeEngine->GetGUIDLow()] = time(NULL) + VEHICLE_RESPAWN_TIME;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user