mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 01:37:00 +00:00
111
This commit is contained in:
parent
8416702d7c
commit
2bf75e7a10
6 changed files with 26 additions and 24 deletions
|
|
@ -2124,10 +2124,10 @@ void Player::RegenerateHealth(uint32 diff)
|
|||
ModifyHealth(int32(addvalue));
|
||||
}
|
||||
|
||||
Creature* Player::GetNPCIfCanInteractWith(uint64 guid, uint32 npcflagmask)
|
||||
Creature* Player::GetNPCIfCanInteractWith(ObjectGuid guid, uint32 npcflagmask)
|
||||
{
|
||||
// unit checks
|
||||
if (!guid || !IsInWorld() || isInFlight())
|
||||
// some basic checks
|
||||
if (guid.IsEmpty() || !IsInWorld() || isInFlight())
|
||||
return NULL;
|
||||
|
||||
// exist (we need look pets also for some interaction (quest/etc)
|
||||
|
|
@ -2174,8 +2174,12 @@ Creature* Player::GetNPCIfCanInteractWith(uint64 guid, uint32 npcflagmask)
|
|||
return unit;
|
||||
}
|
||||
|
||||
GameObject* Player::GetGameObjectIfCanInteractWith(uint64 guid, uint32 gameobject_type) const
|
||||
GameObject* Player::GetGameObjectIfCanInteractWith(ObjectGuid guid, uint32 gameobject_type) const
|
||||
{
|
||||
// some basic checks
|
||||
if (guid.IsEmpty() || !IsInWorld() || isInFlight())
|
||||
return NULL;
|
||||
|
||||
if (GameObject *go = GetMap()->GetGameObject(guid))
|
||||
{
|
||||
if (uint32(go->GetGoType()) == gameobject_type || gameobject_type == MAX_GAMEOBJECT_TYPE)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue