Jump to content

[Patch] Creature Off Hand Attack.


maxxx2021
 Share

Recommended Posts

I am a bit wondering about how the timers should actually work.

atm you let them work that the main-attack is done if possible, and if it was done, the off-attack is skipped - is this correct?

should the off-attack happen on the next tick, or in the same tick, or with some time delay?

also in case both timers are down, but getVictim is out of melee reach, you will need two additional tests for this, I guess this can be improved to be faster.

Link to comment
Share on other sites

I am a bit wondering about how the timers should actually work.

atm you let them work that the main-attack is done if possible, and if it was done, the off-attack is skipped - is this correct?

should the off-attack happen on the next tick, or in the same tick, or with some time delay?

also in case both timers are down, but getVictim is out of melee reach, you will need two additional tests for this, I guess this can be improved to be faster.

if (m_creature->isAttackReady(attType) && m_creature->CanReachWithMeleeAttack(m_creature->getVictim()))

If attack ready (change timer) and victim in the attack distance:

m_creature->AttackerStateUpdate(m_creature->getVictim(), attType);

"the main-attack is done if possible, and if it was done, the off-attack is skipped - is this correct?" Yes its right!

P.S. In any way he not strike if the getVictim is far.

Link to comment
Share on other sites

UpdateFields.h is generated file, so please use existed enums instead adding new

But in sniff "UNIT_FIELD_BASEATTACKTIME_2" use how time for Off Hand attack.

UNIT_FIELD_BASEATTACKTIME = OBJECT_END + 0x0038

UNIT_FIELD_BASEATTACKTIME + 1 in core = OBJECT_END + 0x0039

now UNIT_FIELD_BASEATTACKTIME_2 = OBJECT_END + 0x0039 How in sniff

Link to comment
Share on other sites

  • 2 months later...
 Share

×
×
  • 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