Implemented requested changes

This commit is contained in:
Mateus Etto
2018-05-18 23:08:37 +09:00
parent 2588befceb
commit 97e80e2093
7 changed files with 284 additions and 154 deletions

View File

@@ -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();
}