changes in creature base stats storage

* speedup stats searching
  * no more default stat generation for each class-level pair, there is only one default stat
  * CreatureBaseStats does not contain level and class

--HG--
branch : trunk
This commit is contained in:
silver1ce
2010-03-03 04:32:47 +02:00
parent 9e63454b63
commit f748ea34e3
5 changed files with 33 additions and 37 deletions
+1 -3
View File
@@ -172,8 +172,6 @@ struct CreatureInfo
// Defines base stats for creatures (used to calculate HP/mana/armor).
struct CreatureBaseStats
{
uint8 Level;
uint8 Class;
uint32 BaseHealth[MAX_CREATURE_BASE_HP];
uint32 BaseMana;
uint32 BaseArmor;
@@ -202,7 +200,7 @@ struct CreatureBaseStats
static CreatureBaseStats const* GetBaseStats(uint8 level, uint8 unitClass);
};
typedef std::vector<CreatureBaseStats> CreatureBaseStatsList;
typedef UNORDERED_MAP<uint16, CreatureBaseStats> CreatureBaseStatsMap;
struct CreatureLocale
{