mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-19 17:38:26 +00:00
Implement new rule based ranges for various range based packet operations (performance)
- the defaults are set in the code and can be tweaked by sourcing utils/sql/git/optional/rule_values_range_update.sql - Thanks to mackal for gathering live ranges, thanks to takp for initial numbers - We would send 200 for combat updates and the client will only display <= range 54 anyways, these should help a lot in spammy combat RULE_CATEGORY( Range ) RULE_INT ( Range, Say, 135 ) RULE_INT ( Range, Emote, 135 ) RULE_INT ( Range, BeginCast, 200) RULE_INT ( Range, Anims, 135) RULE_INT ( Range, DamageMessages, 50) RULE_INT ( Range, SpellMessages, 75) RULE_INT ( Range, SongMessages, 75) RULE_CATEGORY_END()
This commit is contained in:
+9
-8
@@ -364,7 +364,7 @@ bool Mob::DoCastSpell(uint16 spell_id, uint16 target_id, CastingSlot slot,
|
||||
|
||||
Message_StringID(MT_SpellFailure, fizzle_msg);
|
||||
entity_list.FilteredMessageClose_StringID(
|
||||
this, true, 200, MT_SpellFailure, IsClient() ? FilterPCSpells : FilterNPCSpells,
|
||||
this, true, RuleI(Range, SpellMessages), MT_SpellFailure, IsClient() ? FilterPCSpells : FilterNPCSpells,
|
||||
fizzle_msg == MISS_NOTE ? MISSED_NOTE_OTHER : SPELL_FIZZLE_OTHER, GetName());
|
||||
|
||||
TryTriggerOnValueAmount(false, true);
|
||||
@@ -469,7 +469,7 @@ bool Mob::DoCastSpell(uint16 spell_id, uint16 target_id, CastingSlot slot,
|
||||
begincast->spell_id = spell_id;
|
||||
begincast->cast_time = orgcasttime; // client calculates reduced time by itself
|
||||
outapp->priority = 3;
|
||||
entity_list.QueueCloseClients(this, outapp, false, 200, 0, true); //IsClient() ? FILTER_PCSPELLS : FILTER_NPCSPELLS);
|
||||
entity_list.QueueCloseClients(this, outapp, false, RuleI(Range, BeginCast), 0, true); //IsClient() ? FILTER_PCSPELLS : FILTER_NPCSPELLS);
|
||||
safe_delete(outapp);
|
||||
}
|
||||
|
||||
@@ -886,7 +886,7 @@ void Mob::InterruptSpell(uint16 message, uint16 color, uint16 spellid)
|
||||
ic->messageid = message_other;
|
||||
ic->spawnid = GetID();
|
||||
strcpy(ic->message, GetCleanName());
|
||||
entity_list.QueueCloseClients(this, outapp, true, 200, 0, true, IsClient() ? FilterPCSpells : FilterNPCSpells);
|
||||
entity_list.QueueCloseClients(this, outapp, true, RuleI(Range, SongMessages), 0, true, IsClient() ? FilterPCSpells : FilterNPCSpells);
|
||||
safe_delete(outapp);
|
||||
|
||||
}
|
||||
@@ -1096,7 +1096,7 @@ void Mob::CastedSpellFinished(uint16 spell_id, uint32 target_id, CastingSlot slo
|
||||
// if we got here, we regained concentration
|
||||
regain_conc = true;
|
||||
Message_StringID(MT_Spells,REGAIN_AND_CONTINUE);
|
||||
entity_list.MessageClose_StringID(this, true, 200, MT_Spells, OTHER_REGAIN_CAST, this->GetCleanName());
|
||||
entity_list.MessageClose_StringID(this, true, RuleI(Range, SpellMessages), MT_Spells, OTHER_REGAIN_CAST, this->GetCleanName());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2609,7 +2609,7 @@ void Mob::BardPulse(uint16 spell_id, Mob *caster) {
|
||||
action->buff_unknown = 0;
|
||||
action->level = buffs[buffs_i].casterlevel;
|
||||
action->type = DamageTypeSpell;
|
||||
entity_list.QueueCloseClients(this, packet, false, 200, 0, true, IsClient() ? FilterPCSpells : FilterNPCSpells);
|
||||
entity_list.QueueCloseClients(this, packet, false, RuleI(Range, SongMessages), 0, true, IsClient() ? FilterPCSpells : FilterNPCSpells);
|
||||
|
||||
action->buff_unknown = 4;
|
||||
|
||||
@@ -2681,7 +2681,7 @@ void Mob::BardPulse(uint16 spell_id, Mob *caster) {
|
||||
cd->damage = 0;
|
||||
if(!IsEffectInSpell(spell_id, SE_BindAffinity))
|
||||
{
|
||||
entity_list.QueueCloseClients(this, message_packet, false, 200, 0, true, IsClient() ? FilterPCSpells : FilterNPCSpells);
|
||||
entity_list.QueueCloseClients(this, message_packet, false, RuleI(Range, SongMessages), 0, true, IsClient() ? FilterPCSpells : FilterNPCSpells);
|
||||
}
|
||||
safe_delete(message_packet);
|
||||
safe_delete(packet);
|
||||
@@ -3484,8 +3484,9 @@ bool Mob::SpellOnTarget(uint16 spell_id, Mob *spelltar, bool reflect, bool use_r
|
||||
spelltar->CastToClient()->QueuePacket(action_packet);
|
||||
if(IsClient()) // send to caster
|
||||
CastToClient()->QueuePacket(action_packet);
|
||||
|
||||
// send to people in the area, ignoring caster and target
|
||||
entity_list.QueueCloseClients(spelltar, action_packet, true, 200, this, true, spelltar->IsClient() ? FilterPCSpells : FilterNPCSpells);
|
||||
entity_list.QueueCloseClients(spelltar, action_packet, true, RuleI(Range, SpellMessages), this, true, spelltar->IsClient() ? FilterPCSpells : FilterNPCSpells);
|
||||
|
||||
/* Send the EVENT_CAST_ON event */
|
||||
if(spelltar->IsNPC())
|
||||
@@ -3956,7 +3957,7 @@ bool Mob::SpellOnTarget(uint16 spell_id, Mob *spelltar, bool reflect, bool use_r
|
||||
cd->damage = 0;
|
||||
if(!IsEffectInSpell(spell_id, SE_BindAffinity))
|
||||
{
|
||||
entity_list.QueueCloseClients(spelltar, message_packet, false, 200, 0, true, spelltar->IsClient() ? FilterPCSpells : FilterNPCSpells);
|
||||
entity_list.QueueCloseClients(spelltar, message_packet, false, RuleI(Range, SpellMessages), 0, true, spelltar->IsClient() ? FilterPCSpells : FilterNPCSpells);
|
||||
}
|
||||
safe_delete(action_packet);
|
||||
safe_delete(message_packet);
|
||||
|
||||
Reference in New Issue
Block a user