Exemple #1
0
 public SpellEffectApplicationMessageCreationContext([NotNull] NetworkEntityGuid applicationSource, int spellId, SpellEffectIndex effectIndex)
 {
     if (spellId <= 0)
     {
         throw new ArgumentOutOfRangeException(nameof(spellId));
     }
     ApplicationSource = applicationSource ?? throw new ArgumentNullException(nameof(applicationSource));
     SpellId           = spellId;
     EffectIndex       = effectIndex;
 }
Exemple #2
0
        public SpellEffectTargetCreationContext(int spellId, SpellEffectIndex effectIndex, [NotNull] DefaultEntityActorStateContainer actorState)
        {
            if (spellId <= 0)
            {
                throw new ArgumentOutOfRangeException(nameof(spellId));
            }

            SpellId     = spellId;
            EffectIndex = effectIndex;
            ActorState  = actorState ?? throw new ArgumentNullException(nameof(actorState));
        }
Exemple #3
0
        public int GetSpellEffectId(SpellEffectIndex effectIndex)
        {
            switch (effectIndex)
            {
            case SpellEffectIndex.SpellEffectIndexOne:
                return(SpellEffectIdOne);

            case SpellEffectIndex.SpellEffectIndexTwo:
            case SpellEffectIndex.SpellEffectIndexThree:
            default:
                throw new ArgumentOutOfRangeException(nameof(effectIndex), effectIndex, $"TODO: Implement additional spell effect index.");
            }
        }
Exemple #4
0
        public SpellEffectDefinitionDataModel GetEffectForSpellAtIndex(int spellId, SpellEffectIndex effectIndex)
        {
            if (spellId <= 0)
            {
                throw new ArgumentOutOfRangeException(nameof(spellId));
            }

            if ((int)effectIndex != 0)
            {
                throw new NotImplementedException($"TODO: Implement more index handling.");
            }

            return(SpellEffectMap[SpellMap[spellId].SpellEffectIdOne]);
        }