mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-06-14 16:34:42 +02:00
Implemented trade invitation code.
This commit is contained in:
parent
9649d755a9
commit
c7e38b8b00
7 changed files with 306 additions and 7 deletions
77
FFXIVClassic Map Server/actors/group/RelationGroup.cs
Normal file
77
FFXIVClassic Map Server/actors/group/RelationGroup.cs
Normal file
|
@ -0,0 +1,77 @@
|
|||
using FFXIVClassic.Common;
|
||||
using FFXIVClassic_Map_Server.actors.group.Work;
|
||||
using FFXIVClassic_Map_Server.dataobjects;
|
||||
using FFXIVClassic_Map_Server.packets.send.group;
|
||||
using FFXIVClassic_Map_Server.packets.send.groups;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace FFXIVClassic_Map_Server.actors.group
|
||||
{
|
||||
class RelationGroup : Group
|
||||
{
|
||||
public RelationWork work = new RelationWork();
|
||||
private uint charaOther;
|
||||
private ulong topicGroup;
|
||||
|
||||
public RelationGroup(ulong groupIndex, uint host, uint other, uint command, ulong topicGroup) : base (groupIndex)
|
||||
{
|
||||
this.charaOther = other;
|
||||
work._globalTemp.host = ((ulong)host << 32) | (0xc17909);
|
||||
work._globalTemp.variableCommand = command;
|
||||
this.topicGroup = topicGroup;
|
||||
}
|
||||
|
||||
public uint GetHost()
|
||||
{
|
||||
return (uint)(((ulong)work._globalTemp.host >> 32) & 0xFFFFFFFF);
|
||||
}
|
||||
|
||||
public uint GetOther()
|
||||
{
|
||||
return charaOther;
|
||||
}
|
||||
|
||||
public override int GetMemberCount()
|
||||
{
|
||||
return 2;
|
||||
}
|
||||
|
||||
public override uint GetTypeId()
|
||||
{
|
||||
return Group.GroupInvitationRelationGroup;
|
||||
}
|
||||
|
||||
public ulong GetTopicGroupIndex()
|
||||
{
|
||||
return topicGroup;
|
||||
}
|
||||
|
||||
public override List<GroupMember> BuildMemberList(uint id)
|
||||
{
|
||||
List<GroupMember> groupMembers = new List<GroupMember>();
|
||||
|
||||
uint hostId = (uint)((work._globalTemp.host >> 32) & 0xFFFFFFFF);
|
||||
|
||||
groupMembers.Add(new GroupMember(hostId, -1, 0, false, Server.GetServer().GetSession(hostId) != null, Server.GetWorldManager().GetActorInWorld(hostId).customDisplayName));
|
||||
groupMembers.Add(new GroupMember(charaOther, -1, 0, false, Server.GetServer().GetSession(charaOther) != null, Server.GetWorldManager().GetActorInWorld(charaOther).customDisplayName));
|
||||
return groupMembers;
|
||||
}
|
||||
|
||||
public override void SendInitWorkValues(Session session)
|
||||
{
|
||||
SynchGroupWorkValuesPacket groupWork = new SynchGroupWorkValuesPacket(groupIndex);
|
||||
groupWork.addProperty(this, "work._globalTemp.host");
|
||||
groupWork.addProperty(this, "work._globalTemp.variableCommand");
|
||||
groupWork.setTarget("/_init");
|
||||
|
||||
SubPacket test = groupWork.buildPacket(session.id);
|
||||
test.DebugPrintSubPacket();
|
||||
session.QueuePacket(test);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue