Skip to content

Instantly share code, notes, and snippets.

View rsa's full-sized avatar

Сергей AKA /dev/rsa rsa

  • Murmansk, Russia
View GitHub Profile
@rsa
rsa / gist:7035996
Created October 18, 2013 03:18
Helgrind sample
==10408== Helgrind, a thread error detector
==10408== Copyright (C) 2007-2012, and GNU GPL'd, by OpenWorks LLP et al.
==10408== Using Valgrind-3.8.1 and LibVEX; rerun with -h for copyright info
==10408== Command: mangos-worldd -c /home/mangos/etc/mangosd.conf
==10408== Parent PID: 32583
==10408==
==10408== ---Thread-Announcement------------------------------------------
==10408==
==10408== Thread #9 was created
==10408== at 0x35302F5DDE: clone (in /usr/lib64/libc-2.17.so)
@rsa
rsa / gist:6873149
Created October 7, 2013 19:03
make class MOTransport for split regular transport (GAMEOBJECT_TYPE_T… …RANSPORT) and MOTransport (GAMEOBJECT_TYPE_MO_TRANSPORT) functionality. independent from other Transport related commits, need test (no real changes in game mechanic must be). testing.
diff --git a/src/game/BattleGround/BattleGroundIC.cpp b/src/game/BattleGround/BattleGroundIC.cpp
index 0734064..b31315b 100644
--- a/src/game/BattleGround/BattleGroundIC.cpp
+++ b/src/game/BattleGround/BattleGroundIC.cpp
@@ -213,7 +213,7 @@ void BattleGroundIC::Update(uint32 diff)
// gunship starting
if (node == BG_IC_NODE_HANGAR)
- (teamIndex == TEAM_INDEX_ALLIANCE ? gunshipAlliance : gunshipHorde)->BuildStartMovePacket(GetBgMap());
+ (teamIndex == TEAM_INDEX_ALLIANCE ? gunshipAlliance : gunshipHorde)->Start();
DELETE FROM `creature_template_addon` WHERE `entry` IN (28614,28616);
REPLACE INTO `vehicle_accessory` (`entry`, `accessory_entry`, `seat_id`, `flags`, `description`) VALUES
(28614, 28616, 0, 0, 'Scarlet Gryphon Rider');
-- Spell SQL for spell_dbc---------------
-- Replace DBC values for spell 62705 - Auto-repair
DELETE FROM `spell_dbc` WHERE ID=62705;
INSERT INTO `spell_dbc` (`Id`, `Category`, `Dispel`, `Mechanic`, `Attributes`, `AttributesEx`, `AttributesEx2`, `AttributesEx3`, `AttributesEx4`, `AttributesEx5`, `AttributesEx6`, `AttributesEx7`, `Stances`, `StancesNot`, `Targets`, `RequiresSpellFocus`, `CasterAuraState`, `TargetAuraState`, `CasterAuraStateNot`, `TargetAuraStateNot`, `CasterAuraSpell`, `TargetAuraSpell`, `ExcludeCasterAuraSpell`, `ExcludeTargetAuraSpell`, `CastingTimeIndex`, `RecoveryTime`, `CategoryRecoveryTime`, `InterruptFlags`, `AuraInterruptFlags`, `ProcFlags`, `ProcChance`, `ProcCharges`, `MaxLevel`, `BaseLevel`, `SpellLevel`, `DurationIndex`, `PowerType`, `ManaCost`, `ManaCostPerLevel`, `ManaPerSecond`, `ManaPerSecondPerLevel`, `RangeIndex`, `Speed`, `StackAmount`, `EquippedItemClass`, `EquippedItemSubClassMask`, `EquippedItemInventoryTypeMask`, `Effect1`, `Effect2`, `Effect3`, `EffectDieSides1`, `Effec
@rsa
rsa / gist:3497508
Created August 28, 2012 11:56
Improved poison
-- Replace DBC values for spell "Improved Poisons"
--
DELETE FROM `spell_dbc` WHERE `Id` IN (14113,14114,14115,14116, 14117);
INSERT INTO `spell_dbc`
( `Id`, `Category`, `Dispel`, `Mechanic`, `Attributes`, `AttributesEx`, `AttributesEx2`, `AttributesEx3`, `AttributesEx4`, `AttributesEx5`, `AttributesEx6`, `AttributesEx7`, `Stances`, `StancesNot`, `Targets`, `RequiresSpellFocus`, `CasterAuraState`, `TargetAuraState`, `CasterAuraStateNot`, `TargetAuraStateNot`, `CasterAuraSpell`, `TargetAuraSpell`, `ExcludeCasterAuraSpell`, `ExcludeTargetAuraSpell`, `CastingTimeIndex`, `RecoveryTime`, `CategoryRecoveryTime`, `InterruptFlags`, `AuraInterruptFlags`, `ProcFlags`, `ProcChance`, `ProcCharges`, `MaxLevel`, `BaseLevel`, `SpellLevel`, `DurationIndex`, `PowerType`, `ManaCost`, `ManaCostPerLevel`, `ManaPerSecond`, `ManaPerSecondPerLevel`, `RangeIndex`, `Speed`, `StackAmount`, `EquippedItemClass`, `EquippedItemSubClassMask`, `EquippedItemInventoryTypeMask`, `Effect1`, `Effect2`, `Effect3`, `EffectDieSides1`, `EffectDieS
@rsa
rsa / diff12.patch
Created August 18, 2012 13:24
update to SD2
diff --git a/scripts/battlegrounds/battlegroundIC.cpp b/scripts/battlegrounds/battlegroundIC.cpp
index cbfdeef..4c96a46 100644
--- a/scripts/battlegrounds/battlegroundIC.cpp
+++ b/scripts/battlegrounds/battlegroundIC.cpp
@@ -135,7 +135,7 @@ struct MANGOS_DLL_DECL npc_ic_vehicleAI : public ScriptedAI
{
if (BattleGround *bg = pPlayer->GetBattleGround())
{
- if (VehicleKit *vehicle = pCreature->GetVehicleKit())
+ if (VehicleKitPtr vehicle = pCreature->GetVehicleKit())
void *__cdecl sub_58C5A0(WGUID objectGuid, int a2, int a3, int a4, int a5, int a6, int a7)
{
void *result; // eax@1
void *v8; // esi@1
int v9; // edi@3
char *v10; // [sp-10h] [bp-BD4h]@8
char *v11; // [sp-Ch] [bp-BD0h]@8
signed int v12; // [sp-8h] [bp-BCCh]@8
char v13; // [sp+4h] [bp-BC0h]@5
WGUID v14; // [sp+BBCh] [bp-8h]@5
CDataStore::GetInt64(&objectGuid);
CDataStore::GetInt64(&v58);
CDataStore::GetInt32(v1, &v68);
CDataStore::GetString(&v20, 512);
CDataStore::GetString(&v19, 3000);
CDataStore::GetString(&v18, 3000);
CDataStore::GetInt8(&v72);
CDataStore::GetInt32(v1, &v54);
CDataStore::GetInt32(v1, &v46);
CDataStore::GetInt8(&a1 + 3);
diff --git a/src/game/ObjectGuid.cpp b/src/game/ObjectGuid.cpp
index 8688013..a6383ea 100644
--- a/src/game/ObjectGuid.cpp
+++ b/src/game/ObjectGuid.cpp
@@ -109,3 +109,4 @@ template uint32 ObjectGuidGenerator<HIGHGUID_DYNAMICOBJECT>::Generate();
template uint32 ObjectGuidGenerator<HIGHGUID_CORPSE>::Generate();
template uint32 ObjectGuidGenerator<HIGHGUID_INSTANCE>::Generate();
template uint32 ObjectGuidGenerator<HIGHGUID_GROUP>::Generate();
+template uint32 ObjectGuidGenerator<HIGHGUID_EVENT>::Generate();
diff --git a/src/game/ObjectGuid.h b/src/game/ObjectGuid.h
@rsa
rsa / gist:1593475
Created January 11, 2012 07:02
necrotic plague
diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp
index 01b9083..34bc11d 100644
--- a/src/game/Spell.cpp
+++ b/src/game/Spell.cpp
@@ -1705,6 +1705,12 @@ void Spell::SetTargetMap(SpellEffectIndex effIndex, uint32 targetMode, UnitList&
case 71340: // Pact of darkfallen (hack for script work)
unMaxTargets = 1;
break;
+ case 70337: // LK death plague
+ case 73912: