Skip to content

Remove trainer_... fields from creature_template and move trainerType to DB - #3128

Open
FlagFlayer wants to merge 19 commits into
vmangos:developmentfrom
FlagFlayer:notrainerfields
Open

FlagFlayer wants to merge 19 commits into
vmangos:developmentfrom
FlagFlayer:notrainerfields

Conversation

@FlagFlayer

@FlagFlayer FlagFlayer commented Sep 26, 2025

Copy link
Copy Markdown
Contributor

🍰 Pullrequest

Main changes:

  • Remove deprecated trainer_... fields from creature_template (except for trainer_id, not all trainer_ids are sniffed).

  • Move trainerType assignment to DB and evaluate based on sniffed values.

  • Handle trainer gossip options via conditions in gossip_menu_option. All missing gossip options and conditions have been added and applied.

Miscellaneous

  • Clean up deprecated code: "msg" field in IsTrainerOf and CanInteractWithBattleMaster (has no function)

How2Test

  • Talk to a trainer. Trainer gossip option appears when the correct conditions are met.
  • Use .learn all_trainer. It correctly teaches all available trainer spells.

Todo / Checklist

  • Remove relevant fields from creature_template and replace code that is reliant on them
  • Move trainerType assignment to DB (trainer greeting type)
  • Adjust the Core to work with the new DB assignment
  • Reimplement .learn all_trainer command in the new environment

trainer is valid if no condition required to train
skip gossip_menu 0 entries (e.g. world trainers)
IsConditionSatisfied returns false on no condition. Added proper error logging.
@ratkosrb

Copy link
Copy Markdown
Contributor

What happened with the Soothsaying fixes, did that implementation require these changes first?

@mserajnik

Copy link
Copy Markdown
Contributor

What happened with the Soothsaying fixes, did that implementation require these changes first?

I think he just decided to split up the PR, see his comment here: #1705 (comment)

no gossip menu means no condition to access the training menu
@FlagFlayer

Copy link
Copy Markdown
Contributor Author

What happened with the Soothsaying fixes, did that implementation require these changes first?

They did not require this, but since this part of the fixes makes the trainer_spell column become completely empty I bundled these fixes with this change.

What I'm missing for the Soothsaying fixes is sniffs of the gossip submenus when going through the option "I would like to relearn my leatherworking focus", as well as the correct order of entries when talking to Book Soothsaying for Dummies and having both the leatherworking and the engineering options available. I haven't been able to get around to getting these sniffs, I hope someone else might be able to obtain them at some point.

@FlagFlayer
FlagFlayer marked this pull request as draft December 29, 2025 17:00
@FlagFlayer
FlagFlayer marked this pull request as ready for review August 25, 2026 21:04
@FlagFlayer FlagFlayer changed the title Remove pointless trainer_... fields from creature_template Remove trainer_... fields from creature_template and move trainerType to DB Aug 25, 2026
@FlagFlayer

Copy link
Copy Markdown
Contributor Author

Ready for merge

Comment thread sql/migrations/20260825234315_world.sql Outdated
Comment thread sql/migrations/20260825234315_world.sql Outdated
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.

3 participants