aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/World
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2016-08-19 17:34:59 +0200
committerShauren <shauren.trinity@gmail.com>2016-08-19 17:34:59 +0200
commit3ab2f69f6459cbf74b32d564634cc266e19b757d (patch)
tree3b4c8591e4583e0fa93f232d5ca1fa9ef1736da0 /src/server/game/World
parent650ab693a8366847d7db8bd8443b3b4aaf99ff85 (diff)
Core/World: Change worldstate storage to uint32 to fix compile warnings (its also saved/loaded as uint32 from database)
Diffstat (limited to 'src/server/game/World')
-rw-r--r--src/server/game/World/World.cpp20
-rw-r--r--src/server/game/World/World.h6
2 files changed, 13 insertions, 13 deletions
diff --git a/src/server/game/World/World.cpp b/src/server/game/World/World.cpp
index 8d0030849c9..68498d117bd 100644
--- a/src/server/game/World/World.cpp
+++ b/src/server/game/World/World.cpp
@@ -3167,7 +3167,7 @@ void World::InitRandomBGResetTime()
m_NextRandomBGReset = bgtime < curTime ? nextDayResetTime - DAY : nextDayResetTime;
if (!bgtime)
- sWorld->setWorldState(WS_BG_DAILY_RESET_TIME, uint64(m_NextRandomBGReset));
+ sWorld->setWorldState(WS_BG_DAILY_RESET_TIME, uint32(m_NextRandomBGReset));
}
void World::InitGuildResetTime()
@@ -3195,7 +3195,7 @@ void World::InitGuildResetTime()
m_NextGuildReset = gtime < curTime ? nextDayResetTime - DAY : nextDayResetTime;
if (!gtime)
- sWorld->setWorldState(WS_GUILD_DAILY_RESET_TIME, uint64(m_NextGuildReset));
+ sWorld->setWorldState(WS_GUILD_DAILY_RESET_TIME, uint32(m_NextGuildReset));
}
void World::InitCurrencyResetTime()
@@ -3225,7 +3225,7 @@ void World::InitCurrencyResetTime()
m_NextCurrencyReset = currencytime < curTime ? nextWeekResetTime - getIntConfig(CONFIG_CURRENCY_RESET_INTERVAL) * DAY : nextWeekResetTime;
if (!currencytime)
- sWorld->setWorldState(WS_CURRENCY_RESET_TIME, uint64(m_NextCurrencyReset));
+ sWorld->setWorldState(WS_CURRENCY_RESET_TIME, uint32(m_NextCurrencyReset));
}
void World::DailyReset()
@@ -3256,7 +3256,7 @@ void World::ResetCurrencyWeekCap()
itr->second->GetPlayer()->ResetCurrencyWeekCap();
m_NextCurrencyReset = time_t(m_NextCurrencyReset + DAY * getIntConfig(CONFIG_CURRENCY_RESET_INTERVAL));
- sWorld->setWorldState(WS_CURRENCY_RESET_TIME, uint64(m_NextCurrencyReset));
+ sWorld->setWorldState(WS_CURRENCY_RESET_TIME, uint32(m_NextCurrencyReset));
}
void World::LoadDBAllowedSecurityLevel()
@@ -3290,7 +3290,7 @@ void World::ResetWeeklyQuests()
itr->second->GetPlayer()->ResetWeeklyQuestStatus();
m_NextWeeklyQuestReset = time_t(m_NextWeeklyQuestReset + WEEK);
- sWorld->setWorldState(WS_WEEKLY_QUEST_RESET_TIME, uint64(m_NextWeeklyQuestReset));
+ sWorld->setWorldState(WS_WEEKLY_QUEST_RESET_TIME, uint32(m_NextWeeklyQuestReset));
// change available weeklies
sPoolMgr->ChangeWeeklyQuests();
@@ -3337,7 +3337,7 @@ void World::ResetMonthlyQuests()
// plan next reset time
m_NextMonthlyQuestReset = (curTime >= nextMonthResetTime) ? nextMonthResetTime + MONTH : nextMonthResetTime;
- sWorld->setWorldState(WS_MONTHLY_QUEST_RESET_TIME, uint64(m_NextMonthlyQuestReset));
+ sWorld->setWorldState(WS_MONTHLY_QUEST_RESET_TIME, uint32(m_NextMonthlyQuestReset));
}
void World::ResetEventSeasonalQuests(uint16 event_id)
@@ -3365,13 +3365,13 @@ void World::ResetRandomBG()
itr->second->GetPlayer()->SetRandomWinner(false);
m_NextRandomBGReset = time_t(m_NextRandomBGReset + DAY);
- sWorld->setWorldState(WS_BG_DAILY_RESET_TIME, uint64(m_NextRandomBGReset));
+ sWorld->setWorldState(WS_BG_DAILY_RESET_TIME, uint32(m_NextRandomBGReset));
}
void World::ResetGuildCap()
{
m_NextGuildReset = time_t(m_NextGuildReset + DAY);
- sWorld->setWorldState(WS_GUILD_DAILY_RESET_TIME, uint64(m_NextGuildReset));
+ sWorld->setWorldState(WS_GUILD_DAILY_RESET_TIME, uint32(m_NextGuildReset));
uint32 week = getWorldState(WS_GUILD_WEEKLY_RESET_TIME);
week = week < 7 ? week + 1 : 1;
@@ -3441,7 +3441,7 @@ void World::LoadWorldStates()
}
// Setting a worldstate will save it to DB
-void World::setWorldState(uint32 index, uint64 value)
+void World::setWorldState(uint32 index, uint32 value)
{
WorldStatesMap::const_iterator it = m_worldstates.find(index);
if (it != m_worldstates.end())
@@ -3465,7 +3465,7 @@ void World::setWorldState(uint32 index, uint64 value)
m_worldstates[index] = value;
}
-uint64 World::getWorldState(uint32 index) const
+uint32 World::getWorldState(uint32 index) const
{
WorldStatesMap::const_iterator it = m_worldstates.find(index);
return it != m_worldstates.end() ? it->second : 0;
diff --git a/src/server/game/World/World.h b/src/server/game/World/World.h
index 9b1b2ade6cb..8cc75a6e669 100644
--- a/src/server/game/World/World.h
+++ b/src/server/game/World/World.h
@@ -736,8 +736,8 @@ class TC_GAME_API World
return index < INT_CONFIG_VALUE_COUNT ? m_int_configs[index] : 0;
}
- void setWorldState(uint32 index, uint64 value);
- uint64 getWorldState(uint32 index) const;
+ void setWorldState(uint32 index, uint32 value);
+ uint32 getWorldState(uint32 index) const;
void LoadWorldStates();
/// Are we on a "Player versus Player" server?
@@ -851,7 +851,7 @@ class TC_GAME_API World
uint32 m_int_configs[INT_CONFIG_VALUE_COUNT];
bool m_bool_configs[BOOL_CONFIG_VALUE_COUNT];
float m_float_configs[FLOAT_CONFIG_VALUE_COUNT];
- typedef std::map<uint32, uint64> WorldStatesMap;
+ typedef std::map<uint32, uint32> WorldStatesMap;
WorldStatesMap m_worldstates;
uint32 m_playerLimit;
AccountTypes m_allowedSecurityLevel;