mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 19:37:02 +00:00
[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:
parent
22b515718f
commit
d0df25fd8c
13 changed files with 243 additions and 82 deletions
|
|
@ -6830,6 +6830,13 @@ void Spell::DoSummonTotem(SpellEffectIndex eff_idx, uint8 slot_dbc)
|
|||
return;
|
||||
}
|
||||
|
||||
// special model selection case for totems
|
||||
if (m_caster->GetTypeId() == TYPEID_PLAYER)
|
||||
{
|
||||
if (uint32 modelid_race = sObjectMgr.GetModelForRace(pTotem->GetNativeDisplayId(), m_caster->getRaceMask()))
|
||||
pTotem->SetDisplayId(modelid_race);
|
||||
}
|
||||
|
||||
float angle = slot < MAX_TOTEM_SLOT ? M_PI_F/MAX_TOTEM_SLOT - (slot*2*M_PI_F/MAX_TOTEM_SLOT) : 0;
|
||||
|
||||
float x, y, z;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue