Closed duncrafter closed 1 year ago
same thing here.
https://github.com/azerothcore/azerothcore-wotlk/issues/9291 Probably the reason
Can we fix this by manually adding things to a list?
A community member named Vitaliy posted this solution in a now deleted(?)/vanished comment, which works, as far as I can tell, without any issues:
``class AutoBalance_AllCreatureScript : public AllCreatureScript
{
public:
AutoBalance_AllCreatureScript()
: AllCreatureScript("AutoBalance_AllCreatureScript")
{
}
just add this:
void OnCreatureAddWorld(Creature* creature) override
{
if (!enabled)
return;
ModifyCreatureAttributes(creature, true);
}
Oh, is that bottom text just added to the AutoBalance.cpp under the above? Seems shockingly simple.
Yes, with a two-line space between old code and addition. My knowledge of C++ is very limited, but I think this starts the code for attribute modification when a creature is added to the world?
This issue is still persistent as of 2023.
Likewise, testing out the changes suggested by the deleted post, the following error occurs when building the server:
15>C:\AzerothCore\modules\mod-autobalance\src\AutoBalance.cpp(1913,10): error C2535: 'void AutoBalance_AllCreatureScript::OnCreatureAddWorld(Creature *)': member function already defined or declared
15>C:\AzerothCore\modules\mod-autobalance\src\AutoBalance.cpp(1892,10): message : see declaration of 'AutoBalance_AllCreatureScript::OnCreatureAddWorld'
15>C:\AzerothCore\modules\mod-autobalance\src\AutoBalance.cpp(1894,10): error C2065: 'enabled': undeclared identifier
15>C:\AzerothCore\modules\mod-autobalance\src\AutoBalance.cpp(1897,9): error C2660: 'AutoBalance_AllCreatureScript::ModifyCreatureAttributes': function does not take 2 arguments
15>C:\AzerothCore\modules\mod-autobalance\src\AutoBalance.cpp(2058,10): message : see declaration of 'AutoBalance_AllCreatureScript::ModifyCreatureAttributes'
15>C:\AzerothCore\modules\mod-autobalance\src\AutoBalance.cpp(1897,9): message : while trying to match the argument list '(Creature *, bool)'
This issue is still persistent as of 2023.
Likewise, testing out the changes suggested by the deleted post, the following error occurs when building the server:
15>C:\AzerothCore\modules\mod-autobalance\src\AutoBalance.cpp(1913,10): error C2535: 'void AutoBalance_AllCreatureScript::OnCreatureAddWorld(Creature *)': member function already defined or declared 15>C:\AzerothCore\modules\mod-autobalance\src\AutoBalance.cpp(1892,10): message : see declaration of 'AutoBalance_AllCreatureScript::OnCreatureAddWorld' 15>C:\AzerothCore\modules\mod-autobalance\src\AutoBalance.cpp(1894,10): error C2065: 'enabled': undeclared identifier 15>C:\AzerothCore\modules\mod-autobalance\src\AutoBalance.cpp(1897,9): error C2660: 'AutoBalance_AllCreatureScript::ModifyCreatureAttributes': function does not take 2 arguments 15>C:\AzerothCore\modules\mod-autobalance\src\AutoBalance.cpp(2058,10): message : see declaration of 'AutoBalance_AllCreatureScript::ModifyCreatureAttributes' 15>C:\AzerothCore\modules\mod-autobalance\src\AutoBalance.cpp(1897,9): message : while trying to match the argument list '(Creature *, bool)'
I'll try to check it tomorrow.
Currently most summoned creatures (Guardians/Pets etc.) health is not scaling properly. Example: Lupine Delusions in SFK, Remote-Controlled Golems in DM/EVC