Core/Misc: replace (Player*) casts with ToPlayer()
This commit is contained in:
1 parent
1ac4f0a9c1
commit
380cf5d241
15 files changed
+189
-186
No files matched your search
@@ -655,11 +655,9 @@ public:
|
||||
return false;
|
||||
}
|
||||
|
||||
if (target->GetTypeId() == TYPEID_PLAYER)
|
||||
{
|
||||
if (handler->HasLowerSecurity((Player*)target, 0, false))
|
||||
if (Player* player = target->ToPlayer())
|
||||
if (handler->HasLowerSecurity(player, 0, false))
|
||||
return false;
|
||||
}
|
||||
|
||||
if (target->IsAlive())
|
||||
{
|
||||
@@ -2227,11 +2225,9 @@ public:
|
||||
return false;
|
||||
}
|
||||
|
||||
if (target->GetTypeId() == TYPEID_PLAYER)
|
||||
{
|
||||
if (handler->HasLowerSecurity((Player*)target, 0, false))
|
||||
if (Player* player = target->ToPlayer())
|
||||
if (handler->HasLowerSecurity(player, 0, false))
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!target->IsAlive())
|
||||
return true;
|
||||
|
||||
Reference in new issue
Block a user