mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 10:37:02 +00:00
[8870] Fix problem with max pet distance from owner.
* Avoid use hardcoded and different max distance from owner for pet (more at contienets and less in instances) Use instaed max visibility for map as expected. * Explicitly pet remove at move pet to non-visible distance for player owner. Original patch provided by Lightguard.
This commit is contained in:
parent
e636d63fdb
commit
663038c7c7
5 changed files with 25 additions and 10 deletions
|
|
@ -499,7 +499,7 @@ void Pet::Update(uint32 diff)
|
|||
{
|
||||
// unsummon pet that lost owner
|
||||
Unit* owner = GetOwner();
|
||||
if(!owner || (!IsWithinDistInMap(owner, OWNER_MAX_DISTANCE) && (owner->GetCharmGUID() && (owner->GetCharmGUID() != GetGUID()))) || (isControlled() && !owner->GetPetGUID()))
|
||||
if(!owner || (!IsWithinDistInMap(owner, GetMap()->GetVisibilityDistance()) && (owner->GetCharmGUID() && (owner->GetCharmGUID() != GetGUID()))) || (isControlled() && !owner->GetPetGUID()))
|
||||
{
|
||||
Remove(PET_SAVE_NOT_IN_SLOT, true);
|
||||
return;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue