Combustion / Improvements in MODIFY SCALE#21
Closed
Ramusik wants to merge 4 commits into
Closed
Conversation
Add forgotten file from previous commit
|
Combustion bug! add this code to unit.cpp
|
|
Very nice the modify scale for creatures. +1 |
AlexTheBest
pushed a commit
to AlexTheBest/TrinityCore
that referenced
this pull request
Jun 29, 2012
kamoulox
pushed a commit
to MobaTwink/MobaCore
that referenced
this pull request
Nov 21, 2012
This was referenced Sep 16, 2013
Closed
This was referenced Sep 18, 2013
ike3
referenced
this pull request
in ike3/mangosbot
Aug 25, 2014
remove trailing whitespace after 11831
Aokromes
referenced
this pull request
in TrinityCoreLegacy/TrinityCore
Sep 11, 2015
mynew4
referenced
this pull request
Oct 4, 2015
Implemented: ca83e14 ee1c1b9 18e4ab6 bf37446 cb854a2 * This adds separate (per map) guid sequences depending on object type * Ported map object container from cmangos/mangos-wotlk@a2d396e * Added type container visitor for TypeUnorderedMapContainer * Implemented helper function to erase unique pairs from multimap containers * Moved object storage of all objects except players and transports to map level * Added containers linking database spawn id with creature/gameobject in world * Renamed DBTableGuid to spawnId * Added a separate spawn id sequence generator for creatures and gameobjects - this will be used in db tables * Moved building SMSG_UPDATE_OBJECT - updatefields changes broadcast to map update * Added new function to return but not increment guid * Adjusted .debug loadcells to show low guid in map before/after load * Added debug messages for creature spawn/destroy, for map guid debugging * Store all Gameobjects and Creatures added to OutdoorPvP, so the callback script can be removed when OutdoorPvP instance is destroyed.
Closed
Closed
Closed
MysterioPRM
pushed a commit
to MysterioPRM/TrinityCore
that referenced
this pull request
Mar 15, 2021
vixalie
pushed a commit
to vixalie/TrinityCore
that referenced
this pull request
Jan 27, 2024
Multistate implementation
T1ti
pushed a commit
to T1ti/TrinityCore
that referenced
this pull request
Jul 31, 2025
…t being attacked, up from 5 seconds. (TrinityCore#21) Training dummies with max health higher than 1 (Heroic Training Dummy) can now be damaged down to 1 hp and now regenerate health once they leave combat with all targets.
agatho
referenced
this pull request
in agatho/TrinityCore
Oct 5, 2025
…mination
CRITICAL FIX: Following CLAUDE.md - Code smell eliminated + deadlock resolved
ROOT CAUSE IDENTIFIED:
Deadlock occurred during BotAI constructor when bot joins group:
```
BotSession creates BotAI
→ BotAI::BotAI() constructor line 85
→ OnGroupJoined()
→ LeaderFollowBehavior::OnActivate() line 205
→ ObjectAccessor::FindPlayer(leaderGuid) → DEADLOCK!
```
This happens BEFORE first UpdateAI() call, so ObjectCache hasn't been initialized.
If any other thread is using ObjectAccessor at that moment → recursive lock → DEADLOCK.
CODE SMELL FIXED:
UpdateFollowTarget() was looking up the BOT via ObjectAccessor::FindPlayer(),
even though the bot pointer was already available from the calling context.
SOLUTION - Multiple ObjectAccessor eliminations:
1. **OnActivate() line 205** - CRITICAL FIX:
BEFORE: ObjectAccessor::FindPlayer(leaderGuid) then fallback to group iteration
AFTER: Direct group iteration only (works for all players including bots)
2. **UpdateFollowTarget()** - CODE SMELL FIX:
BEFORE: void UpdateFollowTarget(Player* leader)
Player* bot = ObjectAccessor::FindPlayer(_followTarget.guid)
AFTER: void UpdateFollowTarget(Player* bot, Player* leader)
Bot passed as parameter from calling context
3. **HandleLostLeader() line 943** - CONSISTENCY FIX:
BEFORE: if (Player* leader = ObjectAccessor::FindPlayer(_followTarget.guid))
AFTER: if (_followTarget.player) // Already cached
4. **Lost leader teleport line 963** - CONSISTENCY FIX:
BEFORE: if (Player* leader = ObjectAccessor::FindPlayer(_followTarget.guid))
AFTER: if (_followTarget.player) // Already cached
FILES MODIFIED:
- src/modules/Playerbot/Movement/LeaderFollowBehavior.h
* Updated UpdateFollowTarget signature to take both bot and leader
- src/modules/Playerbot/Movement/LeaderFollowBehavior.cpp
* Eliminated ALL 4 ObjectAccessor calls (lines 205, 626, 943, 963)
* Fixed UpdateFollowTarget to use passed bot parameter
* Updated call site to pass bot parameter
COMPLIANCE WITH CLAUDE.MD:
✓ Module-only implementation
✓ No core modifications
✓ Complete solution (no TODOs)
✓ Fixed code smell (unnecessary ObjectAccessor lookups)
✓ Performance improvement (4 fewer ObjectAccessor calls per follow update)
✓ Used existing data (_followTarget.player, group members iteration)
EXPECTED RESULT:
Zero ObjectAccessor calls in LeaderFollowBehavior during bot initialization.
Combined with Fix #19 (ObjectCache) and Fix #20 (ClassAI), this eliminates
ALL ObjectAccessor deadlock sources in the critical initialization path.
BUILD STATUS:
✓ Compiled successfully
✓ Deployed to M:/Wplayerbot/worldserver.exe
TESTING:
Monitor for deadlock during "Created ShamanAI" / group join initialization.
Expected: Zero "resource deadlock would occur" during bot group activation.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>
This file contains hidden or 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
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.
No description provided.