Merge fix

This commit is contained in:
KimLS
2026-04-15 22:06:39 -07:00
110 changed files with 1289 additions and 1533 deletions
+4 -4
View File
@@ -20,7 +20,7 @@
#define MAX_SWARM_PETS 12 //this can change as long as you make more coords (swarm_pet_x/swarm_pet_y)
#define WAKE_THE_DEAD_NPCTYPEID 500 //We use first pet in pets table as a template
typedef enum {
enum aaNonspellAction {
aaActionNone = 0,
aaActionAETaunt = 1,
aaActionMassBuff = 2,
@@ -38,7 +38,7 @@ typedef enum {
aaActionLeechTouch = 14,
aaActionProjectIllusion = 15,
aaActionFadingMemories = 16
} aaNonspellAction;
};
enum { //leadership AA indexes
groupAAMarkNPC = 0,
@@ -116,7 +116,7 @@ static const uint8 LeadershipAACosts[_maxLeaderAA][MAX_LEADERSHIP_TIERS] = {
{ 0, 0, 0, 0, 0, 0 }, //raidAA15
};
typedef enum { //AA IDs
enum aaID { //AA IDs
aaNone =0,
aaInnateStrength =2,//implemented as bonus
aaInnateStamina =7,//implemented as bonus
@@ -1525,7 +1525,7 @@ typedef enum { //AA IDs
aaHighestID //this should always be last, and should always
//follow the highest AA ID
} aaID;
};
//Structure representing the database's swarm pet configs
struct SwarmPet_Struct {
+3 -3
View File
@@ -10580,12 +10580,12 @@ void Bot::LoadDefaultBotSettings() {
m_bot_spell_settings.push_back(t);
LogBotSettingsDetail("{} says, 'Setting defaults for {} ({}) [#{}] - [{} [#{}] stance]'", GetCleanName(), t.name, t.short_name, t.spell_type, Stance::GetName(bot_stance), bot_stance);
LogBotSettingsDetail("{} says, 'Hold = [{}] | Delay = [{}ms] | MinThreshold = [{}\%] | MaxThreshold = [{}\%]'", GetCleanName(),
LogBotSettingsDetail("{} says, 'Hold = [{}] | Delay = [{}ms] | MinThreshold = [{}%] | MaxThreshold = [{}%]'", GetCleanName(),
GetDefaultSpellTypeHold(i, bot_stance),
GetDefaultSpellTypeDelay(i, bot_stance),
GetDefaultSpellTypeMinThreshold(i, bot_stance),
GetDefaultSpellTypeMaxThreshold(i, bot_stance));
LogBotSettingsDetail("{} says, 'AggroCheck = [{}] | MinManaPCT = [{}\%] | MaxManaPCT = [{}\%] | MinHPPCT = [{}\% | MaxHPPCT = [{}\%]'", GetCleanName(), GetDefaultSpellTypeAggroCheck(i, bot_stance), GetDefaultSpellTypeMinManaLimit(i, bot_stance), GetDefaultSpellTypeMaxManaLimit(i, bot_stance), GetDefaultSpellTypeMinHPLimit(i, bot_stance), GetDefaultSpellTypeMaxHPLimit(i, bot_stance));
LogBotSettingsDetail("{} says, 'AggroCheck = [{}] | MinManaPCT = [{}%] | MaxManaPCT = [{}%] | MinHPPCT = [{}% | MaxHPPCT = [{}%]'", GetCleanName(), GetDefaultSpellTypeAggroCheck(i, bot_stance), GetDefaultSpellTypeMinManaLimit(i, bot_stance), GetDefaultSpellTypeMaxManaLimit(i, bot_stance), GetDefaultSpellTypeMinHPLimit(i, bot_stance), GetDefaultSpellTypeMaxHPLimit(i, bot_stance));
LogBotSettingsDetail("{} says, 'IdlePriority = [{}] | EngagedPriority = [{}] | PursuePriority = [{}]'", GetCleanName(), GetDefaultSpellTypeIdlePriority(i, GetClass(), bot_stance), GetDefaultSpellTypeEngagedPriority(i, GetClass(), bot_stance), GetDefaultSpellTypePursuePriority(i, GetClass(), bot_stance));
LogBotSettingsDetail("{} says, 'TargetCount = [{}] | AnnounceCast = [{}]'", GetCleanName(), GetDefaultSpellTypeAEOrGroupTargetCount(i, bot_stance), GetDefaultSpellTypeAnnounceCast(i, bot_stance));
}
@@ -10636,7 +10636,7 @@ void Bot::SetBotSpellRecastTimer(uint16 spell_type, Mob* tar, bool precast) {
BotSpell Bot::GetSpellByHealType(uint16 spell_type, Mob* tar) {
if (!TargetValidation(tar)) {
BotSpell result;
BotSpell result{};
return result;
}
+1 -3
View File
@@ -458,9 +458,7 @@ uint32 helper_bot_create(Client *bot_owner, std::string bot_name, uint8 bot_clas
return bot_id;
}
bool available_flag = false;
!database.botdb.QueryNameAvailability(bot_name, available_flag);
bool available_flag = database.botdb.QueryNameAvailability(bot_name);
if (!available_flag) {
bot_owner->Message(
+8 -12
View File
@@ -24,26 +24,22 @@
class Client;
class Seperator;
namespace
{
#define HP_RATIO_DELTA 5.0f
enum { EffectIDFirst = 1, EffectIDLast = 12 };
enum { EffectIDFirst = 1, EffectIDLast = 12 };
#define VALIDATECLASSID(x) ((x >= Class::Warrior && x <= Class::Berserker) ? (x) : (0))
// ActionableTarget action_type
// ActionableTarget action_type
#define FRIENDLY true
#define ENEMY false
enum {
AFT_None = 0,
AFT_Value,
AFT_GenderRace,
AFT_Race
};
}
enum {
AFT_None = 0,
AFT_Value,
AFT_GenderRace,
AFT_Race
};
namespace MyBots
{
+1 -3
View File
@@ -145,9 +145,7 @@ void bot_command_clone(Client *c, const Seperator *sep)
return;
}
bool available_flag = false;
!database.botdb.QueryNameAvailability(bot_name, available_flag);
bool available_flag = database.botdb.QueryNameAvailability(bot_name);
if (!available_flag) {
c->Message(
+2 -2
View File
@@ -82,8 +82,8 @@ void bot_command_pickpocket(Client *c, const Seperator *sep)
}
// Setup variables for calcs
bool steal_skill = my_bot->GetSkill(EQ::skills::SkillPickPockets);
bool steal_chance = steal_skill * 100 / (5 * over_level + 5);
uint16 steal_skill = my_bot->GetSkill(EQ::skills::SkillPickPockets);
int steal_chance = steal_skill * 100 / (5 * over_level + 5);
// Determine whether to steal money or an item.
uint32 money[6] = {
+1 -3
View File
@@ -228,7 +228,7 @@ bool BotDatabase::LoadBotSpellCastingChances()
return true;
}
bool BotDatabase::QueryNameAvailability(const std::string& bot_name, bool& available_flag)
bool BotDatabase::QueryNameAvailability(const std::string& bot_name)
{
if (
bot_name.empty() ||
@@ -239,8 +239,6 @@ bool BotDatabase::QueryNameAvailability(const std::string& bot_name, bool& avail
return false;
}
available_flag = true;
return true;
}
+1 -1
View File
@@ -45,7 +45,7 @@ public:
/* Bot functions */
bool QueryNameAvailability(const std::string& bot_name, bool& available_flag);
bool QueryNameAvailability(const std::string& bot_name);
bool QueryBotCount(const uint32 owner_id, int class_id, uint32& bot_count, uint32& bot_class_count);
bool LoadBotsList(const uint32 owner_id, std::list<BotsAvailableList>& bots_list, bool by_account = false);
+6 -6
View File
@@ -27,7 +27,7 @@
class CheatManager;
class Client;
typedef enum {
enum UpdateMovementType {
Collision = 1,
TeleportB,
TeleportA,
@@ -37,18 +37,18 @@ typedef enum {
SpellA, // Titanium - UF
Unknown0x8,
SpellB // Used in RoF+
} UpdateMovementType;
};
typedef enum {
enum ExemptionType {
ShadowStep,
KnockBack,
Port,
Assist,
Sense,
MAX_EXEMPTIONS
} ExemptionType;
};
typedef enum {
enum CheatTypes {
MQWarp,
MQWarpShadowStep,
MQWarpKnockBack,
@@ -59,7 +59,7 @@ typedef enum {
MQGhost,
MQFastMem,
MQWarpAbsolute
} CheatTypes;
};
class CheatManager {
public:
+4 -4
View File
@@ -1784,7 +1784,7 @@ void Client::Message(uint32 type, const char* message, ...) {
buf.WriteInt32(0);
buf.WriteString(buffer);
auto app = new EQApplicationPacket(OP_SpecialMesg, buf);
auto app = new EQApplicationPacket(OP_SpecialMesg, std::move(buf));
FastQueuePacket(&app);
@@ -1813,7 +1813,7 @@ void Client::FilteredMessage(Mob *sender, uint32 type, eqFilterType filter, cons
buf.WriteInt32(0);
buf.WriteString(buffer);
auto app = new EQApplicationPacket(OP_SpecialMesg, buf);
auto app = new EQApplicationPacket(OP_SpecialMesg, std::move(buf));
FastQueuePacket(&app);
@@ -3869,7 +3869,7 @@ void Client::MessageString(uint32 type, uint32 string_id, const char* message1,
buf.WriteInt8(0); // prevent oob in packet translation, maybe clean that up sometime
auto outapp = std::make_unique<EQApplicationPacket>(OP_FormattedMessage, buf);
auto outapp = std::make_unique<EQApplicationPacket>(OP_FormattedMessage, std::move(buf));
if (distance > 0)
entity_list.QueueCloseClients(this, outapp.get(), false, distance);
@@ -3987,7 +3987,7 @@ void Client::FilteredMessageString(Mob *sender, uint32 type, eqFilterType filter
buf.WriteInt8(0); // prevent oob in packet translation, maybe clean that up sometime
auto outapp = std::make_unique<EQApplicationPacket>(OP_FormattedMessage, buf);
auto outapp = std::make_unique<EQApplicationPacket>(OP_FormattedMessage, std::move(buf));
QueuePacket(outapp.get());
}
+6 -7
View File
@@ -106,7 +106,7 @@ enum { //scribing argument to MemorizeSpell
};
//Modes for the zoning state of the client.
typedef enum {
enum ZoneMode {
ZoneToSafeCoords, // Always send ZonePlayerToBind_Struct to client: Succor/Evac
GMSummon, // Always send ZonePlayerToBind_Struct to client: Only a GM Summon
GMHiddenSummon, // Always send ZonePlayerToBind_Struct to client silently: Only a GM Summon
@@ -117,7 +117,7 @@ typedef enum {
SummonPC, // In-zone GMMove() always: Call of the Hero spell or some other type of in zone only summons
Rewind, // Summon to /rewind location.
EvacToSafeCoords
} ZoneMode;
};
// translate above enum to a string
std::string GetZoneModeString(ZoneMode mode);
@@ -130,13 +130,13 @@ enum {
HideCorpseNPC = 5
};
typedef enum
enum ShowSpellType
{
Disciplines,
Spells
} ShowSpellType;
};
typedef enum
enum XTargetType
{
Empty = 0,
Auto = 1,
@@ -165,8 +165,7 @@ typedef enum
MyPetTarget = 24,
MyMercenary = 25,
MyMercenaryTarget = 26
} XTargetType;
};
struct XTarget_Struct
{
+1 -1
View File
@@ -252,7 +252,7 @@ void Client::LoadDefaultBotSettings() {
m_bot_spell_settings.push_back(t);
LogBotSettingsDetail("{} says, 'Setting defaults for {} ({}) [#{}]'", GetCleanName(), t.name, t.short_name, t.spell_type);
LogBotSettingsDetail("{} says, 'Delay = [{}ms] | MinThreshold = [{}\%] | MaxThreshold = [{}\%]'", GetCleanName(),
LogBotSettingsDetail("{} says, 'Delay = [{}ms] | MinThreshold = [{}%] | MaxThreshold = [{}%]'", GetCleanName(),
GetDefaultSpellTypeDelay(i),
GetDefaultSpellTypeMinThreshold(i), GetDefaultSpellTypeMaxThreshold(i));
}
+2 -2
View File
@@ -3223,10 +3223,10 @@ void Client::Handle_OP_AugmentItem(const EQApplicationPacket *app)
}
if (
((tobe_auged->IsAugmentSlotAvailable(new_aug->GetAugmentType(), in_augment->augment_index)) != -1) &&
tobe_auged->IsAugmentSlotAvailable(new_aug->GetAugmentType(), static_cast<uint8>(in_augment->augment_index)) &&
tobe_auged->AvailableWearSlot(new_aug->GetItem()->Slots)
) {
old_aug = tobe_auged->RemoveAugment(in_augment->augment_index);
old_aug = tobe_auged->RemoveAugment(static_cast<uint8>(in_augment->augment_index));
if (old_aug) { // An old augment was removed in order to be replaced with the new one (augment_action 2)
CalcBonuses();
+2 -2
View File
@@ -29,11 +29,11 @@ class Seperator;
typedef void (*CmdFuncPtr)(Client *, const Seperator *);
typedef struct {
struct CommandRecord {
uint8 admin;
std::string description;
CmdFuncPtr function; // null means perl function
} CommandRecord;
};
extern int (*command_dispatch)(Client *, std::string, bool);
extern int command_count; // Commands Loaded Count
+2 -2
View File
@@ -922,7 +922,7 @@ struct DataBucketCache
enum eStandingPetOrder { SPO_Follow, SPO_Sit, SPO_Guard, SPO_FeignDeath };
typedef enum {
enum PetTypeOld {
petFamiliar, //only listens to /pet get lost
petAnimation, //does not listen to any commands
petOther,
@@ -930,4 +930,4 @@ typedef enum {
petNPCFollow,
petTargetLock, //remain active as long something is on the hatelist. Don't listen to any commands
petNone = 0xFF // not a pet
} PetTypeOld;
};
+1 -1
View File
@@ -1108,7 +1108,7 @@ void EntityList::AESpell(
max_targets_allowed = RuleI(Spells, TargetedAOEMaxTargets);
} else if (
IsPBAESpell(spell_id) &&
IsDetrimentalSpell &&
is_detrimental_spell &&
!is_npc
) {
max_targets_allowed = RuleI(Spells, PointBlankAOEMaxTargets);
+1 -1
View File
@@ -4437,7 +4437,7 @@ void EntityList::QuestJournalledSayClose(
buf.WriteString(message);
}
auto outapp = new EQApplicationPacket(OP_SpecialMesg, buf);
auto outapp = new EQApplicationPacket(OP_SpecialMesg, std::move(buf));
// client only bothers logging if target spawn ID matches, safe to send to everyone
QueueCloseClients(sender, outapp, false, dist);
+2 -2
View File
@@ -17,7 +17,7 @@
*/
#pragma once
typedef enum {
enum QuestEventID {
EVENT_SAY = 0,
EVENT_TRADE, //being given an item or money
EVENT_DEATH, //being killed
@@ -169,6 +169,6 @@ typedef enum {
EVENT_SPELL_EFFECT_BOT,
EVENT_SPELL_EFFECT_BUFF_TIC_BOT,
_LargestEventID
} QuestEventID;
};
extern const char *QuestEventSubroutines[_LargestEventID];
+9 -9
View File
@@ -447,15 +447,15 @@ void DoorManipulation::CommandHandler(Client *c, const Seperator *sep)
if (arg1 == "setinclineinc") {
std::map<float, std::string> incline_values = {
{.01, "Upright"},
{63.75, "45 Degrees",},
{130, "90 Degrees"},
{192.5, "135 Degrees"},
{255, "180 Degrees"},
{321.25, "225 Degrees"},
{385, "270 Degrees"},
{448.75, "315 Degrees"},
{512.5, "360 Degrees"}
{.01f, "Upright"},
{63.75f, "45 Degrees",},
{130.f, "90 Degrees"},
{192.5f, "135 Degrees"},
{255.f, "180 Degrees"},
{321.25f, "225 Degrees"},
{385.f, "270 Degrees"},
{448.75f, "315 Degrees"},
{512.5f, "360 Degrees"}
};
std::vector<std::string> incline_normal_options;
+2 -2
View File
@@ -624,7 +624,7 @@ void Client::SendGuildMemberRankAltBanker(uint32 guild_id, uint32 rank, std::str
out->guild_id = guild_id;
out->rank_ = rank;
out->alt_banker = (alt << 1) | banker;
out->alt_banker = (alt ? 2 : 0) | (banker ? 1 : 0);
strn0cpy(out->player_name, player_name.c_str(), sizeof(out->player_name));
QueuePacket(outapp);
@@ -792,7 +792,7 @@ void EntityList::SendGuildMemberRankAltBanker(uint32 guild_id, uint32 rank_, std
out->guild_id = guild_id;
out->rank_ = rank_;
out->alt_banker = (alt << 1) | banker;
out->alt_banker = (alt ? 2 : 0) | (banker ? 1 : 0);
strn0cpy(out->player_name, player_name.c_str(), sizeof(out->player_name));
c.second->QueuePacket(outapp);
+1 -1
View File
@@ -151,7 +151,7 @@ static const struct luaL_Reg bit_funcs[] = {
*/
#define BAD_SAR (bsar(-8, 2) != (SBits)-2)
int luaopen_bit(lua_State *L)
int luaopen_bit_embed(lua_State *L)
{
UBits b;
lua_pushnumber(L, (lua_Number)1437217655L);
+3 -1
View File
@@ -17,4 +17,6 @@
*/
#pragma once
int luaopen_bit(lua_State *L);
struct lua_State;
int luaopen_bit_embed(lua_State *L);
+2 -2
View File
@@ -6920,8 +6920,8 @@ luabind::scope lua_register_events() {
luabind::value("spell_buff_tic", static_cast<int>(EVENT_SPELL_EFFECT_BUFF_TIC_CLIENT)),
luabind::value("spell_fade", static_cast<int>(EVENT_SPELL_FADE)),
luabind::value("spell_effect_translocate_complete", static_cast<int>(EVENT_SPELL_EFFECT_TRANSLOCATE_COMPLETE)),
luabind::value("combine_success ", static_cast<int>(EVENT_COMBINE_SUCCESS )),
luabind::value("combine_failure ", static_cast<int>(EVENT_COMBINE_FAILURE )),
luabind::value("combine_success", static_cast<int>(EVENT_COMBINE_SUCCESS )),
luabind::value("combine_failure", static_cast<int>(EVENT_COMBINE_FAILURE )),
luabind::value("item_click", static_cast<int>(EVENT_ITEM_CLICK)),
luabind::value("item_click_cast", static_cast<int>(EVENT_ITEM_CLICK_CAST)),
luabind::value("group_change", static_cast<int>(EVENT_GROUP_CHANGE)),
+1
View File
@@ -3732,6 +3732,7 @@ luabind::scope lua_register_mob() {
.def("GMMove", (void(Lua_Mob::*)(double,double,double))&Lua_Mob::GMMove)
.def("GMMove", (void(Lua_Mob::*)(double,double,double,double))&Lua_Mob::GMMove)
.def("GMMove", (void(Lua_Mob::*)(double,double,double,double,bool))&Lua_Mob::GMMove)
.def("Gate", &Lua_Mob::Gate)
.def("GetAA", (int(Lua_Mob::*)(int))&Lua_Mob::GetAA)
.def("GetAABonuses", &Lua_Mob::GetAABonuses)
.def("GetAAByAAID", (int(Lua_Mob::*)(int))&Lua_Mob::GetAAByAAID)
+1
View File
@@ -1068,6 +1068,7 @@ luabind::scope lua_register_npc() {
.def("GetWaypointMax", (int(Lua_NPC::*)(void))&Lua_NPC::GetWaypointMax)
.def("HasAISpellEffect", (bool(Lua_NPC::*)(int))&Lua_NPC::HasAISpellEffect)
.def("HasItem", (bool(Lua_NPC::*)(uint32))&Lua_NPC::HasItem)
.def("HasSpecialAbilities", &Lua_NPC::HasSpecialAbilities)
.def("IsAnimal", (bool(Lua_NPC::*)(void))&Lua_NPC::IsAnimal)
.def("IsGuarding", (bool(Lua_NPC::*)(void))&Lua_NPC::IsGuarding)
.def("IsLDoNLocked", (bool(Lua_NPC::*)(void))&Lua_NPC::IsLDoNLocked)
+4 -6
View File
@@ -26,7 +26,6 @@
#include "common/guilds.h"
#include "common/memory_mapped_file.h"
#include "common/misc.h"
#include "common/mutex.h"
#include "common/net/eqstream.h"
#include "common/opcodemgr.h"
#include "common/patches/patches.h"
@@ -216,8 +215,6 @@ int main(int argc, char **argv)
}
}
auto mutex = new Mutex;
LogInfo("Connecting to MySQL");
if (!database.Connect(
Config->DatabaseHost.c_str(),
@@ -245,11 +242,13 @@ int main(int argc, char **argv)
}
} else {
content_db.SetMySQL(database);
// when database and content_db share the same underlying mysql connection
// it needs to be protected by a shared mutex otherwise we produce concurrency issues
// when database actions are occurring in different threads
database.SetMutex(mutex);
content_db.SetMutex(mutex);
std::shared_ptr<DBcore::Mutex> sharedMutex = std::make_shared<DBcore::Mutex>();
database.SetMutex(sharedMutex);
content_db.SetMutex(sharedMutex);
}
//rules:
@@ -661,7 +660,6 @@ int main(int argc, char **argv)
LogInfo("Proper zone shutdown complete.");
EQEmuLogSys::Instance()->CloseFileLogs();
safe_delete(mutex);
safe_delete(QServ);
return 0;
+1 -1
View File
@@ -17,7 +17,7 @@
*/
#include "common/compression.h"
#include "common/file.h"
#include "common/memory/ksm.hpp"
#include "common/memory/ksm.h"
#include "common/misc_functions.h"
#include "zone/client.h"
#include "zone/map.h"
+2 -2
View File
@@ -32,7 +32,7 @@
#include <deque>
#include <list>
typedef struct {
struct NPCProximity {
float min_x;
float max_x;
float min_y;
@@ -41,7 +41,7 @@ typedef struct {
float max_z;
bool say;
bool proximity_set;
} NPCProximity;
};
struct AISpells_Struct {
uint32 type; // 0 = never, must be one (and only one) of the defined values
+9 -8
View File
@@ -135,10 +135,11 @@ void PetitionList::AddPetition(Petition* pet) {
}
//Return Values: 0 = Ok ; -1 = Error deleting petition.
int PetitionList::DeletePetition(uint32 petnumber) {
int PetitionList::DeletePetition(uint32 petnumber)
{
LinkedListIterator<Petition*> iterator(list);
iterator.Reset();
LockMutex lock(&PList_Mutex);
std::scoped_lock lock(PList_Mutex);
while(iterator.MoreElements()) {
if (iterator.GetData()->GetID() == petnumber) {
database.DeletePetitionFromDB(iterator.GetData());
@@ -179,18 +180,18 @@ void PetitionList::ClearPetitions() {
return;
}
void PetitionList::ReadDatabase() {
LockMutex lock(&PList_Mutex);
void PetitionList::ReadDatabase()
{
std::scoped_lock lock(PList_Mutex);
ClearPetitions();
database.RefreshPetitionsFromDB();
UpdateGMQueue();
return;
}
void PetitionList::UpdatePetition(Petition* pet) {
LockMutex lock(&PList_Mutex);
void PetitionList::UpdatePetition(Petition* pet)
{
std::scoped_lock lock(PList_Mutex);
database.UpdatePetitionToDB(pet);
return;
}
void ZoneDatabase::DeletePetitionFromDB(Petition* wpet) {
+3 -6
View File
@@ -18,12 +18,9 @@
#pragma once
#include "common/linked_list.h"
#include "common/misc_functions.h"
#include "common/mutex.h"
#include "common/types.h"
#include "common/zone_store.h"
#include "zone/client.h"
#include "zone/zonedb.h"
#include <mutex>
class Client;
@@ -118,5 +115,5 @@ public:
private:
LinkedList<Petition*> list;
Mutex PList_Mutex;
std::mutex PList_Mutex;
};
+1 -12
View File
@@ -2779,18 +2779,7 @@ bool QuestManager::createBot(const char *name, const char *lastname, uint8 level
}
std::string test_name = name;
bool available_flag = false;
if (!database.botdb.QueryNameAvailability(test_name, available_flag)) {
initiator->Message(
Chat::White,
fmt::format(
"Failed to query name availability for '{}'.",
test_name
).c_str()
);
return false;
}
bool available_flag = database.botdb.QueryNameAvailability(test_name);
if (!available_flag) {
initiator->Message(
Chat::White,
+1 -1
View File
@@ -18,7 +18,7 @@
#include "raycast_mesh.h"
#include "common/eqemu_logsys.h"
#include "common/memory/ksm.hpp"
#include "common/memory/ksm.h"
#include <cassert>
#include <cmath>
+2 -2
View File
@@ -117,7 +117,7 @@ void SharedTaskZoneMessaging::HandleWorldMessage(ServerPacket *pack)
buf.WriteInt8(m.is_leader ? 1 : 0);
}
auto outapp = std::make_unique<EQApplicationPacket>(OP_SharedTaskMemberList, buf);
auto outapp = std::make_unique<EQApplicationPacket>(OP_SharedTaskMemberList, std::move(buf));
c->QueuePacket(outapp.get());
}
@@ -141,7 +141,7 @@ void SharedTaskZoneMessaging::HandleWorldMessage(ServerPacket *pack)
// live sends more after the name but it might just be garbage from
// a re-used buffer (possibly a former name[64] buffer?)
auto outapp = std::make_unique<EQApplicationPacket>(OP_SharedTaskMemberChange, buf);
auto outapp = std::make_unique<EQApplicationPacket>(OP_SharedTaskMemberChange, std::move(buf));
c->QueuePacket(outapp.get());
}
+3 -3
View File
@@ -858,7 +858,7 @@ void TaskManager::SendTaskSelector(Client* client, Mob* mob, const std::vector<i
client->GetTaskState()->AddOffer(task_list[i], mob->GetID());
}
auto outapp = std::make_unique<EQApplicationPacket>(OP_TaskSelectWindow, buf);
auto outapp = std::make_unique<EQApplicationPacket>(OP_TaskSelectWindow, std::move(buf));
client->QueuePacket(outapp.get());
}
@@ -883,7 +883,7 @@ void TaskManager::SendSharedTaskSelector(Client* client, Mob* mob, const std::ve
client->GetTaskState()->AddOffer(task_id, mob->GetID());
}
auto outapp = std::make_unique<EQApplicationPacket>(OP_SharedTaskSelectWindow, buf);
auto outapp = std::make_unique<EQApplicationPacket>(OP_SharedTaskSelectWindow, std::move(buf));
client->QueuePacket(outapp.get());
}
@@ -1009,7 +1009,7 @@ void TaskManager::SendTaskActivityLong(
activity.SerializeObjective(buf, client->ClientVersion(), done_count);
auto outapp = std::make_unique<EQApplicationPacket>(OP_TaskActivity, buf);
auto outapp = std::make_unique<EQApplicationPacket>(OP_TaskActivity, std::move(buf));
client->QueuePacket(outapp.get());
}
+2 -2
View File
@@ -621,7 +621,7 @@ void Object::HandleAutoCombine(Client* user, const RecipeAutoCombine_Struct* rac
}
if (spec.tradeskill == EQ::skills::SkillAlchemy) {
if (!user->GetClass() == Class::Shaman) {
if (user->GetClass() != Class::Shaman) {
user->Message(Chat::Red, "This tradeskill can only be performed by a shaman.");
auto outapp = new EQApplicationPacket(OP_TradeSkillCombine, 0);
user->QueuePacket(outapp);
@@ -646,7 +646,7 @@ void Object::HandleAutoCombine(Client* user, const RecipeAutoCombine_Struct* rac
}
}
else if (spec.tradeskill == EQ::skills::SkillMakePoison) {
if (!user->GetClass() == Class::Rogue) {
if (user->GetClass() != Class::Rogue) {
user->Message(Chat::Red, "Only rogues can mix poisons.");
auto outapp = new EQApplicationPacket(OP_TradeSkillCombine, 0);
user->QueuePacket(outapp);
+3 -2
View File
@@ -21,13 +21,14 @@
#pragma pack(push)
#pragma pack(1)
typedef struct ZBSP_Node {
struct ZBSP_Node {
int32 node_number;
float normal[3], splitdistance;
int32 region;
int32 special;
int32 left, right;
} ZBSP_Node;
};
#pragma pack(pop)
+1 -1
View File
@@ -550,7 +550,7 @@ void WorldServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p)
SerializeBuffer buf(100);
buf.WriteString(smotd->motd);
auto outapp = std::make_unique<EQApplicationPacket>(OP_MOTD, buf);
auto outapp = std::make_unique<EQApplicationPacket>(OP_MOTD, std::move(buf));
entity_list.QueueClients(0, outapp.get());
break;