aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMachiavelli <machiavelli.trinity@gmail.com>2011-08-01 18:25:44 +0200
committerMachiavelli <machiavelli.trinity@gmail.com>2011-08-01 18:30:00 +0200
commitff3c988ee7d57eeceebb4bc8665654efa957110f (patch)
tree37535af1ebc0e59c92a084dcdc0400acf94cfea9
parentfa4b659964429af8814930cd6a238fca9040a39f (diff)
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
-rwxr-xr-xsrc/server/game/Entities/Unit/Unit.cpp5
-rwxr-xr-xsrc/server/game/Spells/SpellEffects.cpp2
2 files changed, 4 insertions, 3 deletions
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();