Jump to content

[fix] Socket bonus with added socket


Guest MrLama

Recommended Posts

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

added socket from blacksmith shouldn't break socket bonus

For which repository revision was the patch created?

9605

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

---

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

me

http://pastebin.com/PZm0z3ne

diff --git a/src/game/Item.cpp b/src/game/Item.cpp
index 2f5deaa..0a05fa5 100644
--- a/src/game/Item.cpp
+++ b/src/game/Item.cpp
@@ -868,6 +868,7 @@ bool Item::GemsFitSockets() const
            }
        }

+        SocketColor = SocketColor ? SocketColor : PRISMATIC_SOCKET; 
        fits &= (GemColor & SocketColor) ? true : false;
    }
    return fits;
diff --git a/src/game/Item.h b/src/game/Item.h
index fcf6418..cca82f3 100644
--- a/src/game/Item.h
+++ b/src/game/Item.h
@@ -174,7 +174,7 @@ enum EnchantmentSlot
};

#define MAX_VISIBLE_ITEM_OFFSET       2                     // 2 fields per visible item (entry+enchantment)
-
+#define PRISMATIC_SOCKET			  14					// 1110 mask = blue(1) yellow(1) red(1) meta(0)
#define MAX_GEM_SOCKETS               MAX_ITEM_PROTO_SOCKETS// (BONUS_ENCHANTMENT_SLOT-SOCK_ENCHANTMENT_SLOT) and item proto size, equal value expected

enum EnchantmentOffset

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