- Katılım
- 2 Ağu 2016
- Konular
- 27
- Mesajlar
- 726
- Çözüm
- 7
- Online süresi
- 16d 12h
- Reaksiyon Skoru
- 198
- Altın Konu
- 0
- Başarım Puanı
- 121
- MmoLira
- 4,321
- DevLira
- 24
HERAKLES Otomatik Avlı kalıcı sunucu. 19 Haziran'da açılıyor. Atius & Wizard güvencesiyle hemen kayıt ol, ön kayıt ödülleri aktif. HEMEN TIKLA!
sağolasın abi eline sağlık. sabitteki Official item_proto ve mob_proto konusunada bir baksan güncel protoları açmıyorda
- Katılım
- 16 Eki 2009
- Konular
- 376
- Mesajlar
- 3,298
- Çözüm
- 4
- Online süresi
- 9h 52m
- Reaksiyon Skoru
- 340
- Altın Konu
- 0
- TM Yaşı
- 16 Yıl 8 Ay 4 Gün
- Başarım Puanı
- 216
- Yaş
- 29
- MmoLira
- 310
- DevLira
- 0
Oyuna girişte oyuncuların yerlerini görebilmek için SendNPCPosition fonksiyonunu aşağıdaki gibi değişebilirsiniz. Sadece gmler görebilir, oyuncunun direk x,y koordinatlarını alacak fonksiyonu bulamadığım için aşağıdaki gibi yaptım.
C++:
void SECTREE_MANAGER::SendNPCPosition(LPCHARACTER ch)
{
LPDESC d = ch->GetDesc();
if (!d)
return;
long lMapIndex = ch->GetMapIndex();
if (m_mapNPCPosition[lMapIndex].empty())
return;
TEMP_BUFFER buf;
TPacketGCNPCPosition p;
p.header = HEADER_GC_NPC_POSITION;
p.count = m_mapNPCPosition[lMapIndex].size();
TNPCPosition np;
// TODO m_mapNPCPosition[lMapIndex] ¸¦ º¸³»ÁÖ¼¼¿ä
itertype(m_mapNPCPosition[lMapIndex]) it;
for (it = m_mapNPCPosition[lMapIndex].begin(); it != m_mapNPCPosition[lMapIndex].end(); ++it)
{
np.bType = it->bType;
strlcpy(np.name, it->name, sizeof(np.name));
np.x = it->x;
np.y = it->y;
buf.write(&np, sizeof(np));
}
if (ch->IsGM())
{
const DESC_MANAGER::DESC_SET & c_ref_set = DESC_MANAGER::instance().GetClientSet();
for (itertype(c_ref_set) it2 = c_ref_set.begin(); it2 != c_ref_set.end(); ++it2)
{
LPCHARACTER pkChar = (*it2)->GetCharacter();
if (!pkChar)
continue;
if (pkChar->GetMapIndex() == lMapIndex && pkChar->GetPlayerID() != ch->GetPlayerID())
{
PIXEL_POSITION posBase;
if (!SECTREE_MANAGER::instance().GetMapBasePositionByMapIndex(ch->GetMapIndex(), posBase))
{
continue;
}
DWORD mapX = posBase.x;
DWORD mapY = posBase.y;
const PIXEL_POSITION & vpos = pkChar->GetXYZ();
DWORD playerX = vpos.x;
DWORD playerY = vpos.y;
DWORD finalX = (playerX- mapX)/100;
DWORD finalY = (playerY- mapY)/100;
finalX *= 100;
finalY *= 100;
np.bType = 1;
strlcpy(np.name, pkChar->GetName(), sizeof(np.name));
np.x = finalX;
np.y = finalY;
p.count += 1;
buf.write(&np, sizeof(np));
}
}
}
p.size = sizeof(p) + buf.size();
if (buf.size())
{
d->BufferedPacket(&p, sizeof(TPacketGCNPCPosition));
d->Packet(buf.read_peek(), buf.size());
}
else
d->Packet(&p, sizeof(TPacketGCNPCPosition));
}
- Katılım
- 5 Kas 2018
- Konular
- 0
- Mesajlar
- 17
- Reaksiyon Skoru
- 5
- Altın Konu
- 0
- TM Yaşı
- 7 Yıl 7 Ay 12 Gün
- Başarım Puanı
- 9
- MmoLira
- 17
- DevLira
- 0
Oyuna girişte oyuncuların yerlerini görebilmek için SendNPCPosition fonksiyonunu aşağıdaki gibi değişebilirsiniz. Sadece gmler görebilir, oyuncunun direk x,y koordinatlarını alacak fonksiyonu bulamadığım için aşağıdaki gibi yaptım.
![]()
C++:void SECTREE_MANAGER::SendNPCPosition(LPCHARACTER ch) { LPDESC d = ch->GetDesc(); if (!d) return; long lMapIndex = ch->GetMapIndex(); if (m_mapNPCPosition[lMapIndex].empty()) return; TEMP_BUFFER buf; TPacketGCNPCPosition p; p.header = HEADER_GC_NPC_POSITION; p.count = m_mapNPCPosition[lMapIndex].size(); TNPCPosition np; // TODO m_mapNPCPosition[lMapIndex] ¸¦ º¸³»ÁÖ¼¼¿ä itertype(m_mapNPCPosition[lMapIndex]) it; for (it = m_mapNPCPosition[lMapIndex].begin(); it != m_mapNPCPosition[lMapIndex].end(); ++it) { np.bType = it->bType; strlcpy(np.name, it->name, sizeof(np.name)); np.x = it->x; np.y = it->y; buf.write(&np, sizeof(np)); } if (ch->IsGM()) { const DESC_MANAGER::DESC_SET & c_ref_set = DESC_MANAGER::instance().GetClientSet(); for (itertype(c_ref_set) it2 = c_ref_set.begin(); it2 != c_ref_set.end(); ++it2) { LPCHARACTER pkChar = (*it2)->GetCharacter(); if (!pkChar) continue; if (pkChar->GetMapIndex() == lMapIndex && pkChar->GetPlayerID() != ch->GetPlayerID()) { PIXEL_POSITION posBase; if (!SECTREE_MANAGER::instance().GetMapBasePositionByMapIndex(ch->GetMapIndex(), posBase)) { continue; } DWORD mapX = posBase.x; DWORD mapY = posBase.y; const PIXEL_POSITION & vpos = pkChar->GetXYZ(); DWORD playerX = vpos.x; DWORD playerY = vpos.y; DWORD finalX = (playerX- mapX)/100; DWORD finalY = (playerY- mapY)/100; finalX *= 100; finalY *= 100; np.bType = 1; strlcpy(np.name, pkChar->GetName(), sizeof(np.name)); np.x = finalX; np.y = finalY; p.count += 1; buf.write(&np, sizeof(np)); } } } p.size = sizeof(p) + buf.size(); if (buf.size()) { d->BufferedPacket(&p, sizeof(TPacketGCNPCPosition)); d->Packet(buf.read_peek(), buf.size()); } else d->Packet(&p, sizeof(TPacketGCNPCPosition)); }
- Katılım
- 28 Ağu 2018
- Konular
- 15
- Mesajlar
- 204
- Çözüm
- 7
- Reaksiyon Skoru
- 46
- Altın Konu
- 0
- TM Yaşı
- 7 Yıl 9 Ay 21 Gün
- Başarım Puanı
- 56
- Yaş
- 28
- MmoLira
- 170
- DevLira
- 0
nerede değişiklik yapacaklarını bilmeyenlerOyuna girişte oyuncuların yerlerini görebilmek için SendNPCPosition fonksiyonunu aşağıdaki gibi değişebilirsiniz. Sadece gmler görebilir, oyuncunun direk x,y koordinatlarını alacak fonksiyonu bulamadığım için aşağıdaki gibi yaptım.
![]()
C++:void SECTREE_MANAGER::SendNPCPosition(LPCHARACTER ch) { LPDESC d = ch->GetDesc(); if (!d) return; long lMapIndex = ch->GetMapIndex(); if (m_mapNPCPosition[lMapIndex].empty()) return; TEMP_BUFFER buf; TPacketGCNPCPosition p; p.header = HEADER_GC_NPC_POSITION; p.count = m_mapNPCPosition[lMapIndex].size(); TNPCPosition np; // TODO m_mapNPCPosition[lMapIndex] ¸¦ º¸³»ÁÖ¼¼¿ä itertype(m_mapNPCPosition[lMapIndex]) it; for (it = m_mapNPCPosition[lMapIndex].begin(); it != m_mapNPCPosition[lMapIndex].end(); ++it) { np.bType = it->bType; strlcpy(np.name, it->name, sizeof(np.name)); np.x = it->x; np.y = it->y; buf.write(&np, sizeof(np)); } if (ch->IsGM()) { const DESC_MANAGER::DESC_SET & c_ref_set = DESC_MANAGER::instance().GetClientSet(); for (itertype(c_ref_set) it2 = c_ref_set.begin(); it2 != c_ref_set.end(); ++it2) { LPCHARACTER pkChar = (*it2)->GetCharacter(); if (!pkChar) continue; if (pkChar->GetMapIndex() == lMapIndex && pkChar->GetPlayerID() != ch->GetPlayerID()) { PIXEL_POSITION posBase; if (!SECTREE_MANAGER::instance().GetMapBasePositionByMapIndex(ch->GetMapIndex(), posBase)) { continue; } DWORD mapX = posBase.x; DWORD mapY = posBase.y; const PIXEL_POSITION & vpos = pkChar->GetXYZ(); DWORD playerX = vpos.x; DWORD playerY = vpos.y; DWORD finalX = (playerX- mapX)/100; DWORD finalY = (playerY- mapY)/100; finalX *= 100; finalY *= 100; np.bType = 1; strlcpy(np.name, pkChar->GetName(), sizeof(np.name)); np.x = finalX; np.y = finalY; p.count += 1; buf.write(&np, sizeof(np)); } } } p.size = sizeof(p) + buf.size(); if (buf.size()) { d->BufferedPacket(&p, sizeof(TPacketGCNPCPosition)); d->Packet(buf.read_peek(), buf.size()); } else d->Packet(&p, sizeof(TPacketGCNPCPosition)); }
sectree_manager.cpp------------->burada dğişiklik yapacaklar
- Katılım
- 20 Ocak 2009
- Konular
- 184
- Mesajlar
- 1,890
- Online süresi
- 2mo 16d
- Reaksiyon Skoru
- 446
- Altın Konu
- 0
- TM Yaşı
- 17 Yıl 4 Ay 28 Gün
- Başarım Puanı
- 226
- Yaş
- 30
- MmoLira
- 10,354
- DevLira
- 0
Oyuna girişte oyuncuların yerlerini görebilmek için SendNPCPosition fonksiyonunu aşağıdaki gibi değişebilirsiniz. Sadece gmler görebilir, oyuncunun direk x,y koordinatlarını alacak fonksiyonu bulamadığım için aşağıdaki gibi yaptım.
![]()
C++:void SECTREE_MANAGER::SendNPCPosition(LPCHARACTER ch) { LPDESC d = ch->GetDesc(); if (!d) return; long lMapIndex = ch->GetMapIndex(); if (m_mapNPCPosition[lMapIndex].empty()) return; TEMP_BUFFER buf; TPacketGCNPCPosition p; p.header = HEADER_GC_NPC_POSITION; p.count = m_mapNPCPosition[lMapIndex].size(); TNPCPosition np; // TODO m_mapNPCPosition[lMapIndex] ¸¦ º¸³»ÁÖ¼¼¿ä itertype(m_mapNPCPosition[lMapIndex]) it; for (it = m_mapNPCPosition[lMapIndex].begin(); it != m_mapNPCPosition[lMapIndex].end(); ++it) { np.bType = it->bType; strlcpy(np.name, it->name, sizeof(np.name)); np.x = it->x; np.y = it->y; buf.write(&np, sizeof(np)); } if (ch->IsGM()) { const DESC_MANAGER::DESC_SET & c_ref_set = DESC_MANAGER::instance().GetClientSet(); for (itertype(c_ref_set) it2 = c_ref_set.begin(); it2 != c_ref_set.end(); ++it2) { LPCHARACTER pkChar = (*it2)->GetCharacter(); if (!pkChar) continue; if (pkChar->GetMapIndex() == lMapIndex && pkChar->GetPlayerID() != ch->GetPlayerID()) { PIXEL_POSITION posBase; if (!SECTREE_MANAGER::instance().GetMapBasePositionByMapIndex(ch->GetMapIndex(), posBase)) { continue; } DWORD mapX = posBase.x; DWORD mapY = posBase.y; const PIXEL_POSITION & vpos = pkChar->GetXYZ(); DWORD playerX = vpos.x; DWORD playerY = vpos.y; DWORD finalX = (playerX- mapX)/100; DWORD finalY = (playerY- mapY)/100; finalX *= 100; finalY *= 100; np.bType = 1; strlcpy(np.name, pkChar->GetName(), sizeof(np.name)); np.x = finalX; np.y = finalY; p.count += 1; buf.write(&np, sizeof(np)); } } } p.size = sizeof(p) + buf.size(); if (buf.size()) { d->BufferedPacket(&p, sizeof(TPacketGCNPCPosition)); d->Packet(buf.read_peek(), buf.size()); } else d->Packet(&p, sizeof(TPacketGCNPCPosition)); }
sadece oyuna ilk girişteki konumları gösteriyor yalnız herhangi bir update'i yok yani oyuncu hareket ettiğinde minimapteki konumu değişmiyor kullanacaklar için belirteyim.


