Instructions Jenkins Doxygen

[fixed] stability issues 31/1231/3
authorVictor Popovici <victorpopovici@gmail.com>
Sat, 7 Dec 2013 21:27:48 +0000 (22:27 +0100)
committerVictor Popovici <victorpopovici@gmail.com>
Sat, 7 Dec 2013 21:44:26 +0000 (22:44 +0100)
Change-Id: I0503d95b21448072dde4a2f9725d20e845985e5c

MMOCoreORB/src/server/zone/objects/creature/damageovertime/DamageOverTimeList.cpp
MMOCoreORB/src/server/zone/objects/creature/damageovertime/DamageOverTimeList.h

index cbc4cde..dfa8320 100644 (file)
@@ -43,8 +43,10 @@ uint64 DamageOverTimeList::activateDots(CreatureObject* victim) {
                        if (!dot->isPast()) {
                                states |= dot->getType();
                        } else {
-                               vector->remove(j);
-                               --j;
+                               if (i < size()) {
+                                       vector->remove(j);
+                                       --j;
+                               }
                        }
                }
        }
index 3cc4b72..06a50aa 100644 (file)
@@ -11,7 +11,7 @@
 #include "engine/engine.h"
 #include "DamageOverTime.h"
 
-class DamageOverTimeList : public VectorMap<uint64, Vector<DamageOverTime> > {
+class DamageOverTimeList : private VectorMap<uint64, Vector<DamageOverTime> > {
 protected:
        Time nextTick;
        bool dot;
@@ -29,6 +29,14 @@ public:
                dot = list.dot;
        }
 
+       bool toBinaryStream(ObjectOutputStream* stream) {
+               return VectorMap<uint64, Vector<DamageOverTime> >::toBinaryStream(stream);
+       }
+
+       bool parseFromBinaryStream(ObjectInputStream* stream) {
+               return VectorMap<uint64, Vector<DamageOverTime> >::parseFromBinaryStream(stream);
+       }
+
        uint64 activateDots(CreatureObject* victim);
        uint32 addDot(CreatureObject* victim, uint64 parentObjectID, uint32 duration, uint64 dotType, uint8 pool, uint32 strength, float potency, uint32 defense, int secondaryStrength = 0);
        bool healState(CreatureObject* victim, uint64 dotType, float reduction);