Version 12.0.15 #715

Merged
uberwald merged 7 commits from VincentVk/foundryvtt-reve-de-dragon:v11 into v11 2024-10-17 07:54:00 +02:00
3 changed files with 13 additions and 3 deletions
Showing only changes of commit 501f1f2e4f - Show all commits

View File

@ -1,4 +1,6 @@
# 12.0 # 12.0
## 12.0.15 - Le messager d'Astrobazzarh
- Les messages de maladies ne sont plus publics
## 12.0.14 - Les légions d'Astrobazzarh ## 12.0.14 - Les légions d'Astrobazzarh
- Feuille de PNJ: - Feuille de PNJ:
- boutons standard (encaissement, ...) - boutons standard (encaissement, ...)

View File

@ -118,6 +118,10 @@ export class ChatUtility {
return undefined; return undefined;
} }
static getOwners(actor) {
return game.users.filter(it => actor.getUserLevel(it) == CONST.DOCUMENT_OWNERSHIP_LEVELS.OWNER)
}
/* -------------------------------------------- */ /* -------------------------------------------- */
static getWhisperRecipientsAndGMs(...names) { static getWhisperRecipientsAndGMs(...names) {
let recipients = [...ChatMessage.getWhisperRecipients('GM')] let recipients = [...ChatMessage.getWhisperRecipients('GM')]

View File

@ -1,3 +1,4 @@
import { ChatUtility } from "../chat-utility.js";
import { RdDItem } from "../item.js"; import { RdDItem } from "../item.js";
import { Misc } from "../misc.js"; import { Misc } from "../misc.js";
import { RdDTimestamp } from "../time/rdd-timestamp.js"; import { RdDTimestamp } from "../time/rdd-timestamp.js";
@ -21,9 +22,12 @@ export class RdDItemMaladie extends RdDItem {
const souffrance = mal.system.identifie const souffrance = mal.system.identifie
? `de ${mal.name}` ? `de ${mal.name}`
: `d'un mal inconnu` : `d'un mal inconnu`
ChatMessage.create({ content: `${mal.actor.name} souffre ${souffrance} (${Misc.typeName('Item', mal.type)}): vérifiez que les effets ne se sont pas aggravés !` }); ChatMessage.create({
mal.postItemToChat('gmroll'); whisper: ChatUtility.getOwners(mal.actor),
await RdDItemMaladie.prolongerPeriode(mal,oldTimestamp, newTimestamp); content: `${mal.actor.name} souffre ${souffrance} (${Misc.typeName('Item', mal.type)}): vérifiez que les effets ne se sont pas aggravés !`
})
mal.postItemToChat('gmroll')
await RdDItemMaladie.prolongerPeriode(mal, oldTimestamp, newTimestamp)
} }
} }