- Mesaj
- 442
- Çözümler
- 42
- Beğeni
- 221
- Puan
- 869
- Ticaret Puanı
- 0
Selamlar,
oyuna kadim efsun sistemi eklemesi yaptım ancak kadim efsun küresi sadece 5. efsunu değiştirmek yerine komple 5 efsunu birden değiştiriyor bunu nasıl engelleyebilirim?
kod şu şekilde; (71052 kadim efsun küresi kodu)
oyuna kadim efsun sistemi eklemesi yaptım ancak kadim efsun küresi sadece 5. efsunu değiştirmek yerine komple 5 efsunu birden değiştiriyor bunu nasıl engelleyebilirim?
kod şu şekilde; (71052 kadim efsun küresi kodu)
Python:
#ifdef WJ_ELDER_ATTRIBUTE_SYSTEM
case 71051 : // ÁøÀç°¡
{
LPITEM item2;
if (!IsValidItemPosition(DestCell) || !(item2 = GetInventoryItem(wDestCell)))
return false;
if (ITEM_COSTUME == item2->GetType()){ // @fixme15
ChatPacket(CHAT_TYPE_INFO, LC_TEXT("¼Ó¼ºÀ» º¯°æÇÒ ¼ö ¾ø´Â ¾ÆÀÌÅÛÀÔ´Ï´Ù."));
return false;
}
if (item2->IsExchanging() || item2->IsEquipped()) // @fixme14
return false;
if (item2->GetAttributeSetIndex() == -1){
ChatPacket(CHAT_TYPE_INFO, LC_TEXT("¼Ó¼ºÀ» º¯°æÇÒ ¼ö ¾ø´Â ¾ÆÀÌÅÛÀÔ´Ï´Ù."));
return false;
}
if (item2->AddRareAttribute() == true){
ChatPacket(CHAT_TYPE_INFO, LC_TEXT("¼º°øÀûÀ¸·Î ¼Ó¼ºÀÌ Ãß°¡ µÇ¾ú½À´Ï´Ù"));
int iAddedIdx = item2->GetRareAttrCount() + 4;
char buf[21];
snprintf(buf, sizeof(buf), "%u", item2->GetID());
LogManager::instance().ItemLog(GetPlayerID(), item2->GetAttributeType(iAddedIdx), item2->GetAttributeValue(iAddedIdx), item->GetID(), "ADD_RARE_ATTR", buf, GetDesc()->GetHostName(), item->GetOriginalVnum());
item->SetCount(item->GetCount() - 1);
}
else
ChatPacket(CHAT_TYPE_INFO, LC_TEXT("´õ ÀÌ»ó ÀÌ ¾ÆÀÌÅÛÀ¸·Î ¼Ó¼ºÀ» Ãß°¡ÇÒ ¼ö ¾ø½À´Ï´Ù"));
}
break;
#else
case 71051 : // ÁøÀç°¡
{
// À¯·´, ½Ì°¡Æú, º£Æ®³² ÁøÀç°¡ »ç¿ë±İÁö
LPITEM item2;
if (!IsValidItemPosition(DestCell) || !(item2 = GetInventoryItem(wDestCell)))
return false;
if (ITEM_COSTUME == item2->GetType()) // @fixme124
{
ChatPacket(CHAT_TYPE_INFO, LC_TEXT("¼Ó¼ºÀ» º¯°æÇÒ ¼ö ¾ø´Â ¾ÆÀÌÅÛÀÔ´Ï´Ù."));
return false;
}
if (item2->IsExchanging() || item2->IsEquipped()) // @fixme114
return false;
if (item2->GetAttributeSetIndex() == -1)
{
ChatPacket(CHAT_TYPE_INFO, LC_TEXT("¼Ó¼ºÀ» º¯°æÇÒ ¼ö ¾ø´Â ¾ÆÀÌÅÛÀÔ´Ï´Ù."));
return false;
}
if (item2->AddRareAttribute() == true)
{
ChatPacket(CHAT_TYPE_INFO, LC_TEXT("¼º°øÀûÀ¸·Î ¼Ó¼ºÀÌ Ãß°¡ µÇ¾ú½À´Ï´Ù"));
int iAddedIdx = item2->GetRareAttrCount() + 4;
char buf[21];
snprintf(buf, sizeof(buf), "%u", item2->GetID());
LogManager::instance().ItemLog(
GetPlayerID(),
item2->GetAttributeType(iAddedIdx),
item2->GetAttributeValue(iAddedIdx),
item->GetID(),
"ADD_RARE_ATTR",
buf,
GetDesc()->GetHostName(),
item->GetOriginalVnum());
item->SetCount(item->GetCount() - 1);
}
else
{
ChatPacket(CHAT_TYPE_INFO, LC_TEXT("´õ ÀÌ»ó ÀÌ ¾ÆÀÌÅÛÀ¸·Î ¼Ó¼ºÀ» Ãß°¡ÇÒ ¼ö ¾ø½À´Ï´Ù"));
}
}
break;
#endif
#ifdef WJ_ELDER_ATTRIBUTE_SYSTEM
case 71052:
{
LPITEM item2;
if (!IsValidItemPosition(DestCell) || !(item2 = GetItem(DestCell)))
return false;
if (ITEM_COSTUME == item2->GetType()){ // @fixme15
ChatPacket(CHAT_TYPE_INFO, LC_TEXT("¼Ó¼ºÀ» º¯°æÇÒ ¼ö ¾ø´Â ¾ÆÀÌÅÛÀÔ´Ï´Ù."));
return false;
}
if (item2->IsExchanging() || item2->IsEquipped()) // @fixme14
return false;
if (item2->GetAttributeSetIndex() == -1){
ChatPacket(CHAT_TYPE_INFO, LC_TEXT("¼Ó¼ºÀ» º¯°æÇÒ ¼ö ¾ø´Â ¾ÆÀÌÅÛÀÔ´Ï´Ù."));
return false;
}
if (item2->GetAttributeCount() == 5){
item2->RemoveAttributeAt(4);
item2->AddAttribute();
item->SetCount(item->GetCount()-1);
ChatPacket(CHAT_TYPE_INFO, LC_TEXT("NEW_ATTRIBUTE_SUCCESS_MARBLE"));
}
else if (item2->GetAttributeCount() == 4){
item2->AddAttribute();
item->SetCount(item->GetCount()-1);
ChatPacket(CHAT_TYPE_INFO, LC_TEXT("NEW_ATTRIBUTE_SUCCESS_MARBLE"));
}
else
ChatPacket(CHAT_TYPE_INFO, LC_TEXT("NEW_ATTRIBUTE_MARBLE_ENOUGH_ATTR_COUNT"));
}
break;
#else
case 71052 : // ÁøÀç°æ
{
LPITEM item2;
if (!IsValidItemPosition(DestCell) || !(item2 = GetItem(DestCell)))
return false;
if (ITEM_COSTUME == item2->GetType()){ // @fixme15
ChatPacket(CHAT_TYPE_INFO, LC_TEXT("¼Ó¼ºÀ» º¯°æÇÒ ¼ö ¾ø´Â ¾ÆÀÌÅÛÀÔ´Ï´Ù."));
return false;
}
if (item2->IsExchanging() || item2->IsEquipped()) // @fixme14
return false;
if (item2->GetAttributeSetIndex() == -1){
ChatPacket(CHAT_TYPE_INFO, LC_TEXT("¼Ó¼ºÀ» º¯°æÇÒ ¼ö ¾ø´Â ¾ÆÀÌÅÛÀÔ´Ï´Ù."));
return false;
}
if (item2->ChangeRareAttribute() == true){
char buf[21];
snprintf(buf, sizeof(buf), "%u", item2->GetID());
LogManager::instance().ItemLog(this, item, "CHANGE_RARE_ATTR", buf);
item->SetCount(item->GetCount() - 1);
}
else
ChatPacket(CHAT_TYPE_INFO, LC_TEXT("º¯°æ ½Ãų ¼Ó¼ºÀÌ ¾ø½À´Ï´Ù"));
}
break;
#endif