Skip to content

Instantly share code, notes, and snippets.

@tobmaps
tobmaps / gist:1005235
Created June 2, 2011 20:30
Faction bosses
/*
* Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/>
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
@tobmaps
tobmaps / gist:1008089
Created June 4, 2011 17:21
Wandering Plague
diff --git a/src/server/game/Spells/SpellMgr.cpp b/src/server/game/Spells/SpellMgr.cpp
index d7784f1..4c8a57b 100755
--- a/src/server/game/Spells/SpellMgr.cpp
+++ b/src/server/game/Spells/SpellMgr.cpp
@@ -4000,6 +4000,7 @@ void SpellMgr::LoadSpellCustomAttr()
spellInfo->StackAmount = 4;
++count;
break;
+ case 50526: // Wandering Plague
case 63675: // Improved Devouring Plague
diff --git a/src/server/scripts/Spells/spell_quest.cpp b/src/server/scripts/Spells/spell_quest.cpp
index 7bb8426..d19d70b 100644
--- a/src/server/scripts/Spells/spell_quest.cpp
+++ b/src/server/scripts/Spells/spell_quest.cpp
@@ -475,6 +475,42 @@ public:
}
};
+// http://www.wowhead.com/quest=12372 Defending Wyrmrest Temple
+// 49370 Wyrmrest Defender: Destabilize Azure Dragonshrine Effect
@tobmaps
tobmaps / gist:1011199
Created June 6, 2011 21:54
Bugged t10 bonuses hackfix
diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp
index 47f8f48..5239ad1 100755
--- a/src/server/game/Entities/Unit/Unit.cpp
+++ b/src/server/game/Entities/Unit/Unit.cpp
@@ -11028,6 +11028,11 @@ uint32 Unit::SpellCriticalDamageBonus(SpellEntry const *spellProto, uint32 damag
break;
}
+ // all these spells should have only 50% bonus damage on crit like a magic spells
+ if (spellProto->Id == 55078 || spellProto->Id == 61840 ||
@tobmaps
tobmaps / gist:1014277
Created June 8, 2011 11:48
Refer-A-Friend
diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp
index caaf138..daf4222 100755
--- a/src/server/game/Entities/Player/Player.cpp
+++ b/src/server/game/Entities/Player/Player.cpp
@@ -3077,6 +3077,10 @@ void Player::GiveLevel(uint8 level)
GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_REACH_LEVEL);
+ // RAF system
+ if (GetSession()->GetAccountLinkedState() != STATE_NOT_LINKED && getLevel() < sWorld->getIntConfig(CONFIG_MAX_RECRUIT_A_FRIEND_BONUS_PLAYER_LEVEL) && level % 2 == 0)
@tobmaps
tobmaps / gist:1020523
Created June 11, 2011 12:36
Black Ice fix
diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp
index d3fda19..bff1d15 100755
--- a/src/server/game/Entities/Player/Player.cpp
+++ b/src/server/game/Entities/Player/Player.cpp
@@ -8000,7 +8000,8 @@ void Player::_ApplyWeaponDependentAuraMods(Item *item,WeaponAttackType attackTyp
AuraEffectList const& auraDamagePctList = GetAuraEffectsByType(SPELL_AURA_MOD_DAMAGE_PERCENT_DONE);
for (AuraEffectList::const_iterator itr = auraDamagePctList.begin(); itr != auraDamagePctList.end(); ++itr)
if ((apply && item->IsFitToSpellRequirements((*itr)->GetSpellProto())) || HasItemFitToSpellRequirements((*itr)->GetSpellProto(), item))
- mod += (*itr)->GetAmount();
+ if ((*itr)->GetMiscValue() & SPELL_SCHOOL_MASK_NORMAL)
@tobmaps
tobmaps / gist:1020929
Created June 11, 2011 20:40
SPELL_ATTR2_IGNORE_LOS
diff --git a/src/server/collision/Management/VMapFactory.cpp b/src/server/collision/Management/VMapFactory.cpp
index b12924a..b10b4dd 100755
--- a/src/server/collision/Management/VMapFactory.cpp
+++ b/src/server/collision/Management/VMapFactory.cpp
@@ -81,35 +81,6 @@ namespace VMAP
}
//===============================================
- /**
- parameter: String of map ids. Delimiter = ","
@tobmaps
tobmaps / gist:1022982
Created June 13, 2011 15:24
Archavon mist fix
diff --git a/src/server/game/Spells/SpellMgr.cpp b/src/server/game/Spells/SpellMgr.cpp
index 66b0e15..4dbb108 100755
--- a/src/server/game/Spells/SpellMgr.cpp
+++ b/src/server/game/Spells/SpellMgr.cpp
@@ -3997,6 +3997,14 @@ void SpellMgr::LoadSpellCustomAttr()
spellInfo->AuraInterruptFlags = AURA_INTERRUPT_FLAG_HITBYSPELL | AURA_INTERRUPT_FLAG_TAKE_DAMAGE;
++count;
break;
+ // VAULT OF ARCHAVON SPELLS
+ //
@tobmaps
tobmaps / gist:1027198
Created June 15, 2011 14:17
arena auras remove v1
diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp
index ab38a53..faf0871 100755
--- a/src/server/game/Entities/Unit/Unit.cpp
+++ b/src/server/game/Entities/Unit/Unit.cpp
@@ -4039,8 +4039,8 @@ void Unit::RemoveArenaAuras(bool onleave)
Aura const* aura = aurApp->GetBase();
if (!(aura->GetSpellProto()->AttributesEx4 & SPELL_ATTR4_UNK21) // don't remove stances, shadowform, pally/hunter auras
&& !aura->IsPassive() // don't remove passive auras
- && !(aura->GetSpellProto()->AttributesEx3 & SPELL_ATTR3_DEATH_PERSISTENT) // not death persistent auras
- && (aurApp->IsPositive() ^ onleave)) // remove positive buffs on enter, negative buffs on leave
@tobmaps
tobmaps / gist:1027206
Created June 15, 2011 14:22
arena auras remove v2
diff --git a/src/server/game/Battlegrounds/Battleground.cpp b/src/server/game/Battlegrounds/Battleground.cpp
index 404d380..b382735 100755
--- a/src/server/game/Battlegrounds/Battleground.cpp
+++ b/src/server/game/Battlegrounds/Battleground.cpp
@@ -920,7 +920,6 @@ void Battleground::RemovePlayerAtLeave(const uint64& guid, bool Transport, bool
// if arena, remove the specific arena auras
if (isArena())
{
- plr->RemoveArenaAuras(true); // removes debuffs / dots etc., we don't want the player to die after porting out
bgTypeId=BATTLEGROUND_AA; // set the bg type to all arenas (it will be used for queue refreshing)