77 float speedXY, speedZ;
79 m_caster->GetMotionMaster()->MoveJump(x, y, z, speedXY, speedZ);
100 m_caster->GetMotionMaster()->MoveJump(x, y, z + jumpDestOverride->ZOffset,
101 jumpDestOverride->SpeedXY, jumpDestOverride->SpeedZ);
105 float speedXY, speedZ;
107 m_caster->GetMotionMaster()->MoveJump(x, y, z, speedXY, speedZ);
113 speedZ = float(
m_spellInfo->Effects[i].MiscValue) / 10;
115 speedZ = float(
m_spellInfo->Effects[i].MiscValueB) / 10;
118 speedXY = dist * 10.0f / speedZ;
136 SF_LOG_ERROR(
"spells",
"Spell::EffectTeleportUnits - does not have destination for spellId %u.",
m_spellInfo->Id);
144 float x, y, z, orientation;
145 destTarget->GetPosition(x, y, z, orientation);
146 if (!orientation &&
m_targets.GetUnitTarget())
147 orientation =
m_targets.GetUnitTarget()->GetOrientation();
148 SF_LOG_DEBUG(
"spells",
"Spell::EffectTeleportUnits - teleport unit to %u %f %f %f %f\n", mapid, x, y, z, orientation);
156 SF_LOG_ERROR(
"spells",
"Spell::EffectTeleportUnits - spellId %u attempted to teleport creature to a different map.",
m_spellInfo->Id);
163 switch (teleportPostEffect->Kind)
168 std::rand() % teleportPostEffect->RandomEffectCount);
177 uint32 randomEffect = std::rand() % teleportPostEffect->RandomEffectCount + 1;
179 if (randomEffect == 5)
183 randomEffect, player->GetTeam());
197 uint32 randomEffect = std::rand() % teleportPostEffect->RandomEffectCount + 1;
199 if (randomEffect == 4)
203 randomEffect, player->GetTeam());
253 float radius =
m_spellInfo->Effects[effIndex].CalcRadius();
374 float dist =
m_caster->GetDistance(pos);
375 m_caster->GetFirstCollisionPosition(pos, dist, angle);
390 if (creatureTarget->isWorldBoss() || creatureTarget->IsDungeonBoss())
402 float speedxy = float(
m_spellInfo->Effects[effIndex].MiscValue) * ratio;
403 float speedz = float(
damage) * ratio;
404 if (speedxy < 0.1f && speedz < 0.1f)
420 unitTarget->KnockbackFrom(x, y, speedxy, speedz);
431 float speedxy = float(
m_spellInfo->Effects[effIndex].MiscValue) / 10;
432 float speedz = float(
damage / 10);
456 float speedZ = (float)(
m_spellInfo->Effects[effIndex].CalcValue() / 10);
457 float speedXY = (float)(
m_spellInfo->Effects[effIndex].MiscValue / 10);
483 unitTarget->ToPlayer()->GetSession()->SendDiscoverNewTaxiNode(nodeid);
522 SF_LOG_DEBUG(
"spells",
"EffectBind: New homebind X: %f, Y: %f, Z: %f, MapId: %u, AreaId: %u",
DBCStorage< TaxiNodesEntry > sTaxiNodesStore(TaxiNodesEntryfmt)
@ DYNAMIC_OBJECT_FARSIGHT_FOCUS
#define SF_LOG_DEBUG(filterType__,...)
#define SF_LOG_ERROR(filterType__,...)
#define SF_LOG_INFO(filterType__,...)
@ SPELL_EFFECT_PULL_TOWARDS_DEST
@ SPELL_EFFECT_KNOCK_BACK_DEST
@ SPELL_EFFECT_HANDLE_LAUNCH_TARGET
@ SPELL_EFFECT_HANDLE_LAUNCH
@ SPELL_EFFECT_HANDLE_HIT
@ SPELL_EFFECT_HANDLE_HIT_TARGET
@ TRIGGERED_FULL_MASK
Will ignore most target checks (mostly DBC target checks).
bool roll_chance_i(int chance)
void WriteGuidMask(const ObjectGuid &guid, Offsets... offsets)
bool CreateDynamicObject(uint32 guidlow, Unit *caster, SpellInfo const *spell, Position const &pos, float radius, DynamicObjectType type)
void SetCasterViewpoint()
void SetDuration(int32 newDuration)
uint32 GetGUIDLow() const
void SendDirectMessage(WorldPacket *data)
bool TeleportTo(uint32 mapid, float x, float y, float z, float orientation, uint32 options=0)
void SetHomebind(WorldLocation const &loc, uint32 areaId)
WorldLocation GetStartPosition() const
void EffectJump(SpellEffIndex effIndex)
SpellCastTargets m_targets
void EffectNULL(SpellEffIndex effIndex)
void EffectAddFarsight(SpellEffIndex effIndex)
void EffectStuck(SpellEffIndex effIndex)
void EffectJumpDest(SpellEffIndex effIndex)
SpellEffectHandleMode effectHandleMode
void EffectPullTowards(SpellEffIndex effIndex)
Spell(Unit *caster, SpellInfo const *info, TriggerCastFlags triggerFlags, uint64 originalCasterGUID=0, bool skipCheck=false)
void EffectChargeDest(SpellEffIndex effIndex)
void EffectTeleportUnits(SpellEffIndex effIndex)
void EffectCharge(SpellEffIndex effIndex)
void EffectDiscoverTaxi(SpellEffIndex effIndex)
void EffectLeap(SpellEffIndex effIndex)
void EffectTeleUnitsFaceCaster(SpellEffIndex effIndex)
PathGenerator m_preGeneratedPath
void EffectLeapBack(SpellEffIndex effIndex)
void EffectPull(SpellEffIndex effIndex)
void CalculateJumpSpeeds(uint8 i, float dist, float &speedxy, float &speedz)
WorldLocation * destTarget
void EffectSendTaxi(SpellEffIndex effIndex)
void EffectKnockBack(SpellEffIndex effIndex)
void EffectBind(SpellEffIndex effIndex)
void EffectDistract(SpellEffIndex effIndex)
SpellInfo const *const m_spellInfo
void WorldRelocate(const WorldLocation &loc)
std::string const & GetName() const
void Initialize(Opcodes opcode, size_t newres=200)
uint32 GetStuckHearthstoneCooldownSpellId()
@ TELEPORT_POST_EFFECT_AREA52_RIPPER
@ TELEPORT_POST_EFFECT_EVERLOOK_RIPPER
@ TELEPORT_POST_EFFECT_TOSHLEYS_TRANSPORTER
uint32 GetArea52RipperPostEffectSpellId(uint32 randomEffect, uint32 team)
uint32 GetToshleysTransporterPostEffectSpellId(uint32 randomEffect, uint32 team)
JumpDestOverride const * GetJumpDestOverride(uint32 spellId)
uint32 GetEverlookRipperPostEffectSpellId(uint32 roll)
TeleportPostEffect const * GetTeleportPostEffect(uint32 spellId)
float GetPositionZ() const
float GetOrientation() const
float GetPositionX() const
void GetPosition(float &x, float &y) const
float GetPositionY() const
void Relocate(float x, float y)