At üzerinde şaman düz vuruş sorunu çözümü

  • Konbuyu başlatan Konbuyu başlatan Admin
  • Başlangıç tarihi Başlangıç tarihi
  • Cevaplar Cevaplar 0
  • Görüntüleme Görüntüleme 55

Admin

Metin2Lobby
Yönetici
Founder
Katılım
6 Mayıs 2022
Mesajlar
52,647
Ticaret : 1 / 0 / 0






Alıntı.
At Üzerinde Shaman Düz Vuruş Sorunu Çözümü

Metin2 özel sunucularında geliştirme yaparken karşılaşılan en yaygın sorunlardan birisi at üzerinde Shaman sınıfının düz vuruş (normal saldırı) yapamamasıdır.

Bu sorun genellikle client-side veya game-server tarafında yapılmış olan bazı eksik ayarlamalardan kaynaklanmaktadır.

Shaman Sınıfı ve At Üzerinde Saldırma Mekaniği

Metin2 oyununda Shaman sınıfı, özel yeteneklerine rağmen at üzerindeyken düz vuruş yapamadığında oyun içi deneyimi ciddi anlamda etkilemektedir. Shaman'ın özel vuruşları güçlü olabilir, ancak bazı özel sunucularda düz vuruşun devre dışı bırakılması gibi yanlış konfigürasyonlar bu sınıfa ait temel hareketlerin dahi çalışmamasına neden olabilmektedir.

Sorunun Kaynağı

Bu sorun genellikle client/src/game/horse_rider.cpp dosyasındaki saldırı kontrol mekanizmasında yer almaktadır. Shaman sınıfı için at üzerindeyken saldırı yapılmasını engelleyen bir koşul bloğu bulunabilir. Bu blok genellikle başka sınıflar için aktif tutulurken Shaman için pasif bırakılmıştır.

Shaman İçin At Üzerinde Saldırma Ayarı

Shaman sınıfının ID'si genellikle 4 numaradır. Bu ID, at üzerinde saldırı yapılmasına izin verilen sınıflar listesinde yer almalıdır. Eğer bu liste sadece Warrior (0), Ninja (1), Sura (2), Shaman (3) olarak tanımlanmışsa ve Shaman (4) bu listede eksikse, Shaman sınıfı düz vuruş yapamaz.

Çözüm Adımları

1. Client-side Kontrol

Client kaynak kodlarında game/src/horse_rider.cpp dosyasını açın.

Saldırı kontrol fonksiyonunda Shaman'ı da içeren bir kontrol yapısı oluşturun:

Kod:
[COLOR=green]if (ch->GetJob() == 0 || ch->GetJob() == 1 || ch->GetJob() == 2 || ch->GetJob() == 4)[/COLOR][BR][/BR][COLOR=green]{[/COLOR][BR][/BR][COLOR=green]    return true;[/COLOR][BR][/BR][COLOR=green]}[/COLOR]


2. Game Server-side Ayar

Ayrıca game/src/char_horse.cpp dosyasında da benzer kontrol bloklarını güncelleyin. Shaman'ın at üzerindeyken saldırabilmesi için gerekli olan fonksiyon çağrısı burada da tanımlı olmalıdır.

3. Compile İşlemi

Değişikliklerden sonra client ve server kaynak kodlarını yeniden derlemeniz gerekmektedir.

Her iki taraf için de make clean && make komutu ile derleme işlemini gerçekleştirebilirsiniz.

Test Aşaması

Sunucuyu başlatın, Shaman karakterinizi oluşturun ve at binin. Artık düz vuruş yapabiliyor olmanız gerekir. Shaman sınıfı için at üzerindeyken özel yeteneklerin çalışması halihazırda destekleniyorsa, düz vuruşun da aktif olması için yukarıdaki adımları takip etmeniz yeterlidir.

Alternatif Çözüm: Python Script ile

Eğer C++ yerine Python tabanlı sistemler kullanıyorsanız, py files içindeki player.py veya character.py gibi dosyalarda Shaman sınıfı için at üzerinde saldırı izni verebilirsiniz. Bu dosyalar genellikle root/ dizininde yer alır ve uiscript ile entegre çalışır.

Sonuç

Metin2 özel sunucularında Shaman sınıfının at üzerinde düz vuruş yapamaması, genellikle küçük ama önemli bir kod hatasıdır. Bu sorunun çözümü için hem client-side hem de server-side gerekli kontrollerin yapılması önemlidir. Bu rehber sayesinde Shaman karakterinizle at üzerindeyken de etkin bir şekilde savaşabilirsiniz.


Solution for Shaman Normal Attack Issue on Horseback

One of the most common issues encountered during Metin2 private server development is the inability of the Shaman class to perform normal attacks while mounted on a horse.

This issue usually stems from incomplete configurations made on either the client-side or the game-server side.

The Shaman Class and Attacking on Horseback

In Metin2, although the Shaman class has special abilities, being unable to perform normal attacks while mounted significantly affects the in-game experience. While Shamen's special attacks may be powerful, incorrect configurations on some private servers can result in even basic movements like normal attacks not working for this class.

Root Cause of the Problem

This problem often lies within the attack control mechanism found in the client/src/game/horse_rider.cpp file. There might be a conditional block that prevents attacking while mounted for the Shaman class. This block might be enabled for other classes but left disabled for the Shaman class.

Setting Up Attack on Horseback for Shaman

The class ID for Shaman is typically 4. This ID must be included in the list of classes allowed to attack while mounted. If the list only includes Warrior (0), Ninja (1), Sura (2), Shaman (3), and Shaman (4) is missing from the list, the Shaman class won't be able to perform normal attacks.

Solution Steps

1. Client-side Check

Open the game/src/horse_rider.cpp file in your client source code.

Create an attack control structure that includes the Shaman class:

Kod:
[COLOR=green]if (ch->GetJob() == 0 || ch->GetJob() == 1 || ch->GetJob() == 2 || ch->GetJob() == 4)[/COLOR][BR][/BR][COLOR=green]{[/COLOR][BR][/BR][COLOR=green]    return true;[/COLOR][BR][/BR][COLOR=green]}[/COLOR]


2. Game Server-side Configuration

Also update similar control blocks in the game/src/char_horse.cpp file. The function call required for the Shaman to attack while mounted must also be defined here.

3. Compilation Process

After making these changes, you need to recompile both the client and server source codes.

You can perform the compilation process for both sides using the command make clean && make.

Testing Phase

Start the server, create your Shaman character, and mount a horse. You should now be able to perform normal attacks. If special abilities for the Shaman class already work while mounted, following the steps above will enable normal attacks as well.

Alternative Solution: Using Python Scripts

If you are using Python-based systems instead of C++, you can allow the Shaman class to attack while mounted by editing files such as player.py or character.py within py files. These files are generally located in the root/ directory and integrated with uiscript.

Conclusion

The inability of the Shaman class to perform normal attacks while mounted on a Metin2 private server is usually due to a small but significant code error. Solving this issue requires proper checks on both the client-side and server-side. With this guide, you can effectively battle while mounted with your Shaman character.
 

Şuan Bu Konuyu Görüntüleyen Kullanıcılar (Toplam : 0, Üye : 0, Misafir : 0)

Benzer konular

Geri
Üst Alt