mirror of
https://github.com/liyunfan1223/azerothcore-wotlk.git
synced 2026-08-08 15:58:04 +00:00
fix(Core/Misc): Change const to be after type name (#10591)
This commit is contained in:
@@ -2308,7 +2308,7 @@ void Creature::CallForHelp(float radius, Unit* target /*= nullptr*/)
|
||||
Cell::VisitGridObjects(this, worker, radius);
|
||||
}
|
||||
|
||||
bool Creature::CanAssistTo(const Unit* u, const Unit* enemy, bool checkfaction /*= true*/) const
|
||||
bool Creature::CanAssistTo(Unit const* u, Unit const* enemy, bool checkfaction /*= true*/) const
|
||||
{
|
||||
// is it true?
|
||||
if (!HasReactState(REACT_AGGRESSIVE))
|
||||
@@ -2368,7 +2368,7 @@ bool Creature::CanAssistTo(const Unit* u, const Unit* enemy, bool checkfaction /
|
||||
|
||||
// use this function to avoid having hostile creatures attack
|
||||
// friendlies and other mobs they shouldn't attack
|
||||
bool Creature::_IsTargetAcceptable(const Unit* target) const
|
||||
bool Creature::_IsTargetAcceptable(Unit const* target) const
|
||||
{
|
||||
ASSERT(target);
|
||||
|
||||
@@ -2385,8 +2385,8 @@ bool Creature::_IsTargetAcceptable(const Unit* target) const
|
||||
return false;
|
||||
}
|
||||
|
||||
const Unit* myVictim = getAttackerForHelper();
|
||||
const Unit* targetVictim = target->getAttackerForHelper();
|
||||
Unit const* myVictim = getAttackerForHelper();
|
||||
Unit const* targetVictim = target->getAttackerForHelper();
|
||||
|
||||
// if I'm already fighting target, or I'm hostile towards the target, the target is acceptable
|
||||
if (myVictim == target || targetVictim == this || IsHostileTo(target))
|
||||
|
||||
Reference in New Issue
Block a user