slp13at420
Mad Scientist
this is just sick man nice one :bump2:
Mmm. Yes there is, but depending on what you mean with "any item", you may need to give up with the visual update.Is there a way to make it so you can reforge any item? (If it has stats and what not of course)
Would it be fixed if i add this code?
/ ########################################################################################
// Reforging config
// ########################################################################################
static const uint32 tokenEntry = 65717; // token entry
static const uint8 maxTokenAmount = 3; // max token cost (multiplies the max stat amount also)
static const uint8 maxReforges = 3; // maximum reforges for one item
static const bool send_cache_packets = true; // change player cache?
if (player->HasEnoughMoney(invItem->GetTemplate()->SellPrice < (10*GOLD) ? (10*GOLD) : invItem->GetTemplate()->SellPrice))
player->ModifyMoney(pProto->SellPrice < (10*GOLD) ? (-10*GOLD) : -(int32)pProto->SellPrice);
No. Obviously adding random variables to the code wont make them work.
You need to edit the reforging event to check for the token, it atm only checks for the money price:
Code:if (player->HasEnoughMoney(invItem->GetTemplate()->SellPrice < (10*GOLD) ? (10*GOLD) : invItem->GetTemplate()->SellPrice))
Also UpdatePlayerReforgeStats function takes the cost:
So you need to remove the token there also.Code:player->ModifyMoney(pProto->SellPrice < (10*GOLD) ? (-10*GOLD) : -(int32)pProto->SellPrice);
ps. The code you posted is probably from the other reforge script.
Patch the transmog then you have to manually put in reforging. It's the only way to do it.
I suggest he uses git apply --reject Reforging.diff
Then applies the .rej files manually
Then makes a commit from it and takes up the commit hash.
git add .
git commit -a -m "Reforging"
static const ItemModType statTypes[] = { ITEM_MOD_SPIRIT, ITEM_MOD_DODGE_RATING, ITEM_MOD_PARRY_RATING, ITEM_MOD_HIT_RATING, ITEM_MOD_CRIT_RATING, ITEM_MOD_HASTE_RATING, ITEM_MOD_EXPERTISE_RATING, ITEM_MOD_DEFENSE_SKILL_RATING, ITEM_MOD_BLOCK_RATING, ITEM_MOD_MANA_REGENERATION, };
switch(ItemStatType)
{
case ITEM_MOD_SPIRIT : return "Spirit"; break;
case ITEM_MOD_DODGE_RATING : return "Dodge rating"; break;
case ITEM_MOD_PARRY_RATING : return "Parry rating"; break;
case ITEM_MOD_HIT_RATING : return "Hit rating"; break;
case ITEM_MOD_CRIT_RATING : return "Crit rating"; break;
case ITEM_MOD_HASTE_RATING : return "Haste rating"; break;
case ITEM_MOD_EXPERTISE_RATING : return "Expertise rating"; break;
case ITEM_MOD_DEFENSE_SKILL_RATING : return "Defense rating"; break;
case ITEM_MOD_BLOCK_RATING : return "Block rating"; break;
case ITEM_MOD_MANA_REGENERATION : return "Mana per second"; break;
default: return NULL;
}
Question, how to add another stat to the menu?
I added them here
Code:static const ItemModType statTypes[] = { ITEM_MOD_SPIRIT, ITEM_MOD_DODGE_RATING, ITEM_MOD_PARRY_RATING, ITEM_MOD_HIT_RATING, ITEM_MOD_CRIT_RATING, ITEM_MOD_HASTE_RATING, ITEM_MOD_EXPERTISE_RATING, ITEM_MOD_DEFENSE_SKILL_RATING, ITEM_MOD_BLOCK_RATING, ITEM_MOD_MANA_REGENERATION, };
And I also added them here.
Code:switch(ItemStatType) { case ITEM_MOD_SPIRIT : return "Spirit"; break; case ITEM_MOD_DODGE_RATING : return "Dodge rating"; break; case ITEM_MOD_PARRY_RATING : return "Parry rating"; break; case ITEM_MOD_HIT_RATING : return "Hit rating"; break; case ITEM_MOD_CRIT_RATING : return "Crit rating"; break; case ITEM_MOD_HASTE_RATING : return "Haste rating"; break; case ITEM_MOD_EXPERTISE_RATING : return "Expertise rating"; break; case ITEM_MOD_DEFENSE_SKILL_RATING : return "Defense rating"; break; case ITEM_MOD_BLOCK_RATING : return "Block rating"; break; case ITEM_MOD_MANA_REGENERATION : return "Mana per second"; break; default: return NULL; }
I am also trying to figure out how to remove the gold cost.
I see them in the gossip menu but when I click them they do not update the stats.