diff --git a/.gitignore b/.gitignore
index 52dbcb224..805c783a4 100644
--- a/.gitignore
+++ b/.gitignore
@@ -33,5 +33,7 @@ Build_32/
build_32/
Build_64/
build_64/
+x64/
+x86/
log/
logs/
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 95f21acee..ce1a3bc9b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -13,12 +13,6 @@
#EQEMU_LOG_LEVEL_QUEST
#EQEMU_LOG_LEVEL_COMMANDS
#EQEMU_LOG_LEVEL_CRASH
-#EQEMU_STREAM_SEND_RATE
-#EQEMU_STREAM_DECAY_RATE
-#EQEMU_STREAM_RETRANSMIT_TIMEOUT_MUL
-#EQEMU_STREAM_RETRANSMIT_TIMEOUT_MAX
-#EQEMU_STREAM_AVERAGE_DELTA_MAX
-#EQEMU_STREAM_RETRANSMIT_ACKED_PACKETS
#EQEMU_DEPOP_INVALIDATES_CACHE
#EQEMU_ENABLE_BOTS
#EQEMU_DISABLE_LOGSYS
@@ -78,7 +72,7 @@ IF(MSVC)
SET(MYSQL_ROOT "${CMAKE_CURRENT_SOURCE_DIR}/dependencies/mysql_x86")
SET(LUA_ROOT "${CMAKE_CURRENT_SOURCE_DIR}/dependencies/luaj_x86")
SET(SODIUM_INCLUDE_HINTS "${CMAKE_CURRENT_SOURCE_DIR}/dependencies/libsodium/include")
- SET(OPENSSL_ROOT_DIR "${CMAKE_CURRENT_SOURCE_DIR}/dependencies/openssl_x64")
+ SET(OPENSSL_ROOT_DIR "${CMAKE_CURRENT_SOURCE_DIR}/dependencies/openssl_x86")
IF(MSVC_VERSION GREATER 1800)
SET(SODIUM_LIBRARY_HINTS "${CMAKE_CURRENT_SOURCE_DIR}/dependencies/libsodium/Win32/Release/v140/dynamic")
ELSEIF(MSVC_VERSION EQUAL 1800)
@@ -237,14 +231,6 @@ SET(EQEMU_LOG_LEVEL_CRASH 3 CACHE STRING "EQEmu logging level for [Crash]:
MARK_AS_ADVANCED(EQEMU_LOG_LEVEL_STATUS EQEMU_LOG_LEVEL_NORMAL EQEMU_LOG_LEVEL_ERROR EQEMU_LOG_LEVEL_DEBUG EQEMU_LOG_LEVEL_QUEST EQEMU_LOG_LEVEL_COMMANDS EQEMU_LOG_LEVEL_CRASH)
-SET(EQEMU_STREAM_SEND_RATE 1048576 CACHE STRING "Advanced: Base amount of data stream can send before throttle.")
-SET(EQEMU_STREAM_DECAY_RATE 78642 CACHE STRING "Advanced: Base amount of data stream recovers per tic.")
-SET(EQEMU_STREAM_RETRANSMIT_TIMEOUT_MUL 3.0 CACHE STRING "Advanced: Multiplier on retransmit timeout.")
-SET(EQEMU_STREAM_RETRANSMIT_TIMEOUT_MAX 5000 CACHE STRING "Advanced: Max in ms for retransmit timeout timer.")
-SET(EQEMU_STREAM_AVERAGE_DELTA_MAX 2500 CACHE STRING "Advanced: The maximum average delta in ms allowed.")
-SET(EQEMU_STREAM_RETRANSMIT_ACKED_PACKETS TRUE CACHE BOOL "Advanced: Whether or not acked packets can be retransmitted")
-MARK_AS_ADVANCED(EQEMU_STREAM_SEND_RATE EQEMU_STREAM_DECAY_RATE EQEMU_STREAM_RETRANSMIT_TIMEOUT_MUL EQEMU_STREAM_RETRANSMIT_TIMEOUT_MAX EQEMU_STREAM_AVERAGE_DELTA_MAX EQEMU_STREAM_RETRANSMIT_ACKED_PACKETS)
-
#NPC Types Cache Behavior
OPTION(EQEMU_DEPOP_INVALIDATES_CACHE "#repop invalidates the npc_types cache (will cause a larger database hit on #repop but is more convienent)." ON)
@@ -306,11 +292,6 @@ ADD_DEFINITIONS(-DEQDEBUG=${EQEMU_DEBUG_LEVEL})
ADD_DEFINITIONS(-DINVERSEXY)
ADD_DEFINITIONS(-DFIELD_ITEMS)
ADD_DEFINITIONS(-DMAP_DIR="${EQEMU_MAP_DIR}")
-ADD_DEFINITIONS(-DRATEBASE=${EQEMU_STREAM_SEND_RATE})
-ADD_DEFINITIONS(-DDECAYBASE=${EQEMU_STREAM_DECAY_RATE})
-ADD_DEFINITIONS(-DRETRANSMIT_TIMEOUT_MULT=${EQEMU_STREAM_RETRANSMIT_TIMEOUT_MUL})
-ADD_DEFINITIONS(-DRETRANSMIT_TIMEOUT_MAX=${EQEMU_STREAM_RETRANSMIT_TIMEOUT_MAX})
-ADD_DEFINITIONS(-DAVERAGE_DELTA_MAX=${EQEMU_STREAM_AVERAGE_DELTA_MAX})
ADD_DEFINITIONS(-DLOG_LEVEL_STATUS=${EQEMU_LOG_LEVEL_STATUS})
ADD_DEFINITIONS(-DLOG_LEVEL_NORMAL=${EQEMU_LOG_LEVEL_NORMAL})
ADD_DEFINITIONS(-DLOG_LEVEL_ERROR=${EQEMU_LOG_LEVEL_ERROR})
@@ -320,12 +301,6 @@ ADD_DEFINITIONS(-DLOG_LEVEL_COMMANDS=${EQEMU_LOG_LEVEL_COMMANDS})
ADD_DEFINITIONS(-DLOG_LEVEL_CRASH=${EQEMU_LOG_LEVEL_CRASH})
ADD_DEFINITIONS(-DGLM_FORCE_RADIANS)
-IF(EQEMU_STREAM_RETRANSMIT_ACKED_PACKETS)
- ADD_DEFINITIONS(-DRETRANSMIT_ACKED_PACKETS=true)
-ELSE(EQEMU_STREAM_RETRANSMIT_ACKED_PACKETS)
- ADD_DEFINITIONS(-DRETRANSMIT_ACKED_PACKETS=false)
-ENDIF(EQEMU_STREAM_RETRANSMIT_ACKED_PACKETS)
-
#Find everything we need
FIND_PACKAGE(ZLIB REQUIRED)
FIND_PACKAGE(MySQL REQUIRED)
diff --git a/README.md b/README.md
index 057937a0c..f99b17975 100644
--- a/README.md
+++ b/README.md
@@ -8,7 +8,7 @@
**EQEmulator is a custom completely from-scratch open source server implementation for EverQuest built mostly on C++**
* MySQL/MariaDB is used as the database engine (over 200+ tables)
* Perl and LUA are both supported scripting languages for NPC/Player/Quest oriented events
- * Open source database (Project EQ) has content up to expansion GoD (included in server installs)
+ * Open source database (Project EQ) has content up to expansion OoW (included in server installs)
* Game server environments and databases can be heavily customized to create all new experiences
* Hundreds of Quests/events created and maintained by Project EQ
@@ -20,14 +20,14 @@
* [Easy Install](http://wiki.eqemulator.org/p?Akkas_PEQ_Server_Installer&frm=Main#from-scratch-installation-instructions-windows)
* [Advanced Setup](http://wiki.eqemulator.org/p?Complete_Windows-based_Server_Setup_Guide)
-### > Debian/Ubuntu
+
+
+### > Debian/Ubuntu/CentOS/Fedora
+* You can use curl or wget to kick off the installer (whichever your OS has)
+> curl -O https://raw.githubusercontent.com/EQEmu/Server/master/utils/scripts/linux_installer/install.sh install.sh && chmod 755 install.sh && ./install.sh
> wget --no-check-certificate https://raw.githubusercontent.com/EQEmu/Server/master/utils/scripts/linux_installer/install.sh -O install.sh && chmod 755 install.sh && ./install.sh
-### > CentOS/Fedora
-
-> curl -O https://raw.githubusercontent.com/EQEmu/Server/master/utils/scripts/linux_installer/install.sh install.sh && chmod 755 install.sh && ./install.sh
-
## Supported Clients
|Titanium Edition|Secrets of Faydwer|Seeds of Destruction|Underfoot|Rain of Fear|
diff --git a/changelog.txt b/changelog.txt
index 8edf925b0..9568f8392 100644
--- a/changelog.txt
+++ b/changelog.txt
@@ -1,25 +1,71 @@
EQEMu Changelog (Started on Sept 24, 2003 15:50)
-------------------------------------------------------
+
+== 7/14/2017 ==
+Akkadius: HP Update tuning - HP Updates are now forced when a client is targeted
+Akkadius: Client position updates should be smoother (granted the client has a good connection)
+ - Clients should also no longer randomly disappear
+
+== 7/11/2017 ==
+Akkadius: Raid/Group/XTarget HP/Mana/Endurance updates now only send when percentage changes
+Akkadius: Raid/Group Mana/Endurance updates should now update real-time once again
+Akkadius: Fixed an issue with clients looking like they are 'skipping' when they are moving in view of another client
+Akkadius: Fixed an issue with NPC's who are ghosted in plain view of a client when they are not really there
+
+== 7/9/2017 ==
+Akkadius: Fix HP update issues, rework logic for more accurate HP updates
+Akkadius: Massive reductions in unnecessary network traffic especially during high spam combat fights
+ - HP Updates now only send to others when HP percentage changes (0-100%)
+ - HP Updates were sending excessively even during idle zones when HP wasn't changing at all
+ - Attack animations now only send once per second versus up to a hundred times a second per Mob/Client
+ - 17,000 OP_ClientUpdate packets per second have been observed in combat scenarios, some of the major culprits have been
+ throttled without affecting what the client should see
+ - Before and After packet differences under similar load/tests (Packets per second)
+ - 7,000 - 8,000 OP_Animation pps After: 600-800 pps
+ - 13,0000 - 17,000 OP_MobHealth pps After: 1-10 pps
+ - 15,0000 - 20,000 OP_ClientUpdate pps After: 500-1,000 pps
+ - Packet reports from a 46 client test here:
+ https://gist.github.com/Akkadius/28b7ad2fdd82bdd15ea737c68f404346
+ - Servers who use Marquee HP updates will also recieve far less packet spam as they will only be sent when HP changes
+
+== 7/1/2017 ==
+Akkadius: Resolve issues with NPC's hopping to the ceiling in small corridors
+Akkadius: Improved grounding issues with NPC's during combat
+Akkadius: Improved scenarios where NPC's need to be dragged out of the ground - they should correct themselves far more consistently
+ - Scenarios where an NPC is coming up from the bottom floor, or from the top floor, they will correct much better
+ - A video of these tests can be found here: https://www.youtube.com/watch?v=HtC7bVNM7ZQ&feature=youtu.be
+
+== 6/28/2017 ==
+Akkadius: Fixed issues with Z correctness when NPCs are pathing on normal grids
+Akkadius: Fixed issues with Z correctness when NPCs are engaged with players following
+Akkadius: NPC corpses should fall into the ground far less
+
+== 6/25/2017 ==
+Akkadius: New rules made by developers are now automatically created when world boots up, this keeps
+ from having to issue schema SQL updates every time rules are added.
+ - Whenever a rule isn't present in the database, it will be automatically created
+Akkadius: Sped up saylink retrieval x1000 helpful for dialogues, plugins with many saylinks
+
== 4/16/2017 ==
KLS: Merge eqstream branch
- -UDP client stack completely rewritten should both have better throughput and recover better (peq has had far fewer reports of desyncs).
- -TCP Server to Server connection stack completely rewritten.
- -Server connections reconnect much more reliably and quickly now.
- -Now supports optional packet encryption via libsodium (https://download.libsodium.org/doc/).
- -Protocol behind the tcp connections has changed (see breaking changes section).
- -API significantly changed and should be easier to write new servers or handlers for.
- -Telnet console connection has been separated out from the current port (see breaking changes section).
- -Because of changes to the TCP stack, lsreconnect and echo have been disabled.
- -The server tic rate has been changed to be approx 30 fps from 500+ fps.
- -Changed how missiles and movement were calculated slightly to account for this (Missiles in particular are not perfect but close enough).
+ - UDP client stack completely rewritten should both have better throughput and recover better (peq has had far fewer reports of desyncs).
+ - TCP Server to Server connection stack completely rewritten.
+ - Server connections reconnect much more reliably and quickly now.
+ - Now supports optional packet encryption via libsodium (https://download.libsodium.org/doc/).
+ - Protocol behind the tcp connections has changed (see breaking changes section).
+ - API significantly changed and should be easier to write new servers or handlers for.
+ - Telnet console connection has been separated out from the current port (see breaking changes section).
+ - Because of changes to the TCP stack, lsreconnect and echo have been disabled.
+ - The server tic rate has been changed to be approx 30 fps from 500+ fps.
+ - Changed how missiles and movement were calculated slightly to account for this (Missiles in particular are not perfect but close enough).
- -Breaking changes:
- -Users who use the cmake install feature should be aware that the install directory is now %cmake_install_dir%/bin instead of just %cmake_install_dir%/
- -To support new features such as encryption the underlying protocol had to change... however some servers such as the public login server will be slow to change so we've included a compatibility layer for legacy login connections:
- -You should add 1 to the login section of your configuration file when connecting to a server that is using the old protocol.
- -The central eqemu login server uses the old protocol and probably will for the forseeable future so if your server is connecting to it be sure to add that tag to your configuration file in that section.
- -Telnet no longer uses the same port as the Server to Server connection and because of this the tcp tag no longer has any effect on telnet connections.
- -To enable telnet you need to add a telnet tag in the world section of configuration such as:
+ - Breaking changes:
+ - Users who use the cmake install feature should be aware that the install directory is now %cmake_install_dir%/bin instead of just %cmake_install_dir%/
+ - To support new features such as encryption the underlying protocol had to change... however some servers such as the public login server will be slow to change so we've included a compatibility layer for legacy login connections:
+ - You should add 1 to the login section of your configuration file when connecting to a server that is using the old protocol.
+ - The central eqemu login server uses the old protocol and probably will for the forseeable future so if your server is connecting to it be sure to add that tag to your configuration file in that section.
+ - Telnet no longer uses the same port as the Server to Server connection and because of this the tcp tag no longer has any effect on telnet connections.
+ - To enable telnet you need to add a telnet tag in the world section of configuration such as:
== 4/1/2017 ==
diff --git a/common/CMakeLists.txt b/common/CMakeLists.txt
index 06486d2db..d65efd183 100644
--- a/common/CMakeLists.txt
+++ b/common/CMakeLists.txt
@@ -103,6 +103,7 @@ SET(common_sources
tinyxml/tinyxml.cpp
tinyxml/tinyxmlerror.cpp
tinyxml/tinyxmlparser.cpp
+ util/directory.cpp
util/uuid.cpp
)
@@ -257,6 +258,7 @@ SET(common_headers
tinyxml/tinystr.h
tinyxml/tinyxml.h
util/memory_stream.h
+ util/directory.h
util/uuid.h
)
@@ -366,6 +368,8 @@ SOURCE_GROUP(TinyXML FILES
SOURCE_GROUP(Util FILES
util/memory_stream.h
+ util/directory.cpp
+ util/directory.h
util/uuid.cpp
util/uuid.h
)
diff --git a/common/emu_oplist.h b/common/emu_oplist.h
index cf6f4ca28..29a20cb14 100644
--- a/common/emu_oplist.h
+++ b/common/emu_oplist.h
@@ -355,6 +355,7 @@ N(OP_OpenTributeMaster),
N(OP_PDeletePetition),
N(OP_PetBuffWindow),
N(OP_PetCommands),
+N(OP_PetCommandState),
N(OP_PetHoTT),
N(OP_Petition),
N(OP_PetitionBug),
@@ -407,6 +408,7 @@ N(OP_ReloadUI),
N(OP_RemoveAllDoors),
N(OP_RemoveBlockedBuffs),
N(OP_RemoveNimbusEffect),
+N(OP_RemoveTrap),
N(OP_Report),
N(OP_ReqClientSpawn),
N(OP_ReqNewZone),
@@ -522,6 +524,7 @@ N(OP_TributeToggle),
N(OP_TributeUpdate),
N(OP_Untargetable),
N(OP_UpdateAA),
+N(OP_UpdateAura),
N(OP_UpdateLeadershipAA),
N(OP_VetClaimReply),
N(OP_VetClaimRequest),
diff --git a/common/eq_constants.h b/common/eq_constants.h
index b4e887b0a..d20bfdf4a 100644
--- a/common/eq_constants.h
+++ b/common/eq_constants.h
@@ -27,7 +27,7 @@
//SpawnAppearance types: (compared two clients for server-originating types: SoF & RoF2)
#define AT_Die 0 // this causes the client to keel over and zone to bind point (default action)
#define AT_WhoLevel 1 // the level that shows up on /who
-//#define AT_2 2 // unknown
+#define AT_HPMax 2 // idk
#define AT_Invis 3 // 0 = visible, 1 = invisible
#define AT_PVP 4 // 0 = blue, 1 = pvp (red)
#define AT_Light 5 // light type emitted by player (lightstone, shiny shield)
@@ -36,33 +36,37 @@
#define AT_SpawnID 16 // server to client, sets player spawn id
#define AT_HP 17 // Client->Server, my HP has changed (like regen tic)
#define AT_Linkdead 18 // 0 = normal, 1 = linkdead
-#define AT_Levitate 19 // 0=off, 1=flymode, 2=levitate
+#define AT_Levitate 19 // 0=off, 1=flymode, 2=levitate max 5, see GravityBehavior enum
#define AT_GM 20 // 0 = normal, 1 = GM - all odd numbers seem to make it GM
#define AT_Anon 21 // 0 = normal, 1 = anon, 2 = roleplay
#define AT_GuildID 22
#define AT_GuildRank 23 // 0=member, 1=officer, 2=leader
#define AT_AFK 24 // 0 = normal, 1 = afk
#define AT_Pet 25 // Param is EntityID of owner, or 0 for when charm breaks
-//#define AT_27 27 // unknown
+#define AT_Summoned 27 // Unsure
#define AT_Split 28 // 0 = normal, 1 = autosplit on (not showing in SoF+) (client-to-server only)
#define AT_Size 29 // spawn's size (present: SoF, absent: RoF2)
-//#define AT_30 30 // unknown
-#define AT_NPCName 31 // change PC's name's color to NPC color 0 = normal, 1 = npc name
-//#define AT_32 32 // unknown
-//#define AT_33 33 // unknown
+#define AT_SetType 30 // 0 = PC, 1 = NPC, 2 <= = corpse
+#define AT_NPCName 31 // change PC's name's color to NPC color 0 = normal, 1 = npc name, Trader on RoF2?
+#define AT_AARank 32 // AA Rank Title ID thingy, does is this the title in /who?
+#define AT_CancelSneakHide 33 // Turns off Hide and Sneak
//#define AT_34 34 // unknown (present: SoF, absent: RoF2)
-//#define AT_35 35 // unknown
-//#define AT_36 36 // unknown
-//#define AT_37 37 // unknown
-//#define AT_38 38 // unknown
-//#define AT_39 39 // unknown
+#define AT_AreaHPRegen 35 // guild hall regen pool sets to value * 0.001
+#define AT_AreaManaRegen 36 // guild hall regen pool sets to value * 0.001
+#define AT_AreaEndRegen 37 // guild hall regen pool sets to value * 0.001
+#define AT_FreezeBuffs 38 // Freezes beneficial buff timers
+#define AT_NpcTintIndex 39 // not 100% sure
+#define AT_GroupConsent 40 // auto consent group
+#define AT_RaidConsent 41 // auto consent raid
+#define AT_GuildConsent 42 // auto consent guild
#define AT_ShowHelm 43 // 0 = hide graphic, 1 = show graphic
-#define AT_DamageState 44 // The damage state of a destructible object (0 through 4)
-//#define AT_46 46 // unknown
-//#define AT_48 48 // unknown
-//#define AT_49 49 // unknown
-//#define AT_52 52 // (absent: SoF, present: RoF2) (not a replacement for RoF absent 29 or 34)
-//#define AT_53 53 // (absent: SoF, present: RoF2) (not a replacement for RoF absent 29 or 34)
+#define AT_DamageState 44 // The damage state of a destructible object (0 through 10) plays soundids most only have 2 or 4 states though
+#define AT_EQPlayers 45 // /eqplayersupdate
+#define AT_FindBits 46 // set FindBits, whatever those are!
+#define AT_TextureType 48 // TextureType
+#define AT_FacePick 49 // Turns off face pick window? maybe ...
+#define AT_GuildShow 52 // this is what MQ2 call sit, not sure
+#define AT_Offline 53 // Offline mode
//#define AT_Trader 300 // Bazaar Trader Mode (not present in SoF or RoF2)
diff --git a/common/eq_packet_structs.h b/common/eq_packet_structs.h
index 3730e1d14..79b8f7250 100644
--- a/common/eq_packet_structs.h
+++ b/common/eq_packet_structs.h
@@ -305,6 +305,7 @@ union
uint8 DestructibleUnk8;
uint32 DestructibleUnk9;
bool targetable_with_hotkey;
+ bool show_name;
};
@@ -1116,6 +1117,11 @@ struct PetCommand_Struct {
/*004*/ uint32 target;
};
+struct PetCommandState_Struct {
+/*00*/ uint32 button_id;
+/*04*/ uint32 state;
+};
+
/*
** Delete Spawn
** Length: 4 Bytes
@@ -1690,6 +1696,7 @@ struct OnLevelMessage_Struct
uint32 Duration;
uint32 PopupID;
uint32 NegativeID;
+ uint32 SoundControls;
char ButtonName0[25];
char ButtonName1[25];
};
@@ -5326,6 +5333,24 @@ struct fling_struct {
/* 28 */
};
+// used when action == 0
+struct AuraCreate_Struct {
+/* 00 */ uint32 action; // 0 = add, 1 = delete, 2 = reset
+/* 04 */ uint32 type; // unsure -- normal auras show 1 clicky (ex. Circle of Power) show 0
+/* 08 */ char aura_name[64];
+/* 72 */ uint32 entity_id;
+/* 76 */ uint32 icon;
+/* 80 */
+};
+
+// used when action == 1
+struct AuraDestory_Struct {
+/* 00 */ uint32 action; // 0 = add, 1 = delete, 2 = reset
+/* 04 */ uint32 entity_id;
+/* 08 */
+};
+// I think we can assume it's just action for 2, client doesn't seem to do anything with the rest of the data in that case
+
// Restore structure packing to default
#pragma pack()
diff --git a/common/eq_stream_proxy.cpp b/common/eq_stream_proxy.cpp
index 7fb4c9432..6a3cc6ced 100644
--- a/common/eq_stream_proxy.cpp
+++ b/common/eq_stream_proxy.cpp
@@ -2,6 +2,8 @@
#include "global_define.h"
#include "eq_stream_proxy.h"
#include "struct_strategy.h"
+#include "eqemu_logsys.h"
+#include "opcodemgr.h"
EQStreamProxy::EQStreamProxy(std::shared_ptr &stream, const StructStrategy *structs, OpcodeManager **opcodes)
@@ -39,6 +41,11 @@ void EQStreamProxy::QueuePacket(const EQApplicationPacket *p, bool ack_req) {
if(p == nullptr)
return;
+ if (p->GetOpcode() != OP_SpecialMesg) {
+ Log(Logs::General, Logs::Server_Client_Packet, "[%s - 0x%04x] [Size: %u]", OpcodeManager::EmuToName(p->GetOpcode()), p->GetOpcode(), p->Size());
+ Log(Logs::General, Logs::Server_Client_Packet_With_Dump, "[%s - 0x%04x] [Size: %u] %s", OpcodeManager::EmuToName(p->GetOpcode()), p->GetOpcode(), p->Size(), DumpPacketToString(p).c_str());
+ }
+
EQApplicationPacket *newp = p->Copy();
FastQueuePacket(&newp, ack_req);
}
diff --git a/common/eqemu_logsys.h b/common/eqemu_logsys.h
index ed821831a..56542c07d 100644
--- a/common/eqemu_logsys.h
+++ b/common/eqemu_logsys.h
@@ -86,6 +86,8 @@ enum LogCategory {
Login_Server,
Client_Login,
Headless_Client,
+ HP_Update,
+ FixZ,
MaxCategoryID /* Don't Remove this*/
};
@@ -135,7 +137,10 @@ static const char* LogCategoryName[LogCategory::MaxCategoryID] = {
"Packet :: Server -> Client (Dump)",
"Packet :: Client -> Server (Dump)",
"Login Server",
- "Client Login"
+ "Client Login",
+ "Headless Client",
+ "HP Update",
+ "FixZ"
};
}
diff --git a/common/item_data.h b/common/item_data.h
index e5d1a24f2..ae7e3bbdb 100644
--- a/common/item_data.h
+++ b/common/item_data.h
@@ -332,7 +332,7 @@ namespace EQEmu
};
struct ItemEffect_Struct {
- int16 Effect;
+ int32 Effect;
uint8 Type;
uint8 Level;
uint8 Level2;
diff --git a/common/net/console_server.cpp b/common/net/console_server.cpp
index d8f08b05d..ab420bd42 100644
--- a/common/net/console_server.cpp
+++ b/common/net/console_server.cpp
@@ -25,6 +25,23 @@ void EQ::Net::ConsoleServer::RegisterLogin(ConsoleServerLoginCallback fn)
m_login = fn;
}
+EQ::Net::ConsoleServerConnection *EQ::Net::ConsoleServer::FindByAccountName(const std::string &acct_name) {
+ for (auto &iter : m_connections) {
+ if (iter.second->UserName().compare(acct_name) == 0) {
+ return iter.second.get();
+ }
+ }
+
+ return nullptr;
+}
+
+
+void EQ::Net::ConsoleServer::SendChannelMessage(const ServerChannelMessage_Struct* scm, std::function onTell) {
+ for (auto &iter : m_connections) {
+ iter.second->SendChannelMessage(scm, onTell);
+ }
+}
+
void EQ::Net::ConsoleServer::ConnectionDisconnected(ConsoleServerConnection *c)
{
auto iter = m_connections.find(c->GetUUID());
diff --git a/common/net/console_server.h b/common/net/console_server.h
index 5a0c48f8e..d28f43844 100644
--- a/common/net/console_server.h
+++ b/common/net/console_server.h
@@ -25,7 +25,8 @@ namespace EQ
void RegisterCall(const std::string& command, int status_required, const std::string& help_definition, ConsoleServerCallback fn);
void RegisterLogin(ConsoleServerLoginCallback fn);
-
+ ConsoleServerConnection *FindByAccountName(const std::string &acct_name);
+ void SendChannelMessage(const ServerChannelMessage_Struct* scm, std::function onTell);
private:
void ConnectionDisconnected(ConsoleServerConnection *c);
void ProcessCommand(ConsoleServerConnection *c, const std::string& cmd);
diff --git a/common/net/console_server_connection.cpp b/common/net/console_server_connection.cpp
index 8764f09b6..249817818 100644
--- a/common/net/console_server_connection.cpp
+++ b/common/net/console_server_connection.cpp
@@ -2,6 +2,8 @@
#include "../common/util/uuid.h"
#include "../common/net/packet.h"
#include "../common/eqemu_logsys.h"
+#include "../common/servertalk.h"
+#include "../common/rulesys.h"
EQ::Net::ConsoleServerConnection::ConsoleServerConnection(ConsoleServer *parent, std::shared_ptr connection)
{
@@ -107,6 +109,53 @@ void EQ::Net::ConsoleServerConnection::QueueMessage(const std::string &msg)
}
}
+bool EQ::Net::ConsoleServerConnection::SendChannelMessage(const ServerChannelMessage_Struct* scm, std::function onTell) {
+ if (!m_accept_messages) {
+ return false;
+ }
+
+ switch (scm->chan_num) {
+ if (RuleB(Chat, ServerWideAuction)) {
+ case 4: {
+ QueueMessage(fmt::format("{0} auctions, '{1}'", scm->from, scm->message));
+ break;
+ }
+ }
+
+ if (RuleB(Chat, ServerWideOOC)) {
+ case 5: {
+ QueueMessage(fmt::format("{0} says ooc, '{1}'", scm->from, scm->message));
+ break;
+ }
+ }
+
+ case 6: {
+ QueueMessage(fmt::format("{0} BROADCASTS, '{1}'", scm->from, scm->message));
+ break;
+ }
+
+ case 7: {
+ QueueMessage(fmt::format("[{0}] tells you, '{1}'", scm->from, scm->message));
+ if (onTell) {
+ onTell();
+ }
+
+ break;
+ }
+
+ case 11: {
+ QueueMessage(fmt::format("{0} GMSAYS, '{1}'", scm->from, scm->message));
+ break;
+ }
+
+ default: {
+ return false;
+ }
+ }
+
+ return true;
+}
+
void EQ::Net::ConsoleServerConnection::OnRead(TCPConnection *c, const unsigned char *data, size_t sz)
{
for (size_t i = 0; i < sz; ++i) {
diff --git a/common/net/console_server_connection.h b/common/net/console_server_connection.h
index d826ba07b..a49700841 100644
--- a/common/net/console_server_connection.h
+++ b/common/net/console_server_connection.h
@@ -4,6 +4,8 @@
#include
#include