mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-31 04:56:20 +00:00
Finishing up PR comments
This commit is contained in:
+4
-4
@@ -3811,10 +3811,10 @@ void Client::MessageString(uint32 type, uint32 string_id, uint32 distance)
|
||||
return;
|
||||
|
||||
if (distance > 0)
|
||||
ClientPatch::CloseMessageString(this, false, static_cast<float>(distance))(
|
||||
ClientPatch::BroadcastMessageStringInRadius(this, false, static_cast<float>(distance))(
|
||||
type, string_id);
|
||||
else
|
||||
ClientPatch::MessageString(this, type, string_id);
|
||||
ClientPatch::SendMessageString(this, type, string_id);
|
||||
}
|
||||
|
||||
//
|
||||
@@ -3843,10 +3843,10 @@ void Client::MessageString(uint32 type, uint32 string_id, const char* message1,
|
||||
type = 4;
|
||||
|
||||
if (distance > 0)
|
||||
ClientPatch::CloseMessageString(this, false, static_cast<float>(distance))(type, string_id, message1,
|
||||
ClientPatch::BroadcastMessageStringInRadius(this, false, static_cast<float>(distance))(type, string_id, message1,
|
||||
message2, message3, message4, message5, message6, message7, message8, message9);
|
||||
else
|
||||
ClientPatch::MessageString(this, type, string_id, message1, message2, message3, message4, message5,
|
||||
ClientPatch::SendMessageString(this, type, string_id, message1, message2, message3, message4, message5,
|
||||
message6, message7, message8, message9);
|
||||
}
|
||||
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
#include "common/rulesys.h"
|
||||
#include "common/shared_tasks.h"
|
||||
#include "zone/bot.h"
|
||||
#include "zone/client_version.h"
|
||||
#include "zone/dialogue_window.h"
|
||||
#include "zone/dynamic_zone.h"
|
||||
#include "zone/event_codes.h"
|
||||
@@ -61,8 +62,6 @@
|
||||
#include <numbers>
|
||||
#include <set>
|
||||
|
||||
#include "client_version.h"
|
||||
|
||||
extern QueryServ* QServ;
|
||||
extern Zone* zone;
|
||||
extern volatile bool is_zone_loaded;
|
||||
|
||||
@@ -123,7 +123,6 @@ void FastQueuePacket(Client* c, Fun fun, Obj* obj, Args&&... args)
|
||||
if (app) {
|
||||
// FastQueuePacket specifically takes lifetime management of packet, so release here
|
||||
EQApplicationPacket* packet = app.release();
|
||||
LogNetcode("S->C FastQueuePacket {}", DumpPacketToString(packet));
|
||||
c->FastQueuePacket(&packet);
|
||||
}
|
||||
}
|
||||
@@ -158,17 +157,17 @@ inline auto QueueClientsByTarget(Mob* sender, bool ackreq, const SendPredicate&
|
||||
// Helper functions to wrap the packet construction in sends
|
||||
template <AllConstChar... Args>
|
||||
requires (sizeof...(Args) <= 9)
|
||||
void MessageString(Client* c, uint32_t type, uint32_t id, Args&&... args)
|
||||
void SendMessageString(Client* c, uint32_t type, uint32_t id, Args&&... args)
|
||||
{
|
||||
if constexpr (sizeof...(Args) == 0) {
|
||||
QueuePacket(c, &IMessage::Simple, GetClientComponent<IMessage>(c), type, id);
|
||||
} else {
|
||||
std::array<const char*, 9> a = {args...};
|
||||
IMessage::FormattedArgs a = {args...};
|
||||
QueuePacket(c, &IMessage::Formatted, GetClientComponent<IMessage>(c), type, id, a);
|
||||
}
|
||||
}
|
||||
|
||||
inline auto CloseMessageString(
|
||||
inline auto BroadcastMessageStringInRadius(
|
||||
Mob* sender, bool ignore_sender = false, float distance = 200.f,
|
||||
Mob* skipped_mob = nullptr, bool is_ack_required = true,
|
||||
eqFilterType filter = FilterNone)
|
||||
@@ -182,7 +181,7 @@ inline auto CloseMessageString(
|
||||
if constexpr (sizeof...(Args) == 0) {
|
||||
return queue_close_clients(&IMessage::Simple, GetClientComponent<IMessage>, type, id);
|
||||
} else {
|
||||
std::array<const char*, 9> a = {args...};
|
||||
IMessage::FormattedArgs a = {args...};
|
||||
return queue_close_clients(&IMessage::Formatted, GetClientComponent<IMessage>, type, id, a);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -4420,7 +4420,7 @@ void Mob::BuffFadeBySlot(int slot, bool iRecalcBonuses)
|
||||
owner->SetPet(0);
|
||||
}
|
||||
|
||||
// Any client that has a previous charmed pet targetted shouldo
|
||||
// Any client that has a previous charmed pet targeted should
|
||||
// no longer see the buffs on the old pet.
|
||||
// QueueClientsByTarget preserves GM and leadership cases.
|
||||
|
||||
|
||||
+2
-2
@@ -339,12 +339,12 @@ bool Mob::DoCastSpell(int32 spell_id, uint16 target_id, CastingSlot slot,
|
||||
Links::FormatSpellLink(spell_link, Links::MAX_LINK_SIZE, spell_id);
|
||||
|
||||
if (IsClient())
|
||||
ClientPatch::MessageString(CastToClient(), Chat::SpellFailure, fizzle_msg, spell_link);
|
||||
ClientPatch::SendMessageString(CastToClient(), Chat::SpellFailure, fizzle_msg, spell_link);
|
||||
|
||||
/**
|
||||
* Song Failure message
|
||||
*/
|
||||
ClientPatch::CloseMessageString(this, true, RuleI(Range, SpellMessages),
|
||||
ClientPatch::BroadcastMessageStringInRadius(this, true, RuleI(Range, SpellMessages),
|
||||
nullptr, true, IsClient() ? FilterPCSpells : FilterNPCSpells)(
|
||||
Chat::SpellFailure, fizzle_msg == MISS_NOTE ? MISSED_NOTE_OTHER : SPELL_FIZZLE_OTHER, GetName(), spell_link);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user