Commit Graph

13 Commits

Author SHA1 Message Date
Keleborn
83c6977de5 Refactor guild managment into a singleton (#1913)
The idea is to centralize the creation, assignment, and management of
bot guilds into a single class that can be referenced.

The way this is intended to work.

when the manager is created, if the config option to delete guilds is
set, then it deletes all bot guilds.

On startup 
1. Load all guild names from database. Shuffle keys for some
randomization.
2. Load Guilds from database
3. For existing guilds, identify the guild faction, number of members,
and assess if the guild is 'full' based on the number of bots set in
config.
4. Determine if the leader of the guild is a real player based on the
leader account.
5. Mark any playerbot guild names as not available (false).

The validation process (2-5) is set to run once an hour. 

Guild Creation.
Now guild creation occurs on an as needed bases during the
initialization process. Previously, all of the guilds would be created
at once, and then randomly assigned.
When a bot is not in a guild during initialization, it will check if
there are any partially filled guilds of that bots faction where the bot
can be assigned to. If not, and the cache of bot guilds is less than the
set number in config, it will randomly return the available name. This
then goes to the CreateGuild function where the core guild manager
creates a guild, the guild emblem is set, and the cache updated.
If a bot is assigned to guild, but fails to join then it throws an
error.

Checking for real player guilds function now lives in the guild manager.

---------

Co-authored-by: bashermens <31279994+hermensbas@users.noreply.github.com>
2026-01-03 15:15:28 +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
bash
0cc15411c1 license update (#1674) 2025-09-30 15:19:44 +02:00
Yunfan Li
fbfcbbcddc EnablePeriodicOnlineOffline config and modify CalculateTotalAccountCount (#1043)
* EnablePeriodicOnlineOffline config

* Add Comments on PeriodicOnlineOfflineRatio
2025-03-01 21:05:43 +08:00
SaW
624e48068e Autocalc Accounts - take rotation into account (#971)
* Takes bot rotation into account and adjust accordingly when enabled as it requires to be higher than MaxRandomBots to function properly.
* Correct default config to reflect that bots pool size for rotation should be higher than MaxRandomBots
* Revert space at start of all lines.
2025-02-14 23:31:26 +01:00
bash
63e7b227d8 Loading the botnames from a cache 2024-08-21 18:11:19 +00:00
Christoph Wilk
a7a025ee58 Name Rework:
1. Arena Team & Guild Names: Edited/deleted/replaced many names by hand, removing potentially offensive names, grammatical inconsistency, faction-specific names (since there is no faction categorization), non-standard spelling, etc. After the rework there are 100 arena team names per bracket & 400 guild names, which is fewer than before, but should be enough.
2. Replaced the playerbot name list with 100k names (some overlap), split into 5k names per race and gender, with human & undead sharing the same pool of double size. Module code has been edited to assign created bots a name specific to their race.
3. Minor: Random race is now guaranteed to be assigned, removing the miniscule chance of failure in 15 attempts.
2024-08-13 20:21:00 +09:00
Yunfan Li
53611c9040 Run clang-format 2024-08-04 10:23:36 +08:00
mtm84
5a77ea5460 Update RandomPlayerbotFactory.h
code cleanup
2024-07-30 09:35:45 -07:00
mtm84
8ef7bcd8b5 Update RandomPlayerbotFactory.h
code cleanup
2024-07-30 09:22:06 -07:00
CrypticAvacado
5240a2d1ff Allow greater control of Arena team creation 2024-07-29 04:07:10 +12:00
郑佩茹
a7f412b428 Fix corrupt item cache crashes, bot whispers, trade crashes 2022-03-22 11:04:21 -06:00
UltraNix
b952636f0d Big update. 2022-03-12 22:27:09 +01:00