![]() |
TrinityCore
|
Include dependency graph for Random.h:
This graph shows which files directly or indirectly include this file:Go to the source code of this file.
Classes | |
| class | RandomEngine |
Functions | |
| TC_COMMON_API int32 | irand (int32 min, int32 max) |
| TC_COMMON_API uint32 | urand (uint32 min, uint32 max) |
| TC_COMMON_API uint32 | urandms (uint32 min, uint32 max) |
| TC_COMMON_API uint32 | rand32 () |
| TC_COMMON_API Milliseconds | randtime (Milliseconds min, Milliseconds max) |
| TC_COMMON_API float | frand (float min, float max) |
| TC_COMMON_API double | rand_norm () |
| TC_COMMON_API double | rand_chance () |
| TC_COMMON_API uint32 | urandweighted (size_t count, double const *chances) |
| bool | roll_chance_f (float chance) |
| bool | roll_chance_i (int chance) |
| TC_COMMON_API float frand | ( | float | min, |
| float | max | ||
| ) |
Definition at line 55 of file Random.cpp.
References ASSERT, and engine.
Referenced by FleeingMovementGenerator< T >::GetPoint(), npc_anubarak_anub_ar_assassin::GetRandomPositionAround(), spell_malygos_random_portal::HandleDummy(), spell_swamplord_muselek_move_away_primer::HandleDummy(), spell_item_unusual_compass::HandleDummy(), npc_molten_flame::InitializeAI(), npc_meteor_strike_initial::IsSummonedBy(), boss_sara::boss_saraAI::JustSummoned(), spell_grizzly_hills_escape_from_silverbrook_summon_worgen::ModDest(), npc_ashtongue_sorcerer::MoveInLineOfSight(), npc_gunship_boarding_addAI::MovementInform(), npc_unleashed_ballAI::MoveToNextPoint(), 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(), 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(), boss_arlokk::UpdateAI(), go_cheer_speaker::go_cheer_speakerAI::UpdateAI(), npc_meteor_strike::UpdateAI(), npc_meteor_strike_flame::UpdateAI(), and npc_minigob_manabonk::UpdateAI().
| TC_COMMON_API int32 irand | ( | int32 | min, |
| int32 | max | ||
| ) |
Definition at line 35 of file Random.cpp.
References ASSERT, and engine.
Referenced by spell_dk_ghoul_thrash::CalcDamage(), spell_shadowfang_keep_haunting_spirits::spell_shadowfang_keep_haunting_spirits_AuraScript::CalcPeriodic(), spell_stratholme_haunting_phantoms::CalcPeriodic(), spell_zuldrak_scourge_disguise_instability::CalcPeriodic(), SpellEffectInfo::CalcValue(), Spell::CheckCast(), hyjalAI::DoOverrun(), Spell::EffectSchoolDMG(), GetItemEnchantMod(), spell_gen_gadgetzan_transporter_backfire::HandleDummy(), spell_ulduar_squeezed_lifeless::spell_ulduar_squeezed_lifeless_SpellScript::HandleInstaKill(), spell_item_dimensional_ripper_everlook::HandleScript(), WorldObject::MagicSpellHitResult(), roll_chance_i(), npc_minigob_manabonk::SendMailToPlayer(), instance_razorfen_downs::instance_razorfen_downs_InstanceMapScript::SetData(), violet_hold_trashAI::SetData(), boss_general_angerforge::boss_general_angerforgeAI::SummonAdd(), hyjalAI::SummonCreature(), boss_general_angerforge::boss_general_angerforgeAI::SummonMedic(), npc_giant_infernal::npc_giant_infernalAI::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_frost_wyrm::npc_frost_wyrmAI::UpdateAI(), npc_gargoyle::npc_gargoyleAI::UpdateAI(), hyjal_trashAI::UpdateAI(), boss_stormcaller_brundir::boss_stormcaller_brundirAI::UpdateAI(), Player::UpdateSkillPro(), GameObject::Use(), and hyjalAI::WaypointReached().
| TC_COMMON_API uint32 rand32 | ( | ) |
Definition at line 70 of file Random.cpp.
References GetRng(), and SFMTRand::RandomUInt32().
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(), CasterAI::JustEngagedWith(), CombatAI::JustEngagedWith(), npc_rinji::npc_rinjiAI::JustEngagedWith(), npc_gilthares::npc_giltharesAI::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(), CombatAI::UpdateAI(), 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(), and npc_doctor::npc_doctorAI::UpdateAI().
| TC_COMMON_API double rand_chance | ( | ) |
Definition at line 81 of file Random.cpp.
References engine.
Referenced by GetExplicitDiscoverySpell(), GetItemEnchantMod(), LootTemplate::LootGroup::Roll(), roll_chance_f(), and PoolGroup< T >::SpawnObject().
| TC_COMMON_API double rand_norm | ( | ) |
Definition at line 75 of file Random.cpp.
References engine.
Referenced by SpellImplicitTargetInfo::CalcDirectionAngle(), Unit::CalcSpellResistedDamage(), Spell::EffectStuck(), Spell::EffectTransmitted(), WorldObject::GetRandomNearPosition(), WorldObject::GetRandomPoint(), npc_anubarak_anub_ar_assassin::GetRandomPositionAround(), GetRandomPositionOnCircle(), Position::GetSinCos(), spell_midsummer_fling_torch::HandleDummy(), spell_midsummer_fling_torch_catch::HandleScriptEffect(), npc_troll_volunteer::InitializeAI(), Weather::ReGenerate(), spell_sindragosa_s_fury::SelectDest(), Spell::SelectImplicitCasterDestTargets(), Spell::SelectImplicitDestDestTargets(), Spell::SelectImplicitTargetDestTargets(), instance_culling_of_stratholme::instance_culling_of_stratholme_InstanceMapScript::SetGuidData(), boss_sindragosa::UpdateAI(), and npc_strangulate_vehicle::UpdateAI().
| TC_COMMON_API Milliseconds randtime | ( | Milliseconds | min, |
| Milliseconds | max | ||
| ) |
Definition at line 62 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(), boss_noth::EnterPhaseGround(), boss_sapphiron::EnterPhaseGround(), ActivateLivingConstellation::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(), 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(), and boss_thaddius::UpdateAI().
|
inline |
Definition at line 53 of file Random.h.
References rand_chance().
Referenced by spell_dk_spell_deflection::Absorb(), Player::CastItemCombatSpell(), spell_dk_wandering_plague::CheckProc(), Unit::DealDamage(), Unit::DealMeleeDamage(), Spell::DoCreateItem(), npc_thorim_trashAI::AIHelper::GetHealTarget(), Aura::GetProcEffectMask(), GetSkillDiscoverySpell(), WorldSession::HandleGMResponseResolve(), AuraEffect::HandlePeriodicDamageAurasTick(), AuraEffect::HandlePeriodicHealAurasTick(), AuraEffect::HandlePeriodicHealthLeechAuraTick(), spell_sha_lightning_overload::HandleProc(), spell_gen_mounted_charge::HandleScriptEffect(), item_generic_limit_chance_above_60::OnCastItemCombatSpell(), Spell::PreprocessSpellLaunch(), LootStoreItem::Roll(), and Player::UpdateCombatSkills().
|
inline |
Definition at line 59 of file Random.h.
References irand().
Referenced by spell_rog_cheat_death::Absorb(), spell_mage_fire_frost_ward::Absorb(), spell_mage_ice_barrier::AfterRemove(), spell_sha_earthbind_totem::Apply(), spell_dru_eclipse::CheckLunar(), spell_hun_lock_and_load::CheckPeriodicProc(), spell_pal_divine_purpose::CheckProc(), spell_dru_t3_2p_bonus::CheckProc(), spell_hun_improved_mend_pet::CheckProc(), spell_mage_gen_extra_effects::CheckProc(), spell_mage_missile_barrage::CheckProc(), spell_mage_missile_barrage_proc::CheckProc(), spell_pal_item_t6_trinket::CheckProc(), spell_pri_improved_spirit_tap::CheckProc(), spell_sha_earthliving_weapon::CheckProc(), spell_sha_imp_water_shield::CheckProc(), spell_hun_lock_and_load::CheckTrapProc(), Spell::DoTriggersOnSpellHit(), Spell::EffectDispelMechanic(), Spell::EffectInebriate(), Spell::EffectSchoolDMG(), Spell::EffectWeaponDmg(), ScheduledIcicleSummons::Execute(), boss_curator::boss_curatorAI::ExecuteEvent(), boss_sathrovarr::ExecuteEvent(), Unit::GetMeleeHitRedirectTarget(), Player::GetResurrectionSpellId(), spell_apothecary_lingering_fumes::HandleAfterCast(), spell_brewfest_botm_pink_elekk::HandleAfterCast(), AuraEffect::HandleAuraDummy(), AuraEffect::HandleAuraModShapeshift(), Aura::HandleAuraSpecificMods(), spell_sha_maelstrom_weapon::HandleBonus(), AuraEffect::HandleChannelDeathItem(), 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_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_item_mind_control_cap::HandleDummy(), spell_stratholme_haunting_phantoms::HandleDummyTick(), spell_sha_earthbind_totem::HandleEffectPeriodic(), spell_kaelthas_remote_toy::HandlePeriodic(), spell_gen_elwynn_lamb::HandlePeriodic(), spell_item_nitro_boosts_backfire::HandlePeriodicDummy(), WorldSession::HandlePetActionHelper(), WorldSession::HandlePetCastSpellOpcode(), spell_warr_extra_proc::HandleProc(), spell_dk_threat_of_thassarian::HandleProc(), spell_dru_revitalize::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_mage_hot_streak::HandleProc(), spell_pri_imp_shadowform::HandleProc(), spell_sha_frozen_power::HandleProc(), spell_sha_item_t6_trinket::HandleProc(), spell_warl_soul_leech::HandleProc(), spell_pri_body_and_soul::HandleProcDummy(), 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_hun_invigoration::HandleScriptEffect(), spell_icecrown_pound_drum::HandleSummon(), spell_xt002_energy_orb::HandleSummons(), spell_warl_drain_soul::HandleTick(), npc_shield_orb::npc_shield_orbAI::Initialize(), Unit::IsBlockCritical(), npc_coilfang_ambusher::JustEngagedWith(), npc_coilfang_guardian::JustEngagedWith(), BroggokPrisionerBaseAI::JustEngagedWith(), npc_shadowmoon_channeler::JustEngagedWith(), npc_fel_orc_convert::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(), go_strange_pool::OnGossipHello(), spell_collecting_fallout::spell_collecting_fallout_SpellScript::OnLaunch(), spell_love_is_in_the_air_sample_satisfaction::OnPeriodic(), spell_pet_gen_lich_pet_periodic_emote::OnPeriodic(), spell_omrogg_burning_maul::OnProc(), npc_shadow_image::OnSpellCast(), boss_drakos::OnSpellCast(), boss_dalliah_the_doomsayer::OnSpellCast(), boss_wrath_scryer_soccothrates::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(), boss_zereketh_the_unbound::OnSpellCast(), boss_mechano_lord_capacitus::OnSpellCast(), boss_nethermancer_sepethrea::OnSpellCast(), boss_mechano_lord_capacitus::OnSpellStart(), spell_gen_aura_of_fear::PeriodicTick(), SmartScript::ProcessAction(), DarkFallenAI::Reset(), DispelableAura::RollDispel(), boss_illidan_stormrage::ScheduleEvents(), boss_amanitar::SpawnMushroom(), npc_fel_orc_convert::SpellHit(), WorldObject::SpellHitResult(), boss_sara::boss_saraAI::SpellHitTarget(), Player::Update(), boss_kalecgos::UpdateAI(), boss_elder_nadox::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().
| TC_COMMON_API uint32 urand | ( | uint32 | min, |
| uint32 | max | ||
| ) |
Definition at line 42 of file Random.cpp.
References ASSERT, and engine.
Referenced by spell_valkyr_essences::Absorb(), ObjectMgr::AddCreatureData(), Loot::AddItem(), AuctionBotSeller::AddNewAuctions(), instance_violet_hold::instance_violet_hold_InstanceMapScript::AddWave(), boss_mr_smite::boss_mr_smiteAI::bCheckChances(), boss_chromaggus::boss_chromaggus(), AuctionBotBuyer::BuyAndBidItems(), Unit::CalculateDamage(), BattlegroundAV::ChangeMineOwner(), lfg::LFGQueue::CheckCompatibility(), Map::CheckRespawn(), Group::CountTheRoll(), GameObject::Create(), Unit::DealDamage(), boss_ossirian::boss_ossirianAI::DoAction(), boss_professor_putricide::DoAction(), npc_anub_ar_crusher_necromancer::DoEvent(), npc_anub_ar_necromancer::DoEvent(), RandomMovementGenerator< T >::DoInitialize(), Player::DoRandomRoll(), Spell::EffectDispel(), 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(), CreatureTemplate::GetRandomValidModelId(), AuctionBotSeller::GetStackSizeForItem(), boss_freya::boss_freyaAI::GetWaveId(), boss_twinemperorsAI::HandleBugs(), spell_shadow_portal::HandleCast(), Player::HandleDrowning(), spell_sindragosa_s_fury::HandleDummy(), spell_gordunni_trap::HandleDummy(), spell_fjord_mixing_vrykul_blood::HandleDummy(), spell_sholazar_shoot_rjr::HandleDummy(), spell_sholazar_despawn_fruit_tosser::HandleDummy(), spell_item_flask_of_the_north::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_cast_visual::spell_mage_polymorph_cast_visual_SpellScript::HandleDummy(), spell_hor_gunship_cannon_fire::spell_hor_gunship_cannon_fire_AuraScript::HandlePeriodic(), spell_ormorok_crystal_spike::HandlePeriodic(), 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_mimiron_weld::spell_mimiron_weld_AuraScript::HandleTick(), Battleground::HandleTriggerBuff(), spell_magic_eater_food::HandleTriggerSpell(), boss_mr_smite::boss_mr_smiteAI::Initialize(), boss_malchezaar::boss_malchezaarAI::Initialize(), boss_priestess_lackey_commonAI::Initialize(), npc_highlord_darion_mograine::npc_highlord_darion_mograineAI::Initialize(), npc_arugal_voidwalker::npc_arugal_voidwalkerAI::Initialize(), npc_hand_of_the_deceiver::npc_hand_of_the_deceiverAI::Initialize(), npc_shield_orb::npc_shield_orbAI::Initialize(), npc_vilebranch_speaker::Initialize(), boss_renataki::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(), npc_kerlonian::npc_kerlonianAI::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_scarlet_ghoul::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(), npc_prospector_remtravel::npc_prospector_remtravelAI::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(), WaypointMovementGenerator< Creature >::OnArrived(), 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(), npc_innkeeper::npc_innkeeperAI::OnGossipSelect(), spell_mother_shahraz_random_periodic::OnPeriodic(), instance_karazhan::instance_karazhan_InstanceMapScript::OnUnitDeath(), spell_bullet_controller::PeriodicTick(), BattlegroundAV::PostUpdateImpl(), SmartScript::ProcessAction(), RAND(), Trinity::Containers::RandomResize(), randtime(), SmartScript::RecalcTimer(), Weather::ReGenerate(), RegeneratePool(), BattlegroundSA::Reset(), boss_zuljin::Reset(), npc_firework::Reset(), boss_fankriss::Reset(), npc_injured_draenei::npc_injured_draeneiAI::Reset(), npc_razorscale_spawner::Reset(), BattlegroundAV::ResetBGSubclass(), Unit::RollMeleeOutcomeAgainst(), boss_alyson_antille::ScheduleEvents(), boss_toc_champion_controller::SelectChampions(), Creature::SelectLevel(), Trinity::Containers::SelectRandomContainerElement(), npc_gothik_trigger::SelectRandomSkullPile(), PlayerAI::SelectSpellCast(), World::SendAutoBroadcast(), Player::SendLoot(), 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< T >::SetTargetLocation(), BattlefieldWG::SetupBattlefield(), instance_violet_hold::instance_violet_hold_InstanceMapScript::SpawnPortal(), boss_zuljin::SpellHitTarget(), BattlegroundAB::StartingEventOpenDoors(), BattlegroundEY::StartingEventOpenDoors(), boss_toc_champion_controller::SummonChampions(), boss_thorim::boss_thorimAI::SummonWave(), boss_lady_deathwhisper::SummonWaveP1(), boss_lady_deathwhisper::SummonWaveP2(), BattlegroundSA::TeleportToEntrancePosition(), gunship_npc_AI::TriggerBurningPitch(), instance_blackwing_lair::instance_blackwing_lair_InstanceMapScript::Update(), instance_culling_of_stratholme::instance_culling_of_stratholme_InstanceMapScript::Update(), GameObject::Update(), Creature::Update(), 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_archmage_arugal::boss_archmage_arugalAI::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(), boss_arlokk::UpdateAI(), npc_ohgan::UpdateAI(), npc_vilebranch_speaker::UpdateAI(), boss_renataki::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_doomwalker::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_mr_smite::boss_mr_smiteAI::UpdateAI(), npc_arugal_voidwalker::npc_arugal_voidwalkerAI::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_kerlonian::npc_kerlonianAI::UpdateFollowerAI(), npc_tooga::npc_toogaAI::UpdateFollowerAI(), boss_grand_warlock_nethekurse::UpdateOutOfCombatEvents(), and urandms().
| TC_COMMON_API uint32 urandms | ( | uint32 | min, |
| uint32 | max | ||
| ) |
Definition at line 49 of file Random.cpp.
References ASSERT, and urand().
Referenced by npc_gothik_minion_livingtrainee::_UpdateAI(), npc_gothik_minion_livingknight::_UpdateAI(), npc_gothik_minion_livingrider::_UpdateAI(), npc_gothik_minion_spectralknight::_UpdateAI(), npc_gothik_minion_spectralrider::_UpdateAI(), npc_gothik_minion_spectralhorse::_UpdateAI(), spell_hadronox_periodic_summon_template_AuraScript::HandleApply(), npc_pet_hunter_snake_trap::JustAppeared(), npc_kelthuzad_minionAI::MovementInform(), npc_kelthuzad_abomination::UpdateAI(), npc_kelthuzad_guardian::UpdateAI(), npc_stalagg::UpdateAI(), and npc_arthas_stratholme::npc_arthas_stratholmeAI::UpdateAICombat().
| TC_COMMON_API uint32 urandweighted | ( | size_t | count, |
| double const * | chances | ||
| ) |
Definition at line 87 of file Random.cpp.
References engine.
Referenced by Trinity::Containers::SelectRandomWeightedContainerElement().