- Katılım
- 6 Mayıs 2022
- Konular
- 48,280
- Mesajlar
- 48,590
- Tepkime puanı
- 75
- M2 Yaşı
- 3 yıl 11 ay 10 gün
- Trophy Puan
- 48
- M2 Yang
- 488,769
🎯 Party Üyeleri İçin Yerden Item Toplama (Client Fix)
Bu küçük ama işlevsel client düzenlemesi sayesinde party (grup) üyelerine ait itemleri yerden toplama problemi çözülmüş olur.
Kod:
PythonItem.cpp // yok ise ekle #include "PythonPlayer.h" CPythonItem::GetCloseItemVector içinde TGroundItemInstanceMap::iterator i; //altına ekle CPythonPlayer& rkPlayer = CPythonPlayer::Instance(); if (dwDistance < dwCloseItemDistance && (pInstance->stOwnership == "" || pInstance->stOwnership == myName)) //değiştir if (dwDistance < dwCloseItemDistance && (pInstance->stOwnership == "" || pInstance->stOwnership == myName || rkPlayer.IsPartyMemberByName(pInstance->stOwnership.c_str())))
Hızlı İtem Toplama Party Fix - Metin2 Geliştirici Rehberi
Metin2 özel sunucularında oyun deneyimini artırmak için birçok sistem geliştirilmektedir. Bunlardan birisi de hızlı item toplama sistemidir. Ancak bu sistemler bazen party moduna uyumlu olmayabilir. Bu yazıda, Metin2 özel sunucu geliştiricileri için Party Fix ile birlikte hızlı item toplama sisteminin nasıl çalıştırılacağına dair detaylı bir rehber sunacağız.
Hızlı Item Toplama Nedir?
Hızlı item toplama, oyuncuların zeminde bulunan itemleri otomatik olarak veya tek tuşla toplayabilmesini sağlayan bir sistemdir. Bu sayede oyun içinde zaman kazanılır ve PvP veya grup oyunları sırasında verim artar. Ancak bu sistemin doğru çalışması için C++ tarafında bazı düzenlemeler yapılması gerekir.
Party Fix Neden Gereklidir?
Party modunda iken itemlerin paylaşımı, toplanması gibi durumlar farklı kurallara tabidir. Eğer hızlı toplama sistemi bu duruma uygun değilse, parti üyeleri arasında item paylaşımı yapılamaz veya hatalı davranabilir. Bu sorunu çözmek için Party Fix adı verilen sistem entegre edilir.
Python Tarafında Uygulanacak Değişiklikler
Py Root klasöründe bulunan uiscript dosyalarında, item pickup komutları party kontrolüyle genişletilmelidir. Örneğin, itemPickUpEvent fonksiyonu, oyuncunun partyde olup olmadığını kontrol etmeli ve buna göre itemi toplamalıdır. Ayrıca, GUI üzerinde bir buton veya komut yardımıyla da bu işlem başlatılmalıdır.
C++ Tarafında Uygulanacak Düzenlemeler
Game Server tarafında, pickup_item.cpp gibi dosyalarda item pickup işlemleri tanımlanmıştır. Burada, party durumu kontrol edilmeli ve itemin kim tarafından alınabileceği belirlenmelidir. Bu sistemde db_core üzerinden item ownership verileri de güncellenmelidir.
Party Fix ile Entegrasyon
Party Fix, hem client hem de server tarafında senkron çalışmalıdır. Client tarafında item pickup komutu, partydeyse sunucuya özel bir mesaj gönderir. Sunucu ise bu mesajı alarak item listesini party üyelerine göre yeniden düzenler. Bu sayede toplama hem hızlı hem de parti kurallarına uygun olur.
Sistem Güvenliği ve Performans
Metin2 özel sunucularda güvenlik önemlidir. Sistemde hile yapılmasını engellemek için pickup komutları auth kontrolünden geçirilmelidir. Ayrıca, performans açısından item sayısı fazla olan alanlarda sınırlandırma yapılmalıdır. Bu sayede server üzerinde oluşabilecek yük azaltılır.
Sonuç
Metin2 özel sunucularında hızlı item toplama sistemi, kullanıcı deneyimini ciddi anlamda artırır. Ancak bu sistemin party ortamında da çalışabilmesi için uygun fix ve entegrasyon yapılmalıdır. C++ ve Python tarafında yapılan bu değişiklikler, sunucu yöneticileri için değerli bir kod örneği teşkil eder. Daha fazla sistem ve geliştirme için Metin2Lobby sitesini takip edin.
Fast Item Pickup Party Fix - Metin2 Developer Guide
In Metin2 private servers, many systems are developed to enhance the gaming experience. One such system is the fast item pickup. However, these systems may not always be compatible with party mode. In this article, we will provide a detailed guide on how to implement a Party Fix alongside the fast item pickup system for Metin2 private server developers.
What is Fast Item Pickup?
Fast item pickup is a system that allows players to automatically or instantly collect items from the ground. This saves time during gameplay and increases efficiency during PvP or group activities. However, for this system to function correctly, some modifications must be made on the C++ side.
Why is Party Fix Required?
In party mode, item sharing and collection follow different rules. If the fast pickup system is not adapted accordingly, item sharing among party members might fail or behave unexpectedly. To resolve this issue, a system called Party Fix is integrated.
Changes to be Made in Python
In the py root folder, within uiscript files, item pickup commands should be extended to check party status. For example, the itemPickUpEvent function should verify whether the player is in a party and collect the item accordingly. Moreover, a button or command on the GUI should initiate this process.
Modifications in C++ Side
In the Game Server, item pickup processes are defined in files like pickup_item.cpp. Here, the party status must be checked to determine who can pick up the item. Additionally, db_core should update item ownership data accordingly.
Integration with Party Fix
Party Fix must work synchronously on both client and server sides. On the client side, if the player is in a party, the item pickup command sends a special message to the server. The server then rearranges the item list based on party members. This ensures that collection is both fast and compliant with party rules.
System Security and Performance
Security is critical in Metin2 private servers. To prevent exploitation, pickup commands must pass through auth checks. Additionally, for performance, limitations should be set in areas with high item density. This reduces potential server load.
Conclusion
Fast item pickup significantly enhances user experience in Metin2 private servers. However, to ensure compatibility with party environments, proper fixes and integration are required. These modifications on both C++ and Python sides serve as valuable code examples for server administrators. For more systems and developments, follow Metin2Lobby.
