Пример #1
0
        public static void InnerDoorReward(KeepDoor door, Realms attackingRealm, string description, ContributionManager contributionManagerInstance)
        {
            var attackingPlayers = door.GameObject.PlayersInRange.Where(x => x.Realm == attackingRealm);

            // Small reward for inner door destruction
            foreach (var player in attackingPlayers)
            {
                if (!player.Initialized)
                {
                    continue;
                }

                RewardLogger.Trace($"Inner Door reward for player : {player.Name} ");


                var random = StaticRandom.Instance.Next(1, 25);
                player.AddXp((uint)(INNER_DOOR_XP * (1 + (float)random / 100)), false, false);
                player.AddRenown((uint)(INNER_DOOR_RP * (1 + (float)random / 100)), false, RewardType.None, $"Destruction of {description}'s inner door");

                player.UpdatePlayerBountyEvent((byte)ContributionDefinitions.DESTROY_INNER_DOOR);

                // Add contribution
                //contributionManagerInstance.UpdateContribution(player.CharacterId, (byte)ContributionDefinitions.DESTROY_INNER_DOOR);
                //var contributionDefinition = new BountyService().GetDefinition((byte)ContributionDefinitions.DESTROY_INNER_DOOR);
                //player.BountyManagerInstance.AddCharacterBounty(player.CharacterId, contributionDefinition.ContributionValue);
            }
        }
Пример #2
0
            public KeepGameObject(GameObject_spawn spawn, KeepDoor keepDoor, Keep keep)
            {
                _keep     = keep;
                Spawn     = spawn;
                Name      = spawn.Proto.Name;
                _keepDoor = keepDoor;

                if (Constants.DoomsdaySwitch == 0)
                {
                    if (keepDoor.Info.Number == (int)KeepDoorType.InnerMain || keepDoor.Info.Number == (int)KeepDoorType.OuterMain)
                    {
                        Realm = keep.Realm;
                        Spawn.Proto.HealthPoints = (uint)_keep.Tier * 10000;
                    }
                }
                else
                {
                    if (keepDoor.Info.Number == (int)KeepDoorType.InnerMain || keepDoor.Info.Number == (int)KeepDoorType.OuterMain)
                    {
                        Realm = keep.Realm;
                        Spawn.Proto.HealthPoints = 4 * 10000;
                    }
                }

                _enterExitPoints[0] = new Point3D(_keepDoor.Info.TeleportX1, _keepDoor.Info.TeleportY1, _keepDoor.Info.TeleportZ1);
                _enterExitPoints[1] = new Point3D(_keepDoor.Info.TeleportX2, _keepDoor.Info.TeleportY2, _keepDoor.Info.TeleportZ2);

                EvtInterface.AddEventNotify(EventName.OnReceiveDamage, OnReceiveDamage);
            }
Пример #3
0
            public KeepGameObject(GameObject_spawn spawn, KeepDoor keepDoor, BattleFrontKeep keep)
            {
                _keep     = keep;
                Spawn     = spawn;
                Name      = spawn.Proto.Name;
                _keepDoor = keepDoor;


                if (keepDoor.Info.Number == (int)KeepDoorType.InnerMain || keepDoor.Info.Number == (int)KeepDoorType.OuterMain)
                {
                    Realm = keep.Realm;
                    Spawn.Proto.HealthPoints = 4 * 500000;
                    Health = Spawn.Proto.HealthPoints;
                }

                _enterExitPoints[0] = new Point3D(_keepDoor.Info.TeleportX1, _keepDoor.Info.TeleportY1, _keepDoor.Info.TeleportZ1);
                _enterExitPoints[1] = new Point3D(_keepDoor.Info.TeleportX2, _keepDoor.Info.TeleportY2, _keepDoor.Info.TeleportZ2);

                EvtInterface.AddEventNotify(EventName.OnReceiveDamage, OnReceiveDamage);
            }