Skip to content

Commit

Permalink
[9745] Update equipment at aura transform apply/remove for creature case
Browse files Browse the repository at this point in the history
Signed-off-by: NoFantasy <nofantasy@nf.no>
  • Loading branch information
NoFantasy committed Apr 13, 2010
1 parent 2b4bf99 commit 352d092
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
10 changes: 9 additions & 1 deletion src/game/SpellAuras.cpp
Expand Up @@ -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);
Expand Down Expand Up @@ -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())
{
Expand Down
2 changes: 1 addition & 1 deletion src/shared/revision_nr.h
@@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "9744"
#define REVISION_NR "9745"
#endif // __REVISION_NR_H__

0 comments on commit 352d092

Please sign in to comment.