Skip to content

Instantly share code, notes, and snippets.

@neo-mat
neo-mat / nginx.conf
Created March 21, 2016 07:30 — forked from plentz/nginx.conf
Best nginx configuration for improved security(and performance). Complete blog post here http://tautt.com/best-nginx-configuration-for-security/
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
@neo-mat
neo-mat / aura_231_2.diff
Created August 14, 2012 08:40
Spell Aura 231 #2
diff --git a/src/arcemu-world/SpellAuras.cpp b/src/arcemu-world/SpellAuras.cpp
index 2e9d2b2..937bcc6 100644
--- a/src/arcemu-world/SpellAuras.cpp
+++ b/src/arcemu-world/SpellAuras.cpp
@@ -253,7 +253,7 @@ pSpellAura SpellAuraHandler[TOTAL_SPELL_AURAS] =
&Aura::SpellAuraModStealthDetection,//228 Stealth Detection. http://www.thottbot.com/s34709
&Aura::SpellAuraReduceAOEDamageTaken,//229 Apply Aura:Reduces the damage your pet takes from area of effect attacks http://www.thottbot.com/s35694
&Aura::SpellAuraIncreaseMaxHealth,//230 Increase Max Health (commanding shout);
- &Aura::SpellAuraNULL,//231 curse a target http://www.thottbot.com/s40303
+ &Aura::SpellAuraProcTriggerSpell,//231 curse a target http://www.thottbot.com/s40303
@neo-mat
neo-mat / aura_231.diff
Created August 14, 2012 08:05
Spell Aura 231
diff --git a/src/arcemu-world/SpellAuras.cpp b/src/arcemu-world/SpellAuras.cpp
index 590d23c..474c5d7 100644
--- a/src/arcemu-world/SpellAuras.cpp
+++ b/src/arcemu-world/SpellAuras.cpp
@@ -4040,9 +4040,12 @@ void Aura::SpellAuraProcTriggerSpell(bool apply)
SM_PIValue(ucaster->SM_PCharges, &charges, GetSpellProto()->SpellGroupType);
}
- m_target->AddProcTriggerSpell(spellId, GetSpellProto()->Id, m_casterGuid, GetSpellProto()->procChance, GetSpellProto()->procFlags, charges, groupRelation, NULL);
+ SpellEntry* spellInfo = dbcSpell.LookupEntry(spellId);
diff --git a/src/arcemu-world/Object.cpp b/src/arcemu-world/Object.cpp
index 4106cfa..8bbe284 100644
--- a/src/arcemu-world/Object.cpp
+++ b/src/arcemu-world/Object.cpp
@@ -1627,12 +1627,12 @@ void Object::SpellNonMeleeDamageLog(Unit* pVictim, uint32 spellID, uint32 damage
if(spellInfo == NULL)
return;
- if(this->IsPlayer() && ! TO_PLAYER(this)->canCast(spellInfo))
+ if(this->IsPlayer() && ! TO< Player* >(this)->canCast(spellInfo))
@neo-mat
neo-mat / SpellTarget_Implicit_76.patch
Created February 19, 2012 20:43
Mind Sear and other spells with ImplicitTarget 76
diff --git a/src/arcemu-world/Spell.h b/src/arcemu-world/Spell.h
index f96ef4f..b52018c 100644
--- a/src/arcemu-world/Spell.h
+++ b/src/arcemu-world/Spell.h
@@ -2234,6 +2234,7 @@ class SERVER_DECL Spell : public EventableObject
void AddChainTargets(uint32 i, uint32 TargetType, float r, uint32 maxtargets);
void AddConeTargets(uint32 i, uint32 TargetType, float r, uint32 maxtargets);
void AddScriptedOrSpellFocusTargets(uint32 i, uint32 TargetType, float r, uint32 maxtargets);
+ void RemoveTarget(uint32 i, Object* obj);
@neo-mat
neo-mat / gist:1855529
Created February 17, 2012 21:21
Brackets
bool BendingShinbone(uint32 i, Spell *pSpell)
{
if(pSpell->p_caster)
{
if(RandomUInt(100) < 17) // 17% chance
pSpell->p_caster->GetItemInterface()->AddItemById(ITEM_STURDYSHINBONE, 1, 0); // Sturdy Dragon
else
pSpell->p_caster->GetItemInterface()->AddItemById(ITEM_BROKENSHINBONE, 1, 0);
}
return true;
@neo-mat
neo-mat / gist:1855013
Created February 17, 2012 19:26
BladedArmor
diff --git a/src/scripts/src/SpellHandlers/DeathKnightSpells.cpp b/src/scripts/src/SpellHandlers/DeathKnightSpells.cpp
index eb692bf..0206b51 100644
--- a/src/scripts/src/SpellHandlers/DeathKnightSpells.cpp
+++ b/src/scripts/src/SpellHandlers/DeathKnightSpells.cpp
@@ -273,25 +273,20 @@ bool DeathCoil(uint32 i, Spell* s)
return true;
}
-bool BladedArmor(uint32 i, Aura* pAura, bool apply)
+bool BladedArmor(uint32 i, Spell* s)
@neo-mat
neo-mat / Earth Shield.patch
Created February 8, 2012 23:32
Earth Shield
diff --git a/src/arcemu-world/SpellProc.cpp b/src/arcemu-world/SpellProc.cpp
index b8e593a..2b9471d 100644
--- a/src/arcemu-world/SpellProc.cpp
+++ b/src/arcemu-world/SpellProc.cpp
@@ -52,14 +52,6 @@ void SpellProc::CastSpell(Unit* victim, SpellEntry* CastingSpell, int* dmg_overw
spell->forced_basepoints[2] = dmg_overwrite[2];
spell->ProcedOnSpell = CastingSpell;
- if(mSpell->Id == 974 || mSpell->Id == 32593 || mSpell->Id == 32594 || mSpell->Id == 49283 || mSpell->Id == 49284) // Earth Shield handler
- {
@neo-mat
neo-mat / Killing_Spree.patch
Created January 30, 2012 22:40
Rogue Killing Spree
diff --git a/sql/world_updates/2012-01-31_02-35_killing_spree.sql b/sql/world_updates/2012-01-31_02-35_killing_spree.sql
new file mode 100644
index 0000000..b1a98e2
--- /dev/null
+++ b/sql/world_updates/2012-01-31_02-35_killing_spree.sql
@@ -0,0 +1 @@
+INSERT INTO `spell_effects_override` (`spellId`, `EffectCustomFlag`) VALUES ('57840', '4');
diff --git a/src/arcemu-world/SpellEffects.cpp b/src/arcemu-world/SpellEffects.cpp
index 9e019b8..a8b8827 100644
@neo-mat
neo-mat / mesox_damage_reduct.patch
Created January 30, 2012 07:41
MesoX's damage reduction patch
Index: /src/world/Object.cpp
===================================================================
--- /src/world/Object.cpp (revision 48)
+++ /src/world/Object.cpp (revision 65)
@@ -1655,5 +1658,6 @@
caster->RemoveAurasByInterruptFlag( AURA_INTERRUPT_ON_START_ATTACK );
- res += caster->GetSpellDmgBonus( pVictim, spellInfo, ( int )res, false );
+ // this calculates whole dmg with all bonuses / mods
+ res = float(caster->GetSpellDmgBonus( pVictim, spellInfo, damage, false ));