Skip to content

Instantly share code, notes, and snippets.

View Naios's full-sized avatar

Denis Blank Naios

  • Germany
View GitHub Profile
@Naios
Naios / MyCSG output example
Created May 7, 2013 18:39
An output example of Naios/MyCSG
#ifndef MyCSG_Structure_h
#define MyCSG_Structure_h
//////////////////////////
// MyCSG Config
#define USE_CPP11
#define USE_DATATYPES
//////////////////////////
#ifndef Singleton_h
#define Singleton_h
#include <boost/serialization/singleton.hpp>
template <class SINGLETON_CLASS>
class Singleton
{
public:
@Naios
Naios / sample
Created December 9, 2014 04:51
WIde sample output
root@localhost: test
Running test script with args [].
DEBUG: [INTEGER, STRING, STRING, INTEGER, INTEGER]
[entry=1, map=0, x=-8888.98f, y=-0.54f, z=94.39f]
[entry=2, map=0, x=-8841.06f, y=489.656f, z=109.607f]
[entry=3, map=0, x=16391.81f, y=16341.21f, z=69.44f]
[entry=4, map=0, x=-10551.9f, y=1034.39f, z=56.9543f]
[entry=5, map=0, x=-9429.1f, y=-2231.4f, z=68.65f]
[entry=41378, name="Maloriak", unit_flags=[UNIT_FLAG_UNK_6](0x40), unit_class=CLASS_PALADIN(1)]
@Naios
Naios / output.sql
Last active August 29, 2015 14:11
WIde example query output
SET @CLASS_ROGUE := 2;
SET @CREDIT_CUSTOM_VARIABLE := 123456;
SET @NPC_DISEASED_TIMBER_WOLF := 69;
SET @NPC_HARVEST_REAPER := 115;
SET @NPC_BANDIT := 116;
SET @NPC_RIVERPAW_GNOLL := 117;
SET @NPC_PROWLER := 118;
SET @NPC_LONGSNOUT := 119;
This file has been truncated, but you can view the full file.
Revision: TrinityCore rev. 7dc90b4efd08 2015-01-28 13:59:56 +0000 (6.x branch) (Win64, RelWithDebInfo)
Date 29:1:2015. Time 16:51
//=====================================================
*** Hardware ***
Processor: Intel(R) Xeon(R) CPU E3-1230 v3 @ 3.30GHz
Number Of Processors: 8
Physical Memory: 8331904 KB (Available: 2086292 KB)
Commit Charge Limit: 10720308 KB
*** Operation System ***
@Naios
Naios / SourceGroupCreator.java
Created February 20, 2015 19:12
Source group creator
import java.io.File;
import java.io.PrintWriter;
import java.util.Arrays;
/**
* @author Naios <[email protected]>
*/
public class SourceGroupCreator
{
public static void main(final String[] args)
-- Updates base tables
-- 2015_03_11_00_world.sql
DROP TABLE IF EXISTS `updates`;
CREATE TABLE `updates` (
`name` VARCHAR(200) NOT NULL COMMENT 'filename with extension of the update.',
`hash` CHAR(40) NULL DEFAULT '' COMMENT 'sha1 hash of the sql file.',
`state` ENUM('RELEASED','ARCHIVED') NOT NULL DEFAULT 'RELEASED' COMMENT 'defines if an update is released or archived.',
`timestamp` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'timestamp when the query was applied.',
`speed` INT(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT 'time the query takes to apply in ms.',
PRIMARY KEY (`name`)

###Code:###

System.out.println("\nShort Example:\n");
final ServerStorage<CreatureTemplate> creatureTemplate = requestServerStorage("world", "creature_template");
final CreatureTemplate maloriak = creatureTemplate.request(ServerStorageKeys.ofCreatureTemplate(41378)).get();
 
creatureTemplate.getChangeTracker().setScope("1", "Some flag changes \n and comment tests");
maloriak.unit_flags().removeFlag(UnitFlags.UNIT_FLAG_DISARMED);
maloriak.unit_flags().addFlag(UnitFlags.UNIT_FLAG_IMMUNE_TO_NPC);
 
@Naios
Naios / WIdeQuestTemplate.md
Last active August 29, 2015 14:16
WIde Quest Template example

###Code:###

final ServerStorage<QuestTemplate> questTemplate = requestServerStorage("world", "quest_template");
final QuestTemplate riseOfTheSilithid = questTemplate.request(ServerStorageKeys.ofQuestTemplate(32)).get();

System.out.println("\n (Creature Template):\n");

questTemplate.getChangeTracker().setScope("q1", "Edit quest Rise of the Silithid\nonly mages allowed\nand set prev and next quest");
riseOfTheSilithid.prevQuestId().set(28);
riseOfTheSilithid.nextQuestId().set(32);
@Naios
Naios / trinitycore.cppcheck
Created March 11, 2015 10:16
Cppcheck project file for TrinityCore
<?xml version="1.0" encoding="UTF-8"?>
<project version="1">
<includedir>
<dir name="TrinityCore/dep/"/>
</includedir>
<paths>
<dir name="TrinityCore/src/server/"/>
</paths>
<exclude>
<path name="boost/"/>