mirror of
https://github.com/mangosfour/server.git
synced 2025-12-19 13:37:01 +00:00
[9745] Update equipment at aura transform apply/remove for creature case
Signed-off-by: NoFantasy <nofantasy@nf.no>
This commit is contained in:
parent
502345b2b8
commit
88139a7857
2 changed files with 10 additions and 2 deletions
|
|
@ -3372,6 +3372,10 @@ void Aura::HandleAuraTransform(bool apply, bool Real)
|
|||
|
||||
m_target->SetDisplayId(model_id);
|
||||
|
||||
// creature case, need to update equipment
|
||||
if (ci && m_target->GetTypeId() == TYPEID_UNIT)
|
||||
((Creature*)m_target)->LoadEquipment(ci->equipmentId, true);
|
||||
|
||||
// Dragonmaw Illusion (set mount model also)
|
||||
if(GetId()==42016 && m_target->GetMountID() && !m_target->GetAurasByType(SPELL_AURA_MOD_INCREASE_FLIGHT_SPEED).empty())
|
||||
m_target->SetUInt32Value(UNIT_FIELD_MOUNTDISPLAYID,16314);
|
||||
|
|
@ -3400,7 +3404,11 @@ void Aura::HandleAuraTransform(bool apply, bool Real)
|
|||
m_target->setTransForm(0);
|
||||
m_target->SetDisplayId(m_target->GetNativeDisplayId());
|
||||
|
||||
// re-aplly some from still active with preference negative cases
|
||||
// apply default equipment for creature case
|
||||
if (m_target->GetTypeId() == TYPEID_UNIT)
|
||||
((Creature*)m_target)->LoadEquipment(((Creature*)m_target)->GetCreatureInfo()->equipmentId, true);
|
||||
|
||||
// re-apply some from still active with preference negative cases
|
||||
Unit::AuraList const& otherTransforms = m_target->GetAurasByType(SPELL_AURA_TRANSFORM);
|
||||
if (!otherTransforms.empty())
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "9744"
|
||||
#define REVISION_NR "9745"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue