Skip to content

Instantly share code, notes, and snippets.

View tst12's full-sized avatar

tst12

View GitHub Profile
// Blessing of Light dummy effects healing taken from Holy Light and Flash of Light
if (spellProto->SpellFamilyName == SPELLFAMILY_PALADIN && (spellProto->SpellFamilyFlags & 0x00000000C0000000LL))
{
AuraList const& mDummyAuras = pVictim->GetAurasByType(SPELL_AURA_DUMMY);
for (AuraList::const_iterator i = mDummyAuras.begin();i != mDummyAuras.end(); ++i)
{
if ((*i)->GetSpellProto()->SpellVisual == 9180)
{
// If the caster has Libram of Souls Redeemed itemid 28592 equipped then Flash of Light and Holy Light are granted a bonus
int32 LibramAdvertisedBenefit = 0;
@tst12
tst12 / gist:00044d3e7539d8631c712480bf745157
Created March 30, 2017 07:26
not corresponded to 2.0 staff
-- Patch 2.1.0
-- Recipe: Earthen Elixir
DELETE FROM `npc_vendor` WHERE `entry` = 17904 AND `item` = 32070;
-- Recipe: Elixir of Ironskin
DELETE FROM `npc_vendor` WHERE `item` = 32071;
-- Elixir of Major Fortitude
DELETE FROM `npc_trainer` WHERE `spell` = 39636;
-- Elixir of Draenic Wisdom
DELETE FROM `npc_trainer` WHERE `spell` = 39638;
-- Cauldron of *
@tst12
tst12 / gist:2818460
Created May 28, 2012 10:45
WorldSession::HandleSetSelectionOpcode
diff --git a/src/game/MiscHandler.cpp b/src/game/MiscHandler.cpp
index a470a21..5578cdd 100644
--- a/src/game/MiscHandler.cpp
+++ b/src/game/MiscHandler.cpp
@@ -410,9 +410,12 @@ void WorldSession::HandleSetSelectionOpcode( WorldPacket & recv_data )
// update reputation list if need
Unit* unit = ObjectAccessor::GetUnit(*_player, guid ); // can select group members at diff maps
if (!unit)
- return;
-
@tst12
tst12 / gist:2721984
Created May 17, 2012 22:26
HOLY RESISTANCE
diff --git a/src/game/StatSystem.cpp b/src/game/StatSystem.cpp
index c23e6a1..2fbd575 100644
--- a/src/game/StatSystem.cpp
+++ b/src/game/StatSystem.cpp
@@ -153,12 +153,12 @@ bool Player::UpdateAllStats()
void Player::UpdateResistances(uint32 school)
{
- if(school > SPELL_SCHOOL_NORMAL)
+ if (school > SPELL_SCHOOL_HOLY)
diff --git a/src/game/Object.h b/src/game/Object.h
index 3b10ea5..7f19c54 100644
--- a/src/game/Object.h
+++ b/src/game/Object.h
@@ -511,7 +511,7 @@ class MANGOS_DLL_SPEC WorldObject : public Object
float GetDistanceZ(const WorldObject* obj) const;
bool IsInMap(const WorldObject* obj) const
{
- return IsInWorld() && obj->IsInWorld() && (GetMap() == obj->GetMap()) && InSamePhase(obj);
+ return obj && IsInWorld() && obj->IsInWorld() && (GetMap() == obj->GetMap()) && InSamePhase(obj);
diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp
index d21818c..d4f9b53 100644
--- a/src/game/Spell.cpp
+++ b/src/game/Spell.cpp
@@ -6847,7 +6854,10 @@ SpellCastResult Spell::CheckRange(bool strict)
float dist = m_caster->GetCombatDistance(target);
if(dist > max_range)
+ {
+ sLog.outError("SPELL_FAILED_OUT_OF_RANGE check values: [range_mod:%f], [max_range:%f], [dist:%f]", range_mod, max_range, dist);
From 4f868d8fc498fe70d3af93ce8a16c9377fb0a9fd Mon Sep 17 00:00:00 2001
From: unknown <Administrator@.(none)>
Date: Sun, 10 Oct 2010 19:32:42 +0300
Subject: [PATCH 609/610] fix pal spd bag
---
src/game/StatSystem.cpp | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/src/game/StatSystem.cpp b/src/game/StatSystem.cpp
void Aura::HandleAuraModAttackPowerOfStatPercent(bool /*apply*/, bool Real)
{
// spells required only Real aura add/remove
if (!Real)
return;
// Recalculate bonus
if (GetTarget()->GetTypeId() == TYPEID_PLAYER)
((Player*)GetTarget())->UpdateAttackPowerAndDamage(false);
+ else if (GetTarget()->GetObjectGuid().IsPet())
@tst12
tst12 / gist:1700983
Created January 29, 2012 22:13
Glacial Strike
diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp
index 5f91023..151092f 100644
--- a/src/game/SpellAuras.cpp
+++ b/src/game/SpellAuras.cpp
@@ -6650,6 +6650,9 @@ void Aura::HandlePeriodicDamage(bool apply, bool Real)
void Aura::HandlePeriodicDamagePCT(bool apply, bool /*Real*/)
{
m_isPeriodic = apply;
+
+ if ((GetSpellProto()->SpellIconID == 2440) && (GetTarget()->GetHealth() == GetTarget()->GetMaxHealth()))
@tst12
tst12 / gist:1646334
Created January 20, 2012 09:20
deathbringer saurfang
diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_deathbringer_saurfang.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_deathbringer_saurfang.cpp
index 9282fe5..9301462 100644
--- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_deathbringer_saurfang.cpp
+++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_deathbringer_saurfang.cpp
@@ -204,7 +204,7 @@ struct MANGOS_DLL_DECL boss_deathbringer_saurfang_eventAI : public base_icc_boss
m_bTeleported = true;
}
- if (m_bTeleported && !m_bIsIntroStarted && pWho->GetTypeId() == TYPEID_PLAYER && !((Player*)pWho)->isGameMaster() && m_creature->GetDistance2d(pWho) < 50.0f)
+ if ((m_pInstance->GetData(TYPE_SAURFANG) != DONE) && m_bTeleported && !m_bIsIntroStarted && pWho->GetTypeId() == TYPEID_PLAYER && !((Player*)pWho)->isGameMaster() && m_creature->GetDistance2d(pWho) < 50.0f)