mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-06-09 05:54:50 +02:00
More group work. Added packet operations to the world server so it can send global group info.
This commit is contained in:
parent
6c409e93a9
commit
1148619ca5
30 changed files with 1173 additions and 43 deletions
|
@ -1,4 +1,6 @@
|
|||
using System;
|
||||
using FFXIVClassic_World_Server.Actor.Group.Work;
|
||||
using FFXIVClassic_World_Server.Packets.Send.Subpackets.Groups;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
@ -8,12 +10,53 @@ namespace FFXIVClassic_World_Server.DataObjects.Group
|
|||
{
|
||||
class Party : Group
|
||||
{
|
||||
public uint leader;
|
||||
public PartyWork partyGroupWork = new PartyWork();
|
||||
public List<uint> members = new List<uint>();
|
||||
|
||||
public Party(ulong groupId, uint leaderCharaId) : base(groupId)
|
||||
{
|
||||
this.leader = leaderCharaId;
|
||||
partyGroupWork._globalTemp.owner = (ulong)((0xB36F92 << 8) | leaderCharaId);
|
||||
}
|
||||
|
||||
public void SetLeader(uint actorId)
|
||||
{
|
||||
partyGroupWork._globalTemp.owner = (ulong)((0xB36F92 << 8) | actorId);
|
||||
}
|
||||
|
||||
public uint GetLeader()
|
||||
{
|
||||
return (uint)(partyGroupWork._globalTemp.owner & 0xFFFFFF);
|
||||
}
|
||||
|
||||
/*
|
||||
public override void sendWorkValues(Session session)
|
||||
{
|
||||
SynchGroupWorkValuesPacket groupWork = new SynchGroupWorkValuesPacket(groupId);
|
||||
groupWork.addProperty(this, "partyGroupWork._globalTemp.owner");
|
||||
groupWork.setTarget("/_init");
|
||||
|
||||
SubPacket test = groupWork.buildPacket(session.sessionId, session.sessionId);
|
||||
session.clientConnection.QueuePacket(test, true, false);
|
||||
}
|
||||
*/
|
||||
|
||||
public override int GetMemberCount()
|
||||
{
|
||||
return members.Count;
|
||||
}
|
||||
|
||||
public override uint GetTypeId()
|
||||
{
|
||||
return Group.PlayerPartyGroup;
|
||||
}
|
||||
|
||||
public override List<GroupMember> BuildMemberList()
|
||||
{
|
||||
List<GroupMember> groupMembers = new List<GroupMember>();
|
||||
foreach (uint charaId in members)
|
||||
groupMembers.Add(new GroupMember(charaId, -1, 0, false, Server.GetServer().GetSession(charaId) != null, Server.GetServer().GetNameForId(charaId)));
|
||||
return groupMembers;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue