Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: magic effects on old protocol #1294

Merged
merged 1 commit into from
Jul 26, 2023

Conversation

hyresu
Copy link
Contributor

@hyresu hyresu commented Jul 22, 2023

Description

The magic effects were not working for the old protocols as it std::max was being used, making all effects of type 0xFF (255), even so, the approach isn't good, in my opinion the best approach is instead of using std::min just don't send effects of type 256+, because using std::min would just change all the effects after 255 to 255 instead.

Behaviour

Actual

Old clients don't receive magic effects

Expected

Old clients should receive magic effects up to type 255

Fixes #1284

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested

  • Using client 11 and a spell

Test Configuration:

  • Server Version: 13.20
  • Client: 11
  • Operating System: Windows 10

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I checked the PR checks reports
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

0.0% 0.0% Coverage
0.0% 0.0% Duplication

Copy link

@delphinusryetropical delphinusryetropical left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Following these modifications, the functionality pertaining to spell visibility has been restored. Spells are now visible again, resolving the previous issue. The changes seem apt in the provided context.

@majestyotbr majestyotbr marked this pull request as ready for review July 25, 2023 17:41
@luanluciano93
Copy link
Contributor

luanluciano93 commented Jul 25, 2023

Muito bom, testado e aprovado!

@dudantas dudantas merged commit ed4e1d9 into opentibiabr:main Jul 26, 2023
luan added a commit that referenced this pull request Jul 27, 2023
…system

* upstream/main: (73 commits)
  feat: introduce db transaction guard for muto-managed transactions (#738)
  fix: urmahlullu concurrency (#1302)
  feat: register sanguine items (#1298)
  fix: default parameter for challenge creature's lua function (#1296)
  feat: add elemental concoctions (#1304)
  fix: magic effects on old protocol (#1294)
  fix: force clean map when loading custom overlay (#1299)
  improve: a few content fixes (#1301)
  fix: prevent special characters in house list (#1306)
  fix: tick down prem days (#1303)
  fix: bestiary betterment counting cumulatively (#1307)
  improve: rework in solution build (#1292)
  fix: check for player before using variable (#1297)
  fix: error in spell of arachnophobica and add neutral damage enum (#1282)
  fix: cyclopedia debug related to client 13.20 (#1289)
  fix: loop related to creature destination inside a teleport items (#1288)
  improve: refactor waiting list logic and fix windows shutdown (#1280)
  feat: protocol update for 13.20 (#1269)
  build: fix docker build, change to ubuntu 23.04 (#1281)
  build: fix gha/workflows (#1277)
  ...
@hyresu hyresu deleted the fix-magic-effects branch October 28, 2024 03:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Magic Effects Disappear for Old Client Users After Protocol Update
6 participants