コード例 #1
0
 public override void Start()
 {
     base.Start();
     mRaceable    = GetComponent <RaceableObject>();
     mMessage     = GetComponent <MmoMessageComponent>();
     mCurrentRace = mRaceable.race;
 }
コード例 #2
0
ファイル: ShipWeapon.cs プロジェクト: OlegGelezcov/neb
        private void Startup()
        {
            if (!mInitialized)
            {
                mInitialized = true;
                mEnergy      = RequireComponent <ShipEnergyBlock>();

                mRace = RequireComponent <RaceableObject>();
                mShip = GetComponent <BaseShip>();

                var character   = GetComponent <CharacterObject>();
                var dropManager = DropManager.Get(nebulaObject.world.Resource());

                var player = GetComponent <MmoActor>();
                if (player != null)
                {
                }
                else
                {
                    InitializeAsBot();
                }

                mPlayer = GetComponent <MmoActor>();

                //log.Info("ShipWeapon.Start() completed");
            }
        }
コード例 #3
0
 public override void Start()
 {
     if (!m_StartCalled)
     {
         m_StartCalled = true;
         base.Start();
         m_Message  = GetComponent <MmoMessageComponent>();
         m_Raceable = GetComponent <RaceableObject>();
         OnZoneVisited(nebulaObject.mmoWorld().GetID());
     }
 }
コード例 #4
0
        public override void Start()
        {
            base.Start();
            //cache raceable component
            mRaceable  = GetComponent <RaceableObject>();
            mCharacter = GetComponent <CharacterObject>();
            mDamagable = GetComponent <DamagableObject>();

            mConstructionTimer = CONSTRUCTION_INTERVAL;
            SetUnderConstruction(true);
        }
コード例 #5
0
        public void AddPvpPoints(int points)
        {
            log.InfoFormat("give pvp points => {0}:{1} [red]", login, points);
            if (mRace == null)
            {
                mRace = GetComponent <RaceableObject>();
            }


            points = ApplyPvpPointsBonus(points);
            mPlayer.application.updater.GivePvpPoints(login, nebulaObject.Id, characterId, guildId, mRace.race, points);
        }
コード例 #6
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>();
 }
コード例 #7
0
        private void ApplyDamage(ref WeaponHitInfo hit, DamagableObject target, float damageMult, bool useDamageMultSelfAsDamage, InputDamage inputDamage)
        {
            inputDamage.Mult(damageMult * Rand.NormalNumber(0.8f, 1.2f));

            if (useDamageMultSelfAsDamage)
            {
                WeaponDamage dmg = new WeaponDamage(inputDamage.weaponBaseType, 0, 0, 0);
                dmg.SetBaseTypeDamage(damageMult);
                inputDamage.CopyValues(dmg);
            }

            if (cachedSkills)
            {
                cachedSkills.ModifyDamage(target, inputDamage);
            }

            int  level    = 1;
            byte workshop = (byte)Workshop.Arlen;
            byte race     = (byte)Race.None;

            level    = cachedCharacter.level;
            workshop = cachedCharacter.workshop;

            RaceableObject raceable = nebulaObject.Raceable();

            if (raceable)
            {
                race = raceable.race;
            }

            var copy = inputDamage.CreateCopy();

            if (false == ReflectDamage(target, ref hit, inputDamage))
            {
                target.ReceiveDamage(inputDamage);
                StartDamageDron(target, inputDamage.CreateCopy(), workshop, level, race);
            }
            hit.SetRemainTargetHp(target.health);

            if (m_Achievments != null)
            {
                m_Achievments.OnMakeDamage(copy);
            }
        }
コード例 #8
0
        public override void Start()
        {
            base.Start();
            mUpdateImmunityTimer = mUpdateImmunityInterval;
            mDamagable           = GetComponent <DamagableObject>();
            mRaceable            = GetComponent <RaceableObject>();

            mConstructionTimer = CONSTRUCTION_INTERVAL;
            SetUnderConstruction(true);

            var world = nebulaObject.world as MmoWorld;


            if ((byte)world.ownedRace != mRaceable.race)
            {
                log.InfoFormat("change world race on outpost start [red]");
                world.SetCurrentRace((Race)mRaceable.race);
            }
        }
コード例 #9
0
ファイル: SimpleWeapon.cs プロジェクト: OlegGelezcov/neb
 public override void Start()
 {
     base.Start();
     mBonuses   = GetComponent <PlayerBonuses>();
     m_Raceable = GetComponent <RaceableObject>();
 }
コード例 #10
0
ファイル: StationComponent.cs プロジェクト: OlegGelezcov/neb
 public override void Start()
 {
     mRaceable = GetComponent <RaceableObject>();
 }