Commit Graph

2108 Commits

Author SHA1 Message Date
bash
15f138aab0 Don't apply XPRate multiplier when bot is in group with real player (#1495)
* dont apply XPRate if bot is in group with real player

https://github.com/liyunfan1223/mod-playerbots/issues/1490

* Optimize code

* Oops minor correction

* Defense check on the player itself

* Safer way to check the leader is real player.

* Added abit more defense programming, should be needed still ..why not
2025-08-10 18:28:39 +02:00
ThePenguinMan96
5759a98d5a Warlock Soul Shard Cap Increase / Firestone and Spellstone Modes (#1514)
Hello everyone,

This is a small change to warlocks that accomplishes 2 things:

1. Changes the firestone and spellstone weapon enchants so only one of them can be active - players reported to me that both strategies could be present before, resulting in a bug where the bot repeatedly applied the enchant.
2. Changes the soul shard deletion cap from 6 or more to 26 or more - players will now be able to stockpile soul shards up to 25 in a bot's inventory before the bot starts deleting them one at a time back down 25. I chose 25 because if it was higher, drain soul would get multiple shards above the 32 unique cap, and spam the player "I can't carry any more of those". It was super annoying, and with testing, I have not seen this error at 25. This aims to address issue #1502 .
2025-08-10 11:13:01 +02:00
brighton-chi
13fca4398d Remove EPL from pvp prohibited zones (#1511)
* Remove EPL from pvp prohibited zones

* fixed unrelated error in comments

* Update default value
2025-08-09 20:59:55 +02:00
Yunfan Li
a307eb2f08 VisitAllObjects to VisitObjects (sync with acore) (#1513) 2025-08-09 19:17:33 +08:00
Alex Dcnh
966bf1d6af Correct side effects of merge f5ef5bd1c2 (#1512)
* Update PlayerbotMgr.h

* Update PlayerbotMgr.cpp

* Update PlayerbotMgr.cpp

* Update PlayerbotMgr.cpp

* Update PlayerbotMgr.cpp

* Update PlayerbotMgr.cpp

* Update PlayerbotMgr.cpp

* Update PlayerbotMgr.h

* Update PlayerbotMgr.cpp

* Update PlayerbotMgr.h

* Update PlayerbotMgr.cpp

* Update PlayerbotMgr.h

* Update PlayerbotMgr.h
2025-08-08 20:36:03 +02:00
Alex Dcnh
f5ef5bd1c2 Fix ACCESS_VIOLATION in mod-playerbots: purge stale AIs, add thread-safety, and harden HasRealPlayerMaster (#1507) 2025-08-07 00:31:00 +02:00
ThePenguinMan96
0afcf29490 Warlock Dismount Pet Fix (#1501)
Hello everyone,

This PR is to address #1489, where the warlock summons a pet when they dismount.

A tester found that the cause was the "wrong pet" triggering "summon (pet)". I looked into the "wrong pet" trigger, and noticed that there was not a clause if there was no active pet. It was inadvertently casting "summon (pet)" because for a brief second after dismounting, the warlock didn't technically have a pet.

I was able to recreate the issue based on tester feedback (dismounting with a warlock bot that has a pet). I tested this fix locally - it seems to work as intended. The warlock no longer attempts to summon a pet when dismounting. I tested it with nc +debug, and noticed that the "wrong pet" trigger was no longer firing. I also checked the logs - nothing.

Thank y'all for the testing and feedback!
2025-08-05 09:10:06 +02:00
brighton-chi
a6c07ca16d Improve attackaction failure message system (#1498) 2025-08-03 23:12:33 +02:00
Yunfan Li
ee99b66d04 Sync with azerothcore (#1492) 2025-08-02 16:10:49 +08:00
Revision
ede7697784 Changed OnPlayerBeforeAchievementComplete to allow random bots to unlock achievements (#1487) 2025-08-01 21:48:01 +02:00
Alex Dcnh
ba9cb5a256 Add optional gender parameter to .playerbot bot addclass command (#1491) 2025-08-01 21:45:29 +02:00
Keleborn
a1dd6f6fc5 New roll for item action (#1482)
* New roll for item action

* Add general roll command as well.

* Update ChatCommandHandlerStrategy.cpp

Add accidental removal of glyph equip

---------

Co-authored-by: bash <31279994+hermensbas@users.noreply.github.com>
2025-08-01 21:44:52 +02:00
brighton-chi
e950f65a83 Add config to disable hunters from generating specified pet families (#1485)
* Add config to disable hunters from generating specified pet families

* Fixed unrelated typo in config
2025-08-01 19:29:51 +02:00
brighton-chi
938872564a Revise bot logic for initializing and using consumables (#1483)
Bots will now add level- and spec-appropriate oils and stones when maintaining and, with respect to randombots, leveling. All bots (other than those with class-specific temporary weapon enchants) will apply oils and stones to their weapons. General clean-ups to associated code were made.
2025-08-01 19:28:13 +02:00
Yunfan Li
baa1aa9e9d Fix initself crash (#1488) 2025-08-01 19:15:59 +02:00
kadeshar
65a3bf481c - Added generic boss shadow aura trigger and action (#1480)
- Added automatic aura for General Vezax and Yogg-Saron
- Added support for all rank for boss aura triggers
2025-08-01 21:31:44 +08:00
kadeshar
989b48f491 Merge pull request #1477 from ThePenguinMan96/Channel-Cancel-checks-for-Channeled-AOE-DPS-Spells
Channel Cancel checks for Channeled AOE DPS Spells
2025-07-31 21:25:53 +02:00
kadeshar
40874624a8 Merge pull request #1475 from EricksOliveira/patch-33
Improve Arena Bot Behavior When Target is Behind Obstacles
2025-07-31 17:25:42 +02:00
kadeshar
f76435b4c4 Merge pull request #1473 from Tierisch/master
Add option to remove 'healer dps' strategy based on specified map.
2025-07-31 16:50:06 +02:00
kadeshar
df3c44419d Merge pull request #1474 from ThePenguinMan96/Druid-Flight-Form-Bug-Fix
Druid Flight Form Bug Fix
2025-07-28 18:23:01 +02:00
EricksOliveira
b7b8c60d17 Fix 2025-07-28 12:12:53 -03:00
EricksOliveira
e5f1446b9f . 2025-07-28 12:05:22 -03:00
EricksOliveira
e92029dd6e The bot immediately moves to a new position if the target is lost by LoS even during the cast. 2025-07-28 11:48:15 -03:00
EricksOliveira
b8c0a54f92 .. 2025-07-28 09:03:20 -03:00
EricksOliveira
18d1821dab Fix 2025-07-28 08:57:19 -03:00
EricksOliveira
8a8571c54f . 2025-07-28 08:45:20 -03:00
EricksOliveira
21bcbece7a Improve Bot Repositioning Based on Line of Sight and Vertical Distance
This update enhances bot behavior by adding a check for both line of sight (LoS) and significant vertical height differences between the bot and its target. If the bot cannot see its target or if the height difference exceeds 5.0f, it calculates a valid path and moves closer to regain visibility and combat effectiveness. This resolves cases where bots would previously stand still when enemies jumped from elevated terrain or were behind obstacles.
2025-07-28 08:36:28 -03:00
ThePenguinMan96
e40c2b21f2 Channel Cancel checks for Channeled AOE DPS Spells
Hello everyone,

I liked the channel cancel I did on mage recently, where they cancel blizzard if there is only 1 enemy left. I decided to do the same for the following classes:

Druid: Hurricane
Hunter: Volley
Priest: Mind Sear
Warlock: Rain of Fire

I moved the "ChannelCancel" action to it's own file, so other classes could benefit from it. I removed it from the mageactions.
2025-07-28 01:35:56 -07:00
EricksOliveira
8a9a833c98 fix 2025-07-27 19:31:54 -03:00
EricksOliveira
101c7f3046 . 2025-07-27 18:45:04 -03:00
EricksOliveira
d8d94f33ee Improve Arena Bot Behavior When Target is Behind Obstacles
This update enhances bot behavior in arena scenarios by addressing the issue where bots remain idle if their target moves behind line-of-sight (LoS obstacles). The bot now attempts to reposition near the target to regain LoS instead of standing still, preventing situations where enemies can recover without pressure.

Could someone test it?
2025-07-27 18:35:43 -03:00
kadeshar
eef2e8c1ef Merge pull request #1456 from brighton-chi/worldbuff
Make world buff strategy conditions configurable
2025-07-27 12:32:26 +02:00
kadeshar
a675e74d97 Merge pull request #1466 from Wishmaster117/Add-glyphs-and-glyph-equip-commands
Add /w botname "glyphs" and  "glyph equip" commands
2025-07-27 12:30:54 +02:00
ThePenguinMan96
de9f8fbbea Druid Flight Form Bug Fix
Hello everyone,

This is a fix for issue #1233

I have added a clause in the CanCastSpell check that checks if the bot is in flight form/swift flight form & not in combat. It will no longer attempt to shift into a caster form  and repetitively try and heal/buff party members while flying. Tested on my PC with the changes and druid now successfully flies as fast as the player with no stopping.

This was causing the issue:

static ActionNode* thorns([[maybe_unused]] PlayerbotAI* botAI)
{
    return new ActionNode("thorns",
                          /*P*/ NextAction::array(0, new NextAction("caster form"), nullptr),
                          /*A*/ nullptr,
                          /*C*/ nullptr);
}

static ActionNode* thorns_on_party([[maybe_unused]] PlayerbotAI* botAI)
{
    return new ActionNode("thorns on party",
                          /*P*/ NextAction::array(0, new NextAction("caster form"), nullptr),
                          /*A*/ nullptr,
                          /*C*/ nullptr);
}

static ActionNode* mark_of_the_wild([[maybe_unused]] PlayerbotAI* botAI)
{
    return new ActionNode("mark of the wild",
                          /*P*/ NextAction::array(0, new NextAction("caster form"), nullptr),
                          /*A*/ nullptr,
                          /*C*/ nullptr);
}

static ActionNode* mark_of_the_wild_on_party([[maybe_unused]] PlayerbotAI* botAI)
{
    return new ActionNode("mark of the wild on party",
                          /*P*/ NextAction::array(0, new NextAction("caster form"), nullptr),
                          /*A*/ nullptr,
                          /*C*/ nullptr);
}
static ActionNode* regrowth_on_party([[maybe_unused]] PlayerbotAI* botAI)
{
    return new ActionNode("regrowth on party",
                          /*P*/ NextAction::array(0, new NextAction("caster form"), nullptr),
                          /*A*/ NULL,
                          /*C*/ NULL);
}
static ActionNode* rejuvenation_on_party([[maybe_unused]] PlayerbotAI* botAI)
{
    return new ActionNode("rejuvenation on party",
                          /*P*/ NextAction::array(0, new NextAction("caster form"), nullptr),
                          /*A*/ NULL,
                          /*C*/ NULL);
}
static ActionNode* remove_curse_on_party([[maybe_unused]] PlayerbotAI* botAI)
{
    return new ActionNode("remove curse on party",
                          /*P*/ NextAction::array(0, new NextAction("caster form"), nullptr),
                          /*A*/ NULL,
                          /*C*/ NULL);
}
static ActionNode* abolish_poison_on_party([[maybe_unused]] PlayerbotAI* botAI)
{
    return new ActionNode("abolish poison on party",
                          /*P*/ NextAction::array(0, new NextAction("caster form"), nullptr),
                          /*A*/ NULL,
                          /*C*/ NULL);
}
static ActionNode* revive([[maybe_unused]] PlayerbotAI* botAI)
{
    return new ActionNode("revive",
                          /*P*/ NextAction::array(0, new NextAction("caster form"), nullptr),
                          /*A*/ NULL,
                          /*C*/ NULL);
}

The *P* stands for prior, aka before this action is taken, do this other action "caster form". This is the Caster Form action:

class CastCasterFormAction : public CastBuffSpellAction
{
public:
    CastCasterFormAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "caster form") {}

    bool isUseful() override;
    bool isPossible() override { return true; }
    bool Execute(Event event) override;
};

And this:

bool CastCasterFormAction::isUseful()
{
    return botAI->HasAnyAuraOf(GetTarget(), "dire bear form", "bear form", "cat form", "travel form", "aquatic form",
                               "flight form", "swift flight form", "moonkin form", nullptr) &&
           AI_VALUE2(uint8, "mana", "self target") > sPlayerbotAIConfig->mediumHealth;
}

bool CastCasterFormAction::Execute(Event event)
{
    botAI->RemoveShapeshift();
    return true;
}

So basically, the druid was triggering to heal/buff the party, and before it could do that, it had to switch into "caster form" which executed RemoveShapeshift(). After it did that, mounting back up into flight form/swift flight form had the highest priority, so it would loop the triggers/actions.
2025-07-27 01:10:31 -07:00
Spargel
66b326d79e Merge branch 'master' into master 2025-07-27 02:57:03 -05:00
Spargel
0d8e8fbd61 Second pass for adding 'healer dps' check based on map ID. Now works when teleporting in addition to on init. 2025-07-27 02:29:07 -05:00
kadeshar
66c88d4815 Merge pull request #1472 from liyunfan1223/drink_aura
Change drink aura (free food) to speed up
2025-07-27 08:53:09 +02:00
kadeshar
4c3906c243 Merge pull request #1468 from ThePenguinMan96/Mage-Overhaul
Mage Overhaul
2025-07-27 08:46:23 +02:00
Spargel
64b09fd3ca First pass for adding 'healer dps' check based on map ID. 2025-07-27 01:20:57 -05:00
NoxMax
db7a17ffde Fix: Properly track RNDbot and AddClass accounts, and login faction balance issue (#1434)
* AssignAccountTypes & AddRandomBots

Fix: Properly track RNDbot and AddClass accounts, and login faction balance issue

* code style edits

* fix addclass init on first build of playerbots_account_type
2025-07-27 14:13:20 +08:00
kadeshar
1e33b28abe - Added raid cheat to configuration to add posibility to turn off (#1465)
- Added General Vezax strategy
2025-07-27 13:51:45 +08:00
Yunfan Li
e59bad26c4 Change drink aura for free food 2025-07-27 11:36:43 +08:00
ThePenguinMan96
a632fa2194 Migrate important cooldowns over to BoostStrategy
This commit focuses on the changes requested - Migrate important cooldowns over to BoostStrategy.

Just tested it, and it is working fine - The player has more control over when they can boost. Also, added Mirror Image to the Boost Strategy, after other cooldowns are used - this way the mirror images get the buffs.
2025-07-26 13:06:41 -07:00
Alex Dcnh
c6005449e0 Update EquipGlyphsAction.cpp 2025-07-26 21:56:53 +02:00
Alex Dcnh
2aca50c1c7 Update ChatTriggerContext.h 2025-07-26 19:28:58 +02:00
Alex Dcnh
179e3bbf71 Update ChatCommandHandlerStrategy.cpp 2025-07-26 19:28:31 +02:00
Alex Dcnh
00b03bd29d Update ChatTriggerContext.h 2025-07-26 19:28:11 +02:00
Alex Dcnh
e62da73706 Update ChatCommandHandlerStrategy.cpp 2025-07-26 19:27:48 +02:00
Alex Dcnh
5108f709c7 Update ChatTriggerContext.h 2025-07-26 19:27:25 +02:00
Alex Dcnh
2beee4aec9 Update ChatCommandHandlerStrategy.cpp 2025-07-26 19:27:01 +02:00