Commit Graph

2319 Commits

Author SHA1 Message Date
kadeshar
85c7009fe1 Codestyle fix (#1797)
Warning:
Dont change this PR as draft to make it testable


DONT REVIEW UNTIL Codestyle C++ workflow dont pass
2025-11-05 21:10:17 +01:00
Keleborn
ce51191e8f Fix. Leave group actions (#1774)
Fix for issue #1768 where the bot master was not getting reset. 
I also cleaned up leave group action to focus up function scope.
I moved the resets from #612 to the actual leaving function.

Disclosure: LLMs were NOT used in authoring this PR.

Test cases to consider for testers.
1. Master disbands group with random bots. Bots should go about their
business.
2. If you can dual box, create a raid where two real player both invite
random bots. One player leaves group, their bots should also leave.
(edge case, if a random bot that is supposed to leave the group becomes
leader they may disband the whole group.
2025-11-05 15:38:14 +01:00
Crow
d02d61e690 Implement Magtheridon strategy (#1721)
I'm marking this as a draft for now because I haven't done a detailed
review of the code, but I'm posting it now in case anybody wants to give
it a try.

Here's what the strategy (should) do.

### **Channeler Phase**

While you can probably AoE down all five Hellfire Channelers, that's
more dicey with IP nerfs and it's no fun, so the strategy takes what
would have still been considered an aggressive approach back in the day
by (1) assigning the Main Tank to the first Channeler, (2) having
Hunters misdirect two more Channelers to the MT, and (3) one Off Tank
picking up each of the fourth and fifth Channelers and dragging them out
of Shadow Volley Range from the main group. Sometimes the pull gets a
little wonky and one of the OTs might end up with one of the Channelers
that was intended for the MT, but it should work out in the end.

DPS will move through Channelers from Square -> Star -> Circle ->
Diamond -> Triangle. Once Square, Star, and Circle are down, the MT will
go sit by Magtheridon and wait for him to become active instead of
helping with the last two Channelers. I could have made the MT help with
the fourth Channeler too, but it's not needed, and positioning to pick
up Magtheridon after the third Channeler is a failsafe for low DPS
groups that aren't able to get four down before Magtheridon breaks free.

The top priority for Warlocks is to banish/fear the Burning Abyssals,
and they will continue to do so even after Magtheridon becomes active
(you are not supposed to kill the Abyssals; they have a gazillion HP and
automatically despawn after a minute). Their next priority is to put
Curse of Tongues on the Channelers.

### **Magtheridon Positioning**

The MT will pick up Magtheridon and pull him (moving backwards because
Magtheridon kind of hits like a bus) to a position up against the far
wall. Ranged DPS will spread out from a point roughly in the center of
the room, and Healers will spread out from a point that is a little
closer to Magtheridon. I have not built in aoe avoidance (except for
cube clickers, see below) because the general avoid aoe strategy seems
to work fine for this fight.

### **Clicking Manticron Cubes**

Now, the fun part. Bots will be assigned to clicking cubes by standard
group selection order (reverse join order), but assignment is done via
two passes. The first pass will look to select five ranged DPS bots that
are _not_ Warlocks. This is because Warlocks may still be needed to keep
Abyssals banished/feared and because Warlocks of all three specs put out
by far the most damage of all ranged DPS at level 70 in pre-raid/T4
gear. If there are not five non-Warlock ranged DPS bots available, then
the logic goes to the second pass, which can pick any bot that is not a
Tank.

Cube clicking works on a timer:

1. 48 seconds after Magtheridon breaks free, assigned cube clickers move
near their cubes (but a few yards outside of interact distance). During
this time, they should move around still to avoid Debris (by maintaining
distance from the triggering NPC) and Conflagration (by maintaining
distance from the triggering gameobject). Blast Nova is on a 54.35s to
55.4s timer, and I found 48s to always be ample time to get to the
cubes, but YMMV so this is a good thing to test. Going to a cube too
early not only takes away DPS but also risks more hazards appearing
on/around the cube that will then cause problems when the cube needs to
be clicked.
2. Blast Nova is a 2s cast, followed by a 10s channel (if not
interrupted by the cubes). As soon as the cast begins, bots will move
into interaction range and click the cube. Well, there is a randomized
delay between 200ms (about the fastest possible human reaction time to
visual stimuli) and 1500ms. It didn’t happen to me in a few runs, but it
may be possible that the delay causes the raid to eat one tick of Blast
Nova (I’m not sure if the first blast comes as soon as the channel
starts). Again, another good thing to test, but also one tick is not
going to kill anybody, and it’s arguably good to introduce some degree
of imperfection.
3. Once Blast Nova stops channeling (i.e., all five cubes have been
clicked and channeled simultaneously), bots will interrupt their cube
clicking and go back to regularly scheduled activities. Again, I’ve
introduced a randomized delay, this time between 200ms and 3000ms. Note
that bots can easily be perfect at this—if I don’t do the randomized
delay, they click and let go so fast that you can barely even see the
beams appear. It’s so atrocious for immersion that I consider the lack
of any randomization to be totally unacceptable for this strategy.
4. 48s after Blast Nova, bots will go back to their near-cube positions,
rinse and repeat.

If an assigned cube clicker dies, another bot should be immediately
assigned. All bots in the raid track the same timer so the new bot
should step into the prior bot’s shoes. Of course, if Blast Nova is
about to go off and a clicker dies next to a cube, you’re probably
wiping because I didn’t assign backups to stand in place. That’s too
much of a dad guild-level strategy even for me.

And that’s about it. Figuring out the cubes was a tremendous pain in the
ass, but I’ve really enjoyed the learning process.

---------

Co-authored-by: bash <31279994+hermensbas@users.noreply.github.com>
2025-11-05 14:53:16 +01:00
avirar
80dbd22ba1 Fixes equip bug with random suffix rings (#1757)
* Check item score of rings/trinkets to determine the correct slot to equip

* Early return, removed unecessary if statements, single line statements

Simplify logic for equipping items by reducing nested conditions.
2025-11-04 23:27:50 +01:00
privatecore
26a135a1ec Rewrite RandomPlayerbotFactory for improved maintainability and future updates (#1758)
* Rewrite RandomPlayerbotFactory - rewrite constructor and utility methods, simplify checks and logic

* Update the comment to clarify the original logic for race selection

* Remove magic numbers from CombineRaceAndGender method (gender)

* Add checks for races and classes disabled during random bot creation
2025-11-04 23:25:59 +01:00
Crow
983a55da86 Implement Gruul's Lair strategy (#1647)
* Implement Gruul's Lair strategy

* minor non-gameplay tweaks to code

* Use multiplier for tank assist

* HKM warlock & Gruul tank tweaks

* Fixed declarations

* rewrote HKM + minor Gruul tweaks

* Update PlayerbotAI.cpp

* modernize code and address comments

* clean ups to tank logic

* Oops.

* Remove post-move delay

For actions like positioning bosses, the standard post-movement delay should be overridden IMO since a player would be sequencing their actions in this type of situation

* Update RaidGruulsLairActions.cpp

* Replace break statements with return true

* enum class to enum

* moved all isuseful checks to triggers

* Split multipliers and improved banish logic

* Update for comments

* changes to int

* use helpers for marking icons

* address compile errors

* correct MoveTo and use RTI helper

* address comments and rename actions/triggers

* adjust alignment of location constants

* fix some crappy returns

* allow return true when changing targets

* change indents and move enums inside namespace

* style changes, trim trailing whitespaces, address comments
2025-11-04 23:01:30 +01:00
kadeshar
e35900f9d0 Merge pull request #1699 from IainD92/RandomBotGuildTotals_fix
Random bot guild count / generation fix
2025-11-04 20:50:02 +01:00
kadeshar
d9f0d5a555 Merge pull request #1808 from Raz0r1337/typo_fix
Update 2025_10_27_00_ai_playerbot_german_texts.sql
2025-11-04 20:19:44 +01:00
St0ny
7d5c9e3ee0 Update 2025_10_27_00_ai_playerbot_german_texts.sql
line error fixed
2025-11-04 14:48:24 +01:00
Revision
43164e74e1 Normalize line endings for 2025_10_27_00_ai_playerbot_german_texts.sql to LF (#1795) 2025-11-02 13:28:26 +01:00
privatecore
f7fea456ca Fix PositionInfo constructors' members order (#1776) 2025-11-02 13:27:25 +01:00
Revision
12a5132c33 Merge pull request #1793 from kadeshar/codestyle-azerothcore
Codestyle cpp azerothcore
2025-11-01 21:15:31 +01:00
kadeshar
bbbf71d40c - added missing var for codestyle azerothcore 2025-11-01 17:38:11 +01:00
kadeshar
586c4d9d05 - Added codestyle azerothcore python script 2025-11-01 17:27:26 +01:00
kadeshar
cb099bcaf4 Update repository condition for C++ job 2025-11-01 17:25:07 +01:00
St0ny
5d3e64800f important bugfix for the last PR #1675 (#1782)
* Update 2025_10_27_00_ai_playerbot_german_texts.sql

Fix bug that adds holes in the german text_loc3 collumn
2025-10-29 17:39:06 +01:00
St0ny
235f0249b2 insert of deDE localized chatter texts into text_loc3 (#1675)
* insert of german chatter texts into text_loc3

restore of original file ai_playerbot_texts.sql
2025-10-28 21:56:42 +01:00
bash
7237b154e0 Added intelliJ project folder on exclusion list (#1764) 2025-10-25 00:54:27 +02:00
NoxMax
c3fd97b6c0 Fix: Prevent addClass bots from getting realm firsts (#1745)
* Random/Addclass bots cannot get first achievements

* Use firsts achievement flags
2025-10-23 20:10:35 +02:00
Alex Dcnh
286213eb8b Fix Playerbots won't fly #1753 (#1761) 2025-10-23 01:33:22 +02:00
Iain Donnelly
1d19dea974 Update RandomPlayerbotFactory.cpp 2025-10-22 23:53:42 +01:00
SaW
6e1c9114df FIX: part of logic in picking quest reward (#1752)
* FIX: part of logic in picking reward

Avoids dereferencing begin() after confirming the set is empty.

* Update TalkToQuestGiverAction.cpp
2025-10-21 10:36:10 +02:00
bash
7e810f8174 Update README.md (#1750) 2025-10-20 21:46:51 +02:00
bash
e0df6558f5 Added shaman default combat strategy names on top of custom (#1739) 2025-10-20 18:20:46 +02:00
bash
50ac6e5b95 core_merge_changes (#1747) 2025-10-20 14:12:14 +02:00
Alex Dcnh
2c5185a7cb Update StatsWeightCalculator.cpp (#1744) 2025-10-20 13:17:59 +02:00
Crow
f874d2c79e Fix typo in server loading message (#1742) 2025-10-20 01:05:45 +02:00
SaW
5a4acbe36c Update PvpValues.cpp (#1746)
Set uninitialized variable
Remove std::move
2025-10-20 01:04:11 +02:00
SaW
e693b208be FIX: ICC - default return position for BQL (#1737) 2025-10-18 22:54:52 +02:00
bash
10ce94e065 Removal space lel (#1740) 2025-10-18 22:32:43 +02:00
kikiviki
553b8276eb Heirloom quality auto-equip calculation implemented (#1732)
* Heirloom quality auto-equip calculation implemented
2025-10-18 22:17:44 +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
kadeshar
bd13d6be80 Merge pull request #1727 from Wishmaster117/Prevent-Crash-if-sTaxiPathStore.LookupEntry-return-nullptr
Prevent Crash if sTaxiPathStore.LookupEntry return nullptr
2025-10-11 13:21: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
kadeshar
1fb66e9d75 - Fixed issues in ai_playerbot_texts table scripts (#1723) 2025-10-09 23:45:58 +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
Iain Donnelly
3f050a4a77 Change LOG_INFO to LOG_DEBUG 2025-10-07 22:46:19 +01: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