• This is a read only backup of the old Emudevs forum. If you want to have anything removed, please message me on Discord: KittyKaev

TrinityCore 3.3.5 Needing help with doing action on adding item to a player

Big

Member
Hey guys,
I'm wondering if u want to add items to a player by gossip,
and for example if the item is "Chest" add gem/sockets to that item,
Is there any function to do by? Because I don't see anything around Player.cpp/Item.cpp
and if you have any idea on how to do this, I will be really thank you!
 

Rochet2

Moderator / Eluna Dev
Im sure you can find some functions by searching opcodes.cpp with "socket".
From opcodes.cpp you can find functions that handle different packets and from those functions you often find how something is implemented, like how socketing an item works.

I took a peek at it right now and it does not look pretty. Prepare yourself for the spaghetti.

Hint: CMSG_SOCKET_GEMS
 
  • Like
Reactions: Big

Big

Member
Thanks, but I've searched alot, And all the function I found was about to activation of the Gem Enchantment "I think bonus" not setting them !
for example I found this functions on player.cpp, Player::EnchantmentFitsRequirements - Player::CorrectMetaGemEnchants
they are all about checking the requirment, nothing found about setting something ?!?!:S
 

Rochet2

Moderator / Eluna Dev
Sounds like you didnt even look where I told you to.
Did you look at the contents of WorldSession::HandleSocketOpcode? It contains everything.

And it seems the code doesnt socket gem items, but the gem item is destroyed when socketed and just the enchant/socket bonus is added to the item.
 
Last edited:
Top