fix: Fixes ignoring mobs, champions, party crash, slayer rarity, boat speedhack, etc (#1222)

* Movie ignore mobiles to Mobile class
* Allow necromancer familiars to ignore mobiles
* ChampionSpawn should not quietly fail when creating new spawn
* Fix client party crash bug: 2 people partied, the leader logs out, other client is hung
* Fix spellbooks creating with magery/meditation only and creating magery multiple times
* Fix BaseRunicTool.GetRandomSlayer() creating more undead slayers than intended
* Do not allow players to dismount each other whilst mounted
* Fix AOS onwards damage increase tooltip and wrong formula in AOS
* Fix monsters killing other monster revenants + animate dead should not attack player pets + other animates
* Fix fire steed having loot pack added twice
* Fix oaks spawn not able to create Unicorns + Kirins via Activator.CreateInstace() due to constructor having name as parametr
* Fix ignoreMobiles flag not propagated to client for non-players.
* Fix harrower tents not leeching from players
* Fix boats speedhacking around the map
* Fix bless, agility etc. not renewing duration
* Fix reveal always worked
* Fix empty constructor for steeds so they don't throw now.
This commit is contained in:
mark1145 2022-10-31 22:16:50 -07:00 • committed by GitHub
parent 910e06767b
commit 053dbcbad0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
54 changed files with 871 additions and 454 deletions

View file

@ -195,7 +195,7 @@ namespace Server.Engines.PartySystem
m.Party = this;
Span<byte> memberList =
stackalloc byte[PartyPackets.GetPartyMemberListPacketLength(this)].InitializePacket();
stackalloc byte[PartyPackets.GetPartyMemberListPacketLength(Count)].InitializePacket();
Span<byte> attrsPacket = stackalloc byte[OutgoingMobilePackets.MobileAttributesPacketLength].InitializePacket();
for (var i = 0; i < Members.Count; ++i)
@ -216,12 +216,7 @@ namespace Server.Engines.PartySystem
}
}
public void OnAccept(Mobile from)
{
OnAccept(from, false);
}
public void OnAccept(Mobile from, bool force)
public void OnAccept(Mobile from, bool force = false)
{
var ourFaction = Faction.Find(Leader);
var theirFaction = Faction.Find(from);
@ -289,28 +284,33 @@ namespace Server.Engines.PartySystem
return;
}
Span<byte> removeMember =
stackalloc byte[PartyPackets.GetPartyRemoveMemberPacketLength(this)].InitializePacket();
var removed = false;
for (var i = 0; i < Members.Count; i++)
{
if (Members[i].Mobile == m)
{
Members.RemoveAt(i);
m.NetState.SendPartyRemoveMember(m.Serial);
m.Party = null;
m.SendLocalizedMessage(1005451); // You have been removed from the party.
PartyPackets.CreatePartyRemoveMember(removeMember, m.Serial, this);
SendToAll(removeMember);
SendToAll(1005452); // A player has been removed from your party.
removed = true;
break;
}
}
if (removed)
{
Span<byte> removeMember =
stackalloc byte[PartyPackets.GetPartyRemoveMemberPacketLength(Count)].InitializePacket();
// Send empty party to the player removed
m.NetState.SendPartyRemoveMember(m.Serial);
m.Party = null;
m.SendLocalizedMessage(1005451); // You have been removed from the party.
PartyPackets.CreatePartyRemoveMember(removeMember, m.Serial, this);
SendToAll(removeMember);
SendToAll(1005452); // A player has been removed from your party.
}
if (Members.Count == 1)
{
SendToAll(1005450); // The last person has left the party...