- Katılım
- 7 Eyl 2020
- Konular
- 3
- Mesajlar
- 121
- Online süresi
- 7d 9h
- Reaksiyon Skoru
- 44
- Altın Konu
- 0
- TM Yaşı
- 5 Yıl 9 Ay 1 Gün
- Başarım Puanı
- 61
- MmoLira
- 425
- DevLira
- 0
ROHAN2 WORLD 1-120 TR TİPİ OFFICIAL YOHARA, BALATHOR VE AMON! 80. GÜNÜNDE! +10.000 ONLİNE! HİLE VE BOT %100 ENGELLİ HEMEN TIKLA!
yok yapmayacağım sadece sordum clientteki kasmada TextTail denevet ama birkaç yeri daha düzenledim diye hatırlıyorum. uzun zaman önce yaptığım birşeydi. bir önceki yorumumdaki deneyi yaparsan görürsün.
ha şöyle birşey var evet server 2000+(teorik sayı daha fazla ama beynim milyon hesaplayamayacağım) mob karakteri kaldırabiliyor rahatça ama bu sefer client patlıyoroyunun diğer bölgelerinde problem yok ama 2000+ mobun/characterin yanında olunca client çöküyor
Muhtemelen çok fazla paket alışverişi yaptığı için tabi bunlar çok ekstrem durumlar.
neden sürekli mob/character diyorum çünkü source tabanında ikisi aynı şey. ikiside character clasından oluşuyor.
Bunu yapacaksan eğer ileride başına ağrıtacak bir kaç şey var örneğin mysql tablolarda vnum alanları int örneğin item tablosunda ki id sütunun max int değerine daha çabuk yaklaşabilir.
- Katılım
- 27 Ağu 2009
- Konular
- 43
- Mesajlar
- 319
- Online süresi
- 12d 2h
- Reaksiyon Skoru
- 15
- Altın Konu
- 0
- TM Yaşı
- 16 Yıl 9 Ay 15 Gün
- Başarım Puanı
- 126
- MmoLira
- 2,297
- DevLira
- 0
teşekkürler elinize sağlık
- Katılım
- 14 Ocak 2021
- Konular
- 11
- Mesajlar
- 482
- Çözüm
- 9
- Online süresi
- 6mo 10d
- Reaksiyon Skoru
- 403
- Altın Konu
- 0
- TM Yaşı
- 5 Yıl 4 Ay 22 Gün
- Başarım Puanı
- 130
- MmoLira
- 10,530
- DevLira
- 12
Update Final paket boyutu tamamen düşürüldü maksimum 100 baytın üstüne çıkmıyor artık :
C++:
typedef struct character_point_instant
{
long points[POINT_MAX_NUM];
long points_computepoint[POINT_MAX_NUM];//Fixed_[C]Martin_001
//--------------------------------------------------------
void CHARACTER::ComputePoints()
{
compute_point_status = true;//Fixed_[C]Martin_001
memcpy(m_pointsInstant.points_computepoint, m_pointsInstant.points, sizeof(m_pointsInstant.points));//Fixed_[C]Martin_001
long comp_hp = GetHP();//Fixed_[C]Martin_001
long comp_max_hp = GetMaxHP();//Fixed_[C]Martin_001
long comp_sp = GetSP();//Fixed_[C]Martin_001
long comp_max_sp = GetMaxSP();//Fixed_[C]Martin_001
long comp_stamina = GetStamina();//Fixed_[C]Martin_001
long comp_max_stamina = GetMaxStamina();//Fixed_[C]Martin_001
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_ACCE, GetOriginalPart(PART_ACCE));
#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);
// PC_BANG_ITEM_ADD
SetPoint(POINT_PC_BANG_EXP_BONUS, 0);
SetPoint(POINT_PC_BANG_DROP_BONUS, 0);
// END_PC_BANG_ITEM_ADD
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 (NULL != pkSk)
{
pkSk->SetPointVar("k", 1.0f * GetSkillPower(SKILL_ADD_HP) / 100.0f);
iMaxHP += static_cast<int>(pkSk->kPointPoly.Eval());
}
}
SetPoint(POINT_MOV_SPEED, 100);
SetPoint(POINT_ATT_SPEED, 100);
PointChange(POINT_ATT_SPEED, GetPoint(POINT_PARTY_HASTE_BONUS), false, false, compute_point_status);//Fixed_[C]Martin_001
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())
{
if (GetMountVnum())
{
if (GetHorseST() > GetPoint(POINT_ST))
PointChange(POINT_ST, GetHorseST() - GetPoint(POINT_ST), false, false, compute_point_status);//Fixed_[C]Martin_001
if (GetHorseDX() > GetPoint(POINT_DX))
PointChange(POINT_DX, GetHorseDX() - GetPoint(POINT_DX), false, false, compute_point_status);//Fixed_[C]Martin_001
if (GetHorseHT() > GetPoint(POINT_HT))
PointChange(POINT_HT, GetHorseHT() - GetPoint(POINT_HT), false, false, compute_point_status);//Fixed_[C]Martin_001
if (GetHorseIQ() > GetPoint(POINT_IQ))
PointChange(POINT_IQ, GetHorseIQ() - GetPoint(POINT_IQ), false, false, compute_point_status);//Fixed_[C]Martin_001
}
}
ComputeBattlePoints(compute_point_status);//Fixed_[C]Martin_001
if (iMaxHP != GetMaxHP())
{
SetRealPoint(POINT_MAX_HP, iMaxHP);
}
PointChange(POINT_MAX_HP, 0, false, false, compute_point_status);//Fixed_[C]Martin_001
if (iMaxSP != GetMaxSP())
{
SetRealPoint(POINT_MAX_SP, iMaxSP);
}
PointChange(POINT_MAX_SP, 0, false, false, compute_point_status);//Fixed_[C]Martin_001
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, compute_point_status);//Fixed_[C]Martin_001
SET_BIT(m_pointsInstant.dwImmuneFlag, GetWear(i)->GetImmuneFlag());
}
}
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,compute_point_status);//Fixed_[C]Martin_001
}
}
}
if (GetHP() > GetMaxHP())
PointChange(POINT_HP, GetMaxHP() - GetHP(), false, false, compute_point_status);//Fixed_[C]Martin_001
if (GetSP() > GetMaxSP())
PointChange(POINT_SP, GetMaxSP() - GetSP(), false, false, compute_point_status);//Fixed_[C]Martin_001
ComputeSkillPoints();
RefreshAffect(compute_point_status);//Fixed_[C]Martin_001
CPetSystem * pPetSystem = GetPetSystem();
if (NULL != pPetSystem)
pPetSystem->RefreshBuff(compute_point_status);//Fixed_[C]Martin_001
// @fixme118 part2 (after petsystem stuff)
if (IsPC())
{
if (this->GetHP() != iCurHP)
this->PointChange(POINT_HP, iCurHP-this->GetHP(), false, false, compute_point_status);//Fixed_[C]Martin_001
if (this->GetSP() != iCurSP)
this->PointChange(POINT_SP, iCurSP-this->GetSP(), false, false, compute_point_status);//Fixed_[C]Martin_001
}
compute_point_status = false;//Fixed_[C]Martin_001
if (GetDesc())//Fixed_[C]Martin_001
{
BYTE send_count = 0;
auto it = compute_point_list.begin();
for (; it != compute_point_list.end(); it++)
{
if (m_pointsInstant.points_computepoint[it->type] == m_pointsInstant.points[it->type] && m_pointsInstant.points[it->type] == it->val)
continue;
if (it->type == POINT_MAX_HP && comp_max_hp == it->val
|| it->type == POINT_HP && comp_hp == it->val
)
{
continue;
}
if (it->type == POINT_MAX_SP && comp_max_sp == it->val
|| it->type == POINT_SP && comp_sp == it->val
)
{
continue;
}
if (it->type == POINT_MAX_STAMINA && comp_max_stamina == it->val
|| it->type == POINT_STAMINA && comp_stamina == it->val
)
{
continue;
}
send_count++;
}
if (send_count == 1)
{
auto it = compute_point_list.begin();
for (; it != compute_point_list.end(); it++)
{
if (m_pointsInstant.points_computepoint[it->type] == m_pointsInstant.points[it->type] && m_pointsInstant.points[it->type] == it->val)
continue;
if (it->type == POINT_MAX_HP && comp_max_hp == it->val
|| it->type == POINT_HP && comp_hp == it->val
)
{
continue;
}
if (it->type == POINT_MAX_SP && comp_max_sp == it->val
|| it->type == POINT_SP && comp_sp == it->val
)
{
continue;
}
if (it->type == POINT_MAX_STAMINA && comp_max_stamina == it->val
|| it->type == POINT_STAMINA && comp_stamina == it->val
)
{
continue;
}
struct packet_point_change pack;
pack.header = HEADER_GC_CHARACTER_POINT_CHANGE;
pack.dwVID = m_vid;
pack.type = it->type;
pack.value = it->val;
pack.amount = it->amount;
GetDesc()->Packet(&pack, sizeof(struct packet_point_change));
}
}
else
{
if (send_count > 1)
{
TPacketGCPointChangeDynamic pack;
pack.header = HEADER_GC_CHARACTER_POINT_CHANGE_DYNAMIC;
pack.dwVID = m_vid;
pack.count = send_count;
TEMP_BUFFER buf;
buf.write(&pack, sizeof(TPacketGCPointChangeDynamic));
auto it = compute_point_list.begin();
for (; it != compute_point_list.end(); it++)
{
if (m_pointsInstant.points_computepoint[it->type] == m_pointsInstant.points[it->type] && m_pointsInstant.points[it->type] == it->val)
continue;
if (it->type == POINT_MAX_HP && comp_max_hp == it->val
|| it->type == POINT_HP && comp_hp == it->val
)
{
continue;
}
if (it->type == POINT_MAX_SP && comp_max_sp == it->val
|| it->type == POINT_SP && comp_sp == it->val
)
{
continue;
}
if (it->type == POINT_MAX_STAMINA && comp_max_stamina == it->val
|| it->type == POINT_STAMINA && comp_stamina == it->val
)
{
continue;
}
TPacketGCPointChangeDynamicVal pack_val;
pack_val.type = it->type;
pack_val.value = it->val;
pack_val.amount = it->amount;
buf.write(&pack_val, sizeof(TPacketGCPointChangeDynamicVal));
}
GetDesc()->Packet(buf.read_peek(), buf.size());
}
}
}//Fixed_[C]Martin_001
compute_point_list.clear();//Fixed_[C]Martin_001
compute_point_list.shrink_to_fit();//Fixed_[C]Martin_001
UpdatePacket();
memset(m_pointsInstant.points_computepoint, 0, sizeof(m_pointsInstant.points_computepoint));//Fixed_[C]Martin_001
}
- Katılım
- 18 Şub 2014
- Konular
- 43
- Mesajlar
- 710
- Çözüm
- 2
- Online süresi
- 4h 28m
- Reaksiyon Skoru
- 85
- Altın Konu
- 0
- TM Yaşı
- 12 Yıl 3 Ay 19 Gün
- Başarım Puanı
- 99
- MmoLira
- 501
- DevLira
- 0
Teşekkürler, Şu büyülü silah sura büyü çözme attığında oluşan lag için bir çözüm var mı, Forumda bir kaç konu mevcut ancak buglu çözümler.
- Katılım
- 14 Ocak 2021
- Konular
- 11
- Mesajlar
- 482
- Çözüm
- 9
- Online süresi
- 6mo 10d
- Reaksiyon Skoru
- 403
- Altın Konu
- 0
- TM Yaşı
- 5 Yıl 4 Ay 22 Gün
- Başarım Puanı
- 130
- MmoLira
- 10,530
- DevLira
- 12
o sorunda bu tarz bir çözümle düzeliyor cliente gönderilen paketlerin optimize edilmesiyle forumdakilere biraz düzenleme gerekebiliyorTeşekkürler, Şu büyülü silah sura büyü çözme attığında oluşan lag için bir çözüm var mı, Forumda bir kaç konu mevcut ancak buglu çözümler.
Şu an konuyu görüntüleyenler (Toplam : 0, Üye: 0, Misafir: 0)
Benzer konular
- Cevaplar
- 10
- Görüntüleme
- 2K
- Cevaplar
- 149
- Görüntüleme
- 47K


oyunun diğer bölgelerinde problem yok ama 2000+ mobun/characterin yanında olunca client çöküyor