public Relation CreatePartyRelationGroup(ulong topicGroupId, uint hostCharaId, uint otherCharaId)
 {
     lock (mGroupLockReference)
     {
         ulong    groupIndex = mWorldManager.GetGroupIndex();
         Relation relation   = new Relation(groupIndex, hostCharaId, otherCharaId, 10001, topicGroupId);
         mPartyRelationList.Add(groupIndex, relation);
         mCurrentWorldGroupsReference.Add(groupIndex, relation);
         mWorldManager.IncrementGroupIndex();
         return(relation);
     }
 }
Example #2
0
 public Party CreateParty(uint leaderCharaId)
 {
     lock (mGroupLockReference)
     {
         ulong groupId = mWorldManager.GetGroupIndex();
         Party party   = new Party(groupId, leaderCharaId);
         mPartyList.Add(groupId, party);
         mPlayerPartyLookup.Add(leaderCharaId, party);
         mCurrentWorldGroupsReference.Add(groupId, party);
         mWorldManager.IncrementGroupIndex();
         return(party);
     }
 }
        //Creates a new linkshell and adds it to the list
        public ulong CreateLinkshell(string name, ushort crest, uint master)
        {
            lock (mGroupLockReference)
            {
                ulong resultId = Database.CreateLinkshell(name, crest, master);
                if (resultId >= 0)
                {
                    Linkshell newLs = new Linkshell(resultId, mWorldManager.GetGroupIndex(), name, crest, master, 0xa);

                    //Add founder to the LS
                    if (AddMemberToLinkshell(master, newLs.name))
                    {
                        mLinkshellList.Add(mWorldManager.GetGroupIndex(), newLs);
                        mNameToIdLookup.Add(newLs.name, newLs.groupIndex);
                        mLSIdToIdLookup.Add(newLs.dbId, newLs);
                        mCurrentWorldGroupsReference.Add(mWorldManager.GetGroupIndex(), newLs);
                        mWorldManager.IncrementGroupIndex();
                    }
                }
                return(resultId);
            }
        }
Example #4
0
        private RetainerGroup LoadRetainerGroup(uint charaId)
        {
            lock (mGroupLockReference)
            {
                ulong         groupId       = mWorldManager.GetGroupIndex();
                RetainerGroup retainerGroup = new RetainerGroup(groupId, charaId);

                List <RetainerGroupMember> members = Database.GetRetainers(charaId);

                retainerGroup.members = members;
                mRetainerGroupList.Add(charaId, retainerGroup);
                mCurrentWorldGroupsReference.Add(groupId, retainerGroup);

                mWorldManager.IncrementGroupIndex();

                return(retainerGroup);
            }
        }