Quantcast WoWInterface - View Single Post - PlayerModel:SetDisplayInfo
View Single Post
07-03-16, 03:26 AM   #65
Resike
A Pyroguard Emberseer
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 1,289
Originally Posted by telkostrasz View Post
Hi there, I'm the author of Storyline.

We indeed used GetModel to get a model ID. We don't care if it's a path, a number a hash or whatever, we just need a way to differentiate one model from another when set with SetUnit(unitID).

The reason we do that is because:

- For animations we play several animation sequentially. So we need to know when the previous model animation is finished before launching the next. AFAIK there is no event for this. So we mapped the animation duration based on the modelPath (but again, even a number/hash could work).

- For scaling two models we need to know the races of each. But again, AFAIK there is no way to get an NPC race (UnitRace on a npc does not return anything) ? So we used the modelPath to map it to the race.

So I completely understand that Blizzard want to get away from filePath. But when removing GetModel they didn't brought any replacement allowing to get these hash/fileID instead ?

In short: we need the modelPath/id/hash/whatever to map it to a race, because we need the race for scaling or animation duration. But any idea other is welcome.

Hope it helps.

Thanks !
You could try the new api called :GetDisplayInfo() i'm just not sure if it's working on models set with :SetUnit().