Example #1
0
 public void AddMasterRequest(WorldClient pClient,string target)
 {
     MasterRequest Request = new MasterRequest(target,pClient);
       MasterRequestResponse response = new MasterRequestResponse(Request);
     if(response.responseAnswer)
     {
      response.SendMasterRequest();
      pMasterRequests.Add(Request);
     }
 }
Example #2
0
 public void MasterRequestAccept(string requestername, string TargetName)
 {
     WorldClient target = ClientManager.Instance.GetClientByCharname(TargetName);
     WorldClient requester = ClientManager.Instance.GetClientByCharname(requestername);
     MasterRequestResponse Reponse = new MasterRequestResponse(target, requester);
     if (Reponse.responseAnswer)
     {
         MasterMember ReqMember = new MasterMember(requester,target.Character.ID);
         MasterMember TargetM = new MasterMember(target,requester.Character.ID);
         target.Character.MasterList.Add(ReqMember);
         requester.Character.MasterList.Add(TargetM);
         ReqMember.AddToDatabase();
         TargetM.IsMaster = true;
         TargetM.AddToDatabase();
         SendMasterRequestAccept(requester, TargetName);
     }
     else
     {
         MasterRequest rRequest = pMasterRequests.Find(d => d.InvitedClient == requester);
         this.pMasterRequests.Remove(rRequest);
     }
 }