mirror of
https://github.com/mangosfour/server.git
synced 2025-12-17 07:37:03 +00:00
[10637] Better totem summon cases selection.
But added check still not allways work. Unclear better way selections for summon prop id 61
This commit is contained in:
parent
691412d05c
commit
666ecfee99
2 changed files with 31 additions and 7 deletions
|
|
@ -3989,22 +3989,46 @@ void Spell::EffectSummonType(SpellEffectIndex eff_idx)
|
|||
// those are classical totems - effectbasepoints is their hp and not summon ammount!
|
||||
//SUMMON_TYPE_TOTEM = 121: 23035, battlestands
|
||||
//SUMMON_TYPE_TOTEM2 = 647: 52893, Anti-Magic Zone (npc used)
|
||||
if(prop_id == 121 || prop_id == 647)
|
||||
if (prop_id == 121 || prop_id == 647)
|
||||
DoSummonTotem(eff_idx);
|
||||
else
|
||||
DoSummonWild(eff_idx, summon_prop->FactionId);
|
||||
break;
|
||||
}
|
||||
case SUMMON_PROP_TYPE_SUMMON:
|
||||
case SUMMON_PROP_TYPE_GUARDIAN:
|
||||
case SUMMON_PROP_TYPE_ARMY:
|
||||
case SUMMON_PROP_TYPE_DK:
|
||||
DoSummonGuardian(eff_idx, summon_prop->FactionId);
|
||||
break;
|
||||
case SUMMON_PROP_TYPE_GUARDIAN:
|
||||
{
|
||||
if (prop_id == 61) // mixed guardians, totems, statues
|
||||
{
|
||||
// * Stone Statue, etc -- fits much better totem AI
|
||||
if (m_spellInfo->SpellIconID == 2056)
|
||||
DoSummonTotem(eff_idx);
|
||||
else
|
||||
{
|
||||
// possible sort totems/guardians only by summon creature type
|
||||
CreatureInfo const* cInfo = sObjectMgr.GetCreatureTemplate(m_spellInfo->EffectMiscValue[eff_idx]);
|
||||
|
||||
if (!cInfo)
|
||||
return;
|
||||
|
||||
// FIXME: not all totems and similar cases seelcted by this check...
|
||||
if (cInfo->type == CREATURE_TYPE_TOTEM)
|
||||
DoSummonTotem(eff_idx);
|
||||
else
|
||||
DoSummonGuardian(eff_idx, summon_prop->FactionId);
|
||||
}
|
||||
}
|
||||
else
|
||||
DoSummonGuardian(eff_idx, summon_prop->FactionId);
|
||||
break;
|
||||
}
|
||||
case SUMMON_PROP_TYPE_CONSTRUCT:
|
||||
{
|
||||
// JC golems - 32804, etc -- fits much better totem AI
|
||||
if(m_spellInfo->SpellIconID == 2056)
|
||||
DoSummonTotem(eff_idx);
|
||||
if(prop_id == 832) // scrapbot
|
||||
if (prop_id == 2913) // Scrapbot
|
||||
DoSummonWild(eff_idx, summon_prop->FactionId);
|
||||
else
|
||||
DoSummonGuardian(eff_idx, summon_prop->FactionId);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue