예제 #1
0
        public override bool OnBeforeDeath()
        {
            if (this.Female)
            {
                this.Body = 0x191;
            }
            else
            {
                this.Body = 0x190;
            }

            if (this.BatForm && VampireAI.CheckNight(this) == false)             //its daytime dont drop anything
            {
                // make sure no clothes or weapons drop
                NewbieAllLayers();
                this.AIObject.Deactivate();
                Effects.PlaySound(this, this.Map, 648);
                this.FixedParticles(0x3709, 10, 30, 5052, EffectLayer.LeftFoot);
                this.PlaySound(0x208);
                DeathTimer t = new DeathTimer(this);
                t.Start();
            }

            return(base.OnBeforeDeath());
        }
예제 #2
0
        public override void OnThink()
        {
            if (VampireAI.CheckNight(this) && this.AIObject.Action != ActionType.Chase)             //its nighttime - be a vamp unless we're chasing
            {
                DebugSay("It's nighttime! Be a vamp...");
                // turn back to human if we are fighting (but not fleeing)
                if (BatForm && this.AIObject.Action != ActionType.Flee)
                {
                    DoTransform(this, (this.Female) ? 0x191 : 0x190, this.Hue, toHumanForm);
                    this.FightMode = FightMode.All | FightMode.Closest;                                 // suck blood from random creatures if wounded
                    CanFly         = false;
                }
            }
            else             // it's daytime
            {
                DebugSay("It's daytime! Be a bat...");
                // return to bat form if we are not one and not fighting
                if (!BatForm && this.AIObject.Action != ActionType.Combat)
                {
                    DoTransform(this, 317, toBatForm);                                  // become a bat
                    this.FightMode = FightMode.Aggressor;
                }
            }

            base.OnThink();
        }