Beispiel #1
0
 public CraftCreateItem(
     INWScript script,
     IDataService data,
     IErrorService error,
     ICraftService craft,
     IComponentBonusService componentBonus,
     IBiowareXP2 biowareXP2,
     IColorTokenService color,
     IBaseService @base,
     ISkillService skill,
     IRandomService random,
     IPlayerStatService playerStat,
     IDurabilityService durability,
     IPerkService perk)
 {
     _               = script;
     _data           = data;
     _error          = error;
     _craft          = craft;
     _componentBonus = componentBonus;
     _biowareXP2     = biowareXP2;
     _color          = color;
     _base           = @base;
     _skill          = skill;
     _random         = random;
     _playerStat     = playerStat;
     _durability     = durability;
     _perk           = perk;
 }
 public AbilityService(INWScript script,
                       IDataContext db,
                       IPerkService perk,
                       IPVPSanctuaryService pvpSanctuary,
                       ITimeService time,
                       IBiowarePosition biowarePosition,
                       INWNXPlayer nwnxPlayer,
                       IColorTokenService color,
                       IRandomService random,
                       IFoodService food,
                       IEnmityService enmity,
                       INWNXEvents nwnxEvents,
                       INWNXDamage nwnxDamage,
                       ICustomEffectService customEffect)
 {
     _                = script;
     _db              = db;
     _perk            = perk;
     _pvpSanctuary    = pvpSanctuary;
     _time            = time;
     _biowarePosition = biowarePosition;
     _nwnxPlayer      = nwnxPlayer;
     _color           = color;
     _random          = random;
     _food            = food;
     _enmity          = enmity;
     _nwnxEvents      = nwnxEvents;
     _nwnxDamage      = nwnxDamage;
     _customEffect    = customEffect;
 }
Beispiel #3
0
        public void DeathService_BindPlayerSoul_ShouldUpdateDatabaseAndNotCallFloatingTextStringOnCreature()
        {
            // Arrange
            int                   callCount     = -1;
            INWScript             script        = Substitute.For <INWScript>();
            INWNXCreature         nwnxCreature  = Substitute.For <INWNXCreature>();
            ISerializationService serialization = Substitute.For <ISerializationService>();
            IRandomService        random        = Substitute.For <IRandomService>();
            IColorTokenService    color         = Substitute.For <IColorTokenService>();

            script.When(x => x.FloatingTextStringOnCreature(Arg.Any <string>(), Arg.Any <Object>(), Arg.Any <int>())).Do(x => callCount++);

            DeathService service = new DeathService(_db, script, serialization, random, color);
            NWPlayer     player  = Substitute.For <NWPlayer>(script, nwnxCreature);

            player.Object.Returns(x => new Object());
            player.GlobalID.Returns("123");
            player.Position.Returns(x => new Vector(43.2f, 22.2f, 87.0f));
            player.Facing.Returns(x => 320.666f);
            player.Area.Returns(x => new NWArea(script));
            player.Area.Tag.Returns("a_fake_area_tag");

            // Act
            service.BindPlayerSoul(player, false);
            var result = _db.PlayerCharacters.Single(x => x.PlayerID == "123");

            // Assert
            Assert.AreEqual(43.2f, result.RespawnLocationX);
            Assert.AreEqual(22.2f, result.RespawnLocationY);
            Assert.AreEqual(87.0f, result.RespawnLocationZ);
            Assert.AreEqual(320.666f, result.RespawnLocationOrientation);
            Assert.AreEqual("a_fake_area_tag", result.RespawnAreaTag);
            Assert.AreEqual(-1, callCount);
        }
Beispiel #4
0
 public CraftService(
     INWScript script,
     IDataContext db,
     IPerkService perk,
     ISkillService skill,
     IColorTokenService color,
     IItemService item,
     INWNXPlayer nwnxPlayer,
     IFoodService food,
     IRandomService random,
     IDurabilityService durability,
     IErrorService error)
 {
     _           = script;
     _db         = db;
     _perk       = perk;
     _skill      = skill;
     _color      = color;
     _item       = item;
     _nwnxPlayer = nwnxPlayer;
     _food       = food;
     _random     = random;
     _durability = durability;
     _error      = error;
 }
Beispiel #5
0
 public SpawnGold(
     INWScript script,
     IColorTokenService color)
 {
     _      = script;
     _color = color;
 }
Beispiel #6
0
 public PlayerService(
     INWScript script,
     IDataService data,
     IColorTokenService color,
     INWNXCreature nwnxCreature,
     INWNXPlayer player,
     INWNXPlayerQuickBarSlot qbs,
     IDialogService dialog,
     INWNXEvents nwnxEvents,
     IBackgroundService background,
     IRaceService race,
     IDurabilityService durability,
     IPlayerStatService stat,
     ILanguageService language)
 {
     _             = script;
     _data         = data;
     _color        = color;
     _nwnxCreature = nwnxCreature;
     _player       = player;
     _qbs          = qbs;
     _dialog       = dialog;
     _nwnxEvents   = nwnxEvents;
     _background   = background;
     _race         = race;
     _durability   = durability;
     _stat         = stat;
     _language     = language;
 }
Beispiel #7
0
 public AbilityService(INWScript script,
                       IDataService data,
                       IPerkService perk,
                       IPVPSanctuaryService pvpSanctuary,
                       ITimeService time,
                       IBiowarePosition biowarePosition,
                       INWNXPlayer nwnxPlayer,
                       IColorTokenService color,
                       IRandomService random,
                       IEnmityService enmity,
                       INWNXEvents nwnxEvents,
                       INWNXDamage nwnxDamage,
                       ICustomEffectService customEffect,
                       IPlayerStatService playerStat,
                       IItemService item)
 {
     _                = script;
     _data            = data;
     _perk            = perk;
     _pvpSanctuary    = pvpSanctuary;
     _time            = time;
     _biowarePosition = biowarePosition;
     _nwnxPlayer      = nwnxPlayer;
     _color           = color;
     _random          = random;
     _enmity          = enmity;
     _nwnxEvents      = nwnxEvents;
     _nwnxDamage      = nwnxDamage;
     _customEffect    = customEffect;
     _playerStat      = playerStat;
     _item            = item;
 }
Beispiel #8
0
 public Language(
     ILanguageService language,
     IColorTokenService color)
 {
     _language = language;
     _color    = color;
 }
Beispiel #9
0
 public DurabilityService(
     INWScript script,
     IColorTokenService color)
 {
     _      = script;
     _color = color;
 }
Beispiel #10
0
 public CoxxionTerminal(
     INWScript script,
     IDialogService dialog,
     IColorTokenService color)
     : base(script, dialog)
 {
     _color = color;
 }
Beispiel #11
0
 public ChangeHead(
     INWScript script,
     IDialogService dialog,
     IColorTokenService color)
     : base(script, dialog)
 {
     _color = color;
 }
 public ChatCommandService(
     INWNXChat nwnxChat,
     IColorTokenService color,
     IAuthorizationService auth)
 {
     _nwnxChat = nwnxChat;
     _color    = color;
     _auth     = auth;
 }
 public DurabilityService(
     INWScript script,
     IColorTokenService color,
     INWNXProfiler nwnxProfiler)
 {
     _             = script;
     _color        = color;
     _nwnxProfiler = nwnxProfiler;
 }
Beispiel #14
0
 public ToggleHolonet(
     INWScript script,
     IDataService data,
     IColorTokenService color)
 {
     _      = script;
     _data  = data;
     _color = color;
 }
Beispiel #15
0
 public FP(
     INWScript script,
     IColorTokenService color,
     IDataService data)
 {
     _      = script;
     _color = color;
     _data  = data;
 }
Beispiel #16
0
 public OnAttacked(
     INWScript script,
     IRandomService random,
     IColorTokenService color)
 {
     _       = script;
     _random = random;
     _color  = color;
 }
Beispiel #17
0
 public CloningTerminal(
     INWScript script,
     IDialogService dialog,
     IDeathService death,
     IColorTokenService color)
     : base(script, dialog)
 {
     _death = death;
     _color = color;
 }
Beispiel #18
0
 public RuneService(INWScript script,
                    IColorTokenService color,
                    INWNXDamage nwnxDamage,
                    ISkillService skill)
 {
     _           = script;
     _color      = color;
     _nwnxDamage = nwnxDamage;
     _skill      = skill;
 }
Beispiel #19
0
 public ChangeDescription(
     INWScript script,
     IDialogService dialog,
     IColorTokenService color,
     IPlayerDescriptionService playerDescription)
     : base(script, dialog)
 {
     _color             = color;
     _playerDescription = playerDescription;
 }
Beispiel #20
0
 public StorageService(INWScript script,
                       IDataContext db,
                       ISerializationService serialization,
                       IColorTokenService color)
 {
     _              = script;
     _db            = db;
     _serialization = serialization;
     _color         = color;
 }
 public ExpulsionManeuver(INWScript script,
                          IPerkService perk,
                          IRandomService random,
                          IColorTokenService color)
 {
     _       = script;
     _perk   = perk;
     _random = random;
     _color  = color;
 }
Beispiel #22
0
 public OnDisturbed(INWScript script,
                    IStructureService structure,
                    IColorTokenService color,
                    ISerializationService serialization)
 {
     _              = script;
     _structure     = structure;
     _color         = color;
     _serialization = serialization;
 }
 public FarmingService(INWScript script,
                       IDataContext db,
                       IRandomService random,
                       IColorTokenService color)
 {
     _       = script;
     _db     = db;
     _random = random;
     _color  = color;
 }
Beispiel #24
0
 public BuildToolMenu(
     INWScript script,
     IDialogService dialog,
     IStructureService structure,
     IColorTokenService color)
     : base(script, dialog)
 {
     _structure = structure;
     _color     = color;
 }
Beispiel #25
0
 public CraftingDevice(
     INWScript script,
     IDialogService dialog,
     IColorTokenService color,
     ICraftService craft)
     : base(script, dialog)
 {
     _color = color;
     _craft = craft;
 }
 public CharacterCustomization(
     INWScript script,
     IDialogService dialog,
     IColorTokenService color,
     IDataService data)
     : base(script, dialog)
 {
     _color = color;
     _data  = data;
 }
Beispiel #27
0
 public BackgroundMenu(
     INWScript script,
     IDialogService dialog,
     IColorTokenService color,
     IBackgroundService background)
     : base(script, dialog)
 {
     _background = background;
     _color      = color;
 }
Beispiel #28
0
 public FarmingService(INWScript script,
                       IDataService data,
                       IRandomService random,
                       IColorTokenService color)
 {
     _       = script;
     _data   = data;
     _random = random;
     _color  = color;
 }
Beispiel #29
0
 public KeyItems(
     INWScript script,
     IDialogService dialog,
     IKeyItemService keyItem,
     IColorTokenService color)
     : base(script, dialog)
 {
     _keyItem = keyItem;
     _color   = color;
 }
Beispiel #30
0
 public PerkService(INWScript script,
                    IColorTokenService color,
                    IDataContext db,
                    IBiowareXP2 biowareXP2)
 {
     _           = script;
     _color      = color;
     _db         = db;
     _biowareXP2 = biowareXP2;
 }