Core: Updated to 10.0.5
Port From (https://github.com/TrinityCore/TrinityCore/commit/4bec7233badf9d3ab71dbdde8b24f66f7c4eedfb)
This commit is contained in:
@@ -1206,6 +1206,7 @@ namespace Game.Entities
|
||||
public uint SitAnimKit; // 2 Sit Anim Kit, References: AnimKit, NoValue = 0
|
||||
public uint InteractRadiusOverride; // 3 Interact Radius Override (in hundredths), int, Min value: 0, Max value: 2147483647, Default value: 0
|
||||
public uint CustomizationScope; // 4 Customization Scope, int, Min value: 0, Max value: 2147483647, Default value: 0
|
||||
public uint Preventteleportingtheplayeroutofthebarbershopchair;// 5 Prevent teleporting the player out of the barbershop chair, enum { false, true, }; Default: false
|
||||
}
|
||||
|
||||
public struct destructiblebuilding
|
||||
@@ -1512,6 +1513,12 @@ namespace Game.Entities
|
||||
{
|
||||
public uint Profession; // 0 Profession, enum { First Aid, Blacksmithing, Leatherworking, Alchemy, Herbalism, Cooking, Mining, Tailoring, Engineering, Enchanting, Fishing, Skinning, Jewelcrafting, Inscription, Archaeology, }; Default: Blacksmithing
|
||||
}
|
||||
|
||||
public struct perksProgramChest
|
||||
{
|
||||
public uint Script; // 0 Script, References: SpellScript, NoValue = 0
|
||||
public uint autoClose; // 1 autoClose (ms), int, Min value: 0, Max value: 2147483647, Default value: 3000
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1246,7 +1246,7 @@ namespace Game.Entities
|
||||
{
|
||||
m_mail.Clear();
|
||||
|
||||
Dictionary<uint, Mail> mailById = new();
|
||||
Dictionary<ulong, Mail> mailById = new();
|
||||
|
||||
if (!mailsResult.IsEmpty())
|
||||
{
|
||||
@@ -1254,7 +1254,7 @@ namespace Game.Entities
|
||||
{
|
||||
Mail m = new();
|
||||
|
||||
m.messageID = mailsResult.Read<uint>(0);
|
||||
m.messageID = mailsResult.Read<ulong>(0);
|
||||
m.messageType = (MailMessageType)mailsResult.Read<byte>(1);
|
||||
m.sender = mailsResult.Read<uint>(2);
|
||||
m.receiver = mailsResult.Read<uint>(3);
|
||||
@@ -1289,7 +1289,7 @@ namespace Game.Entities
|
||||
|
||||
do
|
||||
{
|
||||
uint mailId = mailItemsResult.Read<uint>(52);
|
||||
ulong mailId = mailItemsResult.Read<ulong>(52);
|
||||
_LoadMailedItem(GetGUID(), this, mailId, mailById[mailId], mailItemsResult.GetFields(), additionalData.LookupByKey(mailItemsResult.Read<ulong>(0)));
|
||||
}
|
||||
while (mailItemsResult.NextRow());
|
||||
@@ -1298,7 +1298,7 @@ namespace Game.Entities
|
||||
UpdateNextMailTimeAndUnreads();
|
||||
}
|
||||
|
||||
static Item _LoadMailedItem(ObjectGuid playerGuid, Player player, uint mailId, Mail mail, SQLFields fields, ItemAdditionalLoadInfo addionalData)
|
||||
static Item _LoadMailedItem(ObjectGuid playerGuid, Player player, ulong mailId, Mail mail, SQLFields fields, ItemAdditionalLoadInfo addionalData)
|
||||
{
|
||||
ulong itemGuid = fields.Read<ulong>(0);
|
||||
uint itemEntry = fields.Read<uint>(1);
|
||||
@@ -4081,7 +4081,7 @@ namespace Game.Entities
|
||||
SQLResult resultMail = DB.Characters.Query(stmt);
|
||||
if (!resultMail.IsEmpty())
|
||||
{
|
||||
MultiMap<uint, Item> itemsByMail = new();
|
||||
MultiMap<ulong, Item> itemsByMail = new();
|
||||
|
||||
stmt = DB.Characters.GetPreparedStatement(CharStatements.SEL_MAILITEMS);
|
||||
stmt.AddValue(0, guid);
|
||||
@@ -4114,7 +4114,7 @@ namespace Game.Entities
|
||||
|
||||
do
|
||||
{
|
||||
uint mailId = resultItems.Read<uint>(44);
|
||||
ulong mailId = resultItems.Read<ulong>(44);
|
||||
Item mailItem = _LoadMailedItem(playerGuid, null, mailId, null, resultItems.GetFields(), additionalData.LookupByKey(resultItems.Read<ulong>(0)));
|
||||
if (mailItem != null)
|
||||
itemsByMail.Add(mailId, mailItem);
|
||||
@@ -4124,7 +4124,7 @@ namespace Game.Entities
|
||||
|
||||
do
|
||||
{
|
||||
uint mail_id = resultMail.Read<uint>(0);
|
||||
ulong mail_id = resultMail.Read<ulong>(0);
|
||||
MailMessageType mailType = (MailMessageType)resultMail.Read<byte>(1);
|
||||
ushort mailTemplateId = resultMail.Read<ushort>(2);
|
||||
uint sender = resultMail.Read<uint>(3);
|
||||
|
||||
@@ -2879,10 +2879,15 @@ namespace Game.Entities
|
||||
}
|
||||
|
||||
public void SendQuestGiverStatusMultiple()
|
||||
{
|
||||
SendQuestGiverStatusMultiple(m_clientGUIDs);
|
||||
}
|
||||
|
||||
public void SendQuestGiverStatusMultiple(List<ObjectGuid> guids)
|
||||
{
|
||||
QuestGiverStatusMultiple response = new();
|
||||
|
||||
foreach (var itr in m_clientGUIDs)
|
||||
foreach (var itr in guids)
|
||||
{
|
||||
if (itr.IsAnyTypeCreature())
|
||||
{
|
||||
|
||||
@@ -2763,7 +2763,8 @@ namespace Game.Entities
|
||||
|
||||
//Mail
|
||||
public void AddMail(Mail mail) { m_mail.Insert(0, mail); }
|
||||
public void RemoveMail(uint id)
|
||||
|
||||
public void RemoveMail(ulong id)
|
||||
{
|
||||
foreach (var mail in m_mail)
|
||||
{
|
||||
@@ -2775,27 +2776,30 @@ namespace Game.Entities
|
||||
}
|
||||
}
|
||||
}
|
||||
public void SendMailResult(uint mailId, MailResponseType mailAction, MailResponseResult mailError, InventoryResult equipError = 0, uint item_guid = 0, uint item_count = 0)
|
||||
|
||||
public void SendMailResult(ulong mailId, MailResponseType mailAction, MailResponseResult mailError, InventoryResult equipError = 0, ulong itemGuid = 0, uint itemCount = 0)
|
||||
{
|
||||
MailCommandResult result = new();
|
||||
result.MailID = mailId;
|
||||
result.Command = (uint)mailAction;
|
||||
result.ErrorCode = (uint)mailError;
|
||||
result.Command = (int)mailAction;
|
||||
result.ErrorCode = (int)mailError;
|
||||
|
||||
if (mailError == MailResponseResult.EquipError)
|
||||
result.BagResult = (uint)equipError;
|
||||
result.BagResult = (int)equipError;
|
||||
else if (mailAction == MailResponseType.ItemTaken)
|
||||
{
|
||||
result.AttachID = item_guid;
|
||||
result.QtyInInventory = item_count;
|
||||
result.AttachID = itemGuid;
|
||||
result.QtyInInventory = (int)itemCount;
|
||||
}
|
||||
|
||||
SendPacket(result);
|
||||
}
|
||||
|
||||
void SendNewMail()
|
||||
{
|
||||
SendPacket(new NotifyReceivedMail());
|
||||
}
|
||||
|
||||
public void UpdateNextMailTimeAndUnreads()
|
||||
{
|
||||
// calculate next delivery time (min. from non-delivered mails
|
||||
@@ -2814,6 +2818,7 @@ namespace Game.Entities
|
||||
++unReadMails;
|
||||
}
|
||||
}
|
||||
|
||||
public void AddNewMailDeliverTime(long deliver_time)
|
||||
{
|
||||
if (deliver_time <= GameTime.GetGameTime()) // ready now
|
||||
@@ -2827,16 +2832,19 @@ namespace Game.Entities
|
||||
m_nextMailDelivereTime = deliver_time;
|
||||
}
|
||||
}
|
||||
|
||||
public void AddMItem(Item it)
|
||||
{
|
||||
mMitems[it.GetGUID().GetCounter()] = it;
|
||||
}
|
||||
|
||||
public bool RemoveMItem(ulong id)
|
||||
{
|
||||
return mMitems.Remove(id);
|
||||
}
|
||||
|
||||
public Item GetMItem(ulong id) { return mMitems.LookupByKey(id); }
|
||||
public Mail GetMail(uint id) { return m_mail.Find(p => p.messageID == id); }
|
||||
public Mail GetMail(ulong id) { return m_mail.Find(p => p.messageID == id); }
|
||||
public List<Mail> GetMails() { return m_mail; }
|
||||
public uint GetMailSize() { return (uint)m_mail.Count; }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user