Added script command openbank (#6821)
This commit is contained in:
parent
2cde45e569
commit
f4410fba6b
@ -8099,6 +8099,14 @@ This feature requires packet version 2017-07-26 or newer.
|
||||
|
||||
This function is intended for use in item scripts.
|
||||
|
||||
---------------------------------------
|
||||
|
||||
*openbank({<char id>})
|
||||
|
||||
Opens the Bank UI for the attached player or the given character ID.
|
||||
|
||||
This command requires packet version 2015-01-28 or newer.
|
||||
|
||||
---------------------------------------
|
||||
\\
|
||||
6,1.- Unit-related commands
|
||||
|
@ -1159,7 +1159,8 @@ enum in_ui_type : int8 {
|
||||
};
|
||||
|
||||
enum out_ui_type : int8 {
|
||||
OUT_UI_STYLIST = 1,
|
||||
OUT_UI_BANK = 0,
|
||||
OUT_UI_STYLIST,
|
||||
OUT_UI_QUEST = 6,
|
||||
OUT_UI_ATTENDANCE = 7
|
||||
};
|
||||
|
@ -25840,6 +25840,27 @@ BUILDIN_FUNC( open_quest_ui ){
|
||||
return SCRIPT_CMD_SUCCESS;
|
||||
}
|
||||
|
||||
BUILDIN_FUNC(openbank){
|
||||
#if PACKETVER < 20150128
|
||||
ShowError( "buildin_openbank: This command requires PACKETVER 20150128 or newer.\n" );
|
||||
return SCRIPT_CMD_FAILURE;
|
||||
#else
|
||||
struct map_session_data* sd = nullptr;
|
||||
|
||||
if (!script_charid2sd(2, sd)) {
|
||||
return SCRIPT_CMD_FAILURE;
|
||||
}
|
||||
|
||||
if( !battle_config.feature_banking ){
|
||||
ShowError( "buildin_openbank: banking is disabled.\n" );
|
||||
return SCRIPT_CMD_FAILURE;
|
||||
}
|
||||
|
||||
clif_ui_open( sd, OUT_UI_BANK, 0 );
|
||||
return SCRIPT_CMD_SUCCESS;
|
||||
#endif
|
||||
}
|
||||
|
||||
#include "../custom/script.inc"
|
||||
|
||||
// declarations that were supposed to be exported from npc_chat.cpp
|
||||
@ -26553,6 +26574,7 @@ struct script_function buildin_func[] = {
|
||||
BUILDIN_DEF(laphine_upgrade, ""),
|
||||
BUILDIN_DEF(randomoptgroup,"i"),
|
||||
BUILDIN_DEF(open_quest_ui, "??"),
|
||||
BUILDIN_DEF(openbank,"?"),
|
||||
#include "../custom/script_def.inc"
|
||||
|
||||
{NULL,NULL,NULL},
|
||||
|
Loading…
x
Reference in New Issue
Block a user