TrinityCore
Loading...
Searching...
No Matches
Random.cpp File Reference
#include "Random.h"
#include "Errors.h"
#include "SFMTRand.h"
#include <boost/math/tools/roots.hpp>
#include <memory>
#include <random>
+ Include dependency graph for Random.cpp:

Go to the source code of this file.

Functions

int32 irand (int32 min, int32 max)
 
uint32 urand (uint32 min, uint32 max)
 
uint32 urandms (uint32 min, uint32 max)
 
float frand (float min, float max)
 
Milliseconds randtime (Milliseconds min, Milliseconds max)
 
uint32 rand32 ()
 
float rand_norm ()
 
float rand_chance ()
 
uint32 urandweighted (size_t count, double const *chances)
 
bool roll_chance (float chance, PseudoRandomDistributionState &state)
 

Function Documentation

◆ frand()

float frand ( float  min,
float  max 
)

Definition at line 56 of file Random.cpp.

References ASSERT.

Referenced by SpellEffectInfo::CalcValue(), spell_dh_chaos_theory::ChaosTheory(), CometStormEvent::Execute(), YmironBanePrecastVisual::Execute(), FleeingMovementGenerator::GetPoint(), spell_waycrest_manor_wildfire::GetRandomPositionInRectangle(), spell_rokmora_razor_shards::GetRandomRazorShardPosition(), spell_warl_chaotic_energies::HandleAbsorb(), spell_remnant_of_a_fallen_king_army_of_the_dead::HandleAfterCast(), spell_mana_devourer_energy_discharge::HandleCast(), spell_malygos_random_portal::HandleDummy(), spell_swamplord_muselek_move_away_primer::HandleDummy(), spell_item_unusual_compass::HandleDummy(), spell_garothi_cannon_chooser::HandleDummyEffect(), spell_dh_darkglare_boon::HandleEffectRemove(), spell_ymiron_the_fallen_king_arise_fallen_selector::HandleHitTarget(), spell_mandokir_devastating_slam::HandleScript(), spell_aqusirr_surging_rush_selector::HandleScript(), spell_priestess_alun_za_bubble::HandleScript(), npc_molten_flame::InitializeAI(), npc_silverpine_orc_sea_dog::IsSummonedBy(), npc_meteor_strike_initial::IsSummonedBy(), npc_amalgam_of_souls_restless_soul::JustAppeared(), npc_priestess_alun_za_corrupted_gold::JustAppeared(), boss_sara::boss_saraAI::JustSummoned(), spell_grizzly_hills_escape_from_silverbrook_summon_worgen::ModDest(), spell_nether_dragon_essence_2::spell_nether_dragon_essence_2_SpellScript::ModDestHeight(), npc_ashtongue_sorcerer::MoveInLineOfSight(), npc_gunship_boarding_addAI::MovementInform(), npc_unleashed_ballAI::MoveToNextPoint(), at_anduin_wrynn_empowered_wicked_star::OnDestinationReached(), spell_kaelthas_nether_vapor_lightning::OnPeriodic(), spell_ulduar_stone_grip::spell_ulduar_stone_grip_AuraScript::OnRemoveVehicle(), npc_lake_frog::ReceiveEmote(), spell_the_lich_king_harvest_souls_teleport::RelocateTransportOffset(), npc_firework::Reset(), AuctionBotBuyer::RollBidChance(), AuctionBotBuyer::RollBuyChance(), Spell::SelectImplicitCasterDestTargets(), PassengerController::SelectSpawnPoint(), spell_waycrest_manor_organ_missiles::SetDest(), Scripts::QuelThalas::MurderRow::KystiaManaheart::spell_kystia_manaheart_mirror_image::SetDest(), AuctionBotSeller::SetPricesOfItem(), RandomMovementGenerator< T >::SetRandomLocation(), ConfusedMovementGenerator< T >::SetTargetLocation(), boss_jormungarAI::Submerge(), boss_malchezaar::boss_malchezaarAI::SummonInfernal(), boss_razorscale::SummonMinions(), boss_ambassador_flamelash::boss_ambassador_flamelashAI::SummonSpirit(), go_cheer_speaker::go_cheer_speakerAI::UpdateAI(), boss_azhiccar::UpdateAI(), npc_meteor_strike::UpdateAI(), npc_meteor_strike_flame::UpdateAI(), and npc_minigob_manabonk::UpdateAI().

◆ irand()

int32 irand ( int32  min,
int32  max 
)

◆ rand32()

uint32 rand32 ( )

Definition at line 71 of file Random.cpp.

Referenced by boss_ymiron::boss_ymiron(), hyjalAI::DoOverrun(), boss_malchezaar::boss_malchezaarAI::EnfeebleHealthEffect(), boss_shade_of_aran::boss_aranAI::FlameWreathEffect(), boss_felmyst::HandleFlightSequence(), boss_shade_of_aran::boss_aranAI::Initialize(), npc_aran_elemental::water_elementalAI::Initialize(), npc_ghoul::npc_ghoulAI::Initialize(), npc_necromancer::npc_necromancerAI::Initialize(), npc_banshee::npc_bansheeAI::Initialize(), npc_crypt_fiend::npc_crypt_fiendAI::Initialize(), npc_fel_stalker::npc_fel_stalkerAI::Initialize(), npc_gargoyle::npc_gargoyleAI::Initialize(), alliance_rifleman::alliance_riflemanAI::Initialize(), boss_priestess_delrissa::InitializeLackeys(), DB2Manager::InsertNewHotfix(), CasterAI::JustEngagedWith(), npc_earthmender_wilda::npc_earthmender_wildaAI::JustEngagedWith(), boss_patchwerk::KilledUnit(), boss_vaelastrasz::KilledUnit(), npc_giant_infernal::npc_giant_infernalAI::npc_giant_infernalAI(), npc_grimstone::npc_grimstoneAI::npc_grimstoneAI(), go_ethereum_prison::go_ethereum_prisonAI::OnGossipHello(), go_ethereum_stasis::go_ethereum_stasisAI::OnGossipHello(), RandomEngine::operator()(), npc_anubisath_sentinel::aqsentinelAI::pickAbilityRandom(), npc_chicken_cluck::npc_chicken_cluckAI::ReceiveEmote(), npc_phase_hunter::npc_phase_hunterAI::Reset(), boss_twinemperorsAI::RespawnNearbyBugsAndGetOne(), boss_faction_championsAI::SelectRandomFriendlyMissingBuff(), boss_cthun::cthunAI::SelectRandomNotStomach(), npc_highlord_darion_mograine::npc_highlord_darion_mograineAI::SpawnNPC(), npc_nether_drake::npc_nether_drakeAI::SpellHit(), npc_maghar_captive::npc_maghar_captiveAI::SpellHitTarget(), npc_kurenai_captive::npc_kurenai_captiveAI::SpellHitTarget(), hyjalAI::SummonCreature(), npc_anachronos_quest_trigger::npc_anachronos_quest_triggerAI::SummonNextWave(), npc_lord_illidan_stormrage::npc_lord_illidan_stormrageAI::SummonNextWave(), hyjalAI::SummonNextWave(), boss_netherspite::boss_netherspiteAI::SummonPortals(), npc_grimstone::npc_grimstoneAI::SummonRingBoss(), boss_shade_of_aran::boss_aranAI::UpdateAI(), boss_priestess_delrissa::UpdateAI(), npc_highlord_darion_mograine::npc_highlord_darion_mograineAI::UpdateAI(), npc_abomination::npc_abominationAI::UpdateAI(), npc_ghoul::npc_ghoulAI::UpdateAI(), npc_necromancer::npc_necromancerAI::UpdateAI(), npc_banshee::npc_bansheeAI::UpdateAI(), npc_crypt_fiend::npc_crypt_fiendAI::UpdateAI(), npc_fel_stalker::npc_fel_stalkerAI::UpdateAI(), npc_gargoyle::npc_gargoyleAI::UpdateAI(), alliance_rifleman::alliance_riflemanAI::UpdateAI(), boss_cthun::cthunAI::UpdateAI(), boss_veknilash::boss_veknilashAI::UpdateAI(), boss_veklor::boss_veklorAI::UpdateAI(), npc_nether_drake::npc_nether_drakeAI::UpdateAI(), npc_torloth_the_magnificent::npc_torloth_the_magnificentAI::UpdateAI(), npc_illidari_spawn::npc_illidari_spawnAI::UpdateAI(), npc_doctor::npc_doctorAI::UpdateAI(), and TradeData::UpdateServerStateIndex().

◆ rand_chance()

float rand_chance ( )

◆ rand_norm()

◆ randtime()

Milliseconds randtime ( Milliseconds  min,
Milliseconds  max 
)

Definition at line 63 of file Random.cpp.

References ASSERT, and urand().

Referenced by npc_anub_ar_crusher::_JustEngagedWith(), npc_anub_ar_crusher_champion::_JustEngagedWith(), npc_anub_ar_crusher_crypt_fiend::_JustEngagedWith(), npc_anub_ar_crusher_necromancer::_JustEngagedWith(), npc_watcher_gashra::_JustEngagedWith(), npc_watcher_narjil::_JustEngagedWith(), npc_watcher_silthik::_JustEngagedWith(), npc_anub_ar_warrior::_JustEngagedWith(), npc_anub_ar_skirmisher::_JustEngagedWith(), npc_anub_ar_shadowcaster::_JustEngagedWith(), boss_four_horsemen_baron::_UpdateAI(), boss_four_horsemen_thane::_UpdateAI(), boss_four_horsemen_lady::_UpdateAI(), boss_four_horsemen_sir::_UpdateAI(), EventProcessor::AddEventAtOffset(), boss_four_horsemen_baron::BeginFighting(), boss_four_horsemen_thane::BeginFighting(), boss_four_horsemen_lady::BeginFighting(), boss_four_horsemen_sir::BeginFighting(), boss_sapphiron::CastDrain(), TaskScheduler::DelayAll(), TaskContext::DelayAll(), TaskScheduler::DelayGroup(), TaskContext::DelayGroup(), CoolestFriendBaseAI::DoAction(), npc_anub_ar_crusher::DoEvent(), npc_anub_ar_crusher_champion::DoEvent(), npc_anub_ar_crusher_crypt_fiend::DoEvent(), npc_anub_ar_crusher_necromancer::DoEvent(), npc_anub_ar_champion::DoEvent(), npc_anub_ar_crypt_fiend::DoEvent(), npc_anub_ar_necromancer::DoEvent(), spell_mage_comet_storm::EffectHit(), spell_mage_flurry::EffectHit(), boss_noth::EnterPhaseGround(), boss_sapphiron::EnterPhaseGround(), ActivateLivingConstellation::Execute(), CometStormEvent::Execute(), spell_mage_flurry::FlurryEvent::Execute(), ScheduledIcicleSummons::Execute(), boss_ymiron::ExecuteEvent(), spell_sapphiron_summon_blizzard::HandleDummy(), boss_hadronox::JustEngagedWith(), npc_anub_ar_champion::JustEngagedWith(), npc_anub_ar_crypt_fiend::JustEngagedWith(), npc_anub_ar_necromancer::JustEngagedWith(), boss_salramm::boss_salrammAI::JustEngagedWith(), boss_krik_thir::JustEngagedWith(), boss_halion::JustEngagedWith(), boss_anubrekhan::JustEngagedWith(), boss_faerlina::JustEngagedWith(), boss_gluth::JustEngagedWith(), boss_heigan::JustEngagedWith(), boss_maexxna::JustEngagedWith(), WaypointMovementGenerator< T >::OnArrived(), EventMap::Repeat(), TaskContext::Repeat(), TaskScheduler::RescheduleAll(), TaskContext::RescheduleAll(), EventMap::RescheduleEvent(), TaskScheduler::RescheduleGroup(), TaskContext::RescheduleGroup(), TaskScheduler::Schedule(), TaskScheduler::Schedule(), TaskContext::Schedule(), TaskContext::Schedule(), EventMap::ScheduleEvent(), instance_the_black_morass::instance_the_black_morass_InstanceMapScript::SetData(), boss_selin_fireheart::UpdateAI(), boss_hadronox::UpdateAI(), boss_krik_thir::UpdateAI(), npc_watcher_gashra::UpdateAI(), npc_watcher_narjil::UpdateAI(), npc_watcher_silthik::UpdateAI(), npc_anub_ar_warrior::UpdateAI(), npc_anub_ar_skirmisher::UpdateAI(), npc_anub_ar_shadowcaster::UpdateAI(), boss_halion::UpdateAI(), boss_twilight_halion::UpdateAI(), boss_anubrekhan::UpdateAI(), boss_faerlina::UpdateAI(), boss_gluth::UpdateAI(), boss_heigan::UpdateAI(), boss_kelthuzad::UpdateAI(), boss_maexxna::UpdateAI(), boss_noth::UpdateAI(), boss_razuvious::UpdateAI(), boss_sapphiron::UpdateAI(), boss_thaddius::UpdateAI(), and boss_mechano_lord_capacitus::UpdateAI().

◆ roll_chance()

bool roll_chance ( float  chance,
PseudoRandomDistributionState &  state 
)

Definition at line 131 of file Random.cpp.

References PseudoRandomDistributionState::AccumulateChance(), rand_norm(), and PseudoRandomDistributionState::Reset().

Referenced by spell_dh_darkness::Absorb(), spell_sha_ice_strike_proc::AttemptProc(), spell_pri_power_word_shield::CalculateAbsorb(), Player::CastItemCombatSpell(), spell_dru_dream_of_cenarius_guardian::CheckEffectProc(), spell_dru_gore::CheckEffectProc(), spell_dru_galactic_guardian::CheckEffectProc(), spell_warr_tactician::CheckEffectProc(), spell_warr_bloodthirst_enrage::CheckEnrageProc(), spell_mage_fingers_of_frost::CheckFrostboltProc(), spell_mage_fingers_of_frost::CheckFrozenOrbProc(), spell_monk_open_palm_strikes::CheckProc(), spell_dk_rime::CheckProc(), spell_dru_embrace_of_the_dream::CheckProc(), spell_warl_cunning_cruelty::CheckProc(), spell_sha_deeply_rooted_elements::CheckProc(), spell_pal_art_of_war::CheckProc(), spell_pal_awakening::CheckProc(), spell_pal_divine_purpose::CheckProc(), spell_dru_sudden_ambush::CheckProc(), spell_dk_frost_fever_proc::CheckProc(), spell_dru_omen_of_clarity_restoration::CheckProc(), spell_warl_shard_instability::CheckProc(), spell_pri_epiphany::CheckProc(), spell_pri_holy_10_1_class_set_2pc::CheckProc(), spell_dh_shattered_souls_devourer::CheckProc(), spell_dru_luxuriant_soil::CheckProc(), spell_evo_burnout::CheckProc(), spell_hun_lock_and_load::CheckProc(), spell_hun_windrunner_quiver::CheckProc(), spell_pri_master_the_darkness::CheckProc(), spell_sha_voltaic_blaze_talent::CheckProc(), spell_warr_strategist::CheckProc(), spell_warr_thunder_blast_aura::CheckProc(), spell_sha_aftershock::CheckProc(), spell_sha_mastery_elemental_overload::CheckProc(), spell_warr_unbridled_ferocity::CheckProc(), spell_pal_item_t6_trinket::CheckProc(), spell_sha_lava_surge::CheckProcChance(), Unit::DealMeleeDamage(), Spell::DoCreateItem(), Spell::DoTriggersOnSpellHit(), Spell::EffectDispelMechanic(), Spell::EffectInebriate(), StormflurryEvent::Execute(), ScheduledIcicleSummons::Execute(), boss_curator::boss_curatorAI::ExecuteEvent(), boss_sathrovarr::ExecuteEvent(), npc_thorim_trashAI::AIHelper::GetHealTarget(), Aura::GetProcEffectMask(), GetSkillDiscoverySpell(), spell_apothecary_lingering_fumes::HandleAfterCast(), spell_brewfest_botm_pink_elekk::HandleAfterCast(), AuraEffect::HandleAuraDummy(), spell_eastern_plaguelands_test_fetid_skull::HandleDummy(), spell_azuremyst_isle_cast_fishing_net::HandleDummy(), spell_free_webbed_on_quest::HandleDummy(), spell_dustwallow_marsh_salvage_wreckage::HandleDummy(), spell_thaddius_polarity_shift::HandleDummy(), spell_borean_tundra_nerubar_web_random_unit_on_quest_dummy::HandleDummy(), spell_fjord_rivenwood_captives_on_quest::HandleDummy(), spell_fjord_the_way_to_his_heart_anuniaq_net::HandleDummy(), spell_sholazar_despawn_fruit_tosser::HandleDummy(), spell_fatal_strike::HandleDummy(), spell_zuldrak_cocooned_on_quest::HandleDummy(), spell_capacitus_polarity_shift::HandleDummy(), spell_hellfire_peninsula_purify_helboar_meat::HandleDummy(), spell_terokkar_free_webbed_on_quest::HandleDummy(), spell_gen_gnomish_transporter::HandleDummy(), spell_gen_spectator_cheer_trigger::HandleDummy(), spell_item_goblin_bomb_dispenser::HandleDummy(), spell_item_nigh_invulnerability::HandleDummy(), spell_item_poultryizer::HandleDummy(), spell_item_nitro_boosts::HandleDummy(), spell_item_pygmy_oil::HandleDummy(), spell_warl_summon_sayaad::HandleDummy(), spell_pal_final_verdict::HandleDummy(), spell_stratholme_haunting_phantoms::HandleDummyTick(), spell_pri_dark_indulgence::HandleEffectHit(), spell_pri_benediction::HandleEffectHitTarget(), spell_pri_mind_devourer::HandleEffectHitTarget(), spell_pri_surge_of_light::HandleEffectProc(), spell_pri_prayer_of_mending_aura::HandleHeal(), spell_doomwalker_earthquake::HandleKnockdown(), spell_sha_earthquake_tick::HandleOnHit(), spell_kaelthas_remote_toy::HandlePeriodic(), spell_gen_elwynn_lamb::HandlePeriodic(), spell_waycrest_manor_wildfire::HandlePeriodic(), spell_warr_bloodsurge::HandlePeriodic(), AuraEffect::HandlePeriodicDamageAurasTick(), spell_item_nitro_boosts_backfire::HandlePeriodicDummy(), AuraEffect::HandlePeriodicHealAurasTick(), AuraEffect::HandlePeriodicHealthLeechAuraTick(), WorldSession::HandlePetActionHelper(), WorldSession::HandlePetCastSpellOpcode(), spell_dk_obliteration::HandleProc(), spell_dru_item_t6_trinket::HandleProc(), spell_item_anger_capacitor< StackAmount >::spell_item_anger_capacitor_AuraScript< Stacks >::HandleProc(), spell_item_aura_of_madness::HandleProc(), spell_rog_ruthlessness::HandleProc(), spell_sha_item_t6_trinket::HandleProc(), spell_hun_shrapnel_shot::HandleProc(), spell_sha_stormflurry::HandleProc(), spell_warr_raging_blow_cooldown_reset::HandleResetCooldown(), spell_mage_arcane_explosion::HandleReverberate(), spell_gen_netherbloom::HandleScript(), spell_gen_nightmare_vine::HandleScript(), spell_item_defibrillate::spell_item_defibrillate_SpellScript::HandleScript(), spell_undercity_bending_shinbone::HandleScript(), spell_hallow_end_trick_or_treat::HandleScript(), spell_hallow_end_tricky_treat::HandleScript(), spell_storm_peaks_bear_flank_master::HandleScript(), spell_leotheras_the_blind_whirlwind_effect::HandleScript(), spell_gen_whisper_to_controller_random::HandleScript(), spell_item_ultrasafe_transporter::HandleScript(), spell_item_dimensional_ripper_area52::HandleScript(), spell_item_eggnog::HandleScript(), spell_gen_mounted_charge::HandleScriptEffect(), spell_silverpine_notify_agatha::HandleScriptEffect(), spell_icecrown_pound_drum::HandleSummon(), spell_xt002_energy_orb::HandleSummons(), npc_shield_orb::npc_shield_orbAI::Initialize(), Player::InitializeSelfResurrectionSpells(), Unit::IsBlockCritical(), npc_joren_ironstock::JustAppeared(), npc_silverpine_webbed_victim::JustDied(), npc_quilboar_warrior::JustDied(), npc_quilboar_geomancer::JustDied(), npc_coilfang_ambusher::JustEngagedWith(), npc_coilfang_guardian::JustEngagedWith(), BroggokPrisionerBaseAI::JustEngagedWith(), npc_shadowmoon_channeler::JustEngagedWith(), npc_fel_orc_convert::JustEngagedWith(), npc_quilboar_warrior::JustEngagedWith(), npc_quilboar_geomancer::JustEngagedWith(), npc_disciple_of_naralex::JustEngagedWith(), boss_blood_council_controller::JustEngagedWith(), npc_guard_generic::JustEngagedWith(), boss_maiden_of_virtue::KilledUnit(), boss_warlord_kalithresh::KilledUnit(), boss_nefarian::KilledUnit(), IllidariCouncilBossAI::KilledUnit(), boss_kalecgos::KilledUnit(), boss_auriaya::KilledUnit(), spell_evo_essence_burst_trigger::Load(), item_generic_limit_chance_above_60::OnCastItemCombatSpell(), go_strange_pool::OnGossipHello(), Scripts::EasternKingdoms::Westfall::npc_westfall_hobo_witness::OnGossipSelect(), spell_ymiron_the_fallen_king_soul_siphon::OnPeriodic(), spell_love_is_in_the_air_sample_satisfaction::OnPeriodic(), spell_pet_gen_lich_pet_periodic_emote::OnPeriodic(), spell_hun_wilderness_medicine::OnPeriodic(), spell_omrogg_burning_maul::OnProc(), spell_warr_devastator::OnProc(), npc_shadow_image::OnSpellCast(), boss_drakos::OnSpellCast(), boss_dalliah_the_doomsayer::OnSpellCast(), boss_wrath_scryer_soccothrates::OnSpellCast(), boss_zereketh_the_unbound::OnSpellCast(), boss_nethermancer_sepethrea::OnSpellCast(), boss_ragnaros::OnSpellCast(), boss_anetheron::OnSpellCast(), boss_archimonde::OnSpellCast(), boss_rage_winterchill::OnSpellCast(), boss_exarch_maladaar::OnSpellCast(), boss_nexusprince_shaffar::OnSpellCast(), boss_lady_vashj::OnSpellCast(), boss_hydromancer_thespia::OnSpellCast(), boss_omor_the_unscarred::OnSpellCast(), boss_watchkeeper_gargolmar::OnSpellCast(), spell_gen_aura_of_fear::PeriodicTick(), Spell::PreprocessSpellLaunch(), SmartScript::ProcessAction(), spell_dru_shooting_stars::ProcessDoT(), BlackMarketMgr::RefreshAuctions(), npc_feasting_valarjar::Reset(), DarkFallenAI::Reset(), LootStoreItem::Roll(), DispelableAura::RollDispel(), spell_hun_cobra_sting::RollProc(), spell_hun_surging_shots::RollProc(), spell_sha_molten_thunder_sundering::RollReset(), boss_illidan_stormrage::ScheduleEvents(), boss_amanitar::SpawnMushroom(), npc_fel_orc_convert::SpellHit(), WorldObject::SpellHitResult(), boss_sara::boss_saraAI::SpellHitTarget(), WindfuryProcEvent::Trigger(), RestMgr::Update(), boss_kalecgos::UpdateAI(), npc_redridge_citizen::npc_redridge_citizenAI::UpdateAI(), Scripts::EasternKingdoms::Westfall::npc_westfall_hobo_witness::UpdateAI(), boss_elder_nadox::UpdateAI(), boss_devourer_of_souls::UpdateAI(), boss_moorabi::UpdateAI(), npc_vrykul_skeleton::UpdateAI(), boss_grandmaster_vorpil::UpdateAI(), boss_gurtogg_bloodboil::UpdateAI(), boss_swamplord_muselek::UpdateAI(), boss_alar::UpdateAI(), boss_kaelthas::UpdateAI(), npc_brewfest_reveler_2::UpdateAI(), and boss_shaman_toc5::boss_shaman_toc5AI::UpdateAI().

◆ urand()

uint32 urand ( uint32  min,
uint32  max 
)

Definition at line 43 of file Random.cpp.

References ASSERT.

Referenced by spell_valkyr_essences::Absorb(), Loot::AddItem(), AuctionBotSeller::AddNewAuctions(), instance_violet_hold::instance_violet_hold_InstanceMapScript::AddWave(), battleground_alterac_valley::battleground_alterac_valley(), battleground_strand_of_the_ancients::battleground_strand_of_the_ancients(), boss_chromaggus::boss_chromaggus(), AuctionBotBuyer::BuyAndBidItems(), Unit::CalculateDamage(), lfg::LFGQueue::CheckCompatibility(), Map::CheckRespawn(), spell_baleroc_blades_of_baleroc::ChooseBlade(), GameObject::Create(), boss_ossirian::boss_ossirianAI::DoAction(), boss_professor_putricide::DoAction(), npc_bg_seething_shore_commander::DoAction(), npc_anub_ar_crusher_necromancer::DoEvent(), npc_anub_ar_necromancer::DoEvent(), RandomMovementGenerator< T >::DoInitialize(), Player::DoRandomRoll(), Spell::EffectDispel(), Spell::EffectPickPocket(), Spell::EffectStealBeneficialBuff(), Spell::EffectTransmitted(), boss_kalecgos_kj::boss_kalecgos_kjAI::EmpowerOrb(), boss_kiljaeden::boss_kiljaedenAI::EnterNextPhase(), boss_epoch::boss_epochAI::ExecuteEvent(), boss_mother_shahraz::ExecuteEvent(), spell_deathbringer_blood_nova_targeting::FilterTargetsInitial(), spell_ulduar_stone_grip_cast_target::spell_ulduar_stone_grip_cast_target_SpellScript::FilterTargetsInitial(), Loot::generateMoneyLoot(), ObjectMgr::GeneratePetName(), boss_fjola::GenerateStageSequence(), ObjectMgr::GetCreatureModelRandomGender(), ObjectMgr::GetEquipmentInfo(), npc_firework::GetFireworkGameObjectId(), Player::GetNextRandomRaidMember(), Unit::GetNextRandomRaidMemberOrPet(), GetRandomMinionSpawnPoint(), AuctionBotSeller::GetStackSizeForItem(), boss_freya::boss_freyaAI::GetWaveId(), spell_harlan_blades_of_light::HandleAfterCast(), boss_twinemperorsAI::HandleBugs(), spell_shadow_portal::HandleCast(), spell_sindragosa_s_fury::HandleDummy(), spell_swipe_honey::spell_swipe_honey_SpellScript::HandleDummy(), spell_fjord_mixing_vrykul_blood::HandleDummy(), spell_sholazar_shoot_rjr::HandleDummy(), spell_sholazar_despawn_fruit_tosser::HandleDummy(), spell_item_gnomish_death_ray::HandleDummy(), spell_item_make_a_wish::HandleDummy(), spell_item_net_o_matic::HandleDummy(), spell_item_noggenfogger_elixir::HandleDummy(), spell_item_savory_deviate_delight::HandleDummy(), spell_item_six_demon_bag::HandleDummy(), spell_item_underbelly_elixir::HandleDummy(), spell_item_universal_remote::HandleDummy(), spell_mage_polymorph_visual::HandleDummy(), spell_q28813_set_health_random::HandleDummyEffect(), spell_guardians_breath_color_selector::HandleHit(), spell_headlong_charge_trigger::HandleHit(), spell_silverpine_free_webbed_victim_random::HandleHit(), spell_hor_gunship_cannon_fire::spell_hor_gunship_cannon_fire_AuraScript::HandlePeriodic(), spell_ormorok_crystal_spike::HandlePeriodic(), arena_mugambala::HandleReactionLowHealth(), arena_blades_edge_legion::HandleReactionTriggerLowHealth(), spell_gen_netherbloom::HandleScript(), spell_item_scroll_of_recall::HandleScript(), spell_item_red_rider_air_rifle::HandleScript(), spell_kormok_summon_bone_mages::HandleScript(), spell_hallow_end_trick::HandleScript(), spell_lunar_festival_elune_candle::HandleScript(), spell_sartura_whirlwind::HandleScript(), spell_paletress_summon_memory::spell_paletress_summon_memory_SpellScript::HandleScript(), spell_putricide_choking_gas_bomb::HandleScript(), spell_storm_peaks_call_of_earth::HandleScript(), spell_gen_upper_deck_create_foam_sword::HandleScript(), spell_item_ultrasafe_transporter::HandleScript(), spell_item_dimensional_ripper_area52::HandleScript(), spell_random_ingredient::HandleScriptEffect(), spell_item_mirrens_drinking_hat::HandleScriptEffect(), boss_noth::HandleSummon(), spell_xt002_energy_orb::HandleSummons(), spell_dracthyr_login::HandleTeleport(), spell_mimiron_weld::spell_mimiron_weld_AuraScript::HandleTick(), spell_magic_eater_food::HandleTriggerSpell(), boss_malchezaar::boss_malchezaarAI::Initialize(), boss_priestess_lackey_commonAI::Initialize(), npc_highlord_darion_mograine::npc_highlord_darion_mograineAI::Initialize(), npc_hand_of_the_deceiver::npc_hand_of_the_deceiverAI::Initialize(), npc_shield_orb::npc_shield_orbAI::Initialize(), npc_wounded_milita::npc_wounded_militaAI::Initialize(), boss_onyxia::Initialize(), boss_ouro::boss_ouroAI::Initialize(), boss_twinemperorsAI::Initialize(), boss_veknilash::boss_veknilashAI::Initialize(), boss_veklor::boss_veklorAI::Initialize(), npc_engineer_spark_overgrind::npc_engineer_spark_overgrindAI::Initialize(), boss_paletress::boss_paletressAI::Initialize(), boss_black_knight::boss_black_knightAI::Initialize(), generic_vehicleAI_toc5::generic_vehicleAI_toc5AI::Initialize(), boss_warrior_toc5::boss_warrior_toc5AI::Initialize(), boss_shaman_toc5::boss_shaman_toc5AI::Initialize(), npc_swarm_scarab::Initialize(), npc_toc_pet_hunter::Initialize(), boss_ionar::Initialize(), npc_scourge_hulk::Initialize(), npc_valiance_keep_cannoneer::Initialize(), npc_wormhole::npc_wormholeAI::Initialize(), npc_spring_rabbit::npc_spring_rabbitAI::Initialize(), npc_troll_volunteer::InitializeAI(), instance_violet_hold::instance_violet_hold_InstanceMapScript::instance_violet_hold_InstanceMapScript(), npc_amalgam_of_souls_soul_echoes_stalker::IsSummonedBy(), npc_scarlet_ghoul::JustAppeared(), npc_silverpine_orc_sea_dog_not_sick::JustAppeared(), Scripts::Kalimdor::Durotar::npc_durotar_tiki_target::JustAppeared(), npc_spectral_ghostly_citizen::npc_spectral_ghostly_citizenAI::JustDied(), boss_volazj::JustDied(), npc_shadow_image::JustEngagedWith(), npc_muglash::npc_muglashAI::JustEngagedWith(), npc_belnistrasz::npc_belnistraszAI::JustEngagedWith(), boss_illidari_council::JustEngagedWith(), npc_earthmender_wilda::npc_earthmender_wildaAI::JustEngagedWith(), boss_anubarak_trial::JustReachedHome(), boss_skeram::boss_skeramAI::JustSummoned(), npc_necromancer::npc_necromancerAI::KilledUnit(), boss_doomwalker::KilledUnit(), boss_volazj::KilledUnit(), Player::LoadFromDB(), Creature::LoadFromDB(), Unit::MeleeSpellHitResult(), npc_hearthsinger_forresten_cot::npc_hearthsinger_forresten_cotAI::MoveInLineOfSight(), npc_commander_eligor_dawnbringer::MovementInform(), npc_unleashed_ballAI::MovementInform(), npc_unleashed_ballAI::MoveToNextPoint(), npc_healthy_spore::npc_healthy_sporeAI::npc_healthy_sporeAI(), npc_jaina_proudmoore::npc_jaina_proudmooreAI::npc_jaina_proudmooreAI(), npc_nature_bomb::npc_nature_bombAI::npc_nature_bombAI(), npc_scarlet_trainee::npc_scarlet_trainee(), npc_thrall::npc_thrallAI::npc_thrallAI(), npc_unstable_sun_beam::npc_unstable_sun_beamAI::npc_unstable_sun_beamAI(), instance_blackfathom_deeps::instance_blackfathom_deeps_InstanceMapScript::OnCreatureCreate(), spell_item_ashbringer::OnDummyEffect(), go_shallow_grave::go_shallow_graveAI::OnGossipHello(), go_midsummer_ribbon_pole::go_midsummer_ribbon_poleAI::OnGossipHello(), spell_mother_shahraz_random_periodic::OnPeriodic(), instance_karazhan::instance_karazhan_InstanceMapScript::OnUnitDeath(), battleground_alterac_valley::OnUpdate(), spell_bullet_controller::PeriodicTick(), LootRoll::PlayerVote(), SmartScript::ProcessAction(), RAND(), Trinity::Containers::RandomResize(), randtime(), SmartScript::RecalcTimer(), Weather::ReGenerate(), RegeneratePool(), Player::RemovedInsignia(), npc_feasting_valarjar::Reset(), npc_silverpine_forsaken_trooper::Reset(), npc_firework::Reset(), boss_fankriss::Reset(), npc_injured_draenei::npc_injured_draeneiAI::Reset(), npc_razorscale_spawner::Reset(), GarrisonMgr::RollFollowerAbilities(), Unit::RollMeleeOutcomeAgainst(), boss_alyson_antille::ScheduleEvents(), boss_cragmaw_the_infested::ScheduleSpells(), boss_toc_champion_controller::SelectChampions(), Trinity::Containers::SelectRandomContainerElement(), npc_gothik_trigger::SelectRandomSkullPile(), Trinity::Containers::SelectRandomWeightedContainerElement(), PlayerAI::SelectSpellCast(), Creature::SelectWildBattlePetLevel(), WorldSession::SendConnectToInstance(), npc_announcer_toc5::npc_announcer_toc5AI::SetArgentChampion(), violet_hold_trashAI::SetData(), npc_announcer_toc5::npc_announcer_toc5AI::SetGrandChampionsForEncounter(), boss_onyxia::SetNextRandomPoint(), RandomMovementGenerator< T >::SetRandomLocation(), ConfusedMovementGenerator< T >::SetTargetLocation(), FleeingMovementGenerator::SetTargetLocation(), BattlefieldTB::SetupBattlefield(), BattlefieldWG::SetupBattlefield(), instance_violet_hold::instance_violet_hold_InstanceMapScript::SpawnPortal(), boss_toc_champion_controller::SummonChampions(), boss_thorim::boss_thorimAI::SummonWave(), boss_lady_deathwhisper::SummonWaveP1(), boss_lady_deathwhisper::SummonWaveP2(), battleground_strand_of_the_ancients::TeleportToEntrancePosition(), gunship_npc_AI::TriggerBurningPitch(), GameObject::Update(), instance_blackwing_lair::instance_blackwing_lair_InstanceMapScript::Update(), instance_culling_of_stratholme::instance_culling_of_stratholme_InstanceMapScript::Update(), Creature::Update(), boss_alizabal::boss_alizabalAI::UpdateAI(), boss_victor_nefarius::UpdateAI(), boss_netherspite::boss_netherspiteAI::UpdateAI(), boss_malchezaar::boss_malchezaarAI::UpdateAI(), boss_shade_of_aran::boss_aranAI::UpdateAI(), npc_aran_elemental::water_elementalAI::UpdateAI(), boss_priestess_delrissa::UpdateAI(), boss_priestess_lackey_commonAI::UpdateAI(), npc_highlord_darion_mograine::npc_highlord_darion_mograineAI::UpdateAI(), boss_kalecgos::UpdateAI(), boss_kiljaeden::boss_kiljaedenAI::UpdateAI(), npc_felfire_portal::npc_felfire_portalAI::UpdateAI(), npc_shield_orb::npc_shield_orbAI::UpdateAI(), npc_sinster_reflection::npc_sinster_reflectionAI::UpdateAI(), npc_partygoer_pather::UpdateAI(), npc_partygoer::UpdateAI(), npc_redridge_huge_boulder::UpdateAI(), npc_redridge_citizen::npc_redridge_citizenAI::UpdateAI(), npc_silverpine_salty_rocka::UpdateAI(), Scripts::EasternKingdoms::Westfall::npc_westfall_hobo_witness::UpdateAI(), npc_sergeant_morigan::npc_sergeant_moriganAI::UpdateAI(), npc_arthas_stratholme::npc_arthas_stratholmeAI::UpdateAI(), npc_belnistrasz::npc_belnistraszAI::UpdateAI(), boss_cthun::cthunAI::UpdateAI(), boss_fankriss::UpdateAI(), boss_ouro::boss_ouroAI::UpdateAI(), boss_skeram::boss_skeramAI::UpdateAI(), npc_engineer_spark_overgrind::npc_engineer_spark_overgrindAI::UpdateAI(), npc_qiraj_war_spawn::npc_qiraj_war_spawnAI::UpdateAI(), boss_sartharion::UpdateAI(), boss_anubarak_trial::UpdateAI(), npc_swarm_scarab::UpdateAI(), npc_toc_priest::UpdateAI(), npc_toc_shadow_priest::UpdateAI(), npc_toc_pet_hunter::UpdateAI(), npc_geist_ambusher::UpdateAI(), boss_kelthuzad::UpdateAI(), boss_maexxna::UpdateAI(), boss_anomalus::UpdateAI(), npc_tribuna_controller::UpdateAI(), boss_runemaster_molgeim::boss_runemaster_molgeimAI::UpdateAI(), boss_flame_leviathan::boss_flame_leviathanAI::UpdateAI(), boss_elder_brightleaf::boss_elder_brightleafAI::UpdateAI(), npc_detonating_lasher::npc_detonating_lasherAI::UpdateAI(), npc_ancient_water_spirit::npc_ancient_water_spiritAI::UpdateAI(), npc_storm_lasher::npc_storm_lasherAI::UpdateAI(), npc_ancient_conservator::npc_ancient_conservatorAI::UpdateAI(), npc_healthy_spore::npc_healthy_sporeAI::UpdateAI(), boss_ignis::boss_ignis_AI::UpdateAI(), boss_razorscale::UpdateAI(), boss_voice_of_yogg_saron::boss_voice_of_yogg_saronAI::UpdateAI(), npc_scourge_hulk::UpdateAI(), npc_valiance_keep_cannoneer::UpdateAI(), npc_minigob_manabonk::UpdateAI(), npc_commander_eligor_dawnbringer::UpdateAI(), npc_blessed_banner::UpdateAI(), boss_illidan_stormrage::UpdateAI(), boss_shattered_executioner::UpdateAI(), npc_colonel_jules::npc_colonel_julesAI::UpdateAI(), npc_maghar_captive::npc_maghar_captiveAI::UpdateAI(), npc_kurenai_captive::npc_kurenai_captiveAI::UpdateAI(), npc_phase_hunter::npc_phase_hunterAI::UpdateAI(), npc_pet_hunter_snake_trap::UpdateAI(), npc_dream_fog::npc_dream_fogAI::UpdateAI(), go_brewfest_music::go_brewfest_musicAI::UpdateAI(), npc_doctor::npc_doctorAI::UpdateAI(), npc_spring_rabbit::npc_spring_rabbitAI::UpdateAI(), boss_paletress::boss_paletressAI::UpdateAI(), boss_black_knight::boss_black_knightAI::UpdateAI(), generic_vehicleAI_toc5::generic_vehicleAI_toc5AI::UpdateAI(), boss_warrior_toc5::boss_warrior_toc5AI::UpdateAI(), boss_shaman_toc5::boss_shaman_toc5AI::UpdateAI(), boss_ionar::UpdateAI(), PetAI::UpdateAI(), Channel::UpdateChannelInDB(), npc_tooga::npc_toogaAI::UpdateFollowerAI(), Player::UpdateMirrorTimers(), BattlefieldTB::UpdateNPCsAndGameObjects(), boss_grand_warlock_nethekurse::UpdateOutOfCombatEvents(), urandms(), and npc_bg_seething_shore_air_supplies_drop::WaypointPathEnded().

◆ urandms()

◆ urandweighted()

uint32 urandweighted ( size_t  count,
double const *  chances 
)