![]() |
TrinityCore
|
#include "Define.h"#include "Errors.h"#include "Optional.h"#include <array>#include <string>#include <string_view>#include <typeinfo>#include <utility>#include <vector>
Include dependency graph for Util.h:
This graph shows which files directly or indirectly include this file:Go to the source code of this file.
Classes | |
| struct | WcharToUpper |
| struct | WcharToUpperOnlyLatin |
| struct | WcharToLower |
| struct | CharToUpper |
| struct | CharToLower |
| struct | CStringBoundedSentinel< Iterator > |
| struct | CStringSentinel_T |
| struct | StringContainsStringI_T |
| struct | StringCompareLessI_T |
| class | HookList< T > |
| struct | NonDefaultConstructible< T > |
Namespaces | |
| namespace | Trinity |
| namespace | Trinity::Impl |
Enumerations | |
| enum class | TimeFormat : uint8 { FullText , ShortText , Numeric } |
| enum | ComparisionType { COMP_TYPE_EQ = 0 , COMP_TYPE_HIGH , COMP_TYPE_LOW , COMP_TYPE_HIGH_EQ , COMP_TYPE_LOW_EQ , COMP_TYPE_MAX } |
Functions | |
| TC_COMMON_API void | Trinity::VerifyOsVersion () |
| TC_COMMON_API std::vector< std::string_view > | Trinity::Tokenize (std::string_view str, char sep, bool keepEmpty) |
| std::vector< std::string_view > | Trinity::Tokenize (std::string &&, char, bool)=delete |
| std::vector< std::string_view > | Trinity::Tokenize (std::string const &&, char, bool)=delete |
| std::vector< std::string_view > | Trinity::Tokenize (char const *str, char sep, bool keepEmpty) |
| TC_COMMON_API Optional< int64 > | MoneyStringToMoney (std::string const &moneyString) |
| TC_COMMON_API time_t | GetLocalHourTimestamp (time_t time, uint8 hour, bool onlyAfterTime=true) |
| TC_COMMON_API tm | TimeBreakdown (time_t t) |
| TC_COMMON_API std::string | secsToTimeString (uint64 timeInSecs, TimeFormat timeFormat=TimeFormat::FullText, bool hoursOnly=false) |
| TC_COMMON_API uint32 | TimeStringToSecs (std::string const ×tring) |
| TC_COMMON_API std::string | TimeToTimestampStr (time_t t) |
| TC_COMMON_API std::string | TimeToHumanReadable (time_t t) |
| template<class T , class U > | |
| T | CalculatePct (T base, U pct) |
| template<class T > | |
| float | GetPctOf (T value, T max) |
| template<class T , class U > | |
| T | AddPct (T &base, U pct) |
| template<class T , class U > | |
| T | ApplyPct (T &base, U pct) |
| template<class T > | |
| T | RoundToInterval (T &num, T floor, T ceil) |
| TC_COMMON_API bool | Utf8toWStr (std::string_view utf8str, std::wstring &wstr) |
| TC_COMMON_API bool | Utf8toWStr (char const *utf8str, size_t csize, wchar_t *wstr, size_t &wsize) |
| bool | Utf8toWStr (std::string_view utf8str, wchar_t *wstr, size_t &wsize) |
| TC_COMMON_API bool | WStrToUtf8 (std::wstring_view wstr, std::string &utf8str) |
| TC_COMMON_API bool | WStrToUtf8 (wchar_t const *wstr, size_t size, std::string &utf8str) |
| TC_COMMON_API size_t | utf8length (std::string &utf8str) |
| TC_COMMON_API void | utf8truncate (std::string &utf8str, size_t len) |
| bool | isBasicLatinCharacter (wchar_t wchar) |
| bool | isExtendedLatinCharacter (wchar_t wchar) |
| bool | isLatin1Character (wchar_t wchar) |
| bool | isCyrillicCharacter (wchar_t wchar) |
| bool | isKoreanCharacter (wchar_t wchar) |
| bool | isChineseCharacter (wchar_t wchar) |
| bool | isNumeric (wchar_t wchar) |
| bool | isNumeric (char c) |
| bool | isNumeric (char const *str) |
| bool | isNumericOrSpace (wchar_t wchar) |
| bool | isBasicLatinString (std::wstring_view wstr, bool numericOrSpace) |
| bool | isExtendedLatinString (std::wstring_view wstr, bool numericOrSpace) |
| bool | isCyrillicString (std::wstring_view wstr, bool numericOrSpace) |
| bool | isKoreanString (std::wstring_view wstr, bool numericOrSpace) |
| bool | isChineseString (std::wstring_view wstr, bool numericOrSpace) |
| bool | isLower (wchar_t wchar) |
| bool | isUpper (wchar_t wchar) |
| TC_COMMON_API void | wstrToUpper (std::wstring &str) |
| TC_COMMON_API void | wstrToLower (std::wstring &str) |
| TC_COMMON_API void | strToUpper (std::string &str) |
| TC_COMMON_API void | strToLower (std::string &str) |
| TC_COMMON_API std::wstring | wstrCaseAccentInsensitiveParse (std::wstring_view wstr, LocaleConstant locale) |
| TC_COMMON_API std::wstring | GetMainPartOfName (std::wstring const &wname, uint32 declension) |
| TC_COMMON_API bool | utf8ToConsole (std::string_view utf8str, std::string &conStr) |
| TC_COMMON_API bool | consoleToUtf8 (std::string_view conStr, std::string &utf8str) |
| TC_COMMON_API bool | Utf8FitTo (std::string_view str, std::wstring_view search) |
| TC_COMMON_API void | utf8printf (FILE *out, const char *str,...) |
| TC_COMMON_API void | vutf8printf (FILE *out, const char *str, va_list *ap) |
| TC_COMMON_API bool | Utf8ToUpperOnlyLatin (std::string &utf8String) |
| TC_COMMON_API bool | ReadWinConsole (std::string &str, size_t size=256) |
| TC_COMMON_API bool | WriteWinConsole (std::string_view str, bool error=false) |
| TC_COMMON_API Optional< std::size_t > | RemoveCRLF (std::string &str) |
| TC_COMMON_API uint32 | CreatePIDFile (std::string const &filename) |
| create PID file | |
| TC_COMMON_API uint32 | GetPID () |
| TC_COMMON_API std::string | Trinity::Impl::ByteArrayToHexStr (uint8 const *bytes, size_t length, bool reverse=false) |
| TC_COMMON_API void | Trinity::Impl::HexStrToByteArray (std::string_view str, uint8 *out, size_t outlen, bool reverse=false) |
| template<typename Container > | |
| std::string | ByteArrayToHexStr (Container const &c, bool reverse=false) |
| template<size_t Size> | |
| void | HexStrToByteArray (std::string_view str, std::array< uint8, Size > &buf, bool reverse=false) |
| template<size_t Size> | |
| std::array< uint8, Size > | HexStrToByteArray (std::string_view str, bool reverse=false) |
| std::vector< uint8 > | HexStrToByteVector (std::string_view str, bool reverse=false) |
| TC_COMMON_API float | DegToRad (float degrees) |
| TC_COMMON_API bool | StringEqualI (std::string_view str1, std::string_view str2) |
| bool | StringStartsWith (std::string_view haystack, std::string_view needle) |
| bool | StringStartsWithI (std::string_view haystack, std::string_view needle) |
| TC_COMMON_API bool | StringContainsStringI (std::string_view haystack, std::string_view needle) |
| TC_COMMON_API bool | StringCompareLessI (std::string_view a, std::string_view b) |
| TC_COMMON_API void | StringReplaceAll (std::string *str, std::string_view text, std::string_view replacement) |
| std::string | StringReplaceAll (std::string_view str, std::string_view text, std::string_view replacement) |
| template<class T > | |
| bool | CompareValues (ComparisionType type, T val1, T val2) |
| template<typename E > | |
| constexpr std::underlying_type< E >::type | AsUnderlyingType (E enumValue) |
| template<typename Ret , typename T1 , typename... T> | |
| constexpr Ret * | Coalesce (T1 *first, T *... rest) |
| TC_COMMON_API std::string | Trinity::Impl::GetTypeName (std::type_info const &) |
| template<typename T > | |
| std::string | Trinity::GetTypeName () |
| template<typename T > | |
| std::string | Trinity::GetTypeName (T &&v) |
Variables | |
| struct WcharToUpper | wcharToUpper |
| struct WcharToUpperOnlyLatin | wcharToUpperOnlyLatin |
| struct WcharToLower | wcharToLower |
| struct CharToUpper | charToUpper |
| struct CharToLower | charToLower |
| struct CStringSentinel_T | CStringSentinel |
| enum ComparisionType |
|
strong |
|
inline |
Definition at line 85 of file Util.h.
References CalculatePct().
Referenced by spell_sha_lava_lash::AddBonusFlametongueDamage(), Unit::ApplyStatPctModifier(), Unit::CalcArmorReducedDamage(), spell_pri_prayerful_litany::CalcPrimaryTargetHealing(), spell_pri_power_word_shield::CalculateAbsorb(), spell_monk_life_cocoon::CalculateAbsorb(), spell_dk_anti_magic_shell::CalculateAmount(), spell_pal_shield_of_vengeance::CalculateAmount(), spell_dru_guardian_of_elune_healing::CalculateAmount(), spell_mage_ice_barrier::CalculateAmount(), spell_rog_improved_garrote_damage::CalculateBonus(), spell_pri_mind_devourer_buff_aura::CalculateDamage(), spell_warl_drain_soul::CalculateDamage(), spell_dru_galactic_guardian_moonfire::CalculateDamage(), spell_dru_rake::CalculateDamage(), spell_pri_mind_devourer_buff::CalculateDamage(), spell_dru_mangle::CalculateDamage(), spell_mage_scald::CalculateDamage(), spell_warr_overpowering_finish::CalculateDamage(), spell_warr_vicious_contempt::CalculateDamage(), spell_pri_power_of_the_dark_side_damage_bonus::CalculateDamageBonus(), spell_pri_lights_wrath::CalculateDamageBonus(), spell_pri_empowered_renew_heal::CalculateHealing(), spell_pal_eternal_flame_aura::CalculateHealing(), spell_pal_eternal_flame::CalculateHealing(), spell_gen_major_healing_cooldown_modifier_aura::CalculateHealingBonus(), spell_gen_major_healing_cooldown_modifier::CalculateHealingBonus(), spell_pri_focused_mending::CalculateHealingBonus(), spell_pri_power_of_the_dark_side_healing_bonus::CalculateHealingBonus(), spell_dh_shattered_restoration::CalculateHealingBonus(), spell_pri_abyssal_reverie::CalculateHealingBonus(), spell_pri_divine_service::CalculateHealingBonus(), spell_sha_deluge::CalculateHealingBonus(), Unit::CalculateMeleeDamage(), Player::CalculateMinMaxDamage(), Unit::CalculateSpellDamageTaken(), spell_hun_pet_scaling_01::spell_hun_pet_scaling_01_AuraScript::CalculateStaminaAmount(), Spell::Delayed(), Spell::DelayedChannel(), spell_pri_shadow_word_death::DetermineKillStatus(), Spell::EffectEnergize(), Player::GetQuestXPReward(), RestMgr::GetRestBonusFor(), Unit::GetTotalAuraMultiplier(), Unit::GetTotalStatValue(), spell_dru_umbral_embrace_damage::HandleDamage(), spell_pal_justicars_vengeance::HandleDamage(), spell_mage_supernova::HandleDamage(), spell_warr_meat_cleaver_damage_bonus::HandleDamageBonus(), spell_pri_shadow_word_death::HandleDamageCalculation(), spell_warl_deaths_embrace_impl::HandleDamageOrHealingCalculation(), spell_pri_sanctuary_trigger::HandleEffectHit(), spell_rog_backstab::HandleHitDamage(), spell_dh_blade_dance_damage::HandleHitTarget(), spell_dru_wild_growth_aura::HandleTickUpdate(), Unit::MeleeDamageBonusDone(), Unit::MeleeDamageBonusTaken(), WorldObject::ModSpellDuration(), spell_pri_twilight_equilibrium_shadow_word_pain::OnApply(), spell_evo_snapfire::OnPrecast(), Player::RewardHonor(), Unit::RewardRage(), Battleground::RewardReputationToTeam(), spell_sha_earthquake::SnapshotDamageMultiplier(), Unit::SpellAbsorbPctDone(), Unit::SpellCriticalDamageBonus(), Unit::SpellDamageBonusTaken(), Unit::SpellDamagePctDone(), Unit::SpellHealingBonusTaken(), Unit::SpellHealingPctDone(), spell_sha_stormblast_damage::TriggerDamage(), Player::UpdateHealingDonePercentMod(), Unit::UpdateSpeed(), and Unit::UpdateStatBuffMod().
|
inline |
Definition at line 91 of file Util.h.
References CalculatePct().
Referenced by spell_sha_stormflurry_damage::ApplyModifier(), Unit::CalcSpellResistedDamage(), spell_warr_improved_whirlwind_cleave::CalculateDamage(), spell_pri_power_word_radiance_evangelism::CalculateHealing(), Spell::EffectDestroyAllTotems(), Spell::EffectWeaponDmg(), spell_pri_shadow_word_death::HandleDamageCalculation(), spell_deathwhisper_vampiric_might::HandleProc(), Player::RegenerateHealth(), spell_mage_ethereal_blink_triggered::TriggerSlow(), Unit::UpdateAdvFlyingSpeed(), and Unit::UpdateAdvFlyingSpeed().
|
constexpr |
Definition at line 565 of file Util.h.
Referenced by SpellInfo::_LoadSqrtTargetLimit(), Player::_LoadTraits(), Player::_LoadTransmogOutfits(), Player::_SaveCurrency(), Conversation::AddActor(), Conversation::AddActor(), AuctionHouseObject::AddAuction(), InstanceScript::AddDoor(), StoredLootContainer::AddLootItem(), Guild::AddMember(), BattlePets::BattlePetMgr::AddPet(), Player::AddSpellMod(), CollectionMgr::AddToy(), Player::AddTraitConfig(), Player::ApplyArtifactPowerRank(), Player::ApplyAzeritePower(), BattlePets::BattlePetMgr::BattlePetMgr(), BattlegroundMgr::BGQueueTypeId(), AuctionHouseMgr::BuildAuctionMailSubject(), Battleground::BuildPvPLogDataPacket(), Unit::CalcArmorReducedDamage(), AuraEffect::CalculateSpellMod(), Player::CanBankItem(), Player::CanStoreItems(), Player::CastItemCombatSpell(), BattlePets::BattlePetMgr::ChangeBattlePetQuality(), Battlenet::AccountMgr::ChangePassword(), Guild::Member::ChangeRank(), Spell::CheckCast(), SceneObject::Create(), GameObject::Create(), Battlenet::AccountMgr::CreateBattlenetAccount(), Guild::RankInfo::CreateMissingTabsIfNeeded(), instance_stratholme::instance_stratholme_InstanceMapScript::DoGateTrap(), Spell::EffectCreateTraitTreeConfig(), Player::EquipTransmogOutfit(), RealmList::FillRealmEntry(), Group::GetCountdownInfo(), Unit::GetCreateStat(), Map::GetDebugInfo(), TerrainInfo::GetFullTerrainStatusForPosition(), TerrainInfo::GetLiquidStatus(), TransmogMgr::GetNextOutfitToUnlock(), TraitMgr::PlayerDataAccessor::GetPrimarySpecialization(), Player::GetPrimarySpecializationEntry(), TransmogMgr::GetSlotAndOption(), Creature::GetSpawnTrackingStateDataForPlayer(), GameObject::GetSpawnTrackingStateDataForPlayer(), Unit::GetTotalStatValue(), WorldSession::HandleAuctionBrowseQuery(), WorldSession::HandleAzeriteEssenceActivateEssence(), WorldSession::HandleClassTalentsRequestNewConfig(), Battlenet::Services::ClubService::HandleCreateMessage(), Battlenet::Services::ClubService::HandleGetMembers(), Battlenet::Services::ClubService::HandleGetStreams(), WorldSession::HandleInspectOpcode(), WorldSession::HandlePlayerLogin(), Guild::HandleQuery(), Guild::HandleRemoveRank(), Guild::HandleSetRankInfo(), Guild::HandleShiftRank(), WorldSession::HandleSpawnTrackingUpdate(), Battlenet::Services::ClubService::HandleSubscribe(), Battlenet::Services::ClubService::HandleSubscribeStream(), WorldSession::HandleTraitsCommitConfig(), WorldSession::HandleTransmogOutfitUpdateSlots(), Guild::HandleUpdateMemberRank(), wp_commandscript::HandleWpAddCommand(), wp_commandscript::HandleWpShowCommand(), WorldPackets::Inspect::PlayerModelDisplayInfo::Initialize(), WorldPackets::Party::PartyMemberFullState::Initialize(), Player::InitializeNewTransmogOutfit(), WorldPackets::Movement::MonsterMove::InitializeSplineData(), Guardian::InitStatsForLevel(), SmartAIMgr::IsEventValid(), ConditionMgr::IsPlayerMeetingCondition(), ItemTemplate::IsUsableByLootSpecialization(), Player::LearnSpecializationSpells(), TransmogMgr::Load(), AzeriteItem::LoadAzeriteItemData(), ObjectMgr::LoadCreatureAddons(), ObjectMgr::LoadCreatureTemplateAddons(), CriteriaMgr::LoadCriteriaList(), BattlePets::BattlePetMgr::LoadDefaultPetQualities(), Creature::LoadFromDB(), GameObject::LoadFromDB(), ObjectMgr::LoadGossipMenuItems(), TerrainInfo::LoadMMapImpl(), WaypointMgr::LoadPathFromDB(), ObjectMgr::LoadPlayerInfo(), Quest::LoadRewardDisplaySpell(), ObjectMgr::LoadSpawnTrackingStates(), ObjectMgr::LoadVehicleSeatAddon(), Battlenet::LoginRESTService::MigrateLegacyPasswordHashes(), battleground_eye_of_the_storm::OnFlagStateChange(), instance_stratholme::instance_stratholme_InstanceMapScript::OnGameObjectCreate(), npc_chromie_start::npc_chromie_startAI::OnGossipHello(), npc_chromie_middle::npc_chromie_middleAI::OnGossipHello(), npc_chromie_start::npc_chromie_startAI::OnGossipSelect(), npc_chromie_middle::npc_chromie_middleAI::OnGossipSelect(), Player::OnGossipSelect(), battleground_silvershard_mines::OnTrackSwitched(), Player::PrepareGossipMenu(), AuctionHouseObject::RemoveAuction(), StoredLootContainer::RemoveItem(), Player::RewardHonor(), ComplaintTicket::SaveToDB(), Guild::Member::SaveToDB(), Guild::RankInfo::SaveToDB(), Player::SaveToDB(), WorldSession::SendAuctionCommandResult(), Player::SendCurrencies(), BattlePets::BattlePetMgr::SendError(), Guild::SendEventNewLeader(), WorldSession::SendFeatureSystemStatus(), WorldSession::SendFeatureSystemStatusGlueScreen(), Guild::SendGuildRankInfo(), Guild::SendGuildRanksUpdate(), WorldSession::SendListInventory(), LootRoll::SendLootRollWon(), Spell::SendMountResult(), Guild::SendPermissions(), WorldSession::SendPetStableResult(), Player::SendPushToPartyResponse(), PlayerMenu::SendQuestGiverStatus(), LootRoll::SendRoll(), Trainer::Trainer::SendSpells(), WorldSession::SendTabardVendorActivate(), Player::SendTalentsInfoData(), Player::SendTameFailure(), Trainer::Trainer::SendTeachFailure(), Unit::SetAnimTier(), Guild::RankInfo::SetBankMoneyPerDay(), Guild::RankInfo::SetBankTabSlotsAndRights(), Player::SetBattlePetData(), Unit::SetCreateStat(), npc_webwrap::SetGUID(), Guild::RankInfo::SetName(), Creature::SetPetitioner(), Guild::RankInfo::SetRights(), Creature::SetScriptStringId(), GameObject::SetScriptStringId(), Player::SetTraitConfigUseSharedActionBars(), Player::SetTraitConfigUseStarterBuild(), Creature::SetVendor(), WorldObject::SetVisibilityDistanceOverride(), Player::SetVisibleItemSlot(), boss_volazj::SpellHitTarget(), Group::StartCountdown(), CreatureMovementData::ToString(), BattlePets::BattlePetMgr::UnlockSlot(), npc_demolitionist_legoso::npc_demolitionist_legosoAI::UpdateAI(), GameObject::UpdateCapturePoint(), Creature::UpdateEntry(), battleground_twin_peaks::UpdateFlagState(), battleground_warsong_gulch::UpdateFlagState(), Creature::UpdateLevelDependantStats(), Creature::UpdateMaxPower(), Guardian::UpdateMaxPower(), Player::UpdateMaxPower(), Player::UpdatePowerRegen(), Player::UpdateQuestObjectiveProgress(), Unit::UpdateStatBuffMod(), Player::UpdateTransmogOutfit(), Player::UpdateTransmogOutfitSlots(), TransmogMgr::ValidateSituations(), TransmogMgr::ValidateSlots(), and npc_demolitionist_legoso::npc_demolitionist_legosoAI::WaypointReached().
| std::string ByteArrayToHexStr | ( | Container const & | c, |
| bool | reverse = false |
||
| ) |
Definition at line 431 of file Util.h.
References Trinity::Impl::ByteArrayToHexStr().
Referenced by AppendTableDump(), Battlenet::AccountMgr::GetSrpUsername(), battlenet_account_commandscript::HandleGameAccountCreateCommand(), Battlenet::LoginRESTService::HandlePostLogin(), Battlenet::LoginRESTService::HandlePostLoginSrpChallenge(), and UpdateFetcher::Update().
|
inline |
Definition at line 72 of file Util.h.
Referenced by spell_monk_stagger::Absorb(), AddPct(), spell_sha_earth_shock::AddScriptedDamageMods(), spell_sha_elemental_blast::AddScriptedDamageMods(), Player::AddSpellMod(), ThreatManager::AddThreat(), Player::ApplyBaseModPctValue(), spell_sha_mastery_elemental_overload_proc::ApplyDamageModifier(), ApplyPct(), Unit::Attack(), Player::BuyItemFromVendorSlot(), Unit::CalcAbsorbResist(), spell_dh_critical_chaos::CalcAmount(), spell_dh_know_your_enemy::CalcAmount(), spell_hun_penetrating_shots::CalcAmount(), spell_mage_improved_combustion::CalcAmount(), spell_rog_swift_slasher::CalcAmount(), Unit::CalcArmorReducedDamage(), spell_dh_consume_soul_vengeance_lesser::CalcHealingFromDamageTaken(), SpellInfo::CalcPowerCost(), spell_doom_lord_kazzak_mark_of_kazzak::CalculateAmount(), spell_dk_anti_magic_shell::CalculateAmount(), spell_pal_shield_of_vengeance::CalculateAmount(), spell_dru_rip::CalculateAmount(), spell_mage_prismatic_barrier::CalculateAmount(), spell_warl_dark_pact::CalculateAmount(), spell_mage_ice_barrier::CalculateAmount(), spell_gen_mixology_bonus::CalculateAmount(), spell_warl_pet_passive::spell_warl_pet_passive_AuraScript::CalculateAmountCritMelee(), spell_warl_pet_passive::spell_warl_pet_passive_AuraScript::CalculateAmountCritSpell(), spell_warl_pet_scaling_03::spell_warl_pet_scaling_03_AuraScript::CalculateArcaneResistanceAmount(), spell_hun_pet_scaling_03::spell_hun_pet_scaling_03_AuraScript::CalculateArcaneResistanceAmount(), spell_warl_pet_scaling_02::spell_warl_pet_scaling_02_AuraScript::CalculateArmorAmount(), spell_hun_pet_scaling_03::spell_hun_pet_scaling_03_AuraScript::CalculateArmorAmount(), spell_warl_pet_scaling_01::spell_warl_pet_scaling_01_AuraScript::CalculateAttackPowerAmount(), spell_hun_pet_scaling_01::spell_hun_pet_scaling_01_AuraScript::CalculateAttackPowerAmount(), AuctionHouseObject::CalculateAuctionHouseCut(), spell_hun_pet_scaling_01::spell_hun_pet_scaling_01_AuraScript::CalculateDamageDoneAmount(), spell_warl_pet_scaling_02::spell_warl_pet_scaling_02_AuraScript::CalculateFireResistanceAmount(), spell_hun_pet_scaling_02::spell_hun_pet_scaling_02_AuraScript::CalculateFireResistanceAmount(), spell_warl_pet_scaling_03::spell_warl_pet_scaling_03_AuraScript::CalculateFrostResistanceAmount(), spell_hun_pet_scaling_02::spell_hun_pet_scaling_02_AuraScript::CalculateFrostResistanceAmount(), spell_warl_pet_scaling_02::spell_warl_pet_scaling_02_AuraScript::CalculateIntellectAmount(), Unit::CalculateMeleeDamage(), AuctionPosting::CalculateMinIncrement(), spell_warl_pet_scaling_03::spell_warl_pet_scaling_03_AuraScript::CalculateNatureResistanceAmount(), spell_hun_pet_scaling_02::spell_hun_pet_scaling_02_AuraScript::CalculateNatureResistanceAmount(), Player::CalculateReputationGain(), spell_warl_pet_scaling_04::spell_warl_pet_scaling_04_AuraScript::CalculateShadowResistanceAmount(), spell_hun_pet_scaling_03::spell_hun_pet_scaling_03_AuraScript::CalculateShadowResistanceAmount(), Unit::CalculateSpellDamageTaken(), AuraEffect::CalculateSpellMod(), spell_warl_pet_scaling_01::spell_warl_pet_scaling_01_AuraScript::CalculateStaminaAmount(), Player::CastItemCombatSpell(), Pet::CastPetAura(), spell_garothi_eradication::ChangeDamage(), spell_sha_maelstrom_weapon_base::ConsumeMaelstromWeapon(), Unit::CountPctFromCurHealth(), Unit::CountPctFromMaxHealth(), Unit::CountPctFromMaxPower(), Unit::DealDamage(), Spell::DelayedChannel(), spell_pri_shadow_word_death::DetermineKillStatus(), Spell::DoSpellEffectHit(), Spell::EffectEnergizePct(), Spell::EffectResurrect(), Spell::EffectResurrectWithAura(), Spell::EffectSelfResurrect(), Unit::GetCombatRatingDamageReduction(), Player::GetSpellModValues(), spell_warl_chaotic_energies::HandleAbsorb(), spell_pri_crystalline_reflection::HandleAfterAbsorb(), spell_dh_charred_warblades::HandleAfterProc(), WorldSession::HandleAuctionRemoveItem(), AuraEffect::HandleAuraModIncreaseHealthPercent(), Aura::HandleAuraSpecificMods(), npc_sparring_partner_enhanced_combat_training_priest::HandleClassEvent(), npc_sparring_partner_enhanced_combat_training_warlock::HandleClassEvent(), npc_sparring_partner_enhanced_combat_training_druid::HandleClassEvent(), spell_pri_shadow_word_death::HandleDeathsTormentEnergize(), spell_dk_death_strike::HandleDummy(), spell_warl_chaos_bolt::HandleDummy(), spell_dru_thorns_of_iron_damage::HandleEffectHit(), spell_pri_sanctuary_trigger::HandleEffectHit(), spell_mage_arcane_barrage::HandleEffectHitTarget(), spell_mandokir_bloodletting::HandleEffectPeriodic(), spell_dk_permafrost::HandleEffectProc(), spell_dru_moonless_night::HandleEffectProc(), spell_mage_tempest_barrier::HandleEffectProc(), spell_pri_vampiric_embrace::HandleEffectProc(), spell_sha_ancestral_guidance::HandleEffectProc(), spell_pri_searing_light::HandleEffectProc(), spell_pri_binding_heals::HandleEffectProc(), spell_dh_darkglare_boon::HandleEffectRemove(), spell_warr_execute::HandleExecuteCast(), spell_pri_expiation::HandleHitTarget(), spell_evo_living_flame::HandleLaunchTarget(), WorldSession::HandleLootMoneyOpcode(), AuraEffect::HandleModTotalPercentStat(), AuraEffect::HandleObsModPowerAuraTick(), spell_warl_healthstone_heal::HandleOnHit(), spell_pri_trail_of_light::HandleOnProc(), spell_argaloth_consuming_darkness::HandlePeriodic(), spell_dru_elunes_favored_proc::HandlePeriodic(), AuraEffect::HandlePeriodicDamageAurasTick(), spell_volkhan_cool_down::HandlePeriodicDummyEffect(), AuraEffect::HandlePeriodicManaLeechAuraTick(), spell_devourer_of_souls_mirrored_soul_proc::HandleProc(), spell_dk_t20_2p_rune_empowered::HandleProc(), spell_yogg_saron_grim_reprisal::spell_yogg_saron_grim_reprisal_AuraScript::HandleProc(), spell_dru_t3_8p_bonus::HandleProc(), spell_dru_t10_balance_4p_bonus::HandleProc(), spell_hun_roar_of_sacrifice::HandleProc(), spell_hun_t29_2p_marksmanship_bonus::HandleProc(), spell_item_blessing_of_ancient_kings::HandleProc(), spell_item_frozen_shadoweave::HandleProc(), spell_item_necrotic_touch::HandleProc(), spell_item_persistent_shield::HandleProc(), spell_item_pet_healing::HandleProc(), spell_mage_ignite::HandleProc(), spell_mage_touch_of_the_magi_aura::HandleProc(), spell_pal_light_s_beacon::HandleProc(), spell_pal_t8_2p_bonus::HandleProc(), spell_warr_brutal_vitality::HandleProc(), spell_warr_critical_thinking::HandleProc(), spell_warr_trauma::HandleProc(), spell_pal_t30_2p_protection_bonus::HandleProc(), spell_pal_execution_sentence_aura::HandleProc(), spell_pri_aq_3p_bonus::HandleProc(), spell_hun_rejuvenating_wind::HandleProc(), spell_dru_astral_smolder::HandleProc(), spell_pri_t10_heal_2p_bonus::HandleProc(), spell_sha_item_mana_surge::HandleProc(), spell_sha_t8_elemental_4p_bonus::HandleProc(), spell_sha_t9_elemental_4p_bonus::HandleProc(), spell_sha_t10_restoration_4p_bonus::HandleProc(), spell_pri_dispersing_light::HandleProc(), spell_warl_siphon_life::HandleProc(), spell_dru_ursocs_fury::HandleProc(), spell_hun_master_marksman::HandleProc(), spell_pri_divine_aegis::HandleProc(), spell_warr_frothing_berserker::HandleProc(), spell_warr_fueled_by_violence::HandleProc(), spell_warr_item_t10_prot_4p_bonus::HandleProc(), spell_dru_wild_growth_aura::HandleTickUpdate(), BattlePets::BattlePetMgr::HealBattlePetsPct(), spell_valanar_kinetic_bomb_absorb::OnAbsorb(), spell_anduin_wrynn_befouled_barrier_absorb::OnHealAbsorb(), spell_blood_queen_essence_of_the_blood_queen::OnProc(), spell_sha_ascendance_restoration::OnProcHeal(), Unit::RecalculateObjectScale(), WorldSession::SendListInventory(), Player::SendSpellModifiers(), Unit::SpellBaseDamageBonusDone(), Unit::SpellBaseHealingBonusDone(), Unit::SpellHealingPctDone(), spell_dk_anti_magic_shell::Trigger(), spell_sha_unrelenting_storms::Trigger(), spell_pri_atonement::TriggerAtonementHealOnTargets(), spell_sha_stormblast_damage::TriggerDamage(), Aura::Update(), Guardian::UpdateArmor(), Player::UpdateArmor(), Player::UpdateAttackPowerAndDamage(), Player::UpdateItemLevelAreaBasedScaling(), Player::UpdateRating(), Guardian::UpdateResistances(), Unit::UpdateSpeed(), and Guardian::UpdateStats().
|
constexpr |
| bool CompareValues | ( | ComparisionType | type, |
| T | val1, | ||
| T | val2 | ||
| ) |
Definition at line 543 of file Util.h.
References ABORT, COMP_TYPE_EQ, COMP_TYPE_HIGH, COMP_TYPE_HIGH_EQ, COMP_TYPE_LOW, and COMP_TYPE_LOW_EQ.
Referenced by Condition::Meets().
| TC_COMMON_API bool consoleToUtf8 | ( | std::string_view | conStr, |
| std::string & | utf8str | ||
| ) |
Definition at line 692 of file Util.cpp.
References WStrToUtf8().
| TC_COMMON_API uint32 CreatePIDFile | ( | std::string const & | filename | ) |
| TC_COMMON_API float DegToRad | ( | float | degrees | ) |
Definition at line 880 of file Util.cpp.
References M_PI.
Referenced by ObjectMgr::LoadWorldSafeLocs(), and Spell::SelectImplicitConeTargets().
| TC_COMMON_API time_t GetLocalHourTimestamp | ( | time_t | time, |
| uint8 | hour, | ||
| bool | onlyAfterTime = true |
||
| ) |
Definition at line 101 of file Util.cpp.
References DAY, HOUR, and TimeBreakdown().
Referenced by GetNextDailyResetTime(), World::InitCalendarOldEventsDeletionTime(), and World::TriggerGuidWarning().
| TC_COMMON_API std::wstring GetMainPartOfName | ( | std::wstring const & | wname, |
| uint32 | declension | ||
| ) |
Definition at line 622 of file Util.cpp.
References isCyrillicCharacter().
Referenced by ObjectMgr::CheckDeclinedNames().
|
inline |
Definition at line 78 of file Util.h.
References ASSERT.
Referenced by spell_pri_harsh_discipline::HandleEffectHit(), AuraEffect::HandleTriggerSpellOnPowerPercent(), CriteriaHandler::ModifierSatisfied(), and Unit::TriggerOnPowerChangeAuras().
| TC_COMMON_API uint32 GetPID | ( | ) |
Definition at line 291 of file Util.cpp.
Referenced by CreatePIDFile(), and Battlenet::Services::V1::Connection::HandleConnect().
| std::array< uint8, Size > HexStrToByteArray | ( | std::string_view | str, |
| bool | reverse = false |
||
| ) |
Definition at line 442 of file Util.h.
References HexStrToByteArray().
| void HexStrToByteArray | ( | std::string_view | str, |
| std::array< uint8, Size > & | buf, | ||
| bool | reverse = false |
||
| ) |
Definition at line 437 of file Util.h.
References Trinity::Impl::HexStrToByteArray().
Referenced by HexStrToByteArray().
|
inline |
Definition at line 449 of file Util.h.
References Trinity::Impl::HexStrToByteArray().
Referenced by ConditionMgr::IsMeetingWorldStateExpression().
|
inline |
Definition at line 121 of file Util.h.
Referenced by isBasicLatinString(), isExtendedLatinCharacter(), isLatin1Character(), and WcharToUpperOnlyLatin::operator()().
|
inline |
Definition at line 231 of file Util.h.
References isBasicLatinCharacter(), and isNumericOrSpace().
Referenced by isValidString().
|
inline |
Definition at line 194 of file Util.h.
Referenced by isChineseString().
|
inline |
Definition at line 263 of file Util.h.
References isChineseCharacter(), and isNumericOrSpace().
Referenced by isValidString().
|
inline |
Definition at line 172 of file Util.h.
Referenced by GetMainPartOfName(), WorldSession::HandleSetPlayerDeclinedNames(), and isCyrillicString().
|
inline |
Definition at line 247 of file Util.h.
References isCyrillicCharacter(), and isNumericOrSpace().
Referenced by isValidString().
|
inline |
Definition at line 130 of file Util.h.
References isBasicLatinCharacter().
Referenced by isExtendedLatinString().
|
inline |
Definition at line 239 of file Util.h.
References isExtendedLatinCharacter(), and isNumericOrSpace().
Referenced by isValidString().
|
inline |
Definition at line 181 of file Util.h.
Referenced by isKoreanString().
|
inline |
Definition at line 255 of file Util.h.
References isKoreanCharacter(), and isNumericOrSpace().
Referenced by isValidString().
|
inline |
Definition at line 151 of file Util.h.
References isBasicLatinCharacter().
|
inline |
|
inline |
Definition at line 217 of file Util.h.
References isNumeric().
|
inline |
Definition at line 207 of file Util.h.
Referenced by misc_commandscript::HandleFreezeCommand(), isNumeric(), isNumericOrSpace(), and server_commandscript::ShutdownServer().
|
inline |
Definition at line 226 of file Util.h.
References isNumeric().
Referenced by isBasicLatinString(), isChineseString(), isCyrillicString(), isExtendedLatinString(), and isKoreanString().
|
inline |
Definition at line 352 of file Util.h.
References isLower().
Referenced by LanguageMgr::Translate().
| TC_COMMON_API Optional< int64 > MoneyStringToMoney | ( | std::string const & | moneyString | ) |
Definition at line 180 of file Util.cpp.
References Trinity::Tokenize().
Referenced by modify_commandscript::HandleModifyMoneyCommand().
| TC_COMMON_API bool ReadWinConsole | ( | std::string & | str, |
| size_t | size = 256 |
||
| ) |
| TC_COMMON_API Optional< std::size_t > RemoveCRLF | ( | std::string & | str | ) |
Definition at line 797 of file Util.cpp.
Referenced by CliThread(), and LoadGameTable().
|
inline |
Definition at line 97 of file Util.h.
Referenced by Unit::CalcAbsorbResist(), Unit::CalcArmorReducedDamage(), Aura::CalcDispelChance(), Unit::CalcHealAbsorb(), Aura::CalcPPMProcChance(), Unit::DealMeleeDamage(), Creature::GetLevelForTarget(), WorldObject::MagicSpellHitResult(), and Spell::TriggerGlobalCooldown().
| TC_COMMON_API std::string secsToTimeString | ( | uint64 | timeInSecs, |
| TimeFormat | timeFormat = TimeFormat::FullText, |
||
| bool | hoursOnly = false |
||
| ) |
Definition at line 116 of file Util.cpp.
References DAY, FullText, HOUR, MINUTE, Numeric, ShortText, Trinity::StringFormat(), and Trinity::StringFormatTo().
Referenced by BugTicket::FormatViewMessageString(), ComplaintTicket::FormatViewMessageString(), SuggestionTicket::FormatViewMessageString(), ban_commandscript::HandleBanCharacterCommand(), ban_commandscript::HandleBanHelper(), ban_commandscript::HandleBanInfoCharacterCommand(), ban_commandscript::HandleBanInfoHelper(), ban_commandscript::HandleBanInfoIPCommand(), WorldSession::HandleChatMessage(), event_commandscript::HandleEventInfoCommand(), gobject_commandscript::HandleGameObjectTargetCommand(), instance_commandscript::HandleInstanceListBindsCommand(), instance_commandscript::HandleInstanceUnbindCommand(), list_commandscript::HandleListRespawnsCommand(), npc_commandscript::HandleNpcInfoCommand(), misc_commandscript::HandlePInfoCommand(), server_commandscript::HandleServerInfoCommand(), WorldSession::HandleTextEmoteOpcode(), main(), and World::ShutdownMsg().
| TC_COMMON_API bool StringCompareLessI | ( | std::string_view | a, |
| std::string_view | b | ||
| ) |
Definition at line 860 of file Util.cpp.
References charToLower.
Referenced by StringCompareLessI_T::operator()().
| TC_COMMON_API bool StringContainsStringI | ( | std::string_view | haystack, |
| std::string_view | needle | ||
| ) |
Definition at line 854 of file Util.cpp.
Referenced by arena_commandscript::HandleArenaLookupCommand(), message_commandscript::HandleChannelSetOwnership(), go_commandscript::HandleGoBossCommand(), go_commandscript::HandleGoInstanceCommand(), PlayerDump::InitializeTables(), and StringContainsStringI_T::operator()().
| TC_COMMON_API bool StringEqualI | ( | std::string_view | str1, |
| std::string_view | str2 | ||
| ) |
Definition at line 849 of file Util.cpp.
Referenced by StringStartsWithI().
| TC_COMMON_API void StringReplaceAll | ( | std::string * | str, |
| std::string_view | text, | ||
| std::string_view | replacement | ||
| ) |
Definition at line 865 of file Util.cpp.
Referenced by Metric::FormatInfluxDBTagValue(), Metric::FormatInfluxDBValue(), ChatHandler::SendSysMessage(), AddonChannelCommandHandler::SendSysMessage(), and StringReplaceAll().
|
inline |
Definition at line 480 of file Util.h.
References StringReplaceAll().
|
inline |
Definition at line 461 of file Util.h.
Referenced by cast_commandscript::GetTriggerFlags().
|
inline |
Definition at line 462 of file Util.h.
References StringEqualI().
Referenced by Trinity::Impl::ChatCommands::FilteredCommandListIterator::_skip(), and Trinity::Impl::ChatCommands::EnumArgInfoBase::Match().
| TC_COMMON_API void strToLower | ( | std::string & | str | ) |
Definition at line 435 of file Util.cpp.
References charToLower.
Referenced by DB2Manager::GetPowerTypeByName(), and IpLocationStore::Load().
| TC_COMMON_API void strToUpper | ( | std::string & | str | ) |
Definition at line 434 of file Util.cpp.
References charToUpper.
| TC_COMMON_API tm TimeBreakdown | ( | time_t | t | ) |
Definition at line 94 of file Util.cpp.
Referenced by GetLocalHourTimestamp(), GetNextMonthlyResetTime(), GetNextWeeklyResetTime(), and Trinity::Timezone::GetSystemZoneOffsetAt().
| TC_COMMON_API uint32 TimeStringToSecs | ( | std::string const & | timestring | ) |
Definition at line 222 of file Util.cpp.
References DAY, HOUR, and MINUTE.
Referenced by World::BanAccount(), World::BanCharacter(), ban_commandscript::HandleBanCharacterCommand(), ban_commandscript::HandleBanHelper(), and server_commandscript::ShutdownServer().
| TC_COMMON_API std::string TimeToHumanReadable | ( | time_t | t | ) |
Definition at line 267 of file Util.cpp.
Referenced by debug_commandscript::HandleDebugQuestResetCommand().
| TC_COMMON_API std::string TimeToTimestampStr | ( | time_t | t | ) |
Definition at line 254 of file Util.cpp.
References Trinity::StringFormat().
Referenced by Log::GetTimestampStr(), ban_commandscript::HandleBanInfoCharacterCommand(), character_commandscript::HandleCharacterDeletedListHelper(), event_commandscript::HandleEventInfoCommand(), guild_commandscript::HandleGuildListCommand(), and list_commandscript::HandleListMailCommand().
| TC_COMMON_API bool Utf8FitTo | ( | std::string_view | str, |
| std::wstring_view | search | ||
| ) |
Definition at line 707 of file Util.cpp.
References Utf8toWStr(), and wstrToLower().
Referenced by learn_commandscript::HandleLearnAllRecipesCommand(), lookup_commandscript::HandleLookupAreaCommand(), lookup_commandscript::HandleLookupCreatureCommand(), lookup_commandscript::HandleLookupEventCommand(), lookup_commandscript::HandleLookupFactionCommand(), lookup_commandscript::HandleLookupItemCommand(), lookup_commandscript::HandleLookupItemSetCommand(), lookup_commandscript::HandleLookupMapCommand(), lookup_commandscript::HandleLookupObjectCommand(), lookup_commandscript::HandleLookupQuestCommand(), lookup_commandscript::HandleLookupSkillCommand(), lookup_commandscript::HandleLookupSpellCommand(), lookup_commandscript::HandleLookupTaxiNodeCommand(), lookup_commandscript::HandleLookupTitleCommand(), WorldSession::HandleWhoOpcode(), and list_commandscript::ShouldListAura().
| TC_COMMON_API size_t utf8length | ( | std::string & | utf8str | ) |
Definition at line 302 of file Util.cpp.
Referenced by AccountMgr::ChangeEmail(), AccountMgr::ChangePassword(), Battlenet::AccountMgr::ChangePassword(), AccountMgr::ChangeRegEmail(), AccountMgr::ChangeUsername(), AccountMgr::CreateAccount(), Battlenet::AccountMgr::CreateBattlenetAccount(), and WorldSession::HandleJoinChannel().
| TC_COMMON_API void utf8printf | ( | FILE * | out, |
| const char * | str, | ||
| ... | |||
| ) |
Definition at line 723 of file Util.cpp.
References vutf8printf().
| TC_COMMON_API bool utf8ToConsole | ( | std::string_view | utf8str, |
| std::string & | conStr | ||
| ) |
Definition at line 675 of file Util.cpp.
References Utf8toWStr().
| TC_COMMON_API bool Utf8ToUpperOnlyLatin | ( | std::string & | utf8String | ) |
Definition at line 752 of file Util.cpp.
References Utf8toWStr(), wcharToUpperOnlyLatin, and WStrToUtf8().
Referenced by AccountMgr::ChangeEmail(), AccountMgr::ChangePassword(), AccountMgr::ChangeRegEmail(), AccountMgr::ChangeUsername(), RASession::CheckAccessLevel(), AccountMgr::CheckEmail(), AccountMgr::CheckPassword(), AccountMgr::CheckPassword(), Battlenet::AccountMgr::CheckPassword(), AccountMgr::CreateAccount(), Battlenet::AccountMgr::CreateBattlenetAccount(), Battlenet::AccountMgr::GetSrpUsername(), account_commandscript::HandleAccountDeleteCommand(), account_commandscript::HandleAccountSet2FACommand(), account_commandscript::HandleAccountSetAddonCommand(), account_commandscript::HandleAccountSetEmailCommand(), account_commandscript::HandleAccountSetPasswordCommand(), battlenet_account_commandscript::HandleAccountSetPasswordCommand(), account_commandscript::HandleAccountSetRegEmailCommand(), account_commandscript::HandleAccountSetSecLevelCommand(), ban_commandscript::HandleBanHelper(), ban_commandscript::HandleBanInfoAccountCommand(), debug_commandscript::HandleDebugQuestResetCommand(), lookup_commandscript::HandleLookupPlayerAccountCommand(), misc_commandscript::HandleMuteHistoryCommand(), Battlenet::LoginRESTService::HandlePostLogin(), Battlenet::LoginRESTService::HandlePostLoginSrpChallenge(), ban_commandscript::HandleUnBanHelper(), PlayerDump::InitializeTables(), StringsEqualCaseInsensitive(), and Trinity::ChatCommands::AccountIdentifier::TryConsume().
| TC_COMMON_API bool Utf8toWStr | ( | char const * | utf8str, |
| size_t | csize, | ||
| wchar_t * | wstr, | ||
| size_t & | wsize | ||
| ) |
Definition at line 336 of file Util.cpp.
References Trinity::CheckedBufferOutputIterator< T >::remaining().
Referenced by AuctionHouseObject::AddAuction(), ObjectMgr::AddGameTele(), ObjectMgr::CheckDeclinedNames(), ObjectMgr::CheckPetName(), ObjectMgr::CheckPlayerName(), ChannelMgr::CreateCustomChannel(), ObjectMgr::DeleteGameTele(), ChannelMgr::GetChannel(), ChannelMgr::GetChannelForPlayerByNamePart(), ChannelMgr::GetCustomChannel(), ObjectMgr::GetGameTele(), ObjectMgr::GetGameTeleExactName(), WorldSession::HandleAuctionBrowseQuery(), lookup_commandscript::HandleLookupAreaCommand(), lookup_commandscript::HandleLookupCreatureCommand(), lookup_commandscript::HandleLookupEventCommand(), lookup_commandscript::HandleLookupFactionCommand(), lookup_commandscript::HandleLookupItemCommand(), lookup_commandscript::HandleLookupItemSetCommand(), lookup_commandscript::HandleLookupMapCommand(), lookup_commandscript::HandleLookupObjectCommand(), lookup_commandscript::HandleLookupQuestCommand(), lookup_commandscript::HandleLookupSkillCommand(), lookup_commandscript::HandleLookupSpellCommand(), lookup_commandscript::HandleLookupTaxiNodeCommand(), lookup_commandscript::HandleLookupTeleCommand(), lookup_commandscript::HandleLookupTitleCommand(), modify_commandscript::HandleModifyRepCommand(), WorldSession::HandlePetRename(), WorldSession::HandleSetPlayerDeclinedNames(), WorldSession::HandleWhoOpcode(), DB2Manager::IndexLoadedStores(), ObjectMgr::IsReservedName(), ObjectMgr::IsValidCharterName(), ChannelMgr::LoadFromDB(), ObjectMgr::LoadGameTele(), ObjectMgr::LoadReservedPlayersNames(), normalizePlayerName(), LanguageMgr::Translate(), Trinity::ChatCommands::WTail::TryConsume(), Trinity::Impl::ChatCommands::ArgInfo< std::wstring >::TryConsume(), WhoListStorageMgr::Update(), Utf8FitTo(), utf8ToConsole(), Utf8ToUpperOnlyLatin(), vutf8printf(), and WriteWinConsole().
| TC_COMMON_API bool Utf8toWStr | ( | std::string_view | utf8str, |
| std::wstring & | wstr | ||
| ) |
Definition at line 370 of file Util.cpp.
Referenced by Utf8toWStr().
|
inline |
Definition at line 108 of file Util.h.
References Utf8toWStr().
| TC_COMMON_API void utf8truncate | ( | std::string & | utf8str, |
| size_t | len | ||
| ) |
Definition at line 315 of file Util.cpp.
Referenced by PlayerSocial::SetFriendNote(), and Guild::BankTab::SetText().
| TC_COMMON_API void vutf8printf | ( | FILE * | out, |
| const char * | str, | ||
| va_list * | ap | ||
| ) |
| TC_COMMON_API bool WriteWinConsole | ( | std::string_view | str, |
| bool | error = false |
||
| ) |
Definition at line 783 of file Util.cpp.
References Utf8toWStr().
Referenced by AppenderConsole::Print(), and utf8print().
| TC_COMMON_API std::wstring wstrCaseAccentInsensitiveParse | ( | std::wstring_view | wstr, |
| LocaleConstant | locale | ||
| ) |
Definition at line 437 of file Util.cpp.
References LOCALE_deDE, LOCALE_esES, LOCALE_esMX, LOCALE_frFR, LOCALE_itIT, LOCALE_ptBR, LOCALE_ruRU, wcharToLower, and wstrToLower().
Referenced by AuctionHouseObject::AddAuction().
| TC_COMMON_API void wstrToLower | ( | std::wstring & | str | ) |
Definition at line 433 of file Util.cpp.
References wcharToLower.
Referenced by ObjectMgr::AddGameTele(), ObjectMgr::CheckPlayerName(), ChannelMgr::CreateCustomChannel(), ObjectMgr::DeleteGameTele(), ChannelMgr::GetChannel(), ChannelMgr::GetChannelForPlayerByNamePart(), ChannelMgr::GetCustomChannel(), ObjectMgr::GetGameTele(), ObjectMgr::GetGameTeleExactName(), learn_commandscript::HandleLearnAllRecipesCommand(), lookup_commandscript::HandleLookupAreaCommand(), lookup_commandscript::HandleLookupCreatureCommand(), lookup_commandscript::HandleLookupEventCommand(), lookup_commandscript::HandleLookupFactionCommand(), lookup_commandscript::HandleLookupItemCommand(), lookup_commandscript::HandleLookupItemSetCommand(), lookup_commandscript::HandleLookupMapCommand(), lookup_commandscript::HandleLookupObjectCommand(), lookup_commandscript::HandleLookupQuestCommand(), lookup_commandscript::HandleLookupSkillCommand(), lookup_commandscript::HandleLookupSpellCommand(), lookup_commandscript::HandleLookupTaxiNodeCommand(), lookup_commandscript::HandleLookupTeleCommand(), lookup_commandscript::HandleLookupTitleCommand(), modify_commandscript::HandleModifyRepCommand(), WorldSession::HandleWhoOpcode(), ObjectMgr::IsReservedName(), list_commandscript::ListAurasCommand(), ObjectMgr::LoadGameTele(), ObjectMgr::LoadReservedPlayersNames(), normalizePlayerName(), WhoListStorageMgr::Update(), Utf8FitTo(), and wstrCaseAccentInsensitiveParse().
| TC_COMMON_API void wstrToUpper | ( | std::wstring & | str | ) |
Definition at line 432 of file Util.cpp.
References wcharToUpper.
| TC_COMMON_API bool WStrToUtf8 | ( | std::wstring_view | wstr, |
| std::string & | utf8str | ||
| ) |
| TC_COMMON_API bool WStrToUtf8 | ( | wchar_t const * | wstr, |
| size_t | size, | ||
| std::string & | utf8str | ||
| ) |
Definition at line 386 of file Util.cpp.
Referenced by consoleToUtf8(), normalizePlayerName(), ReadWinConsole(), and Utf8ToUpperOnlyLatin().
| struct CharToLower charToLower |
| struct CharToUpper charToUpper |
| struct CStringSentinel_T CStringSentinel |
| struct WcharToLower wcharToLower |
Referenced by wstrCaseAccentInsensitiveParse(), and wstrToLower().
| struct WcharToUpper wcharToUpper |
Referenced by normalizePlayerName(), WcharToUpperOnlyLatin::operator()(), and wstrToUpper().
| struct WcharToUpperOnlyLatin wcharToUpperOnlyLatin |
Referenced by Utf8ToUpperOnlyLatin().