From a1b6098b3a4002916da3c445d1a565b8f60d2964 Mon Sep 17 00:00:00 2001 From: Linda Naughton Date: Mon, 11 Apr 2022 21:50:57 -0400 Subject: [PATCH 1/2] XP from alts. Fix unified play update. --- install/migrations/0079_beta105_update.rb | 2 +- install/migrations/0080_beta106_update.rb | 2 +- install/migrations/0081_beta107_update.rb | 17 +++++++++++++++++ plugins/fs3skills/fs3skills_web_char_data.rb | 2 +- .../web/learn_ability_request_handler.rb | 7 ++++++- 5 files changed, 26 insertions(+), 4 deletions(-) create mode 100644 install/migrations/0081_beta107_update.rb diff --git a/install/migrations/0079_beta105_update.rb b/install/migrations/0079_beta105_update.rb index 8f73683451..ea7a9177a6 100644 --- a/install/migrations/0079_beta105_update.rb +++ b/install/migrations/0079_beta105_update.rb @@ -24,7 +24,7 @@ def migrate end Global.logger.debug "Default unified play." - Character.all.each { |c| c.update(unified_play: true) } + Character.all.each { |c| c.update(unified_play_screen: true) } end end diff --git a/install/migrations/0080_beta106_update.rb b/install/migrations/0080_beta106_update.rb index bf19bff228..f37dcd1ee5 100644 --- a/install/migrations/0080_beta106_update.rb +++ b/install/migrations/0080_beta106_update.rb @@ -9,7 +9,7 @@ def require_restart def migrate Global.logger.debug "Default unified play - again." - Character.all.each { |c| c.update(unified_play: true) } + Character.all.each { |c| c.update(unified_play_screen: true) } end end diff --git a/install/migrations/0081_beta107_update.rb b/install/migrations/0081_beta107_update.rb new file mode 100644 index 0000000000..6e48a1a63b --- /dev/null +++ b/install/migrations/0081_beta107_update.rb @@ -0,0 +1,17 @@ +module AresMUSH + + module Migrations + class MigrationBeta107Update + def require_restart + false + end + + def migrate + + Global.logger.debug "Default unified play - third time's the charm?" + Character.all.each { |c| c.update(unified_play_screen: true) } + + end + end + end +end \ No newline at end of file diff --git a/plugins/fs3skills/fs3skills_web_char_data.rb b/plugins/fs3skills/fs3skills_web_char_data.rb index 95c1aede93..bf5adc75c1 100644 --- a/plugins/fs3skills/fs3skills_web_char_data.rb +++ b/plugins/fs3skills/fs3skills_web_char_data.rb @@ -25,7 +25,7 @@ def build(char, viewer) languages: get_xp_list(char, char.fs3_languages), advantages: get_xp_list(char, char.fs3_advantages), xp_points: char.fs3_xp, - can_learn: is_owner, + can_learn: AresCentral.is_alt?(char, viewer), allow_advantages_xp: Global.read_config("fs3skills", "allow_advantages_xp") } else diff --git a/plugins/fs3skills/web/learn_ability_request_handler.rb b/plugins/fs3skills/web/learn_ability_request_handler.rb index f8cbfefe71..a4ee873bcf 100644 --- a/plugins/fs3skills/web/learn_ability_request_handler.rb +++ b/plugins/fs3skills/web/learn_ability_request_handler.rb @@ -4,13 +4,18 @@ class LearnAbilityRequestHandler def handle(request) ability = request.args[:ability] enactor = request.enactor + char = Character.named(request.args[:char]) || enactor error = Website.check_login(request) return error if error request.log_request - error = FS3Skills.learn_ability(enactor, ability) + if (!AresCentral.is_alt?(enactor, char)) + return { error: t('dispatcher.not_allowed') } + end + + error = FS3Skills.learn_ability(char, ability) if (error) return { error: error } end From d6d1814e9e7d86add83f7d1ec194a724b086ceaa Mon Sep 17 00:00:00 2001 From: Linda Naughton Date: Mon, 11 Apr 2022 21:52:26 -0400 Subject: [PATCH 2/2] Version bump. --- version.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version.txt b/version.txt index 639009be1f..f14cf6a1e0 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -0.106 +0.107