public override void OnMobDie(CMob removedMob)
        {
            base.OnMobDie(removedMob);             // has to come first so the next sink has been spawned (revived)

            int nextSinkID;

            switch (removedMob.nMobTemplateId)
            {
            case 8810026:                     // first dummy mob -> normal
                nextSinkID = 8810018;
                break;

            case 8810130:                     // first dummy mob -> chaos
                nextSinkID = 8810118;
                break;

            case 8810118:                     // first chaos sink
            case 8810119:                     // second chaos sink
            case 8810120:                     // third chaos sink
            case 8810121:                     // fourth chaos sink (fifth is last one)
                nextSinkID = removedMob.nMobTemplateId + 1;
                break;

            default:
                nextSinkID = 0;
                CurSink    = null;
                break;
            }

            if (nextSinkID <= 0)
            {
                return;
            }

            CurSink = Mobs.FirstOrDefault(mob => mob.nMobTemplateId == nextSinkID);

            if (CurSink != null)
            {
                return;
            }

            BroadcastNotice($"An error has occurred. (Null sink {nextSinkID})");
            OnClockEnd();             // error
        }
示例#2
0
 public Mob AtCoord(AxialCoord c)
 {
     return(Mobs.FirstOrDefault(mob => Equals(mob.Coord, c)));
 }