Esempio n. 1
0
        public override void OnMobDie(CMob removedMob)
        {
            // copy pos for the dojo item drop
            var pos = removedMob.Position.CurrentXY.Clone();

            // no drops/mesos
            removedMob.bRewardsDistributed = true;

            // need to call this to override the above statement for exp
            removedMob.DistributeEXP();

            base.OnMobDie(removedMob);

            if (_bossMob != removedMob.nMobTemplateId)
            {
                return;
            }

            TryDropDojoItem(pos);

            UpdatePoints();

            FieldEffectPacket.BroadcastDojoEffect(this, FieldEffectTypes.DojoEffect.Clear);
        }
Esempio n. 2
0
        public override void OnMobDie(CMob removedMob)
        {
            // remove statues
            switch (removedMob.nMobTemplateId)
            {
            case FIRST_DUMMY_MOB:
                break;

            case SECOND_DUMMY_MOB:
                // do nothing
                break;

            case FIRST_DAMAGE_SINK:
                remove(8820020, 8820024);                         // solomon
                remove(8820021, 8820025);                         // rex
                break;

            case 8820011:                     // second
                remove(8820020, 8820024);     // solomon
                remove(8820021, 8820025);     // rex
                remove(8820022, 8820026);     // hugin
                break;

            case 8820012:                     // third
                remove(8820020, 8820024);     // solomon
                remove(8820021, 8820025);     // rex
                remove(8820022, 8820026);     // hugin
                remove(8820023, 8820027);     // munin
                break;

            case 8820013:                     // fourth
                remove(8820020, 8820024);     // solomon
                remove(8820021, 8820025);     // rex
                remove(8820022, 8820026);     // hugin
                remove(8820023, 8820027);     // munin
                remove(8820019);              // ariel
                break;

            case LAST_DAMAGE_SINK:
                CurSink = null;
                remove(IMMORTAL_PB);
                // remove immortal pb
                //var pb = Mobs.FirstOrDefault(mob => mob.nMobTemplateId == IMMORTAL_PB);
                //Mobs.Remove(pb);
                break;
            }

            if (removedMob.nMobTemplateId == MORTAL_PB)
            {
                base.OnMobDie(removedMob);                 // give rewards
            }
            else
            {
                removedMob.DistributeEXP();                 // they always give exp
            }

            void remove(params int[] mobids)
            {
                foreach (var _mob in Mobs)
                {
                    if (mobids.Contains(_mob.nMobTemplateId))
                    {
                        //Mobs.Remove(_mob);
                        _mob.Stats.HP = 0;                         // roundabout way of force-removing it in the next field update cycle
                        //Broadcast(_mob.MakeLeaveFieldPacket());
                    }
                }
            }
        }