Пример #1
0
 public void ShowOnLogin(Character character)
 {
     if (character == Owner)
     {
         Asda2PrivateShopHandler.SendPrivateShopOpenedResponse(Owner.Client, PrivateShopOpenedResult.Ok,
                                                               ItemsOnTrade);
     }
     else
     {
         Asda2PrivateShopHandler.SendCharacterPrivateShopInfoResponse(character.Client,
                                                                      Asda2ViewTradeShopInfoStatus.Ok, this);
     }
 }
Пример #2
0
        public static void ViewCharacterTradeShopRequest(IRealmClient client, RealmPacketIn packet)
        {
            RealmAccount loggedInAccount =
                ServerApp <WCell.RealmServer.RealmServer> .Instance.GetLoggedInAccount(packet.ReadUInt32());

            if (loggedInAccount == null || loggedInAccount.ActiveCharacter == null)
            {
                Asda2PrivateShopHandler.SendCharacterPrivateShopInfoResponse(client,
                                                                             Asda2ViewTradeShopInfoStatus.TheCapacityHasExided, (Asda2PrivateShop)null);
            }
            else
            {
                Character activeCharacter = loggedInAccount.ActiveCharacter;
                if (activeCharacter.PrivateShop == null || !activeCharacter.PrivateShop.Trading)
                {
                    return;
                }
                activeCharacter.PrivateShop.Join(client.ActiveCharacter);
            }
        }
Пример #3
0
        public void Join(Character activeCharacter)
        {
            List <Character> characterList = new List <Character>
            {
                Owner
            };

            characterList.AddRange(JoinedCharacters);
            using (RealmPacketOut notificationResponse =
                       Asda2PrivateShopHandler.CreatePrivateShopChatNotificationResponse(activeCharacter.AccId,
                                                                                         Asda2PrivateShopNotificationType.Joined))
            {
                foreach (Character character in characterList)
                {
                    character.Send(notificationResponse, false);
                }
            }

            ++activeCharacter.Stunned;
            JoinedCharacters.Add(activeCharacter);
            Asda2PrivateShopHandler.SendCharacterPrivateShopInfoResponse(activeCharacter.Client,
                                                                         Asda2ViewTradeShopInfoStatus.Ok, this);
            activeCharacter.PrivateShop = this;
        }