mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-13 10:31:29 +00:00
Fix for random SoF client crashes (possibly Titanium too)
This commit is contained in:
parent
37ff8c830d
commit
18005ac7a9
@ -1862,6 +1862,9 @@ void Client::CheckManaEndUpdate() {
|
|||||||
mana_change->stamina = current_endurance;
|
mana_change->stamina = current_endurance;
|
||||||
mana_change->spell_id = casting_spell_id;
|
mana_change->spell_id = casting_spell_id;
|
||||||
mana_change->keepcasting = 1;
|
mana_change->keepcasting = 1;
|
||||||
|
mana_change->padding[0] = 0;
|
||||||
|
mana_change->padding[1] = 0;
|
||||||
|
mana_change->padding[2] = 0;
|
||||||
outapp->priority = 6;
|
outapp->priority = 6;
|
||||||
QueuePacket(outapp);
|
QueuePacket(outapp);
|
||||||
safe_delete(outapp);
|
safe_delete(outapp);
|
||||||
@ -1883,8 +1886,9 @@ void Client::CheckManaEndUpdate() {
|
|||||||
mana_update->cur_mana = GetMana();
|
mana_update->cur_mana = GetMana();
|
||||||
mana_update->max_mana = GetMaxMana();
|
mana_update->max_mana = GetMaxMana();
|
||||||
mana_update->spawn_id = GetID();
|
mana_update->spawn_id = GetID();
|
||||||
QueuePacket(mana_packet);
|
if ((ClientVersionBit() & EQEmu::versions::ClientVersionBit::bit_SoDAndLater) != 0)
|
||||||
entity_list.QueueClientsByXTarget(this, mana_packet, false);
|
QueuePacket(mana_packet); // do we need this with the OP_ManaChange packet above?
|
||||||
|
entity_list.QueueClientsByXTarget(this, mana_packet, false, EQEmu::versions::ClientVersionBit::bit_SoDAndLater);
|
||||||
safe_delete(mana_packet);
|
safe_delete(mana_packet);
|
||||||
|
|
||||||
last_reported_mana_percent = this->GetManaPercent();
|
last_reported_mana_percent = this->GetManaPercent();
|
||||||
@ -1907,8 +1911,9 @@ void Client::CheckManaEndUpdate() {
|
|||||||
endurance_update->cur_end = GetEndurance();
|
endurance_update->cur_end = GetEndurance();
|
||||||
endurance_update->max_end = GetMaxEndurance();
|
endurance_update->max_end = GetMaxEndurance();
|
||||||
endurance_update->spawn_id = GetID();
|
endurance_update->spawn_id = GetID();
|
||||||
QueuePacket(endurance_packet);
|
if ((ClientVersionBit() & EQEmu::versions::ClientVersionBit::bit_SoDAndLater) != 0)
|
||||||
entity_list.QueueClientsByXTarget(this, endurance_packet, false);
|
QueuePacket(endurance_packet); // do we need this with the OP_ManaChange packet above?
|
||||||
|
entity_list.QueueClientsByXTarget(this, endurance_packet, false, EQEmu::versions::ClientVersionBit::bit_SoDAndLater);
|
||||||
safe_delete(endurance_packet);
|
safe_delete(endurance_packet);
|
||||||
|
|
||||||
last_reported_endurance_percent = this->GetEndurancePercent();
|
last_reported_endurance_percent = this->GetEndurancePercent();
|
||||||
|
|||||||
@ -1546,7 +1546,7 @@ void EntityList::QueueClientsByTarget(Mob *sender, const EQApplicationPacket *ap
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void EntityList::QueueClientsByXTarget(Mob *sender, const EQApplicationPacket *app, bool iSendToSender)
|
void EntityList::QueueClientsByXTarget(Mob *sender, const EQApplicationPacket *app, bool iSendToSender, EQEmu::versions::ClientVersionBit client_version_bits)
|
||||||
{
|
{
|
||||||
auto it = client_list.begin();
|
auto it = client_list.begin();
|
||||||
while (it != client_list.end()) {
|
while (it != client_list.end()) {
|
||||||
@ -1556,6 +1556,9 @@ void EntityList::QueueClientsByXTarget(Mob *sender, const EQApplicationPacket *a
|
|||||||
if (!c || ((c == sender) && !iSendToSender))
|
if (!c || ((c == sender) && !iSendToSender))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
if ((c->ClientVersionBit() & client_version_bits) == 0)
|
||||||
|
continue;
|
||||||
|
|
||||||
if (!c->IsXTarget(sender))
|
if (!c->IsXTarget(sender))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
|||||||
@ -353,7 +353,7 @@ public:
|
|||||||
void QueueClientsByTarget(Mob* sender, const EQApplicationPacket* app, bool iSendToSender = true, Mob* SkipThisMob = 0, bool ackreq = true,
|
void QueueClientsByTarget(Mob* sender, const EQApplicationPacket* app, bool iSendToSender = true, Mob* SkipThisMob = 0, bool ackreq = true,
|
||||||
bool HoTT = true, uint32 ClientVersionBits = 0xFFFFFFFF, bool inspect_buffs = false);
|
bool HoTT = true, uint32 ClientVersionBits = 0xFFFFFFFF, bool inspect_buffs = false);
|
||||||
|
|
||||||
void QueueClientsByXTarget(Mob* sender, const EQApplicationPacket* app, bool iSendToSender = true);
|
void QueueClientsByXTarget(Mob* sender, const EQApplicationPacket* app, bool iSendToSender = true, EQEmu::versions::ClientVersionBit client_version_bits = EQEmu::versions::ClientVersionBit::bit_AllClients);
|
||||||
void QueueToGroupsForNPCHealthAA(Mob* sender, const EQApplicationPacket* app);
|
void QueueToGroupsForNPCHealthAA(Mob* sender, const EQApplicationPacket* app);
|
||||||
void QueueManaged(Mob* sender, const EQApplicationPacket* app, bool ignore_sender=false, bool ackreq = true);
|
void QueueManaged(Mob* sender, const EQApplicationPacket* app, bool ignore_sender=false, bool ackreq = true);
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user