Ayyıldız2 | 2008 TR Yapısı • 1-99 Orta Emek Destan • Oto Avsız • 10 Temmuz 21:00 HEMEN TIKLA!
konudakini biraz düzeltmeye çalıştım ama denemedim.
Daha önce paylaştığım sorunsuz olan;
Kod:
void CHARACTER::ChannelSwitch(int iNewChannel)
{
if (!GetDesc())
return;
long lAddr, lMapIndex;
long x = GetX(); long y = GetY();
WORD wPort;
if (!CMapLocation::Instance().Get(x, y, lMapIndex, lAddr, wPort)) {
sys_err("cannot find map location index %d x %d y %d name %s", lMapIndex, x, y, GetName());
return;
}
if (lMapIndex >= 10000)
return;
int iNewPort = 0;
int iPorts[] = { 1000, 2000, 3000, 4000 };
for (int i = 0; i < sizeof(iPorts)/sizeof(iPorts[0]); i++) {
if (iNewChannel == i + 1){
iNewPort = iPorts[i];
break;
}
}
if (!iNewPort)
return;
Stop();
Save();
if (GetSectree()) {
GetSectree()->RemoveEntity(this);
ViewCleanUp();
EncodeRemovePacket(this);
}
TPacketGCWarp p;
p.bHeader = HEADER_GC_WARP;
p.lX = x;
p.lY = y;
p.lAddr = lAddr;
p.wPort = iNewPort;
GetDesc()->Packet(&p, sizeof(TPacketGCWarp));
}
Daha önce paylaştığım sorunsuz olan;
Linkleri görebilmek için Turkmmo Forumuna ÜYE olmanız gerekmektedir.
konudakini biraz düzeltmeye çalıştım ama denemedim.
Kod:void CHARACTER::ChannelSwitch(int iNewChannel) { if (!GetDesc()) return; long lAddr, lMapIndex; long x = GetX(); long y = GetY(); WORD wPort; if (!CMapLocation::Instance().Get(x, y, lMapIndex, lAddr, wPort)) { sys_err("cannot find map location index %d x %d y %d name %s", lMapIndex, x, y, GetName()); return; } if (lMapIndex >= 10000) return; int iNewPort = 0; int iPorts[] = { 1000, 2000, 3000, 4000 }; for (int i = 0; i < sizeof(iPorts)/sizeof(iPorts[0]); i++) { if (iNewChannel == i + 1){ iNewPort = iPorts[i]; break; } } if (!iNewPort) return; Stop(); Save(); if (GetSectree()) { GetSectree()->RemoveEntity(this); ViewCleanUp(); EncodeRemovePacket(this); } TPacketGCWarp p; p.bHeader = HEADER_GC_WARP; p.lX = x; p.lY = y; p.lAddr = lAddr; p.wPort = iNewPort; GetDesc()->Packet(&p, sizeof(TPacketGCWarp)); }
Daha önce paylaştığım sorunsuz olan;
Linkleri görebilmek için Turkmmo Forumuna ÜYE olmanız gerekmektedir.
teşekkürler

konudakini biraz düzeltmeye çalıştım ama denemedim.
Kod:void CHARACTER::ChannelSwitch(int iNewChannel) { if (!GetDesc()) return; long lAddr, lMapIndex; long x = GetX(); long y = GetY(); WORD wPort; if (!CMapLocation::Instance().Get(x, y, lMapIndex, lAddr, wPort)) { sys_err("cannot find map location index %d x %d y %d name %s", lMapIndex, x, y, GetName()); return; } if (lMapIndex >= 10000) return; int iNewPort = 0; int iPorts[] = { 1000, 2000, 3000, 4000 }; for (int i = 0; i < sizeof(iPorts)/sizeof(iPorts[0]); i++) { if (iNewChannel == i + 1){ iNewPort = iPorts[i]; break; } } if (!iNewPort) return; Stop(); Save(); if (GetSectree()) { GetSectree()->RemoveEntity(this); ViewCleanUp(); EncodeRemovePacket(this); } TPacketGCWarp p; p.bHeader = HEADER_GC_WARP; p.lX = x; p.lY = y; p.lAddr = lAddr; p.wPort = iNewPort; GetDesc()->Packet(&p, sizeof(TPacketGCWarp)); }
Daha önce paylaştığım sorunsuz olan;
Linkleri görebilmek için Turkmmo Forumuna ÜYE olmanız gerekmektedir.
Seninki client üzeri sanırım bakmadım konuya ?
- Durum
- Üzgünüz bu konu cevaplar için kapatılmıştır...
Şu an konuyu görüntüleyenler (Toplam : 0, Üye: 0, Misafir: 0)
Benzer konular
- Cevaplar
- 8
- Görüntüleme
- 338
- Cevaplar
- 0
- Görüntüleme
- 293
- Cevaplar
- 10
- Görüntüleme
- 969
- Cevaplar
- 9
- Görüntüleme
- 489
- Cevaplar
- 18
- Görüntüleme
- 1K