67#include <boost/circular_buffer.hpp>
403 stmt =
CharacterDatabase.GetPreparedStatement(statements[isDeletedCharacters ? 1 : 0][2]);
426 std::unordered_map<ObjectGuid::LowType, std::vector<UF::ChrCustomizationChoice>> customizations;
431 Field* fields = customizationsResult->Fetch();
436 }
while (customizationsResult->NextRow());
443 charEnum.
Characters.emplace_back(result->Fetch());
456 TC_LOG_ERROR(
"entities.player.loading",
"Player {} has wrong Appearance values (Hair/Skin/Color), forcing recustomize", charInfo.
Guid.
ToString());
483 for (std::pair<uint8 const, RaceUnlockRequirement>
const& requirement :
sObjectMgr->GetRaceUnlockRequirements())
486 raceUnlock.
RaceID = requirement.first;
507 std::shared_ptr<EnumCharactersQueryHolder> holder = std::make_shared<EnumCharactersQueryHolder>();
523 std::shared_ptr<EnumCharactersQueryHolder> holder = std::make_shared<EnumCharactersQueryHolder>();
563 if (checkRequiredDependentChoices)
565 if (std::vector<std::pair<
uint32, std::vector<uint32>>>
const* requiredChoices =
sDB2Manager.GetRequiredCustomizationChoices(req->
ID))
567 for (
auto const& [chrCustomizationOptionId, requiredChoicesForOption] : *requiredChoices)
569 bool hasRequiredChoiceForOption =
false;
570 for (
uint32 requiredChoice : requiredChoicesForOption)
574 return choice.ChrCustomizationChoiceID == requiredChoice;
577 if (choiceItr != selectedChoices.
end())
579 hasRequiredChoiceForOption =
true;
584 if (!hasRequiredChoiceForOption)
595 std::vector<ChrCustomizationOptionEntry const*>
const* options =
sDB2Manager.GetCustomiztionOptions(race, gender);
599 uint32 previousOption = 0;
604 if (playerChoice.ChrCustomizationOptionID == previousOption)
607 previousOption = playerChoice.ChrCustomizationOptionID;
612 return option->ID == playerChoice.ChrCustomizationOptionID;
616 if (customizationOptionDataItr == options->end())
623 std::vector<ChrCustomizationChoiceEntry const*>
const* choicesForOption =
sDB2Manager.GetCustomiztionChoices(playerChoice.ChrCustomizationOptionID);
624 if (!choicesForOption)
627 auto customizationChoiceDataItr = std::find_if(choicesForOption->begin(), choicesForOption->end(), [&](
ChrCustomizationChoiceEntry const* choice)
629 return choice->ID == playerChoice.ChrCustomizationChoiceID;
633 if (customizationChoiceDataItr == choicesForOption->end())
650 bool disabled =
false;
655 disabled = (mask & (1 << 0)) != 0;
658 disabled = (mask & (1 << 1)) != 0;
661 disabled = (mask & (1 << 2)) != 0;
676 TC_LOG_ERROR(
"network",
"Class ({}) not found in DBC while creating new char for account (ID: {}): wrong DBC files or cheater?", charCreate.
CreateInfo->Class,
GetAccountId());
684 TC_LOG_ERROR(
"network",
"Race ({}) not found in DBC while creating new char for account (ID: {}): wrong DBC files or cheater?", charCreate.
CreateInfo->Race,
GetAccountId());
691 if (!raceExpansionRequirement)
700 TC_LOG_ERROR(
"entities.player.cheat",
"Expansion {} account:[{}] tried to Create character with expansion {} race ({})",
717 if (raceClassExpansionRequirement->ActiveExpansionLevel >
GetExpansion() || raceClassExpansionRequirement->AccountExpansionLevel >
GetAccountExpansion())
719 TC_LOG_ERROR(
"entities.player.cheat",
"Account:[{}] tried to create character with race/class {}/{} without required expansion (had {}/{}, required {}/{})",
721 raceClassExpansionRequirement->ActiveExpansionLevel, raceClassExpansionRequirement->AccountExpansionLevel);
730 TC_LOG_ERROR(
"entities.player.cheat",
"Account:[{}] tried to create character with race/class {}/{} without required expansion (had {}/{}, required {}/{})",
732 classExpansionRequirement->ActiveExpansionLevel, classExpansionRequirement->AccountExpansionLevel);
739 TC_LOG_ERROR(
"entities.player.cheat",
"Expansion {} account:[{}] tried to Create character for race/class combination that is missing requirements in db ({}/{})",
749 TC_LOG_ERROR(
"network",
"Race ({}) was not playable but requested while creating new char for account (ID: {}): wrong DBC files or cheater?", charCreate.
CreateInfo->Race,
GetAccountId());
755 if (raceMaskDisabled.HasRace(charCreate.
CreateInfo->Race))
765 if ((1 << (charCreate.
CreateInfo->Class - 1)) & classMaskDisabled)
775 TC_LOG_ERROR(
"entities.player.cheat",
"Account:[{}] but tried to Create character with empty [name] ",
GetAccountId());
794 if (charCreate.
CreateInfo->TimerunningSeasonID)
800 std::shared_ptr<WorldPackets::Character::CharacterCreateInfo> createInfo = charCreate.
CreateInfo;
809 SendCharCreate(CHAR_CREATE_NAME_IN_USE);
822 Field* fields = result->Fetch();
823 acctCharCount =
uint64(fields[0].GetDouble());
840 Field* fields = result->Fetch();
841 createInfo->CharCount =
uint8(fields[0].GetUInt64());
855 bool haveSameRace =
false;
857 bool hasDemonHunterReqLevel = (demonHunterReqLevel == 0);
859 bool hasEvokerReqLevel = (evokerReqLevel == 0);
865 bool hasEvokerLimit = evokerLimit != 0;
871 Field* field = result->Fetch();
875 if (checkClassLevelReqs)
877 if (!hasDemonHunterReqLevel)
880 if (accLevel >= demonHunterReqLevel)
881 hasDemonHunterReqLevel =
true;
883 if (!hasEvokerReqLevel)
886 if (accLevel >= evokerReqLevel)
887 hasEvokerReqLevel =
true;
896 if (!allowTwoSideAccounts)
913 if (!result->NextRow())
916 field = result->Fetch();
921 haveSameRace = createInfo->Race == accRace;
923 if (checkClassLevelReqs)
925 if (!hasDemonHunterReqLevel)
928 if (accLevel >= demonHunterReqLevel)
929 hasDemonHunterReqLevel =
true;
931 if (!hasEvokerReqLevel)
934 if (accLevel >= evokerReqLevel)
935 hasEvokerReqLevel =
true;
944 if (checkClassLevelReqs)
946 if (!hasDemonHunterReqLevel)
951 if (!hasEvokerReqLevel)
958 if (createInfo->Class ==
CLASS_EVOKER && hasEvokerLimit && evokerLimit < 1)
971 std::shared_ptr<Player> newChar(
new Player(
this), [](
Player* ptr)
976 newChar->GetMotionMaster()->Initialize();
984 if ((haveSameRace && skipCinematics == 1) || skipCinematics == 2)
985 newChar->setCinematic(1);
993 newChar->SaveToDB(trans, characterTransaction,
true);
994 createInfo->CharCount += 1;
997 stmt->
setUInt32(0, createInfo->CharCount);
1000 trans->Append(stmt);
1002 AddTransactionCallback(
CharacterDatabase.AsyncCommitTransaction(characterTransaction)).AfterComplete([
this, newChar = std::move(newChar), trans](
bool success)
1008 TC_LOG_INFO(
"entities.player.character",
"Account: {} (IP: {}) Create Character: {} {}", GetAccountId(), GetRemoteAddress(), newChar->GetName(), newChar->GetGUID().ToString());
1010 sCharacterCache->AddCharacterCacheEntry(newChar->GetGUID(), GetAccountId(), newChar->GetName(), newChar->GetNativeGender(), newChar->GetRace(), newChar->GetClass(), newChar->GetLevel(),
false);
1019 if (allowTwoSideAccounts && !skipCinematics && createInfo->Class !=
CLASS_DEMON_HUNTER)
1040 sScriptMgr->OnPlayerFailedDelete(charDelete.
Guid, initAccountId);
1047 sScriptMgr->OnPlayerFailedDelete(charDelete.
Guid, initAccountId);
1055 sScriptMgr->OnPlayerFailedDelete(charDelete.
Guid, initAccountId);
1063 sScriptMgr->OnPlayerFailedDelete(charDelete.
Guid, initAccountId);
1068 std::string name = characterInfo->
Name;
1072 if (accountId != initAccountId)
1074 sScriptMgr->OnPlayerFailedDelete(charDelete.
Guid, initAccountId);
1102 KickPlayer(
"WorldSession::HandlePlayerLoginOpcode Another client logging in");
1113 KickPlayer(
"WorldSession::HandlePlayerLoginOpcode Trying to login with a character of another account");
1124 KickPlayer(
"WorldSession::HandleContinuePlayerLogin incorrect player state when logging in");
1129 if (!holder->Initialize())
1150 KickPlayer(
"WorldSession::AbortLogin incorrect player state when logging in");
1172 if (!pCurrChar->
LoadFromDB(playerGuid, holder))
1175 KickPlayer(
"WorldSession::HandlePlayerLogin Player::LoadFromDB failed");
1235 Field* fields = resultGuild->Fetch();
1236 pCurrChar->
SetInGuild(fields[0].GetUInt64());
1264 if (playerInfo->introMovieId)
1266 else if (playerInfo->introSceneId)
1274 if (playerInfo->introSceneIdNPE)
1283 if (!
sWorld->GetNewCharString().empty())
1301 guild->SendLoginInfo(
this);
1328 group->SendUpdate();
1329 if (group->GetLeaderGUID() == pCurrChar->
GetGUID())
1330 group->StopLeaderOfflineTimer();
1344 pCurrChar->
CastSpell(pCurrChar, 20584,
true);
1346 if (!pCurrChar->
HasAura(8326))
1347 pCurrChar->
CastSpell(pCurrChar, 8326,
true);
1404 pCurrChar->
CastSpell(pCurrChar, spellId,
true);
1479 if (
sWorld->IsShuttingDown())
1480 sWorld->ShutdownMsg(
true, pCurrChar);
1488 TC_LOG_INFO(
"entities.player.character",
"Account: {} (IP: {}) Login Character: [{}] {} Level: {}, XP: {}/{} ({} left)",
1505 sScriptMgr->OnPlayerLogin(pCurrChar, firstLogin);
1553 std::visit([&]<
typename T>(T value)
1555 if constexpr (std::is_same_v<T, float>)
1609 TC_LOG_ERROR(
"network",
"CMSG_TUTORIAL_FLAG received unknown TutorialAction {}.", packet.
Action);
1654 SendPacket(WorldPackets::Character::CheckCharacterNameAvailabilityResult(sequenceIndex, result ? CHAR_CREATE_NAME_IN_USE : RESPONSE_SUCCESS).Write());
1662 TC_LOG_ERROR(
"network",
"Account {}, IP: {} tried to rename character {}, but it does not belong to their account!",
1664 KickPlayer(
"WorldSession::HandleCharRenameOpcode rename character from a different account");
1697 HandleCharRenameCallBack(std::move(renameInfo), std::move(result));
1709 Field* fields = result->Fetch();
1711 std::string oldName = fields[0].
GetString();
1720 atLoginFlags &= ~AT_LOGIN_RENAME;
1727 stmt->
setString(0, renameInfo->NewName);
1731 trans->Append(stmt);
1737 trans->Append(stmt);
1741 TC_LOG_INFO(
"entities.player.character",
"Account: {} (IP: {}) Character:[{}] ({}) Changed name to: {}",
1746 sCharacterCache->UpdateCharacterData(renameInfo->Guid, renameInfo->NewName);
1794 trans->Append(stmt);
1802 trans->Append(stmt);
1815 if (!conditionalChrModel)
1878 TC_LOG_ERROR(
"entities.player.cheat",
"Account {}, IP: {} tried to customise {}, but it does not belong to their account!",
1880 KickPlayer(
"WorldSession::HandleCharCustomize Trying to customise character of another account");
1890 HandleCharCustomizeCallback(std::move(customizeInfo), std::move(result));
1902 Field* fields = result->Fetch();
1904 std::string oldName = fields[0].
GetString();
1929 atLoginFlags &= ~AT_LOGIN_CUSTOMIZE;
1957 if (newGuid != customizeInfo->CharGUID)
1975 stmt->
setString(0, customizeInfo->CharName);
1979 trans->Append(stmt);
1984 trans->Append(stmt);
1989 sCharacterCache->UpdateCharacterData(customizeInfo->CharGUID, customizeInfo->CharName, customizeInfo->SexID);
1993 TC_LOG_INFO(
"entities.player.character",
"Account: {} (IP: {}), Character[{}] ({}) Customized to: {}",
2023 if (item->
GetGUID() != itemGuid)
2060 auto validateIllusion = [
this](
uint32 enchantId) ->
bool
2093 ignoredItemGuid.
SetRawValue(0x0C00040000000000, 0xFFFFFFFFFFFFFFFF);
2100 if (useEquipmentSet.
Items[i].
Item == ignoredItemGuid)
2132 if (item->
GetPos() == dstPos)
2142 result.
GUID = useEquipmentSet.
GUID;
2151 TC_LOG_ERROR(
"entities.player.cheat",
"Account {}, IP: {} tried to factionchange character {}, but it does not belong to their account!",
2153 KickPlayer(
"WorldSession::HandleCharFactionOrRaceChange Trying to change faction of character of another account");
2163 HandleCharRaceOrFactionChangeCallback(std::move(factionChangeInfo), std::move(result));
2183 std::string oldName = characterInfo->
Name;
2188 if (!
sObjectMgr->GetPlayerInfo(factionChangeInfo->RaceID, playerClass))
2194 Field* fields = result->Fetch();
2196 std::string knownTitlesStr = fields[1].
GetString();
2200 if (!(atLoginFlags & usedLoginFlag))
2222 if (raceMaskDisabled.HasRace(factionChangeInfo->RaceID))
2261 if (newGuid != factionChangeInfo->Guid)
2268 if (
sArenaTeamMgr->GetArenaTeamByCaptain(factionChangeInfo->Guid))
2288 stmt->
setString(0, factionChangeInfo->Name);
2292 trans->Append(stmt);
2297 trans->Append(stmt);
2306 stmt->
setUInt8(0, factionChangeInfo->RaceID);
2310 trans->Append(stmt);
2313 sCharacterCache->UpdateCharacterData(factionChangeInfo->Guid, factionChangeInfo->Name, factionChangeInfo->SexID, factionChangeInfo->RaceID);
2315 if (oldRace != factionChangeInfo->RaceID)
2321 trans->Append(stmt);
2333 trans->Append(stmt);
2342 switch (factionChangeInfo->RaceID)
2404 TC_LOG_ERROR(
"entities.player",
"Could not find language data for race ({}).", factionChangeInfo->RaceID);
2409 trans->Append(stmt);
2413 if (factionChangeInfo->FactionChange)
2418 trans->Append(stmt);
2424 std::ostringstream taximaskstream;
2426 for (std::size_t i = 0; i < factionMask.
size(); ++i)
2431 taximaskstream <<
uint32(factionMask[i] | deathKnightExtraNode) <<
' ';
2435 stmt->
setString(0, taximaskstream.str());
2437 trans->Append(stmt);
2444 guild->DeleteMember(trans, factionChangeInfo->Guid,
false,
false);
2452 group->RemoveMember(factionChangeInfo->Guid);
2460 trans->Append(stmt);
2464 trans->Append(stmt);
2470 trans->Append(stmt);
2493 trans->Append(stmt);
2498 for (
auto [achiev_alliance, achiev_horde] :
sObjectMgr->FactionChangeAchievements)
2503 trans->Append(stmt);
2509 trans->Append(stmt);
2514 ?
sObjectMgr->FactionChangeItemsHordeToAlliance
2515 :
sObjectMgr->FactionChangeItemsAllianceToHorde;
2516 for (
auto [oldItemId, newItemId] : itemConversionMap)
2522 trans->Append(stmt);
2528 trans->Append(stmt);
2531 for (
auto [quest_alliance, quest_horde] :
sObjectMgr->FactionChangeQuests)
2536 trans->Append(stmt);
2542 trans->Append(stmt);
2548 trans->Append(stmt);
2553 for (
auto const& [questId, quest] : questTemplates)
2556 ? RACEMASK_ALLIANCE_v<std::array<int32, 2>>
2557 : RACEMASK_HORDE_v<std::array<int32, 2>>;
2558 if (quest->GetAllowableRaces() != RACEMASK_ALL_v<std::array<int32, 2>> && (quest->GetAllowableRaces() & newRaceMask).IsEmpty())
2563 trans->Append(stmt);
2569 for (
auto [spell_alliance, spell_horde] :
sObjectMgr->FactionChangeSpells)
2574 trans->Append(stmt);
2580 trans->Append(stmt);
2584 for (
auto [reputation_alliance, reputation_horde] :
sObjectMgr->FactionChangeReputation)
2586 uint32 newReputation = (newTeamId ==
TEAM_ALLIANCE) ? reputation_alliance : reputation_horde;
2587 uint32 oldReputation = (newTeamId ==
TEAM_ALLIANCE) ? reputation_horde : reputation_alliance;
2596 fields = reputationResult->Fetch();
2601 int32 oldBaseRep =
sObjectMgr->GetBaseReputationOf(factionEntry, oldRace, playerClass);
2607 int32 FinalRep = oldDBRep + oldBaseRep;
2608 int32 newDBRep = FinalRep - newBaseRep;
2613 trans->Append(stmt);
2620 trans->Append(stmt);
2625 if (!knownTitlesStr.empty())
2627 std::vector<std::string_view> tokens =
Trinity::Tokenize(knownTitlesStr,
' ',
false);
2628 std::vector<uint32> knownTitles;
2630 for (std::string_view token : tokens)
2633 knownTitles.push_back(*thisMask);
2636 TC_LOG_WARN(
"entities.player",
"{} has invalid title data '{}' - skipped, this may result in titles being lost",
2638 knownTitles.push_back(0);
2642 for (
auto [title_alliance, title_horde] :
sObjectMgr->FactionChangeTitles)
2650 uint32 index = bitIndex / 32;
2651 if (index >= knownTitles.size())
2654 uint32 old_flag = 1 << (bitIndex % 32);
2656 if (knownTitles[index] & old_flag)
2658 knownTitles[index] &= ~old_flag;
2660 knownTitles[atitleInfo->
MaskID / 32] |= new_flag;
2666 uint32 index = bitIndex / 32;
2667 if (index >= knownTitles.size())
2670 uint32 old_flag = 1 << (bitIndex % 32);
2672 if (knownTitles[index] & old_flag)
2674 knownTitles[index] &= ~old_flag;
2676 knownTitles[htitleInfo->
MaskID / 32] |= new_flag;
2680 std::ostringstream ss;
2681 for (
uint32 mask : knownTitles)
2687 trans->Append(stmt);
2692 trans->Append(stmt);
2733 stmt->
setUInt8(0, reorderInfo.NewPosition);
2734 stmt->
setUInt64(1, reorderInfo.PlayerGUID.GetCounter());
2736 trans->Append(stmt);
2750 if (classEntry->CinematicSequenceID)
2764 HandleUndeleteCooldownStatusCallback(std::move(result));
2774 uint32 lastUndelete = result->Fetch()[0].GetUInt32();
2776 if (lastUndelete + maxCooldown > now)
2777 cooldown = std::max<uint32>(0, lastUndelete + maxCooldown - now);
2794 std::shared_ptr<WorldPackets::Character::CharacterUndeleteInfo> undeleteInfo = undeleteCharacter.
UndeleteInfo;
2800 uint32 lastUndelete = result->Fetch()[0].GetUInt32();
2801 uint32 maxCooldown = sWorld->getIntConfig(CONFIG_FEATURE_SYSTEM_CHARACTER_UNDELETE_COOLDOWN);
2802 if (lastUndelete && (lastUndelete + maxCooldown > GameTime::GetGameTime()))
2804 SendUndeleteCharacterResponse(CHARACTER_UNDELETE_RESULT_ERROR_COOLDOWN, undeleteInfo.get());
2810 stmt->
setUInt64(0, undeleteInfo->CharacterGuid.GetCounter());
2821 Field* fields = result->Fetch();
2822 undeleteInfo->Name = fields[1].
GetString();
2825 if (account != GetAccountId())
2857 Field* fields = result->Fetch();
2869 stmt->
setUInt64(2, undeleteInfo->CharacterGuid.GetCounter());
2873 loginStmt->
setUInt32(0, GetBattlenetAccountId());
2876 sCharacterCache->UpdateCharacterInfoDeleted(undeleteInfo->CharacterGuid,
false, undeleteInfo->Name);
2908 response.
Code = result;
2909 response.
Guid = guid;
2917 response.
Code = result;
2953 packet.
Guid = factionChangeInfo->
Guid;
2990 response.
Result = result;
CharacterDatabaseStatements
@ CHAR_SEL_CHARACTER_GARRISON_BUILDINGS
@ CHAR_SEL_CHAR_CUSTOMIZE_INFO
@ CHAR_DEL_CHAR_SOCIAL_BY_FRIEND
@ CHAR_SEL_CHAR_TRAIT_CONFIGS
@ CHAR_UPD_CHAR_INVENTORY_FACTION_CHANGE
@ CHAR_SEL_CHARACTER_PVP_TALENTS
@ CHAR_SEL_CHARACTER_TRANSMOG_OUTFIT_SLOT
@ CHAR_DEL_CHAR_QUESTSTATUS_REWARDED_BY_QUEST
@ CHAR_SEL_PLAYER_CURRENCY
@ CHAR_SEL_CHARACTER_QUESTSTATUS_OBJECTIVES_CRITERIA_PROGRESS
@ CHAR_SEL_CHARACTER_QUESTSTATUSREW
@ CHAR_SEL_PLAYER_ACCOUNT_DATA
@ CHAR_UPD_CHAR_QUESTSTATUS_REWARDED_FACTION_CHANGE
@ CHAR_SEL_CHARACTER_QUESTSTATUS_OBJECTIVES_SPAWN_TRACKING
@ CHAR_DEL_CHAR_SKILL_LANGUAGES
@ CHAR_SEL_CHARACTER_GARRISON
@ CHAR_SEL_CHARACTER_AURAS
@ CHAR_SEL_MAILITEMS_AZERITE
@ CHAR_SEL_ACCOUNT_INSTANCELOCKTIMES
@ CHAR_UPD_CHAR_ACHIEVEMENT
@ CHAR_SEL_CHARACTER_QUESTSTATUS_OBJECTIVES_CRITERIA
@ CHAR_DEL_CHAR_DECLINED_NAME
@ CHAR_SEL_MAILITEMS_AZERITE_MILESTONE_POWER
@ CHAR_SEL_MAILITEMS_AZERITE_UNLOCKED_ESSENCE
@ CHAR_SEL_CHAR_RACE_OR_FACTION_CHANGE_INFOS
@ CHAR_SEL_CHARACTER_QUESTSTATUS_MONTHLY
@ CHAR_INS_PLAYER_HOMEBIND
@ CHAR_INS_CHAR_SKILL_LANGUAGE
@ CHAR_SEL_CHARACTER_BANK_TAB_SETTINGS
@ CHAR_SEL_CHARACTER_BGDATA
@ CHAR_SEL_CHARACTER_SOCIALLIST
@ CHAR_SEL_PLAYER_DATA_ELEMENTS_CHARACTER
@ CHAR_UPD_CHAR_SPELL_FACTION_CHANGE
@ CHAR_UPD_CHAR_TAXI_PATH
@ CHAR_DEL_ALL_PET_SPELLS_BY_OWNER
@ CHAR_SEL_CHAR_TRAIT_ENTRIES
@ CHAR_SEL_CHARACTER_QUESTSTATUS_WEEKLY
@ CHAR_DEL_PLAYER_HOMEBIND
@ CHAR_SEL_ITEM_INSTANCE_AZERITE_UNLOCKED_ESSENCE
@ CHAR_SEL_ENUM_CUSTOMIZATIONS
@ CHAR_SEL_CHARACTER_GARRISON_FOLLOWER_ABILITIES
@ CHAR_SEL_ITEM_INSTANCE_AZERITE_EMPOWERED
@ CHAR_SEL_CHAR_REP_BY_FACTION
@ CHAR_SEL_CHARACTER_HOMEBIND
@ CHAR_SEL_UNDELETE_ENUM_DECLINED_NAME
@ CHAR_UPD_CHAR_LIST_SLOT
@ CHAR_SEL_ITEM_INSTANCE_AZERITE_MILESTONE_POWER
@ CHAR_DEL_CHAR_SPELL_BY_SPELL
@ CHAR_SEL_CHAR_CREATE_INFO
@ CHAR_SEL_CHARACTER_INVENTORY
@ CHAR_UPD_CHAR_QUESTSTATUS_REWARDED_ACTIVE_BY_QUEST
@ CHAR_UPD_PET_SPECS_BY_OWNER
@ CHAR_SEL_MAILITEMS_ARTIFACT
@ CHAR_SEL_CHARACTER_QUESTSTATUS
@ CHAR_SEL_CHAR_DEL_INFO_BY_GUID
@ CHAR_DEL_CHAR_ACHIEVEMENT_BY_ACHIEVEMENT
@ CHAR_SEL_CHARACTER_TALENTS
@ CHAR_SEL_CHAR_CUF_PROFILES
@ CHAR_SEL_CHARACTER_SPELL_FAVORITES
@ CHAR_SEL_CORPSE_LOCATION
@ CHAR_SEL_CHARACTER_CRITERIAPROGRESS
@ CHAR_SEL_CHARACTER_GLYPHS
@ CHAR_SEL_CHARACTER_REPUTATION
@ CHAR_DEL_CHAR_QUESTSTATUS
@ CHAR_SEL_CHARACTER_SPELL
@ CHAR_UPD_CHAR_REP_FACTION_CHANGE
@ CHAR_SEL_CHARACTER_QUESTSTATUS_SEASONAL
@ CHAR_SEL_CHARACTER_RANDOMBG
@ CHAR_SEL_CHARACTER_EQUIPMENTSETS
@ CHAR_SEL_CHARACTER_SKILLS
@ CHAR_SEL_CHARACTER_QUESTSTATUS_DAILY
@ CHAR_UPD_CHAR_TITLES_FACTION_CHANGE
@ CHAR_DEL_CHAR_REP_BY_FACTION
@ CHAR_SEL_PLAYER_DATA_FLAGS_CHARACTER
@ CHAR_SEL_ENUM_DECLINED_NAME
@ CHAR_SEL_CHARACTER_SPELLCOOLDOWNS
@ CHAR_UPD_ADD_AT_LOGIN_FLAG
@ CHAR_RES_CHAR_TITLES_FACTION_CHANGE
@ CHAR_SEL_CHARACTER_AURA_STORED_LOCATIONS
@ CHAR_SEL_CHARACTER_TRANSMOG_OUTFITS
@ CHAR_SEL_UNDELETE_ENUM_CUSTOMIZATIONS
@ CHAR_SEL_CHARACTER_GARRISON_BLUEPRINTS
@ CHAR_SEL_CHARACTER_TRANSMOG_OUTFIT
@ CHAR_SEL_ITEM_INSTANCE_AZERITE
@ CHAR_SEL_CHARACTER_SPELL_CHARGES
@ CHAR_SEL_CHARACTER_AURA_EFFECTS
@ CHAR_UPD_CHAR_QUESTSTATUS_REWARDED_ACTIVE
@ CHAR_DEL_CHAR_SOCIAL_BY_GUID
@ CHAR_SEL_CHARACTER_TRANSMOG_OUTFIT_SITUATION
@ CHAR_SEL_CHARACTER_ACHIEVEMENTS
@ CHAR_SEL_MAILITEMS_AZERITE_EMPOWERED
@ CHAR_SEL_CHARACTER_QUESTSTATUS_OBJECTIVES
@ CHAR_SEL_CHARACTER_GARRISON_FOLLOWERS
@ CHAR_UPD_RESTORE_DELETE_INFO
@ CHAR_SEL_ITEM_INSTANCE_ARTIFACT
@ CHAR_SEL_CHARACTER_DECLINEDNAMES
@ CHAR_SEL_CHARACTER_ARENAINFO
@ CHAR_UPD_CHAR_NAME_AT_LOGIN
@ CHAR_INS_CHAR_DECLINED_NAME
@ CHAR_SEL_CHARACTER_BANNED
@ CHAR_SEL_CHARACTER_CUSTOMIZATIONS
TaxiMask sAllianceTaxiNodesMask
DB2Storage< ChrClassesEntry > sChrClassesStore("ChrClasses.db2", &ChrClassesLoadInfo::Instance)
DB2Storage< CharTitlesEntry > sCharTitlesStore("CharTitles.db2", &CharTitlesLoadInfo::Instance)
DB2Storage< ItemModifiedAppearanceEntry > sItemModifiedAppearanceStore("ItemModifiedAppearance.db2", &ItemModifiedAppearanceLoadInfo::Instance)
DB2Storage< ChrRacesEntry > sChrRacesStore("ChrRaces.db2", &ChrRacesLoadInfo::Instance)
DB2Storage< ChrCustomizationReqEntry > sChrCustomizationReqStore("ChrCustomizationReq.db2", &ChrCustomizationReqLoadInfo::Instance)
DB2Storage< SpellItemEnchantmentEntry > sSpellItemEnchantmentStore("SpellItemEnchantment.db2", &SpellItemEnchantmentLoadInfo::Instance)
DB2Storage< FactionEntry > sFactionStore("Faction.db2", &FactionLoadInfo::Instance)
TaxiMask sHordeTaxiNodesMask
constexpr size_t PLAYER_EXPLORED_ZONES_SIZE
SQLTransaction< CharacterDatabaseConnection > CharacterDatabaseTransaction
SQLTransaction< LoginDatabaseConnection > LoginDatabaseTransaction
std::shared_ptr< PreparedResultSet > PreparedQueryResult
DatabaseWorkerPool< LoginDatabaseConnection > LoginDatabase
Accessor to the realm/login database.
DatabaseWorkerPool< CharacterDatabaseConnection > CharacterDatabase
Accessor to the character database.
#define MAX_EQUIPMENT_SET_INDEX
@ ERR_GUILDEMBLEM_INVALIDVENDOR
@ ERR_GUILDEMBLEM_INVALID_TABARD_COLORS
@ ERR_GUILDEMBLEM_SUCCESS
#define TC_LOG_DEBUG(filterType__, message__,...)
#define TC_LOG_ERROR(filterType__, message__,...)
#define TC_LOG_INFO(filterType__, message__,...)
#define TC_LOG_WARN(filterType__, message__,...)
@ LOGIN_SEL_LAST_CHAR_UNDELETE
@ LOGIN_REP_REALM_CHARACTERS
@ LOGIN_UPD_LAST_CHAR_UNDELETE
@ LOGIN_SEL_SUM_REALM_CHARACTERS
@ LOGIN_UPD_ACCOUNT_ONLINE
#define TC_METRIC_EVENT(category, title, description)
bool normalizePlayerName(std::string &name)
@ CONNECTION_TYPE_INSTANCE
std::optional< T > Optional
Optional helper class to wrap optional values within.
@ EQUIPMENT_SLOT_MAINHAND
std::vector< ItemPosCount > ItemPosCountVec
@ PLAYER_EXTRA_HAS_RACE_CHANGED
@ PLAYER_FLAGS_CONTESTED_PVP
@ PLAYER_LOCAL_FLAG_OVERRIDE_TRANSPORT_SERVER_TIME
@ AT_LOGIN_RESET_PET_TALENTS
@ AT_LOGIN_CHANGE_FACTION
#define INVENTORY_SLOT_BAG_0
Trinity::IteratorPair< UF::ChrCustomizationChoice const * > MakeChrCustomizationChoiceRange(Container const &container)
@ PLAYER_LOGIN_QUERY_LOAD_SPELL_COOLDOWNS
@ PLAYER_LOGIN_QUERY_LOAD_CUSTOMIZATIONS
@ PLAYER_LOGIN_QUERY_LOAD_CURRENCY
@ PLAYER_LOGIN_QUERY_LOAD_GLYPHS
@ PLAYER_LOGIN_QUERY_LOAD_DECLINED_NAMES
@ PLAYER_LOGIN_QUERY_LOAD_QUEST_STATUS_REW
@ PLAYER_LOGIN_QUERY_LOAD_DAILY_QUEST_STATUS
@ PLAYER_LOGIN_QUERY_LOAD_AURA_EFFECTS
@ PLAYER_LOGIN_QUERY_LOAD_INSTANCE_LOCK_TIMES
@ PLAYER_LOGIN_QUERY_LOAD_SEASONAL_QUEST_STATUS
@ PLAYER_LOGIN_QUERY_LOAD_SOCIAL_LIST
@ PLAYER_LOGIN_QUERY_LOAD_GARRISON_FOLLOWERS
@ PLAYER_LOGIN_QUERY_LOAD_QUEST_STATUS_OBJECTIVES_CRITERIA
@ PLAYER_LOGIN_QUERY_LOAD_TRAIT_CONFIGS
@ PLAYER_LOGIN_QUERY_LOAD_SKILLS
@ PLAYER_LOGIN_QUERY_LOAD_BG_DATA
@ PLAYER_LOGIN_QUERY_LOAD_QUEST_STATUS_OBJECTIVES_CRITERIA_PROGRESS
@ PLAYER_LOGIN_QUERY_LOAD_TRANSMOG_OUTFITS
@ PLAYER_LOGIN_QUERY_LOAD_GARRISON_FOLLOWER_ABILITIES
@ PLAYER_LOGIN_QUERY_LOAD_TRANSMOG_OUTFIT_SLOT
@ PLAYER_LOGIN_QUERY_LOAD_ACCOUNT_DATA
@ PLAYER_LOGIN_QUERY_LOAD_MAIL_ITEMS
@ PLAYER_LOGIN_QUERY_LOAD_PET_SLOTS
@ PLAYER_LOGIN_QUERY_LOAD_ARTIFACTS
@ PLAYER_LOGIN_QUERY_LOAD_INVENTORY
@ PLAYER_LOGIN_QUERY_LOAD_REPUTATION
@ PLAYER_LOGIN_QUERY_LOAD_AZERITE_MILESTONE_POWERS
@ PLAYER_LOGIN_QUERY_LOAD_GARRISON_BLUEPRINTS
@ PLAYER_LOGIN_QUERY_LOAD_MAIL_ITEMS_AZERITE
@ PLAYER_LOGIN_QUERY_LOAD_BANK_TAB_SETTINGS
@ PLAYER_LOGIN_QUERY_LOAD_FROM
@ PLAYER_LOGIN_QUERY_LOAD_QUEST_STATUS
@ PLAYER_LOGIN_QUERY_LOAD_QUEST_STATUS_OBJECTIVES
@ PLAYER_LOGIN_QUERY_LOAD_MAIL_ITEMS_AZERITE_UNLOCKED_ESSENCE
@ PLAYER_LOGIN_QUERY_LOAD_GARRISON_BUILDINGS
@ PLAYER_LOGIN_QUERY_LOAD_DATA_FLAGS
@ PLAYER_LOGIN_QUERY_LOAD_WEEKLY_QUEST_STATUS
@ PLAYER_LOGIN_QUERY_LOAD_SPELL_CHARGES
@ PLAYER_LOGIN_QUERY_LOAD_MAIL_ITEMS_AZERITE_MILESTONE_POWER
@ PLAYER_LOGIN_QUERY_LOAD_AZERITE
@ PLAYER_LOGIN_QUERY_LOAD_MONTHLY_QUEST_STATUS
@ PLAYER_LOGIN_QUERY_LOAD_GUILD
@ PLAYER_LOGIN_QUERY_LOAD_EQUIPMENT_SETS
@ PLAYER_LOGIN_QUERY_LOAD_MAILS
@ PLAYER_LOGIN_QUERY_LOAD_AURAS
@ PLAYER_LOGIN_QUERY_LOAD_MAIL_ITEMS_AZERITE_EMPOWERED
@ PLAYER_LOGIN_QUERY_LOAD_TALENTS
@ PLAYER_LOGIN_QUERY_LOAD_AZERITE_UNLOCKED_ESSENCES
@ PLAYER_LOGIN_QUERY_LOAD_GARRISON
@ PLAYER_LOGIN_QUERY_LOAD_BANNED
@ PLAYER_LOGIN_QUERY_LOAD_MAIL_ITEMS_ARTIFACT
@ PLAYER_LOGIN_QUERY_LOAD_ARENA_INFO
@ PLAYER_LOGIN_QUERY_LOAD_GROUP
@ PLAYER_LOGIN_QUERY_LOAD_CRITERIA_PROGRESS
@ PLAYER_LOGIN_QUERY_LOAD_HOME_BIND
@ PLAYER_LOGIN_QUERY_LOAD_CORPSE_LOCATION
@ PLAYER_LOGIN_QUERY_LOAD_SPELLS
@ PLAYER_LOGIN_QUERY_LOAD_SPELL_FAVORITES
@ PLAYER_LOGIN_QUERY_LOAD_TRANSMOG_OUTFIT
@ PLAYER_LOGIN_QUERY_LOAD_DATA_ELEMENTS
@ PLAYER_LOGIN_QUERY_LOAD_TRAIT_ENTRIES
@ PLAYER_LOGIN_QUERY_LOAD_QUEST_STATUS_OBJECTIVES_SPAWN_TRACKING
@ PLAYER_LOGIN_QUERY_LOAD_TRANSMOG_OUTFIT_SITUATION
@ PLAYER_LOGIN_QUERY_LOAD_AZERITE_EMPOWERED
@ PLAYER_LOGIN_QUERY_LOAD_PVP_TALENTS
@ PLAYER_LOGIN_QUERY_LOAD_CUF_PROFILES
@ PLAYER_LOGIN_QUERY_LOAD_RANDOM_BG
@ PLAYER_LOGIN_QUERY_LOAD_AURA_STORED_LOCATIONS
@ PLAYER_LOGIN_QUERY_LOAD_ACHIEVEMENTS
@ RACE_LIGHTFORGED_DRAENEI
@ RACE_EARTHEN_DWARF_HORDE
@ RACE_HIGHMOUNTAIN_TAUREN
@ RACE_EARTHEN_DWARF_ALLIANCE
@ CHARACTER_FLAG_2_FACTION_CHANGE
@ CHARACTER_FLAG_2_RACE_CHANGE
@ CHARACTER_FLAG_2_CUSTOMIZE
@ GAMEOBJECT_TYPE_BARBER_CHAIR
@ CHAR_CREATE_TIMERUNNING
@ CHAR_CREATE_DRACTHYR_LEVEL_REQUIREMENT
@ CHAR_CREATE_CHARACTER_ARENA_LEADER
@ CHAR_CREATE_RESTRICTED_RACECLASS
@ CHAR_CREATE_DRACTHYR_DUPLICATE
@ CHAR_DELETE_FAILED_GUILD_LEADER
@ CHAR_DELETE_FAILED_ARENA_CAPTAIN
@ CHAR_CREATE_NAME_IN_USE
@ CHAR_CREATE_CHARACTER_SWAP_FACTION
@ CHAR_CREATE_SERVER_LIMIT
@ CHAR_CREATE_EXPANSION_CLASS
@ CHAR_CREATE_CHARACTER_RACE_ONLY
@ CHAR_CREATE_PVP_TEAMS_VIOLATION
@ CHAR_CREATE_ACCOUNT_LIMIT
@ CHARACTER_UNDELETE_RESULT_ERROR_NAME_TAKEN_BY_THIS_ACCOUNT
@ CHARACTER_UNDELETE_RESULT_ERROR_CHAR_CREATE
@ CHARACTER_UNDELETE_RESULT_ERROR_UNKNOWN
@ CHARACTER_UNDELETE_RESULT_ERROR_DISABLED
@ CHARACTER_UNDELETE_RESULT_OK
#define MAX_CHARACTERS_PER_REALM
@ COMPLAINT_ENABLED_WITH_AUTO_IGNORE
@ CHARACTER_FLAG_LOCKED_BY_BILLING
@ CHARACTER_FLAG_LOCKED_FOR_TRANSFER
#define MAX_ACCOUNT_TUTORIAL_VALUES
@ UNIT_STAND_STATE_SIT_LOW_CHAIR
#define MAX_DECLINED_NAME_CASES
@ UNIT_NPC_FLAG_2_PERSONAL_TABARD_DESIGNER
@ UNIT_BYTE2_FLAG_FFA_PVP
bool Utf8toWStr(char const *utf8str, size_t csize, wchar_t *wstr, size_t &wsize)
constexpr std::underlying_type< E >::type AsUnderlyingType(E enumValue)
bool isCyrillicCharacter(wchar_t wchar)
#define PER_CHARACTER_CACHE_MASK
@ DECLINED_NAMES_RESULT_SUCCESS
@ DECLINED_NAMES_RESULT_ERROR
#define GLOBAL_CACHE_MASK
#define ALL_ACCOUNT_DATA_CACHE_MASK
T & AddCallback(T &&query)
ObjectGuid const & GetGUID() const
void SendJournalLockStatus()
void PSendSysMessage(char const *fmt, Args &&... args)
std::pair< bool, bool > HasItemAppearance(uint32 itemModifiedAppearanceId) const
static bool IsPlayerMeetingCondition(Player const *player, uint32 conditionId)
static ConditionalChrModelEntry const * GetConditionalChrModel(int32 chrModelId)
bool ValidateEmblemColors() const
bool _isDeletedCharacters
EnumCharactersQueryHolder()
bool IsDeletedCharacters() const
bool Initialize(uint32 accountId, bool withDeclinedNames, bool isDeletedCharacters)
Class used to access individual fields of database query result.
uint64 GetUInt64() const noexcept
uint32 GetUInt32() const noexcept
uint16 GetUInt16() const noexcept
uint8 GetUInt8() const noexcept
int32 GetInt32() const noexcept
std::string GetString() const noexcept
GameObjectTemplate const * GetGOInfo() const
LoginQueryHolder(uint32 accountId, ObjectGuid guid)
ObjectGuid GetGuid() const
uint32 GetAccountId() const
virtual bool AddPlayerToMap(Player *player, bool initPlayer=true)
LowType GetCounter() const
static ObjectGuid const Empty
std::string ToString() const
void SetRawValue(std::span< uint8 const > rawBytes)
static bool CheckDeclinedNames(const std::wstring &w_ownname, DeclinedName const &names)
std::map< uint32, uint32 > CharacterConversionMap
static ResponseCodes CheckPlayerName(std::string_view name, LocaleConstant locale, bool create=false)
std::unordered_map< uint32, Trinity::unique_trackable_ptr< Quest > > QuestContainer
void SendMovieStart(uint32 movieId)
void SendEquipError(InventoryResult msg, Item const *item1=nullptr, Item const *item2=nullptr, uint32 itemId=0) const
void SetWatchedFactionIndex(int32 index)
void SendInitialPacketsAfterAddToMap()
static Team TeamForRace(uint8 race)
static TeamId TeamIdForRace(uint8 race)
InventoryResult CanUnequipItem(uint16 src, bool swap) const
void RemoveAtLoginFlag(AtLoginFlags flags, bool persist=false)
void ResetSpells(bool myClassOnly=false)
bool ModifyMoney(int64 amount, bool sendError=true)
InventoryResult CanEquipItem(uint8 slot, uint16 &dest, Item *pItem, bool swap, bool not_loading=true) const
void UpdateAverageItemLevelEquipped()
void SetPlayerLocalFlag(PlayerLocalFlags flags)
Creature * GetNPCIfCanInteractWith(ObjectGuid const &guid, NPCFlags npcFlags, NPCFlags2 npcFlags2) const
void SetNativeGender(Gender gender) override
Gender GetNativeGender() const override
UF::UpdateField< UF::ActivePlayerData, int32(WowCS::EntityFragment::CGObject), TYPEID_ACTIVE_PLAYER > m_activePlayerData
void SetEquipmentSet(EquipmentSetInfo::EquipmentSetData const &newEqSet)
InventoryResult CanStoreItem(uint8 bag, uint8 slot, ItemPosCountVec &dest, Item *pItem, bool swap=false) const
void CleanupsBeforeDelete(bool finalCleanup=true) override
void SendTalentsInfoData()
static void OfflineResurrect(ObjectGuid const &guid, CharacterDatabaseTransaction trans)
void SendDungeonDifficulty(int32 forcedDifficulty=-1) const
void ContinueTaxiFlight()
void SendInitialPacketsBeforeAddToMap()
static void SavePositionInDB(WorldLocation const &loc, uint16 zoneId, ObjectGuid guid, CharacterDatabaseTransaction trans)
void SendCorpseReclaimDelay(uint32 delay) const
int64 GetBarberShopCost(Trinity::IteratorPair< UF::ChrCustomizationChoice const * > newCustomizations) const
static void SaveCustomizations(CharacterDatabaseTransaction trans, ObjectGuid::LowType guid, Trinity::IteratorPair< UF::ChrCustomizationChoice const * > customizations)
void SwapItem(uint16 src, uint16 dst)
Item * StoreItem(ItemPosCountVec const &pos, Item *pItem, bool update)
WorldSession * GetSession() const
Item * GetItemByPos(uint16 pos) const
void ResetTalentSpecialization()
void UpdateCriteria(CriteriaType type, uint64 miscValue1=0, uint64 miscValue2=0, uint64 miscValue3=0, WorldObject *ref=nullptr)
void AddExploredZones(uint32 pos, uint64 mask)
void SetInGuild(ObjectGuid::LowType guildId)
bool TeleportTo(uint32 mapid, float x, float y, float z, float orientation, TeleportToOptions options=TELE_TO_NONE, Optional< uint32 > instanceId={}, uint32 teleportSpellId=0)
void SetPersonalTabard(uint32 style, uint32 color, uint32 borderStyle, uint32 borderColor, uint32 backgroundColor)
ObjectGuid::LowType GetGuildId() const
bool IsGameMaster() const
void SetGuildRank(uint8 rankId)
void LoadCorpse(PreparedQueryResult result)
static void DeleteFromDB(ObjectGuid playerguid, uint32 accountId, bool updateRealmChars=true, bool deleteFinally=false)
void SendCinematicStart(uint32 CinematicSequenceId) const
uint8 getCinematic() const
uint32 GetXPForNextLevel() const
void SetTransportServerTime(int32 transportServerTime)
void DeleteEquipmentSet(uint64 id)
bool LoadFromDB(ObjectGuid guid, CharacterDatabaseQueryHolder const &holder)
static bool IsValidGender(uint8 Gender)
void UpdateAverageItemLevelTotal()
bool HasAtLoginFlag(AtLoginFlags f) const
static void LeaveAllArenaTeams(ObjectGuid guid)
void RemoveItem(uint8 bag, uint8 slot, bool update)
static bool IsValidRace(uint8 Race)
int32 CalculateCorpseReclaimDelay(bool load=false) const
Group * GetGroup(Optional< uint8 > partyIndex)
bool HasPlayerFlag(PlayerFlags flags) const
void SetGuildLevel(uint32 level)
void SetTaxiCheater(bool on)
void SetVirtualPlayerRealm(uint32 virtualRealmAddress)
void SetContestedPvP(Player *attackedPlayer=nullptr)
Item * GetItemByGuid(ObjectGuid guid) const
void ResummonPetTemporaryUnSummonedIfAny()
PlayerCreateMode GetCreateMode() const
bool ResetTalents(bool noCost=false)
void SetInGameTime(uint32 time)
void setCinematic(uint8 cine)
ReputationMgr & GetReputationMgr()
bool IsQuestRewarded(uint32 quest_id) const
void SetCustomizations(Trinity::IteratorPair< Iter > customizations, bool markChanged=true)
bool HasEnoughMoney(uint64 amount) const
void setUInt16(uint8 index, uint16 value)
void setString(uint8 index, std::string &&value)
void setUInt32(uint8 index, uint32 value)
void setFloat(uint8 index, float value)
void setUInt64(uint8 index, uint64 value)
void setInt32(uint8 index, int32 value)
void setUInt8(uint8 index, uint8 value)
void SetNextQuery(QueryCallback &&next)
QueryCallback && WithPreparedCallback(std::function< void(PreparedQueryResult)> &&callback)
void SetAtWar(RepListID repListID, bool on)
void SendState(FactionState const *faction)
bool SetOneFactionReputation(FactionEntry const *factionEntry, int32 standing, bool incremental)
Public for chat command needs.
void SetInactive(RepListID repListID, bool on)
void SetSize(size_t size)
PreparedQueryResult GetPreparedResult(size_t index) const
void AfterComplete(std::function< void(SQLQueryHolderBase const &)> callback) &
bool SetPreparedQuery(size_t index, PreparedStatement< T > *stmt)
uint32 PlayScene(uint32 sceneId, Position const *position=nullptr)
Utility class to enable range for loop syntax for multimap.equal_range uses.
constexpr end_iterator end() const
constexpr iterator begin() const
void RestoreDisplayId(bool ignorePositiveAurasPreventingMounting=false)
void SetStandState(UnitStandStateType state, uint32 animKitID=0)
MotionMaster * GetMotionMaster()
bool IsStandState() const
void UpdateMountCapability()
void SetPvpFlag(UnitPVPStateFlags flags)
void RemoveAurasWithInterruptFlags(InterruptFlags flag, SpellInfo const *source=nullptr)
bool HasUnitState(const uint32 f) const
bool HasAura(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, ObjectGuid itemCasterGUID=ObjectGuid::Empty, uint32 reqEffMask=0) const
UnitStandStateType GetStandState() const
bool SetWaterWalking(bool enable)
constexpr void WorldRelocate(WorldLocation const &loc)
constexpr uint32 GetMapId() const
GameObject * FindNearestGameObjectOfType(GameobjectTypes type, float range) const
SpellCastResult CastSpell(CastSpellTargetArg const &targets, uint32 spellId, CastSpellExtraArgs const &args={ })
std::string const & GetName() const
WorldPacket const * Write() override
int32 PreviousArenaSeason
int32 CustomizedChrModelID
Array< ChrCustomizationChoice, 250 > Customizations
WorldPacket const * Write() override
WorldPacket const * Write() override
std::shared_ptr< CharCustomizeInfo > CustomizeInfo
ObjectGuid Guid
Guid of the character to delete.
Optional< CharFactionChangeDisplayInfo > Display
WorldPacket const * Write() override
std::shared_ptr< CharRaceOrFactionChangeInfo > RaceOrFactionChangeInfo
std::shared_ptr< CharacterRenameInfo > RenameInfo
Optional< ObjectGuid > Guid
WorldPacket const * Write() override
WorldPacket const * Write() override
WorldPacket const * Write() override
std::shared_ptr< CharacterCreateInfo > CreateInfo
WorldPacket const * Write() override
std::vector< CharacterInfo > Characters
all characters on the list
std::vector< RaceUnlock > RaceUnlockData
WorldPacket const * Write() override
bool IsDeletedCharacters
used for character undelete list
Optional< uint32 > ClassDisableMask
WorldPacket const * Write() override
TaggedPosition< Position::XYZO > Pos
WorldPacket const * Write() override
ObjectGuid Guid
Guid of the player that is logging in.
Array< ReorderInfo, 200 > Entries
CustomTabardInfo PersonalTabard
WorldPacket const * Write() override
DeclinedName DeclinedNames
CharacterUndeleteInfo const * UndeleteInfo
WorldPacket const * Write() override
std::shared_ptr< CharacterUndeleteInfo > UndeleteInfo
WorldPacket const * Write() override
uint32 CurrentCooldown
Current cooldown until next free character restoration. (in sec)
uint32 MaxCooldown
Max. cooldown until next free character restoration. Displayed in undelete confirm message....
EquipmentSetInfo::EquipmentSetData Set
uint64 GUID
Set Identifier.
WorldPacket const * Write() override
EquipmentSetItem Items[EQUIPMENT_SET_SLOTS]
uint64 GUID
Set Identifier.
uint32 ClubPresenceUnsubscribeDelay
Timer for updating club presence when communities ui frame is hidden.
bool CharUndeleteEnabled
Implemented.
bool CharacterCommunitiesEnabled
Optional< EuropaTicketConfig > EuropaTicketSystemStatus
ChatThrottleParams GuildChatThrottle
ChatThrottleParams AddonChatThrottle
std::vector< GameRuleValuePair > GameRules
WorldPacket const * Write() override
uint32 CommercePricePollTimeSeconds
bool ClubPresenceAllowSubscribeAll
ChatThrottleParams GroupChatThrottle
WorldPacket const * Write() override
std::vector< std::string > const * Text
void SetPlayer(Player *player)
void HandleRandomizeCharNameOpcode(WorldPackets::Character::GenerateRandomCharacterName &packet)
void HandleOpeningCinematic(WorldPackets::Misc::OpeningCinematic &packet)
void HandleSetFactionAtWar(WorldPackets::Character::SetFactionAtWar &packet)
void HandleCharEnumOpcode(WorldPackets::Character::EnumCharacters &)
void HandleCharEnum(CharacterDatabaseQueryHolder const &holder)
void HandleTutorialFlag(WorldPackets::Misc::TutorialSetFlag &packet)
void AbortLogin(WorldPackets::Character::LoginFailureReason reason)
void HandleAlterAppearance(WorldPackets::Character::AlterApperance &packet)
void HandleCharRaceOrFactionChangeCallback(std::shared_ptr< WorldPackets::Character::CharRaceOrFactionChangeInfo > factionChangeInfo, PreparedQueryResult result)
void SendConnectToInstance(WorldPackets::Auth::ConnectToSerial serial)
void SendNotification(char const *format,...) ATTR_PRINTF(2
void HandleCharCustomizeOpcode(WorldPackets::Character::CharCustomize &packet)
void HandleCharUndeleteOpcode(WorldPackets::Character::UndeleteCharacter &undeleteInfo)
QueryCallbackProcessor _queryProcessor
void HandleReorderCharacters(WorldPackets::Character::ReorderCharacters &reorderChars)
void HandleSetFactionInactiveOpcode(WorldPackets::Character::SetFactionInactive &packet)
int64 _timeSyncClockDelta
void LoadAccountData(PreparedQueryResult result, uint32 mask)
void HandleSetWatchedFactionOpcode(WorldPackets::Character::SetWatchedFaction &packet)
void SendCharDelete(ResponseCodes result)
LocaleConstant GetSessionDbcLocale() const
std::string GetPlayerInfo() const
void HandleCharRaceOrFactionChangeOpcode(WorldPackets::Character::CharRaceOrFactionChange &packet)
static constexpr uint32 SPECIAL_RESUME_COMMS_TIME_SYNC_COUNTER
void HandleCharUndeleteEnumOpcode(WorldPackets::Character::EnumCharacters &)
Player * GetPlayer() const
std::unique_ptr< CollectionMgr > _collectionMgr
bool PlayerLoading() const
void HandleCharRenameOpcode(WorldPackets::Character::CharacterRenameRequest &request)
void SendUndeleteCharacterResponse(CharacterUndeleteResult result, WorldPackets::Character::CharacterUndeleteInfo const *undeleteInfo)
void SendAuctionFavoriteList()
void SendSetTimeZoneInformation()
void RegisterTimeSync(uint32 counter)
void HandleCharDeleteOpcode(WorldPackets::Character::CharDelete &charDelete)
void HandleCharCreateOpcode(WorldPackets::Character::CreateCharacter &charCreate)
void SendSetPlayerDeclinedNamesResult(DeclinedNameResult result, ObjectGuid guid)
void HandleCharRenameCallBack(std::shared_ptr< WorldPackets::Character::CharacterRenameInfo > renameInfo, PreparedQueryResult result)
void HandleSetPlayerDeclinedNames(WorldPackets::Character::SetPlayerDeclinedNames &packet)
ObjectGuid m_playerLoading
SQLQueryHolderCallback & AddQueryHolderCallback(SQLQueryHolderCallback &&callback)
void HandleDeleteEquipmentSet(WorldPackets::EquipmentSet::DeleteEquipmentSet &deleteEquipmentSet)
bool IsLegitCharacterForAccount(ObjectGuid lowGUID)
std::string const & GetRemoteAddress() const
void HandlePlayerLogin(LoginQueryHolder const &holder)
void HandleCheckCharacterNameAvailability(WorldPackets::Character::CheckCharacterNameAvailability &checkCharacterNameAvailability)
bool HasPermission(uint32 permissionId)
void SendPacket(WorldPacket const *packet, bool forced=false)
Send a packet to the client.
uint32 GetBattlenetAccountId() const
bool MeetsChrCustomizationReq(ChrCustomizationReqEntry const *req, Races race, Classes playerClass, bool checkRequiredDependentChoices, Trinity::IteratorPair< UF::ChrCustomizationChoice const * > selectedChoices) const
uint32 GetAccountId() const
void SendCharCustomize(ResponseCodes result, WorldPackets::Character::CharCustomizeInfo const *customizeInfo)
uint8 GetAccountExpansion() const
uint32 GetTutorialInt(uint8 index) const
CollectionMgr * GetCollectionMgr() const
void SendCharRename(ResponseCodes result, WorldPackets::Character::CharacterRenameInfo const *renameInfo)
void SendUndeleteCooldownStatusResponse(uint32 currentCooldown, uint32 maxCooldown)
void SendFeatureSystemStatus()
uint8 GetExpansion() const
void SendAccountDataTimes(ObjectGuid playerGuid, uint32 mask)
void HandleSetFactionNotAtWar(WorldPackets::Character::SetFactionNotAtWar &packet)
void HandleContinuePlayerLogin()
std::unique_ptr< boost::circular_buffer< std::pair< int64, uint32 > > > _timeSyncClockDeltaQueue
bool ValidateAppearance(Races race, Classes playerClass, Gender gender, Trinity::IteratorPair< UF::ChrCustomizationChoice const * > customizations)
void SendCharFactionChange(ResponseCodes result, WorldPackets::Character::CharRaceOrFactionChangeInfo const *factionChangeInfo)
void HandleEquipmentSetSave(WorldPackets::EquipmentSet::SaveEquipmentSet &saveEquipmentSet)
void HandleLoadScreenOpcode(WorldPackets::Character::LoadingScreenNotify &loadingScreenNotify)
void HandleUndeleteCooldownStatusCallback(PreparedQueryResult result)
void KickPlayer(std::string_view reason)
Kick a player out of the World.
void HandleCharCustomizeCallback(std::shared_ptr< WorldPackets::Character::CharCustomizeInfo > customizeInfo, PreparedQueryResult result)
void HandleSavePersonalEmblem(WorldPackets::Character::SavePersonalEmblem const &savePersonalEmblem)
void SetTutorialInt(uint8 index, uint32 value)
void HandlePlayerLoginOpcode(WorldPackets::Character::PlayerLogin &playerLogin)
BattlePets::BattlePetMgr * GetBattlePetMgr() const
void HandleGetUndeleteCooldownStatus(WorldPackets::Character::GetUndeleteCharacterCooldownStatus &)
void SendCharCreate(ResponseCodes result, ObjectGuid const &guid=ObjectGuid::Empty)
void HandleUseEquipmentSet(WorldPackets::EquipmentSet::UseEquipmentSet &useEquipmentSet)
uint32 GetVirtualRealmAddress()
@ CONFIG_CHARACTER_CREATING_DISABLED_CLASSMASK
@ CONFIG_CHARACTER_CREATING_MIN_LEVEL_FOR_EVOKER
@ CONFIG_CHARACTER_CREATING_DISABLED
@ CONFIG_ENABLE_SINFO_LOGIN
@ CONFIG_CHARACTERS_PER_ACCOUNT
@ CONFIG_FEATURE_SYSTEM_CHARACTER_UNDELETE_COOLDOWN
@ CONFIG_CHARACTER_CREATING_EVOKERS_PER_REALM
@ CONFIG_CHARACTER_CREATING_MIN_LEVEL_FOR_DEMON_HUNTER
@ CONFIG_CHARACTERS_PER_REALM
@ CONFIG_SUPPORT_COMPLAINTS_ENABLED
@ CONFIG_SUPPORT_BUGS_ENABLED
@ CONFIG_DECLINED_NAMES_USED
@ CONFIG_CHARACTER_CREATING_DISABLE_ALLIED_RACE_ACHIEVEMENT_REQUIREMENT
@ CONFIG_ARENA_SEASON_IN_PROGRESS
@ CONFIG_PREVENT_RENAME_CUSTOMIZATION
@ CONFIG_SUPPORT_SUGGESTIONS_ENABLED
@ CONFIG_SUPPORT_TICKETS_ENABLED
@ CONFIG_ALLOW_TWO_SIDE_INTERACTION_GROUP
@ CONFIG_START_ALL_EXPLORED
@ CONFIG_ALLOW_TWO_SIDE_INTERACTION_GUILD
@ CONFIG_FEATURE_SYSTEM_CHARACTER_UNDELETE_ENABLED
@ CONFIG_CHARACTER_CREATING_DISABLED_RACEMASK
TC_COMMON_API char const * GetFullVersion()
void AddObject(T *object)
TC_GAME_API Player * FindPlayer(ObjectGuid const &)
TransmogIllusionEntry const * GetTransmogIllusionForSpellItemEnchantment(uint32 spellItemEnchantmentId)
constexpr IteratorPair< iterator, end_iterator > MakeIteratorPair(iterator first, end_iterator second)
auto MapGetValuePtr(M &map, typename M::key_type const &key)
TC_COMMON_API std::vector< std::string_view > Tokenize(std::string_view str, char sep, bool keepEmpty)
struct advstd::ranges::Contains contains
@ RBAC_PERM_SKIP_CHECK_CHARACTER_CREATION_TEAMMASK
@ RBAC_PERM_TWO_SIDE_CHARACTER_CREATION
@ RBAC_PERM_SKIP_CHECK_CHARACTER_CREATION_RESERVEDNAME
@ RBAC_PERM_SKIP_CHECK_CHARACTER_CREATION_RACEMASK
@ RBAC_PERM_SKIP_CHECK_CHARACTER_CREATION_DEMON_HUNTER
@ RBAC_PERM_SKIP_CHECK_CHARACTER_CREATION_CLASSMASK
@ RBAC_PERM_TWO_SIDE_ADD_FRIEND
ObjectGuid::LowType GuildId
Trinity::RaceMask< int64 > RaceMask
int32 ItemModifiedAppearanceID
EnumFlag< ChrCustomizationReqFlag > GetFlags() const
EnumFlag< ChrRacesFlag > GetFlags() const
int32 ChrCustomizationReqID
std::string name[MAX_DECLINED_NAME_CASES]
std::array< ObjectGuid, EQUIPMENT_SET_SLOTS > Pieces
uint32 IgnoreMask
Mask of EquipmentSlot.
std::array< int32, 2 > Enchants
SpellItemEnchantmentID.
std::array< int32, EQUIPMENT_SET_SLOTS > Appearances
ItemModifiedAppearanceID.
struct GameObjectTemplate::@197::@231 barberChair
PlayerCreateInfoSpells castSpells[size_t(PlayerCreateMode::Max)]
constexpr float GetPositionX() const
constexpr float GetPositionY() const
constexpr void GetPosition(float &x, float &y) const
constexpr float GetPositionZ() const
int8 ScalingClassRestricted
uint32 TransmogUseConditionID
constexpr bool IsEmpty() const
constexpr bool HasRace(uint32 raceId) const
uint32 ChrCustomizationChoiceID
uint32 ChrCustomizationOptionID
Array< ChrCustomizationChoice, 250 > Customizations
uint32 Flags
Character flag.
std::vector< ChrCustomizationChoice > Customizations
uint32 Flags2
Character customization flags.
bool HasUnlockedAchievement
int32 UsedTriesPerMessage
int32 TriesRestoredPerSecond