update (core): Knock Back Helpers (#12639)

Adds knock back helpers to the core for future core and module use.
This commit is contained in:
M'Dic
2022-08-05 20:15:58 -04:00
committed by GitHub
parent 9c7a211106
commit 825db0f8c1
3 changed files with 5 additions and 0 deletions

View File

@@ -222,6 +222,7 @@ Player::Player(WorldSession* session): Unit(true), m_mover(this)
m_bHasDelayedTeleport = false;
teleportStore_options = 0;
m_canTeleport = false;
m_canKnockback = false;
m_trade = nullptr;

View File

@@ -2430,6 +2430,8 @@ public:
bool CanTeleport() { return m_canTeleport; }
void SetCanTeleport(bool value) { m_canTeleport = value; }
bool CanKnockback() { return m_canKnockback; }
void SetCanKnockback(bool value) { m_canKnockback = value; }
bool isAllowedToLoot(Creature const* creature);
@@ -2883,6 +2885,7 @@ private:
bool m_bMustDelayTeleport;
bool m_bHasDelayedTeleport;
bool m_canTeleport;
bool m_canKnockback;
std::unique_ptr<PetStable> m_petStable;

View File

@@ -18727,6 +18727,7 @@ void Unit::KnockbackFrom(float x, float y, float speedXY, float speedZ)
player->SetCanFly(true, true);
sScriptMgr->AnticheatSetSkipOnePacketForASH(player, true);
player->SetCanKnockback(true);
}
}