Problem before upgrade 5700

03/11/2013 14:43 Don.Eragon#1
hey all ,

I made 5700 upgrade , but u had some problems

1 = Kisses is not working !

# flowers is working well

2 = lottery stopped working ! ,, it was good before upgrade !

3 = hair is not visible for all players ===> I updated spawn to 99 !

please try to help

ty in advance ! :)
03/11/2013 15:02 shadowman123#2
Quote:
Originally Posted by Don.Eragon View Post
hey all ,

I made 5700 upgrade , but u had some problems

1 = Kisses is not working !

# flowers is working well

2 = lottery stopped working ! ,, it was good before upgrade !

3 = hair is not visible for all players ===> I updated spawn to 99 !

please try to help

ty in advance ! :)
1 - Sure its Not cuz its Not added in ur source .. so the solution is Add it
2 - Lottery has nothing to do with Upgrading ur source
3 - Wrong Offset .. Right One is 98
03/11/2013 15:10 Don.Eragon#3
Quote:
Originally Posted by shadowman123 View Post
1 - Sure its Not cuz its Not added in ur source .. so the solution is Add it
2 - Lottery has nothing to do with Upgrading ur source
3 - Wrong Offset .. Right One is 98
Thanks alot ,,

but can you bring any topic about adding kisses and new lottery : ?
03/11/2013 15:31 shadowman123#4
1 - New Lottery uses packet 1313 .. and heres its Packet Structure By Angilius [Only registered and activated users can see links. Click Here To Register...]

2 - about the Kisses .. idk how its handled in ur source so i cant help u about that ... but if u are using default one in Impulse based source u must Delete that checker about Sending Females to males check .. and add Same Gender Check .. beside that the FlowerType which will be sent to Player should be = 0 Red rose if Female is Receiver and 1 = Kiss if the Receiver is Male
03/11/2013 15:45 Don.Eragon#5
Quote:
Originally Posted by shadowman123 View Post
1 - New Lottery uses packet 1313 .. and heres its Packet Structure By Angilius [Only registered and activated users can see links. Click Here To Register...]

2 - about the Kisses .. idk how its handled in ur source so i cant help u about that ... but if u are using default one in Impulse based source u must Delete that checker about Sending Females to males check .. and add Same Gender Check .. beside that the FlowerType which will be sent to Player should be = 0 Red rose if Female is Receiver and 1 = Kiss if the Receiver is Male
thanks
03/11/2013 16:53 teroareboss1#6
Code:
                     using (Client.GamePackets.SendFlower flowericon = new Client.GamePackets.SendFlower())
                            {
                                flowericon.Typing = (uint)(IsBoy(client.Player.Body) ? 3 : 2);
                                flowericon.Apprend(client.Player.MyFlowers);
                                client.Enqueue(flowericon.ToArray());
                            }
                            if (client.Player.MyFlowers.aFlower > 0)//single Redrose(1)
                            {
                                using (Client.GamePackets.SendFlower flowerSender = new Client.GamePackets.SendFlower())
                                {
                                    flowerSender.Typing = (uint)(IsBoy(client.Player.Body) ? 2 : 3);
                                    client.Enqueue(flowerSender.ToArray());
                                }
                            }

Code:
public class SendFlower:ServerSocket.Packet
    {
        public const uint FlowerSender = 2, Flower = 3;


        public SendFlower()
            :base(68,true)
        {
            WriteUshort(60, 0);
            WriteUshort((ushort)CMD.GamePackets.SendFlower, 2);//1150
        
        }

        public uint Typing
        {
            get { return ReadUint(4); }
            set { WriteUint(value, 4); }
        }

        public void Apprend(Role.Flowers flowers)
        {

            WriteUint(flowers.RedRoses, 16);
            WriteUint(flowers.RedRoses2day, 20);

            WriteUint(flowers.Lilies, 24);
            WriteUint(flowers.Lilies2day, 28);

            WriteUint(flowers.Orchads, 32);
            WriteUint(flowers.Orchads2day, 36);

            WriteUint(flowers.Tulips, 40);
            WriteUint(flowers.Tulips2day, 44);
        }

        public string SenderName
        {
            get { return ReadString(16, 16); }
            set { WriteString(value, 16); }
        }
        public string ReceiverName
        {
            get { return ReadString(32, 16); }
            set { WriteString(value, 32); }
        }
        public uint Amount { get { return ReadUint(48); } set { WriteUint(value, 48); } }
        public uint FType { get { return ReadUint(52); } set { WriteUint(value, 52); } }
        public uint Effect { get { return ReadUint(56); } set { WriteUint(value, 56); } }
    }
send packet
Code:
public void Execute(Client.IClient client, ServerSocket.Packet packet)
        {
      

            byte typ1 = packet.ReadByte(4);
            uint Target = packet.ReadUint(8);
            uint ITEM_UID = packet.ReadUint(12);

            if (IsBoy(client.Player.Body) && typ1 == 0)//boy send
            {
 switch (ITEM_UID)
                {
                    case 0://send curent flower
               break;
                   default:
                {
                  Client.Instance.IItem Item = null;
                   if (client.Player.MyInventory.TryGetValueUID(ITEM_UID, out Item))
{......... ushort  amount = Item.ID % 1000; if(amount != database.item[Item.ID].durebiliti) break;

 Role.IMapObj obj = null;
                                if (client.Player.View.TryGetValue(Target,out obj, MapObjType.Player))
                                {
......
}

 you contiunue this..... }

                  break;
                   }
               }
same for girl

 else if (IsGirl(client.Player.Body) && typ1 == 1)//girl send 
            {
                switch (ITEM_UID)
                {
                    case 0://curent flower
                        {
break;}
default:
............
break;
Code:
        public bool IsBoy(uint mesh) { return (mesh == 1003 || mesh == 1004); }
        public bool IsGirl(uint mesh) { return (mesh == 2001 || mesh == 2002); }
03/11/2013 17:12 shadowman123#7
what u posted is Good but he wont get it ..