From ff3c988ee7d57eeceebb4bc8665654efa957110f Mon Sep 17 00:00:00 2001 From: Machiavelli Date: Mon, 1 Aug 2011 18:25:44 +0200 Subject: 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 --- src/server/game/Entities/Unit/Unit.cpp | 5 +++-- src/server/game/Spells/SpellEffects.cpp | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index 7f78055dde5..9761a0df6d1 100755 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -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 diff --git a/src/server/game/Spells/SpellEffects.cpp b/src/server/game/Spells/SpellEffects.cpp index 03b4109434c..32859cb3a19 100755 --- a/src/server/game/Spells/SpellEffects.cpp +++ b/src/server/game/Spells/SpellEffects.cpp @@ -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(); -- cgit v1.2.3