Skip to content

Instantly share code, notes, and snippets.

"""
:: File Name:
wow_script_functions.py
:: Author:
Jadd - https://ntoskr.nl/
:: Target:
World of Warcraft x64 - Retail Client 8.0+
World of Warcraft x64 - Classic Client 1.13+
@Emtec
Emtec / nginx-tuning.md
Created February 4, 2020 22:56 — forked from denji/nginx-tuning.md
NGINX tuning for best performance

Moved to git repository: https://github.com/denji/nginx-tuning

NGINX Tuning For Best Performance

For this configuration you can use web server you like, i decided, because i work mostly with it to use nginx.

Generally, properly configured nginx can handle up to 400K to 500K requests per second (clustered), most what i saw is 50K to 80K (non-clustered) requests per second and 30% CPU load, course, this was 2 x Intel Xeon with HyperThreading enabled, but it can work without problem on slower machines.

You must understand that this config is used in testing environment and not in production so you will need to find a way to implement most of those features best possible for your servers.

template<>
bool RandomMovementGenerator<Creature>::GeneratePosition(Creature* creature, float& x, float& y, float& z)
{
float respX, respY, respZ, destX, destY, destZ, travelDistZ;
creature->GetCreatureMovementPath().GetCurrentPath()->position.GetPosition(respX, respY, respZ);
Map const* map = creature->GetBaseMap();
// For 2D/3D system selection
//bool is_land_ok = creature.CanWalk(); // not used?
/*
* Copyright (C) 20011-2015 ACore3 <http://www.atlantiss.eu/>
*
* 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
#include "IndexedStructureMap.h"
#include <boost/thread/locks.hpp>
#include <boost/thread/shared_mutex.hpp>
// ---------------------------------------------------------------------------------
// IndexedMapObject
// ---------------------------------------------------------------------------------
IndexedMapObject::IndexedMapObject()
{
diff --git a/src/game/Player.cpp b/src/game/Player.cpp
index 9bc810f..5240e3d 100644
--- a/src/game/Player.cpp
+++ b/src/game/Player.cpp
@@ -4310,6 +4310,11 @@ void Player::DeleteFromDB(ObjectGuid playerguid, uint32 accountId, bool updateRe
// Get guids of character's pets, will deleted in transaction
QueryResult *resultPets = CharacterDatabase.PQuery("SELECT id FROM character_pet WHERE owner = '%u'", lowguid);
+
+ // delete char from friends list when selected chars is online (non existing - error)
diff --git a/src/shared/Database/DatabaseMysql.cpp b/src/shared/Database/DatabaseMysql.cpp
index 2b555d8..ca5a1f8 100644
--- a/src/shared/Database/DatabaseMysql.cpp
+++ b/src/shared/Database/DatabaseMysql.cpp
@@ -279,6 +279,7 @@ bool DatabaseMysql::Execute(const char *sql)
// don't use queued execution if it has not been initialized
if (!m_threadBody) return DirectExecute(sql);
+ nMutex.acquire();
tranThread = ACE_Based::Thread::current(); // owner of this transaction
diff --git a/sql/updates/10205_a_mangos_mail_template.sql b/sql/updates/10205_a_mangos_mail_template.sql
new file mode 100644
index 0000000..06f302e
--- /dev/null
+++ b/sql/updates/10205_a_mangos_mail_template.sql
@@ -0,0 +1,16 @@
+CREATE TABLE IF NOT EXISTS `mail_template` (
+ `id` mediumint(8) NOT NULL,
+ `title` text character set utf8 NOT NULL,
+ `text` text character set utf8 NOT NULL,
diff --git a/sql/v01_vehicle_data.sql b/sql/v01_vehicle_data.sql
new file mode 100644
index 0000000..74dc665
--- /dev/null
+++ b/sql/v01_vehicle_data.sql
@@ -0,0 +1,21 @@
+--
+-- Table structure for table `vehicle_data`
+--
+
diff --git a/sql/mangos.sql b/sql/mangos.sql
index c26a0d2..15ad515 100644
--- a/sql/mangos.sql
+++ b/sql/mangos.sql
@@ -2920,7 +2920,7 @@ INSERT INTO `mangos_string` VALUES
(9,'Commands available to you:',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(10,'Incorrect syntax.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(11,'Your account level is: %i',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
-(12,'Online players: %u (max: %u) Queued players: %u (max: %u)',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
+(12,'Online players: %u (max: %u) Queued players: %u (max: %u) Player Limit: %u',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),