Пример #1
0
    def _filter(self, **kwargs):
        trigger_spells = set()
        _data = []

        for data in self.db('SpecializationSpells').values():
            if data.ref('spec_id').class_id == 0:
                continue

            if not self.valid_spell(None, data.ref('spell_id')):
                continue

            for effect in data.ref('spell_id').children('SpellEffect'):
                trigger_spells = self.get_trigger_spells(effect, trigger_spells)

            if data.spell_id in trigger_spells:
                continue

            _data += [(data.ref('spec_id'), data.ref('spell_id'), data.ref('replace_spell_id'))]

        for data in self.db('SkillLineAbility').values():
            if data.id_skill == 0 or data.id_skill not in util.class_skills():
                continue

            if data.unk_13 in [3]:
                continue

            if not self.valid_spell(data, data.ref('id_spell')):
                continue

            for effect in data.ref('id_spell').children('SpellEffect'):
                trigger_spells = self.get_trigger_spells(effect, trigger_spells)

            if data.id_spell in trigger_spells:
                continue

            entry = (
                util.class_id(player_skill=data.id_skill),
                data.ref('id_spell'),
                data.ref('id_replace')
            )

            if entry not in _data:
                _data.append(entry)

        for active_spell in constants.ACTIVE_SPELL_WHITELIST:
            spell = self.db('SpellName')[active_spell]
            if spell.id != active_spell:
                continue

            class_id = util.class_id(family = spell.child_ref('SpellClassOptions').family)
            if class_id == -1:
                continue

            entry = (class_id, spell, self.db('SpellName').default())

            if entry not in _data:
                _data.append(entry)

        return _data
Пример #2
0
    def _filter(self, **kwargs):
        trigger_spells = set()
        _data = []
        specialization_spells = [
            e.spell_id for e in self.db('SpecializationSpells').values() if e.parent_record().id > 0
        ]

        pet_skill_categories = [v for cls_ in constants.PET_SKILL_CATEGORIES for v in cls_]

        for data in self.db('SkillLineAbility').values():
            if data.unk_13 in [3]:
                continue

            class_id = util.class_id(pet_skill = data.id_skill)
            if class_id == -1:
                continue

            if not self.valid_spell(data, data.ref('id_spell')):
                continue

            if data.id_spell in trigger_spells:
                continue

            if data.id_spell in specialization_spells:
                continue

            for effect in data.ref('id_spell').children('SpellEffect'):
                trigger_spells = self.get_trigger_spells(effect, trigger_spells)

            entry = (class_id, data.id_spell)

            if len([v[1] for v in _data if v[0] == class_id and v[1] == data.id_spell]) == 0:
                _data.append(entry)

        return _data
Пример #3
0
    def _filter(self, **kwargs):
        _data = []

        for data in self.db('SpecializationSpells').values():
            if data.ref('spec_id').class_id == 0:
                continue

            spell_text = self.db('Spell')[data.spell_id]
            if 'Rank' not in str(spell_text.rank):
                continue

            _data += [(data.ref('spec_id').class_id, data.spec_id,
                       data.ref('spell_id'), data.ref('replace_spell_id'))]

        for data in self.db('SkillLineAbility').values():
            if data.id_skill == 0 or data.id_skill not in util.class_skills():
                continue

            if data.unk_13 in [3]:
                continue

            spell_text = self.db('Spell')[data.id_spell]
            if 'Rank' not in str(spell_text.rank):
                continue

            entry = (util.class_id(player_skill=data.id_skill), 0,
                     data.ref('id_spell'), data.ref('id_replace'))

            if entry not in _data:
                _data.append(entry)

        return _data
Пример #4
0
    def _filter(self, **kwargs):
        trigger_spells = set()
        _data = []

        for data in self.db('SpecializationSpells').values():
            if data.ref('spec_id').class_id == 0:
                continue

            if not self.valid_spell(None, data.ref('spell_id')):
                continue

            for effect in data.ref('spell_id').children('SpellEffect'):
                trigger_spells = self.get_trigger_spells(
                    effect, trigger_spells)

            if data.spell_id in trigger_spells:
                continue

            _data += [(data.ref('spec_id'), data.ref('spell_id'),
                       data.ref('replace_spell_id'))]

        for data in self.db('SkillLineAbility').values():
            if data.id_skill == 0 or data.id_skill not in util.class_skills():
                continue

            if data.unk_13 in [3]:
                continue

            if not self.valid_spell(data, data.ref('id_spell')):
                continue

            for effect in data.ref('id_spell').children('SpellEffect'):
                trigger_spells = self.get_trigger_spells(
                    effect, trigger_spells)

            if data.id_spell in trigger_spells:
                continue

            entry = (util.class_id(player_skill=data.id_skill),
                     data.ref('id_spell'), data.ref('id_replace'))

            if entry not in _data:
                _data.append(entry)

        return _data