More cleanup (moved groups to WorldMaster class) and fixed the project file.

This commit is contained in:
Filip Maj 2016-12-17 09:37:18 -05:00
parent 2cc63960a7
commit 31446f37fa
10 changed files with 227 additions and 127 deletions

View file

@ -6,14 +6,14 @@ namespace FFXIVClassic_World_Server
{
class RelationGroupManager
{
private Server mServer;
private WorldManager mWorldManager;
private Object mGroupLockReference;
private Dictionary<ulong, Group> mCurrentWorldGroupsReference;
private Dictionary<ulong, Relation> mRelationList = new Dictionary<ulong, Relation>();
public RelationGroupManager(Server server, Object groupLock, Dictionary<ulong, Group> worldGroupList)
public RelationGroupManager(WorldManager worldManager, Object groupLock, Dictionary<ulong, Group> worldGroupList)
{
mServer = server;
mWorldManager = worldManager;
mGroupLockReference = groupLock;
mCurrentWorldGroupsReference = worldGroupList;
}
@ -22,11 +22,11 @@ namespace FFXIVClassic_World_Server
{
lock (mGroupLockReference)
{
ulong groupIndex = mServer.GetGroupIndex();
ulong groupIndex = mWorldManager.GetGroupIndex();
Relation relation = new Relation(groupIndex, hostCharaId, otherCharaId, command);
mRelationList.Add(groupIndex, relation);
mCurrentWorldGroupsReference.Add(groupIndex, relation);
mServer.IncrementGroupIndex();
mWorldManager.IncrementGroupIndex();
}
}