Solo usuarios registrados pueden comentar y agradecer, Logueate o Registrate

Autor Topic: ARREGLO ESCUDO EN ARMAS DE 2 MANOS 5.2 (LADO GS)  (Visto 237 veces)

0 Miembros and 2 Guests are viewing this topic.

Offline Sr. Punchman Posteado: February 16, 2026, 05:13:31 PM

  • 0 puntos por ventas
  • *
  • Rank: Principiante
  • Posts: 6
  • Gracias recibida: 185
  • br
Fala Gurizada blz acabamos encontrando um erro onde o shield e outras armas entravam em armas que necessariamente seriam slots de 2 mãos uma falha simples e um fix tranquilo para vocês



Procure por ItemManager.cpp em gs


DivineHub

Gracias:


Offline zhangjianle865 #1 Posteado: Today at 12:05:51 AM

  • 0 puntos por ventas
  • *
  • Rank: Heroe
  • Posts: 174
  • Gracias recibida: 368
  • ca
Wouldn't it be better to do it this way, brother?

   //============================================================
   // 修复:右手为 弓/弩 时,左手只能装备 箭矢/弩箭/箭袋,不允许盾牌等
   //============================================================
   if (slot == 1 && lpObj->Inventory[0].IsItem() != 0)
   {
      int rightKind2 = lpObj->Inventory[0].Kind2;

      // 右手是弓:左手必须是箭矢或箭袋
      if (rightKind2 == ItemKind2::BOW)
      {
         if (lpItem->Kind2 != ItemKind2::ARROW && lpItem->Kind2 != ItemKind2::QUIVER)
         {
            gNotice.GCNoticeSend(lpObj->Index, 1, 0, 0, 0, 2, 0, "装备弓时左手只能装备箭矢或箭袋");
            return false;
         }
      }

      // 右手是弩:左手必须是弩箭或箭袋
      if (rightKind2 == ItemKind2::CROSSBOW)
      {
         if (lpItem->Kind2 != ItemKind2::BOLT && lpItem->Kind2 != ItemKind2::QUIVER)
         {
            gNotice.GCNoticeSend(lpObj->Index, 1, 0, 0, 0, 2, 0, "装备弩时左手只能装备弩箭或箭袋");
            return false;
         }
      }
   }


Offline Sr. Punchman #2 Posteado: Today at 11:09:03 AM

  • 0 puntos por ventas
  • *
  • Rank: Principiante
  • Posts: 6
  • Gracias recibida: 185
  • br
Wouldn't it be better to do it this way, brother?

   //============================================================
   // 修复:右手为 弓/弩 时,左手只能装备 箭矢/弩箭/箭袋,不允许盾牌等
   //============================================================
   if (slot == 1 && lpObj->Inventory[0].IsItem() != 0)
   {
      int rightKind2 = lpObj->Inventory[0].Kind2;

      // 右手是弓:左手必须是箭矢或箭袋
      if (rightKind2 == ItemKind2::BOW)
      {
         if (lpItem->Kind2 != ItemKind2::ARROW && lpItem->Kind2 != ItemKind2::QUIVER)
         {
            gNotice.GCNoticeSend(lpObj->Index, 1, 0, 0, 0, 2, 0, "装备弓时左手只能装备箭矢或箭袋");
            return false;
         }
      }

      // 右手是弩:左手必须是弩箭或箭袋
      if (rightKind2 == ItemKind2::CROSSBOW)
      {
         if (lpItem->Kind2 != ItemKind2::BOLT && lpItem->Kind2 != ItemKind2::QUIVER)
         {
            gNotice.GCNoticeSend(lpObj->Index, 1, 0, 0, 0, 2, 0, "装备弩时左手只能装备弩箭或箭袋");
            return false;
         }
      }
   }


creio que os 2 formatos fazem sentido

DivineHub

Solo usuarios registrados pueden comentar y agradecer, Logueate o Registrate


 

Related Topics

  Subject / Started by Replies Last post
1 Replies
3147 Views
Last post May 01, 2017, 03:34:35 PM
by Cacikus
4 Replies
2524 Views
Last post September 03, 2017, 01:01:38 PM
by EmmaDCG
4 Replies
2795 Views
Last post January 24, 2018, 10:07:55 AM
by WaterJet
1 Replies
5742 Views
Last post April 25, 2020, 07:11:47 PM
by elvisedi
0 Replies
714 Views
Last post October 31, 2019, 12:02:04 AM
by Broda