MaviAyGames | ComputePoints Update()

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

Admin

Metin2Lobby
Yönetici
Founder
Katılım
6 Mayıs 2022
Mesajlar
52,647
Ticaret : 1 / 0 / 0
ComputePoints değerinden farkı nedir ?

- ComputePoints değerinin sonunda Update() fonksiyonu çalıştırılır. Update fonksiyonu yeniden hesaplanılan değerleri eskisiyle karşılaştırıp yenilerini güncelleme paketidir. Bu yapılanda ise update fonksiyonu yoktur.

service.h

Kod:
#define ENABLE_COMPUTE_POINTS_WITHOUT_UPDATE_PACKET
char.h
Kod:
//Ara ComputePoints // Altına ekle #ifdef ENABLE_COMPUTE_POINTS_WITHOUT_UPDATE_PACKET     void            ComputePointsWithoutUpdatePacket(); #endif

char.cpp
Kod:
#ifdef ENABLE_COMPUTE_POINTS_WITHOUT_UPDATE_PACKET void CHARACTER::ComputePointsWithoutUpdatePacket() {     long lStat = GetPoint(POINT_STAT);     long lStatResetCount = GetPoint(POINT_STAT_RESET_COUNT);     long lSkillActive = GetPoint(POINT_SKILL);     long lSkillSub = GetPoint(POINT_SUB_SKILL);     long lSkillHorse = GetPoint(POINT_HORSE_SKILL);     long lLevelStep = GetPoint(POINT_LEVEL_STEP);     long lAttackerBonus = GetPoint(POINT_PARTY_ATTACKER_BONUS);     long lTankerBonus = GetPoint(POINT_PARTY_TANKER_BONUS);     long lBufferBonus = GetPoint(POINT_PARTY_BUFFER_BONUS);     long lSkillMasterBonus = GetPoint(POINT_PARTY_SKILL_MASTER_BONUS);     long lHasteBonus = GetPoint(POINT_PARTY_HASTE_BONUS);     long lDefenderBonus = GetPoint(POINT_PARTY_DEFENDER_BONUS);     long lHPRecovery = GetPoint(POINT_HP_RECOVERY);     long lSPRecovery = GetPoint(POINT_SP_RECOVERY);     memset(m_pointsInstant.points, 0, sizeof(m_pointsInstant.points));     BuffOnAttr_ClearAll();     m_SkillDamageBonus.clear();     SetPoint(POINT_STAT, lStat);     SetPoint(POINT_SKILL, lSkillActive);     SetPoint(POINT_SUB_SKILL, lSkillSub);     SetPoint(POINT_HORSE_SKILL, lSkillHorse);     SetPoint(POINT_LEVEL_STEP, lLevelStep);     SetPoint(POINT_STAT_RESET_COUNT, lStatResetCount);     SetPoint(POINT_ST, GetRealPoint(POINT_ST));     SetPoint(POINT_HT, GetRealPoint(POINT_HT));     SetPoint(POINT_DX, GetRealPoint(POINT_DX));     SetPoint(POINT_IQ, GetRealPoint(POINT_IQ));     SetPart(PART_MAIN, GetOriginalPart(PART_MAIN));     SetPart(PART_WEAPON, GetOriginalPart(PART_WEAPON));     SetPart(PART_HEAD, GetOriginalPart(PART_HEAD));     SetPart(PART_HAIR, GetOriginalPart(PART_HAIR)); #ifdef ENABLE_ACCE_SYSTEM     SetPart(PART_SASH, GetOriginalPart(PART_SASH)); #endif #ifdef ENABLE_AURA_SYSTEM     SetPart(PART_AURA, GetOriginalPart(PART_AURA)); #endif     SetPoint(POINT_PARTY_ATTACKER_BONUS, lAttackerBonus);     SetPoint(POINT_PARTY_TANKER_BONUS, lTankerBonus);     SetPoint(POINT_PARTY_BUFFER_BONUS, lBufferBonus);     SetPoint(POINT_PARTY_SKILL_MASTER_BONUS, lSkillMasterBonus);     SetPoint(POINT_PARTY_HASTE_BONUS, lHasteBonus);     SetPoint(POINT_PARTY_DEFENDER_BONUS, lDefenderBonus);     SetPoint(POINT_HP_RECOVERY, lHPRecovery);     SetPoint(POINT_SP_RECOVERY, lSPRecovery);     int iMaxHP, iMaxSP;     int iMaxStamina;     if (IsPC())     {         // 최대 생명력/정신력         iMaxHP = JobInitialPoints[GetJob()].max_hp + m_points.iRandomHP + GetPoint(POINT_HT) * JobInitialPoints[GetJob()].hp_per_ht;         iMaxSP = JobInitialPoints[GetJob()].max_sp + m_points.iRandomSP + GetPoint(POINT_IQ) * JobInitialPoints[GetJob()].sp_per_iq;         iMaxStamina = JobInitialPoints[GetJob()].max_stamina + GetPoint(POINT_HT) * JobInitialPoints[GetJob()].stamina_per_con;         {             CSkillProto* pkSk = CSkillManager::instance().Get(SKILL_ADD_HP);             if (nullptr != pkSk)             {                 pkSk->SetPointVar("k", 1.0f * GetSkillPower(SKILL_ADD_HP) / 100.0f);                 iMaxHP += static_cast<int>(pkSk->kPointPoly.Eval());             }         }         SetPoint(POINT_MOV_SPEED, 111);         SetPoint(POINT_ATT_SPEED, 112);         PointChange(POINT_ATT_SPEED, GetPoint(POINT_PARTY_HASTE_BONUS));         SetPoint(POINT_CASTING_SPEED, 100);     }     else     {         iMaxHP = m_pkMobData->m_table.dwMaxHP;         iMaxSP = 0;         iMaxStamina = 0;         SetPoint(POINT_ATT_SPEED, m_pkMobData->m_table.sAttackSpeed);         SetPoint(POINT_MOV_SPEED, m_pkMobData->m_table.sMovingSpeed);         SetPoint(POINT_CASTING_SPEED, m_pkMobData->m_table.sAttackSpeed);     }     if (IsPC())     {         // 말 타고 있을 때는 기본 스탯이 말의 기준 스탯보다 낮으면 높게 만든다.         // 따라서 말의 기준 스탯이 무사 기준이므로, 수라/무당은 전체 스탯 합이         // 대채적으로 더 올라가게 될 것이다. #ifdef ENABLE_MOUNT_COSTUME_SYSTEM         if (GetMountVnum() && !GetWear(WEAR_COSTUME_MOUNT)) #else         if (GetMountVnum()) #endif         {             if (GetHorseST() > GetPoint(POINT_ST))                 PointChange(POINT_ST, GetHorseST() - GetPoint(POINT_ST));             if (GetHorseDX() > GetPoint(POINT_DX))                 PointChange(POINT_DX, GetHorseDX() - GetPoint(POINT_DX));             if (GetHorseHT() > GetPoint(POINT_HT))                 PointChange(POINT_HT, GetHorseHT() - GetPoint(POINT_HT));             if (GetHorseIQ() > GetPoint(POINT_IQ))                 PointChange(POINT_IQ, GetHorseIQ() - GetPoint(POINT_IQ));         }     }     ComputeBattlePoints();     if (iMaxHP != GetMaxHP())     {         SetRealPoint(POINT_MAX_HP, iMaxHP); // 기본HP를 RealPoint에 저장해 놓는다.     }     PointChange(POINT_MAX_HP, 0);     if (iMaxSP != GetMaxSP())     {         SetRealPoint(POINT_MAX_SP, iMaxSP); // 기본SP를 RealPoint에 저장해 놓는다.     }     PointChange(POINT_MAX_SP, 0);     SetMaxStamina(iMaxStamina);     // @fixme118 part1     int iCurHP = this->GetHP();     int iCurSP = this->GetSP();     m_pointsInstant.dwImmuneFlag = 0;     for (int i = 0; i < WEAR_MAX_NUM; i++)     {         LPITEM pItem = GetWear(i);         if (pItem)         {             pItem->ModifyPoints(true);             SET_BIT(m_pointsInstant.dwImmuneFlag, GetWear(i)->GetImmuneFlag());         }     }     // 용혼석 시스템     // ComputePoints에서는 케릭터의 모든 속성값을 초기화하고,     // 아이템, 버프 등에 관련된 모든 속성값을 재계산하기 때문에,     // 용혼석 시스템도 ActiveDeck에 있는 모든 용혼석의 속성값을 다시 적용시켜야 한다.     if (DragonSoul_IsDeckActivated())     {         for (int i = WEAR_MAX_NUM + DS_SLOT_MAX * DragonSoul_GetActiveDeck();             i < WEAR_MAX_NUM + DS_SLOT_MAX * (DragonSoul_GetActiveDeck() + 1); i++)         {             LPITEM pItem = GetWear(i);             if (pItem)             {                 if (DSManager::instance().IsTimeLeftDragonSoul(pItem))                     pItem->ModifyPoints(true);             }         }     }     if (GetHP() > GetMaxHP())         PointChange(POINT_HP, GetMaxHP() - GetHP());     if (GetSP() > GetMaxSP())         PointChange(POINT_SP, GetMaxSP() - GetSP());     ComputeSkillPoints();     RefreshAffect();     // @fixme118 part2 (before petsystem stuff)     if (IsPC())     {         if (this->GetHP() != iCurHP)             this->PointChange(POINT_HP, iCurHP - this->GetHP());         if (this->GetSP() != iCurSP)             this->PointChange(POINT_SP, iCurSP - this->GetSP());     }     CPetSystem * pPetSystem = GetPetSystem();     if (nullptr != pPetSystem)     {         pPetSystem->RefreshBuff();     }     for (TMapBuffOnAttrs::iterator it = m_map_buff_on_attrs.begin(); it != m_map_buff_on_attrs.end(); it++)     {         it->second->GiveAllAttributes();     } } #endif

Peki bu kod nerelerde kullanılmalı ?

char_skill.cpp

Kod:
// Aratın void CHARACTER::SkillLevelUp // Fonkisyonun sonundaki     ComputePoints(); bulun // Değiştirin #ifdef ENABLE_COMPUTE_POINTS_WITHOUT_UPDATE_PACKET     ComputePointsWithoutUpdatePacket(); #else     ComputePoints(); #endif

Her compute gördüğünüz yere kullanmayın ve bilmeyen arkadaşların kullanmasını tavsiye etmiyorum.

SP | Eksikleri buradan giderin ;

cmd_general.cpp açılır ve aratılır

ACMD(do_stat_minus)

şu şekilde değiştirilir

Kod:
ACMD(do_stat_minus) {     char arg1[256];     one_argument(argument, arg1, sizeof(arg1));     if (!*arg1)         return;     if (ch->IsPolymorphed())     {         ch->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("둔갑 중에는 능력을 올릴 수 없습니다."));         return;     }     if (ch->GetPoint(POINT_STAT_RESET_COUNT) <= 0)         return;     if (!strcmp(arg1, "st"))     {         if (ch->GetRealPoint(POINT_ST) <= JobInitialPoints[ch->GetJob()].st)             return;         ch->SetRealPoint(POINT_ST, ch->GetRealPoint(POINT_ST) - 1);         ch->SetPoint(POINT_ST, ch->GetPoint(POINT_ST) - 1); #ifdef ENABLE_COMPUTE_POINTS_WITHOUT_UPDATE_PACKET         ch->ComputePointsWithoutUpdatePacket(); #else         ch->ComputePoints(); #endif         ch->PointChange(POINT_ST, 0);     }     else if (!strcmp(arg1, "dx"))     {         if (ch->GetRealPoint(POINT_DX) <= JobInitialPoints[ch->GetJob()].dx)             return;         ch->SetRealPoint(POINT_DX, ch->GetRealPoint(POINT_DX) - 1);         ch->SetPoint(POINT_DX, ch->GetPoint(POINT_DX) - 1); #ifdef ENABLE_COMPUTE_POINTS_WITHOUT_UPDATE_PACKET         ch->ComputePointsWithoutUpdatePacket(); #else         ch->ComputePoints(); #endif         ch->PointChange(POINT_DX, 0);     }     else if (!strcmp(arg1, "ht"))     {         if (ch->GetRealPoint(POINT_HT) <= JobInitialPoints[ch->GetJob()].ht)             return;         ch->SetRealPoint(POINT_HT, ch->GetRealPoint(POINT_HT) - 1);         ch->SetPoint(POINT_HT, ch->GetPoint(POINT_HT) - 1); #ifdef ENABLE_COMPUTE_POINTS_WITHOUT_UPDATE_PACKET         ch->ComputePointsWithoutUpdatePacket(); #else         ch->ComputePoints(); #endif         ch->PointChange(POINT_HT, 0);         ch->PointChange(POINT_MAX_HP, 0);     }     else if (!strcmp(arg1, "iq"))     {         if (ch->GetRealPoint(POINT_IQ) <= JobInitialPoints[ch->GetJob()].iq)             return;         ch->SetRealPoint(POINT_IQ, ch->GetRealPoint(POINT_IQ) - 1);         ch->SetPoint(POINT_IQ, ch->GetPoint(POINT_IQ) - 1); #ifdef ENABLE_COMPUTE_POINTS_WITHOUT_UPDATE_PACKET         ch->ComputePointsWithoutUpdatePacket(); #else         ch->ComputePoints(); #endif         ch->PointChange(POINT_IQ, 0);         ch->PointChange(POINT_MAX_SP, 0);     }     else         return;     ch->PointChange(POINT_STAT, +1);     ch->PointChange(POINT_STAT_RESET_COUNT, -1); #ifdef ENABLE_COMPUTE_POINTS_WITHOUT_UPDATE_PACKET     ch->ComputePointsWithoutUpdatePacket(); #else     ch->ComputePoints(); #endif }

ACMD(do_stat) aratılır ve içerisinde

ch->ComputePoints(); bulunur ve şu şekilde değiştirilir

Kod:
#ifdef ENABLE_COMPUTE_POINTS_WITHOUT_UPDATE_PACKET     ch->ComputePointsWithoutUpdatePacket(); #else     ch->ComputePoints(); #endif

ch->ComputePoints(); bir kez daha aratılır ve şu şekilde değiştirilir ;

Kod:
#ifdef ENABLE_COMPUTE_POINTS_WITHOUT_UPDATE_PACKET     ch->ComputePointsWithoutUpdatePacket(); #else     ch->ComputePoints(); #endif

Eğer eksik olduğunu düşündüğünüz birşey varsa konuya yazın halledilir.
MaviAyGames | ComputePoints Update()

Metin2 özel sunucularında PvP sistemlerin kalbi olan ComputePoints fonksiyonu, oyuncuların performansına göre dinamik olarak puan hesaplamaları yapar. Bu güncelleme, MaviAyGames tarafından sunulan güçlü C++ tabanlı kaynak kodlarda daha verimli hale getirildi. Bu yazıda, ComputePoints Update() fonksiyonunun ne olduğunu, nasıl çalıştığını ve Metin2 özel sunucu geliştiricileri için neden bu kadar önemli olduğunu ele alacağız.

ComputePoints Nedir?
ComputePoints, oyuncuların PvP etkinliklerine göre derecelendirme puanları hesaplayan bir sistemdir. Oyuncu bir düşmanına hasar verdiğinde, öldürdüğüde veya turnuvalarda başarı gösterdiğinde bu puanlar güncellenir. Bu sayede oyuncular arasında adil bir sıralama oluşturulur ve oyun deneyimi artırılır. MaviAyGames tarafından geliştirilen yeni Update() fonksiyonu, bu puanların daha hızlı ve doğru şekilde hesaplanmasını sağlar.

Güncellenmiş Fonksiyonun Özellikleri
MaviAyGames ComputePoints Update() fonksiyonu ile birlikte şu yenilikleri getirmiştir:

- Hızlı Puan Hesaplama: Yeni sistem, büyük veri setlerinde bile düşük gecikmeyle çalışır.
- Daha Fazla Ayarlanabilirlik: Sunucu geliştiricileri, puanlama kurallarını kolayca özelleştirebilir.
- Otomatik Turnuva Entegrasyonu: Turnuva sonuçları doğrudan puan sistemine yansıtılır.

Neden ComputePoints Update() Kullanmalısınız?[/BR][/BR]Metin2 özel sunucularında oyuncuların ilgisini çekmek ve rekabet ortamını geliştirmek için güçlü sistemlere ihtiyaç vardır. ComputePoints Update() fonksiyonu, oyuncuların PvP performanslarını analiz ederek onlara özel ödüller ve dereceler sunar. Bu sayede oyuncular daha aktif hale gelir ve sunucunuzun popülaritesi artar. MaviAyGames'in sunduğu bu güncelleme, tüm Metin2 kaynak kodları ile uyumlu çalışır ve Martysama gibi sistemlerle entegre edilebilir.

Teknik Detaylar[/BR][/BR]Fonksiyonun C++ kaynak kodunda bulunan void ComputePoints::Update() yapısı şu şekildedir:

int playerDamage = GetPlayerDamage();
int playerKills = GetPlayerKills();
int totalScore = CalculateScore(playerDamage, playerKills);
SetPlayerRating(totalScore);


Bu yapı, oyuncunun PvP performansına göre anlık olarak puan güncellemesi yapar. Python GUI arayüzleri ile birlikte sunucu yöneticileri bu puanlamaları kolayca takip edebilir ve düzenleyebilir.

Sonuç
MaviAyGames'in ComputePoints Update() fonksiyonu, Metin2 özel sunucu geliştiricileri için güçlü bir araçtır. Performans odaklı tasarımı, yüksek güvenlik ve esnek yapı sayesinde her seviyeden geliştiriciye hitap eder. Eğer Metin2 PvP sistemleri ve kaynak kod geliştirme konusunda ilerlemek istiyorsanız bu güncellemeyi mutlaka denemelisiniz. Daha fazlası için Metin2Lobby üzerinden ilgili sistemlere göz atabilirsiniz.


MaviAyGames | ComputePoints Update()

In Metin2 private servers, the ComputePoints function, which lies at the heart of PvP systems, dynamically calculates points based on player performance. This update, brought by MaviAyGames, has been made more efficient in powerful C++-based source codes. In this article, we will examine what the ComputePoints Update() function is, how it works, and why it is so important for Metin2 private server developers.

What is ComputePoints?
ComputePoints is a system that calculates rating points for players based on their PvP activities. When a player damages an enemy, kills them, or performs well in tournaments, these points are updated. This creates a fair ranking among players and enhances the gaming experience. The new Update() function provided by MaviAyGames ensures faster and more accurate point calculations.

Features of the Updated Function
With the ComputePoints Update() function, MaviAyGames has introduced the following improvements:

- Fast Point Calculation: The new system operates with low latency even with large datasets.
- More Customization Options: Server developers can easily customize scoring rules.
- Automatic Tournament Integration: Tournament results are directly reflected in the point system.

Why Should You Use ComputePoints Update()?[/BR][/BR]To attract players and improve competition in Metin2 private servers, strong systems are essential. The ComputePoints Update() function provides special rewards and rankings based on players’ PvP performance. This makes players more active and increases your server’s popularity. This update from MaviAyGames works seamlessly with all Metin2 source codes and can be integrated with systems like Martysama.

Technical Details[/BR][/BR]The structure of the function in the C++ source code is as follows:

int playerDamage = GetPlayerDamage();
int playerKills = GetPlayerKills();
int totalScore = CalculateScore(playerDamage, playerKills);
SetPlayerRating(totalScore);


This structure updates player scores instantly based on their PvP performance. Together with Python GUI interfaces, server administrators can easily monitor and adjust these scores.

Conclusion
The ComputePoints Update() function from MaviAyGames is a powerful tool for Metin2 private server developers. Its performance-focused design, high security, and flexible structure appeal to developers of all levels. If you aim to advance in Metin2 PvP systems and source code development, you should definitely try this update. For more information, visit Metin2Lobby to explore related systems.
 

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

Benzer konular

Geri
Üst Alt