Index: code/branches/weapon2/src/orxonox/objects/weaponSystem/WeaponPack.cc
===================================================================
--- code/branches/weapon2/src/orxonox/objects/weaponSystem/WeaponPack.cc	(revision 2318)
+++ code/branches/weapon2/src/orxonox/objects/weaponSystem/WeaponPack.cc	(revision 2319)
@@ -35,4 +35,5 @@
 
 #include "WeaponPack.h"
+#include "objects/worldentities/pawns/Pawn.h"
 
 namespace orxonox
@@ -43,4 +44,5 @@
 
         this->parentWeaponSystem_ = 0;
+        this->firemode_ = 1;
 
     }
@@ -76,6 +78,26 @@
     void WeaponPack::XMLPort(Element& xmlelement, XMLPort::Mode mode)
     {
-
+        XMLPortObject(WeaponPack, Weapon, "", addWeapon, getWeapon, xmlelement, mode);
+        XMLPortParam(WeaponPack, "firemode", setFireMode, getFireMode, xmlelement, mode);
     }
 
+    void WeaponPack::setFireMode(unsigned int firemode)
+    {
+        this->firemode_ = firemode;
+    }
+
+    unsigned int WeaponPack::getFireMode()
+    {
+        return this->firemode_;
+    }
+
+    void WeaponPack::addWeapon(Weapon * weapon)
+    {
+        this->weapons_.push_back(weapon);
+    }
+    
+    Weapon * WeaponPack::getWeapon(unsigned int index)
+    {
+        return weapons_[index];
+    }
 }
Index: code/branches/weapon2/src/orxonox/objects/weaponSystem/WeaponPack.h
===================================================================
--- code/branches/weapon2/src/orxonox/objects/weaponSystem/WeaponPack.h	(revision 2318)
+++ code/branches/weapon2/src/orxonox/objects/weaponSystem/WeaponPack.h	(revision 2319)
@@ -54,4 +54,10 @@
             void attachWeapon(Weapon *weapon);
 
+            void setFireMode(unsigned int firemode);
+            unsigned int getFireMode();
+
+            void addWeapon(Weapon * weapon);
+            Weapon * getWeapon(unsigned int index);
+
             inline void setParentWeaponSystem(WeaponSystem *parentWeaponSystem)
                 { parentWeaponSystem_=parentWeaponSystem; }
@@ -62,4 +68,5 @@
             std::vector<Weapon *> weapons_;
             WeaponSystem *parentWeaponSystem_;
+            unsigned int firemode_;
     };
 }
Index: code/branches/weapon2/src/orxonox/objects/weaponSystem/WeaponSet.cc
===================================================================
--- code/branches/weapon2/src/orxonox/objects/weaponSystem/WeaponSet.cc	(revision 2318)
+++ code/branches/weapon2/src/orxonox/objects/weaponSystem/WeaponSet.cc	(revision 2319)
@@ -53,13 +53,18 @@
     void WeaponSet::attachWeaponPack(WeaponPack *wPack)
     {
-        if (this->parentWeaponSystem_->getWeaponSlotSize()>0 && wPack->getSize()>0 && ( wPack->getSize() <= this->parentWeaponSystem_->getWeaponSlotSize() ) )
+        if ( this->parentWeaponSystem_->getWeaponSlotSize()>0 && wPack->getSize()>0 && ( wPack->getSize() <= this->parentWeaponSystem_->getWeaponSlotSize() ) )
         {
             this->attachedWeaponPack_ = wPack;
+            int wPackWeapon = 0;    //WeaponCounter for Attaching
             //should be possible to choose which slot to use
             for (  int i=0; i < wPack->getSize() ; i++  )
             {
                 //at the moment this function only works for one weaponPack in the entire WeaponSystem...
-                this->setWeaponSlots_.push_back( this->parentWeaponSystem_->getWeaponSlotPointer(i) );
-                this->parentWeaponSystem_->getWeaponSlotPointer(i)->attachWeapon( wPack->getWeaponPointer(i) );
+                if ( this->parentWeaponSystem_->getWeaponSlotPointer(i)->getAttachedWeapon() != 0 ) //if slot not full
+                {
+                    this->setWeaponSlots_.push_back( this->parentWeaponSystem_->getWeaponSlotPointer(i) );
+                    this->parentWeaponSystem_->getWeaponSlotPointer(i)->attachWeapon( wPack->getWeaponPointer(wPackWeapon) );
+                    wPackWeapon++;
+                }
             }
         }
Index: code/branches/weapon2/src/orxonox/objects/weaponSystem/WeaponSlot.cc
===================================================================
--- code/branches/weapon2/src/orxonox/objects/weaponSystem/WeaponSlot.cc	(revision 2318)
+++ code/branches/weapon2/src/orxonox/objects/weaponSystem/WeaponSlot.cc	(revision 2319)
@@ -69,5 +69,4 @@
 
 
-    //XMLPort functions
     void WeaponSlot::XMLPort(Element& xmlelement, XMLPort::Mode mode)
     {
@@ -78,5 +77,5 @@
     {   this->attachedWeapon_ = weaponPointer;   }
 
-    Weapon * WeaponSlot::getAttachedWeapon(unsigned int index) const
+    Weapon * WeaponSlot::getAttachedWeapon() const
     {   return this->attachedWeapon_;   }
 
Index: code/branches/weapon2/src/orxonox/objects/weaponSystem/WeaponSlot.h
===================================================================
--- code/branches/weapon2/src/orxonox/objects/weaponSystem/WeaponSlot.h	(revision 2318)
+++ code/branches/weapon2/src/orxonox/objects/weaponSystem/WeaponSlot.h	(revision 2319)
@@ -46,5 +46,5 @@
 
             void attachWeapon(Weapon *weaponPointer);
-            Weapon * getAttachedWeapon(unsigned int index) const;
+            Weapon * getAttachedWeapon() const;
             void setAmmoType(bool isUnlimited);
             void fire();
Index: code/branches/weapon2/src/orxonox/objects/weaponSystem/WeaponSystem.cc
===================================================================
--- code/branches/weapon2/src/orxonox/objects/weaponSystem/WeaponSystem.cc	(revision 2318)
+++ code/branches/weapon2/src/orxonox/objects/weaponSystem/WeaponSystem.cc	(revision 2319)
@@ -36,5 +36,5 @@
 
 #include "WeaponSystem.h"
-#include "WeaponPack.h"
+
 
 /* WEAPONSYSTEM
@@ -52,5 +52,5 @@
 
         this->activeWeaponSet_ = 0;
-        this->parentSpaceShip_ = 0;
+        this->parentPawn_ = 0;
     }
 
@@ -59,7 +59,9 @@
     }
 
-    void WeaponSystem::attachWeaponPack(WeaponPack *wPack, int setNumber)
+    void WeaponSystem::attachWeaponPack(WeaponPack *wPack, unsigned int firemode)
     {
-        this->weaponSets_[setNumber]->attachWeaponPack(wPack);
+        this->weaponSets_[firemode]->attachWeaponPack(wPack);
+        this->weaponPacks_[firemode] = wPack;
+        wPack->setParentWeaponSystem(this);
     }
 
@@ -125,4 +127,12 @@
     }
 
+    WeaponPack * WeaponSystem::getWeaponPackPointer(unsigned int n)
+    {
+        if (n < this->weaponPacks_.size())
+            return this->weaponPacks_[n];
+        else
+            return 0;
+    }
+
     void WeaponSystem::XMLPort(Element& xmlelement, XMLPort::Mode mode)
     {
Index: code/branches/weapon2/src/orxonox/objects/weaponSystem/WeaponSystem.h
===================================================================
--- code/branches/weapon2/src/orxonox/objects/weaponSystem/WeaponSystem.h	(revision 2318)
+++ code/branches/weapon2/src/orxonox/objects/weaponSystem/WeaponSystem.h	(revision 2319)
@@ -36,4 +36,5 @@
 
 #include "WeaponSet.h"
+#include "WeaponPack.h"
 
 namespace orxonox
@@ -53,15 +54,15 @@
             void fire(WeaponMode::Enum fireMode);
             //void setActiveWeaponSet(unsigned int n);
-            void attachWeaponPack(WeaponPack * wPack, int setNumber);
+            void attachWeaponPack(WeaponPack * wPack, unsigned int firemode);
             WeaponSet * getWeaponSetPointer(unsigned int n);
             WeaponSlot * getWeaponSlotPointer(unsigned int n);
-
+            WeaponPack * getWeaponPackPointer(unsigned int n);
             void setNewMunition(std::string munitionType, Munition * munitionToAdd);
             Munition * getMunitionType(std::string munitionType);
 
-            inline void setParentSpaceShip(SpaceShip *parentSpaceShip)
-                { parentSpaceShip_=parentSpaceShip; }
-            inline SpaceShip * getParentSpaceShip()
-                { return parentSpaceShip_; }
+            inline void setParentPawn(Pawn *parentPawn)
+                { parentPawn_=parentPawn; }
+            inline Pawn * getParentPawn()
+                { return parentPawn_; }
 
             inline int getWeaponSlotSize()
@@ -71,7 +72,8 @@
             std::vector<WeaponSet *> weaponSets_;
             std::vector<WeaponSlot *> weaponSlots_;
+            std::vector<WeaponPack *> weaponPacks_;
             std::map<std::string, Munition *> munitionSet_;
             WeaponSet *activeWeaponSet_;
-            SpaceShip *parentSpaceShip_;
+            Pawn *parentPawn_;
     };
 }
Index: code/branches/weapon2/src/orxonox/objects/worldentities/pawns/Pawn.cc
===================================================================
--- code/branches/weapon2/src/orxonox/objects/worldentities/pawns/Pawn.cc	(revision 2318)
+++ code/branches/weapon2/src/orxonox/objects/worldentities/pawns/Pawn.cc	(revision 2319)
@@ -78,5 +78,5 @@
         XMLPortObject(Pawn, WeaponSlot, "weaponslots", setWeaponSlot, getWeaponSlot, xmlelement, mode);
         XMLPortObject(Pawn, WeaponSet, "weaponsets", setWeaponSet, getWeaponSet, xmlelement, mode);
-        //XMLPortObject(Pawn, WeaponPack, "weapons", setWeaponPack, getWeaponPack, xmlelement, mode);
+        XMLPortObject(Pawn, WeaponPack, "weapons", setWeaponPack, getWeaponPack, xmlelement, mode);
 
         }
@@ -155,16 +155,15 @@
 
 
+
     void Pawn::setWeaponSlot(WeaponSlot * wSlot)
     {   this->weaponSystem_->attachWeaponSlot(wSlot);   }
     WeaponSlot * Pawn::getWeaponSlot(unsigned int index) const
     {   return this->weaponSystem_->getWeaponSlotPointer(index);    }
-
-    /*
+    
     void Pawn::setWeaponPack(WeaponPack * wPack)
-    {   this->weaponSystem_->attachWeaponPack(wPack);   }
-    WeaponPack * Pawn::getWeaponPack(unsigned int index) const
-    {   return this->weaponSystem_->getWeaponPackPointer(index);
-    */
-
+    {   this->weaponSystem_->attachWeaponPack( wPack,wPack->getFireMode() );   }
+    WeaponPack * Pawn::getWeaponPack(unsigned int firemode) const
+    {   return this->weaponSystem_->getWeaponPackPointer(firemode);    }
+    
     void Pawn::setWeaponSet(WeaponSet * wSet)
     {   this->weaponSystem_->attachWeaponSet(wSet);   }
Index: code/branches/weapon2/src/orxonox/objects/worldentities/pawns/Pawn.h
===================================================================
--- code/branches/weapon2/src/orxonox/objects/worldentities/pawns/Pawn.h	(revision 2318)
+++ code/branches/weapon2/src/orxonox/objects/worldentities/pawns/Pawn.h	(revision 2319)
@@ -81,6 +81,6 @@
             void setWeaponSlot(WeaponSlot * wSlot);
             WeaponSlot * getWeaponSlot(unsigned int index) const;
-         //   void setWeaponPack(WeaponPack * wPack);
-         //   WeaponPack * getWeaponPack(unsigned int index) const;
+            void setWeaponPack(WeaponPack * wPack);
+            WeaponPack * getWeaponPack(unsigned int firemode) const;
             void setWeaponSet(WeaponSet * wSet);
             WeaponSet * getWeaponSet(unsigned int index) const;
