diff options
author | Shauren <shauren.trinity@gmail.com> | 2011-03-21 10:44:58 +0100 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2011-03-21 10:44:58 +0100 |
commit | f8162d609ba2d010fadaed56a0dc51df17c3b7a1 (patch) | |
tree | d7821080b430d0fb95e1e092d644269c8d9c2422 | |
parent | 166878b3438fa13568215519c18bfadfbdd161d9 (diff) |
Core/ObjectMgr: Changed vehicle_accessory error reporting when empty to outString
-rwxr-xr-x | src/server/game/Globals/ObjectMgr.cpp | 38 |
1 files changed, 1 insertions, 37 deletions
diff --git a/src/server/game/Globals/ObjectMgr.cpp b/src/server/game/Globals/ObjectMgr.cpp index a995e828fda..074c62000c1 100755 --- a/src/server/game/Globals/ObjectMgr.cpp +++ b/src/server/game/Globals/ObjectMgr.cpp @@ -326,8 +326,6 @@ Group* ObjectMgr::GetGroupByStorageId(uint32 storageId) const return NULL; } - - // Guild collection Guild* ObjectMgr::GetGuildById(uint32 guildId) const { @@ -443,7 +441,6 @@ void ObjectMgr::LoadCreatureLocales() if (!result) return; - do { Field *fields = result->Fetch(); @@ -483,7 +480,6 @@ void ObjectMgr::LoadGossipMenuItemsLocales() if (!result) return; - do { Field *fields = result->Fetch(); @@ -519,7 +515,6 @@ void ObjectMgr::LoadPointOfInterestLocales() if (!result) return; - do { Field *fields = result->Fetch(); @@ -1456,7 +1451,6 @@ void ObjectMgr::LoadCreatures() //TODO: remove this //sGameEventMgr->mGameEventCreatureGuids.resize(52*2-1); - do { Field *fields = result->Fetch(); @@ -1755,7 +1749,6 @@ uint32 ObjectMgr::AddCreData(uint32 entry, uint32 /*team*/, uint32 mapId, float data.unit_flags = cInfo->unit_flags; data.dynamicflags = cInfo->dynamicflags; - AddCreatureToGrid(guid, &data); // Spawn if necessary (loaded grids only) @@ -1806,7 +1799,6 @@ void ObjectMgr::LoadGameobjects() if (GetMapDifficultyData(i,Difficulty(k))) spawnMasks[i] |= (1 << k); - do { Field *fields = result->Fetch(); @@ -2003,7 +1995,6 @@ void ObjectMgr::LoadGameobjectRespawnTimes() return; } - do { Field *fields = result->Fetch(); @@ -2122,7 +2113,6 @@ void ObjectMgr::LoadItemLocales() if (!result) return; - do { Field *fields = result->Fetch(); @@ -2626,7 +2616,6 @@ void ObjectMgr::LoadItemSetNameLocales() if (!result) return; - do { Field *fields = result->Fetch(); @@ -2703,7 +2692,6 @@ void ObjectMgr::LoadItemSetNames() ++count; } while (result->NextRow()); - if (!itemSetItems.empty()) { ItemPrototype const* pProto; @@ -2797,7 +2785,7 @@ void ObjectMgr::LoadVehicleAccessories() if (!result) { - sLog->outErrorDb(">> Loaded 0 vehicle accessories. DB table `vehicle_accessory` is empty."); + sLog->outString(">> Loaded 0 Vehicle Accessories in %u ms", GetMSTimeDiffToNow(oldMSTime)); sLog->outString(); return; } @@ -2846,7 +2834,6 @@ void ObjectMgr::LoadVehicleScaling() return; } - do { Field *fields = result->Fetch(); @@ -4681,7 +4668,6 @@ void ObjectMgr::LoadQuests() } } - else if (qinfo->RewRepValue[j] != 0) { sLog->outErrorDb("Quest %u has `RewRepFaction%d` = 0 but `RewRepValue%d` = %i.", @@ -4690,7 +4676,6 @@ void ObjectMgr::LoadQuests() } } - if (qinfo->RewSpell) { SpellEntry const* spellInfo = sSpellStore.LookupEntry(qinfo->RewSpell); @@ -4864,7 +4849,6 @@ void ObjectMgr::LoadQuestLocales() if (!result) return; - do { Field *fields = result->Fetch(); @@ -4933,7 +4917,6 @@ void ObjectMgr::LoadScripts(ScriptsType type) sprintf(buff, "SELECT id,delay,command,datalong,datalong2,dataint,x,y,z,o%s FROM %s", isSpellScriptTable ? ",effIndex" : "", tableName.c_str()); QueryResult result = WorldDatabase.Query(buff); - if (!result) { sLog->outString(">> Loaded 0 script definitions. DB table `%s` is empty!", tableName.c_str()); @@ -5454,7 +5437,6 @@ void ObjectMgr::ValidateSpellScripts() sScriptMgr->CreateSpellScriptLoaders(itr->first, SpellScriptLoaders); itr = mSpellScripts.upper_bound(itr->first); - for (std::vector<std::pair<SpellScriptLoader *, SpellScriptsMap::iterator> >::iterator sitr = SpellScriptLoaders.begin(); sitr != SpellScriptLoaders.end(); ++sitr) { SpellScript * spellScript = sitr->first->GetSpellScript(); @@ -5558,7 +5540,6 @@ void ObjectMgr::LoadPageTextLocales() if (!result) return; - do { Field *fields = result->Fetch(); @@ -5720,7 +5701,6 @@ void ObjectMgr::LoadGossipText() int cic; - do { ++count; @@ -5728,7 +5708,6 @@ void ObjectMgr::LoadGossipText() Field *fields = result->Fetch(); - uint32 Text_ID = fields[cic++].GetUInt32(); if (!Text_ID) { @@ -5778,7 +5757,6 @@ void ObjectMgr::LoadNpcTextLocales() if (!result) return; - do { Field *fields = result->Fetch(); @@ -6244,7 +6222,6 @@ WorldSafeLocsEntry const *ObjectMgr::GetClosestGraveYard(float x, float y, float return NULL; } - // Simulate std. algorithm: // found some graveyard associated to (ghost_zone,ghost_map) // @@ -6460,7 +6437,6 @@ void ObjectMgr::LoadAreaTriggerTeleports() { Field *fields = result->Fetch(); - ++count; uint32 Trigger_ID = fields[0].GetUInt32(); @@ -6522,7 +6498,6 @@ void ObjectMgr::LoadAccessRequirements() { Field *fields = result->Fetch(); - ++count; uint32 mapid = fields[0].GetUInt32(); @@ -6847,7 +6822,6 @@ void ObjectMgr::LoadGameObjectLocales() if (!result) return; - do { Field *fields = result->Fetch(); @@ -7264,7 +7238,6 @@ void ObjectMgr::LoadReputationRewardRate() return; } - do { @@ -7335,7 +7308,6 @@ void ObjectMgr::LoadReputationOnKill() return; } - do { Field *fields = result->Fetch(); @@ -7404,7 +7376,6 @@ void ObjectMgr::LoadReputationSpilloverTemplate() return; } - do { @@ -7520,7 +7491,6 @@ void ObjectMgr::LoadPointsOfInterest() return; } - do { Field *fields = result->Fetch(); @@ -7571,7 +7541,6 @@ void ObjectMgr::LoadQuestPOI() // 0 1 2 3 QueryResult points = WorldDatabase.PQuery("SELECT questId, id, x, y FROM quest_poi_points ORDER BY questId DESC, idx"); - std::vector<std::vector<std::vector<QuestPOIPoint> > > POIs; if (points) @@ -7906,7 +7875,6 @@ void ObjectMgr::LoadQuestRelationsHelper(QuestRelations& map, std::string table, return; } - PooledQuestRelation* poolRelationMap = go ? &sPoolMgr->mQuestGORelation : &sPoolMgr->mQuestCreatureRelation; if (starter) poolRelationMap->clear(); @@ -8282,7 +8250,6 @@ bool ObjectMgr::LoadTrinityStrings(char const* table, int32 min_value, int32 max if (!result) { - if (min_value == MIN_TRINITY_STRING_ID) // error only in case internal strings sLog->outErrorDb(">> Loaded 0 trinity strings. DB table `%s` is empty. Cannot continue.",table); else @@ -8293,7 +8260,6 @@ bool ObjectMgr::LoadTrinityStrings(char const* table, int32 min_value, int32 max uint32 count = 0; - do { Field *fields = result->Fetch(); @@ -8329,7 +8295,6 @@ bool ObjectMgr::LoadTrinityStrings(char const* table, int32 min_value, int32 max } } while (result->NextRow()); - if (min_value == MIN_TRINITY_STRING_ID) sLog->outString(">> Loaded %u Trinity strings from table %s in %u ms", count, table, GetMSTimeDiffToNow(oldMSTime)); else @@ -9134,7 +9099,6 @@ void ObjectMgr::LoadScriptNames() return; } - uint32 count = 1; do |