Skip to content

Instantly share code, notes, and snippets.

@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
diff --git a/src/server/game/AI/CoreAI/UnitAI.h b/src/server/game/AI/CoreAI/UnitAI.h
index 0a7e10a34f..679497173f 100644
--- a/src/server/game/AI/CoreAI/UnitAI.h
+++ b/src/server/game/AI/CoreAI/UnitAI.h
@@ -257,6 +257,8 @@ class TC_GAME_API UnitAI
virtual std::string GetDebugInfo() const;
+ Unit* GetUnit() const { return me; }
+
@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;
};