[10381] Implement generic system for racial model selection

Table creature_model_info store creature entry to use model from (or explicit model). The selection is based on a base modelId and racemask.

Hacks for shapeshift models removed (data included in SQL update)
Dropped no longer needed creature_model_info.modelid_other_team, as creature_model_info can and should be used instead (sorry, this is what happen when author doesn't do full research :) )

Signed-off-by: NoFantasy <nofantasy@nf.no>
This commit is contained in:
NoFantasy 2010-08-19 16:57:48 +02:00
parent 22b515718f
commit d0df25fd8c
13 changed files with 243 additions and 82 deletions

View file

@ -520,7 +520,6 @@ class ObjectMgr
CreatureModelInfo const *GetCreatureModelInfo( uint32 modelid );
CreatureModelInfo const* GetCreatureModelRandomGender(uint32 display_id);
uint32 GetCreatureModelAlternativeModel(uint32 modelId);
uint32 GetCreatureModelOtherTeamModel(uint32 modelId);
EquipmentInfo const *GetEquipmentInfo( uint32 entry );
static CreatureDataAddon const *GetCreatureAddon( uint32 lowguid )
@ -694,6 +693,7 @@ class ObjectMgr
void LoadCreatureRespawnTimes();
void LoadCreatureAddons();
void LoadCreatureModelInfo();
void LoadCreatureModelRace();
void LoadEquipmentTemplates();
void LoadGameObjectLocales();
void LoadGameobjects();
@ -1016,6 +1016,8 @@ class ObjectMgr
return GossipMenuItemsMapBounds(m_mGossipMenuItemsMap.lower_bound(uiMenuId),m_mGossipMenuItemsMap.upper_bound(uiMenuId));
}
uint32 GetModelForRace(uint32 sourceModelId, uint32 racemask);
protected:
// first free id for selected id type
@ -1041,6 +1043,8 @@ class ObjectMgr
typedef std::set<uint32> TavernAreaTriggerSet;
typedef std::set<uint32> GameObjectForQuestSet;
typedef std::multimap<uint32, CreatureModelRace> CreatureModelRaceMap;
GroupMap mGroupMap;
GuildMap mGuildMap;
ArenaTeamMap mArenaTeamMap;
@ -1135,6 +1139,8 @@ class ObjectMgr
typedef std::vector<PlayerCondition> ConditionStore;
ConditionStore mConditions;
CreatureModelRaceMap m_mCreatureModelRaceMap;
CacheNpcTextIdMap m_mCacheNpcTextIdMap;
CacheVendorItemMap m_mCacheVendorItemMap;
CacheTrainerSpellMap m_mCacheTrainerSpellMap;