mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 10:37:02 +00:00
[9077] Fixes for pet work in case mounted owner.
* No unsummon temporary pet at non-fly mounting. * Implement client side disable pet's action bar for mountted owner time Signed-off-by: VladimirMangos <vladimir@getmangos.com> * implement server side action disabled case (action bar modify, aggro reaction and autocast) Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
parent
7d0a830bd4
commit
9c98bd92e2
10 changed files with 112 additions and 19 deletions
|
|
@ -40,7 +40,7 @@ char const* petTypeSuffix[MAX_PET_TYPE] =
|
|||
Pet::Pet(PetType type) :
|
||||
Creature(), m_removed(false), m_petType(type), m_happinessTimer(7500), m_duration(0), m_resetTalentsCost(0),
|
||||
m_bonusdamage(0), m_resetTalentsTime(0), m_usedTalentCount(0), m_auraUpdateMask(0), m_loading(false),
|
||||
m_declinedname(NULL)
|
||||
m_declinedname(NULL), m_petModeFlags(PET_MODE_DEFAULT)
|
||||
{
|
||||
m_isPet = true;
|
||||
m_name = "Pet";
|
||||
|
|
@ -1948,3 +1948,20 @@ void Pet::SynchronizeLevelWithOwner()
|
|||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void Pet::ApplyModeFlags(PetModeFlags mode, bool apply)
|
||||
{
|
||||
if (apply)
|
||||
m_petModeFlags = PetModeFlags(m_petModeFlags | mode);
|
||||
else
|
||||
m_petModeFlags = PetModeFlags(m_petModeFlags & ~mode);
|
||||
|
||||
Unit* owner = GetOwner();
|
||||
if(!owner || owner->GetTypeId()!=TYPEID_PLAYER)
|
||||
return;
|
||||
|
||||
WorldPacket data(SMSG_PET_MODE, 12);
|
||||
data << uint64(GetGUID());
|
||||
data << uint32(m_petModeFlags);
|
||||
((Player*)owner)->GetSession()->SendPacket(&data);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue