Core: SOme code cleanup, more to follow.

This commit is contained in:
hondacrx
2021-03-20 22:48:48 -04:00
parent 62f554f2e0
commit 62ec699ec6
318 changed files with 5080 additions and 5125 deletions
+3 -3
View File
@@ -26,7 +26,7 @@ namespace Game.Mails
{
public void AddItem(ulong itemGuidLow, uint item_template)
{
MailItemInfo mii = new MailItemInfo();
MailItemInfo mii = new();
mii.item_guid = itemGuidLow;
mii.item_template = item_template;
items.Add(mii);
@@ -55,8 +55,8 @@ namespace Game.Mails
public ulong receiver;
public string subject;
public string body;
public List<MailItemInfo> items = new List<MailItemInfo>();
public List<uint> removedItems = new List<uint>();
public List<MailItemInfo> items = new();
public List<uint> removedItems = new();
public long expire_time;
public long deliver_time;
public ulong money;
+3 -3
View File
@@ -56,7 +56,7 @@ namespace Game.Mails
m_mailTemplateItemsNeed = false;
Loot mailLoot = new Loot();
Loot mailLoot = new();
// can be empty
mailLoot.FillLoot(m_mailTemplateId, LootStorage.Mail, receiver, true, true, LootModes.Default, ItemContext.None);
@@ -196,7 +196,7 @@ namespace Game.Mails
if (pReceiver.IsMailsLoaded())
{
Mail m = new Mail();
Mail m = new();
m.messageID = mailId;
m.mailTemplateId = GetMailTemplateId();
m.subject = GetSubject();
@@ -253,7 +253,7 @@ namespace Game.Mails
string m_subject;
string m_body;
Dictionary<ulong, Item> m_items = new Dictionary<ulong, Item>();
Dictionary<ulong, Item> m_items = new();
ulong m_money;
ulong m_COD;