Skip to content

Instantly share code, notes, and snippets.

@cyberium
cyberium / AreaLock.patch
Created September 5, 2012 21:28
AreaLock Rewrite
diff --git a/sql/mangos.sql b/sql/mangos.sql
index 6865fd9..5effceb 100644
--- a/sql/mangos.sql
+++ b/sql/mangos.sql
@@ -141,7 +141,6 @@ CREATE TABLE `areatrigger_teleport` (
`heroic_key2` mediumint(8) unsigned NOT NULL default '0',
`required_quest_done` int(11) unsigned NOT NULL default '0',
`required_quest_done_heroic` int(11) unsigned NOT NULL default '0',
- `required_failed_text` text,
`target_map` smallint(5) unsigned NOT NULL default '0',
@cyberium
cyberium / canenter02.patch
Created September 7, 2012 15:30
Rework map prerequisite check
diff --git a/src/game/Map.cpp b/src/game/Map.cpp
index dc7e790..5f2f80b 100644
--- a/src/game/Map.cpp
+++ b/src/game/Map.cpp
@@ -1249,29 +1249,6 @@ void DungeonMap::InitVisibilityDistance()
*/
bool DungeonMap::CanEnter(Player* player)
{
- if (player->GetMapRef().getTarget() == this)
- {
@cyberium
cyberium / SplineMovement.patch
Created September 19, 2012 09:42
With this patch speed preference of a creature can be restored after any movement (return to home, waypoint, ...)
diff --git a/src/game/Creature.cpp b/src/game/Creature.cpp
index 810d3d0..1b5e59b 100644
--- a/src/game/Creature.cpp
+++ b/src/game/Creature.cpp
@@ -178,7 +178,7 @@ Creature::Creature(CreatureSubtype subtype) : Unit(),
m_CreatureSpellCooldowns.clear();
m_CreatureCategoryCooldowns.clear();
- SetWalk(true);
+ SetDefaultWalkMode(true);
@cyberium
cyberium / sqlstorage.patch
Created September 21, 2012 17:24
sql storage cleanup by Silverice
diff --git a/src/game/ObjectMgr.cpp b/src/game/ObjectMgr.cpp
index 0dac303..680ccba 100755
--- a/src/game/ObjectMgr.cpp
+++ b/src/game/ObjectMgr.cpp
@@ -440,7 +440,7 @@ void ObjectMgr::LoadPointOfInterestLocales()
sLog.outString(">> Loaded " SIZEFMTD " points_of_interest locale strings", mPointOfInterestLocaleMap.size());
}
-struct SQLCreatureLoader : public SQLStorageLoaderBase<SQLCreatureLoader>
+struct SQLCreatureLoader : public SQLStorageLoaderBase<SQLCreatureLoader, SQLStorage>
@cyberium
cyberium / gist:4442819
Created January 3, 2013 11:28
Liquid problem, remove a bad old hack. Causing ocean is lava in start drenei start zone.
diff --git a/src/game/GridMap.cpp b/src/game/GridMap.cpp
index 3bf9f0e..51dab15 100644
--- a/src/game/GridMap.cpp
+++ b/src/game/GridMap.cpp
@@ -952,10 +952,6 @@ GridMapLiquidStatus TerrainInfo::getLiquidStatus(float x, float y, float z, uint
// All ok in water -> store data
if (data)
{
- // hardcoded in client like this convert ocean to lava
- if (GetMapId() == 530 && liquid_type == 2)
diff --git a/ScriptMgr.cpp b/ScriptMgr.cpp
index b496a47..46185aa 100644
--- a/ScriptMgr.cpp
+++ b/ScriptMgr.cpp
@@ -202,7 +202,7 @@ void DoOrSimulateScriptTextForMap(int32 iTextEntry, uint32 uiCreatureEntry, Map*
}
debug_log("SD2: DoOrSimulateScriptTextForMap: text entry=%i, Sound=%u, Type=%u, Language=%u, Emote=%u",
- iTextEntry, pData->SoundId, pData->Type, pData->Language, pData->Emote);
+ iTextEntry, pData->SoundId, pData->Type, pData->LanguageId, pData->Emote);
commit d9b6fee959fb28301e8ac04ffad2cb867f73c062
Author: Cyberium <cybermomo@techemail.com>
Date: Tue Dec 31 13:43:06 2013 +0100
Correct a crash due to invalid pointer.
Add a possibility to abort program before start
diff --git a/contrib/mesh_extractor/src/LiquidHandler.cpp b/contrib/mesh_extractor/src/LiquidHandler.cpp
index fa59d1b..97a92a7 100644
--- a/contrib/mesh_extractor/src/LiquidHandler.cpp
commit b6bd5dd9ef35ec2158c27a92ff215028e1493911
Author: Cyberium <cybermomo@techemail.com>
Date: Tue Dec 31 18:53:45 2013 +0100
add possibility to extract only some tile
diff --git a/contrib/mesh_extractor/src/ContinentBuilder.cpp b/contrib/mesh_extractor/src/ContinentBuilder.cpp
index 8321a79..867c777 100644
--- a/contrib/mesh_extractor/src/ContinentBuilder.cpp
+++ b/contrib/mesh_extractor/src/ContinentBuilder.cpp
@cyberium
cyberium / gist:9446960
Created March 9, 2014 12:18
HunterFeedPetAndDirectDamage
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp
index 38ad185..8344526 100644
--- a/src/game/Unit.cpp
+++ b/src/game/Unit.cpp
@@ -896,8 +896,7 @@ uint32 Unit::DealDamage(Unit* pVictim, uint32 damage, CleanDamage const* cleanDa
if (damagetype == DIRECT_DAMAGE || damagetype == SPELL_DIRECT_DAMAGE)
{
- if (!spellProto || !(spellProto->AuraInterruptFlags & AURA_INTERRUPT_FLAG_DIRECT_DAMAGE))
- pVictim->RemoveAurasWithInterruptFlags(AURA_INTERRUPT_FLAG_DIRECT_DAMAGE);
@cyberium
cyberium / gist:9481185
Created March 11, 2014 07:35
Hunter feed pet and melee damage proc
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp
index 38ad185..7b13b71 100644
--- a/src/game/Unit.cpp
+++ b/src/game/Unit.cpp
@@ -894,11 +894,6 @@ uint32 Unit::DealDamage(Unit* pVictim, uint32 damage, CleanDamage const* cleanDa
pVictim->AttackedBy(this);
}
- if (damagetype == DIRECT_DAMAGE || damagetype == SPELL_DIRECT_DAMAGE)
- {