diff options
| author | joschiwald <joschiwald@online.de> | 2013-08-14 15:45:36 +0200 |
|---|---|---|
| committer | joschiwald <joschiwald@online.de> | 2013-08-14 15:45:36 +0200 |
| commit | e87402dd05680b9d1ae40c8672babe23f4613989 (patch) | |
| tree | 1bdce82783c1bb50bb98f7dd7843e7edcc9e56b0 /src/server/game/Entities/Unit | |
| parent | 783021a8cb124533db1fb5cbfccd4f250720a78c (diff) | |
Core/Spells:
- corrected structure of SMSG_PET_CAST_FAILED (fixes highlighted action buttons)
- simplified spell focus check
Diffstat (limited to 'src/server/game/Entities/Unit')
| -rw-r--r-- | src/server/game/Entities/Unit/Unit.cpp | 20 | ||||
| -rw-r--r-- | src/server/game/Entities/Unit/Unit.h | 12 |
2 files changed, 5 insertions, 27 deletions
diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index 4c64023ca60..fd5b13c3d28 100644 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -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(); diff --git a/src/server/game/Entities/Unit/Unit.h b/src/server/game/Entities/Unit/Unit.h index 5e2e746ae63..14a4decb390 100644 --- a/src/server/game/Entities/Unit/Unit.h +++ b/src/server/game/Entities/Unit/Unit.h @@ -951,7 +951,8 @@ struct CalcDamageInfo }; // Spell damage info structure based on structure sending in SMSG_SPELLNONMELEEDAMAGELOG opcode -struct SpellNonMeleeDamage{ +struct SpellNonMeleeDamage +{ SpellNonMeleeDamage(Unit* _attacker, Unit* _target, uint32 _SpellID, uint32 _schoolMask) : target(_target), attacker(_attacker), SpellID(_SpellID), damage(0), overkill(0), schoolMask(_schoolMask), absorb(0), resist(0), physicalLog(false), unused(false), blocked(0), HitInfo(0), cleanDamage(0) @@ -1647,8 +1648,8 @@ class Unit : public WorldObject Player* GetSpellModOwner() const; Unit* GetOwner() const; - Guardian *GetGuardianPet() const; - Minion *GetFirstMinion() const; + Guardian* GetGuardianPet() const; + Minion* GetFirstMinion() const; Unit* GetCharmer() const; Unit* GetCharm() const; Unit* GetCharmerOrOwner() const; @@ -1839,7 +1840,6 @@ class Unit : public WorldObject Spell* FindCurrentSpellBySpellId(uint32 spell_id) const; int32 GetCurrentSpellCastTime(uint32 spell_id) const; - uint32 m_addDmgOnce; uint64 m_SummonSlot[MAX_SUMMON_SLOT]; uint64 m_ObjectSlot[MAX_GAMEOBJECT_SLOT]; @@ -1995,9 +1995,6 @@ class Unit : public WorldObject float GetSpeed(UnitMoveType mtype) const; float GetSpeedRate(UnitMoveType mtype) const { return m_speed_rate[mtype]; } void SetSpeed(UnitMoveType mtype, float rate, bool forced = false); - float m_TempSpeed; - - bool isHover() const { return HasAuraType(SPELL_AURA_HOVER); } float ApplyEffectModifiers(SpellInfo const* spellProto, uint8 effect_index, float value) const; int32 CalculateSpellDamage(Unit const* target, SpellInfo const* spellProto, uint8 effect_index, int32 const* basePoints = NULL) const; @@ -2039,7 +2036,6 @@ class Unit : public WorldObject void ClearComboPointHolders(); ///----------Pet responses methods----------------- - void SendPetCastFail(uint32 spellid, SpellCastResult msg); void SendPetActionFeedback (uint8 msg); void SendPetTalk (uint32 pettalk); void SendPetAIReaction(uint64 guid); |
