mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 13:37:05 +00:00
[7896] Rename creature_template class/race fields to trainer_class/trainer_race for clarify use.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
parent
058e74da21
commit
56e86ff05f
7 changed files with 22 additions and 16 deletions
|
|
@ -23,7 +23,7 @@ DROP TABLE IF EXISTS `db_version`;
|
|||
CREATE TABLE `db_version` (
|
||||
`version` varchar(120) default NULL,
|
||||
`creature_ai_version` varchar(120) default NULL,
|
||||
`required_7893_01_mangos_command` bit(1) default NULL
|
||||
`required_7896_01_mangos_creature_template` bit(1) default NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Used DB version notes';
|
||||
|
||||
--
|
||||
|
|
@ -820,8 +820,8 @@ CREATE TABLE `creature_template` (
|
|||
`family` tinyint(4) NOT NULL default '0',
|
||||
`trainer_type` tinyint(4) NOT NULL default '0',
|
||||
`trainer_spell` mediumint(8) unsigned NOT NULL default '0',
|
||||
`class` tinyint(3) unsigned NOT NULL default '0',
|
||||
`race` tinyint(3) unsigned NOT NULL default '0',
|
||||
`trainer_class` tinyint(3) unsigned NOT NULL default '0',
|
||||
`trainer_race` tinyint(3) unsigned NOT NULL default '0',
|
||||
`minrangedmg` float NOT NULL default '0',
|
||||
`maxrangedmg` float NOT NULL default '0',
|
||||
`rangedattackpower` smallint(5) unsigned NOT NULL default '0',
|
||||
|
|
|
|||
4
sql/updates/7896_01_mangos_creature_template.sql
Normal file
4
sql/updates/7896_01_mangos_creature_template.sql
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
ALTER TABLE db_version CHANGE COLUMN required_7893_01_mangos_command required_7896_01_mangos_creature_template bit;
|
||||
|
||||
ALTER TABLE creature_template CHANGE COLUMN class trainer_class tinyint(3) unsigned NOT NULL default '0';
|
||||
ALTER TABLE creature_template CHANGE COLUMN race trainer_race tinyint(3) unsigned NOT NULL default '0';
|
||||
|
|
@ -200,6 +200,7 @@ pkgdata_DATA = \
|
|||
7886_01_mangos_petcreateinfo_spell.sql \
|
||||
7887_01_characters_character_pet.sql \
|
||||
7893_01_mangos_command.sql \
|
||||
7896_01_mangos_creature_template.sql \
|
||||
README
|
||||
|
||||
## Additional files to include when running 'make dist'
|
||||
|
|
@ -380,4 +381,5 @@ EXTRA_DIST = \
|
|||
7886_01_mangos_petcreateinfo_spell.sql \
|
||||
7887_01_characters_character_pet.sql \
|
||||
7893_01_mangos_command.sql \
|
||||
7896_01_mangos_creature_template.sql \
|
||||
README
|
||||
|
|
|
|||
|
|
@ -605,12 +605,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;
|
||||
|
|
@ -635,12 +635,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;
|
||||
|
|
@ -710,7 +710,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 )
|
||||
|
|
@ -771,7 +771,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:
|
||||
|
|
|
|||
|
|
@ -188,8 +188,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;
|
||||
|
|
|
|||
|
|
@ -496,15 +496,15 @@ void ObjectMgr::LoadCreatureTemplates()
|
|||
continue;
|
||||
}
|
||||
|
||||
if(cInfo->classNum != heroicInfo->classNum)
|
||||
if(cInfo->trainer_class != heroicInfo->trainer_class)
|
||||
{
|
||||
sLog.outErrorDb("Creature (Entry: %u) has different `classNum` in heroic mode (Entry: %u).",i,cInfo->HeroicEntry);
|
||||
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) has different `race` in heroic mode (Entry: %u).",i,cInfo->HeroicEntry);
|
||||
sLog.outErrorDb("Creature (Entry: %u) has different `trainer_race` in heroic mode (Entry: %u).",i,cInfo->HeroicEntry);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "7895"
|
||||
#define REVISION_NR "7896"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue