|
|
@ -108,12 +108,12 @@ void cbClientItemEquip( NLNET::CMessage& msgin, const std::string &serviceName,
|
|
|
|
{
|
|
|
|
{
|
|
|
|
H_AUTO(cbClientItemEquip);
|
|
|
|
H_AUTO(cbClientItemEquip);
|
|
|
|
|
|
|
|
|
|
|
|
uint16 equipedInventory, equipedSlot, bagSlot;
|
|
|
|
uint16 equippedInventory, equippedSlot, bagSlot;
|
|
|
|
CEntityId id;
|
|
|
|
CEntityId id;
|
|
|
|
|
|
|
|
|
|
|
|
msgin.serial( id );
|
|
|
|
msgin.serial( id );
|
|
|
|
msgin.serial( equipedInventory );
|
|
|
|
msgin.serial( equippedInventory );
|
|
|
|
msgin.serial( equipedSlot );
|
|
|
|
msgin.serial( equippedSlot );
|
|
|
|
msgin.serial( bagSlot );
|
|
|
|
msgin.serial( bagSlot );
|
|
|
|
|
|
|
|
|
|
|
|
CCharacter *c = (CCharacter * ) CEntityBaseManager::getEntityBasePtr( id );
|
|
|
|
CCharacter *c = (CCharacter * ) CEntityBaseManager::getEntityBasePtr( id );
|
|
|
@ -125,7 +125,7 @@ void cbClientItemEquip( NLNET::CMessage& msgin, const std::string &serviceName,
|
|
|
|
// if player is stunned or dead cancel action
|
|
|
|
// if player is stunned or dead cancel action
|
|
|
|
if (c->isDead() || c->isStunned())
|
|
|
|
if (c->isDead() || c->isStunned())
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
c->equipCharacter( INVENTORIES::TInventory(equipedInventory), equipedSlot, bagSlot, true );
|
|
|
|
c->equipCharacter( INVENTORIES::TInventory(equippedInventory), equippedSlot, bagSlot, true );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -134,12 +134,12 @@ void cbClientItemUnequip( NLNET::CMessage& msgin, const std::string &serviceName
|
|
|
|
{
|
|
|
|
{
|
|
|
|
H_AUTO(cbClientItemUnequip);
|
|
|
|
H_AUTO(cbClientItemUnequip);
|
|
|
|
|
|
|
|
|
|
|
|
uint16 equipedInventory, equipedSlot;
|
|
|
|
uint16 equippedInventory, equippedSlot;
|
|
|
|
CEntityId id;
|
|
|
|
CEntityId id;
|
|
|
|
|
|
|
|
|
|
|
|
msgin.serial( id );
|
|
|
|
msgin.serial( id );
|
|
|
|
msgin.serial( equipedInventory );
|
|
|
|
msgin.serial( equippedInventory );
|
|
|
|
msgin.serial( equipedSlot );
|
|
|
|
msgin.serial( equippedSlot );
|
|
|
|
|
|
|
|
|
|
|
|
CCharacter *c = (CCharacter * ) CEntityBaseManager::getEntityBasePtr( id );
|
|
|
|
CCharacter *c = (CCharacter * ) CEntityBaseManager::getEntityBasePtr( id );
|
|
|
|
if( c )
|
|
|
|
if( c )
|
|
|
@ -151,7 +151,7 @@ void cbClientItemUnequip( NLNET::CMessage& msgin, const std::string &serviceName
|
|
|
|
if (c->isDead() || c->isStunned())
|
|
|
|
if (c->isDead() || c->isStunned())
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
|
|
c->unequipCharacter( INVENTORIES::TInventory(equipedInventory), equipedSlot, true );
|
|
|
|
c->unequipCharacter( INVENTORIES::TInventory(equippedInventory), equippedSlot, true );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|