Commit
Remove redundant call now we have GuardianAI Don't allow guardians summoed by items to scale (unless they are engineering trinkets, of course)
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5529,17 +5529,25 @@ void Spell::EffectSummonType(SpellEffectIndex eff_idx) | |
// TODO :: Totem, Pet and Critter may not use this | ||
level += std::max(m_spellInfo->EffectMultipleValue[eff_idx], 1.0f); | ||
} | ||
|
||
// level of creature summoned using engineering item based at engineering skill level | ||
if (m_caster->GetTypeId() == TYPEID_PLAYER && m_CastItem) | ||
else if (m_CastItem) | ||
{ | ||
ItemPrototype const* proto = m_CastItem->GetProto(); | ||
if (proto && proto->RequiredSkill == SKILL_ENGINEERING && proto->InventoryType == INVTYPE_TRINKET) | ||
{ | ||
if (uint16 engineeringSkill = ((Player*)m_caster)->GetSkillValue(SKILL_ENGINEERING)) | ||
{ | ||
level = engineeringSkill / 5; | ||
amount = 1; // TODO HACK (needs a neat way of doing) | ||
} | ||
} | ||
else if (CreatureInfo const* cInfo = ObjectMgr::GetCreatureTemplate(m_spellInfo->EffectMiscValue[eff_idx])) | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
Phatcat
Author
Contributor
|
||
{ | ||
if (level >= cInfo->MaxLevel) | ||
level = cInfo->MaxLevel; | ||
else if (level <= cInfo->MinLevel) | ||
level = cInfo->MinLevel; | ||
} | ||
} | ||
|
||
CreatureSummonPositions summonPositions; | ||
|
@@ -5711,13 +5719,7 @@ void Spell::EffectSummonType(SpellEffectIndex eff_idx) | |
|
||
// Notify original caster if not done already | ||
if (caster && caster->AI()) | ||
{ | ||
caster->AI()->JustSummoned(itr->creature); | ||
|
||
// TODO: handling attack start here is not correct we do not check any react state before (REACT_PASSIVE ?) | ||
if (caster->isInCombat() && !(itr->creature->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PASSIVE))) | ||
itr->creature->AI()->AttackStart(m_caster->getAttackerForHelper()); | ||
} | ||
} | ||
} | ||
} | ||
|
How this part can be called if you guard all by if (m_CastItem)