From 3fe0bc52541d8cdf4fa992d9b8b3101cde5848f0 Mon Sep 17 00:00:00 2001 From: n0n4m3 Date: Wed, 23 Dec 2009 08:04:10 +0100 Subject: 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 --- src/game/PetHandler.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/game/PetHandler.cpp') diff --git a/src/game/PetHandler.cpp b/src/game/PetHandler.cpp index ee8c02dfb43..05c5c35bda5 100644 --- a/src/game/PetHandler.cpp +++ b/src/game/PetHandler.cpp @@ -31,6 +31,7 @@ #include "Util.h" #include "Pet.h" #include "World.h" +#include "TimeMgr.h" void WorldSession::HandlePetAction( WorldPacket & recv_data ) { @@ -557,7 +558,7 @@ void WorldSession::HandlePetRename( WorldPacket & recv_data ) CharacterDatabase.PExecute("UPDATE character_pet SET name = '%s', renamed = '1' WHERE owner = '%u' AND id = '%u'", name.c_str(), _player->GetGUIDLow(), pet->GetCharmInfo()->GetPetNumber()); CharacterDatabase.CommitTransaction(); - pet->SetUInt32Value(UNIT_FIELD_PET_NAME_TIMESTAMP, time(NULL)); + pet->SetUInt32Value(UNIT_FIELD_PET_NAME_TIMESTAMP, sGameTime.GetGameTime()); } void WorldSession::HandlePetAbandon( WorldPacket & recv_data ) -- cgit v1.2.3