fix(core): Converts remaining player packets (#374)
- [X] Converts the remainder of the player packets
This commit is contained in:
parent
1e2242bb1a
commit
540a879d63
17 changed files with 836 additions and 666 deletions
|
|
@ -121,7 +121,7 @@ namespace Server
|
|||
|
||||
if (m_Page != null)
|
||||
{
|
||||
state.Send(new LaunchBrowser(m_Page)); // No message about web browser starting on OSI
|
||||
state.SendLaunchBrowser(m_Page); // No message about web browser starting on OSI
|
||||
}
|
||||
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -82,7 +82,7 @@ namespace Server.Gumps
|
|||
1061856
|
||||
); // You must have the item in your backpack or locked down in order to use it.
|
||||
}
|
||||
else if (m_Box.IsLockedDown && !m_Box.HasAccces(m))
|
||||
else if (m_Box.IsLockedDown && !m_Box.HasAccess(m))
|
||||
{
|
||||
m.SendLocalizedMessage(502691); // You must be the owner to use this.
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,9 +20,66 @@ namespace Server.Items
|
|||
[Flippable(0x2AF9, 0x2AFD)]
|
||||
public class DawnsMusicBox : Item, ISecurable
|
||||
{
|
||||
private static Dictionary<MusicName, DawnsMusicInfo> m_Info;
|
||||
private static readonly Dictionary<MusicName, DawnsMusicInfo> m_Info = new()
|
||||
{
|
||||
{ MusicName.Samlethe, new DawnsMusicInfo(1075152, DawnsMusicRarity.Common) },
|
||||
{ MusicName.Sailing, new DawnsMusicInfo(1075163, DawnsMusicRarity.Common) },
|
||||
{ MusicName.Britain2, new DawnsMusicInfo(1075145, DawnsMusicRarity.Common) },
|
||||
{ MusicName.Britain1, new DawnsMusicInfo(1075144, DawnsMusicRarity.Common) },
|
||||
{ MusicName.Bucsden, new DawnsMusicInfo(1075146, DawnsMusicRarity.Common) },
|
||||
{ MusicName.Forest_a, new DawnsMusicInfo(1075161, DawnsMusicRarity.Common) },
|
||||
{ MusicName.Cove, new DawnsMusicInfo(1075176, DawnsMusicRarity.Common) },
|
||||
{ MusicName.Death, new DawnsMusicInfo(1075171, DawnsMusicRarity.Common) },
|
||||
{ MusicName.Dungeon9, new DawnsMusicInfo(1075160, DawnsMusicRarity.Common) },
|
||||
{ MusicName.Dungeon2, new DawnsMusicInfo(1075175, DawnsMusicRarity.Common) },
|
||||
{ MusicName.Cave01, new DawnsMusicInfo(1075159, DawnsMusicRarity.Common) },
|
||||
{ MusicName.Combat3, new DawnsMusicInfo(1075170, DawnsMusicRarity.Common) },
|
||||
{ MusicName.Combat1, new DawnsMusicInfo(1075168, DawnsMusicRarity.Common) },
|
||||
{ MusicName.Combat2, new DawnsMusicInfo(1075169, DawnsMusicRarity.Common) },
|
||||
{ MusicName.Jhelom, new DawnsMusicInfo(1075147, DawnsMusicRarity.Common) },
|
||||
{ MusicName.Linelle, new DawnsMusicInfo(1075185, DawnsMusicRarity.Common) },
|
||||
{ MusicName.LBCastle, new DawnsMusicInfo(1075148, DawnsMusicRarity.Common) },
|
||||
{ MusicName.Minoc, new DawnsMusicInfo(1075150, DawnsMusicRarity.Common) },
|
||||
{ MusicName.Moonglow, new DawnsMusicInfo(1075177, DawnsMusicRarity.Common) },
|
||||
{ MusicName.Magincia, new DawnsMusicInfo(1075149, DawnsMusicRarity.Common) },
|
||||
{ MusicName.Nujelm, new DawnsMusicInfo(1075174, DawnsMusicRarity.Common) },
|
||||
{ MusicName.BTCastle, new DawnsMusicInfo(1075173, DawnsMusicRarity.Common) },
|
||||
{ MusicName.Tavern04, new DawnsMusicInfo(1075167, DawnsMusicRarity.Common) },
|
||||
{ MusicName.Skarabra, new DawnsMusicInfo(1075154, DawnsMusicRarity.Common) },
|
||||
{ MusicName.Stones2, new DawnsMusicInfo(1075143, DawnsMusicRarity.Common) },
|
||||
{ MusicName.Serpents, new DawnsMusicInfo(1075153, DawnsMusicRarity.Common) },
|
||||
{ MusicName.Taiko, new DawnsMusicInfo(1075180, DawnsMusicRarity.Common) },
|
||||
{ MusicName.Tavern01, new DawnsMusicInfo(1075164, DawnsMusicRarity.Common) },
|
||||
{ MusicName.Tavern02, new DawnsMusicInfo(1075165, DawnsMusicRarity.Common) },
|
||||
{ MusicName.Tavern03, new DawnsMusicInfo(1075166, DawnsMusicRarity.Common) },
|
||||
{ MusicName.TokunoDungeon, new DawnsMusicInfo(1075179, DawnsMusicRarity.Common) },
|
||||
{ MusicName.Trinsic, new DawnsMusicInfo(1075155, DawnsMusicRarity.Common) },
|
||||
{ MusicName.OldUlt01, new DawnsMusicInfo(1075142, DawnsMusicRarity.Common) },
|
||||
{ MusicName.Ocllo, new DawnsMusicInfo(1075151, DawnsMusicRarity.Common) },
|
||||
{ MusicName.Vesper, new DawnsMusicInfo(1075156, DawnsMusicRarity.Common) },
|
||||
{ MusicName.Victory, new DawnsMusicInfo(1075172, DawnsMusicRarity.Common) },
|
||||
{ MusicName.Mountn_a, new DawnsMusicInfo(1075162, DawnsMusicRarity.Common) },
|
||||
{ MusicName.Wind, new DawnsMusicInfo(1075157, DawnsMusicRarity.Common) },
|
||||
{ MusicName.Yew, new DawnsMusicInfo(1075158, DawnsMusicRarity.Common) },
|
||||
{ MusicName.Zento, new DawnsMusicInfo(1075178, DawnsMusicRarity.Common) },
|
||||
{ MusicName.GwennoConversation, new DawnsMusicInfo(1075131, DawnsMusicRarity.Uncommon) },
|
||||
{ MusicName.DreadHornArea, new DawnsMusicInfo(1075181, DawnsMusicRarity.Uncommon) },
|
||||
{ MusicName.ElfCity, new DawnsMusicInfo(1075182, DawnsMusicRarity.Uncommon) },
|
||||
{ MusicName.GoodEndGame, new DawnsMusicInfo(1075132, DawnsMusicRarity.Uncommon) },
|
||||
{ MusicName.GoodVsEvil, new DawnsMusicInfo(1075133, DawnsMusicRarity.Uncommon) },
|
||||
{ MusicName.GreatEarthSerpents, new DawnsMusicInfo(1075134, DawnsMusicRarity.Uncommon) },
|
||||
{ MusicName.GrizzleDungeon, new DawnsMusicInfo(1075186, DawnsMusicRarity.Uncommon) },
|
||||
{ MusicName.Humanoids_U9, new DawnsMusicInfo(1075135, DawnsMusicRarity.Uncommon) },
|
||||
{ MusicName.MelisandesLair, new DawnsMusicInfo(1075183, DawnsMusicRarity.Uncommon) },
|
||||
{ MusicName.MinocNegative, new DawnsMusicInfo(1075136, DawnsMusicRarity.Uncommon) },
|
||||
{ MusicName.ParoxysmusLair, new DawnsMusicInfo(1075184, DawnsMusicRarity.Uncommon) },
|
||||
{ MusicName.Paws, new DawnsMusicInfo(1075137, DawnsMusicRarity.Uncommon) },
|
||||
{ MusicName.SelimsBar, new DawnsMusicInfo(1075138, DawnsMusicRarity.Rare) },
|
||||
{ MusicName.SerpentIsleCombat_U7, new DawnsMusicInfo(1075139, DawnsMusicRarity.Rare) },
|
||||
{ MusicName.ValoriaShips, new DawnsMusicInfo(1075140, DawnsMusicRarity.Rare) }
|
||||
};
|
||||
|
||||
public static MusicName[] m_CommonTracks =
|
||||
public static readonly MusicName[] m_CommonTracks =
|
||||
{
|
||||
MusicName.Samlethe, MusicName.Sailing, MusicName.Britain2, MusicName.Britain1,
|
||||
MusicName.Bucsden, MusicName.Forest_a, MusicName.Cove, MusicName.Death,
|
||||
|
|
@ -36,7 +93,7 @@ namespace Server.Items
|
|||
MusicName.Mountn_a, MusicName.Wind, MusicName.Yew, MusicName.Zento
|
||||
};
|
||||
|
||||
public static MusicName[] m_UncommonTracks =
|
||||
public static readonly MusicName[] m_UncommonTracks =
|
||||
{
|
||||
MusicName.GwennoConversation, MusicName.DreadHornArea, MusicName.ElfCity,
|
||||
MusicName.GoodEndGame, MusicName.GoodVsEvil, MusicName.GreatEarthSerpents,
|
||||
|
|
@ -44,7 +101,7 @@ namespace Server.Items
|
|||
MusicName.MinocNegative, MusicName.ParoxysmusLair, MusicName.Paws
|
||||
};
|
||||
|
||||
public static MusicName[] m_RareTracks =
|
||||
public static readonly MusicName[] m_RareTracks =
|
||||
{
|
||||
MusicName.SelimsBar, MusicName.SerpentIsleCombat_U7, MusicName.ValoriaShips
|
||||
};
|
||||
|
|
@ -151,7 +208,7 @@ namespace Server.Items
|
|||
1061856
|
||||
); // You must have the item in your backpack or locked down in order to use it.
|
||||
}
|
||||
else if (IsLockedDown && !HasAccces(from))
|
||||
else if (IsLockedDown && !HasAccess(from))
|
||||
{
|
||||
from.SendLocalizedMessage(502436); // That is not accessible.
|
||||
}
|
||||
|
|
@ -162,7 +219,7 @@ namespace Server.Items
|
|||
}
|
||||
}
|
||||
|
||||
public bool HasAccces(Mobile m) =>
|
||||
public bool HasAccess(Mobile m) =>
|
||||
m.AccessLevel >= AccessLevel.GameMaster || BaseHouse.FindHouseAt(this)?.HasAccess(m) == true;
|
||||
|
||||
public void PlayMusic(Mobile m, MusicName music)
|
||||
|
|
@ -176,7 +233,7 @@ namespace Server.Items
|
|||
m_ItemID = ItemID;
|
||||
}
|
||||
|
||||
m.Send(new PlayMusic(music));
|
||||
m.NetState.SendPlayMusic(music);
|
||||
m_Timer = Timer.DelayCall(TimeSpan.FromSeconds(0.5), TimeSpan.FromSeconds(0.5), 4, Animate);
|
||||
}
|
||||
|
||||
|
|
@ -247,68 +304,6 @@ namespace Server.Items
|
|||
m_ItemID = reader.ReadInt();
|
||||
}
|
||||
|
||||
public static void Initialize()
|
||||
{
|
||||
m_Info = new Dictionary<MusicName, DawnsMusicInfo>
|
||||
{
|
||||
{ MusicName.Samlethe, new DawnsMusicInfo(1075152, DawnsMusicRarity.Common) },
|
||||
{ MusicName.Sailing, new DawnsMusicInfo(1075163, DawnsMusicRarity.Common) },
|
||||
{ MusicName.Britain2, new DawnsMusicInfo(1075145, DawnsMusicRarity.Common) },
|
||||
{ MusicName.Britain1, new DawnsMusicInfo(1075144, DawnsMusicRarity.Common) },
|
||||
{ MusicName.Bucsden, new DawnsMusicInfo(1075146, DawnsMusicRarity.Common) },
|
||||
{ MusicName.Forest_a, new DawnsMusicInfo(1075161, DawnsMusicRarity.Common) },
|
||||
{ MusicName.Cove, new DawnsMusicInfo(1075176, DawnsMusicRarity.Common) },
|
||||
{ MusicName.Death, new DawnsMusicInfo(1075171, DawnsMusicRarity.Common) },
|
||||
{ MusicName.Dungeon9, new DawnsMusicInfo(1075160, DawnsMusicRarity.Common) },
|
||||
{ MusicName.Dungeon2, new DawnsMusicInfo(1075175, DawnsMusicRarity.Common) },
|
||||
{ MusicName.Cave01, new DawnsMusicInfo(1075159, DawnsMusicRarity.Common) },
|
||||
{ MusicName.Combat3, new DawnsMusicInfo(1075170, DawnsMusicRarity.Common) },
|
||||
{ MusicName.Combat1, new DawnsMusicInfo(1075168, DawnsMusicRarity.Common) },
|
||||
{ MusicName.Combat2, new DawnsMusicInfo(1075169, DawnsMusicRarity.Common) },
|
||||
{ MusicName.Jhelom, new DawnsMusicInfo(1075147, DawnsMusicRarity.Common) },
|
||||
{ MusicName.Linelle, new DawnsMusicInfo(1075185, DawnsMusicRarity.Common) },
|
||||
{ MusicName.LBCastle, new DawnsMusicInfo(1075148, DawnsMusicRarity.Common) },
|
||||
{ MusicName.Minoc, new DawnsMusicInfo(1075150, DawnsMusicRarity.Common) },
|
||||
{ MusicName.Moonglow, new DawnsMusicInfo(1075177, DawnsMusicRarity.Common) },
|
||||
{ MusicName.Magincia, new DawnsMusicInfo(1075149, DawnsMusicRarity.Common) },
|
||||
{ MusicName.Nujelm, new DawnsMusicInfo(1075174, DawnsMusicRarity.Common) },
|
||||
{ MusicName.BTCastle, new DawnsMusicInfo(1075173, DawnsMusicRarity.Common) },
|
||||
{ MusicName.Tavern04, new DawnsMusicInfo(1075167, DawnsMusicRarity.Common) },
|
||||
{ MusicName.Skarabra, new DawnsMusicInfo(1075154, DawnsMusicRarity.Common) },
|
||||
{ MusicName.Stones2, new DawnsMusicInfo(1075143, DawnsMusicRarity.Common) },
|
||||
{ MusicName.Serpents, new DawnsMusicInfo(1075153, DawnsMusicRarity.Common) },
|
||||
{ MusicName.Taiko, new DawnsMusicInfo(1075180, DawnsMusicRarity.Common) },
|
||||
{ MusicName.Tavern01, new DawnsMusicInfo(1075164, DawnsMusicRarity.Common) },
|
||||
{ MusicName.Tavern02, new DawnsMusicInfo(1075165, DawnsMusicRarity.Common) },
|
||||
{ MusicName.Tavern03, new DawnsMusicInfo(1075166, DawnsMusicRarity.Common) },
|
||||
{ MusicName.TokunoDungeon, new DawnsMusicInfo(1075179, DawnsMusicRarity.Common) },
|
||||
{ MusicName.Trinsic, new DawnsMusicInfo(1075155, DawnsMusicRarity.Common) },
|
||||
{ MusicName.OldUlt01, new DawnsMusicInfo(1075142, DawnsMusicRarity.Common) },
|
||||
{ MusicName.Ocllo, new DawnsMusicInfo(1075151, DawnsMusicRarity.Common) },
|
||||
{ MusicName.Vesper, new DawnsMusicInfo(1075156, DawnsMusicRarity.Common) },
|
||||
{ MusicName.Victory, new DawnsMusicInfo(1075172, DawnsMusicRarity.Common) },
|
||||
{ MusicName.Mountn_a, new DawnsMusicInfo(1075162, DawnsMusicRarity.Common) },
|
||||
{ MusicName.Wind, new DawnsMusicInfo(1075157, DawnsMusicRarity.Common) },
|
||||
{ MusicName.Yew, new DawnsMusicInfo(1075158, DawnsMusicRarity.Common) },
|
||||
{ MusicName.Zento, new DawnsMusicInfo(1075178, DawnsMusicRarity.Common) },
|
||||
{ MusicName.GwennoConversation, new DawnsMusicInfo(1075131, DawnsMusicRarity.Uncommon) },
|
||||
{ MusicName.DreadHornArea, new DawnsMusicInfo(1075181, DawnsMusicRarity.Uncommon) },
|
||||
{ MusicName.ElfCity, new DawnsMusicInfo(1075182, DawnsMusicRarity.Uncommon) },
|
||||
{ MusicName.GoodEndGame, new DawnsMusicInfo(1075132, DawnsMusicRarity.Uncommon) },
|
||||
{ MusicName.GoodVsEvil, new DawnsMusicInfo(1075133, DawnsMusicRarity.Uncommon) },
|
||||
{ MusicName.GreatEarthSerpents, new DawnsMusicInfo(1075134, DawnsMusicRarity.Uncommon) },
|
||||
{ MusicName.GrizzleDungeon, new DawnsMusicInfo(1075186, DawnsMusicRarity.Uncommon) },
|
||||
{ MusicName.Humanoids_U9, new DawnsMusicInfo(1075135, DawnsMusicRarity.Uncommon) },
|
||||
{ MusicName.MelisandesLair, new DawnsMusicInfo(1075183, DawnsMusicRarity.Uncommon) },
|
||||
{ MusicName.MinocNegative, new DawnsMusicInfo(1075136, DawnsMusicRarity.Uncommon) },
|
||||
{ MusicName.ParoxysmusLair, new DawnsMusicInfo(1075184, DawnsMusicRarity.Uncommon) },
|
||||
{ MusicName.Paws, new DawnsMusicInfo(1075137, DawnsMusicRarity.Uncommon) },
|
||||
{ MusicName.SelimsBar, new DawnsMusicInfo(1075138, DawnsMusicRarity.Rare) },
|
||||
{ MusicName.SerpentIsleCombat_U7, new DawnsMusicInfo(1075139, DawnsMusicRarity.Rare) },
|
||||
{ MusicName.ValoriaShips, new DawnsMusicInfo(1075140, DawnsMusicRarity.Rare) }
|
||||
};
|
||||
}
|
||||
|
||||
public static DawnsMusicInfo GetInfo(MusicName name)
|
||||
{
|
||||
if (m_Info == null) // sanity
|
||||
|
|
|
|||
|
|
@ -396,9 +396,9 @@ namespace Server.Items
|
|||
{
|
||||
Table.Remove(m);
|
||||
|
||||
if (Core.AOS && m.NetState != null)
|
||||
if (Core.AOS)
|
||||
{
|
||||
m.Send(ClearWeaponAbility.Instance);
|
||||
m.NetState.SendClearWeaponAbility();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -11,13 +11,11 @@ namespace Server.Misc
|
|||
|
||||
public static void EventSink_PaperdollRequest(Mobile beholder, Mobile beheld)
|
||||
{
|
||||
beholder.Send(
|
||||
new DisplayPaperdoll(
|
||||
beheld.Serial,
|
||||
Titles.ComputeTitle(beholder, beheld),
|
||||
beheld.Warmode,
|
||||
beheld.AllowEquipFrom(beholder)
|
||||
)
|
||||
beholder.NetState.SendDisplayPaperdoll(
|
||||
beheld.Serial,
|
||||
Titles.ComputeTitle(beholder, beheld),
|
||||
beheld.Warmode,
|
||||
beheld.AllowEquipFrom(beholder)
|
||||
);
|
||||
|
||||
for (var i = 0; i < beheld.Items.Count; ++i)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue