azerothcore / mod-ah-bot

AHBot for AzerothCore
http://azerothcore.org/
75 stars 87 forks source link

Bug: wrong variable read from the config #123

Open Dezaimasu opened 1 week ago

Dezaimasu commented 1 week ago

Current Behaviour

I was looking through the code trying to understand how "DuplicatesCount" from config and "maxitems" from DB work together, and stumbled upon this line in AuctionHouseBotConfig.cpp file:

ElapsingTimeClass = sConfigMgr->GetOption<uint32>("AuctionHouseBot.DuplicatesCount" , 1);

I'm sure it's just a typo and not the intended behavior to read "DuplicatesCount" value into "ElapsingTimeClass" variable.

Expected Behaviour

"ElapsingTimeClass" variable should read corresponding "ElapsingTimeClass" value from the config.

Steps to reproduce the problem

https://github.com/azerothcore/mod-ah-bot/blob/b6b9a01a93ff5f43271ac57b1582be6f4413a108/src/AuctionHouseBotConfig.cpp#L2046

Extra Notes

No response

AC rev. hash/commit

b6b9a01a93ff5f43271ac57b1582be6f4413a108

Operating system

Windows 10 x64

Custom changes or Modules

No response

kewinrausch commented 6 days ago

You are right, this is a copy & paste typo