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 Event Scheduler #239

Merged
merged 9 commits into from
May 27, 2022
Merged

Fix Event Scheduler #239

merged 9 commits into from
May 27, 2022

Conversation

beats-dh
Copy link
Collaborator

@beats-dh beats-dh commented Feb 28, 2022

Description

This PR works directly with: opentibiabr/otservbr-global#471

Behaviour

Actual

On login you have one "XP Gain Rate", when you get experience this value changed.
Event schedule only display info, but doesn't work.

Expected

Formulae Tibia Wiki

  • Display correctely "XP Gain Rate".
  • Event Schedule server-side.
  • Exercise Training get bonus of events.

Fixes

configmanager.cpp & configmanager.h

  • added RATE_USE_STAGES boolean config rateUseStages = true.
  • fixed RATE_EXPERIENCE.
  • set base rates to 1.

spawn.cpp & spawn.h

  • fixed interval spawn time.
  • when the spawn time is less than MINSPAWN_INTERVAL, addMonster with min value.
  • now interval to 30000, less check time.

game.cpp, scripts\luascript.cpp & protocolstatus.cpp

  • some fixes

otserv.cpp & config.lua.dist

  • On/Off stagesExp(def: true).
  • set rates to 1

events.xml

  • changed date for test.
  • can use exprate="0", with any argument (this reduce the rate to 0, but not the exp).
    NOTE: exprate, lootrate, spawnrate or skillrate in 100, it's default value.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

How Has This Been Tested

Rat Test 1: without event, rateExp x1 + stamina : 150% = 7.5
Rat Test 2: with event +100%, rateExp 100% + prey 40% + store 50% + stamina x1.5 : 435% = 21,75

Test Configuration:

Server Version:
Client: Client 12.85
Operating System: Windows 11

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 don't see)
  • I have added tests that prove my fix is effective or that my feature works

@beats-dh beats-dh changed the title eventsScheduler Events_Scheduler Feb 28, 2022
@majestyotbr majestyotbr changed the title Events_Scheduler Fix Event Scheduler Mar 9, 2022
@majestyotbr majestyotbr added Status: Pending Review This PR or Issue requires a review Status: Pending Test This PR or Issue requires more testing labels Mar 9, 2022
@sonarcloud
Copy link

sonarcloud bot commented Apr 29, 2022

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 71 Code Smells

0.0% 0.0% Coverage
0.0% 0.0% Duplication

@majestyotbr majestyotbr merged commit 526ef51 into main May 27, 2022
majestyotbr pushed a commit to opentibiabr/otservbr-global that referenced this pull request May 27, 2022
@majestyotbr majestyotbr deleted the eventsScheduler branch May 27, 2022 18:56
JoaoCRDias pushed a commit to JoaoCRDias/otservbr-global that referenced this pull request Jul 27, 2022
luan pushed a commit that referenced this pull request Jul 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Datapack Global Area: Source Status: Pending Review This PR or Issue requires a review Status: Pending Test This PR or Issue requires more testing
Projects
None yet
4 participants