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.
* Revert "[Large server fix] #1537 Serialize playerBots/botLoading with a mutex and use snapshot-based loops to fix concurrency crashes (#1540)"
This reverts commit 3fff58df1a.
* Revert "[Fix] teleport to invalid map or invalid coordinates (x , y , z 200000, o ) given when teleporting player (g UI d full type player low , name , map , x , y , z , o ) (#1538)"
This reverts commit ca2e2ef0db.
* Revert "Fix: prevent MoveSplineInitArgs::Validate velocity asserts (velocity > 0.01f) for bots, pets, and charmed units (#1534)"
This reverts commit 4e3ac609bd.
* Revert "[Fix issue #1527] : startup crash in tank target selection — add TOCTOU & null-safety guards (#1532)"
This reverts commit c6b0424c29.
* Revert "[Fix issue #1528] Close small window where the “in a BG/arena” state can change between the check (InBattleground() / InArena()) and grabbing the pointer (GetBattleground()), which leads to a null dereference. (#1530)"
This reverts commit 2e0a161623.
* Revert "Harden playerbot logout & packet dispatch; add null-safety in chat hooks and RPG checks (#1529)"
This reverts commit e4ea8e2694.
* Revert "Dont wait to travel when in combat. (#1524)"
This reverts commit ddfa919154.
* Revert "nullptr fix (#1523)"
This reverts commit 380312ffd2.
* Revert "Playerbots/LFG: fix false not eligible & dungeon 0/type 0, add clear diagnostics (#1521)"
This reverts commit 872e417613.
* Revert "nullptr exception (#1520)"
This reverts commit 3d28a81508.
* Revert "Removed bot freezing at startup and system message, not relevant anymore (#1519)"
This reverts commit bcd6f5bc06.
* Make variable name more intuitive
* Make variable name more intuitive
* Make variable name more intuitive and clarify function
* Update playerbots.conf.dist
* Update PlayerbotAIConfig.cpp
* Update PlayerbotAIConfig.h
* Update RandomPlayerbotMgr.cpp
* Update playerbots.conf.dist
* Update playerbots.conf.dist
* Update playerbots.conf.dist
* Update playerbots.conf.dist
* Update playerbots.conf.dist
* Update playerbots.conf.dist
* Make variable name more intuitive
* Make variable name more intuitive
* Make variable name more intuitive and clarify function
* Update playerbots.conf.dist
* Update playerbots.conf.dist
* Update playerbots.conf.dist
* Update playerbots.conf.dist
* Update playerbots.conf.dist
* Add addclass bots to trading list, differentiate between buying and selling.
* typos
* Try calling playerguid
* point IsAddclassBot to IsRandomBot
* typo
* Fix through IsAddClassbot
* Working Version
* Minor typos.
* Add RandomBotMinLevelChance
* Save mana only for healer
* Disable addclass dk for low level player
* Target selection and debuff cast with less players in group
* Change default rpg strategy and bots count in config
* Logs clean up
* Improve init=auto
* Remove login logs after initialization
* Rndbots stats for quest
* Prediction chase in reach combat
* Poor & Normal items ensurence for init=auto
* New rpg startup speed up and refactor
* New rpg do quest
* Fix invalid height in quest poi
* Add quest accept and reward limitation
* New rpg quest improvement
* Organize quest log, reward quests and fix grind target
* Quest dropped statistic and remove redundant code
* Decrease grind relevance lower than loot
* Fix new rpg drop quest
* Go to reward quest instead of innkeeper when quest completed
* Fix incorrect logic in do quest reward
* Fix reset quests in factory
* Fix crash on grind target value
Co-authored-by: SaW <swerkhoven@outlook.com>
* Fix a minor error in DoCompletedQuest
* Let bots get rid of impossible quests faster
* Increase loot fluency (especially for caster)
* Remove seasonal quests from auto accept
* Enhance quest accept condition check
* Add questgiver check (limit acceptation of quest 7946)
* Questgiver check and localization
* Near npc fix
* Fix quest item report
* Add lowPriorityQuest set for quests can not be done
* Improve gameobjects loot
* Do complete quest
* FIx move far to teleport check
* Accept or reward quest from game objects
* Fix possible crash in rpg game objects
* Fix ChooseNpcOrGameObjectToInteract crash
---------
Co-authored-by: SaW <swerkhoven@outlook.com>
* Update RandomPlayerbotMgr.cpp
* Update playerbots.conf.dist
* Update PlayerbotAIConfig.h
* Update PlayerbotAIConfig.cpp
* Update playerbots.conf.dist
* Update playerbots.conf.dist
* Updated information
* Update RandomPlayerbotMgr.cpp
Avoid reverting https://github.com/liyunfan1223/mod-playerbots/pull/870/files
* Update playerbots.conf.dist
set capitals on Random
* Final update on settings documentation
* Update playerbots.conf.dist
* Fix bots loving to do BG's a bit too much
* Final fix bots over-queuing
* pt2 - Limit over-queuing to ~1 instance
Try and prevent over-queuing to a max of 1 instance.
* Add new queue instead of instance if necessary
* Update RandomPlayerbotMgr.cpp
* Final commit
* Update RandomPlayerbotMgr.cpp
* Fix timer
* Updated docu
* Update playerbots.conf.dist
* Update RandomPlayerbotMgr.cpp
Set BgCheckTimer to 45 as it is sufficient.
* Make summon imp non-temporary
* Remove horse mount from troll
* Set facing to during spell casting
* Allow rpg status command
* Init unarmed skill and fix skill clear
* Cast delay after interrupt spell