DB/CreatureFamily

From wowdev
Jump to navigation Jump to search

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(?)