forked from mirror/azerothcore-wotlk
refactor(Core): Make more use of helpers. (#19835)
* Init. * Reword. * Update codestyle script. Co-Authored-By: Kitzunu <[email protected]> * Add gameobject type ID check, reorder checks. * Add helper/codestyle check for unit type. * `IsUnit()` -> `IsCreature()` * Add `IsUnit()` method. * Use type mask. https: //github.com/TrinityCore/TrinityCore/commit/cc71da35b5dc74abf71f8691161525a23d870bb5 Co-Authored-By: Giacomo Pozzoni <[email protected]> Co-Authored-By: Ovahlord <[email protected]> * Replace instances of `isType` with `IsUnit`. --------- Co-authored-by: Kitzunu <[email protected]> Co-authored-by: Giacomo Pozzoni <[email protected]> Co-authored-by: Ovahlord <[email protected]>
This commit is contained in:
co-authored by
Kitzunu
Giacomo Pozzoni
Ovahlord
parent
e3e4133e88
commit
1edac37ac3
@@ -263,7 +263,7 @@ public:
|
||||
Unit* unit = handler->getSelectedUnit();
|
||||
Player* player = nullptr;
|
||||
|
||||
if (!unit || (unit->GetTypeId() != TYPEID_PLAYER))
|
||||
if (!unit || (!unit->IsPlayer()))
|
||||
{
|
||||
player = handler->GetSession()->GetPlayer();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user