Пример #1
0
BattleModeData & BattleModeData::operator=(BattleModeData const& other) {
	Base::DataStruct::operator=(other);
	if (this != &other) {
		CL_ARRAY(rules, 6);
	}
	return *this;
}
Пример #2
0
PlayerData& PlayerData::operator=(PlayerData const& other) {
	if (size != other.size) throw std::invalid_argument("Cannot assign because *this and other are of different types");
	Base::DataStruct::operator=(other);
	if (this != &other) {
		PlayerData::deleteFields();
		CP(SID); CP(TID); CP(money); CP(pkCoupons);
		CL(trainerName);
		CL_ARRAY(party, 6);
		CL(bag);
		CP(trainerGender);
	}
	return *this;
}
Пример #3
0
BattleModeData::BattleModeData(BattleModeData const& other) : Base::DataStruct(other){
	CL_ARRAY(rules, 6);
}
Пример #4
0
PlayerData::PlayerData(PlayerData const& other) : Base::DataStruct(other), SID(other.SID), TID(other.TID), money(other.money), pkCoupons(other.pkCoupons),
trainerGender(other.trainerGender){
	CL(trainerName);
	CL_ARRAY(party, 6);
	CL(bag);
}
StrategyMemoData::StrategyMemoData(StrategyMemoData const& other) : nbEntries(other.nbEntries) {
	CL_ARRAY(entries, 500);
}