mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 19:37:02 +00:00
[8944] Use DBC data for summon effect functionality.
Also some more local fixes: * Alow multiply same type guardians req. for some spells. * Apply spell duration mods to summons Many summon spells must start work. Great work qsa! :) Thanks The_Game_Master for updaing patch to recent sources. Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
parent
e8b1905630
commit
ffca4301d0
10 changed files with 136 additions and 213 deletions
|
|
@ -2225,13 +2225,6 @@ void Spell::SetTargetMap(uint32 effIndex,uint32 targetMode,UnitList& TagUnitMap)
|
|||
}
|
||||
break;
|
||||
case SPELL_EFFECT_SUMMON:
|
||||
if (m_spellInfo->EffectMiscValueB[effIndex] == SUMMON_TYPE_POSESSED ||
|
||||
m_spellInfo->EffectMiscValueB[effIndex] == SUMMON_TYPE_POSESSED2)
|
||||
{
|
||||
if (m_targets.getUnitTarget())
|
||||
TagUnitMap.push_back(m_targets.getUnitTarget());
|
||||
}
|
||||
else
|
||||
TagUnitMap.push_back(m_caster);
|
||||
break;
|
||||
case SPELL_EFFECT_SUMMON_CHANGE_ITEM:
|
||||
|
|
@ -4603,24 +4596,17 @@ SpellCastResult Spell::CheckCast(bool strict)
|
|||
// This is generic summon effect
|
||||
case SPELL_EFFECT_SUMMON:
|
||||
{
|
||||
switch(m_spellInfo->EffectMiscValueB[i])
|
||||
if(SummonPropertiesEntry const *summon_prop = sSummonPropertiesStore.LookupEntry(m_spellInfo->EffectMiscValueB[i]))
|
||||
{
|
||||
case SUMMON_TYPE_POSESSED:
|
||||
case SUMMON_TYPE_POSESSED2:
|
||||
case SUMMON_TYPE_DEMON:
|
||||
case SUMMON_TYPE_SUMMON:
|
||||
case SUMMON_TYPE_ELEMENTAL:
|
||||
case SUMMON_TYPE_INFERNO:
|
||||
if(summon_prop->Group == SUMMON_PROP_GROUP_PETS)
|
||||
{
|
||||
if(m_caster->GetPetGUID())
|
||||
return SPELL_FAILED_ALREADY_HAVE_SUMMON;
|
||||
|
||||
if(m_caster->GetCharmGUID())
|
||||
return SPELL_FAILED_ALREADY_HAVE_CHARM;
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
// Not used for summon?
|
||||
case SPELL_EFFECT_SUMMON_PHANTASM:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue