mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-21 12:47:07 +00:00
fix(Core/Player): Weapon skill gain (#5961)
This commit is contained in:
@@ -266,6 +266,7 @@ public:
|
||||
// FG: some hacky helpers
|
||||
void ForceValuesUpdateAtIndex(uint32);
|
||||
|
||||
[[nodiscard]] inline bool IsPlayer() const { return GetTypeId() == TYPEID_PLAYER; }
|
||||
Player* ToPlayer() { if (GetTypeId() == TYPEID_PLAYER) return reinterpret_cast<Player*>(this); else return nullptr; }
|
||||
[[nodiscard]] Player const* ToPlayer() const { if (GetTypeId() == TYPEID_PLAYER) return (Player const*)((Player*)this); else return nullptr; }
|
||||
Creature* ToCreature() { if (GetTypeId() == TYPEID_UNIT) return reinterpret_cast<Creature*>(this); else return nullptr; }
|
||||
|
||||
Reference in New Issue
Block a user