diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp index 56c494e2f..48cdb231c 100644 --- a/src/game/SpellEffects.cpp +++ b/src/game/SpellEffects.cpp @@ -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); diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index 096ae5d3b..d012eb863 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "10636" + #define REVISION_NR "10637" #endif // __REVISION_NR_H__