Buffs refactored to use DatatableVisitor on server load

Originally, everytime a new Buff instance was created, it would loop
through the Datatable Visitor everytime. Now it's only done once on
server startup and put into a buffMap. A copy of the base buff is then
done through the constructor of Buff class should a new instance of that
buff type needs to be created from the one inside the map.
This commit is contained in:
Waverunner
2014-04-06 16:29:31 -04:00
parent b350bad2da
commit 438c960d88
3 changed files with 91 additions and 11 deletions
+2 -1
View File
@@ -249,6 +249,7 @@ public class DevService implements INetworkDispatch {
inventory.add(pistol);
/* == Disabled until Elemental Damage is implemented. ==
SWGObject heavy = core.objectService.createObject("object/weapon/ranged/heavy/shared_som_lava_cannon_generic.iff", planet);
heavy.setIntAttribute("required_combat_level", 90);
heavy.setFloatAttribute("cat_wpn_damage.wpn_attack_speed", 1);
@@ -256,7 +257,7 @@ public class DevService implements INetworkDispatch {
heavy.setStringAttribute("cat_wpn_damage.wpn_damage_type", "Energy");
heavy.setStringAttribute("cat_wpn_damage.damage", "700-1400");
inventory.add(heavy);
inventory.add(heavy);*/
return;
case 40:
TangibleObject ring = (TangibleObject) core.objectService.createObject("object/tangible/wearables/ring/shared_ring_s01.iff", planet);