DB/CreatureFamily: Difference between revisions

From wowdev
Jump to navigation Jump to search
(New page: ==Header Info== Records....................30 Fields.....................18 Record Size................72 String Block Size........1231 ==Structure== '''Column Field Type Not...)
 
 
(20 intermediate revisions by 7 users not shown)
Line 1: Line 1:
==Header Info==
==0.5.3.3368==
struct CreatureFamilyRec {
  uint32_t m_ID;
  float m_minScale;
  uint32_t m_minScaleLevel;
  float m_maxScale;
  uint32_t m_maxScaleLevel;
  {{Type/foreign_key|table=SkillLine}} m_skillLine[2];
};


  Records....................30
==Unknown, apparently between alpha and end of vanilla==
Fields.....................18
  struct CreatureFamilyRec {
Record Size................72
  uint32_t m_ID;
  String Block Size........1231
  float m_minScale;
  uint32_t m_minScaleLevel;
  float m_maxScale;
  uint32_t m_maxScaleLevel;
  {{Type/foreign_key|table=SkillLine}} m_skillLine[2];
  {{Type/foreign_key_mask|table=ItemPetFood}} m_petFoodMask;
  {{Type|langstringref}} m_name_lang;
  {{Type|stringref}} m_iconFile;                                            // "Interface\Icons\Ability_[a-z_]"
  };


==Structure==
==1.12.1.5875, 3.3.5.12340, 6.0.1.18179==
struct CreatureFamilyRec {
  uint32_t m_ID;
  float m_minScale;
  uint32_t m_minScaleLevel;
  float m_maxScale;
  uint32_t m_maxScaleLevel;
  {{Type/foreign_key|table=SkillLine}} m_skillLine[2];
  {{Type/foreign_key_mask|table=ItemPetFood}} m_petFoodMask;
  uint32_t m_petTalentType;
  uint32_t m_categoryEnumID;
  {{Type|langstringref}} m_name_lang;
  {{Type|stringref}} m_iconFile;                                            // "Interface\Icons\Ability_[a-z_]"
};


'''Column Field Type Notes'''
Scale fields are used to transform pet (totems excluded) model sizes on the character selection screen and in-game.
1 ID Integer
2 Unknown Float Q: movement or attack speed modifier?
3 iRefID_[[PetPersonality.dbc|PetPersonality]] Integer Base data columns 11-19.  
4 Unknown Float Q: movement or attack speed modifier?
5 Unknown Integer Q: is player controlled?
6 iRefID_[[SkillLine.dbc|SkillLine]] Integer
7 Unknown Integer Q: is tameable?
8 iRefMask_[[ItemPetFood.dbc|ItemPetFood]] BitMask
9 sRefName String
10-17 Localization String*
18 sRefPath String path: "Interface\Icons\Ability_[a-z_]"


Retrieved from "http://www.sourcepeek.com/wiki/CreatureFamily.dbc"
int32 level_diff = pet_level - m_minScaleLevel >= 0 ? pet_level - m_minScaleLevel : m_maxScaleLevel - m_minScaleLevel;
assert( level_diff > 0 );
float level_scalar = level_diff / (float)(m_maxScaleLevel - m_minScaleLevel);
float base_scale = {{Template:DBField|table=CreatureModelData|column=m_tamedPetBaseScale}} > 0f ? {{Template:DBField|table=CreatureModelData|column=m_tamedPetBaseScale}} : 1f;
float scale = (m_maxScale - m_minScale) * (level_scalar + m_minScale) * base_scale;
if( scale == 0f )
    scale = {{Template:DBField|table=CreatureModelData|column=m_modelScale}} * {{Template:DBField|table=CreatureDisplayInfo|column=m_creatureModelScale}}; // fallback
 
==Pet Food Mask==
'''Hex Decimal  Food'''
0x001 1 Meat
0x002 2 Fish
0x004 4 Cheese
0x008 8 Bread
0x010 16 Fungus
0x020 32 Fruit
0x040 64 Raw meat
0x080 128 Raw fish
0x100 256 Mechanical parts(?)
 
[[Category:DBC]]
[[Category:DBC_Alpha]]
[[Category:DBC_Vanilla]]
[[Category:DBC_WotLK]][[Category:3.3.5.12340]]
[[Category:DBC_WoD]][[Category:6.0.1.18179]]

Latest revision as of 23:43, 1 January 2020

0.5.3.3368

struct CreatureFamilyRec {
  uint32_t m_ID;
  float m_minScale;
  uint32_t m_minScaleLevel;
  float m_maxScale;
  uint32_t m_maxScaleLevel;
  foreign_key<uint32_t, &SkillLineRec::m_ID> m_skillLine[2];
};

Unknown, apparently between alpha and end of vanilla

struct CreatureFamilyRec {
  uint32_t m_ID;
  float m_minScale;
  uint32_t m_minScaleLevel;
  float m_maxScale;
  uint32_t m_maxScaleLevel;
  foreign_key<uint32_t, &SkillLineRec::m_ID> m_skillLine[2];
  foreign_key_mask<uint32_t, &ItemPetFoodRec::m_ID> m_petFoodMask;
  langstringref m_name_lang;
  stringref m_iconFile;                                            // "Interface\Icons\Ability_[a-z_]" 
};

1.12.1.5875, 3.3.5.12340, 6.0.1.18179

struct CreatureFamilyRec {
  uint32_t m_ID;
  float m_minScale;
  uint32_t m_minScaleLevel;
  float m_maxScale;
  uint32_t m_maxScaleLevel;
  foreign_key<uint32_t, &SkillLineRec::m_ID> m_skillLine[2];
  foreign_key_mask<uint32_t, &ItemPetFoodRec::m_ID> m_petFoodMask;
  uint32_t m_petTalentType;
  uint32_t m_categoryEnumID;
  langstringref m_name_lang;
  stringref m_iconFile;                                            // "Interface\Icons\Ability_[a-z_]" 
};

Scale fields are used to transform pet (totems excluded) model sizes on the character selection screen and in-game.

int32 level_diff = pet_level - m_minScaleLevel >= 0 ? pet_level - m_minScaleLevel : m_maxScaleLevel - m_minScaleLevel;
assert( level_diff > 0 ); 
float level_scalar = level_diff / (float)(m_maxScaleLevel - m_minScaleLevel);
float base_scale = CreatureModelDataRec::m_tamedPetBaseScale > 0f ? CreatureModelDataRec::m_tamedPetBaseScale : 1f;
float scale = (m_maxScale - m_minScale) * (level_scalar + m_minScale) * base_scale;
if( scale == 0f )
   scale = CreatureModelDataRec::m_modelScale * CreatureDisplayInfoRec::m_creatureModelScale; // fallback

Pet Food Mask

Hex 	Decimal  Food 
0x001 	1 	 Meat
0x002 	2 	 Fish
0x004 	4 	 Cheese
0x008 	8 	 Bread
0x010 	16 	 Fungus
0x020 	32 	 Fruit
0x040 	64 	 Raw meat
0x080 	128 	 Raw fish
0x100 	256 	 Mechanical parts(?)