fix(core): Converts some packets & misc fixes/cleanup (#414)
- [X] Adds a stop music packet - [X] Converts chat packets - [X] Breaks out chat code a little bit more - [X] Converts character statue animation packet - [X] Renames some folders to have spaces - [X] Organizes and consolidates incoming/outgoing packets for other content - [X] Fixes virtual checks
This commit is contained in:
parent
a146955f6c
commit
fbafd7210d
49 changed files with 814 additions and 662 deletions
|
|
@ -1,89 +0,0 @@
|
|||
using System;
|
||||
using Server.Utilities;
|
||||
|
||||
namespace Server.Engines.VeteranRewards
|
||||
{
|
||||
public class RewardEntry
|
||||
{
|
||||
public RewardEntry(RewardCategory category, int name, Type itemType, params object[] args)
|
||||
{
|
||||
Category = category;
|
||||
ItemType = itemType;
|
||||
RequiredExpansion = Expansion.None;
|
||||
Name = name;
|
||||
Args = args;
|
||||
category.Entries.Add(this);
|
||||
}
|
||||
|
||||
public RewardEntry(RewardCategory category, string name, Type itemType, params object[] args)
|
||||
{
|
||||
Category = category;
|
||||
ItemType = itemType;
|
||||
RequiredExpansion = Expansion.None;
|
||||
NameString = name;
|
||||
Args = args;
|
||||
category.Entries.Add(this);
|
||||
}
|
||||
|
||||
public RewardEntry(
|
||||
RewardCategory category, int name, Type itemType, Expansion requiredExpansion,
|
||||
params object[] args
|
||||
)
|
||||
{
|
||||
Category = category;
|
||||
ItemType = itemType;
|
||||
RequiredExpansion = requiredExpansion;
|
||||
Name = name;
|
||||
Args = args;
|
||||
category.Entries.Add(this);
|
||||
}
|
||||
|
||||
public RewardEntry(
|
||||
RewardCategory category, string name, Type itemType, Expansion requiredExpansion,
|
||||
params object[] args
|
||||
)
|
||||
{
|
||||
Category = category;
|
||||
ItemType = itemType;
|
||||
RequiredExpansion = requiredExpansion;
|
||||
NameString = name;
|
||||
Args = args;
|
||||
category.Entries.Add(this);
|
||||
}
|
||||
|
||||
public RewardList List { get; set; }
|
||||
|
||||
public RewardCategory Category { get; }
|
||||
|
||||
public Type ItemType { get; }
|
||||
|
||||
public Expansion RequiredExpansion { get; }
|
||||
|
||||
public int Name { get; }
|
||||
|
||||
public string NameString { get; }
|
||||
|
||||
public object[] Args { get; }
|
||||
|
||||
public Item Construct()
|
||||
{
|
||||
try
|
||||
{
|
||||
var item = ItemType.CreateInstance<Item>(Args);
|
||||
|
||||
if (item is IRewardItem rewardItem)
|
||||
{
|
||||
rewardItem.IsRewardItem = true;
|
||||
}
|
||||
|
||||
return item;
|
||||
}
|
||||
catch
|
||||
{
|
||||
// ignored
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue