Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 16 additions & 28 deletions PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,46 +67,34 @@ Please answer the following:
## Complexity & Impact

Does this change add new decision branches?
```
[ ] No
[ ] Yes (**explain below**)
```
- - [ ] No
- - [ ] Yes (**explain below**)

Does this change increase per-bot or per-tick processing?
```
[ ] No
[ ] Yes (**describe and justify impact**)
```
- - [ ] No
- - [ ] Yes (**describe and justify impact**)

Could this logic scale poorly under load?
```
[ ] No
[ ] Yes (**explain why**)
```
- - [ ] No
- - [ ] Yes (**explain why**)
---

## Defaults & Configuration

Does this change modify default bot behavior?
```
[ ] No
[ ] Yes (**explain why**)
```
- - [ ] No
- - [ ] Yes (**explain why**)

If this introduces more advanced or AI-heavy logic:
```
[ ] Lightweight mode remains the default
[ ] More complex behavior is optional and thereby configurable
```
- - [ ] Lightweight mode remains the default
- - [ ] More complex behavior is optional and thereby configurable
---

## AI Assistance

Was AI assistance (e.g. ChatGPT or similar tools) used while working on this change?
```
[ ] No
[ ] Yes (**explain below**)
```
- - [ ] No
- - [ ] Yes (**explain below**)

If yes, please specify:

Expand All @@ -123,10 +111,10 @@ about what they do and do not understand.

## Final Checklist

- [ ] Stability is not compromised
- [ ] Performance impact is understood, tested, and acceptable
- [ ] Added logic complexity is justified and explained
- [ ] Documentation updated if needed
- - [ ] Stability is not compromised
- - [ ] Performance impact is understood, tested, and acceptable
- - [ ] Added logic complexity is justified and explained
- - [ ] Documentation updated if needed

---

Expand Down
2 changes: 1 addition & 1 deletion conf/playerbots.conf.dist
Original file line number Diff line number Diff line change
Expand Up @@ -990,7 +990,7 @@ AiPlayerbot.ZoneBracket.3433 = 10,22
AiPlayerbot.ZoneBracket.3525 = 10,21

# Classic WoW - High-level zones:
# Deadwind Pass (Zone ID: 10 Default Min,Max: 19,33)
# Duskwood (Zone ID: 10 Default Min,Max: 19,33)
# Wetlands (Zone ID: 11 Default Min,Max: 21,30)
# Redridge Mountains (Zone ID: 44 Default Min,Max: 16,28)
# Hillsbrad Foothills (Zone ID: 267 Default Min,Max: 20,34)
Expand Down
6 changes: 3 additions & 3 deletions src/Ai/Base/Actions/AcceptBattlegroundInvitationAction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
#include "AcceptBattlegroundInvitationAction.h"

#include "Event.h"
#include "Playerbots.h"
#include "PlayerbotAI.h"

bool AcceptBgInvitationAction::Execute(Event event)
bool AcceptBgInvitationAction::Execute(Event /*event*/)
{
uint8 type = 0; // arenatype if arena
uint8 unk2 = 0; // unk, can be 0x0 (may be if was invited?) and 0x1
Expand All @@ -18,9 +18,9 @@ bool AcceptBgInvitationAction::Execute(Event event)

WorldPacket packet(CMSG_BATTLEFIELD_PORT, 20);
packet << type << unk2 << (uint32)bgTypeId_ << unk << action;
// packet << bgTypeId_ << action;
bot->GetSession()->HandleBattleFieldPortOpcode(packet);

botAI->ResetStrategies();

return true;
}
2 changes: 1 addition & 1 deletion src/Ai/Base/Actions/AddLootAction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ bool AddLootAction::Execute(Event event)
return AI_VALUE(LootObjectStack*, "available loot")->Add(guid);
}

bool AddAllLootAction::Execute(Event event)
bool AddAllLootAction::Execute(Event /*event*/)
{
bool added = false;

Expand Down
2 changes: 1 addition & 1 deletion src/Ai/Base/Actions/AreaTriggerAction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ bool ReachAreaTriggerAction::Execute(Event event)
return true;
}

bool AreaTriggerAction::Execute(Event event)
bool AreaTriggerAction::Execute(Event /*event*/)
{
LastMovement& movement = context->GetValue<LastMovement&>("last area trigger")->Get();

Expand Down
7 changes: 4 additions & 3 deletions src/Ai/Base/Actions/AutoMaintenanceOnLevelupAction.cpp
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
#include "AutoMaintenanceOnLevelupAction.h"

#include "GuildMgr.h"
#include "SpellMgr.h"

#include "PlayerbotAIConfig.h"
#include "PlayerbotFactory.h"
#include "Playerbots.h"
#include "RandomPlayerbotMgr.h"
#include "SharedDefines.h"
#include "BroadcastHelper.h"

bool AutoMaintenanceOnLevelupAction::Execute(Event event)
bool AutoMaintenanceOnLevelupAction::Execute(Event /*event*/)
{
AutoPickTalents();
AutoLearnSpell();
AutoUpgradeEquip();
AutoTeleportForLevel();

return true;
}

Expand Down
9 changes: 4 additions & 5 deletions src/Ai/Base/Actions/BattleGroundJoinAction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,8 @@
#include "PlayerbotAI.h"
#include "Playerbots.h"
#include "PositionValue.h"
#include "UpdateTime.h"

bool BGJoinAction::Execute(Event event)
bool BGJoinAction::Execute(Event /*event*/)
{
uint32 queueType = AI_VALUE(uint32, "bg type");
if (!queueType) // force join to fill bg
Expand Down Expand Up @@ -653,7 +652,7 @@ bool FreeBGJoinAction::shouldJoinBg(BattlegroundQueueTypeId queueTypeId, Battleg
return false;
}

bool BGLeaveAction::Execute(Event event)
bool BGLeaveAction::Execute(Event /*event*/)
{
if (!(bot->InBattlegroundQueue() || bot->InBattleground()))
return false;
Expand Down Expand Up @@ -1064,7 +1063,7 @@ bool BGStatusAction::Execute(Event event)
return true;
}

bool BGStatusCheckAction::Execute(Event event)
bool BGStatusCheckAction::Execute(Event /*event*/)
{
if (bot->IsBeingTeleported())
return false;
Expand All @@ -1080,7 +1079,7 @@ bool BGStatusCheckAction::Execute(Event event)

bool BGStatusCheckAction::isUseful() { return bot->InBattlegroundQueue(); }

bool BGStrategyCheckAction::Execute(Event event)
bool BGStrategyCheckAction::Execute(Event /*event*/)
{
bool inside_bg = bot->InBattleground() && bot->GetBattleground();
;
Expand Down
4 changes: 2 additions & 2 deletions src/Ai/Base/Actions/BattleGroundTactics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1557,7 +1557,7 @@ bool BGTactics::eyJumpDown()
//
// actual bg tactics below
//
bool BGTactics::Execute(Event event)
bool BGTactics::Execute(Event /*event*/)
{
Battleground* bg = bot->GetBattleground();
if (!bg)
Expand Down Expand Up @@ -4249,7 +4249,7 @@ bool BGTactics::IsLockedInsideKeep()
return false;
}

bool ArenaTactics::Execute(Event event)
bool ArenaTactics::Execute(Event /*event*/)
{
if (!bot->InBattleground())
{
Expand Down
8 changes: 4 additions & 4 deletions src/Ai/Base/Actions/BossAuraActions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ bool BossFireResistanceAction::isUseful()
return bossFireResistanceTrigger.IsActive();
}

bool BossFireResistanceAction::Execute(Event event)
bool BossFireResistanceAction::Execute(Event /*event*/)
{
PaladinFireResistanceStrategy paladinFireResistanceStrategy(botAI);
botAI->ChangeStrategy(ADD_STRATEGY_CHAR + paladinFireResistanceStrategy.getName(), BotState::BOT_STATE_COMBAT);
Expand All @@ -32,7 +32,7 @@ bool BossFrostResistanceAction::isUseful()
return bossFrostResistanceTrigger.IsActive();
}

bool BossFrostResistanceAction::Execute(Event event)
bool BossFrostResistanceAction::Execute(Event /*event*/)
{
PaladinFrostResistanceStrategy paladinFrostResistanceStrategy(botAI);
botAI->ChangeStrategy(ADD_STRATEGY_CHAR + paladinFrostResistanceStrategy.getName(), BotState::BOT_STATE_COMBAT);
Expand All @@ -46,7 +46,7 @@ bool BossNatureResistanceAction::isUseful()
return bossNatureResistanceTrigger.IsActive();
}

bool BossNatureResistanceAction::Execute(Event event)
bool BossNatureResistanceAction::Execute(Event /*event*/)
{
HunterNatureResistanceStrategy hunterNatureResistanceStrategy(botAI);
botAI->ChangeStrategy(ADD_STRATEGY_CHAR + hunterNatureResistanceStrategy.getName(), BotState::BOT_STATE_COMBAT);
Expand All @@ -60,7 +60,7 @@ bool BossShadowResistanceAction::isUseful()
return bossShadowResistanceTrigger.IsActive();
}

bool BossShadowResistanceAction::Execute(Event event)
bool BossShadowResistanceAction::Execute(Event /*event*/)
{
PaladinShadowResistanceStrategy paladinShadowResistanceStrategy(botAI);
botAI->ChangeStrategy(ADD_STRATEGY_CHAR + paladinShadowResistanceStrategy.getName(), BotState::BOT_STATE_COMBAT);
Expand Down
4 changes: 3 additions & 1 deletion src/Ai/Base/Actions/CancelChannelAction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,14 @@
#include "Player.h"
#include "PlayerbotAI.h"

bool CancelChannelAction::Execute(Event event)
bool CancelChannelAction::Execute(Event /*event*/)
{
if (bot->GetCurrentSpell(CURRENT_CHANNELED_SPELL))
{
bot->InterruptSpell(CURRENT_CHANNELED_SPELL);

return true;
}

return false;
}
2 changes: 1 addition & 1 deletion src/Ai/Base/Actions/CastCustomSpellAction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ bool CastRandomSpellAction::castSpell(uint32 spellId, WorldObject* wo)
return botAI->CastSpell(spellId, wo->GetPositionX(), wo->GetPositionY(), wo->GetPositionZ());
}

bool DisEnchantRandomItemAction::Execute(Event event)
bool DisEnchantRandomItemAction::Execute(Event /*event*/)
{
std::vector<Item*> items =
AI_VALUE2(std::vector<Item*>, "inventory items", "usage " + std::to_string(ITEM_USAGE_DISENCHANT));
Expand Down
6 changes: 3 additions & 3 deletions src/Ai/Base/Actions/ChangeTalentsAction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
#include "Event.h"
#include "PlayerbotAIConfig.h"
#include "PlayerbotFactory.h"
#include "Playerbots.h"
#include "AiObjectContext.h"
#include "Log.h"
#include "RandomPlayerbotMgr.h"

bool ChangeTalentsAction::Execute(Event event)
{
Expand Down Expand Up @@ -368,11 +368,11 @@ std::string ChangeTalentsAction::SpecApply(std::string param)
// return nullptr;
// }

bool AutoSetTalentsAction::Execute(Event event)
bool AutoSetTalentsAction::Execute(Event /*event*/)
{
std::ostringstream out;

if (!sPlayerbotAIConfig.autoPickTalents || !sRandomPlayerbotMgr.IsRandomBot(bot))
if (!PlayerbotAIConfig::instance().autoPickTalents || !RandomPlayerbotMgr::instance().IsRandomBot(bot))
return false;

if (bot->GetFreeTalentPoints() <= 0)
Expand Down
18 changes: 9 additions & 9 deletions src/Ai/Base/Actions/ChatShortcutActions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ void PositionsResetAction::SetStayPosition(float x, float y, float z)
posMap["stay"] = pos;
}

bool FollowChatShortcutAction::Execute(Event event)
bool FollowChatShortcutAction::Execute(Event /*event*/)
{
Player* master = GetMaster();
if (!master)
Expand Down Expand Up @@ -116,7 +116,7 @@ bool FollowChatShortcutAction::Execute(Event event)
return true;
}

bool StayChatShortcutAction::Execute(Event event)
bool StayChatShortcutAction::Execute(Event /*event*/)
{
Player* master = GetMaster();
if (!master)
Expand All @@ -133,7 +133,7 @@ bool StayChatShortcutAction::Execute(Event event)
return true;
}

bool MoveFromGroupChatShortcutAction::Execute(Event event)
bool MoveFromGroupChatShortcutAction::Execute(Event /*event*/)
{
Player* master = GetMaster();
if (!master)
Expand All @@ -148,7 +148,7 @@ bool MoveFromGroupChatShortcutAction::Execute(Event event)
return true;
}

bool FleeChatShortcutAction::Execute(Event event)
bool FleeChatShortcutAction::Execute(Event /*event*/)
{
Player* master = GetMaster();
if (!master)
Expand All @@ -171,7 +171,7 @@ bool FleeChatShortcutAction::Execute(Event event)
return true;
}

bool GoawayChatShortcutAction::Execute(Event event)
bool GoawayChatShortcutAction::Execute(Event /*event*/)
{
Player* master = GetMaster();
if (!master)
Expand All @@ -188,7 +188,7 @@ bool GoawayChatShortcutAction::Execute(Event event)
return true;
}

bool GrindChatShortcutAction::Execute(Event event)
bool GrindChatShortcutAction::Execute(Event /*event*/)
{
Player* master = GetMaster();
if (!master)
Expand All @@ -204,7 +204,7 @@ bool GrindChatShortcutAction::Execute(Event event)
return true;
}

bool TankAttackChatShortcutAction::Execute(Event event)
bool TankAttackChatShortcutAction::Execute(Event /*event*/)
{
Player* master = GetMaster();
if (!master)
Expand All @@ -224,7 +224,7 @@ bool TankAttackChatShortcutAction::Execute(Event event)
return true;
}

bool MaxDpsChatShortcutAction::Execute(Event event)
bool MaxDpsChatShortcutAction::Execute(Event /*event*/)
{
Player* master = GetMaster();
if (!master)
Expand All @@ -241,7 +241,7 @@ bool MaxDpsChatShortcutAction::Execute(Event event)
return true;
}

bool BwlChatShortcutAction::Execute(Event event)
bool BwlChatShortcutAction::Execute(Event /*event*/)
{
Player* master = GetMaster();
if (!master)
Expand Down
7 changes: 4 additions & 3 deletions src/Ai/Base/Actions/CheckMailAction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@

#include "Event.h"
#include "GuildTaskMgr.h"
#include "Playerbots.h"
#include "PlayerbotAIConfig.h"
#include "PlayerbotAI.h"

bool CheckMailAction::Execute(Event event)
bool CheckMailAction::Execute(Event /*event*/)
{
WorldPacket p;
bot->GetSession()->HandleQueryNextMailTime(p);
Expand All @@ -28,7 +29,7 @@ bool CheckMailAction::Execute(Event event)
continue;

uint32 account = owner->GetSession()->GetAccountId();
if (sPlayerbotAIConfig.IsInRandomAccountList(account))
if (PlayerbotAIConfig::instance().IsInRandomAccountList(account))
continue;

ProcessMail(mail, owner, trans);
Expand Down
Loading
Loading