Skip to content

Instantly share code, notes, and snippets.

diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp
index 7543fb5..e48b010 100755
--- a/src/server/game/Spells/Spell.cpp
+++ b/src/server/game/Spells/Spell.cpp
@@ -4374,15 +4374,15 @@ void Spell::TakePower()
bool hit = true;
if (m_caster->GetTypeId() == TYPEID_PLAYER)
{
- if (m_spellInfo->powerType == POWER_RAGE || m_spellInfo->powerType == POWER_ENERGY || m_spellInfo->powerType == POWER_RUNE)
+ if (m_spellInfo->powerType == POWER_RAGE || m_spellInfo->powerType == POWER_ENERGY ||
@tobmaps
tobmaps / Unstable Affliction
Created April 15, 2011 08:52
Unstable Affliction vs Resilience
author: me
diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp
index 9452f37..4e46361 100755
--- a/src/server/game/Entities/Unit/Unit.cpp
+++ b/src/server/game/Entities/Unit/Unit.cpp
@@ -3674,11 +3674,15 @@ void Unit::RemoveAurasDueToSpellByDispel(uint32 spellId, uint64 casterGUID, Unit
// Unstable Affliction (crash if before removeaura?)
if (aura->GetSpellProto()->SpellFamilyName == SPELLFAMILY_WARLOCK && (aura->GetSpellProto()->SpellFamilyFlags[1] & 0x0100))
{
@tobmaps
tobmaps / unstable affliction
Created May 18, 2011 08:00
crit & damage vs resilince
diff --git a/src/server/game/Spells/SpellMgr.cpp b/src/server/game/Spells/SpellMgr.cpp
index 2c1b9bd..d7784f1 100755
--- a/src/server/game/Spells/SpellMgr.cpp
+++ b/src/server/game/Spells/SpellMgr.cpp
@@ -3673,6 +3673,12 @@ void SpellMgr::LoadSpellCustomAttr()
spellInfo->AttributesEx3 |= SPELL_ATTR3_CAN_PROC_TRIGGERED;
++count;
break;
+ case 31117: // Unstable Affliction
+ // we need this because spellattr implemented wrong
@tobmaps
tobmaps / Torment the Weak
Created May 19, 2011 09:25
Torment the Weak should work in case attack speed slows
diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp
index ec0fdb8..4fcabd3 100755
--- a/src/server/game/Entities/Unit/Unit.cpp
+++ b/src/server/game/Entities/Unit/Unit.cpp
@@ -10421,8 +10421,8 @@ uint32 Unit::SpellDamageBonus(Unit *pVictim, SpellEntry const *spellProto, uint3
}
// Torment the weak
- if (spellProto->SpellFamilyFlags[0]&0x20200021 || spellProto->SpellFamilyFlags[1]& 0x9000)
- if (pVictim->HasAuraType(SPELL_AURA_MOD_DECREASE_SPEED))
@tobmaps
tobmaps / Torment the Weak
Created May 19, 2011 14:50
another version
diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp
index 4fcabd3..5082464 100755
--- a/src/server/game/Entities/Unit/Unit.cpp
+++ b/src/server/game/Entities/Unit/Unit.cpp
@@ -4320,6 +4320,28 @@ bool Unit::HasNegativeAuraWithAttribute(uint32 flag, uint64 guid)
return false;
}
+bool Unit::HasAurasWithMechanic(uint32 mechanic_mask)
+{
diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp
index 1e76c27..fd36a16 100755
--- a/src/server/game/Spells/Spell.cpp
+++ b/src/server/game/Spells/Spell.cpp
@@ -1484,7 +1484,8 @@ SpellMissInfo Spell::DoSpellHitOnUnit(Unit *unit, const uint32 effectMask, bool
if (m_spellAura)
{
// Set aura stack amount to desired value
- m_spellAura->SetStackAmount(m_spellValue->AuraStackAmount);
+ if (m_spellValue->AuraStackAmount > 1)
diff --git a/src/server/game/Entities/Player/Player.h b/src/server/game/Entities/Player/Player.h
index 299f354..02d4c59 100755
--- a/src/server/game/Entities/Player/Player.h
+++ b/src/server/game/Entities/Player/Player.h
@@ -1761,6 +1761,8 @@ class Player : public Unit, public GridObject<Player>
void DuelComplete(DuelCompleteType type);
void SendDuelCountdown(uint32 counter);
+ bool IsInDuelWith(Player const* p) const { return (duel && duel->opponent == p); }
+
@tobmaps
tobmaps / gist:998817
Created May 30, 2011 12:09
localization for .npc say, .npc yell, .npc whisper
diff --git a/src/server/game/Entities/Object/Object.cpp b/src/server/game/Entities/Object/Object.cpp
index 58620cd..ce937cd 100755
--- a/src/server/game/Entities/Object/Object.cpp
+++ b/src/server/game/Entities/Object/Object.cpp
@@ -1586,39 +1586,6 @@ bool Position::IsPositionValid() const
return Trinity::IsValidMapCoord(m_positionX, m_positionY, m_positionZ, m_orientation);
}
-void WorldObject::MonsterSay(const char* text, uint32 language, uint64 TargetGuid)
-{
diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp
index c602a07..bd21a58 100755
--- a/src/server/game/Spells/Spell.cpp
+++ b/src/server/game/Spells/Spell.cpp
@@ -5006,6 +5006,48 @@ SpellCastResult Spell::CheckCast(bool strict)
break;
}
+ case SPELL_EFFECT_DISPEL:
+ {
@tobmaps
tobmaps / gist:1004701
Created June 2, 2011 16:02
City Defender achievement
DELETE FROM `achievement_criteria_data` WHERE `type` = 6 AND `criteria_id` IN
(5020,5021,5022,5023,5024,5025,5026,5027,5028,5029,5030,5031,5032,5033,5034,5035,5036,5037,5038,5039);
INSERT INTO `achievement_criteria_data` values
(5020,6,1519,0,''),
(5021,6,1537,0,''),
(5022,6,1657,0,''),
(5023,6,1658,0,''),
(5024,6,1659,0,''),
(5025,6,1661,0,''),