mirror of
https://github.com/liyunfan1223/azerothcore-wotlk.git
synced 2026-08-07 23:38:00 +00:00
add (core): additional helper for jump destination (#11489)
This commit is contained in:
@@ -1125,6 +1125,11 @@ void Spell::EffectJumpDest(SpellEffIndex effIndex)
|
|||||||
speedXY = pow(speedZ * 10, 8);
|
speedXY = pow(speedZ * 10, 8);
|
||||||
m_caster->GetMotionMaster()->MoveJump(x, y, z, speedXY, speedZ, 0, ObjectAccessor::GetUnit(*m_caster, m_caster->GetGuidValue(UNIT_FIELD_TARGET)));
|
m_caster->GetMotionMaster()->MoveJump(x, y, z, speedXY, speedZ, 0, ObjectAccessor::GetUnit(*m_caster, m_caster->GetGuidValue(UNIT_FIELD_TARGET)));
|
||||||
|
|
||||||
|
if (Player* player = m_caster->ToPlayer())
|
||||||
|
{
|
||||||
|
player->SetCanTeleport(true);
|
||||||
|
}
|
||||||
|
|
||||||
if (m_caster->GetTypeId() == TYPEID_PLAYER)
|
if (m_caster->GetTypeId() == TYPEID_PLAYER)
|
||||||
{
|
{
|
||||||
sScriptMgr->AnticheatSetUnderACKmount(m_caster->ToPlayer());
|
sScriptMgr->AnticheatSetUnderACKmount(m_caster->ToPlayer());
|
||||||
@@ -1143,6 +1148,10 @@ void Spell::EffectJumpDest(SpellEffIndex effIndex)
|
|||||||
if (speedXY < 1.0f)
|
if (speedXY < 1.0f)
|
||||||
speedXY = 1.0f;
|
speedXY = 1.0f;
|
||||||
|
|
||||||
|
if (Player* player = m_caster->ToPlayer())
|
||||||
|
{
|
||||||
|
player->SetCanTeleport(true);
|
||||||
|
}
|
||||||
m_caster->GetMotionMaster()->MoveJump(x, y, z, speedXY, speedZ);
|
m_caster->GetMotionMaster()->MoveJump(x, y, z, speedXY, speedZ);
|
||||||
|
|
||||||
if (m_caster->GetTypeId() == TYPEID_PLAYER)
|
if (m_caster->GetTypeId() == TYPEID_PLAYER)
|
||||||
|
|||||||
Reference in New Issue
Block a user