]> git.localhorst.tv Git - l2e.git/blobdiff - src/battle/states/PerformAttacks.cpp
added sword attack animation
[l2e.git] / src / battle / states / PerformAttacks.cpp
index 498014a551d68b8fd81494989a8de44cc558a350..2a8f3a53b697a4aecb3e5270c4e7c65d4be69ff9 100644 (file)
@@ -79,11 +79,12 @@ void PerformAttacks::HandleEvents(const Input &input) {
                        case AttackChoice::SWORD:
                                if (hero.HasWeapon()) {
                                        titleBarText = hero.Weapon()->Name();
+                                       targetAnimation = hero.Weapon()->AttackAnimation();
                                } else {
                                        titleBarText = "Melee attack!";
+                                       targetAnimation = hero.MeleeAnimation();
                                }
                                moveAnimation = hero.AttackAnimation();
-                               targetAnimation = hero.MeleeAnimation();
 
                                numberAnimation.push_back(NumberAnimation(15, battle->Res().numberAnimationPrototype, battle->Res().bigNumberSprite));
                                if (ac.Selection().TargetsEnemies()) {