Improved support for enchantgrade (#5975)

Added further support for enchantgrade so that the enchantgrade is not lost during certain processes and can be accessed via script commands.
Also added missing logging support for it.
This commit is contained in:
Lemongrass3110
2021-05-30 00:44:50 +02:00
committed by GitHub
parent 5d92d1a000
commit 3a8e4ffbc7
8 changed files with 51 additions and 11 deletions

View File

@@ -2135,6 +2135,7 @@ static int npc_selllist_sub(struct map_session_data* sd, int n, unsigned short*
int key_refine = 0;
int key_attribute = 0;
int key_identify = 0;
int key_enchantgrade = 0;
int key_card[MAX_SLOTS];
int key_option_id[MAX_ITEM_RDM_OPT], key_option_val[MAX_ITEM_RDM_OPT], key_option_param[MAX_ITEM_RDM_OPT];
@@ -2144,6 +2145,7 @@ static int npc_selllist_sub(struct map_session_data* sd, int n, unsigned short*
script_cleararray_pc( sd, "@sold_refine" );
script_cleararray_pc( sd, "@sold_attribute" );
script_cleararray_pc( sd, "@sold_identify" );
script_cleararray_pc( sd, "@sold_enchantgrade" );
for( j = 0; j < MAX_SLOTS; j++ )
{// clear each of the card slot entries
@@ -2176,6 +2178,7 @@ static int npc_selllist_sub(struct map_session_data* sd, int n, unsigned short*
script_setarray_pc( sd, "@sold_refine", i, sd->inventory.u.items_inventory[idx].refine, &key_refine );
script_setarray_pc( sd, "@sold_attribute", i, sd->inventory.u.items_inventory[idx].attribute, &key_attribute );
script_setarray_pc( sd, "@sold_identify", i, sd->inventory.u.items_inventory[idx].identify, &key_identify );
script_setarray_pc( sd, "@sold_enchantgrade", i, sd->inventory.u.items_inventory[idx].enchantgrade, &key_enchantgrade );
for( j = 0; j < MAX_SLOTS; j++ )
{// store each of the cards from the equipment in the array