-
Required profession level to herb/mine/skin object
Hello,
Im on vanilla/tbc client and right now searching a way to determine if my skill level is enough to skin/herb/mine a certain object. A little example:
- My toon has skinning with skill level 60.
- I kill a boar which requires skill level 120 to skin it
- Toon cant skin it
So far I can read the characters skills (id, current level, current max level). Missing part is checking which level the unit requires.
Will probably poke around the code which is responsible for the red text in the tooltip stating "Requires skill level ..." or look at the DBC for some info.
I didnt started to reverse yet so just asking for some cool ideas where to start looking .... so ... any ideas?
Last edited by Corthezz; 04-30-2017 at 02:40 PM.
Check my blog: https://zzuks.blogspot.com
-
Post Thanks / Like - 1 Thanks
tutrakan (1 members gave Thanks to Corthezz for this useful post)
-
I don't believe that information is in the client. The skill level required message comes from the server. You could of course use an emu world database. Any one of them ought to have that information. For my gatherbot I just hard-coded a list.
Edit: I removed my hard-coded list because of the more useful solution below.
Last edited by namreeb; 05-01-2017 at 12:00 AM.
-
Post Thanks / Like - 1 Thanks
Corthezz (1 members gave Thanks to namreeb for this useful post)
-
Member
It is in client, for example (panda 5.4., in CGTooltip::AddSkinnableText we can see
Code:
int __cdecl GetSkinningDifficulty(int targetLevel)
{
int result; // eax@1
result = 1;
if ( targetLevel > 10 )
{
result = 10 * targetLevel - 100;
if ( targetLevel > 19 )
{
result = 5 * targetLevel;
if ( targetLevel > 73 )
{
result = 10 * targetLevel - 365;
if ( targetLevel > 80 )
{
result = 5 * targetLevel + 35;
if ( targetLevel > 83 )
result = 20 * targetLevel - 1210;
}
}
}
}
return result;
}
For 1.12.1 - 0x529EC0
Code:
v13 = *(_DWORD *)(*(_DWORD *)(v7 + 272) + 112); // targetLevel
if ( v13 > 10 )
{
if ( v13 >= 20 )
v14 = 5 * v13;
else
v14 = 2 * (5 * v13 - 50);
}
else
{
v14 = 1;
}
Herb/mine depends on LockId from gameobject cache and Lock.dbc
From elysium core, 1.12.1
Code:
struct LockEntry
{
uint32 ID; // 0 m_ID
uint32 Type[MAX_LOCK_CASE]; // 1-5 m_Type
uint32 Index[MAX_LOCK_CASE]; // 9-16 m_Index
uint32 Skill[MAX_LOCK_CASE]; // 17-24 m_Skill
//uint32 Action[MAX_LOCK_CASE]; // 25-32 m_Action
};
Last edited by BlackRainBow; 04-30-2017 at 05:57 PM.
Reason: more info
-
Post Thanks / Like - 6 Thanks
-
Just wanted to come back and say thank you. You saved me quite some time with the hint about Lock.dbc!
Check my blog: https://zzuks.blogspot.com
-
Contributor
Originally Posted by
BlackRainBow
...
Herb/mine depends on LockId from gameobject cache and Lock.dbc
...
Can be done client side too by calling CGGameObject_C::IsLocked which is called from CGTooltip::SetObject.
-
Post Thanks / Like - 1 Thanks
Corthezz (1 members gave Thanks to tutrakan for this useful post)