mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 14:47:53 +01:00
Translation support for a lot of messages in party
This commit is contained in:
@@ -735,7 +735,22 @@ api.castSpell = {
|
||||
|
||||
if (party && !spell.silent) {
|
||||
let message = `\`${user.profile.name} casts ${spell.text()}${targetType === 'user' ? ` on ${partyMembers.profile.name}` : ' for the party'}.\``;
|
||||
party.sendChat(message);
|
||||
if (targetType === 'user') {
|
||||
party.sendChat(message, null, null, {
|
||||
'type': 'spell_cast_user',
|
||||
'user': user._id,
|
||||
'class': klass,
|
||||
'spell': spellId,
|
||||
'target': partyMember._id,
|
||||
});
|
||||
} else {
|
||||
party.sendChat(message, null, null, {
|
||||
'type': 'spell_cast_party',
|
||||
'user': user._id,
|
||||
'class': klass,
|
||||
'spell': spellId,
|
||||
});
|
||||
}
|
||||
await party.save();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user