Ejemplo n.º 1
0
        public void BossRespawnInstanceGroup(uint GroupID, bool rezall = false)
        {
            lock (GroupsinCombat)
            {
                if (!GroupsinCombat.Contains(GroupID) || rezall)
                {
                    return;
                }
                GroupsinCombat.Remove(GroupID);

                _BossSpawns.TryGetValue(GroupID, out List <InstanceBossSpawn> spawns);
                if (spawns == null)
                {
                    spawns = new List <InstanceBossSpawn>();
                }
                for (int i = 0; i < spawns.Count; i++)
                {
                    if (spawns[i].IsDead)
                    {
                        InstanceBossSpawn IS = spawns[i].RezInstanceSpawn();
                        spawns[i] = IS;
                    }
                }
                _BossSpawns[GroupID] = spawns;
            }
            EncounterInProgress = false;
        }
Ejemplo n.º 2
0
        public InstanceBossSpawn RezInstanceSpawn()
        {
            InstanceBossSpawn newCreature = new InstanceBossSpawn(Spawn, BossId, InstanceID, Instance);

            Region.AddObject(newCreature, Spawn.ZoneId);
            Destroy();
            return(newCreature);
        }
Ejemplo n.º 3
0
        private void LoadBossSpawns()
        {
            List <uint> deadbossIds = new List <uint>();

            if (Lockout != null)
            {
                for (int i = 0; i < Lockout.Bosseskilled.Split(':').Count(); i++)
                {
                    deadbossIds.Add(uint.Parse(Lockout.Bosseskilled.Split(':')[i]));
                }
            }

            InstanceService._InstanceBossSpawns.TryGetValue(Info.Entry, out List <Instance_Boss_Spawn> Obj);

            if (Obj == null)
            {
                return;
            }

            foreach (var obj in Obj)
            {
                if (obj.Realm == 0 || obj.Realm == Realm)
                {
                    if (deadbossIds.Contains(obj.bossId))
                    {
                        continue;
                    }

                    if (obj.ZoneID != ZoneID)
                    {
                        continue;
                    }

                    Creature_spawn spawn = new Creature_spawn
                    {
                        Guid = (uint)CreatureService.GenerateCreatureSpawnGUID()
                    };
                    spawn.BuildFromProto(CreatureService.GetCreatureProto(obj.Entry));
                    spawn.WorldO  = (int)obj.WorldO;
                    spawn.WorldY  = obj.WorldY;
                    spawn.WorldZ  = obj.WorldZ;
                    spawn.WorldX  = obj.WorldX;
                    spawn.ZoneId  = obj.ZoneID;
                    spawn.Enabled = 1;

                    InstanceBossSpawn IS = null;

                    switch (obj.Entry)
                    {
                    //zone 50
                    case 97425:
                        IS = new SimpleThananTreeLord(spawn, obj.bossId, obj.InstanceID, this);
                        break;

                    case 97441:
                        IS = new SimpleTheCadaithaineLion(spawn, obj.bossId, obj.InstanceID, this);
                        break;

                    case 97430:
                        IS = new SimpleSpiritofKurnous(spawn, obj.bossId, obj.InstanceID, this);
                        break;

                    //zone 63
                    case 38829:
                        IS = new SimpleGlompdaSquigMasta(spawn, obj.bossId, obj.InstanceID, this);
                        break;

                    //zone 64
                    case 37967:
                        IS = new SimpleMastaMixa(spawn, obj.bossId, obj.InstanceID, this);
                        break;

                    //zone 65
                    case 15102:
                        IS = new SimpleArdtaFeed(spawn, obj.bossId, obj.InstanceID, this);
                        break;

                    //zone 66
                    case 42207:
                        IS = new SimpleWightLordSolithex(spawn, obj.bossId, obj.InstanceID, this);
                        break;

                    //zone 152
                    case 19409:
                        IS = new SimpleKokritManEater(spawn, obj.bossId, obj.InstanceID, this);
                        break;

                    //zone 153
                    case 3650:
                        IS = new SimpleBulbousOne(spawn, obj.bossId, obj.InstanceID, this);
                        break;

                    case 3651:
                        IS = new SimpleProtFangchitter(spawn, obj.bossId, obj.InstanceID, this);
                        break;

                    case 3649:
                        IS = new SimpleVermerFangchitter(spawn, obj.bossId, obj.InstanceID, this);
                        break;

                    //zone 154
                    case 2501335:
                        IS = new SimpleGreySeerQuoltik(spawn, obj.bossId, obj.InstanceID, this);
                        break;

                    case 2501338:
                        IS = new SimpleMasterMoulderSkrot(spawn, obj.bossId, obj.InstanceID, this);
                        break;

                    case 2501340:
                        IS = new SimpleBrauk(spawn, obj.bossId, obj.InstanceID, this);
                        break;

                    //zone 155
                    case 10256:
                        IS = new SimpleHoarfrost(spawn, obj.bossId, obj.InstanceID, this);
                        break;

                    case 26812:
                        IS = new SimpleSebcrawtheDiscarded(spawn, obj.bossId, obj.InstanceID, this);
                        break;

                    case 26814:
                        IS = new SimpleLorthThunderbelly(spawn, obj.bossId, obj.InstanceID, this);
                        break;

                    case 26815:
                        IS = new SimpleSlorthThunderbelly(spawn, obj.bossId, obj.InstanceID, this);
                        break;

                    //zone 156
                    case 25721:
                        IS = new SimpleGhalmarRagehorn(spawn, obj.bossId, obj.InstanceID, this);
                        break;

                    case 33180:
                        IS = new SimpleUzhaktheBetrayer(spawn, obj.bossId, obj.InstanceID, this);
                        break;

                    case 33173:
                        IS = new SimpleVultheBloodchosen(spawn, obj.bossId, obj.InstanceID, this);
                        break;

                    //zone 163
                    case 45084:
                        IS = new SimpleTharlgnan(spawn, obj.bossId, obj.InstanceID, this);
                        break;

                    //zone 164
                    case 48112:
                        IS = new SimpleLordSlaurith(spawn, obj.bossId, obj.InstanceID, this);
                        break;

                    //zone 165
                    case 2000751:
                        IS = new SimpleKaarntheVanquisher(spawn, obj.bossId, obj.InstanceID, this);
                        break;

                    //zone 166
                    case 64106:
                        IS = new SimpleSkullLordVarIthrok(spawn, obj.bossId, obj.InstanceID, this);
                        break;

                    //zone 169
                    case 33401:
                        IS = new SimpleGoradiantheCreator(spawn, obj.bossId, obj.InstanceID, this);
                        break;

                    case 18762:
                        IS = new SimpleMasterMoulderVitchek(spawn, obj.bossId, obj.InstanceID, this);
                        break;

                    //zone 173
                    case 33172:
                        IS = new SimpleSnaptailtheBreeder(spawn, obj.bossId, obj.InstanceID, this);
                        break;

                    case 33182:
                        IS = new SimpleGoremane(spawn, obj.bossId, obj.InstanceID, this);
                        break;

                    case 33181:
                        IS = new SimpleViraxiltheBroken(spawn, obj.bossId, obj.InstanceID, this);
                        break;

                    //zone 176
                    case 2500954:
                        IS = new SimpleTheReaper(spawn, obj.bossId, obj.InstanceID, this);
                        break;

                    case 2500953:
                        IS = new SimpleCryptwebQueen(spawn, obj.bossId, obj.InstanceID, this);
                        break;

                    case 2500952:
                        IS = new SimpleSeraphinePaleEye(spawn, obj.bossId, obj.InstanceID, this);
                        break;

                    case 2500951:
                        IS = new SimpleSisterEudocia(spawn, obj.bossId, obj.InstanceID, this);
                        break;

                    case 2500950:
                        IS = new SimpleArchLectorVerrimus(spawn, obj.bossId, obj.InstanceID, this);
                        break;

                    case 2500949:
                        IS = new SimpleArchLectorZakarai(spawn, obj.bossId, obj.InstanceID, this);
                        break;

                    case 2500948:
                        IS = new SimpleTobiastheFallen(spawn, obj.bossId, obj.InstanceID, this);
                        break;

                    case 2500947:
                        IS = new SimpleNecromancerMalcidious(spawn, obj.bossId, obj.InstanceID, this);
                        break;

                    //zone 177
                    case 2501325:
                        IS = new SimpleSkivRedwarp(spawn, obj.bossId, obj.InstanceID, this);
                        break;

                    case 2501326:
                        IS = new SimpleWarlockPeenk(spawn, obj.bossId, obj.InstanceID, this);
                        break;

                    //zone 179
                    case 93757:
                        IS = new SimpleHandofUalatp(spawn, obj.bossId, obj.InstanceID, this);
                        break;

                    case 93814:
                        IS = new SimpleUsiriansKeeper(spawn, obj.bossId, obj.InstanceID, this);
                        break;

                    case 93834:
                        IS = new SimpleHighPriestHerakh1(spawn, obj.bossId, obj.InstanceID, this);
                        break;

                    //case 93834:
                    //  IS = new SimpleHighPriestHerakh2(spawn,  obj.bossId, obj.InstanceID, this);
                    //  break;
                    //case 93834:
                    //    IS = new SimpleHighPriestHerakh3(spawn,  obj.bossId, obj.InstanceID, this);
                    //    break;
                    case 94102:
                        IS = new SimpleAkiltheShrewd(spawn, obj.bossId, obj.InstanceID, this);
                        break;

                    case 94101:
                        IS = new SimpleJahitheIndignant(spawn, obj.bossId, obj.InstanceID, this);
                        break;

                    case 94103:
                        IS = new SimpleTumainitheHopeless(spawn, obj.bossId, obj.InstanceID, this);
                        break;

                    case 94191:
                        IS = new SimpleHierophantEutrata(spawn, obj.bossId, obj.InstanceID, this);
                        break;

                    case 94389:
                        IS = new SimpleKingAmenemhetumtheVultureLord(spawn, obj.bossId, obj.InstanceID, this);
                        break;

                    //zone 195
                    case 2000763:
                        IS = new SimpleCuliusEmbervine(spawn, obj.bossId, obj.InstanceID, this);
                        break;

                    case 46995:
                        IS = new SimpleSarlothBloodtouched(spawn, obj.bossId, obj.InstanceID, this);
                        break;

                    case 2000757:
                        IS = new SimpleKorthuktheRaging(spawn, obj.bossId, obj.InstanceID, this);
                        break;

                    case 46205:
                        IS = new SimpleBarakustheGodslayer(spawn, obj.bossId, obj.InstanceID, this);
                        break;

                    //zone 196
                    case 52594:
                        IS = new SimpleTheBileLord(spawn, obj.bossId, obj.InstanceID, this);
                        break;

                    case 52462:
                        IS = new SimpleSsrydianMorbidae(spawn, obj.bossId, obj.InstanceID, this);
                        break;

                    case 48128:
                        IS = new SimpleBartholomeustheSickly(spawn, obj.bossId, obj.InstanceID, this);
                        break;

                    //zone 241
                    case 2000772:
                        IS = new SimpleTsekaniHeyafa(spawn, obj.bossId, obj.InstanceID, this);
                        break;

                    //zone 242
                    case 2000764:
                        IS = new SimpleHapuShebikef(spawn, obj.bossId, obj.InstanceID, this);
                        break;

                    //zone 243
                    case 2000767:
                        IS = new SimpleBennuApeht(spawn, obj.bossId, obj.InstanceID, this);
                        break;

                    //zone 244
                    case 2000774:
                        IS = new SimpleSaaKhasef(spawn, obj.bossId, obj.InstanceID, this);
                        break;

                    //zone 260
                    case 4276:
                        IS = new SimpleTheDeamonicBeast(spawn, obj.bossId, obj.InstanceID, this);
                        break;

                    case 59211:
                        IS = new SimpleAhzranok(spawn, obj.bossId, obj.InstanceID, this);
                        break;

                    case 6821:
                        IS = new SimpleMalghorGreathorn(spawn, obj.bossId, obj.InstanceID, this);
                        break;

                    case 6841:
                        IS = new SimpleHorgulul(spawn, obj.bossId, obj.InstanceID, this);
                        break;

                    case 6843:
                        IS = new SimpleDralel(spawn, obj.bossId, obj.InstanceID, this);
                        break;

                    case 6807:
                        IS = new SimpleChulEarthkeeper(spawn, obj.bossId, obj.InstanceID, this);
                        break;

                    case 6856:
                        IS = new SimpleLargtheDevourer(spawn, obj.bossId, obj.InstanceID, this);
                        break;

                    case 6834:
                        IS = new SimpleButcherGutbeater(spawn, obj.bossId, obj.InstanceID, this);
                        break;

                    case 6850:
                        IS = new SimpleGoraktheAncient(spawn, obj.bossId, obj.InstanceID, this);
                        break;

                    case 6842:
                        IS = new SimpleSarthaintheWorldbearer(spawn, obj.bossId, obj.InstanceID, this);
                        break;

                    case 61601:
                        IS = new SimpleZaarthePainseeker(spawn, obj.bossId, obj.InstanceID, this);
                        break;

                    //case 4276:
                    //    IS = new SimpleTheDarkpromiseBeast2(spawn,  obj.bossId, obj.InstanceID, this);
                    //    break;
                    case 61598:
                        IS = new SimpleSechartheDarkpromiseChieftain(spawn, obj.bossId, obj.InstanceID, this);
                        break;

                    case 62147:
                        IS = new SimpleNKariKeeperofSecrets(spawn, obj.bossId, obj.InstanceID, this);
                        break;

                    //REMOVED BOSSES
                    //case 2000899:
                    //    IS = new SimpleFulgurThunderborn(spawn,  obj.bossId, obj.InstanceID, this);
                    //    break;

                    //case 2000901:
                    //    IS = new SimpleTonragThunderborn(spawn,  obj.bossId, obj.InstanceID, this);
                    //    break;
                    default:
                        IS = new InstanceBossSpawn(spawn, obj.bossId, obj.InstanceID, this);
                        break;
                    }

                    if (IS == null)
                    {
                        return;
                    }

                    if (obj.SpawnGroupID > 0)
                    {
                        _BossSpawns.TryGetValue(obj.SpawnGroupID, out List <InstanceBossSpawn> spawns);
                        if (spawns == null)
                        {
                            spawns = new List <InstanceBossSpawn>();
                        }
                        spawns.Add(IS);
                        _BossSpawns[obj.SpawnGroupID] = spawns;
                    }
                    Region.AddObject(IS, obj.ZoneID);
                }
            }
        }
Ejemplo n.º 4
0
 public void OnBossDeath(uint GroupID, InstanceBossSpawn boss)
 {
     EncounterInProgress = false;
 }