public override void Start()
        {
            base.Start();
            mShip    = RequireComponent <BaseShip>();
            mBonuses = RequireComponent <PlayerBonuses>();

            if (GetComponent <PlayerLoaderObject>())
            {
                log.Info("load before destructable");
                GetComponent <PlayerLoaderObject>().Load();
            }

            float initHealth = maximumHealth;

            if (initHealth <= 0.0f)
            {
                initHealth = 1000000;
            }
            //log.InfoFormat("Set health at start to {0}", initHealth);
            ForceSetHealth(initHealth);
            mpcHPRegenNonCombatPerSec = nebulaObject.resource.ServerInputs.GetValue <float>("hp_regen_non_combat");
            player          = GetComponent <MmoActor>();
            mTarget         = GetComponent <PlayerTarget>();
            mSkills         = GetComponent <PlayerSkills>();
            mPassiveBonuses = GetComponent <PassiveBonusesComponent>();
            //mEventedObject = GetComponent<EventedObject>();
            m_Message = GetComponent <MmoMessageComponent>();
        }
Example #2
0
 public override void Start()
 {
     base.Start();
     mBonuses = GetComponent <PlayerBonuses>();
     ForceSetHealth(maximumHealth);
     mBot = GetComponent <BotObject>();
     //mEventedObject = GetComponent<EventedObject>();
 }
Example #3
0
        protected void Initialize()
        {
            if (!initialized)
            {
                initialized = true;
                mCharacter  = RequireComponent <CharacterObject>();
                mWeapon     = RequireComponent <BaseWeapon>();
                mBonuses    = GetComponent <PlayerBonuses>();

                SetModel(new ShipModel(resource));
            }
        }
Example #4
0
 public override void Start()
 {
     mPlayer      = RequireComponent <MmoActor>();
     mShip        = RequireComponent <PlayerShip>();
     mLoader      = GetComponent <PlayerLoaderObject>();
     mMessage     = GetComponent <MmoMessageComponent>();
     mBonuses     = GetComponent <PlayerBonuses>();
     mRace        = GetComponent <RaceableObject>();
     m_PetManager = GetComponent <PetManager>();
     m_Achivments = GetComponent <AchievmentComponent>();
     //m_QuestManager = GetComponent<QuestManager>();
 }
Example #5
0
        private void RecreateBonus(PlayerBonuses target)
        {
            float interval = expireTime - CommonUtils.SecondsFrom1970();

            if (interval < 0f)
            {
                interval = 0f;
            }

            Buff buff = new Buff("ExpTimedEffect", null, Common.BonusType.increase_exp_on_pc, interval, value);

            buff.SetTag(m_EffectTag);
            target.SetBuff(buff, buff.owner);
        }
Example #6
0
 public override void Start()
 {
     //damagers = new Dictionary<string, DamageInfo>();
     props.SetProperty((byte)PS.IgnoreDamage, ignoreDamage);
     props.SetProperty((byte)PS.IgnoreDamageTimer, mIgnoreDamageTimer);
     mIgnoreDamageTimer = ignoreDamageInterval;
     mBonuses           = GetComponent <PlayerBonuses>();
     timedDamage        = new TimedDamage(this);
     m_Skills           = GetComponent <PlayerSkills>();
     m_Achievments      = GetComponent <AchievmentComponent>();
     m_Bot       = GetComponent <BotObject>();
     m_Mmo       = GetComponent <MmoMessageComponent>();
     m_Character = GetComponent <CharacterObject>();
 }
Example #7
0
        //private Dictionary<string, float> energyBuffs;

        public override void Start()
        {
            mShip      = RequireComponent <BaseShip>();
            mAI        = GetComponent <AIState>();
            mPlayer    = GetComponent <MmoActor>();
            mDamagable = GetComponent <ShipBasedDamagableObject>();
            mBonuses   = GetComponent <PlayerBonuses>();
            m_Mmo      = GetComponent <MmoMessageComponent>();

            //energyBuffs = new Dictionary<string, float>();

            mEnergyCostPerShiftMoving = nebulaObject.world.Resource().ServerInputs.GetValue <float>("accelerated_motion_energy_cost");
            mMaxEnergyFromResource    = resource.ServerInputs.GetValue <float>("max_energy");
            mEnergyRestoration        = resource.ServerInputs.GetValue <float>("energy_restoration");
            //log.InfoFormat("MAX EENRGY FROM RESOURCE: {0}, ENERGY RESTORATION: {1}", mMaxEnergyFromResource, mEnergyRestoration);
            mPassiveBonuses = GetComponent <PassiveBonusesComponent>();

            m_CurrentEnergy = maximumEnergy;
        }
Example #8
0
        public override void Start()
        {
            if (!m_StartCalled)
            {
                m_StartCalled = true;
                mWeapon       = RequireComponent <ShipWeapon>();
                player        = RequireComponent <MmoActor>();
                RequireComponent <PlayerSkills>();
                mAI        = RequireComponent <AIState>();
                mBonuses   = RequireComponent <PlayerBonuses>();
                mCharacter = RequireComponent <PlayerCharacterObject>();

                m_PassiveBonuses = GetComponent <PassiveBonusesComponent>();

                if (shipModel == null)
                {
                    SetModel(new ShipModel(resource));
                }

                m_ResistDetail.Reset();

                log.Info("PlayerShip.Start() completed");
            }
        }
Example #9
0
 public override void Start()
 {
     base.Start();
     mBonuses = GetComponent <PlayerBonuses>();
 }
Example #10
0
 public override void Start()
 {
     m_SpeedDetail.Reset();
     m_Ship    = GetComponent <BaseShip>();
     m_Bonuses = GetComponent <PlayerBonuses>();
 }
Example #11
0
 public override void Start()
 {
     base.Start();
     mBonuses   = GetComponent <PlayerBonuses>();
     m_Raceable = GetComponent <RaceableObject>();
 }