mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-31 09:33:47 +00:00
refactor(Core/Object): adds consistency in the use of type object check (#19671)
This commit is contained in:
@@ -104,7 +104,7 @@ public:
|
||||
|
||||
void KilledUnit(Unit* victim) override
|
||||
{
|
||||
if (victim->GetTypeId() == TYPEID_PLAYER && roll_chance_i(50))
|
||||
if (victim->IsPlayer() && roll_chance_i(50))
|
||||
Talk(YELL_KILL);
|
||||
}
|
||||
|
||||
|
||||
@@ -143,7 +143,7 @@ public:
|
||||
|
||||
void KilledUnit(Unit* victim) override
|
||||
{
|
||||
if (victim->GetTypeId() == TYPEID_PLAYER && urand(0, 1))
|
||||
if (victim->IsPlayer() && urand(0, 1))
|
||||
Talk(YELL_SAC_KILL);
|
||||
}
|
||||
|
||||
@@ -291,7 +291,7 @@ public:
|
||||
|
||||
void KilledUnit(Unit* victim) override
|
||||
{
|
||||
if (victim->GetTypeId() == TYPEID_PLAYER && urand(0, 1))
|
||||
if (victim->IsPlayer() && urand(0, 1))
|
||||
Talk(YELL_SAC_KILL);
|
||||
}
|
||||
|
||||
|
||||
@@ -173,7 +173,7 @@ public:
|
||||
|
||||
void KilledUnit(Unit* victim) override
|
||||
{
|
||||
if (victim->GetTypeId() == TYPEID_PLAYER && roll_chance_i(50))
|
||||
if (victim->IsPlayer() && roll_chance_i(50))
|
||||
Talk(YELL_KILL);
|
||||
}
|
||||
|
||||
|
||||
@@ -229,7 +229,7 @@ public:
|
||||
|
||||
void KilledUnit(Unit* victim) override
|
||||
{
|
||||
if (victim->GetTypeId() == TYPEID_PLAYER && roll_chance_i(50))
|
||||
if (victim->IsPlayer() && roll_chance_i(50))
|
||||
Talk(SAY_EVIL_SLAY);
|
||||
}
|
||||
|
||||
@@ -539,7 +539,7 @@ public:
|
||||
|
||||
void KilledUnit(Unit* target) override
|
||||
{
|
||||
if (target->GetTypeId() == TYPEID_PLAYER)
|
||||
if (target->IsPlayer())
|
||||
Talk(SAY_SATH_SLAY);
|
||||
}
|
||||
|
||||
|
||||
@@ -364,7 +364,7 @@ public:
|
||||
|
||||
void KilledUnit(Unit* victim) override
|
||||
{
|
||||
if (victim->GetTypeId() == TYPEID_PLAYER && events.GetNextEventTime(EVENT_NO_KILL_TALK) == 0)
|
||||
if (victim->IsPlayer() && events.GetNextEventTime(EVENT_NO_KILL_TALK) == 0)
|
||||
Talk(SAY_KJ_SLAY);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user