Server.Mobiles.BaseCreature.SetHits C# (CSharp) Method

SetHits() public method

public SetHits ( int val ) : void
val int
return void
        public void SetHits( int val )
        {
            if ( val < 1000 && !Core.AOS )
                val = (val * 100) / 60;

            m_HitsMax = val;
            Hits = HitsMax;
        }

Same methods

BaseCreature::SetHits ( int min, int max ) : void

Usage Example

Beispiel #1
0
        public void SpawnFollowers(Mobile from)
        {
            if (Map == null)
            {
                return;
            }

            Point3D loc  = Map.GetSpawnPosition(Location, 8);
            Type    type = m_SummonTypes[Utility.Random(m_SummonTypes.Length)];

            PlaySound(0x218);

            for (int i = 0; i < 4; i++)
            {
                BaseCreature summon = (BaseCreature)Activator.CreateInstance(type);

                if (summon != null)
                {
                    summon.SetHits(summon.HitsMax / 2);
                    summon.Team = Team;
                    summon.OnBeforeSpawn(loc, Map);
                    summon.MoveToWorld(loc, Map);
                    summon.Combatant = from;
                }
            }
        }
All Usage Examples Of Server.Mobiles.BaseCreature::SetHits
BaseCreature