mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 16:37:01 +00:00
[7755] Allow mini-pet has been questgivers or gossip holders.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
parent
df119a4b59
commit
ebafe6a7b9
3 changed files with 14 additions and 9 deletions
|
|
@ -1962,8 +1962,8 @@ Player::GetNPCIfCanInteractWith(uint64 guid, uint32 npcflagmask)
|
|||
if(!IsInWorld())
|
||||
return NULL;
|
||||
|
||||
// exist
|
||||
Creature *unit = GetMap()->GetCreature(guid);
|
||||
// exist (we need look pets also for some interaction (quest/etc)
|
||||
Creature *unit = ObjectAccessor::GetCreatureOrPetOrVehicle(*this,guid);
|
||||
if (!unit)
|
||||
return NULL;
|
||||
|
||||
|
|
@ -1979,8 +1979,8 @@ Player::GetNPCIfCanInteractWith(uint64 guid, uint32 npcflagmask)
|
|||
if(!unit->isAlive() && (!unit->isSpiritService() || isAlive() ))
|
||||
return NULL;
|
||||
|
||||
// not allow interaction under control
|
||||
if(unit->GetCharmerOrOwnerGUID())
|
||||
// not allow interaction under control, but allow with own pets
|
||||
if(unit->GetCharmerGUID())
|
||||
return NULL;
|
||||
|
||||
// not enemy
|
||||
|
|
@ -11817,7 +11817,9 @@ void Player::PrepareQuestMenu( uint64 guid )
|
|||
Object *pObject;
|
||||
QuestRelations* pObjectQR;
|
||||
QuestRelations* pObjectQIR;
|
||||
Creature *pCreature = GetMap()->GetCreature(guid);
|
||||
|
||||
// pets also can have quests
|
||||
Creature *pCreature = ObjectAccessor::GetCreatureOrPetOrVehicle(*this,guid);
|
||||
if( pCreature )
|
||||
{
|
||||
pObject = (Object*)pCreature;
|
||||
|
|
@ -11903,7 +11905,9 @@ void Player::SendPreparedQuest( uint64 guid )
|
|||
qe._Delay = 0;
|
||||
qe._Emote = 0;
|
||||
std::string title = "";
|
||||
Creature *pCreature = GetMap()->GetCreature(guid);
|
||||
|
||||
// need pet case for some quests
|
||||
Creature *pCreature = ObjectAccessor::GetCreatureOrPetOrVehicle(*this,guid);
|
||||
if( pCreature )
|
||||
{
|
||||
uint32 textid = pCreature->GetNpcTextId();
|
||||
|
|
@ -11967,7 +11971,7 @@ Quest const * Player::GetNextQuest( uint64 guid, Quest const *pQuest )
|
|||
QuestRelations* pObjectQR;
|
||||
QuestRelations* pObjectQIR;
|
||||
|
||||
Creature *pCreature = GetMap()->GetCreature(guid);
|
||||
Creature *pCreature = ObjectAccessor::GetCreatureOrPetOrVehicle(*this,guid);
|
||||
if( pCreature )
|
||||
{
|
||||
pObject = (Object*)pCreature;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue