Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
clearAlarm(name: string): boolean {
const alarm = this.getAlarm(name);
if (alarm) {
if (alarm.handler) {
if (alarm.periodInMinutes) {
clearInterval(alarm.handler);
} else {
clearTimeout(alarm.handler);
}
}
Vue.delete(this.alarms, name);
return true;
}
return false;
}
clearAllAlarm(): boolean {
set energyCostPS(value) {
if (value) {
if (!this.abilityData.energyCostPS)
Vue.set(this.abilityData, "energyCostPS", value)
else
this.abilityData.energyCostPS = value;
} else if (this.abilityData.energyCostPS) {
Vue.delete(this.abilityData, "energyCostPS")
}
}
get energyCostN() { return this.abilityData.energyCostN }
set hasMinValue(value) {
if (value) {
Vue.set(this.apv, "minValue", 0);
} else {
Vue.delete(this.apv, "minValue");
}
}
set minValue(value) {
Object.keys(this.badgeTextArray).forEach((k) => {
const badge = this.badgeTextArray[k];
if (badge) {
if (badge[tab.index]) {
Vue.delete(badge, `${tab.index}`);
}
}
});
Object.keys(this.badgeBackgroundColorArray).forEach((k) => {
clearAlarm(name: string): boolean {
const alarm = this.getAlarm(name);
if (alarm) {
if (alarm.handler) {
if (alarm.periodInMinutes) {
clearInterval(alarm.handler);
} else {
clearTimeout(alarm.handler);
}
}
Vue.delete(this.alarms, name);
return true;
}
return false;
}
clearAllAlarm(): boolean {
set hasBuff(value) {
if (!this.abilityData.props)
this.abilityData.props = {};
if (!value)
Vue.delete(this.abilityData.props, "Buff");
else if (!this.abilityData.props.Buff)
Vue.set(this.abilityData.props, "Buff", {})
}
LeekWars.post('moderation/warn', {target: fault.target.id, reason: fault.reason, message: this.message, severity: this.severity, parameter: this.selectedFault.parameter}).then(data => {
LeekWars.toast(i18n.t('moderation.warning_sent') as string)
this.faults.splice(this.faults.indexOf(fault), 1)
Vue.delete(this.faultsById, '' + fault.id)
this.warningConfirmDialog = false
this.$router.push('/moderation')
}).error(error => {
LeekWars.toast(error)
set energyCostN(value) {
if (value) {
if (!this.abilityData.energyCostN)
Vue.set(this.abilityData, "energyCostN", value)
else
this.abilityData.energyCostN = value;
} else if (this.abilityData.energyCostN) {
Vue.delete(this.abilityData, "energyCostN")
}
}
set energyCost(value) {
if (value) {
if (!this.abilityData.energyCost)
Vue.set(this.abilityData, "energyCost", value)
else
this.abilityData.energyCost = value;
} else if (this.abilityData.energyCost) {
Vue.delete(this.abilityData, "energyCost")
}
}
get energyCostPS() { return this.abilityData.energyCostPS }