ace/Source/ACE.Server/WorldObjects/GenericObject.cs
Ty Conner 6ea7c19ea9
Revise Generator Init/Max spawn conditions (#2991)
* Revise Generator Init/Max spawn conditions

* Update WorldObject_Generators.cs

* Update WorldObject_Generators.cs

* Update AdminCommands.cs

* Update WorldObject.cs

* Update WorldObject_Generators.cs

* Update EmoteManager.cs

* Update WorldObject.cs

* Update GenericObject.cs

* Correct use of GeneratorDestructionType

* Update WorldObject_Generators.cs

* Update EmoteManager.cs

* Update Landblock.cs

* Update Landblock.cs

* Update Landblock.cs

* Update Landblock.cs

* Update Signal Emitting support to all WorldObjects

* Adjust [In/Dec]crement(My)Quest

* Update AdminCommands.cs

* Update DeveloperCommands.cs
2020-06-10 23:47:17 -04:00

51 lines
1.3 KiB
C#

using System;
using ACE.Entity;
using ACE.Entity.Models;
using ACE.Server.Network.GameMessages.Messages;
namespace ACE.Server.WorldObjects
{
public class GenericObject : WorldObject
{
/// <summary>
/// A new biota be created taking all of its values from weenie.
/// </summary>
public GenericObject(Weenie weenie, ObjectGuid guid) : base(weenie, guid)
{
SetEphemeralValues();
}
/// <summary>
/// Restore a WorldObject from the database.
/// </summary>
public GenericObject(Biota biota) : base(biota)
{
SetEphemeralValues();
}
private void SetEphemeralValues()
{
//StackSize = null;
//StackUnitEncumbrance = null;
//StackUnitValue = null;
//MaxStackSize = null;
// Linkable Item Generator (linkitemgen2minutes) fix
if (WeenieClassId == 4142)
{
MaxGeneratedObjects = 0;
InitGeneratedObjects = 0;
}
}
public override void ActOnUse(WorldObject activator)
{
if (!(activator is Player player))
return;
if (UseSound > 0)
player.Session.Network.EnqueueSend(new GameMessageSound(player.Guid, UseSound));
}
}
}