예제 #1
0
        void ProcessMessage(ClientConnection client, JoinParty message)
        {
            var ma = (MobileAvatar)client.Avatar;

            // make sure they are trying to join the party they were invited to
            if (message.ObjectInstanceId != ma.InvitedToParty.Leader.ObjectInstanceId)
            {
                ma.SendLog("Join party failed, get a new invitation.");
                return;
            }

            ma.InvitedToParty.SendPartyTalk(ma.TemplateObjectName + " has joined your ");
            ma.Party = ma.InvitedToParty;
            ma.Party.Add(ma);
            ma.SendLog("You are now in party '" + ma.Party.Name + "'.");
            ma.InvitedToParty = null;
        }
예제 #2
0
        public string JoinParty(string[] args)
        {
            var joinParty = new JoinParty(args, this.party, this.itemPool, this.charactersFactory);

            return(joinParty.Execute());
        }