Пример #1
0
        public WorldEconomy(SEconomy parent)
        {
            this.WorldConfiguration = Configuration.WorldConfiguration.WorldConfig.LoadConfigurationFromFile(
                "tshock" + System.IO.Path.DirectorySeparatorChar + "SEconomy" + System.IO.Path.DirectorySeparatorChar + "SEconomy.WorldConfig.json");
            this.Parent = parent;

            ServerApi.Hooks.NetGetData.Register(Parent.PluginInstance, NetHooks_GetData);
            ServerApi.Hooks.NetSendData.Register(Parent.PluginInstance, NetHooks_SendData);
            ServerApi.Hooks.GameUpdate.Register(Parent.PluginInstance, Game_Update);

            this.CustomMultiplier = 1;
        }
Пример #2
0
        public WorldEconomy(SEconomy parent)
        {
            this.WorldConfiguration = Configuration.WorldConfiguration.WorldConfig.LoadConfigurationFromFile(
                "tshock" + System.IO.Path.DirectorySeparatorChar + "SEconomy" + System.IO.Path.DirectorySeparatorChar + "SEconomy.WorldConfig.json");
            this.Parent = parent;

            ServerApi.Hooks.NetGetData.Register(Parent.PluginInstance, NetHooks_GetData);
            ServerApi.Hooks.NetSendData.Register(Parent.PluginInstance, NetHooks_SendData);
            ServerApi.Hooks.GameUpdate.Register(Parent.PluginInstance, Game_Update);

            this.CustomMultiplier = 1;
        }
Пример #3
0
		public static WorldConfig NewSampleConfiguration()
		{
			WorldConfig newConfig = new WorldConfig();
			int[] bannedMobs = new int[] { 1, 49, 74, 46, 85, 67, 55, 63, 58, 21 };

			foreach (int bannedMobID in bannedMobs) {
				newConfig.Overrides.Add(new NPCRewardOverride() {
					NPCID = bannedMobID,
					OverridenMoneyPerDamagePoint = 0.0M
				});
			}

			newConfig.StaticPenaltyOverrides.Add(new StaticPenaltyOverride() { StaticRewardOverride = 0, TShockGroup = "" });
			return newConfig;
		}