public static void UpdateNewItem(Item item) { if (item.window == Item.WINDOW.EQUIPABLES && item.data.type == ITEM_TYPES.WEAPON) { PlayerEquip.EquipWeapon(item.data.vnum); } }
public static void UpdateExistingItem(Item.WINDOW window, Item.WINDOW lastWindow, Item item) { if (window == Item.WINDOW.EQUIPABLES && item.data.type == ITEM_TYPES.WEAPON) { PlayerEquip.EquipWeapon(item.data.vnum); } }
public static void UpdatePlayerEquip(Item item) { if (hasWeaponEquipped && item.window == Item.WINDOW.EQUIPABLES && item.data.type == ITEM_TYPES.WEAPON) { PlayerEquip.DequipWeapon(); } }
public void EquipCopy(PlayerEquip copied, PlayerEquip copying) { copying.ID = copied.ID; copying.Name = copied.Name; copying.Price = copied.Price; copying.StatusBonus = copied.StatusBonus; }
public static void LoadTable() { try { players_equip = new Dictionary <ulong, PlayerEquip>(); using (var reader = MySqlHelper.ExecuteReader(Connector.ConnectionString, "SELECT * FROM `players_equip`")) { while (reader.Read()) { PlayerEquip equips = new PlayerEquip() { PlayerID = reader.GetUInt64("PlayerID"), WeaponPrimary = reader.GetInt32("WeaponPrimary"), WeaponSecondary = reader.GetInt32("WeaponSecondary"), WeaponMelee = reader.GetInt32("WeaponMelee"), WeaponThrownNormal = reader.GetInt32("WeaponThrownNormal"), WeaponThrownSpecial = reader.GetInt32("WeaponThrownSpecial"), CharRed = reader.GetInt32("CharRed"), CharBlue = reader.GetInt32("CharBlue"), CharHelmet = reader.GetInt32("CharHelmet"), CharDino = reader.GetInt32("CharDino"), CharBeret = reader.GetInt32("CharBeret"), }; players_equip.Add(equips.PlayerID, equips); } } Logger.Info("[PlayersEquipTable] Loaded {0} players", players_equip.Count); } catch (Exception ex) { Logger.Error("[Error] {0}", ex); } }
private void Awake() { itemImage = this.gameObject.GetComponent <Image>(); selectedItem = GameObject.Find("SelectedItem").GetComponent <UIItem>(); playerEquip = GameObject.Find("Player").GetComponent <PlayerEquip>(); toolTipObject = GameObject.Find("ItemToolTip"); toolTip = GameObject.Find("ItemToolTipText").GetComponent <ItemToolTip>(); }
public void buy(PlayerEquip buying, List <PlayerEquip> Risto) { StatusPlayer.Money -= buying.Price; StatusPlayer.BuyedEquips.Add(buying); print("Comprado " + buying.Name + " por $" + buying.Price); clearSlot(); OpenSection(Risto); }
public void findObjects() { player = GameObject.FindGameObjectWithTag("Player"); abilities = player.GetComponent <PlayerAbilities>(); health = player.GetComponent <PlayerHealth>(); exp = player.GetComponent <PlayerExperience>(); equip = player.GetComponent <PlayerEquip>(); movement = player.GetComponent <PlayerMovement>(); }
public void addItemToInventory(Item item) { PackedScene itemPS = (PackedScene)ResourceLoader.Load($"res://prefabs/UI/Item_slot.tscn"); Item newItem = itemPS.Instance() as Item; newItem.SetItemData(item.iid, item.data, item.count, item.window, item.position); GetTree().Root.GetNode <CanvasLayer>(ItemHolderPath).CallDeferred("add_child", newItem); items_in_client.Add(newItem); PlayerEquip.UpdateNewItem(item); }
// Use this for initialization void Start() { rb2d = gameObject.GetComponent <Rigidbody2D>(); anim = gameObject.GetComponent <Animator>(); gm = GameObject.FindGameObjectWithTag("GameMaster").GetComponent <gameMaster> (); currentHealth = maxHealth; levelManager = FindObjectOfType <LevelManager>(); attack = gameObject.GetComponent <PlayerAttack>(); equip = gameObject.GetComponent <PlayerEquip>(); maxSpeed = trueMaxSpeed; }
private void requestItemUsage(int pos) { PlayerEquip.UpdatePlayerEquip(this); using (Packet packet = new Packet((int)ClientPackets.itemUse)) { packet.Write(Client.instance.getCID()); packet.Write(Client.instance.getSessionId()); packet.Write(pos); packet.Write((int)window); Client.SendTCPData(packet); } }
private void UpdateItemPosition() { Name = "icon_" + data.vnum + "_" + position; if (lastPos != position || lastWindow != window) { setPosition(); } PlayerEquip.UpdateExistingItem(window, lastWindow, this); lastPos = position; lastWindow = window; }
public override void WriteImpl() { equip = PlayerEquipTable.players_equip[player.PlayerID]; WriteH(0xD06); WriteD(room.isFigth()); WriteD(room.getRoomSlotByPlayer(player).getId()); WriteD(equip.getCharRed()); WriteD(equip.getCharBlue()); WriteD(equip.getCharHelmet()); WriteD(equip.getCharBeret()); WriteD(equip.getCharDino()); WriteC(2); // wtf? WriteC(0); WriteH(0); }
public override void _Ready() { instance = this; cameraBase = GetNode <Spatial>(CameraBasePath); cameraRot = cameraBase.GetNode <Spatial>("CameraRot"); camera = cameraRot.GetNode <Spatial>("Camera"); playerCamera = new PlayerCamera(); animTree = mesh.FindNode("AnimationTree", true, false) as AnimationTree; PlayerEquip.ResetEquipables(); using (Packet packet = new Packet((int)ClientPackets.playerInstancedSignal)) { packet.Write(Client.instance.getCID()); packet.Write(Client.instance.getSessionId()); Client.SendTCPData(packet); } }
private void Awake() { if (SceneManager.GetActiveScene().buildIndex == 1) { player = GameObject.FindGameObjectWithTag("Player"); abilities = player.GetComponent <PlayerAbilities>(); health = player.GetComponent <PlayerHealth>(); exp = player.GetComponent <PlayerExperience>(); equip = player.GetComponent <PlayerEquip>(); movement = player.GetComponent <PlayerMovement>(); inventory = GameObject.Find("Inventory").GetComponent <Inventory>(); uiInventory = GameObject.Find("InventoryPanel").GetComponent <UIInventory>(); abilityBar = GameObject.Find("AbilityBarPanel").GetComponent <UIAbilityBar>(); //skillCanvas = GameObject.Find("SkillPanel").GetComponent<SkillCanvas>(); } }
public override void WriteImpl() { equip = PlayerEquipTable.players_equip[player.PlayerID]; WriteH(0xD04); WriteD(9); // Так Надо. И неебёт! WriteH((short)room.getMapId()); WriteC((byte)room.getStage4v4()); WriteC((byte)room.getType()); WriteD(equip.getCharRed()); WriteD(equip.getCharBlue()); WriteD(equip.getCharHelmet()); WriteD(equip.getCharBeret()); WriteD(equip.getCharDino()); Logger.Info("READY {0}", room.getRoomSlotByPlayer(player).getState()); }
private void requestItemMove(WINDOW target_window, int newPos) { PlayerEquip.UpdatePlayerEquip(this); if (PlayerEquip.hasWeaponEquipped && target_window != WINDOW.EQUIPABLES && window == WINDOW.EQUIPABLES && data.type == ITEM_TYPES.WEAPON) { PlayerEquip.DequipWeapon(); } using (Packet packet = new Packet((int)ClientPackets.itemChangePosition)) { packet.Write(Client.instance.getCID()); packet.Write(Client.instance.getSessionId()); packet.Write(iid); packet.Write(newPos); packet.Write((int)target_window); Client.SendTCPData(packet); } }
public void equip(PlayerEquip equipping, List <PlayerEquip> Risto) { string Typo = equipping.GetType().Name; print("Type-S: " + Typo); for (int m = 0; m < StatusPlayer.CurrentEquips.Count; m++) { string Typoru = StatusPlayer.CurrentEquips[m].GetType().Name; if (Typoru == Typo) { StatusPlayer.CurrentEquips.RemoveAt(m); } } if (Typo == "Hull") { StatusPlayer.CurrentHull = equipping as Hull; } else if (Typo == "FuelTank") { StatusPlayer.CurrentFuelTank = equipping as FuelTank; } else if (Typo == "Drill") { StatusPlayer.CurrentDrill = equipping as Drill; } else if (Typo == "Cargo") { StatusPlayer.CurrentCargo = equipping as Cargo; } else if (Typo == "Rocket") { StatusPlayer.CurrentRocket = equipping as Rocket; } StatusPlayer.CurrentEquips.Add(equipping); clearSlot(); OpenSection(Risto); print("Equipado: " + equipping.Name); StatusPlayer.atualizeStats(); }
// Update is called once per frame void Update() { if (Input.GetKey(KeyCode.R)) { PlayerEquip.Reload(); } int keyUp = Input.GetKey(KeyCode.UpArrow) ? 1 : 0; int keyRight = Input.GetKey(KeyCode.RightArrow) ? 1 : 0; int keyDown = Input.GetKey(KeyCode.DownArrow) ? 1 : 0; int keyLeft = Input.GetKey(KeyCode.LeftArrow) ? 1 : 0; fireDirection = GetFireDirection(keyUp, keyRight, keyDown, keyLeft); if (fireDirection != FireDir.NONE) { switch (fireDirection) { case FireDir.UP: fireVector = new Vector3(0, 0, 1f); break; case FireDir.RIGHT: fireVector = new Vector3(1f, 0, 0); break; case FireDir.DOWN: fireVector = new Vector3(0, 0, -1f); break; case FireDir.LEFT: fireVector = new Vector3(-1f, 0, 0); break; } PlayerEquip.Shoot(gameObject.transform.position + new Vector3(fireVector.x * 0.8f, 0.5f, fireVector.z * 0.8f), fireVector); } }
// Update is called once per frame void Update() { rb2d = gameObject.GetComponent <Rigidbody2D>(); anim = gameObject.GetComponent <Animator>(); gm = GameObject.FindGameObjectWithTag("GameMaster").GetComponent <gameMaster> (); attack = gameObject.GetComponent <PlayerAttack>(); equip = gameObject.GetComponent <PlayerEquip>(); anim.SetBool("Grounded", grounded); anim.SetBool("CanMove", canMove); anim.SetBool("Crouch", crouch); anim.SetBool("Block", block); anim.SetBool("Dead", dead); anim.SetFloat("Speed", Mathf.Abs(rb2d.velocity.x)); anim.SetFloat("JumpSpeed", Mathf.Abs(rb2d.velocity.y)); if (!canMove) { attack.enabled = false; speed = 0; jumpSpeed = 0; equip.enabled = false; maxSpeed = 0; block = false; crouch = false; } else if (!block || !crouch) { speed = 150f; jumpSpeed = 450f; attack.enabled = true; equip.enabled = true; } if (crouch) { speed = 0; maxSpeed = 0; } if (block) { speed = 0; jumpSpeed = 0; } if (Input.GetAxis("Horizontal") < -0.1f && !crouch) { transform.localScale = new Vector3(-1, 1, 1); } if (Input.GetAxis("Horizontal") > 0.1f && !crouch) { transform.localScale = new Vector3(1, 1, 1); } if (Input.GetButtonDown("Jump") && grounded) { if (crouch) { rb2d.AddForce(Vector2.up * jumpSpeed * 1.5f); } else { rb2d.AddForce(Vector2.up * jumpSpeed); } } if (currentHealth > maxHealth) { currentHealth = maxHealth; } if (Input.GetButton("Crouch") && grounded && canMove) { crouch = true; } else { crouch = false; } if (Input.GetButton("Block") && grounded && canMove) { block = true; attack.enabled = false; speed = 0; jumpSpeed = 0; equip.enabled = true; maxSpeed = 0; if (equip.shield) { shieldBlock.enabled = true; } } else { block = false; shieldBlock.enabled = false; } if (currentHealth <= 0) { Die(); } }
void Start() { Player = GameObject.FindGameObjectWithTag("Player").transform; Equipkit = Player.GetComponent <PlayerEquip> (); }
// Construct an equipable behavior. public EquipableItemBehavior(PlayerEquip playerEquipController, EquipableItem itemType, IItem item) { this.playerEquipController = playerEquipController; this.itemType = itemType; this.item = item; }
public void ShowDescription(PlayerEquip showing, Button bataum) { DescriptionText.text = showing.Description; }
void Start() { player = GameObject.FindGameObjectWithTag("Player").GetComponent <PlayerEquip>(); }
private void Start() { playerEquip = this.GetComponentInParent <EquipmentManager>().playerEquip; }
public static void ChangePlayerEquip(PlayerEquip state) { m_PlayerEquip = state; }
public override void WriteImpl() { WriteH((short)3842); if (player.getRoom().getSlotState(slot) == SLOT_STATE.SLOT_STATE_EMPTY) { WriteD(0); } else { SLOT slot = player.getRoom().getRoomSlot(this.slot); WriteD(this.slot); WriteS(slot.getPlayer().getName(),33); WriteD(slot.getPlayer().getExp()); WriteD(slot.getPlayer().getRank()); WriteD(slot.getPlayer().getRank()); WriteD(slot.getPlayer().getGp()); WriteD(slot.getPlayer().getMoney()); if (slot.getPlayer().getClanID() != 0) { WriteD(1); WriteD(1); } else { WriteB(new byte[8]); } WriteD(0); WriteD(0); WriteH((short)slot.getPlayer().getPCCafe()); WriteC(0);// color WriteS(slot.getPlayer().getClan().getName(), 17); WriteH(slot.getPlayer().getClan().getRank()); WriteC((byte)slot.getPlayer().getClan().getLogo1()); WriteC((byte)slot.getPlayer().getClan().getLogo2()); WriteC((byte)slot.getPlayer().getClan().getLogo3()); WriteC((byte)slot.getPlayer().getClan().getLogo4()); WriteH(slot.getPlayer().getClan().getColor()); WriteD(0); WriteD(0); WriteD(0); stats = PlayersStatsTable.statistics[slot.getPlayer().PlayerID]; WriteD(stats.getFights()); //всего боев WriteD(stats.getWins()); //всего побед WriteD(stats.getLosts()); //всего поражений WriteD(0); WriteD(stats.getKills()); //кол-во убийств WriteD(stats.getHeadshots()); //кол-во хедшотов WriteD(stats.getDeaths()); //кол-во смертей WriteD(0); WriteD(stats.getKills()); //опять килы о.о WriteD(stats.getEscapes()); //всего ливнул WriteD(stats.getSeasonFights()); //всего боев за сезон WriteD(stats.getSeasonWins()); //всего побед за сезон WriteD(stats.getSeasonLosts()); //всего поражений за сезон WriteD(0); WriteD(stats.getSeasonKills()); //киллы сезон по идее WriteD(stats.getSeasonHeadshots()); //хеды сезон по идее WriteD(stats.getSeasonDeaths()); //смерти сезон по идее WriteD(0); WriteD(stats.getSeasonKills()); //опять килы,хз зачем WriteD(stats.getSeasonEscapes()); //сколько ливнул за сезон equip = PlayerEquipTable.players_equip[slot.getPlayer().PlayerID]; WriteD(equip.getCharRed()); // Скин Мужчина стандартный красные WriteD(equip.getCharBlue()); // Скин Мужчина стандартный синие WriteD(equip.getCharHelmet()); // Шлем поидеи... надо тестить WriteD(equip.getCharBeret()); // Берет WriteD(0); // Хз что это. Влазиет пистолеты, ножи, снайпы, пулеметы WriteD(equip.getWeaponPrimary()); // Основное оружие WriteD(equip.getWeaponSecondary()); // Второстепенное оружие WriteD(equip.getWeaponMelee()); // Ближнего боя WriteD(equip.getWeaponThrownNormal()); // Гранаты (Гранаты для взрыва) WriteD(equip.getWeaponThrownSpecial()); // Гранаты (Шранаты специальные, смок, слеповуха) } }
// Use this for initialization void Start() { playerEquip = GetComponent <PlayerEquip>(); equipPoint = playerEquip.EquipPoint; stashPoint = playerEquip.StashPoint; }
public override void WriteImpl() { player = PlayersTable.players[account.AccountID]; stats = PlayersStatsTable.statistics[player.PlayerID]; titles = TitlesTable.titles[player.PlayerID]; equip = PlayerEquipTable.players_equip[player.PlayerID]; medals = PlayersMedalsTable.playersMedals[player.PlayerID]; quest = QuestsTable.quests[player.PlayerID]; clan = player.Clan; WriteH(0xA06); WriteD(0); WriteC(0xdd); WriteS(player.PlayerName, 33); WriteD(player.getExp()); WriteD(player.getRank()); WriteD(player.getRank()); // Для купона WriteD(player.getGp()); WriteD(player.getMoney()); WriteD(player == null || clan == null ? 0 : (int)clan.getId()); WriteD(player == null || clan == null ? 0 : clan.getColor()); WriteD(0); // Unk WriteC(0); // Unk WriteD(player.getPCCafe()); //pc cafe WriteH((short)player.getEmblem()); //Лычка поидеи WriteS(Convert.ToString(account == null || clan == null ? "" : clan.getName()), 16); WriteC((byte)0); WriteH(player == null || clan == null ? (short)0 : (short)clan.getRank()); WriteC(Convert.ToByte(player == null || clan == null ? (int)byte.MaxValue : clan.getLogo1())); WriteC(Convert.ToByte(player == null || clan == null ? (int)byte.MaxValue : clan.getLogo2())); WriteC(Convert.ToByte(player == null || clan == null ? (int)byte.MaxValue : clan.getLogo3())); WriteC(Convert.ToByte(player == null || clan == null ? (int)byte.MaxValue : clan.getLogo4())); WriteH(player == null || clan == null ? (short)0 : (short)clan.getColor()); WriteD(0); // unk WriteD(0); // TODO посмотреть снифф WriteD(0); // TODO посмотреть снифф WriteD(stats.getFights()); //всего боев WriteD(stats.getWins()); //всего побед WriteD(stats.getLosts()); //всего поражений WriteD(0); // unk WriteD(stats.getKills()); //кол-во убийств WriteD(stats.getHeadshots()); //кол-во хедшотов WriteD(stats.getDeaths()); //кол-во смертей WriteD(0); // unk WriteD(stats.getKills()); //опять килы о.о WriteD(stats.getEscapes()); //всего ливнул WriteD(stats.getSeasonFights()); //всего боев за сезон WriteD(stats.getSeasonWins()); //всего побед за сезон WriteD(stats.getSeasonLosts()); //всего поражений за сезон WriteD(0); // unk WriteD(stats.getSeasonKills()); //киллы сезон по идее WriteD(stats.getSeasonHeadshots()); //хеды сезон по идее WriteD(stats.getSeasonDeaths()); //смерти сезон по идее WriteD(0); // unk WriteD(stats.getSeasonKills()); //опять килы,хз зачем WriteD(stats.getSeasonEscapes()); //сколько ливнул за сезон LoadEquip(); WriteB(new byte[41]); WriteC(1); LoadItems(); WriteC(0); // Outpost WriteD(medals.getRibbons()); // Медаль: Лента. WriteD(medals.getBadges()); // Медаль: Знаки отличия. WriteD(medals.getMedals()); // Медаль: сама медаль. WriteD(medals.getMaterMedals()); // Медаль: Медаль мастера. WriteC((byte)quest.getMissionID()); // Активная миссия? WriteD(quest.getCardID()); // Активная карта tutorial = getMissionById(0); if (tutorial.getMission1() == quest.getCard1_1()) { if (tutorial.getMission2() == quest.getCard1_2()) { WriteC((byte)0xFF); } else { WriteC((byte)0xEF); } } else if (tutorial.getMission2() == quest.getCard1_2()) { WriteC((byte)0xFE); } else { WriteC((byte)0x00); } if (tutorial.getMission3() == quest.getCard1_3()) { if (tutorial.getMission4() == quest.getCard1_4()) { WriteC((byte)0xFF); } else { WriteC((byte)0xEF); } } else if (tutorial.getMission4() == quest.getCard1_4()) { WriteC((byte)0xFE); } else { WriteC((byte)0x00); } tutorial = getMissionById(1); if (tutorial.getMission1() == quest.getCard2_1()) { if (tutorial.getMission2() == quest.getCard2_2()) { WriteC((byte)0xFF); } else { WriteC((byte)0xEF); } } else if (tutorial.getMission2() == quest.getCard2_2()) { WriteC((byte)0xFE); } else { WriteC((byte)0x00); } if (tutorial.getMission3() == quest.getCard2_3()) { if (tutorial.getMission4() == quest.getCard2_4()) { WriteC((byte)0xFF); } else { WriteC((byte)0xEF); } } else if (tutorial.getMission4() == quest.getCard2_4()) { WriteC((byte)0xFE); } else { WriteC((byte)0x00); } tutorial = getMissionById(2); if (tutorial.getMission1() == quest.getCard1_1()) { if (tutorial.getMission2() == quest.getCard3_2()) { WriteC((byte)0xFF); } else { WriteC((byte)0xEF); } } else if (tutorial.getMission2() == quest.getCard3_2()) { WriteC((byte)0xFE); } else { WriteC((byte)0x00); } if (tutorial.getMission3() == quest.getCard1_3()) { if (tutorial.getMission4() == quest.getCard3_4()) { WriteC((byte)0xFF); } else { WriteC((byte)0xEF); } } else if (tutorial.getMission4() == quest.getCard3_4()) { WriteC((byte)0xFE); } else { WriteC((byte)0x00); } tutorial = getMissionById(3); if (tutorial.getMission1() == quest.getCard4_1()) { if (tutorial.getMission2() == quest.getCard4_2()) { WriteC((byte)0xFF); } else { WriteC((byte)0xEF); } } else if (tutorial.getMission2() == quest.getCard4_2()) { WriteC((byte)0xFE); } else { WriteC((byte)0x00); } if (tutorial.getMission3() == quest.getCard4_3()) { if (tutorial.getMission4() == quest.getCard4_4()) { WriteC((byte)0xFF); } else { WriteC((byte)0xEF); } } else if (tutorial.getMission4() == quest.getCard4_4()) { WriteC((byte)0xFE); } else { WriteC((byte)0x00); } tutorial = getMissionById(4); if (tutorial.getMission1() == quest.getCard5_1()) { if (tutorial.getMission2() == quest.getCard5_2()) { WriteC((byte)0xFF); } else { WriteC((byte)0xEF); } } else if (tutorial.getMission2() == quest.getCard5_2()) { WriteC((byte)0xFE); } else { WriteC((byte)0x00); } if (tutorial.getMission3() == quest.getCard5_3()) { if (tutorial.getMission4() == quest.getCard5_4()) { WriteC((byte)0xFF); } else { WriteC((byte)0xEF); } } else if (tutorial.getMission4() == quest.getCard5_4()) { WriteC((byte)0xFE); } else { WriteC((byte)0x00); } tutorial = getMissionById(5); if (tutorial.getMission1() == quest.getCard6_1()) { if (tutorial.getMission2() == quest.getCard6_2()) { WriteC((byte)0xFF); } else { WriteC((byte)0xEF); } } else if (tutorial.getMission2() == quest.getCard6_2()) { WriteC((byte)0xFE); } else { WriteC((byte)0x00); } if (tutorial.getMission3() == quest.getCard6_3()) { if (tutorial.getMission4() == quest.getCard6_4()) { WriteC((byte)0xFF); } else { WriteC((byte)0xEF); } } else if (tutorial.getMission4() == quest.getCard6_4()) { WriteC((byte)0xFE); } else { WriteC((byte)0x00); } tutorial = getMissionById(6); if (tutorial.getMission1() == quest.getCard7_1()) { if (tutorial.getMission2() == quest.getCard7_2()) { WriteC((byte)0xFF); } else { WriteC((byte)0xEF); } } else if (tutorial.getMission2() == quest.getCard7_2()) { WriteC((byte)0xFE); } else { WriteC((byte)0x00); } if (tutorial.getMission3() == quest.getCard7_3()) { if (tutorial.getMission4() == quest.getCard7_4()) { WriteC((byte)0xFF); } else { WriteC((byte)0xEF); } } else if (tutorial.getMission4() == quest.getCard7_4()) { WriteC((byte)0xFE); } else { WriteC((byte)0x00); } tutorial = getMissionById(7); if (tutorial.getMission1() == quest.getCard8_1()) { if (tutorial.getMission2() == quest.getCard8_2()) { WriteC((byte)0xFF); } else { WriteC((byte)0xEF); } } else if (tutorial.getMission2() == quest.getCard8_2()) { WriteC((byte)0xFE); } else { WriteC((byte)0x00); } if (tutorial.getMission3() == quest.getCard8_3()) { if (tutorial.getMission4() == quest.getCard8_4()) { WriteC((byte)0xFF); } else { WriteC((byte)0xEF); } } else if (tutorial.getMission4() == quest.getCard8_4()) { WriteC((byte)0xFE); } else { WriteC((byte)0x00); } tutorial = getMissionById(8); if (tutorial.getMission1() == quest.getCard9_1()) { if (tutorial.getMission2() == quest.getCard9_2()) { WriteC((byte)0xFF); } else { WriteC((byte)0xEF); } } else if (tutorial.getMission2() == quest.getCard9_2()) { WriteC((byte)0xFE); } else { WriteC((byte)0x00); } if (tutorial.getMission3() == quest.getCard9_3()) { if (tutorial.getMission4() == quest.getCard9_4()) { WriteC((byte)0xFF); } else { WriteC((byte)0xEF); } } else if (tutorial.getMission4() == quest.getCard9_4()) { WriteC((byte)0xFE); } else { WriteC((byte)0x00); } tutorial = getMissionById(9); if (tutorial.getMission1() == quest.getCard10_1()) { if (tutorial.getMission2() == quest.getCard10_2()) { WriteC((byte)0xFF); } else { WriteC((byte)0xEF); } } else if (tutorial.getMission2() == quest.getCard10_2()) { WriteC((byte)0xFE); } else { WriteC((byte)0x00); } if (tutorial.getMission3() == quest.getCard10_3()) { if (tutorial.getMission4() == quest.getCard10_4()) { WriteC((byte)0xFF); } else { WriteC((byte)0xEF); } } else if (tutorial.getMission4() == quest.getCard10_4()) { WriteC((byte)0xFE); } else { WriteC((byte)0x00); } // Галки на миссиях: 0xEF - выполнена первая, 0xFE - выполнена вторая, 0xFF - выполнены обе, 0x00 - не выполнена не одна WriteB(new byte[] { 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, }); // //прохождение карт WriteC((byte)quest.getCard1_1()); WriteC((byte)quest.getCard1_2()); WriteC((byte)quest.getCard1_3()); WriteC((byte)quest.getCard1_4()); WriteC((byte)quest.getCard2_1()); WriteC((byte)quest.getCard2_2()); WriteC((byte)quest.getCard2_3()); WriteC((byte)quest.getCard2_4()); WriteC((byte)quest.getCard3_1()); WriteC((byte)quest.getCard3_2()); WriteC((byte)quest.getCard3_3()); WriteC((byte)quest.getCard3_4()); WriteC((byte)quest.getCard4_1()); WriteC((byte)quest.getCard4_2()); WriteC((byte)quest.getCard4_3()); WriteC((byte)quest.getCard4_4()); WriteC((byte)quest.getCard5_1()); WriteC((byte)quest.getCard5_2()); WriteC((byte)quest.getCard5_3()); WriteC((byte)quest.getCard5_4()); WriteC((byte)quest.getCard6_1()); WriteC((byte)quest.getCard6_2()); WriteC((byte)quest.getCard6_3()); WriteC((byte)quest.getCard6_4()); WriteC((byte)quest.getCard7_1()); WriteC((byte)quest.getCard7_2()); WriteC((byte)quest.getCard7_3()); WriteC((byte)quest.getCard7_4()); WriteC((byte)quest.getCard8_1()); WriteC((byte)quest.getCard8_2()); WriteC((byte)quest.getCard8_3()); WriteC((byte)quest.getCard8_4()); WriteC((byte)quest.getCard9_1()); WriteC((byte)quest.getCard9_2()); WriteC((byte)quest.getCard9_3()); WriteC((byte)quest.getCard9_4()); WriteC((byte)quest.getCard10_1()); WriteC((byte)quest.getCard10_2()); WriteC((byte)quest.getCard10_3()); WriteC((byte)quest.getCard10_4()); WriteB(new byte[] { // Остальные миссии 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }); // ПЕРКИ //8 байт - открытые перки(маска) | система такая: у каждой перки свой айди, тут нужно складывать айди в стиле 1+2+3+4+5+6 где 1/2/3/4/5/6 есть айди перки | Всего 44 перки WriteB(new byte[8] { Convert.ToByte(titles.getP1()), Convert.ToByte(titles.getP2()), Convert.ToByte(titles.getP3()), Convert.ToByte(titles.getP4()), Convert.ToByte(titles.getP5()), Convert.ToByte(titles.getP6()), (byte)0, (byte)0 }); //3 байта - одетые перки WriteB(new byte[3] { Convert.ToByte(titles.getEquipedTitle1()), Convert.ToByte(titles.getEquipedTitle2()), Convert.ToByte(titles.getEquipedTitle3()), }); WriteD(titles.getSlotCount());//сколько слотов для перок доступно(1-2-3) WriteD(0); WriteD(0x03); // Общий матч (0х03) WriteD(0x19); // Подрыв (0х19) WriteD(0); // Разрушение (0х23) / 37 WriteD(0x01); // Выживание (0х01) WriteD(0); // Оборона (0х27) WriteD(0); // (0х01) WriteD(0); // (0х28) WriteD(0); // (1) хз WriteD(0); // (1) хз WriteD(0); // (0) WriteD(0); // (0) WriteD(0x36); // (0х36) боты? /*WriteC(36);// кол-во карт * WriteC(1);// кол-во частей * * int Mask = 0; * * Mask |= 1 << (int)Maps.StageId.TD_PORTAKABA; * Mask |= 1 << (int)Maps.StageId.TD_REDROCK; * Mask |= 1 << (int)Maps.StageId.TD_LIBRARY; * Mask |= 1 << (int)Maps.StageId.TD_MSTATION; * Mask |= 1 << (int)Maps.StageId.TD_MIDNIGHTZONE; * Mask |= 1 << (int)Maps.StageId.TD_UPTOWN; * Mask |= 1 << (int)Maps.StageId.TD_BURNINGHALL; * Mask |= 1 << (int)Maps.StageId.TD_DSQUAD; * Mask |= 1 << (int)Maps.StageId.TD_CRACKDOWN; * Mask |= 1 << (int)Maps.StageId.TD_EASTERNROAD; * Mask |= 1 << (int)Maps.StageId.TD_BREAKDOWN; * Mask |= 1 << (int)Maps.StageId.TD_TRAININGCAMP; * Mask |= 1 << (int)Maps.StageId.TD_SENTRYBASE; * Mask |= 1 << (int)Maps.StageId.TD_DESERTCAMP; * Mask |= 1 << (int)Maps.StageId.TD_KICKPOINT; * Mask |= 1 << (int)Maps.StageId.TD_FACEROCK; * Mask |= 1 << (int)Maps.StageId.TD_SUPPLYBASE; * Mask |= 1 << (int)Maps.StageId.TD_SANDSTORM; * Mask |= 1 << (int)Maps.StageId.TD_SAFARI; * Mask |= 1 << (int)Maps.StageId.TD_MACHUPICHU; * Mask |= 1 << (int)Maps.StageId.TD_TWOTOWERS; * Mask |= 1 << (int)Maps.StageId.TD_ANGKORRUINS; * Mask |= 1 << (int)Maps.StageId.TD_GHOSTTOWN; * Mask |= 1 << (int)Maps.StageId.TD_METRO; * // подрыв * Mask |= 1 << (int)Maps.StageId.BB_DOWNTOWN; * Mask |= 1 << (int)Maps.StageId.BB_LUXVILLE; * Mask |= 1 << (int)Maps.StageId.BB_OUTPOST; * Mask |= 1 << (int)Maps.StageId.BB_BLOWCITY; * Mask |= 1 << (int)Maps.StageId.BB_STORMTUBE; * Mask |= 1 << (int)Maps.StageId.BB_SENTRYBASE; * Mask |= 1 << (int)Maps.StageId.BB_HOSPITAL; * Mask |= 1 << (int)Maps.StageId.BB_DOWNTOWN2; * Mask |= 1 << (int)Maps.StageId.BB_SANDSTORM; * Mask |= 1 << (int)Maps.StageId.BB_CARGOSHIP; * Mask |= 1 << (int)Maps.StageId.BB_AIRPORT; * Mask |= 1 << (int)Maps.StageId.BB_SAFEHOUSE; * * * * WriteD(Mask); * * WriteB(new byte[] { * 0x01, 0x00, * 0x00, 0x00, * 0x01, 0x00, * 0x01, 0x00, * 0x00, 0x00, * 0x00, 0x00, * 0x00, 0x00, * 0x01, 0x00, * 0x00, 0x00, * 0x00, 0x00, * 0x00, 0x00, * 0x00, 0x00, * 0x00, 0x00, * 0x00, 0x00, * 0x00, 0x00, * 0x00, 0x00, * 0x00, 0x00, * 0x00, 0x00, * 0x00, 0x00, * 0x00, 0x00, * 0x00, 0x00, * 0x00, 0x00, * 0x00, 0x00, * 0x00, 0x00, * 0x00, 0x00, * 0x00, 0x00, * 0x00, 0x00, * 0x00, 0x00, * 0x00, 0x00, * 0x00, 0x00, * 0x00, 0x00, * 0x00, 0x00, * 0x00, 0x00, * 0x00, 0x00, * 0x00, 0x00, * 0x00, 0x00, * }); * * // иконки нью и прочее | по одной на карту * WriteB(new byte[]{ * 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, * 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, * 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, * 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 * });*/ WriteC(60); WriteC(2); WriteB(new byte[] { (byte)0xFE, (byte)0xFF, (byte)0xFE, (byte)0xBF, (byte)0xCF, 0x77, 0x07, 0x02, }); //Карты, режимы WriteB(new byte[] { 0x00, 0x00, (byte)0x8D, 0x01, (byte)0x88, 0x00, (byte)0x89, 0x00, (byte)0x8D, 0x00, (byte)0x8D, 0x00, (byte)0x8D, 0x00, (byte)0x8D, 0x01, 0x09, 0x00, 0x01, 0x00, 0x00, 0x00, (byte)0x8D, 0x00, (byte)0x80, 0x00, (byte)0x88, 0x00, (byte)0x88, 0x00, (byte)0x88, 0x00, 0x00, 0x00, 0x00, 0x00, (byte)0x8C, 0x00, (byte)0x88, 0x00, (byte)0x88, 0x00, (byte)0x88, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, (byte)0x80, 0x00, (byte)0x80, 0x00, 0x00, 0x00, (byte)0x80, 0x00, (byte)0x80, 0x00, (byte)0x80, 0x00, (byte)0x80, 0x00, (byte)0x80, 0x00, (byte)0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }); WriteB(new byte[] { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, }); WriteC(1); WriteB(new byte[] { (byte)0xEE, (byte)0x03, 0x03, 0x00, // 0xee - отвечают за обучающие и начальные миссии человека и дино и доп миссии;0xff- количество миссий;0x03- нужно проверять. }); WriteD(0); //PC_CAFE WriteD(0); //PC_CAFE WriteC(1); //1-0 WriteH(0); //Длина текста WriteD((player.getRank() == 53 || player.getRank() == 54) ? 1 : 0); //приходят пакеты 2686 и 2688 - ГМ WriteD(0); //Ледянец - 702001024 WriteC(1); // Должна быть починка WriteB(new byte[5]); // ХЗ что тут , еще не разобрал }
private void Awake() { instance = this; playerEquip = GameObject.FindWithTag("Player").GetComponent <PlayerEquip>(); }