mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-24 14:16:31 +00:00
update (core): Knock Back Helpers (#12639)
Adds knock back helpers to the core for future core and module use.
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user