Skip to content

Instantly share code, notes, and snippets.

@Shauren
Shauren / 0001-detect_unicode_mismatch.patch
Created June 4, 2024 13:23
casclib unicode mismatch detection
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3d66ed2..b7d8c48 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -126,6 +126,8 @@ if(CASC_BUILD_SHARED_LIB)
# On Win32, build CascLib.dll
if(WIN32)
set_target_properties(casc PROPERTIES OUTPUT_NAME CascLib)
+ add_library(casc_check_unicode OBJECT src/CascCheckUnicode.cpp)
+ add_custom_command(TARGET casc POST_BUILD COMMAND "${CMAKE_AR}" $<TARGET_IMPORT_FILE:casc> $<TARGET_OBJECTS:casc_check_unicode>)
@Shauren
Shauren / UniqueTrackingPtr.cpp
Created March 11, 2024 12:24
UniqueTrackingPtr demo
/*
* This file is part of the TrinityCore Project. See AUTHORS file for Copyright information
*
* 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
@Shauren
Shauren / wse.sql
Last active December 29, 2022 21:07
9.2.5 WorldStateExpression
This file has been truncated, but you can view the full file.
INSERT INTO `world_state_expression_parsed` (ID, `Text`) VALUES
(44, "WorldState(63) < WorldState(62)"),
(61, "WSE_FUNCTION_RANDOM(50, 75) != 0"),
(63, "(WorldState(63) + 1) != 0"),
(67, "WorldState(63) > WorldState(62)"),
(82, "(WorldState(63) > WorldState(62)) && WorldState(41) < 2"),
(102, "(WorldState(63) > WorldState(62)) && WorldState(81) == 0"),
(103, "WorldState(41) <= 0"),
(104, "WorldState(41) == 1"),
(105, "WorldState(41) >= 2"),
@Shauren
Shauren / definitely_broken.txt
Last active October 22, 2021 19:18
gameobjects with regular rotation in gameobject_addon parent_rotation fields
1374
1498
4599
5141
5205
5382
5398
5405
5425
7100
@Shauren
Shauren / Main.lua
Created November 13, 2020 13:39
TomCat built in pins
local addon = select(2, ...)
local D, _, P = addon.getLocalVars()
local TCL = addon.TomCatsLibs
local QUEST_STATUS, windowSettings
local GetVignettes_Orig = C_VignetteInfo.GetVignettes
local zoneMapID = 118
local function suppressVignettes()
diff --git a/src/server/game/Entities/Vehicle/Vehicle.cpp b/src/server/game/Entities/Vehicle/Vehicle.cpp
index 4c333e6574..36f40e9a91 100755
--- a/src/server/game/Entities/Vehicle/Vehicle.cpp
+++ b/src/server/game/Entities/Vehicle/Vehicle.cpp
@@ -30,6 +30,7 @@
#include "ScriptMgr.h"
#include "SpellAuraEffects.h"
#include "TemporarySummon.h"
+#include "Transport.h"
#include "Unit.h"
diff --git a/src/common/Debugging/Errors.h b/src/common/Debugging/Errors.h
index d263be3efe..f45c586c0c 100644
--- a/src/common/Debugging/Errors.h
+++ b/src/common/Debugging/Errors.h
@@ -20,6 +20,8 @@
#define TRINITYCORE_ERRORS_H
#include "Define.h"
+#include <boost/preprocessor/facilities/overload.hpp>
+#include <boost/preprocessor/facilities/empty.hpp>
diff --git a/RecastDemo/Source/NavMeshTesterTool.cpp b/RecastDemo/Source/NavMeshTesterTool.cpp
index 8b99ac7..8c48929 100644
--- a/RecastDemo/Source/NavMeshTesterTool.cpp
+++ b/RecastDemo/Source/NavMeshTesterTool.cpp
@@ -414,22 +414,22 @@ void NavMeshTesterTool::handleMenu()
imguiLabel("Include Flags");
imguiIndent();
- if (imguiCheck("Walk", (m_filter.getIncludeFlags() & SAMPLE_POLYFLAGS_WALK) != 0))
+ if (imguiCheck("Ground", (m_filter.getIncludeFlags() & SAMPLE_POLYFLAGS_WALK) != 0))
diff --git a/dep/boost/CMakeLists.txt b/dep/boost/CMakeLists.txt
index 57e9d0c4f6..4a2332c2c1 100644
--- a/dep/boost/CMakeLists.txt
+++ b/dep/boost/CMakeLists.txt
@@ -77,7 +77,8 @@ target_compile_definitions(boost
-DBOOST_OPTIONAL_USE_OLD_DEFINITION_OF_NONE
-DBOOST_CHRONO_NO_LIB
-DBOOST_CONFIG_SUPPRESS_OUTDATED_MESSAGE
- -DBOOST_ASIO_NO_DEPRECATED)
+ -DBOOST_ASIO_NO_DEPRECATED
@Shauren
Shauren / convert.cpp
Created December 30, 2018 17:56
npc_trainer converter
namespace TrinityOld
{
struct TrainerRequirement
{
uint32 trainer_type;
uint32 trainer_spell;
uint32 trainer_class;
uint32 trainer_race;
};