Conversation
|
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. |
|
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. |
|
Ok, I tested this by adding these lines to In The water elementals now have the same size. |
|
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? |
|
I saw that spells can reset the scaling here: mod-morphsummon/src/morphsummon.cpp Lines 353 to 361 in da1f9d9 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? |
|
I think I've found a solution: Using |
There was a problem hiding this comment.
Pull request overview
This pull request adds several improvements to the MorphSummon module for AzerothCore:
Changes:
- Adds a new config option
MorphSummon.Enabledto enable/disable the module (addresses issue #9) - Adds a new gossip option to generate new pet names for demons and ghouls, controlled by
MorphSummon.NewNameEnabled - Fixes SQL schema to use
intinstead of deprecatedint(10)syntax - Corrects the default value of
MorphSummon.Announceconfig to match the config file - Fixes water elemental spell ID and adds improved scaling logic via
OnAuraRemovehook - Refactors gossip menu logic to fix bugs with
sorryflag initialization - Adds pet restoration logic to reset to default appearances when module is disabled
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 6 comments.
| File | Description |
|---|---|
| src/morphsummon.cpp | Implements module enable/disable logic, new name generation feature, pet restoration when disabled, water elemental scaling improvements, and gossip menu bug fixes |
| data/sql/db-world/base/morphsummon.sql | Updates creature template to set npcflag correctly, removes redundant UPDATE statement, sets VerifiedBuild to 0 for custom creature, adds new gossip option |
| data/sql/db-characters/base/morphsummon_ddl.sql | Updates column types from deprecated int(10) to int |
| conf/morphsummon.conf.dist | Adds new config options for Enabled and NewNameEnabled features |
Comments suppressed due to low confidence (1)
src/morphsummon.cpp:181
- Missing null pointer check for
displayInfo. TheLookupEntry()can return null if the display ID is not found. Add a null check before dereferencing to prevent a crash:if (displayInfo) { pet->SetObjectScale(0.85f / displayInfo->scale); }
CreatureDisplayInfoEntry const* displayInfo = sCreatureDisplayInfoStore.LookupEntry(pet->GetNativeDisplayId());
pet->SetObjectScale(0.85f / displayInfo->scale);
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Downward compatibility. If people upgrade to the new version they probably don't want any new gossip options suddenly appearing.
|
I think this is ready to be merged. If there's anything else I can do, please let me know. |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Pushed a new commit to address the copilot feedback. |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated 5 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Ok, another try... |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Just let me know when copilots requests get too wild :p |
Some of the complaints are still valid. Would be great if it could bring this up in one review, though. Btw, pushed another commit :-) |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Changes Proposed:
A few improvements to the module:
MorphSummon.Enabled(Closes Option to disable the module #9)MorphSummon.NewNameEnabled(I think this is the only part of my fork worth taking over, the other stuff is not needed)morphsummon_ddl.sql: Useintinstead ofint(10)morphsummon.sql:npcflagis now in the INSERT statement above.VerifiedBuildincreature_template_modelto 0 as this is a custom creature which cannot be sniffed.MorphSummon.Announcein the code is set tofalseto reflect the default in the config file.SUMMON_WATER_ELEMENTAL.UNITHOOK_ON_AURA_REMOVEto ensure that the water elemental always has the correct scale.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.NewNameEnabledis set to 1.