mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-31 09:06:46 +00:00
time_t conversions made explicit
This commit is contained in:
+3
-3
@@ -331,7 +331,7 @@ Client::~Client() {
|
||||
Bot::ProcessBotOwnerRefDelete(this);
|
||||
#endif
|
||||
if(IsInAGuild())
|
||||
guild_mgr.SendGuildMemberUpdateToWorld(GetName(), GuildID(), 0, time(nullptr));
|
||||
guild_mgr.SendGuildMemberUpdateToWorld(GetName(), GuildID(), 0, (uint32)time(nullptr));
|
||||
|
||||
Mob* horse = entity_list.GetMob(this->CastToClient()->GetHorseId());
|
||||
if (horse)
|
||||
@@ -551,7 +551,7 @@ bool Client::Save(uint8 iCommitNow) {
|
||||
|
||||
database.SaveBuffs(this);
|
||||
|
||||
TotalSecondsPlayed += (time(nullptr) - m_pp.lastlogin);
|
||||
TotalSecondsPlayed = (int)(TotalSecondsPlayed+(time(nullptr) - m_pp.lastlogin));
|
||||
m_pp.timePlayedMin = (TotalSecondsPlayed / 60);
|
||||
m_pp.RestTimer = rest_timer.GetRemainingTime() / 1000;
|
||||
|
||||
@@ -568,7 +568,7 @@ bool Client::Save(uint8 iCommitNow) {
|
||||
memset(&m_mercinfo, 0, sizeof(struct MercInfo));
|
||||
}
|
||||
|
||||
m_pp.lastlogin = time(nullptr);
|
||||
m_pp.lastlogin = (uint32)time(nullptr);
|
||||
if (pQueuedSaveWorkID) {
|
||||
dbasync->CancelWork(pQueuedSaveWorkID);
|
||||
pQueuedSaveWorkID = 0;
|
||||
|
||||
@@ -9603,7 +9603,7 @@ void Client::CompleteConnect()
|
||||
|
||||
if(IsInAGuild())
|
||||
{
|
||||
guild_mgr.SendGuildMemberUpdateToWorld(GetName(), GuildID(), zone->GetZoneID(), time(nullptr));
|
||||
guild_mgr.SendGuildMemberUpdateToWorld(GetName(), GuildID(), zone->GetZoneID(), (uint32)time(nullptr));
|
||||
guild_mgr.RequestOnlineGuildMembers(this->CharacterID(), this->GuildID());
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -2684,7 +2684,7 @@ void EntityList::SendPetitionToAdmins(Petition *pet)
|
||||
strcpy(pcus->gmsenttoo, "");
|
||||
} else {
|
||||
pcus->color = pet->GetUrgency(); // 0x00 = green, 0x01 = yellow, 0x02 = red
|
||||
pcus->status = pet->GetSentTime();
|
||||
pcus->status = (uint32)pet->GetSentTime();
|
||||
pcus->senttime = pet->GetSentTime(); // 4 has to be 0x1F
|
||||
strcpy(pcus->accountid, pet->GetAccountName());
|
||||
strcpy(pcus->charname, pet->GetCharName());
|
||||
|
||||
+1
-1
@@ -472,7 +472,7 @@ void ZoneGuildManager::ProcessWorldPacket(ServerPacket *pack) {
|
||||
EQApplicationPacket *outapp = new EQApplicationPacket(OP_GuildMemberUpdate, sizeof(GuildMemberUpdate_Struct));
|
||||
GuildMemberUpdate_Struct *gmus = (GuildMemberUpdate_Struct*)outapp->pBuffer;
|
||||
char Name[64];
|
||||
gmus->LastSeen = time(nullptr);
|
||||
gmus->LastSeen = (uint32)time(nullptr);
|
||||
gmus->InstanceID = 0;
|
||||
gmus->GuildID = c->GuildID();
|
||||
for (int i=0;i<Count;i++)
|
||||
|
||||
+1
-1
@@ -5497,7 +5497,7 @@ bool Merc::Suspend() {
|
||||
SetSuspended(true);
|
||||
|
||||
mercOwner->GetMercInfo().IsSuspended = true;
|
||||
mercOwner->GetMercInfo().SuspendedTime = time(nullptr) + RuleI(Mercs, SuspendIntervalS);
|
||||
mercOwner->GetMercInfo().SuspendedTime = (uint32)(time(nullptr) + RuleI(Mercs, SuspendIntervalS));
|
||||
mercOwner->GetMercInfo().MercTimerRemaining = mercOwner->GetMercTimer()->GetRemainingTime();
|
||||
mercOwner->GetMercInfo().Stance = GetStance();
|
||||
Save();
|
||||
|
||||
+4
-4
@@ -1506,7 +1506,7 @@ bool ClientTaskState::UnlockActivities(int CharID, int TaskIndex) {
|
||||
|
||||
CompletedTaskInformation cti;
|
||||
cti.TaskID = ActiveTasks[TaskIndex].TaskID;
|
||||
cti.CompletedTime = time(nullptr);
|
||||
cti.CompletedTime = (int)time(nullptr);
|
||||
|
||||
for(int i=0; i<Task->ActivityCount; i++)
|
||||
cti.ActivityDone[i] = (ActiveTasks[TaskIndex].Activity[i].State == ActivityCompleted);
|
||||
@@ -1578,7 +1578,7 @@ bool ClientTaskState::UnlockActivities(int CharID, int TaskIndex) {
|
||||
}
|
||||
CompletedTaskInformation cti;
|
||||
cti.TaskID = ActiveTasks[TaskIndex].TaskID;
|
||||
cti.CompletedTime = time(nullptr);
|
||||
cti.CompletedTime = (int)time(nullptr);
|
||||
|
||||
for(int i=0; i<Task->ActivityCount; i++)
|
||||
cti.ActivityDone[i] = (ActiveTasks[TaskIndex].Activity[i].State == ActivityCompleted);
|
||||
@@ -2294,7 +2294,7 @@ int ClientTaskState::TaskTimeLeft(int TaskID) {
|
||||
|
||||
if(ActiveTasks[i].TaskID != TaskID) continue;
|
||||
|
||||
int Now = time(nullptr);
|
||||
int Now = (int)time(nullptr);
|
||||
|
||||
TaskInformation* Task = taskmanager->Tasks[ActiveTasks[i].TaskID];
|
||||
|
||||
@@ -3222,7 +3222,7 @@ void ClientTaskState::AcceptNewTask(Client *c, int TaskID, int NPCID) {
|
||||
|
||||
|
||||
ActiveTasks[FreeSlot].TaskID = TaskID;
|
||||
ActiveTasks[FreeSlot].AcceptedTime = time(nullptr);
|
||||
ActiveTasks[FreeSlot].AcceptedTime = (int)time(nullptr);
|
||||
ActiveTasks[FreeSlot].Updated = true;
|
||||
ActiveTasks[FreeSlot].CurrentStep = -1;
|
||||
|
||||
|
||||
+1
-1
@@ -922,7 +922,7 @@ bool ZoneDatabase::GetCharacterInfoForLogin_result(MYSQL_RES* result,
|
||||
pp->y = (float)atof(row[4]);
|
||||
pp->z = (float)atof(row[5]);
|
||||
|
||||
pp->lastlogin = time(nullptr);
|
||||
pp->lastlogin = (uint32)time(nullptr);
|
||||
|
||||
if (pp->x == -1 && pp->y == -1 && pp->z == -1)
|
||||
GetSafePoints(pp->zone_id, database.GetInstanceVersion(pp->zoneInstance), &pp->x, &pp->y, &pp->z);
|
||||
|
||||
Reference in New Issue
Block a user