DB/Creatures: Port master model system
Fixes incorrect displayid for creatures, due to probability
This commit is contained in:
1 parent
eb5cbdf948
commit
df32b341a5
43 files changed
+65170
-262
No files matched your search
@@ -377,10 +377,10 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
|
||||
{
|
||||
if (CreatureTemplate const* ci = sObjectMgr->GetCreatureTemplate(e.action.morphOrMount.creature))
|
||||
{
|
||||
uint32 displayId = ObjectMgr::ChooseDisplayId(ci);
|
||||
target->ToCreature()->SetDisplayId(displayId);
|
||||
CreatureModel const* model = ObjectMgr::ChooseDisplayId(ci);
|
||||
target->ToCreature()->SetDisplayId(model->CreatureDisplayID);
|
||||
TC_LOG_DEBUG("scripts.ai", "SmartScript::ProcessAction:: SMART_ACTION_MORPH_TO_ENTRY_OR_MODEL: Creature entry %u, GuidLow %u set displayid to %u",
|
||||
target->GetEntry(), target->GetGUID().GetCounter(), displayId);
|
||||
target->GetEntry(), target->GetGUID().GetCounter(), model->CreatureDisplayID);
|
||||
}
|
||||
}
|
||||
//if no param1, then use value from param2 (modelId)
|
||||
@@ -1141,7 +1141,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
|
||||
if (e.action.morphOrMount.creature > 0)
|
||||
{
|
||||
if (CreatureTemplate const* cInfo = sObjectMgr->GetCreatureTemplate(e.action.morphOrMount.creature))
|
||||
target->ToUnit()->Mount(ObjectMgr::ChooseDisplayId(cInfo));
|
||||
target->ToUnit()->Mount(ObjectMgr::ChooseDisplayId(cInfo)->CreatureDisplayID);
|
||||
}
|
||||
else
|
||||
target->ToUnit()->Mount(e.action.morphOrMount.model);
|
||||
|
||||
Reference in new issue
Block a user