示例#1
0
    def __init__(self, casting_spell, index):
        if index == 0:
            self.load_first(casting_spell.spell_entry)
        elif index == 1:
            self.load_second(casting_spell.spell_entry)
        elif index == 2:
            self.load_third(casting_spell.spell_entry)

        self.caster_effective_level = casting_spell.caster_effective_level
        self.targets = EffectTargets(casting_spell, self)
        self.radius_entry = DbcDatabaseManager.spell_radius_get_by_id(
            self.radius_index) if self.radius_index else None
        self.trigger_spell_entry = DbcDatabaseManager.SpellHolder.spell_get_by_id(
            self.trigger_spell_id) if self.trigger_spell_id else None
        self.duration_entry = casting_spell.duration_entry
示例#2
0
    def __init__(self, casting_spell, index):
        if index == 0:
            self.load_first(casting_spell.spell_entry)
        elif index == 1:
            self.load_second(casting_spell.spell_entry)
        elif index == 2:
            self.load_third(casting_spell.spell_entry)

        self.caster_effective_level = casting_spell.caster_effective_level
        self.targets = EffectTargets(casting_spell, self)
        self.radius_entry = DbcDatabaseManager.spell_radius_get_by_id(self.radius_index) if self.radius_index else None
        self.duration_entry = casting_spell.duration_entry

        is_periodic = self.aura_type in PERIODIC_AURA_EFFECTS
        # Descriptions of periodic effects with a period of 0 either imply regeneration every 5s or say "per tick".
        self.aura_period = (self.aura_period if self.aura_period else 5000) if is_periodic else 0
示例#3
0
    def __init__(self, casting_spell, index):
        if index == 0:
            self.load_first(casting_spell.spell_entry)
        elif index == 1:
            self.load_second(casting_spell.spell_entry)
        elif index == 2:
            self.load_third(casting_spell.spell_entry)

        self.caster_effective_level = casting_spell.caster_effective_level
        self.targets = EffectTargets(casting_spell, self)
        self.radius_entry = DbcDatabaseManager.spell_radius_get_by_id(
            self.radius_index) if self.radius_index else None
        self.trigger_spell_entry = DbcDatabaseManager.SpellHolder.spell_get_by_id(
            self.trigger_spell_id) if self.trigger_spell_id else None

        if self.aura_type and casting_spell.initial_target_is_terrain(
        ):  # TODO only needed when terrain is target?
            self.effect_aura = AppliedAura(
                casting_spell.spell_caster, casting_spell, self, None
            )  # Target as none as this effect shouldn't be tied to any unit