Ejemplo n.º 1
0
    void OnPvpGetBattleInfoHandler(C2G.PvpGetBattleInfo packet, C2G.PvpGetBattleInfoAck ack)
    {
        Network.BattleStageInfo = null;
        Network.PVPBattleInfo   = new PVPBattleInfo(m_SelectedEnemyInfo, ack);

        Popup.Instance.Show(ePopupMode.PVPBattleReady);
    }
Ejemplo n.º 2
0
    public PVPBattleInfo(pd_PvpPlayerInfo enemy_info, C2G.PvpGetBattleInfoAck ack)
    {
        this.enemy_info = enemy_info;

        for (int i = 0; i < ack.creatures.Count; ++i)
        {
            List <pd_EquipData> equips = ack.equips.FindAll(e => e.creature_idx == ack.creatures[i].creature_idx);
            pd_EquipData        weapon = equips.Find(e => EquipInfoManager.Instance.GetInfoByIdn(e.equip_idn).CategoryInfo.EquipType == SharedData.eEquipType.weapon);
            pd_EquipData        armor  = equips.Find(e => EquipInfoManager.Instance.GetInfoByIdn(e.equip_idn).CategoryInfo.EquipType == SharedData.eEquipType.armor);
            List <Rune>         runes  = ack.runes.FindAll(r => r.creature_idx == ack.creatures[i].creature_idx).Select(e => new Rune(e)).ToList();
            Creatures.Add(new Creature(ack.creatures[i], weapon, armor, runes));
        }

        this.enemy_team_data = new TeamData(ack.team_data.team_type, null);
        enemy_team_data.SetCreatures(ack.team_data.creature_infos.Select(c => new TeamCreature(Creatures.Find(lc => lc.Idx == c.team_creature_idx), c.auto_skill_index)).ToList(), false);
        if (ack.team_data.leader_creature_idx > 0)
        {
            Creature leader_creature = Creatures.Find(c => c.Idx == ack.team_data.leader_creature_idx);
            if (leader_creature != null)
            {
                enemy_team_data.SetLeaderCreature(leader_creature, ack.team_data.use_leader_skill_type);
            }
        }
    }
Ejemplo n.º 3
0
    void OnPvpGetBattleInfoHandler(C2G.PvpGetBattleInfo packet, C2G.PvpGetBattleInfoAck ack)
    {
        Network.PVPBattleInfo = new PVPBattleInfo(m_PVPInfo, ack);

        Popup.Instance.Show(ePopupMode.PVPBattleReady, false);
    }