Ejemplo n.º 1
0
    //装备武器
    private void summonEquipRequest(ModuleMech moduleMech, Vector3 dragLastPosition)
    {
        switch (M_EquipType)
        {
        case SlotTypes.Weapon:
        {
            EquipWeaponRequest request = new EquipWeaponRequest(Client.Instance.Proxy.ClientID, M_CardInstanceId, moduleMech.M_MechID);
            Client.Instance.Proxy.SendMessage(request);
            break;
        }

        case SlotTypes.Shield:
        {
            EquipShieldRequest request = new EquipShieldRequest(Client.Instance.Proxy.ClientID, M_CardInstanceId, moduleMech.M_MechID);
            Client.Instance.Proxy.SendMessage(request);
            break;
        }

        case SlotTypes.Pack:
        {
            EquipPackRequest request = new EquipPackRequest(Client.Instance.Proxy.ClientID, M_CardInstanceId, moduleMech.M_MechID);
            Client.Instance.Proxy.SendMessage(request);
            break;
        }

        case SlotTypes.MA:
        {
            EquipMARequest request = new EquipMARequest(Client.Instance.Proxy.ClientID, M_CardInstanceId, moduleMech.M_MechID);
            Client.Instance.Proxy.SendMessage(request);
            break;
        }
        }

        Usable = false;
    }
Ejemplo n.º 2
0
    public void OnClientEquipWeaponRequest(EquipWeaponRequest r)
    {
        ClientA.CurrentClientRequestResponseBundle = new EquipWeaponRequest_ResponseBundle();
        ClientB.CurrentClientRequestResponseBundle = new EquipWeaponRequest_ResponseBundle();

        BattlePlayer  sp       = GetPlayerByClientId(r.clientId);
        CardInfo_Base cardInfo = sp.HandManager.GetHandCardInfo(r.handCardInstanceId);

        sp.HandManager.UseCard(r.handCardInstanceId);
        sp.BattleGroundManager.EquipWeapon(r, cardInfo);

        Broadcast_SendOperationResponse();
    }
Ejemplo n.º 3
0
    public void EquipWeapon(EquipWeaponRequest r, CardInfo_Base cardInfo)
    {
        ModuleWeapon   weapon          = new ModuleWeapon();
        CardInfo_Equip cardInfo_Weapon = (CardInfo_Equip)cardInfo;
        ModuleMech     mech            = GetMech(r.mechId);

        weapon.M_ModuleMech = mech;
        weapon.M_EquipID    = BattlePlayer.GameManager.GenerateNewEquipId();
        weapon.Initiate(cardInfo_Weapon, BattlePlayer);
        weapon.OriginCardInstanceId = r.handCardInstanceId;
        mech.M_Weapon = weapon;
        BattlePlayer.CardDeckManager.CardDeck.AddCardInstanceId(cardInfo.CardID, r.handCardInstanceId);
    }