Ejemplo n.º 1
0
 public CreatureColor([NotNull] CreatureColorEntity creatureColorEntity)
 {
     if (creatureColorEntity == null)
     {
         throw new ArgumentNullException(nameof(creatureColorEntity));
     }
     this.creatureColorEntity = creatureColorEntity;
 }
Ejemplo n.º 2
0
        void UpdateCreatureColorEntity(CreatureColorEntity creatureColorEntity, string oldId, string newId, string displayName, string wurmLogText)
        {
            creatureColorEntity.Id          = newId;
            creatureColorEntity.DisplayName = displayName;
            creatureColorEntity.WurmLogText = wurmLogText;

            if (newId != oldId)
            {
                var oldvalue = defaultBreedingEvaluatorOptionsData.CreatureColorValuesForEntityId[oldId];
                defaultBreedingEvaluatorOptionsData.CreatureColorValuesForEntityId.Remove(oldId);
                defaultBreedingEvaluatorOptionsData.CreatureColorValuesForEntityId[newId] = oldvalue;

                grangerSimpleDb.CreatureColors.Remove(oldId);
                grangerSimpleDb.CreatureColors[newId] = creatureColorEntity;
            }
        }