azerothcore / mod-better-item-reloading

BetterItemReloading is a C++ Azerothcore module which allows to reload items on the server side and as much as possible on the client side of WoW 3.3.5.
http://azerothcore.org/
MIT License
12 stars 25 forks source link

Bug: "undeclared identifier 'GetItemEnchantMod'" #14

Open maloglolo opened 3 weeks ago

maloglolo commented 3 weeks ago

Current Behaviour

Compiler Error:

/modules/mod-better-item-reloading/src/BetterItemReloading.cpp:474:66: error: use of undeclared identifier 'GetItemEnchantMod' 474 | else if (!sItemRandomPropertiesStore.LookupEntry(GetItemEnchantMod(itemTemplate->RandomProperty))) | ^ /modules/mod-better-item-reloading/src/BetterItemReloading.cpp:481:83: error: use of undeclared identifier 'GetItemEnchantMod' 481 | if (itemTemplate->RandomSuffix && !sItemRandomSuffixStore.LookupEntry(GetItemEnchantMod(itemTemplate->RandomSuffix))) |

Expected Behaviour

No compiler error

Steps to reproduce the problem

Clone mod repo into module folder. Build.

Extra Notes

#include "ItemEnchantmentMgr.h"

This "removes" the error.

AC rev. hash/commit

azerothcore-wotlk % docker attach ac-worldserver AC> .server debug AC> AzerothCore rev. 0b6aebaf0a2a+ 2024-10-30 18:48:37 +0000 (master branch) (Unix, RelWithDebInfo, Static) Connected players: 0. Characters in world: 0. Connection peak: 0. Server uptime: 4 minute(s) 45 second(s) Update time diff: 2ms. Last 500 diffs summary: |- Mean: 2ms |- Median: 2ms |- Percentiles (95, 99, max): 3ms, 4ms, 5ms Using SSL version: OpenSSL 3.0.2 15 Mar 2022 (library: OpenSSL 3.0.2 15 Mar 2022) Using Boost version: 1.74.0 Using CMake version: 3.22.1 Using MySQL version: 80039 Found MySQL Executable: /usr/bin/mysql Compiled on: Linux 6.10.4-linuxkit Worldserver listening connections on port %u Realmlist (Realm Id: 1) configured in port 8085 VMAPs status: Enabled. LineOfSight: true, getHeight: true, indoorCheck: true MMAPs status: Enabled maps directory located in /azerothcore/env/dist/data/maps. Total size: 291014951 bytes vmaps directory located in /azerothcore/env/dist/data/vmaps. Total size: 658130721 bytes mmaps directory located in /azerothcore/env/dist/data/mmaps. Total size: 2192910844 bytes Default DBC locale: enUS. All available DBC locales: enUS Using World DB: ACDB 335.12-dev Latest LoginDatabase update: 2024_01_20_00.sql Latest CharacterDatabase update: 2024_09_22_00.sql Latest WorldDatabase update: npc_services_00.sql LoginDatabase queue size: 0 CharacterDatabase queue size: 0 WorldDatabase queue size: 0 List of enabled modules: |- mod-better-item-reloading |- mod-eluna |- mod-learn-spells |- mod-npc-buffer |- mod-npc-enchanter |- mod-npc-services

Operating system

macOS 15

Custom changes or Modules

No response

zzy36 commented 2 weeks ago

Add header file

include "ItemEnchantmentMgr.h"

Tntdruid commented 2 weeks ago

@zzy36 Fixed my error, thanks for that.

You should do a PR for the fix.