Skip to content

Instantly share code, notes, and snippets.

View jackpoz's full-sized avatar

Giacomo Pozzoni jackpoz

  • Stena Group IT
  • Gothenburg
View GitHub Profile
@jackpoz
jackpoz / old query.sql
Created August 9, 2020 20:14
Old query format
This file has been truncated, but you can view the full file.
SELECT `CreatureID`, `Idx`, `CreatureDisplayID`, `DisplayScale`, `Probability`, `VerifiedBuild` FROM worldmaster.`creature_template_model` WHERE (`CreatureID`=172096 AND `Idx`=1) OR (`CreatureID`=172096 AND `Idx`=0) OR (`CreatureID`=171937 AND `Idx`=0) OR (`CreatureID`=166624 AND `Idx`=0) OR (`CreatureID`=165242 AND `Idx`=0) OR (`CreatureID`=165095 AND `Idx`=1) OR (`CreatureID`=165095 AND `Idx`=0) OR (`CreatureID`=164993 AND `Idx`=3) OR (`CreatureID`=164993 AND `Idx`=2) OR (`CreatureID`=164993 AND `Idx`=1) OR (`CreatureID`=164993 AND `Idx`=0) OR (`CreatureID`=164992 AND `Idx`=3) OR (`CreatureID`=164992 AND `Idx`=2) OR (`CreatureID`=164992 AND `Idx`=1) OR (`CreatureID`=164992 AND `Idx`=0) OR (`CreatureID`=164991 AND `Idx`=3) OR (`CreatureID`=164991 AND `Idx`=2) OR (`CreatureID`=164991 AND `Idx`=1) OR (`CreatureID`=164991 AND `Idx`=0) OR (`CreatureID`=164988 AND `Idx`=1) OR (`CreatureID`=164988 AND `Idx`=0) OR (`CreatureID`=164985 AND `Idx`=2) OR (`CreatureID`=164985 AND `Idx`=1) OR (`CreatureID`=164985 AND `Id
@jackpoz
jackpoz / query.sql
Last active August 9, 2020 20:13
New query format
SELECT `CreatureID`, `Idx`, `CreatureDisplayID`, `DisplayScale`, `Probability`, `VerifiedBuild` FROM worldmaster.`creature_template_model` WHERE (`Idx`=1 AND `CreatureID` IN (172096,165095,164993,164992,164991,164988,164985,164918,164452,164410,164361,164359,164358,164331,164330,164307,164301,164291,164229,164228,164227,164226,164225,164222,164142,164030,163706,163705,163704,163703,163699,163697,163696,163694,163690,163689,163679,163659,163658,163657,163640,163639,163602,163599,163598,163583,163582,163564,163547,163541,163510,163484,163443,163437,163425,163424,163422,163411,163410,163409,163408,163407,163406,163404,163403,163402,163401,163400,163380,163379,163362,163361,163360,163359,163358,163357,163356,163337,163332,163321,163320,163319,163294,163290,163276,163269,163264,163256,163254,163223,163220,163217,163215,163205,163204,163203,163198,163196,163190,163175,163171,163169,163168,163151,163148,163132,163131,163120,163103,163071,163068,163017,162985,162984,162983,162982,162963,162941,162940,162931,162917,16
==298166==AddressSanitizer: failed to intercept '__isoc99_printf'
'==298166==AddressSanitizer: failed to intercept '__isoc99_sprintf'
'==298166==AddressSanitizer: failed to intercept '__isoc99_snprintf'
'==298166==AddressSanitizer: failed to intercept '__isoc99_fprintf'
'==298166==AddressSanitizer: failed to intercept '__isoc99_vprintf'
'==298166==AddressSanitizer: failed to intercept '__isoc99_vsprintf'
'==298166==AddressSanitizer: failed to intercept '__isoc99_vsnprintf'
'==298166==AddressSanitizer: failed to intercept '__isoc99_vfprintf'
'==298166==AddressSanitizer: failed to intercept 'crypt'
'==298166==AddressSanitizer: failed to intercept 'crypt_r'
==979109==ERROR: AddressSanitizer: stack-use-after-return on address 0x7f633cfdcf6c at pc 0x00000319a495 bp 0x7f633dfdf4d0 sp 0x7f633dfdf4c8
READ of size 4 at 0x7f633cfdcf6c thread T7
#0 0x319a494 in Map::ScriptsProcess() /home/trinity/trinity/sources/src/server/game/Maps/MapScripts.cpp:393:30
#1 0x31a4cbc in Map::ScriptCommandStart(ScriptInfo const&, unsigned int, Object*, Object*) /home/trinity/trinity/sources/src/server/game/Maps/MapScripts.cpp:96:9
#2 0x37c4bd1 in Spell::EffectActivateObject(SpellEffIndex) /home/trinity/trinity/sources/src/server/game/Spells/SpellEffects.cpp:3744:30
#3 0x371b887 in Spell::HandleEffects(Unit*, Item*, GameObject*, unsigned int, SpellEffectHandleMode) /home/trinity/trinity/sources/src/server/game/Spells/Spell.cpp:5036:9
#4 0x371ae38 in Spell::GOTargetInfo::DoTargetSpellHit(Spell*, unsigned char) /home/trinity/trinity/sources/src/server/game/Spells/Spell.cpp:2602:12
#5 0x37598ae in void Spell::DoProcessTargetContainer<std::vector<Spell::GOTargetInfo, s
@jackpoz
jackpoz / clean bots.sql
Last active August 10, 2019 08:33
clean bots
DELETE FROM auth.account WHERE username LIKE 'bot%' AND username != 'botfarm';
DELETE t FROM auth.realmcharacters AS t LEFT JOIN auth.account AS a ON t.acctid = a.id WHERE a.id IS NULL;
DELETE c FROM characters.characters AS c LEFT JOIN auth.account AS a ON c.account = a.id WHERE a.id IS NULL;
DELETE t FROM characters.character_skills AS t LEFT JOIN characters.characters AS c ON t.guid = c.guid WHERE c.guid IS NULL;
DELETE t FROM characters.character_reputation AS t LEFT JOIN characters.characters AS c ON t.guid = c.guid WHERE c.guid IS NULL;
DELETE t FROM characters.character_inventory AS t LEFT JOIN characters.characters AS c ON t.guid = c.guid WHERE c.guid IS NULL;
DELETE t FROM characters.character_homebind AS t LEFT JOIN characters.characters AS c ON t.guid = c.guid WHERE c.guid IS NULL;
DELETE t FROM characters.character_glyphs AS t LEFT JOIN characters.characters AS c ON t.guid = c.guid WHERE c.guid IS NULL;
DELETE t FROM characters.character_battleground_data AS t LEFT JOIN characters.characters AS c
@jackpoz
jackpoz / authasan.sh
Created June 13, 2019 10:11
TC test server upgrade
ASAN_OPTIONS=halt_on_error=0:verbosity=1:log_path=authasan/authasan:detect_stack_use_after_return=1 LSAN_OPTIONS=verbosity=1:log_threads=1 ./authserver
@jackpoz
jackpoz / Get-LatestScript.ps1
Last active January 14, 2019 11:43
PowerShell script to automate TrinityCore and requirements installation and update
$url = "https://gist.githubusercontent.com/jackpoz/6161c2872d9fd0527f506036ed5c5922/raw/Get-TrinityCore.ps1"
$output = "Get-TrinityCore.ps1"
#Invoke-WebRequest -Uri $url -OutFile $filename
(New-Object System.Net.WebClient).DownloadFile($url, [IO.Path]::Combine((get-location), $output))
>worldserver.exe!SmartAI::StopPath(unsigned int DespawnTime, unsigned int quest, bool fail) Line 148 C++
worldserver.exe!SmartScript::ProcessAction(SmartScriptHolder & e, Unit * unit, unsigned int var0, unsigned int var1, bool bvar, const SpellInfo * spell, GameObject * gob) Line 1385 C++
worldserver.exe!SmartScript::ProcessEvent(SmartScriptHolder & e, Unit * unit, unsigned int var0, unsigned int var1, bool bvar, const SpellInfo * spell, GameObject * gob) Line 2769 C++
worldserver.exe!SmartScript::ProcessAction(SmartScriptHolder & e, Unit * unit, unsigned int var0, unsigned int var1, bool bvar, const SpellInfo * spell, GameObject * gob) Line 2271 C++
worldserver.exe!SmartScript::ProcessEvent(SmartScriptHolder & e, Unit * unit, unsigned int var0, unsigned int var1, bool bvar, const SpellInfo * spell, GameObject * gob) Line 2769 C++
worldserver.exe!SmartScript::ProcessAction(SmartScriptHolder & e, Unit * unit, unsigned int var0, unsigned int var1, bool bvar, const SpellInfo * spell, GameObject * gob) Line 2271
16,196 (128 direct, 16,068 indirect) bytes in 4 blocks are definitely lost in loss record 67 of 71
at 0x4C302BA: operator new(unsigned long) (vg_replace_malloc.c:334)
by 0x28F8C22: WorldSession::InitializeSession() (WorldSession.cpp:1185)
by 0x2BA442F: World::AddSession_(WorldSession*) (World.cpp:342)
by 0x2BECD01: World::UpdateSessions(unsigned int) (World.cpp:2962)
by 0x2BEA9F3: World::Update(unsigned int) (World.cpp:2316)
by 0x17F5462: WorldUpdateLoop() (Main.cpp:429)
by 0x17F1BD0: main (Main.cpp:334)
@jackpoz
jackpoz / windows update.reg
Created February 13, 2018 20:32
windows update.reg
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\QualityCompat]
"cadca5fe-87d3-4b96-b7fb-a231484277cc"=dword:00000000