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.
Note that cooldown check is currently used only for the holoemote
command. To add a cooldown to any command, all you have to do is
CreatureObject.addCooldown(name). In this commit I also moved some
cooldown variables from CombatCommand to BaseSWGCommand since many
non-combat commands had cooldowns (Wookie Roar, Holo-Emotes). I also put
in a warmup cooldown (time before command is called) for non-combat
commands.
(BugFix) Officer group buff's will now check ranges
(BugFix) Group buffs applied when a player joins a group as long as they
are within range
(BugFix) /inspire will now take a command string for target
(BugFix) /imagedesign will now take a command string for target
- The duration needed to be set on the buff object "before "the buff is
actually added. Because of this, I made the distinction between setup(0
(setting up the buff object) and add() (adding the buff stats to the
player).
- Group buffs would add the buff based on each individual player's
skillmods instead of the buffer's. Due to this, I made a "buffer"
parameter for doAddBuff(). If there is a buffer, regardless of it's a
buffer within our group, we can specify them, otherwise provide null.
If the buff as a callback field, define it as a function in the buff
script and do whatever it's supposed to do. It uses the same params as
the other functions in there do. For example:
def handleClearBuffEffect(core, actor, buff):