*Fix some restriction of pet spell cast.
--HG-- branch : trunk
This commit is contained in:
1 parent
33a0155281
commit
51affe07d0
4 files changed
+28
-3
No files matched your search
+6
-2
@@ -2685,11 +2685,11 @@ void Spell::prepare(SpellCastTargets const* targets, AuraEffect* triggeredByAura
|
||||
// set timer base at cast time
|
||||
ReSetTimer();
|
||||
|
||||
sLog.outDebug("Spell::prepare: spell id %u source %u caster %d triggered %u", m_spellInfo->Id, m_caster->GetEntry(), m_originalCaster ? m_originalCaster->GetEntry() : -1, m_IsTriggeredSpell ? 1 : 0);
|
||||
sLog.outDebug("Spell::prepare: spell id %u source %u caster %d triggered %u mask %u", m_spellInfo->Id, m_caster->GetEntry(), m_originalCaster ? m_originalCaster->GetEntry() : -1, m_IsTriggeredSpell ? 1 : 0, m_targets.m_targetMask);
|
||||
//if(m_targets.getUnitTarget())
|
||||
// sLog.outError("Spell::prepare: unit target %u", m_targets.getUnitTarget()->GetEntry());
|
||||
//if(m_targets.HasDst())
|
||||
// sLog.outError("Spell::prepare: pos target %f %f %f", m_targets.m_destX, m_targets.m_destY, m_targets.m_destZ);
|
||||
// sLog.outError("Spell::prepare: pos target %f %f %f", m_targets.m_dstPos.m_positionX, m_targets.m_dstPos.m_positionY, m_targets.m_dstPos.m_positionZ);
|
||||
|
||||
//Containers for channeled spells have to be set
|
||||
//TODO:Apply this to all casted spells if needed
|
||||
@@ -4512,6 +4512,9 @@ SpellCastResult Spell::CheckCast(bool strict)
|
||||
}
|
||||
}
|
||||
|
||||
// who can give me an example to show what is the use of this
|
||||
// even if we need check, check by effect rather than whole spell, otherwise 57108,57143 are broken
|
||||
/*
|
||||
// TODO: this check can be applied and for player to prevent cheating when IsPositiveSpell will return always correct result.
|
||||
// check target for pet/charmed casts (not self targeted), self targeted cast used for area effects and etc
|
||||
if(non_caster_target && m_caster->GetTypeId() == TYPEID_UNIT && m_caster->GetCharmerOrOwnerGUID())
|
||||
@@ -4529,6 +4532,7 @@ SpellCastResult Spell::CheckCast(bool strict)
|
||||
return SPELL_FAILED_BAD_TARGETS;
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
if(IsPositiveSpell(m_spellInfo->Id))
|
||||
if(target->IsImmunedToSpell(m_spellInfo))
|
||||
|
||||
Reference in new issue
Block a user