mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-13 10:31:29 +00:00
Add 2013 NPC vs NPC push change
They remove NPC vs NPC melee push in 2013
This commit is contained in:
parent
7edc891605
commit
d71e79b306
@ -3615,23 +3615,32 @@ void Mob::CommonDamage(Mob* attacker, int &damage, const uint16 spell_id, const
|
||||
if (RuleB(Combat, MeleePush) && damage > 0 && !IsRooted() &&
|
||||
(IsClient() || zone->random.Roll(RuleI(Combat, MeleePushChance)))) {
|
||||
a->force = EQEmu::skills::GetSkillMeleePushForce(skill_used);
|
||||
if (IsNPC())
|
||||
if (IsNPC()) {
|
||||
if (attacker->IsNPC())
|
||||
a->force = 0.0f; // 2013 change that disabled NPC vs NPC push
|
||||
else
|
||||
a->force *= 0.10f; // force against NPCs is divided by 10 I guess? ex bash is 0.3, parsed 0.03 against an NPC
|
||||
}
|
||||
// update NPC stuff
|
||||
auto new_pos = glm::vec3(m_Position.x + (a->force * std::cos(a->hit_heading) + m_Delta.x),
|
||||
if (a->force != 0.0f) {
|
||||
auto new_pos = glm::vec3(
|
||||
m_Position.x + (a->force * std::cos(a->hit_heading) + m_Delta.x),
|
||||
m_Position.y + (a->force * std::sin(a->hit_heading) + m_Delta.y), m_Position.z);
|
||||
if (position_update_melee_push_timer.Check() && zone->zonemap && zone->zonemap->CheckLoS(glm::vec3(m_Position), new_pos)) { // If we have LoS on the new loc it should be reachable.
|
||||
if (position_update_melee_push_timer.Check() && 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);
|
||||
SendPositionUpdate();
|
||||
}
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
a->force = 0.0f; // we couldn't move there, so lets not
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//Note: if players can become pets, they will not receive damage messages of their own
|
||||
//this was done to simplify the code here (since we can only effectively skip one mob on queue)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user