Skip to content

fix: improve character death parsing and removing creature prefix #456

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

Merged
merged 4 commits into from
Mar 4, 2025

Conversation

tobiasehlert
Copy link
Member

@tobiasehlert tobiasehlert commented Mar 3, 2025

This pull request includes several changes to the src/TibiaCharactersCharacter.go file and its associated test file src/TibiaCharactersCharacter_test.go. The changes primarily focus on improving string handling, adding new test cases, and updating existing test cases to match the new string handling logic.

String Handling Improvements:

  • Added imports for unicode and unicode/utf8 to handle string prefixes and character cases. (src/TibiaCharactersCharacter.go)
  • Enhanced the TibiaDataParseKiller function to remove prefixes like "and", "a", and "an" from data strings and handle lowercase characters. (src/TibiaCharactersCharacter.go)

Test Case Updates:

New Test Cases:

  • Added TestNumber15 and TestNumber16 to validate the new string handling logic with different character data. (src/TibiaCharactersCharacter_test.go)

fix #455
fix #439
fix #344
fix #341

@tobiasehlert tobiasehlert added enhancement New feature or request go Pull requests that update Go code labels Mar 3, 2025
@tobiasehlert tobiasehlert self-assigned this Mar 3, 2025
Copy link

codecov bot commented Mar 3, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 80.29%. Comparing base (086f483) to head (85ebb50).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #456      +/-   ##
==========================================
- Coverage   80.30%   80.29%   -0.02%     
==========================================
  Files          22       22              
  Lines        3686     3694       +8     
==========================================
+ Hits         2960     2966       +6     
- Misses        585      587       +2     
  Partials      141      141              

Copy link

sonarqubecloud bot commented Mar 4, 2025

@tobiasehlert tobiasehlert changed the title fix: character death parsings with creatures fix: improve character death parsing and removing creature prefix Mar 4, 2025
@tobiasehlert tobiasehlert merged commit d0fee14 into main Mar 4, 2025
8 checks passed
@tobiasehlert tobiasehlert deleted the fix-character-death-parsings-with-creatures branch March 4, 2025 01:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request go Pull requests that update Go code
1 participant
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy