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>();
        }
Esempio n. 2
0
 public void Replace(PlayerSkills other)
 {
     foreach (var s in other.Skills)
     {
         this.skills[s.Key].SetData(s.Value.data);
         this.skills[s.Key].SetOn(false);
     }
 }
Esempio n. 3
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>();
 }
Esempio n. 4
0
 public static PlayerSkill Empty(PlayerSkills skills)
 {
     return(new PlayerSkill(skills));
 }
Esempio n. 5
0
 public PlayerSkill(PlayerSkills inSkills)
 {
     skills    = inSkills;
     this.data = SkillData.Empty;
     this.isOn = false;
 }