Skip to content

Instantly share code, notes, and snippets.

View Subv's full-sized avatar

Sebastian Valle Subv

  • Barranquilla, Colombia
View GitHub Profile
@Subv
Subv / StreamHandler.cs
Created November 19, 2011 14:54 — forked from LordJZ/StreamHandler.cs
StreamHandler + StructHelper + Time classes
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using Microsoft.Xna.Framework;
namespace Kamilla
{
@Subv
Subv / 1.cs
Created November 21, 2011 00:03 — forked from LordJZ/1.cs
using System;
using System.Collections;
using System.Linq;
namespace Kamilla.WorldOfWarcraft.Latest.OpcodeDatas
{
public abstract class PackedData : OpcodeData
{
protected virtual bool IsMaskSequenceSwapped { get { return true; } }
protected abstract int[] MaskSequence { get; }
@Subv
Subv / gist:1381218
Created November 21, 2011 00:03 — forked from LordJZ/gist:1193348
SMSG_PHASE_SHIFT_CHANGE 4.2.0
using System;
using System.Text;
namespace Kamilla.WorldOfWarcraft.Latest.OpcodeDatas
{
public sealed class SetPhaseShift : PackedData
{
public readonly byte[][] Data = new byte[4][];
public WowGuid Guid;
public uint Unk;
@Subv
Subv / gist:1442725
Created December 7, 2011 13:04 — forked from LordJZ/gist:1435671
SMSG_CHAR_ENUM as of 4.3, reversed in 26 minutes
using System;
using Kamilla.WorldOfWarcraft.Latest.OpcodeDatas;
using Microsoft.Xna.Framework;
namespace Kamilla.WorldOfWarcraft.Latest.Parsers.Lobby
{
[WowPacketParser(WowOpcodes.SMSG_ENUM_CHARACTERS_RESULT)]
internal sealed class CharEnumParser : WowPacketParser
{
protected unsafe override void Parse()
@Subv
Subv / Proc Hook Impl
Created April 2, 2012 23:12
Proc Hook
diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp
index d71f8e8..e0a589d 100755
--- a/src/server/game/Entities/Unit/Unit.cpp
+++ b/src/server/game/Entities/Unit/Unit.cpp
@@ -5689,29 +5689,6 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere
}
break;
}
-
- // Hot Streak
diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp
index cf14bb0..2b9f944 100755
--- a/src/server/game/Entities/Unit/Unit.cpp
+++ b/src/server/game/Entities/Unit/Unit.cpp
@@ -1540,7 +1540,8 @@ void Unit::CalcAbsorbResist(Unit* victim, SpellSchoolMask schoolMask, DamageEffe
DamageInfo dmgInfo = DamageInfo(this, victim, damage, spellInfo, schoolMask, damagetype);
// Magic damage, check for resists
- if ((schoolMask & SPELL_SCHOOL_MASK_NORMAL) == 0)
+ // Ignore spells that cant be resisted
diff --git a/src/server/game/Spells/Auras/SpellAuraEffects.cpp b/src/server/game/Spells/Auras/SpellAuraEffects.cpp
index 6fa6270..b62e318 100755
--- a/src/server/game/Spells/Auras/SpellAuraEffects.cpp
+++ b/src/server/game/Spells/Auras/SpellAuraEffects.cpp
@@ -376,7 +376,7 @@ AuraEffect::AuraEffect(Aura* base, uint8 effIndex, int32 *baseAmount, Unit* cast
m_base(base), m_spellInfo(base->GetSpellInfo()),
m_baseAmount(baseAmount ? *baseAmount : m_spellInfo->Effects[effIndex].BasePoints),
m_spellmod(NULL), m_periodicTimer(0), m_tickNumber(0), m_effIndex(effIndex),
-m_canBeRecalculated(true), m_isPeriodic(false)
+m_canBeRecalculated(true), m_isPeriodic(false), bonus(0), critChance(0)
diff --git a/src/server/game/Spells/Auras/SpellAuraEffects.cpp b/src/server/game/Spells/Auras/SpellAuraEffects.cpp
index 9ab3754..8e65f9e 100755
--- a/src/server/game/Spells/Auras/SpellAuraEffects.cpp
+++ b/src/server/game/Spells/Auras/SpellAuraEffects.cpp
@@ -376,7 +376,7 @@ AuraEffect::AuraEffect(Aura* base, uint8 effIndex, int32 *baseAmount, Unit* cast
m_base(base), m_spellInfo(base->GetSpellInfo()),
m_baseAmount(baseAmount ? *baseAmount : m_spellInfo->Effects[effIndex].BasePoints),
m_spellmod(NULL), m_periodicTimer(0), m_tickNumber(0), m_effIndex(effIndex),
-m_canBeRecalculated(true), m_isPeriodic(false)
+m_canBeRecalculated(true), m_isPeriodic(false), damageBonus(0), healingBonus(0)
diff --git a/src/server/game/Spells/Auras/SpellAuraEffects.cpp b/src/server/game/Spells/Auras/SpellAuraEffects.cpp
index 9ab3754..cc02ae9 100755
--- a/src/server/game/Spells/Auras/SpellAuraEffects.cpp
+++ b/src/server/game/Spells/Auras/SpellAuraEffects.cpp
@@ -376,7 +376,7 @@ AuraEffect::AuraEffect(Aura* base, uint8 effIndex, int32 *baseAmount, Unit* cast
m_base(base), m_spellInfo(base->GetSpellInfo()),
m_baseAmount(baseAmount ? *baseAmount : m_spellInfo->Effects[effIndex].BasePoints),
m_spellmod(NULL), m_periodicTimer(0), m_tickNumber(0), m_effIndex(effIndex),
-m_canBeRecalculated(true), m_isPeriodic(false)
+m_canBeRecalculated(true), m_isPeriodic(false), bonus(0)
diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp
index df2b9c3..c9b4b0f 100755
--- a/src/server/game/Spells/Spell.cpp
+++ b/src/server/game/Spells/Spell.cpp
@@ -4822,7 +4822,7 @@ SpellCastResult Spell::CheckCast(bool strict)
if ((m_spellInfo->AttributesCu & SPELL_ATTR0_CU_REQ_TARGET_FACING_CASTER) && !target->HasInArc(static_cast<float>(M_PI), m_caster))
return SPELL_FAILED_NOT_INFRONT;
- if (!(m_spellInfo->AttributesEx2 & SPELL_ATTR2_CAN_TARGET_NOT_IN_LOS) && VMAP::VMapFactory::checkSpellForLoS(m_spellInfo->Id) && !m_caster->IsWithinLOSInMap(target))
+ if (!IsTriggered() && !(m_spellInfo->AttributesEx2 & SPELL_ATTR2_CAN_TARGET_NOT_IN_LOS) && VMAP::VMapFactory::checkSpellForLoS(m_spellInfo->Id) && !m_caster->IsWithinLOSInMap(target))