Sarjuuk / aowow

Database viewer for TrinityCore based on aowow by @LordJZ, based on the JS-Engine of Wowhead
204 stars 217 forks source link

creature_template_model supported? #433

Closed Helias closed 2 months ago

Helias commented 2 months ago

Describe the bug and how to reproduce it Do you know if creature_template_model is supported? https://github.com/TrinityCore/TrinityCore/commit/9d210476e57949094fdd286001ef4900564edca5

I see that aowow does not support this table, but is there any plan to support it?

On AC we already migrated to creature_template_model, I will try to support it partially, but would be great to have this support even here and align each other.

System:

Sarjuuk commented 2 months ago

No, the 335 branch doesn't use this table. I'll have to look into that.

Sarjuuk commented 2 months ago

My stance is similar to #386, but this is less complicated to implement on your end.

you just need to edit setup/tools/sqlgen/creature.ss.php 1) https://github.com/Sarjuuk/aowow/blob/b11c1125f6f883bbe873ae5484b65ddb9cc1d540/setup/tools/sqlgen/creature.ss.php#L26 replace with

IFNULL(ctm1.CreatureDisplayID, 0), IFNULL(ctm2.CreatureDisplayID, 0), IFNULL(ctm3.CreatureDisplayID, 0), IFNULL(ctm4.CreatureDisplayID, 0),`

2) https://github.com/Sarjuuk/aowow/blob/b11c1125f6f883bbe873ae5484b65ddb9cc1d540/setup/tools/sqlgen/creature.ss.php#L98 append

LEFT JOIN creature_template_model ctm1 ON ct.entry = ctm1.CreatureID AND ctm1.Idx = 0
LEFT JOIN creature_template_model ctm2 ON ct.entry = ctm2.CreatureID AND ctm2.Idx = 1
LEFT JOIN creature_template_model ctm3 ON ct.entry = ctm3.CreatureID AND ctm3.Idx = 2
LEFT JOIN creature_template_model ctm4 ON ct.entry = ctm4.CreatureID AND ctm4.Idx = 3

and thats it.

Helias commented 2 months ago

thank you!