Merhaba arkadaşlar yine ben son bir bugum kaldı
Serverimde slot kestikten sonra düşen item ve dropları ilk düştüğüde alabiliyorum fakat 5 saniye beklersem 'z' ve ' " ' tuşlarıyla alamıyorum üzerine tıklayıp almam gerekiyor
sizce problemin kaynağı nedir ben k envanterle ilgili bir bug olduğunu düşünüyorum
ben problemin burdan kaynaklandığını düşünüyorum destek olan yardım eden herkese şimdiden teşekkürler
Serverimde slot kestikten sonra düşen item ve dropları ilk düştüğüde alabiliyorum fakat 5 saniye beklersem 'z' ve ' " ' tuşlarıyla alamıyorum üzerine tıklayıp almam gerekiyor
sizce problemin kaynağı nedir ben k envanterle ilgili bir bug olduğunu düşünüyorum
char_item.cpp:
bool CHARACTER::PickupItem(DWORD dwVID)
{
LPITEM item = ITEM_MANAGER::instance().FindByVID(dwVID);
if (IsObserverMode())
return false;
if (!item || !item->GetSectree())
return false;
if (item->DistanceValid(this))
{
if (item->IsOwnership(this))
{
// 만약 주으려 하는 아이템이 엘크라면
if (item->GetType() == ITEM_ELK)
{
GiveGold(item->GetCount());
item->RemoveFromGround();
M2_DESTROY_ITEM(item);
Save();
}
// 평범한 아이템이라면
else
{
if (item->IsStackable() && !IS_SET(item->GetAntiFlag(), ITEM_ANTIFLAG_STACK))
{
BYTE bCount = item->GetCount();
//k env
#ifdef ENABLE_SPLIT_INVENTORY_SYSTEM
for (int i = 0; i < INVENTORY_AND_EQUIP_SLOT_MAX; ++i)
#else
for (int i = 0; i < INVENTORY_MAX_NUM; ++i)
#endif
//k env sonu
{
LPITEM item2 = GetInventoryItem(i);
if (!item2)
continue;
if (item2->GetVnum() == item->GetVnum())
{
int j;
for (j = 0; j < ITEM_SOCKET_MAX_NUM; ++j)
if (item2->GetSocket(j) != item->GetSocket(j))
break;
if (j != ITEM_SOCKET_MAX_NUM)
continue;
BYTE bCount2 = MIN(g_bItemCountLimit - item2->GetCount(), bCount);
bCount -= bCount2;
item2->SetCount(item2->GetCount() + bCount2);
if (bCount == 0)
{
ChatPacket(CHAT_TYPE_INFO, LC_TEXT("아이템 획득: %s"), item2->GetName());
M2_DESTROY_ITEM(item);
if (item2->GetType() == ITEM_QUEST)
quest::CQuestManager::instance().PickupItem (GetPlayerID(), item2);
return true;
}
}
}
item->SetCount(bCount);
}
int iEmptyCell;
if (item->IsDragonSoul())
{
if ((iEmptyCell = GetEmptyDragonSoulInventory(item)) == -1)
{
sys_log(0, "No empty ds inventory pid %u size %ud itemid %u", GetPlayerID(), item->GetSize(), item->GetID());
ChatPacket(CHAT_TYPE_INFO, LC_TEXT("소지하고 있는 아이템이 너무 많습니다."));
return false;
}
}
//k env
#ifdef ENABLE_SPLIT_INVENTORY_SYSTEM
else if (item->IsSkillBook())
{
if ((iEmptyCell = GetEmptySkillBookInventory(item->GetSize())) == -1)
{
sys_log(0, "No empty ds inventory pid %u size %ud itemid %u", GetPlayerID(), item->GetSize(), item->GetID());
ChatPacket(CHAT_TYPE_INFO, LC_TEXT("¼OAoCI°i AO´A ¾ÆAIAUAI ³E¹≪ ¸¹½A´I´U."));
return false;
}
}
else if (item->IsUpgradeItem())
{
if ((iEmptyCell = GetEmptyUpgradeItemsInventory(item->GetSize())) == -1)
{
sys_log(0, "No empty ds inventory pid %u size %ud itemid %u", GetPlayerID(), item->GetSize(), item->GetID());
ChatPacket(CHAT_TYPE_INFO, LC_TEXT("¼OAoCI°i AO´A ¾ÆAIAUAI ³E¹≪ ¸¹½A´I´U."));
return false;
}
}
else if (item->IsStone())
{
if ((iEmptyCell = GetEmptyStoneInventory(item->GetSize())) == -1)
{
sys_log(0, "No empty ds inventory pid %u size %ud itemid %u", GetPlayerID(), item->GetSize(), item->GetID());
ChatPacket(CHAT_TYPE_INFO, LC_TEXT("¼OAoCI°i AO´A ¾ÆAIAUAI ³E¹≪ ¸¹½A´I´U."));
return false;
}
}
else if (item->IsBox())
{
if ((iEmptyCell = GetEmptyBoxInventory(item->GetSize())) == -1)
{
sys_log(0, "No empty ds inventory pid %u size %ud itemid %u", GetPlayerID(), item->GetSize(), item->GetID());
ChatPacket(CHAT_TYPE_INFO, LC_TEXT("¼OAoCI°i AO´A ¾ÆAIAUAI ³E¹≪ ¸¹½A´I´U."));
return false;
}
}
else if (item->IsEfsun())
{
if ((iEmptyCell = GetEmptyEfsunInventory(item->GetSize())) == -1)
{
sys_log(0, "No empty ds inventory pid %u size %ud itemid %u", GetPlayerID(), item->GetSize(), item->GetID());
ChatPacket(CHAT_TYPE_INFO, LC_TEXT("¼OAoCI°i AO´A ¾ÆAIAUAI ³E¹≪ ¸¹½A´I´U."));
return false;
}
}
else if (item->IsCicek())
{
if ((iEmptyCell = GetEmptyCicekInventory(item->GetSize())) == -1)
{
sys_log(0, "No empty ds inventory pid %u size %ud itemid %u", GetPlayerID(), item->GetSize(), item->GetID());
ChatPacket(CHAT_TYPE_INFO, LC_TEXT("¼OAoCI°i AO´A ¾ÆAIAUAI ³E¹≪ ¸¹½A´I´U."));
return false;
}
}
#endif
//k env sonu
else
{
if ((iEmptyCell = GetEmptyInventory(item->GetSize())) == -1)
{
sys_log(0, "No empty inventory pid %u size %ud itemid %u", GetPlayerID(), item->GetSize(), item->GetID());
ChatPacket(CHAT_TYPE_INFO, LC_TEXT("소지하고 있는 아이템이 너무 많습니다."));
return false;
}
}
item->RemoveFromGround();
if (item->IsDragonSoul())
item->AddToCharacter(this, TItemPos(DRAGON_SOUL_INVENTORY, iEmptyCell));
//k env
#ifdef ENABLE_SPLIT_INVENTORY_SYSTEM
else if (item->IsSkillBook())
item->AddToCharacter(this, TItemPos(INVENTORY, iEmptyCell));
else if (item->IsUpgradeItem())
item->AddToCharacter(this, TItemPos(INVENTORY, iEmptyCell));
else if (item->IsStone())
item->AddToCharacter(this, TItemPos(INVENTORY, iEmptyCell));
else if (item->IsBox())
item->AddToCharacter(this, TItemPos(INVENTORY, iEmptyCell));
else if (item->IsEfsun())
item->AddToCharacter(this, TItemPos(INVENTORY, iEmptyCell));
else if (item->IsCicek())
item->AddToCharacter(this, TItemPos(INVENTORY, iEmptyCell));
#endif
//k env sonu
else
item->AddToCharacter(this, TItemPos(INVENTORY, iEmptyCell));
char szHint[32+1];
snprintf(szHint, sizeof(szHint), "%s %u %u", item->GetName(), item->GetCount(), item->GetOriginalVnum());
LogManager::instance().ItemLog(this, item, "GET", szHint);
ChatPacket(CHAT_TYPE_INFO, LC_TEXT("아이템 획득: %s"), item->GetName());
if (item->GetType() == ITEM_QUEST)
quest::CQuestManager::instance().PickupItem (GetPlayerID(), item);
}
//Motion(MOTION_PICKUP);
return true;
}
else if (!IS_SET(item->GetAntiFlag(), ITEM_ANTIFLAG_GIVE | ITEM_ANTIFLAG_DROP) && GetParty())
{
// 다른 파티원 소유권 아이템을 주으려고 한다면
NPartyPickupDistribute::FFindOwnership funcFindOwnership(item);
GetParty()->ForEachOnlineMember(funcFindOwnership);
LPCHARACTER owner = funcFindOwnership.owner;
int iEmptyCell;
if (item->IsDragonSoul())
{
if (!(owner && (iEmptyCell = owner->GetEmptyDragonSoulInventory(item)) != -1))
{
owner = this;
if ((iEmptyCell = GetEmptyDragonSoulInventory(item)) == -1)
{
owner->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("소지하고 있는 아이템이 너무 많습니다."));
return false;
}
}
}
//k env
#ifdef ENABLE_SPLIT_INVENTORY_SYSTEM
else if (item->IsSkillBook())
{
if (!(owner && (iEmptyCell = owner->GetEmptySkillBookInventory(item->GetSize())) != -1))
{
owner = this;
if ((iEmptyCell = GetEmptySkillBookInventory(item->GetSize())) == -1)
{
owner->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("¼OAoCI°i AO´A ¾ÆAIAUAI ³E¹≪ ¸¹½A´I´U."));
return false;
}
}
}
else if (item->IsUpgradeItem())
{
if (!(owner && (iEmptyCell = owner->GetEmptyUpgradeItemsInventory(item->GetSize())) != -1))
{
owner = this;
if ((iEmptyCell = GetEmptyUpgradeItemsInventory(item->GetSize())) == -1)
{
owner->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("¼OAoCI°i AO´A ¾ÆAIAUAI ³E¹≪ ¸¹½A´I´U."));
return false;
}
}
}
else if (item->IsStone())
{
if (!(owner && (iEmptyCell = owner->GetEmptyStoneInventory(item->GetSize())) != -1))
{
owner = this;
if ((iEmptyCell = GetEmptyStoneInventory(item->GetSize())) == -1)
{
owner->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("¼OAoCI°i AO´A ¾ÆAIAUAI ³E¹≪ ¸¹½A´I´U."));
return false;
}
}
}
else if (item->IsBox())
{
if (!(owner && (iEmptyCell = owner->GetEmptyBoxInventory(item->GetSize())) != -1))
{
owner = this;
if ((iEmptyCell = GetEmptyBoxInventory(item->GetSize())) == -1)
{
owner->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("¼OAoCI°i AO´A ¾ÆAIAUAI ³E¹≪ ¸¹½A´I´U."));
return false;
}
}
}
else if (item->IsEfsun())
{
if (!(owner && (iEmptyCell = owner->GetEmptyEfsunInventory(item->GetSize())) != -1))
{
owner = this;
if ((iEmptyCell = GetEmptyEfsunInventory(item->GetSize())) == -1)
{
owner->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("¼OAoCI°i AO´A ¾ÆAIAUAI ³E¹≪ ¸¹½A´I´U."));
return false;
}
}
}
else if (item->IsCicek())
{
if (!(owner && (iEmptyCell = owner->GetEmptyCicekInventory(item->GetSize())) != -1))
{
owner = this;
if ((iEmptyCell = GetEmptyCicekInventory(item->GetSize())) == -1)
{
owner->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("¼OAoCI°i AO´A ¾ÆAIAUAI ³E¹≪ ¸¹½A´I´U."));
return false;
}
}
}
#endif
//k env sonu
else
{
if (!(owner && (iEmptyCell = owner->GetEmptyInventory(item->GetSize())) != -1))
{
owner = this;
if ((iEmptyCell = GetEmptyInventory(item->GetSize())) == -1)
{
owner->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("소지하고 있는 아이템이 너무 많습니다."));
return false;
}
}
}
item->RemoveFromGround();
if (item->IsDragonSoul())
item->AddToCharacter(owner, TItemPos(DRAGON_SOUL_INVENTORY, iEmptyCell));
//k env
#ifdef ENABLE_SPLIT_INVENTORY_SYSTEM
else if (item->IsSkillBook())
item->AddToCharacter(owner, TItemPos(INVENTORY, iEmptyCell));
else if (item->IsUpgradeItem())
item->AddToCharacter(owner, TItemPos(INVENTORY, iEmptyCell));
else if (item->IsStone())
item->AddToCharacter(owner, TItemPos(INVENTORY, iEmptyCell));
else if (item->IsBox())
item->AddToCharacter(owner, TItemPos(INVENTORY, iEmptyCell));
else if (item->IsEfsun())
item->AddToCharacter(owner, TItemPos(INVENTORY, iEmptyCell));
else if (item->IsCicek())
item->AddToCharacter(owner, TItemPos(INVENTORY, iEmptyCell));
#endif
//k env sonu
else
item->AddToCharacter(owner, TItemPos(INVENTORY, iEmptyCell));
char szHint[32+1];
snprintf(szHint, sizeof(szHint), "%s %u %u", item->GetName(), item->GetCount(), item->GetOriginalVnum());
LogManager::instance().ItemLog(owner, item, "GET", szHint);
if (owner == this)
ChatPacket(CHAT_TYPE_INFO, LC_TEXT("아이템 획득: %s"), item->GetName());
else
{
owner->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("아이템 획득: %s 님으로부터 %s"), GetName(), item->GetName());
ChatPacket(CHAT_TYPE_INFO, LC_TEXT("아이템 전달: %s 님에게 %s"), owner->GetName(), item->GetName());
}
if (item->GetType() == ITEM_QUEST)
quest::CQuestManager::instance().PickupItem (owner->GetPlayerID(), item);
return true;
}
}
return false;
}
ben problemin burdan kaynaklandığını düşünüyorum destek olan yardım eden herkese şimdiden teşekkürler