@@ -9146,57 +9146,6 @@ void ObjectMgr::LoadTrainers()
9146
9146
TC_LOG_INFO (" server.loading" , " >> Loaded " SZFMTD " Trainers in %u ms" , _trainers.size (), GetMSTimeDiffToNow (oldMSTime));
9147
9147
}
9148
9148
9149
- void ObjectMgr::LoadCreatureTrainers ()
9150
- {
9151
- uint32 oldMSTime = getMSTime ();
9152
-
9153
- _creatureDefaultTrainers.clear ();
9154
-
9155
- if (QueryResult result = WorldDatabase.Query (" SELECT CreatureId, TrainerId, MenuId, OptionIndex FROM creature_trainer" ))
9156
- {
9157
- do
9158
- {
9159
- Field* fields = result->Fetch ();
9160
- uint32 creatureId = fields[0 ].GetUInt32 ();
9161
- uint32 trainerId = fields[1 ].GetUInt32 ();
9162
- uint32 gossipMenuId = fields[2 ].GetUInt32 ();
9163
- uint32 gossipOptionIndex = fields[3 ].GetUInt32 ();
9164
-
9165
- if (!GetCreatureTemplate (creatureId))
9166
- {
9167
- TC_LOG_ERROR (" sql.sql" , " Table `creature_trainer` references non-existing creature template (CreatureId: %u), ignoring" , creatureId);
9168
- continue ;
9169
- }
9170
-
9171
- if (!GetTrainer (trainerId))
9172
- {
9173
- TC_LOG_ERROR (" sql.sql" , " Table `creature_trainer` references non-existing trainer (TrainerId: %u) for CreatureId %u MenuId %u OptionIndex %u, ignoring" ,
9174
- trainerId, creatureId, gossipMenuId, gossipOptionIndex);
9175
- continue ;
9176
- }
9177
-
9178
- if (gossipMenuId || gossipOptionIndex)
9179
- {
9180
- Trinity::IteratorPair<GossipMenuItemsContainer::const_iterator> gossipMenuItems = GetGossipMenuItemsMapBounds (gossipMenuId);
9181
- auto gossipOptionItr = std::find_if (gossipMenuItems.begin (), gossipMenuItems.end (), [gossipOptionIndex](std::pair<uint32 const , GossipMenuItems> const & entry)
9182
- {
9183
- return entry.second .OptionIndex == gossipOptionIndex;
9184
- });
9185
- if (gossipOptionItr == gossipMenuItems.end ())
9186
- {
9187
- TC_LOG_ERROR (" sql.sql" , " Table `creature_trainer` references non-existing gossip menu option (MenuId %u OptionIndex %u) for CreatureId %u and TrainerId %u, ignoring" ,
9188
- gossipMenuId, gossipOptionIndex, creatureId, trainerId);
9189
- continue ;
9190
- }
9191
- }
9192
-
9193
- _creatureDefaultTrainers[std::make_tuple (creatureId, gossipMenuId, gossipOptionIndex)] = trainerId;
9194
- } while (result->NextRow ());
9195
- }
9196
-
9197
- TC_LOG_INFO (" server.loading" , " >> Loaded " SZFMTD " default trainers in %u ms" , _creatureDefaultTrainers.size (), GetMSTimeDiffToNow (oldMSTime));
9198
- }
9199
-
9200
9149
void ObjectMgr::LoadCreatureSummonerEntry ()
9201
9150
{
9202
9151
uint32 oldMSTime = getMSTime ();
0 commit comments