1146 {
1149 if (!target)
1150 return;
1151
1153 float minDist = 20.0f;
1154 float maxDist = 30.0f;
1155 float dist = (maxDist - minDist) *
rand_norm() + minDist;
1156 float startAngle = 3 * M_PI / 2;
1158 float angle = startAngle +
rand_norm() * maxAddAngle;
1160 }
double rand_norm()
Definition: Random.cpp:77
std::uint32_t uint32
Definition: Define.h:107
Map * GetMap() const
Definition: Object.h:531
float GetPositionZ() const
Definition: Position.h:119
float GetPositionX() const
Definition: Position.h:117
float GetPositionY() const
Definition: Position.h:118
SpellCastResult CastSpell(SpellCastTargets const &targets, SpellInfo const *spellInfo, CustomSpellValues const *value, TriggerCastFlags triggerFlags=TRIGGERED_NONE, Item *castItem=nullptr, AuraEffect const *triggeredByAura=nullptr, ObjectGuid originalCaster=ObjectGuid::Empty)
Definition: Unit.cpp:1168
uint8 GetSpawnMode() const
Definition: Map.h:420
uint32 Id
Definition: SpellInfo.h:320
SpellInfo const * GetSpellInfo()
Definition: SpellScript.cpp:411
void PreventHitDefaultEffect(SpellEffIndex effIndex)
Definition: SpellScript.cpp:590
Unit * GetHitUnit()
Definition: SpellScript.cpp:448