Jump to content

How to modify the melee attack range ?


Guest dardennf

Recommended Posts

  • 4 months later...

there is in Player::Update

    if (hasUnitState(UNIT_STAT_MELEE_ATTACKING))
   {
       Unit *pVictim = getVictim();
       if (pVictim && !IsNonMeleeSpellCasted(false))
       {
           // default combat reach 10
           // TODO add weapon,skill check

           float pldistance = ATTACK_DISTANCE;

           if (isAttackReady(BASE_ATTACK))
           {
               if(!IsWithinDistInMap(pVictim, pldistance))
               {
                   setAttackTimer(BASE_ATTACK,100);
                   if(m_swingErrorMsg != 1)                // send single time (client auto repeat)
                   {
                       SendAttackSwingNotInRange();
                       m_swingErrorMsg = 1;
                   }
               }
...

in Object.h ATTACK_DISTANCE is set to 5.0f

Link to comment
Share on other sites

Yes, I think it depends on class but, even with this factor of variation : a rogue, a war and a paladin (all melee class but at least 3 of them), hit farther than on retail i'm sure of it ^^.

I will try to make a short movie to show you.

Anyway, thank you.

PS : it's very important, because this could change a lot of things in PvP.

PS 2 : if somebody have more infos, share it !

Link to comment
Share on other sites

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use