[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:
VladimirMangos 2010-10-22 11:39:35 +04:00
parent 691412d05c
commit 666ecfee99
2 changed files with 31 additions and 7 deletions

View file

@ -3996,15 +3996,39 @@ void Spell::EffectSummonType(SpellEffectIndex eff_idx)
break; break;
} }
case SUMMON_PROP_TYPE_SUMMON: case SUMMON_PROP_TYPE_SUMMON:
case SUMMON_PROP_TYPE_GUARDIAN:
case SUMMON_PROP_TYPE_ARMY: case SUMMON_PROP_TYPE_ARMY:
case SUMMON_PROP_TYPE_DK: 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) if (m_spellInfo->SpellIconID == 2056)
DoSummonTotem(eff_idx); 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); DoSummonWild(eff_idx, summon_prop->FactionId);
else else
DoSummonGuardian(eff_idx, summon_prop->FactionId); DoSummonGuardian(eff_idx, summon_prop->FactionId);

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__ #ifndef __REVISION_NR_H__
#define __REVISION_NR_H__ #define __REVISION_NR_H__
#define REVISION_NR "10636" #define REVISION_NR "10637"
#endif // __REVISION_NR_H__ #endif // __REVISION_NR_H__