![]() |
TrinityCore
|
Namespaces | |
| namespace | Impl |
Classes | |
| class | FlatSet |
Functions | |
| template<class M > | |
| auto | MapGetValuePtr (M &map, typename M::key_type const &key) |
| template<class K , class V , template< class, class, class... > class M, class... Rest> | |
| void | MultimapErasePair (M< K, V, Rest... > &multimap, K const &key, V const &value) |
| template<class C > | |
| void | RandomResize (C &container, std::size_t requestedSize) |
| template<class C , class Predicate > | |
| void | RandomResize (C &container, Predicate &&predicate, std::size_t requestedSize) |
| template<class C > | |
| auto | SelectRandomContainerElement (C const &container) -> typename std::add_const< decltype(*std::begin(container))>::type & |
| template<class C > | |
| auto | SelectRandomWeightedContainerElement (C const &container, std::vector< double > weights) -> decltype(std::begin(container)) |
| template<class C , class Fn > | |
| auto | SelectRandomWeightedContainerElement (C const &container, Fn weightExtractor) -> decltype(std::begin(container)) |
| template<class C > | |
| void | RandomShuffle (C &container) |
| Reorder the elements of the container randomly. | |
| template<class Iterator1 , class Iterator2 > | |
| bool | Intersects (Iterator1 first1, Iterator1 last1, Iterator2 first2, Iterator2 last2) |
| template<typename Container , typename Predicate > | |
| void | EraseIf (Container &c, Predicate p) |
| template<typename Container , typename NeedleContainer , typename ContainsOperator = bool(std::string const&, std::string const&), typename T = void> | |
| auto | FuzzyFindIn (Container const &container, NeedleContainer const &needles, ContainsOperator const &contains=StringContainsStringI, int(*bonus)(decltype((*std::begin(std::declval< Container >()))))=nullptr) |
| template<typename iterator , class end_iterator = iterator> | |
| constexpr IteratorPair< iterator, end_iterator > | MakeIteratorPair (iterator first, end_iterator second) |
| template<typename iterator , class end_iterator = iterator> | |
| constexpr IteratorPair< iterator, end_iterator > | MakeIteratorPair (std::pair< iterator, end_iterator > iterators) |
| template<class M > | |
| auto | MapEqualRange (M &map, typename M::key_type const &key) |
|
private |
Definition at line 231 of file Containers.h.
References Trinity::Containers::Impl::EraseIfMoveAssignable(), and Trinity::Containers::Impl::EraseIfNotMoveAssignable().
Referenced by go_commandscript::HandleGoBossCommand(), WardenWin::RequestChecks(), Player::RestoreBaseRune(), Trinity::Net::NetworkThread< SocketType >::Update(), and WorldSession::UpdateInstanceEnterTimes().
| auto Trinity::Containers::FuzzyFindIn | ( | Container const & | container, |
| NeedleContainer const & | needles, | ||
| ContainsOperator const & | contains = StringContainsStringI, |
||
| int(*)(decltype((*std::begin(std::declval< Container >())))) | bonus = nullptr |
||
| ) |
Definition at line 30 of file FuzzyFind.h.
|
private |
Definition at line 184 of file Containers.h.
|
constexprprivate |
Definition at line 49 of file IteratorPair.h.
Referenced by MapEqualRange().
|
constexprprivate |
Definition at line 55 of file IteratorPair.h.
|
private |
Definition at line 61 of file IteratorPair.h.
References MakeIteratorPair().
Referenced by FormationMgr::AddCreatureToGroup(), Map::DespawnAll(), GetCharSectionEntry(), ObjectMgr::GetSpawnMetadataForGroup(), ObjectMgr::GetSpellClickInfoMapBounds(), SpellMgr::GetSpellsRequiredForSpellBounds(), Unit::IsImmunedToSpell(), Unit::IsImmunedToSpellEffect(), and RegularGrid2D< T, Node, NodeCreatorFunc, BoundsFunc, PositionFunc >::remove().
| auto Trinity::Containers::MapGetValuePtr | ( | M & | map, |
| typename M::key_type const & | key | ||
| ) |
Returns a pointer to mapped value (or the value itself if map stores pointers)
Definition at line 29 of file MapUtils.h.
Referenced by ObjectMgr::GetCellObjectGuids(), ObjectMgr::GetCreatureMovementOverride(), ObjectMgr::GetCreatureTemplate(), CalendarMgr::GetEventInvites(), GetFlyByCameras(), ReputationMgr::GetForcedRankIfAny(), FormationMgr::GetFormationInfo(), ObjectMgr::GetGameObjectOverride(), ObjectMgr::GetGameObjectTemplate(), ObjectMgr::GetItemTemplate(), GetMapDifficultyData(), ObjectMgr::GetMapObjectGuids(), Trinity::Timezone::GetOffsetByHash(), ObjectMgr::GetQuestPOIWrapper(), GetSkillLineAbilitiesBySkill(), SpellMgr::GetSpellLinked(), ObjectMgr::GetVehicleTemplate(), WeatherMgr::GetWeatherData(), ObjectMgr::LoadCreatureDefaultTrainers(), lfg::LFGMgr::LoadLFGDungeons(), ObjectMgr::LoadTrainers(), ThreatManager::ProcessAIUpdates(), BattlegroundMgr::RemoveFromBGFreeSlotQueue(), BattlegroundMgr::SendBattlegroundList(), CalendarMgr::SendCalendarEvent(), CombatManager::SetInCombatWith(), BattlegroundMgr::Update(), and go_cheer_speaker::go_cheer_speakerAI::UpdateAI().
| void Trinity::Containers::MultimapErasePair | ( | M< K, V, Rest... > & | multimap, |
| K const & | key, | ||
| V const & | value | ||
| ) |
Definition at line 39 of file MapUtils.h.
Referenced by MotionMaster::ClearBaseUnitState(), Creature::RemoveFromWorld(), and GameObject::RemoveFromWorld().
|
private |
|
private |
Definition at line 66 of file Containers.h.
References urand().
Referenced by SummonList::DoActionImpl(), spell_scion_of_eternity_arcane_barrage::FilterMeleeHoverDiskPassangers(), spell_dk_death_pact::FilterTargets(), spell_opera_pick_red_riding_hood::FilterTargets(), spell_akilzon_eagle_swoop_primer::FilterTargets(), spell_akilzon_electrical_overload_primer::FilterTargets(), spell_malacrass_mind_control::FilterTargets(), spell_janalai_hatch_eggs::FilterTargets(), spell_nalorakk_surge::FilterTargets(), spell_anetheron_sleep::FilterTargets(), spell_azgalor_doom::FilterTargets(), spell_moam_drain_mana::FilterTargets(), spell_saviana_conflagration_init::FilterTargets(), spell_blood_queen_bloodbolt::FilterTargets(), spell_putricide_unbound_plague::FilterTargets(), spell_rotface_vile_gas_trigger::FilterTargets(), spell_sindragosa_unchained_magic::FilterTargets(), spell_darkfallen_blood_mirror::FilterTargets(), spell_malygos_arcane_storm::FilterTargets(), spell_pursue::spell_pursue_SpellScript::FilterTargets(), spell_hodir_icicle::FilterTargets(), spell_hodir_icicle_force_cast::FilterTargets(), spell_hodir_dispel_magic::FilterTargets(), spell_hodir_storm_cloud_primer::FilterTargets(), spell_hodir_melt_ice::FilterTargets(), spell_lady_vashj_summon_wave_mob_trigger::FilterTargets(), spell_lady_vashj_spore_drop_effect::FilterTargets(), spell_leotheras_the_blind_insidious_whisper::FilterTargets(), spell_morogrim_tidewalker_watery_grave::FilterTargets(), spell_ahune_ice_spear_target_picker::FilterTargets(), spell_hungarfen_putrid_mushroom_primer::FilterTargets(), spell_the_black_stalker_someone_grab_me::FilterTargets(), spell_omor_the_unscarred_orbital_strike_target::FilterTargets(), spell_magtheridon_blaze_target::FilterTargets(), spell_magtheridon_quake_target_selector::FilterTargets(), spell_magtheridon_debris::FilterTargets(), spell_kaelthas_mind_control::FilterTargets(), spell_kaelthas_pure_nether_beam::FilterTargets(), spell_dru_starfall_dummy::FilterTargets(), spell_item_taunt_flag_targeting::FilterTargets(), UnitAI::FinalizeTargetListSelection(), SmartScript::GetTargets(), boss_thorim::boss_thorimAI::GetTrashSpawnTriggers(), spell_pal_righteous_defense::HandleDummy(), spell_kaelthas_nether_beam::HandleScript(), npc_corrupted_lightning_totem::JustAppeared(), SmartScript::ProcessAction(), instance_halls_of_reflection::instance_halls_of_reflection_InstanceMapScript::ProcessEvent(), RandomResize(), spell_svalna_revive_champion::RemoveAliveTarget(), Spell::SelectImplicitAreaTargets(), Spell::SelectImplicitConeTargets(), spell_halion_spawn_living_embers::SelectMeteorFlames(), spell_malygos_surge_of_power_warning_selector_25::SendThreeTargets(), PoolGroup< T >::SpawnObject(), boss_blood_queen_lana_thel::UpdateAI(), and boss_festergut::UpdateAI().
|
inlineprivate |
Reorder the elements of the container randomly.
| container | Container to reorder |
Definition at line 166 of file Containers.h.
References RandomEngine::Instance().
Referenced by boss_urom::boss_urom(), spell_sindragosa_unchained_magic::FilterTargets(), spell_capacitus_polarity_shift::FilterTargets(), spell_sunwell_plateau_cataclysm_breath::HandleDummy(), spell_arcatraz_chaos_breath::HandleDummy(), boss_reliquary_of_souls::HandleSpirits(), npc_cameron::MoveTheChildren(), WardenWin::RequestChecks(), boss_fankriss::Reset(), boss_moroes::SpawnGuests(), boss_fankriss::UpdateAI(), boss_high_astromancer_solarian::UpdateAI(), and WardenWin::WardenWin().
|
inlineprivate |
Definition at line 108 of file Containers.h.
References urand().
Referenced by AuctionBotSeller::AddNewAuctions(), boss_sartharion::CastLavaStrikeOnTarget(), lfg::LFGQueue::CheckCompatibility(), boss_general_vezax::boss_general_vezaxAI::CheckPlayersInRange(), spell_dk_corpse_explosion::CheckTargets(), spell_dk_raise_dead::CheckTargets(), boss_lady_deathwhisper::DoImproveCultist(), boss_hexlord_malacrass::DoSpawnCompanions(), instance_the_black_morass::instance_the_black_morass_InstanceMapScript::DoSpawnPortal(), boss_gathios_the_shatterer::ExecuteEvent(), spell_send_mug_target_picker::FilterTargets(), spell_shazzrah_gate_dummy::FilterTargets(), spell_apothecary_validate_area::FilterTargets(), spell_malacrass_siphon_soul::FilterTargets(), spell_kurinnaxx_sand_trap::FilterTargets(), spell_paletress_summon_memory::spell_paletress_summon_memory_SpellScript::FilterTargets(), spell_mistress_kiss_area::FilterTargets(), spell_devourer_of_souls_mirrored_soul_target_selector::FilterTargets(), spell_deathbringer_boiling_blood::FilterTargets(), spell_igb_burning_pitch_selector::FilterTargets(), spell_rotface_mutated_infection::FilterTargets(), spell_rotface_vile_gas_trigger::FilterTargets(), spell_frostwarden_handler_order_whelp::FilterTargets(), spell_dreamwalker_summoner::FilterTargets(), spell_mimiron_fire_search::spell_mimiron_fire_search_SpellScript::FilterTargets(), spell_mimiron_napalm_shell::spell_mimiron_napalm_shell_SpellScript::FilterTargets(), spell_mimiron_rocket_strike_target_select::spell_mimiron_rocket_strike_target_select_SpellScript::FilterTargets(), spell_mimiron_summon_frost_bomb_target::spell_mimiron_summon_frost_bomb_target_SpellScript::FilterTargets(), spell_thorim_charge_orb::spell_thorim_charge_orb_SpellScript::FilterTargets(), spell_thorim_stormhammer::spell_thorim_stormhammer_SpellScript::FilterTargets(), spell_talon_king_ikiss_blink::FilterTargets(), spell_illidan_agonizing_flames::FilterTargets(), spell_illidan_find_target::FilterTargets(), spell_grand_warlock_nethekurse_target_fissures::FilterTargets(), spell_omrogg_beatdown::FilterTargets(), spell_kargath_blade_dance_targeting::FilterTargets(), spell_dru_t10_restoration_4p_bonus::FilterTargets(), UnitAI::FinalizeTargetSelection(), AuctionBotConfig::GetRandChar(), AuctionBotConfig::GetRandCharExclude(), GetRandomBossExcept(), spell_xt002_heart_overload_periodic::GetRandomToyPile(), boss_thorim::boss_thorimAI::GetTrashSpawnTriggers(), spell_apothecary_lingering_fumes::HandleAfterCast(), spell_ragnaros_lava_burst::HandleDummy(), spell_hallow_end_candy::HandleDummy(), spell_free_webbed::HandleDummy(), spell_free_webbed_on_quest::HandleDummy(), spell_borean_tundra_nerubar_web_random_unit_not_on_quest_dummy::HandleDummy(), spell_borean_tundra_nerubar_web_random_unit_on_quest_dummy::HandleDummy(), spell_fjord_rivenwood_captives_not_on_quest::HandleDummy(), spell_fjord_rivenwood_captives_on_quest::HandleDummy(), spell_terokkar_free_webbed::HandleDummy(), spell_terokkar_free_webbed_on_quest::HandleDummy(), spell_gen_spectator_cheer_trigger::HandleDummy(), spell_item_mingos_fortune_generator::HandleDummy(), spell_rog_killing_spree::spell_rog_killing_spree_AuraScript::HandleEffectPeriodic(), spell_frostwarden_handler_order_whelp::HandleForcedCast(), spell_item_aura_of_madness::HandleProc(), spell_item_deathbringers_will< StrengthSpellId, AgilitySpellId, APSpellId, CriticalSpellId, HasteSpellId >::spell_item_deathbringers_will_AuraScript< Strength, Agility, AttackPower, Critical, Haste >::HandleProc(), spell_love_is_in_the_air_create_heart_candy::HandleScript(), spell_winter_veil_px_238_winter_wondervolt::HandleScript(), spell_ayamiss_swarmer_start_loop::HandleScript(), spell_ayamiss_swarmer_teleport_trigger::HandleScript(), spell_borean_tundra_shortening_blaster::HandleScript(), spell_icecrown_chum_the_water::HandleScript(), spell_dreamwalker_summon_suppresser::HandleSummon(), spell_gatewatcher_subboss_trigger::HandleTargets(), boss_attumen::boss_attumenAI::IsSummonedBy(), npc_voidwalker_summoner::JustAppeared(), npc_cw_area_trigger::npc_cw_area_triggerAI::MoveInLineOfSight(), spell_thorim_activate_lightning_orb_periodic::spell_thorim_activate_lightning_orb_periodic_AuraScript::PeriodicTick(), SmartScript::ProcessAction(), SmartScript::ProcessEvent(), DarkFallenAI::Reset(), LootTemplate::LootGroup::Roll(), boss_xevozz::ScheduleTasks(), npc_icc_orb_controller::ScheduleVisualChannel(), spell_item_mad_alchemists_potion::SecondaryEffect(), spell_item_crazy_alchemists_potion::SecondaryEffect(), Unit::SelectNearbyTarget(), boss_blood_queen_lana_thel::SelectRandomTarget(), spell_igb_rocket_artillery::SelectRandomTarget(), spell_putricide_ooze_channel::SelectTarget(), spell_the_lich_king_valkyr_target_search::SelectTarget(), spell_the_lich_king_vile_spirit_move_target_search::SelectTarget(), npc_minigob_manabonk::SelectTargetInDalaran(), npc_icc_orb_controller::SetGUID(), boss_malchezaar::boss_malchezaarAI::SummonInfernal(), boss_sulfuron::UpdateAI(), boss_headless_horseman::UpdateAI(), go_cheer_speaker::go_cheer_speakerAI::UpdateAI(), npc_arthas_stratholme::npc_arthas_stratholmeAI::UpdateAI(), boss_jedoga_shadowseeker::UpdateAI(), boss_anub_arak::UpdateAI(), boss_festergut::UpdateAI(), npc_captain_arnath::UpdateAI(), boss_anubrekhan::UpdateAI(), boss_algalon_the_observer::UpdateAI(), boss_emalon::UpdateAI(), boss_vazruden_the_herald::UpdateAI(), boss_laj::UpdateAI(), boss_high_astromancer_solarian::UpdateAI(), boss_void_reaver::UpdateAI(), npc_infernal_rain_hellfire::UpdateAI(), npc_phase_hunter::npc_phase_hunterAI::UpdateAI(), npc_pet_hunter_snake_trap::UpdateAI(), npc_brewfest_reveler_2::UpdateAI(), and GameObject::Use().
|
private |
Definition at line 141 of file Containers.h.
References SelectRandomWeightedContainerElement().
|
inlineprivate |
Definition at line 125 of file Containers.h.
References urandweighted().
Referenced by BattlegroundMgr::GetRandomBG(), SelectRandomWeightedContainerElement(), and CreatureTextMgr::SendChat().