private void OpenRaid(Family fam)
        {
            List <EventContainer> onDeathEvents = new List <EventContainer>
            {
                new EventContainer(fam.Act4RaidBossMap, EventActionType.ThrowItems, new Tuple <int, short, byte, int, int>(_bossVNum, 1046, 10, 20000, 20001)),
                new EventContainer(fam.Act4RaidBossMap, EventActionType.ThrowItems, new Tuple <int, short, byte, int, int>(_bossVNum, 1244, 10, 5, 6))
            };

            if (_raidType.Equals(MapInstanceType.Act4Berios))
            {
                onDeathEvents.Add(new EventContainer(fam.Act4RaidBossMap, EventActionType.ThrowItems, new Tuple <int, short, byte, int, int>(_bossVNum, 2395, 3, 1, 2)));
                onDeathEvents.Add(new EventContainer(fam.Act4RaidBossMap, EventActionType.ThrowItems, new Tuple <int, short, byte, int, int>(_bossVNum, 2396, 5, 1, 2)));
                onDeathEvents.Add(new EventContainer(fam.Act4RaidBossMap, EventActionType.ThrowItems, new Tuple <int, short, byte, int, int>(_bossVNum, 2397, 10, 1, 2)));
            }
            onDeathEvents.Add(new EventContainer(fam.Act4RaidBossMap, EventActionType.ScriptEnd, (byte)1));
            MonsterToSummon bossMob = new MonsterToSummon(_bossVNum, new MapCell {
                X = _bossX, Y = _bossY
            }, -1, _bossMove)
            {
                DeathEvents = onDeathEvents
            };

            EventHelper.Instance.RunEvent(new EventContainer(fam.Act4RaidBossMap, EventActionType.SpawnMonster, bossMob));
            EventHelper.Instance.RunEvent(new EventContainer(fam.Act4Raid, EventActionType.SendPacket, UserInterfaceHelper.GenerateMsg(Language.Instance.GetMessageFromKey("ACT4RAID_OPEN"), 0)));
        }
Example #2
0
        private void openRaid(Family fami)
        {
            List <EventContainer> onDeathEvents = new List <EventContainer>
            {
                new EventContainer(fami.Act4RaidBossMap, EventActionType.THROWITEMS, new Tuple <int, short, byte, int, int>(_bossVNum, 1046, 10, 20000, 20001)),
                new EventContainer(fami.Act4RaidBossMap, EventActionType.THROWITEMS, new Tuple <int, short, byte, int, int>(_bossVNum, 1244, 10, 5, 6))
            };

            if (_raidType.Equals(MapInstanceType.Act4Berios))
            {
                onDeathEvents.Add(new EventContainer(fami.Act4RaidBossMap, EventActionType.THROWITEMS, new Tuple <int, short, byte, int, int>(_bossVNum, 2395, 3, 1, 2)));
                onDeathEvents.Add(new EventContainer(fami.Act4RaidBossMap, EventActionType.THROWITEMS, new Tuple <int, short, byte, int, int>(_bossVNum, 2396, 5, 1, 2)));
                onDeathEvents.Add(new EventContainer(fami.Act4RaidBossMap, EventActionType.THROWITEMS, new Tuple <int, short, byte, int, int>(_bossVNum, 2397, 10, 1, 2)));
            }
            onDeathEvents.Add(new EventContainer(fami.Act4RaidBossMap, EventActionType.SCRIPTEND, (byte)1));
            MonsterToSummon bossMob = new MonsterToSummon(_bossVNum, new MapCell()
            {
                X = _bossX, Y = _bossY
            }, -1, _bossMove)
            {
                DeathEvents = onDeathEvents
            };

            EventHelper.Instance.RunEvent(new EventContainer(fami.Act4RaidBossMap, EventActionType.SPAWNMONSTER, bossMob));
            EventHelper.Instance.RunEvent(new EventContainer(fami.Act4Raid, EventActionType.SENDPACKET, UserInterfaceHelper.GenerateMsg(Language.Instance.GetMessageFromKey("ACT4RAID_OPEN"), 0)));

            Observable.Timer(TimeSpan.FromSeconds(90)).Subscribe(o =>
            {
                //TODO: Summon Monsters
            });
        }
Example #3
0
        private void openRaid(Family fam)
        {
            fam.Act4RaidBossMap.OnCharacterDiscoveringMapEvents.Add(new Tuple <EventContainer, List <long> >(new EventContainer(fam.Act4RaidBossMap, EventActionType.STARTACT4RAIDWAVES, new List <long>()), new List <long>()));
            List <EventContainer> onDeathEvents = new List <EventContainer>
            {
                new EventContainer(fam.Act4RaidBossMap, EventActionType.THROWITEMS, new Tuple <int, short, byte, int, int, short>(_bossVNum, 1046, 10, 50000, 50001, 0)),
                new EventContainer(fam.Act4RaidBossMap, EventActionType.THROWITEMS, new Tuple <int, short, byte, int, int, short>(_bossVNum, 2361, 5, 2, 3, 0))
            };

            if (_raidType.Equals(MapInstanceType.Act4Berios))
            {
                onDeathEvents.Add(new EventContainer(fam.Act4RaidBossMap, EventActionType.THROWITEMS, new Tuple <int, short, byte, int, int, short>(_bossVNum, 2395, 3, 1, 2, 0)));
                onDeathEvents.Add(new EventContainer(fam.Act4RaidBossMap, EventActionType.THROWITEMS, new Tuple <int, short, byte, int, int, short>(_bossVNum, 2396, 5, 1, 2, 0)));
                onDeathEvents.Add(new EventContainer(fam.Act4RaidBossMap, EventActionType.THROWITEMS, new Tuple <int, short, byte, int, int, short>(_bossVNum, 2397, 10, 1, 2, 0)));

                fam.Act4RaidBossMap.OnCharacterDiscoveringMapEvents.Add(new Tuple <EventContainer, List <long> >(new EventContainer(fam.Act4RaidBossMap, EventActionType.SPAWNMONSTER, new MonsterToSummon(621, fam.Act4RaidBossMap.Map.GetRandomPosition(), null, move: true, hasDelay: 30)), new List <long>()));
                fam.Act4RaidBossMap.OnCharacterDiscoveringMapEvents.Add(new Tuple <EventContainer, List <long> >(new EventContainer(fam.Act4RaidBossMap, EventActionType.SPAWNMONSTER, new MonsterToSummon(622, fam.Act4RaidBossMap.Map.GetRandomPosition(), null, move: true, hasDelay: 205)), new List <long>()));
                fam.Act4RaidBossMap.OnCharacterDiscoveringMapEvents.Add(new Tuple <EventContainer, List <long> >(new EventContainer(fam.Act4RaidBossMap, EventActionType.SPAWNMONSTER, new MonsterToSummon(623, fam.Act4RaidBossMap.Map.GetRandomPosition(), null, move: true, hasDelay: 380)), new List <long>()));
            }
            onDeathEvents.Add(new EventContainer(fam.Act4RaidBossMap, EventActionType.SCRIPTEND, (byte)1));
            onDeathEvents.Add(new EventContainer(fam.Act4Raid, EventActionType.CHANGEPORTALTYPE, new Tuple <int, PortalType>(fam.Act4Raid.Portals.Find(s => s.SourceX == _sourcePortalX && s.SourceY == _sourcePortalY && !s.IsDisabled).PortalId, PortalType.Closed)));
            MonsterToSummon bossMob = new MonsterToSummon(_bossVNum, new MapCell {
                X = _bossX, Y = _bossY
            }, null, _bossMove)
            {
                DeathEvents = onDeathEvents
            };

            EventHelper.Instance.RunEvent(new EventContainer(fam.Act4RaidBossMap, EventActionType.SPAWNMONSTER, bossMob));
            EventHelper.Instance.RunEvent(new EventContainer(fam.Act4Raid, EventActionType.SENDPACKET, UserInterfaceHelper.GenerateMsg(Language.Instance.GetMessageFromKey("ACT4RAID_OPEN"), 0)));

            //Observable.Timer(TimeSpan.FromSeconds(90)).Subscribe(o =>
            //{
            //TODO: Summon Monsters
            //});
        }