mirror of
https://bitbucket.org/projectswg/holocore.git
synced 2026-01-16 23:04:20 -05:00
Merged in M4SS/holocore/192 (pull request #675)
#192: Creatures that aren't controlled by a player now receive protection from armor
This commit is contained in:
@@ -69,14 +69,14 @@ class ProtectionService : Service() {
|
||||
val newContainer = intent.container
|
||||
val oldContainer = intent.oldContainer
|
||||
|
||||
if (item.owner == null) {
|
||||
// Important that we don't grant protection to players while they are not online: https://bitbucket.org/projectswg/holocore/issues/192/protection-from-equipment-is-no-longer
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
if (newContainer is CreatureObject) {
|
||||
// They equipped something
|
||||
if (newContainer.isPlayer && item.owner == null) {
|
||||
// Important that we don't grant protection to players while they are not online: https://bitbucket.org/projectswg/holocore/issues/192/protection-from-equipment-is-no-longer
|
||||
return
|
||||
}
|
||||
|
||||
handleTransfer(item, newContainer, item.arrangement.getOrNull(intent.arrangement-4) ?: EMPTY_LIST, true) // newContainer is a character
|
||||
} else if (oldContainer is CreatureObject) {
|
||||
// They unequipped something
|
||||
|
||||
Reference in New Issue
Block a user