
As you can see the same function is being called the only difference is the itemIDs + ATTR_JOB yet somehow first function gives sword with fiery gem and other gives bow with explosive gem
If I had to guess the gem is based on the ATTR_JOB but from where does it connect?

We can also see here the same thing, same fuction but 3 different outcomes:
1. greatsword with furious gem
2. sword with fiery
3. gun with explosive
can someone explain how i would change the gem connected to each function? like i want to make say ATTR_JOB-9 (CRUS) = 13 (Eye of BD)