|
Project SkyFire Core
SkyFire 5.4.8 server core API documentation
|
#include "Define.h"#include "Errors.h"#include "NetworkAddress.h"#include <algorithm>#include <list>#include <string>#include <vector>Go to the source code of this file.
Classes | |
| struct | Finder< T, S > |
| class | flag128 |
| class | flag96 |
| class | HookList< T > |
| class | Tokenizer |
Namespaces | |
| namespace | SkyFire |
| namespace | SkyFire::Impl |
Macros | |
| #define | _FLAG96 |
Enumerations | |
| enum | ComparisionType { COMP_TYPE_EQ = 0 , COMP_TYPE_HIGH , COMP_TYPE_LOW , COMP_TYPE_HIGH_EQ , COMP_TYPE_LOW_EQ , COMP_TYPE_MAX } |
Functions | |
| template<class T, class U> | |
| T | AddPct (T &base, U pct) |
| template<class T, class U> | |
| T | ApplyPct (T &base, U pct) |
| void | ApplyPercentModFloatVar (float &var, float val, bool apply) |
| template<typename Container> | |
| std::string | ByteArrayToHexStr (Container const &c, bool reverse=false) |
| std::string | SkyFire::Impl::ByteArrayToHexStr (uint8 const *bytes, size_t length, bool reverse=false) |
| template<class T, class U> | |
| T | CalculatePct (T base, U pct) |
| template<class T> | |
| bool | CompareValues (ComparisionType type, T val1, T val2) |
| bool | consoleToUtf8 (const std::string &conStr, std::string &utf8str) |
| uint32 | CreatePIDFile (const std::string &filename) |
| create PID file | |
| float | frand (float min, float max) |
| std::string | GetAddressString (Skyfire::Net::Address const &addr) |
| Transforms network address into string format "dotted_ip:port". | |
| std::wstring | GetMainPartOfName (std::wstring wname, uint32 declension) |
| template<size_t Size> | |
| std::array< uint8, Size > | HexStrToByteArray (std::string const &str, bool reverse=false) |
| template<size_t Size> | |
| void | HexStrToByteArray (std::string const &str, std::array< uint8, Size > &buf, bool reverse=false) |
| void | SkyFire::Impl::HexStrToByteArray (std::string const &str, uint8 *out, size_t outlen, bool reverse=false) |
| bool | isBasicLatinCharacter (wchar_t wchar) |
| bool | isBasicLatinString (const std::wstring &wstr, bool numericOrSpace) |
| bool | isCyrillicCharacter (wchar_t wchar) |
| bool | isCyrillicString (const std::wstring &wstr, bool numericOrSpace) |
| bool | isEastAsianCharacter (wchar_t wchar) |
| bool | isEastAsianString (const std::wstring &wstr, bool numericOrSpace) |
| bool | isExtendedLatinCharacter (wchar_t wchar) |
| bool | isExtendedLatinString (const std::wstring &wstr, bool numericOrSpace) |
| bool | IsIPAddress (char const *ipaddress) |
| Check if the string is a valid ip address representation. | |
| bool | IsIPAddrInNetwork (Skyfire::Net::Address const &net, Skyfire::Net::Address const &addr, Skyfire::Net::Address const &subnetMask) |
| Checks if address belongs to the a network with specified submask. | |
| bool | isNumeric (char c) |
| bool | isNumeric (char const *str) |
| bool | isNumeric (wchar_t wchar) |
| bool | isNumericOrSpace (wchar_t wchar) |
| int64 | MoneyStringToMoney (const std::string &moneyString) |
| int32 | rand32 () |
| double | rand_chance (void) |
| double | rand_norm (void) |
| bool | roll_chance_f (float chance) |
| bool | roll_chance_i (int chance) |
| template<class T> | |
| T | RoundToInterval (T &num, T floor, T ceil) |
| std::string | secsToTimeString (uint64 timeInSecs, bool shortText=false, bool hoursOnly=false) |
| void | stripLineInvisibleChars (std::string &src) |
| uint32 | TimeStringToSecs (const std::string ×tring) |
| std::string | TimeToTimestampStr (time_t t) |
| bool | Utf8FitTo (const std::string &str, const std::wstring &search) |
| size_t | utf8length (std::string &utf8str) |
| void | utf8printf (FILE *out, const char *str,...) |
| bool | utf8ToConsole (const std::string &utf8str, std::string &conStr) |
| bool | Utf8toWStr (char const *utf8str, size_t csize, wchar_t *wstr, size_t &wsize) |
| bool | Utf8toWStr (const std::string &utf8str, std::wstring &wstr) |
| bool | Utf8toWStr (const std::string &utf8str, wchar_t *wstr, size_t &wsize) |
| void | utf8truncate (std::string &utf8str, size_t len) |
| void | vutf8printf (FILE *out, const char *str, va_list *ap) |
| wchar_t | wcharToLower (wchar_t wchar) |
| wchar_t | wcharToUpper (wchar_t wchar) |
| wchar_t | wcharToUpperOnlyLatin (wchar_t wchar) |
| void | wstrToLower (std::wstring &str) |
| void | wstrToUpper (std::wstring &str) |
| bool | WStrToUtf8 (const std::wstring &wstr, std::string &utf8str) |
| bool | WStrToUtf8 (wchar_t *wstr, size_t size, std::string &utf8str) |
| enum ComparisionType |
|
inline |
Definition at line 109 of file Util.h.
References CalculatePct().
Referenced by KillRewarder::_RewardXP(), Player::AddSpellMod(), HostileReference::addThreatPercent(), Unit::CalcAbsorbResist(), Unit::CalcArmorReducedDamage(), spell_pri_lightwell_renew::spell_pri_lightwell_renew_AuraScript::CalculateAmount(), Unit::CalculateLevelPenalty(), Unit::CalculateMeleeDamage(), Unit::CalculateSpellDamageTaken(), spell_hun_pet_scaling_01::spell_hun_pet_scaling_01_AuraScript::CalculateStaminaAmount(), Spell::Delayed(), Spell::DelayedChannel(), Spell::EffectEnergize(), Spell::EffectHeal(), Spell::EffectSchoolDMG(), Spell::EffectWeaponDmg(), Unit::GetTotalAuraMultiplier(), Unit::GetTotalAuraMultiplierByAffectMask(), Unit::GetTotalAuraMultiplierByMiscMask(), Unit::GetTotalAuraMultiplierByMiscValue(), spell_mastery_blood_shield::spell_mastery_blood_shield_SpellScript::HandleAfterHit(), spell_dk_death_strike::spell_dk_death_strike_SpellScript::HandleDummy(), spell_dk_scourge_strike::spell_dk_scourge_strike_SpellScript::HandleDummy(), spell_sha_healing_stream_totem::spell_sha_healing_stream_totem_SpellScript::HandleDummy(), spell_sha_lava_lash::spell_sha_lava_lash_SpellScript::HandleDummy(), spell_warl_life_tap::spell_warl_life_tap_SpellScript::HandleDummy(), Unit::HandleDummyAuraProc(), spell_pri_prayer_of_mending_heal::spell_pri_prayer_of_mending_heal_SpellScript::HandleHeal(), AuraEffect::HandlePeriodicHealAurasTick(), Unit::MeleeDamageBonusDone(), Unit::MeleeDamageBonusTaken(), Unit::ModSpellDuration(), Creature::Regenerate(), Player::Regenerate(), Creature::RegenerateHealth(), Player::RegenerateHealth(), Creature::RegenerateMana(), Player::RewardHonor(), Player::RewardQuest(), Unit::RewardRage(), Unit::SpellCriticalDamageBonus(), Unit::SpellDamageBonusDone(), Unit::SpellDamageBonusTaken(), Unit::SpellHealingBonusDone(), Unit::SpellHealingBonusTaken(), Guardian::UpdateDamagePhysical(), and Unit::UpdateSpeed().
|
inline |
Definition at line 115 of file Util.h.
References CalculatePct().
Referenced by Unit::CalcSpellResistance(), Spell::EffectDestroyAllTotems(), Spell::EffectSchoolDMG(), Spell::EffectWeaponDmg(), Unit::HandleDummyAuraProc(), Unit::isSpellCrit(), and Player::RegenerateHealth().
|
inline |
Definition at line 94 of file Util.h.
Referenced by Unit::ApplyAttackTimePercentMod(), Object::ApplyPercentModFloatValue(), AuraEffect::HandleAuraModScale(), Player::HandleBaseModValue(), AuraEffect::HandleModThreat(), Unit::HandleStatModifier(), and Unit::ModifyPowerPct().
| std::string ByteArrayToHexStr | ( | Container const & | c, |
| bool | reverse = false ) |
Definition at line 344 of file Util.h.
References SkyFire::Impl::ByteArrayToHexStr().
|
inline |
Definition at line 103 of file Util.h.
Referenced by KillRewarder::_RewardXP(), spell_dk_anti_magic_shell_raid::spell_dk_anti_magic_shell_raid_AuraScript::Absorb(), spell_dk_anti_magic_shell_self::spell_dk_anti_magic_shell_self_AuraScript::Absorb(), spell_dk_anti_magic_zone::spell_dk_anti_magic_zone_AuraScript::Absorb(), spell_dru_savage_defense::spell_dru_savage_defense_AuraScript::Absorb(), AddPct(), ApplyPct(), Player::ApplySpellMod(), Player::BuyItemFromVendorSlot(), Unit::CalcAbsorbResist(), Unit::CalcArmorReducedDamage(), spell_dru_innervate::spell_dru_innervate_AuraScript::CalculateAmount(), spell_mark_of_kazzak::spell_mark_of_kazzak_AuraScript::CalculateAmount(), spell_pri_power_word_shield::spell_pri_power_word_shield_AuraScript::CalculateAmount(), spell_sha_mana_tide_totem::spell_sha_mana_tide_totem_AuraScript::CalculateAmount(), spell_warl_pet_passive::spell_warl_pet_passive_AuraScript::CalculateAmountCritMelee(), spell_warl_pet_passive::spell_warl_pet_passive_AuraScript::CalculateAmountCritSpell(), spell_hun_pet_scaling_03::spell_hun_pet_scaling_03_AuraScript::CalculateArcaneResistanceAmount(), spell_warl_pet_scaling_03::spell_warl_pet_scaling_03_AuraScript::CalculateArcaneResistanceAmount(), spell_hun_pet_scaling_03::spell_hun_pet_scaling_03_AuraScript::CalculateArmorAmount(), spell_warl_pet_scaling_02::spell_warl_pet_scaling_02_AuraScript::CalculateArmorAmount(), spell_hun_pet_scaling_01::spell_hun_pet_scaling_01_AuraScript::CalculateAttackPowerAmount(), spell_warl_pet_scaling_01::spell_warl_pet_scaling_01_AuraScript::CalculateAttackPowerAmount(), spell_rog_recuperate::spell_rog_recuperate_AuraScript::CalculateBonus(), spell_hun_pet_scaling_01::spell_hun_pet_scaling_01_AuraScript::CalculateDamageDoneAmount(), spell_hun_pet_scaling_02::spell_hun_pet_scaling_02_AuraScript::CalculateFireResistanceAmount(), spell_warl_pet_scaling_02::spell_warl_pet_scaling_02_AuraScript::CalculateFireResistanceAmount(), spell_hun_pet_scaling_02::spell_hun_pet_scaling_02_AuraScript::CalculateFrostResistanceAmount(), spell_warl_pet_scaling_03::spell_warl_pet_scaling_03_AuraScript::CalculateFrostResistanceAmount(), spell_warl_pet_scaling_02::spell_warl_pet_scaling_02_AuraScript::CalculateIntellectAmount(), Unit::CalculateMeleeDamage(), spell_hun_pet_scaling_02::spell_hun_pet_scaling_02_AuraScript::CalculateNatureResistanceAmount(), spell_warl_pet_scaling_03::spell_warl_pet_scaling_03_AuraScript::CalculateNatureResistanceAmount(), Player::CalculateReputationGain(), spell_hun_pet_scaling_03::spell_hun_pet_scaling_03_AuraScript::CalculateShadowResistanceAmount(), spell_warl_pet_scaling_04::spell_warl_pet_scaling_04_AuraScript::CalculateShadowResistanceAmount(), Unit::CalculateSpellDamageTaken(), Skyfire::Spells::CalculateSpellPowerCosts(), spell_warl_pet_scaling_01::spell_warl_pet_scaling_01_AuraScript::CalculateStaminaAmount(), spell_dk_pet_scaling_01::spell_dk_pet_scaling_01_AuraScript::CalculateStrengthAmount(), Pet::CastPetAura(), Unit::CountPctFromCurHealth(), Unit::CountPctFromMaxHealth(), Unit::CountPctFromMaxPower(), boss_algalon_the_observer::boss_algalon_the_observerAI::DamageTaken(), Unit::DealDamage(), Spell::DelayedChannel(), ThreatManager::doAddThreat(), Spell::EffectEnergize(), Spell::EffectEnergizePct(), Spell::EffectPowerBurn(), Spell::EffectResurrect(), Spell::EffectResurrectWithAura(), Spell::EffectSchoolDMG(), Spell::EffectSelfResurrect(), AuctionEntry::GetAuctionCut(), AuctionHouseMgr::GetAuctionDeposit(), AuctionEntry::GetAuctionOutBid(), Unit::GetCombatRatingDamageReduction(), spell_pri_renew::spell_pri_renew_AuraScript::HandleApplyEffect(), Unit::HandleAuraProc(), Aura::HandleAuraSpecificMods(), spell_dk_death_strike::spell_dk_death_strike_SpellScript::HandleDummy(), spell_warl_life_tap::spell_warl_life_tap_SpellScript::HandleDummy(), spell_warr_concussion_blow::spell_warr_concussion_blow_SpellScript::HandleDummy(), Unit::HandleDummyAuraProc(), spell_pal_eye_for_an_eye::spell_pal_eye_for_an_eye_AuraScript::HandleEffectProc(), spell_pri_vampiric_embrace::spell_pri_vampiric_embrace_AuraScript::HandleEffectProc(), spell_sha_ancestral_awakening::spell_sha_ancestral_awakening_AuraScript::HandleEffectProc(), spell_sha_glyph_of_healing_wave::spell_sha_glyph_of_healing_wave_AuraScript::HandleEffectProc(), spell_sha_telluric_currents::spell_sha_telluric_currents_AuraScript::HandleEffectProc(), spell_sha_chain_heal::spell_sha_chain_heal_SpellScript::HandleHeal(), WorldSession::HandleLootMoneyOpcode(), AuraEffect::HandleModPowerCostPCT(), spell_monk_fortifying_brew::spell_monk_fortifying_brew_SpellScript::HandleOnHit(), spell_warl_healthstone_heal::spell_warl_healthstone_heal_SpellScript::HandleOnHit(), AuraEffect::HandlePeriodicManaLeechAuraTick(), spell_devourer_of_souls_mirrored_soul_proc::spell_devourer_of_souls_mirrored_soul_proc_AuraScript::HandleProc(), spell_dk_blood_gorged::spell_dk_blood_gorged_AuraScript::HandleProc(), spell_dru_living_seed::spell_dru_living_seed_AuraScript::HandleProc(), spell_item_blessing_of_ancient_kings::spell_item_blessing_of_ancient_kings_AuraScript::HandleProc(), spell_item_necrotic_touch::spell_item_necrotic_touch_AuraScript::HandleProc(), spell_mage_ignite::spell_mage_ignite_AuraScript::HandleProc(), spell_pal_beacon_of_light::spell_pal_beacon_of_light_AuraScript::HandleProc(), spell_pri_divine_aegis::spell_pri_divine_aegis_AuraScript::HandleProc(), spell_yogg_saron_grim_reprisal::spell_yogg_saron_grim_reprisal_AuraScript::HandleProc(), Unit::HandleProcTriggerSpell(), Unit::MeleeDamageBonusTaken(), spell_valanar_kinetic_bomb_absorb::spell_valanar_kinetic_bomb_absorb_AuraScript::OnAbsorb(), spell_blood_queen_essence_of_the_blood_queen::spell_blood_queen_essence_of_the_blood_queen_AuraScript::OnProc(), spell_warl_fel_synergy::spell_warl_fel_synergy_AuraScript::OnProc(), Spell::prepare(), spell_mage_pyroblast::spell_mage_pyroblast_SpellScript::RecalculateDamage(), spell_pri_power_word_shield::spell_pri_power_word_shield_AuraScript::ReflectDamage(), Player::Regenerate(), WorldSession::SendListInventory(), OPvPCapturePoint::SetCapturePointData(), Unit::SpellBaseDamageBonusDone(), Unit::SpellBaseHealingBonusDone(), Unit::SpellDamageBonusTaken(), Guardian::UpdateArmor(), Player::UpdateAttackPowerAndDamage(), Player::UpdateManaRegen(), Player::UpdateRating(), Guardian::UpdateResistances(), and Guardian::UpdateStats().
| bool CompareValues | ( | ComparisionType | type, |
| T | val1, | ||
| T | val2 ) |
Definition at line 698 of file Util.h.
References ASSERT, COMP_TYPE_EQ, COMP_TYPE_HIGH, COMP_TYPE_HIGH_EQ, COMP_TYPE_LOW, and COMP_TYPE_LOW_EQ.
Referenced by AchievementCriteriaData::Meets(), and Condition::Meets().
| bool consoleToUtf8 | ( | const std::string & | conStr, |
| std::string & | utf8str ) |
| uint32 CreatePIDFile | ( | const std::string & | filename | ) |
| float frand | ( | float | min, |
| float | max ) |
Definition at line 39 of file Util.cpp.
References ASSERT, and SfmtRand().
Referenced by FleeingMovementGenerator< T >::_getPoint(), SpellEffectInfo::CalcValue(), GetRandPosFromCenterInDist(), spell_item_unusual_compass::spell_item_unusual_compass_SpellScript::HandleDummy(), spell_malygos_random_portal::spell_malygos_random_portal_SpellScript::HandleDummy(), boss_sara::boss_saraAI::JustSummoned(), spell_q12308_escape_from_silverbrook_summon_worgen::spell_q12308_escape_from_silverbrook_summon_worgen_SpellScript::ModDest(), npc_unleashed_ballAI::MoveToNextPoint(), spell_ulduar_stone_grip::spell_ulduar_stone_grip_AuraScript::OnRemoveVehicle(), npc_lake_frog::npc_lake_frogAI::ReceiveEmote(), npc_firework::npc_fireworkAI::Reset(), boss_jormungarAI::Submerge(), boss_malchezaar::boss_malchezaarAI::SummonInfernal(), boss_ancient_stone_keeper::boss_ancient_stone_keeperAI::UpdateAI(), npc_ashtongue_sorcerer::npc_ashtongue_sorcererAI::UpdateAI(), and npc_shu_pool_of_reflection::npc_shu_pool_of_reflectionAI::UpdateAI().
| std::string GetAddressString | ( | Skyfire::Net::Address const & | addr | ) |
Transforms network address into string format "dotted_ip:port".
Definition at line 237 of file Util.cpp.
References Skyfire::Net::Address::GetHost(), and Skyfire::Net::Address::GetPort().
Referenced by AuthSocket::_HandleRealmList().
| std::wstring GetMainPartOfName | ( | std::wstring | wname, |
| uint32 | declension ) |
Definition at line 396 of file Util.cpp.
References isCyrillicCharacter().
Referenced by ObjectMgr::CheckDeclinedNames().
| std::array< uint8, Size > HexStrToByteArray | ( | std::string const & | str, |
| bool | reverse = false ) |
Definition at line 355 of file Util.h.
References HexStrToByteArray().
| void HexStrToByteArray | ( | std::string const & | str, |
| std::array< uint8, Size > & | buf, | ||
| bool | reverse = false ) |
Definition at line 350 of file Util.h.
References SkyFire::Impl::HexStrToByteArray().
Referenced by HexStrToByteArray().
|
inline |
Definition at line 142 of file Util.h.
Referenced by isBasicLatinString(), isExtendedLatinCharacter(), and wcharToUpperOnlyLatin().
|
inline |
Definition at line 226 of file Util.h.
References isBasicLatinCharacter(), 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 242 of file Util.h.
References isCyrillicCharacter(), and isNumericOrSpace().
Referenced by isValidString().
|
inline |
Definition at line 181 of file Util.h.
Referenced by isEastAsianString().
|
inline |
Definition at line 250 of file Util.h.
References isEastAsianCharacter(), and isNumericOrSpace().
Referenced by isValidString().
|
inline |
Definition at line 151 of file Util.h.
References isBasicLatinCharacter().
Referenced by isExtendedLatinString().
|
inline |
Definition at line 234 of file Util.h.
References isExtendedLatinCharacter(), and isNumericOrSpace().
Referenced by isValidString().
| bool IsIPAddress | ( | char const * | ipaddress | ) |
Check if the string is a valid ip address representation.
Definition at line 229 of file Util.cpp.
References Skyfire::Net::IsIPv4Address().
Referenced by ban_commandscript::HandleBanHelper(), ban_commandscript::HandleBanInfoIPCommand(), and ban_commandscript::HandleUnBanHelper().
| bool IsIPAddrInNetwork | ( | Skyfire::Net::Address const & | net, |
| Skyfire::Net::Address const & | addr, | ||
| Skyfire::Net::Address const & | subnetMask ) |
Checks if address belongs to the a network with specified submask.
Definition at line 244 of file Util.cpp.
References Skyfire::Net::Address::ToIPv4NetworkOrder().
Referenced by AuthSocket::GetAddressForClient().
|
inline |
Definition at line 212 of file Util.h.
References isNumeric().
|
inline |
Definition at line 202 of file Util.h.
Referenced by character_commandscript::GetDeletedCharacterInfoList(), character_commandscript::HandleCharacterDeletedOldCommand(), character_commandscript::HandlePDumpWriteCommand(), isNumeric(), and isNumericOrSpace().
|
inline |
Definition at line 221 of file Util.h.
References isNumeric().
Referenced by isBasicLatinString(), isCyrillicString(), isEastAsianString(), and isExtendedLatinString().
| int64 MoneyStringToMoney | ( | const std::string & | moneyString | ) |
Definition at line 150 of file Util.cpp.
References Tokenizer::begin(), and Tokenizer::end().
Referenced by modify_commandscript::HandleModifyMoneyCommand().
| int32 rand32 | ( | ) |
Definition at line 45 of file Util.cpp.
References SfmtRand().
Referenced by Player::GetRandomResearchProjectForRace(), and Player::OnArchaeologyFindUsed().
| double rand_chance | ( | void | ) |
Definition at line 55 of file Util.cpp.
References SfmtRand().
Referenced by Spell::EffectInebriate(), GetExplicitDiscoverySpell(), GetItemEnchantMod(), WorldSession::HandleGMResponseResolve(), LootTemplate::LootGroup::Roll(), roll_chance_f(), and PoolGroup< T >::RollOne().
| double rand_norm | ( | void | ) |
Definition at line 50 of file Util.cpp.
References SfmtRand().
Referenced by RandomMovementGenerator< T >::_setRandomLocation(), SpellImplicitTargetInfo::CalcDirectionAngle(), Unit::CalcSpellResistance(), ConfusedMovementGenerator< T >::DoUpdate(), Spell::EffectTransmitted(), Unit::GetRandomContactPoint(), WorldObject::GetRandomNearPosition(), WorldObject::GetRandomPoint(), Position::GetSinCos(), molten_flame::molten_flameAI::InitializeAI(), Weather::ReGenerate(), spell_sindragosa_s_fury::spell_sindragosa_s_fury_SpellScript::SelectDest(), Spell::SelectImplicitCasterDestTargets(), Spell::SelectImplicitDestDestTargets(), Spell::SelectImplicitTargetDestTargets(), spell_omega_stance_spider_effect::spell_omega_stance_spider_effect_SpellScript::SetDestPosition(), boss_sindragosa::boss_sindragosaAI::UpdateAI(), and npc_strangulate_vehicle::npc_strangulate_vehicleAI::UpdateAI().
|
inline |
Definition at line 83 of file Util.h.
References rand_chance().
Referenced by BattlePetMgr::ApplyBattlePetTrapInput(), Player::CastItemCombatSpell(), Unit::DealDamage(), Unit::DealMeleeDamage(), Spell::DoCreateItem(), Player::GetRandomResearchProjectForRace(), GetSkillDiscoverySpell(), Unit::HandleDummyAuraProc(), spell_mastery_combo_breaker::spell_mastery_combo_breaker_SpellScript::HandleOnHit(), spell_mastery_elemental_overload::spell_mastery_elemental_overload_SpellScript::HandleOnHit(), spell_gen_mounted_charge::spell_gen_mounted_charge_SpellScript::HandleScriptEffect(), Aura::IsProcTriggeredOnEvent(), Unit::isSpellBlocked(), Unit::isSpellCrit(), Unit::IsTriggeredAtSpellProcEvent(), Unit::ProcDamageAndSpellFor(), and LootStoreItem::Roll().
|
inline |
Definition at line 89 of file Util.h.
Referenced by spell_rog_cheat_death::spell_rog_cheat_death_AuraScript::Absorb(), Spell::DoTriggersOnSpellHit(), Spell::EffectDispel(), Spell::EffectDispelMechanic(), Spell::EffectScriptEffect(), Spell::EffectStealBeneficialBuff(), Spell::EffectTeleportUnits(), Unit::GetMeleeHitRedirectTarget(), Player::GetRandomResearchDigsiteForContinent(), Player::GetResurrectionSpellId(), AuraEffect::HandleAuraDummy(), spell_capacitus_polarity_shift::spell_capacitus_polarity_shift_SpellScript::HandleDummy(), spell_gen_gnomish_transporter::spell_gen_gnomish_transporter_SpellScript::HandleDummy(), spell_item_nigh_invulnerability::spell_item_nigh_invulnerability_SpellScript::HandleDummy(), spell_item_nitro_boots::spell_item_nitro_boots_SpellScript::HandleDummy(), spell_item_poultryizer::spell_item_poultryizer_SpellScript::HandleDummy(), spell_item_purify_helboar_meat::spell_item_purify_helboar_meat_SpellScript::HandleDummy(), spell_item_pygmy_oil::spell_item_pygmy_oil_SpellScript::HandleDummy(), spell_item_teach_language::spell_item_teach_language_SpellScript::HandleDummy(), spell_q12634_despawn_fruit_tosser::spell_q12634_despawn_fruit_tosser_SpellScript::HandleDummy(), spell_q5206_test_fetid_skull::spell_q5206_test_fetid_skull_SpellScript::HandleDummy(), spell_q9452_cast_net::spell_q9452_cast_net_SpellScript::HandleDummy(), spell_thaddius_polarity_shift::spell_thaddius_polarity_shift_SpellScript::HandleDummy(), Unit::HandleDummyAuraProc(), spell_monk_soothing_mist::spell_monk_soothing_mist_AuraScript::HandleEffectPeriodic(), spell_mage_blast_wave::spell_mage_blast_wave_SpellScript::HandleImprovedFlamestrike(), spell_mage_water_elemental_freeze::spell_mage_water_elemental_freeze_SpellScript::HandleImprovedFreeze(), spell_dk_runic_corruption::spell_dk_runic_corruption_SpellScript::HandleOnHit(), spell_dk_runic_empowerment::spell_dk_runic_empowerment_SpellScript::HandleOnHit(), spell_mastery_combo_breaker::spell_mastery_combo_breaker_SpellScript::HandleOnHit(), spell_warr_bloodthirst::spell_warr_bloodthirst_SpellScript::HandleOnHit(), spell_warr_deep_wounds::spell_warr_deep_wounds_SpellScript::HandleOnHit(), Unit::HandleOverrideClassScriptAuraProc(), Unit::HandleProcTriggerSpell(), spell_gen_netherbloom::spell_gen_netherbloom_SpellScript::HandleScript(), spell_gen_nightmare_vine::spell_gen_nightmare_vine_SpellScript::HandleScript(), spell_hallow_end_trick_or_treat::spell_hallow_end_trick_or_treat_SpellScript::HandleScript(), spell_hallow_end_tricky_treat::spell_hallow_end_tricky_treat_SpellScript::HandleScript(), spell_item_defibrillate::spell_item_defibrillate_SpellScript::HandleScript(), spell_hun_invigoration::spell_hun_invigoration_SpellScript::HandleScriptEffect(), Unit::isBlockCritical(), boss_gatewatcher_iron_hand::boss_gatewatcher_iron_handAI::KilledUnit(), Player::OnArchaeologyFindUsed(), spell_warl_shadow_trance_proc::spell_warl_shadow_trance_proc_AuraScript::OnProc(), Unit::SpellHitResult(), boss_sara::boss_saraAI::SpellHitTarget(), Player::Update(), boss_gatewatcher_iron_hand::boss_gatewatcher_iron_handAI::UpdateAI(), boss_nethermancer_sepethrea::boss_nethermancer_sepethreaAI::UpdateAI(), and npc_wild_imp::npc_wild_impAI::UpdateAI().
|
inline |
Definition at line 121 of file Util.h.
Referenced by Unit::CalcAbsorbResist(), Aura::CalcDispelChance(), Unit::MagicSpellHitResult(), and spell_valanar_kinetic_bomb_absorb::spell_valanar_kinetic_bomb_absorb_AuraScript::OnAbsorb().
| std::string secsToTimeString | ( | uint64 | timeInSecs, |
| bool | shortText = false, | ||
| bool | hoursOnly = false ) |
Definition at line 127 of file Util.cpp.
References DAY, HOUR, and MINUTE.
Referenced by BugTicket::FormatMessageString(), GmTicket::FormatMessageString(), SuggestTicket::FormatMessageString(), ban_commandscript::HandleBanCharacterCommand(), ban_commandscript::HandleBanHelper(), ban_commandscript::HandleBanInfoCharacterCommand(), ban_commandscript::HandleBanInfoHelper(), ban_commandscript::HandleBanInfoIPCommand(), event_commandscript::HandleEventInfoCommand(), gobject_commandscript::HandleGameObjectTargetCommand(), WorldSession::HandleMessagechatOpcode(), npc_commandscript::HandleNpcInfoCommand(), misc_commandscript::HandlePInfoCommand(), server_commandscript::HandleServerInfoCommand(), server_commandscript::HandleServerUptimeCommand(), WorldSession::HandleTextEmoteOpcode(), GmTicket::SetChatLog(), World::ShutdownMsg(), and Warden::Update().
| void stripLineInvisibleChars | ( | std::string & | src | ) |
Definition at line 94 of file Util.cpp.
Referenced by WorldSession::HandleMessagechatOpcode().
| uint32 TimeStringToSecs | ( | const std::string & | timestring | ) |
Definition at line 181 of file Util.cpp.
References DAY, HOUR, and MINUTE.
Referenced by World::BanAccount(), World::BanCharacter(), ban_commandscript::HandleBanCharacterCommand(), and ban_commandscript::HandleBanHelper().
| std::string TimeToTimestampStr | ( | time_t | t | ) |
Definition at line 213 of file Util.cpp.
References Skyfire::LocalTime().
Referenced by character_commandscript::HandleCharacterDeletedListHelper(), event_commandscript::HandleEventInfoCommand(), and list_commandscript::HandleListMailCommand().
| bool Utf8FitTo | ( | const std::string & | str, |
| const std::wstring & | search ) |
Definition at line 473 of file Util.cpp.
References Utf8toWStr(), and wstrToLower().
Referenced by AuctionHouseObject::BuildListAuctionItems(), 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(), and WorldSession::HandleWhoOpcode().
| size_t utf8length | ( | std::string & | utf8str | ) |
Definition at line 271 of file Util.cpp.
Referenced by AccountMgr::ChangeEmail(), AccountMgr::ChangePassword(), AccountMgr::ChangeRegEmail(), AccountMgr::ChangeUsername(), and AccountMgr::CreateAccount().
| void utf8printf | ( | FILE * | out, |
| const char * | str, | ||
| ... ) |
Definition at line 489 of file Util.cpp.
References vutf8printf().
Referenced by AppenderConsole::_write().
| bool utf8ToConsole | ( | const std::string & | utf8str, |
| std::string & | conStr ) |
Definition at line 441 of file Util.cpp.
References Utf8toWStr().
| bool Utf8toWStr | ( | char const * | utf8str, |
| size_t | csize, | ||
| wchar_t * | wstr, | ||
| size_t & | wsize ) |
Definition at line 305 of file Util.cpp.
Referenced by ObjectMgr::AddGameTele(), ObjectMgr::CheckDeclinedNames(), ObjectMgr::CheckPetName(), ObjectMgr::CheckPlayerName(), ObjectMgr::DeleteGameTele(), ChannelMgr::GetChannel(), ObjectMgr::GetGameTele(), ObjectMgr::GetGameTeleExactName(), ChannelMgr::GetJoinChannel(), WorldSession::HandleAuctionListItems(), 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::HandleSetPlayerDeclinedNames(), WorldSession::HandleWhoOpcode(), ObjectMgr::IsReservedName(), ObjectMgr::IsValidCharterName(), ChannelMgr::LeftChannel(), ObjectMgr::LoadGameTele(), ObjectMgr::LoadReservedPlayersNames(), normalizePlayerName(), AccountMgr::normalizeString(), Utf8FitTo(), utf8print(), utf8ToConsole(), and vutf8printf().
| bool Utf8toWStr | ( | const std::string & | utf8str, |
| std::wstring & | wstr ) |
Definition at line 333 of file Util.cpp.
Referenced by Utf8toWStr().
|
inline |
Definition at line 130 of file Util.h.
References Utf8toWStr().
| void utf8truncate | ( | std::string & | utf8str, |
| size_t | len ) |
Definition at line 284 of file Util.cpp.
Referenced by PlayerSocial::SetFriendNote(), and Guild::BankTab::SetText().
| void vutf8printf | ( | FILE * | out, |
| const char * | str, | ||
| va_list * | ap ) |
Definition at line 497 of file Util.cpp.
References Utf8toWStr(), and vsnprintf.
Referenced by utf8printf().
|
inline |
Definition at line 286 of file Util.h.
Referenced by wstrToLower().
|
inline |
Definition at line 258 of file Util.h.
Referenced by normalizePlayerName(), wcharToUpperOnlyLatin(), and wstrToUpper().
|
inline |
Definition at line 281 of file Util.h.
References isBasicLatinCharacter(), and wcharToUpper().
Referenced by AccountMgr::normalizeString().
|
inline |
Definition at line 314 of file Util.h.
References wcharToLower().
Referenced by ObjectMgr::AddGameTele(), ObjectMgr::CheckPlayerName(), ObjectMgr::DeleteGameTele(), ChannelMgr::GetChannel(), ObjectMgr::GetGameTele(), ObjectMgr::GetGameTeleExactName(), ChannelMgr::GetJoinChannel(), WorldSession::HandleAuctionListItems(), 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(), ChannelMgr::LeftChannel(), ObjectMgr::LoadGameTele(), ObjectMgr::LoadReservedPlayersNames(), normalizePlayerName(), and Utf8FitTo().
|
inline |
Definition at line 309 of file Util.h.
References wcharToUpper().
| bool WStrToUtf8 | ( | const std::wstring & | wstr, |
| std::string & | utf8str ) |
| bool WStrToUtf8 | ( | wchar_t * | wstr, |
| size_t | size, | ||
| std::string & | utf8str ) |
Definition at line 348 of file Util.cpp.
Referenced by consoleToUtf8(), normalizePlayerName(), and AccountMgr::normalizeString().