Skip to content
This repository was archived by the owner on Oct 14, 2025. It is now read-only.
This repository was archived by the owner on Oct 14, 2025. It is now read-only.

Bug: Unable to compile - junk_to_gold.h:54:81: fatal error: only virtual member functions can be marked 'override' #1

Description

@kaijikan

Current Behaviour

I have been using this mod for a little while, but am now getting compile errors after updating my playerbots core server and mod

Compilation error:

In file included from /home/steve/azerothcore/modules/mod-junk-to-gold/src/junk_to_gold.cpp:1:
/home/steve/azerothcore/modules/mod-junk-to-gold/src/junk_to_gold.h:54:81: fatal error: only virtual member functions can be marked 'override'
        void OnLootItem(Player* player, Item* item, uint32 count, ObjectGuid lootguid) override;

Further context:

* Modules configuration (static):
  |
  +- worldserver
  |   +- mod-ah-bot
  |   +- mod-junk-to-gold
  |   +- mod-playerbots
  |

-- * Modules config list:
  |
--   +- mod-ah-bot
--   |  * mod_ahbot.conf.dist
--   +- mod-junk-to-gold
--   |  * mod-junk-to-gold.conf.dist
--   +- mod-playerbots
--   |  * playerbots.conf.dist

-- Running cmake hook: AFTER_SRC_LOAD
-- No hooks registered for AFTER_SRC_LOAD
-- Configuring done
-- Generating done
-- Build files have been written to: /home/steve/azerothcore/var/build/obj
Running hooks: HOOKS_MAP_ON_AFTER_CONFIG
Using 6 threads
[  1%] Built target fmt
[  1%] Built target Detour
[  2%] Built target sfmt
[  2%] Built target argon2
[  3%] Built target Recast
[  5%] Built target jemalloc
[  6%] Built target gsoap
[  8%] Built target g3dlib
[  8%] Built target revision.h
[ 12%] Built target common
[ 13%] Built target database
[ 13%] Built target shared
[ 13%] Built target authserver
[ 13%] Building CXX object modules/CMakeFiles/modules.dir/mod-playerbots/src/ChatHelper.cpp.o
[ 13%] Building CXX object modules/CMakeFiles/modules.dir/mod-playerbots/src/FleeManager.cpp.o
[ 13%] Building CXX object modules/CMakeFiles/modules.dir/mod-playerbots/src/GuildTaskMgr.cpp.o
[ 13%] Building CXX object modules/CMakeFiles/modules.dir/mod-junk-to-gold/src/junk_to_gold.cpp.o
[ 32%] Built target game
[ 32%] Building CXX object modules/CMakeFiles/modules.dir/mod-playerbots/src/Helpers.cpp.o
[ 69%] Built target scripts
[ 69%] Building CXX object modules/CMakeFiles/modules.dir/mod-playerbots/src/LootObjectStack.cpp.o
[ 69%] Building CXX object modules/CMakeFiles/modules.dir/mod-playerbots/src/PerformanceMonitor.cpp.o
In file included from /home/steve/azerothcore/modules/mod-playerbots/src/FleeManager.cpp:6:
/home/steve/azerothcore/modules/mod-playerbots/src/FleeManager.h:21:11: warning: initializer order does not match the declaration order [-Wreorder-ctor]
        : botAI(botAI), sumDistance(0.0f), minDistance(0.0f), x(x), y(y), z(z)
          ^~~~~~~~~~~~  ~~~~~~~~~~~~~~~~~  ~~~~~~~~~~~~~~~~~  ~~~~  ~~~~  ~~~~
          x(x)          y(y)               z(z)               sumDistance(0.0f) minDistance(0.0f) botAI(botAI)
/home/steve/azerothcore/modules/mod-playerbots/src/FleeManager.h:21:11: note: field 'botAI' will be initialized after field 'sumDistance'
        : botAI(botAI), sumDistance(0.0f), minDistance(0.0f), x(x), y(y), z(z)
          ^~~~~~~~~~~~
/home/steve/azerothcore/modules/mod-playerbots/src/FleeManager.h:21:44: note: field 'minDistance' will be initialized after field 'x'
        : botAI(botAI), sumDistance(0.0f), minDistance(0.0f), x(x), y(y), z(z)
                                           ^~~~~~~~~~~~~~~~~
In file included from /home/steve/azerothcore/modules/mod-junk-to-gold/src/junk_to_gold.cpp:1:
/home/steve/azerothcore/modules/mod-junk-to-gold/src/junk_to_gold.h:54:81: fatal error: only virtual member functions can be marked 'override'
        void OnLootItem(Player* player, Item* item, uint32 count, ObjectGuid lootguid) override;
                                                                                       ^~~~~~~~
1 error generated.
/home/steve/azerothcore/modules/mod-playerbots/src/LootObjectStack.cpp:90:29: warning: comparison of integers of different signs: 'int' and 'std::vector::size_type' (aka

Expected Behaviour

Compilation should complete

Steps to reproduce the problem

Updated playerbots core and modules:

playerbots core - 34811a047
mod-ah-bot - e1f11fa2f
mod-playerbots - db4165e
mod-junk-to-gold - 50ad84a

Extra Notes

No response

AC rev. hash/commit

Using SSL version: OpenSSL 3.0.15 3 Sep 2024 (library: OpenSSL 3.0.15 3 Sep 2024)
Using Boost version: 1.74.0
Using CMake version: 3.25.1
Using MySQL version: 80403
Found MySQL Executable: /usr/bin/mysql
Compiled on: Linux 6.8.12-5-pve
Worldserver listening connections on port 8085
Realmlist (Realm Id: 1) configured in port 8085
VMAPs status: Enabled. LineOfSight: true, getHeight: true, indoorCheck: true
MMAPs status: Enabled
maps directory located in ./maps. Total size: 291014951 bytes
vmaps directory located in ./vmaps. Total size: 658130721 bytes
mmaps directory located in ./mmaps. Total size: 2192910844 bytes
Default DBC locale: enUS.
All available DBC locales: enUS
Using World DB: ACDB 335.13-dev
Using Playerbots DB Revision:
Latest LoginDatabase update: 2025_01_26_00.sql
Latest CharacterDatabase update: playerbots_names.sql
Latest WorldDatabase update: world_playerbots_rpg_races.sql
LoginDatabase queue size: 0
CharacterDatabase queue size: 22
WorldDatabase queue size: 0
PlayerbotsDatabase queue size: 28
List of enabled modules:
|- mod-ah-bot
|- mod-playerbots
|- mod-junk-to-gold

Operating system

Debian 12/Bookworm

Custom changes or Modules

List of enabled modules:
|- mod-ah-bot
|- mod-playerbots
|- mod-junk-to-gold

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions