Ejemplo n.º 1
0
        public static void SendPartyVitals(int partyNum, int index)
        {
            ByteStream buffer;
            int        i;

            buffer = new ByteStream(4);
            buffer.WriteInt32((byte)Packets.ServerPackets.SPartyVitals);
            buffer.WriteInt32(index);

            modDatabase.Addlog("Sent SMSG: SPartyVitals", S_Constants.PACKET_LOG);
            Console.WriteLine("Sent SMSG: SPartyVitals");

            for (i = 1; i <= (byte)Enums.VitalType.Count - 1; i++)
            {
                buffer.WriteInt32(S_Players.GetPlayerMaxVital(index, (VitalType)i));
                buffer.WriteInt32(modTypes.Player[index].Character[modTypes.TempPlayer[index].CurChar].Vital[i]);
            }

            byte[] bufferArray = buffer.ToArray();

            SendDataToParty(partyNum, ref bufferArray);
            buffer.Dispose();
        }