Skip to content

Instantly share code, notes, and snippets.

@residentkrm
residentkrm / thread_pool.cpp
Created January 13, 2018 16:07 — forked from wush978/thread_pool.cpp
c++ thread pool example(linux only)
#include <boost/shared_ptr.hpp>
#include <boost/make_shared.hpp>
#include <boost/thread.hpp>
#include <boost/bind.hpp>
#include <boost/asio.hpp>
#include <boost/move/move.hpp>
#include <iostream>
#include <unistd.h>
namespace asio = boost::asio;
*Add the toolchain/test PPA*
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install g++-4.8
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.8 50
*If you ever want to update symlinks for a future version:*
sudo rm /usr/bin/g++
sudo ln -s /usr/bin/g++-4.XXX /usr/bin/g++
diff --git a/src/server/game/Server/Protocol/Handlers/CharacterHandler.cpp b/src/server/game/Server/Protocol/Handlers/CharacterHandler.cpp
index 84c8fd7..14da368 100644
--- a/src/server/game/Server/Protocol/Handlers/CharacterHandler.cpp
+++ b/src/server/game/Server/Protocol/Handlers/CharacterHandler.cpp
@@ -1025,7 +1025,7 @@ void WorldSession::HandlePlayerLogin(LoginQueryHolder * holder)
bonuses = fields[0].GetUInt32();
int add = fields[1].GetUInt32();
bonuses = bonuses + add;
- CharacterDatabase.PQuery("UPDATE `bonus` SET `bonuses` = `bonuses` + %u, `add` = `add` - %u WHERE `account` = %u", add, add, accidd);
+ CharacterDatabase.PQuery("UPDATE `bonus` SET `bonuses` = `bonuses` + %u, `add` = `add` - %u WHERE `account` = %u", add, add, accid);
diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp
index 0ba79f1..2633895 100644
--- a/src/game/SpellAuras.cpp
+++ b/src/game/SpellAuras.cpp
@@ -4309,6 +4309,44 @@ void Aura::HandleAuraTransform(bool apply, bool Real)
//break;
//case 71309: // [DND] Spawn Portal
//break;
+ //Deathbringer Will
+ case 71485: // Ловкость врайкула
diff --git a/src/game/StatSystem.cpp b/src/game/StatSystem.cpp
index 11ad8c0..eca3994 100644
--- a/src/game/StatSystem.cpp
+++ b/src/game/StatSystem.cpp
@@ -252,9 +252,9 @@ void Player::UpdateAttackPowerAndDamage(bool ranged )
UnitMods unitMod = ranged ? UNIT_MOD_ATTACK_POWER_RANGED : UNIT_MOD_ATTACK_POWER;
- uint16 index = UNIT_FIELD_ATTACK_POWER;
- uint16 index_mod = UNIT_FIELD_ATTACK_POWER_MODS;
diff --git a/config/config.php b/config/config.php
index 885e782..04dd7f4 100644
--- a/config/config.php
+++ b/config/config.php
@@ -12,25 +12,25 @@ $k_userdb = 'root';
$k_pw = '12345';
$k_db = 'acp';
-//realmd
+// realmd/auth
#!/bin/bash
###############################################################################
# configuration
home="/home/mangos"
mangosConf=$home"/etc/mangosd.conf"
scriptConf=$home"/etc/scriptdev2.conf"
mangosSource=$home"/Mangos-Sources/mangos"
sd2Source=$home"/Mangos-Sources/mangos/src/bindings/scriptdev2"
YTDBSource=$home"/Mangos-Sources/YTDB"
#
diff --git a/src/game/Chat.cpp b/src/game/Chat.cpp
index 1489fd5..08ae7e3 100644
--- a/src/game/Chat.cpp
+++ b/src/game/Chat.cpp
@@ -609,6 +609,7 @@ ChatCommand * ChatHandler::getCommandTable()
{ "spell_disabled", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadSpellDisabledCommand, "", NULL },
{ "spell_linked", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadSpellLinkedCommand, "", NULL },
{ "anticheat", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadAntiCheatCommand, "", NULL },
+ { "item_template", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadItemTemplateCommand, "", NULL },
diff --git a/sql/updates/fc_updates_characters/fake_items.sql b/sql/updates/fc_updates_characters/fake_items.sql
new file mode 100644
index 0000000..3618ac1
--- /dev/null
+++ b/sql/updates/fc_updates_characters/fake_items.sql
@@ -0,0 +1,11 @@
+DROP TABLE IF EXISTS `fake_items`;
+CREATE TABLE `fake_items` (
+ `guid` int(11) NOT NULL,
+ `fakeEntry` int(11) NOT NULL,
#!/bin/bash
home="/home/mangos"
mangosConf=$home"/etc/mangosd.conf"
scriptConf=$home"etc/scriptdev2.conf"
backup=$home"/backup"
#
###############################################################################
# functions
function db_config_extract()