[7896] Rename creature_template class/race fields to trainer_class/trainer_race for clarify use. Author: NoFantasy
--HG-- branch : trunk
This commit is contained in:
@@ -733,12 +733,12 @@ bool Creature::isCanTrainingOf(Player* pPlayer, bool msg) const
|
||||
switch(GetCreatureInfo()->trainer_type)
|
||||
{
|
||||
case TRAINER_TYPE_CLASS:
|
||||
if(pPlayer->getClass()!=GetCreatureInfo()->classNum)
|
||||
if(pPlayer->getClass()!=GetCreatureInfo()->trainer_class)
|
||||
{
|
||||
if(msg)
|
||||
{
|
||||
pPlayer->PlayerTalkClass->ClearMenus();
|
||||
switch(GetCreatureInfo()->classNum)
|
||||
switch(GetCreatureInfo()->trainer_class)
|
||||
{
|
||||
case CLASS_DRUID: pPlayer->PlayerTalkClass->SendGossipMenu( 4913,GetGUID()); break;
|
||||
case CLASS_HUNTER: pPlayer->PlayerTalkClass->SendGossipMenu(10090,GetGUID()); break;
|
||||
@@ -763,12 +763,12 @@ bool Creature::isCanTrainingOf(Player* pPlayer, bool msg) const
|
||||
}
|
||||
break;
|
||||
case TRAINER_TYPE_MOUNTS:
|
||||
if(GetCreatureInfo()->race && pPlayer->getRace() != GetCreatureInfo()->race)
|
||||
if(GetCreatureInfo()->trainer_race && pPlayer->getRace() != GetCreatureInfo()->trainer_race)
|
||||
{
|
||||
if(msg)
|
||||
{
|
||||
pPlayer->PlayerTalkClass->ClearMenus();
|
||||
switch(GetCreatureInfo()->classNum)
|
||||
switch(GetCreatureInfo()->trainer_class)
|
||||
{
|
||||
case RACE_DWARF: pPlayer->PlayerTalkClass->SendGossipMenu(5865,GetGUID()); break;
|
||||
case RACE_GNOME: pPlayer->PlayerTalkClass->SendGossipMenu(4881,GetGUID()); break;
|
||||
@@ -838,7 +838,7 @@ bool Creature::isCanTrainingAndResetTalentsOf(Player* pPlayer) const
|
||||
{
|
||||
return pPlayer->getLevel() >= 10
|
||||
&& GetCreatureInfo()->trainer_type == TRAINER_TYPE_CLASS
|
||||
&& pPlayer->getClass() == GetCreatureInfo()->classNum;
|
||||
&& pPlayer->getClass() == GetCreatureInfo()->trainer_class;
|
||||
}
|
||||
|
||||
void Creature::prepareGossipMenu( Player *pPlayer,uint32 gossipid )
|
||||
@@ -904,7 +904,7 @@ void Creature::prepareGossipMenu( Player *pPlayer,uint32 gossipid )
|
||||
cantalking=false;
|
||||
break;
|
||||
case GOSSIP_OPTION_UNLEARNPETSKILLS:
|
||||
if(!pPlayer->GetPet() || pPlayer->GetPet()->getPetType() != HUNTER_PET || pPlayer->GetPet()->m_spells.size() <= 1 || GetCreatureInfo()->trainer_type != TRAINER_TYPE_PETS || GetCreatureInfo()->classNum != CLASS_HUNTER)
|
||||
if(!pPlayer->GetPet() || pPlayer->GetPet()->getPetType() != HUNTER_PET || pPlayer->GetPet()->m_spells.size() <= 1 || GetCreatureInfo()->trainer_type != TRAINER_TYPE_PETS || GetCreatureInfo()->trainer_class != CLASS_HUNTER)
|
||||
cantalking=false;
|
||||
break;
|
||||
case GOSSIP_OPTION_TAXIVENDOR:
|
||||
|
||||
+2
-2
@@ -207,8 +207,8 @@ struct CreatureInfo
|
||||
uint32 family; // enum CreatureFamily values (optional)
|
||||
uint32 trainer_type;
|
||||
uint32 trainer_spell;
|
||||
uint32 classNum;
|
||||
uint32 race;
|
||||
uint32 trainer_class;
|
||||
uint32 trainer_race;
|
||||
float minrangedmg;
|
||||
float maxrangedmg;
|
||||
uint32 rangedattackpower;
|
||||
|
||||
@@ -559,15 +559,15 @@ void ObjectMgr::LoadCreatureTemplates()
|
||||
continue;
|
||||
}
|
||||
|
||||
if(cInfo->classNum != heroicInfo->classNum)
|
||||
if(cInfo->trainer_class != heroicInfo->trainer_class)
|
||||
{
|
||||
sLog.outErrorDb("Creature (Entry: %u) listed in `creature_template_substitution` has different `classNum` in heroic mode.",i);
|
||||
sLog.outErrorDb("Creature (Entry: %u) has different `trainer_class` in heroic mode (Entry: %u).",i,cInfo->HeroicEntry);
|
||||
continue;
|
||||
}
|
||||
|
||||
if(cInfo->race != heroicInfo->race)
|
||||
if(cInfo->trainer_race != heroicInfo->trainer_race)
|
||||
{
|
||||
sLog.outErrorDb("Creature (Entry: %u) listed in `creature_template_substitution` has different `race` in heroic mode.",i);
|
||||
sLog.outErrorDb("Creature (Entry: %u) has different `trainer_race` in heroic mode (Entry: %u).",i,cInfo->HeroicEntry);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user