Jump to content

xCoRPeR

Member
  • Posts

    61
  • Joined

  • Last visited

  • Feedback

    0%

About xCoRPeR

Informations

  • Gender
    Male

Recent Profile Visitors

1349 profile views

xCoRPeR's Achievements

Enthusiast

Enthusiast (6/16)

  • First Post
  • Collaborator
  • Conversation Starter
  • Week One Done
  • One Month Later

Recent Badges

20

Reputation

  1. I had this problem after uploading the new character selection field of official Metin2 Does anyone knows?
  2. Hello, first of all sorry for my bad english. Before today i can debug my game.core without any problem, but today i got an error but i didn't change anything in machine, lib or makefile. What could be the problem ? thanks for any help. A photo about my problem : [Hidden Content]
  3. When i add the code to CGuildManager::CreateGuild which fixes sql injection players can create 2 guilds with the same name, are there any fix about it? Code:
  4. When i add the code to CGuildManager::CreateGuild which fixes sql injection players can create 2 guilds with the same name, are there any fix about it?
  5. Hi , CH-Down problem quest + gdb results and I hope you can tell me my bad english
  6. [Hidden Content] Help me item.cpp / 207 void CItem::UpdatePacket() { if (!m_pOwner || !m_pOwner->GetDesc()) return; TPacketGCItemUpdate pack; pack.header = HEADER_GC_ITEM_UPDATE; pack.Cell = TItemPos(GetWindow(), m_wCell); pack.count = m_dwCount; for (int i = 0; i < ITEM_SOCKET_MAX_NUM; ++i) pack.alSockets[i] = m_alSockets[i]; thecore_memcpy(pack.aAttr, GetAttributes(), sizeof(pack.aAttr)); sys_log(2, "UpdatePacket %s -> %s", GetName(), m_pOwner->GetName()); m_pOwner->GetDesc()->Packet(&pack, sizeof(pack)); } questlua_item.cpp / 135 int item_set_socket(lua_State* L) { CQuestManager& q = CQuestManager::instance(); if (q.GetCurrentItem() && lua_isnumber(L,1) && lua_isnumber(L,2)) { int idx = (int) lua_tonumber(L, 1); int value = (int) lua_tonumber(L, 2); if (idx >=0 && idx < ITEM_SOCKET_MAX_NUM) q.GetCurrentItem()->SetSocket(idx, value); } return 0; } item.cpp / 1011 void CItem::SetSocket(int i, long v, bool bLog) { assert(i < ITEM_SOCKET_MAX_NUM); m_alSockets[i] = v; UpdatePacket(); Save(); if (bLog) LogManager::instance().ItemLog(i, v, 0, GetID(), "SET_SOCKET", "", "", GetOriginalVnum()); }
  7. ​ // special code (Ken) // if (item->GetType() == ITEM_WEAPON || item->GetType() == ITEM_ARMOR || item->GetType() == ITEM_BELT) { char szEventFlag[30]; snprintf(szEventFlag, sizeof(szEventFlag), "%d.Engel", item->GetID()); if (*szEventFlag) { if (quest::CQuestManager::instance().GetEventFlag(szEventFlag)) { ch->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("item_engel")); return; } } } // special code (Ken) //
  8. ​ ​ GDB Results: Shop_Manager.CPP/Sell: Functions void CShopManager::Sell(LPCHARACTER ch, BYTE bCell, BYTE bCount) { if (!ch->GetShop()) return; if (!ch->GetShopOwner()) return; if (!ch->CanHandleItem()) return; if (ch->GetShop()->IsPCShop()) return; if (DISTANCE_APPROX(ch->GetX()-ch->GetShopOwner()->GetX(), ch->GetY()-ch->GetShopOwner()->GetY())>2000) { ch->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("상점과의 거리가 너무 멀어 물건을 팔 수 없습니다.")); return; } LPITEM item = ch->GetInventoryItem(bCell); // special code (Ken) // if (item->GetType() == ITEM_WEAPON || item->GetType() == ITEM_ARMOR || item->GetType() == ITEM_BELT) { char szEventFlag[30]; snprintf(szEventFlag, sizeof(szEventFlag), "%d.Engel", item->GetID()); if (*szEventFlag) { if (quest::CQuestManager::instance().GetEventFlag(szEventFlag)) { ch->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("item_engel")); return; } } } // special code (Ken) // if (!item) return; if (item->IsEquipped() == true) { ch->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("착용 중인 아이템은 판매할 수 없습니다.")); return; } if (true == item->isLocked()) { return; } if (IS_SET(item->GetAntiFlag(), ITEM_ANTIFLAG_SELL)) return; DWORD dwPrice; if (bCount == 0 || bCount > item->GetCount()) bCount = item->GetCount(); dwPrice = item->GetShopBuyPrice(); if (IS_SET(item->GetFlag(), ITEM_FLAG_COUNT_PER_1GOLD)) { if (dwPrice == 0) dwPrice = bCount; else dwPrice = bCount / dwPrice; } else dwPrice *= bCount; dwPrice /= 5; //세금 계산 DWORD dwTax = 0; int iVal = 0; if (LC_IsYMIR() || LC_IsKorea()) { dwTax = dwPrice * iVal / 100; dwPrice -= dwTax; } else { dwTax = dwPrice * iVal/100; dwPrice -= dwTax; } if (test_server) sys_log(0, "Sell Item price id %d %s itemid %d", ch->GetPlayerID(), ch->GetName(), item->GetID()); const int64_t nTotalMoney = static_cast<int64_t>(ch->GetGold()) + static_cast<int64_t>(dwPrice); if (GOLD_MAX <= nTotalMoney) { sys_err("[OVERFLOW_GOLD] id %u name %s gold %u", ch->GetPlayerID(), ch->GetName(), ch->GetGold()); ch->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("20억냥이 초과하여 물품을 팔수 없습니다.")); return; } // 20050802.myevan.상점 판매 로그에 아이템 ID 추가 sys_log(0, "SHOP: SELL: %s item name: %s(x%d):%u price: %u", ch->GetName(), item->GetName(), bCount, item->GetID(), dwPrice); if (iVal > 0) ch->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("판매금액의 %d %% 가 세금으로 나가게됩니다"), iVal); DBManager::instance().SendMoneyLog(MONEY_LOG_SHOP, item->GetVnum(), dwPrice); if (bCount == item->GetCount()) { // 한국에는 아이템을 버리고 복구해달라는 진상유저들이 많아서 // 상점 판매시 속성로그를 남긴다. if (LC_IsYMIR()) item->AttrLog(); ITEM_MANAGER::instance().RemoveItem(item, "SELL"); } else item->SetCount(item->GetCount() - bCount); //군주 시스템 : 세금 징수 CMonarch::instance().SendtoDBAddMoney(dwTax, ch->GetEmpire(), ch); ch->PointChange(POINT_GOLD, dwPrice, false); } İtem.H/68; İnput_Main.CPP/1094 : İnput_Main.CPP/3171: İnput.CPP/102:
×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.