mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-02-01 10:03:47 +00:00
Merge branch 'azerothcore:master' into Playerbot
This commit is contained in:
@@ -1776,6 +1776,8 @@ bool WorldObject::CanSeeOrDetect(WorldObject const* obj, bool ignoreStealth, boo
|
||||
WorldObject const* viewpoint = this;
|
||||
if (Player const* thisPlayer = ToPlayer())
|
||||
{
|
||||
viewpoint = thisPlayer->GetSeer();
|
||||
|
||||
if (Creature const* creature = obj->ToCreature())
|
||||
{
|
||||
if (TempSummon const* tempSummon = creature->ToTempSummon())
|
||||
@@ -1815,13 +1817,8 @@ bool WorldObject::CanSeeOrDetect(WorldObject const* obj, bool ignoreStealth, boo
|
||||
return false;
|
||||
}
|
||||
|
||||
if (thisPlayer->GetViewpoint())
|
||||
viewpoint = thisPlayer->GetViewpoint();
|
||||
|
||||
if (thisPlayer->GetFarSightDistance() && !thisPlayer->isInFront(obj))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// Xinef: check reversely obj vs viewpoint, object could be a gameObject which overrides _IsWithinDist function to include gameobject size
|
||||
|
||||
@@ -2343,6 +2343,7 @@ public:
|
||||
void SetMover(Unit* target);
|
||||
|
||||
void SetSeer(WorldObject* target) { m_seer = target; }
|
||||
WorldObject* GetSeer() const { return m_seer; }
|
||||
void SetViewpoint(WorldObject* target, bool apply);
|
||||
[[nodiscard]] WorldObject* GetViewpoint() const;
|
||||
void StopCastingCharm(Aura* except = nullptr);
|
||||
|
||||
@@ -1220,8 +1220,9 @@ public:
|
||||
if (Vehicle* v = me->GetVehicle())
|
||||
v->RemoveAllPassengers();
|
||||
|
||||
if (Player* player = killer->GetCharmerOrOwnerPlayerOrPlayerItself())
|
||||
player->UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_GET_KILLING_BLOWS, 1, 0, me);
|
||||
if (killer)
|
||||
if (Player* player = killer->GetCharmerOrOwnerPlayerOrPlayerItself())
|
||||
player->UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_GET_KILLING_BLOWS, 1, 0, me);
|
||||
}
|
||||
|
||||
void MoveInLineOfSight(Unit* /*who*/) override {}
|
||||
|
||||
Reference in New Issue
Block a user