Exemplo n.º 1
0
        public static void InitNPCs()
        {
//          Oggleflint
            oggleflintEntry = NPCMgr.GetEntry(NPCId.Oggleflint);
            oggleflintEntry.AddSpell(SpellId.Cleave);
            oggleflintEntry.Activated += oggleflint =>
            {
                var brain        = (BaseBrain)oggleflint.Brain;
                var combatAction = (AICombatAction)brain.Actions[BrainState.Combat];
                combatAction.Strategy = new OggleflintAttackAction(oggleflint);
                oggleflint.AddProcHandler(cleave);
            };

//          Taragaman the Hungerer
            taragamanEntry = NPCMgr.GetEntry(NPCId.TaragamanTheHungerer);
//          taragamanEntry.AddSpell(SpellId.Uppercut);  //Not working properly
            taragamanEntry.AddSpell(SpellId.FireNova);
            taragamanEntry.Activated += taragaman =>
            {
                var brain        = (BaseBrain)taragaman.Brain;
                var combatAction = (AICombatAction)brain.Actions[BrainState.Combat];
                combatAction.Strategy = new TaragamanAttackAction(taragaman);
//              taragaman.AddProcHandler(uppercut);  //Currently not working
                taragaman.AddProcHandler(firenova);
            };

//          Jergosh the Invoker
            jergoshEntry = NPCMgr.GetEntry(NPCId.JergoshTheInvoker);
            jergoshEntry.AddSpell(SpellId.CurseOfWeakness);
            jergoshEntry.AddSpell(SpellId.Immolate);
            jergoshEntry.Activated += jergosh =>
            {
                var brain        = (BaseBrain)jergosh.Brain;
                var combatAction = (AICombatAction)brain.Actions[BrainState.Combat];
                combatAction.Strategy = new JergoshAttackAction(jergosh);
                jergosh.AddProcHandler(weakness);
                jergosh.AddProcHandler(immolate);
            };

//          Bazzalan
            bazzalanEntry = NPCMgr.GetEntry(NPCId.Bazzalan);
            bazzalanEntry.AddSpell(SpellId.Poison);
            bazzalanEntry.AddSpell(SpellId.SinisterStrike);
            bazzalanEntry.Activated += bazzalan =>
            {
                var brain        = (BaseBrain)bazzalan.Brain;
                var combatAction = (AICombatAction)brain.Actions[BrainState.Combat];
                combatAction.Strategy = new BazzalanAttackAction(bazzalan);
                bazzalan.AddProcHandler(poison);
                bazzalan.AddProcHandler(sstrike);
            };
        }
Exemplo n.º 2
0
        public static void InitNPCs()
        {
            // (!)Rethilgore
            rethilgoreEntry = NPCMgr.GetEntry(NPCId.Rethilgore);
            rethilgoreEntry.AddSpell(SpellId.SoulDrain);                // add Rethilgore Spell
            rethilgoreEntry.BrainCreator = rethilgore => new RethilgoreBrain(rethilgore);

            // Rethilgore spell has a cooldown of about 30s
            SpellHandler.Apply(spell => { spell.CooldownTime = 30000; }, SpellId.SoulDrain);


            // (!)Baron Silverlaine
            baronsilverlaineEntry = NPCMgr.GetEntry(NPCId.BaronSilverlaine);
            baronsilverlaineEntry.AddSpell(SpellId.VeilOfShadow);
            SpellHandler.Apply(spell => { spell.CooldownTime = 15000; }, SpellId.VeilOfShadow);


            // (!)Commander Springvale
            commanderspringvaleEntry = NPCMgr.GetEntry(NPCId.CommanderSpringvale);
            commanderspringvaleEntry.AddSpell(SpellId.ClassSkillHammerOfJusticeRank2);
            commanderspringvaleEntry.AddSpell(SpellId.HolyLight_7);

            SpellHandler.Apply(spell => { spell.CooldownTime = 60000; }, SpellId.ClassSkillHammerOfJusticeRank2);
            SpellHandler.Apply(spell => { spell.CooldownTime = 45000; }, SpellId.HolyLight_7);


            // (!)Odo the Blindwatcher
            blindwatcherEntry = NPCMgr.GetEntry(NPCId.OdoTheBlindwatcher);
            blindwatcherEntry.AddSpell(SpellId.SkullforgeBrand);

            SpellHandler.Apply(spell => { spell.CooldownTime = 60000; }, SpellId.HowlingRage_3);


            // (!)Fenrus the Devourer
            fenrusEntry = NPCMgr.GetEntry(NPCId.FenrusTheDevourer);
            fenrusEntry.AddSpell(SpellId.ToxicSaliva);
            fenrusEntry.BrainCreator = fenrus => new FenrusBrain(fenrus);

            SpellHandler.Apply(spell => { spell.CooldownTime = 60000; }, SpellId.ToxicSaliva);


            // (!)Archmage Arugal
            arugalEntry = NPCMgr.GetEntry(NPCId.Arugal);
            arugalEntry.AddSpell(SpellId.Thundershock);
            arugalEntry.AddSpell(SpellId.VoidBolt);

            SpellHandler.Apply(spell => { spell.CooldownTime = 25000; }, SpellId.Thundershock);
            SpellHandler.Apply(spell => { spell.CooldownTime = 40000; }, SpellId.VoidBolt);
        }
Exemplo n.º 3
0
        public static void SetupGrizzly()
        {
            // default settings
            GrizzlyBear = new NPCEntry
            {
                Id             = BearId,
                DefaultName    = "Sample Grizzly",
                EntryFlags     = NPCEntryFlags.Tamable,
                Type           = CreatureType.Humanoid,
                DisplayIds     = new[] { 21635u },
                Scale          = 1,
                MinLevel       = 73,
                MaxLevel       = 74,
                HordeFactionId = FactionTemplateId.Monster_2,
                MinHealth      = 100000,
                MaxHealth      = 500000,
                AttackPower    = 314,
                AttackTime     = 1500,
                MinDamage      = 250,
                MaxDamage      = 360,
                WalkSpeed      = 2.5f,
                RunSpeed       = 8f,
                FlySpeed       = 14f,

                MinMana = 2000
            };

            GrizzlyBear.SetResistance(DamageSchool.Physical, 7600);

            // AOE damage spell
            GrizzlyBear.AddSpell(SpellId.ConeOfFire);

            // A spell with a freeze debuff
            GrizzlyBear.AddSpell(SpellId.Chilled);

            // Sample gossip menu
            GrizzlyBear.DefaultGossip = CreateSampleGossipMenu();

            GrizzlyBear.FinalizeDataHolder();

            //NPCMgr.AddEntry(BearId, GrizzlyBear);
        }
Exemplo n.º 4
0
        public static void InitNPCs()
        {
            // Dragonflayer Ironhelm
            dragonflayerIronhelm = NPCMgr.GetEntry(NPCId.DragonflayerIronhelm);

            dragonflayerIronhelm.AddSpell(SpellId.HeroicStrike_9);
            SpellHandler.Apply(spell => { spell.CooldownTime = 5000; },
                               SpellId.HeroicStrike_9);


            //Prince Keleseth
            SetupPrinceKeleseth();


            // Dragonflayer Ironhelm
            dragonflayerIronhelm = NPCMgr.GetEntry(NPCId.DragonflayerIronhelm);

            dragonflayerIronhelm.AddSpell(SpellId.HeroicStrike_9);
            SpellHandler.Apply(spell => { spell.CooldownTime = 5000; },
                               SpellId.HeroicStrike_9);
        }
Exemplo n.º 5
0
        public static void InitNPCs()
        {
            // Dragonflayer Ironhelm
            dragonflayerIronhelm = NPCMgr.GetEntry(NPCId.DragonflayerIronhelm);

            dragonflayerIronhelm.AddSpell(SpellId.HeroicStrike_9);
            SpellHandler.Apply(spell => { spell.CooldownTime = 5000; },
                               SpellId.HeroicStrike_9);


            //Prince Keleseth
            SetupPrinceKeleseth();


            // Dragonflayer Ironhelm
            dragonflayerIronhelm = NPCMgr.GetEntry(NPCId.DragonflayerIronhelm);

            dragonflayerIronhelm.AddSpell(SpellId.HeroicStrike_9);
            SpellHandler.Apply(spell => { spell.CooldownTime = 5000; },
                               SpellId.HeroicStrike_9);


            //Ingvard
            ingvardEntry = NPCMgr.GetEntry(NPCId.IngvarThePlunderer);
            ingvardEntry.BrainCreator = ingvarthePlunderer => new IngvarThePlundererBrain(ingvarthePlunderer);

            ingvardEntry.Activated += ingvar =>
            {
                var instance = ingvar.Map as UtgardeKeep;
                if (instance == null || ingvar.SpawnPoint == null)
                {
                    return;
                }

                ((BaseBrain)ingvar.Brain).DefaultCombatAction.Strategy = new IngvarThePlundererAttackAction(ingvar);
            };
        }
Exemplo n.º 6
0
        public static void InitNPCs()
        {
            _deviateStinglashEntry = NPCMgr.GetEntry(NPCId.DeviateStinglash);
            _deviateStinglashEntry.AddSpell(SpellId.Lash);
            var lash = SpellHandler.Get(SpellId.Lash);

            lash.AISettings.SetCooldownRange(17000, 20000);

            _deviateCreeperEntry = NPCMgr.GetEntry(NPCId.DeviateCreeper);
            _deviateCreeperEntry.AddSpell(SpellId.InfectedWound);
            SpellHandler.Apply(spell => spell.CooldownTime = Random.Next(12000, 18000), SpellId.InfectedWound);

            _deviateSlayerEntry            = NPCMgr.GetEntry(NPCId.DeviateSlayer);
            _deviateSlayerEntry.Activated +=
                deviateSlayer => { ((BaseBrain)deviateSlayer.Brain).DefaultCombatAction.Strategy = new DeviateSlayerAttackAction(deviateSlayer); };

            _mutanustheDevourerEntry = NPCMgr.GetEntry(NPCId.MutanusTheDevourer);
            var mutanustheDevourerSpells = new[] { SpellId.NaralexsNightmare, SpellId.Terrify, SpellId.ThundercrackRank1 };

            _mutanustheDevourerEntry.AddSpells(mutanustheDevourerSpells);
            SpellHandler.Apply(spell => spell.CooldownTime = 30000, mutanustheDevourerSpells[0]);
            SpellHandler.Apply(spell => spell.CooldownTime = 50000, mutanustheDevourerSpells[1]);
            SpellHandler.Apply(spell =>
            {
                spell.TargetFlags  = SpellTargetFlags.Self;
                spell.CooldownTime = 10000;
            }, mutanustheDevourerSpells[2]);

            _madMagglishEntry = NPCMgr.GetEntry(NPCId.MadMagglish);
            _madMagglishEntry.AddSpell(SpellId.SmokeBomb);
            SpellHandler.Apply(spell =>
            {
                spell.TargetFlags  = SpellTargetFlags.Self;
                spell.CooldownTime = 9000;
            }, SpellId.SmokeBomb);

            _lordCobrahnEntry = NPCMgr.GetEntry(NPCId.LordCobrahn);
            _lordCobrahnEntry.BrainCreator = lordCobrahn => new LordCobrahnBrain(lordCobrahn);
            _lordCobrahnEntry.Activated   +=
                lordCobrahn => { ((BaseBrain)lordCobrahn.Brain).DefaultCombatAction.Strategy = new LordCobrahnAttackAction(lordCobrahn); };

            _lordPythasEntry = NPCMgr.GetEntry(NPCId.LordPythas);
            var lordPythasSpells = new[] { SpellId.ThunderclapRank1, SpellId.SleepRank1 };

            _lordPythasEntry.AddSpells(lordPythasSpells);
            SpellHandler.Apply(spell =>
            {
                spell.TargetFlags  = SpellTargetFlags.Self;
                spell.CooldownTime = Random.Next(6000, 11000);
            }, lordPythasSpells[0]);
            SpellHandler.Apply(spell => spell.CooldownTime = Random.Next(12000, 20000), lordPythasSpells[1]);
            _lordPythasEntry.BrainCreator = lordPythas => new LordPythasBrain(lordPythas);
            _lordPythasEntry.Activated   +=
                lordPythas => { ((BaseBrain)lordPythas.Brain).DefaultCombatAction.Strategy = new LordPythasAttackAction(lordPythas); };

            _ladyAnacondraEntry = NPCMgr.GetEntry(NPCId.LadyAnacondra);
            _ladyAnacondraEntry.AddSpell(SpellId.SleepRank1);
            SpellHandler.Apply(spell => spell.CooldownTime = Random.Next(12000, 25000), SpellId.SleepRank1);
            _ladyAnacondraEntry.BrainCreator = ladyAnacondra => new LadyAnacondraBrain(ladyAnacondra);
            _ladyAnacondraEntry.Activated   +=
                ladyAnacondra => { ((BaseBrain)ladyAnacondra.Brain).DefaultCombatAction.Strategy = new LadyAnacondraAttackAction(ladyAnacondra); };

            _boahnEntry = NPCMgr.GetEntry(NPCId.Boahn);
            _boahnEntry.BrainCreator = boahn => new BoahnBrain(boahn);
            _boahnEntry.Activated   +=
                boahn => { ((BaseBrain)boahn.Brain).DefaultCombatAction.Strategy = new BoahnAttackAction(boahn); };

            _lordSerpentisEntry = NPCMgr.GetEntry(NPCId.LordSerpentis);
            _lordSerpentisEntry.AddSpell(SpellId.SleepRank1);
            SpellHandler.Apply(spell => spell.CooldownTime = Random.Next(10000, 19000), SpellId.SleepRank1);
            _lordSerpentisEntry.BrainCreator = lordSerpentis => new LordSerpentisBrain(lordSerpentis);
            _lordSerpentisEntry.Activated   +=
                lordSerpentis => { ((BaseBrain)lordSerpentis.Brain).DefaultCombatAction.Strategy = new LordSerpentisAttackAction(lordSerpentis); };

            _skumEntry = NPCMgr.GetEntry(NPCId.Skum);
            _skumEntry.AddSpell(SpellId.ChainedBolt);
            SpellHandler.Apply(spell => spell.CooldownTime = Random.Next(4000, 6000), SpellId.ChainedBolt);

            _druidoftheFangEntry = NPCMgr.GetEntry(NPCId.DruidOfTheFang);
            _druidoftheFangEntry.BrainCreator = druidoftheFang => new DruidoftheFangBrain(druidoftheFang);
            _druidoftheFangEntry.Activated   +=
                druidoftheFang => { ((BaseBrain)druidoftheFang.Brain).DefaultCombatAction.Strategy = new DruidoftheFangAttackAction(druidoftheFang); };

            _deviateAdderEntry = NPCMgr.GetEntry(NPCId.DeviateAdder);
            _deviateAdderEntry.AddSpell(SpellId.EffectPoison);
            SpellHandler.Apply(spell => spell.CooldownTime = Random.Next(15000, 25000), SpellId.EffectPoison);

            _deviateCrocoliskEntry = NPCMgr.GetEntry(NPCId.DeviateCrocolisk);
            _deviateCrocoliskEntry.AddSpell(SpellId.TendonRip);
            SpellHandler.Apply(spell => spell.CooldownTime = Random.Next(10000, 12000), SpellId.TendonRip);

            _deviateLasherEntry = NPCMgr.GetEntry(NPCId.DeviateLasher);
            _deviateLasherEntry.AddSpell(SpellId.WideSlashRank1);
            SpellHandler.Apply(spell => spell.CooldownTime = Random.Next(8000, 12000), SpellId.WideSlashRank1);

            _deviateDreadfangEntry = NPCMgr.GetEntry(NPCId.DeviateDreadfang);
            _deviateDreadfangEntry.AddSpell(SpellId.Terrify);
            SpellHandler.Apply(spell => spell.CooldownTime = Random.Next(20000, 25000), SpellId.Terrify);

            _deviateViperEntry = NPCMgr.GetEntry(NPCId.DeviateViper);
            _deviateViperEntry.AddSpell(SpellId.LocalizedToxin);
            SpellHandler.Apply(spell => spell.CooldownTime = Random.Next(10000, 15000), SpellId.LocalizedToxin);

            _deviateVenomwingEntry = NPCMgr.GetEntry(NPCId.DeviateVenomwing);
            _deviateVenomwingEntry.AddSpell(SpellId.ToxicSpit);
            SpellHandler.Apply(spell => spell.CooldownTime = Random.Next(8000, 10000), SpellId.ToxicSpit);

            _deviateShamblerEntry            = NPCMgr.GetEntry(NPCId.DeviateShambler);
            _deviateShamblerEntry.Activated +=
                deviateShambler => { ((BaseBrain)deviateShambler.Brain).DefaultCombatAction.Strategy = new DeviateShamblerAttackAction(deviateShambler); };

            _verdanTheEverlivingEntry = NPCMgr.GetEntry(NPCId.VerdanTheEverliving);
            _verdanTheEverlivingEntry.AddSpell(SpellId.GraspingVines);
            SpellHandler.Apply(spell =>
            {
                spell.TargetFlags  = SpellTargetFlags.Self;
                spell.CooldownTime = Random.Next(10000, 13000);
            }, SpellId.GraspingVines);
        }
Exemplo n.º 7
0
        public static void InitNPCs()
        {
            // Graveyard
            // Interrogator Vishas
            vishasEntry = NPCMgr.GetEntry(NPCId.InterrogatorVishas);
            vishasEntry.AddSpell(SpellId.ClassSkillShadowWordPainRank5);
            vishasEntry.BrainCreator = interrogatorvishas => new InterrogatorVishasBrain(interrogatorvishas);
            vishasEntry.Activated   += interrogatorvishas =>
            {
                ((BaseBrain)interrogatorvishas.Brain).DefaultCombatAction.Strategy = new InterrogatorVishasAttackAction(interrogatorvishas);
            };

            SpellHandler.Apply(spell => { spell.CooldownTime = 5000; }, SpellId.ClassSkillShadowWordPainRank5);

            // Bloodmage Thalnos
            thalnosEntry = NPCMgr.GetEntry(NPCId.BloodmageThalnos);
            thalnosEntry.AddSpell(SpellId.ClassSkillFlameShockRank3);
            thalnosEntry.AddSpell(SpellId.ClassSkillShadowBoltRank5);
            thalnosEntry.AddSpell(SpellId.FlameSpike_2);
            thalnosEntry.AddSpell(SpellId.FireNova_4);
            thalnosEntry.BrainCreator = bloodmagethalnos => new BloodmageThalnosBrain(bloodmagethalnos);
            thalnosEntry.Activated   += bloodmagethalnos =>
            {
                ((BaseBrain)bloodmagethalnos.Brain).DefaultCombatAction.Strategy = new BloodmageThalnosAttackAction(bloodmagethalnos);
            };

            SpellHandler.Apply(spell => { spell.CooldownTime = 10000; }, SpellId.ClassSkillFlameShockRank3);
            SpellHandler.Apply(spell => { spell.CooldownTime = 2000; }, SpellId.ClassSkillShadowBoltRank5);
            SpellHandler.Apply(spell => { spell.CooldownTime = 8000; }, SpellId.FlameSpike_2);
            SpellHandler.Apply(spell => { spell.CooldownTime = 40000; }, SpellId.FireNova_4);

            // Scorn (Scourge Invasions Event)
            scornEntry = NPCMgr.GetEntry(NPCId.Scorn);
            scornEntry.AddSpell(SpellId.LichSlap);
            scornEntry.AddSpell(SpellId.FrostboltVolley);
            scornEntry.AddSpell(SpellId.ClassSkillMindFlayRank4);
            scornEntry.AddSpell(SpellId.FrostNova_6);
            scornEntry.BrainCreator = scorn => new ScornBrain(scorn);

            SpellHandler.Apply(spell => { spell.CooldownTime = 45000; }, SpellId.LichSlap);
            SpellHandler.Apply(spell => { spell.CooldownTime = 30000; }, SpellId.FrostboltVolley);
            SpellHandler.Apply(spell => { spell.CooldownTime = 30000; }, SpellId.ClassSkillMindFlayRank4);
            SpellHandler.Apply(spell => { spell.CooldownTime = 30000; }, SpellId.FrostNova_6);

            // Library
            // Houndmaster Loksey
            houndmasterlokseyEntry = NPCMgr.GetEntry(NPCId.HoundmasterLoksey);
            houndmasterlokseyEntry.AddSpell(SpellId.SummonScarletHound);
            houndmasterlokseyEntry.AddSpell(SpellId.Bloodlust);
            houndmasterlokseyEntry.BrainCreator = houndmasterloksey => new HoundmasterLokseyBrain(houndmasterloksey);

            SpellHandler.Apply(spell => { spell.CooldownTime = 20000; }, SpellId.Bloodlust);

            // Arcanist Doan
            arcanistdoanEntry = NPCMgr.GetEntry(NPCId.ArcanistDoan);
            arcanistdoanEntry.AddSpell(SpellId.SilenceRank1);
            arcanistdoanEntry.AddSpell(SpellId.ArcaneExplosion_25);
            arcanistdoanEntry.AddSpell(SpellId.Polymorph);
            arcanistdoanEntry.BrainCreator = arcanistdoan => new ArcanistDoanBrain(arcanistdoan);
            arcanistdoanEntry.Activated   += arcanistdoan =>
            {
                ((BaseBrain)arcanistdoan.Brain).DefaultCombatAction.Strategy = new ArcanistDoanAttackAction(arcanistdoan);
            };

            SpellHandler.Apply(spell => { spell.CooldownTime = 15000; }, SpellId.SilenceRank1);
            SpellHandler.Apply(spell => { spell.CooldownTime = 3000; }, SpellId.ArcaneExplosion_25);
            SpellHandler.Apply(spell => { spell.CooldownTime = 20000; }, SpellId.Polymorph);

            // Armory
            // Herod
            herodEntry = NPCMgr.GetEntry(NPCId.Herod);
            herodEntry.AddSpell(SpellId.Cleave_2);
            herodEntry.BrainCreator = herod => new HerodBrain(herod);
            herodEntry.Activated   += herod =>
            {
                ((BaseBrain)herod.Brain).DefaultCombatAction.Strategy = new HerodAttackAction(herod);
            };

            SpellHandler.Apply(spell => { spell.CooldownTime = 12000; }, SpellId.Cleave_2);

            // Cathedral
            // High Inquisitor Fairbanks
            fairbanksEntry = NPCMgr.GetEntry(NPCId.HighInquisitorFairbanks);
            fairbanksEntry.AddSpell(SpellId.CurseOfBlood);
            fairbanksEntry.AddSpell(SpellId.DispelMagic);
            fairbanksEntry.AddSpell(SpellId.Fear);
            fairbanksEntry.AddSpell(SpellId.PowerWordShield);
            fairbanksEntry.AddSpell(SpellId.Sleep);
            fairbanksEntry.BrainCreator = highinquisitorfairbanks => new HighInquisitorFairbanksBrain(highinquisitorfairbanks);
            fairbanksEntry.Activated   += highinquisitorfairbanks =>
            {
                ((BaseBrain)highinquisitorfairbanks.Brain).DefaultCombatAction.Strategy = new HighInquisitorFairbanksAttackAction(highinquisitorfairbanks);
            };

            SpellHandler.Apply(spell => { spell.CooldownTime = 10000; }, SpellId.CurseOfBlood);
            SpellHandler.Apply(spell => { spell.CooldownTime = 30000; }, SpellId.DispelMagic);
            SpellHandler.Apply(spell => { spell.CooldownTime = 40000; }, SpellId.Fear);
            SpellHandler.Apply(spell => { spell.CooldownTime = 30000; }, SpellId.Sleep);

            // Scarlet Commander Mograine
            mograineEntry = NPCMgr.GetEntry(NPCId.ScarletCommanderMograine);
            mograineEntry.AddSpell(SpellId.CrusaderStrike_2);
            mograineEntry.AddSpell(SpellId.ClassSkillHammerOfJusticeRank3);
            mograineEntry.AddSpell(SpellId.LayOnHandsRank2);
            mograineEntry.AddSpell(SpellId.RetributionAuraRank1);
            mograineEntry.BrainCreator = scarletcommandermograine => new ScarletCommanderMograineBrain(scarletcommandermograine);

            SpellHandler.Apply(spell => { spell.CooldownTime = 10000; }, SpellId.CrusaderStrike_2);
            SpellHandler.Apply(spell => { spell.CooldownTime = 60000; }, SpellId.ClassSkillHammerOfJusticeRank3);


            // Arcanist Doan
            whitemaneEntry = NPCMgr.GetEntry(NPCId.HighInquisitorWhitemane);
            whitemaneEntry.AddSpell(SpellId.SilenceRank1);
            whitemaneEntry.AddSpell(SpellId.ArcaneExplosion_25);
            whitemaneEntry.AddSpell(SpellId.Polymorph);
            whitemaneEntry.BrainCreator = highinquisitorwhitemane => new HighInquisitorWhitemaneBrain(highinquisitorwhitemane);
            whitemaneEntry.Activated   += highinquisitorwhitemane =>
            {
                ((BaseBrain)highinquisitorwhitemane.Brain).DefaultCombatAction.Strategy = new HighInquisitorWhitemaneAttackAction(highinquisitorwhitemane);
            };

            SpellHandler.Apply(spell => { spell.CooldownTime = 15000; }, SpellId.SilenceRank1);
            SpellHandler.Apply(spell => { spell.CooldownTime = 3000; }, SpellId.ArcaneExplosion_25);
            SpellHandler.Apply(spell => { spell.CooldownTime = 20000; }, SpellId.Polymorph);
        }
Exemplo n.º 8
0
        private static void SetupPrinceKeleseth()
        {
            princeKelesethEntry = NPCMgr.GetEntry(NPCId.PrinceKeleseth);
            princeKelesethEntry.BrainCreator = princeKeleseth => new PrinceKelesethBrain(princeKeleseth);

            PrinceSkeletonEntry = NPCMgr.GetEntry(NPCId.VrykulSkeleton);

            // add spell to prince
            PrinceSkeletonEntry.AddSpell(SpellId.Decrepify);
            SpellHandler.Apply(spell => { spell.CooldownTime = 5000; }, SpellId.Decrepify);

            var princeSpawnEntry = princeKelesethEntry.SpawnEntries[0];
            var poolTemplate     = princeSpawnEntry.PoolTemplate;

            // do not let Skeletons decay
            PrinceSkeletonEntry.DefaultDecayDelayMillis = 0;

            // add skeleton spawn entries to pool
            for (var i = 0; i < PrinceSkeletonCount; i++)
            {
                var skelSpawnEntry = new NPCSpawnEntry(PrinceSkeletonEntry.NPCId, MapId.UtgardeKeep, PrinceSkeletonPositions[i])
                {
                    AutoSpawns = false,                                         // must not respawn automatically when dead
                    IsDead     = true,                                          // spawn dead
                    PoolId     = poolTemplate.PoolId                            // share Prince' pool
                };
                skelSpawnEntry.FinalizeDataHolder();                            // adds to PoolTemplate automatically

                PrinceSkeletonSpawnEntries[i] = skelSpawnEntry;
            }

            // give the prince his AttackAction
            princeKelesethEntry.Activated += prince =>
            {
                var instance = prince.Map as UtgardeKeep;
                if (instance == null || prince.SpawnPoint == null)
                {
                    return;
                }

                ((BaseBrain)prince.Brain).DefaultCombatAction.Strategy = new PrinceKelesethAttackAction(prince);

                instance.SpawnDeadPrinceSkeletons(prince);
            };

            // prince deleted
            princeKelesethEntry.Deleted += prince =>
            {
                var instance = prince.Map as UtgardeKeep;
                if (instance == null)
                {
                    return;
                }

                // add this "if", in case a GM spawns more than one prince
                if (instance.PrinceKeleseth == prince)
                {
                    // unset PrinceKeleseth object
                    instance.PrinceKeleseth = null;
                }
            };

            // prince dies
            princeKelesethEntry.Died += prince =>
            {
                var instance = prince.Map as UtgardeKeep;
                if (instance == null)
                {
                    return;
                }

                // kill all skeletons
                instance.KillPrinceSkeletons();
            };

            // update Skeleton if it dies/lives or gets deleted
            PrinceSkeletonEntry.Activated += UpdateSkeleton;
            PrinceSkeletonEntry.Died      += UpdateSkeleton;
            PrinceSkeletonEntry.Deleted   += UpdateSkeleton;

            princeKelesethEntry.AddSpell(SpellId.ShadowBolt_73);
            SpellHandler.Apply(spell => { spell.CooldownTime = 10000; },
                               SpellId.ShadowBolt_73);

            //Heroic
            //princeKelesethEntry.AddSpell(SpellId.ShadowBolt_99);
            //SpellHandler.Apply(spell => { spell.CooldownTime = 5000; },
            //    SpellId.ShadowBolt_73);

            //princeKelesethEntry.AddSpell(SpellId.FrostTomb_3);

            //princeKelesethEntry.AddSpell(SpellId.FrostTomb_3);

            //princeKelesethEntry.AddSpell(SpellId.FrostTombSummon);

            //princeKelesethEntry.AddSpell(SpellId.Decrepify);

            //princeKelesethEntry.AddSpell(SpellId.ScourgeResurrection);
        }
Exemplo n.º 9
0
        public static void InitNPCs()
        {
            // Rahkzor
            rhahkzorEntry = NPCMgr.GetEntry(NPCId.RhahkZor);
            rhahkzorEntry.BrainCreator = rhahkzor => new RhahkzorBrain(rhahkzor);

            rhahkzorEntry.AddSpell(SpellId.RhahkZorSlam);                       // add Rhakzor's slam


            // Sneed
            sneedShredderEntry       = NPCMgr.GetEntry(NPCId.SneedsShredder);
            sneedShredderEntry.Died += sneedShredder =>
            {
                // Cast the sneed ejection spell on the corpse after a short delay
                sneedShredder.CallDelayed(2500, (delayed) => { sneedShredder.SpellCast.TriggerSelf(ejectSneed); });
            };

            sneedEntry = NPCMgr.GetEntry(NPCId.Sneed);
            sneedEntry.AddSpell(disarm);
            sneedEntry.Died += sneed =>
            {
                var instance = sneed.Map as Deadmines;
                if (instance != null)
                {
                    GameObject door = instance.sneedDoor;
                    if (door != null && door.IsInWorld)
                    {
                        // Open the door
                        door.State = GameObjectState.Disabled;
                    }
                }
            };


            // Gilnid
            gilnidEntry = NPCMgr.GetEntry(NPCId.Gilnid);

            gilnidEntry.AddSpell(SpellId.MoltenMetal);
            gilnidEntry.AddSpell(SpellId.MeltOre);

            gilnidEntry.Died += gilnid =>
            {
                var instance = gilnid.Map as Deadmines;
                if (instance != null)
                {
                    GameObject door = instance.gilnidDoor;

                    if (door != null && door.IsInWorld)
                    {
                        // Open the door
                        door.State = GameObjectState.Disabled;
                    }
                }
            };

            gilnidEntry.Activated += gilnid =>
            {
                ((BaseBrain)gilnid.Brain).DefaultCombatAction.Strategy = new GilnidAttackAction(gilnid);
            };


            // Mr Smite
            smiteEntry = NPCMgr.GetEntry(NPCId.MrSmite);
            smiteEntry.BrainCreator = smite => new SmiteBrain(smite);
            smiteEntry.Activated   += smite =>
            {
                ((BaseBrain)smite.Brain).DefaultCombatAction.Strategy = new SmiteAttackAction(smite);
            };
        }