Skip to content

Instantly share code, notes, and snippets.

@tobmaps
Created June 6, 2011 21:54
Show Gist options
  • Save tobmaps/1011199 to your computer and use it in GitHub Desktop.
Save tobmaps/1011199 to your computer and use it in GitHub Desktop.
Bugged t10 bonuses hackfix
diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp
index 47f8f48..5239ad1 100755
--- a/src/server/game/Entities/Unit/Unit.cpp
+++ b/src/server/game/Entities/Unit/Unit.cpp
@@ -11028,6 +11028,11 @@ uint32 Unit::SpellCriticalDamageBonus(SpellEntry const *spellProto, uint32 damag
break;
}
+ // all these spells should have only 50% bonus damage on crit like a magic spells
+ if (spellProto->Id == 55078 || spellProto->Id == 61840 ||
+ (spellProto->SpellFamilyName == SPELLFAMILY_HUNTER && spellProto->SpellFamilyFlags[0] & 0x4000))
+ crit_bonus /= 2;
+
// adds additional damage to crit_bonus (from talents)
if (Player* modOwner = GetSpellModOwner())
modOwner->ApplySpellMod(spellProto->Id, SPELLMOD_CRIT_DAMAGE_BONUS, crit_bonus);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment