Skip to content

Improvements#31

Open
Stoabrogga wants to merge 7 commits intoazerothcore:masterfrom
Stoabrogga:improvements
Open

Improvements#31
Stoabrogga wants to merge 7 commits intoazerothcore:masterfrom
Stoabrogga:improvements

Conversation

@Stoabrogga
Copy link
Contributor

@Stoabrogga Stoabrogga commented Feb 13, 2026

Changes Proposed:

A few improvements to the module:

  • Add a new config option MorphSummon.Enabled (Closes Option to disable the module #9)
  • Add a new gossip option to change the name of demons and ghouls; can be disabled using the config option MorphSummon.NewNameEnabled (I think this is the only part of my fork worth taking over, the other stuff is not needed)
  • In morphsummon_ddl.sql: Use int instead of int(10)
  • In morphsummon.sql:
    • The UPDATE statement is not needed, the correct npcflag is now in the INSERT statement above.
    • Set VerifiedBuild in creature_template_model to 0 as this is a custom creature which cannot be sniffed.
  • The default of config option MorphSummon.Announce in the code is set to false to reflect the default in the config file.
  • Use the correct spell ID for SUMMON_WATER_ELEMENTAL.
  • Use UNITHOOK_ON_AURA_REMOVE to ensure that the water elemental always has the correct scale.
  • A few bug fixes concerning the gossip options.

Issues Addressed:

SOURCE:

none

Tests Performed:

Tested applying the SQL scripts, compilation and in-game.

How to Test the Changes:

Add creature with ID 601072 to the world and check the gossip options with different player classes. Warlocks and Death Knights have an additional option to generate a new name for their pet if config option MorphSummon.NewNameEnabled is set to 1 (default).

@Stoabrogga Stoabrogga mentioned this pull request Feb 13, 2026
@Stoabrogga
Copy link
Contributor Author

I pushed another commit which ensures that the display IDs (and the Felguard's weapon) are reset to their default values if the module is disabled.

@sudlud
Copy link
Member

sudlud commented Feb 16, 2026

Thanks for the pr! Just wondering, do you plan to propose the dbc changes that you mentioned

@Stoabrogga
Copy link
Contributor Author

Thanks for the pr! Just wondering, do you plan to propose the dbc changes that you mentioned

I did not test this, but I think you have to copy the entries 4907, 17045 and 27029 to new IDs, set scale to 0.85 and use those IDs in the config file for the water elementals (525 is the default, no need to copy this). But I still don't understand why all the other models are scaled automatically, despite having different scaling factors in CreatureDisplayInfo. Only the water elementals do not work.

@Stoabrogga
Copy link
Contributor Author

Ok, I tested this by adding these lines to CreatureDisplayInfo.dbc:

"ID","ModelID","SoundID","ExtendedDisplayInfoID","CreatureModelScale","CreatureModelAlpha","TextureVariation_1","TextureVariation_2","TextureVariation_3","PortraitTextureName","BloodLevel","BloodID","NPCSoundID","ParticleColorID","CreatureGeosetData","ObjectEffectPackageID"
"601072","110","0","0","0,85","255","WaterElementalGreenSkin","","","","1","0","0","295","0","0"
"601073","110","2187","0","0,85","255","WaterElementalRedSkin","","","","-1","0","0","329","0","0"
"601074","2948","110","0","0,85","255","WaterElementalPurpleSkin","","","","1","0","0","292","0","0"

In morphsummon.conf I updated the IDs for the water elemental accordingly:

MorphSummon.Mage.WaterElemental = "Water Elemental,525,Water Elemental Green,601072,Water Elemental Red,601073,Water Elemental Purple,601074"

The water elementals now have the same size.

@sudlud
Copy link
Member

sudlud commented Feb 17, 2026

Thanks for checking, I'm just wondering because to my understanding this pr now makes the scaling of the water elementals worse than before without providing the dbc fix / patch it what would be required?
But maybe I'm not getting the full context, haven't work work the module before :p

@Stoabrogga
Copy link
Contributor Author

I saw that spells can reset the scaling here:

if (petOrMinion->GetUInt32Value(UNIT_CREATED_BY_SPELL) == SUMMON_WATER_ELEMENTAL)
{
// The size of the water elemental model is not automatically scaled, so needs to be done here
CreatureDisplayInfoEntry const* displayInfo = sCreatureDisplayInfoStore.LookupEntry(petOrMinion->GetNativeDisplayId());
petOrMinion->SetObjectScale(0.85f / displayInfo->scale);
}
if (Aura *aura = petOrMinion->AddAura(SUBMERGE, pet))
aura->SetDuration(2000);

After changing the display ID an aura is applied to hide the pet for 2 seconds, this is just meant to look better than just switching models. But the aura "Submerge" (ID 53421) resets scaling, so you end up with bigger water elementals.

Should I remove the "Submerge" aura and add the scaling for water elementals again?

@Stoabrogga
Copy link
Contributor Author

I think I've found a solution: Using UNITHOOK_ON_AURA_REMOVE the correct scale for the water elemental is set if an aura is removed. This will ensure that the water elemental always has the correct scale. I also restored the scale correction to PLAYERHOOK_ON_AFTER_GUARDIAN_INIT_STATS_FOR_LEVEL.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Option to disable the module

2 participants