Commit Graph

1935 Commits

Author SHA1 Message Date
bash
91b8a43270 Added shaman default combat strategy names on top of custom 2025-10-18 15:39:06 +02:00
Crow
f791ab61c4 Update server loading message 2025-10-16 22:43:49 +02:00
Crow
3260ca1429 Cleanups to config and source (#1720)
* general edits

* Clarify comment for bot teleportation map IDs
2025-10-14 15:43:18 +02:00
Yunfan Li
e1fa733aa5 Preparation for project transfer (#1733) 2025-10-14 00:11:54 +08:00
kadeshar
525eceb5a2 Merge pull request #1728 from Wishmaster117/Fix-Opcode-dispatch,-trusts-every-queued-packet-to-have-a-handler
Fix Opcode dispatch, trusts every queued packet to have a handler
2025-10-11 13:22:51 +02:00
Wishmaster117
d0ac9452f4 Fix Opcode dispatch, trusts every queued packet to have a handler 2025-10-11 11:26:09 +02:00
Wishmaster117
8a30d10617 Prevent Crash if sTaxiPathStore.LookupEntry return nullptr 2025-10-11 10:57:54 +02:00
kadeshar
5a0c27637e Merge pull request #1708 from hermensbas/feature/removeFromGroup_replaced_with_worldpackets
[fix crash] Crash on removeFromGroup
2025-10-10 19:59:21 +02:00
kadeshar
cea1e90f57 Merge pull request #1714 from avirar/fix/remove-auras-before-teleport
[fix crash] several crashes
2025-10-10 19:43:34 +02:00
bash
31ed5cbb65 fixes 2025-10-09 20:52:32 +02:00
kadeshar
5b128b3300 - Update method in QueryItemUsageForEquip (#1701) 2025-10-09 08:02:44 +02:00
avirar
5681f29060 Merge branch 'liyunfan1223:master' into fix/remove-auras-before-teleport 2025-10-07 11:13:57 +11:00
bash
cf4f0f6dc7 renamed function name 2025-10-06 21:07:43 +02:00
Revision
e00c8fca2a Updated the spell id for Spirit of Redemption (#1709) 2025-10-06 19:57:37 +02:00
root
c90b155a70 fix: Replace static m_botReleaseTimes with per-bot storage to prevent race condition
Fixes a thread safety issue where multiple bots dying in battlegrounds
simultaneously would corrupt the shared static unordered_map, causing
segmentation faults.

Changes:
- Remove: static m_botReleaseTimes map from AutoReleaseSpiritAction
- Add: bgReleaseAttemptTime member to PlayerbotAI (per-bot storage)
- Update: All references to use per-bot storage instead of static map

Why this fixes the crash:
- Each PlayerbotAI instance is accessed by only one map update thread
- No cross-thread access to shared data structures
- No mutex/locking required - thread-safe by design
- Automatic cleanup when bot is destroyed

Thread-safe solution: Per-bot state eliminates race conditions without
performance overhead.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-06 11:22:45 +11:00
bash
780f6d60e0 fix build errors 2025-10-05 23:49:13 +02:00
bash
1faf20f567 removeFromGroup replaced with worldpackets 2025-10-05 20:05:56 +02:00
root
d26c2a3549 fix: Clean visibility references before bot teleport to prevent crash
Add PLAYERHOOK_ON_BEFORE_TELEPORT to proactively clean visibility
references when a bot teleports between maps. This prevents a race
condition where:
1. Bot A teleports and its visible objects start getting cleaned up
2. Bot B is simultaneously updating visibility and tries to access
   objects in Bot A's old visibility map
3. Those objects may already be freed, causing a segmentation fault
   at GridNotifiers.cpp:65 in IsWorldObjectOutOfSightRange()

The fix only affects bots to avoid changing behavior for real players.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-05 16:21:09 +11:00
avirar
21ea3a7226 Merge branch 'liyunfan1223:master' into fix/remove-auras-before-teleport 2025-10-04 09:42:21 +10:00
bash
377ac199a7 Revert "Feat: Filter bot logins by level range" (#1705) 2025-10-03 22:58:30 +02:00
IainD92
f2b5580495 Maintenance config for altbots (#1693)
* Maintenance config controls

bools in config

* Update TrainerAction.cpp

removed some note-to-selfs (personal config preferences)

* Set default to true

Also tidied up some comments

* Update playerbots.conf.dist

* Reorganised

Changed the description in conf to be less conversational.

Rearranged the order that options are arranged, grouping by what made sense to me (the type of gameplay made easier/skipped by the option being enabled).

Rearranged the order the variables and method calls are listed in the code to match the order they are presented in the conf to make future maintenance of maintenance (:P) more intuitive.

* Update playerbots.conf.dist

Revert previous commit (change to call order in MaintenanceAction::Execute)

conf settings grouped
2025-10-03 11:56:16 +02:00
root
387c491265 fix(Playerbots): Remove auras before teleporting to prevent crash
Add RemoveAurasWithInterruptFlags call before all TeleportTo operations
to prevent race condition crash in battlegrounds.

The crash occurs when area auras (like "Entering Battleground") are
queued for removal in Aura::UpdateTargetMap's targetsToRemove list,
but the unit is deleted before the 500ms update cycle completes,
causing SIGSEGV when accessing the dangling pointer.

This fix removes auras with AURA_INTERRUPT_FLAG_TELEPORTED and
AURA_INTERRUPT_FLAG_CHANGE_MAP before teleporting, matching the
behavior in Player::TeleportTo for real players.

Affected locations:
- BattleGround join/teleport
- Spirit healer/graveyard teleport
- Corpse resurrection teleport
- Meeting stone teleport
- Master follow teleport
- RPG unstuck teleport
- Random bot teleport
- Chat command teleport

Raid-specific teleports excluded as they require separate testing.
2025-10-03 15:58:36 +10:00
kadeshar
ffa8c6d94a Merge pull request #1623 from brighton-chi/karazhan
Implement Karazhan strategy
2025-10-03 06:30:39 +02:00
Alex Dcnh
24e69229e3 Fix: Shaman bots stuck spamming “Call of the Elements” / “set … totem” (totem rank detection & trigger loop) (#1659)
* Fix Issue #1648

Fix low level randombot shamans (~34) don't heal in dungeongroups, seems new "resto" strategy is broken #1648

* Final working fix, tested with all 3 shaman class specs.

* Update asked by review

* requested review changes

* Minor corrections of the cpp file

* boyscouting

Lets try and leave the code cleaner behind as we find it when we can.

* Oupsie fix ;)

---------

Co-authored-by: bash <31279994+hermensbas@users.noreply.github.com>
2025-10-02 20:47:09 +02:00
kadeshar
c503199422 Merge pull request #1663 from gacuna89/patch-3
Fix: Prevent priests in Spirit of Redemption form from using mana
2025-10-02 20:26:10 +02:00
bash
31b19aabc7 Minor correction, scope was to big. 2025-10-02 01:28:30 +02:00
kadeshar
aea58414b0 - Changed item usage value on new method (#1692) 2025-10-02 00:10:19 +02:00
bash
06e45300e1 Added const 2025-10-01 23:45:28 +02:00
kadeshar
1ea17e593a Merge pull request #1499 from NoxMax/login-range
Feat: Filter bot logins by level range
2025-10-01 17:42:39 +02:00
NoxMax
25726f54b1 Update RandomPlayerbotMgr.cpp 2025-10-01 13:16:00 +08:00
privatecore
7dac49cf9c Fix wrong prepared statement used for the PlayerbotDbStore::Reset issue #1172 (#1688) 2025-09-30 22:13:36 +02:00
Revision
a5120c0a7c Fix spacing issue and removed unnecessary spaces (#1684)
* Fix spacing issue and removed unnecessary spaces

* Added spaces where suggested
2025-09-30 15:25:53 +02:00
bash
0cc15411c1 license update (#1674) 2025-09-30 15:19:44 +02:00
avirar
01915ffa35 Added null check to Queue::findHighestRelevanceBasket() (#1686) 2025-09-30 15:17:45 +02:00
crow
2e1507b794 Various corrections 2025-09-30 00:19:35 -05:00
kadeshar
a19604024e Merge pull request #1662 from gacuna89/patch-2
Fix: Prevent bots from eating and drinking while mounted
2025-09-29 21:46:07 +02:00
crow
55b58a2ef6 Simplify checks & implement getbottext method 2025-09-28 21:28:54 -05:00
bash
972e2604ce Update NonCombatActions.cpp
This is better, even though aura check is tiny more expensive then most. Placing them into isUseful() is kinda confusing.
2025-09-29 00:14:28 +02:00
bash
aaa9e1a42c Placed cheap checks in isPossible() more expensive in isUseful()
combat en mounted are both HasUnitFlag checks, which are cheap calls to make.
2025-09-29 00:06:56 +02:00
crow
0afeca4300 Merge remote-tracking branch 'upstream/master' into karazhan 2025-09-28 17:06:55 -05:00
bash
df77668b4b Review 2025-09-28 20:37:01 +02:00
kadeshar
c3eecc0d7c Merge pull request #1676 from brighton-chi/spec-tab-names
Fix SPEC_TAB names
2025-09-28 20:08:39 +02:00
kadeshar
7ff56dfd07 Merge pull request #1673 from privatecore/fix-pull-power-spark
Fix wrong cast spell action passed to the PullPowerSparkAction constructor
2025-09-28 20:07:32 +02:00
kadeshar
873767db7c Merge pull request #1670 from icemansparks/fix-mount-state-logic
FIX: Allow following master's mount state regardless of group leader
2025-09-28 20:06:53 +02:00
Iain Donnelly
6f79193d7a Config option to set max number of guild members in random bot guilds 2025-09-28 14:04:09 +01:00
privatecore
b0f3de65f5 Fix warning: delete called on non-final that has virtual functions but non-virtual destructor (#1671) 2025-09-28 13:53:11 +02:00
privatecore
30bd58be67 Fix wrong PlayerbotAI parameter name passed to the constructor (#1672) 2025-09-28 13:42:03 +02:00
kadeshar
c20fb34470 - Added method to get translation bot text or default (#1678) 2025-09-28 13:39:59 +02:00
privatecore
34ce17fb3a Fix wrong cast spell action passed to the PullPowerSparkAction constructor 2025-09-28 09:13:36 +02:00
crow
e525c22d85 Fix SPEC_TAB names 2025-09-27 23:11:47 -05:00