How to use the data.getDataBy function in data

To help you get started, we’ve selected a few data examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github xivanalysis / xivanalysis / src / parser / jobs / nin / modules / TrickAttackUsage.js View on Github external
_onCast(event) {
		const action = getDataBy(ACTIONS, 'id', event.ability.guid)
		if (action && action.onGcd && !(
			action.id === ACTIONS.TEN.id || action.id === ACTIONS.TEN_KASSATSU.id || action.id === ACTIONS.CHI.id || action.id === ACTIONS.JIN.id)) {
			// Don't count the individual mudras as GCDs for this - they'll make the count screw if Suiton wasn't set up pre-pull
			this._gcdCount++
		}
	}
github xivanalysis / xivanalysis / src / parser / jobs / mch / modules / Ammo.js View on Github external
_onCast(event) {
		this._ammoSpent = false // Reset the flag on every cast

		const action = getDataBy(ACTIONS, 'id', event.ability.guid)
		if (action && action.onGcd) {
			if (this._ammoCount > 0) {
				this._ammoSpent = true // If it's a GCD and we have ammo, flag it as as a spender
				if (this._badAmmoUses.hasOwnProperty(action.id)) {
					this._badAmmoUses[action.id]++
				}

				this._ammoCount--
			}
		}
	}
github xivanalysis / xivanalysis / src / parser / jobs / smn / modules / Demis.js View on Github external
_onPlayerCast(event) {
		// Ignore autos
		const action = getDataBy(ACTIONS, 'id', event.ability.guid)
		if (!action || action.autoAttack) { return }

		// Track player actions during demi
		if (this.gauge.demiSummoned() &&
			(action.onGcd || PLAYER_DEMI_ACTIONS.includes(event.ability.guid))
		) {
			this._current.casts.push(event)
		}
	}
github xivanalysis / xivanalysis / src / parser / jobs / sch / modules / Weaving.js View on Github external
_onScholarCast(event) {
		const action = getDataBy(ACTIONS, 'id', event.ability.guid)
		if (!action || !action.onGcd) {
			return
		}

		this._pos = this.combatants.selected.resources
	}
github xivanalysis / xivanalysis / src / parser / jobs / smn / modules / DWT.js View on Github external
.filter(cast => {
					const action = getDataBy(ACTIONS, 'id', cast.ability.guid)
					return action && action.onGcd && !CORRECT_GCDS.includes(action.id)
				})
				.length

data

A Javascript data representation library.

Unknown
Latest version published 13 years ago

Package Health Score

36 / 100
Full package analysis