mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-19 07:37:25 +01:00
Merge branch 'develop' into party-chat-translations
# Conflicts: # website/server/controllers/api-v3/quests.js # website/server/controllers/api-v3/tasks/groups.js # website/server/controllers/api-v3/user/spells.js # website/server/models/group.js
This commit is contained in:
@@ -130,22 +130,23 @@ api.castSpell = {
|
||||
|
||||
if (party && !spell.silent) {
|
||||
if (targetType === 'user') {
|
||||
party.sendChat(`\`${common.i18n.t('chatCastSpellUser', {username: user.profile.name, spell: spell.text(), target: partyMembers.profile.name}, 'en')}\``, null, null, {
|
||||
const newChatMessage = party.sendChat(`\`${common.i18n.t('chatCastSpellUser', {username: user.profile.name, spell: spell.text(), target: partyMembers.profile.name}, 'en')}\``, null, null, {
|
||||
type: 'spell_cast_user',
|
||||
user: user.profile.name,
|
||||
class: klass,
|
||||
spell: spellId,
|
||||
target: partyMembers.profile.name,
|
||||
});
|
||||
await newChatMessage.save();
|
||||
} else {
|
||||
party.sendChat(`\`${common.i18n.t('chatCastSpellParty', {username: user.profile.name, spell: spell.text()}, 'en')}\``, null, null, {
|
||||
const newChatMessage = party.sendChat(`\`${common.i18n.t('chatCastSpellParty', {username: user.profile.name, spell: spell.text()}, 'en')}\``, null, null, {
|
||||
type: 'spell_cast_party',
|
||||
user: user.profile.name,
|
||||
class: klass,
|
||||
spell: spellId,
|
||||
});
|
||||
await newChatMessage.save();
|
||||
}
|
||||
await party.save();
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user