File: zone/attack.cpp
Snippet:
Code:
a->meleepush_xy = attacker->GetHeading() * 2.0f;
if (RuleB(Combat, MeleePush) && damage > 0 && !IsRooted() &&
(IsClient() || zone->random.Roll(RuleI(Combat, MeleePushChance)))) {
a->force = EQEmu::GetSkillMeleePushForce(skill_used);
// update NPC stuff
auto new_pos = glm::vec3(m_Position.x + (a->force * std::sin(a->meleepush_xy) + m_Delta.x),
m_Position.y + (a->force * std::cos(a->meleepush_xy) + m_Delta.y), m_Position.z);
if (zone->zonemap && zone->zonemap->CheckLoS(glm::vec3(m_Position), new_pos)) { // If we have LoS on the new loc it should be reachable.
if (IsNPC()) {
// Is this adequate?
Teleport(new_pos);
SendPosUpdate();
}
} else {
a->force = 0.0f; // we couldn't move there, so lets not
}
}
That's the logic there. Note that "Mob" inherits all things. Meaning, disabling melee push here would result in *nothing* being pushed, PCs, pets, NPCs, *everything*.
This would mean, short of actual stuns or bash attacks, nobody will ever get interrupted while casting (movement is the sole cause of interrupting PCs/NPCs beyond genuine stuns). You could therefore situationally disable melee push for just NPCs or just PCs or whatever.
Disabling melee push on NPCs will make the game harder (with melee push, you have a shot at causing melee push to interrupt that NPC's Complete Heal cast. Without, all NPC spells guaranteed will succeed without a genuine stun/bash effect). You can do this by setting the rule MeleePushChance to 0, per the above code.
Disabling melee push on PCs will make the game easier (same reason, impossible to be interrupted now unless something genuinely stuns you with spell or bash). You would set the rule MeleePush to false to disable melee push wholesale for everything.