mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-06-08 21:44:35 +02:00
Kicked/Promote leader added but broke login. D/Cing now.
This commit is contained in:
parent
e89b7557b3
commit
16c9b741bf
30 changed files with 1120 additions and 211 deletions
|
@ -33,6 +33,8 @@ namespace FFXIVClassic_Map_Server
|
|||
private Dictionary<uint, ActorClass> actorClasses = new Dictionary<uint,ActorClass>();
|
||||
private Dictionary<ulong, Party> currentPlayerParties = new Dictionary<ulong, Party>(); //GroupId, Party object
|
||||
|
||||
private Object groupLock = new Object();
|
||||
|
||||
private Server mServer;
|
||||
|
||||
public WorldManager(Server server)
|
||||
|
@ -700,37 +702,41 @@ namespace FFXIVClassic_Map_Server
|
|||
//World server sent a party member list synch packet to the zone server. Add and update players that may be a part of it.
|
||||
public void PartyMemberListRecieved(PartySyncPacket syncPacket)
|
||||
{
|
||||
Party group;
|
||||
|
||||
//If no members on this server, get out or clean
|
||||
if (!currentPlayerParties.ContainsKey(syncPacket.partyGroupId) && syncPacket.memberActorIds.Length == 0)
|
||||
return;
|
||||
else if (!currentPlayerParties.ContainsKey(syncPacket.partyGroupId) && syncPacket.memberActorIds.Length == 0)
|
||||
NoMembersInParty(currentPlayerParties[syncPacket.partyGroupId]);
|
||||
|
||||
//Get or create group
|
||||
if (!currentPlayerParties.ContainsKey(syncPacket.partyGroupId))
|
||||
lock (currentPlayerParties)
|
||||
{
|
||||
group = new Party(syncPacket.partyGroupId, syncPacket.owner);
|
||||
currentPlayerParties.Add(syncPacket.partyGroupId, group);
|
||||
}
|
||||
else
|
||||
group = currentPlayerParties[syncPacket.partyGroupId];
|
||||
Party group;
|
||||
|
||||
currentPlayerParties[syncPacket.partyGroupId].members = syncPacket.memberActorIds.ToList();
|
||||
//If no members on this server, get out or clean
|
||||
if (!currentPlayerParties.ContainsKey(syncPacket.partyGroupId) && syncPacket.memberActorIds.Length == 0)
|
||||
return;
|
||||
else if (!currentPlayerParties.ContainsKey(syncPacket.partyGroupId) && syncPacket.memberActorIds.Length == 0)
|
||||
NoMembersInParty(currentPlayerParties[syncPacket.partyGroupId]);
|
||||
|
||||
//Add group to everyone
|
||||
foreach (uint member in currentPlayerParties[syncPacket.partyGroupId].members)
|
||||
{
|
||||
Session session = Server.GetServer().GetSession(member);
|
||||
//Get or create group
|
||||
if (!currentPlayerParties.ContainsKey(syncPacket.partyGroupId))
|
||||
{
|
||||
group = new Party(syncPacket.partyGroupId, syncPacket.owner);
|
||||
currentPlayerParties.Add(syncPacket.partyGroupId, group);
|
||||
}
|
||||
else
|
||||
group = currentPlayerParties[syncPacket.partyGroupId];
|
||||
|
||||
if (session == null)
|
||||
continue;
|
||||
group.members = syncPacket.memberActorIds.ToList();
|
||||
|
||||
Player player = session.GetActor();
|
||||
if (player == null)
|
||||
continue;
|
||||
player.SetParty(group);
|
||||
//Add group to everyone
|
||||
for (int i = 0; i < group.members.Count; i++ )
|
||||
{
|
||||
uint member = group.members[i];
|
||||
Session session = Server.GetServer().GetSession(member);
|
||||
|
||||
if (session == null)
|
||||
continue;
|
||||
|
||||
Player player = session.GetActor();
|
||||
if (player == null)
|
||||
continue;
|
||||
player.SetParty(group);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue