mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-13 18:51:29 +00:00
[C++20] Enable C++20 + Fixes + FMT 9.1 (#2664)
* [CPP] Enable and build compliance with cpp20 * Windows build fix * bump fmt version * Updated fmt to 9.1, updated cmake minimum and verified preprocessor stuff works. * Missing : * Fix warning: top-level comma expression in array subscript is deprecated * Fix warning: top-level comma expression in array subscript is deprecated Co-authored-by: KimLS <KimLS@peqtgc.com>
This commit is contained in:
parent
db12c069ef
commit
c236c57a2c
@ -1,4 +1,4 @@
|
|||||||
CMAKE_MINIMUM_REQUIRED(VERSION 3.7)
|
CMAKE_MINIMUM_REQUIRED(VERSION 3.12)
|
||||||
|
|
||||||
SET(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/" ${CMAKE_MODULE_PATH})
|
SET(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/" ${CMAKE_MODULE_PATH})
|
||||||
|
|
||||||
@ -12,7 +12,7 @@ IF(NOT CMAKE_BUILD_TYPE)
|
|||||||
SET(CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING "Choose the type of build." FORCE)
|
SET(CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING "Choose the type of build." FORCE)
|
||||||
ENDIF(NOT CMAKE_BUILD_TYPE)
|
ENDIF(NOT CMAKE_BUILD_TYPE)
|
||||||
|
|
||||||
SET(CMAKE_CXX_STANDARD 17)
|
SET(CMAKE_CXX_STANDARD 20)
|
||||||
SET(CMAKE_CXX_STANDARD_REQUIRED ON)
|
SET(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||||
SET(CMAKE_CXX_EXTENSIONS OFF)
|
SET(CMAKE_CXX_EXTENSIONS OFF)
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
CMAKE_MINIMUM_REQUIRED(VERSION 3.2)
|
CMAKE_MINIMUM_REQUIRED(VERSION 3.12)
|
||||||
|
|
||||||
SET(export_sources
|
SET(export_sources
|
||||||
main.cpp
|
main.cpp
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
CMAKE_MINIMUM_REQUIRED(VERSION 3.2)
|
CMAKE_MINIMUM_REQUIRED(VERSION 3.12)
|
||||||
|
|
||||||
SET(import_sources
|
SET(import_sources
|
||||||
main.cpp
|
main.cpp
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
CMAKE_MINIMUM_REQUIRED(VERSION 3.2)
|
CMAKE_MINIMUM_REQUIRED(VERSION 3.12)
|
||||||
|
|
||||||
SET(common_sources
|
SET(common_sources
|
||||||
base_packet.cpp
|
base_packet.cpp
|
||||||
|
|||||||
@ -71,13 +71,13 @@ namespace EQ
|
|||||||
|
|
||||||
template<typename T>
|
template<typename T>
|
||||||
void Write(T val) {
|
void Write(T val) {
|
||||||
static_assert(std::is_pod<T>::value, "MemoryBuffer::Write<T>(T val) only works on pod and string types.");
|
static_assert(std::is_standard_layout<T>::value, "MemoryBuffer::Write<T>(T val) only works on pod and string types.");
|
||||||
Write((const char*)&val, sizeof(T));
|
Write((const char*)&val, sizeof(T));
|
||||||
}
|
}
|
||||||
|
|
||||||
template<typename T>
|
template<typename T>
|
||||||
T Read() {
|
T Read() {
|
||||||
static_assert(std::is_pod<T>::value, "MemoryBuffer::Read<T>() only works on pod and string types.");
|
static_assert(std::is_standard_layout<T>::value, "MemoryBuffer::Read<T>() only works on pod and string types.");
|
||||||
T temp;
|
T temp;
|
||||||
Read((uchar*)&temp, sizeof(T));
|
Read((uchar*)&temp, sizeof(T));
|
||||||
return temp;
|
return temp;
|
||||||
|
|||||||
@ -75,8 +75,6 @@ public:
|
|||||||
Database& db, const std::vector<uint32_t>& character_ids,
|
Database& db, const std::vector<uint32_t>& character_ids,
|
||||||
const std::string& expedition_name, const std::string& ordered_event_name)
|
const std::string& expedition_name, const std::string& ordered_event_name)
|
||||||
{
|
{
|
||||||
auto joined_character_ids = fmt::join(character_ids, ",");
|
|
||||||
|
|
||||||
auto results = db.QueryDatabase(fmt::format(SQL(
|
auto results = db.QueryDatabase(fmt::format(SQL(
|
||||||
SELECT
|
SELECT
|
||||||
character_id,
|
character_id,
|
||||||
@ -93,9 +91,9 @@ public:
|
|||||||
FIELD(character_id, {}),
|
FIELD(character_id, {}),
|
||||||
FIELD(event_name, '{}') DESC
|
FIELD(event_name, '{}') DESC
|
||||||
),
|
),
|
||||||
joined_character_ids,
|
fmt::join(character_ids, ","),
|
||||||
Strings::Escape(expedition_name),
|
Strings::Escape(expedition_name),
|
||||||
joined_character_ids,
|
fmt::join(character_ids, ","),
|
||||||
Strings::Escape(ordered_event_name)
|
Strings::Escape(ordered_event_name)
|
||||||
));
|
));
|
||||||
|
|
||||||
|
|||||||
@ -44,9 +44,10 @@
|
|||||||
#include <tuple>
|
#include <tuple>
|
||||||
#include <type_traits>
|
#include <type_traits>
|
||||||
|
|
||||||
|
#include <fmt/format.h>
|
||||||
|
|
||||||
#ifndef _WIN32
|
#ifndef _WIN32
|
||||||
// this doesn't appear to affect linux-based systems..need feedback for _WIN64
|
// this doesn't appear to affect linux-based systems..need feedback for _WIN64
|
||||||
#include <fmt/format.h>
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
CMAKE_MINIMUM_REQUIRED(VERSION 3.2)
|
CMAKE_MINIMUM_REQUIRED(VERSION 3.12)
|
||||||
|
|
||||||
SET(eqlaunch_sources
|
SET(eqlaunch_sources
|
||||||
eqlaunch.cpp
|
eqlaunch.cpp
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
CMAKE_MINIMUM_REQUIRED(VERSION 3.2)
|
CMAKE_MINIMUM_REQUIRED(VERSION 3.12)
|
||||||
|
|
||||||
SET(lb_sources
|
SET(lb_sources
|
||||||
src/class.cpp
|
src/class.cpp
|
||||||
|
|||||||
@ -106,7 +106,7 @@ namespace luabind
|
|||||||
LUABIND_API void bind_class_info(lua_State* L)
|
LUABIND_API void bind_class_info(lua_State* L)
|
||||||
{
|
{
|
||||||
module(L)
|
module(L)
|
||||||
[
|
[(
|
||||||
class_<class_info>("class_info_data")
|
class_<class_info>("class_info_data")
|
||||||
.def_readonly("name", &class_info::name)
|
.def_readonly("name", &class_info::name)
|
||||||
.def_readonly("methods", &class_info::methods)
|
.def_readonly("methods", &class_info::methods)
|
||||||
@ -114,7 +114,7 @@ namespace luabind
|
|||||||
|
|
||||||
def("class_info", &get_class_info),
|
def("class_info", &get_class_info),
|
||||||
def("class_names", &get_class_names)
|
def("class_names", &get_class_names)
|
||||||
];
|
)];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
CMAKE_MINIMUM_REQUIRED(VERSION 3.2)
|
CMAKE_MINIMUM_REQUIRED(VERSION 3.12)
|
||||||
|
|
||||||
SET(eqlogin_sources
|
SET(eqlogin_sources
|
||||||
account_management.cpp
|
account_management.cpp
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
CMAKE_MINIMUM_REQUIRED(VERSION 3.2)
|
CMAKE_MINIMUM_REQUIRED(VERSION 3.12)
|
||||||
|
|
||||||
SET(qserv_sources
|
SET(qserv_sources
|
||||||
database.cpp
|
database.cpp
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
CMAKE_MINIMUM_REQUIRED(VERSION 3.2)
|
CMAKE_MINIMUM_REQUIRED(VERSION 3.12)
|
||||||
|
|
||||||
SET(shared_memory_sources
|
SET(shared_memory_sources
|
||||||
base_data.cpp
|
base_data.cpp
|
||||||
|
|||||||
@ -1 +1 @@
|
|||||||
Subproject commit 9e554999ce02cf86fcdfe74fe740c4fe3f5a56d5
|
Subproject commit a33701196adfad74917046096bf5a2aa0ab0bb50
|
||||||
@ -1,5 +1,4 @@
|
|||||||
CMAKE_MINIMUM_REQUIRED(VERSION 3.2)
|
CMAKE_MINIMUM_REQUIRED(VERSION 3.12)
|
||||||
|
|
||||||
SET(ucs_sources
|
SET(ucs_sources
|
||||||
chatchannel.cpp
|
chatchannel.cpp
|
||||||
clientlist.cpp
|
clientlist.cpp
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
CMAKE_MINIMUM_REQUIRED(VERSION 3.2)
|
CMAKE_MINIMUM_REQUIRED(VERSION 3.12)
|
||||||
|
|
||||||
SET(world_sources
|
SET(world_sources
|
||||||
adventure.cpp
|
adventure.cpp
|
||||||
|
|||||||
@ -989,7 +989,7 @@ bool Client::HandleDeleteCharacterPacket(const EQApplicationPacket *app) {
|
|||||||
|
|
||||||
uint32 char_acct_id = database.GetAccountIDByChar((char*)app->pBuffer);
|
uint32 char_acct_id = database.GetAccountIDByChar((char*)app->pBuffer);
|
||||||
if(char_acct_id == GetAccountID()) {
|
if(char_acct_id == GetAccountID()) {
|
||||||
LogInfo("Delete character: [{}]", app->pBuffer);
|
LogInfo("Delete character: [{}]", (const char*)app->pBuffer);
|
||||||
database.DeleteCharacter((char *)app->pBuffer);
|
database.DeleteCharacter((char *)app->pBuffer);
|
||||||
SendCharInfo();
|
SendCharInfo();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -319,7 +319,7 @@ void ClientList::SendCLEList(const int16& admin, const char* to, WorldTCPConnect
|
|||||||
strcpy(newline, "\r\n");
|
strcpy(newline, "\r\n");
|
||||||
else
|
else
|
||||||
strcpy(newline, "^");
|
strcpy(newline, "^");
|
||||||
fmt::memory_buffer out;
|
std::vector<char> out;
|
||||||
|
|
||||||
iterator.Reset();
|
iterator.Reset();
|
||||||
while(iterator.MoreElements()) {
|
while(iterator.MoreElements()) {
|
||||||
@ -328,22 +328,21 @@ void ClientList::SendCLEList(const int16& admin, const char* to, WorldTCPConnect
|
|||||||
struct in_addr in;
|
struct in_addr in;
|
||||||
in.s_addr = cle->GetIP();
|
in.s_addr = cle->GetIP();
|
||||||
if (addnewline) {
|
if (addnewline) {
|
||||||
fmt::format_to(out, newline);
|
fmt::format_to(std::back_inserter(out), fmt::runtime(newline));
|
||||||
}
|
}
|
||||||
fmt::format_to(out, "ID: {} Acc# {} AccName: {} IP: {}", cle->GetID(), cle->AccountID(), cle->AccountName(), inet_ntoa(in));
|
fmt::format_to(std::back_inserter(out), "ID: {} Acc# {} AccName: {} IP: {}", cle->GetID(), cle->AccountID(), cle->AccountName(), inet_ntoa(in));
|
||||||
fmt::format_to(out, "{} Stale: {} Online: {} Admin: {}", newline, cle->GetStaleCounter(), cle->Online(), cle->Admin());
|
fmt::format_to(std::back_inserter(out), "{} Stale: {} Online: {} Admin: {}", newline, cle->GetStaleCounter(), cle->Online(), cle->Admin());
|
||||||
if (cle->LSID())
|
if (cle->LSID())
|
||||||
fmt::format_to(out, "{} LSID: {} LSName: {} WorldAdmin: {}", newline, cle->LSID(), cle->LSName(), cle->WorldAdmin());
|
fmt::format_to(std::back_inserter(out), "{} LSID: {} LSName: {} WorldAdmin: {}", newline, cle->LSID(), cle->LSName(), cle->WorldAdmin());
|
||||||
if (cle->CharID())
|
if (cle->CharID())
|
||||||
fmt:format_to(out, "{} CharID: {} CharName: {} Zone: {} ({})", newline, cle->CharID(), cle->name(), ZoneName(cle->zone()), cle->zone());
|
fmt::format_to(std::back_inserter(out), "{} CharID: {} CharName: {} Zone: {} ({})", newline, cle->CharID(), cle->name(), ZoneName(cle->zone()), cle->zone());
|
||||||
if (out.size() >= 3072) {
|
if (out.size() >= 3072) {
|
||||||
auto output = fmt::to_string(out);
|
|
||||||
connection->SendEmoteMessageRaw(
|
connection->SendEmoteMessageRaw(
|
||||||
to,
|
to,
|
||||||
0,
|
0,
|
||||||
AccountStatus::Player,
|
AccountStatus::Player,
|
||||||
Chat::NPCQuestSay,
|
Chat::NPCQuestSay,
|
||||||
output.c_str()
|
out.data()
|
||||||
);
|
);
|
||||||
addnewline = false;
|
addnewline = false;
|
||||||
out.clear();
|
out.clear();
|
||||||
@ -355,14 +354,13 @@ void ClientList::SendCLEList(const int16& admin, const char* to, WorldTCPConnect
|
|||||||
iterator.Advance();
|
iterator.Advance();
|
||||||
x++;
|
x++;
|
||||||
}
|
}
|
||||||
fmt::format_to(out, "{}{} CLEs in memory. {} CLEs listed. numplayers = {}.", newline, x, y, numplayers);
|
fmt::format_to(std::back_inserter(out), "{}{} CLEs in memory. {} CLEs listed. numplayers = {}.", newline, x, y, numplayers);
|
||||||
auto output = fmt::to_string(out);
|
|
||||||
connection->SendEmoteMessageRaw(
|
connection->SendEmoteMessageRaw(
|
||||||
to,
|
to,
|
||||||
0,
|
0,
|
||||||
AccountStatus::Player,
|
AccountStatus::Player,
|
||||||
Chat::NPCQuestSay,
|
Chat::NPCQuestSay,
|
||||||
output.c_str()
|
out.data()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1061,12 +1059,12 @@ void ClientList::ConsoleSendWhoAll(const char* to, int16 admin, Who_All_Struct*
|
|||||||
if (whom)
|
if (whom)
|
||||||
whomlen = strlen(whom->whom);
|
whomlen = strlen(whom->whom);
|
||||||
|
|
||||||
fmt::memory_buffer out;
|
std::vector<char> out;
|
||||||
fmt::format_to(out, "Players on server:");
|
fmt::format_to(std::back_inserter(out), "Players on server:");
|
||||||
if (connection->IsConsole())
|
if (connection->IsConsole())
|
||||||
fmt::format_to(out, "\r\n");
|
fmt::format_to(std::back_inserter(out), "\r\n");
|
||||||
else
|
else
|
||||||
fmt::format_to(out, "\n");
|
fmt::format_to(std::back_inserter(out), "\n");
|
||||||
iterator.Reset();
|
iterator.Reset();
|
||||||
while (iterator.MoreElements()) {
|
while (iterator.MoreElements()) {
|
||||||
cle = iterator.GetData();
|
cle = iterator.GetData();
|
||||||
@ -1162,23 +1160,22 @@ void ClientList::ConsoleSendWhoAll(const char* to, int16 admin, Who_All_Struct*
|
|||||||
else
|
else
|
||||||
sprintf(line, " %s[%i %s] %s (%s)%s zone: %s%s%s", tmpgm, cle->level(), GetClassIDName(cle->class_(), cle->level()), cle->name(), GetRaceIDName(cle->race()), tmpguild, tmpZone, LFG, accinfo);
|
sprintf(line, " %s[%i %s] %s (%s)%s zone: %s%s%s", tmpgm, cle->level(), GetClassIDName(cle->class_(), cle->level()), cle->name(), GetRaceIDName(cle->race()), tmpguild, tmpZone, LFG, accinfo);
|
||||||
|
|
||||||
fmt::format_to(out, line);
|
fmt::format_to(std::back_inserter(out), fmt::runtime(line));
|
||||||
if (out.size() >= 3584) {
|
if (out.size() >= 3584) {
|
||||||
auto output = fmt::to_string(out);
|
|
||||||
connection->SendEmoteMessageRaw(
|
connection->SendEmoteMessageRaw(
|
||||||
to,
|
to,
|
||||||
0,
|
0,
|
||||||
AccountStatus::Player,
|
AccountStatus::Player,
|
||||||
Chat::NPCQuestSay,
|
Chat::NPCQuestSay,
|
||||||
output.c_str()
|
out.data()
|
||||||
);
|
);
|
||||||
out.clear();
|
out.clear();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (connection->IsConsole())
|
if (connection->IsConsole())
|
||||||
fmt::format_to(out, "\r\n");
|
fmt::format_to(std::back_inserter(out), "\r\n");
|
||||||
else
|
else
|
||||||
fmt::format_to(out, "\n");
|
fmt::format_to(std::back_inserter(out), "\n");
|
||||||
}
|
}
|
||||||
x++;
|
x++;
|
||||||
if (x >= 20 && admin < AccountStatus::QuestTroupe)
|
if (x >= 20 && admin < AccountStatus::QuestTroupe)
|
||||||
@ -1188,24 +1185,24 @@ void ClientList::ConsoleSendWhoAll(const char* to, int16 admin, Who_All_Struct*
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (x >= 20 && admin < AccountStatus::QuestTroupe)
|
if (x >= 20 && admin < AccountStatus::QuestTroupe)
|
||||||
fmt::format_to(out, "too many results...20 players shown");
|
fmt::format_to(std::back_inserter(out), "too many results...20 players shown");
|
||||||
else
|
else
|
||||||
fmt::format_to(out, "{} players online", x);
|
fmt::format_to(std::back_inserter(out), "{} players online", x);
|
||||||
if (admin >= AccountStatus::GMAdmin && (whom == 0 || whom->gmlookup != 0xFFFF)) {
|
if (admin >= AccountStatus::GMAdmin && (whom == 0 || whom->gmlookup != 0xFFFF)) {
|
||||||
if (connection->IsConsole())
|
if (connection->IsConsole())
|
||||||
fmt::format_to(out, "\r\n");
|
fmt::format_to(std::back_inserter(out), "\r\n");
|
||||||
else
|
else
|
||||||
fmt::format_to(out, "\n");
|
fmt::format_to(std::back_inserter(out), "\n");
|
||||||
|
|
||||||
//console_list.SendConsoleWho(connection, to, admin, &output, &outsize, &outlen);
|
//console_list.SendConsoleWho(connection, to, admin, &output, &outsize, &outlen);
|
||||||
}
|
}
|
||||||
auto output = fmt::to_string(out);
|
|
||||||
connection->SendEmoteMessageRaw(
|
connection->SendEmoteMessageRaw(
|
||||||
to,
|
to,
|
||||||
0,
|
0,
|
||||||
AccountStatus::Player,
|
AccountStatus::Player,
|
||||||
Chat::NPCQuestSay,
|
Chat::NPCQuestSay,
|
||||||
output.c_str()
|
out.data()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -60,9 +60,8 @@ void ExpeditionDatabase::PurgeExpiredExpeditions()
|
|||||||
|
|
||||||
if (!expedition_ids.empty())
|
if (!expedition_ids.empty())
|
||||||
{
|
{
|
||||||
auto joined_expedition_ids = fmt::join(expedition_ids, ",");
|
ExpeditionsRepository::DeleteWhere(database, fmt::format("id IN ({})", fmt::join(expedition_ids, ",")));
|
||||||
ExpeditionsRepository::DeleteWhere(database, fmt::format("id IN ({})", joined_expedition_ids));
|
ExpeditionLockoutsRepository::DeleteWhere(database, fmt::format("expedition_id IN ({})", fmt::join(expedition_ids, ",")));
|
||||||
ExpeditionLockoutsRepository::DeleteWhere(database, fmt::format("expedition_id IN ({})", joined_expedition_ids));
|
|
||||||
DynamicZoneMembersRepository::RemoveAllMembers(database, dynamic_zone_ids);
|
DynamicZoneMembersRepository::RemoveAllMembers(database, dynamic_zone_ids);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -311,19 +311,19 @@ void ZSList::SendZoneStatus(const char* to, int16 admin, WorldTCPConnection* con
|
|||||||
strcpy(locked, "No");
|
strcpy(locked, "No");
|
||||||
}
|
}
|
||||||
|
|
||||||
fmt::memory_buffer out;
|
std::vector<char> out;
|
||||||
|
|
||||||
if (connection->IsConsole()) {
|
if (connection->IsConsole()) {
|
||||||
fmt::format_to(out, "World Locked: {}\r\n", locked);
|
fmt::format_to(std::back_inserter(out), "World Locked: {}\r\n", locked);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
fmt::format_to(out, "World Locked: {}^", locked);
|
fmt::format_to(std::back_inserter(out), "World Locked: {}^", locked);
|
||||||
}
|
}
|
||||||
if (connection->IsConsole()) {
|
if (connection->IsConsole()) {
|
||||||
fmt::format_to(out, "Zoneservers online:\r\n");
|
fmt::format_to(std::back_inserter(out), "Zoneservers online:\r\n");
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
fmt::format_to(out, "Zoneservers online:^");
|
fmt::format_to(std::back_inserter(out), "Zoneservers online:^");
|
||||||
}
|
}
|
||||||
|
|
||||||
int v = 0, w = 0, x = 0, y = 0, z = 0;
|
int v = 0, w = 0, x = 0, y = 0, z = 0;
|
||||||
@ -363,7 +363,7 @@ void ZSList::SendZoneStatus(const char* to, int16 admin, WorldTCPConnection* con
|
|||||||
zone_data_string[0] = 0;
|
zone_data_string[0] = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
fmt::format_to(out,
|
fmt::format_to(std::back_inserter(out),
|
||||||
"#{:<3} :: {} :: {}:{:<5} :: {:2} :: {}:{} :: {} :: ({})",
|
"#{:<3} :: {} :: {}:{:<5} :: {:2} :: {}:{} :: {} :: ({})",
|
||||||
zone_server_data->GetID(),
|
zone_server_data->GetID(),
|
||||||
is_static_string,
|
is_static_string,
|
||||||
@ -377,21 +377,20 @@ void ZSList::SendZoneStatus(const char* to, int16 admin, WorldTCPConnection* con
|
|||||||
);
|
);
|
||||||
|
|
||||||
if (out.size() >= 3584) {
|
if (out.size() >= 3584) {
|
||||||
auto output = fmt::to_string(out);
|
|
||||||
connection->SendEmoteMessageRaw(
|
connection->SendEmoteMessageRaw(
|
||||||
to,
|
to,
|
||||||
0,
|
0,
|
||||||
AccountStatus::Player,
|
AccountStatus::Player,
|
||||||
Chat::NPCQuestSay,
|
Chat::NPCQuestSay,
|
||||||
output.c_str()
|
out.data()
|
||||||
);
|
);
|
||||||
out.clear();
|
out.clear();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (connection->IsConsole())
|
if (connection->IsConsole())
|
||||||
fmt::format_to(out, "\r\n");
|
fmt::format_to(std::back_inserter(out), "\r\n");
|
||||||
else
|
else
|
||||||
fmt::format_to(out, "^");
|
fmt::format_to(std::back_inserter(out), "^");
|
||||||
}
|
}
|
||||||
x++;
|
x++;
|
||||||
}
|
}
|
||||||
@ -400,24 +399,23 @@ void ZSList::SendZoneStatus(const char* to, int16 admin, WorldTCPConnection* con
|
|||||||
strcpy(zone_data_string, zone_server_data->GetZoneName());
|
strcpy(zone_data_string, zone_server_data->GetZoneName());
|
||||||
else
|
else
|
||||||
zone_data_string[0] = 0;
|
zone_data_string[0] = 0;
|
||||||
fmt::format_to(out, " #{} {} {}", zone_server_data->GetID(), is_static_string, zone_data_string);
|
fmt::format_to(std::back_inserter(out), " #{} {} {}", zone_server_data->GetID(), is_static_string, zone_data_string);
|
||||||
if (out.size() >= 3584) {
|
if (out.size() >= 3584) {
|
||||||
auto output = fmt::to_string(out);
|
|
||||||
connection->SendEmoteMessageRaw(
|
connection->SendEmoteMessageRaw(
|
||||||
to,
|
to,
|
||||||
0,
|
0,
|
||||||
AccountStatus::Player,
|
AccountStatus::Player,
|
||||||
Chat::NPCQuestSay,
|
Chat::NPCQuestSay,
|
||||||
output.c_str()
|
out.data()
|
||||||
);
|
);
|
||||||
out.clear();
|
out.clear();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (connection->IsConsole()) {
|
if (connection->IsConsole()) {
|
||||||
fmt::format_to(out, "\r\n");
|
fmt::format_to(std::back_inserter(out), "\r\n");
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
fmt::format_to(out, "^");
|
fmt::format_to(std::back_inserter(out), "^");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
x++;
|
x++;
|
||||||
@ -427,21 +425,20 @@ void ZSList::SendZoneStatus(const char* to, int16 admin, WorldTCPConnection* con
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (connection->IsConsole()) {
|
if (connection->IsConsole()) {
|
||||||
fmt::format_to(out, "{} servers listed. {} servers online.\r\n", x, y);
|
fmt::format_to(std::back_inserter(out), "{} servers listed. {} servers online.\r\n", x, y);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
fmt::format_to(out, "{} servers listed. {} servers online.^", x, y);
|
fmt::format_to(std::back_inserter(out), "{} servers listed. {} servers online.^", x, y);
|
||||||
}
|
}
|
||||||
|
|
||||||
fmt::format_to(out, "{} zones are static zones, {} zones are booted zones, {} zones available.", z, w, v);
|
fmt::format_to(std::back_inserter(out), "{} zones are static zones, {} zones are booted zones, {} zones available.", z, w, v);
|
||||||
|
|
||||||
auto output = fmt::to_string(out);
|
|
||||||
connection->SendEmoteMessageRaw(
|
connection->SendEmoteMessageRaw(
|
||||||
to,
|
to,
|
||||||
0,
|
0,
|
||||||
AccountStatus::Player,
|
AccountStatus::Player,
|
||||||
Chat::NPCQuestSay,
|
Chat::NPCQuestSay,
|
||||||
output.c_str()
|
out.data()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
CMAKE_MINIMUM_REQUIRED(VERSION 3.2)
|
CMAKE_MINIMUM_REQUIRED(VERSION 3.12)
|
||||||
|
|
||||||
SET(zone_sources
|
SET(zone_sources
|
||||||
aa.cpp
|
aa.cpp
|
||||||
|
|||||||
@ -43,7 +43,7 @@ void EntityList::DescribeAggro(Client *to_who, NPC *from_who, float d, bool verb
|
|||||||
to_who->Message(
|
to_who->Message(
|
||||||
Chat::White,
|
Chat::White,
|
||||||
fmt::format(
|
fmt::format(
|
||||||
"Describing aggro for {} ({}).",
|
"Describing aggro for {}.",
|
||||||
to_who->GetTargetDescription(from_who)
|
to_who->GetTargetDescription(from_who)
|
||||||
).c_str()
|
).c_str()
|
||||||
);
|
);
|
||||||
|
|||||||
@ -42,7 +42,7 @@ void CheatManager::CheatDetected(CheatTypes type, glm::vec3 position1, glm::vec3
|
|||||||
message.c_str(),
|
message.c_str(),
|
||||||
zone->GetShortName()
|
zone->GetShortName()
|
||||||
);
|
);
|
||||||
LogCheat(message);
|
LogCheat(fmt::runtime(message));
|
||||||
std::string export_string = fmt::format(
|
std::string export_string = fmt::format(
|
||||||
"{} {} {}",
|
"{} {} {}",
|
||||||
position1.x,
|
position1.x,
|
||||||
@ -71,7 +71,7 @@ void CheatManager::CheatDetected(CheatTypes type, glm::vec3 position1, glm::vec3
|
|||||||
message.c_str(),
|
message.c_str(),
|
||||||
zone->GetShortName()
|
zone->GetShortName()
|
||||||
);
|
);
|
||||||
LogCheat(message);
|
LogCheat(fmt::runtime(message));
|
||||||
std::string export_string = fmt::format(
|
std::string export_string = fmt::format(
|
||||||
"{} {} {}",
|
"{} {} {}",
|
||||||
position1.x,
|
position1.x,
|
||||||
@ -97,7 +97,7 @@ void CheatManager::CheatDetected(CheatTypes type, glm::vec3 position1, glm::vec3
|
|||||||
message.c_str(),
|
message.c_str(),
|
||||||
zone->GetShortName()
|
zone->GetShortName()
|
||||||
);
|
);
|
||||||
LogCheat(message);
|
LogCheat(fmt::runtime(message));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case MQWarpKnockBack:
|
case MQWarpKnockBack:
|
||||||
@ -115,7 +115,7 @@ void CheatManager::CheatDetected(CheatTypes type, glm::vec3 position1, glm::vec3
|
|||||||
message.c_str(),
|
message.c_str(),
|
||||||
zone->GetShortName()
|
zone->GetShortName()
|
||||||
);
|
);
|
||||||
LogCheat(message);
|
LogCheat(fmt::runtime(message));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -135,7 +135,7 @@ void CheatManager::CheatDetected(CheatTypes type, glm::vec3 position1, glm::vec3
|
|||||||
message.c_str(),
|
message.c_str(),
|
||||||
zone->GetShortName()
|
zone->GetShortName()
|
||||||
);
|
);
|
||||||
LogCheat(message);
|
LogCheat(fmt::runtime(message));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -155,7 +155,7 @@ void CheatManager::CheatDetected(CheatTypes type, glm::vec3 position1, glm::vec3
|
|||||||
message.c_str(),
|
message.c_str(),
|
||||||
zone->GetShortName()
|
zone->GetShortName()
|
||||||
);
|
);
|
||||||
LogCheat(message);
|
LogCheat(fmt::runtime(message));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case MQZoneUnknownDest:
|
case MQZoneUnknownDest:
|
||||||
@ -173,7 +173,7 @@ void CheatManager::CheatDetected(CheatTypes type, glm::vec3 position1, glm::vec3
|
|||||||
message.c_str(),
|
message.c_str(),
|
||||||
zone->GetShortName()
|
zone->GetShortName()
|
||||||
);
|
);
|
||||||
LogCheat(message);
|
LogCheat(fmt::runtime(message));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case MQGate:
|
case MQGate:
|
||||||
@ -191,7 +191,7 @@ void CheatManager::CheatDetected(CheatTypes type, glm::vec3 position1, glm::vec3
|
|||||||
message.c_str(),
|
message.c_str(),
|
||||||
zone->GetShortName()
|
zone->GetShortName()
|
||||||
);
|
);
|
||||||
LogCheat(message);
|
LogCheat(fmt::runtime(message));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case MQGhost:
|
case MQGhost:
|
||||||
@ -228,7 +228,7 @@ void CheatManager::CheatDetected(CheatTypes type, glm::vec3 position1, glm::vec3
|
|||||||
message.c_str(),
|
message.c_str(),
|
||||||
zone->GetShortName()
|
zone->GetShortName()
|
||||||
);
|
);
|
||||||
LogCheat(message);
|
LogCheat(fmt::runtime(message));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
@ -244,7 +244,7 @@ void CheatManager::CheatDetected(CheatTypes type, glm::vec3 position1, glm::vec3
|
|||||||
message.c_str(),
|
message.c_str(),
|
||||||
zone->GetShortName()
|
zone->GetShortName()
|
||||||
);
|
);
|
||||||
LogCheat(message);
|
LogCheat(fmt::runtime(message));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -3661,7 +3661,7 @@ void Client::Handle_OP_BazaarSearch(const EQApplicationPacket *app)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
LogTrading("Malformed BazaarSearch_Struct packe, Action [{}]t received, ignoring");
|
LogTrading("Malformed BazaarSearch_Struct packet received, ignoring");
|
||||||
LogError("Malformed BazaarSearch_Struct packet received, ignoring\n");
|
LogError("Malformed BazaarSearch_Struct packet received, ignoring\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -27,9 +27,6 @@
|
|||||||
|
|
||||||
extern WorldServer worldserver;
|
extern WorldServer worldserver;
|
||||||
|
|
||||||
// message string 8312 added in September 08 2020 Test patch (used by both dz and shared tasks)
|
|
||||||
const char* const CREATE_NOT_ALL_ADDED = "Not all players in your {} were added to the {}. The {} can take a maximum of {} players, and your {} has {}.";
|
|
||||||
|
|
||||||
DynamicZone::DynamicZone(
|
DynamicZone::DynamicZone(
|
||||||
uint32_t zone_id, uint32_t version, uint32_t duration, DynamicZoneType type)
|
uint32_t zone_id, uint32_t version, uint32_t duration, DynamicZoneType type)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -32,8 +32,6 @@ class Database;
|
|||||||
class EQApplicationPacket;
|
class EQApplicationPacket;
|
||||||
class ServerPacket;
|
class ServerPacket;
|
||||||
|
|
||||||
extern const char* const CREATE_NOT_ALL_ADDED;
|
|
||||||
|
|
||||||
class DynamicZone : public DynamicZoneBase
|
class DynamicZone : public DynamicZoneBase
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|||||||
@ -35,8 +35,6 @@ extern Zone* zone;
|
|||||||
|
|
||||||
// message string 8271 (not in emu clients)
|
// message string 8271 (not in emu clients)
|
||||||
const char* const DZ_YOU_NOT_ASSIGNED = "You could not use this command because you are not currently assigned to a dynamic zone.";
|
const char* const DZ_YOU_NOT_ASSIGNED = "You could not use this command because you are not currently assigned to a dynamic zone.";
|
||||||
// message string 9265 (not in emu clients)
|
|
||||||
const char* const EXPEDITION_OTHER_BELONGS = "{} attempted to create an expedition but {} already belongs to one.";
|
|
||||||
// lockout warnings were added to live in March 11 2020 patch
|
// lockout warnings were added to live in March 11 2020 patch
|
||||||
const char* const DZADD_INVITE_WARNING = "Warning! You will be given replay timers for the following events if you enter %s:";
|
const char* const DZADD_INVITE_WARNING = "Warning! You will be given replay timers for the following events if you enter %s:";
|
||||||
const char* const DZADD_INVITE_WARNING_TIMER = "%s - %sD:%sH:%sM";
|
const char* const DZADD_INVITE_WARNING_TIMER = "%s - %sD:%sH:%sM";
|
||||||
@ -47,6 +45,12 @@ constexpr char LOCK_BEGIN[] = "The trial has begun. You cannot
|
|||||||
const int32_t Expedition::REPLAY_TIMER_ID = -1;
|
const int32_t Expedition::REPLAY_TIMER_ID = -1;
|
||||||
const int32_t Expedition::EVENT_TIMER_ID = 1;
|
const int32_t Expedition::EVENT_TIMER_ID = 1;
|
||||||
|
|
||||||
|
Expedition::Expedition(DynamicZone* dz) :
|
||||||
|
m_dynamic_zone(dz)
|
||||||
|
{
|
||||||
|
assert(m_dynamic_zone != nullptr);
|
||||||
|
}
|
||||||
|
|
||||||
Expedition::Expedition(DynamicZone* dz, uint32_t id, uint32_t dz_id) :
|
Expedition::Expedition(DynamicZone* dz, uint32_t id, uint32_t dz_id) :
|
||||||
m_dynamic_zone(dz),
|
m_dynamic_zone(dz),
|
||||||
m_id(id),
|
m_id(id),
|
||||||
|
|||||||
@ -37,7 +37,6 @@ class ExpeditionRequest;
|
|||||||
class ServerPacket;
|
class ServerPacket;
|
||||||
|
|
||||||
extern const char* const DZ_YOU_NOT_ASSIGNED;
|
extern const char* const DZ_YOU_NOT_ASSIGNED;
|
||||||
extern const char* const EXPEDITION_OTHER_BELONGS;
|
|
||||||
|
|
||||||
enum class ExpeditionLockMessage : uint8_t
|
enum class ExpeditionLockMessage : uint8_t
|
||||||
{
|
{
|
||||||
@ -50,7 +49,7 @@ class Expedition
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
Expedition() = delete;
|
Expedition() = delete;
|
||||||
Expedition(DynamicZone* dz) : m_dynamic_zone(dz) { assert(m_dynamic_zone != nullptr); }
|
Expedition(DynamicZone* dz);
|
||||||
Expedition(DynamicZone* dz, uint32_t id, uint32_t dz_id);
|
Expedition(DynamicZone* dz, uint32_t id, uint32_t dz_id);
|
||||||
|
|
||||||
static Expedition* TryCreate(Client* requester, DynamicZone& dynamiczone, bool disable_messages);
|
static Expedition* TryCreate(Client* requester, DynamicZone& dynamiczone, bool disable_messages);
|
||||||
|
|||||||
@ -30,6 +30,11 @@
|
|||||||
|
|
||||||
constexpr char SystemName[] = "expedition";
|
constexpr char SystemName[] = "expedition";
|
||||||
|
|
||||||
|
// message string 8312 added in September 08 2020 Test patch (used by both dz and shared tasks)
|
||||||
|
constexpr const char* CREATE_NOT_ALL_ADDED = "Not all players in your {} were added to the {}. The {} can take a maximum of {} players, and your {} has {}.";
|
||||||
|
// message string 9265 (not in emu clients)
|
||||||
|
constexpr const char* EXPEDITION_OTHER_BELONGS = "{} attempted to create an expedition but {} already belongs to one.";
|
||||||
|
|
||||||
ExpeditionRequest::ExpeditionRequest(const DynamicZone& dz, bool disable_messages) :
|
ExpeditionRequest::ExpeditionRequest(const DynamicZone& dz, bool disable_messages) :
|
||||||
m_expedition_name(dz.GetName()),
|
m_expedition_name(dz.GetName()),
|
||||||
m_min_players(dz.GetMinPlayers()),
|
m_min_players(dz.GetMinPlayers()),
|
||||||
|
|||||||
@ -73,7 +73,7 @@ void command_rules(Client *c, const Seperator *sep)
|
|||||||
c->Message(
|
c->Message(
|
||||||
Chat::White,
|
Chat::White,
|
||||||
fmt::format(
|
fmt::format(
|
||||||
"Rule Set {} | {} ({})",
|
"Rule Set {} ({})",
|
||||||
e.second,
|
e.second,
|
||||||
e.first
|
e.first
|
||||||
).c_str()
|
).c_str()
|
||||||
|
|||||||
@ -65,7 +65,7 @@ void command_zonelock(Client *c, const Seperator *sep)
|
|||||||
c->Message(
|
c->Message(
|
||||||
Chat::White,
|
Chat::White,
|
||||||
fmt::format(
|
fmt::format(
|
||||||
"Usage: #zonelock {} [Zone ID] or #zonelock {} [Zone Short Name]",
|
"Usage: #zonelock {0} [Zone ID] or #zonelock {0} [Zone Short Name]",
|
||||||
is_lock ? "lock" : "unlock"
|
is_lock ? "lock" : "unlock"
|
||||||
).c_str()
|
).c_str()
|
||||||
);
|
);
|
||||||
|
|||||||
@ -3506,13 +3506,13 @@ luabind::scope lua_register_client() {
|
|||||||
luabind::scope lua_register_inventory_where() {
|
luabind::scope lua_register_inventory_where() {
|
||||||
return luabind::class_<InventoryWhere>("InventoryWhere")
|
return luabind::class_<InventoryWhere>("InventoryWhere")
|
||||||
.enum_("constants")
|
.enum_("constants")
|
||||||
[
|
[(
|
||||||
luabind::value("Personal", static_cast<int>(invWherePersonal)),
|
luabind::value("Personal", static_cast<int>(invWherePersonal)),
|
||||||
luabind::value("Bank", static_cast<int>(invWhereBank)),
|
luabind::value("Bank", static_cast<int>(invWhereBank)),
|
||||||
luabind::value("SharedBank", static_cast<int>(invWhereSharedBank)),
|
luabind::value("SharedBank", static_cast<int>(invWhereSharedBank)),
|
||||||
luabind::value("Trading", static_cast<int>(invWhereTrading)),
|
luabind::value("Trading", static_cast<int>(invWhereTrading)),
|
||||||
luabind::value("Cursor", static_cast<int>(invWhereCursor))
|
luabind::value("Cursor", static_cast<int>(invWhereCursor))
|
||||||
];
|
)];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -284,11 +284,11 @@ luabind::scope lua_register_expedition() {
|
|||||||
luabind::scope lua_register_expedition_lock_messages() {
|
luabind::scope lua_register_expedition_lock_messages() {
|
||||||
return luabind::class_<ExpeditionLockMessage>("ExpeditionLockMessage")
|
return luabind::class_<ExpeditionLockMessage>("ExpeditionLockMessage")
|
||||||
.enum_("constants")
|
.enum_("constants")
|
||||||
[
|
[(
|
||||||
luabind::value("None", static_cast<int>(ExpeditionLockMessage::None)),
|
luabind::value("None", static_cast<int>(ExpeditionLockMessage::None)),
|
||||||
luabind::value("Close", static_cast<int>(ExpeditionLockMessage::Close)),
|
luabind::value("Close", static_cast<int>(ExpeditionLockMessage::Close)),
|
||||||
luabind::value("Begin", static_cast<int>(ExpeditionLockMessage::Begin))
|
luabind::value("Begin", static_cast<int>(ExpeditionLockMessage::Begin))
|
||||||
];
|
)];
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // LUA_EQEMU
|
#endif // LUA_EQEMU
|
||||||
|
|||||||
@ -3836,7 +3836,7 @@ bool get_ruleb(int rule) {
|
|||||||
|
|
||||||
luabind::scope lua_register_general() {
|
luabind::scope lua_register_general() {
|
||||||
return luabind::namespace_("eq")
|
return luabind::namespace_("eq")
|
||||||
[
|
[(
|
||||||
luabind::def("load_encounter", &load_encounter),
|
luabind::def("load_encounter", &load_encounter),
|
||||||
luabind::def("unload_encounter", &unload_encounter),
|
luabind::def("unload_encounter", &unload_encounter),
|
||||||
luabind::def("load_encounter_with_data", &load_encounter_with_data),
|
luabind::def("load_encounter_with_data", &load_encounter_with_data),
|
||||||
@ -4449,25 +4449,25 @@ luabind::scope lua_register_general() {
|
|||||||
luabind::def("remove_expedition_lockout_by_char_id", &lua_remove_expedition_lockout_by_char_id),
|
luabind::def("remove_expedition_lockout_by_char_id", &lua_remove_expedition_lockout_by_char_id),
|
||||||
luabind::def("remove_all_expedition_lockouts_by_char_id", (void(*)(uint32))&lua_remove_all_expedition_lockouts_by_char_id),
|
luabind::def("remove_all_expedition_lockouts_by_char_id", (void(*)(uint32))&lua_remove_all_expedition_lockouts_by_char_id),
|
||||||
luabind::def("remove_all_expedition_lockouts_by_char_id", (void(*)(uint32, std::string))&lua_remove_all_expedition_lockouts_by_char_id)
|
luabind::def("remove_all_expedition_lockouts_by_char_id", (void(*)(uint32, std::string))&lua_remove_all_expedition_lockouts_by_char_id)
|
||||||
];
|
)];
|
||||||
}
|
}
|
||||||
|
|
||||||
luabind::scope lua_register_random() {
|
luabind::scope lua_register_random() {
|
||||||
return luabind::namespace_("Random")
|
return luabind::namespace_("Random")
|
||||||
[
|
[(
|
||||||
luabind::def("Int", &random_int),
|
luabind::def("Int", &random_int),
|
||||||
luabind::def("Real", &random_real),
|
luabind::def("Real", &random_real),
|
||||||
luabind::def("Roll", &random_roll_int),
|
luabind::def("Roll", &random_roll_int),
|
||||||
luabind::def("RollReal", &random_roll_real),
|
luabind::def("RollReal", &random_roll_real),
|
||||||
luabind::def("Roll0", &random_roll0)
|
luabind::def("Roll0", &random_roll0)
|
||||||
];
|
)];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
luabind::scope lua_register_events() {
|
luabind::scope lua_register_events() {
|
||||||
return luabind::class_<Events>("Event")
|
return luabind::class_<Events>("Event")
|
||||||
.enum_("constants")
|
.enum_("constants")
|
||||||
[
|
[(
|
||||||
luabind::value("say", static_cast<int>(EVENT_SAY)),
|
luabind::value("say", static_cast<int>(EVENT_SAY)),
|
||||||
luabind::value("trade", static_cast<int>(EVENT_TRADE)),
|
luabind::value("trade", static_cast<int>(EVENT_TRADE)),
|
||||||
luabind::value("death", static_cast<int>(EVENT_DEATH)),
|
luabind::value("death", static_cast<int>(EVENT_DEATH)),
|
||||||
@ -4566,13 +4566,13 @@ luabind::scope lua_register_events() {
|
|||||||
luabind::value("payload", static_cast<int>(EVENT_PAYLOAD)),
|
luabind::value("payload", static_cast<int>(EVENT_PAYLOAD)),
|
||||||
luabind::value("level_down", static_cast<int>(EVENT_LEVEL_DOWN)),
|
luabind::value("level_down", static_cast<int>(EVENT_LEVEL_DOWN)),
|
||||||
luabind::value("gm_command", static_cast<int>(EVENT_GM_COMMAND))
|
luabind::value("gm_command", static_cast<int>(EVENT_GM_COMMAND))
|
||||||
];
|
)];
|
||||||
}
|
}
|
||||||
|
|
||||||
luabind::scope lua_register_faction() {
|
luabind::scope lua_register_faction() {
|
||||||
return luabind::class_<Factions>("Faction")
|
return luabind::class_<Factions>("Faction")
|
||||||
.enum_("constants")
|
.enum_("constants")
|
||||||
[
|
[(
|
||||||
luabind::value("Ally", static_cast<int>(FACTION_ALLY)),
|
luabind::value("Ally", static_cast<int>(FACTION_ALLY)),
|
||||||
luabind::value("Warmly", static_cast<int>(FACTION_WARMLY)),
|
luabind::value("Warmly", static_cast<int>(FACTION_WARMLY)),
|
||||||
luabind::value("Kindly", static_cast<int>(FACTION_KINDLY)),
|
luabind::value("Kindly", static_cast<int>(FACTION_KINDLY)),
|
||||||
@ -4582,13 +4582,13 @@ luabind::scope lua_register_faction() {
|
|||||||
luabind::value("Dubious", static_cast<int>(FACTION_DUBIOUSLY)),
|
luabind::value("Dubious", static_cast<int>(FACTION_DUBIOUSLY)),
|
||||||
luabind::value("Threatenly", static_cast<int>(FACTION_THREATENINGLY)),
|
luabind::value("Threatenly", static_cast<int>(FACTION_THREATENINGLY)),
|
||||||
luabind::value("Scowls", static_cast<int>(FACTION_SCOWLS))
|
luabind::value("Scowls", static_cast<int>(FACTION_SCOWLS))
|
||||||
];
|
)];
|
||||||
}
|
}
|
||||||
|
|
||||||
luabind::scope lua_register_slot() {
|
luabind::scope lua_register_slot() {
|
||||||
return luabind::class_<Slots>("Slot")
|
return luabind::class_<Slots>("Slot")
|
||||||
.enum_("constants")
|
.enum_("constants")
|
||||||
[
|
[(
|
||||||
luabind::value("Charm", static_cast<int>(EQ::invslot::slotCharm)),
|
luabind::value("Charm", static_cast<int>(EQ::invslot::slotCharm)),
|
||||||
luabind::value("Ear1", static_cast<int>(EQ::invslot::slotEar1)),
|
luabind::value("Ear1", static_cast<int>(EQ::invslot::slotEar1)),
|
||||||
luabind::value("Head", static_cast<int>(EQ::invslot::slotHead)),
|
luabind::value("Head", static_cast<int>(EQ::invslot::slotHead)),
|
||||||
@ -4679,13 +4679,13 @@ luabind::scope lua_register_slot() {
|
|||||||
luabind::value("PersonalBegin", static_cast<int>(EQ::invslot::GENERAL_BEGIN)), // deprecated
|
luabind::value("PersonalBegin", static_cast<int>(EQ::invslot::GENERAL_BEGIN)), // deprecated
|
||||||
luabind::value("PersonalEnd", static_cast<int>(EQ::invslot::GENERAL_END)), // deprecated
|
luabind::value("PersonalEnd", static_cast<int>(EQ::invslot::GENERAL_END)), // deprecated
|
||||||
luabind::value("CursorEnd", 0xFFFE) // deprecated (not in use..and never valid vis-a-vis client behavior)
|
luabind::value("CursorEnd", 0xFFFE) // deprecated (not in use..and never valid vis-a-vis client behavior)
|
||||||
];
|
)];
|
||||||
}
|
}
|
||||||
|
|
||||||
luabind::scope lua_register_material() {
|
luabind::scope lua_register_material() {
|
||||||
return luabind::class_<Materials>("Material")
|
return luabind::class_<Materials>("Material")
|
||||||
.enum_("constants")
|
.enum_("constants")
|
||||||
[
|
[(
|
||||||
luabind::value("Head", static_cast<int>(EQ::textures::armorHead)),
|
luabind::value("Head", static_cast<int>(EQ::textures::armorHead)),
|
||||||
luabind::value("Chest", static_cast<int>(EQ::textures::armorChest)),
|
luabind::value("Chest", static_cast<int>(EQ::textures::armorChest)),
|
||||||
luabind::value("Arms", static_cast<int>(EQ::textures::armorArms)),
|
luabind::value("Arms", static_cast<int>(EQ::textures::armorArms)),
|
||||||
@ -4700,13 +4700,13 @@ luabind::scope lua_register_material() {
|
|||||||
|
|
||||||
luabind::value("Bracer", static_cast<int>(EQ::textures::armorWrist)), // deprecated
|
luabind::value("Bracer", static_cast<int>(EQ::textures::armorWrist)), // deprecated
|
||||||
luabind::value("Max", static_cast<int>(EQ::textures::materialCount)) // deprecated
|
luabind::value("Max", static_cast<int>(EQ::textures::materialCount)) // deprecated
|
||||||
];
|
)];
|
||||||
}
|
}
|
||||||
|
|
||||||
luabind::scope lua_register_client_version() {
|
luabind::scope lua_register_client_version() {
|
||||||
return luabind::class_<ClientVersions>("ClientVersion")
|
return luabind::class_<ClientVersions>("ClientVersion")
|
||||||
.enum_("constants")
|
.enum_("constants")
|
||||||
[
|
[(
|
||||||
luabind::value("Unknown", static_cast<int>(EQ::versions::ClientVersion::Unknown)),
|
luabind::value("Unknown", static_cast<int>(EQ::versions::ClientVersion::Unknown)),
|
||||||
luabind::value("Titanium", static_cast<int>(EQ::versions::ClientVersion::Titanium)),
|
luabind::value("Titanium", static_cast<int>(EQ::versions::ClientVersion::Titanium)),
|
||||||
luabind::value("SoF", static_cast<int>(EQ::versions::ClientVersion::SoF)),
|
luabind::value("SoF", static_cast<int>(EQ::versions::ClientVersion::SoF)),
|
||||||
@ -4715,25 +4715,25 @@ luabind::scope lua_register_client_version() {
|
|||||||
luabind::value("UF", static_cast<int>(EQ::versions::ClientVersion::UF)),
|
luabind::value("UF", static_cast<int>(EQ::versions::ClientVersion::UF)),
|
||||||
luabind::value("RoF", static_cast<int>(EQ::versions::ClientVersion::RoF)),
|
luabind::value("RoF", static_cast<int>(EQ::versions::ClientVersion::RoF)),
|
||||||
luabind::value("RoF2", static_cast<int>(EQ::versions::ClientVersion::RoF2))
|
luabind::value("RoF2", static_cast<int>(EQ::versions::ClientVersion::RoF2))
|
||||||
];
|
)];
|
||||||
}
|
}
|
||||||
|
|
||||||
luabind::scope lua_register_appearance() {
|
luabind::scope lua_register_appearance() {
|
||||||
return luabind::class_<Appearances>("Appearance")
|
return luabind::class_<Appearances>("Appearance")
|
||||||
.enum_("constants")
|
.enum_("constants")
|
||||||
[
|
[(
|
||||||
luabind::value("Standing", static_cast<int>(eaStanding)),
|
luabind::value("Standing", static_cast<int>(eaStanding)),
|
||||||
luabind::value("Sitting", static_cast<int>(eaSitting)),
|
luabind::value("Sitting", static_cast<int>(eaSitting)),
|
||||||
luabind::value("Crouching", static_cast<int>(eaCrouching)),
|
luabind::value("Crouching", static_cast<int>(eaCrouching)),
|
||||||
luabind::value("Dead", static_cast<int>(eaDead)),
|
luabind::value("Dead", static_cast<int>(eaDead)),
|
||||||
luabind::value("Looting", static_cast<int>(eaLooting))
|
luabind::value("Looting", static_cast<int>(eaLooting))
|
||||||
];
|
)];
|
||||||
}
|
}
|
||||||
|
|
||||||
luabind::scope lua_register_classes() {
|
luabind::scope lua_register_classes() {
|
||||||
return luabind::class_<Classes>("Class")
|
return luabind::class_<Classes>("Class")
|
||||||
.enum_("constants")
|
.enum_("constants")
|
||||||
[
|
[(
|
||||||
luabind::value("WARRIOR", WARRIOR),
|
luabind::value("WARRIOR", WARRIOR),
|
||||||
luabind::value("CLERIC", CLERIC),
|
luabind::value("CLERIC", CLERIC),
|
||||||
luabind::value("PALADIN", PALADIN),
|
luabind::value("PALADIN", PALADIN),
|
||||||
@ -4779,13 +4779,13 @@ luabind::scope lua_register_classes() {
|
|||||||
luabind::value("FELLOWSHIP_MASTER", FELLOWSHIP_MASTER),
|
luabind::value("FELLOWSHIP_MASTER", FELLOWSHIP_MASTER),
|
||||||
luabind::value("ALT_CURRENCY_MERCHANT", ALT_CURRENCY_MERCHANT),
|
luabind::value("ALT_CURRENCY_MERCHANT", ALT_CURRENCY_MERCHANT),
|
||||||
luabind::value("MERCENARY_MASTER", MERCENARY_MASTER)
|
luabind::value("MERCENARY_MASTER", MERCENARY_MASTER)
|
||||||
];
|
)];
|
||||||
}
|
}
|
||||||
|
|
||||||
luabind::scope lua_register_skills() {
|
luabind::scope lua_register_skills() {
|
||||||
return luabind::class_<Skills>("Skill")
|
return luabind::class_<Skills>("Skill")
|
||||||
.enum_("constants")
|
.enum_("constants")
|
||||||
[
|
[(
|
||||||
luabind::value("1HBlunt", EQ::skills::Skill1HBlunt),
|
luabind::value("1HBlunt", EQ::skills::Skill1HBlunt),
|
||||||
luabind::value("Blunt1H", EQ::skills::Skill1HBlunt),
|
luabind::value("Blunt1H", EQ::skills::Skill1HBlunt),
|
||||||
luabind::value("1HSlashing", EQ::skills::Skill1HSlashing),
|
luabind::value("1HSlashing", EQ::skills::Skill1HSlashing),
|
||||||
@ -4872,13 +4872,13 @@ luabind::scope lua_register_skills() {
|
|||||||
luabind::value("2HPiercing", EQ::skills::Skill2HPiercing),
|
luabind::value("2HPiercing", EQ::skills::Skill2HPiercing),
|
||||||
luabind::value("Piercing2H", EQ::skills::Skill2HPiercing),
|
luabind::value("Piercing2H", EQ::skills::Skill2HPiercing),
|
||||||
luabind::value("HIGHEST_SKILL", EQ::skills::HIGHEST_SKILL)
|
luabind::value("HIGHEST_SKILL", EQ::skills::HIGHEST_SKILL)
|
||||||
];
|
)];
|
||||||
}
|
}
|
||||||
|
|
||||||
luabind::scope lua_register_bodytypes() {
|
luabind::scope lua_register_bodytypes() {
|
||||||
return luabind::class_<BodyTypes>("BT")
|
return luabind::class_<BodyTypes>("BT")
|
||||||
.enum_("constants")
|
.enum_("constants")
|
||||||
[
|
[(
|
||||||
luabind::value("Humanoid", 1),
|
luabind::value("Humanoid", 1),
|
||||||
luabind::value("Lycanthrope", 2),
|
luabind::value("Lycanthrope", 2),
|
||||||
luabind::value("Undead", 3),
|
luabind::value("Undead", 3),
|
||||||
@ -4913,13 +4913,13 @@ luabind::scope lua_register_bodytypes() {
|
|||||||
luabind::value("SwarmPet", 63),
|
luabind::value("SwarmPet", 63),
|
||||||
luabind::value("InvisMan", 66),
|
luabind::value("InvisMan", 66),
|
||||||
luabind::value("Special", 67)
|
luabind::value("Special", 67)
|
||||||
];
|
)];
|
||||||
}
|
}
|
||||||
|
|
||||||
luabind::scope lua_register_filters() {
|
luabind::scope lua_register_filters() {
|
||||||
return luabind::class_<Filters>("Filter")
|
return luabind::class_<Filters>("Filter")
|
||||||
.enum_("constants")
|
.enum_("constants")
|
||||||
[
|
[(
|
||||||
luabind::value("None", FilterNone),
|
luabind::value("None", FilterNone),
|
||||||
luabind::value("GuildChat", FilterGuildChat),
|
luabind::value("GuildChat", FilterGuildChat),
|
||||||
luabind::value("Socials", FilterSocials),
|
luabind::value("Socials", FilterSocials),
|
||||||
@ -4949,13 +4949,13 @@ luabind::scope lua_register_filters() {
|
|||||||
luabind::value("Unknown26", FilterUnknown26),
|
luabind::value("Unknown26", FilterUnknown26),
|
||||||
luabind::value("Unknown27", FilterUnknown27),
|
luabind::value("Unknown27", FilterUnknown27),
|
||||||
luabind::value("Unknown28", FilterUnknown28)
|
luabind::value("Unknown28", FilterUnknown28)
|
||||||
];
|
)];
|
||||||
}
|
}
|
||||||
|
|
||||||
luabind::scope lua_register_message_types() {
|
luabind::scope lua_register_message_types() {
|
||||||
return luabind::class_<MessageTypes>("MT")
|
return luabind::class_<MessageTypes>("MT")
|
||||||
.enum_("constants")
|
.enum_("constants")
|
||||||
[
|
[(
|
||||||
luabind::value("White", Chat::White),
|
luabind::value("White", Chat::White),
|
||||||
luabind::value("DimGray", Chat::DimGray),
|
luabind::value("DimGray", Chat::DimGray),
|
||||||
luabind::value("Default", Chat::Default),
|
luabind::value("Default", Chat::Default),
|
||||||
@ -5059,13 +5059,13 @@ luabind::scope lua_register_message_types() {
|
|||||||
luabind::value("ItemSpeech", Chat::ItemSpeech),
|
luabind::value("ItemSpeech", Chat::ItemSpeech),
|
||||||
luabind::value("StrikeThrough", Chat::StrikeThrough),
|
luabind::value("StrikeThrough", Chat::StrikeThrough),
|
||||||
luabind::value("Stun", Chat::Stun)
|
luabind::value("Stun", Chat::Stun)
|
||||||
];
|
)];
|
||||||
}
|
}
|
||||||
|
|
||||||
luabind::scope lua_register_rules_const() {
|
luabind::scope lua_register_rules_const() {
|
||||||
return luabind::class_<Rule>("Rule")
|
return luabind::class_<Rule>("Rule")
|
||||||
.enum_("constants")
|
.enum_("constants")
|
||||||
[
|
[(
|
||||||
#define RULE_INT(cat, rule, default_value, notes) \
|
#define RULE_INT(cat, rule, default_value, notes) \
|
||||||
luabind::value(#rule, RuleManager::Int__##rule),
|
luabind::value(#rule, RuleManager::Int__##rule),
|
||||||
#include "../common/ruletypes.h"
|
#include "../common/ruletypes.h"
|
||||||
@ -5080,7 +5080,7 @@ luabind::scope lua_register_rules_const() {
|
|||||||
luabind::value(#rule, RuleManager::Bool__##rule),
|
luabind::value(#rule, RuleManager::Bool__##rule),
|
||||||
#include "../common/ruletypes.h"
|
#include "../common/ruletypes.h"
|
||||||
luabind::value("_BoolRuleCount", RuleManager::_BoolRuleCount)
|
luabind::value("_BoolRuleCount", RuleManager::_BoolRuleCount)
|
||||||
];
|
)];
|
||||||
}
|
}
|
||||||
|
|
||||||
luabind::scope lua_register_rulei() {
|
luabind::scope lua_register_rulei() {
|
||||||
@ -5107,24 +5107,24 @@ luabind::scope lua_register_ruleb() {
|
|||||||
luabind::scope lua_register_journal_speakmode() {
|
luabind::scope lua_register_journal_speakmode() {
|
||||||
return luabind::class_<Journal_SpeakMode>("SpeakMode")
|
return luabind::class_<Journal_SpeakMode>("SpeakMode")
|
||||||
.enum_("constants")
|
.enum_("constants")
|
||||||
[
|
[(
|
||||||
luabind::value("Raw", static_cast<int>(Journal::SpeakMode::Raw)),
|
luabind::value("Raw", static_cast<int>(Journal::SpeakMode::Raw)),
|
||||||
luabind::value("Say", static_cast<int>(Journal::SpeakMode::Say)),
|
luabind::value("Say", static_cast<int>(Journal::SpeakMode::Say)),
|
||||||
luabind::value("Shout", static_cast<int>(Journal::SpeakMode::Shout)),
|
luabind::value("Shout", static_cast<int>(Journal::SpeakMode::Shout)),
|
||||||
luabind::value("EmoteAlt", static_cast<int>(Journal::SpeakMode::EmoteAlt)),
|
luabind::value("EmoteAlt", static_cast<int>(Journal::SpeakMode::EmoteAlt)),
|
||||||
luabind::value("Emote", static_cast<int>(Journal::SpeakMode::Emote)),
|
luabind::value("Emote", static_cast<int>(Journal::SpeakMode::Emote)),
|
||||||
luabind::value("Group", static_cast<int>(Journal::SpeakMode::Group))
|
luabind::value("Group", static_cast<int>(Journal::SpeakMode::Group))
|
||||||
];
|
)];
|
||||||
}
|
}
|
||||||
|
|
||||||
luabind::scope lua_register_journal_mode() {
|
luabind::scope lua_register_journal_mode() {
|
||||||
return luabind::class_<Journal_Mode>("JournalMode")
|
return luabind::class_<Journal_Mode>("JournalMode")
|
||||||
.enum_("constants")
|
.enum_("constants")
|
||||||
[
|
[(
|
||||||
luabind::value("None", static_cast<int>(Journal::Mode::None)),
|
luabind::value("None", static_cast<int>(Journal::Mode::None)),
|
||||||
luabind::value("Log1", static_cast<int>(Journal::Mode::Log1)),
|
luabind::value("Log1", static_cast<int>(Journal::Mode::Log1)),
|
||||||
luabind::value("Log2", static_cast<int>(Journal::Mode::Log2))
|
luabind::value("Log2", static_cast<int>(Journal::Mode::Log2))
|
||||||
];
|
)];
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@ -3308,7 +3308,7 @@ luabind::scope lua_register_special_abilities() {
|
|||||||
return luabind::class_<SpecialAbilities>("SpecialAbility")
|
return luabind::class_<SpecialAbilities>("SpecialAbility")
|
||||||
|
|
||||||
.enum_("constants")
|
.enum_("constants")
|
||||||
[
|
[(
|
||||||
luabind::value("summon", static_cast<int>(SPECATK_SUMMON)),
|
luabind::value("summon", static_cast<int>(SPECATK_SUMMON)),
|
||||||
luabind::value("enrage", static_cast<int>(SPECATK_ENRAGE)),
|
luabind::value("enrage", static_cast<int>(SPECATK_ENRAGE)),
|
||||||
luabind::value("rampage", static_cast<int>(SPECATK_RAMPAGE)),
|
luabind::value("rampage", static_cast<int>(SPECATK_RAMPAGE)),
|
||||||
@ -3360,7 +3360,7 @@ luabind::scope lua_register_special_abilities() {
|
|||||||
luabind::value("immune_aggro_npc", static_cast<int>(IMMUNE_AGGRO_NPC)),
|
luabind::value("immune_aggro_npc", static_cast<int>(IMMUNE_AGGRO_NPC)),
|
||||||
luabind::value("modify_avoid_damage", static_cast<int>(MODIFY_AVOID_DAMAGE)),
|
luabind::value("modify_avoid_damage", static_cast<int>(MODIFY_AVOID_DAMAGE)),
|
||||||
luabind::value("immune_open", static_cast<int>(IMMUNE_OPEN))
|
luabind::value("immune_open", static_cast<int>(IMMUNE_OPEN))
|
||||||
];
|
)];
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@ -365,7 +365,7 @@ luabind::scope lua_register_packet() {
|
|||||||
luabind::scope lua_register_packet_opcodes() {
|
luabind::scope lua_register_packet_opcodes() {
|
||||||
return luabind::class_<Opcodes>("Opcode")
|
return luabind::class_<Opcodes>("Opcode")
|
||||||
.enum_("constants")
|
.enum_("constants")
|
||||||
[
|
[(
|
||||||
luabind::value("ExploreUnknown", static_cast<int>(OP_ExploreUnknown)),
|
luabind::value("ExploreUnknown", static_cast<int>(OP_ExploreUnknown)),
|
||||||
luabind::value("Heartbeat", static_cast<int>(OP_Heartbeat)),
|
luabind::value("Heartbeat", static_cast<int>(OP_Heartbeat)),
|
||||||
luabind::value("ReloadUI", static_cast<int>(OP_ReloadUI)),
|
luabind::value("ReloadUI", static_cast<int>(OP_ReloadUI)),
|
||||||
@ -911,7 +911,7 @@ luabind::scope lua_register_packet_opcodes() {
|
|||||||
luabind::value("ClientTimeStamp", static_cast<int>(OP_ClientTimeStamp)),
|
luabind::value("ClientTimeStamp", static_cast<int>(OP_ClientTimeStamp)),
|
||||||
luabind::value("GuildPromote", static_cast<int>(OP_GuildPromote)),
|
luabind::value("GuildPromote", static_cast<int>(OP_GuildPromote)),
|
||||||
luabind::value("Fling", static_cast<int>(OP_Fling))
|
luabind::value("Fling", static_cast<int>(OP_Fling))
|
||||||
];
|
)];
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@ -1159,7 +1159,7 @@ void LuaParser::MapFunctions(lua_State *L) {
|
|||||||
luabind::open(L);
|
luabind::open(L);
|
||||||
|
|
||||||
luabind::module(L)
|
luabind::module(L)
|
||||||
[
|
[(
|
||||||
lua_register_general(),
|
lua_register_general(),
|
||||||
lua_register_random(),
|
lua_register_random(),
|
||||||
lua_register_events(),
|
lua_register_events(),
|
||||||
@ -1219,7 +1219,7 @@ void LuaParser::MapFunctions(lua_State *L) {
|
|||||||
lua_register_journal_mode(),
|
lua_register_journal_mode(),
|
||||||
lua_register_expedition(),
|
lua_register_expedition(),
|
||||||
lua_register_expedition_lock_messages()
|
lua_register_expedition_lock_messages()
|
||||||
];
|
)];
|
||||||
|
|
||||||
} catch(std::exception &ex) {
|
} catch(std::exception &ex) {
|
||||||
std::string error = ex.what();
|
std::string error = ex.what();
|
||||||
|
|||||||
@ -1318,7 +1318,7 @@ void Client::ThrowingAttack(Mob* other, bool CanDoubleAttack) { //old was 51
|
|||||||
|
|
||||||
const EQ::ItemData* item = RangeWeapon->GetItem();
|
const EQ::ItemData* item = RangeWeapon->GetItem();
|
||||||
if (item->ItemType != EQ::item::ItemTypeLargeThrowing && item->ItemType != EQ::item::ItemTypeSmallThrowing) {
|
if (item->ItemType != EQ::item::ItemTypeLargeThrowing && item->ItemType != EQ::item::ItemTypeSmallThrowing) {
|
||||||
LogCombat("Ranged attack canceled. Ranged item [{}] is not a throwing weapon. type [{}]", item->ItemType);
|
LogCombat("Ranged attack canceled. Ranged item [{}] is not a throwing weapon. type [{}]", item->ID, item->ItemType);
|
||||||
Message(0, "Error: Rangeweapon: GetItem(%i)==0, you have nothing useful to throw!", GetItemIDAt(EQ::invslot::slotRange));
|
Message(0, "Error: Rangeweapon: GetItem(%i)==0, you have nothing useful to throw!", GetItemIDAt(EQ::invslot::slotRange));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1361,7 +1361,7 @@ void Mob::CastedSpellFinished(uint16 spell_id, uint32 target_id, CastingSlot slo
|
|||||||
{
|
{
|
||||||
if (IsBardSong(spell_id) && slot < CastingSlot::MaxGems) {
|
if (IsBardSong(spell_id) && slot < CastingSlot::MaxGems) {
|
||||||
if (spells[spell_id].buff_duration == 0xFFFF) {
|
if (spells[spell_id].buff_duration == 0xFFFF) {
|
||||||
LogSpells("Bard song [{}] not applying bard logic because duration. dur=[{}], recast=[{}]", spells[spell_id].buff_duration);
|
LogSpells("Bard song [{}] not applying bard logic because duration. dur=[{}], recast=[{}]", spell_id, spells[spell_id].buff_duration, spells[spell_id].recast_time);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (IsPulsingBardSong(spell_id)) {
|
if (IsPulsingBardSong(spell_id)) {
|
||||||
|
|||||||
@ -2022,7 +2022,7 @@ void ClientTaskState::AcceptNewTask(
|
|||||||
else if (timer_type == TaskTimerType::Request)
|
else if (timer_type == TaskTimerType::Request)
|
||||||
{
|
{
|
||||||
auto eqstr = TaskStr::Get(TaskStr::ASSIGN_REQUEST_TIMER);
|
auto eqstr = TaskStr::Get(TaskStr::ASSIGN_REQUEST_TIMER);
|
||||||
client->Message(Chat::Red, fmt::format(eqstr, days, hours, mins).c_str());
|
client->Message(Chat::Red, fmt::format(fmt::runtime(eqstr), days, hours, mins).c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
@ -2284,7 +2284,7 @@ void ClientTaskState::ListTaskTimers(Client* client)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
auto eqstr = TaskStr::Get(TaskStr::REQUEST_TIMER_REMAINING);
|
auto eqstr = TaskStr::Get(TaskStr::REQUEST_TIMER_REMAINING);
|
||||||
client->Message(Chat::Yellow, fmt::format(eqstr, task->title, days, hours, mins).c_str());
|
client->Message(Chat::Yellow, fmt::format(fmt::runtime(eqstr), task->title, days, hours, mins).c_str());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -274,7 +274,7 @@ bool TaskManager::SaveClientState(Client *client, ClientTaskState *cts)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
const char *ERR_MYSQLERROR = "[TASKS]Error in TaskManager::SaveClientState {}";
|
constexpr const char *ERR_MYSQLERROR = "[TASKS]Error in TaskManager::SaveClientState {}";
|
||||||
|
|
||||||
int character_id = client->CharacterID();
|
int character_id = client->CharacterID();
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user