mirror of
https://github.com/mod-playerbots/mod-playerbots.git
synced 2026-01-13 09:07:19 +00:00
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.
67 lines
1.6 KiB
C++
67 lines
1.6 KiB
C++
/*
|
|
* Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU GPL v2 license, you may redistribute it
|
|
* and/or modify it under version 2 of the License, or (at your option), any later version.
|
|
*/
|
|
|
|
#ifndef _PLAYERBOT_RANDOMPLAYERBOTFACTORY_H
|
|
#define _PLAYERBOT_RANDOMPLAYERBOTFACTORY_H
|
|
|
|
#include <map>
|
|
#include <unordered_map>
|
|
#include <vector>
|
|
|
|
#include "Common.h"
|
|
#include "DBCEnums.h"
|
|
|
|
class Player;
|
|
class WorldSession;
|
|
|
|
enum ArenaType : uint8;
|
|
|
|
class RandomPlayerbotFactory
|
|
{
|
|
public:
|
|
enum class NameRaceAndGender : uint8
|
|
{
|
|
// Generic is the category used for human & undead
|
|
GenericMale = 0,
|
|
GenericFemale,
|
|
GnomeMale,
|
|
GnomeFemale,
|
|
DwarfMale,
|
|
DwarfFemale,
|
|
NightelfMale,
|
|
NightelfFemale,
|
|
DraeneiMale,
|
|
DraeneiFemale,
|
|
OrcMale,
|
|
OrcFemale,
|
|
TrollMale,
|
|
TrollFemale,
|
|
TaurenMale,
|
|
TaurenFemale,
|
|
BloodelfMale,
|
|
BloodelfFemale
|
|
};
|
|
|
|
static constexpr NameRaceAndGender CombineRaceAndGender(uint8 gender, uint8 race);
|
|
|
|
RandomPlayerbotFactory(uint32 accountId);
|
|
virtual ~RandomPlayerbotFactory() {}
|
|
|
|
Player* CreateRandomBot(WorldSession* session, uint8 cls);
|
|
static void CreateRandomBots();
|
|
static void CreateRandomGuilds();
|
|
static void CreateRandomArenaTeams(ArenaType slot, uint32 count);
|
|
static std::string const CreateRandomGuildName();
|
|
|
|
private:
|
|
std::string const CreateRandomBotName(NameRaceAndGender raceAndGender);
|
|
static std::string const CreateRandomArenaTeamName();
|
|
|
|
uint32 accountId;
|
|
static std::map<uint8, std::vector<uint8>> availableRaces;
|
|
};
|
|
|
|
#endif
|