File tree Expand file tree Collapse file tree
src/server/game/Entities/Player Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1029,6 +1029,15 @@ void Player::Update(uint32 p_time)
10291029 m_swingErrorMsg = 2;
10301030 }
10311031 }
1032+ else if (!IsValidAttackTarget(victim))
1033+ {
1034+ setAttackTimer(BASE_ATTACK, 100);
1035+ if (m_swingErrorMsg != 3) // send single time (client auto repeat)
1036+ {
1037+ SendAttackSwingCantAttack();
1038+ m_swingErrorMsg = 3;
1039+ }
1040+ }
10321041 else
10331042 {
10341043 m_swingErrorMsg = 0; // reset swing error state
@@ -1050,6 +1059,8 @@ void Player::Update(uint32 p_time)
10501059 setAttackTimer(OFF_ATTACK, 100);
10511060 else if (!HasInArc(2 * float(M_PI) / 3, victim))
10521061 setAttackTimer(OFF_ATTACK, 100);
1062+ else if (!IsValidAttackTarget(victim))
1063+ setAttackTimer(OFF_ATTACK, 100);
10531064 else
10541065 {
10551066 // prevent base and off attack in same time, delay attack at 0.2 sec
You can’t perform that action at this time.
0 commit comments