mirror of
https://github.com/mangosfour/server.git
synced 2025-12-17 16:37:00 +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
|
|
@ -3996,15 +3996,39 @@ void Spell::EffectSummonType(SpellEffectIndex eff_idx)
|
|||
break;
|
||||
}
|
||||
case SUMMON_PROP_TYPE_SUMMON:
|
||||
case SUMMON_PROP_TYPE_GUARDIAN:
|
||||
case SUMMON_PROP_TYPE_ARMY:
|
||||
case SUMMON_PROP_TYPE_DK:
|
||||
case SUMMON_PROP_TYPE_CONSTRUCT:
|
||||
DoSummonGuardian(eff_idx, summon_prop->FactionId);
|
||||
break;
|
||||
case SUMMON_PROP_TYPE_GUARDIAN:
|
||||
{
|
||||
// JC golems - 32804, etc -- fits much better totem AI
|
||||
if (prop_id == 61) // mixed guardians, totems, statues
|
||||
{
|
||||
// * Stone Statue, etc -- fits much better totem AI
|
||||
if (m_spellInfo->SpellIconID == 2056)
|
||||
DoSummonTotem(eff_idx);
|
||||
if(prop_id == 832) // scrapbot
|
||||
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:
|
||||
{
|
||||
if (prop_id == 2913) // Scrapbot
|
||||
DoSummonWild(eff_idx, summon_prop->FactionId);
|
||||
else
|
||||
DoSummonGuardian(eff_idx, summon_prop->FactionId);
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "10636"
|
||||
#define REVISION_NR "10637"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue