Exemplo n.º 1
0
        private RCPushEntityAddBuff ToRCPushEntityAddBuff(CREntityAddBuff request)
        {
            int originPlayer = m_UserId;
            int targetPlayer = 0;

            foreach (var player in m_Room.Players)
            {
                if (player.Value.InBattleEntity == m_Request.TargetEntityId)
                {
                    targetPlayer = player.Key;
                }
            }
            RCPushEntityAddBuff response = new RCPushEntityAddBuff()
            {
                OriginEntityId  = request.OriginEntityId,
                TargetEntityId  = request.TargetEntityId,
                OriginTransform = request.OriginTransform,
                TargetTransform = request.TargetTransform,
                OriginPlayerId  = originPlayer,
                TargetPlayerId  = targetPlayer,
            };

            response.BuffTypeIds.AddRange(request.BuffTypeIds);
            return(response);
        }
Exemplo n.º 2
0
 public Action5108(ActionGetter actionGetter)
     : base((short)5108, actionGetter)
 {
     m_RequestPacket  = null;
     m_ResponsePacket = null;
     m_UserId         = 0;
     m_RoomId         = 1;
 }