Core/Spells:

- corrected structure of SMSG_PET_CAST_FAILED (fixes highlighted action buttons)
- simplified spell focus check
This commit is contained in:
joschiwald committed 2013-08-14 15:45:36 +02:00
1 parent 783021a8cb
commit e87402dd05
7 files changed
+94 -126

No files matched your search

+1 -19
View File
@@ -162,7 +162,7 @@ ProcEventInfo::ProcEventInfo(Unit* actor, Unit* actionTarget, Unit* procTarget,
#endif
Unit::Unit(bool isWorldObject) :
WorldObject(isWorldObject), m_movedPlayer(NULL), m_lastSanctuaryTime(0),
m_TempSpeed(0.0f), IsAIEnabled(false), NeedChangeAI(false),
IsAIEnabled(false), NeedChangeAI(false),
m_ControlledByPlayer(false), movespline(new Movement::MoveSpline()),
i_AI(NULL), i_disabledAI(NULL), m_AutoRepeatFirstCast(false), m_procDeep(0),
m_removedAurasCount(0), i_motionMaster(this), m_ThreatManager(this),
@@ -195,8 +195,6 @@ Unit::Unit(bool isWorldObject) :
for (uint8 i = 0; i < CURRENT_MAX_SPELL; ++i)
m_currentSpells[i] = NULL;
m_addDmgOnce = 0;
for (uint8 i = 0; i < MAX_SUMMON_SLOT; ++i)
m_SummonSlot[i] = 0;
@@ -14353,22 +14351,6 @@ Player* Unit::GetSpellModOwner() const
}
///----------Pet responses methods-----------------
void Unit::SendPetCastFail(uint32 spellid, SpellCastResult result)
{
if (result == SPELL_CAST_OK)
return;
Unit* owner = GetCharmerOrOwner();
if (!owner || owner->GetTypeId() != TYPEID_PLAYER)
return;
WorldPacket data(SMSG_PET_CAST_FAILED, 1 + 4 + 1);
data << uint8(0); // cast count
data << uint32(spellid);
data << uint8(result);
owner->ToPlayer()->GetSession()->SendPacket(&data);
}
void Unit::SendPetActionFeedback(uint8 msg)
{
Unit* owner = GetOwner();