コード例 #1
0
ファイル: MasterManager.cs プロジェクト: Dextan/Estrella
 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);
     }
 }
コード例 #2
0
ファイル: MasterManager.cs プロジェクト: Dextan/Estrella
 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);
     }
 }