예제 #1
0
        /// <summary>
        /// Deserialization constructor.
        /// </summary>
        /// <param name="group"></param>
        /// <param name="src"></param>
        internal Implant(MarketGroup group, SerializableItem src)
            : base(group, src)
        {
            // Gets the slot
            EvePropertyValue?slotProperty = Properties[DBConstants.ImplantSlotPropertyID];

            if (slotProperty == null)
            {
                return;
            }

            Slot = (ImplantSlots)(slotProperty.Value.Int64Value - 1);

            // Sets the implant bonus
            SetImplantBonus();

            // Adds itself to the implants slot
            StaticItems.GetImplants(Slot).Add(this);
        }
예제 #2
0
        /// <summary>
        /// Deserialization constructor.
        /// </summary>
        /// <param name="group"></param>
        /// <param name="src"></param>
        internal Implant(MarketGroup group, SerializableItem src)
            : base(group, src)
        {
            // Gets the slot
            var slotProperty = this.Properties[DBConstants.ImplantSlotPropertyID];

            m_implantSlot = (slotProperty == null ? ImplantSlots.None : (ImplantSlots)(slotProperty.Value.IValue - 1));

            // Get the bonus
            switch (m_implantSlot)
            {
            case ImplantSlots.Charisma:
                m_bonus = this.Properties[DBConstants.CharismaModifierPropertyID].Value.IValue;
                break;

            case ImplantSlots.Intelligence:
                m_bonus = this.Properties[DBConstants.IntelligenceModifierPropertyID].Value.IValue;
                break;

            case ImplantSlots.Memory:
                m_bonus = this.Properties[DBConstants.MemoryModifierPropertyID].Value.IValue;
                break;

            case ImplantSlots.Perception:
                m_bonus = this.Properties[DBConstants.PerceptionModifierPropertyID].Value.IValue;
                break;

            case ImplantSlots.Willpower:
                m_bonus = this.Properties[DBConstants.WillpowerModifierPropertyID].Value.IValue;
                break;

            default:
                break;
            }

            // Adds itself to the implants slot
            StaticItems.GetImplants(m_implantSlot).Add(this);
        }