Jump to content

[11067][Fix] Output to DBError.log misleading


Schmoozerd

Recommended Posts

What bug does the patch fix? What features does the patch add?

Fix small issue with reported problems of scripted npcs in high difficulty

For which repository revision was the patch created?

11064

Is there a thread in the bug report section or at lighthouse? If yes, please add a link to the thread.

don't hink so

Who has been writing this patch? Please include either forum user names or email addresses.

me

Currently output is

Difficulty 0 mode creature (Entry: 33353) has `ScriptName`, but in any case will used difficulty 0 mode creature (Entry: 32938) ScriptName.

but should have been _1_ in the first part

Fix:

diff --git a/src/game/ObjectMgr.cpp b/src/game/ObjectMgr.cpp
index 07a2187..d7cd6c7 100644
--- a/src/game/ObjectMgr.cpp
+++ b/src/game/ObjectMgr.cpp
@@ -591,14 +591,14 @@ void ObjectMgr::LoadCreatureTemplates()
            if (difficultyInfo->AIName && *difficultyInfo->AIName)
            {
                sLog.outErrorDb("Difficulty %u mode creature (Entry: %u) has `AIName`, but in any case will used difficulty 0 mode creature (Entry: %u) AIName.",
-                    diff, cInfo->DifficultyEntry[diff], i);
+                    diff + 1, cInfo->DifficultyEntry[diff], i);
                continue;
            }

            if (difficultyInfo->ScriptID)
            {
                sLog.outErrorDb("Difficulty %u mode creature (Entry: %u) has `ScriptName`, but in any case will used difficulty 0 mode creature (Entry: %u) ScriptName.",
-                    diff, cInfo->DifficultyEntry[diff], i);
+                    diff + 1, cInfo->DifficultyEntry[diff], i);
                continue;
            }

Link to comment
Share on other sites

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use