]> git.localhorst.tv Git - l2e.git/blobdiff - src/map/MapState.cpp
implemented capsule/class selection
[l2e.git] / src / map / MapState.cpp
index af156304b9412c6523e7aec39f7b0547e6fadd3f..b223f4fd6a2d4a111bb0394a39ccd10d612fa561 100644 (file)
@@ -1,10 +1,3 @@
-/*
- * MapState.cpp
- *
- *  Created on: Sep 29, 2012
- *      Author: holy
- */
-
 #include "MapState.h"
 
 #include "Map.h"
@@ -303,8 +296,11 @@ bool MapState::CheckMonster() {
                                                battleState->AddHero(*game->state->party[i]);
                                        }
                                }
-                               for (battle::Monster *monster((*e)->MonstersBegin()); monster != (*e)->MonstersEnd(); ++monster) {
-                                       battleState->AddMonster(*monster);
+                               if (game->state->capsule) {
+                                       battleState->SetCapsule(&game->state->GetCapsule());
+                               }
+                               for (battle::Monster **monster((*e)->MonstersBegin()); monster != (*e)->MonstersEnd(); ++monster) {
+                                       battleState->AddMonster(**monster);
                                }
 
                                ColorFade *fadeIn(new ColorFade(this, 0, 500, true));
@@ -318,9 +314,6 @@ bool MapState::CheckMonster() {
                                // TODO: move entity erase to happen after the transition or battle
                                entities.erase(e);
                                return true;
-                               // needed information here:
-                               //  - battle background (from tile/area/map)
-                               //  - monsters + layout (from entity)
                        }
                }
        }