Core: Crash fix (TemporarySummon), remove some warnings and some other minor changes
- "const uint64" and "uint64 const" --> uint64 - Add some info in LFGDungeonEntry - Move some definitions from ".h" files and move to ".cpp"
This commit is contained in:
@@ -372,7 +372,7 @@ pAuraEffectHandler AuraEffectHandler[TOTAL_AURAS]=
|
||||
&AuraEffect::HandleNoImmediateEffect, //316 SPELL_AURA_PERIODIC_HASTE implemented in AuraEffect::CalculatePeriodic
|
||||
};
|
||||
|
||||
AuraEffect::AuraEffect(Aura * base, uint8 effIndex, int32 *baseAmount, Unit* caster):
|
||||
AuraEffect::AuraEffect(Aura* base, uint8 effIndex, int32 *baseAmount, Unit* caster):
|
||||
m_base(base), m_spellInfo(base->GetSpellInfo()), m_effIndex(effIndex),
|
||||
m_baseAmount(baseAmount ? *baseAmount : m_spellInfo->Effects[m_effIndex].BasePoints),
|
||||
m_canBeRecalculated(true), m_spellmod(NULL), m_isPeriodic(false),
|
||||
|
||||
@@ -2319,7 +2319,7 @@ void UnitAura::FillTargetMap(std::map<Unit *, uint8> & targets, Unit* caster)
|
||||
|
||||
if (!GetUnitOwner()->HasUnitState(UNIT_STAT_ISOLATED))
|
||||
{
|
||||
switch(GetSpellInfo()->Effects[effIndex].Effect)
|
||||
switch (GetSpellInfo()->Effects[effIndex].Effect)
|
||||
{
|
||||
case SPELL_EFFECT_APPLY_AREA_AURA_PARTY:
|
||||
targetList.push_back(GetUnitOwner());
|
||||
|
||||
@@ -175,9 +175,9 @@ class Aura
|
||||
// Helpers for targets
|
||||
ApplicationMap const & GetApplicationMap() {return m_applications;}
|
||||
void GetApplicationList(std::list<AuraApplication*> & applicationList) const;
|
||||
const AuraApplication * GetApplicationOfTarget (uint64 const guid) const { ApplicationMap::const_iterator itr = m_applications.find(guid); if (itr != m_applications.end()) return itr->second; return NULL; }
|
||||
AuraApplication * GetApplicationOfTarget (uint64 const guid) { ApplicationMap::iterator itr = m_applications.find(guid); if (itr != m_applications.end()) return itr->second; return NULL; }
|
||||
bool IsAppliedOnTarget(uint64 const guid) const { return m_applications.find(guid) != m_applications.end(); }
|
||||
const AuraApplication * GetApplicationOfTarget (uint64 guid) const { ApplicationMap::const_iterator itr = m_applications.find(guid); if (itr != m_applications.end()) return itr->second; return NULL; }
|
||||
AuraApplication * GetApplicationOfTarget (uint64 guid) { ApplicationMap::iterator itr = m_applications.find(guid); if (itr != m_applications.end()) return itr->second; return NULL; }
|
||||
bool IsAppliedOnTarget(uint64 guid) const { return m_applications.find(guid) != m_applications.end(); }
|
||||
|
||||
void SetNeedClientUpdateForTargets() const;
|
||||
void HandleAuraSpecificMods(AuraApplication const* aurApp, Unit* caster, bool apply, bool onReapply);
|
||||
|
||||
@@ -551,8 +551,8 @@ m_caster((info->AttributesEx6 & SPELL_ATTR6_CAST_BY_CHARMER && caster->GetCharme
|
||||
m_autoRepeat = m_spellInfo->IsAutoRepeatRangedSpell();
|
||||
|
||||
m_runesState = 0;
|
||||
m_powerCost = 0; // setup to correct value in Spell::prepare, don't must be used before.
|
||||
m_casttime = 0; // setup to correct value in Spell::prepare, don't must be used before.
|
||||
m_powerCost = 0; // setup to correct value in Spell::prepare, must not be used before.
|
||||
m_casttime = 0; // setup to correct value in Spell::prepare, must not be used before.
|
||||
m_timer = 0; // will set to castime in prepare
|
||||
|
||||
m_channelTargetEffectMask = 0;
|
||||
@@ -1237,18 +1237,16 @@ void Spell::DoAllEffectOnTarget(TargetInfo *target)
|
||||
}
|
||||
|
||||
// Do not take combo points on dodge and miss
|
||||
if (m_needComboPoints && m_targets.GetUnitTargetGUID() == target->targetGUID)
|
||||
if (missInfo != SPELL_MISS_NONE)
|
||||
{
|
||||
m_needComboPoints = false;
|
||||
// Restore spell mods for a miss/dodge/parry Cold Blood
|
||||
// TODO: check how broad this rule should be
|
||||
if (m_caster->GetTypeId() == TYPEID_PLAYER)
|
||||
if ((missInfo == SPELL_MISS_MISS) ||
|
||||
(missInfo == SPELL_MISS_DODGE) ||
|
||||
(missInfo == SPELL_MISS_PARRY))
|
||||
m_caster->ToPlayer()->RestoreSpellMods(this, 14177);
|
||||
}
|
||||
if (missInfo != SPELL_MISS_NONE && m_needComboPoints &&
|
||||
m_targets.GetUnitTargetGUID() == target->targetGUID)
|
||||
{
|
||||
m_needComboPoints = false;
|
||||
// Restore spell mods for a miss/dodge/parry Cold Blood
|
||||
// TODO: check how broad this rule should be
|
||||
if (m_caster->GetTypeId() == TYPEID_PLAYER && (missInfo == SPELL_MISS_MISS ||
|
||||
missInfo == SPELL_MISS_DODGE || missInfo == SPELL_MISS_PARRY))
|
||||
m_caster->ToPlayer()->RestoreSpellMods(this, 14177);
|
||||
}
|
||||
|
||||
// Trigger info was not filled in spell::preparedatafortriggersystem - we do it now
|
||||
if (canEffectTrigger && !procAttacker && !procVictim)
|
||||
@@ -1546,8 +1544,7 @@ SpellMissInfo Spell::DoSpellHitOnUnit(Unit *unit, const uint32 effectMask, bool
|
||||
((UnitAura*)m_spellAura)->SetDiminishGroup(m_diminishGroup);
|
||||
|
||||
bool positive = m_spellAura->GetSpellInfo()->IsPositive();
|
||||
AuraApplication* aurApp = m_spellAura->GetApplicationOfTarget(m_originalCaster->GetGUID());
|
||||
if (aurApp)
|
||||
if (AuraApplication* aurApp = m_spellAura->GetApplicationOfTarget(m_originalCaster->GetGUID()))
|
||||
positive = aurApp->IsPositive();
|
||||
|
||||
duration = m_originalCaster->ModSpellDuration(aurSpellInfo, unit, duration, positive);
|
||||
|
||||
Reference in New Issue
Block a user