]> git.localhorst.tv Git - l2e.git/blobdiff - src/battle/TargetSelection.cpp
added capsule attack/animation handling
[l2e.git] / src / battle / TargetSelection.cpp
index 42a88e4673b0444129fac3587564f090a578ee55..961f57cf845cdf703014c83345dc569803a231f9 100644 (file)
@@ -67,6 +67,7 @@ void TargetSelection::MoveUp() {
 }
 
 void TargetSelection::MoveRight() {
+       assert(battle);
        if (TargetsMonsters()) {
                cursor = (cursor + 1) % battle->MaxMonsters();
                while (!battle->MonsterPositionOccupied(cursor)) {
@@ -78,6 +79,7 @@ void TargetSelection::MoveRight() {
 }
 
 void TargetSelection::MoveDown() {
+       assert(battle);
        if (TargetsMonsters()) {
                SelectHeroes();
                return;
@@ -89,6 +91,7 @@ void TargetSelection::MoveDown() {
 }
 
 void TargetSelection::MoveLeft() {
+       assert(battle);
        if (TargetsMonsters()) {
                cursor = (cursor + battle->MaxMonsters() - 1) % battle->MaxMonsters();
                FindNextEnemy();
@@ -98,6 +101,7 @@ void TargetSelection::MoveLeft() {
 }
 
 void TargetSelection::FindNextEnemy() {
+       assert(battle);
        int start(cursor);
        while (!battle->MonsterPositionOccupied(cursor)) {
                cursor = (cursor + battle->MaxMonsters() - 1) % battle->MaxMonsters();