[Cosmetic] Apply codestyle "XXX * " and "XXX *" changed to "XXX* " (with some exceptions)
This commit is contained in:
@@ -44,7 +44,7 @@ InstanceSaveManager::~InstanceSaveManager()
|
||||
lock_instLists = true;
|
||||
for (InstanceSaveHashMap::iterator itr = m_instanceSaveById.begin(); itr != m_instanceSaveById.end(); ++itr)
|
||||
{
|
||||
InstanceSave *save = itr->second;
|
||||
InstanceSave* save = itr->second;
|
||||
|
||||
for (InstanceSave::PlayerListType::iterator itr2 = save->m_playerList.begin(), next = itr2; itr2 != save->m_playerList.end(); itr2 = next)
|
||||
{
|
||||
@@ -69,7 +69,7 @@ InstanceSaveManager::~InstanceSaveManager()
|
||||
*/
|
||||
InstanceSave* InstanceSaveManager::AddInstanceSave(uint32 mapId, uint32 instanceId, Difficulty difficulty, time_t resetTime, bool canReset, bool load)
|
||||
{
|
||||
if (InstanceSave *old_save = GetInstanceSave(instanceId))
|
||||
if (InstanceSave* old_save = GetInstanceSave(instanceId))
|
||||
return old_save;
|
||||
|
||||
const MapEntry* entry = sMapStore.LookupEntry(mapId);
|
||||
@@ -107,7 +107,7 @@ InstanceSave* InstanceSaveManager::AddInstanceSave(uint32 mapId, uint32 instance
|
||||
|
||||
sLog->outDebug(LOG_FILTER_MAPS, "InstanceSaveManager::AddInstanceSave: mapid = %d, instanceid = %d", mapId, instanceId);
|
||||
|
||||
InstanceSave *save = new InstanceSave(mapId, instanceId, difficulty, resetTime, canReset);
|
||||
InstanceSave* save = new InstanceSave(mapId, instanceId, difficulty, resetTime, canReset);
|
||||
if (!load)
|
||||
save->SaveToDB();
|
||||
|
||||
@@ -115,7 +115,7 @@ InstanceSave* InstanceSaveManager::AddInstanceSave(uint32 mapId, uint32 instance
|
||||
return save;
|
||||
}
|
||||
|
||||
InstanceSave *InstanceSaveManager::GetInstanceSave(uint32 InstanceId)
|
||||
InstanceSave* InstanceSaveManager::GetInstanceSave(uint32 InstanceId)
|
||||
{
|
||||
InstanceSaveHashMap::iterator itr = m_instanceSaveById.find(InstanceId);
|
||||
return itr != m_instanceSaveById.end() ? itr->second : NULL;
|
||||
@@ -166,11 +166,11 @@ void InstanceSave::SaveToDB()
|
||||
std::string data;
|
||||
uint32 completedEncounters = 0;
|
||||
|
||||
Map *map = sMapMgr->FindMap(GetMapId(), m_instanceid);
|
||||
Map* map = sMapMgr->FindMap(GetMapId(), m_instanceid);
|
||||
if (map)
|
||||
{
|
||||
ASSERT(map->IsDungeon());
|
||||
if (InstanceScript *instanceScript = ((InstanceMap*)map)->GetInstanceScript())
|
||||
if (InstanceScript* instanceScript = ((InstanceMap*)map)->GetInstanceScript())
|
||||
{
|
||||
data = instanceScript->GetSaveData();
|
||||
completedEncounters = instanceScript->GetCompletedEncounterMask();
|
||||
@@ -190,7 +190,7 @@ void InstanceSave::SaveToDB()
|
||||
time_t InstanceSave::GetResetTimeForDB()
|
||||
{
|
||||
// only save the reset time for normal instances
|
||||
const MapEntry *entry = sMapStore.LookupEntry(GetMapId());
|
||||
const MapEntry* entry = sMapStore.LookupEntry(GetMapId());
|
||||
if (!entry || entry->map_type == MAP_RAID || GetDifficulty() == DUNGEON_DIFFICULTY_HEROIC)
|
||||
return 0;
|
||||
else
|
||||
@@ -313,7 +313,7 @@ void InstanceSaveManager::LoadResetTimes()
|
||||
{
|
||||
do
|
||||
{
|
||||
Field *fields = result->Fetch();
|
||||
Field* fields = result->Fetch();
|
||||
uint32 instance = fields[1].GetUInt32();
|
||||
time_t resettime = time_t(fields[0].GetUInt32() + 2 * HOUR);
|
||||
InstResetTimeMapDiffType::iterator itr = instResetTime.find(instance);
|
||||
@@ -339,7 +339,7 @@ void InstanceSaveManager::LoadResetTimes()
|
||||
{
|
||||
do
|
||||
{
|
||||
Field *fields = result->Fetch();
|
||||
Field* fields = result->Fetch();
|
||||
uint32 mapid = fields[0].GetUInt16();
|
||||
Difficulty difficulty = Difficulty(fields[1].GetUInt32());
|
||||
uint64 oldresettime = fields[2].GetUInt32();
|
||||
@@ -511,7 +511,7 @@ void InstanceSaveManager::_ResetSave(InstanceSaveHashMap::iterator &itr)
|
||||
void InstanceSaveManager::_ResetInstance(uint32 mapid, uint32 instanceId)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_MAPS, "InstanceSaveMgr::_ResetInstance %u, %u", mapid, instanceId);
|
||||
Map *map = (MapInstanced*)sMapMgr->CreateBaseMap(mapid);
|
||||
Map* map = (MapInstanced*)sMapMgr->CreateBaseMap(mapid);
|
||||
if (!map->Instanceable())
|
||||
return;
|
||||
|
||||
@@ -535,7 +535,7 @@ void InstanceSaveManager::_ResetInstance(uint32 mapid, uint32 instanceId)
|
||||
void InstanceSaveManager::_ResetOrWarnAll(uint32 mapid, Difficulty difficulty, bool warn, time_t resetTime)
|
||||
{
|
||||
// global reset for all instances of the given map
|
||||
MapEntry const *mapEntry = sMapStore.LookupEntry(mapid);
|
||||
MapEntry const* mapEntry = sMapStore.LookupEntry(mapid);
|
||||
if (!mapEntry->Instanceable())
|
||||
return;
|
||||
|
||||
@@ -583,14 +583,14 @@ void InstanceSaveManager::_ResetOrWarnAll(uint32 mapid, Difficulty difficulty, b
|
||||
}
|
||||
|
||||
// note: this isn't fast but it's meant to be executed very rarely
|
||||
Map const *map = sMapMgr->CreateBaseMap(mapid); // _not_ include difficulty
|
||||
Map const* map = sMapMgr->CreateBaseMap(mapid); // _not_ include difficulty
|
||||
MapInstanced::InstancedMaps &instMaps = ((MapInstanced*)map)->GetInstancedMaps();
|
||||
MapInstanced::InstancedMaps::iterator mitr;
|
||||
uint32 timeLeft;
|
||||
|
||||
for (mitr = instMaps.begin(); mitr != instMaps.end(); ++mitr)
|
||||
{
|
||||
Map *map2 = mitr->second;
|
||||
Map* map2 = mitr->second;
|
||||
if (!map2->IsDungeon())
|
||||
continue;
|
||||
|
||||
|
||||
@@ -164,7 +164,7 @@ class InstanceSaveManager
|
||||
void RemoveInstanceSave(uint32 InstanceId);
|
||||
static void DeleteInstanceFromDB(uint32 instanceid);
|
||||
|
||||
InstanceSave *GetInstanceSave(uint32 InstanceId);
|
||||
InstanceSave* GetInstanceSave(uint32 InstanceId);
|
||||
|
||||
/* statistics */
|
||||
uint32 GetNumInstanceSaves() { return m_instanceSaveById.size(); }
|
||||
|
||||
@@ -39,7 +39,7 @@ void InstanceScript::SaveToDB()
|
||||
CharacterDatabase.Execute(stmt);
|
||||
}
|
||||
|
||||
void InstanceScript::HandleGameObject(uint64 GUID, bool open, GameObject *go)
|
||||
void InstanceScript::HandleGameObject(uint64 GUID, bool open, GameObject* go)
|
||||
{
|
||||
if (!go)
|
||||
go = instance->GetGameObject(GUID);
|
||||
@@ -58,7 +58,7 @@ bool InstanceScript::IsEncounterInProgress() const
|
||||
return false;
|
||||
}
|
||||
|
||||
void InstanceScript::LoadMinionData(const MinionData *data)
|
||||
void InstanceScript::LoadMinionData(const MinionData* data)
|
||||
{
|
||||
while (data->entry)
|
||||
{
|
||||
@@ -70,7 +70,7 @@ void InstanceScript::LoadMinionData(const MinionData *data)
|
||||
sLog->outDebug(LOG_FILTER_TSCR, "InstanceScript::LoadMinionData: " UI64FMTD " minions loaded.", uint64(minions.size()));
|
||||
}
|
||||
|
||||
void InstanceScript::LoadDoorData(const DoorData *data)
|
||||
void InstanceScript::LoadDoorData(const DoorData* data)
|
||||
{
|
||||
while (data->entry)
|
||||
{
|
||||
@@ -82,7 +82,7 @@ void InstanceScript::LoadDoorData(const DoorData *data)
|
||||
sLog->outDebug(LOG_FILTER_TSCR, "InstanceScript::LoadDoorData: " UI64FMTD " doors loaded.", uint64(doors.size()));
|
||||
}
|
||||
|
||||
void InstanceScript::UpdateMinionState(Creature *minion, EncounterState state)
|
||||
void InstanceScript::UpdateMinionState(Creature* minion, EncounterState state)
|
||||
{
|
||||
switch (state)
|
||||
{
|
||||
@@ -103,7 +103,7 @@ void InstanceScript::UpdateMinionState(Creature *minion, EncounterState state)
|
||||
}
|
||||
}
|
||||
|
||||
void InstanceScript::UpdateDoorState(GameObject *door)
|
||||
void InstanceScript::UpdateDoorState(GameObject* door)
|
||||
{
|
||||
DoorInfoMap::iterator lower = doors.lower_bound(door->GetEntry());
|
||||
DoorInfoMap::iterator upper = doors.upper_bound(door->GetEntry());
|
||||
@@ -132,7 +132,7 @@ void InstanceScript::UpdateDoorState(GameObject *door)
|
||||
door->SetGoState(open ? GO_STATE_ACTIVE : GO_STATE_READY);
|
||||
}
|
||||
|
||||
void InstanceScript::AddDoor(GameObject *door, bool add)
|
||||
void InstanceScript::AddDoor(GameObject* door, bool add)
|
||||
{
|
||||
DoorInfoMap::iterator lower = doors.lower_bound(door->GetEntry());
|
||||
DoorInfoMap::iterator upper = doors.upper_bound(door->GetEntry());
|
||||
@@ -175,7 +175,7 @@ void InstanceScript::AddDoor(GameObject *door, bool add)
|
||||
UpdateDoorState(door);
|
||||
}
|
||||
|
||||
void InstanceScript::AddMinion(Creature *minion, bool add)
|
||||
void InstanceScript::AddMinion(Creature* minion, bool add)
|
||||
{
|
||||
MinionInfoMap::iterator itr = minions.find(minion->GetEntry());
|
||||
if (itr == minions.end())
|
||||
@@ -191,7 +191,7 @@ bool InstanceScript::SetBossState(uint32 id, EncounterState state)
|
||||
{
|
||||
if (id < bosses.size())
|
||||
{
|
||||
BossInfo *bossInfo = &bosses[id];
|
||||
BossInfo* bossInfo = &bosses[id];
|
||||
if (bossInfo->state == TO_BE_DECIDED) // loading
|
||||
{
|
||||
bossInfo->state = state;
|
||||
@@ -292,7 +292,7 @@ void InstanceScript::DoUpdateWorldState(uint32 uiStateId, uint32 uiStateData)
|
||||
if (!lPlayers.isEmpty())
|
||||
{
|
||||
for (Map::PlayerList::const_iterator itr = lPlayers.begin(); itr != lPlayers.end(); ++itr)
|
||||
if (Player *pPlayer = itr->getSource())
|
||||
if (Player* pPlayer = itr->getSource())
|
||||
pPlayer->SendUpdateWorldState(uiStateId, uiStateData);
|
||||
}
|
||||
else
|
||||
@@ -311,8 +311,8 @@ void InstanceScript::DoSendNotifyToInstance(const char *format, ...)
|
||||
va_start(ap, format);
|
||||
for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i)
|
||||
{
|
||||
if (Player *pPlayer = i->getSource())
|
||||
if (WorldSession *pSession = pPlayer->GetSession())
|
||||
if (Player* pPlayer = i->getSource())
|
||||
if (WorldSession* pSession = pPlayer->GetSession())
|
||||
pSession->SendNotification(format, ap);
|
||||
}
|
||||
va_end(ap);
|
||||
@@ -326,7 +326,7 @@ void InstanceScript::DoUpdateAchievementCriteria(AchievementCriteriaTypes type,
|
||||
|
||||
if (!PlayerList.isEmpty())
|
||||
for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i)
|
||||
if (Player *pPlayer = i->getSource())
|
||||
if (Player* pPlayer = i->getSource())
|
||||
pPlayer->UpdateAchievementCriteria(type, miscValue1, miscValue2, unit);
|
||||
}
|
||||
|
||||
@@ -337,7 +337,7 @@ void InstanceScript::DoStartTimedAchievement(AchievementCriteriaTimedTypes type,
|
||||
|
||||
if (!PlayerList.isEmpty())
|
||||
for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i)
|
||||
if (Player *pPlayer = i->getSource())
|
||||
if (Player* pPlayer = i->getSource())
|
||||
pPlayer->GetAchievementMgr().StartTimedAchievement(type, entry);
|
||||
}
|
||||
|
||||
@@ -348,7 +348,7 @@ void InstanceScript::DoStopTimedAchievement(AchievementCriteriaTimedTypes type,
|
||||
|
||||
if (!PlayerList.isEmpty())
|
||||
for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i)
|
||||
if (Player *pPlayer = i->getSource())
|
||||
if (Player* pPlayer = i->getSource())
|
||||
pPlayer->GetAchievementMgr().RemoveTimedAchievement(type, entry);
|
||||
}
|
||||
|
||||
|
||||
@@ -106,17 +106,17 @@ struct BossInfo
|
||||
|
||||
struct DoorInfo
|
||||
{
|
||||
explicit DoorInfo(BossInfo *_bossInfo, DoorType _type, BoundaryType _boundary)
|
||||
explicit DoorInfo(BossInfo* _bossInfo, DoorType _type, BoundaryType _boundary)
|
||||
: bossInfo(_bossInfo), type(_type), boundary(_boundary) {}
|
||||
BossInfo *bossInfo;
|
||||
BossInfo* bossInfo;
|
||||
DoorType type;
|
||||
BoundaryType boundary;
|
||||
};
|
||||
|
||||
struct MinionInfo
|
||||
{
|
||||
explicit MinionInfo(BossInfo *_bossInfo) : bossInfo(_bossInfo) {}
|
||||
BossInfo *bossInfo;
|
||||
explicit MinionInfo(BossInfo* _bossInfo) : bossInfo(_bossInfo) {}
|
||||
BossInfo* bossInfo;
|
||||
};
|
||||
|
||||
typedef std::multimap<uint32 /*entry*/, DoorInfo> DoorInfoMap;
|
||||
@@ -130,7 +130,7 @@ class InstanceScript : public ZoneScript
|
||||
|
||||
virtual ~InstanceScript() {}
|
||||
|
||||
Map *instance;
|
||||
Map* instance;
|
||||
|
||||
//On creation, NOT load.
|
||||
virtual void Initialize() {}
|
||||
@@ -217,8 +217,8 @@ class InstanceScript : public ZoneScript
|
||||
void AddDoor(GameObject* door, bool add);
|
||||
void AddMinion(Creature* minion, bool add);
|
||||
|
||||
void UpdateDoorState(GameObject *door);
|
||||
void UpdateMinionState(Creature *minion, EncounterState state);
|
||||
void UpdateDoorState(GameObject* door);
|
||||
void UpdateMinionState(Creature* minion, EncounterState state);
|
||||
|
||||
std::string LoadBossState(char const* data);
|
||||
std::string GetBossSaveData();
|
||||
|
||||
Reference in New Issue
Block a user