Created
October 3, 2010 16:01
-
-
Save Tasssadar/608686 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bool Unit::IsSpellCrit(...) | |
{ | |
.... | |
// Creatures cant crit with spells | |
if (GetTypeId() == TYPEID_UNIT && (((Creature*)this)->GetSubtype() == CREATURE_SUBTYPE_GENERIC // If its normal creature | |
|| (((Creature*)this)->GetSubtype() == CREATURE_SUBTYPE_TEMPORARY_SUMMON && !((Creature*)this)->GetOwnerGUID())) // or temporary summon without owner, hope this is correct | |
&& spellProto->DmgClass == SPELL_DAMAGE_CLASS_MAGIC) // Also affect only magic | |
return false; | |
.... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment