Core/Entities: Allow Shaman totems to crit with spells, and add a temp workaround to make Fire Elemental Totem spawn crit with spells also.

Closes #252
Closes #1846
This commit is contained in:
Machiavelli
2011-08-01 18:25:44 +02:00
parent fa4b659964
commit ff3c988ee7
2 changed files with 4 additions and 3 deletions

View File

@@ -10937,8 +10937,9 @@ int32 Unit::SpellBaseDamageBonusForVictim(SpellSchoolMask schoolMask, Unit* vict
bool Unit::isSpellCrit(Unit* victim, SpellInfo const* spellProto, SpellSchoolMask schoolMask, WeaponAttackType attackType) const
{
// Mobs can't crit with spells.
if (IS_CREATURE_GUID(GetGUID()))
//! Mobs can't crit with spells. Player Totems can
//! Fire Elemental (from totem) can too - but this part is a hack and needs more research
if (IS_CREATURE_GUID(GetGUID()) && !(isTotem() && IS_PLAYER_GUID(GetOwnerGUID())) && GetEntry() != 15438)
return false;
// not critting spell

View File

@@ -6771,7 +6771,7 @@ void Spell::SummonGuardian(uint32 i, uint32 entry, SummonPropertiesEntry const *
return;
if (caster->isTotem())
caster = caster->ToTotem()->GetOwner();
caster = caster->ToTotem()->GetOwner();
// in another case summon new
uint8 level = caster->getLevel();