@@ -4714,15 +4714,25 @@ static void set_box_tooltip_process(struct ScriptContext* context)
4714
4714
snprintf (gameadd .box_tooltip [idx ], MESSAGE_TEXT_LEN , "%s" , context -> value -> strs [2 ]);
4715
4715
}
4716
4716
4717
- static void set_box_tooltip_id (const struct ScriptLine * scline )
4717
+ static void set_box_tooltip_id_check (const struct ScriptLine * scline )
4718
4718
{
4719
- if ((scline -> np [0 ] < 0 ) || (scline -> np [0 ] >= CUSTOM_BOX_COUNT ))
4720
- {
4721
- SCRPTERRLOG ("Invalid CUSTOM_BOX number (%ld)" , scline -> np [0 ]);
4722
- return ;
4723
- }
4724
- int idx = scline -> np [0 ];
4725
- snprintf (gameadd .box_tooltip [idx ], MESSAGE_TEXT_LEN , "%s" , get_string (scline -> np [1 ]));
4719
+ ALLOCATE_SCRIPT_VALUE (scline -> command , 0 );
4720
+ if ((scline -> np [0 ] < 0 ) || (scline -> np [0 ] >= CUSTOM_BOX_COUNT ))
4721
+ {
4722
+ SCRPTERRLOG ("Invalid CUSTOM_BOX number (%ld)" , scline -> np [0 ]);
4723
+ DEALLOCATE_SCRIPT_VALUE ;
4724
+ return ;
4725
+ }
4726
+ value -> shorts [0 ] = scline -> np [0 ];
4727
+ value -> shorts [1 ] = scline -> np [1 ];
4728
+ PROCESS_SCRIPT_VALUE (scline -> command );
4729
+ }
4730
+
4731
+ static void set_box_tooltip_id_process (struct ScriptContext * context )
4732
+ {
4733
+ int idx = context -> value -> shorts [0 ];
4734
+ int string = context -> value -> shorts [1 ];
4735
+ snprintf (gameadd .box_tooltip [idx ], MESSAGE_TEXT_LEN , "%s" , get_string (string ));
4726
4736
}
4727
4737
4728
4738
static void change_slab_owner_check (const struct ScriptLine * scline )
@@ -7594,7 +7604,7 @@ const struct CommandDesc command_desc[] = {
7594
7604
{"SET_SACRIFICE_RECIPE" , "AAA+ " , Cmd_SET_SACRIFICE_RECIPE , & set_sacrifice_recipe_check , & set_sacrifice_recipe_process },
7595
7605
{"REMOVE_SACRIFICE_RECIPE" , "A+ " , Cmd_REMOVE_SACRIFICE_RECIPE , & remove_sacrifice_recipe_check , & set_sacrifice_recipe_process },
7596
7606
{"SET_BOX_TOOLTIP" , "NA " , Cmd_SET_BOX_TOOLTIP , & set_box_tooltip_check , & set_box_tooltip_process },
7597
- {"SET_BOX_TOOLTIP_ID" , "NN " , Cmd_SET_BOX_TOOLTIP_ID , & set_box_tooltip_id , & null_process },
7607
+ {"SET_BOX_TOOLTIP_ID" , "NN " , Cmd_SET_BOX_TOOLTIP_ID , & set_box_tooltip_id_check , & set_box_tooltip_id_process },
7598
7608
{"CHANGE_SLAB_OWNER" , "NNPa " , Cmd_CHANGE_SLAB_OWNER , & change_slab_owner_check , & change_slab_owner_process },
7599
7609
{"CHANGE_SLAB_TYPE" , "NNSa " , Cmd_CHANGE_SLAB_TYPE , & change_slab_type_check , & change_slab_type_process },
7600
7610
{"CREATE_EFFECTS_LINE" , "LLNNNA " , Cmd_CREATE_EFFECTS_LINE , & create_effects_line_check , & create_effects_line_process },
0 commit comments