-
Notifications
You must be signed in to change notification settings - Fork 45
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(SoloCraft): Limit XP modification to instances only #2
Open
Hotschmoe
wants to merge
65
commits into
conan513:master
Choose a base branch
from
Hotschmoe:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
update module
`/home/travis/build/milestorme/azerothcore-wotlk/modules/mod-solocraft/src/Solocraft.cpp:63:17: fatal error: use of undeclared identifier 'ChatHandler' ChatHandler(player->GetSession()).SendSysMessage("This server is running the |cff4CFF00SoloCraft |rmodule."); ^ 1 error generated.`
update no need to announce number of players for solo dungeons and raids
Travis now compiles Fixed some errors
- Before this commit: Login while being in a dungeon will not rebuff character. - Fixes azerothcore#9
This is a large overhaul of the Solocraft module. Features and Admin Controls added: -Groups now work. Difficulty is now distributed across group size -Debuff added for groups trying to exceed the difficulty modifier -Debuff can be enabled and disabled -Spellpower is now scaled based on character level and modifier -Stat modifier can now be changed in config to reel in melee damage -Individual modification of each dungeon/raid difficulty -Max level cap to keep high level characters from getting buffed -Max level cap modifiable in config for each dungeon/raid -Dungeon/Raid types still used as a catch all if not found as an individual instance in the config A database table is included to manage groups and the difficulty modifier that each group member has applied to them. It also deals with server restarts and players having to log out and log back in to try to correct stats. The table is required. Updated README.md file with current instructions and config file name fix. Testing: Debuff: -Character in dungeon with full difficulty modifier applied while not in a group. -Invite another character to the group. -Have new group member enter same dungeon. -Debuff will be applied because of the group member already in the dungeon has the full difficulty modifier applied. -Have both characters leave dungeon and re-enter it to have the modifier balanced across the current members of the group. -Max Level: -Solocraft.Max.Level.Diff and the Dungeon individual level are added together to declare the max level a character can be to get the difficulty modifier applied for the dungeon. -Use a character whose level is higher than the max level and enter dungeon. -Character should not receive the difficulty modifier buff for the dungeon. -Spellpower and Stats modifier adjustments: -Change modifier in the config. -Enter dungeon with character and notice stats and/or spellpower numbers changed from previous entrance into the dungeon.
Removed: unused variable maxlevel at line 508
Fix(cpp): Login after logout in dungeon will rebuff character
Removed numInGroup unused variable line 1144 and 1176
…locraft into Solocraft-Overhaul
Large nested If groups removed and converted into using Hashmaps
…locraft into Solocraft-Overhaul
Fix Dungeon Hopping Continually Increasing Stats
refactor: updated module registration to core rev 4++
Added Class Balancing to cpp and conf Closes issue azerothcore#21
Update code to use GetOption
fix(cpp/conf) Add Class Balancing
New Feature: XP Balancing Fix: Closes Issue azerothcore#24
…into XP-Feature
feat(CORE): XP Balancing and Minor Fix
from tinyint to bigint ( every Character with GUID <255 can scale endless)
Update Solocraft.sql
Fix for new OnGiveXP
(bugfix) CalculateDifficulty should return a `float`, not an `int`
* feat. Update Module and fix. Misc * fatal error: unused parameter 'map'
…hcore#38) * Allow config to be reloaded without server restart. * comment unused variables --------- Co-authored-by: Walter Pagani <[email protected]> Co-authored-by: Winfidonarleyan <[email protected]>
…e tracking for players * Modify XP only when player is in an instance * Fix build errors related to ObjectGuid usage ## Changes Proposed This PR addresses an issue in the SoloCraft module where XP modification was being applied to all players, regardless of whether they were in an instance or not. The changes include: 1. Implemented a system to track whether players are in instances or not. 2. Modified the XP calculation to only apply when players are in instances (dungeons or raids). 3. Fixed build errors related to the use of ObjectGuid. ## Implementation Details - Added a `std::map<ObjectGuid, bool>` to track players' instance status. - Implemented `OnMapChanged` to update players' instance status. - Modified `OnGiveXP` to check instance status before applying XP modifications. - Updated `OnLogout` to clean up instance tracking data. ## How to Test 1. Enable the SoloCraft module. 2. Enter a dungeon or raid and kill some mobs. Verify that XP is modified as expected. 3. Exit the instance and kill mobs in the open world. Verify that XP is not modified. 4. Re-enter an instance and confirm that XP modification resumes. ## Issues Addressed This PR fixes the issue where XP modification was being applied globally, even outside of instances.
Maybe if you make the PR in here it might be approved. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Changes Proposed
This PR addresses an issue in the SoloCraft module where XP modification was being applied to all players, regardless of whether they were in an instance or not. The changes include:
Implementation Details
std::map<ObjectGuid, bool>
to track players' instance status.OnMapChanged
to update players' instance status.OnGiveXP
to check instance status before applying XP modifications.OnLogout
to clean up instance tracking data.How to Test
Issues Addressed
This PR fixes the issue where XP modification was being applied globally, even outside of instances.