From 2c92ec7909dfb6c68f38a664fbb05451e20cd312 Mon Sep 17 00:00:00 2001 From: Inky Date: Tue, 30 Apr 2019 16:59:15 +0300 Subject: [PATCH] Added: item sheets scroll properties execute lua code, open webig and set menu label --HG-- branch : develop --- code/ryzom/client/src/client_sheets/item_sheet.cpp | 11 ++++++++++- code/ryzom/client/src/client_sheets/item_sheet.h | 6 ++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/code/ryzom/client/src/client_sheets/item_sheet.cpp b/code/ryzom/client/src/client_sheets/item_sheet.cpp index e13d8e267..daac055fe 100644 --- a/code/ryzom/client/src/client_sheets/item_sheet.cpp +++ b/code/ryzom/client/src/client_sheets/item_sheet.cpp @@ -367,6 +367,11 @@ void CItemSheet::build(const NLGEORGES::UFormElm &item) if (!val.empty()) CraftPlan = CSheetId(val); + // commands and menu label + TRANSLATE_VAL( Scroll.LuaCommand, "basics.Scroll.LuaCommand" ); + TRANSLATE_VAL( Scroll.WebCommand, "basics.Scroll.WebCommand" ); + TRANSLATE_VAL( Scroll.Label, "basics.Scroll.Label" ); + // Special according to Family; switch(Family) { @@ -658,6 +663,9 @@ void CItemSheet::serial(NLMISC::IStream &f) // **** Serial Help Infos f.serialEnum(ItemOrigin); + // item commands + f.serial(Scroll); + // Different Serial according to family switch(Family) { @@ -697,8 +705,9 @@ void CItemSheet::serial(NLMISC::IStream &f) case ITEMFAMILY::TELEPORT: f.serial(Teleport); break; + // keep for readability case ITEMFAMILY::SCROLL: - f.serial(Scroll); + //f.serial(Scroll); break; case ITEMFAMILY::CONSUMABLE: f.serial(Consumable); diff --git a/code/ryzom/client/src/client_sheets/item_sheet.h b/code/ryzom/client/src/client_sheets/item_sheet.h index c363c9756..bd79b1569 100644 --- a/code/ryzom/client/src/client_sheets/item_sheet.h +++ b/code/ryzom/client/src/client_sheets/item_sheet.h @@ -255,10 +255,16 @@ public: struct CScroll { std::string Texture; + std::string LuaCommand; + std::string WebCommand; + std::string Label; void serial(NLMISC::IStream &f) { f.serial(Texture); + f.serial(LuaCommand); + f.serial(WebCommand); + f.serial(Label); } };