예제 #1
0
파일: MsgAction.cs 프로젝트: Pircs/Yi
 private static void ChangeFace(YiObj player, ref MsgAction packet)
 {
     player.Look = (uint)(player.Look - (int)(player.Look / 10000) * 10000 + packet.Param * 10000);
     if (TeamSystem.Teams.ContainsKey(player.UniqueId))
     {
         foreach (var member in TeamSystem.Teams[player.UniqueId].Members)
         {
             (member.Value as Player)?.Send(MsgTeamUpdate.JoinLeave(player, MsgTeamMemberAction.AddMember));
         }
     }
     ScreenSystem.Send(player, packet, true);
 }
예제 #2
0
        public static MsgTeamUpdate JoinLeave(YiObj owner, MsgTeamMemberAction addMember)
        {
            var packet = new MsgTeamUpdate
            {
                Size = (ushort)sizeof(MsgTeamUpdate),
                Id   = 1026, Action = addMember, Amount = 1, Unknown = 16, UniqueId = owner.UniqueId, Look = owner.Look, MaxHp = (ushort)Math.Max(owner.MaximumHp, owner.CurrentHp), CurHp = (ushort)owner.CurrentHp
            };

            for (byte i = 0; i < owner.Name.Length; i++)
            {
                packet.TargetName[i] = (byte)owner.Name[i];
            }

            return(packet);
        }