Make sure to copy all the important bits of a wave... This system needs refactoring...

This commit is contained in:
garbagemule 2014-02-26 08:32:19 +01:00
parent 7d14b1b10a
commit 8a17c72b4b
8 changed files with 43 additions and 2 deletions

View File

@ -1,7 +1,7 @@
name: MobArena
author: garbagemule
main: com.garbagemule.MobArena.MobArena
version: 0.96.2.12
version: 0.96.2.13
softdepend: [Multiverse-Core,Towny,Heroes,MagicSpells,Vault]
commands:
ma:

View File

@ -28,6 +28,10 @@ public abstract class AbstractWave implements Wave
public List<Location> getSpawnpoints(Arena arena) {
return WaveUtils.getValidSpawnpoints(arena, spawnpoints, arena.getPlayersInArena());
}
protected List<Location> getSpawnpoints() {
return spawnpoints;
}
@Override
public void setSpawnpoints(List<Location> spawnpoints) {

View File

@ -150,6 +150,12 @@ public class BossWave extends AbstractWave
result.flatHealth = this.flatHealth;
result.reward = this.reward;
result.bossName = this.bossName;
// From AbstractWave
result.setAmountMultiplier(getAmountMultiplier());
result.setHealthMultiplier(getHealthMultiplier());
result.setName(getName());
result.setSpawnpoints(getSpawnpoints());
return result;
}
}

View File

@ -90,6 +90,12 @@ public class DefaultWave extends AbstractWave
DefaultWave result = new DefaultWave(monsterMap);
result.growth = this.growth;
result.fixed = this.fixed;
// From AbstractWave
result.setAmountMultiplier(getAmountMultiplier());
result.setHealthMultiplier(getHealthMultiplier());
result.setName(getName());
result.setSpawnpoints(getSpawnpoints());
return result;
}
}

View File

@ -51,6 +51,13 @@ public class SpecialWave extends AbstractWave
}
public Wave copy() {
return new SpecialWave(monsterMap);
SpecialWave result = new SpecialWave(monsterMap);
// From AbstractWave
result.setAmountMultiplier(getAmountMultiplier());
result.setHealthMultiplier(getHealthMultiplier());
result.setName(getName());
result.setSpawnpoints(getSpawnpoints());
return result;
}
}

View File

@ -63,6 +63,12 @@ public class SupplyWave extends AbstractWave
public Wave copy() {
SupplyWave result = new SupplyWave(monsterMap);
result.drops = new ArrayList<ItemStack>(this.drops);
// From AbstractWave
result.setAmountMultiplier(getAmountMultiplier());
result.setHealthMultiplier(getHealthMultiplier());
result.setName(getName());
result.setSpawnpoints(getSpawnpoints());
return result;
}
}

View File

@ -42,6 +42,12 @@ public class SwarmWave extends AbstractWave
public Wave copy() {
SwarmWave result = new SwarmWave(monster);
result.amount = this.amount;
// From AbstractWave
result.setAmountMultiplier(getAmountMultiplier());
result.setHealthMultiplier(getHealthMultiplier());
result.setName(getName());
result.setSpawnpoints(getSpawnpoints());
return result;
}
}

View File

@ -52,6 +52,12 @@ public class UpgradeWave extends AbstractWave
}
UpgradeWave result = new UpgradeWave(upgrades);
result.giveAll = this.giveAll;
// From AbstractWave
result.setAmountMultiplier(getAmountMultiplier());
result.setHealthMultiplier(getHealthMultiplier());
result.setName(getName());
result.setSpawnpoints(getSpawnpoints());
return result;
}