Jump to content

[Fix] Loot-System, missing debug output


Schmoozerd

Recommended Posts

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

* Add additional error.output for reference with loot-condition (currently not allowed)

* Insert a missing return, to correctly skip wrong reference-entries

For which repository revision was the patch created?

10458

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

no

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

me, thanks to crackm who spotted the missing return ;)

The reference with condition check is placed this early, to skip creation of possible unneeded condition-entries

Patch manually addeted, as the first part is already in master (or at least similarily)

diff --git a/src/game/LootMgr.cpp b/src/game/LootMgr.cpp
index 32fc76e..416484e 100644
--- a/src/game/LootMgr.cpp
+++ b/src/game/LootMgr.cpp

@@ -299,8 +306,11 @@ bool LootStoreItem::IsValid(LootStore const& store, uint32 entry) const
    else                                                    // mincountOrRef < 0
    {
        if (needs_quest)
+        {
            sLog.outErrorDb("Table '%s' entry %d item %d: quest chance will be treated as non-quest chance", store.GetName(), entry, itemid);
-        else if( chance == 0 )                              // no chance for the reference
+            return false;
+        }
+        if (chance == 0)                                    // no chance for the reference
        {
            sLog.outErrorDb("Table '%s' entry %d item %d: zero chance is specified for a reference, skipped", store.GetName(), entry, itemid);
            return false;

In: [11830]

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