Go Back   EQEmulator Home > EQEmulator Forums > Development > Development::Database/World Building

Development::Database/World Building World Building forum, dedicated to the EQEmu MySQL Database. Post partial/complete databases for spawns, items, etc.

Reply
 
Thread Tools Display Modes
  #1  
Old 02-15-2016, 11:10 PM
emho24
Fire Beetle
 
Join Date: Sep 2013
Posts: 19
Default Combat push?

I've searched the forums and wiki - I've obviously missed this. How do you disable all the pushing around that happens in melee?
Reply With Quote
  #2  
Old 02-16-2016, 09:56 AM
Freshmaker
Fire Beetle
 
Join Date: May 2010
Posts: 5
Default

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.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 01:52 AM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3