From e22d271408061eba4a8be8c4e724b530c0424ffc Mon Sep 17 00:00:00 2001 From: Nimetu Date: Fri, 7 Feb 2020 11:05:49 +0200 Subject: [PATCH] Added: require-all-skills property to sbrick sheet --- .../client/src/client_sheets/sbrick_sheet.cpp | 21 +++++++++++++++++++ .../client/src/client_sheets/sbrick_sheet.h | 7 ++++++- .../src/interface_v3/sphrase_manager.cpp | 10 ++++++++- code/ryzom/client/src/sheet_manager.cpp | 2 +- 4 files changed, 37 insertions(+), 3 deletions(-) diff --git a/code/ryzom/client/src/client_sheets/sbrick_sheet.cpp b/code/ryzom/client/src/client_sheets/sbrick_sheet.cpp index c60d1c03c..6eae652df 100644 --- a/code/ryzom/client/src/client_sheets/sbrick_sheet.cpp +++ b/code/ryzom/client/src/client_sheets/sbrick_sheet.cpp @@ -353,6 +353,27 @@ void CSBrickSheet::build (const NLGEORGES::UFormElm &root) listSkill.clear(); splitString(skillReqStr," ",listSkill); // build the req skill array + RequiredOneOfSkills.clear(); + RequiredOneOfSkills.reserve(listSkill.size()/2); + for(i=0;i RequiredOneOfSkills; + + // For Progression, the required skills (all of them) std::vector RequiredSkills; // For Progression, the required Bricks @@ -384,6 +387,8 @@ public: s.serialEnum(ActionNature); + s.serialCont(RequiredOneOfSkills); + s.serialCont(RequiredSkills); s.serialCont(RequiredBricks); diff --git a/code/ryzom/client/src/interface_v3/sphrase_manager.cpp b/code/ryzom/client/src/interface_v3/sphrase_manager.cpp index 09cc9b3fe..678291e19 100644 --- a/code/ryzom/client/src/interface_v3/sphrase_manager.cpp +++ b/code/ryzom/client/src/interface_v3/sphrase_manager.cpp @@ -3697,12 +3697,20 @@ void CSPhraseManager::computePhraseProgression() CReqSkillFormula brickFormula; // get all its required Skill + for(uint j=0;jRequiredOneOfSkills.size();j++) + { + CSkillValue sv; + sv.Skill= brick->RequiredOneOfSkills[j].Skill; + sv.Value= brick->RequiredOneOfSkills[j].Value; + brickFormula.orV(sv); + } + for(uint j=0;jRequiredSkills.size();j++) { CSkillValue sv; sv.Skill= brick->RequiredSkills[j].Skill; sv.Value= brick->RequiredSkills[j].Value; - brickFormula.orV(sv); + brickFormula.andV(sv); } // if not empty diff --git a/code/ryzom/client/src/sheet_manager.cpp b/code/ryzom/client/src/sheet_manager.cpp index 57de199a2..4badb2a6b 100644 --- a/code/ryzom/client/src/sheet_manager.cpp +++ b/code/ryzom/client/src/sheet_manager.cpp @@ -113,7 +113,7 @@ CTypeVersion TypeVersion [] = CTypeVersion("world", 1), CTypeVersion("weather_function_params", 2), CTypeVersion("mission_icon", 0), - CTypeVersion("sbrick", 32), + CTypeVersion("sbrick", 33), CTypeVersion("sphrase", 4), CTypeVersion("skill_tree", 5), CTypeVersion("titles", 1),