예제 #1
0
    private void OnReq_BattlePet(MessageRecv obj)
    {
        System.IO.MemoryStream ms  = new System.IO.MemoryStream(obj.Data);
        ReqBattlePet           req = Serializer.Deserialize <ReqBattlePet>(ms);

        AckBattlePet ack = new AckBattlePet();

        ack.ID = req.ID;
        NetworkManager.Instance.Send(MessageID.MSG_ACK_BATTLE_PET, ack, 0, 0);
    }
예제 #2
0
    private void OnAck_BattlePet(MessageRecv obj)
    {
        System.IO.MemoryStream ms  = new System.IO.MemoryStream(obj.Data);
        AckBattlePet           ack = Serializer.Deserialize <AckBattlePet>(ms);

        XCharacter role = RoleModule.Instance.GetCurPlayer();

        role.PetID = ack.ID;
        DataDBSRole.Update(role.Id, role);

        CharacterManager.Instance.SyncMainPlayerData(ESyncDataType.TYPE_BASEATTR);
        GTEventCenter.FireEvent(GTEventID.TYPE_BATTLE_PET);
        GTEventCenter.FireEvent(GTEventID.TYPE_CHANGE_FIGHTVALUE);
    }
예제 #3
0
    private void OnAck_BattlePet(MessageRecv obj)
    {
        System.IO.MemoryStream ms  = new System.IO.MemoryStream(obj.Data);
        AckBattlePet           ack = Serializer.Deserialize <AckBattlePet>(ms);

        XCharacter role = GTGlobal.Main;

        role.PetID = ack.ID;
        DataDBSCharacter.Update(role.Carrer, role);

        GTWorld.Instance.SyncMainPlayerData(ESyncDataType.TYPE_BASEATTR);
        GTEventCenter.FireEvent(GTEventID.TYPE_PET_BATTLE);
        GTEventCenter.FireEvent(GTEventID.TYPE_CHANGE_FIGHTVALUE);
    }