Replace World::getConfig with World::getFloatConfig, World::getIntConfig, and World::getBoolConfig.

Also fix a warning from a previous commit.

--HG--
branch : trunk
This commit is contained in:
silinoron
2010-08-23 19:56:47 -07:00
parent b30800e9bc
commit 8649bee17f
65 changed files with 885 additions and 889 deletions
@@ -447,7 +447,7 @@ void InstanceSaveManager::LoadResetTimes()
}
// load the global respawn times for raid/heroic instances
uint32 diff = sWorld.getConfig(CONFIG_INSTANCE_RESET_TIME_HOUR) * HOUR;
uint32 diff = sWorld.getIntConfig(CONFIG_INSTANCE_RESET_TIME_HOUR) * HOUR;
result = CharacterDatabase.Query("SELECT mapid, difficulty, resettime FROM instance_reset");
if (result)
{
@@ -655,7 +655,7 @@ void InstanceSaveManager::_ResetOrWarnAll(uint32 mapid, Difficulty difficulty, b
CharacterDatabase.CommitTransaction(trans);
// calculate the next reset time
uint32 diff = sWorld.getConfig(CONFIG_INSTANCE_RESET_TIME_HOUR) * HOUR;
uint32 diff = sWorld.getIntConfig(CONFIG_INSTANCE_RESET_TIME_HOUR) * HOUR;
uint32 period = uint32(((mapDiff->resetTime * sWorld.getRate(RATE_INSTANCE_RESET_TIME))/DAY) * DAY);
if (period < DAY)
+1 -1
View File
@@ -176,7 +176,7 @@ class InstanceScript : public ZoneScript
void DoRemoveAurasDueToSpellOnPlayers(uint32 spell);
// Return wether server allow two side groups or not
bool ServerAllowsTwoSideGroups() { return sWorld.getConfig(CONFIG_ALLOW_TWO_SIDE_INTERACTION_GROUP); }
bool ServerAllowsTwoSideGroups() { return sWorld.getBoolConfig(CONFIG_ALLOW_TWO_SIDE_INTERACTION_GROUP); }
virtual bool SetBossState(uint32 id, EncounterState state);
EncounterState GetBossState(uint32 id) const { return id < bosses.size() ? bosses[id].state : TO_BE_DECIDED; }