Natan Beckman
Well-Known Member
Anyone have solution for this problem?
OK Thanks!no use classic slot:
https://github.com/mattyx14/otxserver/commit/c68391414c69de5b72ecd06640904d80ffa4eb73
is my temporal fix i need time for to check it and solve this problem with classic slotsystem
if(index == SLOT_LEFT || index == SLOT_RIGHT)
{
if(ret == RET_NOERROR && item->getWeaponType()!= WEAPON_NONE)
self->setLastAttack(OTSYS_TIME());
Item* tmpItem = inventory[(slots_t)index];
if(ret == RET_BOTHHANDSNEEDTOBEFREE && g_game.internalAddItem(
NULL,self, tmpItem, INDEX_WHEREEVER)== RET_NOERROR)
{
self->sendRemoveInventoryItem((slots_t)index, tmpItem);
self->onRemoveInventoryItem((slots_t)index, tmpItem);
self->inventory[(slots_t)index]= NULL;
self->updateWeapon();
self->inventoryWeight -= tmpItem->getWeight();
self->sendStats();
}
}
------------------SOLUTION------------------
Remove this code in player.cpp:
by fireelementCode:if(index == SLOT_LEFT || index == SLOT_RIGHT) { if(ret == RET_NOERROR && item->getWeaponType()!= WEAPON_NONE) self->setLastAttack(OTSYS_TIME()); Item* tmpItem = inventory[(slots_t)index]; if(ret == RET_BOTHHANDSNEEDTOBEFREE && g_game.internalAddItem( NULL,self, tmpItem, INDEX_WHEREEVER)== RET_NOERROR) { self->sendRemoveInventoryItem((slots_t)index, tmpItem); self->onRemoveInventoryItem((slots_t)index, tmpItem); self->inventory[(slots_t)index]= NULL; self->updateWeapon(); self->inventoryWeight -= tmpItem->getWeight(); self->sendStats(); } }