mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-19 15:48:04 +01:00
Implemented requested changes
This commit is contained in:
@@ -131,20 +131,26 @@ api.castSpell = {
|
||||
|
||||
if (party && !spell.silent) {
|
||||
if (targetType === 'user') {
|
||||
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,
|
||||
const newChatMessage = party.sendChat({
|
||||
message: `\`${common.i18n.t('chatCastSpellUser', {username: user.profile.name, spell: spell.text(), target: partyMembers.profile.name}, 'en')}\``,
|
||||
info: {
|
||||
type: 'spell_cast_user',
|
||||
user: user.profile.name,
|
||||
class: klass,
|
||||
spell: spellId,
|
||||
target: partyMembers.profile.name,
|
||||
},
|
||||
});
|
||||
await newChatMessage.save();
|
||||
} else {
|
||||
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,
|
||||
const newChatMessage = party.sendChat({
|
||||
message: `\`${common.i18n.t('chatCastSpellParty', {username: user.profile.name, spell: spell.text()}, 'en')}\``,
|
||||
info: {
|
||||
type: 'spell_cast_party',
|
||||
user: user.profile.name,
|
||||
class: klass,
|
||||
spell: spellId,
|
||||
},
|
||||
});
|
||||
await newChatMessage.save();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user