Jump to content

Eclipse Shade

Inactive Member
  • Posts

    4
  • Joined

  • Last visited

  • Feedback

    0%

About Eclipse Shade

Recent Profile Visitors

2687 profile views

Eclipse Shade's Achievements

Enthusiast

Enthusiast (6/16)

  • Very Popular Rare
  • One Month Later
  • First Post
  • Week One Done
  • Conversation Starter

Recent Badges

232

Reputation

  1. this is wrong, you should also remove this ``` //< 2020.08.07.Owsap - Block item add metin sock. if (IS_SET(item2->GetAntiFlag(), ITEM_ANTIFLAG_APPLY)) { ChatPacket(CHAT_TYPE_INFO, LC_TEXT("This Spirit Stone cannot be attached to this type of item.")); return false; } //> ``` once you remove it or comment the code above or set different antiflag than ITEM_ANTIFLAG_APPLY NOTE: if you want put the same stone with the same id and wearflag on both shield, armor , head you need do this in different way try this if you want specific stone for each wearflag: if (item2->GetType() == ITEM_ARMOR) { if ((!IS_SET(item->GetWearFlag(), WEARABLE_BODY) && !IS_SET(item->GetWearFlag(), WEARABLE_SHIELD && !IS_SET(item->GetWearFlag(), WEARABLE_HEAD)) || (!IS_SET(item2->GetWearFlag(), WEARABLE_BODY) && !IS_SET(item2->GetWearFlag(), WEARABLE_SHIELD && !IS_SET(item2->GetWearFlag(), WEARABLE_HEAD))) { ChatPacket(CHAT_TYPE_INFO, LC_TEXT("이 메틴석은 장비에 부착할 수 없습니다.")); return false; } }
  2. Hello, you should post all changes you made as i remember this code you metioned are not even used in the source you need modifity here, you only can put stones into armor and weapons case ITEM_METIN: { LPITEM item2; if (!IsValidItemPosition(DestCell) || !(item2 = GetItem(DestCell))) return false; if (item2->IsExchanging() || item2->IsEquipped()) // @fixme114 return false; if (item2->GetType() == ITEM_PICK) return false; if (item2->GetType() == ITEM_ROD) return false; int i; for (i = 0; i < ITEM_SOCKET_MAX_NUM; ++i) { DWORD dwVnum; if ((dwVnum = item2->GetSocket(i)) <= 2) continue; TItemTable * p = ITEM_MANAGER::instance().GetTable(dwVnum); if (!p) continue; if (item->GetValue(5) == p->alValues[5]) { ChatPacket(CHAT_TYPE_INFO, LC_TEXT("같은 종류의 메틴석은 여러개 부착할 수 없습니다.")); return false; } } if (item2->GetType() == ITEM_ARMOR) { if (!IS_SET(item->GetWearFlag(), WEARABLE_BODY) || !IS_SET(item2->GetWearFlag(), WEARABLE_BODY)) { ChatPacket(CHAT_TYPE_INFO, LC_TEXT("이 메틴석은 장비에 부착할 수 없습니다.")); return false; } } else if (item2->GetType() == ITEM_WEAPON) { if (!IS_SET(item->GetWearFlag(), WEARABLE_WEAPON)) { ChatPacket(CHAT_TYPE_INFO, LC_TEXT("이 메틴석은 무기에 부착할 수 없습니다.")); return false; } } else { ChatPacket(CHAT_TYPE_INFO, LC_TEXT("부착할 수 있는 슬롯이 없습니다.")); return false; } for (i = 0; i < ITEM_SOCKET_MAX_NUM; ++i) if (item2->GetSocket(i) >= 1 && item2->GetSocket(i) <= 2 && item2->GetSocket(i) >= item->GetValue(2)) { #ifdef ENABLE_ADDSTONE_FAILURE if (number(1, 100) <= 30) #else if (1) #endif { ChatPacket(CHAT_TYPE_INFO, LC_TEXT("메틴석 부착에 성공하였습니다.")); item2->SetSocket(i, item->GetVnum()); } else { ChatPacket(CHAT_TYPE_INFO, LC_TEXT("메틴석 부착에 실패하였습니다.")); item2->SetSocket(i, ITEM_BROKEN_METIN_VNUM); } LogManager::instance().ItemLog(this, item2, "SOCKET", item->GetName()); ITEM_MANAGER::instance().RemoveItem(item, "REMOVE (METIN)"); break; } if (i == ITEM_SOCKET_MAX_NUM) ChatPacket(CHAT_TYPE_INFO, LC_TEXT("부착할 수 있는 슬롯이 없습니다.")); } break;
  3. common->lenght.h GOLD_MAX = 18446744073709551615 game->src->char.cpp case POINT_GOLD: { const int64_t nTotalMoney = static_cast<int64_t>(GetGold()) + static_cast<int64_t>(amount);//here have to be int64_t for long long if (GOLD_MAX <= nTotalMoney) { sys_err("[OVERFLOW_GOLD] OriGold %lld AddedGold %lld id %u Name %s ", GetGold(), amount, GetPlayerID(), GetName());.//change here %d to %lld for long long LogManager::instance().CharLog(this, GetGold() + amount, "OVERFLOW_GOLD", ""); return; }
  4. Welcome to the Metin2 Modern Base Source project! This initiative aims to revamp and modernize the existing Metin2 source code, making it easier to edit, maintain, and extend across various platforms, including Visual Studio (2008-2022) and FreeBSD (9.3-14x). Metin2 Modern Base Source: based on all branches (added missing sutff) Compiling on Windows Compiling on FreeBSD Why Modernize? While Metin2 has a rich history and a dedicated community, many existing source codes are over a decade old. By updating the codebase, we can: Improve code readability and maintainability. Enhance performance and security. Ensure compatibility with modern C++ standards (C++20). Provide a more user-friendly experience for developers. Key Improvements One of the goals of this project is to replace outdated functions like sprintf with safer and more modern alternatives. For example, we can use std::ostringstream or std::format (introduced in C++20) to handle string formatting in a more type-safe and efficient manner. Example: Modern String Formatting Instead of using sprintf, which can lead to buffer overflows, consider the following modern C++ approach using std::ostringstream: #include <sstream> #include <string> std::string formatString(int value) { std::ostringstream oss; oss << "Value: " << value; return oss.str(); } Or with C++20 std::format: #include <format> #include <string> std::string formatString(int value) { return std::format("Value: {}", value); } Contribute to the Project We invite developers of all skill levels to contribute to the Metin2 Modern Base Source project. Whether you're a seasoned programmer or just starting out, your contributions can make a difference. Here are some ways you can help: Code Improvements: Help us refactor and modernize the existing codebase. Documentation: Assist in writing clear documentation to make it easier for new developers to get started. Bug Fixes: Identify and fix bugs within the code. Feature Requests: Suggest new features or enhancements that could improve the project. Getting Started: Make Changes: Implement your improvements or fixes. Submit a Pull Request: Share your changes with the community for review. Github: [Hidden Content]
×
×
  • 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.