00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028 #include "zone/zEffectGroup.h"
00029
00030 zEffectGroup::zEffectGroup(gVectorExtra< nNetObjectID > const owners, gVectorExtra< nNetObjectID > const teamOwners):
00031 validators(),
00032
00033
00034 d_owners(owners),
00035 d_teamOwners(teamOwners),
00036 d_calculatedTargets()
00037 { }
00038
00039 zEffectGroup::zEffectGroup(zEffectGroup const &other) :
00040 validators(other.validators),
00041
00042
00043 d_owners(other.d_owners),
00044 d_teamOwners(other.d_teamOwners),
00045 d_calculatedTargets(other.d_calculatedTargets)
00046 { }
00047
00048 zEffectGroup::~zEffectGroup()
00049 { }
00050
00051 void zEffectGroup::operator=(zEffectGroup const &other)
00052 {
00053 if (this != &other) {
00054 validators = other.validators;
00055 d_owners = other.d_owners;
00056 d_teamOwners = other.d_teamOwners;
00057 d_calculatedTargets = other.d_calculatedTargets;
00058 }
00059 }
00060
00061 void zEffectGroup::apply( Triggerer possibleUser, REAL &time, const tPolynomial<nMessage> & tp )
00062 {
00063 std::vector<zValidatorPtr>::const_iterator iter;
00064 for (iter=validators.begin();
00065 iter!=validators.end();
00066 ++iter)
00067 {
00068 (*iter)->validate(d_owners, d_teamOwners, possibleUser, tp);
00069 }
00070 }