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

Reforging

Estorn

Respected Member
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?
 

Rochet2

Moderator / Eluna Dev
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?


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:
Code:
player->ModifyMoney(pProto->SellPrice < (10*GOLD) ? (-10*GOLD) : -(int32)pProto->SellPrice);
So you need to remove the token there also.


ps. The code you posted is probably from the other reforge script.
 

Estorn

Respected Member
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:
Code:
player->ModifyMoney(pProto->SellPrice < (10*GOLD) ? (-10*GOLD) : -(int32)pProto->SellPrice);
So you need to remove the token there also.


ps. The code you posted is probably from the other reforge script.

if it's possible add it to the script for me
i'm mixed up
 

sandyqyh

Enthusiast
I apply patch Transmogrification.diff then I want to apply patch Reforging.diff,but git give me errors:
git apply "G:/wow_server_source_T/TrinityCore335_master/Reforging.diff"
error: patch failed: src/server/game/Scripting/ScriptLoader.cpp:1435
error: src/server/game/Scripting/ScriptLoader.cpp: patch does not apply
error: patch failed: src/server/scripts/Custom/CMakeLists.txt:10
error: src/server/scripts/Custom/CMakeLists.txt: patch does not apply
Done

maybe I should ndependently modify the relevant documents……
 
Last edited:

Rochet2

Moderator / Eluna Dev
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"
 

Portals

Banned
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.
 
Last edited:

Rochet2

Moderator / Eluna Dev
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.

Works fine. How did you test exactly and what stats did you change to what other stats? And where did you look for the changed stats?
Note that for example (probably) if you dont have a shield, your block cant be above 0%
 

Portals

Banned
I think I just fucked up when I tried to remove the gold costs from the script, cause it does not add any reforges now, no matter what stat I choose.
 
Top