public SpellController_Explode(Message_ServerResponse_CreateSpellInStaticPosition spell, UnitySpellDefinition definition)
     : base(spell.request.TimeStartedCasting, definition.GetCastTimeInSeconds(spell.request.rank))
 {
     this.spell           = spell;
     this.unityDefinition = definition;
     InGameWrapper.instance.playersWrapper.GetPlayerByOwnerGUID(spell.request.ownerGUID).spellCaster.CastSpell(this, spell.request.playerXPos, spell.request.playerZPos);
 }
Exemplo n.º 2
0
    public SpellControllers_HitDetection(SpellType spellType, UnitySpellDefinition unitySpellDefinition, Vector3 spawnPos, double timeStartedCasting, Vector3 playerCastPos, int ownerGUID, int rank)
        : base(timeStartedCasting, unitySpellDefinition.GetCastTimeInSeconds(rank))
    {
        projectile = (GameObject)GameObject.Instantiate(unitySpellDefinition.projectilePrefab, new Vector3(spawnPos.x, spawnPos.y, spawnPos.z), Quaternion.identity);

        hitRange           = InGameWrapper.instance.spellsWrapper.spellData.GetSpellDefinition(spellType).GetHitRange(rank);
        pushBackMultiplier = InGameWrapper.instance.spellsWrapper.spellData.GetSpellDefinition(spellType).GetPushBackMultiplier(rank);
    }