mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-27 23:56:25 +00:00
refactor(Core/Object): adds consistency in the use of type object check (#19671)
This commit is contained in:
@@ -389,7 +389,7 @@ public:
|
||||
|
||||
void KilledUnit(Unit* pVictim) override
|
||||
{
|
||||
if (!urand(0, 2) && pVictim->GetTypeId() == TYPEID_PLAYER)
|
||||
if (!urand(0, 2) && pVictim->IsPlayer())
|
||||
{
|
||||
Talk(SAY_SARTHARION_SLAY);
|
||||
}
|
||||
|
||||
@@ -308,7 +308,7 @@ public:
|
||||
|
||||
void KilledUnit(Unit* victim) override
|
||||
{
|
||||
if (victim->GetTypeId() == TYPEID_PLAYER && events.GetNextEventTime(EVENT_KILL_TALK) == 0)
|
||||
if (victim->IsPlayer() && events.GetNextEventTime(EVENT_KILL_TALK) == 0)
|
||||
{
|
||||
Talk(SAY_KILL);
|
||||
events.ScheduleEvent(EVENT_KILL_TALK, 6s);
|
||||
@@ -475,7 +475,7 @@ public:
|
||||
|
||||
void KilledUnit(Unit* victim) override
|
||||
{
|
||||
if (victim->GetTypeId() == TYPEID_PLAYER && _events.GetNextEventTime(EVENT_KILL_TALK) == 0)
|
||||
if (victim->IsPlayer() && _events.GetNextEventTime(EVENT_KILL_TALK) == 0)
|
||||
{
|
||||
Talk(SAY_KILL);
|
||||
_events.ScheduleEvent(EVENT_KILL_TALK, 6s);
|
||||
|
||||
Reference in New Issue
Block a user