te
This commit is contained in:
parent
01151e679b
commit
57b2f0400e
265 changed files with 22828 additions and 6 deletions
71
Unused/Decal.Adapter.Wrappers/AllegianceInfoWrapper.cs
Normal file
71
Unused/Decal.Adapter.Wrappers/AllegianceInfoWrapper.cs
Normal file
|
|
@ -0,0 +1,71 @@
|
|||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using Decal.Interop.Filters;
|
||||
|
||||
namespace Decal.Adapter.Wrappers;
|
||||
|
||||
[CLSCompliant(true)]
|
||||
public class AllegianceInfoWrapper : MarshalByRefObject, IDisposable
|
||||
{
|
||||
private AllegianceInfo myAllegianceInfo;
|
||||
|
||||
private bool isDisposed;
|
||||
|
||||
public int Id => myAllegianceInfo.GUID;
|
||||
|
||||
public int Gender => myAllegianceInfo.Gender;
|
||||
|
||||
public int Leadership => myAllegianceInfo.Leadership;
|
||||
|
||||
public int Loyalty => myAllegianceInfo.Loyalty;
|
||||
|
||||
public string Name => myAllegianceInfo.Name;
|
||||
|
||||
public int Race => myAllegianceInfo.Race;
|
||||
|
||||
public int Rank => myAllegianceInfo.Rank;
|
||||
|
||||
public int ParentId => myAllegianceInfo.TreeParent;
|
||||
|
||||
public int Type => myAllegianceInfo.Type;
|
||||
|
||||
public double Unknown => myAllegianceInfo.Unknown;
|
||||
|
||||
public long XP => myAllegianceInfo.XP_64;
|
||||
|
||||
internal AllegianceInfoWrapper(AllegianceInfo info)
|
||||
{
|
||||
myAllegianceInfo = info;
|
||||
}
|
||||
|
||||
~AllegianceInfoWrapper()
|
||||
{
|
||||
Dispose(disposing: false);
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
Dispose(disposing: true);
|
||||
GC.SuppressFinalize(this);
|
||||
}
|
||||
|
||||
protected virtual void Dispose(bool disposing)
|
||||
{
|
||||
if (!isDisposed)
|
||||
{
|
||||
}
|
||||
if (myAllegianceInfo != null)
|
||||
{
|
||||
Marshal.ReleaseComObject(myAllegianceInfo);
|
||||
}
|
||||
isDisposed = true;
|
||||
}
|
||||
|
||||
protected void EnforceDisposedOnce()
|
||||
{
|
||||
if (isDisposed)
|
||||
{
|
||||
throw new ObjectDisposedException("AllegianceInfoWrapper");
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue