Sistema que disponibiliza o uso de duas armas.

Esse sistema serve para que você possa usar duas weapons ao mesmo tempo uma em cada slot correspondente as mãos do personagem. Com ele você pode utilizar duas sword's, dois axe's, dois club's ou etc... Esse sistema simplismente soma o attack do item que estiver no slot esquerdo com o attack do item que estiver no slot esquerdo. Aew vai os code para inserir nas sources!

Vá em player.ccp e procure por:

Código:
ret = RET_NOERROR;
Após, localize weapons.h e procure por:

Código:
const Weapon* getWeapon(const Item* item) const;
Embaixo você coloca:

Código:
 static int32_t getAttackLeft;
            static int32_t getAttackRigth;
            static int32_t getLeftExtraAttack;
            static int32_t getRigthExtraAttack;
Depois, localize weapons.ccp e procure por:

Código:
int32_t WeaponMelee::getWeaponDamage(const Player* player, const Creature* target, const Item* item, bool maxDamage /*= false*/) const
{
        int32_t attackSkill = player->getWeaponSkill(item);
        int32_t attackValue = std::max((int32_t)0, (int32_t(item->getAttack() + item->getExtraAttack()) - elementDamage));
        float attackFactor = player->getAttackFactor();
Substitua por:

Código:
int32_t WeaponMelee::getWeaponDamage(const Player* player, const Creature* target, const Item* item, bool maxDamage /*= false*/) const
{
                
    int32_t getAttackLeft;
    int32_t getAttackRigth;
    int32_t getLeftExtraAttack;
        int32_t getRigthExtraAttack;
    
    getAttackLeft = 0;
    getAttackRigth = 0;
    getLeftExtraAttack = 0;
        getRigthExtraAttack = 0;
    
    if (getAttackLeft == 0)
    { 
        if (player->getInventoryItem(SLOT_LEFT) != NULL)
        {
        getAttackLeft = player->getInventoryItem(SLOT_LEFT)->getAttack();
        getLeftExtraAttack = player->getInventoryItem(SLOT_LEFT)->getExtraAttack();
        }
        else if (player->getInventoryItem(SLOT_LEFT) == NULL)
        {
        getAttackLeft = 0;
        getLeftExtraAttack = 0;  
        }
    }  
    
    if (getAttackRigth == 0)
    { 
        if (player->getInventoryItem(SLOT_RIGHT) != NULL)
        {
        getAttackRigth = player->getInventoryItem(SLOT_RIGHT)->getAttack();
        getRigthExtraAttack = player->getInventoryItem(SLOT_RIGHT)->getExtraAttack();
        }
        else if (player->getInventoryItem(SLOT_RIGHT) == NULL)
        {
        getAttackRigth = 0;
        getRigthExtraAttack = 0;  
        }
    }                                                 
    
    
    int32_t attackValue = std::max((int32_t)0, (int32_t)((getAttackLeft + getLeftExtraAttack + getAttackRigth + getRigthExtraAttack) - elementDamage));                                               
             
    int32_t attackSkill = player->getWeaponSkill(item);
    float attackFactor = player->getAttackFactor();
Compile e pronto!

Video Mostrando o sistema:



Creditos:
Jhon992

Fonte: xtibia.