From 3fc85ea2918d22892c3f11dfe1511dff56f0effd Mon Sep 17 00:00:00 2001 From: nimetu Date: Tue, 8 Feb 2022 15:30:47 +0200 Subject: [PATCH] Split action bar 1 and 2 into separate sets --- .../client/src/interface_v3/action_handler_phrase.cpp | 10 +++++++--- ryzom/common/src/game_share/memorization_set_types.h | 2 +- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/ryzom/client/src/interface_v3/action_handler_phrase.cpp b/ryzom/client/src/interface_v3/action_handler_phrase.cpp index 5e73b9e5a..4e5ee5a5d 100644 --- a/ryzom/client/src/interface_v3/action_handler_phrase.cpp +++ b/ryzom/client/src/interface_v3/action_handler_phrase.cpp @@ -1602,7 +1602,8 @@ public: { CSPhraseManager *pPM= CSPhraseManager::getInstance(); sint val= (sint32)value.getInteger(); - clamp(val, 0, MEM_SET_TYPES::NumMemories-1); + // first half of memorized stanza sets + clamp(val, 0, MEM_SET_TYPES::NumMemories / 2 - 1); pPM->selectMemoryLineDB(val); } } @@ -1626,8 +1627,11 @@ public: else { CSPhraseManager *pPM= CSPhraseManager::getInstance(); - sint val= (sint32)value.getInteger(); - clamp(val, 0, MEM_SET_TYPES::NumMemories-1); + // second half of memorized stanza sets + sint minValue = MEM_SET_TYPES::NumMemories / 2; + sint maxValue = MEM_SET_TYPES::NumMemories - 1; + sint val = (sint32)value.getInteger() + minValue; + clamp(val, minValue, maxValue); pPM->selectMemoryLineDBalt(val); } } diff --git a/ryzom/common/src/game_share/memorization_set_types.h b/ryzom/common/src/game_share/memorization_set_types.h index 55a309bb0..a7967b65a 100644 --- a/ryzom/common/src/game_share/memorization_set_types.h +++ b/ryzom/common/src/game_share/memorization_set_types.h @@ -27,7 +27,7 @@ namespace MEM_SET_TYPES // New System. Only 10 memories are allowed enum { - NumMemories= 10, + NumMemories= 20, }; // Deprecated