The permission system thing I'm doing needs to be adjusted to the
Container permission system in the Engine.
To Light: Please contact me in regards to this
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.
This ensures nothing is ever missed out of the pvpStatus calculation,
such as faction standing. It should calculate the following:
On Leave/neutral players should be #16
Combatant players should be #35
Opposing faction SF players should be #55
Opposing Combatant NPCs should be #19
Ally SF NPCs (ie.; hoth commandos) should be #4
Enemy SF NPCs (ie. hoth resistance) should be #7
Same faction NPCs should be #0 (pink)
Attackable NPCs should be #1
Aggressive NPCs should be #2 or #3
NPCs you have negative faction standing with should be #2 or #3
When you join a faction, #16 is set to true.
When you go combatant, #32 is set to true. The resulting flag: 48
When you go SF, #1, #2 and #4 are set to true. The resulting flag: 55
When you go back to combatant, #1, #2 and #4 are set to false. The resulting flag: 48
The error was either in the Player flag not being set anywhere, or setPvpStatus setting it instead of doing OR/XOR operations.
(The result of this would be bit #16 wouldn't be set to true, meaning SF would be 39 instead of 55)
We could still set all of the flags to true for SF without harm for safety, it just wasn't theoretically necessary.
Additionally any players that login automatically were getting #16 sent to the client by sendBaselines() regardless of if they had a faction, which should now be fixed.