Skip to content

Instantly share code, notes, and snippets.

View tst12's full-sized avatar

tst12

View GitHub Profile
@tst12
tst12 / gist:919076
Created April 14, 2011 07:39
MapPersistentState
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x4471f950 (LWP 16713)]
0x0000000000ad108f in MapPersistentState::UnloadIfEmpty (this=0x7f6fa3a51f00)
62 if (CanBeUnload())
CRASH ON 2011.04.14-06:59
Using the running image of child Thread 0x4471f950 (LWP 16713).
Program stopped at 0xad108f.
It stopped with signal SIGSEGV, Segmentation fault.
Type "info stack" or "info registers" for more information.
@tst12
tst12 / gist:944765
Created April 27, 2011 17:41
isAlive
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x447f2950 (LWP 15479)]
0x000000000088f896 in Unit::isAlive (this=0x81d1b8d04133)
1507 bool isAlive() const { return (m_deathState == ALIVE); };
CRASH ON 2011.04.26-00:57
Using the running image of child Thread 0x447f2950 (LWP 15479).
Program stopped at 0x88f896.
It stopped with signal SIGSEGV, Segmentation fault.
Type "info stack" or "info registers" for more information.
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x4433f950 (LWP 13454)]
0x0000000000a24a30 in AuctionHouseMgr::ClearRemovedAItems (
this=0x7f2ba6d3bb80)
491 delete m_deletedItems.front();
CRASH ON 2011.05.04-15:04
Using the running image of child Thread 0x4433f950 (LWP 13454).
Program stopped at 0xa24a30.
It stopped with signal SIGSEGV, Segmentation fault.
@tst12
tst12 / gist:967273
Created May 11, 2011 20:29
SPELL_AURA_DAMAGE_SHIELD spell bonus
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp
index 9f14932..eb91459 100644
--- a/src/game/Unit.cpp
+++ b/src/game/Unit.cpp
@@ -1990,9 +1990,14 @@ void Unit::DealMeleeDamage(CalcDamageInfo *damageInfo, bool durabilityLoss)
uint32 damage=(*i)->GetModifier()->m_amount;
SpellEntry const *i_spellProto = (*i)->GetSpellProto();
+ if (i_spellProto && i_spellProto->SpellFamilyName == SPELLFAMILY_PALADIN) //Retribution Aura
+ damage = (SpellBaseDamageBonusDone(SPELL_SCHOOL_MASK_HOLY) * 0.033f) < 0 ? damage : damage + uint32(SpellBaseDamageBonusDone(SPELL_SCHOOL_MASK_HOLY) * 0.033f);
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp
index 9f14932..8fbd2ba 100644
--- a/src/game/Unit.cpp
+++ b/src/game/Unit.cpp
@@ -6592,6 +6597,9 @@ void Unit::RemoveGuardian( Pet* pet )
void Unit::RemoveGuardians()
{
+ uint64 uG = GetObjectGuid().GetRawValue();
+ uint32 uE = GetEntry();
Program received signal SIGABRT, Aborted.
[Switching to Thread 0x43d77950 (LWP 9253)]
0x00007f458af00ed5 in *__GI_raise (sig=<value optimized out>)
at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
in ../nptl/sysdeps/unix/sysv/linux/raise.c
Current language: auto; currently c
CRASH ON 2011.05.18-11:20
Using the running image of child Thread 0x43d77950 (LWP 9253).
Program stopped at 0x7f458af00ed5.
rogram received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x42fb7950 (LWP 14469)]
0x0000000000917881 in std::_List_const_iterator<Group::MemberSlot>::operator++
(this=0x42fb67c8) at /usr/include/c++/4.3/bits/stl_list.h:221
221 _M_node = _M_node->_M_next;
CRASH ON 2011.05.18-13:51
Using the running image of child Thread 0x42fb7950 (LWP 14469).
Program stopped at 0x917881.
It stopped with signal SIGSEGV, Segmentation fault.
@tst12
tst12 / gist:1620992
Created January 16, 2012 13:56
wild magic
diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp
index 0f5e256..1c63678 100644
--- a/src/game/SpellAuras.cpp
+++ b/src/game/SpellAuras.cpp
@@ -4350,6 +4350,9 @@ void Aura::HandleAuraTransform(bool apply, bool Real)
if (caster->HasAura(52648)) // Glyph of the Penguin
model_id = 26452;
+ if (m_modifier.m_miscvalue == 31252)
+ model_id = ci->ModelId[urand(0,3)]
@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)
@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()))