mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-30 21:57:01 +01:00
Merge branch 'bfa'
This commit is contained in:
@@ -412,10 +412,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);
|
||||
(*itr)->ToCreature()->SetDisplayId(displayId);
|
||||
CreatureModel const* model = ObjectMgr::ChooseDisplayId(ci);
|
||||
(*itr)->ToCreature()->SetDisplayId(model->CreatureDisplayID, model->DisplayScale);
|
||||
TC_LOG_DEBUG("scripts.ai", "SmartScript::ProcessAction:: SMART_ACTION_MORPH_TO_ENTRY_OR_MODEL: Creature entry %u, %s set displayid to %u",
|
||||
(*itr)->GetEntry(), (*itr)->GetGUID().ToString().c_str(), displayId);
|
||||
(*itr)->GetEntry(), (*itr)->GetGUID().ToString().c_str(), model->CreatureDisplayID);
|
||||
}
|
||||
}
|
||||
//if no param1, then use value from param2 (modelId)
|
||||
@@ -1291,7 +1291,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))
|
||||
(*itr)->ToUnit()->Mount(ObjectMgr::ChooseDisplayId(cInfo));
|
||||
(*itr)->ToUnit()->Mount(ObjectMgr::ChooseDisplayId(cInfo)->CreatureDisplayID);
|
||||
}
|
||||
else
|
||||
(*itr)->ToUnit()->Mount(e.action.morphOrMount.model);
|
||||
|
||||
Reference in New Issue
Block a user