mod-guildhouse icon indicating copy to clipboard operation
mod-guildhouse copied to clipboard

CreatureTemplate/GameObjectTemplate ID's are partially hardcoded

Open dedmen opened this issue 2 years ago • 0 comments

First up, thank you for putting down this note https://github.com/azerothcore/mod-guildhouse/blob/master/sql/world/creatures_objects.sql#L16C26-L16C26

I indeed would have a conflict in my database. But while there is a note and its easy to fix the database ID's. The ID's are still hardcoded on C++ side https://github.com/azerothcore/mod-guildhouse/blob/2c2f81adda5866ed9efdc6c6896d6f0079c5e2a5/src/mod_guildhouse.cpp#L333-L342

https://github.com/azerothcore/mod-guildhouse/blob/2c2f81adda5866ed9efdc6c6896d6f0079c5e2a5/src/mod_guildhouse.cpp#L421 https://github.com/azerothcore/mod-guildhouse/blob/2c2f81adda5866ed9efdc6c6896d6f0079c5e2a5/src/mod_guildhouse_butler.cpp#L61

https://github.com/azerothcore/mod-guildhouse/blob/2c2f81adda5866ed9efdc6c6896d6f0079c5e2a5/src/mod_guildhouse_butler.cpp#L115-L132

https://github.com/azerothcore/mod-guildhouse/blob/2c2f81adda5866ed9efdc6c6896d6f0079c5e2a5/src/mod_guildhouse_butler.cpp#L194

https://github.com/azerothcore/mod-guildhouse/blob/2c2f81adda5866ed9efdc6c6896d6f0079c5e2a5/src/mod_guildhouse_butler.cpp#L259-L266

There should be a config option for the Base ID so when it needs to be changed, you don't need to make over a dozen small edits in multiple c++ files. Or atleast a #define/constant in C++ so that only one place needs to be changed

dedmen avatar Oct 31 '23 13:10 dedmen