* Set Trinity referenced trainer start entry to 200000
* Removed unneeded bar loading code for trainers --HG-- branch : trunk
This commit is contained in:
+4
-11
@@ -8133,8 +8133,9 @@ void ObjectMgr::LoadMailLevelRewards()
|
|||||||
bool ObjectMgr::AddSpellToTrainer(int32 entry, int32 spell, Field *fields, std::set<uint32> *skip_trainers, std::set<uint32> *talentIds)
|
bool ObjectMgr::AddSpellToTrainer(int32 entry, int32 spell, Field *fields, std::set<uint32> *skip_trainers, std::set<uint32> *talentIds)
|
||||||
{
|
{
|
||||||
CreatureInfo const* cInfo = GetCreatureTemplate(entry);
|
CreatureInfo const* cInfo = GetCreatureTemplate(entry);
|
||||||
|
if (entry < TRINITY_TRAINER_START_REF)
|
||||||
if (!cInfo && entry > 0)
|
{
|
||||||
|
if (!cInfo)
|
||||||
{
|
{
|
||||||
sLog.outErrorDb("Table `npc_trainer` have entry for not existed creature template (Entry: %u), ignore", entry);
|
sLog.outErrorDb("Table `npc_trainer` have entry for not existed creature template (Entry: %u), ignore", entry);
|
||||||
return false;
|
return false;
|
||||||
@@ -8217,24 +8218,16 @@ bool ObjectMgr::AddSpellToTrainer(int32 entry, int32 spell, Field *fields, std::
|
|||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
int ObjectMgr::LoadReferenceTrainer(int32 trainer, int32 spell, std::set<uint32> *skip_trainers, std::set<uint32> *talentIds)
|
int ObjectMgr::LoadReferenceTrainer(int32 trainer, int32 spell, std::set<uint32> *skip_trainers, std::set<uint32> *talentIds)
|
||||||
{
|
{
|
||||||
QueryResult_AutoPtr result = WorldDatabase.PQuery("SELECT entry, spell,spellcost,reqskill,reqskillvalue,reqlevel FROM npc_trainer WHERE entry='%d'", spell);
|
QueryResult_AutoPtr result = WorldDatabase.PQuery("SELECT entry, spell,spellcost,reqskill,reqskillvalue,reqlevel FROM npc_trainer WHERE entry='%d'", spell);
|
||||||
if (!result)
|
if (!result)
|
||||||
{
|
|
||||||
barGoLink bar(1);
|
|
||||||
|
|
||||||
bar.step();
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
|
||||||
|
|
||||||
barGoLink bar(result->GetRowCount());
|
|
||||||
|
|
||||||
uint32 count = 0;
|
uint32 count = 0;
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
bar.step();
|
|
||||||
|
|
||||||
Field* fields = result->Fetch();
|
Field* fields = result->Fetch();
|
||||||
|
|
||||||
|
|||||||
@@ -149,6 +149,9 @@ typedef UNORDERED_MAP<uint64/*(instance,guid) pair*/,time_t> RespawnTimes;
|
|||||||
#define MIN_CREATURE_AI_TEXT_STRING_ID (-1) // 'creature_ai_texts'
|
#define MIN_CREATURE_AI_TEXT_STRING_ID (-1) // 'creature_ai_texts'
|
||||||
#define MAX_CREATURE_AI_TEXT_STRING_ID (-1000000)
|
#define MAX_CREATURE_AI_TEXT_STRING_ID (-1000000)
|
||||||
|
|
||||||
|
// Trinity Trainer Reference start range
|
||||||
|
#define TRINITY_TRAINER_START_REF 200000
|
||||||
|
|
||||||
struct TrinityStringLocale
|
struct TrinityStringLocale
|
||||||
{
|
{
|
||||||
std::vector<std::string> Content; // 0 -> default, i -> i-1 locale index
|
std::vector<std::string> Content; // 0 -> default, i -> i-1 locale index
|
||||||
|
|||||||
Reference in New Issue
Block a user