Jump to content

Costume Weapon 100% Funcional Com Todos Os Fix


WLN
 Share

Recommended Posts

Boas pessoal, hoje estou trazendo um sistema ja encontrado em varios foruns, porém nunca encontrei um 100% funcional, alguns ficavam dando "saltos", outros o cavalo morria ao relogar hoje eu trago o sistema com essas correções, espero que gostem.

Creditos a mim por adicionar o fix no char.cpp que foi feito pelo tierri, e por fazer o fix do cavalo morrendo, o tutorial eu não me lembro de onde peguei então nao posso por creditos

Costume Weapon.7z

  • Like 3
  • Thanks 3
Link to comment
Share on other sites

  • 2 weeks later...

Fix equipar/desequipar flechas:

 

Abrir o ficheiro char.cpp

Procurar por:

bool CHARACTER::CanEquipNow(const LPITEM item, const TItemPos& srcCell, const TItemPos& destCell)

 

Substituir por:

bool CHARACTER::CanEquipNow(const LPITEM item, const TItemPos& srcCell, const TItemPos& destCell) /*const*/
{
   const TItemTable* itemTable = item->GetProto();
   //BYTE itemType = item->GetType();
   //BYTE itemSubType = item->GetSubType();
#ifdef COSTUME_WEAPON
   if (item->GetType() == ITEM_COSTUME && item->GetSubType() >= COSTUME_WEAPON_SWORD)
   {
       LPITEM weapon = GetWear(WEAR_WEAPON);
       if (!weapon)
       {
           ChatPacket(CHAT_TYPE_INFO, "Voce deve equipar a arma padrao primeiro.");
           return false;
       }
       if (weapon->GetSubType() + COSTUME_WEAPON_SWORD != item->GetSubType())
       {
           ChatPacket(CHAT_TYPE_INFO, "Voce deve equipar a arma de costume com o mesmo tipo de arma padrao.");
           return false;
       }
   }
   if (item->GetType() == ITEM_WEAPON && item->GetSubType() != WEAPON_ARROW)
   {
       LPITEM weapon = GetWear(WEAR_COSTUME_WEAPON);
       if (weapon)
       {
           if (weapon->GetSubType() - COSTUME_WEAPON_SWORD != item->GetSubType())
           {
               ChatPacket(CHAT_TYPE_INFO, "Voce deve equipar a arma padrao com o mesmo tipo da arma de costume.");
               return false;
           }
       }
   }
#endif

 

 

 

No mesmo ficheiro, procurar por:

 

bool CHARACTER::CanUnequipNow(const LPITEM item, const TItemPos& srcCell, const TItemPos& destCell)

 

Substituir por:

bool CHARACTER::CanUnequipNow(const LPITEM item, const TItemPos& srcCell, const TItemPos& destCell) /*const*/
{
   if (ITEM_BELT == item->GetType())
       VERIFY_MSG(CBeltInventoryHelper::IsExistItemInBeltInventory(this), "벨트 인벤토리에 아이템이 존재하면 해제할 수 없습니다.");

   if (IS_SET(item->GetFlag(), ITEM_FLAG_IRREMOVABLE))
       return false;
#ifdef COSTUME_WEAPON
   if (GetWear(WEAR_COSTUME_WEAPON) && item->GetType() == ITEM_WEAPON && item->GetSubType() != WEAPON_ARROW)
   {
       ChatPacket(CHAT_TYPE_INFO, "Voce deve desequipar a arma de costume primeiro.");
       return false;
   }
#endif

 

 

Créditos: wery

  • Like 2
Link to comment
Share on other sites

  • 1 year later...

Boas, 

estou neste momento a testar o sistema, com binário e source já compilados. Quando carrego na skin ela não vai para o slot pretendido e não vai para a mão. Já fiz alterações do item proto para value=0 (espada) já testei com subtype 9 e 2, mas situação persiste. Alguém tem uma ideia?.

https://i.gyazo.com/cb2282422b4dc45440c358876db4f66b.mp4

 (sem syserr algum tanto no client como nos chs/db)

  • Sad 1
Link to comment
Share on other sites

  • 2 years later...
  • 4 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...