Core/Game: forgotten changes from r3cc82905662712385f0d03895a426310e6cc96bd
--HG-- branch : trunk
This commit is contained in:
@@ -226,8 +226,13 @@ bool AccountMgr::normalizeString(std::string& utf8str)
|
||||
size_t wstr_len = MAX_ACCOUNT_STR;
|
||||
if (!Utf8toWStr(utf8str,wstr_buf,wstr_len))
|
||||
return false;
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(disable: 4996)
|
||||
#endif
|
||||
std::transform(&wstr_buf[0], wstr_buf+wstr_len, &wstr_buf[0], wcharToUpperOnlyLatin);
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(default: 4996)
|
||||
#endif
|
||||
|
||||
return WStrToUtf8(wstr_buf,wstr_len,utf8str);
|
||||
}
|
||||
|
||||
@@ -75,7 +75,7 @@ uint32 GameEventMgr::NextCheck(uint16 entry) const
|
||||
|
||||
// for NEXTPHASE state world events, return the delay to start the next event, so the followup event will be checked correctly
|
||||
if ((mGameEvent[entry].state == GAMEEVENT_WORLD_NEXTPHASE || mGameEvent[entry].state == GAMEEVENT_WORLD_FINISHED) && mGameEvent[entry].nextstart >= currenttime)
|
||||
return (mGameEvent[entry].nextstart - currenttime);
|
||||
return uint32(mGameEvent[entry].nextstart - currenttime);
|
||||
|
||||
// for CONDITIONS state world events, return the length of the wait period, so if the conditions are met, this check will be called again to set the timer as NEXTPHASE event
|
||||
if (mGameEvent[entry].state == GAMEEVENT_WORLD_CONDITIONS)
|
||||
@@ -92,7 +92,7 @@ uint32 GameEventMgr::NextCheck(uint16 entry) const
|
||||
|
||||
// never started event, we return delay before start
|
||||
if (mGameEvent[entry].start > currenttime)
|
||||
return (mGameEvent[entry].start - currenttime);
|
||||
return uint32(mGameEvent[entry].start - currenttime);
|
||||
|
||||
uint32 delay;
|
||||
// in event, we return the end of it
|
||||
@@ -103,7 +103,7 @@ uint32 GameEventMgr::NextCheck(uint16 entry) const
|
||||
delay = (mGameEvent[entry].occurence * MINUTE) - ((currenttime - mGameEvent[entry].start) % (mGameEvent[entry].occurence * MINUTE));
|
||||
// In case the end is before next check
|
||||
if (mGameEvent[entry].end < time_t(currenttime + delay))
|
||||
return (mGameEvent[entry].end - currenttime);
|
||||
return uint32(mGameEvent[entry].end - currenttime);
|
||||
else
|
||||
return delay;
|
||||
}
|
||||
|
||||
@@ -269,19 +269,19 @@ void MapManager::Update(uint32 diff)
|
||||
for (; iter != i_maps.end(); ++iter)
|
||||
{
|
||||
if (m_updater.activated())
|
||||
m_updater.schedule_update(*iter->second, i_timer.GetCurrent());
|
||||
m_updater.schedule_update(*iter->second, uint32(i_timer.GetCurrent()));
|
||||
else
|
||||
iter->second->Update(i_timer.GetCurrent());
|
||||
iter->second->Update(uint32(i_timer.GetCurrent()));
|
||||
}
|
||||
if (m_updater.activated())
|
||||
m_updater.wait();
|
||||
|
||||
for (iter = i_maps.begin(); iter != i_maps.end(); ++iter)
|
||||
iter->second->DelayedUpdate(i_timer.GetCurrent());
|
||||
iter->second->DelayedUpdate(uint32(i_timer.GetCurrent()));
|
||||
|
||||
sObjectAccessor.Update(i_timer.GetCurrent());
|
||||
sObjectAccessor.Update(uint32(i_timer.GetCurrent()));
|
||||
for (TransportSet::iterator iter = m_Transports.begin(); iter != m_Transports.end(); ++iter)
|
||||
(*iter)->Update(i_timer.GetCurrent());
|
||||
(*iter)->Update(uint32(i_timer.GetCurrent()));
|
||||
|
||||
i_timer.SetCurrent(0);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user