Add spaces after commas
This commit is contained in:
@@ -96,7 +96,7 @@ InstanceSave* InstanceSaveManager::AddInstanceSave(uint32 mapId, uint32 instance
|
||||
// initialize reset time
|
||||
// for normal instances if no creatures are killed the instance will reset in two hours
|
||||
if (entry->map_type == MAP_RAID || difficulty > DUNGEON_DIFFICULTY_NORMAL)
|
||||
resetTime = GetResetTimeFor(mapId,difficulty);
|
||||
resetTime = GetResetTimeFor(mapId, difficulty);
|
||||
else
|
||||
{
|
||||
resetTime = time(NULL) + 2 * HOUR;
|
||||
@@ -227,9 +227,9 @@ bool InstanceSave::UnloadIfEmpty()
|
||||
return true;
|
||||
}
|
||||
|
||||
void InstanceSaveManager::_DelHelper(const char *fields, const char *table, const char *queryTail,...)
|
||||
void InstanceSaveManager::_DelHelper(const char *fields, const char *table, const char *queryTail, ...)
|
||||
{
|
||||
Tokens fieldTokens(fields, ',');
|
||||
Tokens fieldTokens(fields, ', ');
|
||||
ASSERT(fieldTokens.size() != 0);
|
||||
|
||||
va_list ap;
|
||||
@@ -297,12 +297,12 @@ void InstanceSaveManager::LoadResetTimes()
|
||||
// get the current reset times for normal instances (these may need to be updated)
|
||||
// these are only kept in memory for InstanceSaves that are loaded later
|
||||
// resettime = 0 in the DB for raid/heroic instances so those are skipped
|
||||
typedef std::pair<uint32 /*PAIR32(map,difficulty)*/, time_t> ResetTimeMapDiffType;
|
||||
typedef std::pair<uint32 /*PAIR32(map, difficulty)*/, time_t> ResetTimeMapDiffType;
|
||||
typedef std::map<uint32, ResetTimeMapDiffType> InstResetTimeMapDiffType;
|
||||
InstResetTimeMapDiffType instResetTime;
|
||||
|
||||
// index instance ids by map/difficulty pairs for fast reset warning send
|
||||
typedef std::multimap<uint32 /*PAIR32(map,difficulty)*/, uint32 /*instanceid*/ > ResetTimeMapDiffInstances;
|
||||
typedef std::multimap<uint32 /*PAIR32(map, difficulty)*/, uint32 /*instanceid*/ > ResetTimeMapDiffInstances;
|
||||
ResetTimeMapDiffInstances mapDiffResetInstances;
|
||||
|
||||
QueryResult result = CharacterDatabase.Query("SELECT id, map, difficulty, resettime FROM instance ORDER BY id ASC");
|
||||
@@ -373,7 +373,7 @@ void InstanceSaveManager::LoadResetTimes()
|
||||
if (!mapDiff)
|
||||
{
|
||||
sLog->outError("InstanceSaveManager::LoadResetTimes: invalid mapid(%u)/difficulty(%u) pair in instance_reset!", mapid, difficulty);
|
||||
CharacterDatabase.DirectPExecute("DELETE FROM instance_reset WHERE mapid = '%u' AND difficulty = '%u'", mapid,difficulty);
|
||||
CharacterDatabase.DirectPExecute("DELETE FROM instance_reset WHERE mapid = '%u' AND difficulty = '%u'", mapid, difficulty);
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -408,12 +408,12 @@ void InstanceSaveManager::LoadResetTimes()
|
||||
if (period < DAY)
|
||||
period = DAY;
|
||||
|
||||
time_t t = GetResetTimeFor(mapid,difficulty);
|
||||
time_t t = GetResetTimeFor(mapid, difficulty);
|
||||
if (!t)
|
||||
{
|
||||
// initialize the reset time
|
||||
t = today + period + diff;
|
||||
CharacterDatabase.DirectPExecute("INSERT INTO instance_reset VALUES ('%u','%u','%u')", mapid, difficulty, (uint32)t);
|
||||
CharacterDatabase.DirectPExecute("INSERT INTO instance_reset VALUES ('%u', '%u', '%u')", mapid, difficulty, (uint32)t);
|
||||
}
|
||||
|
||||
if (t < now)
|
||||
@@ -425,7 +425,7 @@ void InstanceSaveManager::LoadResetTimes()
|
||||
CharacterDatabase.DirectPExecute("UPDATE instance_reset SET resettime = '"UI64FMTD"' WHERE mapid = '%u' AND difficulty= '%u'", (uint64)t, mapid, difficulty);
|
||||
}
|
||||
|
||||
SetResetTimeFor(mapid,difficulty,t);
|
||||
SetResetTimeFor(mapid, difficulty, t);
|
||||
|
||||
// schedule the global reset/warning
|
||||
uint8 type;
|
||||
@@ -470,7 +470,7 @@ void InstanceSaveManager::ScheduleReset(bool add, time_t time, InstResetEvent ev
|
||||
}
|
||||
|
||||
if (itr == m_resetTimeQueue.end())
|
||||
sLog->outError("InstanceSaveManager::ScheduleReset: cannot cancel the reset, the event(%d,%d,%d) was not found!", event.type, event.mapid, event.instanceId);
|
||||
sLog->outError("InstanceSaveManager::ScheduleReset: cannot cancel the reset, the event(%d, %d, %d) was not found!", event.type, event.mapid, event.instanceId);
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -498,7 +498,7 @@ void InstanceSaveManager::Update()
|
||||
else
|
||||
{
|
||||
// global reset/warning for a certain map
|
||||
time_t resetTime = GetResetTimeFor(event.mapid,event.difficulty);
|
||||
time_t resetTime = GetResetTimeFor(event.mapid, event.difficulty);
|
||||
_ResetOrWarnAll(event.mapid, event.difficulty, event.type != 4, resetTime);
|
||||
if (event.type != 4)
|
||||
{
|
||||
|
||||
@@ -112,7 +112,7 @@ class InstanceSave
|
||||
bool m_canReset;
|
||||
};
|
||||
|
||||
typedef UNORDERED_MAP<uint32 /*PAIR32(map,difficulty)*/,time_t /*resetTime*/> ResetTimeByMapDifficultyMap;
|
||||
typedef UNORDERED_MAP<uint32 /*PAIR32(map, difficulty)*/, time_t /*resetTime*/> ResetTimeByMapDifficultyMap;
|
||||
|
||||
class InstanceSaveManager
|
||||
{
|
||||
@@ -145,12 +145,12 @@ class InstanceSaveManager
|
||||
void LoadResetTimes();
|
||||
time_t GetResetTimeFor(uint32 mapid, Difficulty d) const
|
||||
{
|
||||
ResetTimeByMapDifficultyMap::const_iterator itr = m_resetTimeByMapDifficulty.find(MAKE_PAIR32(mapid,d));
|
||||
ResetTimeByMapDifficultyMap::const_iterator itr = m_resetTimeByMapDifficulty.find(MAKE_PAIR32(mapid, d));
|
||||
return itr != m_resetTimeByMapDifficulty.end() ? itr->second : 0;
|
||||
}
|
||||
void SetResetTimeFor(uint32 mapid, Difficulty d, time_t t)
|
||||
{
|
||||
m_resetTimeByMapDifficulty[MAKE_PAIR32(mapid,d)] = t;
|
||||
m_resetTimeByMapDifficulty[MAKE_PAIR32(mapid, d)] = t;
|
||||
}
|
||||
ResetTimeByMapDifficultyMap const& GetResetTimeMap() const
|
||||
{
|
||||
@@ -179,7 +179,7 @@ class InstanceSaveManager
|
||||
void _ResetOrWarnAll(uint32 mapid, Difficulty difficulty, bool warn, time_t resetTime);
|
||||
void _ResetInstance(uint32 mapid, uint32 instanceId);
|
||||
void _ResetSave(InstanceSaveHashMap::iterator &itr);
|
||||
void _DelHelper(const char *fields, const char *table, const char *queryTail,...);
|
||||
void _DelHelper(const char *fields, const char *table, const char *queryTail, ...);
|
||||
// used during global instance resets
|
||||
bool lock_instLists;
|
||||
// fast lookup by instance id
|
||||
|
||||
@@ -263,12 +263,12 @@ void InstanceScript::DoUseDoorOrButton(uint64 uiGuid, uint32 uiWithRestoreTime,
|
||||
if (pGo->GetGoType() == GAMEOBJECT_TYPE_DOOR || pGo->GetGoType() == GAMEOBJECT_TYPE_BUTTON)
|
||||
{
|
||||
if (pGo->getLootState() == GO_READY)
|
||||
pGo->UseDoorOrButton(uiWithRestoreTime,bUseAlternativeState);
|
||||
pGo->UseDoorOrButton(uiWithRestoreTime, bUseAlternativeState);
|
||||
else if (pGo->getLootState() == GO_ACTIVATED)
|
||||
pGo->ResetDoorOrButton();
|
||||
}
|
||||
else
|
||||
sLog->outError("SD2: Script call DoUseDoorOrButton, but gameobject entry %u is type %u.",pGo->GetEntry(),pGo->GetGoType());
|
||||
sLog->outError("SD2: Script call DoUseDoorOrButton, but gameobject entry %u is type %u.", pGo->GetEntry(), pGo->GetGoType());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -398,7 +398,7 @@ void InstanceScript::DoCastSpellOnPlayers(uint32 spell)
|
||||
bool InstanceScript::CheckAchievementCriteriaMeet(uint32 criteria_id, Player const* /*source*/, Unit const* /*target*/ /*= NULL*/, uint32 /*miscvalue1*/ /*= 0*/)
|
||||
{
|
||||
sLog->outError("Achievement system call InstanceScript::CheckAchievementCriteriaMeet but instance script for map %u not have implementation for achievement criteria %u",
|
||||
instance->GetId(),criteria_id);
|
||||
instance->GetId(), criteria_id);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -28,8 +28,8 @@
|
||||
#define OUT_SAVE_INST_DATA sLog->outDebug(LOG_FILTER_TSCR, "TSCR: Saving Instance Data for Instance %s (Map %d, Instance Id %d)", instance->GetMapName(), instance->GetId(), instance->GetInstanceId())
|
||||
#define OUT_SAVE_INST_DATA_COMPLETE sLog->outDebug(LOG_FILTER_TSCR, "TSCR: Saving Instance Data for Instance %s (Map %d, Instance Id %d) completed.", instance->GetMapName(), instance->GetId(), instance->GetInstanceId())
|
||||
#define OUT_LOAD_INST_DATA(a) sLog->outDebug(LOG_FILTER_TSCR, "TSCR: Loading Instance Data for Instance %s (Map %d, Instance Id %d). Input is '%s'", instance->GetMapName(), instance->GetId(), instance->GetInstanceId(), a)
|
||||
#define OUT_LOAD_INST_DATA_COMPLETE sLog->outDebug(LOG_FILTER_TSCR, "TSCR: Instance Data Load for Instance %s (Map %d, Instance Id: %d) is complete.",instance->GetMapName(), instance->GetId(), instance->GetInstanceId())
|
||||
#define OUT_LOAD_INST_DATA_FAIL sLog->outError("TSCR: Unable to load Instance Data for Instance %s (Map %d, Instance Id: %d).",instance->GetMapName(), instance->GetId(), instance->GetInstanceId())
|
||||
#define OUT_LOAD_INST_DATA_COMPLETE sLog->outDebug(LOG_FILTER_TSCR, "TSCR: Instance Data Load for Instance %s (Map %d, Instance Id: %d) is complete.", instance->GetMapName(), instance->GetId(), instance->GetInstanceId())
|
||||
#define OUT_LOAD_INST_DATA_FAIL sLog->outError("TSCR: Unable to load Instance Data for Instance %s (Map %d, Instance Id: %d).", instance->GetMapName(), instance->GetId(), instance->GetInstanceId())
|
||||
|
||||
class Map;
|
||||
class Unit;
|
||||
|
||||
Reference in New Issue
Block a user