Modcraft - The community dedicated to quality WoW modding!

Wrath of the Lich King Modding => Serverside Modding => Topic started by: Badhabits on April 23, 2013, 05:30:18 pm

Title: [QUESTION] Modifing Gem's so they use SQL stats like Stat_1
Post by: Badhabits on April 23, 2013, 05:30:18 pm
Core:Trinity Core 3.3.5a

I have been working on this off and on till I get frustrated, thought I would ask some people with better C++ skills. I have posted on a few websites and am surprised this is not more sought after since it would seem to be a great mod for a lot of reasons.

I know that the Core looks at the DBC files for adding the spells for Gems. What I have been trying to do is change this so if I add stats to a Gem in sql (Stat_type1-Stat_type10) it would give those stats to the player when the gem was equipped in gear. Does anyone have any ideas for a custom script to get  (Stat_type1-Stat_type10) to work on Gem sockets?

I was told on another website to "Look at the Player::*Enchantment functions and their call hierarchy, you'll eventually see where it calls the DBC lookup, you can just override that there."

I could not find a Player::*Enchantment. The closest I came to finding something was Player::CorrectMetaGemEnchants .

I have since been trying to figure out how to give it stats like in Player::_ApplyItemBonuses
I have been playing around with the code around Player::CorrectMetaGemEnchants just to try and get one stat working. Any ideas on how to do this?  :D
Title: Re: [QUESTION] Modifing Gem's so they use SQL stats like Sta
Post by: XxXGenesisXxX on April 30, 2013, 08:03:14 pm
"Player::*Echantment"

The person was probably using a common command statement. The * or Astrix he used used, you need to replace with something else. An Astrix in formats like this basically means anything. For example if I have a folder of .sql files.  Eample1.sql, Example2.sql, Example3.sql and Example4.sql.

In a command within the folder I can write something along the lines of:

copy *.sql

Instead of just copying 1 of the sql's I am copying everything that has .sql at the end of it, in this case all of the sqls in the folder.

In other words, the person who replied doesn't know the exact name of the function, but it's a safe bet it has Enchantment at the end.

Also, in this case CorrectMetaGemEnchants is one of the functions he mentioned.