mirror of
https://github.com/ACEmulator/ACE
synced 2026-08-17 12:26:06 -04:00
* 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
51 lines
1.3 KiB
C#
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));
|
|
}
|
|
}
|
|
}
|